@stigg/js-client-sdk 0.25.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.js.LICENSE.txt +0 -8
package/dist/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Stigg",[],t):"object"==typeof exports?exports.Stigg=t():e.Stigg=t()}(self,(function(){return(()=>{var e={4098:function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,a="ArrayBuffer"in e;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?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 h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function d(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function v(e){var t=new FileReader,n=d(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):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):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=h(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 new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=d(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(e,t){e=c(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},p.prototype.delete=function(e){delete this.map[c(e)]},p.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},p.prototype.set=function(e,t){this.map[c(e)]=l(t)},p.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},p.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},p.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},p.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},r&&(p.prototype[Symbol.iterator]=p.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n,r,i=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),g.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},m.call(b.prototype),m.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];E.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function O(e,n){return new Promise((function(r,o){var a=new b(e,n);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new E(i,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}O.polyfill=!0,e.fetch||(e.fetch=O,e.Headers=p,e.Request=b,e.Response=E),t.Headers=p,t.Request=b,t.Response=E,t.fetch=O,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},8552:(e,t,n)=>{var r=n(852)(n(5639),"DataView");e.exports=r},1989:(e,t,n)=>{var r=n(1789),i=n(401),o=n(7667),a=n(1327),s=n(1866);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},8407:(e,t,n)=>{var r=n(7040),i=n(4125),o=n(2117),a=n(7529),s=n(4705);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},7071:(e,t,n)=>{var r=n(852)(n(5639),"Map");e.exports=r},3369:(e,t,n)=>{var r=n(4785),i=n(1285),o=n(6e3),a=n(9916),s=n(5265);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},3818:(e,t,n)=>{var r=n(852)(n(5639),"Promise");e.exports=r},8525:(e,t,n)=>{var r=n(852)(n(5639),"Set");e.exports=r},8668:(e,t,n)=>{var r=n(3369),i=n(619),o=n(2385);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},6384:(e,t,n)=>{var r=n(8407),i=n(7465),o=n(3779),a=n(7599),s=n(4758),u=n(4309);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},2705:(e,t,n)=>{var r=n(5639).Symbol;e.exports=r},1149:(e,t,n)=>{var r=n(5639).Uint8Array;e.exports=r},577:(e,t,n)=>{var r=n(852)(n(5639),"WeakMap");e.exports=r},6874:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},4963:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},4636:(e,t,n)=>{var r=n(2545),i=n(5694),o=n(1469),a=n(4144),s=n(5776),u=n(6719),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),l=!n&&i(e),f=!n&&!l&&a(e),p=!n&&!l&&!f&&u(e),h=n||l||f||p,d=h?r(e.length,String):[],v=d.length;for(var y in e)!t&&!c.call(e,y)||h&&("length"==y||f&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,v))||d.push(y);return d}},9932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},2488:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},2908:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},6556:(e,t,n)=>{var r=n(9465),i=n(7813);e.exports=function(e,t,n){(void 0!==n&&!i(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},4865:(e,t,n)=>{var r=n(9465),i=n(7813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},8470:(e,t,n)=>{var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},9465:(e,t,n)=>{var r=n(8777);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3118:(e,t,n)=>{var r=n(3218),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},4140:(e,t,n)=>{var r=n(7816),i=n(9291)(r);e.exports=i},1848:e=>{e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},1078:(e,t,n)=>{var r=n(2488),i=n(7285);e.exports=function e(t,n,o,a,s){var u=-1,c=t.length;for(o||(o=i),s||(s=[]);++u<c;){var l=t[u];n>0&&o(l)?n>1?e(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},8483:(e,t,n)=>{var r=n(5063)();e.exports=r},7816:(e,t,n)=>{var r=n(8483),i=n(3674);e.exports=function(e,t){return e&&r(e,t,i)}},7786:(e,t,n)=>{var r=n(1811),i=n(327);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},8866:(e,t,n)=>{var r=n(2488),i=n(1469);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},4239:(e,t,n)=>{var r=n(2705),i=n(9607),o=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},2118:(e,t,n)=>{var r=n(1848),i=n(2722),o=n(2351);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},9454:(e,t,n)=>{var r=n(4239),i=n(7005);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},939:(e,t,n)=>{var r=n(1299),i=n(7005);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,a,e,s))}},1299:(e,t,n)=>{var r=n(6384),i=n(7114),o=n(8351),a=n(6096),s=n(4160),u=n(1469),c=n(4144),l=n(6719),f="[object Arguments]",p="[object Array]",h="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,y,m){var g=u(e),b=u(t),_=g?p:s(e),E=b?p:s(t),w=(_=_==f?h:_)==h,O=(E=E==f?h:E)==h,x=_==E;if(x&&c(e)){if(!c(t))return!1;g=!0,w=!1}if(x&&!w)return m||(m=new r),g||l(e)?i(e,t,n,v,y,m):o(e,t,_,n,v,y,m);if(!(1&n)){var I=w&&d.call(e,"__wrapped__"),T=O&&d.call(t,"__wrapped__");if(I||T){var S=I?e.value():e,A=T?t.value():t;return m||(m=new r),y(S,A,n,v,m)}}return!!x&&(m||(m=new r),a(e,t,n,v,y,m))}},2958:(e,t,n)=>{var r=n(6384),i=n(939);e.exports=function(e,t,n,o){var a=n.length,s=a,u=!o;if(null==e)return!s;for(e=Object(e);a--;){var c=n[a];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var l=(c=n[a])[0],f=e[l],p=c[1];if(u&&c[2]){if(void 0===f&&!(l in e))return!1}else{var h=new r;if(o)var d=o(f,p,l,e,t,h);if(!(void 0===d?i(p,f,3,o,h):d))return!1}}return!0}},2722:e=>{e.exports=function(e){return e!=e}},8458:(e,t,n)=>{var r=n(3560),i=n(5346),o=n(3218),a=n(346),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?p:s).test(a(e))}},8749:(e,t,n)=>{var r=n(4239),i=n(1780),o=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},7206:(e,t,n)=>{var r=n(1573),i=n(6432),o=n(6557),a=n(1469),s=n(9601);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}},280:(e,t,n)=>{var r=n(5726),i=n(6916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},313:(e,t,n)=>{var r=n(3218),i=n(5726),o=n(3498),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},9199:(e,t,n)=>{var r=n(4140),i=n(8612);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}},1573:(e,t,n)=>{var r=n(2958),i=n(1499),o=n(2634);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},6432:(e,t,n)=>{var r=n(939),i=n(7361),o=n(9095),a=n(5403),s=n(9162),u=n(2634),c=n(327);e.exports=function(e,t){return a(e)&&s(t)?u(c(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},2980:(e,t,n)=>{var r=n(6384),i=n(6556),o=n(8483),a=n(9783),s=n(3218),u=n(1704),c=n(6390);e.exports=function e(t,n,l,f,p){t!==n&&o(n,(function(o,u){if(p||(p=new r),s(o))a(t,n,u,l,e,f,p);else{var h=f?f(c(t,u),o,u+"",t,n,p):void 0;void 0===h&&(h=o),i(t,u,h)}}),u)}},9783:(e,t,n)=>{var r=n(6556),i=n(4626),o=n(7133),a=n(278),s=n(8517),u=n(5694),c=n(1469),l=n(9246),f=n(4144),p=n(3560),h=n(3218),d=n(8630),v=n(6719),y=n(6390),m=n(9881);e.exports=function(e,t,n,g,b,_,E){var w=y(e,n),O=y(t,n),x=E.get(O);if(x)r(e,n,x);else{var I=_?_(w,O,n+"",e,t,E):void 0,T=void 0===I;if(T){var S=c(O),A=!S&&f(O),k=!S&&!A&&v(O);I=O,S||A||k?c(w)?I=w:l(w)?I=a(w):A?(T=!1,I=i(O,!0)):k?(T=!1,I=o(O,!0)):I=[]:d(O)||u(O)?(I=w,u(w)?I=m(w):h(w)&&!p(w)||(I=s(O))):T=!1}T&&(E.set(O,I),b(I,O,g,_,E),E.delete(O)),r(e,n,I)}}},2689:(e,t,n)=>{var r=n(9932),i=n(7786),o=n(7206),a=n(9199),s=n(1131),u=n(7518),c=n(5022),l=n(6557),f=n(1469);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return f(e)?function(t){return i(t,1===e.length?e[0]:e)}:e})):[l];var p=-1;t=r(t,u(o));var h=a(e,(function(e,n,i){return{criteria:r(t,(function(t){return t(e)})),index:++p,value:e}}));return s(h,(function(e,t){return c(e,t,n)}))}},371:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},9152:(e,t,n)=>{var r=n(7786);e.exports=function(e){return function(t){return r(t,e)}}},5976:(e,t,n)=>{var r=n(6557),i=n(5357),o=n(61);e.exports=function(e,t){return o(i(e,t,r),e+"")}},6560:(e,t,n)=>{var r=n(5703),i=n(8777),o=n(6557),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},1131:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},2545:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},531:(e,t,n)=>{var r=n(2705),i=n(9932),o=n(1469),a=n(3448),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7561:(e,t,n)=>{var r=n(7990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},7518:e=>{e.exports=function(e){return function(t){return e(t)}}},7415:(e,t,n)=>{var r=n(9932);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},4757:e=>{e.exports=function(e,t){return e.has(t)}},1811:(e,t,n)=>{var r=n(1469),i=n(5403),o=n(5514),a=n(9833);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},4318:(e,t,n)=>{var r=n(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},4626:(e,t,n)=>{e=n.nmd(e);var r=n(5639),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},7133:(e,t,n)=>{var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},6393:(e,t,n)=>{var r=n(3448);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,u=null===t,c=t==t,l=r(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!l&&e<t||l&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}},5022:(e,t,n)=>{var r=n(6393);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,u=n.length;++i<s;){var c=r(o[i],a[i]);if(c)return i>=u?c:c*("desc"==n[i]?-1:1)}return e.index-t.index}},278:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},8363:(e,t,n)=>{var r=n(4865),i=n(9465);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=o?o(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),a?i(n,c,l):r(n,c,l)}return n}},4429:(e,t,n)=>{var r=n(5639)["__core-js_shared__"];e.exports=r},1463:(e,t,n)=>{var r=n(5976),i=n(6612);e.exports=function(e){return r((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}},9291:(e,t,n)=>{var r=n(8612);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},5063:e=>{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}},8777:(e,t,n)=>{var r=n(852),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},7114:(e,t,n)=>{var r=n(8668),i=n(2908),o=n(4757);e.exports=function(e,t,n,a,s,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var p=u.get(e),h=u.get(t);if(p&&h)return p==t&&h==e;var d=-1,v=!0,y=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++d<l;){var m=e[d],g=t[d];if(a)var b=c?a(g,m,d,t,e,u):a(m,g,d,e,t,u);if(void 0!==b){if(b)continue;v=!1;break}if(y){if(!i(t,(function(e,t){if(!o(y,t)&&(m===e||s(m,e,n,a,u)))return y.push(t)}))){v=!1;break}}else if(m!==g&&!s(m,g,n,a,u)){v=!1;break}}return u.delete(e),u.delete(t),v}},8351:(e,t,n)=>{var r=n(2705),i=n(1149),o=n(7813),a=n(7114),s=n(8776),u=n(1814),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=s;case"[object Set]":var d=1&r;if(h||(h=u),e.size!=t.size&&!d)return!1;var v=p.get(e);if(v)return v==t;r|=2,p.set(e,t);var y=a(h(e),h(t),r,c,f,p);return p.delete(e),y;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},6096:(e,t,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var u=1&n,c=r(e),l=c.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var p=c[f];if(!(u?p in t:i.call(t,p)))return!1}var h=s.get(e),d=s.get(t);if(h&&d)return h==t&&d==e;var v=!0;s.set(e,t),s.set(t,e);for(var y=u;++f<l;){var m=e[p=c[f]],g=t[p];if(o)var b=u?o(g,m,p,t,e,s):o(m,g,p,e,t,s);if(!(void 0===b?m===g||a(m,g,n,o,s):b)){v=!1;break}y||(y="constructor"==p)}if(v&&!y){var _=e.constructor,E=t.constructor;_==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof E&&E instanceof E||(v=!1)}return s.delete(e),s.delete(t),v}},1957:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8234:(e,t,n)=>{var r=n(8866),i=n(9551),o=n(3674);e.exports=function(e){return r(e,o,i)}},5050:(e,t,n)=>{var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},1499:(e,t,n)=>{var r=n(9162),i=n(3674);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},852:(e,t,n)=>{var r=n(8458),i=n(7801);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},5924:(e,t,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);e.exports=r},9607:(e,t,n)=>{var r=n(2705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},9551:(e,t,n)=>{var r=n(4963),i=n(479),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},4160:(e,t,n)=>{var r=n(8552),i=n(7071),o=n(3818),a=n(8525),s=n(577),u=n(4239),c=n(346),l="[object Map]",f="[object Promise]",p="[object Set]",h="[object WeakMap]",d="[object DataView]",v=c(r),y=c(i),m=c(o),g=c(a),b=c(s),_=u;(r&&_(new r(new ArrayBuffer(1)))!=d||i&&_(new i)!=l||o&&_(o.resolve())!=f||a&&_(new a)!=p||s&&_(new s)!=h)&&(_=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return d;case y:return l;case m:return f;case g:return p;case b:return h}return t}),e.exports=_},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,n)=>{var r=n(1811),i=n(5694),o=n(1469),a=n(5776),s=n(1780),u=n(327);e.exports=function(e,t,n){for(var c=-1,l=(t=r(t,e)).length,f=!1;++c<l;){var p=u(t[c]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&s(l)&&a(p,l)&&(o(e)||i(e))}},1789:(e,t,n)=>{var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},1327:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},1866:(e,t,n)=>{var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},8517:(e,t,n)=>{var r=n(3118),i=n(5924),o=n(5726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},7285:(e,t,n)=>{var r=n(2705),i=n(5694),o=n(1469),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},5776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},6612:(e,t,n)=>{var r=n(7813),i=n(8612),o=n(5776),a=n(3218);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},5403:(e,t,n)=>{var r=n(1469),i=n(3448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},7019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:(e,t,n)=>{var r,i=n(4429),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},5726:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9162:(e,t,n)=>{var r=n(3218);e.exports=function(e){return e==e&&!r(e)}},7040:e=>{e.exports=function(){this.__data__=[],this.size=0}},4125:(e,t,n)=>{var r=n(8470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},2117:(e,t,n)=>{var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7529:(e,t,n)=>{var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:(e,t,n)=>{var r=n(8470);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},4785:(e,t,n)=>{var r=n(1989),i=n(8407),o=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},1285:(e,t,n)=>{var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:(e,t,n)=>{var r=n(5050);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},8776:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},4523:(e,t,n)=>{var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:(e,t,n)=>{var r=n(852)(Object,"create");e.exports=r},6916:(e,t,n)=>{var r=n(5569)(Object.keys,Object);e.exports=r},3498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:(e,t,n)=>{e=n.nmd(e);var r=n(1957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},5357:(e,t,n)=>{var r=n(6874),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),u=Array(s);++a<s;)u[a]=o[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=o[a];return c[t]=n(u),r(e,this,c)}}},5639:(e,t,n)=>{var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},6390:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:e=>{e.exports=function(e){return this.__data__.has(e)}},1814:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},61:(e,t,n)=>{var r=n(6560),i=n(1275)(r);e.exports=i},1275:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:(e,t,n)=>{var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:e=>{e.exports=function(e){return this.__data__.get(e)}},4758:e=>{e.exports=function(e){return this.__data__.has(e)}},4309:(e,t,n)=>{var r=n(8407),i=n(7071),o=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},2351:e=>{e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},5514:(e,t,n)=>{var r=n(4523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=a},327:(e,t,n)=>{var r=n(3448);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},5703:e=>{e.exports=function(e){return function(){return e}}},7813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},7361:(e,t,n)=>{var r=n(7786);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},9095:(e,t,n)=>{var r=n(13),i=n(222);e.exports=function(e,t){return null!=e&&i(e,t,r)}},6557:e=>{e.exports=function(e){return e}},4721:(e,t,n)=>{var r=n(2118),i=n(8612),o=n(7037),a=n(554),s=n(2628),u=Math.max;e.exports=function(e,t,n,c){e=i(e)?e:s(e),n=n&&!c?a(n):0;var l=e.length;return n<0&&(n=u(l+n,0)),o(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&r(e,t,n)>-1}},5694:(e,t,n)=>{var r=n(9454),i=n(7005),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},1469:e=>{var t=Array.isArray;e.exports=t},8612:(e,t,n)=>{var r=n(3560),i=n(1780);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},9246:(e,t,n)=>{var r=n(8612),i=n(7005);e.exports=function(e){return i(e)&&r(e)}},4144:(e,t,n)=>{e=n.nmd(e);var r=n(5639),i=n(5062),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u},1609:(e,t,n)=>{var r=n(280),i=n(4160),o=n(5694),a=n(1469),s=n(8612),u=n(4144),c=n(5726),l=n(6719),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},3560:(e,t,n)=>{var r=n(4239),i=n(3218);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},8630:(e,t,n)=>{var r=n(4239),i=n(5924),o=n(7005),a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,l=u.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},7037:(e,t,n)=>{var r=n(4239),i=n(1469),o=n(7005);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},3448:(e,t,n)=>{var r=n(4239),i=n(7005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},6719:(e,t,n)=>{var r=n(8749),i=n(7518),o=n(1167),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},3674:(e,t,n)=>{var r=n(4636),i=n(280),o=n(8612);e.exports=function(e){return o(e)?r(e):i(e)}},1704:(e,t,n)=>{var r=n(4636),i=n(313),o=n(8612);e.exports=function(e){return o(e)?r(e,!0):i(e)}},6486:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,h=4294967295,d=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],v="[object Arguments]",y="[object Array]",m="[object Boolean]",g="[object Date]",b="[object Error]",_="[object Function]",E="[object GeneratorFunction]",w="[object Map]",O="[object Number]",x="[object Object]",I="[object Promise]",T="[object RegExp]",S="[object Set]",A="[object String]",k="[object Symbol]",D="[object WeakMap]",N="[object ArrayBuffer]",P="[object DataView]",R="[object Float32Array]",C="[object Float64Array]",F="[object Int8Array]",j="[object Int16Array]",L="[object Int32Array]",M="[object Uint8Array]",U="[object Uint8ClampedArray]",q="[object Uint16Array]",V="[object Uint32Array]",B=/\b__p \+= '';/g,Q=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,$=/[&<>"']/g,G=RegExp(W.source),K=RegExp($.source),Y=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ge=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",we="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",xe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="["+xe+"]",Te="["+Ee+"]",Se="\\d+",Ae="["+we+"]",ke="[^\\ud800-\\udfff"+xe+Se+"\\u2700-\\u27bf"+we+Oe+"]",De="\\ud83c[\\udffb-\\udfff]",Ne="[^\\ud800-\\udfff]",Pe="(?:\\ud83c[\\udde6-\\uddff]){2}",Re="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="["+Oe+"]",Fe="(?:"+Ae+"|"+ke+")",je="(?:"+Ce+"|"+ke+")",Le="(?:['’](?:d|ll|m|re|s|t|ve))?",Me="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ue="(?:"+Te+"|"+De+")?",qe="[\\ufe0e\\ufe0f]?",Ve=qe+Ue+"(?:\\u200d(?:"+[Ne,Pe,Re].join("|")+")"+qe+Ue+")*",Be="(?:"+["[\\u2700-\\u27bf]",Pe,Re].join("|")+")"+Ve,Qe="(?:"+[Ne+Te+"?",Te,Pe,Re,"[\\ud800-\\udfff]"].join("|")+")",ze=RegExp("['’]","g"),We=RegExp(Te,"g"),$e=RegExp(De+"(?="+De+")|"+Qe+Ve,"g"),Ge=RegExp([Ce+"?"+Ae+"+"+Le+"(?="+[Ie,Ce,"$"].join("|")+")",je+"+"+Me+"(?="+[Ie,Ce+Fe,"$"].join("|")+")",Ce+"?"+Fe+"+"+Le,Ce+"+"+Me,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Se,Be].join("|"),"g"),Ke=RegExp("[\\u200d\\ud800-\\udfff"+Ee+"\\ufe0e\\ufe0f]"),Ye=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Je=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],He=-1,Xe={};Xe[R]=Xe[C]=Xe[F]=Xe[j]=Xe[L]=Xe[M]=Xe[U]=Xe[q]=Xe[V]=!0,Xe[v]=Xe[y]=Xe[N]=Xe[m]=Xe[P]=Xe[g]=Xe[b]=Xe[_]=Xe[w]=Xe[O]=Xe[x]=Xe[T]=Xe[S]=Xe[A]=Xe[D]=!1;var Ze={};Ze[v]=Ze[y]=Ze[N]=Ze[P]=Ze[m]=Ze[g]=Ze[R]=Ze[C]=Ze[F]=Ze[j]=Ze[L]=Ze[w]=Ze[O]=Ze[x]=Ze[T]=Ze[S]=Ze[A]=Ze[k]=Ze[M]=Ze[U]=Ze[q]=Ze[V]=!0,Ze[b]=Ze[_]=Ze[D]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,it="object"==typeof self&&self&&self.Object===Object&&self,ot=rt||it||Function("return this")(),at=t&&!t.nodeType&&t,st=at&&e&&!e.nodeType&&e,ut=st&&st.exports===at,ct=ut&&rt.process,lt=function(){try{return st&&st.require&&st.require("util").types||ct&&ct.binding&&ct.binding("util")}catch(e){}}(),ft=lt&<.isArrayBuffer,pt=lt&<.isDate,ht=lt&<.isMap,dt=lt&<.isRegExp,vt=lt&<.isSet,yt=lt&<.isTypedArray;function mt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function gt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function wt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Ot(e,t){return!(null==e||!e.length)&&Rt(e,t,0)>-1}function xt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function It(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Tt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function St(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function At(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function kt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Dt=Lt("length");function Nt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Pt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Rt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Pt(e,Ft,n)}function Ct(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Ft(e){return e!=e}function jt(e,t){var n=null==e?0:e.length;return n?qt(e,t)/n:p}function Lt(e){return function(t){return null==t?i:t[e]}}function Mt(e){return function(t){return null==e?i:e[t]}}function Ut(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function qt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Vt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Bt(e){return e?e.slice(0,sn(e)+1).replace(re,""):e}function Qt(e){return function(t){return e(t)}}function zt(e,t){return It(t,(function(t){return e[t]}))}function Wt(e,t){return e.has(t)}function $t(e,t){for(var n=-1,r=e.length;++n<r&&Rt(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length;n--&&Rt(t,e[n],0)>-1;);return n}function Kt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Yt=Mt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Jt=Mt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ht(e){return"\\"+et[e]}function Xt(e){return Ke.test(e)}function Zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Xt(e)?function(e){for(var t=$e.lastIndex=0;$e.test(e);)++t;return t}(e):Dt(e)}function an(e){return Xt(e)?function(e){return e.match($e)||[]}(e):function(e){return e.split("")}(e)}function sn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var un=Mt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),cn=function e(t){var n,r=(t=null==t?ot:cn.defaults(ot.Object(),t,cn.pick(ot,Je))).Array,ie=t.Date,Ee=t.Error,we=t.Function,Oe=t.Math,xe=t.Object,Ie=t.RegExp,Te=t.String,Se=t.TypeError,Ae=r.prototype,ke=we.prototype,De=xe.prototype,Ne=t["__core-js_shared__"],Pe=ke.toString,Re=De.hasOwnProperty,Ce=0,Fe=(n=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",je=De.toString,Le=Pe.call(xe),Me=ot._,Ue=Ie("^"+Pe.call(Re).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=ut?t.Buffer:i,Ve=t.Symbol,Be=t.Uint8Array,Qe=qe?qe.allocUnsafe:i,$e=en(xe.getPrototypeOf,xe),Ke=xe.create,et=De.propertyIsEnumerable,rt=Ae.splice,it=Ve?Ve.isConcatSpreadable:i,at=Ve?Ve.iterator:i,st=Ve?Ve.toStringTag:i,ct=function(){try{var e=co(xe,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,Dt=ie&&ie.now!==ot.Date.now&&ie.now,Mt=t.setTimeout!==ot.setTimeout&&t.setTimeout,ln=Oe.ceil,fn=Oe.floor,pn=xe.getOwnPropertySymbols,hn=qe?qe.isBuffer:i,dn=t.isFinite,vn=Ae.join,yn=en(xe.keys,xe),mn=Oe.max,gn=Oe.min,bn=ie.now,_n=t.parseInt,En=Oe.random,wn=Ae.reverse,On=co(t,"DataView"),xn=co(t,"Map"),In=co(t,"Promise"),Tn=co(t,"Set"),Sn=co(t,"WeakMap"),An=co(xe,"create"),kn=Sn&&new Sn,Dn={},Nn=Uo(On),Pn=Uo(xn),Rn=Uo(In),Cn=Uo(Tn),Fn=Uo(Sn),jn=Ve?Ve.prototype:i,Ln=jn?jn.valueOf:i,Mn=jn?jn.toString:i;function Un(e){if(ns(e)&&!Wa(e)&&!(e instanceof Qn)){if(e instanceof Bn)return e;if(Re.call(e,"__wrapped__"))return qo(e)}return new Bn(e)}var qn=function(){function e(){}return function(t){if(!ts(t))return{};if(Ke)return Ke(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Vn(){}function Bn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Qn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new $n;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Wn(e);this.size=t.size}function Yn(e,t){var n=Wa(e),r=!n&&za(e),i=!n&&!r&&Ya(e),o=!n&&!r&&!i&&ls(e),a=n||r||i||o,s=a?Vt(e.length,Te):[],u=s.length;for(var c in e)!t&&!Re.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mo(c,u))||s.push(c);return s}function Jn(e){var t=e.length;return t?e[$r(0,t-1)]:i}function Hn(e,t){return Co(Si(e),ar(t,0,e.length))}function Xn(e){return Co(Si(e))}function Zn(e,t,n){(n!==i&&!Va(e[t],n)||n===i&&!(t in e))&&ir(e,t,n)}function er(e,t,n){var r=e[t];Re.call(e,t)&&Va(r,n)&&(n!==i||t in e)||ir(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(Va(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function rr(e,t){return e&&Ai(t,Ps(t),e)}function ir(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,o=t.length,a=r(o),s=null==e;++n<o;)a[n]=s?i:Ss(e,t[n]);return a}function ar(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function sr(e,t,n,r,o,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!ts(e))return e;var f=Wa(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Si(e,s)}else{var p=po(e),h=p==_||p==E;if(Ya(e))return Ei(e,u);if(p==x||p==v||h&&!o){if(s=c||h?{}:vo(e),!u)return c?function(e,t){return Ai(e,fo(e),t)}(e,function(e,t){return e&&Ai(t,Rs(t),e)}(s,e)):function(e,t){return Ai(e,lo(e),t)}(e,rr(s,e))}else{if(!Ze[p])return o?e:{};s=function(e,t,n){var r,i=e.constructor;switch(t){case N:return wi(e);case m:case g:return new i(+e);case P:return function(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case R:case C:case F:case j:case L:case M:case U:case q:case V:return Oi(e,n);case w:return new i;case O:case A:return new i(e);case T:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case S:return new i;case k:return r=e,Ln?xe(Ln.call(r)):{}}}(e,p,u)}}a||(a=new Kn);var d=a.get(e);if(d)return d;a.set(e,s),ss(e)?e.forEach((function(r){s.add(sr(r,t,n,r,e,a))})):rs(e)&&e.forEach((function(r,i){s.set(i,sr(r,t,n,i,e,a))}));var y=f?i:(l?c?no:to:c?Rs:Ps)(e);return bt(y||e,(function(r,i){y&&(r=e[i=r]),er(s,i,sr(r,t,n,i,e,a))})),s}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=xe(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new Se(o);return Do((function(){e.apply(i,n)}),t)}function lr(e,t,n,r){var i=-1,o=Ot,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=It(t,Qt(n))),r?(o=xt,a=!1):t.length>=200&&(o=Wt,a=!1,t=new Gn(t));e:for(;++i<s;){var l=e[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else o(t,f,r)||u.push(l)}return u}Un.templateSettings={escape:Y,evaluate:J,interpolate:H,variable:"",imports:{_:Un}},Un.prototype=Vn.prototype,Un.prototype.constructor=Un,Bn.prototype=qn(Vn.prototype),Bn.prototype.constructor=Bn,Qn.prototype=qn(Vn.prototype),Qn.prototype.constructor=Qn,zn.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},zn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zn.prototype.get=function(e){var t=this.__data__;if(An){var n=t[e];return n===a?i:n}return Re.call(t,e)?t[e]:i},zn.prototype.has=function(e){var t=this.__data__;return An?t[e]!==i:Re.call(t,e)},zn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=An&&t===i?a:t,this},Wn.prototype.clear=function(){this.__data__=[],this.size=0},Wn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},Wn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?i:t[n][1]},Wn.prototype.has=function(e){return tr(this.__data__,e)>-1},Wn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},$n.prototype.clear=function(){this.size=0,this.__data__={hash:new zn,map:new(xn||Wn),string:new zn}},$n.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},$n.prototype.get=function(e){return so(this,e).get(e)},$n.prototype.has=function(e){return so(this,e).has(e)},$n.prototype.set=function(e,t){var n=so(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,a),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!xn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $n(r)}return n.set(e,t),this.size=n.size,this};var fr=Ni(br),pr=Ni(_r,!0);function hr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function dr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(u===i?s==s&&!cs(s):n(s,u)))var u=s,c=a}return c}function vr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function yr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=yo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?yr(s,t-1,n,r,i):Tt(i,s):r||(i[i.length]=s)}return i}var mr=Pi(),gr=Pi(!0);function br(e,t){return e&&mr(e,t,Ps)}function _r(e,t){return e&&gr(e,t,Ps)}function Er(e,t){return wt(t,(function(t){return Xa(e[t])}))}function wr(e,t){for(var n=0,r=(t=mi(t,e)).length;null!=e&&n<r;)e=e[Mo(t[n++])];return n&&n==r?e:i}function Or(e,t,n){var r=t(e);return Wa(e)?r:Tt(r,n(e))}function xr(e){return null==e?e===i?"[object Undefined]":"[object Null]":st&&st in xe(e)?function(e){var t=Re.call(e,st),n=e[st];try{e[st]=i;var r=!0}catch(e){}var o=je.call(e);return r&&(t?e[st]=n:delete e[st]),o}(e):function(e){return je.call(e)}(e)}function Ir(e,t){return e>t}function Tr(e,t){return null!=e&&Re.call(e,t)}function Sr(e,t){return null!=e&&t in xe(e)}function Ar(e,t,n){for(var o=n?xt:Ot,a=e[0].length,s=e.length,u=s,c=r(s),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=It(p,Qt(t))),l=gn(p.length,l),c[u]=!n&&(t||a>=120&&p.length>=120)?new Gn(u&&p):i}p=e[0];var h=-1,d=c[0];e:for(;++h<a&&f.length<l;){var v=p[h],y=t?t(v):v;if(v=n||0!==v?v:0,!(d?Wt(d,y):o(f,y,n))){for(u=s;--u;){var m=c[u];if(!(m?Wt(m,y):o(e[u],y,n)))continue e}d&&d.push(y),f.push(v)}}return f}function kr(e,t,n){var r=null==(e=To(e,t=mi(t,e)))?e:e[Mo(Ho(t))];return null==r?i:mt(r,e,n)}function Dr(e){return ns(e)&&xr(e)==v}function Nr(e,t,n,r,o){return e===t||(null==e||null==t||!ns(e)&&!ns(t)?e!=e&&t!=t:function(e,t,n,r,o,a){var s=Wa(e),u=Wa(t),c=s?y:po(e),l=u?y:po(t),f=(c=c==v?x:c)==x,p=(l=l==v?x:l)==x,h=c==l;if(h&&Ya(e)){if(!Ya(t))return!1;s=!0,f=!1}if(h&&!f)return a||(a=new Kn),s||ls(e)?Zi(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case P:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!o(new Be(e),new Be(t)));case m:case g:case O:return Va(+e,+t);case b:return e.name==t.name&&e.message==t.message;case T:case A:return e==t+"";case w:var s=Zt;case S:var u=1&r;if(s||(s=nn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=Zi(s(e),s(t),r,i,o,a);return a.delete(e),l;case k:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var d=f&&Re.call(e,"__wrapped__"),_=p&&Re.call(t,"__wrapped__");if(d||_){var E=d?e.value():e,I=_?t.value():t;return a||(a=new Kn),o(E,I,n,r,a)}}return!!h&&(a||(a=new Kn),function(e,t,n,r,o,a){var s=1&n,u=to(e),c=u.length;if(c!=to(t).length&&!s)return!1;for(var l=c;l--;){var f=u[l];if(!(s?f in t:Re.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var d=!0;a.set(e,t),a.set(t,e);for(var v=s;++l<c;){var y=e[f=u[l]],m=t[f];if(r)var g=s?r(m,y,f,t,e,a):r(y,m,f,e,t,a);if(!(g===i?y===m||o(y,m,n,r,a):g)){d=!1;break}v||(v="constructor"==f)}if(d&&!v){var b=e.constructor,_=t.constructor;b==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _||(d=!1)}return a.delete(e),a.delete(t),d}(e,t,n,r,o,a))}(e,t,n,r,Nr,o))}function Pr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=xe(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var p=new Kn;if(r)var h=r(l,f,c,e,t,p);if(!(h===i?Nr(f,l,3,r,p):h))return!1}}return!0}function Rr(e){return!(!ts(e)||(t=e,Fe&&Fe in t))&&(Xa(e)?Ue:ve).test(Uo(e));var t}function Cr(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?Wa(e)?Ur(e[0],e[1]):Mr(e):hu(e)}function Fr(e){if(!wo(e))return yn(e);var t=[];for(var n in xe(e))Re.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e,t){return e<t}function Lr(e,t){var n=-1,i=Ga(e)?r(e.length):[];return fr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function Mr(e){var t=uo(e);return 1==t.length&&t[0][2]?xo(t[0][0],t[0][1]):function(n){return n===e||Pr(n,e,t)}}function Ur(e,t){return bo(e)&&Oo(t)?xo(Mo(e),t):function(n){var r=Ss(n,e);return r===i&&r===t?As(n,e):Nr(t,r,3)}}function qr(e,t,n,r,o){e!==t&&mr(t,(function(a,s){if(o||(o=new Kn),ts(a))!function(e,t,n,r,o,a,s){var u=Ao(e,n),c=Ao(t,n),l=s.get(c);if(l)Zn(e,n,l);else{var f=a?a(u,c,n+"",e,t,s):i,p=f===i;if(p){var h=Wa(c),d=!h&&Ya(c),v=!h&&!d&&ls(c);f=c,h||d||v?Wa(u)?f=u:Ka(u)?f=Si(u):d?(p=!1,f=Ei(c,!0)):v?(p=!1,f=Oi(c,!0)):f=[]:os(c)||za(c)?(f=u,za(u)?f=gs(u):ts(u)&&!Xa(u)||(f=vo(c))):p=!1}p&&(s.set(c,f),o(f,c,r,a,s),s.delete(c)),Zn(e,n,f)}}(e,t,s,n,qr,r,o);else{var u=r?r(Ao(e,s),a,s+"",e,t,o):i;u===i&&(u=a),Zn(e,s,u)}}),Rs)}function Vr(e,t){var n=e.length;if(n)return mo(t+=t<0?n:0,n)?e[t]:i}function Br(e,t,n){t=t.length?It(t,(function(e){return Wa(e)?function(t){return wr(t,1===e.length?e[0]:e)}:e})):[iu];var r=-1;t=It(t,Qt(ao()));var i=Lr(e,(function(e,n,i){var o=It(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var u=xi(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(i)}function Qr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=wr(e,a);n(s,a)&&Hr(o,mi(a,e),s)}return o}function zr(e,t,n,r){var i=r?Ct:Rt,o=-1,a=t.length,s=e;for(e===t&&(t=Si(t)),n&&(s=It(e,Qt(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&rt.call(s,u,1),rt.call(e,u,1);return e}function Wr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;mo(i)?rt.call(e,i,1):ci(e,i)}}return e}function $r(e,t){return e+fn(En()*(t-e+1))}function Gr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=fn(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return No(Io(e,t,iu),e+"")}function Yr(e){return Jn(Vs(e))}function Jr(e,t){var n=Vs(e);return Co(n,ar(t,0,n.length))}function Hr(e,t,n,r){if(!ts(e))return e;for(var o=-1,a=(t=mi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Mo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var f=u[c];(l=r?r(f,c,u):i)===i&&(l=ts(f)?f:mo(t[o+1])?[]:{})}er(u,c,l),u=u[c]}return e}var Xr=kn?function(e,t){return kn.set(e,t),e}:iu,Zr=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:iu;function ei(e){return Co(Vs(e))}function ti(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i<o;)a[i]=e[i+t];return a}function ni(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ri(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!cs(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ii(e,t,iu,n)}function ii(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,c=cs(t),l=t===i;o<a;){var f=fn((o+a)/2),p=n(e[f]),h=p!==i,d=null===p,v=p==p,y=cs(p);if(s)var m=r||v;else m=l?v&&(r||h):u?v&&h&&(r||!d):c?v&&h&&!d&&(r||!y):!d&&!y&&(r?p<=t:p<t);m?o=f+1:a=f}return gn(a,4294967294)}function oi(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Va(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ai(e){return"number"==typeof e?e:cs(e)?p:+e}function si(e){if("string"==typeof e)return e;if(Wa(e))return It(e,si)+"";if(cs(e))return Mn?Mn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,n){var r=-1,i=Ot,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=xt;else if(o>=200){var c=t?null:Gi(e);if(c)return nn(c);a=!1,i=Wt,u=new Gn}else u=t?[]:s;e:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else i(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function ci(e,t){return null==(e=To(e,t=mi(t,e)))||delete e[Mo(Ho(t))]}function li(e,t,n,r){return Hr(e,t,n(wr(e,t)),r)}function fi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ti(e,r?0:o,r?o+1:i):ti(e,r?o+1:0,r?i:o)}function pi(e,t){var n=e;return n instanceof Qn&&(n=n.value()),St(t,(function(e,t){return t.func.apply(t.thisArg,Tt([e],t.args))}),n)}function hi(e,t,n){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=lr(a[o]||s,e[u],t,n));return ui(yr(a,1),t,n)}function di(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var u=r<a?t[r]:i;n(s,e[r],u)}return s}function vi(e){return Ka(e)?e:[]}function yi(e){return"function"==typeof e?e:iu}function mi(e,t){return Wa(e)?e:bo(e,t)?[e]:Lo(bs(e))}var gi=Kr;function bi(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ti(e,t,n)}var _i=lt||function(e){return ot.clearTimeout(e)};function Ei(e,t){if(t)return e.slice();var n=e.length,r=Qe?Qe(n):new e.constructor(n);return e.copy(r),r}function wi(e){var t=new e.constructor(e.byteLength);return new Be(t).set(new Be(e)),t}function Oi(e,t){var n=t?wi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xi(e,t){if(e!==t){var n=e!==i,r=null===e,o=e==e,a=cs(e),s=t!==i,u=null===t,c=t==t,l=cs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&e<t||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Ii(e,t,n,i){for(var o=-1,a=e.length,s=n.length,u=-1,c=t.length,l=mn(a-s,0),f=r(c+l),p=!i;++u<c;)f[u]=t[u];for(;++o<s;)(p||o<a)&&(f[n[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Ti(e,t,n,i){for(var o=-1,a=e.length,s=-1,u=n.length,c=-1,l=t.length,f=mn(a-u,0),p=r(f+l),h=!i;++o<f;)p[o]=e[o];for(var d=o;++c<l;)p[d+c]=t[c];for(;++s<u;)(h||o<a)&&(p[d+n[s]]=e[o++]);return p}function Si(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Ai(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?ir(n,u,c):er(n,u,c)}return n}function ki(e,t){return function(n,r){var i=Wa(n)?gt:nr,o=t?t():{};return i(n,e,ao(r,2),o)}}function Di(e){return Kr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&go(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=xe(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Ni(e,t){return function(n,r){if(null==n)return n;if(!Ga(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=xe(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Pi(e){return function(t,n,r){for(var i=-1,o=xe(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Ri(e){return function(t){var n=Xt(t=bs(t))?an(t):i,r=n?n[0]:t.charAt(0),o=n?bi(n,1).join(""):t.slice(1);return r[e]()+o}}function Ci(e){return function(t){return St(Xs(zs(t).replace(ze,"")),e,"")}}function Fi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=qn(e.prototype),r=e.apply(n,t);return ts(r)?r:n}}function ji(e){return function(t,n,r){var o=xe(t);if(!Ga(t)){var a=ao(n,3);t=Ps(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function Li(e){return eo((function(t){var n=t.length,r=n,a=Bn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Se(o);if(a&&!u&&"wrapper"==io(s))var u=new Bn([],!0)}for(r=u?r:n;++r<n;){var c=io(s=t[r]),l="wrapper"==c?ro(s):i;u=l&&_o(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[io(l[0])].apply(u,l[3]):1==s.length&&_o(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Wa(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Mi(e,t,n,o,a,s,u,l,f,p){var h=t&c,d=1&t,v=2&t,y=24&t,m=512&t,g=v?i:Fi(e);return function i(){for(var c=arguments.length,b=r(c),_=c;_--;)b[_]=arguments[_];if(y)var E=oo(i),w=Kt(b,E);if(o&&(b=Ii(b,o,a,y)),s&&(b=Ti(b,s,u,y)),c-=w,y&&c<p){var O=tn(b,E);return Wi(e,t,Mi,i.placeholder,n,b,O,l,f,p-c)}var x=d?n:this,I=v?x[e]:e;return c=b.length,l?b=So(b,l):m&&c>1&&b.reverse(),h&&f<c&&(b.length=f),this&&this!==ot&&this instanceof i&&(I=g||Fi(I)),I.apply(x,b)}}function Ui(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function qi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=si(n),r=si(r)):(n=ai(n),r=ai(r)),o=e(n,r)}return o}}function Vi(e){return eo((function(t){return t=It(t,Qt(ao())),Kr((function(n){var r=this;return e(t,(function(e){return mt(e,r,n)}))}))}))}function Bi(e,t){var n=(t=t===i?" ":si(t)).length;if(n<2)return n?Gr(t,e):t;var r=Gr(t,ln(e/on(t)));return Xt(t)?bi(an(r),0,e).join(""):r.slice(0,e)}function Qi(e){return function(t,n,o){return o&&"number"!=typeof o&&go(t,n,o)&&(n=o=i),t=ds(t),n===i?(n=t,t=0):n=ds(n),function(e,t,n,i){for(var o=-1,a=mn(ln((t-e)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=e,e+=n;return s}(t,n,o=o===i?t<n?1:-1:ds(o),e)}}function zi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ms(t),n=ms(n)),e(t,n)}}function Wi(e,t,n,r,o,a,s,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var h=[e,t,o,p?a:i,p?s:i,p?i:a,p?i:s,c,l,f],d=n.apply(i,h);return _o(e)&&ko(d,h),d.placeholder=r,Po(d,e,t)}function $i(e){var t=Oe[e];return function(e,n){if(e=ms(e),(n=null==n?0:gn(vs(n),292))&&dn(e)){var r=(bs(e)+"e").split("e");return+((r=(bs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Gi=Tn&&1/nn(new Tn([,-0]))[1]==l?function(e){return new Tn(e)}:cu;function Ki(e){return function(t){var n=po(t);return n==w?Zt(t):n==S?rn(t):function(e,t){return It(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yi(e,t,n,a,l,f,p,h){var d=2&t;if(!d&&"function"!=typeof e)throw new Se(o);var v=a?a.length:0;if(v||(t&=-97,a=l=i),p=p===i?p:mn(vs(p),0),h=h===i?h:vs(h),v-=l?l.length:0,64&t){var y=a,m=l;a=l=i}var g=d?i:ro(e),b=[e,t,n,a,l,y,m,f,p,h];if(g&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Ii(l,u,t[4]):u,e[4]=l?tn(e[3],s):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Ti(l,u,t[6]):u,e[6]=l?tn(e[5],s):t[6]),(u=t[7])&&(e[7]=u),r&c&&(e[8]=null==e[8]?t[8]:gn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(b,g),e=b[0],t=b[1],n=b[2],a=b[3],l=b[4],!(h=b[9]=b[9]===i?d?0:e.length:mn(b[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,n){var o=Fi(e);return function a(){for(var s=arguments.length,u=r(s),c=s,l=oo(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:tn(u,l);return(s-=f.length)<n?Wi(e,t,Mi,a.placeholder,i,u,f,i,i,n-s):mt(this&&this!==ot&&this instanceof a?o:e,this,u)}}(e,t,h):t!=u&&33!=t||l.length?Mi.apply(i,b):function(e,t,n,i){var o=1&t,a=Fi(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=i.length,f=r(l+u),p=this&&this!==ot&&this instanceof t?a:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++s];return mt(p,o?n:this,f)}}(e,t,n,a);else var _=function(e,t,n){var r=1&t,i=Fi(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Po((g?Xr:ko)(_,b),e,t)}function Ji(e,t,n,r){return e===i||Va(e,De[n])&&!Re.call(r,n)?t:e}function Hi(e,t,n,r,o,a){return ts(e)&&ts(t)&&(a.set(t,e),qr(e,t,i,Hi,a),a.delete(t)),e}function Xi(e){return os(e)?i:e}function Zi(e,t,n,r,o,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,h=!0,d=2&n?new Gn:i;for(a.set(e,t),a.set(t,e);++p<u;){var v=e[p],y=t[p];if(r)var m=s?r(y,v,p,t,e,a):r(v,y,p,e,t,a);if(m!==i){if(m)continue;h=!1;break}if(d){if(!kt(t,(function(e,t){if(!Wt(d,t)&&(v===e||o(v,e,n,r,a)))return d.push(t)}))){h=!1;break}}else if(v!==y&&!o(v,y,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function eo(e){return No(Io(e,i,$o),e+"")}function to(e){return Or(e,Ps,lo)}function no(e){return Or(e,Rs,fo)}var ro=kn?function(e){return kn.get(e)}:cu;function io(e){for(var t=e.name+"",n=Dn[t],r=Re.call(Dn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Re.call(Un,"placeholder")?Un:e).placeholder}function ao(){var e=Un.iteratee||ou;return e=e===ou?Cr:e,arguments.length?e(arguments[0],arguments[1]):e}function so(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function uo(e){for(var t=Ps(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Oo(i)]}return t}function co(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Rr(n)?n:i}var lo=pn?function(e){return null==e?[]:(e=xe(e),wt(pn(e),(function(t){return et.call(e,t)})))}:yu,fo=pn?function(e){for(var t=[];e;)Tt(t,lo(e)),e=$e(e);return t}:yu,po=xr;function ho(e,t,n){for(var r=-1,i=(t=mi(t,e)).length,o=!1;++r<i;){var a=Mo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&es(i)&&mo(a,i)&&(Wa(e)||za(e))}function vo(e){return"function"!=typeof e.constructor||wo(e)?{}:qn($e(e))}function yo(e){return Wa(e)||za(e)||!!(it&&e&&e[it])}function mo(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function go(e,t,n){if(!ts(n))return!1;var r=typeof t;return!!("number"==r?Ga(n)&&mo(t,n.length):"string"==r&&t in n)&&Va(n[t],e)}function bo(e,t){if(Wa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||Z.test(e)||!X.test(e)||null!=t&&e in xe(t)}function _o(e){var t=io(e),n=Un[t];if("function"!=typeof n||!(t in Qn.prototype))return!1;if(e===n)return!0;var r=ro(n);return!!r&&e===r[0]}(On&&po(new On(new ArrayBuffer(1)))!=P||xn&&po(new xn)!=w||In&&po(In.resolve())!=I||Tn&&po(new Tn)!=S||Sn&&po(new Sn)!=D)&&(po=function(e){var t=xr(e),n=t==x?e.constructor:i,r=n?Uo(n):"";if(r)switch(r){case Nn:return P;case Pn:return w;case Rn:return I;case Cn:return S;case Fn:return D}return t});var Eo=Ne?Xa:mu;function wo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||De)}function Oo(e){return e==e&&!ts(e)}function xo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==i||e in xe(n))}}function Io(e,t,n){return t=mn(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=mn(i.length-t,0),s=r(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=r(t+1);++o<t;)u[o]=i[o];return u[t]=n(s),mt(e,this,u)}}function To(e,t){return t.length<2?e:wr(e,ti(t,0,-1))}function So(e,t){for(var n=e.length,r=gn(t.length,n),o=Si(e);r--;){var a=t[r];e[r]=mo(a,n)?o[a]:i}return e}function Ao(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ko=Ro(Xr),Do=Mt||function(e,t){return ot.setTimeout(e,t)},No=Ro(Zr);function Po(e,t,n){var r=t+"";return No(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return bt(d,(function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function Ro(e){var t=0,n=0;return function(){var r=bn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Co(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=$r(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Fo,jo,Lo=(Fo=Fa((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(le,"$1"):n||e)})),t}),(function(e){return 500===jo.size&&jo.clear(),e})),jo=Fo.cache,Fo);function Mo(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Uo(e){if(null!=e){try{return Pe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qo(e){if(e instanceof Qn)return e.clone();var t=new Bn(e.__wrapped__,e.__chain__);return t.__actions__=Si(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vo=Kr((function(e,t){return Ka(e)?lr(e,yr(t,1,Ka,!0)):[]})),Bo=Kr((function(e,t){var n=Ho(t);return Ka(n)&&(n=i),Ka(e)?lr(e,yr(t,1,Ka,!0),ao(n,2)):[]})),Qo=Kr((function(e,t){var n=Ho(t);return Ka(n)&&(n=i),Ka(e)?lr(e,yr(t,1,Ka,!0),i,n):[]}));function zo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:vs(n);return i<0&&(i=mn(r+i,0)),Pt(e,ao(t,3),i)}function Wo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=vs(n),o=n<0?mn(r+o,0):gn(o,r-1)),Pt(e,ao(t,3),o,!0)}function $o(e){return null!=e&&e.length?yr(e,1):[]}function Go(e){return e&&e.length?e[0]:i}var Ko=Kr((function(e){var t=It(e,vi);return t.length&&t[0]===e[0]?Ar(t):[]})),Yo=Kr((function(e){var t=Ho(e),n=It(e,vi);return t===Ho(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Ar(n,ao(t,2)):[]})),Jo=Kr((function(e){var t=Ho(e),n=It(e,vi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Ar(n,i,t):[]}));function Ho(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Xo=Kr(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?zr(e,t):e}var ea=eo((function(e,t){var n=null==e?0:e.length,r=or(e,t);return Wr(e,It(t,(function(e){return mo(e,n)?+e:e})).sort(xi)),r}));function ta(e){return null==e?e:wn.call(e)}var na=Kr((function(e){return ui(yr(e,1,Ka,!0))})),ra=Kr((function(e){var t=Ho(e);return Ka(t)&&(t=i),ui(yr(e,1,Ka,!0),ao(t,2))})),ia=Kr((function(e){var t=Ho(e);return t="function"==typeof t?t:i,ui(yr(e,1,Ka,!0),i,t)}));function oa(e){if(!e||!e.length)return[];var t=0;return e=wt(e,(function(e){if(Ka(e))return t=mn(e.length,t),!0})),Vt(t,(function(t){return It(e,Lt(t))}))}function aa(e,t){if(!e||!e.length)return[];var n=oa(e);return null==t?n:It(n,(function(e){return mt(t,i,e)}))}var sa=Kr((function(e,t){return Ka(e)?lr(e,t):[]})),ua=Kr((function(e){return hi(wt(e,Ka))})),ca=Kr((function(e){var t=Ho(e);return Ka(t)&&(t=i),hi(wt(e,Ka),ao(t,2))})),la=Kr((function(e){var t=Ho(e);return t="function"==typeof t?t:i,hi(wt(e,Ka),i,t)})),fa=Kr(oa),pa=Kr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,aa(e,n)}));function ha(e){var t=Un(e);return t.__chain__=!0,t}function da(e,t){return t(e)}var va=eo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Qn&&mo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:da,args:[o],thisArg:i}),new Bn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ya=ki((function(e,t,n){Re.call(e,n)?++e[n]:ir(e,n,1)})),ma=ji(zo),ga=ji(Wo);function ba(e,t){return(Wa(e)?bt:fr)(e,ao(t,3))}function _a(e,t){return(Wa(e)?_t:pr)(e,ao(t,3))}var Ea=ki((function(e,t,n){Re.call(e,n)?e[n].push(t):ir(e,n,[t])})),wa=Kr((function(e,t,n){var i=-1,o="function"==typeof t,a=Ga(e)?r(e.length):[];return fr(e,(function(e){a[++i]=o?mt(t,e,n):kr(e,t,n)})),a})),Oa=ki((function(e,t,n){ir(e,n,t)}));function xa(e,t){return(Wa(e)?It:Lr)(e,ao(t,3))}var Ia=ki((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Ta=Kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&go(e,t[0],t[1])?t=[]:n>2&&go(t[0],t[1],t[2])&&(t=[t[0]]),Br(e,yr(t,1),[])})),Sa=Dt||function(){return ot.Date.now()};function Aa(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Yi(e,c,i,i,i,i,t)}function ka(e,t){var n;if("function"!=typeof t)throw new Se(o);return e=vs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Da=Kr((function(e,t,n){var r=1;if(n.length){var i=tn(n,oo(Da));r|=u}return Yi(e,r,t,n,i)})),Na=Kr((function(e,t,n){var r=3;if(n.length){var i=tn(n,oo(Na));r|=u}return Yi(t,r,e,n,i)}));function Pa(e,t,n){var r,a,s,u,c,l,f=0,p=!1,h=!1,d=!0;if("function"!=typeof e)throw new Se(o);function v(t){var n=r,o=a;return r=a=i,f=t,u=e.apply(o,n)}function y(e){return f=e,c=Do(g,t),p?v(e):u}function m(e){var n=e-l;return l===i||n>=t||n<0||h&&e-f>=s}function g(){var e=Sa();if(m(e))return b(e);c=Do(g,function(e){var n=t-(e-l);return h?gn(n,s-(e-f)):n}(e))}function b(e){return c=i,d&&r?v(e):(r=a=i,u)}function _(){var e=Sa(),n=m(e);if(r=arguments,a=this,l=e,n){if(c===i)return y(l);if(h)return _i(c),c=Do(g,t),v(l)}return c===i&&(c=Do(g,t)),u}return t=ms(t)||0,ts(n)&&(p=!!n.leading,s=(h="maxWait"in n)?mn(ms(n.maxWait)||0,t):s,d="trailing"in n?!!n.trailing:d),_.cancel=function(){c!==i&&_i(c),f=0,r=l=a=c=i},_.flush=function(){return c===i?u:b(Sa())},_}var Ra=Kr((function(e,t){return cr(e,1,t)})),Ca=Kr((function(e,t,n){return cr(e,ms(t)||0,n)}));function Fa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Se(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Fa.Cache||$n),n}function ja(e){if("function"!=typeof e)throw new Se(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fa.Cache=$n;var La=gi((function(e,t){var n=(t=1==t.length&&Wa(t[0])?It(t[0],Qt(ao())):It(yr(t,1),Qt(ao()))).length;return Kr((function(r){for(var i=-1,o=gn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return mt(e,this,r)}))})),Ma=Kr((function(e,t){var n=tn(t,oo(Ma));return Yi(e,u,i,t,n)})),Ua=Kr((function(e,t){var n=tn(t,oo(Ua));return Yi(e,64,i,t,n)})),qa=eo((function(e,t){return Yi(e,256,i,i,i,t)}));function Va(e,t){return e===t||e!=e&&t!=t}var Ba=zi(Ir),Qa=zi((function(e,t){return e>=t})),za=Dr(function(){return arguments}())?Dr:function(e){return ns(e)&&Re.call(e,"callee")&&!et.call(e,"callee")},Wa=r.isArray,$a=ft?Qt(ft):function(e){return ns(e)&&xr(e)==N};function Ga(e){return null!=e&&es(e.length)&&!Xa(e)}function Ka(e){return ns(e)&&Ga(e)}var Ya=hn||mu,Ja=pt?Qt(pt):function(e){return ns(e)&&xr(e)==g};function Ha(e){if(!ns(e))return!1;var t=xr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!os(e)}function Xa(e){if(!ts(e))return!1;var t=xr(e);return t==_||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==vs(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=ht?Qt(ht):function(e){return ns(e)&&po(e)==w};function is(e){return"number"==typeof e||ns(e)&&xr(e)==O}function os(e){if(!ns(e)||xr(e)!=x)return!1;var t=$e(e);if(null===t)return!0;var n=Re.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Pe.call(n)==Le}var as=dt?Qt(dt):function(e){return ns(e)&&xr(e)==T},ss=vt?Qt(vt):function(e){return ns(e)&&po(e)==S};function us(e){return"string"==typeof e||!Wa(e)&&ns(e)&&xr(e)==A}function cs(e){return"symbol"==typeof e||ns(e)&&xr(e)==k}var ls=yt?Qt(yt):function(e){return ns(e)&&es(e.length)&&!!Xe[xr(e)]},fs=zi(jr),ps=zi((function(e,t){return e<=t}));function hs(e){if(!e)return[];if(Ga(e))return us(e)?an(e):Si(e);if(at&&e[at])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[at]());var t=po(e);return(t==w?Zt:t==S?nn:Vs)(e)}function ds(e){return e?(e=ms(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function vs(e){var t=ds(e),n=t%1;return t==t?n?t-n:t:0}function ys(e){return e?ar(vs(e),0,h):0}function ms(e){if("number"==typeof e)return e;if(cs(e))return p;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Bt(e);var n=de.test(e);return n||ye.test(e)?nt(e.slice(2),n?2:8):he.test(e)?p:+e}function gs(e){return Ai(e,Rs(e))}function bs(e){return null==e?"":si(e)}var _s=Di((function(e,t){if(wo(t)||Ga(t))Ai(t,Ps(t),e);else for(var n in t)Re.call(t,n)&&er(e,n,t[n])})),Es=Di((function(e,t){Ai(t,Rs(t),e)})),ws=Di((function(e,t,n,r){Ai(t,Rs(t),e,r)})),Os=Di((function(e,t,n,r){Ai(t,Ps(t),e,r)})),xs=eo(or),Is=Kr((function(e,t){e=xe(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&go(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=Rs(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===i||Va(f,De[l])&&!Re.call(e,l))&&(e[l]=a[l])}return e})),Ts=Kr((function(e){return e.push(i,Hi),mt(Fs,i,e)}));function Ss(e,t,n){var r=null==e?i:wr(e,t);return r===i?n:r}function As(e,t){return null!=e&&ho(e,t,Sr)}var ks=Ui((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),e[t]=n}),tu(iu)),Ds=Ui((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),Re.call(e,t)?e[t].push(n):e[t]=[n]}),ao),Ns=Kr(kr);function Ps(e){return Ga(e)?Yn(e):Fr(e)}function Rs(e){return Ga(e)?Yn(e,!0):function(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var n in xe(e))t.push(n);return t}(e);var t=wo(e),n=[];for(var r in e)("constructor"!=r||!t&&Re.call(e,r))&&n.push(r);return n}(e)}var Cs=Di((function(e,t,n){qr(e,t,n)})),Fs=Di((function(e,t,n,r){qr(e,t,n,r)})),js=eo((function(e,t){var n={};if(null==e)return n;var r=!1;t=It(t,(function(t){return t=mi(t,e),r||(r=t.length>1),t})),Ai(e,no(e),n),r&&(n=sr(n,7,Xi));for(var i=t.length;i--;)ci(n,t[i]);return n})),Ls=eo((function(e,t){return null==e?{}:function(e,t){return Qr(e,t,(function(t,n){return As(e,n)}))}(e,t)}));function Ms(e,t){if(null==e)return{};var n=It(no(e),(function(e){return[e]}));return t=ao(t),Qr(e,n,(function(e,n){return t(e,n[0])}))}var Us=Ki(Ps),qs=Ki(Rs);function Vs(e){return null==e?[]:zt(e,Ps(e))}var Bs=Ci((function(e,t,n){return t=t.toLowerCase(),e+(n?Qs(t):t)}));function Qs(e){return Hs(bs(e).toLowerCase())}function zs(e){return(e=bs(e))&&e.replace(ge,Yt).replace(We,"")}var Ws=Ci((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),$s=Ci((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Gs=Ri("toLowerCase"),Ks=Ci((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ys=Ci((function(e,t,n){return e+(n?" ":"")+Hs(t)})),Js=Ci((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Hs=Ri("toUpperCase");function Xs(e,t,n){return e=bs(e),(t=n?i:t)===i?function(e){return Ye.test(e)}(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Zs=Kr((function(e,t){try{return mt(e,i,t)}catch(e){return Ha(e)?e:new Ee(e)}})),eu=eo((function(e,t){return bt(t,(function(t){t=Mo(t),ir(e,t,Da(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Li(),ru=Li(!0);function iu(e){return e}function ou(e){return Cr("function"==typeof e?e:sr(e,1))}var au=Kr((function(e,t){return function(n){return kr(n,e,t)}})),su=Kr((function(e,t){return function(n){return kr(e,n,t)}}));function uu(e,t,n){var r=Ps(t),i=Er(t,r);null!=n||ts(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Er(t,Ps(t)));var o=!(ts(n)&&"chain"in n&&!n.chain),a=Xa(e);return bt(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Si(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Tt([this.value()],arguments))})})),e}function cu(){}var lu=Vi(It),fu=Vi(Et),pu=Vi(kt);function hu(e){return bo(e)?Lt(Mo(e)):function(e){return function(t){return wr(t,e)}}(e)}var du=Qi(),vu=Qi(!0);function yu(){return[]}function mu(){return!1}var gu,bu=qi((function(e,t){return e+t}),0),_u=$i("ceil"),Eu=qi((function(e,t){return e/t}),1),wu=$i("floor"),Ou=qi((function(e,t){return e*t}),1),xu=$i("round"),Iu=qi((function(e,t){return e-t}),0);return Un.after=function(e,t){if("function"!=typeof t)throw new Se(o);return e=vs(e),function(){if(--e<1)return t.apply(this,arguments)}},Un.ary=Aa,Un.assign=_s,Un.assignIn=Es,Un.assignInWith=ws,Un.assignWith=Os,Un.at=xs,Un.before=ka,Un.bind=Da,Un.bindAll=eu,Un.bindKey=Na,Un.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Un.chain=ha,Un.chunk=function(e,t,n){t=(n?go(e,t,n):t===i)?1:mn(vs(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=r(ln(o/t));a<o;)u[s++]=ti(e,a,a+=t);return u},Un.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Un.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Tt(Wa(n)?Si(n):[n],yr(t,1))},Un.cond=function(e){var t=null==e?0:e.length,n=ao();return e=t?It(e,(function(e){if("function"!=typeof e[1])throw new Se(o);return[n(e[0]),e[1]]})):[],Kr((function(n){for(var r=-1;++r<t;){var i=e[r];if(mt(i[0],this,n))return mt(i[1],this,n)}}))},Un.conforms=function(e){return function(e){var t=Ps(e);return function(n){return ur(n,e,t)}}(sr(e,1))},Un.constant=tu,Un.countBy=ya,Un.create=function(e,t){var n=qn(e);return null==t?n:rr(n,t)},Un.curry=function e(t,n,r){var o=Yi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Un.curryRight=function e(t,n,r){var o=Yi(t,16,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Un.debounce=Pa,Un.defaults=Is,Un.defaultsDeep=Ts,Un.defer=Ra,Un.delay=Ca,Un.difference=Vo,Un.differenceBy=Bo,Un.differenceWith=Qo,Un.drop=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=n||t===i?1:vs(t))<0?0:t,r):[]},Un.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,0,(t=r-(t=n||t===i?1:vs(t)))<0?0:t):[]},Un.dropRightWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!0,!0):[]},Un.dropWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!0):[]},Un.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&go(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=vs(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:vs(r))<0&&(r+=o),r=n>r?0:ys(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Un.filter=function(e,t){return(Wa(e)?wt:vr)(e,ao(t,3))},Un.flatMap=function(e,t){return yr(xa(e,t),1)},Un.flatMapDeep=function(e,t){return yr(xa(e,t),l)},Un.flatMapDepth=function(e,t,n){return n=n===i?1:vs(n),yr(xa(e,t),n)},Un.flatten=$o,Un.flattenDeep=function(e){return null!=e&&e.length?yr(e,l):[]},Un.flattenDepth=function(e,t){return null!=e&&e.length?yr(e,t=t===i?1:vs(t)):[]},Un.flip=function(e){return Yi(e,512)},Un.flow=nu,Un.flowRight=ru,Un.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Un.functions=function(e){return null==e?[]:Er(e,Ps(e))},Un.functionsIn=function(e){return null==e?[]:Er(e,Rs(e))},Un.groupBy=Ea,Un.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Un.intersection=Ko,Un.intersectionBy=Yo,Un.intersectionWith=Jo,Un.invert=ks,Un.invertBy=Ds,Un.invokeMap=wa,Un.iteratee=ou,Un.keyBy=Oa,Un.keys=Ps,Un.keysIn=Rs,Un.map=xa,Un.mapKeys=function(e,t){var n={};return t=ao(t,3),br(e,(function(e,r,i){ir(n,t(e,r,i),e)})),n},Un.mapValues=function(e,t){var n={};return t=ao(t,3),br(e,(function(e,r,i){ir(n,r,t(e,r,i))})),n},Un.matches=function(e){return Mr(sr(e,1))},Un.matchesProperty=function(e,t){return Ur(e,sr(t,1))},Un.memoize=Fa,Un.merge=Cs,Un.mergeWith=Fs,Un.method=au,Un.methodOf=su,Un.mixin=uu,Un.negate=ja,Un.nthArg=function(e){return e=vs(e),Kr((function(t){return Vr(t,e)}))},Un.omit=js,Un.omitBy=function(e,t){return Ms(e,ja(ao(t)))},Un.once=function(e){return ka(2,e)},Un.orderBy=function(e,t,n,r){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(n=r?i:n)||(n=null==n?[]:[n]),Br(e,t,n))},Un.over=lu,Un.overArgs=La,Un.overEvery=fu,Un.overSome=pu,Un.partial=Ma,Un.partialRight=Ua,Un.partition=Ia,Un.pick=Ls,Un.pickBy=Ms,Un.property=hu,Un.propertyOf=function(e){return function(t){return null==e?i:wr(e,t)}},Un.pull=Xo,Un.pullAll=Zo,Un.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,ao(n,2)):e},Un.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,i,n):e},Un.pullAt=ea,Un.range=du,Un.rangeRight=vu,Un.rearg=qa,Un.reject=function(e,t){return(Wa(e)?wt:vr)(e,ja(ao(t,3)))},Un.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=ao(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Wr(e,i),n},Un.rest=function(e,t){if("function"!=typeof e)throw new Se(o);return Kr(e,t=t===i?t:vs(t))},Un.reverse=ta,Un.sampleSize=function(e,t,n){return t=(n?go(e,t,n):t===i)?1:vs(t),(Wa(e)?Hn:Jr)(e,t)},Un.set=function(e,t,n){return null==e?e:Hr(e,t,n)},Un.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Hr(e,t,n,r)},Un.shuffle=function(e){return(Wa(e)?Xn:ei)(e)},Un.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&go(e,t,n)?(t=0,n=r):(t=null==t?0:vs(t),n=n===i?r:vs(n)),ti(e,t,n)):[]},Un.sortBy=Ta,Un.sortedUniq=function(e){return e&&e.length?oi(e):[]},Un.sortedUniqBy=function(e,t){return e&&e.length?oi(e,ao(t,2)):[]},Un.split=function(e,t,n){return n&&"number"!=typeof n&&go(e,t,n)&&(t=n=i),(n=n===i?h:n>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!as(t))&&!(t=si(t))&&Xt(e)?bi(an(e),0,n):e.split(t,n):[]},Un.spread=function(e,t){if("function"!=typeof e)throw new Se(o);return t=null==t?0:mn(vs(t),0),Kr((function(n){var r=n[t],i=bi(n,0,t);return r&&Tt(i,r),mt(e,this,i)}))},Un.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Un.take=function(e,t,n){return e&&e.length?ti(e,0,(t=n||t===i?1:vs(t))<0?0:t):[]},Un.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ti(e,(t=r-(t=n||t===i?1:vs(t)))<0?0:t,r):[]},Un.takeRightWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!1,!0):[]},Un.takeWhile=function(e,t){return e&&e.length?fi(e,ao(t,3)):[]},Un.tap=function(e,t){return t(e),e},Un.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Se(o);return ts(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Pa(e,t,{leading:r,maxWait:t,trailing:i})},Un.thru=da,Un.toArray=hs,Un.toPairs=Us,Un.toPairsIn=qs,Un.toPath=function(e){return Wa(e)?It(e,Mo):cs(e)?[e]:Si(Lo(bs(e)))},Un.toPlainObject=gs,Un.transform=function(e,t,n){var r=Wa(e),i=r||Ya(e)||ls(e);if(t=ao(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ts(e)&&Xa(o)?qn($e(e)):{}}return(i?bt:br)(e,(function(e,r,i){return t(n,e,r,i)})),n},Un.unary=function(e){return Aa(e,1)},Un.union=na,Un.unionBy=ra,Un.unionWith=ia,Un.uniq=function(e){return e&&e.length?ui(e):[]},Un.uniqBy=function(e,t){return e&&e.length?ui(e,ao(t,2)):[]},Un.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},Un.unset=function(e,t){return null==e||ci(e,t)},Un.unzip=oa,Un.unzipWith=aa,Un.update=function(e,t,n){return null==e?e:li(e,t,yi(n))},Un.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:li(e,t,yi(n),r)},Un.values=Vs,Un.valuesIn=function(e){return null==e?[]:zt(e,Rs(e))},Un.without=sa,Un.words=Xs,Un.wrap=function(e,t){return Ma(yi(t),e)},Un.xor=ua,Un.xorBy=ca,Un.xorWith=la,Un.zip=fa,Un.zipObject=function(e,t){return di(e||[],t||[],er)},Un.zipObjectDeep=function(e,t){return di(e||[],t||[],Hr)},Un.zipWith=pa,Un.entries=Us,Un.entriesIn=qs,Un.extend=Es,Un.extendWith=ws,uu(Un,Un),Un.add=bu,Un.attempt=Zs,Un.camelCase=Bs,Un.capitalize=Qs,Un.ceil=_u,Un.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ms(n))==n?n:0),t!==i&&(t=(t=ms(t))==t?t:0),ar(ms(e),t,n)},Un.clone=function(e){return sr(e,4)},Un.cloneDeep=function(e){return sr(e,5)},Un.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:i)},Un.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:i)},Un.conformsTo=function(e,t){return null==t||ur(e,t,Ps(t))},Un.deburr=zs,Un.defaultTo=function(e,t){return null==e||e!=e?t:e},Un.divide=Eu,Un.endsWith=function(e,t,n){e=bs(e),t=si(t);var r=e.length,o=n=n===i?r:ar(vs(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Un.eq=Va,Un.escape=function(e){return(e=bs(e))&&K.test(e)?e.replace($,Jt):e},Un.escapeRegExp=function(e){return(e=bs(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Un.every=function(e,t,n){var r=Wa(e)?Et:hr;return n&&go(e,t,n)&&(t=i),r(e,ao(t,3))},Un.find=ma,Un.findIndex=zo,Un.findKey=function(e,t){return Nt(e,ao(t,3),br)},Un.findLast=ga,Un.findLastIndex=Wo,Un.findLastKey=function(e,t){return Nt(e,ao(t,3),_r)},Un.floor=wu,Un.forEach=ba,Un.forEachRight=_a,Un.forIn=function(e,t){return null==e?e:mr(e,ao(t,3),Rs)},Un.forInRight=function(e,t){return null==e?e:gr(e,ao(t,3),Rs)},Un.forOwn=function(e,t){return e&&br(e,ao(t,3))},Un.forOwnRight=function(e,t){return e&&_r(e,ao(t,3))},Un.get=Ss,Un.gt=Ba,Un.gte=Qa,Un.has=function(e,t){return null!=e&&ho(e,t,Tr)},Un.hasIn=As,Un.head=Go,Un.identity=iu,Un.includes=function(e,t,n,r){e=Ga(e)?e:Vs(e),n=n&&!r?vs(n):0;var i=e.length;return n<0&&(n=mn(i+n,0)),us(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Rt(e,t,n)>-1},Un.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:vs(n);return i<0&&(i=mn(r+i,0)),Rt(e,t,i)},Un.inRange=function(e,t,n){return t=ds(t),n===i?(n=t,t=0):n=ds(n),function(e,t,n){return e>=gn(t,n)&&e<mn(t,n)}(e=ms(e),t,n)},Un.invoke=Ns,Un.isArguments=za,Un.isArray=Wa,Un.isArrayBuffer=$a,Un.isArrayLike=Ga,Un.isArrayLikeObject=Ka,Un.isBoolean=function(e){return!0===e||!1===e||ns(e)&&xr(e)==m},Un.isBuffer=Ya,Un.isDate=Ja,Un.isElement=function(e){return ns(e)&&1===e.nodeType&&!os(e)},Un.isEmpty=function(e){if(null==e)return!0;if(Ga(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||ls(e)||za(e)))return!e.length;var t=po(e);if(t==w||t==S)return!e.size;if(wo(e))return!Fr(e).length;for(var n in e)if(Re.call(e,n))return!1;return!0},Un.isEqual=function(e,t){return Nr(e,t)},Un.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Nr(e,t,i,n):!!r},Un.isError=Ha,Un.isFinite=function(e){return"number"==typeof e&&dn(e)},Un.isFunction=Xa,Un.isInteger=Za,Un.isLength=es,Un.isMap=rs,Un.isMatch=function(e,t){return e===t||Pr(e,t,uo(t))},Un.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Pr(e,t,uo(t),n)},Un.isNaN=function(e){return is(e)&&e!=+e},Un.isNative=function(e){if(Eo(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(e)},Un.isNil=function(e){return null==e},Un.isNull=function(e){return null===e},Un.isNumber=is,Un.isObject=ts,Un.isObjectLike=ns,Un.isPlainObject=os,Un.isRegExp=as,Un.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=f},Un.isSet=ss,Un.isString=us,Un.isSymbol=cs,Un.isTypedArray=ls,Un.isUndefined=function(e){return e===i},Un.isWeakMap=function(e){return ns(e)&&po(e)==D},Un.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==xr(e)},Un.join=function(e,t){return null==e?"":vn.call(e,t)},Un.kebabCase=Ws,Un.last=Ho,Un.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=vs(n))<0?mn(r+o,0):gn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Pt(e,Ft,o,!0)},Un.lowerCase=$s,Un.lowerFirst=Gs,Un.lt=fs,Un.lte=ps,Un.max=function(e){return e&&e.length?dr(e,iu,Ir):i},Un.maxBy=function(e,t){return e&&e.length?dr(e,ao(t,2),Ir):i},Un.mean=function(e){return jt(e,iu)},Un.meanBy=function(e,t){return jt(e,ao(t,2))},Un.min=function(e){return e&&e.length?dr(e,iu,jr):i},Un.minBy=function(e,t){return e&&e.length?dr(e,ao(t,2),jr):i},Un.stubArray=yu,Un.stubFalse=mu,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=Ou,Un.nth=function(e,t){return e&&e.length?Vr(e,vs(t)):i},Un.noConflict=function(){return ot._===this&&(ot._=Me),this},Un.noop=cu,Un.now=Sa,Un.pad=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Bi(fn(i),n)+e+Bi(ln(i),n)},Un.padEnd=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;return t&&r<t?e+Bi(t-r,n):e},Un.padStart=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;return t&&r<t?Bi(t-r,n)+e:e},Un.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),_n(bs(e).replace(re,""),t||0)},Un.random=function(e,t,n){if(n&&"boolean"!=typeof n&&go(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ds(e),t===i?(t=e,e=0):t=ds(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=En();return gn(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return $r(e,t)},Un.reduce=function(e,t,n){var r=Wa(e)?St:Ut,i=arguments.length<3;return r(e,ao(t,4),n,i,fr)},Un.reduceRight=function(e,t,n){var r=Wa(e)?At:Ut,i=arguments.length<3;return r(e,ao(t,4),n,i,pr)},Un.repeat=function(e,t,n){return t=(n?go(e,t,n):t===i)?1:vs(t),Gr(bs(e),t)},Un.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Un.result=function(e,t,n){var r=-1,o=(t=mi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Mo(t[r])];a===i&&(r=o,a=n),e=Xa(a)?a.call(e):a}return e},Un.round=xu,Un.runInContext=e,Un.sample=function(e){return(Wa(e)?Jn:Yr)(e)},Un.size=function(e){if(null==e)return 0;if(Ga(e))return us(e)?on(e):e.length;var t=po(e);return t==w||t==S?e.size:Fr(e).length},Un.snakeCase=Ks,Un.some=function(e,t,n){var r=Wa(e)?kt:ni;return n&&go(e,t,n)&&(t=i),r(e,ao(t,3))},Un.sortedIndex=function(e,t){return ri(e,t)},Un.sortedIndexBy=function(e,t,n){return ii(e,t,ao(n,2))},Un.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ri(e,t);if(r<n&&Va(e[r],t))return r}return-1},Un.sortedLastIndex=function(e,t){return ri(e,t,!0)},Un.sortedLastIndexBy=function(e,t,n){return ii(e,t,ao(n,2),!0)},Un.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ri(e,t,!0)-1;if(Va(e[n],t))return n}return-1},Un.startCase=Ys,Un.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:ar(vs(n),0,e.length),t=si(t),e.slice(n,n+t.length)==t},Un.subtract=Iu,Un.sum=function(e){return e&&e.length?qt(e,iu):0},Un.sumBy=function(e,t){return e&&e.length?qt(e,ao(t,2)):0},Un.template=function(e,t,n){var r=Un.templateSettings;n&&go(e,t,n)&&(t=i),e=bs(e),t=ws({},t,r,Ji);var o,a,s=ws({},t.imports,r.imports,Ji),u=Ps(s),c=zt(s,u),l=0,f=t.interpolate||be,p="__p += '",h=Ie((t.escape||be).source+"|"+f.source+"|"+(f===H?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),d="//# sourceURL="+(Re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++He+"]")+"\n";e.replace(h,(function(t,n,r,i,s,u){return r||(r=i),p+=e.slice(l,u).replace(_e,Ht),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var v=Re.call(t,"variable")&&t.variable;if(v){if(ce.test(v))throw new Ee("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(B,""):p).replace(Q,"$1").replace(z,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=Zs((function(){return we(u,d+"return "+p).apply(i,c)}));if(y.source=p,Ha(y))throw y;return y},Un.times=function(e,t){if((e=vs(e))<1||e>f)return[];var n=h,r=gn(e,h);t=ao(t),e-=h;for(var i=Vt(r,t);++n<e;)t(n);return i},Un.toFinite=ds,Un.toInteger=vs,Un.toLength=ys,Un.toLower=function(e){return bs(e).toLowerCase()},Un.toNumber=ms,Un.toSafeInteger=function(e){return e?ar(vs(e),-9007199254740991,f):0===e?e:0},Un.toString=bs,Un.toUpper=function(e){return bs(e).toUpperCase()},Un.trim=function(e,t,n){if((e=bs(e))&&(n||t===i))return Bt(e);if(!e||!(t=si(t)))return e;var r=an(e),o=an(t);return bi(r,$t(r,o),Gt(r,o)+1).join("")},Un.trimEnd=function(e,t,n){if((e=bs(e))&&(n||t===i))return e.slice(0,sn(e)+1);if(!e||!(t=si(t)))return e;var r=an(e);return bi(r,0,Gt(r,an(t))+1).join("")},Un.trimStart=function(e,t,n){if((e=bs(e))&&(n||t===i))return e.replace(re,"");if(!e||!(t=si(t)))return e;var r=an(e);return bi(r,$t(r,an(t))).join("")},Un.truncate=function(e,t){var n=30,r="...";if(ts(t)){var o="separator"in t?t.separator:o;n="length"in t?vs(t.length):n,r="omission"in t?si(t.omission):r}var a=(e=bs(e)).length;if(Xt(e)){var s=an(e);a=s.length}if(n>=a)return e;var u=n-on(r);if(u<1)return r;var c=s?bi(s,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),as(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Ie(o.source,bs(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?u:p)}}else if(e.indexOf(si(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},Un.unescape=function(e){return(e=bs(e))&&G.test(e)?e.replace(W,un):e},Un.uniqueId=function(e){var t=++Ce;return bs(e)+t},Un.upperCase=Js,Un.upperFirst=Hs,Un.each=ba,Un.eachRight=_a,Un.first=Go,uu(Un,(gu={},br(Un,(function(e,t){Re.call(Un.prototype,t)||(gu[t]=e)})),gu),{chain:!1}),Un.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Un[e].placeholder=Un})),bt(["drop","take"],(function(e,t){Qn.prototype[e]=function(n){n=n===i?1:mn(vs(n),0);var r=this.__filtered__&&!t?new Qn(this):this.clone();return r.__filtered__?r.__takeCount__=gn(n,r.__takeCount__):r.__views__.push({size:gn(n,h),type:e+(r.__dir__<0?"Right":"")}),r},Qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Qn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ao(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Qn.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Qn.prototype[e]=function(){return this.__filtered__?new Qn(this):this[n](1)}})),Qn.prototype.compact=function(){return this.filter(iu)},Qn.prototype.find=function(e){return this.filter(e).head()},Qn.prototype.findLast=function(e){return this.reverse().find(e)},Qn.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new Qn(this):this.map((function(n){return kr(n,e,t)}))})),Qn.prototype.reject=function(e){return this.filter(ja(ao(e)))},Qn.prototype.slice=function(e,t){e=vs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Qn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=vs(t))<0?n.dropRight(-t):n.take(t-e)),n)},Qn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Qn.prototype.toArray=function(){return this.take(h)},br(Qn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Un[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Un.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Qn,c=s[0],l=u||Wa(t),f=function(e){var t=o.apply(Un,Tt([e],s));return r&&p?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,h=!!this.__actions__.length,d=a&&!p,v=u&&!h;if(!a&&l){t=v?t:new Qn(this);var y=e.apply(t,s);return y.__actions__.push({func:da,args:[f],thisArg:i}),new Bn(y,p)}return d&&v?e.apply(this,s):(y=this.thru(f),d?r?y.value()[0]:y.value():y)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ae[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Un.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Wa(i)?i:[],e)}return this[n]((function(n){return t.apply(Wa(n)?n:[],e)}))}})),br(Qn.prototype,(function(e,t){var n=Un[t];if(n){var r=n.name+"";Re.call(Dn,r)||(Dn[r]=[]),Dn[r].push({name:t,func:n})}})),Dn[Mi(i,2).name]=[{name:"wrapper",func:i}],Qn.prototype.clone=function(){var e=new Qn(this.__wrapped__);return e.__actions__=Si(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Si(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Si(this.__views__),e},Qn.prototype.reverse=function(){if(this.__filtered__){var e=new Qn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Qn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=gn(t,e+a);break;case"takeRight":e=mn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,h=gn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return pi(e,this.__actions__);var d=[];e:for(;u--&&p<h;){for(var v=-1,y=e[c+=t];++v<f;){var m=l[v],g=m.iteratee,b=m.type,_=g(y);if(2==b)y=_;else if(!_){if(1==b)continue e;break e}}d[p++]=y}return d},Un.prototype.at=va,Un.prototype.chain=function(){return ha(this)},Un.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===i&&(this.__values__=hs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Un.prototype.plant=function(e){for(var t,n=this;n instanceof Vn;){var r=qo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Un.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Qn){var t=e;return this.__actions__.length&&(t=new Qn(this)),(t=t.reverse()).__actions__.push({func:da,args:[ta],thisArg:i}),new Bn(t,this.__chain__)}return this.thru(ta)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,at&&(Un.prototype[at]=function(){return this}),Un}();ot._=cn,(r=function(){return cn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},5161:(e,t,n)=>{var r=n(9932),i=n(7206),o=n(9199),a=n(1469);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},8306:(e,t,n)=>{var r=n(3369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},2492:(e,t,n)=>{var r=n(2980),i=n(1463)((function(e,t,n){r(e,t,n)}));e.exports=i},9601:(e,t,n)=>{var r=n(371),i=n(9152),o=n(5403),a=n(327);e.exports=function(e){return o(e)?r(a(e)):i(e)}},9734:(e,t,n)=>{var r=n(1078),i=n(2689),o=n(5976),a=n(6612),s=o((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])}));e.exports=s},479:e=>{e.exports=function(){return[]}},5062:e=>{e.exports=function(){return!1}},8601:(e,t,n)=>{var r=n(4841);e.exports=function(e){return e?Infinity===(e=r(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:(e,t,n)=>{var r=n(8601);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},4841:(e,t,n)=>{var r=n(7561),i=n(3218),o=n(3448),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},9881:(e,t,n)=>{var r=n(8363),i=n(1704);e.exports=function(e){return r(e,i(e))}},9833:(e,t,n)=>{var r=n(531);e.exports=function(e){return null==e?"":r(e)}},2628:(e,t,n)=>{var r=n(7415),i=n(3674);e.exports=function(e){return null==e?[]:r(e,i(e))}},3300:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AccessDeniedReason:()=>J,BOOLEAN_DEFAULT_FALLBACK_ENTITLEMENT:()=>te,BillingModel:()=>l,BillingPeriod:()=>f,Currency:()=>h,CustomerModel:()=>ie,EntitlementResetPeriod:()=>Z,FeatureType:()=>H,LogLevel:()=>r,METERED_DEFAULT_FALLBACK_ENTITLEMENT:()=>re,MeterType:()=>X,NUMERIC_DEFAULT_FALLBACK_ENTITLEMENT:()=>ne,PromotionalEntitlementStatus:()=>L,SubscriptionStatus:()=>W,TrialPeriodUnits:()=>$,default:()=>Ja});var r,i=n(4721),o=n.n(i);!function(e){e.ALL="ALL",e.NONE="NONE",e.LOG="LOG",e.ERROR="ERROR"}(r||(r={}));var a,s,u,c,l,f,p,h,d,v,y,m,g,b,_,E,w,O,x,I,T,S,A,k,D,N,P,R,C,F,j,L,M,U,q,V,B,Q,z,W,$,G,K,Y,J,H,X,Z,ee=function(){function e(e,t){this.logger=e,this.logLevel=t}return e.prototype.error=function(e,t){this.logLevel!==r.NONE&&this.logger.error(e,t||{})},e.prototype.log=function(e,t){o()([r.ERROR,r.NONE],this.logLevel)||this.logger.log(e,t||{})},e}();!function(e){e.CustomerNotFound="CustomerNotFound",e.FeatureNotFound="FeatureNotFound",e.NoActiveSubscription="NoActiveSubscription",e.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",e.RequestedUsageExceedingLimit="RequestedUsageExceedingLimit",e.Unknown="Unknown"}(a||(a={})),function(e){e.BillingId="billingId",e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.Id="id",e.IsLatest="isLatest",e.ProductId="productId",e.RefId="refId",e.Status="status",e.UpdatedAt="updatedAt",e.VersionNumber="versionNumber"}(s||(s={})),function(e){e.Id="id"}(u||(u={})),function(e){e.Client="CLIENT",e.Server="SERVER"}(c||(c={})),function(e){e.FlatFee="FLAT_FEE",e.PerUnit="PER_UNIT",e.UsageBased="USAGE_BASED"}(l||(l={})),function(e){e.Annually="ANNUALLY",e.Monthly="MONTHLY"}(f||(f={})),function(e){e.Added="ADDED",e.Deleted="DELETED",e.Modified="MODIFIED"}(p||(p={})),function(e){e.Usd="USD"}(h||(h={})),function(e){e.BillingId="billingId",e.CreatedAt="createdAt",e.CrmId="crmId",e.Email="email",e.EnvironmentId="environmentId",e.Id="id",e.Name="name",e.RefId="refId",e.UpdatedAt="updatedAt"}(d||(d={})),function(e){e.BillingId="billingId",e.CrmId="crmId",e.EndDate="endDate",e.EnvironmentId="environmentId",e.Id="id",e.RefId="refId",e.StartDate="startDate",e.Status="status"}(v||(v={})),function(e){e.Day="DAY",e.Hour="HOUR",e.Month="MONTH",e.Week="WEEK"}(y||(y={})),function(e){e.DisplayName="displayName",e.Id="id"}(m||(m={})),function(e){e.AddonNotFound="AddonNotFound",e.CheckoutIsNotSupported="CheckoutIsNotSupported",e.CustomerNotFound="CustomerNotFound",e.DuplicatedEntityNotAllowed="DuplicatedEntityNotAllowed",e.EnvironmentMissing="EnvironmentMissing",e.FeatureNotFound="FeatureNotFound",e.IdentityForbidden="IdentityForbidden",e.IntegrityViolation="IntegrityViolation",e.InvalidEntitlementResetPeriod="InvalidEntitlementResetPeriod",e.InvalidMemberDelete="InvalidMemberDelete",e.InvalidUsageValueForIncrementalFeatureError="InvalidUsageValueForIncrementalFeatureError",e.MemberInvitationError="MemberInvitationError",e.MemberNotFound="MemberNotFound",e.MeteringNotAvailableForFeatureType="MeteringNotAvailableForFeatureType",e.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",e.PackageAlreadyPublished="PackageAlreadyPublished",e.PlanAlreadyExtended="PlanAlreadyExtended",e.PlanNotFound="PlanNotFound",e.PlansCircularDependencyError="PlansCircularDependencyError",e.PriceNotFound="PriceNotFound",e.SubscriptionNotFound="SubscriptionNotFound",e.TrialsNotAllowedInProduct="TrialsNotAllowedInProduct",e.UnPublishedPackage="UnPublishedPackage",e.UncompatibleSubscriptionAddon="UncompatibleSubscriptionAddon",e.UnexpectedError="UnexpectedError",e.UnsupportedFeatureType="UnsupportedFeatureType",e.UnsupportedVendorIdentifier="UnsupportedVendorIdentifier"}(g||(g={})),function(e){e.AddonCreated="ADDON_CREATED",e.AddonDeleted="ADDON_DELETED",e.AddonUpdated="ADDON_UPDATED",e.CustomerCreated="CUSTOMER_CREATED",e.CustomerDeleted="CUSTOMER_DELETED",e.CustomerUpdated="CUSTOMER_UPDATED",e.EntitlementDenied="ENTITLEMENT_DENIED",e.EntitlementGranted="ENTITLEMENT_GRANTED",e.EntitlementRequested="ENTITLEMENT_REQUESTED",e.FeatureCreated="FEATURE_CREATED",e.FeatureDeleted="FEATURE_DELETED",e.FeatureUpdated="FEATURE_UPDATED",e.MeasurementReported="MEASUREMENT_REPORTED",e.PackagePublished="PACKAGE_PUBLISHED",e.PlanCreated="PLAN_CREATED",e.PlanDeleted="PLAN_DELETED",e.PlanUpdated="PLAN_UPDATED",e.PromotionalEntitlementExpired="PROMOTIONAL_ENTITLEMENT_EXPIRED",e.PromotionalEntitlementGranted="PROMOTIONAL_ENTITLEMENT_GRANTED",e.PromotionalEntitlementRevoked="PROMOTIONAL_ENTITLEMENT_REVOKED",e.PromotionalEntitlementUpdated="PROMOTIONAL_ENTITLEMENT_UPDATED",e.SubscriptionCanceled="SUBSCRIPTION_CANCELED",e.SubscriptionCreated="SUBSCRIPTION_CREATED",e.SubscriptionExpired="SUBSCRIPTION_EXPIRED",e.SubscriptionTrialConverted="SUBSCRIPTION_TRIAL_CONVERTED",e.SubscriptionTrialEndsSoon="SUBSCRIPTION_TRIAL_ENDS_SOON",e.SubscriptionTrialExpired="SUBSCRIPTION_TRIAL_EXPIRED",e.SubscriptionTrialStarted="SUBSCRIPTION_TRIAL_STARTED",e.SubscriptionUpdated="SUBSCRIPTION_UPDATED"}(b||(b={})),function(e){e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.FeatureStatus="featureStatus",e.FeatureType="featureType",e.Id="id",e.MeterType="meterType",e.RefId="refId",e.UpdatedAt="updatedAt"}(_||(_={})),function(e){e.Active="ACTIVE",e.New="NEW",e.Suspended="SUSPENDED"}(E||(E={})),function(e){e.Boolean="BOOLEAN",e.Number="NUMBER"}(w||(w={})),function(e){e.CreatedAt="createdAt",e.Endpoint="endpoint",e.EnvironmentId="environmentId",e.Id="id",e.Status="status"}(O||(O={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE"}(x||(x={})),function(e){e.EnvironmentId="environmentId",e.Id="id",e.VendorIdentifier="vendorIdentifier"}(I||(I={})),function(e){e.Id="id"}(T||(T={})),function(e){e.Invited="INVITED",e.Registered="REGISTERED"}(S||(S={})),function(e){e.Fluctuating="Fluctuating",e.Incremental="Incremental",e.None="None"}(A||(A={})),function(e){e.StartOfTheMonth="StartOfTheMonth",e.SubscriptionStart="SubscriptionStart"}(k||(k={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id",e.PackageId="packageId",e.UpdatedAt="updatedAt"}(D||(D={})),function(e){e.Draft="DRAFT",e.Published="PUBLISHED"}(N||(N={})),function(e){e.BillingId="billingId",e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.Id="id",e.IsLatest="isLatest",e.ProductId="productId",e.RefId="refId",e.Status="status",e.UpdatedAt="updatedAt",e.VersionNumber="versionNumber"}(P||(P={})),function(e){e.BillingModel="billingModel",e.BillingPeriod="billingPeriod",e.Id="id"}(R||(R={})),function(e){e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.Id="id",e.IsDefaultProduct="isDefaultProduct",e.RefId="refId",e.UpdatedAt="updatedAt"}(C||(C={})),function(e){e.Custom="CUSTOM",e.Lifetime="LIFETIME",e.OneMonth="ONE_MONTH",e.OneWeek="ONE_WEEK",e.OneYear="ONE_YEAR",e.SixMonth="SIX_MONTH"}(F||(F={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id",e.Status="status",e.UpdatedAt="updatedAt"}(j||(j={})),function(e){e.Active="Active",e.Expired="Expired",e.Paused="Paused"}(L||(L={})),function(e){e.AllCustomers="ALL_CUSTOMERS",e.NewCustomers="NEW_CUSTOMERS"}(M||(M={})),function(e){e.Asc="ASC",e.Desc="DESC"}(U||(U={})),function(e){e.NullsFirst="NULLS_FIRST",e.NullsLast="NULLS_LAST"}(q||(q={})),function(e){e.Id="id",e.Quantity="quantity",e.UpdatedAt="updatedAt"}(V||(V={})),function(e){e.EndOfBillingPeriod="END_OF_BILLING_PERIOD",e.Immediate="IMMEDIATE"}(B||(B={})),function(e){e.CancelSubscription="CANCEL_SUBSCRIPTION",e.DowngradeToFree="DOWNGRADE_TO_FREE"}(Q||(Q={})),function(e){e.Id="id",e.UpdatedAt="updatedAt",e.UsageLimit="usageLimit"}(z||(z={})),function(e){e.Active="ACTIVE",e.Canceled="CANCELED",e.Expired="EXPIRED",e.InTrial="IN_TRIAL",e.NotStarted="NOT_STARTED"}(W||(W={})),function(e){e.Day="DAY",e.Month="MONTH"}($||($={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id"}(G||(G={})),function(e){e.Stripe="STRIPE",e.Zuora="ZUORA"}(K||(K={})),function(e){e.EveryFriday="EveryFriday",e.EveryMonday="EveryMonday",e.EverySaturday="EverySaturday",e.EverySunday="EverySunday",e.EveryThursday="EveryThursday",e.EveryTuesday="EveryTuesday",e.EveryWednesday="EveryWednesday",e.SubscriptionStart="SubscriptionStart"}(Y||(Y={})),function(e){e.InvalidFeatureType="InvalidFeatureType",e.CustomerNotFound="CustomerNotFound",e.FeatureNotFound="FeatureNotFound",e.NoActiveSubscriptions="NoActiveSubscriptions",e.CustomerNotEntitledForFeature="CustomerNotEntitledForFeature",e.RequestedUsageExceedsLimit="RequestedUsageExceedsLimit",e.Unknown="Unknown"}(J||(J={})),function(e){e.Boolean="Boolean",e.Numeric="Numeric"}(H||(H={})),function(e){e.Fluctuating="Fluctuating",e.Incremental="Incremental",e.None="None"}(X||(X={})),function(e){e.Daily="Daily",e.Hourly="Hourly",e.Monthly="Monthly",e.Weekly="Weekly"}(Z||(Z={}));var te={isFallback:!0,hasAccess:!1,accessDeniedReason:J.Unknown},ne={isFallback:!0,hasAccess:!1,isUnlimited:!1,accessDeniedReason:J.Unknown},re={isFallback:!0,hasAccess:!1,isUnlimited:!1,currentUsage:0,requestedUsage:1,accessDeniedReason:J.Unknown},ie=function(){function e(e){Object.assign(this,e)}return e.prototype.getActiveSubscriptions=function(){return this.subscriptions.filter((function(e){return e.status===W.Active}))},e.prototype.getActiveTrials=function(){return this.subscriptions.filter((function(e){return e.status===W.InTrial}))},e.prototype.getActivePromotionalEntitlements=function(){return this.promotionalEntitlements.filter((function(e){return e.status===L.Active}))},e}(),oe=function(e,t){return oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},oe(e,t)};function ae(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}oe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var se=function(){return se=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},se.apply(this,arguments)};function ue(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function ce(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function le(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function fe(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function pe(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}Object.create,Object.create;const he=/\r\n|[\n\r]/g;function de(e,t){let n=0,r=1;for(const i of e.body.matchAll(he)){if("number"==typeof i.index||pe(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function ve(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?n:0,u=t.column+s,c=`${e.name}:${a}:${u}\n`,l=r.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){const e=Math.floor(u/80),t=u%80,n=[];for(let e=0;e<f.length;e+=80)n.push(f.slice(e,e+80));return c+ye([[`${a} |`,n[0]],...n.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",n[e+1]]])}return c+ye([[a-1+" |",l[i-1]],[`${a} |`,f],["|","^".padStart(u)],[`${a+1} |`,l[i+1]]])}function ye(e){const t=e.filter((([e,t])=>void 0!==t)),n=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(n)+(t?" "+t:""))).join("\n")}class me extends Error{constructor(e,t,n,r,i,o,a){var s,u,c;super(e),this.name="GraphQLError",this.path=null!=i?i:void 0,this.originalError=null!=o?o:void 0,this.nodes=ge(Array.isArray(t)?t:t?[t]:void 0);const l=ge(null===(s=this.nodes)||void 0===s?void 0:s.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=n?n:null==l||null===(u=l[0])||void 0===u?void 0:u.source,this.positions=null!=r?r:null==l?void 0:l.map((e=>e.start)),this.locations=r&&n?r.map((e=>de(n,e))):null==l?void 0:l.map((e=>de(e.source,e.start)));const f="object"==typeof(p=null==o?void 0:o.extensions)&&null!==p?null==o?void 0:o.extensions:void 0;var p;this.extensions=null!==(c=null!=a?a:f)&&void 0!==c?c:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=o&&o.stack?Object.defineProperty(this,"stack",{value:o.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,me):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+="\n\n"+ve((t=n.loc).source,de(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+ve(this.source,t);var t;return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function ge(e){return void 0===e||0===e.length?void 0:e}function be(e,t,n){return new me(`Syntax Error: ${n}`,void 0,e,[t])}let _e;var Ee;(Ee=_e||(_e={})).NAME="Name",Ee.DOCUMENT="Document",Ee.OPERATION_DEFINITION="OperationDefinition",Ee.VARIABLE_DEFINITION="VariableDefinition",Ee.SELECTION_SET="SelectionSet",Ee.FIELD="Field",Ee.ARGUMENT="Argument",Ee.FRAGMENT_SPREAD="FragmentSpread",Ee.INLINE_FRAGMENT="InlineFragment",Ee.FRAGMENT_DEFINITION="FragmentDefinition",Ee.VARIABLE="Variable",Ee.INT="IntValue",Ee.FLOAT="FloatValue",Ee.STRING="StringValue",Ee.BOOLEAN="BooleanValue",Ee.NULL="NullValue",Ee.ENUM="EnumValue",Ee.LIST="ListValue",Ee.OBJECT="ObjectValue",Ee.OBJECT_FIELD="ObjectField",Ee.DIRECTIVE="Directive",Ee.NAMED_TYPE="NamedType",Ee.LIST_TYPE="ListType",Ee.NON_NULL_TYPE="NonNullType",Ee.SCHEMA_DEFINITION="SchemaDefinition",Ee.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",Ee.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",Ee.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",Ee.FIELD_DEFINITION="FieldDefinition",Ee.INPUT_VALUE_DEFINITION="InputValueDefinition",Ee.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",Ee.UNION_TYPE_DEFINITION="UnionTypeDefinition",Ee.ENUM_TYPE_DEFINITION="EnumTypeDefinition",Ee.ENUM_VALUE_DEFINITION="EnumValueDefinition",Ee.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",Ee.DIRECTIVE_DEFINITION="DirectiveDefinition",Ee.SCHEMA_EXTENSION="SchemaExtension",Ee.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",Ee.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",Ee.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",Ee.UNION_TYPE_EXTENSION="UnionTypeExtension",Ee.ENUM_TYPE_EXTENSION="EnumTypeExtension",Ee.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";class we{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Oe{constructor(e,t,n,r,i,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const xe={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Ie=new Set(Object.keys(xe));function Te(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&Ie.has(t)}let Se,Ae;var ke;function De(e){return Ne(e,[])}function Ne(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:Ne(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,i=[];for(let r=0;r<n;++r)i.push(Ne(e[r],t));return 1===r?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const r=n.map((([e,n])=>e+": "+Ne(n,t)));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function Pe(e,t){if(!Boolean(e))throw new Error(t)}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(Se||(Se={})),(ke=Ae||(Ae={})).SOF="<SOF>",ke.EOF="<EOF>",ke.BANG="!",ke.DOLLAR="$",ke.AMP="&",ke.PAREN_L="(",ke.PAREN_R=")",ke.SPREAD="...",ke.COLON=":",ke.EQUALS="=",ke.AT="@",ke.BRACKET_L="[",ke.BRACKET_R="]",ke.BRACE_L="{",ke.PIPE="|",ke.BRACE_R="}",ke.NAME="Name",ke.INT="Int",ke.FLOAT="Float",ke.STRING="String",ke.BLOCK_STRING="BlockString",ke.COMMENT="Comment";class Re{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||Pe(!1,`Body must be a string. Received: ${De(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Pe(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Pe(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}let Ce;function Fe(e){const t=e.split(/\r\n|[\n\r]/g),n=function(e){var t;let n=!0,r=!0,i=0,o=null;for(let t=0;t<e.length;++t)switch(e.charCodeAt(t)){case 13:10===e.charCodeAt(t+1)&&++t;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===o||i<o)&&(o=i),r=!1}return null!==(t=o)&&void 0!==t?t:0}(e);if(0!==n)for(let e=1;e<t.length;e++)t[e]=t[e].slice(n);let r=0;for(;r<t.length&&je(t[r]);)++r;let i=t.length;for(;i>r&&je(t[i-1]);)--i;return t.slice(r,i).join("\n")}function je(e){for(const t of e)if(" "!==t&&"\t"!==t)return!1;return!0}function Le(e){return e>=48&&e<=57}function Me(e){return e>=97&&e<=122||e>=65&&e<=90}function Ue(e){return Me(e)||95===e}!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(Ce||(Ce={}));class qe{constructor(e){const t=new Oe(Ae.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Ae.EOF)do{if(e.next)e=e.next;else{const t=Ge(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===Ae.COMMENT);return e}}function Ve(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Be(e,t){return Qe(e.charCodeAt(t))&&ze(e.charCodeAt(t+1))}function Qe(e){return e>=55296&&e<=56319}function ze(e){return e>=56320&&e<=57343}function We(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return Ae.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function $e(e,t,n,r,i){const o=e.line,a=1+n-e.lineStart;return new Oe(t,n,r,o,a,i)}function Ge(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const t=n.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Ke(e,i);case 33:return $e(e,Ae.BANG,i,i+1);case 36:return $e(e,Ae.DOLLAR,i,i+1);case 38:return $e(e,Ae.AMP,i,i+1);case 40:return $e(e,Ae.PAREN_L,i,i+1);case 41:return $e(e,Ae.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return $e(e,Ae.SPREAD,i,i+3);break;case 58:return $e(e,Ae.COLON,i,i+1);case 61:return $e(e,Ae.EQUALS,i,i+1);case 64:return $e(e,Ae.AT,i,i+1);case 91:return $e(e,Ae.BRACKET_L,i,i+1);case 93:return $e(e,Ae.BRACKET_R,i,i+1);case 123:return $e(e,Ae.BRACE_L,i,i+1);case 124:return $e(e,Ae.PIPE,i,i+1);case 125:return $e(e,Ae.BRACE_R,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?rt(e,i):He(e,i)}if(Le(t)||45===t)return Ye(e,i,t);if(Ue(t))return it(e,i);throw be(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Ve(t)||Be(n,i)?`Unexpected character: ${We(e,i)}.`:`Invalid character: ${We(e,i)}.`)}return $e(e,Ae.EOF,r,r)}function Ke(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(10===e||13===e)break;if(Ve(e))++i;else{if(!Be(n,i))break;i+=2}}return $e(e,Ae.COMMENT,t,i,n.slice(t+1,i))}function Ye(e,t,n){const r=e.source.body;let i=t,o=n,a=!1;if(45===o&&(o=r.charCodeAt(++i)),48===o){if(o=r.charCodeAt(++i),Le(o))throw be(e.source,i,`Invalid number, unexpected digit after 0: ${We(e,i)}.`)}else i=Je(e,i,o),o=r.charCodeAt(i);if(46===o&&(a=!0,o=r.charCodeAt(++i),i=Je(e,i,o),o=r.charCodeAt(i)),69!==o&&101!==o||(a=!0,o=r.charCodeAt(++i),43!==o&&45!==o||(o=r.charCodeAt(++i)),i=Je(e,i,o),o=r.charCodeAt(i)),46===o||Ue(o))throw be(e.source,i,`Invalid number, expected digit but got: ${We(e,i)}.`);return $e(e,a?Ae.FLOAT:Ae.INT,t,i,r.slice(t,i))}function Je(e,t,n){if(!Le(n))throw be(e.source,t,`Invalid number, expected digit but got: ${We(e,t)}.`);const r=e.source.body;let i=t+1;for(;Le(r.charCodeAt(i));)++i;return i}function He(e,t){const n=e.source.body,r=n.length;let i=t+1,o=i,a="";for(;i<r;){const r=n.charCodeAt(i);if(34===r)return a+=n.slice(o,i),$e(e,Ae.STRING,t,i+1,a);if(92!==r){if(10===r||13===r)break;if(Ve(r))++i;else{if(!Be(n,i))throw be(e.source,i,`Invalid character within String: ${We(e,i)}.`);i+=2}}else{a+=n.slice(o,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?Xe(e,i):Ze(e,i):nt(e,i);a+=t.value,i+=t.size,o=i}}throw be(e.source,i,"Unterminated string.")}function Xe(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const e=n.charCodeAt(t+i++);if(125===e){if(i<5||!Ve(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|tt(e),r<0)break}throw be(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Ze(e,t){const n=e.source.body,r=et(n,t+2);if(Ve(r))return{value:String.fromCodePoint(r),size:6};if(Qe(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=et(n,t+8);if(ze(e))return{value:String.fromCodePoint(r,e),size:12}}throw be(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function et(e,t){return tt(e.charCodeAt(t))<<12|tt(e.charCodeAt(t+1))<<8|tt(e.charCodeAt(t+2))<<4|tt(e.charCodeAt(t+3))}function tt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function nt(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw be(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function rt(e,t){const n=e.source.body,r=n.length,i=e.line,o=1+t-e.lineStart;let a=t+3,s=a,u="";for(;a<r;){const r=n.charCodeAt(a);if(34===r&&34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2))return u+=n.slice(s,a),new Oe(Ae.BLOCK_STRING,t,a+3,i,o,Fe(u));if(92!==r||34!==n.charCodeAt(a+1)||34!==n.charCodeAt(a+2)||34!==n.charCodeAt(a+3))if(10!==r&&13!==r)if(Ve(r))++a;else{if(!Be(n,a))throw be(e.source,a,`Invalid character within String: ${We(e,a)}.`);a+=2}else 13===r&&10===n.charCodeAt(a+1)?a+=2:++a,++e.line,e.lineStart=a;else u+=n.slice(s,a)+'"""',a+=4,s=a}throw be(e.source,a,"Unterminated string.")}function it(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r&&(Me(o=n.charCodeAt(i))||Le(o)||95===o);)++i;var o;return $e(e,Ae.NAME,t,i,n.slice(t,i))}class ot{constructor(e,t){const n=function(e){return e instanceof Re}(e)?e:new Re(e);this._lexer=new qe(n),this._options=t}parseName(){const e=this.expectToken(Ae.NAME);return this.node(e,{kind:_e.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:_e.DOCUMENT,definitions:this.many(Ae.SOF,this.parseDefinition,Ae.EOF)})}parseDefinition(){if(this.peek(Ae.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===Ae.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw be(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Ae.BRACE_L))return this.node(e,{kind:_e.OPERATION_DEFINITION,operation:Se.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(Ae.NAME)&&(n=this.parseName()),this.node(e,{kind:_e.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Ae.NAME);switch(e.value){case"query":return Se.QUERY;case"mutation":return Se.MUTATION;case"subscription":return Se.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Ae.PAREN_L,this.parseVariableDefinition,Ae.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:_e.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Ae.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Ae.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Ae.DOLLAR),this.node(e,{kind:_e.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:_e.SELECTION_SET,selections:this.many(Ae.BRACE_L,this.parseSelection,Ae.BRACE_R)})}parseSelection(){return this.peek(Ae.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(Ae.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:_e.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Ae.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Ae.PAREN_L,t,Ae.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(Ae.COLON),this.node(t,{kind:_e.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Ae.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(Ae.NAME)?this.node(e,{kind:_e.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:_e.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){var e;const t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacyFragmentVariables)?this.node(t,{kind:_e.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:_e.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Ae.BRACKET_L:return this.parseList(e);case Ae.BRACE_L:return this.parseObject(e);case Ae.INT:return this._lexer.advance(),this.node(t,{kind:_e.INT,value:t.value});case Ae.FLOAT:return this._lexer.advance(),this.node(t,{kind:_e.FLOAT,value:t.value});case Ae.STRING:case Ae.BLOCK_STRING:return this.parseStringLiteral();case Ae.NAME:switch(this._lexer.advance(),t.value){case"true":return this.node(t,{kind:_e.BOOLEAN,value:!0});case"false":return this.node(t,{kind:_e.BOOLEAN,value:!1});case"null":return this.node(t,{kind:_e.NULL});default:return this.node(t,{kind:_e.ENUM,value:t.value})}case Ae.DOLLAR:if(e){if(this.expectToken(Ae.DOLLAR),this._lexer.token.kind===Ae.NAME){const e=this._lexer.token.value;throw be(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable()}throw this.unexpected()}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this._lexer.advance(),this.node(e,{kind:_e.STRING,value:e.value,block:e.kind===Ae.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:_e.LIST,values:this.any(Ae.BRACKET_L,(()=>this.parseValueLiteral(e)),Ae.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:_e.OBJECT,fields:this.any(Ae.BRACE_L,(()=>this.parseObjectField(e)),Ae.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(Ae.COLON),this.node(t,{kind:_e.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(Ae.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(Ae.AT),this.node(t,{kind:_e.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Ae.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(Ae.BRACKET_R),t=this.node(e,{kind:_e.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(Ae.BANG)?this.node(e,{kind:_e.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:_e.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Ae.STRING)||this.peek(Ae.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(Ae.BRACE_L,this.parseOperationTypeDefinition,Ae.BRACE_R);return this.node(e,{kind:_e.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Ae.COLON);const n=this.parseNamedType();return this.node(e,{kind:_e.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:_e.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:_e.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Ae.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Ae.BRACE_L,this.parseFieldDefinition,Ae.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(Ae.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:_e.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(Ae.PAREN_L,this.parseInputValueDef,Ae.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(Ae.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(Ae.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:_e.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:_e.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:_e.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(Ae.EQUALS)?this.delimitedMany(Ae.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:_e.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(Ae.BRACE_L,this.parseEnumValueDefinition,Ae.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:_e.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw be(this._lexer.source,this._lexer.token.start,`${at(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:_e.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(Ae.BRACE_L,this.parseInputValueDef,Ae.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Ae.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(Ae.BRACE_L,this.parseOperationTypeDefinition,Ae.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:_e.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:_e.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:_e.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:_e.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:_e.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:_e.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:_e.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Ae.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:_e.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Ae.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Ce,t.value))return t;throw this.unexpected(e)}node(e,t){var n;return!0!==(null===(n=this._options)||void 0===n?void 0:n.noLocation)&&(t.loc=new we(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw be(this._lexer.source,t.start,`Expected ${st(e)}, found ${at(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this._lexer.advance(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==Ae.NAME||t.value!==e)throw be(this._lexer.source,t.start,`Expected "${e}", found ${at(t)}.`);this._lexer.advance()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Ae.NAME&&t.value===e&&(this._lexer.advance(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return be(this._lexer.source,t.start,`Unexpected ${at(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}}function at(e){const t=e.value;return st(e.kind)+(null!=t?` "${t}"`:"")}function st(e){return function(e){return e===Ae.BANG||e===Ae.DOLLAR||e===Ae.AMP||e===Ae.PAREN_L||e===Ae.PAREN_R||e===Ae.SPREAD||e===Ae.COLON||e===Ae.EQUALS||e===Ae.AT||e===Ae.BRACKET_L||e===Ae.BRACKET_R||e===Ae.BRACE_L||e===Ae.PIPE||e===Ae.BRACE_R}(e)?`"${e}"`:e}var ut=new Map,ct=new Map,lt=!0,ft=!1;function pt(e){return e.replace(/[\s,]+/g," ").trim()}function ht(e){var t,n,r,i=pt(e);if(!ut.has(i)){var o=function(e,t){return new ot(e,t).parseDocument()}(e,{experimentalFragmentVariables:ft,allowLegacyFragmentVariables:ft});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");ut.set(i,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}((t=o,n=new Set,r=[],t.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,i=pt((a=e.loc).source.body.substring(a.start,a.end)),o=ct.get(t);o&&!o.has(i)?lt&&console.warn("Warning: fragment with name "+t+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||ct.set(t,o=new Set),o.add(i),n.has(i)||(n.add(i),r.push(e))}else r.push(e);var a})),se(se({},t),{definitions:r}))))}return ut.get(i)}function dt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach((function(t,n){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[n+1]})),ht(r)}var vt,yt=dt;(vt=dt||(dt={})).gql=yt,vt.resetCaches=function(){ut.clear(),ct.clear()},vt.disableFragmentWarnings=function(){lt=!1},vt.enableExperimentalFragmentVariables=function(){ft=!0},vt.disableExperimentalFragmentVariables=function(){ft=!1},dt.default=dt;var mt,gt,bt,_t=dt(mt||(gt=["\n fragment PriceFragment on Price {\n billingModel\n billingPeriod\n price {\n amount\n currency\n }\n feature {\n featureUnits\n featureUnitsPlural\n displayName\n }\n }\n"],bt=["\n fragment PriceFragment on Price {\n billingModel\n billingPeriod\n price {\n amount\n currency\n }\n feature {\n featureUnits\n featureUnitsPlural\n displayName\n }\n }\n"],Object.defineProperty?Object.defineProperty(gt,"raw",{value:bt}):gt.raw=bt,mt=gt)),Et=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},wt=dt(Tt||(Tt=Et(["\n fragment PackageEntitlementFragment on PackageEntitlement {\n usageLimit\n hasUnlimitedUsage\n featureId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"],["\n fragment PackageEntitlementFragment on PackageEntitlement {\n usageLimit\n hasUnlimitedUsage\n featureId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"]))),Ot=dt(St||(St=Et(["\n fragment AddonFragment on Addon {\n refId\n displayName\n description\n entitlements {\n ...PackageEntitlementFragment\n }\n }\n"],["\n fragment AddonFragment on Addon {\n refId\n displayName\n description\n entitlements {\n ...PackageEntitlementFragment\n }\n }\n"]))),xt=dt(At||(At=Et(["\n fragment PlanFragment on Plan {\n id\n refId\n description\n displayName\n product {\n refId\n displayName\n }\n basePlan {\n id\n refId\n displayName\n }\n entitlements {\n ...PackageEntitlementFragment\n }\n inheritedEntitlements {\n ...PackageEntitlementFragment\n }\n compatibleAddons {\n ...AddonFragment\n }\n prices {\n ...PriceFragment\n }\n defaultTrialConfig {\n duration\n units\n }\n }\n ","\n ","\n ","\n"],["\n fragment PlanFragment on Plan {\n id\n refId\n description\n displayName\n product {\n refId\n displayName\n }\n basePlan {\n id\n refId\n displayName\n }\n entitlements {\n ...PackageEntitlementFragment\n }\n inheritedEntitlements {\n ...PackageEntitlementFragment\n }\n compatibleAddons {\n ...AddonFragment\n }\n prices {\n ...PriceFragment\n }\n defaultTrialConfig {\n duration\n units\n }\n }\n ","\n ","\n ","\n"])),wt,_t,Ot);const It=function(){function e(e){this.client=e}return e.prototype.getPlans=function(e){return this.client.query({query:dt(kt||(kt=Et(["\n query GetPlans($paging: CursorPaging, $filter: PlanFilter, $sorting: [PlanSort!]) {\n plans(paging: $paging, filter: $filter, sorting: $sorting) {\n edges {\n node {\n ...PlanFragment\n }\n }\n }\n }\n ","\n "],["\n query GetPlans($paging: CursorPaging, $filter: PlanFilter, $sorting: [PlanSort!]) {\n plans(paging: $paging, filter: $filter, sorting: $sorting) {\n edges {\n node {\n ...PlanFragment\n }\n }\n }\n }\n ","\n "])),xt),variables:{paging:{first:50},filter:{status:{eq:N.Published},isLatest:{is:!0},product:e?{refId:{eq:e}}:{}},sorting:[{field:P.RefId,direction:U.Asc}]}})},e}();var Tt,St,At,kt,Dt=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Nt=dt(Ft||(Ft=Dt(["\n fragment SubscriptionFragment on CustomerSubscription {\n id\n startDate\n endDate\n status\n refId\n prices {\n usageLimit\n price {\n ...PriceFragment\n }\n }\n plan {\n id\n refId\n displayName\n description\n product {\n refId\n displayName\n }\n entitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n inheritedEntitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n packageId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n prices {\n ...PriceFragment\n }\n }\n addons {\n id\n quantity\n addon {\n id\n refId\n displayName\n description\n entitlements {\n usageLimit\n hasUnlimitedUsage\n featureId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n }\n }\n }\n ","\n"],["\n fragment SubscriptionFragment on CustomerSubscription {\n id\n startDate\n endDate\n status\n refId\n prices {\n usageLimit\n price {\n ...PriceFragment\n }\n }\n plan {\n id\n refId\n displayName\n description\n product {\n refId\n displayName\n }\n entitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n inheritedEntitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n packageId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n prices {\n ...PriceFragment\n }\n }\n addons {\n id\n quantity\n addon {\n id\n refId\n displayName\n description\n entitlements {\n usageLimit\n hasUnlimitedUsage\n featureId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n }\n }\n }\n ","\n"])),_t),Pt=dt(jt||(jt=Dt(["\n fragment PromotionalEntitlementFragment on PromotionalEntitlement {\n status\n usageLimit\n featureId\n hasUnlimitedUsage\n resetPeriod\n endDate\n isVisible\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"],["\n fragment PromotionalEntitlementFragment on PromotionalEntitlement {\n status\n usageLimit\n featureId\n hasUnlimitedUsage\n resetPeriod\n endDate\n isVisible\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"]))),Rt=dt(Lt||(Lt=Dt(["\n fragment CustomerFragment on Customer {\n id\n name\n email\n createdAt\n updatedAt\n refId\n promotionalEntitlements {\n ...PromotionalEntitlementFragment\n }\n subscriptions {\n ...SubscriptionFragment\n }\n }\n ","\n ","\n"],["\n fragment CustomerFragment on Customer {\n id\n name\n email\n createdAt\n updatedAt\n refId\n promotionalEntitlements {\n ...PromotionalEntitlementFragment\n }\n subscriptions {\n ...SubscriptionFragment\n }\n }\n ","\n ","\n"])),Nt,Pt);const Ct=function(){function e(e){this.client=e}return e.prototype.getCustomer=function(e){return this.client.query({query:dt(Mt||(Mt=Dt(["\n query GetCustomerByRefId($filter: CustomerFilter) {\n customers(filter: $filter) {\n edges {\n node {\n ...CustomerFragment\n }\n }\n }\n }\n ","\n "],["\n query GetCustomerByRefId($filter: CustomerFilter) {\n customers(filter: $filter) {\n edges {\n node {\n ...CustomerFragment\n }\n }\n }\n }\n ","\n "])),Rt),variables:{filter:{refId:{eq:e}}},fetchPolicy:"network-only"})},e}();var Ft,jt,Lt,Mt;const Ut=function(e){this.paywall=new It(e),this.customers=new Ct(e)};var qt=n(1609),Vt=n.n(qt),Bt=n(2492),Qt=n.n(Bt);function zt(e){var t=e.customerId;if(!t||Vt()(t))throw new Error("You must set customer ID first, use setCustomerId function or pass it via the constructor");return t}var Wt=n(5161),$t=n.n(Wt),Gt=n(9734),Kt=n.n(Gt),Yt=function(){return Yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Yt.apply(this,arguments)},Jt=function(){function e(){}return e.prototype.mapBooleanEntitlement=function(e,t){return{isFallback:!1,hasAccess:t.hasAccess,accessDeniedReason:t.accessDeniedReason,feature:e.calculatedEntitlement.feature?Yt(Yt({},e.calculatedEntitlement.feature),{isMetered:!1}):void 0}},e.prototype.mapNumericEntitlement=function(e,t){var n=e.calculatedEntitlement,r=n.hasUnlimitedUsage,i=n.usageLimit;return{isFallback:!1,hasAccess:t.hasAccess,accessDeniedReason:t.accessDeniedReason,isUnlimited:r,value:i||void 0,feature:e.calculatedEntitlement.feature?Yt(Yt({},e.calculatedEntitlement.feature),{isMetered:!1}):void 0}},e.prototype.mapMeteredEntitlement=function(e,t,n){var r=e.calculatedEntitlement,i=r.hasUnlimitedUsage,o=r.usageLimit,a=r.feature,s=e.featureUsage,u=s.currentUsage,c=s.nextResetDate,l=s.resetPeriod,f=null;return a&&a.featureType===H.Numeric&&a.meterType===A.Incremental&&l&&(f={nextResetDate:c,resetPeriod:l}),{isFallback:!1,hasAccess:t.hasAccess,accessDeniedReason:t.accessDeniedReason,isUnlimited:i,usageLimit:o||void 0,currentUsage:u,requestedUsage:n||0,resetSettings:f||void 0,feature:e.calculatedEntitlement.feature?Yt(Yt({},e.calculatedEntitlement.feature),{meterType:e.calculatedEntitlement.feature.meterType||void 0,isMetered:!0}):void 0}},e.prototype.mapEntitlement=function(e,t,n){var r=e.calculatedEntitlement;if(!r.feature)return this.mapBooleanEntitlement(e,t);var i=r.feature,o=i.featureType,a=i.meterType,s=o===H.Numeric&&(a===A.Incremental||a===A.Fluctuating);switch(o){case H.Boolean:return this.mapBooleanEntitlement(e,t);case H.Numeric:return s?this.mapMeteredEntitlement(e,t,n):this.mapNumericEntitlement(e,t)}},e.prototype.mapFeatureType=function(e){switch(e){case w.Boolean:return H.Boolean;case w.Number:return H.Numeric}},e.prototype.mapEntitlementResetPeriod=function(e){switch(e){case y.Day:return Z.Daily;case y.Hour:return Z.Hourly;case y.Week:return Z.Weekly;case y.Month:return Z.Monthly}},e.prototype.mapCachedEntitlement=function(e,t,n){var r;return e.feature&&(r={id:e.feature.refId,featureType:this.mapFeatureType(e.feature.featureType),meterType:e.feature.meterType||void 0,units:e.feature.featureUnits||void 0,unitsPlural:e.feature.featureUnitsPlural||void 0,displayName:e.feature.displayName,description:e.feature.description||""}),{calculatedEntitlement:{usageLimit:e.usageLimit,hasUnlimitedUsage:e.hasUnlimitedUsage,feature:r},featureUsage:{resetPeriod:e.resetPeriod?this.mapEntitlementResetPeriod(e.resetPeriod):void 0,resetPeriodConfiguration:e.resetPeriodConfiguration,currentUsage:t||e.currentUsage||0,nextResetDate:n||e.nextResetDate}}},e.prototype.mapCachedEntitlements=function(e){var t=this;return new Map(e.map((function(e){var n;return[(null===(n=e.feature)||void 0===n?void 0:n.refId)||"",t.mapCachedEntitlement(e)]})))},e.prototype.mapPlans=function(e){var t=this,n=e.plans.edges.map((function(e){return e.node}));return this.sortPlans(n).map((function(e,n){return t.mapPlan(e,n)}))},e.prototype.mapCustomer=function(e){var t=this;return new ie({id:e.refId,name:e.name||void 0,email:e.email||void 0,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt),subscriptions:$t()(e.subscriptions,(function(e){return t.mapSubscription(e)})),promotionalEntitlements:$t()(e.promotionalEntitlements,(function(e){return t.mapPromotionalEntitlement(e)}))})},e.prototype.mapPrice=function(e){var t=e.feature,n=e.price,r={pricingModel:e.billingModel,billingPeriod:e.billingPeriod,amount:n.amount,currency:n.currency};return t&&(r.feature={displayName:t.displayName,units:t.featureUnits,unitsPlural:t.featureUnitsPlural}),r},e.prototype.mapPlan=function(e,t){var n,r,i=this;return void 0===t&&(t=0),{id:e.refId,order:t,displayName:e.displayName,description:e.description,basePlan:e.basePlan?{id:e.basePlan.refId,displayName:e.basePlan.displayName}:void 0,entitlements:$t()(Kt()(e.entitlements,(function(e){return e.feature.refId})),(function(e){return i.mapPackageEntitlement(e)})),inheritedEntitlements:$t()(Kt()(e.inheritedEntitlements,(function(e){return e.feature.refId})),(function(e){return i.mapPackageEntitlement(e)})),pricePoints:$t()(e.prices,(function(e){return i.mapPrice(e)})),defaultTrialConfig:e.defaultTrialConfig,compatibleAddons:null!==(r=null===(n=e.compatibleAddons)||void 0===n?void 0:n.map((function(e){return i.mapAddon(e)})))&&void 0!==r?r:[],product:{id:e.product.refId,displayName:e.product.displayName}}},e.prototype.mapPackageEntitlement=function(e){var t=e.feature;return{usageLimit:e.usageLimit||0,feature:{id:t.refId,featureType:this.mapFeatureType(t.featureType),description:t.description||"",meterType:t.meterType||void 0,units:t.featureUnits||void 0,unitsPlural:t.featureUnitsPlural||void 0,displayName:t.displayName,isMetered:t.meterType===A.Fluctuating||t.meterType===A.Incremental},hasUnlimitedUsage:e.hasUnlimitedUsage,resetPeriod:e.resetPeriod?this.mapEntitlementResetPeriod(e.resetPeriod):void 0}},e.prototype.mapPromotionalEntitlement=function(e){var t=e.feature;return{status:e.status,usageLimit:e.usageLimit||0,feature:{id:t.refId,displayName:t.displayName,description:t.description||"",featureType:this.mapFeatureType(t.featureType),meterType:t.meterType||void 0,units:t.featureUnits||void 0,unitsPlural:t.featureUnitsPlural||void 0,isMetered:t.meterType===A.Fluctuating||t.meterType===A.Incremental},hasUnlimitedUsage:e.hasUnlimitedUsage,expiresAt:e.endDate,hasExpirationDate:!!e.endDate,isVisible:e.isVisible}},e.prototype.mapSubscription=function(e){var t,n=this,r=(e.prices||[])[0];return{id:e.refId,status:e.status,plan:this.mapPlan(e.plan),price:r?this.mapPrice(r.price):null,addons:(null===(t=e.addons)||void 0===t?void 0:t.map((function(e){var t=e.quantity,r=e.addon;return{quantity:t,addon:n.mapAddon(r)}})))||[],startDate:new Date(e.startDate),endDate:e.endDate&&new Date(e.endDate)}},e.prototype.mapAddon=function(e){var t=this;return{id:e.refId,displayName:e.displayName,description:e.description||"",entitlements:$t()(e.entitlements,(function(e){return t.mapPackageEntitlement(e)}))}},e.prototype.sortPlans=function(e){var t=Kt()(e.filter((function(e){return!e.basePlan})),(function(e){return e.refId})),n=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],t,!0);function r(e,t,n){var i=Kt()(t.filter((function(t){var n;return(null===(n=t.basePlan)||void 0===n?void 0:n.refId)===e})),(function(e){return e.refId}));n.push.apply(n,i),n.length!==t.length&&i.forEach((function(e){return r(e.refId,t,n)}))}return t.forEach((function(t){return r(t.refId,e,n)})),n},e}(),Ht="Invariant Violation",Xt=Object.setPrototypeOf,Zt=void 0===Xt?function(e,t){return e.__proto__=t,e}:Xt,en=function(e){function t(n){void 0===n&&(n=Ht);var r=e.call(this,"number"==typeof n?Ht+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=Ht,Zt(r,t.prototype),r}return ae(t,e),t}(Error);function tn(e,t){if(!e)throw new en(t)}var nn=["debug","log","warn","error","silent"],rn=nn.indexOf("log");function on(e){return function(){if(nn.indexOf(e)>=rn){var t=console[e]||console.log;return t.apply(console,arguments)}}}function an(e){try{return e()}catch(e){}}!function(e){e.debug=on("debug"),e.log=on("log"),e.warn=on("warn"),e.error=on("error")}(tn||(tn={}));const sn=an((function(){return globalThis}))||an((function(){return window}))||an((function(){return self}))||an((function(){return n.g}))||an((function(){return Function("return this")()}));var un="__",cn=[un,un].join("DEV");const ln=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(sn,cn,{value:"production"!==an((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),sn[cn]}}();function fn(e){try{return e()}catch(e){}}var pn=fn((function(){return globalThis}))||fn((function(){return window}))||fn((function(){return self}))||fn((function(){return n.g}))||fn((function(){return Function("return this")()})),hn=!1;function dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yn(e,t,n){return t&&vn(e.prototype,t),n&&vn(e,n),e}!pn||fn((function(){return"production"}))||fn((function(){return process}))||(Object.defineProperty(pn,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),hn=!0),hn&&(delete pn.process,hn=!1),__DEV__?tn("boolean"==typeof ln,ln):tn("boolean"==typeof ln,38);var mn=function(){return"function"==typeof Symbol},gn=function(e){return mn()&&Boolean(Symbol[e])},bn=function(e){return gn(e)?Symbol[e]:"@@"+e};mn()&&!gn("observable")&&(Symbol.observable=Symbol("observable"));var _n=bn("iterator"),En=bn("observable"),wn=bn("species");function On(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function xn(e){var t=e.constructor;return void 0!==t&&null===(t=t[wn])&&(t=void 0),void 0!==t?t:Cn}function In(e){return e instanceof Cn}function Tn(e){Tn.log?Tn.log(e):setTimeout((function(){throw e}))}function Sn(e){Promise.resolve().then((function(){try{e()}catch(e){Tn(e)}}))}function An(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=On(t,"unsubscribe");n&&n.call(t)}}catch(e){Tn(e)}}function kn(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function Dn(e,t,n){e._state="running";var r=e._observer;try{var i=On(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(kn(e),!i)throw n;i.call(r,n);break;case"complete":kn(e),i&&i.call(r)}}catch(e){Tn(e)}"closed"===e._state?An(e):"running"===e._state&&(e._state="ready")}function Nn(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void Sn((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(Dn(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)}))):void Dn(e,t,n);e._queue.push({type:t,value:n})}}var Pn=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new Rn(this);try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(kn(this),An(this))},yn(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),Rn=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){Nn(this._subscription,"next",e)},t.error=function(e){Nn(this._subscription,"error",e)},t.complete=function(){Nn(this._subscription,"complete")},yn(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Cn=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new Pn(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(n,r){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),n()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(xn(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(xn(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=xn(this),r=arguments.length>1,i=!1,o=arguments[1],a=o;return new n((function(n){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||r)try{a=e(a,t)}catch(e){return n.error(e)}else a=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(a),n.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=xn(this);return new i((function(t){var r,o=0;return function e(a){r=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===n.length?(r=void 0,t.complete()):e(i.from(n[o++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=xn(this);return new n((function(r){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var o=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){r.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[En]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=On(t,En);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return In(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(gn("iterator")&&(r=On(t,_n)))return new n((function(e){Sn((function(){if(!e.closed){for(var n,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return dn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.call(t));!(n=i()).done;){var o=n.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){Sn((function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i="function"==typeof this?this:e;return new i((function(e){Sn((function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}}))}))},yn(e,null,[{key:wn,get:function(){return this}}]),e}();function Fn(e){return null!==e&&"object"==typeof e}function jn(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new en("Found a "+e.operation+" operation"+(e.name?" named '"+e.name.value+"'":"")+". No operations are allowed when using a fragment as a query. Only fragments are allowed."):new en(43);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&(__DEV__?tn(1===r.length,"Found "+r.length+" fragments. `fragmentName` must be provided when there is not exactly 1 fragment."):tn(1===r.length,44),n=r[0].name.value),se(se({},e),{definitions:fe([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)})}function Ln(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function Mn(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=t&&t[e.name.value];return __DEV__?tn(n,"No fragment named "+e.name.value+"."):tn(n,45),n;default:return null}}function Un(e){return{__ref:String(e)}}function qn(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function Vn(e,t,n,r){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var i={};n.fields.map((function(e){return Vn(i,e.name,e.value,r)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(n)){var o=(r||{})[n.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return Vn(n,t,e,r),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw __DEV__?new en('The inline argument "'+t.value+'" of kind "'+n.kind+'"is not supported. Use variables instead of inline arguments to overcome this limitation.'):new en(54);e[t.value]=null}}mn()&&Object.defineProperty(Cn,Symbol("extensions"),{value:{symbol:En,hostReportError:Tn},configurable:!0});var Bn=["connection","include","skip","client","rest","export"],Qn=Object.assign((function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach((function(e){i[e]=t[e]})),n.connection.key+"("+zn(i)+")"}return n.connection.key}var o=e;if(t){var a=zn(t);o+="("+a+")"}return n&&Object.keys(n).forEach((function(e){-1===Bn.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?o+="@"+e+"("+zn(n[e])+")":o+="@"+e)})),o}),{setStringify:function(e){var t=zn;return zn=e,t}}),zn=function(e){return JSON.stringify(e,Wn)};function Wn(e,t){return Fn(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{})),t}function $n(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return Vn(n,r,i,t)})),n}return null}function Gn(e){return e.alias?e.alias.value:e.name.value}function Kn(e,t,n){if("string"==typeof e.__typename)return e.__typename;for(var r=0,i=t.selections;r<i.length;r++){var o=i[r];if(Yn(o)){if("__typename"===o.name.value)return e[Gn(o)]}else{var a=Kn(e,Mn(o,n).selectionSet,n);if("string"==typeof a)return a}}}function Yn(e){return"Field"===e.kind}function Jn(e){return"InlineFragment"===e.kind}function Hn(e){__DEV__?tn(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):tn(e&&"Document"===e.kind,46);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new en('Schema type definitions not allowed in queries. Found: "'+e.kind+'"'):new en(47);return e}));return __DEV__?tn(t.length<=1,"Ambiguous GraphQL document: contains "+t.length+" operations"):tn(t.length<=1,48),e}function Xn(e){return Hn(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function Zn(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function er(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function tr(e){var t=Xn(e);return __DEV__?tn(t&&"query"===t.operation,"Must contain a query definition."):tn(t&&"query"===t.operation,49),t}function nr(e){var t;Hn(e);for(var n=0,r=e.definitions;n<r.length;n++){var i=r[n];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new en("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new en(53)}function rr(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach((function(e){e.defaultValue&&Vn(t,e.variable.name,e.defaultValue)})),t}function ir(e,t){return t?t(e):Cn.of()}function or(e){return"function"==typeof e?new ur(e):e}function ar(e){return e.request.length<=1}var sr=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return ae(t,e),t}(Error),ur=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return Cn.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(or).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var i=or(n),o=or(r||new e(ir));return ar(i)&&ar(o)?new e((function(e){return t(e)?i.request(e)||Cn.of():o.request(e)||Cn.of()})):new e((function(e,n){return t(e)?i.request(e,n)||Cn.of():o.request(e,n)||Cn.of()}))},e.execute=function(e,t){return e.request(function(e,t){var n=se({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n=se(se({},n),"function"==typeof e?e(n):e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return se({},n)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?Zn(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(t.indexOf(i)<0)throw __DEV__?new en("illegal argument: "+i):new en(26)}return e}(t))))||Cn.of()},e.concat=function(t,n){var r=or(t);if(ar(r))return __DEV__&&tn.warn(new sr("You are calling concat on a terminating link, which will have no effect",r)),r;var i=or(n);return ar(i)?new e((function(e){return r.request(e,(function(e){return i.request(e)||Cn.of()}))||Cn.of()})):new e((function(e,t){return r.request(e,(function(e){return i.request(e,t)||Cn.of()}))||Cn.of()}))},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(ir)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new en("request is not implemented"):new en(21)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}();const cr=Object.freeze({});function lr(e,t,n=xe){const r=new Map;for(const e of Object.values(_e))r.set(e,fr(t,e));let i,o,a,s,u=Array.isArray(e),c=[e],l=-1,f=[];const p=[],h=[];let d=e;do{l++;const e=l===c.length,g=e&&0!==f.length;if(e){if(a=0===h.length?void 0:p[p.length-1],o=s,s=h.pop(),g)if(u){o=o.slice();let e=0;for(const[t,n]of f){const r=t-e;null===n?(o.splice(r,1),e++):o[r]=n}}else{o=Object.defineProperties({},Object.getOwnPropertyDescriptors(o));for(const[e,t]of f)o[e]=t}l=i.index,c=i.keys,f=i.edits,u=i.inArray,i=i.prev}else{if(a=s?u?l:c[l]:void 0,o=s?s[a]:d,null==o)continue;s&&p.push(a)}let b;if(!Array.isArray(o)){var v,y;Te(o)||Pe(!1,`Invalid AST Node: ${De(o)}.`);const n=e?null===(v=r.get(o.kind))||void 0===v?void 0:v.leave:null===(y=r.get(o.kind))||void 0===y?void 0:y.enter;if(b=null==n?void 0:n.call(t,o,a,s,p,h),b===cr)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(f.push([a,b]),!e)){if(!Te(b)){p.pop();continue}o=b}}var m;void 0===b&&g&&f.push([a,o]),e?p.pop():(i={inArray:u,index:l,keys:c,edits:f,prev:i},u=Array.isArray(o),c=u?o:null!==(m=n[o.kind])&&void 0!==m?m:[],l=-1,f=[],s&&h.push(s),s=o)}while(void 0!==i);return 0!==f.length&&(d=f[f.length-1][1]),d}function fr(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}var pr=function(e,t){var n;try{n=JSON.stringify(e)}catch(e){var r=__DEV__?new en("Network request failed. "+t+" is not serializable: "+e.message):new en(23);throw r.parseError=e,r}return n},hr=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},dr=Object.prototype.hasOwnProperty;const vr=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function yr(e){return mr[e.charCodeAt(0)]}const mr=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function gr(e){return lr(e,br)}const br={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>_r(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=wr("(",_r(e.variableDefinitions,", "),")"),n=_r([e.operation,_r([e.name,t]),_r(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+wr(" = ",n)+wr(" ",_r(r," "))},SelectionSet:{leave:({selections:e})=>Er(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=wr("",e,": ")+t;let a=o+wr("(",_r(n,", "),")");return a.length>80&&(a=o+wr("(\n",Or(_r(n,"\n")),"\n)")),_r([a,_r(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+wr(" ",_r(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>_r(["...",wr("on ",e),_r(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${wr("(",_r(n,", "),")")} on ${t} ${wr("",_r(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t=!1){const n=!e.includes("\n"),r=e.startsWith(" ")||e.startsWith("\t"),i=e.endsWith('"'),o=e.endsWith("\\"),a=!n||i||o||t;let s="";return!a||n&&r||(s+="\n"),s+=e,a&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}(e):`"${e.replace(vr,yr)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+_r(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+_r(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+wr("(",_r(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>wr("",e,"\n")+_r(["schema",_r(t," "),Er(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>wr("",e,"\n")+_r(["scalar",t,_r(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>wr("",e,"\n")+_r(["type",t,wr("implements ",_r(n," & ")),_r(r," "),Er(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>wr("",e,"\n")+t+(xr(n)?wr("(\n",Or(_r(n,"\n")),"\n)"):wr("(",_r(n,", "),")"))+": "+r+wr(" ",_r(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>wr("",e,"\n")+_r([t+": "+n,wr("= ",r),_r(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>wr("",e,"\n")+_r(["interface",t,wr("implements ",_r(n," & ")),_r(r," "),Er(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>wr("",e,"\n")+_r(["union",t,_r(n," "),wr("= ",_r(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>wr("",e,"\n")+_r(["enum",t,_r(n," "),Er(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>wr("",e,"\n")+_r([t,_r(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>wr("",e,"\n")+_r(["input",t,_r(n," "),Er(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>wr("",e,"\n")+"directive @"+t+(xr(n)?wr("(\n",Or(_r(n,"\n")),"\n)"):wr("(",_r(n,", "),")"))+(r?" repeatable":"")+" on "+_r(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>_r(["extend schema",_r(e," "),Er(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>_r(["extend scalar",e,_r(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>_r(["extend type",e,wr("implements ",_r(t," & ")),_r(n," "),Er(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>_r(["extend interface",e,wr("implements ",_r(t," & ")),_r(n," "),Er(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>_r(["extend union",e,_r(t," "),wr("= ",_r(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>_r(["extend enum",e,_r(t," "),Er(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>_r(["extend input",e,_r(t," "),Er(n)]," ")}};function _r(e,t=""){var n;return null!==(n=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==n?n:""}function Er(e){return wr("{\n",Or(_r(e,"\n")),"\n}")}function wr(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function Or(e){return wr(" ",e.replace(/\n/g,"\n "))}function xr(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var Ir={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}};function Tr(e){if(e){var t=Object.create(null);return Object.keys(Object(e)).forEach((function(n){t[n.toLowerCase()]=e[n]})),t}return e}function Sr(e){return new Cn((function(t){t.error(e)}))}var Ar=an((function(){return fetch})),kr=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,function(e){void 0===e&&(e={});var t=e.uri,n=void 0===t?"/graphql":t,r=e.fetch,i=e.includeExtensions,o=e.useGETForQueries,a=e.includeUnusedVariables,s=void 0!==a&&a,u=ue(e,["uri","fetch","includeExtensions","useGETForQueries","includeUnusedVariables"]);__DEV__&&function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new en("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new en(22)}(r||Ar);var c={http:{includeExtensions:i},options:u.fetchOptions,credentials:u.credentials,headers:u.headers};return new ur((function(e){var t=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")}(e,n),i=e.getContext(),a={};if(i.clientAwareness){var u=i.clientAwareness,l=u.name,f=u.version;l&&(a["apollographql-client-name"]=l),f&&(a["apollographql-client-version"]=f)}var p,h=se(se({},a),i.headers),d={http:i.http,options:i.fetchOptions,credentials:i.credentials,headers:h},v=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=se(se({},t.options),{headers:t.headers,credentials:t.credentials}),o=t.http||{};n.forEach((function(e){i=se(se(se({},i),e.options),{headers:se(se({},i.headers),Tr(e.headers))}),e.credentials&&(i.credentials=e.credentials),o=se(se({},o),e.http)}));var a=e.operationName,s=e.extensions,u=e.variables,c=e.query,l={operationName:a,variables:u};return o.includeExtensions&&(l.extensions=s),o.includeQuery&&(l.query=gr(c)),{options:i,body:l}}(e,Ir,c,d),y=v.options,m=v.body;if(m.variables&&!s){var g=new Set(Object.keys(m.variables));lr(e.query,{Variable:function(e,t,n){n&&"VariableDefinition"!==n.kind&&g.delete(e.name.value)}}),g.size&&(m.variables=se({},m.variables),g.forEach((function(e){delete m.variables[e]})))}if(!y.signal){var b=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}}(),_=b.controller,E=b.signal;(p=_)&&(y.signal=E)}if(o&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(y.method="GET"),"GET"===y.method){var w=function(e,t){var n=[],r=function(e,t){n.push(e+"="+encodeURIComponent(t))};if("query"in t&&r("query",t.query),t.operationName&&r("operationName",t.operationName),t.variables){var i=void 0;try{i=pr(t.variables,"Variables map")}catch(e){return{parseError:e}}r("variables",i)}if(t.extensions){var o=void 0;try{o=pr(t.extensions,"Extensions map")}catch(e){return{parseError:e}}r("extensions",o)}var a="",s=e,u=e.indexOf("#");-1!==u&&(a=e.substr(u),s=e.substr(0,u));var c=-1===s.indexOf("?")?"?":"&";return{newURI:s+c+n.join("&")+a}}(t,m),O=w.newURI,x=w.parseError;if(x)return Sr(x);t=O}else try{y.body=pr(m,"Payload")}catch(x){return Sr(x)}return new Cn((function(n){var i;return(r||an((function(){return fetch}))||Ar)(t,y).then((function(t){return e.setContext({response:t}),t})).then((i=e,function(e){return e.text().then((function(t){try{return JSON.parse(t)}catch(r){var n=r;throw n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,n}})).then((function(t){return e.status>=300&&hr(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||dr.call(t,"data")||dr.call(t,"errors")||hr(e,t,"Server response was missing for query '"+(Array.isArray(i)?i.map((function(e){return e.operationName})):i.operationName)+"'."),t}))})).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){p&&p.abort()}}))}))}(t).request)||this;return n.options=t,n}return ae(t,e),t}(ur),Dr=ur.execute;function Nr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var r=e[t];void 0!==r&&(n[t]=r)}))})),n}var Pr=Object.prototype,Rr=Pr.toString,Cr=Pr.hasOwnProperty,Fr=Function.prototype.toString,jr=new Map;function Lr(e,t){try{return Mr(e,t)}finally{jr.clear()}}function Mr(e,t){if(e===t)return!0;var n,r,i,o=Rr.call(e);if(o!==Rr.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Br(e,t))return!0;var a=Ur(e),s=Ur(t),u=a.length;if(u!==s.length)return!1;for(var c=0;c<u;++c)if(!Cr.call(t,a[c]))return!1;for(c=0;c<u;++c){var l=a[c];if(!Mr(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==""+t;case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(Br(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var h=f.next();if(h.done)break;var d=h.value,v=d[0],y=d[1];if(!t.has(v))return!1;if(p&&!Mr(y,t.get(v)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var g=Fr.call(e);return g===Fr.call(t)&&(r=Vr,!((i=(n=g).length-r.length)>=0&&n.indexOf(r,i)===i))}return!1}function Ur(e){return Object.keys(e).filter(qr,e)}function qr(e){return void 0!==this[e]}var Vr="{ [native code] }";function Br(e,t){var n=jr.get(e);if(n){if(n.has(t))return!0}else jr.set(e,n=new Set);return n.add(t),!1}var Qr,zr,Wr=function(){return Object.create(null)},$r=Array.prototype,Gr=$r.forEach,Kr=$r.slice,Yr=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=Wr),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return Gr.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(Kr.call(e)))},e.prototype.getChildTrie=function(t){var n=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),r=n.get(t);return r||n.set(t,r=new e(this.weakness,this.makeData)),r},e}(),Jr="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),Hr="function"==typeof WeakSet,Xr="function"==typeof Symbol&&"function"==typeof Symbol.for,Zr=function(){function e(){this.known=new(Hr?WeakSet:Set),this.pool=new Yr(Jr),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return Fn(e)&&this.known.has(e)},e.prototype.pass=function(e){if(Fn(e)){var t=function(e){return Fn(e)?Array.isArray(e)?e.slice(0):se({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(Fn(e)){var n=this.passes.get(e);if(n)return n;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var r=e.map(this.admit,this);return(s=this.pool.lookupArray(r)).array||(this.known.add(s.array=r),__DEV__&&Object.freeze(r)),s.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],a=this.sortedKeys(e);o.push(a.json);var s,u=o.length;if(a.sorted.forEach((function(n){o.push(t.admit(e[n]))})),!(s=this.pool.lookupArray(o)).object){var c=s.object=Object.create(i);this.known.add(c),a.sorted.forEach((function(e,t){c[e]=o[u+t]})),__DEV__&&Object.freeze(c)}return s.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}(),ei=Object.assign((function(e){if(Fn(e)){void 0===Qr&&ti();var t=Qr.admit(e),n=zr.get(t);return void 0===n&&zr.set(t,n=JSON.stringify(t)),n}return JSON.stringify(e)}),{reset:ti});function ti(){Qr=new Zr,zr=new(Jr?WeakMap:Map)}function ni(e,t,n){return new Cn((function(r){var i=r.next,o=r.error,a=r.complete,s=0,u=!1,c={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++s;var n=function(){return e(t)};c=c.then(n,n).then((function(e){--s,i&&i.call(r,e),u&&f.complete()}),(function(e){throw--s,e})).catch((function(e){o&&o.call(r,e)}))}:function(e){return t&&t.call(r,e)}}var f={next:l(t,i),error:l(n,o),complete:function(){u=!0,s||a&&a.call(r)}},p=e.subscribe(f);return function(){return p.unsubscribe()}}))}function ri(e){return e.errors&&e.errors.length>0||!1}function ii(e,t,n){var r=0;return e.forEach((function(n,i){t.call(this,n,i,e)&&(e[r++]=n)}),n),e.length=r,e}var oi={kind:"Field",name:{kind:"Name",value:"__typename"}};function ai(e,t){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&ai(t[e.name.value],t)}))}function si(e){return ai(Xn(e)||function(e){__DEV__?tn("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):tn("Document"===e.kind,50),__DEV__?tn(e.definitions.length<=1,"Fragment must have exactly one definition."):tn(e.definitions.length<=1,51);var t=e.definitions[0];return __DEV__?tn("FragmentDefinition"===t.kind,"Must be a fragment definition."):tn("FragmentDefinition"===t.kind,52),t}(e),Ln(er(e)))?null:e}function ui(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function ci(e,t){var n=Object.create(null),r=[],i=Object.create(null),o=[],a=si(lr(t,{Variable:{enter:function(e,t,r){"VariableDefinition"!==r.kind&&(n[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&e.some((function(e){return e.remove}))&&t.directives&&t.directives.some(ui(e)))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&r.push({name:e.value.name.value})})),t.selectionSet&&pi(t.selectionSet).forEach((function(e){o.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){i[e.name.value]=!0}},Directive:{enter:function(t){if(ui(e)(t))return null}}}));return a&&ii(r,(function(e){return!!e.name&&!n[e.name]})).length&&(a=function(e,t){var n=function(e){return function(t){return e.some((function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))}))}}(e);return si(lr(t,{OperationDefinition:{enter:function(t){return se(se({},t),{variableDefinitions:t.variableDefinitions?t.variableDefinitions.filter((function(t){return!e.some((function(e){return e.name===t.variable.name.value}))})):[]})}},Field:{enter:function(t){if(e.some((function(e){return e.remove}))){var r=0;if(t.arguments&&t.arguments.forEach((function(e){n(e)&&(r+=1)})),1===r)return null}}},Argument:{enter:function(e){if(n(e))return null}}}))}(r,a)),a&&ii(o,(function(e){return!!e.name&&!i[e.name]})).length&&(a=function(e,t){function n(t){if(e.some((function(e){return e.name===t.name.value})))return null}return si(lr(t,{FragmentSpread:{enter:n},FragmentDefinition:{enter:n}}))}(o,a)),a}var li=Object.assign((function(e){return lr(Hn(e),{SelectionSet:{enter:function(e,t,n){if(!n||"OperationDefinition"!==n.kind){var r=e.selections;if(r&&!r.some((function(e){return Yn(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=n;if(!(Yn(i)&&i.directives&&i.directives.some((function(e){return"export"===e.name.value}))))return se(se({},e),{selections:fe(fe([],r,!0),[oi],!1)})}}}}})}),{added:function(e){return e===oi}}),fi={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&tn.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function pi(e){var t=[];return e.selections.forEach((function(e){(Yn(e)||Jn(e))&&e.selectionSet?pi(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function hi(e){return"query"===nr(e).operation?e:lr(e,{OperationDefinition:{enter:function(e){return se(se({},e),{operation:"query"})}}})}function di(e,t){var n=e.directives;return!n||!n.length||function(e){var t=[];return e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var n=e.arguments,r=e.name.value;__DEV__?tn(n&&1===n.length,"Incorrect number of arguments for the @"+r+" directive."):tn(n&&1===n.length,40);var i=n[0];__DEV__?tn(i.name&&"if"===i.name.value,"Invalid argument for the @"+r+" directive."):tn(i.name&&"if"===i.name.value,41);var o=i.value;__DEV__?tn(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @"+r+" directive must be a variable or a boolean value."):tn(o&&("Variable"===o.kind||"BooleanValue"===o.kind),42),t.push({directive:e,ifArgument:i})}})),t}(n).every((function(e){var n=e.directive,r=e.ifArgument,i=!1;return"Variable"===r.value.kind?(i=t&&t[r.value.name.value],__DEV__?tn(void 0!==i,"Invalid variable referenced in @"+n.name.value+" directive."):tn(void 0!==i,39)):i=r.value.value,"skip"===n.name.value?!i:i}))}function vi(e,t){return function(e){var t=[];return lr(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function yi(e){return e&&vi(["client"],e)&&vi(["export"],e)}var mi=new Map;function gi(e){var t=mi.get(e)||1;return mi.set(e,t+1),e+":"+t+":"+Math.random().toString(36).slice(2)}function bi(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function _i(e){function t(t){Object.defineProperty(e,t,{value:Cn})}return Xr&&Symbol.species&&t(Symbol.species),t("@@species"),e}function Ei(e){return e&&"function"==typeof e.then}var wi=function(e){function t(t){var n=e.call(this,(function(e){return n.addObserver(e),function(){return n.removeObserver(e)}}))||this;return n.observers=new Set,n.addCount=0,n.promise=new Promise((function(e,t){n.resolve=e,n.reject=t})),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],bi(n.observers,"next",e))},error:function(e){var t=n.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),n.sub=null,n.latest=["error",e],n.reject(e),bi(n.observers,"error",e))},complete:function(){if(null!==n.sub){var e=n.sources.shift();e?Ei(e)?e.then((function(e){return n.sub=e.subscribe(n.handlers)})):n.sub=e.subscribe(n.handlers):(n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),bi(n.observers,"complete"))}}},n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.complete()},n.promise.catch((function(e){})),"function"==typeof t&&(t=[new Cn(t)]),Ei(t)?t.then((function(e){return n.start(e)}),n.handlers.error):n.start(t),n}return ae(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],n=e[t];n&&n.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e),++this.addCount)},t.prototype.removeObserver=function(e,t){this.observers.delete(e)&&--this.addCount<1&&!t&&this.handlers.error(new Error("Observable cancelled prematurely"))},t.prototype.cleanup=function(e){var t=this,n=!1,r=function(){n||(n=!0,t.observers.delete(i),e())},i={next:r,error:r,complete:r},o=this.addCount;this.addObserver(i),this.addCount=o},t}(Cn);function Oi(e){return Array.isArray(e)&&e.length>0}_i(wi);var xi,Ii=function(e){function t(n){var r,i,o=n.graphQLErrors,a=n.clientErrors,s=n.networkError,u=n.errorMessage,c=n.extraInfo,l=e.call(this,u)||this;return l.graphQLErrors=o||[],l.clientErrors=a||[],l.networkError=s||null,l.message=u||(i="",(Oi((r=l).graphQLErrors)||Oi(r.clientErrors))&&(r.graphQLErrors||[]).concat(r.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+=t+"\n"})),r.networkError&&(i+=r.networkError.message+"\n"),i=i.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return ae(t,e),t}(Error);function Ti(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(xi||(xi={}));var Si=Object.prototype.toString;function Ai(e){return ki(e)}function ki(e,t){switch(Si.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach((function(e,r){n[r]=ki(e,t)})),n;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach((function(n){r[n]=ki(e[n],t)})),r;default:return e}}var Di=Object.assign,Ni=Object.hasOwnProperty,Pi=!1,Ri=function(e){function t(t){var n=t.queryManager,r=t.queryInfo,i=t.options,o=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=Ci)}catch(e){}var n=!o.observers.size;o.observers.add(e);var r=o.last;return r&&r.error?e.error&&e.error(r.error):r&&r.result&&e.next&&e.next(r.result),n&&o.reobserve().catch((function(){})),function(){o.observers.delete(e)&&!o.observers.size&&o.tearDownQuery()}}))||this;o.observers=new Set,o.subscriptions=new Set,o.isTornDown=!1,o.options=i,o.queryId=r.queryId||n.generateQueryId();var a=Xn(i.query);return o.queryName=a&&a.name&&a.name.value,o.initialFetchPolicy=i.fetchPolicy||"cache-first",o.queryManager=n,o.queryInfo=r,o}return ae(t,e),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:n},i=e.subscribe(r)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),n=this.queryInfo.networkStatus||t&&t.networkStatus||xi.ready,r=se(se({},t),{loading:Ti(n),networkStatus:n}),i=this.options.fetchPolicy,o=void 0===i?"cache-first":i;if((t||"network-only"!==o&&"no-cache"!==o&&"standby"!==o)&&!this.queryManager.transform(this.options.query).hasForcedResolvers){var a=this.queryInfo.getDiff();(a.complete||this.options.returnPartialData)&&(r.data=a.result),Lr(r.data,{})&&(r.data=void 0),a.complete?(r.networkStatus!==xi.loading||"cache-first"!==o&&"cache-only"!==o||(r.networkStatus=xi.ready,r.loading=!1),delete r.partial):"no-cache"!==o&&(r.partial=!0),!__DEV__||a.complete||this.options.partialRefetch||r.loading||r.data||r.error||Fi(a.missing)}return e&&this.updateLastResult(r),r},t.prototype.isDifferentFromLastResult=function(e){return!this.last||!Lr(this.last.result,e)},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||Lr(n.variables,this.variables)))return n[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,n={pollInterval:0},r=this.options.fetchPolicy;if("no-cache"===r?n.fetchPolicy="no-cache":"cache-and-network"!==r&&(n.fetchPolicy="network-only"),__DEV__&&e&&Ni.call(e,"variables")){var i=tr(this.options.query),o=i.variableDefinitions;o&&o.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&tn.warn("Called refetch("+JSON.stringify(e)+") for query "+((null===(t=i.name)||void 0===t?void 0:t.value)||JSON.stringify(i))+", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?")}return e&&!Lr(this.options.variables,e)&&(n.variables=this.options.variables=se(se({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,xi.refetch)},t.prototype.fetchMore=function(e){var t=this,n=se(se({},e.query?e:se(se(se({},this.options),e),{variables:se(se({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),r=this.queryManager.generateQueryId();return n.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=xi.fetchMore,this.observe()),this.queryManager.fetchQuery(r,n,xi.fetchMore).then((function(r){var i=r.data,o=e.updateQuery;return o?(__DEV__&&!Pi&&(__DEV__&&tn.warn("The updateQuery callback for fetchMore is deprecated, and will be removed\nin the next major version of Apollo Client.\n\nPlease convert updateQuery functions to field policies with appropriate\nread and merge functions, or use/adapt a helper function (such as\nconcatPagination, offsetLimitPagination, or relayStylePagination) from\n@apollo/client/utilities.\n\nThe field policy system handles pagination more effectively than a\nhand-written updateQuery function, and you only need to define the policy\nonce, rather than every time you call fetchMore."),Pi=!0),t.updateQuery((function(e){return o(e,{fetchMoreResult:i,variables:n.variables})}))):t.queryManager.cache.writeQuery({query:n.query,variables:n.variables,data:i}),r})).finally((function(){t.queryManager.stopQuery(r),t.reobserve()}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var i=t.variables;return r(e,{subscriptionData:n,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&tn.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return Lr(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.initialFetchPolicy,variables:e},xi.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(t.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,n=this.options.pollInterval;if(n){if(!t||t.interval!==n){__DEV__?tn(n,"Attempted to start a polling query without a polling interval."):tn(n,12),(t||(this.pollingInfo={})).interval=n;var r=function(){e.pollingInfo&&(Ti(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"network-only"},xi.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(r,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=se(se({},this.last),{result:this.queryManager.assumeImmutableResults?e:Ai(e),variables:t}),Oi(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var n=this;this.isTornDown=!1;var r=t===xi.refetch||t===xi.fetchMore||t===xi.poll,i=this.options.variables,o=r?Nr(this.options,e):Di(this.options,Nr(e));r||(this.updatePolling(),e&&e.variables&&!e.fetchPolicy&&!Lr(e.variables,i)&&(o.fetchPolicy=this.initialFetchPolicy,void 0===t&&(t=xi.setVariables)));var a=o.variables&&se({},o.variables),s=this.fetch(o,t),u={next:function(e){n.reportResult(e,a)},error:function(e){n.reportError(e,a)}};return r||(this.concast&&this.observer&&this.concast.removeObserver(this.observer,!0),this.concast=s,this.observer=u),s.addObserver(u),s.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){(this.getLastError()||this.isDifferentFromLastResult(e))&&(this.updateLastResult(e,t),bi(this.observers,"next",e))},t.prototype.reportError=function(e,t){var n=se(se({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:xi.error,loading:!1});this.updateLastResult(n,t),bi(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Cn);function Ci(e){__DEV__&&tn.error("Unhandled error",e.message,e.stack)}function Fi(e){__DEV__&&Oi(e)&&__DEV__&&tn.debug("Missing cache result fields: "+e.map((function(e){return e.path.join(".")})).join(", "),e)}_i(Ri);var ji=Object.prototype.hasOwnProperty;function Li(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Mi(e)}function Mi(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new qi,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var Ui=function(e,t,n){return this.merge(e[n],t[n])},qi=function(){function e(e){void 0===e&&(e=Ui),this.reconciler=e,this.isObject=Fn,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var n=this,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return Fn(t)&&Fn(e)?(Object.keys(t).forEach((function(i){if(ji.call(e,i)){var o=e[i];if(t[i]!==o){var a=n.reconciler.apply(n,fe([e,t,i],r,!1));a!==o&&((e=n.shallowCopyForMerge(e))[i]=a)}}else(e=n.shallowCopyForMerge(e))[i]=t[i]})),e):t},e.prototype.shallowCopyForMerge=function(e){return Fn(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):se({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)),e},e}(),Vi=null,Bi={},Qi=1,zi="@wry/context:Slot",Wi=Array,$i=Wi[zi]||function(){var e=function(){function e(){this.id=["slot",Qi++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=Vi;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Bi)break;return e!==Vi&&(Vi.slots[this.id]=t),!0}return Vi&&(Vi.slots[this.id]=Bi),!1},e.prototype.getValue=function(){if(this.hasValue())return Vi.slots[this.id]},e.prototype.withValue=function(e,t,n,r){var i,o=((i={__proto__:null})[this.id]=e,i),a=Vi;Vi={parent:a,slots:o};try{return t.apply(r,n)}finally{Vi=a}},e.bind=function(e){var t=Vi;return function(){var n=Vi;try{return Vi=t,e.apply(this,arguments)}finally{Vi=n}}},e.noContext=function(e,t,n){if(!Vi)return e.apply(n,t);var r=Vi;try{return Vi=null,e.apply(n,t)}finally{Vi=r}},e}();try{Object.defineProperty(Wi,zi,{value:Wi[zi]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();function Gi(){}$i.bind,$i.noContext;var Ki,Yi=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=Gi),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,r=t.newer;r&&(r.older=n),n&&(n.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t},e.prototype.set=function(e,t){var n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),Ji=new $i,Hi=Object.prototype.hasOwnProperty,Xi=void 0===(Ki=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:Ki;function Zi(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var eo=[];function to(e,t){if(!e)throw new Error(t||"assertion failure")}function no(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var ro=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!ao(this))return io(this),this.value[0]},e.prototype.recompute=function(e){return to(!this.recomputing,"already recomputing"),io(this),ao(this)?function(e,t){return ho(e),Ji.withValue(e,oo,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{Zi(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,ao(e)||uo(e)}(e),no(e.value)}(this,e):no(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,so(this),Zi(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),ho(this),co(this,(function(t,n){t.setDirty(),vo(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=eo.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(Xi(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),eo.push(this.deps),this.deps=null)},e.count=0,e}();function io(e){var t=Ji.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),ao(e)?lo(t,e):fo(t,e),t}function oo(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function ao(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function so(e){co(e,lo)}function uo(e){co(e,fo)}function co(e,t){var n=e.parents.size;if(n)for(var r=Xi(e.parents),i=0;i<n;++i)t(r[i],e)}function lo(e,t){to(e.childValues.has(t)),to(ao(t));var n=!ao(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=eo.pop()||new Set;e.dirtyChildren.add(t),n&&so(e)}function fo(e,t){to(e.childValues.has(t)),to(!ao(t));var n,r,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(n=o,r=t.value,(i=n.length)>0&&i===r.length&&n[i-1]===r[i-1]||e.setDirty()),po(e,t),ao(e)||uo(e)}function po(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(eo.length<100&&eo.push(n),e.dirtyChildren=null))}function ho(e){e.childValues.size>0&&e.childValues.forEach((function(t,n){vo(e,n)})),e.forgetDeps(),to(null===e.dirtyChildren)}function vo(e,t){t.parents.delete(e),e.childValues.delete(t),po(e,t)}var yo={setDirty:!0,dispose:!0,forget:!0};function mo(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=Ji.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(Zi(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&Hi.call(yo,n)?n:"setDirty";Xi(r).forEach((function(e){return e[i]()})),t.delete(e),Zi(r)}},r}function go(){var e=new Yr("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}go();var bo=new Set;function _o(e,t){void 0===t&&(t=Object.create(null));var n=new Yi(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=t.keyArgs,i=t.makeCacheKey||go(),o=function(){var o=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var a=n.get(o);a||(n.set(o,a=new ro(e)),a.subscribe=t.subscribe,a.forget=function(){return n.delete(o)});var s=a.recompute(Array.prototype.slice.call(arguments));return n.set(o,a),bo.add(n),Ji.hasValue()||(bo.forEach((function(e){return e.clean()})),bo.clear()),s};function a(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function u(e){return n.delete(e)}return Object.defineProperty(o,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))},o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))},o.forgetKey=u,o.forget=function(){return u(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(o)}var Eo=new $i,wo=new WeakMap;function Oo(e){var t=wo.get(e);return t||wo.set(e,t={vars:new Set,dep:mo()}),t}function xo(e){Oo(e).vars.forEach((function(t){return t.forgetCache(e)}))}function Io(e){var t=new Set,n=new Set,r=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){Oo(e).dep.dirty(r),To(e)}));var a=Array.from(n);n.clear(),a.forEach((function(t){return t(e)}))}}else{var s=Eo.getValue();s&&(i(s),Oo(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),Oo(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function To(e){e.broadcastWatches&&e.broadcastWatches()}var So=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Li(t.resolvers,e)})):this.resolvers=Li(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,i=e.variables,o=e.onlyRunForcedResolvers,a=void 0!==o&&o;return ce(this,void 0,void 0,(function(){return le(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,a).then((function(e){return se(se({},n),{data:e.result})}))]:[2,n]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return vi(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){Hn(e);var t=ci([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=lr(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return Yn(e)&&"__typename"===e.name.value})))return null}}})),t}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return se(se({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),ce(this,void 0,void 0,(function(){return le(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return se(se({},t),e.exportedVariables)}))]:[2,se({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return lr(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return cr}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:hi(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,i,o){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===o&&(o=!1),ce(this,void 0,void 0,(function(){var a,s,u,c,l,f,p,h,d;return le(this,(function(v){return a=nr(e),s=er(e),u=Ln(s),c=a.operation,l=c?c.charAt(0).toUpperCase()+c.slice(1):"Query",p=(f=this).cache,h=f.client,d={fragmentMap:u,context:se(se({},n),{cache:p,client:h}),variables:r,fragmentMatcher:i,defaultOperationType:l,exportedVariables:{},onlyRunForcedResolvers:o},[2,this.resolveSelectionSet(a.selectionSet,t,d).then((function(e){return{result:e,exportedVariables:d.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return ce(this,void 0,void 0,(function(){var r,i,o,a,s,u=this;return le(this,(function(c){return r=n.fragmentMap,i=n.context,o=n.variables,a=[t],s=function(e){return ce(u,void 0,void 0,(function(){var s,u;return le(this,(function(c){return di(e,o)?Yn(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&a.push(((n={})[Gn(e)]=t,n))}))]:(Jn(e)?s=e:(s=r[e.name.value],__DEV__?tn(s,"No fragment named "+e.name.value):tn(s,11)),s&&s.typeCondition&&(u=s.typeCondition.name.value,n.fragmentMatcher(t,u,i))?[2,this.resolveSelectionSet(s.selectionSet,t,n).then((function(e){a.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(s)).then((function(){return Mi(a)}))]}))}))},e.prototype.resolveField=function(e,t,n){return ce(this,void 0,void 0,(function(){var r,i,o,a,s,u,c,l,f,p=this;return le(this,(function(h){return r=n.variables,i=e.name.value,o=Gn(e),a=i!==o,s=t[o]||t[i],u=Promise.resolve(s),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(c=t.__typename||n.defaultOperationType,(l=this.resolvers&&this.resolvers[c])&&(f=l[a?i:o])&&(u=Promise.resolve(Eo.withValue(this.cache,f,[t,$n(e,r),n.context,{field:e,fragmentMap:n.fragmentMap}])))),[2,u.then((function(t){return void 0===t&&(t=s),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?p.resolveSubSelectedArray(e,t,n):e.selectionSet?p.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}(),Ao=new(Jr?WeakMap:Map);function ko(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return Ao.set(e,(Ao.get(e)+1)%1e15),n.apply(this,arguments)})}function Do(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var No=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;Ao.has(n)||(Ao.set(n,0),ko(n,"evict"),ko(n,"modify"),ko(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||xi.loading;return this.variables&&this.networkStatus!==xi.loading&&!Lr(this.variables,e.variables)&&(t=xi.setVariables),Lr(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){Do(this),this.lastDiff=void 0,this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&Lr(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&"no-cache"===n.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||Lr(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():e.reobserve()})):delete this.oqListener)},e.prototype.notify=function(){var e=this;Do(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(Ti(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var r=se(se({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&Lr(r,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=r))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===Ao.get(this.cache)&&Lr(t,n.variables)&&Lr(e.data,n.result.data))},e.prototype.markResult=function(e,t,n){var r=this;this.graphQLErrors=Oi(e.errors)?e.errors:[],this.reset(),"no-cache"===t.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(t.variables)):0!==n&&(Po(e,t.errorPolicy)?this.cache.performTransaction((function(i){if(r.shouldWrite(e,t.variables))i.writeQuery({query:r.document,data:e.data,variables:t.variables,overwrite:1===n}),r.lastWrite={result:e,variables:t.variables,dmCount:Ao.get(r.cache)};else if(r.lastDiff&&r.lastDiff.diff.complete)return void(e.data=r.lastDiff.diff.result);var o=r.getDiffOptions(t.variables),a=i.diff(o);r.stopped||r.updateWatch(t.variables),r.updateLastDiff(a,o),a.complete&&(e.data=a.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=xi.ready},e.prototype.markError=function(e){return this.networkStatus=xi.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function Po(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!ri(e);return!r&&n&&e.data&&(r=!0),r}var Ro=Object.prototype.hasOwnProperty,Co=function(){function e(e){var t=e.cache,n=e.link,r=e.queryDeduplication,i=void 0!==r&&r,o=e.onBroadcast,a=e.ssrMode,s=void 0!==a&&a,u=e.clientAwareness,c=void 0===u?{}:u,l=e.localState,f=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Jr?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.queryDeduplication=i,this.clientAwareness=c,this.localState=l||new So({cache:t}),this.ssrMode=s,this.assumeImmutableResults=!!f,(this.onBroadcast=o)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.cancelPendingFetches(__DEV__?new en("QueryManager stopped while query was in flight"):new en(13))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,r=e.optimisticResponse,i=e.updateQueries,o=e.refetchQueries,a=void 0===o?[]:o,s=e.awaitRefetchQueries,u=void 0!==s&&s,c=e.update,l=e.onQueryUpdated,f=e.errorPolicy,p=void 0===f?"none":f,h=e.fetchPolicy,d=void 0===h?"network-only":h,v=e.keepRootFields,y=e.context;return ce(this,void 0,void 0,(function(){var e,o,s;return le(this,(function(f){switch(f.label){case 0:return __DEV__?tn(t,"mutation option is required. You must specify your GraphQL document in the mutation option."):tn(t,14),__DEV__?tn("network-only"===d||"no-cache"===d,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):tn("network-only"===d||"no-cache"===d,15),e=this.generateMutationId(),t=this.transform(t).document,n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,y)]:[3,2];case 1:n=f.sent(),f.label=2;case 2:return o=this.mutationStore&&(this.mutationStore[e]={mutation:t,variables:n,loading:!0,error:null}),r&&this.markMutationOptimistic(r,{mutationId:e,document:t,variables:n,fetchPolicy:d,errorPolicy:p,context:y,updateQueries:i,update:c,keepRootFields:v}),this.broadcastQueries(),s=this,[2,new Promise((function(f,h){return ni(s.getObservableFromLink(t,se(se({},y),{optimisticResponse:r}),n,!1),(function(f){if(ri(f)&&"none"===p)throw new Ii({graphQLErrors:f.errors});o&&(o.loading=!1,o.error=null);var h=se({},f);return"function"==typeof a&&(a=a(h)),"ignore"===p&&ri(h)&&delete h.errors,s.markMutationResult({mutationId:e,result:h,document:t,variables:n,fetchPolicy:d,errorPolicy:p,context:y,update:c,updateQueries:i,awaitRefetchQueries:u,refetchQueries:a,removeOptimistic:r?e:void 0,onQueryUpdated:l,keepRootFields:v})})).subscribe({next:function(e){s.broadcastQueries(),f(e)},error:function(t){o&&(o.loading=!1,o.error=t),r&&s.cache.removeOptimistic(e),s.broadcastQueries(),h(t instanceof Ii?t:new Ii({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var r=e.result,i=[],o="no-cache"===e.fetchPolicy;if(!o&&Po(r,e.errorPolicy)){i.push({result:r.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables});var a=e.updateQueries;a&&this.queries.forEach((function(e,o){var s=e.observableQuery,u=s&&s.queryName;if(u&&Ro.call(a,u)){var c=a[u],l=n.queries.get(o),f=l.document,p=l.variables,h=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),d=h.result;if(h.complete&&d){var v=c(d,{mutationResult:r,queryName:f&&Zn(f)||void 0,queryVariables:p});v&&i.push({result:v,dataId:"ROOT_QUERY",query:f,variables:p})}}}))}if(i.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var s=[];if(this.refetchQueries({updateCache:function(t){o||i.forEach((function(e){return t.write(e)}));var a=e.update;if(a){if(!o){var s=t.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});s.complete&&(r=se(se({},r),{data:s.result}))}a(t,r,{context:e.context,variables:e.variables})}o||e.keepRootFields||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return s.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(s).then((function(){return r}))}return Promise.resolve(r)},e.prototype.markMutationOptimistic=function(e,t){var n=this,r="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{n.markMutationResult(se(se({},t),{result:{data:r}}),e)}catch(e){__DEV__&&tn.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t,n=this.transformCache;if(!n.has(e)){var r=this.cache.transformDocument(e),i=(t=this.cache.transformForLink(r),ci([fi],Hn(t))),o=this.localState.clientQuery(r),a=i&&this.localState.serverQuery(i),s={document:r,hasClientExports:yi(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:a,defaultVars:rr(Xn(r)),asQuery:se(se({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?se(se({},e),{operation:"query"}):e}))})},u=function(e){e&&!n.has(e)&&n.set(e,s)};u(e),u(r),u(o),u(a)}return n.get(e)},e.prototype.getVariables=function(e,t){return se(se({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=se(se({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new No(this),n=new Ri({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:e.query,observableQuery:n,variables:e.variables}),n},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?tn(e.query,"query option is required. You must specify your GraphQL document in the query option."):tn(e.query,16),__DEV__?tn("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):tn("Document"===e.query.kind,17),__DEV__?tn(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):tn(!e.returnPartialData,18),__DEV__?tn(!e.pollInterval,"pollInterval option only supported on watchQuery."):tn(!e.pollInterval,19),this.fetchQuery(t,e).finally((function(){return n.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new en("Store reset while query was in flight (not completed in link chain)"):new en(20)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=xi.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,r=new Map,i=new Set;return Array.isArray(e)&&e.forEach((function(e){var n;"string"==typeof e?r.set(e,!1):Fn(n=e)&&"Document"===n.kind&&Array.isArray(n.definitions)?r.set(t.transform(e).document,!1):Fn(e)&&e.query&&i.add(e)})),this.queries.forEach((function(t,i){var o=t.observableQuery,a=t.document;if(o){if("all"===e)return void n.set(i,o);var s=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||s&&r.has(s)||a&&r.has(a))&&(n.set(i,o),s&&r.set(s,!0),a&&r.set(a,!0))}})),i.size&&i.forEach((function(e){var r=gi("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),o=new Ri({queryManager:t,queryInfo:i,options:se(se({},e),{fetchPolicy:"network-only"})});tn(o.queryId===r),i.setObservableQuery(o),n.set(r,o)})),__DEV__&&r.size&&r.forEach((function(e,t){e||__DEV__&&tn.warn("Unknown query "+("string"==typeof t?"named ":"")+JSON.stringify(t,null,2)+" requested in refetchQueries options.include array")})),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach((function(r,i){var o=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,o=e.variables,a=e.context,s=void 0===a?{}:a;n=this.transform(n).document,o=this.getVariables(n,o);var u=function(e){return t.getObservableFromLink(n,s,e).map((function(o){if("no-cache"!==r&&(Po(o,i)&&t.cache.write({query:n,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),ri(o))throw new Ii({graphQLErrors:o.errors});return o}))};if(this.transform(n).hasClientExports){var c=this.localState.addExportedVariables(n,o,s).then(u);return new Cn((function(e){var t=null;return c.then((function(n){return t=n.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.getQuery(e).stop(),this.queries.delete(e)},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var i,o,a=this;void 0===r&&(r=null!==(i=null==t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var s=this.transform(e).serverQuery;if(s){var u=this.inFlightLinkObservables,c=this.link,l={query:s,variables:n,operationName:Zn(s)||void 0,context:this.prepareContext(se(se({},t),{forceFetch:!r}))};if(t=l.context,r){var f=u.get(s)||new Map;u.set(s,f);var p=ei(n);if(!(o=f.get(p))){var h=new wi([Dr(c,l)]);f.set(p,o=h),h.cleanup((function(){f.delete(p)&&f.size<1&&u.delete(s)}))}}else o=new wi([Dr(c,l)])}else o=new wi([Cn.of({data:{}})]),t=this.prepareContext(t);var d=this.transform(e).clientQuery;return d&&(o=ni(o,(function(e){return a.localState.runResolvers({document:d,remoteResult:e,context:t,variables:n})}))),o},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId();return ni(this.getObservableFromLink(e.document,n.context,n.variables),(function(i){var o=Oi(i.errors);if(r>=e.lastRequestId){if(o&&"none"===n.errorPolicy)throw e.markError(new Ii({graphQLErrors:i.errors}));e.markResult(i,n,t),e.markReady()}var a={data:i.data,loading:!1,networkStatus:e.networkStatus||xi.ready};return o&&"ignore"!==n.errorPolicy&&(a.errors=i.errors),a}),(function(t){var n=t.hasOwnProperty("graphQLErrors")?t:new Ii({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n}))},e.prototype.fetchQueryObservable=function(e,t,n){var r=this;void 0===n&&(n=xi.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),a=this.getQuery(e),s=t.fetchPolicy,u=void 0===s?"cache-first":s,c=t.errorPolicy,l=void 0===c?"none":c,f=t.returnPartialData,p=void 0!==f&&f,h=t.notifyOnNetworkStatusChange,d=void 0!==h&&h,v=t.context,y=void 0===v?{}:v,m=Object.assign({},t,{query:i,variables:o,fetchPolicy:u,errorPolicy:l,returnPartialData:p,notifyOnNetworkStatusChange:d,context:y}),g=function(e){return m.variables=e,r.fetchQueryByPolicy(a,m,n)};this.fetchCancelFns.set(e,(function(e){setTimeout((function(){return b.cancel(e)}))}));var b=new wi(this.transform(m.query).hasClientExports?this.localState.addExportedVariables(m.query,m.variables,m.context).then(g):g(m.variables));return b.cleanup((function(){r.fetchCancelFns.delete(e),function(e){var t=e.fetchPolicy,n=void 0===t?"cache-first":t,r=e.nextFetchPolicy;r&&(e.fetchPolicy="function"==typeof r?r.call(e,n):r)}(t)})),b},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?gi("refetchQueries"):void 0:a,u=e.onQueryUpdated,c=new Map;r&&this.getObservableQueries(r).forEach((function(e,n){c.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})}));var l=new Map;return n&&this.cache.batch({update:n,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof No&&e.watcher.observableQuery;if(r){if(u){c.delete(r.queryId);var i=u(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&l.set(r,i),!1}null!==u&&c.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),c.size&&c.forEach((function(e,n){var r,i=e.oq,o=e.lastDiff,a=e.diff;if(u){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}r=u(i,a,o)}u&&!0!==r||(r=i.refetch()),!1!==r&&l.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)})),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,n){var r=this,i=t.query,o=t.variables,a=t.fetchPolicy,s=t.refetchWritePolicy,u=t.errorPolicy,c=t.returnPartialData,l=t.context,f=t.notifyOnNetworkStatusChange,p=e.networkStatus;e.init({document:i,variables:o,networkStatus:n});var h=function(){return e.getDiff(o)},d=function(t,n){void 0===n&&(n=e.networkStatus||xi.loading);var a=t.result;!__DEV__||c||Lr(a,{})||Fi(t.missing);var s=function(e){return Cn.of(se({data:e,loading:Ti(n),networkStatus:n},t.complete?null:{partial:!0}))};return a&&r.transform(i).hasForcedResolvers?r.localState.runResolvers({document:i,remoteResult:{data:a},context:l,variables:o,onlyRunForcedResolvers:!0}).then((function(e){return s(e.data||void 0)})):s(a)},v="no-cache"===a?0:n===xi.refetch&&"merge"!==s?1:2,y=function(){return r.getResultsFromLink(e,v,{variables:o,context:l,fetchPolicy:a,errorPolicy:u})},m=f&&"number"==typeof p&&p!==n&&Ti(n);switch(a){default:case"cache-first":return(g=h()).complete?[d(g,e.markReady())]:c||m?[d(g),y()]:[y()];case"cache-and-network":var g;return(g=h()).complete||c||m?[d(g),y()]:[y()];case"cache-only":return[d(h(),e.markReady())];case"network-only":return m?[d(h()),y()]:[y()];case"no-cache":return m?[d(e.getDiff()),y()]:[y()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new No(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return se(se({},t),{clientAwareness:this.clientAwareness})},e}(),Fo=!1;function jo(e,t){return Nr(e,t,t.variables&&{variables:se(se({},e.variables),t.variables)})}var Lo=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,i=e.headers,o=e.cache,a=e.ssrMode,s=void 0!==a&&a,u=e.ssrForceFetchDelay,c=void 0===u?0:u,l=e.connectToDevTools,f=void 0===l?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:l,p=e.queryDeduplication,h=void 0===p||p,d=e.defaultOptions,v=e.assumeImmutableResults,y=void 0!==v&&v,m=e.resolvers,g=e.typeDefs,b=e.fragmentMatcher,_=e.name,E=e.version,w=e.link;if(w||(w=n?new kr({uri:n,credentials:r,headers:i}):ur.empty()),!o)throw __DEV__?new en("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new en(9);if(this.link=w,this.cache=o,this.disableNetworkFetches=s||c>0,this.queryDeduplication=h,this.defaultOptions=d||{},this.typeDefs=g,c&&setTimeout((function(){return t.disableNetworkFetches=!1}),c),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),f&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!Fo&&__DEV__&&(Fo=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var O=window.navigator,x=O&&O.userAgent,I=void 0;"string"==typeof x&&(x.indexOf("Chrome/")>-1?I="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":x.indexOf("Firefox/")>-1&&(I="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),I&&__DEV__&&tn.log("Download the Apollo DevTools for a better development experience: "+I)}this.version="3.4.17",this.localState=new So({cache:o,client:this,resolvers:m,fragmentMatcher:b}),this.queryManager=new Co({cache:this.cache,link:this.link,queryDeduplication:h,ssrMode:s,clientAwareness:{name:_,version:E},localState:this.localState,assumeImmutableResults:y,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=jo(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=se(se({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=jo(this.defaultOptions.query,e)),__DEV__?tn("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):tn("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=se(se({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=jo(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return Dr(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach((function(e,t){n.push(t),r.push(e)}));var i=Promise.all(r);return i.queries=n,i.results=r,i.catch((function(e){__DEV__&&tn.debug("In client.refetchQueries, Promise.all promise rejected with error "+e)})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}(),Mo=function(){function e(){this.getFragmentDoc=_o(jn)}return e.prototype.batch=function(e){var t="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;this.performTransaction(e.update,t)},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(se(se({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(se(se({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=ue(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,i=e.fragmentName,o=ue(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e}(),Uo=function(e){function t(n,r,i,o){var a=e.call(this,n)||this;return a.message=n,a.path=r,a.query=i,a.variables=o,a.__proto__=t.prototype,a}return ae(t,e),t}(Error);function qo(e){return __DEV__&&(t=e,(n=new Set([t])).forEach((function(e){Fn(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(t){Fn(e[t])&&n.add(e[t])}))}))),e;var t,n}var Vo=Object.prototype.hasOwnProperty;function Bo(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=void 0!==r?{id:r}:void 0!==i?{_id:i}:void 0),void 0===r&&(r=i),void 0!==r))return n+":"+("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var Qo={dataIdFromObject:Bo,addTypename:!0,resultCaching:!0,canonizeResults:!1};function zo(e){var t=e.canonizeResults;return void 0===t?Qo.canonizeResults:t}var Wo=/^[_a-z][_0-9a-z]*/i;function $o(e){var t=e.match(Wo);return t?t[0]:e}function Go(e,t,n){return!!Fn(t)&&(Array.isArray(t)?t.every((function(t){return Go(e,t,n)})):e.selections.every((function(e){if(Yn(e)&&di(e,n)){var r=Gn(e);return Vo.call(t,r)&&(!e.selectionSet||Go(e.selectionSet,t[r],n))}return!0})))}function Ko(e){return Fn(e)&&!qn(e)&&!Array.isArray(e)}var Yo=Object.create(null),Jo=function(){return Yo},Ho=Object.create(null),Xo=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return qo(qn(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return qn(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return Un(e);if(qn(e))return e;var r=n.policies.identify(e)[0];if(r){var i=Un(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return se({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),Vo.call(this.data,e)){var n=this.data[e];if(n&&Vo.call(n,t))return n[t]}return"__typename"===t&&Vo.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof na?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),Vo.call(this.data,e)?this.data[e]:this instanceof na?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;qn(e)&&(e=e.__ref),qn(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,o="string"==typeof t?this.lookup(n=t):t;if(o){__DEV__?tn("string"==typeof n,"store.merge expects a string ID"):tn("string"==typeof n,1);var a=new qi(ia).merge(i,o);if(this.data[n]=a,a!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==a[e]){s[e]=1;var t=$o(e);t===e||r.policies.hasKeyArgs(a.__typename,t)||(s[t]=1),void 0!==a[e]||r instanceof na||delete a[e]}})),!s.__typename||i&&i.__typename||this.policies.rootTypenamesById[n]!==a.__typename||delete s.__typename,Object.keys(s).forEach((function(e){return r.group.dirty(n,e)}))}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),o=!1,a=!0,s={DELETE:Yo,INVALIDATE:Ho,isReference:qn,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||Un(e)}:t,{store:n})}};if(Object.keys(r).forEach((function(u){var c=$o(u),l=r[u];if(void 0!==l){var f="function"==typeof t?t:t[u]||t[c];if(f){var p=f===Jo?Yo:f(qo(l),se(se({},s),{fieldName:c,storeFieldName:u,storage:n.getStorage(e,u)}));p===Ho?n.group.dirty(e,u):(p===Yo&&(p=void 0),p!==l&&(i[u]=p,o=!0,l=p))}void 0!==l&&(a=!1)}})),o)return this.merge(e,i),a&&(this instanceof na?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),a=t&&n?this.policies.getStoreFieldName({typename:o,fieldName:t,args:n}):t;return this.modify(e,a?((r={})[a]=Jo,r):Jo)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(Vo.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof na&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach((function(t){Vo.call(e.policies.rootTypenamesById,t)||n.push(t)})),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(n){e&&Vo.call(e,n)||t.delete(n)})),e){var n=e.__META,r=ue(e,["__META"]);Object.keys(r).forEach((function(e){t.merge(e,r[e])})),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof na?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach((function(r){Vo.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])}));var r=Object.keys(n);if(r.length){for(var i=this;i instanceof na;)i=i.parent;r.forEach((function(e){return i.delete(e)}))}return r},e.prototype.findChildRefIds=function(e){if(!Vo.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach((function(e){qn(e)&&(t[e.__ref]=!0),Fn(e)&&Object.keys(e).forEach((function(t){var n=e[t];Fn(n)&&r.add(n)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Zo=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?mo():null,this.keyMaker=new Yr(Jr)},e.prototype.depend=function(e,t){if(this.d){this.d(ea(e,t));var n=$o(t);n!==t&&this.d(ea(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(ea(e,t),"__exists"===t?"forget":"setDirty")},e}();function ea(e,t){return t+"#"+e}function ta(e,t){oa(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=void 0===r||r,o=t.seed,a=e.call(this,n,new Zo(i))||this;return a.stump=new ra(a),a.storageTrie=new Yr(Jr),o&&a.replace(o),a}return ae(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(Xo||(Xo={}));var na=function(e){function t(t,n,r,i){var o=e.call(this,n.policies,i)||this;return o.id=t,o.parent=n,o.replay=r,o.group=i,r(o),o}return ae(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach((function(n){Lr(r[n],i[n])||t.group.dirty(e,n)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(n){t.group.dirty(e,n)}))):t.delete(e)})),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return se(se({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return Vo.call(this.data,t)?se(se({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(Xo),ra=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new Zo(t.group.caching,t.group))||this}return ae(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(na);function ia(e,t,n){var r=e[n],i=t[n];return Lr(r,i)?r:i}function oa(e){return!!(e instanceof Xo&&e.group.caching)}function aa(e,t){return new Uo(e.message,t.path.slice(),t.query,t.variables)}function sa(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var ua=function(){function e(e){var t=this;this.knownResults=new(Jr?WeakMap:Map),this.config=Nr(e,{addTypename:!1!==e.addTypename,canonizeResults:zo(e)}),this.canon=e.canon||new Zr,this.executeSelectionSet=_o((function(e){var n,r=e.context.canonizeResults,i=sa(e);i[3]=!r;var o=(n=t.executeSelectionSet).peek.apply(n,i);return o?r?se(se({},o),{result:t.canon.admit(o.result)}):o:(ta(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:sa,makeCacheKey:function(e,t,n,r){if(oa(n.store))return n.store.makeCacheKey(e,qn(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=_o((function(e){return ta(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(oa(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Zr},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,r=e.rootId,i=void 0===r?"ROOT_QUERY":r,o=e.variables,a=e.returnPartialData,s=void 0===a||a,u=e.canonizeResults,c=void 0===u?this.config.canonizeResults:u,l=this.config.cache.policies;o=se(se({},rr(tr(n))),o);var f=Un(i),p=this.executeSelectionSet({selectionSet:nr(n).selectionSet,objectOrReference:f,enclosingRef:f,context:{store:t,query:n,policies:l,variables:o,varString:ei(o),canonizeResults:c,fragmentMap:Ln(er(n)),path:[]}}),h=p.missing&&p.missing.length>0;if(h&&!s)throw p.missing[0];return{result:p.result,missing:p.missing,complete:!h}},e.prototype.isFresh=function(e,t,n,r){if(oa(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,r=e.objectOrReference,i=e.enclosingRef,o=e.context;if(qn(r)&&!o.policies.rootTypenamesById[r.__ref]&&!o.store.has(r.__ref))return{result:this.canon.empty,missing:[aa(__DEV__?new en("Dangling reference to missing "+r.__ref+" object"):new en(5),o)]};var a=o.variables,s=o.policies,u=o.store,c=[],l={result:null},f=u.getFieldValue(r,"__typename");function p(){return l.missing||(l.missing=[])}function h(e){var t;return e.missing&&(t=p()).push.apply(t,e.missing),e.result}this.config.addTypename&&"string"==typeof f&&!s.rootIdsByTypename[f]&&c.push({__typename:f});var d=new Set(n.selections);d.forEach((function(e){var n;if(di(e,a))if(Yn(e)){var u=s.readField({fieldName:e.name.value,field:e,variables:o.variables,from:r},o),l=Gn(e);o.path.push(l),void 0===u?li.added(e)||p().push(aa(__DEV__?new en("Can't find field '"+e.name.value+"' on "+(qn(r)?r.__ref+" object":"object "+JSON.stringify(r,null,2))):new en(6),o)):Array.isArray(u)?u=h(t.executeSubSelectedArray({field:e,array:u,enclosingRef:i,context:o})):e.selectionSet?null!=u&&(u=h(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:u,enclosingRef:qn(u)?u:i,context:o}))):o.canonizeResults&&(u=t.canon.pass(u)),void 0!==u&&c.push(((n={})[l]=u,n)),tn(o.path.pop()===l)}else{var v=Mn(e,o.fragmentMap);v&&s.fragmentMatches(v,f)&&v.selectionSet.selections.forEach(d.add,d)}}));var v=Mi(c);return l.result=o.canonizeResults?this.canon.admit(v):qo(v),this.knownResults.set(l.result,n),l},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,o=e.enclosingRef,a=e.context;function s(e,n){return e.missing&&(t=t||[]).push.apply(t,e.missing),tn(a.path.pop()===n),e.result}return r.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map((function(e,t){return null===e?null:(a.path.push(t),Array.isArray(e)?s(n.executeSubSelectedArray({field:r,array:e,enclosingRef:o,context:a}),t):r.selectionSet?s(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:qn(e)?e:o,context:a}),t):(__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach((function(n){Fn(n)&&(__DEV__?tn(!qn(n),"Missing selection set for object of type "+function(e,t){return qn(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,n)+" returned for query field "+t.name.value):tn(!qn(n),7),Object.values(n).forEach(r.add,r))}))}}(a.store,r,e),tn(a.path.pop()===t),e))})),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}(),ca=function(){function e(e,t){this.cache=e,this.reader=t}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,o=t.dataId,a=t.variables,s=t.overwrite,u=Xn(r),c=new qi;a=se(se({},rr(u)),a);var l={store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:a,varString:ei(a),fragmentMap:Ln(er(r)),overwrite:!!s,incomingById:new Map,clientOnly:!1},f=this.processSelectionSet({result:i||Object.create(null),dataId:o,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:l});if(!qn(f))throw __DEV__?new en("Could not identify object "+JSON.stringify(i)):new en(8);return l.incomingById.forEach((function(t,r){var i=t.fields,o=t.mergeTree,a=t.selections,s=Un(r);if(o&&o.map.size){var u=n.applyMerges(o,s,i,l);if(qn(u))return;i=u}if(__DEV__&&!l.overwrite){var c=new Set;a.forEach((function(e){Yn(e)&&e.selectionSet&&c.add(e.name.value)})),Object.keys(i).forEach((function(e){(function(e){return c.has($o(e))})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},o=i(e);if(o){var a=i(t);if(a&&!qn(o)&&!Lr(o,a)&&!Object.keys(o).every((function(e){return void 0!==r.getFieldValue(a,e)}))){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),u=$o(n),c=s+"."+u;if(!va.has(c)){va.add(c);var l=[];Array.isArray(o)||Array.isArray(a)||[o,a].forEach((function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||l.includes(t)||l.push(t)})),__DEV__&&tn.warn("Cache data may be lost when replacing the "+u+" field of a "+s+" object.\n\nTo address this problem (which is not a bug in Apollo Client), "+(l.length?"either ensure all objects of type "+l.join(" and ")+" have an ID or a custom merge function, or ":"")+"define a custom merge function for the "+c+" field, so InMemoryCache can safely merge these objects:\n\n existing: "+JSON.stringify(o).slice(0,1e3)+"\n incoming: "+JSON.stringify(a).slice(0,1e3)+"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n")}}}}(s,i,e,l.store)}))}e.merge(r,i)})),e.retain(f.__ref),f},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,o=e.context,a=e.mergeTree,s=this.cache.policies,u=s.identify(r,i,o.fragmentMap),c=u[0],l=u[1];if("string"==typeof(n=n||c)){var f=o.written[n]||(o.written[n]=[]),p=Un(n);if(f.indexOf(i)>=0)return p;if(f.push(i),this.reader&&this.reader.isFresh(r,p,i,o))return p}var h=Object.create(null);l&&(h=o.merge(h,l));var d=n&&s.rootTypenamesById[n]||Kn(r,i,o.fragmentMap)||n&&o.store.get(n,"__typename");"string"==typeof d&&(h.__typename=d);var v=new Set(i.selections);if(v.forEach((function(e){var n;if(di(e,o.variables))if(Yn(e)){var i=Gn(e),u=r[i],c=o.clientOnly;if(o.clientOnly=c||!(!e.directives||!e.directives.some((function(e){return"client"===e.name.value}))),void 0!==u){var l=s.getStoreFieldName({typename:d,fieldName:e.name.value,field:e,variables:o.variables}),f=fa(a,l),p=t.processFieldValue(u,e,o,f),y=void 0;if(e.selectionSet&&!(y=o.store.getFieldValue(p,"__typename"))&&qn(p)){var m=o.incomingById.get(p.__ref);y=m&&m.fields.__typename}var g=s.getMergeFunction(d,e.name.value,y);g?f.info={field:e,typename:d,merge:g}:da(a,l),h=o.merge(h,((n={})[l]=p,n))}else o.clientOnly||li.added(e)||__DEV__&&tn.error(("Missing field '"+Gn(e)+"' while writing result "+JSON.stringify(r,null,2)).substring(0,1e3));o.clientOnly=c}else{var b=Mn(e,o.fragmentMap);b&&s.fragmentMatches(b,d,r,o.variables)&&b.selectionSet.selections.forEach(v.add,v)}})),"string"==typeof n){var y=o.incomingById.get(n);return y?(y.fields=o.merge(y.fields,h),y.mergeTree=pa(y.mergeTree,a),y.selections.forEach(v.add,v),y.selections=v):o.incomingById.set(n,{fields:h,mergeTree:ha(a)?void 0:a,selections:v}),Un(n)}return h},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?Array.isArray(e)?e.map((function(e,o){var a=i.processFieldValue(e,t,n,fa(r,o));return da(r,o),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?Ai(e):e},e.prototype.applyMerges=function(e,t,n,r,i){var o,a=this;if(e.map.size&&!qn(n)){var s,u=Array.isArray(n)||!qn(t)&&!Ko(t)?void 0:t,c=n;u&&!i&&(i=[qn(u)?u.__ref:u]);var l=function(e,t){return Array.isArray(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var n=l(u,t),o=l(c,t);if(void 0!==o){i&&i.push(t);var f=a.applyMerges(e,n,o,r,i);f!==o&&(s=s||new Map).set(t,f),i&&tn(i.pop()===t)}})),s&&(n=Array.isArray(c)?c.slice(0):se({},c),s.forEach((function(e,t){n[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(o=r.store).getStorage.apply(o,i)):n},e}(),la=[];function fa(e,t){var n=e.map;return n.has(t)||n.set(t,la.pop()||{map:new Map}),n.get(t)}function pa(e,t){if(e===t||!t||ha(t))return e;if(!e||ha(e))return t;var n=e.info&&t.info?se(se({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i={info:n,map:r?new Map:e.map.size?e.map:t.map};if(r){var o=new Set(t.map.keys());e.map.forEach((function(e,n){i.map.set(n,pa(e,t.map.get(n))),o.delete(n)})),o.forEach((function(n){i.map.set(n,pa(t.map.get(n),e.map.get(n)))}))}return i}function ha(e){return!e||!(e.info||e.map.size)}function da(e,t){var n=e.map,r=n.get(t);r&&ha(r)&&(la.push(r),n.delete(t))}var va=new Set;function ya(e){var t=gi("stringifyForDisplay");return JSON.stringify(e,(function(e,n){return void 0===n?t:n})).split(JSON.stringify(t)).join("<undefined>")}function ma(e){return void 0!==e.args?e.args:e.field?$n(e.field,e.variables):null}Qn.setStringify(ei);var ga=function(){},ba=function(e,t){return t.fieldName},_a=function(e,t,n){return(0,n.mergeObjects)(e,t)},Ea=function(e,t){return t},wa=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=se({dataIdFromObject:Bo},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t,n){var r=t&&n?Kn(e,t,n):e.__typename;if(r===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var i,o={typename:r,selectionSet:t,fragmentMap:n},a=r&&this.getTypePolicy(r),s=a&&a.keyFn||this.config.dataIdFromObject;s;){var u=s(e,o);if(!Array.isArray(u)){i=u;break}s=Ta(u)}return i=i?String(i):void 0,o.keyObject?[i,o.keyObject]:[i]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(n){var r=e[n],i=r.queryType,o=r.mutationType,a=r.subscriptionType,s=ue(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),o&&t.setRootTypename("Mutation",n),a&&t.setRootTypename("Subscription",n),Vo.call(t.toBeAdded,n)?t.toBeAdded[n].push(s):t.toBeAdded[n]=[s]}))},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?_a:!1===t?Ea:e.merge}a(r,t.merge),r.keyFn=!1===i?ga:Array.isArray(i)?Ta(i):"function"==typeof i?i:r.keyFn,o&&Object.keys(o).forEach((function(t){var r=n.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;r.keyFn=!1===s?ba:Array.isArray(s)?Ia(s):"function"==typeof s?s:r.keyFn,"function"==typeof u&&(r.read=u),a(r,c)}r.read&&r.merge&&(r.keyFn=r.keyFn||ba)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?tn(!r||r===e,"Cannot change root "+e+" __typename more than once"):tn(!r||r===e,2),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(n){t.getSupertypeSet(n,!0),e[n].forEach((function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(Wo);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!Vo.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);r&&r.size&&r.forEach((function(e){var r=t.getTypePolicy(e),i=r.fields,o=ue(r,["fields"]);Object.assign(n,o),Object.assign(n.fields,i)}))}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach((function(n){t.updateTypePolicy(e,n)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),s=[a],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},c=!(!n||!this.fuzzySubtypes.size),l=!1,f=0;f<s.length;++f){var p=s[f];if(p.has(o))return a.has(o)||(l&&__DEV__&&tn.warn("Inferring subtype "+t+" of supertype "+o),a.add(o)),!0;p.forEach(u),c&&f===s.length-1&&Go(e.selectionSet,n,r)&&(c=!1,l=!0,this.fuzzySubtypes.forEach((function(e,n){var r=t.match(e);r&&r[0]===t&&u(n)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t,!1);return!(!n||!n.keyFn)},e.prototype.getStoreFieldName=function(e){var t,n=e.typename,r=e.fieldName,i=this.getFieldPolicy(n,r,!1),o=i&&i.keyFn;if(o&&n)for(var a={typename:n,fieldName:r,field:e.field||null,variables:e.variables},s=ma(e);o;){var u=o(s,a);if(!Array.isArray(u)){t=u||r;break}o=Ia(u)}return void 0===t&&(t=e.field?function(e,t){var n=null;e.directives&&(n={},e.directives.forEach((function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach((function(r){var i=r.name,o=r.value;return Vn(n[e.name.value],i,o,t)}))})));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach((function(e){var n=e.name,i=e.value;return Vn(r,n,i,t)}))),Qn(e.name.value,r,n)}(e.field,e.variables):Qn(r,ma(e))),!1===t?r:r===$o(t)?t:r+":"+t},e.prototype.readField=function(e,t){var n=e.from;if(n&&(e.field||e.fieldName)){if(void 0===e.typename){var r=t.store.getFieldValue(n,"__typename");r&&(e.typename=r)}var i=this.getStoreFieldName(e),o=$o(i),a=t.store.getFieldValue(n,i),s=this.getFieldPolicy(e.typename,o,!1),u=s&&s.read;if(u){var c=Oa(this,n,e,t,t.store.getStorage(qn(n)?n.__ref:n,i));return Eo.withValue(this.cache,u,[a,c])}return a}},e.prototype.getMergeFunction=function(e,t,n){var r=this.getFieldPolicy(e,t,!1),i=r&&r.merge;return!i&&n&&(i=(r=this.getTypePolicy(n))&&r.merge),i},e.prototype.runMergeFunction=function(e,t,n,r,i){var o=n.field,a=n.typename,s=n.merge;return s===_a?xa(r.store)(e,t):s===Ea?t:(r.overwrite&&(e=void 0),s(e,t,Oa(this,void 0,{typename:a,fieldName:o.name.value,field:o,variables:r.variables},r,i||Object.create(null))))},e}();function Oa(e,t,n,r,i){var o=e.getStoreFieldName(n),a=$o(o),s=n.variables||r.variables,u=r.store,c=u.toReference,l=u.canRead;return{args:ma(n),field:n.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:qn,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(n,i){var o;if("string"==typeof n)o={fieldName:n,from:arguments.length>1?i:t};else{if(!Fn(n))return void(__DEV__&&tn.warn("Unexpected readField arguments: "+ya(Array.from(arguments))));o=se({},n),Vo.call(n,"from")||(o.from=t)}return __DEV__&&void 0===o.from&&__DEV__&&tn.warn("Undefined 'from' passed to readField with arguments "+ya(Array.from(arguments))),void 0===o.variables&&(o.variables=s),e.readField(o,r)},mergeObjects:xa(r.store)}}function xa(e){return function(t,n){if(Array.isArray(t)||Array.isArray(n))throw __DEV__?new en("Cannot automatically merge arrays"):new en(3);if(Fn(t)&&Fn(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(qn(t)&&Ko(n))return e.merge(t.__ref,n),t;if(Ko(t)&&qn(n))return e.merge(t,n.__ref),n;if(Ko(t)&&Ko(n))return se(se({},t),n)}return n}}function Ia(e){return function(t,n){return t?n.fieldName+":"+JSON.stringify(Aa(t,e,!1)):n.fieldName}}function Ta(e){var t=new Yr(Jr);return function(n,r){var i;if(r.selectionSet&&r.fragmentMap){var o=t.lookupArray([r.selectionSet,r.fragmentMap]);i=o.aliasMap||(o.aliasMap=Sa(r.selectionSet,r.fragmentMap))}var a=r.keyObject=Aa(n,e,!0,i);return r.typename+":"+JSON.stringify(a)}}function Sa(e,t){var n=Object.create(null),r=new Set([e]);return r.forEach((function(e){e.selections.forEach((function(e){if(Yn(e)){if(e.alias){var i=e.alias.value,o=e.name.value;o!==i&&((n.aliases||(n.aliases=Object.create(null)))[o]=i)}e.selectionSet&&((n.subsets||(n.subsets=Object.create(null)))[e.name.value]=Sa(e.selectionSet,t))}else{var a=Mn(e,t);a&&r.add(a.selectionSet)}}))})),n}function Aa(e,t,n,r){var i,o,a=Object.create(null);return t.forEach((function(t){if(Array.isArray(t)){if("string"==typeof o&&"string"==typeof i){var s=r&&r.subsets,u=s&&s[o];a[o]=Aa(e[i],t,n,u)}}else{var c=r&&r.aliases,l=c&&c[t]||t;Vo.call(e,l)?a[o=t]=e[i=l]:(__DEV__?tn(!n,"Missing field '"+l+"' while computing key fields"):tn(!n,4),i=o=void 0)}})),a}var ka=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=Io,n.txCount=0,n.config=function(e){return Nr(Qo,e)}(t),n.addTypename=!!n.config.addTypename,n.policies=new wa({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return ae(t,e),t.prototype.init=function(){var e=this.data=new Xo.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader;this.storeWriter=new ca(this,this.storeReader=new ua({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:zo(this.config),canon:e?void 0:n&&n.canon})),this.maybeBroadcastWatch=_o((function(e,n){return t.broadcastWatch(e,n)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(oa(n)){var r=e.optimistic,i=e.rootId,o=e.variables;return n.makeCacheKey(e.query,e.callback,ei({optimistic:r,rootId:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore(se(se({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(e){if(e instanceof Uo)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(Vo.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore(se(se({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t,n=this;return this.watches.size||Oo(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){n.watches.delete(e)&&!n.watches.size&&xo(n),n.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){ei.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){return qn(e)?e.__ref:this.policies.identify(e)[0]},t.prototype.evict=function(e){if(!e.id){if(Vo.call(e,"id"))return!1;e=se(se({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),ei.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),xo(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t=this,n=e.update,r=e.optimistic,i=void 0===r||r,o=e.removeOptimistic,a=e.onWatchUpdated,s=function(e){var r=t,i=r.data,o=r.optimisticData;++t.txCount,e&&(t.data=t.optimisticData=e);try{n(t)}finally{--t.txCount,t.data=i,t.optimisticData=o}},u=new Set;a&&!this.txCount&&this.broadcastWatches(se(se({},e),{onWatchUpdated:function(e){return u.add(e),!1}})),"string"==typeof i?this.optimisticData=this.optimisticData.addLayer(i,s):!1===i?s(this.data):s(),"string"==typeof o&&(this.optimisticData=this.optimisticData.removeLayer(o)),a&&u.size?(this.broadcastWatches(se(se({},e),{onWatchUpdated:function(e,t){var n=a.call(this,e,t);return!1!==n&&u.delete(e),n}})),u.size&&u.forEach((function(e){return t.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e)},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=li(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(n){return t.maybeBroadcastWatch(n,e)}))},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,r,n))||n&&Lr(n.result,r.result)||e.callback(e.lastDiff=r,n)},t}(Mo);const Da=JSON.parse('{"g":{"Credentials":["StripeCredentials","ZuoraCredentials"],"ResetPeriodConfiguration":["MonthlyResetPeriodConfig","WeeklyResetPeriodConfig"]}}');var Na=n(4098),Pa=n.n(Na),Ra=n(4147);var Ca=function(){function e(){var e=this;this.setFeatures=function(t){return e.features=new Set(t)},this.entitlements=new Map,this.features=new Set,this.isLoaded=!1}return e.prototype.getEntitlement=function(e){return this.entitlements.get(e)||null},e.prototype.validateFeature=function(e){return this.features.has(e)},e.prototype.setEntitlements=function(e){this.entitlements=e,this.isLoaded=!0},e.prototype.getEntitlements=function(){return this.entitlements},e}(),Fa=n(6486),ja=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},La=dt(Ua||(Ua=ja(["\n fragment EntitlementFragment on Entitlement {\n isGranted\n accessDeniedReason\n customerId\n usageLimit\n hasUnlimitedUsage\n currentUsage\n requestedUsage\n nextResetDate\n resetPeriod\n resetPeriodConfiguration {\n ...ResetPeriodConfigurationFragment\n }\n feature {\n ...FeatureFragment\n }\n }\n fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {\n __typename\n ... on MonthlyResetPeriodConfig {\n ...MonthlyResetPeriodConfigFragment\n }\n ... on WeeklyResetPeriodConfig {\n ...WeeklyResetPeriodConfigFragment\n }\n }\n fragment FeatureFragment on EntitlementFeature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n description\n displayName\n refId\n }\n fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {\n monthlyAccordingTo\n }\n fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {\n weeklyAccordingTo\n }\n"],["\n fragment EntitlementFragment on Entitlement {\n isGranted\n accessDeniedReason\n customerId\n usageLimit\n hasUnlimitedUsage\n currentUsage\n requestedUsage\n nextResetDate\n resetPeriod\n resetPeriodConfiguration {\n ...ResetPeriodConfigurationFragment\n }\n feature {\n ...FeatureFragment\n }\n }\n fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {\n __typename\n ... on MonthlyResetPeriodConfig {\n ...MonthlyResetPeriodConfigFragment\n }\n ... on WeeklyResetPeriodConfig {\n ...WeeklyResetPeriodConfigFragment\n }\n }\n fragment FeatureFragment on EntitlementFeature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n description\n displayName\n refId\n }\n fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {\n monthlyAccordingTo\n }\n fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {\n weeklyAccordingTo\n }\n"])));const Ma=function(){function e(e){this.client=e}return e.prototype.getEntitlements=function(e){return this.client.query({query:dt(qa||(qa=ja(["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "],["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "])),La),variables:{query:{customerId:e}},fetchPolicy:"network-only"})},e.prototype.pollEntitlements=function(e,t){return this.client.watchQuery({query:dt(Va||(Va=ja(["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "],["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "])),La),variables:{query:{customerId:e}},fetchPolicy:"network-only",pollInterval:t})},e}();var Ua,qa,Va,Ba=function(){function e(){}return e.decideEntitlementPolicy=function(e,t){var n,r;if(!e||!e.calculatedEntitlement.feature)return{hasAccess:!1,accessDeniedReason:J.CustomerNotEntitledForFeature};var i=e.calculatedEntitlement.feature,o=i.featureType,a=i.meterType;switch(o){case H.Boolean:return{hasAccess:!0};case H.Numeric:if((null===(n=e.calculatedEntitlement.feature)||void 0===n?void 0:n.meterType)===X.None)return{hasAccess:!0};if(e.calculatedEntitlement.hasUnlimitedUsage)return{hasAccess:!0};var s=e.featureUsage.currentUsage;return a===X.Incremental&&e.featureUsage.nextResetDate<(new Date).getTime()&&(s=0),s+(t||0)<=((null===(r=e.calculatedEntitlement)||void 0===r?void 0:r.usageLimit)||0)?{hasAccess:!0}:{hasAccess:!1,accessDeniedReason:J.RequestedUsageExceedsLimit}}},e}(),Qa=function(){return Qa=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Qa.apply(this,arguments)},za=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Wa=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},$a=function(){function e(e,t,n){this.customerId=e,this.cacheService=t,this.modelMapper=new Jt,this.loadingEntitlements=null,this.entitlementsApi=new Ma(n),this.entitlementsPollingObserver=null}return e.prototype.startPolling=function(e){var t=this;this.entitlementsPollingObserver=this.entitlementsApi.pollEntitlements(this.customerId,e),this.entitlementsPollingObserver.subscribe((function(e){!e.errors&&e.data&&e.data.entitlements?t.storeFetchedEntitlementsInCache(e.data.entitlements):console.log("Failed to poll entitlements ".concat(e.errors),e.errors)}))},e.prototype.refresh=function(){return za(this,void 0,void 0,(function(){return Wa(this,(function(e){switch(e.label){case 0:return[4,this.loadEntitlements()];case 1:return e.sent(),[2]}}))}))},e.prototype.getBooleanEntitlement=function(e){var t=this.cacheService.getEntitlement(e),n=Ba.decideEntitlementPolicy(t);return(null==t?void 0:t.calculatedEntitlement.feature)&&t.calculatedEntitlement.feature.featureType!==H.Boolean?Qa(Qa({},te),{accessDeniedReason:J.InvalidFeatureType}):t&&n.hasAccess?this.modelMapper.mapBooleanEntitlement(t,n):Qa(Qa({},te),n)},e.prototype.getNumericEntitlement=function(e){var t,n=this.cacheService.getEntitlement(e),r=Ba.decideEntitlementPolicy(n);return(null==n?void 0:n.calculatedEntitlement.feature)&&(null===(t=n.calculatedEntitlement.feature)||void 0===t?void 0:t.featureType)!==H.Numeric?Qa(Qa({},ne),{accessDeniedReason:J.InvalidFeatureType}):n&&r.hasAccess?this.modelMapper.mapNumericEntitlement(n,r):Qa(Qa({},ne),r)},e.prototype.getMeteredEntitlement=function(e,t){var n,r,i=this.cacheService.getEntitlement(e),o=Ba.decideEntitlementPolicy(i,null==t?void 0:t.requestedUsage);return(null==i?void 0:i.calculatedEntitlement.feature)&&(null===(n=i.calculatedEntitlement.feature)||void 0===n?void 0:n.meterType)!==X.Fluctuating&&(null===(r=i.calculatedEntitlement.feature)||void 0===r?void 0:r.meterType)!==X.Incremental?Qa(Qa({},re),{accessDeniedReason:J.InvalidFeatureType}):!i||(0,Fa.includes)([J.CustomerNotEntitledForFeature],o.accessDeniedReason)?Qa(Qa({},re),o):this.modelMapper.mapMeteredEntitlement(i,o,null==t?void 0:t.requestedUsage)},e.prototype.loadEntitlements=function(){return za(this,void 0,void 0,(function(){var e;return Wa(this,(function(t){switch(t.label){case 0:return this.loadingEntitlements||(this.loadingEntitlements=this.loadEntitlementsFromRemote()),[4,this.loadingEntitlements];case 1:return e=t.sent(),this.loadingEntitlements=null,[2,e]}}))}))},e.prototype.loadEntitlementsFromRemote=function(){return za(this,void 0,void 0,(function(){var e;return Wa(this,(function(t){switch(t.label){case 0:return[4,this.entitlementsApi.getEntitlements(this.customerId)];case 1:return e=t.sent(),this.storeFetchedEntitlementsInCache(e.data.entitlements),[2]}}))}))},e.prototype.storeFetchedEntitlementsInCache=function(e){var t=this.modelMapper.mapCachedEntitlements(e);this.cacheService.setEntitlements(t)},e.prototype.getEntitlements=function(){return za(this,void 0,void 0,(function(){var e=this;return Wa(this,(function(t){switch(t.label){case 0:return this.cacheService.isLoaded?[3,2]:[4,this.loadEntitlements()];case 1:t.sent(),t.label=2;case 2:return[2,Array.from(this.cacheService.getEntitlements().values()).map((function(t){var n=Ba.decideEntitlementPolicy(t);return e.modelMapper.mapEntitlement(t,n)}))]}}))}))},e.prototype.stopPolling=function(){var e;null===(e=this.entitlementsPollingObserver)||void 0===e||e.stopPolling()},e}(),Ga=function(){return Ga=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ga.apply(this,arguments)},Ka=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Ya=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},Ja=function(){function e(e,t){this.modelMapper=new Jt,this.configuration=e,this.graphClient=function(e){var t=e.apiKey,n=e.baseUri,r=new ur((function(e,n){return e.setContext({headers:{"X-API-KEY":t}}),n(e)})),i=new kr({uri:"".concat(n,"/graphql"),fetch:Pa()});return new Lo({link:r.concat(i),cache:new ka({possibleTypes:Da.g}),name:"js-client-sdk",version:Ra.version})}(this.configuration),this.loggerService=t,this.apiGateway=new Ut(this.graphClient),this.entitlementsService=null}return e.initialize=function(t){return Ka(this,void 0,void 0,(function(){var n,i,o,a,s;return Ya(this,(function(u){switch(u.label){case 0:n=function(e){var t={baseUri:"https://api.stigg.io",entitlementPollingInterval:3e4,logConfiguration:{logger:console,logLevel:r.ERROR}};return Qt()(t,e)}(t),i=new ee(n.logConfiguration.logger,n.logConfiguration.logLevel),u.label=1;case 1:return u.trys.push([1,4,,5]),o=function(e,t){var n=!0;return Vt()(e.apiKey)&&(t.error("You must configure the client with an SDK key"),n=!1),e.entitlementPollingInterval&&e.entitlementPollingInterval<5e3&&(t.error("Entitlements polling interval cannot be lower than 5000ms"),n=!1),n}(n,i),o?(a=new e(n,i),t.customerId?[4,a.setCustomerId(t.customerId)]:[3,3]):[2,null];case 2:u.sent(),u.label=3;case 3:return[2,a];case 4:return s=u.sent(),i.error("Failed to initialize api ".concat(s)),[2,null];case 5:return[2]}}))}))},e.prototype.setCustomerId=function(e){var t;return Ka(this,void 0,void 0,(function(){return Ya(this,(function(n){switch(n.label){case 0:return null===(t=this.entitlementsService)||void 0===t||t.stopPolling(),this.configuration.customerId=e,this.entitlementsService=new $a(e,new Ca,this.graphClient),this.entitlementsService.startPolling(this.configuration.entitlementPollingInterval),[4,this.entitlementsService.loadEntitlements()];case 1:return n.sent(),[2]}}))}))},e.prototype.refresh=function(){var e;return Ka(this,void 0,void 0,(function(){return Ya(this,(function(t){switch(t.label){case 0:return[4,null===(e=this.entitlementsService)||void 0===e?void 0:e.refresh()];case 1:return t.sent(),[2]}}))}))},e.prototype.getBooleanEntitlement=function(e){var t=e.featureId,n=e.options,r=Ga(Ga({},te),(null==n?void 0:n.fallback)||{});try{return this.entitlementsService?this.entitlementsService.getBooleanEntitlement(t):r}catch(e){return this.loggerService.error("Failed to get boolean entitlement",e),r}},e.prototype.getNumericEntitlement=function(e){var t=e.featureId,n=e.options,r=Ga(Ga({},ne),(null==n?void 0:n.fallback)||{});try{return this.entitlementsService?this.entitlementsService.getNumericEntitlement(t):r}catch(e){return this.loggerService.error("Failed to get numeric entitlement",e),r}},e.prototype.getMeteredEntitlement=function(e){var t=e.featureId,n=e.options,r=Ga(Ga({},re),(null==n?void 0:n.fallback)||{});try{return this.entitlementsService?this.entitlementsService.getMeteredEntitlement(t,n):r}catch(e){return this.loggerService.error("Failed to get metered entitlement",e),r}},e.prototype.getPaywall=function(e){var t=(void 0===e?{}:e).productId;return Ka(this,void 0,void 0,(function(){var e=this;return Ya(this,(function(n){return[2,this.withErrorHandling((function(){return Ka(e,void 0,void 0,(function(){var e;return Ya(this,(function(n){switch(n.label){case 0:return[4,this.apiGateway.paywall.getPlans(t)];case 1:return e=n.sent(),[2,this.modelMapper.mapPlans(e.data)]}}))}))}),(function(e){return"Failed to get paywall ".concat(e)}))]}))}))},e.prototype.getCustomer=function(){return Ka(this,void 0,void 0,(function(){var e=this;return Ya(this,(function(t){return[2,this.withErrorHandling((function(){return Ka(e,void 0,void 0,(function(){var e,t,n;return Ya(this,(function(r){switch(r.label){case 0:return e=zt(this.configuration),[4,this.apiGateway.customers.getCustomer(e)];case 1:return t=r.sent(),n=t.data.customers.edges[0].node,[2,this.modelMapper.mapCustomer(n)]}}))}))}),(function(e){return"Failed to get customer ".concat(e)}))]}))}))},e.prototype.getEntitlements=function(){return Ka(this,void 0,void 0,(function(){var e=this;return Ya(this,(function(t){return[2,this.withErrorHandling((function(){return Ka(e,void 0,void 0,(function(){var e;return Ya(this,(function(t){return zt(this.configuration),[2,(null===(e=this.entitlementsService)||void 0===e?void 0:e.getEntitlements())||[]]}))}))}),(function(e){return"Failed to get entitlements ".concat(e)}))]}))}))},e.prototype.withErrorHandling=function(e,t){try{return e()}catch(e){var n=t?t(e):"Operation failed ".concat(e);throw new Error(n)}},e}()},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"@stigg/js-client-sdk","version":"0.25.0","description":"Stigg client-side SDK for Browser","main":"dist/index.js","typings":"dist/index.d.ts","repository":"https://github.com/stiggio/js-client-sdk.git","license":"MIT","scripts":{"start":"webpack serve","build:types":"tsc --emitDeclarationOnly","build":"yarn build:types && webpack","build:watch":"webpack --watch","build:prod":"yarn build:types && webpack --env production","generate":"graphql-codegen && yarn run fix:lint","fix":"run-s fix:*","fix:prettier":"prettier \\"src/**/*.ts\\" --write","fix:lint":"eslint src --ext .ts --fix","test":"jest","test:watch":"jest --watch","test:cov":"jest --coverage","prepare":"husky install","docs":"typedoc"},"files":["dist/**/*"],"dependencies":{"@apollo/client":"^3.4.17","cross-fetch":"^3.1.4","graphql":"^16.0.1","husky":"^7.0.4","lint-staged":"^12.0.2","lodash":"^4.17.21"},"devDependencies":{"@commitlint/cli":"^14.1.0","@commitlint/config-conventional":"^14.1.0","@graphql-codegen/cli":"^2.3.0","@graphql-codegen/fragment-matcher":"^3.2.1","@graphql-codegen/schema-ast":"^2.4.0","@graphql-codegen/typescript":"^2.4.0","@graphql-codegen/typescript-operations":"^2.2.0","@types/jest":"^27.0.2","@types/lodash":"^4.14.177","@typescript-eslint/eslint-plugin":"^5.4.0","@typescript-eslint/parser":"^5.4.0","eslint":"^8.2.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","jest":"^27.3.1","jest-fetch-mock":"^3.0.3","msw":"^0.35.0","npm-run-all":"^4.1.5","prettier":"^2.4.1","ts-jest":"^27.0.7","ts-loader":"^9.2.6","typedoc":"^0.22.13","typedoc-plugin-rename-defaults":"^0.4.0","typescript":"^4.5.3","webpack":"^5.64.1","webpack-cli":"^4.9.1","webpack-dev-server":"^4.5.0"},"lint-staged":{"*.{js,jsx,ts,tsx}":["prettier --check","eslint --cache"]}}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(3300)})()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Stigg",[],t):"object"==typeof exports?exports.Stigg=t():e.Stigg=t()}(self,(function(){return(()=>{var e={4098:function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,a="ArrayBuffer"in e;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?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 d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function y(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):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):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=d(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 new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,n,r=d(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=h(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(E)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(e,t){e=c(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},p.prototype.delete=function(e){delete this.map[c(e)]},p.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},p.prototype.set=function(e,t){this.map[c(e)]=l(t)},p.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},p.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},p.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},p.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},r&&(p.prototype[Symbol.iterator]=p.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n,r,i=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),g.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function E(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function _(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},m.call(b.prototype),m.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];_.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function O(e,n){return new Promise((function(r,o){var a=new b(e,n);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new _(i,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}O.polyfill=!0,e.fetch||(e.fetch=O,e.Headers=p,e.Request=b,e.Response=_),t.Headers=p,t.Request=b,t.Response=_,t.fetch=O,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},8552:(e,t,n)=>{var r=n(852)(n(5639),"DataView");e.exports=r},1989:(e,t,n)=>{var r=n(1789),i=n(401),o=n(7667),a=n(1327),s=n(1866);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},8407:(e,t,n)=>{var r=n(7040),i=n(4125),o=n(2117),a=n(7529),s=n(4705);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},7071:(e,t,n)=>{var r=n(852)(n(5639),"Map");e.exports=r},3369:(e,t,n)=>{var r=n(4785),i=n(1285),o=n(6e3),a=n(9916),s=n(5265);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},3818:(e,t,n)=>{var r=n(852)(n(5639),"Promise");e.exports=r},8525:(e,t,n)=>{var r=n(852)(n(5639),"Set");e.exports=r},8668:(e,t,n)=>{var r=n(3369),i=n(619),o=n(2385);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},6384:(e,t,n)=>{var r=n(8407),i=n(7465),o=n(3779),a=n(7599),s=n(4758),u=n(4309);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},2705:(e,t,n)=>{var r=n(5639).Symbol;e.exports=r},1149:(e,t,n)=>{var r=n(5639).Uint8Array;e.exports=r},577:(e,t,n)=>{var r=n(852)(n(5639),"WeakMap");e.exports=r},6874:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},4963:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},4636:(e,t,n)=>{var r=n(2545),i=n(5694),o=n(1469),a=n(4144),s=n(5776),u=n(6719),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),l=!n&&i(e),f=!n&&!l&&a(e),p=!n&&!l&&!f&&u(e),d=n||l||f||p,h=d?r(e.length,String):[],y=h.length;for(var v in e)!t&&!c.call(e,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,y))||h.push(v);return h}},9932:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},2488:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},2908:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},6556:(e,t,n)=>{var r=n(9465),i=n(7813);e.exports=function(e,t,n){(void 0!==n&&!i(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},4865:(e,t,n)=>{var r=n(9465),i=n(7813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},8470:(e,t,n)=>{var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},9465:(e,t,n)=>{var r=n(8777);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3118:(e,t,n)=>{var r=n(3218),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},4140:(e,t,n)=>{var r=n(7816),i=n(9291)(r);e.exports=i},1848:e=>{e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},1078:(e,t,n)=>{var r=n(2488),i=n(7285);e.exports=function e(t,n,o,a,s){var u=-1,c=t.length;for(o||(o=i),s||(s=[]);++u<c;){var l=t[u];n>0&&o(l)?n>1?e(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},8483:(e,t,n)=>{var r=n(5063)();e.exports=r},7816:(e,t,n)=>{var r=n(8483),i=n(3674);e.exports=function(e,t){return e&&r(e,t,i)}},7786:(e,t,n)=>{var r=n(1811),i=n(327);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},8866:(e,t,n)=>{var r=n(2488),i=n(1469);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},4239:(e,t,n)=>{var r=n(2705),i=n(9607),o=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},13:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},2118:(e,t,n)=>{var r=n(1848),i=n(2722),o=n(2351);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},9454:(e,t,n)=>{var r=n(4239),i=n(7005);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},939:(e,t,n)=>{var r=n(1299),i=n(7005);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,a,e,s))}},1299:(e,t,n)=>{var r=n(6384),i=n(7114),o=n(8351),a=n(6096),s=n(4160),u=n(1469),c=n(4144),l=n(6719),f="[object Arguments]",p="[object Array]",d="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,y,v,m){var g=u(e),b=u(t),E=g?p:s(e),_=b?p:s(t),w=(E=E==f?d:E)==d,O=(_=_==f?d:_)==d,T=E==_;if(T&&c(e)){if(!c(t))return!1;g=!0,w=!1}if(T&&!w)return m||(m=new r),g||l(e)?i(e,t,n,y,v,m):o(e,t,E,n,y,v,m);if(!(1&n)){var I=w&&h.call(e,"__wrapped__"),x=O&&h.call(t,"__wrapped__");if(I||x){var S=I?e.value():e,D=x?t.value():t;return m||(m=new r),v(S,D,n,y,m)}}return!!T&&(m||(m=new r),a(e,t,n,y,v,m))}},2958:(e,t,n)=>{var r=n(6384),i=n(939);e.exports=function(e,t,n,o){var a=n.length,s=a,u=!o;if(null==e)return!s;for(e=Object(e);a--;){var c=n[a];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var l=(c=n[a])[0],f=e[l],p=c[1];if(u&&c[2]){if(void 0===f&&!(l in e))return!1}else{var d=new r;if(o)var h=o(f,p,l,e,t,d);if(!(void 0===h?i(p,f,3,o,d):h))return!1}}return!0}},2722:e=>{e.exports=function(e){return e!=e}},8458:(e,t,n)=>{var r=n(3560),i=n(5346),o=n(3218),a=n(346),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?p:s).test(a(e))}},8749:(e,t,n)=>{var r=n(4239),i=n(1780),o=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},7206:(e,t,n)=>{var r=n(1573),i=n(6432),o=n(6557),a=n(1469),s=n(9601);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):r(e):s(e)}},280:(e,t,n)=>{var r=n(5726),i=n(6916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},313:(e,t,n)=>{var r=n(3218),i=n(5726),o=n(3498),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},9199:(e,t,n)=>{var r=n(4140),i=n(8612);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}},1573:(e,t,n)=>{var r=n(2958),i=n(1499),o=n(2634);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},6432:(e,t,n)=>{var r=n(939),i=n(7361),o=n(9095),a=n(5403),s=n(9162),u=n(2634),c=n(327);e.exports=function(e,t){return a(e)&&s(t)?u(c(e),t):function(n){var a=i(n,e);return void 0===a&&a===t?o(n,e):r(t,a,3)}}},2980:(e,t,n)=>{var r=n(6384),i=n(6556),o=n(8483),a=n(9783),s=n(3218),u=n(1704),c=n(6390);e.exports=function e(t,n,l,f,p){t!==n&&o(n,(function(o,u){if(p||(p=new r),s(o))a(t,n,u,l,e,f,p);else{var d=f?f(c(t,u),o,u+"",t,n,p):void 0;void 0===d&&(d=o),i(t,u,d)}}),u)}},9783:(e,t,n)=>{var r=n(6556),i=n(4626),o=n(7133),a=n(278),s=n(8517),u=n(5694),c=n(1469),l=n(9246),f=n(4144),p=n(3560),d=n(3218),h=n(8630),y=n(6719),v=n(6390),m=n(9881);e.exports=function(e,t,n,g,b,E,_){var w=v(e,n),O=v(t,n),T=_.get(O);if(T)r(e,n,T);else{var I=E?E(w,O,n+"",e,t,_):void 0,x=void 0===I;if(x){var S=c(O),D=!S&&f(O),A=!S&&!D&&y(O);I=O,S||D||A?c(w)?I=w:l(w)?I=a(w):D?(x=!1,I=i(O,!0)):A?(x=!1,I=o(O,!0)):I=[]:h(O)||u(O)?(I=w,u(w)?I=m(w):d(w)&&!p(w)||(I=s(O))):x=!1}x&&(_.set(O,I),b(I,O,g,E,_),_.delete(O)),r(e,n,I)}}},2689:(e,t,n)=>{var r=n(9932),i=n(7786),o=n(7206),a=n(9199),s=n(1131),u=n(7518),c=n(5022),l=n(6557),f=n(1469);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return f(e)?function(t){return i(t,1===e.length?e[0]:e)}:e})):[l];var p=-1;t=r(t,u(o));var d=a(e,(function(e,n,i){return{criteria:r(t,(function(t){return t(e)})),index:++p,value:e}}));return s(d,(function(e,t){return c(e,t,n)}))}},371:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},9152:(e,t,n)=>{var r=n(7786);e.exports=function(e){return function(t){return r(t,e)}}},5976:(e,t,n)=>{var r=n(6557),i=n(5357),o=n(61);e.exports=function(e,t){return o(i(e,t,r),e+"")}},6560:(e,t,n)=>{var r=n(5703),i=n(8777),o=n(6557),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},1131:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},2545:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},531:(e,t,n)=>{var r=n(2705),i=n(9932),o=n(1469),a=n(3448),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7561:(e,t,n)=>{var r=n(7990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},7518:e=>{e.exports=function(e){return function(t){return e(t)}}},7415:(e,t,n)=>{var r=n(9932);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},4757:e=>{e.exports=function(e,t){return e.has(t)}},1811:(e,t,n)=>{var r=n(1469),i=n(5403),o=n(5514),a=n(9833);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},4318:(e,t,n)=>{var r=n(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},4626:(e,t,n)=>{e=n.nmd(e);var r=n(5639),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},7133:(e,t,n)=>{var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},6393:(e,t,n)=>{var r=n(3448);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,u=null===t,c=t==t,l=r(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!l&&e<t||l&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}},5022:(e,t,n)=>{var r=n(6393);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,u=n.length;++i<s;){var c=r(o[i],a[i]);if(c)return i>=u?c:c*("desc"==n[i]?-1:1)}return e.index-t.index}},278:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},8363:(e,t,n)=>{var r=n(4865),i=n(9465);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=o?o(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),a?i(n,c,l):r(n,c,l)}return n}},4429:(e,t,n)=>{var r=n(5639)["__core-js_shared__"];e.exports=r},1463:(e,t,n)=>{var r=n(5976),i=n(6612);e.exports=function(e){return r((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}},9291:(e,t,n)=>{var r=n(8612);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},5063:e=>{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}},8777:(e,t,n)=>{var r=n(852),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},7114:(e,t,n)=>{var r=n(8668),i=n(2908),o=n(4757);e.exports=function(e,t,n,a,s,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var p=u.get(e),d=u.get(t);if(p&&d)return p==t&&d==e;var h=-1,y=!0,v=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h<l;){var m=e[h],g=t[h];if(a)var b=c?a(g,m,h,t,e,u):a(m,g,h,e,t,u);if(void 0!==b){if(b)continue;y=!1;break}if(v){if(!i(t,(function(e,t){if(!o(v,t)&&(m===e||s(m,e,n,a,u)))return v.push(t)}))){y=!1;break}}else if(m!==g&&!s(m,g,n,a,u)){y=!1;break}}return u.delete(e),u.delete(t),y}},8351:(e,t,n)=>{var r=n(2705),i=n(1149),o=n(7813),a=n(7114),s=n(8776),u=n(1814),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var h=1&r;if(d||(d=u),e.size!=t.size&&!h)return!1;var y=p.get(e);if(y)return y==t;r|=2,p.set(e,t);var v=a(d(e),d(t),r,c,f,p);return p.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},6096:(e,t,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var u=1&n,c=r(e),l=c.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var p=c[f];if(!(u?p in t:i.call(t,p)))return!1}var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var y=!0;s.set(e,t),s.set(t,e);for(var v=u;++f<l;){var m=e[p=c[f]],g=t[p];if(o)var b=u?o(g,m,p,t,e,s):o(m,g,p,e,t,s);if(!(void 0===b?m===g||a(m,g,n,o,s):b)){y=!1;break}v||(v="constructor"==p)}if(y&&!v){var E=e.constructor,_=t.constructor;E==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof _&&_ instanceof _||(y=!1)}return s.delete(e),s.delete(t),y}},1957:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8234:(e,t,n)=>{var r=n(8866),i=n(9551),o=n(3674);e.exports=function(e){return r(e,o,i)}},5050:(e,t,n)=>{var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},1499:(e,t,n)=>{var r=n(9162),i=n(3674);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,r(a)]}return t}},852:(e,t,n)=>{var r=n(8458),i=n(7801);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},5924:(e,t,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);e.exports=r},9607:(e,t,n)=>{var r=n(2705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},9551:(e,t,n)=>{var r=n(4963),i=n(479),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},4160:(e,t,n)=>{var r=n(8552),i=n(7071),o=n(3818),a=n(8525),s=n(577),u=n(4239),c=n(346),l="[object Map]",f="[object Promise]",p="[object Set]",d="[object WeakMap]",h="[object DataView]",y=c(r),v=c(i),m=c(o),g=c(a),b=c(s),E=u;(r&&E(new r(new ArrayBuffer(1)))!=h||i&&E(new i)!=l||o&&E(o.resolve())!=f||a&&E(new a)!=p||s&&E(new s)!=d)&&(E=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case y:return h;case v:return l;case m:return f;case g:return p;case b:return d}return t}),e.exports=E},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},222:(e,t,n)=>{var r=n(1811),i=n(5694),o=n(1469),a=n(5776),s=n(1780),u=n(327);e.exports=function(e,t,n){for(var c=-1,l=(t=r(t,e)).length,f=!1;++c<l;){var p=u(t[c]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&s(l)&&a(p,l)&&(o(e)||i(e))}},1789:(e,t,n)=>{var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},1327:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},1866:(e,t,n)=>{var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},8517:(e,t,n)=>{var r=n(3118),i=n(5924),o=n(5726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},7285:(e,t,n)=>{var r=n(2705),i=n(5694),o=n(1469),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},5776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},6612:(e,t,n)=>{var r=n(7813),i=n(8612),o=n(5776),a=n(3218);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},5403:(e,t,n)=>{var r=n(1469),i=n(3448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},7019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:(e,t,n)=>{var r,i=n(4429),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},5726:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9162:(e,t,n)=>{var r=n(3218);e.exports=function(e){return e==e&&!r(e)}},7040:e=>{e.exports=function(){this.__data__=[],this.size=0}},4125:(e,t,n)=>{var r=n(8470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},2117:(e,t,n)=>{var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7529:(e,t,n)=>{var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:(e,t,n)=>{var r=n(8470);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},4785:(e,t,n)=>{var r=n(1989),i=n(8407),o=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},1285:(e,t,n)=>{var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:(e,t,n)=>{var r=n(5050);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},8776:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},4523:(e,t,n)=>{var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:(e,t,n)=>{var r=n(852)(Object,"create");e.exports=r},6916:(e,t,n)=>{var r=n(5569)(Object.keys,Object);e.exports=r},3498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:(e,t,n)=>{e=n.nmd(e);var r=n(1957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},5357:(e,t,n)=>{var r=n(6874),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),u=Array(s);++a<s;)u[a]=o[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=o[a];return c[t]=n(u),r(e,this,c)}}},5639:(e,t,n)=>{var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},6390:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:e=>{e.exports=function(e){return this.__data__.has(e)}},1814:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},61:(e,t,n)=>{var r=n(6560),i=n(1275)(r);e.exports=i},1275:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:(e,t,n)=>{var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:e=>{e.exports=function(e){return this.__data__.get(e)}},4758:e=>{e.exports=function(e){return this.__data__.has(e)}},4309:(e,t,n)=>{var r=n(8407),i=n(7071),o=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},2351:e=>{e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},5514:(e,t,n)=>{var r=n(4523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=a},327:(e,t,n)=>{var r=n(3448);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},5703:e=>{e.exports=function(e){return function(){return e}}},7813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},7361:(e,t,n)=>{var r=n(7786);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},9095:(e,t,n)=>{var r=n(13),i=n(222);e.exports=function(e,t){return null!=e&&i(e,t,r)}},6557:e=>{e.exports=function(e){return e}},4721:(e,t,n)=>{var r=n(2118),i=n(8612),o=n(7037),a=n(554),s=n(2628),u=Math.max;e.exports=function(e,t,n,c){e=i(e)?e:s(e),n=n&&!c?a(n):0;var l=e.length;return n<0&&(n=u(l+n,0)),o(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&r(e,t,n)>-1}},5694:(e,t,n)=>{var r=n(9454),i=n(7005),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},1469:e=>{var t=Array.isArray;e.exports=t},8612:(e,t,n)=>{var r=n(3560),i=n(1780);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},9246:(e,t,n)=>{var r=n(8612),i=n(7005);e.exports=function(e){return i(e)&&r(e)}},4144:(e,t,n)=>{e=n.nmd(e);var r=n(5639),i=n(5062),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u},1609:(e,t,n)=>{var r=n(280),i=n(4160),o=n(5694),a=n(1469),s=n(8612),u=n(4144),c=n(5726),l=n(6719),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},3560:(e,t,n)=>{var r=n(4239),i=n(3218);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},8630:(e,t,n)=>{var r=n(4239),i=n(5924),o=n(7005),a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,l=u.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},7037:(e,t,n)=>{var r=n(4239),i=n(1469),o=n(7005);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},3448:(e,t,n)=>{var r=n(4239),i=n(7005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},6719:(e,t,n)=>{var r=n(8749),i=n(7518),o=n(1167),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},3674:(e,t,n)=>{var r=n(4636),i=n(280),o=n(8612);e.exports=function(e){return o(e)?r(e):i(e)}},1704:(e,t,n)=>{var r=n(4636),i=n(313),o=n(8612);e.exports=function(e){return o(e)?r(e,!0):i(e)}},5161:(e,t,n)=>{var r=n(9932),i=n(7206),o=n(9199),a=n(1469);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},8306:(e,t,n)=>{var r=n(3369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},2492:(e,t,n)=>{var r=n(2980),i=n(1463)((function(e,t,n){r(e,t,n)}));e.exports=i},9601:(e,t,n)=>{var r=n(371),i=n(9152),o=n(5403),a=n(327);e.exports=function(e){return o(e)?r(a(e)):i(e)}},9734:(e,t,n)=>{var r=n(1078),i=n(2689),o=n(5976),a=n(6612),s=o((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])}));e.exports=s},479:e=>{e.exports=function(){return[]}},5062:e=>{e.exports=function(){return!1}},8601:(e,t,n)=>{var r=n(4841);e.exports=function(e){return e?Infinity===(e=r(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:(e,t,n)=>{var r=n(8601);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},4841:(e,t,n)=>{var r=n(7561),i=n(3218),o=n(3448),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},9881:(e,t,n)=>{var r=n(8363),i=n(1704);e.exports=function(e){return r(e,i(e))}},9833:(e,t,n)=>{var r=n(531);e.exports=function(e){return null==e?"":r(e)}},2628:(e,t,n)=>{var r=n(7415),i=n(3674);e.exports=function(e){return null==e?[]:r(e,i(e))}},3300:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AccessDeniedReason:()=>J,BOOLEAN_DEFAULT_FALLBACK_ENTITLEMENT:()=>te,BillingModel:()=>l,BillingPeriod:()=>f,Currency:()=>d,CustomerModel:()=>ie,EntitlementResetPeriod:()=>Z,FeatureType:()=>H,LogLevel:()=>r,METERED_DEFAULT_FALLBACK_ENTITLEMENT:()=>re,MeterType:()=>X,NUMERIC_DEFAULT_FALLBACK_ENTITLEMENT:()=>ne,PromotionalEntitlementStatus:()=>M,SubscriptionStatus:()=>W,TrialPeriodUnits:()=>G,default:()=>Ya});var r,i=n(4721),o=n.n(i);!function(e){e.ALL="ALL",e.NONE="NONE",e.LOG="LOG",e.ERROR="ERROR"}(r||(r={}));var a,s,u,c,l,f,p,d,h,y,v,m,g,b,E,_,w,O,T,I,x,S,D,A,k,N,P,F,R,C,j,M,L,U,q,V,B,Q,z,W,G,K,$,Y,J,H,X,Z,ee=function(){function e(e,t){this.logger=e,this.logLevel=t}return e.prototype.error=function(e,t){this.logLevel!==r.NONE&&this.logger.error(e,t||{})},e.prototype.log=function(e,t){o()([r.ERROR,r.NONE],this.logLevel)||this.logger.log(e,t||{})},e}();!function(e){e.CustomerNotFound="CustomerNotFound",e.FeatureNotFound="FeatureNotFound",e.NoActiveSubscription="NoActiveSubscription",e.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",e.RequestedUsageExceedingLimit="RequestedUsageExceedingLimit",e.Unknown="Unknown"}(a||(a={})),function(e){e.BillingId="billingId",e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.Id="id",e.IsLatest="isLatest",e.ProductId="productId",e.RefId="refId",e.Status="status",e.UpdatedAt="updatedAt",e.VersionNumber="versionNumber"}(s||(s={})),function(e){e.Id="id"}(u||(u={})),function(e){e.Client="CLIENT",e.Server="SERVER"}(c||(c={})),function(e){e.FlatFee="FLAT_FEE",e.PerUnit="PER_UNIT",e.UsageBased="USAGE_BASED"}(l||(l={})),function(e){e.Annually="ANNUALLY",e.Monthly="MONTHLY"}(f||(f={})),function(e){e.Added="ADDED",e.Deleted="DELETED",e.Modified="MODIFIED"}(p||(p={})),function(e){e.Usd="USD"}(d||(d={})),function(e){e.BillingId="billingId",e.CreatedAt="createdAt",e.CrmId="crmId",e.Email="email",e.EnvironmentId="environmentId",e.Id="id",e.Name="name",e.RefId="refId",e.UpdatedAt="updatedAt"}(h||(h={})),function(e){e.BillingId="billingId",e.CrmId="crmId",e.EndDate="endDate",e.EnvironmentId="environmentId",e.Id="id",e.RefId="refId",e.StartDate="startDate",e.Status="status"}(y||(y={})),function(e){e.Day="DAY",e.Hour="HOUR",e.Month="MONTH",e.Week="WEEK"}(v||(v={})),function(e){e.DisplayName="displayName",e.Id="id"}(m||(m={})),function(e){e.AddonNotFound="AddonNotFound",e.CheckoutIsNotSupported="CheckoutIsNotSupported",e.CustomerNotFound="CustomerNotFound",e.DuplicatedEntityNotAllowed="DuplicatedEntityNotAllowed",e.EnvironmentMissing="EnvironmentMissing",e.FeatureNotFound="FeatureNotFound",e.IdentityForbidden="IdentityForbidden",e.IntegrityViolation="IntegrityViolation",e.InvalidEntitlementResetPeriod="InvalidEntitlementResetPeriod",e.InvalidMemberDelete="InvalidMemberDelete",e.InvalidUsageValueForIncrementalFeatureError="InvalidUsageValueForIncrementalFeatureError",e.MemberInvitationError="MemberInvitationError",e.MemberNotFound="MemberNotFound",e.MeteringNotAvailableForFeatureType="MeteringNotAvailableForFeatureType",e.NoFeatureEntitlementInSubscription="NoFeatureEntitlementInSubscription",e.PackageAlreadyPublished="PackageAlreadyPublished",e.PlanAlreadyExtended="PlanAlreadyExtended",e.PlanNotFound="PlanNotFound",e.PlansCircularDependencyError="PlansCircularDependencyError",e.PriceNotFound="PriceNotFound",e.SubscriptionNotFound="SubscriptionNotFound",e.TrialsNotAllowedInProduct="TrialsNotAllowedInProduct",e.UnPublishedPackage="UnPublishedPackage",e.UncompatibleSubscriptionAddon="UncompatibleSubscriptionAddon",e.UnexpectedError="UnexpectedError",e.UnsupportedFeatureType="UnsupportedFeatureType",e.UnsupportedVendorIdentifier="UnsupportedVendorIdentifier"}(g||(g={})),function(e){e.AddonCreated="ADDON_CREATED",e.AddonDeleted="ADDON_DELETED",e.AddonUpdated="ADDON_UPDATED",e.CustomerCreated="CUSTOMER_CREATED",e.CustomerDeleted="CUSTOMER_DELETED",e.CustomerUpdated="CUSTOMER_UPDATED",e.EntitlementDenied="ENTITLEMENT_DENIED",e.EntitlementGranted="ENTITLEMENT_GRANTED",e.EntitlementRequested="ENTITLEMENT_REQUESTED",e.FeatureCreated="FEATURE_CREATED",e.FeatureDeleted="FEATURE_DELETED",e.FeatureUpdated="FEATURE_UPDATED",e.MeasurementReported="MEASUREMENT_REPORTED",e.PackagePublished="PACKAGE_PUBLISHED",e.PlanCreated="PLAN_CREATED",e.PlanDeleted="PLAN_DELETED",e.PlanUpdated="PLAN_UPDATED",e.PromotionalEntitlementExpired="PROMOTIONAL_ENTITLEMENT_EXPIRED",e.PromotionalEntitlementGranted="PROMOTIONAL_ENTITLEMENT_GRANTED",e.PromotionalEntitlementRevoked="PROMOTIONAL_ENTITLEMENT_REVOKED",e.PromotionalEntitlementUpdated="PROMOTIONAL_ENTITLEMENT_UPDATED",e.SubscriptionCanceled="SUBSCRIPTION_CANCELED",e.SubscriptionCreated="SUBSCRIPTION_CREATED",e.SubscriptionExpired="SUBSCRIPTION_EXPIRED",e.SubscriptionTrialConverted="SUBSCRIPTION_TRIAL_CONVERTED",e.SubscriptionTrialEndsSoon="SUBSCRIPTION_TRIAL_ENDS_SOON",e.SubscriptionTrialExpired="SUBSCRIPTION_TRIAL_EXPIRED",e.SubscriptionTrialStarted="SUBSCRIPTION_TRIAL_STARTED",e.SubscriptionUpdated="SUBSCRIPTION_UPDATED"}(b||(b={})),function(e){e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.FeatureStatus="featureStatus",e.FeatureType="featureType",e.Id="id",e.MeterType="meterType",e.RefId="refId",e.UpdatedAt="updatedAt"}(E||(E={})),function(e){e.Active="ACTIVE",e.New="NEW",e.Suspended="SUSPENDED"}(_||(_={})),function(e){e.Boolean="BOOLEAN",e.Number="NUMBER"}(w||(w={})),function(e){e.CreatedAt="createdAt",e.Endpoint="endpoint",e.EnvironmentId="environmentId",e.Id="id",e.Status="status"}(O||(O={})),function(e){e.Active="ACTIVE",e.Inactive="INACTIVE"}(T||(T={})),function(e){e.EnvironmentId="environmentId",e.Id="id",e.VendorIdentifier="vendorIdentifier"}(I||(I={})),function(e){e.Id="id"}(x||(x={})),function(e){e.Invited="INVITED",e.Registered="REGISTERED"}(S||(S={})),function(e){e.Fluctuating="Fluctuating",e.Incremental="Incremental",e.None="None"}(D||(D={})),function(e){e.StartOfTheMonth="StartOfTheMonth",e.SubscriptionStart="SubscriptionStart"}(A||(A={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id",e.PackageId="packageId",e.UpdatedAt="updatedAt"}(k||(k={})),function(e){e.Draft="DRAFT",e.Published="PUBLISHED"}(N||(N={})),function(e){e.BillingId="billingId",e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.Id="id",e.IsLatest="isLatest",e.ProductId="productId",e.RefId="refId",e.Status="status",e.UpdatedAt="updatedAt",e.VersionNumber="versionNumber"}(P||(P={})),function(e){e.BillingModel="billingModel",e.BillingPeriod="billingPeriod",e.Id="id"}(F||(F={})),function(e){e.CreatedAt="createdAt",e.Description="description",e.DisplayName="displayName",e.EnvironmentId="environmentId",e.Id="id",e.IsDefaultProduct="isDefaultProduct",e.RefId="refId",e.UpdatedAt="updatedAt"}(R||(R={})),function(e){e.Custom="CUSTOM",e.Lifetime="LIFETIME",e.OneMonth="ONE_MONTH",e.OneWeek="ONE_WEEK",e.OneYear="ONE_YEAR",e.SixMonth="SIX_MONTH"}(C||(C={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id",e.Status="status",e.UpdatedAt="updatedAt"}(j||(j={})),function(e){e.Active="Active",e.Expired="Expired",e.Paused="Paused"}(M||(M={})),function(e){e.AllCustomers="ALL_CUSTOMERS",e.NewCustomers="NEW_CUSTOMERS"}(L||(L={})),function(e){e.Asc="ASC",e.Desc="DESC"}(U||(U={})),function(e){e.NullsFirst="NULLS_FIRST",e.NullsLast="NULLS_LAST"}(q||(q={})),function(e){e.Id="id",e.Quantity="quantity",e.UpdatedAt="updatedAt"}(V||(V={})),function(e){e.EndOfBillingPeriod="END_OF_BILLING_PERIOD",e.Immediate="IMMEDIATE"}(B||(B={})),function(e){e.CancelSubscription="CANCEL_SUBSCRIPTION",e.DowngradeToFree="DOWNGRADE_TO_FREE"}(Q||(Q={})),function(e){e.Id="id",e.UpdatedAt="updatedAt",e.UsageLimit="usageLimit"}(z||(z={})),function(e){e.Active="ACTIVE",e.Canceled="CANCELED",e.Expired="EXPIRED",e.InTrial="IN_TRIAL",e.NotStarted="NOT_STARTED"}(W||(W={})),function(e){e.Day="DAY",e.Month="MONTH"}(G||(G={})),function(e){e.CreatedAt="createdAt",e.EnvironmentId="environmentId",e.Id="id"}(K||(K={})),function(e){e.Stripe="STRIPE",e.Zuora="ZUORA"}($||($={})),function(e){e.EveryFriday="EveryFriday",e.EveryMonday="EveryMonday",e.EverySaturday="EverySaturday",e.EverySunday="EverySunday",e.EveryThursday="EveryThursday",e.EveryTuesday="EveryTuesday",e.EveryWednesday="EveryWednesday",e.SubscriptionStart="SubscriptionStart"}(Y||(Y={})),function(e){e.InvalidFeatureType="InvalidFeatureType",e.CustomerNotFound="CustomerNotFound",e.FeatureNotFound="FeatureNotFound",e.NoActiveSubscriptions="NoActiveSubscriptions",e.CustomerNotEntitledForFeature="CustomerNotEntitledForFeature",e.RequestedUsageExceedsLimit="RequestedUsageExceedsLimit",e.Unknown="Unknown"}(J||(J={})),function(e){e.Boolean="Boolean",e.Numeric="Numeric"}(H||(H={})),function(e){e.Fluctuating="Fluctuating",e.Incremental="Incremental",e.None="None"}(X||(X={})),function(e){e.Daily="Daily",e.Hourly="Hourly",e.Monthly="Monthly",e.Weekly="Weekly"}(Z||(Z={}));var te={isFallback:!0,hasAccess:!1,accessDeniedReason:J.Unknown},ne={isFallback:!0,hasAccess:!1,isUnlimited:!1,accessDeniedReason:J.Unknown},re={isFallback:!0,hasAccess:!1,isUnlimited:!1,currentUsage:0,requestedUsage:1,accessDeniedReason:J.Unknown},ie=function(){function e(e){Object.assign(this,e)}return e.prototype.getActiveSubscriptions=function(){return this.subscriptions.filter((function(e){return e.status===W.Active}))},e.prototype.getActiveTrials=function(){return this.subscriptions.filter((function(e){return e.status===W.InTrial}))},e.prototype.getActivePromotionalEntitlements=function(){return this.promotionalEntitlements.filter((function(e){return e.status===M.Active}))},e}(),oe=function(e,t){return oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},oe(e,t)};function ae(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}oe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var se=function(){return se=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},se.apply(this,arguments)};function ue(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function ce(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function le(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function fe(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function pe(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}Object.create,Object.create;const de=/\r\n|[\n\r]/g;function he(e,t){let n=0,r=1;for(const i of e.body.matchAll(de)){if("number"==typeof i.index||pe(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function ye(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?n:0,u=t.column+s,c=`${e.name}:${a}:${u}\n`,l=r.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){const e=Math.floor(u/80),t=u%80,n=[];for(let e=0;e<f.length;e+=80)n.push(f.slice(e,e+80));return c+ve([[`${a} |`,n[0]],...n.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",n[e+1]]])}return c+ve([[a-1+" |",l[i-1]],[`${a} |`,f],["|","^".padStart(u)],[`${a+1} |`,l[i+1]]])}function ve(e){const t=e.filter((([e,t])=>void 0!==t)),n=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(n)+(t?" "+t:""))).join("\n")}class me extends Error{constructor(e,t,n,r,i,o,a){var s,u,c;super(e),this.name="GraphQLError",this.path=null!=i?i:void 0,this.originalError=null!=o?o:void 0,this.nodes=ge(Array.isArray(t)?t:t?[t]:void 0);const l=ge(null===(s=this.nodes)||void 0===s?void 0:s.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=n?n:null==l||null===(u=l[0])||void 0===u?void 0:u.source,this.positions=null!=r?r:null==l?void 0:l.map((e=>e.start)),this.locations=r&&n?r.map((e=>he(n,e))):null==l?void 0:l.map((e=>he(e.source,e.start)));const f="object"==typeof(p=null==o?void 0:o.extensions)&&null!==p?null==o?void 0:o.extensions:void 0;var p;this.extensions=null!==(c=null!=a?a:f)&&void 0!==c?c:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=o&&o.stack?Object.defineProperty(this,"stack",{value:o.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,me):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+="\n\n"+ye((t=n.loc).source,he(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+ye(this.source,t);var t;return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function ge(e){return void 0===e||0===e.length?void 0:e}function be(e,t,n){return new me(`Syntax Error: ${n}`,void 0,e,[t])}let Ee;var _e;(_e=Ee||(Ee={})).NAME="Name",_e.DOCUMENT="Document",_e.OPERATION_DEFINITION="OperationDefinition",_e.VARIABLE_DEFINITION="VariableDefinition",_e.SELECTION_SET="SelectionSet",_e.FIELD="Field",_e.ARGUMENT="Argument",_e.FRAGMENT_SPREAD="FragmentSpread",_e.INLINE_FRAGMENT="InlineFragment",_e.FRAGMENT_DEFINITION="FragmentDefinition",_e.VARIABLE="Variable",_e.INT="IntValue",_e.FLOAT="FloatValue",_e.STRING="StringValue",_e.BOOLEAN="BooleanValue",_e.NULL="NullValue",_e.ENUM="EnumValue",_e.LIST="ListValue",_e.OBJECT="ObjectValue",_e.OBJECT_FIELD="ObjectField",_e.DIRECTIVE="Directive",_e.NAMED_TYPE="NamedType",_e.LIST_TYPE="ListType",_e.NON_NULL_TYPE="NonNullType",_e.SCHEMA_DEFINITION="SchemaDefinition",_e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",_e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",_e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",_e.FIELD_DEFINITION="FieldDefinition",_e.INPUT_VALUE_DEFINITION="InputValueDefinition",_e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",_e.UNION_TYPE_DEFINITION="UnionTypeDefinition",_e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",_e.ENUM_VALUE_DEFINITION="EnumValueDefinition",_e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",_e.DIRECTIVE_DEFINITION="DirectiveDefinition",_e.SCHEMA_EXTENSION="SchemaExtension",_e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",_e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",_e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",_e.UNION_TYPE_EXTENSION="UnionTypeExtension",_e.ENUM_TYPE_EXTENSION="EnumTypeExtension",_e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";class we{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Oe{constructor(e,t,n,r,i,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Te={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Ie=new Set(Object.keys(Te));function xe(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&Ie.has(t)}let Se,De;var Ae;function ke(e){return Ne(e,[])}function Ne(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:Ne(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,i=[];for(let r=0;r<n;++r)i.push(Ne(e[r],t));return 1===r?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const r=n.map((([e,n])=>e+": "+Ne(n,t)));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function Pe(e,t){if(!Boolean(e))throw new Error(t)}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(Se||(Se={})),(Ae=De||(De={})).SOF="<SOF>",Ae.EOF="<EOF>",Ae.BANG="!",Ae.DOLLAR="$",Ae.AMP="&",Ae.PAREN_L="(",Ae.PAREN_R=")",Ae.SPREAD="...",Ae.COLON=":",Ae.EQUALS="=",Ae.AT="@",Ae.BRACKET_L="[",Ae.BRACKET_R="]",Ae.BRACE_L="{",Ae.PIPE="|",Ae.BRACE_R="}",Ae.NAME="Name",Ae.INT="Int",Ae.FLOAT="Float",Ae.STRING="String",Ae.BLOCK_STRING="BlockString",Ae.COMMENT="Comment";class Fe{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||Pe(!1,`Body must be a string. Received: ${ke(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Pe(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Pe(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}let Re;function Ce(e){const t=e.split(/\r\n|[\n\r]/g),n=function(e){var t;let n=!0,r=!0,i=0,o=null;for(let t=0;t<e.length;++t)switch(e.charCodeAt(t)){case 13:10===e.charCodeAt(t+1)&&++t;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===o||i<o)&&(o=i),r=!1}return null!==(t=o)&&void 0!==t?t:0}(e);if(0!==n)for(let e=1;e<t.length;e++)t[e]=t[e].slice(n);let r=0;for(;r<t.length&&je(t[r]);)++r;let i=t.length;for(;i>r&&je(t[i-1]);)--i;return t.slice(r,i).join("\n")}function je(e){for(const t of e)if(" "!==t&&"\t"!==t)return!1;return!0}function Me(e){return e>=48&&e<=57}function Le(e){return e>=97&&e<=122||e>=65&&e<=90}function Ue(e){return Le(e)||95===e}!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(Re||(Re={}));class qe{constructor(e){const t=new Oe(De.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==De.EOF)do{if(e.next)e=e.next;else{const t=Ke(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===De.COMMENT);return e}}function Ve(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Be(e,t){return Qe(e.charCodeAt(t))&&ze(e.charCodeAt(t+1))}function Qe(e){return e>=55296&&e<=56319}function ze(e){return e>=56320&&e<=57343}function We(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return De.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Ge(e,t,n,r,i){const o=e.line,a=1+n-e.lineStart;return new Oe(t,n,r,o,a,i)}function Ke(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const t=n.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return $e(e,i);case 33:return Ge(e,De.BANG,i,i+1);case 36:return Ge(e,De.DOLLAR,i,i+1);case 38:return Ge(e,De.AMP,i,i+1);case 40:return Ge(e,De.PAREN_L,i,i+1);case 41:return Ge(e,De.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return Ge(e,De.SPREAD,i,i+3);break;case 58:return Ge(e,De.COLON,i,i+1);case 61:return Ge(e,De.EQUALS,i,i+1);case 64:return Ge(e,De.AT,i,i+1);case 91:return Ge(e,De.BRACKET_L,i,i+1);case 93:return Ge(e,De.BRACKET_R,i,i+1);case 123:return Ge(e,De.BRACE_L,i,i+1);case 124:return Ge(e,De.PIPE,i,i+1);case 125:return Ge(e,De.BRACE_R,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?rt(e,i):He(e,i)}if(Me(t)||45===t)return Ye(e,i,t);if(Ue(t))return it(e,i);throw be(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Ve(t)||Be(n,i)?`Unexpected character: ${We(e,i)}.`:`Invalid character: ${We(e,i)}.`)}return Ge(e,De.EOF,r,r)}function $e(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(10===e||13===e)break;if(Ve(e))++i;else{if(!Be(n,i))break;i+=2}}return Ge(e,De.COMMENT,t,i,n.slice(t+1,i))}function Ye(e,t,n){const r=e.source.body;let i=t,o=n,a=!1;if(45===o&&(o=r.charCodeAt(++i)),48===o){if(o=r.charCodeAt(++i),Me(o))throw be(e.source,i,`Invalid number, unexpected digit after 0: ${We(e,i)}.`)}else i=Je(e,i,o),o=r.charCodeAt(i);if(46===o&&(a=!0,o=r.charCodeAt(++i),i=Je(e,i,o),o=r.charCodeAt(i)),69!==o&&101!==o||(a=!0,o=r.charCodeAt(++i),43!==o&&45!==o||(o=r.charCodeAt(++i)),i=Je(e,i,o),o=r.charCodeAt(i)),46===o||Ue(o))throw be(e.source,i,`Invalid number, expected digit but got: ${We(e,i)}.`);return Ge(e,a?De.FLOAT:De.INT,t,i,r.slice(t,i))}function Je(e,t,n){if(!Me(n))throw be(e.source,t,`Invalid number, expected digit but got: ${We(e,t)}.`);const r=e.source.body;let i=t+1;for(;Me(r.charCodeAt(i));)++i;return i}function He(e,t){const n=e.source.body,r=n.length;let i=t+1,o=i,a="";for(;i<r;){const r=n.charCodeAt(i);if(34===r)return a+=n.slice(o,i),Ge(e,De.STRING,t,i+1,a);if(92!==r){if(10===r||13===r)break;if(Ve(r))++i;else{if(!Be(n,i))throw be(e.source,i,`Invalid character within String: ${We(e,i)}.`);i+=2}}else{a+=n.slice(o,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?Xe(e,i):Ze(e,i):nt(e,i);a+=t.value,i+=t.size,o=i}}throw be(e.source,i,"Unterminated string.")}function Xe(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const e=n.charCodeAt(t+i++);if(125===e){if(i<5||!Ve(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|tt(e),r<0)break}throw be(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Ze(e,t){const n=e.source.body,r=et(n,t+2);if(Ve(r))return{value:String.fromCodePoint(r),size:6};if(Qe(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=et(n,t+8);if(ze(e))return{value:String.fromCodePoint(r,e),size:12}}throw be(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function et(e,t){return tt(e.charCodeAt(t))<<12|tt(e.charCodeAt(t+1))<<8|tt(e.charCodeAt(t+2))<<4|tt(e.charCodeAt(t+3))}function tt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function nt(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw be(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function rt(e,t){const n=e.source.body,r=n.length,i=e.line,o=1+t-e.lineStart;let a=t+3,s=a,u="";for(;a<r;){const r=n.charCodeAt(a);if(34===r&&34===n.charCodeAt(a+1)&&34===n.charCodeAt(a+2))return u+=n.slice(s,a),new Oe(De.BLOCK_STRING,t,a+3,i,o,Ce(u));if(92!==r||34!==n.charCodeAt(a+1)||34!==n.charCodeAt(a+2)||34!==n.charCodeAt(a+3))if(10!==r&&13!==r)if(Ve(r))++a;else{if(!Be(n,a))throw be(e.source,a,`Invalid character within String: ${We(e,a)}.`);a+=2}else 13===r&&10===n.charCodeAt(a+1)?a+=2:++a,++e.line,e.lineStart=a;else u+=n.slice(s,a)+'"""',a+=4,s=a}throw be(e.source,a,"Unterminated string.")}function it(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r&&(Le(o=n.charCodeAt(i))||Me(o)||95===o);)++i;var o;return Ge(e,De.NAME,t,i,n.slice(t,i))}class ot{constructor(e,t){const n=function(e){return e instanceof Fe}(e)?e:new Fe(e);this._lexer=new qe(n),this._options=t}parseName(){const e=this.expectToken(De.NAME);return this.node(e,{kind:Ee.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Ee.DOCUMENT,definitions:this.many(De.SOF,this.parseDefinition,De.EOF)})}parseDefinition(){if(this.peek(De.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===De.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw be(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(De.BRACE_L))return this.node(e,{kind:Ee.OPERATION_DEFINITION,operation:Se.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(De.NAME)&&(n=this.parseName()),this.node(e,{kind:Ee.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(De.NAME);switch(e.value){case"query":return Se.QUERY;case"mutation":return Se.MUTATION;case"subscription":return Se.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(De.PAREN_L,this.parseVariableDefinition,De.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Ee.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(De.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(De.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(De.DOLLAR),this.node(e,{kind:Ee.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Ee.SELECTION_SET,selections:this.many(De.BRACE_L,this.parseSelection,De.BRACE_R)})}parseSelection(){return this.peek(De.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(De.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:Ee.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(De.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(De.PAREN_L,t,De.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(De.COLON),this.node(t,{kind:Ee.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(De.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(De.NAME)?this.node(e,{kind:Ee.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:Ee.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){var e;const t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacyFragmentVariables)?this.node(t,{kind:Ee.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:Ee.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case De.BRACKET_L:return this.parseList(e);case De.BRACE_L:return this.parseObject(e);case De.INT:return this._lexer.advance(),this.node(t,{kind:Ee.INT,value:t.value});case De.FLOAT:return this._lexer.advance(),this.node(t,{kind:Ee.FLOAT,value:t.value});case De.STRING:case De.BLOCK_STRING:return this.parseStringLiteral();case De.NAME:switch(this._lexer.advance(),t.value){case"true":return this.node(t,{kind:Ee.BOOLEAN,value:!0});case"false":return this.node(t,{kind:Ee.BOOLEAN,value:!1});case"null":return this.node(t,{kind:Ee.NULL});default:return this.node(t,{kind:Ee.ENUM,value:t.value})}case De.DOLLAR:if(e){if(this.expectToken(De.DOLLAR),this._lexer.token.kind===De.NAME){const e=this._lexer.token.value;throw be(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable()}throw this.unexpected()}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this._lexer.advance(),this.node(e,{kind:Ee.STRING,value:e.value,block:e.kind===De.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:Ee.LIST,values:this.any(De.BRACKET_L,(()=>this.parseValueLiteral(e)),De.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:Ee.OBJECT,fields:this.any(De.BRACE_L,(()=>this.parseObjectField(e)),De.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(De.COLON),this.node(t,{kind:Ee.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(De.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(De.AT),this.node(t,{kind:Ee.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(De.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(De.BRACKET_R),t=this.node(e,{kind:Ee.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(De.BANG)?this.node(e,{kind:Ee.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:Ee.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(De.STRING)||this.peek(De.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(De.BRACE_L,this.parseOperationTypeDefinition,De.BRACE_R);return this.node(e,{kind:Ee.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(De.COLON);const n=this.parseNamedType();return this.node(e,{kind:Ee.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:Ee.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Ee.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(De.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(De.BRACE_L,this.parseFieldDefinition,De.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(De.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:Ee.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(De.PAREN_L,this.parseInputValueDef,De.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(De.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(De.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:Ee.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Ee.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:Ee.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(De.EQUALS)?this.delimitedMany(De.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:Ee.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(De.BRACE_L,this.parseEnumValueDefinition,De.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:Ee.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw be(this._lexer.source,this._lexer.token.start,`${at(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:Ee.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(De.BRACE_L,this.parseInputValueDef,De.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===De.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(De.BRACE_L,this.parseOperationTypeDefinition,De.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Ee.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:Ee.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Ee.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:Ee.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ee.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ee.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Ee.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(De.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:Ee.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(De.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Re,t.value))return t;throw this.unexpected(e)}node(e,t){var n;return!0!==(null===(n=this._options)||void 0===n?void 0:n.noLocation)&&(t.loc=new we(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw be(this._lexer.source,t.start,`Expected ${st(e)}, found ${at(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this._lexer.advance(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==De.NAME||t.value!==e)throw be(this._lexer.source,t.start,`Expected "${e}", found ${at(t)}.`);this._lexer.advance()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===De.NAME&&t.value===e&&(this._lexer.advance(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return be(this._lexer.source,t.start,`Unexpected ${at(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}}function at(e){const t=e.value;return st(e.kind)+(null!=t?` "${t}"`:"")}function st(e){return function(e){return e===De.BANG||e===De.DOLLAR||e===De.AMP||e===De.PAREN_L||e===De.PAREN_R||e===De.SPREAD||e===De.COLON||e===De.EQUALS||e===De.AT||e===De.BRACKET_L||e===De.BRACKET_R||e===De.BRACE_L||e===De.PIPE||e===De.BRACE_R}(e)?`"${e}"`:e}var ut=new Map,ct=new Map,lt=!0,ft=!1;function pt(e){return e.replace(/[\s,]+/g," ").trim()}function dt(e){var t,n,r,i=pt(e);if(!ut.has(i)){var o=function(e,t){return new ot(e,t).parseDocument()}(e,{experimentalFragmentVariables:ft,allowLegacyFragmentVariables:ft});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");ut.set(i,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}((t=o,n=new Set,r=[],t.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,i=pt((a=e.loc).source.body.substring(a.start,a.end)),o=ct.get(t);o&&!o.has(i)?lt&&console.warn("Warning: fragment with name "+t+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||ct.set(t,o=new Set),o.add(i),n.has(i)||(n.add(i),r.push(e))}else r.push(e);var a})),se(se({},t),{definitions:r}))))}return ut.get(i)}function ht(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach((function(t,n){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[n+1]})),dt(r)}var yt,vt=ht;(yt=ht||(ht={})).gql=vt,yt.resetCaches=function(){ut.clear(),ct.clear()},yt.disableFragmentWarnings=function(){lt=!1},yt.enableExperimentalFragmentVariables=function(){ft=!0},yt.disableExperimentalFragmentVariables=function(){ft=!1},ht.default=ht;var mt,gt,bt,Et=ht(mt||(gt=["\n fragment PriceFragment on Price {\n billingModel\n billingPeriod\n price {\n amount\n currency\n }\n feature {\n featureUnits\n featureUnitsPlural\n displayName\n }\n }\n"],bt=["\n fragment PriceFragment on Price {\n billingModel\n billingPeriod\n price {\n amount\n currency\n }\n feature {\n featureUnits\n featureUnitsPlural\n displayName\n }\n }\n"],Object.defineProperty?Object.defineProperty(gt,"raw",{value:bt}):gt.raw=bt,mt=gt)),_t=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},wt=ht(xt||(xt=_t(["\n fragment PackageEntitlementFragment on PackageEntitlement {\n usageLimit\n hasUnlimitedUsage\n featureId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"],["\n fragment PackageEntitlementFragment on PackageEntitlement {\n usageLimit\n hasUnlimitedUsage\n featureId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"]))),Ot=ht(St||(St=_t(["\n fragment AddonFragment on Addon {\n refId\n displayName\n description\n entitlements {\n ...PackageEntitlementFragment\n }\n }\n"],["\n fragment AddonFragment on Addon {\n refId\n displayName\n description\n entitlements {\n ...PackageEntitlementFragment\n }\n }\n"]))),Tt=ht(Dt||(Dt=_t(["\n fragment PlanFragment on Plan {\n id\n refId\n description\n displayName\n product {\n refId\n displayName\n }\n basePlan {\n id\n refId\n displayName\n }\n entitlements {\n ...PackageEntitlementFragment\n }\n inheritedEntitlements {\n ...PackageEntitlementFragment\n }\n compatibleAddons {\n ...AddonFragment\n }\n prices {\n ...PriceFragment\n }\n defaultTrialConfig {\n duration\n units\n }\n }\n ","\n ","\n ","\n"],["\n fragment PlanFragment on Plan {\n id\n refId\n description\n displayName\n product {\n refId\n displayName\n }\n basePlan {\n id\n refId\n displayName\n }\n entitlements {\n ...PackageEntitlementFragment\n }\n inheritedEntitlements {\n ...PackageEntitlementFragment\n }\n compatibleAddons {\n ...AddonFragment\n }\n prices {\n ...PriceFragment\n }\n defaultTrialConfig {\n duration\n units\n }\n }\n ","\n ","\n ","\n"])),wt,Et,Ot);const It=function(){function e(e){this.client=e}return e.prototype.getPlans=function(e){return this.client.query({query:ht(At||(At=_t(["\n query GetPlans($paging: CursorPaging, $filter: PlanFilter, $sorting: [PlanSort!]) {\n plans(paging: $paging, filter: $filter, sorting: $sorting) {\n edges {\n node {\n ...PlanFragment\n }\n }\n }\n }\n ","\n "],["\n query GetPlans($paging: CursorPaging, $filter: PlanFilter, $sorting: [PlanSort!]) {\n plans(paging: $paging, filter: $filter, sorting: $sorting) {\n edges {\n node {\n ...PlanFragment\n }\n }\n }\n }\n ","\n "])),Tt),variables:{paging:{first:50},filter:{status:{eq:N.Published},isLatest:{is:!0},product:e?{refId:{eq:e}}:{}},sorting:[{field:P.RefId,direction:U.Asc}]}})},e}();var xt,St,Dt,At,kt=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Nt=ht(Ct||(Ct=kt(["\n fragment SubscriptionFragment on CustomerSubscription {\n id\n startDate\n endDate\n status\n refId\n prices {\n usageLimit\n price {\n ...PriceFragment\n }\n }\n plan {\n id\n refId\n displayName\n description\n product {\n refId\n displayName\n }\n entitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n inheritedEntitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n packageId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n prices {\n ...PriceFragment\n }\n }\n addons {\n id\n quantity\n addon {\n id\n refId\n displayName\n description\n entitlements {\n usageLimit\n hasUnlimitedUsage\n featureId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n }\n }\n }\n ","\n"],["\n fragment SubscriptionFragment on CustomerSubscription {\n id\n startDate\n endDate\n status\n refId\n prices {\n usageLimit\n price {\n ...PriceFragment\n }\n }\n plan {\n id\n refId\n displayName\n description\n product {\n refId\n displayName\n }\n entitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n inheritedEntitlements {\n usageLimit\n featureId\n hasUnlimitedUsage\n packageId\n resetPeriod\n packageId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n prices {\n ...PriceFragment\n }\n }\n addons {\n id\n quantity\n addon {\n id\n refId\n displayName\n description\n entitlements {\n usageLimit\n hasUnlimitedUsage\n featureId\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n }\n }\n }\n ","\n"])),Et),Pt=ht(jt||(jt=kt(["\n fragment PromotionalEntitlementFragment on PromotionalEntitlement {\n status\n usageLimit\n featureId\n hasUnlimitedUsage\n resetPeriod\n endDate\n isVisible\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"],["\n fragment PromotionalEntitlementFragment on PromotionalEntitlement {\n status\n usageLimit\n featureId\n hasUnlimitedUsage\n resetPeriod\n endDate\n isVisible\n feature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n displayName\n description\n refId\n }\n }\n"]))),Ft=ht(Mt||(Mt=kt(["\n fragment CustomerFragment on Customer {\n id\n name\n email\n createdAt\n updatedAt\n refId\n promotionalEntitlements {\n ...PromotionalEntitlementFragment\n }\n subscriptions {\n ...SubscriptionFragment\n }\n }\n ","\n ","\n"],["\n fragment CustomerFragment on Customer {\n id\n name\n email\n createdAt\n updatedAt\n refId\n promotionalEntitlements {\n ...PromotionalEntitlementFragment\n }\n subscriptions {\n ...SubscriptionFragment\n }\n }\n ","\n ","\n"])),Nt,Pt);const Rt=function(){function e(e){this.client=e}return e.prototype.getCustomer=function(e){return this.client.query({query:ht(Lt||(Lt=kt(["\n query GetCustomerByRefId($filter: CustomerFilter) {\n customers(filter: $filter) {\n edges {\n node {\n ...CustomerFragment\n }\n }\n }\n }\n ","\n "],["\n query GetCustomerByRefId($filter: CustomerFilter) {\n customers(filter: $filter) {\n edges {\n node {\n ...CustomerFragment\n }\n }\n }\n }\n ","\n "])),Ft),variables:{filter:{refId:{eq:e}}},fetchPolicy:"network-only"})},e}();var Ct,jt,Mt,Lt;const Ut=function(e){this.paywall=new It(e),this.customers=new Rt(e)};var qt=n(1609),Vt=n.n(qt),Bt=n(2492),Qt=n.n(Bt);function zt(e){var t=e.customerId;if(!t||Vt()(t))throw new Error("You must set customer ID first, use setCustomerId function or pass it via the constructor");return t}var Wt=n(5161),Gt=n.n(Wt),Kt=n(9734),$t=n.n(Kt),Yt=function(){return Yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Yt.apply(this,arguments)},Jt=function(){function e(){}return e.prototype.mapBooleanEntitlement=function(e,t){return{isFallback:!1,hasAccess:t.hasAccess,accessDeniedReason:t.accessDeniedReason,feature:e.calculatedEntitlement.feature?Yt(Yt({},e.calculatedEntitlement.feature),{isMetered:!1}):void 0}},e.prototype.mapNumericEntitlement=function(e,t){var n=e.calculatedEntitlement,r=n.hasUnlimitedUsage,i=n.usageLimit;return{isFallback:!1,hasAccess:t.hasAccess,accessDeniedReason:t.accessDeniedReason,isUnlimited:r,value:i||void 0,feature:e.calculatedEntitlement.feature?Yt(Yt({},e.calculatedEntitlement.feature),{isMetered:!1}):void 0}},e.prototype.mapMeteredEntitlement=function(e,t,n){var r=e.calculatedEntitlement,i=r.hasUnlimitedUsage,o=r.usageLimit,a=r.feature,s=e.featureUsage,u=s.currentUsage,c=s.nextResetDate,l=s.resetPeriod,f=null;return a&&a.featureType===H.Numeric&&a.meterType===D.Incremental&&l&&(f={nextResetDate:c,resetPeriod:l}),{isFallback:!1,hasAccess:t.hasAccess,accessDeniedReason:t.accessDeniedReason,isUnlimited:i,usageLimit:o||void 0,currentUsage:u,requestedUsage:n||0,resetSettings:f||void 0,feature:e.calculatedEntitlement.feature?Yt(Yt({},e.calculatedEntitlement.feature),{meterType:e.calculatedEntitlement.feature.meterType||void 0,isMetered:!0}):void 0}},e.prototype.mapEntitlement=function(e,t,n){var r=e.calculatedEntitlement;if(!r.feature)return this.mapBooleanEntitlement(e,t);var i=r.feature,o=i.featureType,a=i.meterType,s=o===H.Numeric&&(a===D.Incremental||a===D.Fluctuating);switch(o){case H.Boolean:return this.mapBooleanEntitlement(e,t);case H.Numeric:return s?this.mapMeteredEntitlement(e,t,n):this.mapNumericEntitlement(e,t)}},e.prototype.mapFeatureType=function(e){switch(e){case w.Boolean:return H.Boolean;case w.Number:return H.Numeric}},e.prototype.mapEntitlementResetPeriod=function(e){switch(e){case v.Day:return Z.Daily;case v.Hour:return Z.Hourly;case v.Week:return Z.Weekly;case v.Month:return Z.Monthly}},e.prototype.mapCachedEntitlement=function(e,t,n){var r;return e.feature&&(r={id:e.feature.refId,featureType:this.mapFeatureType(e.feature.featureType),meterType:e.feature.meterType||void 0,units:e.feature.featureUnits||void 0,unitsPlural:e.feature.featureUnitsPlural||void 0,displayName:e.feature.displayName,description:e.feature.description||""}),{calculatedEntitlement:{usageLimit:e.usageLimit,hasUnlimitedUsage:e.hasUnlimitedUsage,feature:r},featureUsage:{resetPeriod:e.resetPeriod?this.mapEntitlementResetPeriod(e.resetPeriod):void 0,resetPeriodConfiguration:e.resetPeriodConfiguration,currentUsage:t||e.currentUsage||0,nextResetDate:n||e.nextResetDate}}},e.prototype.mapCachedEntitlements=function(e){var t=this;return new Map(e.map((function(e){var n;return[(null===(n=e.feature)||void 0===n?void 0:n.refId)||"",t.mapCachedEntitlement(e)]})))},e.prototype.mapPlans=function(e){var t=this,n=e.plans.edges.map((function(e){return e.node}));return this.sortPlans(n).map((function(e,n){return t.mapPlan(e,n)}))},e.prototype.mapCustomer=function(e){var t=this;return new ie({id:e.refId,name:e.name||void 0,email:e.email||void 0,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt),subscriptions:Gt()(e.subscriptions,(function(e){return t.mapSubscription(e)})),promotionalEntitlements:Gt()(e.promotionalEntitlements,(function(e){return t.mapPromotionalEntitlement(e)}))})},e.prototype.mapPrice=function(e){var t=e.feature,n=e.price,r={pricingModel:e.billingModel,billingPeriod:e.billingPeriod,amount:n.amount,currency:n.currency};return t&&(r.feature={displayName:t.displayName,units:t.featureUnits,unitsPlural:t.featureUnitsPlural}),r},e.prototype.mapPlan=function(e,t){var n,r,i=this;return void 0===t&&(t=0),{id:e.refId,order:t,displayName:e.displayName,description:e.description,basePlan:e.basePlan?{id:e.basePlan.refId,displayName:e.basePlan.displayName}:void 0,entitlements:Gt()($t()(e.entitlements,(function(e){return e.feature.refId})),(function(e){return i.mapPackageEntitlement(e)})),inheritedEntitlements:Gt()($t()(e.inheritedEntitlements,(function(e){return e.feature.refId})),(function(e){return i.mapPackageEntitlement(e)})),pricePoints:Gt()(e.prices,(function(e){return i.mapPrice(e)})),defaultTrialConfig:e.defaultTrialConfig,compatibleAddons:null!==(r=null===(n=e.compatibleAddons)||void 0===n?void 0:n.map((function(e){return i.mapAddon(e)})))&&void 0!==r?r:[],product:{id:e.product.refId,displayName:e.product.displayName}}},e.prototype.mapPackageEntitlement=function(e){var t=e.feature;return{usageLimit:e.usageLimit||0,feature:{id:t.refId,featureType:this.mapFeatureType(t.featureType),description:t.description||"",meterType:t.meterType||void 0,units:t.featureUnits||void 0,unitsPlural:t.featureUnitsPlural||void 0,displayName:t.displayName,isMetered:t.meterType===D.Fluctuating||t.meterType===D.Incremental},hasUnlimitedUsage:e.hasUnlimitedUsage,resetPeriod:e.resetPeriod?this.mapEntitlementResetPeriod(e.resetPeriod):void 0}},e.prototype.mapPromotionalEntitlement=function(e){var t=e.feature;return{status:e.status,usageLimit:e.usageLimit||0,feature:{id:t.refId,displayName:t.displayName,description:t.description||"",featureType:this.mapFeatureType(t.featureType),meterType:t.meterType||void 0,units:t.featureUnits||void 0,unitsPlural:t.featureUnitsPlural||void 0,isMetered:t.meterType===D.Fluctuating||t.meterType===D.Incremental},hasUnlimitedUsage:e.hasUnlimitedUsage,expiresAt:e.endDate,hasExpirationDate:!!e.endDate,isVisible:e.isVisible}},e.prototype.mapSubscription=function(e){var t,n=this,r=(e.prices||[])[0];return{id:e.refId,status:e.status,plan:this.mapPlan(e.plan),price:r?this.mapPrice(r.price):null,addons:(null===(t=e.addons)||void 0===t?void 0:t.map((function(e){var t=e.quantity,r=e.addon;return{quantity:t,addon:n.mapAddon(r)}})))||[],startDate:new Date(e.startDate),endDate:e.endDate&&new Date(e.endDate)}},e.prototype.mapAddon=function(e){var t=this;return{id:e.refId,displayName:e.displayName,description:e.description||"",entitlements:Gt()(e.entitlements,(function(e){return t.mapPackageEntitlement(e)}))}},e.prototype.sortPlans=function(e){var t=$t()(e.filter((function(e){return!e.basePlan})),(function(e){return e.refId})),n=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],t,!0);function r(e,t,n){var i=$t()(t.filter((function(t){var n;return(null===(n=t.basePlan)||void 0===n?void 0:n.refId)===e})),(function(e){return e.refId}));n.push.apply(n,i),n.length!==t.length&&i.forEach((function(e){return r(e.refId,t,n)}))}return t.forEach((function(t){return r(t.refId,e,n)})),n},e}(),Ht="Invariant Violation",Xt=Object.setPrototypeOf,Zt=void 0===Xt?function(e,t){return e.__proto__=t,e}:Xt,en=function(e){function t(n){void 0===n&&(n=Ht);var r=e.call(this,"number"==typeof n?Ht+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=Ht,Zt(r,t.prototype),r}return ae(t,e),t}(Error);function tn(e,t){if(!e)throw new en(t)}var nn=["debug","log","warn","error","silent"],rn=nn.indexOf("log");function on(e){return function(){if(nn.indexOf(e)>=rn){var t=console[e]||console.log;return t.apply(console,arguments)}}}function an(e){try{return e()}catch(e){}}!function(e){e.debug=on("debug"),e.log=on("log"),e.warn=on("warn"),e.error=on("error")}(tn||(tn={}));const sn=an((function(){return globalThis}))||an((function(){return window}))||an((function(){return self}))||an((function(){return n.g}))||an((function(){return Function("return this")()}));var un="__",cn=[un,un].join("DEV");const ln=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(sn,cn,{value:"production"!==an((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),sn[cn]}}();function fn(e){try{return e()}catch(e){}}var pn=fn((function(){return globalThis}))||fn((function(){return window}))||fn((function(){return self}))||fn((function(){return n.g}))||fn((function(){return Function("return this")()})),dn=!1;function hn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vn(e,t,n){return t&&yn(e.prototype,t),n&&yn(e,n),e}!pn||fn((function(){return"production"}))||fn((function(){return process}))||(Object.defineProperty(pn,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),dn=!0),dn&&(delete pn.process,dn=!1),__DEV__?tn("boolean"==typeof ln,ln):tn("boolean"==typeof ln,38);var mn=function(){return"function"==typeof Symbol},gn=function(e){return mn()&&Boolean(Symbol[e])},bn=function(e){return gn(e)?Symbol[e]:"@@"+e};mn()&&!gn("observable")&&(Symbol.observable=Symbol("observable"));var En=bn("iterator"),_n=bn("observable"),wn=bn("species");function On(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function Tn(e){var t=e.constructor;return void 0!==t&&null===(t=t[wn])&&(t=void 0),void 0!==t?t:Rn}function In(e){return e instanceof Rn}function xn(e){xn.log?xn.log(e):setTimeout((function(){throw e}))}function Sn(e){Promise.resolve().then((function(){try{e()}catch(e){xn(e)}}))}function Dn(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=On(t,"unsubscribe");n&&n.call(t)}}catch(e){xn(e)}}function An(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function kn(e,t,n){e._state="running";var r=e._observer;try{var i=On(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(An(e),!i)throw n;i.call(r,n);break;case"complete":An(e),i&&i.call(r)}}catch(e){xn(e)}"closed"===e._state?Dn(e):"running"===e._state&&(e._state="ready")}function Nn(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void Sn((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(kn(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)}))):void kn(e,t,n);e._queue.push({type:t,value:n})}}var Pn=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new Fn(this);try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(An(this),Dn(this))},vn(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),Fn=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){Nn(this._subscription,"next",e)},t.error=function(e){Nn(this._subscription,"error",e)},t.complete=function(){Nn(this._subscription,"complete")},vn(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Rn=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new Pn(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(n,r){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),n()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(Tn(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(Tn(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=Tn(this),r=arguments.length>1,i=!1,o=arguments[1],a=o;return new n((function(n){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||r)try{a=e(a,t)}catch(e){return n.error(e)}else a=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(a),n.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Tn(this);return new i((function(t){var r,o=0;return function e(a){r=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===n.length?(r=void 0,t.complete()):e(i.from(n[o++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=Tn(this);return new n((function(r){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var o=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){r.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[_n]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=On(t,_n);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return In(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(gn("iterator")&&(r=On(t,En)))return new n((function(e){Sn((function(){if(!e.closed){for(var n,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return hn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.call(t));!(n=i()).done;){var o=n.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){Sn((function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i="function"==typeof this?this:e;return new i((function(e){Sn((function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}}))}))},vn(e,null,[{key:wn,get:function(){return this}}]),e}();function Cn(e){return null!==e&&"object"==typeof e}function jn(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new en("Found a "+e.operation+" operation"+(e.name?" named '"+e.name.value+"'":"")+". No operations are allowed when using a fragment as a query. Only fragments are allowed."):new en(43);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&(__DEV__?tn(1===r.length,"Found "+r.length+" fragments. `fragmentName` must be provided when there is not exactly 1 fragment."):tn(1===r.length,44),n=r[0].name.value),se(se({},e),{definitions:fe([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)})}function Mn(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function Ln(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=t&&t[e.name.value];return __DEV__?tn(n,"No fragment named "+e.name.value+"."):tn(n,45),n;default:return null}}function Un(e){return{__ref:String(e)}}function qn(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function Vn(e,t,n,r){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var i={};n.fields.map((function(e){return Vn(i,e.name,e.value,r)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(n)){var o=(r||{})[n.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return Vn(n,t,e,r),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw __DEV__?new en('The inline argument "'+t.value+'" of kind "'+n.kind+'"is not supported. Use variables instead of inline arguments to overcome this limitation.'):new en(54);e[t.value]=null}}mn()&&Object.defineProperty(Rn,Symbol("extensions"),{value:{symbol:_n,hostReportError:xn},configurable:!0});var Bn=["connection","include","skip","client","rest","export"],Qn=Object.assign((function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach((function(e){i[e]=t[e]})),n.connection.key+"("+zn(i)+")"}return n.connection.key}var o=e;if(t){var a=zn(t);o+="("+a+")"}return n&&Object.keys(n).forEach((function(e){-1===Bn.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?o+="@"+e+"("+zn(n[e])+")":o+="@"+e)})),o}),{setStringify:function(e){var t=zn;return zn=e,t}}),zn=function(e){return JSON.stringify(e,Wn)};function Wn(e,t){return Cn(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{})),t}function Gn(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return Vn(n,r,i,t)})),n}return null}function Kn(e){return e.alias?e.alias.value:e.name.value}function $n(e,t,n){if("string"==typeof e.__typename)return e.__typename;for(var r=0,i=t.selections;r<i.length;r++){var o=i[r];if(Yn(o)){if("__typename"===o.name.value)return e[Kn(o)]}else{var a=$n(e,Ln(o,n).selectionSet,n);if("string"==typeof a)return a}}}function Yn(e){return"Field"===e.kind}function Jn(e){return"InlineFragment"===e.kind}function Hn(e){__DEV__?tn(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):tn(e&&"Document"===e.kind,46);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new en('Schema type definitions not allowed in queries. Found: "'+e.kind+'"'):new en(47);return e}));return __DEV__?tn(t.length<=1,"Ambiguous GraphQL document: contains "+t.length+" operations"):tn(t.length<=1,48),e}function Xn(e){return Hn(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function Zn(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function er(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function tr(e){var t=Xn(e);return __DEV__?tn(t&&"query"===t.operation,"Must contain a query definition."):tn(t&&"query"===t.operation,49),t}function nr(e){var t;Hn(e);for(var n=0,r=e.definitions;n<r.length;n++){var i=r[n];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new en("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new en(53)}function rr(e){var t=Object.create(null),n=e&&e.variableDefinitions;return n&&n.length&&n.forEach((function(e){e.defaultValue&&Vn(t,e.variable.name,e.defaultValue)})),t}function ir(e,t){return t?t(e):Rn.of()}function or(e){return"function"==typeof e?new ur(e):e}function ar(e){return e.request.length<=1}var sr=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return ae(t,e),t}(Error),ur=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return Rn.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(or).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var i=or(n),o=or(r||new e(ir));return ar(i)&&ar(o)?new e((function(e){return t(e)?i.request(e)||Rn.of():o.request(e)||Rn.of()})):new e((function(e,n){return t(e)?i.request(e,n)||Rn.of():o.request(e,n)||Rn.of()}))},e.execute=function(e,t){return e.request(function(e,t){var n=se({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n=se(se({},n),"function"==typeof e?e(n):e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return se({},n)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?Zn(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(t.indexOf(i)<0)throw __DEV__?new en("illegal argument: "+i):new en(26)}return e}(t))))||Rn.of()},e.concat=function(t,n){var r=or(t);if(ar(r))return __DEV__&&tn.warn(new sr("You are calling concat on a terminating link, which will have no effect",r)),r;var i=or(n);return ar(i)?new e((function(e){return r.request(e,(function(e){return i.request(e)||Rn.of()}))||Rn.of()})):new e((function(e,t){return r.request(e,(function(e){return i.request(e,t)||Rn.of()}))||Rn.of()}))},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(ir)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new en("request is not implemented"):new en(21)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}();const cr=Object.freeze({});function lr(e,t,n=Te){const r=new Map;for(const e of Object.values(Ee))r.set(e,fr(t,e));let i,o,a,s,u=Array.isArray(e),c=[e],l=-1,f=[];const p=[],d=[];let h=e;do{l++;const e=l===c.length,g=e&&0!==f.length;if(e){if(a=0===d.length?void 0:p[p.length-1],o=s,s=d.pop(),g)if(u){o=o.slice();let e=0;for(const[t,n]of f){const r=t-e;null===n?(o.splice(r,1),e++):o[r]=n}}else{o=Object.defineProperties({},Object.getOwnPropertyDescriptors(o));for(const[e,t]of f)o[e]=t}l=i.index,c=i.keys,f=i.edits,u=i.inArray,i=i.prev}else{if(a=s?u?l:c[l]:void 0,o=s?s[a]:h,null==o)continue;s&&p.push(a)}let b;if(!Array.isArray(o)){var y,v;xe(o)||Pe(!1,`Invalid AST Node: ${ke(o)}.`);const n=e?null===(y=r.get(o.kind))||void 0===y?void 0:y.leave:null===(v=r.get(o.kind))||void 0===v?void 0:v.enter;if(b=null==n?void 0:n.call(t,o,a,s,p,d),b===cr)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(f.push([a,b]),!e)){if(!xe(b)){p.pop();continue}o=b}}var m;void 0===b&&g&&f.push([a,o]),e?p.pop():(i={inArray:u,index:l,keys:c,edits:f,prev:i},u=Array.isArray(o),c=u?o:null!==(m=n[o.kind])&&void 0!==m?m:[],l=-1,f=[],s&&d.push(s),s=o)}while(void 0!==i);return 0!==f.length&&(h=f[f.length-1][1]),h}function fr(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}var pr=function(e,t){var n;try{n=JSON.stringify(e)}catch(e){var r=__DEV__?new en("Network request failed. "+t+" is not serializable: "+e.message):new en(23);throw r.parseError=e,r}return n},dr=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},hr=Object.prototype.hasOwnProperty;const yr=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function vr(e){return mr[e.charCodeAt(0)]}const mr=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function gr(e){return lr(e,br)}const br={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Er(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=wr("(",Er(e.variableDefinitions,", "),")"),n=Er([e.operation,Er([e.name,t]),Er(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+wr(" = ",n)+wr(" ",Er(r," "))},SelectionSet:{leave:({selections:e})=>_r(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=wr("",e,": ")+t;let a=o+wr("(",Er(n,", "),")");return a.length>80&&(a=o+wr("(\n",Or(Er(n,"\n")),"\n)")),Er([a,Er(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+wr(" ",Er(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Er(["...",wr("on ",e),Er(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${wr("(",Er(n,", "),")")} on ${t} ${wr("",Er(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t=!1){const n=!e.includes("\n"),r=e.startsWith(" ")||e.startsWith("\t"),i=e.endsWith('"'),o=e.endsWith("\\"),a=!n||i||o||t;let s="";return!a||n&&r||(s+="\n"),s+=e,a&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}(e):`"${e.replace(yr,vr)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Er(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Er(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+wr("(",Er(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>wr("",e,"\n")+Er(["schema",Er(t," "),_r(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>wr("",e,"\n")+Er(["scalar",t,Er(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>wr("",e,"\n")+Er(["type",t,wr("implements ",Er(n," & ")),Er(r," "),_r(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>wr("",e,"\n")+t+(Tr(n)?wr("(\n",Or(Er(n,"\n")),"\n)"):wr("(",Er(n,", "),")"))+": "+r+wr(" ",Er(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>wr("",e,"\n")+Er([t+": "+n,wr("= ",r),Er(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>wr("",e,"\n")+Er(["interface",t,wr("implements ",Er(n," & ")),Er(r," "),_r(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>wr("",e,"\n")+Er(["union",t,Er(n," "),wr("= ",Er(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>wr("",e,"\n")+Er(["enum",t,Er(n," "),_r(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>wr("",e,"\n")+Er([t,Er(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>wr("",e,"\n")+Er(["input",t,Er(n," "),_r(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>wr("",e,"\n")+"directive @"+t+(Tr(n)?wr("(\n",Or(Er(n,"\n")),"\n)"):wr("(",Er(n,", "),")"))+(r?" repeatable":"")+" on "+Er(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Er(["extend schema",Er(e," "),_r(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Er(["extend scalar",e,Er(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Er(["extend type",e,wr("implements ",Er(t," & ")),Er(n," "),_r(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Er(["extend interface",e,wr("implements ",Er(t," & ")),Er(n," "),_r(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Er(["extend union",e,Er(t," "),wr("= ",Er(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Er(["extend enum",e,Er(t," "),_r(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Er(["extend input",e,Er(t," "),_r(n)]," ")}};function Er(e,t=""){var n;return null!==(n=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==n?n:""}function _r(e){return wr("{\n",Or(Er(e,"\n")),"\n}")}function wr(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function Or(e){return wr(" ",e.replace(/\n/g,"\n "))}function Tr(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var Ir={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}};function xr(e){if(e){var t=Object.create(null);return Object.keys(Object(e)).forEach((function(n){t[n.toLowerCase()]=e[n]})),t}return e}function Sr(e){return new Rn((function(t){t.error(e)}))}var Dr=an((function(){return fetch})),Ar=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,function(e){void 0===e&&(e={});var t=e.uri,n=void 0===t?"/graphql":t,r=e.fetch,i=e.includeExtensions,o=e.useGETForQueries,a=e.includeUnusedVariables,s=void 0!==a&&a,u=ue(e,["uri","fetch","includeExtensions","useGETForQueries","includeUnusedVariables"]);__DEV__&&function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new en("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new en(22)}(r||Dr);var c={http:{includeExtensions:i},options:u.fetchOptions,credentials:u.credentials,headers:u.headers};return new ur((function(e){var t=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")}(e,n),i=e.getContext(),a={};if(i.clientAwareness){var u=i.clientAwareness,l=u.name,f=u.version;l&&(a["apollographql-client-name"]=l),f&&(a["apollographql-client-version"]=f)}var p,d=se(se({},a),i.headers),h={http:i.http,options:i.fetchOptions,credentials:i.credentials,headers:d},y=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=se(se({},t.options),{headers:t.headers,credentials:t.credentials}),o=t.http||{};n.forEach((function(e){i=se(se(se({},i),e.options),{headers:se(se({},i.headers),xr(e.headers))}),e.credentials&&(i.credentials=e.credentials),o=se(se({},o),e.http)}));var a=e.operationName,s=e.extensions,u=e.variables,c=e.query,l={operationName:a,variables:u};return o.includeExtensions&&(l.extensions=s),o.includeQuery&&(l.query=gr(c)),{options:i,body:l}}(e,Ir,c,h),v=y.options,m=y.body;if(m.variables&&!s){var g=new Set(Object.keys(m.variables));lr(e.query,{Variable:function(e,t,n){n&&"VariableDefinition"!==n.kind&&g.delete(e.name.value)}}),g.size&&(m.variables=se({},m.variables),g.forEach((function(e){delete m.variables[e]})))}if(!v.signal){var b=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}}(),E=b.controller,_=b.signal;(p=E)&&(v.signal=_)}if(o&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(v.method="GET"),"GET"===v.method){var w=function(e,t){var n=[],r=function(e,t){n.push(e+"="+encodeURIComponent(t))};if("query"in t&&r("query",t.query),t.operationName&&r("operationName",t.operationName),t.variables){var i=void 0;try{i=pr(t.variables,"Variables map")}catch(e){return{parseError:e}}r("variables",i)}if(t.extensions){var o=void 0;try{o=pr(t.extensions,"Extensions map")}catch(e){return{parseError:e}}r("extensions",o)}var a="",s=e,u=e.indexOf("#");-1!==u&&(a=e.substr(u),s=e.substr(0,u));var c=-1===s.indexOf("?")?"?":"&";return{newURI:s+c+n.join("&")+a}}(t,m),O=w.newURI,T=w.parseError;if(T)return Sr(T);t=O}else try{v.body=pr(m,"Payload")}catch(T){return Sr(T)}return new Rn((function(n){var i;return(r||an((function(){return fetch}))||Dr)(t,v).then((function(t){return e.setContext({response:t}),t})).then((i=e,function(e){return e.text().then((function(t){try{return JSON.parse(t)}catch(r){var n=r;throw n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,n}})).then((function(t){return e.status>=300&&dr(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||hr.call(t,"data")||hr.call(t,"errors")||dr(e,t,"Server response was missing for query '"+(Array.isArray(i)?i.map((function(e){return e.operationName})):i.operationName)+"'."),t}))})).then((function(e){return n.next(e),n.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){p&&p.abort()}}))}))}(t).request)||this;return n.options=t,n}return ae(t,e),t}(ur),kr=ur.execute;function Nr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var r=e[t];void 0!==r&&(n[t]=r)}))})),n}var Pr=Object.prototype,Fr=Pr.toString,Rr=Pr.hasOwnProperty,Cr=Function.prototype.toString,jr=new Map;function Mr(e,t){try{return Lr(e,t)}finally{jr.clear()}}function Lr(e,t){if(e===t)return!0;var n,r,i,o=Fr.call(e);if(o!==Fr.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Br(e,t))return!0;var a=Ur(e),s=Ur(t),u=a.length;if(u!==s.length)return!1;for(var c=0;c<u;++c)if(!Rr.call(t,a[c]))return!1;for(c=0;c<u;++c){var l=a[c];if(!Lr(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==""+t;case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(Br(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var d=f.next();if(d.done)break;var h=d.value,y=h[0],v=h[1];if(!t.has(y))return!1;if(p&&!Lr(v,t.get(y)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var g=Cr.call(e);return g===Cr.call(t)&&(r=Vr,!((i=(n=g).length-r.length)>=0&&n.indexOf(r,i)===i))}return!1}function Ur(e){return Object.keys(e).filter(qr,e)}function qr(e){return void 0!==this[e]}var Vr="{ [native code] }";function Br(e,t){var n=jr.get(e);if(n){if(n.has(t))return!0}else jr.set(e,n=new Set);return n.add(t),!1}var Qr,zr,Wr=function(){return Object.create(null)},Gr=Array.prototype,Kr=Gr.forEach,$r=Gr.slice,Yr=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=Wr),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return Kr.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData($r.call(e)))},e.prototype.getChildTrie=function(t){var n=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),r=n.get(t);return r||n.set(t,r=new e(this.weakness,this.makeData)),r},e}(),Jr="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),Hr="function"==typeof WeakSet,Xr="function"==typeof Symbol&&"function"==typeof Symbol.for,Zr=function(){function e(){this.known=new(Hr?WeakSet:Set),this.pool=new Yr(Jr),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return Cn(e)&&this.known.has(e)},e.prototype.pass=function(e){if(Cn(e)){var t=function(e){return Cn(e)?Array.isArray(e)?e.slice(0):se({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(Cn(e)){var n=this.passes.get(e);if(n)return n;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var r=e.map(this.admit,this);return(s=this.pool.lookupArray(r)).array||(this.known.add(s.array=r),__DEV__&&Object.freeze(r)),s.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],a=this.sortedKeys(e);o.push(a.json);var s,u=o.length;if(a.sorted.forEach((function(n){o.push(t.admit(e[n]))})),!(s=this.pool.lookupArray(o)).object){var c=s.object=Object.create(i);this.known.add(c),a.sorted.forEach((function(e,t){c[e]=o[u+t]})),__DEV__&&Object.freeze(c)}return s.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}(),ei=Object.assign((function(e){if(Cn(e)){void 0===Qr&&ti();var t=Qr.admit(e),n=zr.get(t);return void 0===n&&zr.set(t,n=JSON.stringify(t)),n}return JSON.stringify(e)}),{reset:ti});function ti(){Qr=new Zr,zr=new(Jr?WeakMap:Map)}function ni(e,t,n){return new Rn((function(r){var i=r.next,o=r.error,a=r.complete,s=0,u=!1,c={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++s;var n=function(){return e(t)};c=c.then(n,n).then((function(e){--s,i&&i.call(r,e),u&&f.complete()}),(function(e){throw--s,e})).catch((function(e){o&&o.call(r,e)}))}:function(e){return t&&t.call(r,e)}}var f={next:l(t,i),error:l(n,o),complete:function(){u=!0,s||a&&a.call(r)}},p=e.subscribe(f);return function(){return p.unsubscribe()}}))}function ri(e){return e.errors&&e.errors.length>0||!1}function ii(e,t,n){var r=0;return e.forEach((function(n,i){t.call(this,n,i,e)&&(e[r++]=n)}),n),e.length=r,e}var oi={kind:"Field",name:{kind:"Name",value:"__typename"}};function ai(e,t){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&ai(t[e.name.value],t)}))}function si(e){return ai(Xn(e)||function(e){__DEV__?tn("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):tn("Document"===e.kind,50),__DEV__?tn(e.definitions.length<=1,"Fragment must have exactly one definition."):tn(e.definitions.length<=1,51);var t=e.definitions[0];return __DEV__?tn("FragmentDefinition"===t.kind,"Must be a fragment definition."):tn("FragmentDefinition"===t.kind,52),t}(e),Mn(er(e)))?null:e}function ui(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function ci(e,t){var n=Object.create(null),r=[],i=Object.create(null),o=[],a=si(lr(t,{Variable:{enter:function(e,t,r){"VariableDefinition"!==r.kind&&(n[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&e.some((function(e){return e.remove}))&&t.directives&&t.directives.some(ui(e)))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&r.push({name:e.value.name.value})})),t.selectionSet&&pi(t.selectionSet).forEach((function(e){o.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){i[e.name.value]=!0}},Directive:{enter:function(t){if(ui(e)(t))return null}}}));return a&&ii(r,(function(e){return!!e.name&&!n[e.name]})).length&&(a=function(e,t){var n=function(e){return function(t){return e.some((function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))}))}}(e);return si(lr(t,{OperationDefinition:{enter:function(t){return se(se({},t),{variableDefinitions:t.variableDefinitions?t.variableDefinitions.filter((function(t){return!e.some((function(e){return e.name===t.variable.name.value}))})):[]})}},Field:{enter:function(t){if(e.some((function(e){return e.remove}))){var r=0;if(t.arguments&&t.arguments.forEach((function(e){n(e)&&(r+=1)})),1===r)return null}}},Argument:{enter:function(e){if(n(e))return null}}}))}(r,a)),a&&ii(o,(function(e){return!!e.name&&!i[e.name]})).length&&(a=function(e,t){function n(t){if(e.some((function(e){return e.name===t.name.value})))return null}return si(lr(t,{FragmentSpread:{enter:n},FragmentDefinition:{enter:n}}))}(o,a)),a}var li=Object.assign((function(e){return lr(Hn(e),{SelectionSet:{enter:function(e,t,n){if(!n||"OperationDefinition"!==n.kind){var r=e.selections;if(r&&!r.some((function(e){return Yn(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=n;if(!(Yn(i)&&i.directives&&i.directives.some((function(e){return"export"===e.name.value}))))return se(se({},e),{selections:fe(fe([],r,!0),[oi],!1)})}}}}})}),{added:function(e){return e===oi}}),fi={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&tn.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function pi(e){var t=[];return e.selections.forEach((function(e){(Yn(e)||Jn(e))&&e.selectionSet?pi(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function di(e){return"query"===nr(e).operation?e:lr(e,{OperationDefinition:{enter:function(e){return se(se({},e),{operation:"query"})}}})}function hi(e,t){var n=e.directives;return!n||!n.length||function(e){var t=[];return e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var n=e.arguments,r=e.name.value;__DEV__?tn(n&&1===n.length,"Incorrect number of arguments for the @"+r+" directive."):tn(n&&1===n.length,40);var i=n[0];__DEV__?tn(i.name&&"if"===i.name.value,"Invalid argument for the @"+r+" directive."):tn(i.name&&"if"===i.name.value,41);var o=i.value;__DEV__?tn(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @"+r+" directive must be a variable or a boolean value."):tn(o&&("Variable"===o.kind||"BooleanValue"===o.kind),42),t.push({directive:e,ifArgument:i})}})),t}(n).every((function(e){var n=e.directive,r=e.ifArgument,i=!1;return"Variable"===r.value.kind?(i=t&&t[r.value.name.value],__DEV__?tn(void 0!==i,"Invalid variable referenced in @"+n.name.value+" directive."):tn(void 0!==i,39)):i=r.value.value,"skip"===n.name.value?!i:i}))}function yi(e,t){return function(e){var t=[];return lr(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function vi(e){return e&&yi(["client"],e)&&yi(["export"],e)}var mi=new Map;function gi(e){var t=mi.get(e)||1;return mi.set(e,t+1),e+":"+t+":"+Math.random().toString(36).slice(2)}function bi(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function Ei(e){function t(t){Object.defineProperty(e,t,{value:Rn})}return Xr&&Symbol.species&&t(Symbol.species),t("@@species"),e}function _i(e){return e&&"function"==typeof e.then}var wi=function(e){function t(t){var n=e.call(this,(function(e){return n.addObserver(e),function(){return n.removeObserver(e)}}))||this;return n.observers=new Set,n.addCount=0,n.promise=new Promise((function(e,t){n.resolve=e,n.reject=t})),n.handlers={next:function(e){null!==n.sub&&(n.latest=["next",e],bi(n.observers,"next",e))},error:function(e){var t=n.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),n.sub=null,n.latest=["error",e],n.reject(e),bi(n.observers,"error",e))},complete:function(){if(null!==n.sub){var e=n.sources.shift();e?_i(e)?e.then((function(e){return n.sub=e.subscribe(n.handlers)})):n.sub=e.subscribe(n.handlers):(n.sub=null,n.latest&&"next"===n.latest[0]?n.resolve(n.latest[1]):n.resolve(),bi(n.observers,"complete"))}}},n.cancel=function(e){n.reject(e),n.sources=[],n.handlers.complete()},n.promise.catch((function(e){})),"function"==typeof t&&(t=[new Rn(t)]),_i(t)?t.then((function(e){return n.start(e)}),n.handlers.error):n.start(t),n}return ae(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],n=e[t];n&&n.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e),++this.addCount)},t.prototype.removeObserver=function(e,t){this.observers.delete(e)&&--this.addCount<1&&!t&&this.handlers.error(new Error("Observable cancelled prematurely"))},t.prototype.cleanup=function(e){var t=this,n=!1,r=function(){n||(n=!0,t.observers.delete(i),e())},i={next:r,error:r,complete:r},o=this.addCount;this.addObserver(i),this.addCount=o},t}(Rn);function Oi(e){return Array.isArray(e)&&e.length>0}Ei(wi);var Ti,Ii=function(e){function t(n){var r,i,o=n.graphQLErrors,a=n.clientErrors,s=n.networkError,u=n.errorMessage,c=n.extraInfo,l=e.call(this,u)||this;return l.graphQLErrors=o||[],l.clientErrors=a||[],l.networkError=s||null,l.message=u||(i="",(Oi((r=l).graphQLErrors)||Oi(r.clientErrors))&&(r.graphQLErrors||[]).concat(r.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+=t+"\n"})),r.networkError&&(i+=r.networkError.message+"\n"),i=i.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return ae(t,e),t}(Error);function xi(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(Ti||(Ti={}));var Si=Object.prototype.toString;function Di(e){return Ai(e)}function Ai(e,t){switch(Si.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach((function(e,r){n[r]=Ai(e,t)})),n;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach((function(n){r[n]=Ai(e[n],t)})),r;default:return e}}var ki=Object.assign,Ni=Object.hasOwnProperty,Pi=!1,Fi=function(e){function t(t){var n=t.queryManager,r=t.queryInfo,i=t.options,o=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=Ri)}catch(e){}var n=!o.observers.size;o.observers.add(e);var r=o.last;return r&&r.error?e.error&&e.error(r.error):r&&r.result&&e.next&&e.next(r.result),n&&o.reobserve().catch((function(){})),function(){o.observers.delete(e)&&!o.observers.size&&o.tearDownQuery()}}))||this;o.observers=new Set,o.subscriptions=new Set,o.isTornDown=!1,o.options=i,o.queryId=r.queryId||n.generateQueryId();var a=Xn(i.query);return o.queryName=a&&a.name&&a.name.value,o.initialFetchPolicy=i.fetchPolicy||"cache-first",o.queryManager=n,o.queryInfo=r,o}return ae(t,e),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:n},i=e.subscribe(r)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),n=this.queryInfo.networkStatus||t&&t.networkStatus||Ti.ready,r=se(se({},t),{loading:xi(n),networkStatus:n}),i=this.options.fetchPolicy,o=void 0===i?"cache-first":i;if((t||"network-only"!==o&&"no-cache"!==o&&"standby"!==o)&&!this.queryManager.transform(this.options.query).hasForcedResolvers){var a=this.queryInfo.getDiff();(a.complete||this.options.returnPartialData)&&(r.data=a.result),Mr(r.data,{})&&(r.data=void 0),a.complete?(r.networkStatus!==Ti.loading||"cache-first"!==o&&"cache-only"!==o||(r.networkStatus=Ti.ready,r.loading=!1),delete r.partial):"no-cache"!==o&&(r.partial=!0),!__DEV__||a.complete||this.options.partialRefetch||r.loading||r.data||r.error||Ci(a.missing)}return e&&this.updateLastResult(r),r},t.prototype.isDifferentFromLastResult=function(e){return!this.last||!Mr(this.last.result,e)},t.prototype.getLast=function(e,t){var n=this.last;if(n&&n[e]&&(!t||Mr(n.variables,this.variables)))return n[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,n={pollInterval:0},r=this.options.fetchPolicy;if("no-cache"===r?n.fetchPolicy="no-cache":"cache-and-network"!==r&&(n.fetchPolicy="network-only"),__DEV__&&e&&Ni.call(e,"variables")){var i=tr(this.options.query),o=i.variableDefinitions;o&&o.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&tn.warn("Called refetch("+JSON.stringify(e)+") for query "+((null===(t=i.name)||void 0===t?void 0:t.value)||JSON.stringify(i))+", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?")}return e&&!Mr(this.options.variables,e)&&(n.variables=this.options.variables=se(se({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(n,Ti.refetch)},t.prototype.fetchMore=function(e){var t=this,n=se(se({},e.query?e:se(se(se({},this.options),e),{variables:se(se({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),r=this.queryManager.generateQueryId();return n.notifyOnNetworkStatusChange&&(this.queryInfo.networkStatus=Ti.fetchMore,this.observe()),this.queryManager.fetchQuery(r,n,Ti.fetchMore).then((function(r){var i=r.data,o=e.updateQuery;return o?(__DEV__&&!Pi&&(__DEV__&&tn.warn("The updateQuery callback for fetchMore is deprecated, and will be removed\nin the next major version of Apollo Client.\n\nPlease convert updateQuery functions to field policies with appropriate\nread and merge functions, or use/adapt a helper function (such as\nconcatPagination, offsetLimitPagination, or relayStylePagination) from\n@apollo/client/utilities.\n\nThe field policy system handles pagination more effectively than a\nhand-written updateQuery function, and you only need to define the policy\nonce, rather than every time you call fetchMore."),Pi=!0),t.updateQuery((function(e){return o(e,{fetchMoreResult:i,variables:n.variables})}))):t.queryManager.cache.writeQuery({query:n.query,variables:n.variables,data:i}),r})).finally((function(){t.queryManager.stopQuery(r),t.reobserve()}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var i=t.variables;return r(e,{subscriptionData:n,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&tn.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return Mr(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.initialFetchPolicy,variables:e},Ti.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});n&&(t.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,n=this.options.pollInterval;if(n){if(!t||t.interval!==n){__DEV__?tn(n,"Attempted to start a polling query without a polling interval."):tn(n,12),(t||(this.pollingInfo={})).interval=n;var r=function(){e.pollingInfo&&(xi(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"network-only"},Ti.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(r,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=se(se({},this.last),{result:this.queryManager.assumeImmutableResults?e:Di(e),variables:t}),Oi(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var n=this;this.isTornDown=!1;var r=t===Ti.refetch||t===Ti.fetchMore||t===Ti.poll,i=this.options.variables,o=r?Nr(this.options,e):ki(this.options,Nr(e));r||(this.updatePolling(),e&&e.variables&&!e.fetchPolicy&&!Mr(e.variables,i)&&(o.fetchPolicy=this.initialFetchPolicy,void 0===t&&(t=Ti.setVariables)));var a=o.variables&&se({},o.variables),s=this.fetch(o,t),u={next:function(e){n.reportResult(e,a)},error:function(e){n.reportError(e,a)}};return r||(this.concast&&this.observer&&this.concast.removeObserver(this.observer,!0),this.concast=s,this.observer=u),s.addObserver(u),s.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){(this.getLastError()||this.isDifferentFromLastResult(e))&&(this.updateLastResult(e,t),bi(this.observers,"next",e))},t.prototype.reportError=function(e,t){var n=se(se({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:Ti.error,loading:!1});this.updateLastResult(n,t),bi(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Rn);function Ri(e){__DEV__&&tn.error("Unhandled error",e.message,e.stack)}function Ci(e){__DEV__&&Oi(e)&&__DEV__&&tn.debug("Missing cache result fields: "+e.map((function(e){return e.path.join(".")})).join(", "),e)}Ei(Fi);var ji=Object.prototype.hasOwnProperty;function Mi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Li(e)}function Li(e){var t=e[0]||{},n=e.length;if(n>1)for(var r=new qi,i=1;i<n;++i)t=r.merge(t,e[i]);return t}var Ui=function(e,t,n){return this.merge(e[n],t[n])},qi=function(){function e(e){void 0===e&&(e=Ui),this.reconciler=e,this.isObject=Cn,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var n=this,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return Cn(t)&&Cn(e)?(Object.keys(t).forEach((function(i){if(ji.call(e,i)){var o=e[i];if(t[i]!==o){var a=n.reconciler.apply(n,fe([e,t,i],r,!1));a!==o&&((e=n.shallowCopyForMerge(e))[i]=a)}}else(e=n.shallowCopyForMerge(e))[i]=t[i]})),e):t},e.prototype.shallowCopyForMerge=function(e){return Cn(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):se({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)),e},e}(),Vi=null,Bi={},Qi=1,zi="@wry/context:Slot",Wi=Array,Gi=Wi[zi]||function(){var e=function(){function e(){this.id=["slot",Qi++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=Vi;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Bi)break;return e!==Vi&&(Vi.slots[this.id]=t),!0}return Vi&&(Vi.slots[this.id]=Bi),!1},e.prototype.getValue=function(){if(this.hasValue())return Vi.slots[this.id]},e.prototype.withValue=function(e,t,n,r){var i,o=((i={__proto__:null})[this.id]=e,i),a=Vi;Vi={parent:a,slots:o};try{return t.apply(r,n)}finally{Vi=a}},e.bind=function(e){var t=Vi;return function(){var n=Vi;try{return Vi=t,e.apply(this,arguments)}finally{Vi=n}}},e.noContext=function(e,t,n){if(!Vi)return e.apply(n,t);var r=Vi;try{return Vi=null,e.apply(n,t)}finally{Vi=r}},e}();try{Object.defineProperty(Wi,zi,{value:Wi[zi]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();function Ki(){}Gi.bind,Gi.noContext;var $i,Yi=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=Ki),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,r=t.newer;r&&(r.older=n),n&&(n.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t},e.prototype.set=function(e,t){var n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),Ji=new Gi,Hi=Object.prototype.hasOwnProperty,Xi=void 0===($i=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:$i;function Zi(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var eo=[];function to(e,t){if(!e)throw new Error(t||"assertion failure")}function no(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var ro=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!ao(this))return io(this),this.value[0]},e.prototype.recompute=function(e){return to(!this.recomputing,"already recomputing"),io(this),ao(this)?function(e,t){return ho(e),Ji.withValue(e,oo,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{Zi(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,ao(e)||uo(e)}(e),no(e.value)}(this,e):no(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,so(this),Zi(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),ho(this),co(this,(function(t,n){t.setDirty(),yo(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=eo.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(Xi(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),eo.push(this.deps),this.deps=null)},e.count=0,e}();function io(e){var t=Ji.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),ao(e)?lo(t,e):fo(t,e),t}function oo(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function ao(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function so(e){co(e,lo)}function uo(e){co(e,fo)}function co(e,t){var n=e.parents.size;if(n)for(var r=Xi(e.parents),i=0;i<n;++i)t(r[i],e)}function lo(e,t){to(e.childValues.has(t)),to(ao(t));var n=!ao(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=eo.pop()||new Set;e.dirtyChildren.add(t),n&&so(e)}function fo(e,t){to(e.childValues.has(t)),to(!ao(t));var n,r,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(n=o,r=t.value,(i=n.length)>0&&i===r.length&&n[i-1]===r[i-1]||e.setDirty()),po(e,t),ao(e)||uo(e)}function po(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(eo.length<100&&eo.push(n),e.dirtyChildren=null))}function ho(e){e.childValues.size>0&&e.childValues.forEach((function(t,n){yo(e,n)})),e.forgetDeps(),to(null===e.dirtyChildren)}function yo(e,t){t.parents.delete(e),e.childValues.delete(t),po(e,t)}var vo={setDirty:!0,dispose:!0,forget:!0};function mo(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=Ji.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(Zi(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&Hi.call(vo,n)?n:"setDirty";Xi(r).forEach((function(e){return e[i]()})),t.delete(e),Zi(r)}},r}function go(){var e=new Yr("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}go();var bo=new Set;function Eo(e,t){void 0===t&&(t=Object.create(null));var n=new Yi(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=t.keyArgs,i=t.makeCacheKey||go(),o=function(){var o=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var a=n.get(o);a||(n.set(o,a=new ro(e)),a.subscribe=t.subscribe,a.forget=function(){return n.delete(o)});var s=a.recompute(Array.prototype.slice.call(arguments));return n.set(o,a),bo.add(n),Ji.hasValue()||(bo.forEach((function(e){return e.clean()})),bo.clear()),s};function a(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function u(e){return n.delete(e)}return Object.defineProperty(o,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))},o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))},o.forgetKey=u,o.forget=function(){return u(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(o)}var _o=new Gi,wo=new WeakMap;function Oo(e){var t=wo.get(e);return t||wo.set(e,t={vars:new Set,dep:mo()}),t}function To(e){Oo(e).vars.forEach((function(t){return t.forgetCache(e)}))}function Io(e){var t=new Set,n=new Set,r=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){Oo(e).dep.dirty(r),xo(e)}));var a=Array.from(n);n.clear(),a.forEach((function(t){return t(e)}))}}else{var s=_o.getValue();s&&(i(s),Oo(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),Oo(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function xo(e){e.broadcastWatches&&e.broadcastWatches()}var So=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Mi(t.resolvers,e)})):this.resolvers=Mi(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,i=e.variables,o=e.onlyRunForcedResolvers,a=void 0!==o&&o;return ce(this,void 0,void 0,(function(){return le(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,a).then((function(e){return se(se({},n),{data:e.result})}))]:[2,n]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return yi(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){Hn(e);var t=ci([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=lr(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return Yn(e)&&"__typename"===e.name.value})))return null}}})),t}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return se(se({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),ce(this,void 0,void 0,(function(){return le(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return se(se({},t),e.exportedVariables)}))]:[2,se({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return lr(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return cr}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:di(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,i,o){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===o&&(o=!1),ce(this,void 0,void 0,(function(){var a,s,u,c,l,f,p,d,h;return le(this,(function(y){return a=nr(e),s=er(e),u=Mn(s),c=a.operation,l=c?c.charAt(0).toUpperCase()+c.slice(1):"Query",p=(f=this).cache,d=f.client,h={fragmentMap:u,context:se(se({},n),{cache:p,client:d}),variables:r,fragmentMatcher:i,defaultOperationType:l,exportedVariables:{},onlyRunForcedResolvers:o},[2,this.resolveSelectionSet(a.selectionSet,t,h).then((function(e){return{result:e,exportedVariables:h.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return ce(this,void 0,void 0,(function(){var r,i,o,a,s,u=this;return le(this,(function(c){return r=n.fragmentMap,i=n.context,o=n.variables,a=[t],s=function(e){return ce(u,void 0,void 0,(function(){var s,u;return le(this,(function(c){return hi(e,o)?Yn(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&a.push(((n={})[Kn(e)]=t,n))}))]:(Jn(e)?s=e:(s=r[e.name.value],__DEV__?tn(s,"No fragment named "+e.name.value):tn(s,11)),s&&s.typeCondition&&(u=s.typeCondition.name.value,n.fragmentMatcher(t,u,i))?[2,this.resolveSelectionSet(s.selectionSet,t,n).then((function(e){a.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(s)).then((function(){return Li(a)}))]}))}))},e.prototype.resolveField=function(e,t,n){return ce(this,void 0,void 0,(function(){var r,i,o,a,s,u,c,l,f,p=this;return le(this,(function(d){return r=n.variables,i=e.name.value,o=Kn(e),a=i!==o,s=t[o]||t[i],u=Promise.resolve(s),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(c=t.__typename||n.defaultOperationType,(l=this.resolvers&&this.resolvers[c])&&(f=l[a?i:o])&&(u=Promise.resolve(_o.withValue(this.cache,f,[t,Gn(e,r),n.context,{field:e,fragmentMap:n.fragmentMap}])))),[2,u.then((function(t){return void 0===t&&(t=s),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?p.resolveSubSelectedArray(e,t,n):e.selectionSet?p.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}(),Do=new(Jr?WeakMap:Map);function Ao(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return Do.set(e,(Do.get(e)+1)%1e15),n.apply(this,arguments)})}function ko(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var No=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;Do.has(n)||(Do.set(n,0),Ao(n,"evict"),Ao(n,"modify"),Ao(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||Ti.loading;return this.variables&&this.networkStatus!==Ti.loading&&!Mr(this.variables,e.variables)&&(t=Ti.setVariables),Mr(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){ko(this),this.lastDiff=void 0,this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&Mr(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&"no-cache"===n.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||Mr(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():e.reobserve()})):delete this.oqListener)},e.prototype.notify=function(){var e=this;ko(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(xi(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var r=se(se({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&Mr(r,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=r))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===Do.get(this.cache)&&Mr(t,n.variables)&&Mr(e.data,n.result.data))},e.prototype.markResult=function(e,t,n){var r=this;this.graphQLErrors=Oi(e.errors)?e.errors:[],this.reset(),"no-cache"===t.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(t.variables)):0!==n&&(Po(e,t.errorPolicy)?this.cache.performTransaction((function(i){if(r.shouldWrite(e,t.variables))i.writeQuery({query:r.document,data:e.data,variables:t.variables,overwrite:1===n}),r.lastWrite={result:e,variables:t.variables,dmCount:Do.get(r.cache)};else if(r.lastDiff&&r.lastDiff.diff.complete)return void(e.data=r.lastDiff.diff.result);var o=r.getDiffOptions(t.variables),a=i.diff(o);r.stopped||r.updateWatch(t.variables),r.updateLastDiff(a,o),a.complete&&(e.data=a.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=Ti.ready},e.prototype.markError=function(e){return this.networkStatus=Ti.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function Po(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!ri(e);return!r&&n&&e.data&&(r=!0),r}var Fo=Object.prototype.hasOwnProperty,Ro=function(){function e(e){var t=e.cache,n=e.link,r=e.queryDeduplication,i=void 0!==r&&r,o=e.onBroadcast,a=e.ssrMode,s=void 0!==a&&a,u=e.clientAwareness,c=void 0===u?{}:u,l=e.localState,f=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Jr?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.queryDeduplication=i,this.clientAwareness=c,this.localState=l||new So({cache:t}),this.ssrMode=s,this.assumeImmutableResults=!!f,(this.onBroadcast=o)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.cancelPendingFetches(__DEV__?new en("QueryManager stopped while query was in flight"):new en(13))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,r=e.optimisticResponse,i=e.updateQueries,o=e.refetchQueries,a=void 0===o?[]:o,s=e.awaitRefetchQueries,u=void 0!==s&&s,c=e.update,l=e.onQueryUpdated,f=e.errorPolicy,p=void 0===f?"none":f,d=e.fetchPolicy,h=void 0===d?"network-only":d,y=e.keepRootFields,v=e.context;return ce(this,void 0,void 0,(function(){var e,o,s;return le(this,(function(f){switch(f.label){case 0:return __DEV__?tn(t,"mutation option is required. You must specify your GraphQL document in the mutation option."):tn(t,14),__DEV__?tn("network-only"===h||"no-cache"===h,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):tn("network-only"===h||"no-cache"===h,15),e=this.generateMutationId(),t=this.transform(t).document,n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,v)]:[3,2];case 1:n=f.sent(),f.label=2;case 2:return o=this.mutationStore&&(this.mutationStore[e]={mutation:t,variables:n,loading:!0,error:null}),r&&this.markMutationOptimistic(r,{mutationId:e,document:t,variables:n,fetchPolicy:h,errorPolicy:p,context:v,updateQueries:i,update:c,keepRootFields:y}),this.broadcastQueries(),s=this,[2,new Promise((function(f,d){return ni(s.getObservableFromLink(t,se(se({},v),{optimisticResponse:r}),n,!1),(function(f){if(ri(f)&&"none"===p)throw new Ii({graphQLErrors:f.errors});o&&(o.loading=!1,o.error=null);var d=se({},f);return"function"==typeof a&&(a=a(d)),"ignore"===p&&ri(d)&&delete d.errors,s.markMutationResult({mutationId:e,result:d,document:t,variables:n,fetchPolicy:h,errorPolicy:p,context:v,update:c,updateQueries:i,awaitRefetchQueries:u,refetchQueries:a,removeOptimistic:r?e:void 0,onQueryUpdated:l,keepRootFields:y})})).subscribe({next:function(e){s.broadcastQueries(),f(e)},error:function(t){o&&(o.loading=!1,o.error=t),r&&s.cache.removeOptimistic(e),s.broadcastQueries(),d(t instanceof Ii?t:new Ii({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var r=e.result,i=[],o="no-cache"===e.fetchPolicy;if(!o&&Po(r,e.errorPolicy)){i.push({result:r.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables});var a=e.updateQueries;a&&this.queries.forEach((function(e,o){var s=e.observableQuery,u=s&&s.queryName;if(u&&Fo.call(a,u)){var c=a[u],l=n.queries.get(o),f=l.document,p=l.variables,d=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),h=d.result;if(d.complete&&h){var y=c(h,{mutationResult:r,queryName:f&&Zn(f)||void 0,queryVariables:p});y&&i.push({result:y,dataId:"ROOT_QUERY",query:f,variables:p})}}}))}if(i.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var s=[];if(this.refetchQueries({updateCache:function(t){o||i.forEach((function(e){return t.write(e)}));var a=e.update;if(a){if(!o){var s=t.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});s.complete&&(r=se(se({},r),{data:s.result}))}a(t,r,{context:e.context,variables:e.variables})}o||e.keepRootFields||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return s.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(s).then((function(){return r}))}return Promise.resolve(r)},e.prototype.markMutationOptimistic=function(e,t){var n=this,r="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{n.markMutationResult(se(se({},t),{result:{data:r}}),e)}catch(e){__DEV__&&tn.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t,n=this.transformCache;if(!n.has(e)){var r=this.cache.transformDocument(e),i=(t=this.cache.transformForLink(r),ci([fi],Hn(t))),o=this.localState.clientQuery(r),a=i&&this.localState.serverQuery(i),s={document:r,hasClientExports:vi(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:a,defaultVars:rr(Xn(r)),asQuery:se(se({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?se(se({},e),{operation:"query"}):e}))})},u=function(e){e&&!n.has(e)&&n.set(e,s)};u(e),u(r),u(o),u(a)}return n.get(e)},e.prototype.getVariables=function(e,t){return se(se({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=se(se({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new No(this),n=new Fi({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:e.query,observableQuery:n,variables:e.variables}),n},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?tn(e.query,"query option is required. You must specify your GraphQL document in the query option."):tn(e.query,16),__DEV__?tn("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):tn("Document"===e.query.kind,17),__DEV__?tn(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):tn(!e.returnPartialData,18),__DEV__?tn(!e.pollInterval,"pollInterval option only supported on watchQuery."):tn(!e.pollInterval,19),this.fetchQuery(t,e).finally((function(){return n.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new en("Store reset while query was in flight (not completed in link chain)"):new en(20)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=Ti.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,r=new Map,i=new Set;return Array.isArray(e)&&e.forEach((function(e){var n;"string"==typeof e?r.set(e,!1):Cn(n=e)&&"Document"===n.kind&&Array.isArray(n.definitions)?r.set(t.transform(e).document,!1):Cn(e)&&e.query&&i.add(e)})),this.queries.forEach((function(t,i){var o=t.observableQuery,a=t.document;if(o){if("all"===e)return void n.set(i,o);var s=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||s&&r.has(s)||a&&r.has(a))&&(n.set(i,o),s&&r.set(s,!0),a&&r.set(a,!0))}})),i.size&&i.forEach((function(e){var r=gi("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),o=new Fi({queryManager:t,queryInfo:i,options:se(se({},e),{fetchPolicy:"network-only"})});tn(o.queryId===r),i.setObservableQuery(o),n.set(r,o)})),__DEV__&&r.size&&r.forEach((function(e,t){e||__DEV__&&tn.warn("Unknown query "+("string"==typeof t?"named ":"")+JSON.stringify(t,null,2)+" requested in refetchQueries options.include array")})),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach((function(r,i){var o=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,o=e.variables,a=e.context,s=void 0===a?{}:a;n=this.transform(n).document,o=this.getVariables(n,o);var u=function(e){return t.getObservableFromLink(n,s,e).map((function(o){if("no-cache"!==r&&(Po(o,i)&&t.cache.write({query:n,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),ri(o))throw new Ii({graphQLErrors:o.errors});return o}))};if(this.transform(n).hasClientExports){var c=this.localState.addExportedVariables(n,o,s).then(u);return new Rn((function(e){var t=null;return c.then((function(n){return t=n.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.getQuery(e).stop(),this.queries.delete(e)},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var i,o,a=this;void 0===r&&(r=null!==(i=null==t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var s=this.transform(e).serverQuery;if(s){var u=this.inFlightLinkObservables,c=this.link,l={query:s,variables:n,operationName:Zn(s)||void 0,context:this.prepareContext(se(se({},t),{forceFetch:!r}))};if(t=l.context,r){var f=u.get(s)||new Map;u.set(s,f);var p=ei(n);if(!(o=f.get(p))){var d=new wi([kr(c,l)]);f.set(p,o=d),d.cleanup((function(){f.delete(p)&&f.size<1&&u.delete(s)}))}}else o=new wi([kr(c,l)])}else o=new wi([Rn.of({data:{}})]),t=this.prepareContext(t);var h=this.transform(e).clientQuery;return h&&(o=ni(o,(function(e){return a.localState.runResolvers({document:h,remoteResult:e,context:t,variables:n})}))),o},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId();return ni(this.getObservableFromLink(e.document,n.context,n.variables),(function(i){var o=Oi(i.errors);if(r>=e.lastRequestId){if(o&&"none"===n.errorPolicy)throw e.markError(new Ii({graphQLErrors:i.errors}));e.markResult(i,n,t),e.markReady()}var a={data:i.data,loading:!1,networkStatus:e.networkStatus||Ti.ready};return o&&"ignore"!==n.errorPolicy&&(a.errors=i.errors),a}),(function(t){var n=t.hasOwnProperty("graphQLErrors")?t:new Ii({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n}))},e.prototype.fetchQueryObservable=function(e,t,n){var r=this;void 0===n&&(n=Ti.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),a=this.getQuery(e),s=t.fetchPolicy,u=void 0===s?"cache-first":s,c=t.errorPolicy,l=void 0===c?"none":c,f=t.returnPartialData,p=void 0!==f&&f,d=t.notifyOnNetworkStatusChange,h=void 0!==d&&d,y=t.context,v=void 0===y?{}:y,m=Object.assign({},t,{query:i,variables:o,fetchPolicy:u,errorPolicy:l,returnPartialData:p,notifyOnNetworkStatusChange:h,context:v}),g=function(e){return m.variables=e,r.fetchQueryByPolicy(a,m,n)};this.fetchCancelFns.set(e,(function(e){setTimeout((function(){return b.cancel(e)}))}));var b=new wi(this.transform(m.query).hasClientExports?this.localState.addExportedVariables(m.query,m.variables,m.context).then(g):g(m.variables));return b.cleanup((function(){r.fetchCancelFns.delete(e),function(e){var t=e.fetchPolicy,n=void 0===t?"cache-first":t,r=e.nextFetchPolicy;r&&(e.fetchPolicy="function"==typeof r?r.call(e,n):r)}(t)})),b},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?gi("refetchQueries"):void 0:a,u=e.onQueryUpdated,c=new Map;r&&this.getObservableQueries(r).forEach((function(e,n){c.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})}));var l=new Map;return n&&this.cache.batch({update:n,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof No&&e.watcher.observableQuery;if(r){if(u){c.delete(r.queryId);var i=u(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&l.set(r,i),!1}null!==u&&c.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),c.size&&c.forEach((function(e,n){var r,i=e.oq,o=e.lastDiff,a=e.diff;if(u){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}r=u(i,a,o)}u&&!0!==r||(r=i.refetch()),!1!==r&&l.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)})),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,n){var r=this,i=t.query,o=t.variables,a=t.fetchPolicy,s=t.refetchWritePolicy,u=t.errorPolicy,c=t.returnPartialData,l=t.context,f=t.notifyOnNetworkStatusChange,p=e.networkStatus;e.init({document:i,variables:o,networkStatus:n});var d=function(){return e.getDiff(o)},h=function(t,n){void 0===n&&(n=e.networkStatus||Ti.loading);var a=t.result;!__DEV__||c||Mr(a,{})||Ci(t.missing);var s=function(e){return Rn.of(se({data:e,loading:xi(n),networkStatus:n},t.complete?null:{partial:!0}))};return a&&r.transform(i).hasForcedResolvers?r.localState.runResolvers({document:i,remoteResult:{data:a},context:l,variables:o,onlyRunForcedResolvers:!0}).then((function(e){return s(e.data||void 0)})):s(a)},y="no-cache"===a?0:n===Ti.refetch&&"merge"!==s?1:2,v=function(){return r.getResultsFromLink(e,y,{variables:o,context:l,fetchPolicy:a,errorPolicy:u})},m=f&&"number"==typeof p&&p!==n&&xi(n);switch(a){default:case"cache-first":return(g=d()).complete?[h(g,e.markReady())]:c||m?[h(g),v()]:[v()];case"cache-and-network":var g;return(g=d()).complete||c||m?[h(g),v()]:[v()];case"cache-only":return[h(d(),e.markReady())];case"network-only":return m?[h(d()),v()]:[v()];case"no-cache":return m?[h(e.getDiff()),v()]:[v()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new No(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return se(se({},t),{clientAwareness:this.clientAwareness})},e}(),Co=!1;function jo(e,t){return Nr(e,t,t.variables&&{variables:se(se({},e.variables),t.variables)})}var Mo=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,i=e.headers,o=e.cache,a=e.ssrMode,s=void 0!==a&&a,u=e.ssrForceFetchDelay,c=void 0===u?0:u,l=e.connectToDevTools,f=void 0===l?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:l,p=e.queryDeduplication,d=void 0===p||p,h=e.defaultOptions,y=e.assumeImmutableResults,v=void 0!==y&&y,m=e.resolvers,g=e.typeDefs,b=e.fragmentMatcher,E=e.name,_=e.version,w=e.link;if(w||(w=n?new Ar({uri:n,credentials:r,headers:i}):ur.empty()),!o)throw __DEV__?new en("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new en(9);if(this.link=w,this.cache=o,this.disableNetworkFetches=s||c>0,this.queryDeduplication=d,this.defaultOptions=h||{},this.typeDefs=g,c&&setTimeout((function(){return t.disableNetworkFetches=!1}),c),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),f&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!Co&&__DEV__&&(Co=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var O=window.navigator,T=O&&O.userAgent,I=void 0;"string"==typeof T&&(T.indexOf("Chrome/")>-1?I="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":T.indexOf("Firefox/")>-1&&(I="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),I&&__DEV__&&tn.log("Download the Apollo DevTools for a better development experience: "+I)}this.version="3.4.17",this.localState=new So({cache:o,client:this,resolvers:m,fragmentMatcher:b}),this.queryManager=new Ro({cache:this.cache,link:this.link,queryDeduplication:d,ssrMode:s,clientAwareness:{name:E,version:_},localState:this.localState,assumeImmutableResults:v,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=jo(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=se(se({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=jo(this.defaultOptions.query,e)),__DEV__?tn("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):tn("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=se(se({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=jo(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return kr(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach((function(e,t){n.push(t),r.push(e)}));var i=Promise.all(r);return i.queries=n,i.results=r,i.catch((function(e){__DEV__&&tn.debug("In client.refetchQueries, Promise.all promise rejected with error "+e)})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}(),Lo=function(){function e(){this.getFragmentDoc=Eo(jn)}return e.prototype.batch=function(e){var t="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;this.performTransaction(e.update,t)},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(se(se({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(se(se({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=ue(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,i=e.fragmentName,o=ue(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e}(),Uo=function(e){function t(n,r,i,o){var a=e.call(this,n)||this;return a.message=n,a.path=r,a.query=i,a.variables=o,a.__proto__=t.prototype,a}return ae(t,e),t}(Error);function qo(e){return __DEV__&&(t=e,(n=new Set([t])).forEach((function(e){Cn(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(t){Cn(e[t])&&n.add(e[t])}))}))),e;var t,n}var Vo=Object.prototype.hasOwnProperty;function Bo(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=void 0!==r?{id:r}:void 0!==i?{_id:i}:void 0),void 0===r&&(r=i),void 0!==r))return n+":"+("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var Qo={dataIdFromObject:Bo,addTypename:!0,resultCaching:!0,canonizeResults:!1};function zo(e){var t=e.canonizeResults;return void 0===t?Qo.canonizeResults:t}var Wo=/^[_a-z][_0-9a-z]*/i;function Go(e){var t=e.match(Wo);return t?t[0]:e}function Ko(e,t,n){return!!Cn(t)&&(Array.isArray(t)?t.every((function(t){return Ko(e,t,n)})):e.selections.every((function(e){if(Yn(e)&&hi(e,n)){var r=Kn(e);return Vo.call(t,r)&&(!e.selectionSet||Ko(e.selectionSet,t[r],n))}return!0})))}function $o(e){return Cn(e)&&!qn(e)&&!Array.isArray(e)}var Yo=Object.create(null),Jo=function(){return Yo},Ho=Object.create(null),Xo=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return qo(qn(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return qn(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return Un(e);if(qn(e))return e;var r=n.policies.identify(e)[0];if(r){var i=Un(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return se({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),Vo.call(this.data,e)){var n=this.data[e];if(n&&Vo.call(n,t))return n[t]}return"__typename"===t&&Vo.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof na?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),Vo.call(this.data,e)?this.data[e]:this instanceof na?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;qn(e)&&(e=e.__ref),qn(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,o="string"==typeof t?this.lookup(n=t):t;if(o){__DEV__?tn("string"==typeof n,"store.merge expects a string ID"):tn("string"==typeof n,1);var a=new qi(ia).merge(i,o);if(this.data[n]=a,a!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==a[e]){s[e]=1;var t=Go(e);t===e||r.policies.hasKeyArgs(a.__typename,t)||(s[t]=1),void 0!==a[e]||r instanceof na||delete a[e]}})),!s.__typename||i&&i.__typename||this.policies.rootTypenamesById[n]!==a.__typename||delete s.__typename,Object.keys(s).forEach((function(e){return r.group.dirty(n,e)}))}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),o=!1,a=!0,s={DELETE:Yo,INVALIDATE:Ho,isReference:qn,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||Un(e)}:t,{store:n})}};if(Object.keys(r).forEach((function(u){var c=Go(u),l=r[u];if(void 0!==l){var f="function"==typeof t?t:t[u]||t[c];if(f){var p=f===Jo?Yo:f(qo(l),se(se({},s),{fieldName:c,storeFieldName:u,storage:n.getStorage(e,u)}));p===Ho?n.group.dirty(e,u):(p===Yo&&(p=void 0),p!==l&&(i[u]=p,o=!0,l=p))}void 0!==l&&(a=!1)}})),o)return this.merge(e,i),a&&(this instanceof na?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),a=t&&n?this.policies.getStoreFieldName({typename:o,fieldName:t,args:n}):t;return this.modify(e,a?((r={})[a]=Jo,r):Jo)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(Vo.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof na&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach((function(t){Vo.call(e.policies.rootTypenamesById,t)||n.push(t)})),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(n){e&&Vo.call(e,n)||t.delete(n)})),e){var n=e.__META,r=ue(e,["__META"]);Object.keys(r).forEach((function(e){t.merge(e,r[e])})),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof na?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach((function(r){Vo.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])}));var r=Object.keys(n);if(r.length){for(var i=this;i instanceof na;)i=i.parent;r.forEach((function(e){return i.delete(e)}))}return r},e.prototype.findChildRefIds=function(e){if(!Vo.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach((function(e){qn(e)&&(t[e.__ref]=!0),Cn(e)&&Object.keys(e).forEach((function(t){var n=e[t];Cn(n)&&r.add(n)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Zo=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?mo():null,this.keyMaker=new Yr(Jr)},e.prototype.depend=function(e,t){if(this.d){this.d(ea(e,t));var n=Go(t);n!==t&&this.d(ea(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(ea(e,t),"__exists"===t?"forget":"setDirty")},e}();function ea(e,t){return t+"#"+e}function ta(e,t){oa(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=void 0===r||r,o=t.seed,a=e.call(this,n,new Zo(i))||this;return a.stump=new ra(a),a.storageTrie=new Yr(Jr),o&&a.replace(o),a}return ae(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(Xo||(Xo={}));var na=function(e){function t(t,n,r,i){var o=e.call(this,n.policies,i)||this;return o.id=t,o.parent=n,o.replay=r,o.group=i,r(o),o}return ae(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach((function(n){Mr(r[n],i[n])||t.group.dirty(e,n)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(n){t.group.dirty(e,n)}))):t.delete(e)})),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return se(se({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return Vo.call(this.data,t)?se(se({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(Xo),ra=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new Zo(t.group.caching,t.group))||this}return ae(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(na);function ia(e,t,n){var r=e[n],i=t[n];return Mr(r,i)?r:i}function oa(e){return!!(e instanceof Xo&&e.group.caching)}function aa(e,t){return new Uo(e.message,t.path.slice(),t.query,t.variables)}function sa(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var ua=function(){function e(e){var t=this;this.knownResults=new(Jr?WeakMap:Map),this.config=Nr(e,{addTypename:!1!==e.addTypename,canonizeResults:zo(e)}),this.canon=e.canon||new Zr,this.executeSelectionSet=Eo((function(e){var n,r=e.context.canonizeResults,i=sa(e);i[3]=!r;var o=(n=t.executeSelectionSet).peek.apply(n,i);return o?r?se(se({},o),{result:t.canon.admit(o.result)}):o:(ta(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:sa,makeCacheKey:function(e,t,n,r){if(oa(n.store))return n.store.makeCacheKey(e,qn(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=Eo((function(e){return ta(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(oa(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Zr},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,r=e.rootId,i=void 0===r?"ROOT_QUERY":r,o=e.variables,a=e.returnPartialData,s=void 0===a||a,u=e.canonizeResults,c=void 0===u?this.config.canonizeResults:u,l=this.config.cache.policies;o=se(se({},rr(tr(n))),o);var f=Un(i),p=this.executeSelectionSet({selectionSet:nr(n).selectionSet,objectOrReference:f,enclosingRef:f,context:{store:t,query:n,policies:l,variables:o,varString:ei(o),canonizeResults:c,fragmentMap:Mn(er(n)),path:[]}}),d=p.missing&&p.missing.length>0;if(d&&!s)throw p.missing[0];return{result:p.result,missing:p.missing,complete:!d}},e.prototype.isFresh=function(e,t,n,r){if(oa(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,r=e.objectOrReference,i=e.enclosingRef,o=e.context;if(qn(r)&&!o.policies.rootTypenamesById[r.__ref]&&!o.store.has(r.__ref))return{result:this.canon.empty,missing:[aa(__DEV__?new en("Dangling reference to missing "+r.__ref+" object"):new en(5),o)]};var a=o.variables,s=o.policies,u=o.store,c=[],l={result:null},f=u.getFieldValue(r,"__typename");function p(){return l.missing||(l.missing=[])}function d(e){var t;return e.missing&&(t=p()).push.apply(t,e.missing),e.result}this.config.addTypename&&"string"==typeof f&&!s.rootIdsByTypename[f]&&c.push({__typename:f});var h=new Set(n.selections);h.forEach((function(e){var n;if(hi(e,a))if(Yn(e)){var u=s.readField({fieldName:e.name.value,field:e,variables:o.variables,from:r},o),l=Kn(e);o.path.push(l),void 0===u?li.added(e)||p().push(aa(__DEV__?new en("Can't find field '"+e.name.value+"' on "+(qn(r)?r.__ref+" object":"object "+JSON.stringify(r,null,2))):new en(6),o)):Array.isArray(u)?u=d(t.executeSubSelectedArray({field:e,array:u,enclosingRef:i,context:o})):e.selectionSet?null!=u&&(u=d(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:u,enclosingRef:qn(u)?u:i,context:o}))):o.canonizeResults&&(u=t.canon.pass(u)),void 0!==u&&c.push(((n={})[l]=u,n)),tn(o.path.pop()===l)}else{var y=Ln(e,o.fragmentMap);y&&s.fragmentMatches(y,f)&&y.selectionSet.selections.forEach(h.add,h)}}));var y=Li(c);return l.result=o.canonizeResults?this.canon.admit(y):qo(y),this.knownResults.set(l.result,n),l},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,o=e.enclosingRef,a=e.context;function s(e,n){return e.missing&&(t=t||[]).push.apply(t,e.missing),tn(a.path.pop()===n),e.result}return r.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map((function(e,t){return null===e?null:(a.path.push(t),Array.isArray(e)?s(n.executeSubSelectedArray({field:r,array:e,enclosingRef:o,context:a}),t):r.selectionSet?s(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:qn(e)?e:o,context:a}),t):(__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach((function(n){Cn(n)&&(__DEV__?tn(!qn(n),"Missing selection set for object of type "+function(e,t){return qn(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,n)+" returned for query field "+t.name.value):tn(!qn(n),7),Object.values(n).forEach(r.add,r))}))}}(a.store,r,e),tn(a.path.pop()===t),e))})),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}(),ca=function(){function e(e,t){this.cache=e,this.reader=t}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,o=t.dataId,a=t.variables,s=t.overwrite,u=Xn(r),c=new qi;a=se(se({},rr(u)),a);var l={store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:a,varString:ei(a),fragmentMap:Mn(er(r)),overwrite:!!s,incomingById:new Map,clientOnly:!1},f=this.processSelectionSet({result:i||Object.create(null),dataId:o,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:l});if(!qn(f))throw __DEV__?new en("Could not identify object "+JSON.stringify(i)):new en(8);return l.incomingById.forEach((function(t,r){var i=t.fields,o=t.mergeTree,a=t.selections,s=Un(r);if(o&&o.map.size){var u=n.applyMerges(o,s,i,l);if(qn(u))return;i=u}if(__DEV__&&!l.overwrite){var c=new Set;a.forEach((function(e){Yn(e)&&e.selectionSet&&c.add(e.name.value)})),Object.keys(i).forEach((function(e){(function(e){return c.has(Go(e))})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},o=i(e);if(o){var a=i(t);if(a&&!qn(o)&&!Mr(o,a)&&!Object.keys(o).every((function(e){return void 0!==r.getFieldValue(a,e)}))){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),u=Go(n),c=s+"."+u;if(!ya.has(c)){ya.add(c);var l=[];Array.isArray(o)||Array.isArray(a)||[o,a].forEach((function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||l.includes(t)||l.push(t)})),__DEV__&&tn.warn("Cache data may be lost when replacing the "+u+" field of a "+s+" object.\n\nTo address this problem (which is not a bug in Apollo Client), "+(l.length?"either ensure all objects of type "+l.join(" and ")+" have an ID or a custom merge function, or ":"")+"define a custom merge function for the "+c+" field, so InMemoryCache can safely merge these objects:\n\n existing: "+JSON.stringify(o).slice(0,1e3)+"\n incoming: "+JSON.stringify(a).slice(0,1e3)+"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n")}}}}(s,i,e,l.store)}))}e.merge(r,i)})),e.retain(f.__ref),f},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,o=e.context,a=e.mergeTree,s=this.cache.policies,u=s.identify(r,i,o.fragmentMap),c=u[0],l=u[1];if("string"==typeof(n=n||c)){var f=o.written[n]||(o.written[n]=[]),p=Un(n);if(f.indexOf(i)>=0)return p;if(f.push(i),this.reader&&this.reader.isFresh(r,p,i,o))return p}var d=Object.create(null);l&&(d=o.merge(d,l));var h=n&&s.rootTypenamesById[n]||$n(r,i,o.fragmentMap)||n&&o.store.get(n,"__typename");"string"==typeof h&&(d.__typename=h);var y=new Set(i.selections);if(y.forEach((function(e){var n;if(hi(e,o.variables))if(Yn(e)){var i=Kn(e),u=r[i],c=o.clientOnly;if(o.clientOnly=c||!(!e.directives||!e.directives.some((function(e){return"client"===e.name.value}))),void 0!==u){var l=s.getStoreFieldName({typename:h,fieldName:e.name.value,field:e,variables:o.variables}),f=fa(a,l),p=t.processFieldValue(u,e,o,f),v=void 0;if(e.selectionSet&&!(v=o.store.getFieldValue(p,"__typename"))&&qn(p)){var m=o.incomingById.get(p.__ref);v=m&&m.fields.__typename}var g=s.getMergeFunction(h,e.name.value,v);g?f.info={field:e,typename:h,merge:g}:ha(a,l),d=o.merge(d,((n={})[l]=p,n))}else o.clientOnly||li.added(e)||__DEV__&&tn.error(("Missing field '"+Kn(e)+"' while writing result "+JSON.stringify(r,null,2)).substring(0,1e3));o.clientOnly=c}else{var b=Ln(e,o.fragmentMap);b&&s.fragmentMatches(b,h,r,o.variables)&&b.selectionSet.selections.forEach(y.add,y)}})),"string"==typeof n){var v=o.incomingById.get(n);return v?(v.fields=o.merge(v.fields,d),v.mergeTree=pa(v.mergeTree,a),v.selections.forEach(y.add,y),v.selections=y):o.incomingById.set(n,{fields:d,mergeTree:da(a)?void 0:a,selections:y}),Un(n)}return d},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?Array.isArray(e)?e.map((function(e,o){var a=i.processFieldValue(e,t,n,fa(r,o));return ha(r,o),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?Di(e):e},e.prototype.applyMerges=function(e,t,n,r,i){var o,a=this;if(e.map.size&&!qn(n)){var s,u=Array.isArray(n)||!qn(t)&&!$o(t)?void 0:t,c=n;u&&!i&&(i=[qn(u)?u.__ref:u]);var l=function(e,t){return Array.isArray(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var n=l(u,t),o=l(c,t);if(void 0!==o){i&&i.push(t);var f=a.applyMerges(e,n,o,r,i);f!==o&&(s=s||new Map).set(t,f),i&&tn(i.pop()===t)}})),s&&(n=Array.isArray(c)?c.slice(0):se({},c),s.forEach((function(e,t){n[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(o=r.store).getStorage.apply(o,i)):n},e}(),la=[];function fa(e,t){var n=e.map;return n.has(t)||n.set(t,la.pop()||{map:new Map}),n.get(t)}function pa(e,t){if(e===t||!t||da(t))return e;if(!e||da(e))return t;var n=e.info&&t.info?se(se({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i={info:n,map:r?new Map:e.map.size?e.map:t.map};if(r){var o=new Set(t.map.keys());e.map.forEach((function(e,n){i.map.set(n,pa(e,t.map.get(n))),o.delete(n)})),o.forEach((function(n){i.map.set(n,pa(t.map.get(n),e.map.get(n)))}))}return i}function da(e){return!e||!(e.info||e.map.size)}function ha(e,t){var n=e.map,r=n.get(t);r&&da(r)&&(la.push(r),n.delete(t))}var ya=new Set;function va(e){var t=gi("stringifyForDisplay");return JSON.stringify(e,(function(e,n){return void 0===n?t:n})).split(JSON.stringify(t)).join("<undefined>")}function ma(e){return void 0!==e.args?e.args:e.field?Gn(e.field,e.variables):null}Qn.setStringify(ei);var ga=function(){},ba=function(e,t){return t.fieldName},Ea=function(e,t,n){return(0,n.mergeObjects)(e,t)},_a=function(e,t){return t},wa=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=se({dataIdFromObject:Bo},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t,n){var r=t&&n?$n(e,t,n):e.__typename;if(r===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var i,o={typename:r,selectionSet:t,fragmentMap:n},a=r&&this.getTypePolicy(r),s=a&&a.keyFn||this.config.dataIdFromObject;s;){var u=s(e,o);if(!Array.isArray(u)){i=u;break}s=xa(u)}return i=i?String(i):void 0,o.keyObject?[i,o.keyObject]:[i]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(n){var r=e[n],i=r.queryType,o=r.mutationType,a=r.subscriptionType,s=ue(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),o&&t.setRootTypename("Mutation",n),a&&t.setRootTypename("Subscription",n),Vo.call(t.toBeAdded,n)?t.toBeAdded[n].push(s):t.toBeAdded[n]=[s]}))},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?Ea:!1===t?_a:e.merge}a(r,t.merge),r.keyFn=!1===i?ga:Array.isArray(i)?xa(i):"function"==typeof i?i:r.keyFn,o&&Object.keys(o).forEach((function(t){var r=n.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;r.keyFn=!1===s?ba:Array.isArray(s)?Ia(s):"function"==typeof s?s:r.keyFn,"function"==typeof u&&(r.read=u),a(r,c)}r.read&&r.merge&&(r.keyFn=r.keyFn||ba)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?tn(!r||r===e,"Cannot change root "+e+" __typename more than once"):tn(!r||r===e,2),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(n){t.getSupertypeSet(n,!0),e[n].forEach((function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(Wo);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!Vo.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);r&&r.size&&r.forEach((function(e){var r=t.getTypePolicy(e),i=r.fields,o=ue(r,["fields"]);Object.assign(n,o),Object.assign(n.fields,i)}))}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach((function(n){t.updateTypePolicy(e,n)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),s=[a],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},c=!(!n||!this.fuzzySubtypes.size),l=!1,f=0;f<s.length;++f){var p=s[f];if(p.has(o))return a.has(o)||(l&&__DEV__&&tn.warn("Inferring subtype "+t+" of supertype "+o),a.add(o)),!0;p.forEach(u),c&&f===s.length-1&&Ko(e.selectionSet,n,r)&&(c=!1,l=!0,this.fuzzySubtypes.forEach((function(e,n){var r=t.match(e);r&&r[0]===t&&u(n)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t,!1);return!(!n||!n.keyFn)},e.prototype.getStoreFieldName=function(e){var t,n=e.typename,r=e.fieldName,i=this.getFieldPolicy(n,r,!1),o=i&&i.keyFn;if(o&&n)for(var a={typename:n,fieldName:r,field:e.field||null,variables:e.variables},s=ma(e);o;){var u=o(s,a);if(!Array.isArray(u)){t=u||r;break}o=Ia(u)}return void 0===t&&(t=e.field?function(e,t){var n=null;e.directives&&(n={},e.directives.forEach((function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach((function(r){var i=r.name,o=r.value;return Vn(n[e.name.value],i,o,t)}))})));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach((function(e){var n=e.name,i=e.value;return Vn(r,n,i,t)}))),Qn(e.name.value,r,n)}(e.field,e.variables):Qn(r,ma(e))),!1===t?r:r===Go(t)?t:r+":"+t},e.prototype.readField=function(e,t){var n=e.from;if(n&&(e.field||e.fieldName)){if(void 0===e.typename){var r=t.store.getFieldValue(n,"__typename");r&&(e.typename=r)}var i=this.getStoreFieldName(e),o=Go(i),a=t.store.getFieldValue(n,i),s=this.getFieldPolicy(e.typename,o,!1),u=s&&s.read;if(u){var c=Oa(this,n,e,t,t.store.getStorage(qn(n)?n.__ref:n,i));return _o.withValue(this.cache,u,[a,c])}return a}},e.prototype.getMergeFunction=function(e,t,n){var r=this.getFieldPolicy(e,t,!1),i=r&&r.merge;return!i&&n&&(i=(r=this.getTypePolicy(n))&&r.merge),i},e.prototype.runMergeFunction=function(e,t,n,r,i){var o=n.field,a=n.typename,s=n.merge;return s===Ea?Ta(r.store)(e,t):s===_a?t:(r.overwrite&&(e=void 0),s(e,t,Oa(this,void 0,{typename:a,fieldName:o.name.value,field:o,variables:r.variables},r,i||Object.create(null))))},e}();function Oa(e,t,n,r,i){var o=e.getStoreFieldName(n),a=Go(o),s=n.variables||r.variables,u=r.store,c=u.toReference,l=u.canRead;return{args:ma(n),field:n.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:qn,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(n,i){var o;if("string"==typeof n)o={fieldName:n,from:arguments.length>1?i:t};else{if(!Cn(n))return void(__DEV__&&tn.warn("Unexpected readField arguments: "+va(Array.from(arguments))));o=se({},n),Vo.call(n,"from")||(o.from=t)}return __DEV__&&void 0===o.from&&__DEV__&&tn.warn("Undefined 'from' passed to readField with arguments "+va(Array.from(arguments))),void 0===o.variables&&(o.variables=s),e.readField(o,r)},mergeObjects:Ta(r.store)}}function Ta(e){return function(t,n){if(Array.isArray(t)||Array.isArray(n))throw __DEV__?new en("Cannot automatically merge arrays"):new en(3);if(Cn(t)&&Cn(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(qn(t)&&$o(n))return e.merge(t.__ref,n),t;if($o(t)&&qn(n))return e.merge(t,n.__ref),n;if($o(t)&&$o(n))return se(se({},t),n)}return n}}function Ia(e){return function(t,n){return t?n.fieldName+":"+JSON.stringify(Da(t,e,!1)):n.fieldName}}function xa(e){var t=new Yr(Jr);return function(n,r){var i;if(r.selectionSet&&r.fragmentMap){var o=t.lookupArray([r.selectionSet,r.fragmentMap]);i=o.aliasMap||(o.aliasMap=Sa(r.selectionSet,r.fragmentMap))}var a=r.keyObject=Da(n,e,!0,i);return r.typename+":"+JSON.stringify(a)}}function Sa(e,t){var n=Object.create(null),r=new Set([e]);return r.forEach((function(e){e.selections.forEach((function(e){if(Yn(e)){if(e.alias){var i=e.alias.value,o=e.name.value;o!==i&&((n.aliases||(n.aliases=Object.create(null)))[o]=i)}e.selectionSet&&((n.subsets||(n.subsets=Object.create(null)))[e.name.value]=Sa(e.selectionSet,t))}else{var a=Ln(e,t);a&&r.add(a.selectionSet)}}))})),n}function Da(e,t,n,r){var i,o,a=Object.create(null);return t.forEach((function(t){if(Array.isArray(t)){if("string"==typeof o&&"string"==typeof i){var s=r&&r.subsets,u=s&&s[o];a[o]=Da(e[i],t,n,u)}}else{var c=r&&r.aliases,l=c&&c[t]||t;Vo.call(e,l)?a[o=t]=e[i=l]:(__DEV__?tn(!n,"Missing field '"+l+"' while computing key fields"):tn(!n,4),i=o=void 0)}})),a}var Aa=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=Io,n.txCount=0,n.config=function(e){return Nr(Qo,e)}(t),n.addTypename=!!n.config.addTypename,n.policies=new wa({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return ae(t,e),t.prototype.init=function(){var e=this.data=new Xo.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader;this.storeWriter=new ca(this,this.storeReader=new ua({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:zo(this.config),canon:e?void 0:n&&n.canon})),this.maybeBroadcastWatch=Eo((function(e,n){return t.broadcastWatch(e,n)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(oa(n)){var r=e.optimistic,i=e.rootId,o=e.variables;return n.makeCacheKey(e.query,e.callback,ei({optimistic:r,rootId:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore(se(se({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(e){if(e instanceof Uo)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(Vo.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore(se(se({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t,n=this;return this.watches.size||Oo(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){n.watches.delete(e)&&!n.watches.size&&To(n),n.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){ei.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){return qn(e)?e.__ref:this.policies.identify(e)[0]},t.prototype.evict=function(e){if(!e.id){if(Vo.call(e,"id"))return!1;e=se(se({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),ei.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),To(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t=this,n=e.update,r=e.optimistic,i=void 0===r||r,o=e.removeOptimistic,a=e.onWatchUpdated,s=function(e){var r=t,i=r.data,o=r.optimisticData;++t.txCount,e&&(t.data=t.optimisticData=e);try{n(t)}finally{--t.txCount,t.data=i,t.optimisticData=o}},u=new Set;a&&!this.txCount&&this.broadcastWatches(se(se({},e),{onWatchUpdated:function(e){return u.add(e),!1}})),"string"==typeof i?this.optimisticData=this.optimisticData.addLayer(i,s):!1===i?s(this.data):s(),"string"==typeof o&&(this.optimisticData=this.optimisticData.removeLayer(o)),a&&u.size?(this.broadcastWatches(se(se({},e),{onWatchUpdated:function(e,t){var n=a.call(this,e,t);return!1!==n&&u.delete(e),n}})),u.size&&u.forEach((function(e){return t.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e)},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=li(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(n){return t.maybeBroadcastWatch(n,e)}))},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,r,n))||n&&Mr(n.result,r.result)||e.callback(e.lastDiff=r,n)},t}(Lo);const ka=JSON.parse('{"g":{"Credentials":["StripeCredentials","ZuoraCredentials"],"ResetPeriodConfiguration":["MonthlyResetPeriodConfig","WeeklyResetPeriodConfig"]}}');var Na=n(4098),Pa=n.n(Na),Fa=n(4147);var Ra=function(){function e(){var e=this;this.setFeatures=function(t){return e.features=new Set(t)},this.entitlements=new Map,this.features=new Set,this.isLoaded=!1}return e.prototype.getEntitlement=function(e){return this.entitlements.get(e)||null},e.prototype.validateFeature=function(e){return this.features.has(e)},e.prototype.setEntitlements=function(e){this.entitlements=e,this.isLoaded=!0},e.prototype.getEntitlements=function(){return this.entitlements},e}(),Ca=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},ja=ht(La||(La=Ca(["\n fragment EntitlementFragment on Entitlement {\n isGranted\n accessDeniedReason\n customerId\n usageLimit\n hasUnlimitedUsage\n currentUsage\n requestedUsage\n nextResetDate\n resetPeriod\n resetPeriodConfiguration {\n ...ResetPeriodConfigurationFragment\n }\n feature {\n ...FeatureFragment\n }\n }\n fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {\n __typename\n ... on MonthlyResetPeriodConfig {\n ...MonthlyResetPeriodConfigFragment\n }\n ... on WeeklyResetPeriodConfig {\n ...WeeklyResetPeriodConfigFragment\n }\n }\n fragment FeatureFragment on EntitlementFeature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n description\n displayName\n refId\n }\n fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {\n monthlyAccordingTo\n }\n fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {\n weeklyAccordingTo\n }\n"],["\n fragment EntitlementFragment on Entitlement {\n isGranted\n accessDeniedReason\n customerId\n usageLimit\n hasUnlimitedUsage\n currentUsage\n requestedUsage\n nextResetDate\n resetPeriod\n resetPeriodConfiguration {\n ...ResetPeriodConfigurationFragment\n }\n feature {\n ...FeatureFragment\n }\n }\n fragment ResetPeriodConfigurationFragment on ResetPeriodConfiguration {\n __typename\n ... on MonthlyResetPeriodConfig {\n ...MonthlyResetPeriodConfigFragment\n }\n ... on WeeklyResetPeriodConfig {\n ...WeeklyResetPeriodConfigFragment\n }\n }\n fragment FeatureFragment on EntitlementFeature {\n featureType\n meterType\n featureUnits\n featureUnitsPlural\n description\n displayName\n refId\n }\n fragment MonthlyResetPeriodConfigFragment on MonthlyResetPeriodConfig {\n monthlyAccordingTo\n }\n fragment WeeklyResetPeriodConfigFragment on WeeklyResetPeriodConfig {\n weeklyAccordingTo\n }\n"])));const Ma=function(){function e(e){this.client=e}return e.prototype.getEntitlements=function(e){return this.client.query({query:ht(Ua||(Ua=Ca(["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "],["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "])),ja),variables:{query:{customerId:e}},fetchPolicy:"network-only"})},e.prototype.pollEntitlements=function(e,t){return this.client.watchQuery({query:ht(qa||(qa=Ca(["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "],["\n query GetEntitlements($query: FetchEntitlementsQuery!) {\n entitlements: cachedEntitlements(query: $query) {\n ...EntitlementFragment\n }\n }\n ","\n "])),ja),variables:{query:{customerId:e}},fetchPolicy:"network-only",pollInterval:t})},e}();var La,Ua,qa,Va=function(){function e(){}return e.decideEntitlementPolicy=function(e,t){var n,r;if(!e||!e.calculatedEntitlement.feature)return{hasAccess:!1,accessDeniedReason:J.CustomerNotEntitledForFeature};var i=e.calculatedEntitlement.feature,o=i.featureType,a=i.meterType;switch(o){case H.Boolean:return{hasAccess:!0};case H.Numeric:if((null===(n=e.calculatedEntitlement.feature)||void 0===n?void 0:n.meterType)===X.None)return{hasAccess:!0};if(e.calculatedEntitlement.hasUnlimitedUsage)return{hasAccess:!0};var s=e.featureUsage.currentUsage;return a===X.Incremental&&e.featureUsage.nextResetDate<(new Date).getTime()&&(s=0),s+(t||0)<=((null===(r=e.calculatedEntitlement)||void 0===r?void 0:r.usageLimit)||0)?{hasAccess:!0}:{hasAccess:!1,accessDeniedReason:J.RequestedUsageExceedsLimit}}},e}(),Ba=function(){return Ba=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ba.apply(this,arguments)},Qa=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},za=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},Wa=function(){function e(e,t,n){this.customerId=e,this.cacheService=t,this.modelMapper=new Jt,this.loadingEntitlements=null,this.entitlementsApi=new Ma(n),this.entitlementsPollingObserver=null}return e.prototype.startPolling=function(e){var t=this;this.entitlementsPollingObserver=this.entitlementsApi.pollEntitlements(this.customerId,e),this.entitlementsPollingObserver.subscribe((function(e){!e.errors&&e.data&&e.data.entitlements?t.storeFetchedEntitlementsInCache(e.data.entitlements):console.log("Failed to poll entitlements ".concat(e.errors),e.errors)}))},e.prototype.refresh=function(){return Qa(this,void 0,void 0,(function(){return za(this,(function(e){switch(e.label){case 0:return[4,this.loadEntitlements()];case 1:return e.sent(),[2]}}))}))},e.prototype.getBooleanEntitlement=function(e){var t=this.cacheService.getEntitlement(e),n=Va.decideEntitlementPolicy(t);if((null==t?void 0:t.calculatedEntitlement.feature)&&t.calculatedEntitlement.feature.featureType!==H.Boolean)throw new Error(J.InvalidFeatureType);return t?this.modelMapper.mapBooleanEntitlement(t,n):Ba(Ba({},n),{isFallback:!1})},e.prototype.getNumericEntitlement=function(e){var t,n=this.cacheService.getEntitlement(e),r=Va.decideEntitlementPolicy(n);if((null==n?void 0:n.calculatedEntitlement.feature)&&(null===(t=n.calculatedEntitlement.feature)||void 0===t?void 0:t.featureType)!==H.Numeric)throw new Error(J.InvalidFeatureType);return n?this.modelMapper.mapNumericEntitlement(n,r):Ba(Ba({},r),{isFallback:!1,isUnlimited:!1})},e.prototype.getMeteredEntitlement=function(e,t){var n,r,i=this.cacheService.getEntitlement(e),o=Va.decideEntitlementPolicy(i,null==t?void 0:t.requestedUsage);if((null==i?void 0:i.calculatedEntitlement.feature)&&(null===(n=i.calculatedEntitlement.feature)||void 0===n?void 0:n.meterType)!==X.Fluctuating&&(null===(r=i.calculatedEntitlement.feature)||void 0===r?void 0:r.meterType)!==X.Incremental)throw new Error(J.InvalidFeatureType);return i?this.modelMapper.mapMeteredEntitlement(i,o,null==t?void 0:t.requestedUsage):Ba(Ba({},o),{currentUsage:0,isFallback:!1,isUnlimited:!1,requestedUsage:(null==t?void 0:t.requestedUsage)||0})},e.prototype.loadEntitlements=function(){return Qa(this,void 0,void 0,(function(){var e;return za(this,(function(t){switch(t.label){case 0:return this.loadingEntitlements||(this.loadingEntitlements=this.loadEntitlementsFromRemote()),[4,this.loadingEntitlements];case 1:return e=t.sent(),this.loadingEntitlements=null,[2,e]}}))}))},e.prototype.loadEntitlementsFromRemote=function(){return Qa(this,void 0,void 0,(function(){var e;return za(this,(function(t){switch(t.label){case 0:return[4,this.entitlementsApi.getEntitlements(this.customerId)];case 1:return e=t.sent(),this.storeFetchedEntitlementsInCache(e.data.entitlements),[2]}}))}))},e.prototype.storeFetchedEntitlementsInCache=function(e){var t=this.modelMapper.mapCachedEntitlements(e);this.cacheService.setEntitlements(t)},e.prototype.getEntitlements=function(){return Qa(this,void 0,void 0,(function(){var e=this;return za(this,(function(t){switch(t.label){case 0:return this.cacheService.isLoaded?[3,2]:[4,this.loadEntitlements()];case 1:t.sent(),t.label=2;case 2:return[2,Array.from(this.cacheService.getEntitlements().values()).map((function(t){var n=Va.decideEntitlementPolicy(t);return e.modelMapper.mapEntitlement(t,n)}))]}}))}))},e.prototype.stopPolling=function(){var e;null===(e=this.entitlementsPollingObserver)||void 0===e||e.stopPolling()},e}(),Ga=function(){return Ga=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ga.apply(this,arguments)},Ka=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},$a=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},Ya=function(){function e(e,t){this.modelMapper=new Jt,this.configuration=e,this.graphClient=function(e){var t=e.apiKey,n=e.baseUri,r=new ur((function(e,n){return e.setContext({headers:{"X-API-KEY":t}}),n(e)})),i=new Ar({uri:"".concat(n,"/graphql"),fetch:Pa()});return new Mo({link:r.concat(i),cache:new Aa({possibleTypes:ka.g}),name:"js-client-sdk",version:Fa.version})}(this.configuration),this.loggerService=t,this.apiGateway=new Ut(this.graphClient),this.entitlementsService=null}return e.initialize=function(t){return Ka(this,void 0,void 0,(function(){var n,i,o,a,s;return $a(this,(function(u){switch(u.label){case 0:n=function(e){var t={baseUri:"https://api.stigg.io",entitlementPollingInterval:3e4,logConfiguration:{logger:console,logLevel:r.ERROR}};return Qt()(t,e)}(t),i=new ee(n.logConfiguration.logger,n.logConfiguration.logLevel),u.label=1;case 1:return u.trys.push([1,4,,5]),o=function(e,t){var n=!0;return Vt()(e.apiKey)&&(t.error("You must configure the client with an SDK key"),n=!1),e.entitlementPollingInterval&&e.entitlementPollingInterval<5e3&&(t.error("Entitlements polling interval cannot be lower than 5000ms"),n=!1),n}(n,i),o?(a=new e(n,i),t.customerId?[4,a.setCustomerId(t.customerId)]:[3,3]):[2,null];case 2:u.sent(),u.label=3;case 3:return[2,a];case 4:return s=u.sent(),i.error("Failed to initialize api ".concat(s)),[2,null];case 5:return[2]}}))}))},e.prototype.setCustomerId=function(e){var t;return Ka(this,void 0,void 0,(function(){return $a(this,(function(n){switch(n.label){case 0:return null===(t=this.entitlementsService)||void 0===t||t.stopPolling(),this.configuration.customerId=e,this.entitlementsService=new Wa(e,new Ra,this.graphClient),this.entitlementsService.startPolling(this.configuration.entitlementPollingInterval),[4,this.entitlementsService.loadEntitlements()];case 1:return n.sent(),[2]}}))}))},e.prototype.refresh=function(){var e;return Ka(this,void 0,void 0,(function(){return $a(this,(function(t){switch(t.label){case 0:return[4,null===(e=this.entitlementsService)||void 0===e?void 0:e.refresh()];case 1:return t.sent(),[2]}}))}))},e.prototype.getBooleanEntitlement=function(e){var t=e.featureId,n=e.options,r=Ga(Ga({},te),(null==n?void 0:n.fallback)||{});try{return this.entitlementsService?this.entitlementsService.getBooleanEntitlement(t):r}catch(e){return this.loggerService.error("Failed to get boolean entitlement",e),r}},e.prototype.getNumericEntitlement=function(e){var t=e.featureId,n=e.options,r=Ga(Ga({},ne),(null==n?void 0:n.fallback)||{});try{return this.entitlementsService?this.entitlementsService.getNumericEntitlement(t):r}catch(e){return this.loggerService.error("Failed to get numeric entitlement",e),r}},e.prototype.getMeteredEntitlement=function(e){var t=e.featureId,n=e.options,r=Ga(Ga({},re),(null==n?void 0:n.fallback)||{});try{return this.entitlementsService?this.entitlementsService.getMeteredEntitlement(t,n):r}catch(e){return this.loggerService.error("Failed to get metered entitlement",e),r}},e.prototype.getPaywall=function(e){var t=(void 0===e?{}:e).productId;return Ka(this,void 0,void 0,(function(){var e=this;return $a(this,(function(n){return[2,this.withErrorHandling((function(){return Ka(e,void 0,void 0,(function(){var e;return $a(this,(function(n){switch(n.label){case 0:return[4,this.apiGateway.paywall.getPlans(t)];case 1:return e=n.sent(),[2,this.modelMapper.mapPlans(e.data)]}}))}))}),(function(e){return"Failed to get paywall ".concat(e)}))]}))}))},e.prototype.getCustomer=function(){return Ka(this,void 0,void 0,(function(){var e=this;return $a(this,(function(t){return[2,this.withErrorHandling((function(){return Ka(e,void 0,void 0,(function(){var e,t,n;return $a(this,(function(r){switch(r.label){case 0:return e=zt(this.configuration),[4,this.apiGateway.customers.getCustomer(e)];case 1:return t=r.sent(),n=t.data.customers.edges[0].node,[2,this.modelMapper.mapCustomer(n)]}}))}))}),(function(e){return"Failed to get customer ".concat(e)}))]}))}))},e.prototype.getEntitlements=function(){return Ka(this,void 0,void 0,(function(){var e=this;return $a(this,(function(t){return[2,this.withErrorHandling((function(){return Ka(e,void 0,void 0,(function(){var e;return $a(this,(function(t){return zt(this.configuration),[2,(null===(e=this.entitlementsService)||void 0===e?void 0:e.getEntitlements())||[]]}))}))}),(function(e){return"Failed to get entitlements ".concat(e)}))]}))}))},e.prototype.withErrorHandling=function(e,t){try{return e()}catch(e){var n=t?t(e):"Operation failed ".concat(e);throw new Error(n)}},e}()},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"@stigg/js-client-sdk","version":"0.25.1","description":"Stigg client-side SDK for Browser","main":"dist/index.js","typings":"dist/index.d.ts","repository":"https://github.com/stiggio/js-client-sdk.git","license":"MIT","scripts":{"start":"webpack serve","build:types":"tsc --emitDeclarationOnly","build":"yarn build:types && webpack","build:watch":"webpack --watch","build:prod":"yarn build:types && webpack --env production","generate":"graphql-codegen && yarn run fix:lint","fix":"run-s fix:*","fix:prettier":"prettier \\"src/**/*.ts\\" --write","fix:lint":"eslint src --ext .ts --fix","test":"jest","test:watch":"jest --watch","test:cov":"jest --coverage","prepare":"husky install","docs":"typedoc"},"files":["dist/**/*"],"dependencies":{"@apollo/client":"^3.4.17","cross-fetch":"^3.1.4","graphql":"^16.0.1","husky":"^7.0.4","lint-staged":"^12.0.2","lodash":"^4.17.21"},"devDependencies":{"@commitlint/cli":"^14.1.0","@commitlint/config-conventional":"^14.1.0","@graphql-codegen/cli":"^2.3.0","@graphql-codegen/fragment-matcher":"^3.2.1","@graphql-codegen/schema-ast":"^2.4.0","@graphql-codegen/typescript":"^2.4.0","@graphql-codegen/typescript-operations":"^2.2.0","@types/jest":"^27.0.2","@types/lodash":"^4.14.177","@typescript-eslint/eslint-plugin":"^5.4.0","@typescript-eslint/parser":"^5.4.0","eslint":"^8.2.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","jest":"^27.3.1","jest-fetch-mock":"^3.0.3","msw":"^0.35.0","npm-run-all":"^4.1.5","prettier":"^2.4.1","ts-jest":"^27.0.7","ts-loader":"^9.2.6","typedoc":"^0.22.13","typedoc-plugin-rename-defaults":"^0.4.0","typescript":"^4.5.3","webpack":"^5.64.1","webpack-cli":"^4.9.1","webpack-dev-server":"^4.5.0"},"lint-staged":{"*.{js,jsx,ts,tsx}":["prettier --check","eslint --cache"]}}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(3300)})()}));
|
|
3
2
|
//# sourceMappingURL=index.js.map
|