text: (function (global, factory) {
  	typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  	typeof define === 'function' && define.amd ? define(['exports'], factory) :
  	(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.RTK = {}));
  }(this, (function (exports) { 'use strict';
  
  	exports.QueryStatus = void 0;var t,n=undefined&&undefined.__generator||function(e,t){var n,r,i,u,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return u={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function o(u){return function(o){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a);}catch(e){u=[6,e],r=0;}finally{n=i=0;}if(5&u[0])throw u[1];return {value:u[0]?u[1]:void 0,done:!0}}([u,o])}}},r=undefined&&undefined.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},i=Object.defineProperty,u=Object.prototype.hasOwnProperty,a=Object.getOwnPropertySymbols,o=Object.prototype.propertyIsEnumerable,c=function(e,t,n){return t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},s=function(e,t){for(var n in t||(t={}))u.call(t,n)&&c(e,n,t[n]);if(a)for(var r=0,i=a(t);r<i.length;r++)o.call(t,n=i[r])&&c(e,n,t[n]);return e},f=function(e,t){var n={};for(var r in e)u.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&a)for(var i=0,c=a(e);i<c.length;i++)t.indexOf(r=c[i])<0&&o.call(e,r)&&(n[r]=e[r]);return n},l=function(e,t,n){return new Promise((function(r,i){var u=function(e){try{o(n.next(e));}catch(e){i(e);}},a=function(e){try{o(n.throw(e));}catch(e){i(e);}},o=function(e){return e.done?r(e.value):Promise.resolve(e.value).then(u,a)};o((n=n.apply(e,t)).next());}))};function d(e){return "Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}(t=exports.QueryStatus||(exports.QueryStatus={})).uninitialized="uninitialized",t.pending="pending",t.fulfilled="fulfilled",t.rejected="rejected","function"==typeof Symbol&&Symbol;var p,v,h=function(){return Math.random().toString(36).substring(7).split("").join(".")},y={INIT:"@@redux/INIT"+h(),REPLACE:"@@redux/REPLACE"+h(),PROBE_UNKNOWN_ACTION:function(){return "@@redux/PROBE_UNKNOWN_ACTION"+h()}};function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function g(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return "'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function b(e){return !!e&&!!e[ie]}function O(e){return !!e&&(function(e){if(!e||"object"!=typeof e)return !1;var t=Object.getPrototypeOf(e);if(null===t)return !0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return "function"==typeof n&&Function.toString.call(n)===ue}(e)||Array.isArray(e)||!!e[re]||!!e.constructor[re]||R(e)||T(e))}function w(e,t,n){void 0===n&&(n=!1),0===j(e)?(n?Object.keys:ae)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e);})):e.forEach((function(n,r){return t(r,n,e)}));}function j(e){var t=e[ie];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:R(e)?2:T(e)?3:0}function q(e,t){return 2===j(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function A(e,t){return 2===j(e)?e.get(t):e[t]}function P(e,t,n){var r=j(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n;}function S(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function R(e){return Z&&e instanceof Map}function T(e){return ee&&e instanceof Set}function I(e){return e.o||e.t}function E(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=oe(e);delete t[ie];for(var n=ae(t),r=0;r<n.length;r++){var i=n[r],u=t[i];!1===u.writable&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(t[i]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[i]});}return Object.create(Object.getPrototypeOf(e),t)}function k(e,t){return void 0===t&&(t=!1),C(e)||b(e)||!O(e)||(j(e)>1&&(e.set=e.add=e.clear=e.delete=x),Object.freeze(e),t&&w(e,(function(e,t){return k(t,!0)}),!0)),e}function x(){g(2);}function C(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function D(e){var t=ce[e];return t||g(18,e),t}function N(e,t){ce[e]||(ce[e]=t);}function Q(){return v}function M(e,t){t&&(D("Patches"),e.u=[],e.s=[],e.v=t);}function K(e){_(e),e.p.forEach(z),e.p=null;}function _(e){e===v&&(v=e.l);}function F(e){return v={p:[],l:v,h:e,m:!0,_:0}}function z(e){var t=e[ie];0===t.i||1===t.i?t.j():t.g=!0;}function L(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.O||D("ES5").S(t,e,r),r?(n[ie].P&&(K(t),g(4)),O(e)&&(e=W(t,e),t.l||V(t,e)),t.u&&D("Patches").M(n[ie],e,t.u,t.s)):e=W(t,n,[]),K(t),t.u&&t.v(t.u,t.s),e!==ne?e:void 0}function W(e,t,n){if(C(t))return t;var r=t[ie];if(!r)return w(t,(function(i,u){return U(e,r,t,i,u,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return V(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=E(r.k):r.o;w(3===r.i?new Set(i):i,(function(t,u){return U(e,r,i,t,u,n)})),V(e,i,!1),n&&e.u&&D("Patches").R(r,n,e.u,e.s);}return r.o}function U(e,t,n,r,i,u){if(b(i)){var a=W(e,i,u&&t&&3!==t.i&&!q(t.D,r)?u.concat(r):void 0);if(P(n,r,a),!b(a))return;e.m=!1;}if(O(i)&&!C(i)){if(!e.h.F&&e._<1)return;W(e,i),t&&t.A.l||V(e,i);}}function V(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&k(t,n);}function H(e,t){var n=e[ie];return (n?I(n):e)[t]}function J(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n);}}function B(e){e.P||(e.P=!0,e.l&&B(e.l));}function $(e){e.o||(e.o=E(e.t));}function G(e,t,n){var r=R(t)?D("MapSet").N(t,n):T(t)?D("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:Q(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,u=se;n&&(i=[r],u=fe);var a=Proxy.revocable(i,u),o=a.revoke,c=a.proxy;return r.k=c,r.j=o,c}(t,n):D("ES5").J(t,n);return (n?n.A:Q()).p.push(r),r}function X(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return E(e)}var Y="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Z="undefined"!=typeof Map,ee="undefined"!=typeof Set,te="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ne=Y?Symbol.for("immer-nothing"):((p={})["immer-nothing"]=!0,p),re=Y?Symbol.for("immer-draftable"):"__$immer_draftable",ie=Y?Symbol.for("immer-state"):"__$immer_state",ue=(""+Object.prototype.constructor),ae="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,oe=Object.getOwnPropertyDescriptors||function(e){var t={};return ae(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n);})),t},ce={},se={get:function(e,t){if(t===ie)return e;var n,r,i,u=I(e);if(!q(u,t))return n=e,(i=J(u,t))?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(n.k):void 0;var a=u[t];return e.I||!O(a)?a:a===H(e.t,t)?($(e),e.o[t]=G(e.A.h,a,e)):a},has:function(e,t){return t in I(e)},ownKeys:function(e){return Reflect.ownKeys(I(e))},set:function(e,t,n){var r=J(I(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=H(I(e),t),u=null==i?void 0:i[ie];if(u&&u.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(S(n,i)&&(void 0!==n||q(e.t,t)))return !0;$(e),B(e);}return e.o[t]===n&&"number"!=typeof n||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==H(e.t,t)||t in e.t?(e.D[t]=!1,$(e),B(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=I(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){g(11);},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){g(12);}},fe={};w(se,(function(e,t){fe[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)};})),fe.deleteProperty=function(e,t){return se.deleteProperty.call(this,e[0],t)},fe.set=function(e,t,n){return se.set.call(this,e[0],t,n,e[0])};var le=new(function(){function e(e){var t=this;this.O=te,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var i=n;n=e;var u=t;return function(e){var t=this;void 0===e&&(e=i);for(var r=arguments.length,a=Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];return u.produce(e,(function(e){var r;return (r=n).call.apply(r,[t,e].concat(a))}))}}var a;if("function"!=typeof n&&g(6),void 0!==r&&"function"!=typeof r&&g(7),O(e)){var o=F(t),c=G(t,e,void 0),s=!0;try{a=n(c),s=!1;}finally{s?K(o):_(o);}return "undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return M(o,r),L(e,o)}),(function(e){throw K(o),e})):(M(o,r),L(a,o))}if(!e||"object"!=typeof e){if((a=n(e))===ne)return;return void 0===a&&(a=e),t.F&&k(a,!0),a}g(21,e);},this.produceWithPatches=function(e,n){return "function"==typeof e?function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),u=1;u<r;u++)i[u-1]=arguments[u];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))}:[t.produce(e,n,(function(e,t){r=e,i=t;})),r,i];var r,i;},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze);}var t=e.prototype;return t.createDraft=function(e){O(e)||g(8),b(e)&&(e=function(e){return b(e)||g(22,e),function e(t){if(!O(t))return t;var n,r=t[ie],i=j(t);if(r){if(!r.P&&(r.i<4||!D("ES5").K(r)))return r.t;r.I=!0,n=X(t,i),r.I=!1;}else n=X(t,i);return w(n,(function(t,i){r&&A(r.t,t)===i||P(n,t,e(i));})),3===i?new Set(n):n}(e)}(e));var t=F(this),n=G(this,e,void 0);return n[ie].C=!0,_(t),n},t.finishDraft=function(e,t){var n=(e&&e[ie]).A;return M(n,t),L(void 0,n)},t.setAutoFreeze=function(e){this.F=e;},t.setUseProxies=function(e){e&&!te&&g(20),this.O=e;},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}var i=D("Patches").$;return b(e)?i(e,t):this.produce(e,(function(e){return i(e,t.slice(n+1))}))},e}()),de=le.produce,pe=le.produceWithPatches.bind(le),ve=(le.setAutoFreeze.bind(le),le.setUseProxies.bind(le),le.applyPatches.bind(le)),he=(le.createDraft.bind(le),le.finishDraft.bind(le),de);function ye(e,t){return e===t}function me(e,t,n){if(null===t||null===n||t.length!==n.length)return !1;for(var r=t.length,i=0;i<r;i++)if(!e(t[i],n[i]))return !1;return !0}function ge(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return "function"==typeof e}))){var n=t.map((function(e){return typeof e})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}var be=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];var u=0,a=r.pop(),o=ge(r),c=e.apply(void 0,[function(){return u++,a.apply(null,arguments)}].concat(n)),s=e((function(){for(var e=[],t=o.length,n=0;n<t;n++)e.push(o[n].apply(null,arguments));return c.apply(null,e)}));return s.resultFunc=a,s.dependencies=o,s.recomputations=function(){return u},s.resetRecomputations=function(){return u=0},s}}((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye,n=null,r=null;return function(){return me(t,n,arguments)||(r=e.apply(null,arguments)),n=arguments,r}}));function Oe(e){if("object"!=typeof e||null===e)return !1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function we(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return s(s({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return {type:e,payload:n[0]}}return n.toString=function(){return ""+e},n.type=e,n.match=function(t){return t.type===e},n}function je(e){var t,n={},r=[],i={addCase:function(e,t){var r="string"==typeof e?e:e.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=t,i},addMatcher:function(e,t){return r.push({matcher:e,reducer:t}),i},addDefaultCase:function(e){return t=e,i}};return e(i),[n,r,t]}function qe(e){var t=e.name,n=e.initialState;if(!t)throw new Error("`name` is a required option for createSlice");var i=e.reducers||{},u="function"==typeof e.extraReducers?je(e.extraReducers):[e.extraReducers],a=u[0],o=void 0===a?{}:a,c=u[1],f=void 0===c?[]:c,l=u[2],d=void 0===l?void 0:l,p=Object.keys(i),v={},h={},y={};p.forEach((function(e){var n,r,u=i[e],a=t+"/"+e;"reducer"in u?(n=u.reducer,r=u.prepare):n=u,v[e]=n,h[a]=n,y[e]=r?we(a,r):we(a);}));var m=function(e,t,n,i){void 0===n&&(n=[]),function(){function e(e,t){var n=i[e];return n?n.enumerable=t:i[e]=n={configurable:!0,enumerable:t,get:function(){return se.get(this[ie],e)},set:function(t){se.set(this[ie],e,t);}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][ie];if(!i.P)switch(i.i){case 5:r(i)&&B(i);break;case 4:n(i)&&B(i);}}}function n(e){for(var t=e.t,n=e.k,r=ae(n),i=r.length-1;i>=0;i--){var u=r[i];if(u!==ie){var a=t[u];if(void 0===a&&!q(t,u))return !0;var o=n[u],c=o&&o[ie];if(c?c.t!==a:!S(o,a))return !0}}var s=!!t[ie];return r.length!==ae(t).length+(s?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return !0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return !(!n||n.get)}var i={};N("ES5",{J:function(t,n){var r=Array.isArray(t),i=function(t,n){if(t){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,e(i,!0));return r}var u=oe(n);delete u[ie];for(var a=ae(u),o=0;o<a.length;o++){var c=a[o];u[c]=e(c,t||!!u[c].enumerable);}return Object.create(Object.getPrototypeOf(n),u)}(r,t),u={i:r?5:4,A:n?n.A:Q(),P:!1,I:!1,D:{},l:n,t:t,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,ie,{value:u,writable:!0}),i},S:function(e,n,i){i?b(n)&&n[ie].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[ie];if(n){var i=n.t,u=n.k,a=n.D,o=n.i;if(4===o)w(u,(function(t){t!==ie&&(void 0!==i[t]||q(i,t)?a[t]||e(u[t]):(a[t]=!0,B(n)));})),w(i,(function(e){void 0!==u[e]||q(u,e)||(a[e]=!1,B(n));}));else if(5===o){if(r(n)&&(B(n),a.length=!0),u.length<i.length)for(var c=u.length;c<i.length;c++)a[c]=!1;else for(var s=i.length;s<u.length;s++)a[s]=!0;for(var f=Math.min(u.length,i.length),l=0;l<f;l++)void 0===a[l]&&e(u[l]);}}}}(e.p[0]),t(e.p));},K:function(e){return 4===e.i?n(e):r(e)}});}();var u="function"==typeof t?je(t):[t,n,i],a=u[0],o=u[1],c=u[2],s=he(e,(function(){}));return function(e,t){void 0===e&&(e=s);var n=r([a[t.type]],o.filter((function(e){return (0, e.matcher)(t)})).map((function(e){return e.reducer})));return 0===n.filter((function(e){return !!e})).length&&(n=[c]),n.reduce((function(e,n){if(n){var r;if(b(e))return void 0===(r=n(e,t))?e:r;if(O(e))return he(e,(function(e){return n(e,t)}));if(void 0===(r=n(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return e}),e)}}(n,s(s({},o),h),f,d);return {name:t,reducer:m,actions:y,caseReducers:v}}var Ae=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},Pe=["name","message","stack","code"],Se=function(e,t){this.payload=e,this.meta=t;},Re=function(e,t){this.payload=e,this.meta=t;},Te=function(e){if("object"==typeof e&&null!==e){for(var t={},n=0,r=Pe;n<r.length;n++){var i=r[n];"string"==typeof e[i]&&(t[i]=e[i]);}return t}return {message:String(e)}};function Ie(e,t,r){var i=we(e+"/fulfilled",(function(e,t,n,r){return {payload:e,meta:s(s({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),u=we(e+"/pending",(function(e,t,n){return {payload:void 0,meta:s(s({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),a=we(e+"/rejected",(function(e,t,n,i,u){return {payload:i,error:(r&&r.serializeError||Te)(e||"Rejected"),meta:s(s({},u||{}),{arg:n,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),o="undefined"!=typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return !1},onabort:function(){},removeEventListener:function(){}};}return e.prototype.abort=function(){},e}();return Object.assign((function(e){return function(c,s,f){var d,p,v=(null!=(d=null==r?void 0:r.idGenerator)?d:Ae)(),h=new o,y=new Promise((function(e,t){return h.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:p||"Aborted"})}))})),m=!1,g=function(){return l(this,null,(function(){var o,l,d;return n(this,(function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),r&&r.condition&&!1===r.condition(e,{getState:s,extra:f}))throw {name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,c(u(v,e,null==(o=null==r?void 0:r.getPendingMeta)?void 0:o.call(r,{requestId:v,arg:e},{getState:s,extra:f}))),[4,Promise.race([y,Promise.resolve(t(e,{dispatch:c,getState:s,extra:f,requestId:v,signal:h.signal,rejectWithValue:function(e,t){return new Se(e,t)},fulfillWithValue:function(e,t){return new Re(e,t)}})).then((function(t){if(t instanceof Se)throw t;return t instanceof Re?i(t.payload,v,e,t.meta):i(t,v,e)}))])];case 1:return l=n.sent(),[3,3];case 2:return d=n.sent(),l=d instanceof Se?a(null,v,e,d.payload,d.meta):a(d,v,e),[3,3];case 3:return r&&!r.dispatchConditionRejection&&a.match(l)&&l.meta.condition||c(l),[2,l]}}))}))}();return Object.assign(g,{abort:function(e){m&&(p=e,h.abort());},requestId:v,arg:e,unwrap:function(){return g.then(Ee)}})}}),{pending:u,rejected:a,fulfilled:i,typePrefix:e})}function Ee(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var ke=function(e,t){return (n=e)&&"function"==typeof n.match?e.match(t):e(t);var n;};function xe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some((function(e){return ke(e,t)}))}}function Ce(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.every((function(e){return ke(e,t)}))}}function De(e,t){if(!e||!e.meta)return !1;var n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function Ne(e){return "function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Qe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return De(e,["pending"])}:Ne(e)?function(t){var n=e.map((function(e){return e.pending}));return xe.apply(void 0,n)(t)}:Qe()(e[0])}function Me(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return De(e,["rejected"])}:Ne(e)?function(t){var n=e.map((function(e){return e.rejected}));return xe.apply(void 0,n)(t)}:Me()(e[0])}function Ke(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return e&&e.meta&&e.meta.rejectedWithValue};return 0===e.length||Ne(e)?function(t){return Ce(Me.apply(void 0,e),n)(t)}:Ke()(e[0])}function _e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return De(e,["fulfilled"])}:Ne(e)?function(t){var n=e.map((function(e){return e.fulfilled}));return xe.apply(void 0,n)(t)}:_e()(e[0])}function Fe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return De(e,["pending","fulfilled","rejected"])}:Ne(e)?function(t){for(var n=[],r=0,i=e;r<i.length;r++){var u=i[r];n.push(u.pending,u.rejected,u.fulfilled);}return xe.apply(void 0,n)(t)}:Fe()(e[0])}var ze=Oe;function Le(e,t){if(e===t||!(ze(e)&&ze(t)||Array.isArray(e)&&Array.isArray(t)))return t;for(var n=Object.keys(t),r=Object.keys(e),i=n.length===r.length,u=Array.isArray(t)?[]:{},a=0,o=n;a<o.length;a++){var c=o[a];u[c]=Le(e[c],t[c]),i&&(i=e[c]===u[c]);}return i?e:u}var We=function(e){return e.status>=200&&e.status<=299},Ue=function(e,t){return l(void 0,null,(function(){var r;return n(this,(function(n){switch(n.label){case 0:return "function"==typeof t?[2,t(e)]:"text"===t?[2,e.text()]:"json"!==t?[3,2]:[4,e.text()];case 1:return [2,(r=n.sent()).length?JSON.parse(r):void 0];case 2:return [2]}}))}))};function Ve(e){if(!Oe(e))return e;for(var t=s({},e),n=0,r=Object.entries(t);n<r.length;n++){var i=r[n];void 0===i[1]&&delete t[i[0]];}return t}function He(e){var t=this;void 0===e&&(e={});var r=e.baseUrl,i=e.prepareHeaders,u=void 0===i?function(e){return e}:i,a=e.fetchFn,o=void 0===a?fetch:a,c=f(e,["baseUrl","prepareHeaders","fetchFn"]);return function(e,i){return l(t,[e,i],(function(e,t){var i,a,l,d,p,v,h,y,m,g,b,O,w,j,q,A,P,S,R,T,I,E,k,x,C,D,N=t.signal,Q=t.getState;return n(this,(function(t){switch(t.label){case 0:return a=(i="string"==typeof e?{url:e}:e).url,d=void 0===(l=i.method)?"GET":l,v=void 0===(p=i.headers)?new Headers({}):p,y=void 0===(h=i.body)?void 0:h,g=void 0===(m=i.params)?void 0:m,O=void 0===(b=i.responseHandler)?"json":b,j=void 0===(w=i.validateStatus)?We:w,q=f(i,["url","method","headers","body","params","responseHandler","validateStatus"]),A=s(s(s({},c),{method:d,signal:N,body:y}),q),P=A,[4,u(new Headers(Ve(v)),{getState:Q})];case 1:return P.headers=t.sent(),S=function(e){return "object"==typeof e&&(Oe(e)||Array.isArray(e)||"function"==typeof e.toJSON)},!A.headers.has("content-type")&&S(y)&&A.headers.set("content-type","application/json"),y&&function(e){var t,n;return null==(n=null==(t=e.get("content-type"))?void 0:t.trim())?void 0:n.startsWith("application/json")}(A.headers)&&(A.body=JSON.stringify(y)),g&&(R=~a.indexOf("?")?"&":"?",T=new URLSearchParams(Ve(g)),a+=R+T),a=function(e,t){return e?t?function(e){return new RegExp("(^|:)//").test(e)}(t)?t:(e=function(e){return e.replace(/\/$/,"")}(e))+"/"+(t=function(e){return e.replace(/^\//,"")}(t)):e:t}(r,a),I=new Request(a,A),E=I.clone(),[4,o(I)];case 2:return k=t.sent(),x=k.clone(),C={request:E,response:x},[4,Ue(k,O)];case 3:return D=t.sent(),[2,j(k,D)?{data:D,meta:C}:{error:{status:k.status,data:D},meta:C}]}}))}))}}var Je=function(e,t){void 0===t&&(t=void 0),this.value=e,this.meta=t;};function Be(e,t){return void 0===e&&(e=0),void 0===t&&(t=5),l(this,null,(function(){var r,i;return n(this,(function(n){switch(n.label){case 0:return r=Math.min(e,t),i=~~((Math.random()+.4)*(300<<r)),[4,new Promise((function(e){return setTimeout((function(t){return e(t)}),i)}))];case 1:return n.sent(),[2]}}))}))}var $e=Object.assign((function(e,t){return function(r,i,u){return l(void 0,null,(function(){var a,o,c,f;return n(this,(function(n){switch(n.label){case 0:a=s(s({maxRetries:5,backoff:Be},t),u),o=0,n.label=1;case 1:n.label=2;case 2:return n.trys.push([2,4,,6]),[4,e(r,i,u)];case 3:if((c=n.sent()).error)throw new Je(c);return [2,c];case 4:if(f=n.sent(),o++,f.throwImmediately||o>a.maxRetries){if(f instanceof Je)return [2,f.value];throw f}return [4,a.backoff(o,a.maxRetries)];case 5:return n.sent(),[3,6];case 6:return [3,1];case 7:return [2]}}))}))}}),{fail:function(e){throw Object.assign(new Je({error:e}),{throwImmediately:!0})}}),Ge=we("__rtkq/focused"),Xe=we("__rtkq/unfocused"),Ye=we("__rtkq/online"),Ze=we("__rtkq/offline"),et=!1;function tt(e,t){return t?t(e,{onFocus:Ge,onFocusLost:Xe,onOffline:Ze,onOnline:Ye}):(n=function(){return e(Ge())},r=function(){return e(Ye())},i=function(){return e(Ze())},u=function(){"visible"===window.document.visibilityState?n():e(Xe());},et||"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("visibilitychange",u,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",r,!1),window.addEventListener("offline",i,!1),et=!0),function(){window.removeEventListener("focus",n),window.removeEventListener("visibilitychange",u),window.removeEventListener("online",r),window.removeEventListener("offline",i),et=!1;});var n,r,i,u;}var nt,rt,it=Symbol("skip selector"),ut=it,at={status:exports.QueryStatus.uninitialized},ot=he(at,(function(){})),ct=he(at,(function(){})),st=function(e){return e.endpointName+"("+JSON.stringify(e.queryArgs,(function(e,t){return Oe(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))+")"};function ft(e,t,n,r,i){return "function"==typeof e?e(t,n,r).map(lt).map(i):Array.isArray(e)?e.map(lt).map(i):[]}function lt(e){return "string"==typeof e?{type:e}:e}function dt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n=s(s({reducerPath:"api",serializeQueryArgs:st,keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},t),{tagTypes:r([],t.tagTypes||[])}),i={endpointDefinitions:{},batch:function(e){e();}},u={injectEndpoints:function(e){for(var t=e.endpoints({query:function(e){return s(s({},e),{type:nt.query})},mutation:function(e){return s(s({},e),{type:nt.mutation})}}),n=0,r=Object.entries(t);n<r.length;n++){var o=r[n],c=o[0],f=o[1];if(e.overrideExisting||!(c in i.endpointDefinitions)){i.endpointDefinitions[c]=f;for(var l=0,d=a;l<d.length;l++)d[l].injectEndpoint(c,f);}}return u},enhanceEndpoints:function(e){var t=e.addTagTypes,r=e.endpoints;if(t)for(var a=0,o=t;a<o.length;a++){var c=o[a];n.tagTypes.includes(c)||n.tagTypes.push(c);}if(r)for(var s=0,f=Object.entries(r);s<f.length;s++){var l=f[s],d=l[0],p=l[1];"function"==typeof p&&p(i.endpointDefinitions[d]),Object.assign(i.endpointDefinitions[d]||{},p);}return u}},a=e.map((function(e){return e.init(u,n,i)}));return u.injectEndpoints({endpoints:t.endpoints})}}function pt(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}function vt(e){return e}function ht(e,t,n,r){return ft(n[e.meta.arg.endpointName][t],_e(e)?e.payload:void 0,Ke(e)?e.payload:void 0,e.meta.arg.originalArgs,r)}function yt(e,t,n){var r=e[t];r&&n(r);}function mt(e,t,n){var r=e[t.requestId];r&&n(r);}(rt=nt||(nt={})).query="query",rt.mutation="mutation";var gt={},bt=function(e){var t=e.reducerPath,n=e.api,r=e.context,i=n.internalActions,u=i.removeQueryResult,a=i.unsubscribeQueryResult;return function(e){var i={};return function(o){return function(c){var s,f,l=o(c);if(a.match(c)){var d=e.getState()[t],p=c.payload.queryCacheKey,v=r.endpointDefinitions[null==(s=d.queries[p])?void 0:s.endpointName];!function(e,n,r){var a=i[e];a&&clearTimeout(a),i[e]=setTimeout((function(){var r=n.getState()[t].subscriptions[e];r&&0!==Object.keys(r).length||n.dispatch(u({queryCacheKey:e})),delete i[e];}),1e3*r);}(p,e,null!=(f=null==v?void 0:v.keepUnusedDataFor)?f:d.config.keepUnusedDataFor);}if(n.util.resetApiState.match(c))for(var h=0,y=Object.entries(i);h<y.length;h++){var m=y[h],g=m[0],b=m[1];b&&clearTimeout(b),delete i[g];}return l}}}},Ot=function(t){var n=t.reducerPath,r=t.context,i=t.context.endpointDefinitions,u=t.mutationThunk,a=t.api,o=t.assertTagType,c=t.refetchQuery,s=a.internalActions.removeQueryResult;return function(e){return function(t){return function(n){var r=t(n);return xe(_e(u),Ke(u))(n)&&f(ht(n,"invalidatesTags",i,o),e),a.util.invalidateTags.match(n)&&f(ft(n.payload,void 0,void 0,void 0,o),e),r}}};function f(t,i){for(var u,a,o=i.getState()[n],f=new Set,l=0,d=t;l<d.length;l++){var p=d[l],v=o.provided[p.type];if(v)for(var h=0,y=null!=(u=void 0!==p.id?v[p.id]:(a=Object.values(v),[].concat.apply([],a)))?u:[];h<y.length;h++)f.add(y[h]);}r.batch((function(){for(var t=0,n=Array.from(f.values());t<n.length;t++){var r=n[t],u=o.queries[r],a=o.subscriptions[r];u&&a&&(0===Object.keys(a).length?i.dispatch(s({queryCacheKey:r})):u.status!==exports.QueryStatus.uninitialized&&i.dispatch(c(u,r)));}}));}},wt=function(t){var n=t.reducerPath,r=t.queryThunk,i=t.api,u=t.refetchQuery;return function(t){var o={};return function(e){return function(n){var u=e(n);return i.internalActions.updateSubscriptionOptions.match(n)&&s(n.payload,t),(r.pending.match(n)||r.rejected.match(n)&&n.meta.condition)&&s(n.meta.arg,t),(r.fulfilled.match(n)||r.rejected.match(n)&&!n.meta.condition)&&c(n.meta.arg,t),i.util.resetApiState.match(n)&&function(){for(var e=0,t=Object.entries(o);e<t.length;e++){var n=t[e],r=n[0],i=n[1];(null==i?void 0:i.timeout)&&clearTimeout(i.timeout),delete o[r];}}(),u}};function c(t,r){var i=t.queryCacheKey,c=r.getState()[n],s=c.queries[i];if(s&&s.status!==exports.QueryStatus.uninitialized){var f=a(c.subscriptions[i]);if(Number.isFinite(f)){var l=o[i];(null==l?void 0:l.timeout)&&(clearTimeout(l.timeout),l.timeout=void 0);var d=Date.now()+f,p=o[i]={nextPollTimestamp:d,pollingInterval:f,timeout:setTimeout((function(){p.timeout=void 0,r.dispatch(u(s,i));}),f)};}}}function s(t,r){var i=t.queryCacheKey,u=r.getState()[n],s=u.queries[i];if(s&&s.status!==exports.QueryStatus.uninitialized){var f=a(u.subscriptions[i]),l=o[i];if(!Number.isFinite(f))return (null==l?void 0:l.timeout)&&clearTimeout(l.timeout),void delete o[i];var d=Date.now()+f;(!l||d<l.nextPollTimestamp)&&c({queryCacheKey:i},r);}}};function a(e){void 0===e&&(e={});for(var t=Number.POSITIVE_INFINITY,n=0,r=Object.values(e);n<r.length;n++){var i=r[n];i.pollingInterval&&(t=Math.min(i.pollingInterval,t));}return t}},jt=function(t){var n=t.reducerPath,r=t.context,i=t.refetchQuery;return function(e){return function(t){return function(n){var r=t(n);return Ge.match(n)&&u(e,"refetchOnFocus"),Ye.match(n)&&u(e,"refetchOnReconnect"),r}}};function u(t,u){var a=t.getState()[n],o=a.queries,c=a.subscriptions;r.batch((function(){for(var n=0,r=Object.keys(c);n<r.length;n++){var s=r[n],f=o[s],l=c[s];if(!l||!f||f.status===exports.QueryStatus.uninitialized)return;(Object.values(l).some((function(e){return !0===e[u]}))||Object.values(l).every((function(e){return void 0===e[u]}))&&a.config[u])&&t.dispatch(i(f,s));}}));}},qt=new Error("Promise never resolved before cacheEntryRemoved."),At=function(e){var t=e.api,n=e.reducerPath,r=e.context,i=e.queryThunk,u=e.mutationThunk,a=Fe(i),o=Fe(u),c=_e(i,u);return function(e){var f={};return function(r){return function(s){var d=e.getState(),p=r(s),v=function(e){return a(e)?e.meta.arg.queryCacheKey:o(e)?e.meta.requestId:t.internalActions.removeQueryResult.match(e)?e.payload.queryCacheKey:t.internalActions.unsubscribeMutationResult.match(e)?e.payload.requestId:""}(s);if(i.pending.match(s)){var h=d[n].queries[v],y=e.getState()[n].queries[v];!h&&y&&l(s.meta.arg.endpointName,s.meta.arg.originalArgs,v,e,s.meta.requestId);}else if(u.pending.match(s))(y=e.getState()[n].mutations[v])&&l(s.meta.arg.endpointName,s.meta.arg.originalArgs,v,e,s.meta.requestId);else if(c(s))(null==(O=f[v])?void 0:O.valueResolved)&&(O.valueResolved({data:s.payload,meta:s.meta.baseQueryMeta}),delete O.valueResolved);else if(t.internalActions.removeQueryResult.match(s)||t.internalActions.unsubscribeMutationResult.match(s))(O=f[v])&&(delete f[v],O.cacheEntryRemoved());else if(t.util.resetApiState.match(s))for(var m=0,g=Object.entries(f);m<g.length;m++){var b=g[m],O=b[1];delete f[b[0]],O.cacheEntryRemoved();}return p}};function l(e,n,i,u,a){var o=r.endpointDefinitions[e],c=null==o?void 0:o.onCacheEntryAdded;if(c){var l={},d=new Promise((function(e){l.cacheEntryRemoved=e;})),p=Promise.race([new Promise((function(e){l.valueResolved=e;})),d.then((function(){throw qt}))]);p.catch((function(){})),f[i]=l;var v=t.endpoints[e].select(o.type===nt.query?n:i),h=u.dispatch((function(e,t,n){return n})),y=s(s({},u),{getCacheEntry:function(){return v(u.getState())},requestId:a,extra:h,updateCachedData:o.type===nt.query?function(r){return u.dispatch(t.util.updateQueryData(e,n,r))}:void 0,cacheDataLoaded:p,cacheEntryRemoved:d}),m=c(n,y);Promise.resolve(m).catch((function(e){if(e!==qt)throw e}));}}}},Pt=function(e){var t=e.api,n=e.context,r=e.queryThunk,i=e.mutationThunk,u=Qe(r,i),a=Me(r,i),o=_e(r,i);return function(e){var r={};return function(i){return function(c){var f,l,d,p=i(c);if(u(c)){var v=c.meta,h=v.requestId,y=v.arg,m=y.endpointName,g=y.originalArgs,b=n.endpointDefinitions[m],O=null==b?void 0:b.onQueryStarted;if(O){var w={},j=new Promise((function(e,t){w.resolve=e,w.reject=t;}));j.catch((function(){})),r[h]=w;var q=t.endpoints[m].select(b.type===nt.query?g:h),A=e.dispatch((function(e,t,n){return n})),P=s(s({},e),{getCacheEntry:function(){return q(e.getState())},requestId:h,extra:A,updateCachedData:b.type===nt.query?function(n){return e.dispatch(t.util.updateQueryData(m,g,n))}:void 0,queryFulfilled:j});O(g,P);}}else if(o(c)){var S=c.meta,R=S.baseQueryMeta;null==(f=r[h=S.requestId])||f.resolve({data:c.payload,meta:R}),delete r[h];}else if(a(c)){var T=c.meta;R=T.baseQueryMeta,null==(d=r[h=T.requestId])||d.reject({error:null!=(l=c.payload)?l:c.error,isUnhandledError:!T.rejectedWithValue,meta:R}),delete r[h];}return p}}}},St=function(e){var t=e.api;return function(e){var n=!1;return function(r){return function(i){n||(n=!0,e.dispatch(t.internalActions.middlewareRegistered()));var u=r(i);return t.util.resetApiState.match(i)&&e.dispatch(t.internalActions.middlewareRegistered()),u}}}};function Rt(e){var t=e.reducerPath,n=e.queryThunk,r={invalidateTags:we(t+"/invalidateTags")},i=[St,bt,Ot,wt,jt,At,Pt].map((function(t){return t(s(s({},e),{refetchQuery:u}))}));return {middleware:function(e){return function(n){var r=m.apply(void 0,i.map((function(t){return t(e)})))(n);return function(i){return e.getState()[t]?r(i):n(i)}}},actions:r};function u(e,t,r){return void 0===r&&(r={}),n(s({endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t},r))}}function Tt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,r([e],t));}var It=Symbol(),Et=function(){return {name:It,init:function(t,r,i){var u=r.baseQuery,a=r.reducerPath,o=r.serializeQueryArgs,c=r.keepUnusedDataFor,f=r.refetchOnMountOrArgChange,p=r.refetchOnFocus,v=r.refetchOnReconnect;!function(){function e(t){if(!O(t))return t;if(Array.isArray(t))return t.map(e);if(R(t))return new Map(Array.from(t.entries()).map((function(t){return [t[0],e(t[1])]})));if(T(t))return new Set(Array.from(t).map(e));var n=Object.create(Object.getPrototypeOf(t));for(var r in t)n[r]=e(t[r]);return q(t,re)&&(n[re]=t[re]),n}function t(t){return b(t)?e(t):t}var n="add";N("Patches",{$:function(t,r){return r.forEach((function(r){for(var i=r.path,u=r.op,a=t,o=0;o<i.length-1;o++){var c=j(a),s=i[o];0!==c&&1!==c||"__proto__"!==s&&"constructor"!==s||g(24),"function"==typeof a&&"prototype"===s&&g(24),"object"!=typeof(a=A(a,s))&&g(15,i.join("/"));}var f=j(a),l=e(r.value),d=i[i.length-1];switch(u){case"replace":switch(f){case 2:return a.set(d,l);case 3:g(16);default:return a[d]=l}case n:switch(f){case 1:return a.splice(d,0,l);case 2:return a.set(d,l);case 3:return a.add(l);default:return a[d]=l}case"remove":switch(f){case 1:return a.splice(d,1);case 2:return a.delete(d);case 3:return a.delete(r.value);default:return delete a[d]}default:g(17,u);}})),t},R:function(e,r,i,u){switch(e.i){case 0:case 4:case 2:return o=r,c=i,s=u,f=(a=e).t,l=a.o,void w(a.D,(function(e,r){var i=A(f,e),u=A(l,e),a=r?q(f,e)?"replace":n:"remove";if(i!==u||"replace"!==a){var d=o.concat(e);c.push("remove"===a?{op:a,path:d}:{op:a,path:d,value:u}),s.push(a===n?{op:"remove",path:d}:"remove"===a?{op:n,path:d,value:t(i)}:{op:"replace",path:d,value:t(i)});}}));case 5:case 1:return function(e,r,i,u){var a=e.t,o=e.D,c=e.o;if(c.length<a.length){var s=[c,a];a=s[0],c=s[1];var f=[u,i];i=f[0],u=f[1];}for(var l=0;l<a.length;l++)if(o[l]&&c[l]!==a[l]){var d=r.concat([l]);i.push({op:"replace",path:d,value:t(c[l])}),u.push({op:"replace",path:d,value:t(a[l])});}for(var p=a.length;p<c.length;p++){var v=r.concat([p]);i.push({op:n,path:v,value:t(c[p])});}a.length<c.length&&u.push({op:"replace",path:r.concat(["length"]),value:a.length});}(e,r,i,u);case 3:return function(e,t,r,i){var u=e.t,a=e.o,o=0;u.forEach((function(e){if(!a.has(e)){var u=t.concat([o]);r.push({op:"remove",path:u,value:e}),i.unshift({op:n,path:u,value:e});}o++;})),o=0,a.forEach((function(e){if(!u.has(e)){var a=t.concat([o]);r.push({op:n,path:a,value:e}),i.unshift({op:"remove",path:a,value:e});}o++;}));}(e,r,i,u)}var a,o,c,s,f,l;},M:function(e,t,n,r){n.push({op:"replace",path:[],value:t}),r.push({op:"replace",path:[],value:e.t});}});}();var h=function(e){return e};Object.assign(t,{reducerPath:a,endpoints:{},internalActions:{onOnline:Ye,onOffline:Ze,onFocus:Ge,onFocusLost:Xe},util:{}});var m=function(t){var r=this,i=t.reducerPath,u=t.baseQuery,a=t.context.endpointDefinitions,o=t.serializeQueryArgs,c=t.api,s=function(e,t){return l(r,[e,t],(function(e,t){var r,i,o,c,s,f,l=t.signal,d=t.rejectWithValue,p=t.fulfillWithValue,v=t.dispatch,h=t.getState;return n(this,(function(t){switch(t.label){case 0:r=a[e.endpointName],t.label=1;case 1:return t.trys.push([1,7,,8]),i=vt,o=void 0,c={signal:l,dispatch:v,getState:h},r.query?[4,u(r.query(e.originalArgs),c,r.extraOptions)]:[3,3];case 2:return o=t.sent(),r.transformResponse&&(i=r.transformResponse),[3,5];case 3:return [4,r.queryFn(e.originalArgs,c,r.extraOptions,(function(e){return u(e,c,r.extraOptions)}))];case 4:o=t.sent(),t.label=5;case 5:if(o.error)throw new Je(o.error,o.meta);return s=p,[4,i(o.data,o.meta)];case 6:return [2,s.apply(void 0,[t.sent(),{fulfilledTimeStamp:Date.now(),baseQueryMeta:o.meta}])];case 7:if((f=t.sent())instanceof Je)return [2,d(f.value,{baseQueryMeta:f.meta})];throw f;case 8:return [2]}}))}))};function f(e){return function(t){var n,r;return (null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return {queryThunk:Ie(i+"/executeQuery",s,{getPendingMeta:function(){return {startedTimeStamp:Date.now()}},condition:function(e,t){var n,r,u=(0, t.getState)()[i],a=null==(n=null==u?void 0:u.queries)?void 0:n[e.queryCacheKey],o=null==a?void 0:a.fulfilledTimeStamp,c=null!=(r=e.forceRefetch)?r:e.subscribe&&u.config.refetchOnMountOrArgChange;return "pending"!==(null==a?void 0:a.status)&&(!o||!!c&&(!0===c||(Number(new Date)-Number(o))/1e3>=c))},dispatchConditionRejection:!0}),mutationThunk:Ie(i+"/executeMutation",s,{getPendingMeta:function(){return {startedTimeStamp:Date.now()}}}),prefetch:function(e,t,n){return function(r,i){var u=function(e){return "force"in e}(n)&&n.force,a=function(e){return "ifOlderThan"in e}(n)&&n.ifOlderThan,o=function(n){return void 0===n&&(n=!0),c.endpoints[e].initiate(t,{forceRefetch:n})},s=c.endpoints[e].select(t)(i());if(u)r(o());else if(a){var f=null==s?void 0:s.fulfilledTimeStamp;if(!f)return void r(o());(Number(new Date)-Number(new Date(f)))/1e3>=a&&r(o());}else r(o(!1));}},updateQueryData:function(t,n,r){return function(i,u){var a,o,s=c.endpoints[t].select(n)(u()),f={patches:[],inversePatches:[],undo:function(){return i(c.util.patchQueryData(t,n,f.inversePatches))}};if(s.status===exports.QueryStatus.uninitialized)return f;if("data"in s)if(O(s.data)){var l=pe(s.data,r),d=l[2];(a=f.patches).push.apply(a,l[1]),(o=f.inversePatches).push.apply(o,d);}else {var p=r(s.data);f.patches.push({op:"replace",path:[],value:p}),f.inversePatches.push({op:"replace",path:[],value:s.data});}return i(c.util.patchQueryData(t,n,f.patches)),f}},patchQueryData:function(e,t,n){return function(r){r(c.internalActions.queryResultPatched({queryCacheKey:o({queryArgs:t,endpointDefinition:a[e],endpointName:e}),patches:n}));}},buildMatchThunkActions:function(e,t){return {matchPending:Ce(Qe(e),f(t)),matchFulfilled:Ce(_e(e),f(t)),matchRejected:Ce(Me(e),f(t))}}}}({baseQuery:u,reducerPath:a,context:i,api:t,serializeQueryArgs:o}),P=m.queryThunk,S=m.mutationThunk,I=m.patchQueryData,E=m.updateQueryData,k=m.prefetch,x=m.buildMatchThunkActions,C=function(t){var n=t.reducerPath,r=t.queryThunk,i=t.mutationThunk,u=t.context.endpointDefinitions,a=t.assertTagType,o=t.config,c=we(n+"/resetApiState"),f=qe({name:n+"/queries",initialState:gt,reducers:{removeQueryResult:function(e,t){delete e[t.payload.queryCacheKey];},queryResultPatched:function(e,t){var n=t.payload,r=n.patches;yt(e,n.queryCacheKey,(function(e){e.data=ve(e.data,r.concat());}));}},extraReducers:function(t){t.addCase(r.pending,(function(t,n){var r,i=n.meta,u=n.meta.arg;u.subscribe&&(null!=t[r=u.queryCacheKey]||(t[r]={status:exports.QueryStatus.uninitialized,endpointName:u.endpointName})),yt(t,u.queryCacheKey,(function(t){t.status=exports.QueryStatus.pending,t.requestId=i.requestId,t.originalArgs=u.originalArgs,t.startedTimeStamp=i.startedTimeStamp;}));})).addCase(r.fulfilled,(function(t,n){var r=n.meta,i=n.payload;yt(t,r.arg.queryCacheKey,(function(t){t.requestId===r.requestId&&(t.status=exports.QueryStatus.fulfilled,t.data=Le(t.data,i),delete t.error,t.fulfilledTimeStamp=r.fulfilledTimeStamp);}));})).addCase(r.rejected,(function(t,n){var r=n.meta,i=r.condition,u=r.requestId,a=n.error,o=n.payload;yt(t,r.arg.queryCacheKey,(function(t){if(i);else {if(t.requestId!==u)return;t.status=exports.QueryStatus.rejected,t.error=null!=o?o:a;}}));}));}}),l=qe({name:n+"/mutations",initialState:gt,reducers:{unsubscribeMutationResult:function(e,t){t.payload.requestId in e&&delete e[t.payload.requestId];}},extraReducers:function(t){t.addCase(i.pending,(function(t,n){var r=n.meta,i=r.arg;i.track&&(t[r.requestId]={status:exports.QueryStatus.pending,originalArgs:i.originalArgs,endpointName:i.endpointName,startedTimeStamp:r.startedTimeStamp});})).addCase(i.fulfilled,(function(t,n){var r=n.payload,i=n.meta;i.arg.track&&mt(t,{requestId:n.meta.requestId},(function(t){t.status=exports.QueryStatus.fulfilled,t.data=r,t.fulfilledTimeStamp=i.fulfilledTimeStamp;}));})).addCase(i.rejected,(function(t,n){var r=n.payload,i=n.error,u=n.meta;u.arg.track&&mt(t,{requestId:u.requestId},(function(t){t.status=exports.QueryStatus.rejected,t.error=null!=r?r:i;}));}));}}),p=qe({name:n+"/invalidation",initialState:gt,reducers:{},extraReducers:function(e){e.addCase(f.actions.removeQueryResult,(function(e,t){for(var n=t.payload.queryCacheKey,r=0,i=Object.values(e);r<i.length;r++)for(var u=0,a=Object.values(i[r]);u<a.length;u++){var o=a[u],c=o.indexOf(n);-1!==c&&o.splice(c,1);}})).addMatcher(xe(_e(r),Ke(r)),(function(e,t){for(var n,r,i,o,c=ht(t,"providesTags",u,a),s=t.meta.arg.queryCacheKey,f=0,l=c;f<l.length;f++){var d=l[f],p=d.type,v=d.id,h=null!=(o=(r=null!=(n=e[p])?n:e[p]={})[i=v||"__internal_without_id"])?o:r[i]=[];h.includes(s)||h.push(s);}}));}}),v=qe({name:n+"/subscriptions",initialState:gt,reducers:{updateSubscriptionOptions:function(e,t){var n,r=t.payload,i=r.queryCacheKey,u=r.requestId;(null==(n=null==e?void 0:e[i])?void 0:n[u])&&(e[i][u]=r.options);},unsubscribeQueryResult:function(e,t){var n=t.payload,r=n.queryCacheKey;e[r]&&delete e[r][n.requestId];}},extraReducers:function(e){e.addCase(f.actions.removeQueryResult,(function(e,t){delete e[t.payload.queryCacheKey];})).addCase(r.pending,(function(e,t){var n,r,i,u,a=t.meta,o=a.arg,c=a.requestId;if(o.subscribe){var s=null!=(r=e[n=o.queryCacheKey])?r:e[n]={};s[c]=null!=(u=null!=(i=o.subscriptionOptions)?i:s[c])?u:{};}})).addCase(r.rejected,(function(e,t){var n,r,i=t.meta,u=i.arg,a=i.requestId,o=e[u.queryCacheKey];i.condition&&u.subscribe&&o&&(o[a]=null!=(r=null!=(n=u.subscriptionOptions)?n:o[a])?r:{});}));}}),h=qe({name:n+"/config",initialState:s({online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1},o),reducers:{middlewareRegistered:function(e){e.middlewareRegistered=!0;}},extraReducers:function(e){e.addCase(Ye,(function(e){e.online=!0;})).addCase(Ze,(function(e){e.online=!1;})).addCase(Ge,(function(e){e.focused=!0;})).addCase(Xe,(function(e){e.focused=!1;}));}}),m=function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];"function"==typeof e[i]&&(n[i]=e[i]);}var u,a=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:y.INIT}))throw new Error(d(12));if(void 0===n(void 0,{type:y.PROBE_UNKNOWN_ACTION()}))throw new Error(d(13))}));}(n);}catch(e){u=e;}return function(e,t){if(void 0===e&&(e={}),u)throw u;for(var r=!1,i={},o=0;o<a.length;o++){var c=a[o],s=e[c],f=(0, n[c])(s,t);if(void 0===f)throw new Error(d(14));i[c]=f,r=r||f!==s;}return (r=r||a.length!==Object.keys(e).length)?i:e}}({queries:f.reducer,mutations:l.reducer,provided:p.reducer,subscriptions:v.reducer,config:h.reducer});return {reducer:function(e,t){return m(c.match(t)?void 0:e,t)},actions:s(s(s(s(s({},h.actions),f.actions),v.actions),l.actions),{resetApiState:c})}}({context:i,queryThunk:P,mutationThunk:S,reducerPath:a,assertTagType:h,config:{refetchOnFocus:p,refetchOnReconnect:v,refetchOnMountOrArgChange:f,keepUnusedDataFor:c,reducerPath:a}}),D=C.reducer,Q=C.actions;Tt(t.util,{patchQueryData:I,updateQueryData:E,prefetch:k,resetApiState:Q.resetApiState}),Tt(t.internalActions,Q),Object.defineProperty(t.util,"updateQueryResult",{get:function(){return t.util.updateQueryData}}),Object.defineProperty(t.util,"patchQueryResult",{get:function(){return t.util.patchQueryData}});var M=Rt({reducerPath:a,context:i,queryThunk:P,mutationThunk:S,api:t,assertTagType:h}),K=M.middleware;Tt(t.util,M.actions),Tt(t,{reducer:D,middleware:K});var _=function(t){var n=t.serializeQueryArgs,r=t.reducerPath;return {buildQuerySelector:function(e,t){return function(r){var a=be(u,(function(i){var u,a;return null!=(a=r===it||null==(u=null==i?void 0:i.queries)?void 0:u[n({queryArgs:r,endpointDefinition:t,endpointName:e})])?a:ot}));return be(a,i)}},buildMutationSelector:function(){return function(e){var t=be(u,(function(t){var n,r;return null!=(r=e===it||null==(n=null==t?void 0:t.mutations)?void 0:n[e])?r:ct}));return be(t,i)}}};function i(t){return s(s({},t),{status:n=t.status,isUninitialized:n===exports.QueryStatus.uninitialized,isLoading:n===exports.QueryStatus.pending,isSuccess:n===exports.QueryStatus.fulfilled,isError:n===exports.QueryStatus.rejected});var n;}function u(e){return e[r]}}({serializeQueryArgs:o,reducerPath:a}),F=_.buildQuerySelector,z=_.buildMutationSelector,L=function(e){var t=e.serializeQueryArgs,n=e.queryThunk,r=e.mutationThunk,i=e.api,u=i.internalActions,a=u.unsubscribeQueryResult,o=u.unsubscribeMutationResult,c=u.updateSubscriptionOptions;return {buildInitiateQuery:function(e,r){var u=function(o,s){var f=void 0===s?{}:s,l=f.subscribe,d=void 0===l||l,p=f.forceRefetch,v=f.subscriptionOptions;return function(s,f){var l=t({queryArgs:o,endpointDefinition:r,endpointName:e}),h=n({subscribe:d,forceRefetch:p,subscriptionOptions:v,endpointName:e,originalArgs:o,queryCacheKey:l}),y=s(h),m=y.requestId,g=y.abort,b=Object.assign(y.then((function(){return i.endpoints[e].select(o)(f())})),{arg:o,requestId:m,subscriptionOptions:v,abort:g,refetch:function(){s(u(o,{subscribe:!1,forceRefetch:!0}));},unsubscribe:function(){d&&s(a({queryCacheKey:l,requestId:m}));},updateSubscriptionOptions:function(t){b.subscriptionOptions=t,s(c({endpointName:e,requestId:m,queryCacheKey:l,options:t}));}});return b}};return u},buildInitiateMutation:function(e,t){return function(t,n){var i=(void 0===n?{}:n).track,u=void 0===i||i;return function(n,i){var a=r({endpointName:e,originalArgs:t,track:u}),c=n(a),s=c.requestId,f=c.abort,l=c.unwrap().then((function(e){return {data:e}})).catch((function(e){return {error:e}}));return Object.assign(l,{arg:c.arg,requestId:s,abort:f,unwrap:c.unwrap,unsubscribe:function(){u&&n(o({requestId:s}));}})}}}}}({queryThunk:P,mutationThunk:S,api:t,serializeQueryArgs:o}),W=L.buildInitiateQuery,U=L.buildInitiateMutation;return {name:It,injectEndpoint:function(e,n){var r,i=t;null!=(r=i.endpoints)[e]||(r[e]={}),n.type===nt.query?Tt(i.endpoints[e],{select:F(e,n),initiate:W(e,n)},x(P,e)):n.type===nt.mutation&&Tt(i.endpoints[e],{select:z(),initiate:U(e,n)},x(S,e));}}}}},kt=dt(Et());
  
  	exports.buildCreateApi = dt;
  	exports.copyWithStructuralSharing = Le;
  	exports.coreModule = Et;
  	exports.createApi = kt;
  	exports.fakeBaseQuery = pt;
  	exports.fetchBaseQuery = He;
  	exports.retry = $e;
  	exports.setupListeners = tt;
  	exports.skipSelector = ut;
  	exports.skipToken = it;
  
  	Object.defineProperty(exports, '__esModule', { value: true });
  
  })));
  //# sourceMappingURL=rtk-query.umd.min.js.map
  