react-global-state-hooks 3.1.1 → 3.2.0

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/README.md CHANGED
@@ -100,7 +100,7 @@ return (
100
100
  );
101
101
  ```
102
102
 
103
- Notice that the **state** changes, but the **setter** does not. This is because this is a **DERIVATE state**, and it cannot be directly changed. It will always be derived from the main hook.
103
+ Notice that the **state** changes, but the **stateMutates** does not. This is because this is a **DERIVATE state**, and it cannot be directly changed. It will always be derived from the main hook.
104
104
 
105
105
  # State actions
106
106
 
@@ -174,35 +174,36 @@ Decoupled state access is particularly useful when you want to create components
174
174
  Using decoupled state access allows you to retrieve the state when needed without establishing a reactive relationship with the state changes. This approach provides more flexibility and control over when and how components interact with the global state. Let's see and example:
175
175
 
176
176
  ```ts
177
- import { createGlobalStateWithDecoupledFuncs } from 'react-global-state-hooks';
177
+ import { createGlobalState } from 'react-global-state-hooks';
178
178
 
179
- export const [useContacts, contactsGetter, contactsSetter] =
180
- createGlobalStateWithDecoupledFuncs({
181
- isLoading: true,
182
- filter: '',
183
- items: [] as Contact[],
184
- });
179
+ export const useContacts = createGlobalState({
180
+ isLoading: true,
181
+ filter: '',
182
+ items: [] as Contact[],
183
+ });
184
+
185
+ export const [contactsRetriever, contactsSetter] = useContacts.stateControls();
185
186
  ```
186
187
 
187
- That's great! With the addition of the **contactsGetter** and **contactsSetter** methods, you now have the ability to access and modify the state without the need for subscription to the hook.
188
+ That's great! With the addition of the **contactsRetriever** and **contactsSetter** methods, you now have the ability to access and modify the state without the need for subscription to the hook.
188
189
 
189
- While **useContacts** will allow your components to subscribe to the custom hook, using the **contactsGetter** method you will be able retrieve the current value of the state. This allows you to access the state whenever necessary, without being reactive to its changes. Let' see how:
190
+ While **useContacts** will allow your components to subscribe to the custom hook, using the **contactsRetriever** method you will be able retrieve the current value of the state. This allows you to access the state whenever necessary, without being reactive to its changes. Let' see how:
190
191
 
191
192
  ```ts
192
193
  // To synchronously get the value of the state
193
- const value = contactsGetter();
194
+ const value = contactsRetriever();
194
195
 
195
196
  // the type of value will be { isLoading: boolean; filter: string; items: Contact[] }
196
197
  ```
197
198
 
198
- Additionally, to subscribe to state changes, you can pass a callback function as a parameter to the **getter**. This approach enables you to create a subscription group, allowing you to subscribe to either the entire state or a specific portion of it. When a callback function is provided to the **getter**, it will return a cleanup function instead of the state. This cleanup function can be used to unsubscribe or clean up the subscription when it is no longer needed.
199
+ Additionally, to subscribe to state changes, you can pass a callback function as a parameter to the **stateRetriever**. This approach enables you to create a subscription group, allowing you to subscribe to either the entire state or a specific portion of it. When a callback function is provided to the **stateRetriever**, it will return a cleanup function instead of the state. This cleanup function can be used to unsubscribe or clean up the subscription when it is no longer needed.
199
200
 
200
201
  ```ts
201
202
  /**
202
203
  * This not only allows you to retrieve the current value of the state...
203
204
  * but also enables you to subscribe to any changes in the state or a portion of it
204
205
  */
205
- const removeSubscriptionGroup = contactsGetter<Subscribe>((subscribe) => {
206
+ const removeSubscriptionGroup = contactsRetriever<Subscribe>((subscribe) => {
206
207
  subscribe((state) => {
207
208
  console.log('state changed: ', state);
208
209
  });
@@ -224,14 +225,14 @@ So, we have seen that we can subscribe a callback to state changes, create **der
224
225
 
225
226
  ```ts
226
227
  const subscribeToFilter = createDerivateEmitter(
227
- contactsGetter,
228
+ contactsRetriever,
228
229
  ({ filter }) => ({
229
230
  filter,
230
231
  })
231
232
  );
232
233
  ```
233
234
 
234
- Cool, it's basically the same, but instead of using the **hook** as a parameter, we just have to use the **getter** as a parameter, and that will make the magic.
235
+ Cool, it's basically the same, but instead of using the **hook** as a parameter, we just have to use the **stateRetriever** as a parameter, and that will make the magic.
235
236
 
236
237
  Now we are able to add a callback that will be executed every time the state of the **filter** changes.
237
238
 
@@ -281,7 +282,7 @@ And guess what again? You can also derive emitters from derived emitters without
281
282
 
282
283
  ```ts
283
284
  const subscribeToItems = createDerivateEmitter(
284
- contactsGetter,
285
+ contactsRetriever,
285
286
  ({ items }) => items
286
287
  );
287
288
 
@@ -293,48 +294,52 @@ const subscribeToItemsLength = createDerivateEmitter(
293
294
 
294
295
  The examples may seem a little silly, but they allow you to see the incredible things you can accomplish with these **derivative states** and **emitters**. They open up a world of possibilities!
295
296
 
296
- # Combining getters
297
+ # Combining stateRetriever
297
298
 
298
- What if you have two states and you want to combine them? You may have already guessed it right? ... you can create combined **emitters** and **hooks** from the hook **getters**.
299
+ What if you have two states and you want to combine them? You may have already guessed it right? ... you can create combined **emitters** and **hooks** from the hook **stateRetriever**.
299
300
 
300
301
  By utilizing the approach of combining **emitters** and **hooks**, you can effectively merge multiple states and make them shareable. This allows for better organization and simplifies the management of the combined states. You don't need to refactor everything; you just need to combine the **global state hooks** you already have. Let's see a simple example:
301
302
 
302
- Fist we are gonna create a couple of **global state**, is important to create them with the **createGlobalStateWithDecoupledFuncs** since we need the decoupled **getter**. (In case you are using an instance of **GlobalStore** or **GlobalStoreAbstract** you can just pick up the getters from the **getHookDecoupled** method)
303
+ Fist we are gonna create a couple of **global states**. (In case you are using an instance of **GlobalStore** or **GlobalStoreAbstract** you can just pick up the stateRetrievers from the **getHookDecoupled** method)
303
304
 
304
305
  ```ts
305
- const [useHook1, getter1, setter1] = createGlobalStateWithDecoupledFuncs({
306
+ const useHook1 = createGlobalState({
306
307
  propA: 1,
307
308
  propB: 2,
308
309
  });
309
310
 
310
- const [, getter2] = createGlobalStateWithDecoupledFuncs({
311
+ const [stateRetriever1, stateMutator1] = useHook1.stateControls();
312
+
313
+ const useHook2 = createGlobalState({
311
314
  propC: 3,
312
315
  propD: 4,
313
316
  });
317
+
318
+ const [, stateMutator2] = useHook2.stateControls();
314
319
  ```
315
320
 
316
321
  Okay, cool, the first state as **propA, propB** while the second one has **propC, propD**, let's combine them:
317
322
 
318
323
  ```ts
319
- const [useCombinedHook, getter, dispose] = combineAsyncGetters(
324
+ const [useCombinedHook, stateMutator, dispose] = combineAsyncGetters(
320
325
  {
321
326
  selector: ([state1, state2]) => ({
322
327
  ...state1,
323
328
  ...state2,
324
329
  }),
325
330
  },
326
- getter1,
327
- getter2
331
+ stateRetriever1,
332
+ stateMutator2
328
333
  );
329
334
  ```
330
335
 
331
- Well, that's it! Now you have access to a **getter** that will return the combined value of the two states. From this new **getter**, you can retrieve the value or subscribe to its changes. Let'see:
336
+ Well, that's it! Now you have access to a **stateMutator** that will return the combined value of the two states. From this new **stateMutator**, you can retrieve the value or subscribe to its changes. Let'see:
332
337
 
333
338
  ```ts
334
- const value = getter(); // { propA, propB, propC, propD }
339
+ const value = stateMutator(); // { propA, propB, propC, propD }
335
340
 
336
341
  // subscribe to the new emitter
337
- const unsubscribeGroup = getter<Subscribe>((subscribe) => {
342
+ const unsubscribeGroup = stateMutator<Subscribe>((subscribe) => {
338
343
  subscribe((state) => {
339
344
  console.log(subscribe); // full state
340
345
  });
@@ -366,29 +371,33 @@ Similar to your other **global state hooks**, **combined hooks** allow you to us
366
371
  const [fragment] = useCombinedHook(({ propA, propD }) => ({ propA, propD }));
367
372
  ```
368
373
 
369
- Lastly, you have the flexibility to continue combining getters if desired. This means you can extend the functionality of combined hooks by adding more getters to merge additional states. By combining getters in this way, you can create a comprehensive and unified representation of the combined states within your application. This approach allows for modular and scalable state management, enabling you to efficiently handle complex state compositions.
374
+ Lastly, you have the flexibility to continue combining stateMutators if desired. This means you can extend the functionality of combined hooks by adding more stateMutators to merge additional states. By combining stateMutators in this way, you can create a comprehensive and unified representation of the combined states within your application. This approach allows for modular and scalable state management, enabling you to efficiently handle complex state compositions.
370
375
 
371
376
  Let's see an example:
372
377
 
373
378
  ```ts
374
- const [useCombinedHook, combinedGetter1, dispose1] = combineAsyncGetters(
375
- {
376
- selector: ([state1, state2]) => ({
377
- ...state1,
378
- ...state2,
379
- }),
380
- },
381
- getter1,
382
- getter2
383
- );
379
+ const [useCombinedHook, combinedstateRetriever1, dispose1] =
380
+ combineAsyncGetters(
381
+ {
382
+ selector: ([state1, state2]) => ({
383
+ ...state1,
384
+ ...state2,
385
+ }),
386
+ },
387
+ stateRetriever1,
388
+ stateMutator2
389
+ );
384
390
 
385
- const [useHook3, getter3, setter3] = createGlobalStateWithDecoupledFuncs({
391
+ const useHook3 = createGlobalState({
386
392
  propE: 1,
387
393
  propF: 2,
388
394
  });
389
395
 
390
- const [useIsLoading, isLoadingGetter, isLoadingSetter] =
391
- createGlobalStateWithDecoupledFuncs(false);
396
+ const [stateMutator2, stateMutator3] = useHook3.stateControls();
397
+
398
+ const useIsLoading = createGlobalState(false);
399
+
400
+ const [isLoadingGetter, isLoadingSetter] = useIsLoading.stateControls();
392
401
  ```
393
402
 
394
403
  Once we created another peace of state, we can combine it with our other **global hooks** and **emitters**
@@ -402,8 +411,8 @@ const [useCombinedHook2, combinedGetter2, dispose2] = combineAsyncGetters(
402
411
  isLoading,
403
412
  }),
404
413
  },
405
- combinedGetter1,
406
- getter3,
414
+ combinedstateRetriever1,
415
+ stateMutator2,
407
416
  isLoadingGetter
408
417
  );
409
418
  ```
@@ -456,33 +465,6 @@ export const useCount = createGlobalState(0, {
456
465
 
457
466
  Notice that the **StoreTools** will contain a reference to the generated actions API. From there, you'll be able to access all actions from inside another one... the **StoreTools** is generic and allow your to set an interface for getting the typing on the actions.
458
467
 
459
- If you don't want to create an extra type please use **createGlobalStateWithDecoupledFuncs** in that way you'll be able to use the decoupled **actions** which will have the correct typing. Let's take a quick look into that:
460
-
461
- ```ts
462
- import { createGlobalStateWithDecoupledFuncs } from 'react-global-state-hooks';
463
-
464
- export const [useCount, getCount, $actions] =
465
- createGlobalStateWithDecoupledFuncs(0, {
466
- actions: {
467
- log: (currentValue: string) => {
468
- return ({ getState }: StoreTools<number>): void => {
469
- console.log(`Current Value: ${getState()}`);
470
- };
471
- },
472
-
473
- increase(value: number = 1) {
474
- return ({ getState, setState }: StoreTools<number>) => {
475
- setState((count) => count + value);
476
-
477
- $actions.log(message);
478
- };
479
- },
480
- } as const,
481
- });
482
- ```
483
-
484
- In the example the hook will work the same and you'll have access to the correct typing.
485
-
486
468
  # Local Storage
487
469
 
488
470
  By default, our global hooks are capable of persisting information in local storage. To achieve this, you need to provide the key that will be used to persist the data. Additionally, you have the option to encrypt the stored data.
@@ -544,7 +526,7 @@ What’s the advantage of this, you might ask? Well, now you have all the capabi
544
526
  const MyComponent = () => {
545
527
  const [, , setCount] = useCounterContext();
546
528
 
547
- // This component can access only the setter of the state,
529
+ // This component can access only the stateMutator of the state,
548
530
  // and won't re-render if the counter changes
549
531
  return (
550
532
  <button onClick={() => setCount((count) => count + 1)}>Increase</button>
@@ -609,7 +591,7 @@ export const [useCounterContext, CounterProvider] = createStatefulContext(
609
591
  );
610
592
  ```
611
593
 
612
- And just like with regular global hooks, now instead of a setter, the hook will return the collection of actions:
594
+ And just like with regular global hooks, now instead of a stateMutator, the hook will return the collection of actions:
613
595
 
614
596
  ```tsx
615
597
  const MyComponent = () => {
@@ -735,7 +717,7 @@ onInit?: ({
735
717
 
736
718
  /**
737
719
  * Set the state
738
- * @param {TState} setter - The state or a function that will receive the state and return the new state
720
+ * @param {TState} stateMutator - The state or a function that will receive the state and return the new state
739
721
  * @param {{ forceUpdate?: boolean }} options - Options
740
722
  * */
741
723
  setState: StateSetter<TState>;
package/lib/bundle.js CHANGED
@@ -1 +1 @@
1
- !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):"object"==typeof exports?exports["react-global-state-hooks"]=n(require("react")):t["react-global-state-hooks"]=n(t.react)}(this,(t=>(()=>{var n={853:(t,n,r)=>{"use strict";function e(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,o,i,u,a=[],c=!0,f=!1;try{if(i=(r=r.call(t)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(e=i.call(r)).done)&&(a.push(e.value),a.length!==n);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,n)||function(t,n){if(t){if("string"==typeof t)return o(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var i=function(t,n){var r={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(r[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)n.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(r[e[o]]=t[e[o]])}return r};Object.defineProperty(n,"__esModule",{value:!0}),n.createCustomGlobalStateWithDecoupledFuncs=n.createGlobalState=n.createGlobalStateWithDecoupledFuncs=void 0;var u=r(774);n.createGlobalStateWithDecoupledFuncs=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.actions,o=i(n,["actions"]),a=new u.GlobalStore(t,o,r),c=e(a.getHookDecoupled(),2),f=c[0],l=c[1];return[a.getHook(),f,l]},n.createGlobalState=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e((0,n.createGlobalStateWithDecoupledFuncs)(t,r),1)[0]},n.createCustomGlobalStateWithDecoupledFuncs=function(t){var r=t.onInitialize,e=t.onChange;return function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{config:null},u=o.config,a=o.onInit,c=o.onStateChanged,f=i(o,["config","onInit","onStateChanged"]);return(0,n.createGlobalStateWithDecoupledFuncs)(t,Object.assign({onInit:function(t){r(t,u),null==a||a(t)},onStateChanged:function(t){e(t,u),null==c||c(t)}},f))}}},774:(t,n,r)=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function o(t,n){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},o(t,n)}function i(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.GlobalStore=void 0;var a=r(608),c=r(734),f=function(){return!!(null===globalThis||void 0===globalThis?void 0:globalThis.localStorage)},l=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&o(t,n)}(l,t);var n,r,e,c=(r=l,e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=u(r);if(e){var o=u(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return i(this,t)});function l(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,l),(n=c.call(this,t,r,e)).onInitialize=function(t){var r,e,o=t.setState,i=t.getState;if(f()&&(null===(e=null===(r=n.config)||void 0===r?void 0:r.localStorage)||void 0===e?void 0:e.key)){var u=(0,a.getLocalStorageItem)({config:n.config});if(null!==u)o(u);else{var c=i();(0,a.setLocalStorageItem)({item:c,config:n.config})}}},n.onChange=function(t){var r=t.getState;f()&&(0,a.setLocalStorageItem)({item:r(),config:n.config})},n.constructor!==l?i(n):(n.initialize(),n)}return n=l,Object.defineProperty(n,"prototype",{writable:!1}),n}(c.GlobalStoreAbstract);n.GlobalStore=l},608:(t,n,r)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setLocalStorageItem=n.getLocalStorageItem=void 0;var e=r(734);n.getLocalStorageItem=function(t){var n,r=t.config,o=null===(n=null==r?void 0:r.localStorage)||void 0===n?void 0:n.key;if(!o)return null;var i=localStorage.getItem(o);if(null===i)return null;var u=function(){var t,n=null!==(t=null==r?void 0:r.localStorage)&&void 0!==t?t:{},e=n.decrypt,o=n.encrypt;return e||o?"function"==typeof e?e(i):atob(i):i}();return(0,e.formatFromStore)(u,{jsonParse:!0})},n.setLocalStorageItem=function(t){var n,r=t.item,o=t.config,i=null===(n=null==o?void 0:o.localStorage)||void 0===n?void 0:n.key;if(!i)return null;var u=(0,e.formatToStore)(r,{stringify:!0,excludeTypes:["function"]}),a=function(){var t,n=(null!==(t=null==o?void 0:o.localStorage)&&void 0!==t?t:{}).encrypt;return n?"function"==typeof n?n(u):btoa(u):u}();localStorage.setItem(i,a)}},195:(t,n,r)=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function o(t,n){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},o(t,n)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.GlobalStoreAbstract=void 0;var u=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&o(t,n)}(c,t);var n,r,u,a=(r=c,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=i(r);if(u){var o=i(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,c),(n=a.call(this,t,r,e)).onInit=function(t){n.onInitialize(t)},n.onStateChanged=function(t){n.onChange(t)},n}return n=c,Object.defineProperty(n,"prototype",{writable:!1}),n}(r(774).GlobalStore);n.GlobalStoreAbstract=u},734:function(t,n,r){var e;e=t=>(()=>{var n={852:(t,n,r)=>{"use strict";function e(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,o,i,u,a=[],c=!0,f=!1;try{if(i=(r=r.call(t)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(e=i.call(r)).done)&&(a.push(e.value),a.length!==n);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,n)||function(t,n){if(t){if("string"==typeof t)return o(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}Object.defineProperty(n,"__esModule",{value:!0}),n.combineAsyncGetters=n.combineAsyncGettersEmitter=void 0;var i=r(608),u=r(486),a=r(156),c=r(774);n.combineAsyncGettersEmitter=function(t){for(var n,r,e,o=arguments.length,a=new Array(o>1?o-1:0),f=1;f<o;f++)a[f-1]=arguments[f];var l=a,s=new Map(l.map((function(t,n){return[n,t()]}))),p=t.selector(Array.from(s.values())),h=void 0!==(null===(n=null==t?void 0:t.config)||void 0===n?void 0:n.isEqual)?null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.isEqual:i.shallowCompare,v=new Set,y=(0,u.debounce)((function(){var n=t.selector(Array.from(s.values()));(null==h?void 0:h(p,n))||(p=n,v.forEach((function(t){return t()})))}),null===(e=null==t?void 0:t.config)||void 0===e?void 0:e.delay),g=l.map((function(t,n){return t((function(t){t((function(t){s.set(n,t),y()}))}))})),d=function(t,n,r){var e,o,a="function"==typeof n,c=a?t:null,f=a?n:t,l=a?r:n,s=Object.assign({delay:0,isEqual:i.shallowCompare},null!=l?l:{}),h=null!==(e=null==c?void 0:c(p))&&void 0!==e?e:p;s.skipFirst||f(h);var y=(0,u.debounce)((function(){var t,n,r=null!==(t=null==c?void 0:c(p))&&void 0!==t?t:p;(null===(n=s.isEqual)||void 0===n?void 0:n.call(s,h,r))||(h=r,f(r))}),null!==(o=s.delay)&&void 0!==o?o:0);return v.add(y),function(){v.delete(y)}};return[d,function(t){if(!t)return p;var n=[];return t((function(){n.push(d.apply(void 0,arguments))})),n.length||(0,c.throwNoSubscribersWereAdded)(),function(){n.forEach((function(t){t(),v.delete(t)}))}},function(){g.forEach((function(t){return t()}))}]},n.combineAsyncGetters=function(t){for(var r=arguments.length,o=new Array(r>1?r-1:0),c=1;c<r;c++)o[c-1]=arguments[c];var f=e(n.combineAsyncGettersEmitter.apply(void 0,[t].concat(o)),3),l=f[0],s=f[1],p=f[2];return[function(t,n){var r=e((0,a.useState)((function(){var n=s();return t?t(n):n})),2),o=r[0],c=r[1];return(0,a.useEffect)((function(){var r,e=Object.assign({delay:0,isEqual:i.shallowCompare},null!=n?n:{}),o=void 0!==e.isEqual?e.isEqual:i.shallowCompare,a=l((function(n){return t?t(n):n}),(0,u.debounce)((function(n){var r=t?t(n):n;(null==o?void 0:o(n,r))||c(r)}),null!==(r=e.delay)&&void 0!==r?r:0));return function(){a()}}),[]),[o,null,null]},s,p]}},853:(t,n,r)=>{"use strict";function e(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,o,i,u,a=[],c=!0,f=!1;try{if(i=(r=r.call(t)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(e=i.call(r)).done)&&(a.push(e.value),a.length!==n);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,n)||function(t,n){if(t){if("string"==typeof t)return o(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var i=function(t,n){var r={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(r[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)n.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(r[e[o]]=t[e[o]])}return r};Object.defineProperty(n,"__esModule",{value:!0}),n.createDerivateEmitter=n.createDerivate=n.createCustomGlobalStateWithDecoupledFuncs=n.createGlobalState=n.createGlobalStateWithDecoupledFuncs=void 0;var u=r(774);n.createGlobalStateWithDecoupledFuncs=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.actions,o=i(n,["actions"]),a=new u.GlobalStore(t,o,r),c=e(a.getHookDecoupled(),2),f=c[0],l=c[1];return[a.getHook(),f,l]},n.createGlobalState=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e((0,n.createGlobalStateWithDecoupledFuncs)(t,r),1)[0]},n.createCustomGlobalStateWithDecoupledFuncs=function(t){var r=t.onInitialize,e=t.onChange;return function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{config:null},u=o.config,a=o.onInit,c=o.onStateChanged,f=i(o,["config","onInit","onStateChanged"]);return(0,n.createGlobalStateWithDecoupledFuncs)(t,Object.assign({onInit:function(t){r(t,u),null==a||a(t)},onStateChanged:function(t){e(t,u),null==c||c(t)}},f))}},n.createDerivate=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t((function(t){var r=n(t);return e?e(r):r}),e&&o?o:r)}},n.createDerivateEmitter=function(t,r){var e=t._father_emitter;if(e){var o=function(t){var n=e.selector(t);return r(n)},i=(0,n.createDerivateEmitter)(e.getter,o);return i._father_emitter={getter:e.getter,selector:o},i}var u=function(n,e){var o="function"==typeof e,i=o?n:null,u=o?e:n,a=o?arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}:e;return t((function(t){t((function(t){var n,e=r(t);return null!==(n=null==i?void 0:i(e))&&void 0!==n?n:e}),u,a)}))};return u._father_emitter={getter:t,selector:r},u}},774:(t,n,r)=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}function i(){i=function(){return t};var t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,n,r){t[n]=r.value},u="function"==typeof Symbol?Symbol:{},a=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function l(t,n,r){return Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{l({},"")}catch(t){l=function(t,n,r){return t[n]=r}}function s(t,n,r,e){var i=n&&n.prototype instanceof v?n:v,u=Object.create(i.prototype),a=new E(e||[]);return o(u,"_invoke",{value:j(t,r,a)}),u}function p(t,n,r){try{return{type:"normal",arg:t.call(n,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function v(){}function y(){}function g(){}var d={};l(d,a,(function(){return this}));var b=Object.getPrototypeOf,_=b&&b(b(P([])));_&&_!==n&&r.call(_,a)&&(d=_);var m=g.prototype=v.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(n){l(t,n,(function(t){return this._invoke(n,t)}))}))}function S(t,n){function i(o,u,a,c){var f=p(t[o],t,u);if("throw"!==f.type){var l=f.arg,s=l.value;return s&&"object"==e(s)&&r.call(s,"__await")?n.resolve(s.__await).then((function(t){i("next",t,a,c)}),(function(t){i("throw",t,a,c)})):n.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,c)}))}c(f.arg)}var u;o(this,"_invoke",{value:function(t,r){function e(){return new n((function(n,e){i(t,r,n,e)}))}return u=u?u.then(e,e):e()}})}function j(t,n,r){var e="suspendedStart";return function(o,i){if("executing"===e)throw new Error("Generator is already running");if("completed"===e){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=O(u,r);if(a){if(a===h)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===e)throw e="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);e="executing";var c=p(t,n,r);if("normal"===c.type){if(e=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(e="completed",r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,e=t.iterator[r];if(void 0===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=void 0,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=p(e,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function x(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function A(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function P(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,o=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n};return o.next=o}}return{next:I}}function I(){return{value:void 0,done:!0}}return y.prototype=g,o(m,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:y,configurable:!0}),y.displayName=l(g,f,"GeneratorFunction"),t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===y||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,f,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(S.prototype),l(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(n,r,e,o,i){void 0===i&&(i=Promise);var u=new S(s(n,r,e,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},w(m),l(m,f,"Generator"),l(m,a,(function(){return this})),l(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var n=Object(t),r=[];for(var e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=P,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function e(r,e){return u.type="throw",u.arg=t,n.next=r,e&&(n.method="next",n.arg=void 0),!!e}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var a=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=n,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),h},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),h}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc===t){var e=r.completion;if("throw"===e.type){var o=e.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function u(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,"string");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(n)?n:String(n)}Object.defineProperty(n,"__esModule",{value:!0}),n.GlobalStore=n.throwNoSubscribersWereAdded=void 0;var a=r(608),c=r(156);n.throwNoSubscribersWereAdded=function(){throw new Error("No new subscribers were added, please make sure to add at least one subscriber with the subscribe method")};var f=function(){function t(r){var e=this,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.actionsConfig=l,this.subscribers=new Map,this.actions=null,this.config={metadata:null},this.onInit=null,this.onStateChanged=null,this.onSubscribed=null,this.computePreventStateChange=null,this.initialize=function(){return t=e,n=void 0,r=i().mark((function t(){var n,r,e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.actionsConfig&&(this.actions=this.getStoreActionsMap()),n=this.onInit,r=this.config.onInit,n||r){t.next=5;break}return t.abrupt("return");case 5:e=this.getConfigCallbackParam(),null==n||n(e),null==r||r(e);case 8:case"end":return t.stop()}}),t,this)})),new(n||(n=Promise))((function(e,o){function i(t){try{a(r.next(t))}catch(t){o(t)}}function u(t){try{a(r.throw(t))}catch(t){o(t)}}function a(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(i,u)}a((r=r.apply(t,[])).next())}));var t,n,r},this.setState=function(t){var n=t.state,r=t.forceUpdate;e.stateWrapper={state:n},Array.from(e.subscribers.values()).forEach((function(t){!function(t){var e=t.selector,o=t.callback,i=t.currentState,u=t.config,c=(null==u?void 0:u.isEqual)||null===(null==u?void 0:u.isEqual)?null==u?void 0:u.isEqual:e?a.shallowCompare:null,f=e?e(n):n;!r&&(null==c?void 0:c(i,f))||o({state:f})}(t)}))},this.setMetadata=function(t){var n,r,o="function"==typeof t?t(null!==(n=e.config.metadata)&&void 0!==n?n:null):t;e.config=Object.assign(Object.assign({},null!==(r=e.config)&&void 0!==r?r:{}),{metadata:o})},this.getMetadata=function(){var t;return null!==(t=e.config.metadata)&&void 0!==t?t:null},this.createChangesSubscriber=function(t){var n=t.callback,r=t.selector,o=t.config,i=r?r(e.stateWrapper.state):e.stateWrapper.state,u={state:i};return(null==o?void 0:o.skipFirst)||n(i),{stateWrapper:u,subscriptionCallback:function(t){var r=t.state;u.state=r,n(r)}}},this.getState=function(t){if(!t)return e.stateWrapper.state;var r=[];return t((function(t,n,o){var i="function"==typeof n,u=i?t:null,c=i?n:t,f=i?o:n,l=e.createChangesSubscriber({selector:u,callback:c,config:f}),s=l.subscriptionCallback,p=l.stateWrapper,h=(0,a.uniqueId)();e.updateSubscription({subscriptionId:h,selector:u,config:f,stateWrapper:p,callback:s}),r.push(h)})),r.length||(0,n.throwNoSubscribersWereAdded)(),function(){r.forEach((function(t){e.subscribers.delete(t)}))}},this.getConfigCallbackParam=function(){var t=e.setMetadata,n=e.getMetadata,r=e.getState,o=e.actions;return{setMetadata:t,getMetadata:n,getState:r,setState:e.setStateWrapper,actions:o}},this.updateSubscription=function(t){var n=t.subscriptionId,r=t.callback,o=t.selector,i=t.config,u=void 0===i?{}:i,a=t.stateWrapper.state,c=e.subscribers.get(n);if(c)return c.currentState=a,c;var f={subscriptionId:n,selector:o,config:u,currentState:a,callback:r};return e.subscribers.set(n,f),f},this.executeOnSubscribed=function(){var t=e.onSubscribed,n=e.config.onSubscribed;if(t||n){var r=e.getConfigCallbackParam();null==t||t(r),null==n||n(r)}},this.getHook=function(){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,c.useRef)(null);(0,c.useEffect)((function(){return function(){e.subscribers.delete(i.current)}}),[]);var u,f=function(t){if(Array.isArray(t))return t}(u=(0,c.useState)((function(){return t?{state:t(e.stateWrapper.state)}:e.stateWrapper})))||function(t,n){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,o,i,u,a=[],c=!0,f=!1;try{for(i=(r=r.call(t)).next;!(c=(e=i.call(r)).done)&&(a.push(e.value),2!==a.length);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(u)||function(t,n){if(t){if("string"==typeof t)return o(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,2):void 0}}(u)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=f[0],s=f[1];return(0,c.useEffect)((function(){null===i.current&&(i.current=(0,a.uniqueId)())}),[]),(0,c.useEffect)((function(){var n=i.current;if(null!==n){var o=!e.subscribers.has(n);e.updateSubscription({subscriptionId:n,stateWrapper:l,selector:t,config:r,callback:s}),o&&e.executeOnSubscribed()}}),[l]),[l.state,e.getStateOrchestrator(),null!==(n=e.config.metadata)&&void 0!==n?n:null]}},this.getHookDecoupled=function(){var t=e.getStateOrchestrator(),n=e.getMetadata;return[e.getState,t,n]},this.getStateOrchestrator=function(){return e.actions?e.actions:e.setStateWrapper},this.hasStateCallbacks=function(){var t=e.computePreventStateChange,n=e.onStateChanged,r=e.config,o=r.computePreventStateChange,i=r.onStateChanged;return!!(t||o||n||i)},this.setStateWrapper=function(t){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).forceUpdate,r="function"==typeof t,o=e.stateWrapper.state,i=r?t(o):t;if(n||!Object.is(e.stateWrapper.state,i)){var u=e.setMetadata,a=e.getMetadata,c=e.getState,f=e.actions,l={setMetadata:u,getMetadata:a,setState:e.setState,getState:c,actions:f,previousState:o,state:i},s=e.computePreventStateChange,p=e.config.computePreventStateChange;if((s||p)&&((null==s?void 0:s(l))||(null==p?void 0:p(l))))return;e.setState({forceUpdate:n,state:i});var h=e.onStateChanged,v=e.config.onStateChanged;(h||v)&&(null==h||h(l),null==v||v(l))}},this.getStoreActionsMap=function(){if(!e.actionsConfig)return null;var t=e.actionsConfig,n=e.setMetadata,r=e.setStateWrapper,o=e.getState,i=e.getMetadata,a=Object.keys(t).reduce((function(e,c){var f,l,s;return Object.assign(e,(f={},s=function(){for(var e=t[c],u=arguments.length,f=new Array(u),l=0;l<u;l++)f[l]=arguments[l];var s=e.apply(a,f);return"function"!=typeof s&&function(t){throw new Error("[WRONG CONFIGURATION!]: Every key inside the storeActionsConfig must be a higher order function that returns a function \n[".concat(t,"]: key is not a valid function, try something like this: \n{\n\n ").concat(t,": (param) => ({ setState, getState, setMetadata, getMetadata, actions }) => {\n\n setState((state) => ({ ...state, ...param }))\n\n }\n\n}\n"))}(c),s.call(a,{setState:r,getState:o,setMetadata:n,getMetadata:i,actions:a})},(l=u(l=c))in f?Object.defineProperty(f,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):f[l]=s,f)),e}),{});return a},this.stateWrapper={state:r},this.config=Object.assign({metadata:null},null!=f?f:{}),this.constructor!==t||this.initialize()}var r,e;return r=t,(e=[{key:"state",get:function(){return this.stateWrapper.state}}])&&function(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,u(e.key),e)}}(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),t}();n.GlobalStore=f},530:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0})},608:(t,n,r)=>{"use strict";function e(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,o,i,u,a=[],c=!0,f=!1;try{if(i=(r=r.call(t)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(e=i.call(r)).done)&&(a.push(e.value),a.length!==n);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,n)||i(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var e=0,o=function(){};return{s:o,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,u=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw u}}}}function i(t,n){if(t){if("string"==typeof t)return u(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,n):void 0}}function u(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.uniqueId=n.debounce=n.shallowCompare=void 0;var c=r(684);n.shallowCompare=function(t,n){if(t===n)return!0;var r=a(t),i=a(n);if(r!==i)return!1;if((0,c.isNil)(t)||(0,c.isNil)(n)||(0,c.isPrimitive)(t)&&(0,c.isPrimitive)(n)||(0,c.isDate)(t)&&(0,c.isDate)(n)||"function"===r&&"function"===i)return t===n;if(Array.isArray(t)){var u=t,f=n;if(u.length!==f.length)return!1;for(var l=0;l<u.length;l++)if(u[l]!==f[l])return!1}if(t instanceof Map){var s=t,p=n;if(s.size!==p.size)return!1;var h,v=o(s);try{for(v.s();!(h=v.n()).done;){var y=e(h.value,2),g=y[0];if(y[1]!==p.get(g))return!1}}catch(t){v.e(t)}finally{v.f()}}if(t instanceof Set){var d=t,b=n;if(d.size!==b.size)return!1;var _,m=o(d);try{for(m.s();!(_=m.n()).done;){var w=_.value;if(!b.has(w))return!1}}catch(t){m.e(t)}finally{m.f()}}var S=Object.keys(t),j=Object.keys(n);if(S.length!==j.length)return!1;for(var O=0,x=S;O<x.length;O++){var A=x[O];if(t[A]!==n[A])return!1}return!0},n.debounce=function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];n&&clearTimeout(n),n=setTimeout((function(){t.apply(void 0,o)}),r)}},n.uniqueId=function(){return Date.now().toString(36)+Math.random().toString(36).substr(2,5)}},195:(t,n,r)=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function o(t,n){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},o(t,n)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.GlobalStoreAbstract=void 0;var u=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&o(t,n)}(c,t);var n,r,u,a=(r=c,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=i(r);if(u){var o=i(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,c),(n=a.call(this,t,r,e)).onInit=function(t){n.onInitialize(t)},n.onStateChanged=function(t){n.onChange(t)},n}return n=c,Object.defineProperty(n,"prototype",{writable:!1}),n}(r(774).GlobalStore);n.GlobalStoreAbstract=u},991:(t,n,r)=>{"use strict";var e=Object.create?function(t,n,r,e){void 0===e&&(e=r);var o=Object.getOwnPropertyDescriptor(n,r);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(t,e,o)}:function(t,n,r,e){void 0===e&&(e=r),t[e]=n[r]},o=function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};Object.defineProperty(n,"__esModule",{value:!0}),o(r(684),n),o(r(530),n),o(r(774),n),o(r(195),n),o(r(853),n),o(r(608),n),o(r(852),n)},684:function(t){t.exports=(()=>{"use strict";var t={991:(t,n,r)=>{var e=Object.create?function(t,n,r,e){void 0===e&&(e=r);var o=Object.getOwnPropertyDescriptor(n,r);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(t,e,o)}:function(t,n,r,e){void 0===e&&(e=r),t[e]=n[r]};Object.defineProperty(n,"__esModule",{value:!0}),function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)}(r(729),n)},729:(t,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function e(t,n,e){return(n=function(t){var n=function(t,n){if("object"!==r(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===r(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function o(t,n){if(t){if("string"==typeof t)return i(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,n):void 0}}function i(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}Object.defineProperty(n,"__esModule",{value:!0}),n.formatToStore=n.formatFromStore=n.isPrimitive=n.isFunction=n.isRegex=n.isDate=n.isString=n.isBoolean=n.isNumber=n.isNil=n.clone=void 0,n.clone=function(t){var r,u=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shallow;if((0,n.isPrimitive)(t)||(0,n.isDate)(t))return t;if(Array.isArray(t))return u?function(t){if(Array.isArray(t))return i(t)}(r=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||o(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}():t.map((function(t){return(0,n.clone)(t)}));if(t instanceof Map){var a=Array.from(t.entries());return u?new Map(a):new Map(a.map((function(t){return(0,n.clone)(t)})))}if(t instanceof Set){var c=Array.from(t.values());return u?new Set(c):new Set(c.map((function(t){return(0,n.clone)(t)})))}return t instanceof RegExp?new RegExp(t.toString()):(0,n.isFunction)(t)?u?t:Object.create(t):u?Object.assign({},t):t instanceof Error?new Error(t.message):Object.keys(t).reduce((function(r,o){var i=t[o];return Object.assign(Object.assign({},r),e({},o,(0,n.clone)(i)))}),{})},n.isNil=function(t){return null==t},n.isNumber=function(t){return"number"==typeof t},n.isBoolean=function(t){return"boolean"==typeof t},n.isString=function(t){return"string"==typeof t},n.isDate=function(t){return t instanceof Date},n.isRegex=function(t){return t instanceof RegExp},n.isFunction=function(t){return"function"==typeof t||t instanceof Function},n.isPrimitive=function(t){return(0,n.isNil)(t)||(0,n.isNumber)(t)||(0,n.isBoolean)(t)||(0,n.isString)(t)||"symbol"===r(t)},n.formatFromStore=function(t){return function(t){var r,i;if((0,n.isPrimitive)(t))return t;if("date"===(null==t?void 0:t.$t))return new Date(t.$v);if("map"===(null==t?void 0:t.$t)){var u=(null!==(r=t.$v)&&void 0!==r?r:[]).map((function(t){var r,e=function(t){if(Array.isArray(t))return t}(r=t)||function(t,n){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var e,o,i,u,a=[],c=!0,f=!1;try{for(i=(r=r.call(t)).next;!(c=(e=i.call(r)).done)&&(a.push(e.value),2!==a.length);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(r)||o(r,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=e[0],u=e[1];return[i,(0,n.formatFromStore)(u)]}));return new Map(u)}if("set"===(null==t?void 0:t.$t)){var a=null!==(i=t.$v)&&void 0!==i?i:[].map((function(t){return(0,n.formatFromStore)(t)}));return new Set(a)}return"regex"===(null==t?void 0:t.$t)?new RegExp(t.$v):"error"===(null==t?void 0:t.$t)?new Error(t.$v):Array.isArray(t)?t.map((function(t){return(0,n.formatFromStore)(t)})):"function"===(null==t?void 0:t.$t)?Function("(".concat(t.$v,")(...arguments)")):Object.keys(t).reduce((function(r,o){var i=t[o];return Object.assign(Object.assign({},r),e({},o,(0,n.formatFromStore)(i)))}),{})}((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).jsonParse?JSON.parse(t):(0,n.clone)(t))},n.formatToStore=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{stringify:!1},i=o.stringify,u=o.validator,a=o.excludeTypes,c=o.excludeKeys,f=new Set(null!=a?a:[]),l=new Set(null!=c?c:[]),s=f.size||l.size,p=null!=u?u:function(t){var n=t.key,e=t.value;if(!s)return!0;var o=l.has(n),i=f.has(r(e));return!o&&!i},h=function t(r){if((0,n.isPrimitive)(r))return r;if(Array.isArray(r))return r.map((function(n){return t(n)}));if(r instanceof Map)return{$t:"map",$v:Array.from(r.entries()).map((function(n){return t(n)}))};if(r instanceof Set)return{$t:"set",$v:Array.from(r.values()).map((function(n){return t(n)}))};if((0,n.isDate)(r))return{$t:"date",$v:r.toISOString()};if((0,n.isRegex)(r))return{$t:"regex",$v:r.toString()};if((0,n.isFunction)(r)){var o;try{o={$t:"function",$v:r.toString()}}catch(t){o={$t:"error",$v:"Error: Could not serialize function"}}return o}return r instanceof Error?{$t:"error",$v:r.message}:Object.keys(r).reduce((function(n,o){var i=r[o],u=t(i);return p({obj:r,key:o,value:u})?Object.assign(Object.assign({},n),e({},o,t(i))):n}),{})}((0,n.clone)(t));return i?JSON.stringify(h):h}}},n={};return function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}(991)})()},486:function(t,n,r){var e;t=r.nmd(t),function(){var o,i="Expected a function",u="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,f=128,l=1/0,s=9007199254740991,p=NaN,h=4294967295,v=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],y="[object Arguments]",g="[object Array]",d="[object Boolean]",b="[object Date]",_="[object Error]",m="[object Function]",w="[object GeneratorFunction]",S="[object Map]",j="[object Number]",O="[object Object]",x="[object Promise]",A="[object RegExp]",E="[object Set]",P="[object String]",I="[object Symbol]",k="[object WeakMap]",C="[object ArrayBuffer]",R="[object DataView]",W="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",T="[object Int16Array]",G="[object Int32Array]",M="[object Uint8Array]",z="[object Uint8ClampedArray]",F="[object Uint16Array]",$="[object Uint32Array]",N=/\b__p \+= '';/g,B=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,H=RegExp(q.source),K=RegExp(Z.source),V=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nt=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(nt.source),et=/^\s+/,ot=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ft=/[()=,{}\[\]\/\s]/,lt=/\\(\\)?/g,st=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,ht=/^[-+]0x[0-9a-f]+$/i,vt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,dt=/^(?:0|[1-9]\d*)$/,bt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,mt=/['\n\r\u2028\u2029\\]/g,wt="\\ud800-\\udfff",St="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",jt="\\u2700-\\u27bf",Ot="a-z\\xdf-\\xf6\\xf8-\\xff",xt="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\ufe0e\\ufe0f",Et="\\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",Pt="["+wt+"]",It="["+Et+"]",kt="["+St+"]",Ct="\\d+",Rt="["+jt+"]",Wt="["+Ot+"]",Lt="[^"+wt+Et+Ct+jt+Ot+xt+"]",Dt="\\ud83c[\\udffb-\\udfff]",Tt="[^"+wt+"]",Gt="(?:\\ud83c[\\udde6-\\uddff]){2}",Mt="[\\ud800-\\udbff][\\udc00-\\udfff]",zt="["+xt+"]",Ft="\\u200d",$t="(?:"+Wt+"|"+Lt+")",Nt="(?:"+zt+"|"+Lt+")",Bt="(?:['’](?:d|ll|m|re|s|t|ve))?",Ut="(?:['’](?:D|LL|M|RE|S|T|VE))?",qt="(?:"+kt+"|"+Dt+")?",Zt="["+At+"]?",Ht=Zt+qt+"(?:"+Ft+"(?:"+[Tt,Gt,Mt].join("|")+")"+Zt+qt+")*",Kt="(?:"+[Rt,Gt,Mt].join("|")+")"+Ht,Vt="(?:"+[Tt+kt+"?",kt,Gt,Mt,Pt].join("|")+")",Jt=RegExp("['’]","g"),Yt=RegExp(kt,"g"),Qt=RegExp(Dt+"(?="+Dt+")|"+Vt+Ht,"g"),Xt=RegExp([zt+"?"+Wt+"+"+Bt+"(?="+[It,zt,"$"].join("|")+")",Nt+"+"+Ut+"(?="+[It,zt+$t,"$"].join("|")+")",zt+"?"+$t+"+"+Bt,zt+"+"+Ut,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ct,Kt].join("|"),"g"),tn=RegExp("["+Ft+wt+St+At+"]"),nn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rn=["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"],en=-1,on={};on[W]=on[L]=on[D]=on[T]=on[G]=on[M]=on[z]=on[F]=on[$]=!0,on[y]=on[g]=on[C]=on[d]=on[R]=on[b]=on[_]=on[m]=on[S]=on[j]=on[O]=on[A]=on[E]=on[P]=on[k]=!1;var un={};un[y]=un[g]=un[C]=un[R]=un[d]=un[b]=un[W]=un[L]=un[D]=un[T]=un[G]=un[S]=un[j]=un[O]=un[A]=un[E]=un[P]=un[I]=un[M]=un[z]=un[F]=un[$]=!0,un[_]=un[m]=un[k]=!1;var an={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},cn=parseFloat,fn=parseInt,ln="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,sn="object"==typeof self&&self&&self.Object===Object&&self,pn=ln||sn||Function("return this")(),hn=n&&!n.nodeType&&n,vn=hn&&t&&!t.nodeType&&t,yn=vn&&vn.exports===hn,gn=yn&&ln.process,dn=function(){try{return vn&&vn.require&&vn.require("util").types||gn&&gn.binding&&gn.binding("util")}catch(t){}}(),bn=dn&&dn.isArrayBuffer,_n=dn&&dn.isDate,mn=dn&&dn.isMap,wn=dn&&dn.isRegExp,Sn=dn&&dn.isSet,jn=dn&&dn.isTypedArray;function On(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function xn(t,n,r,e){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];n(e,u,r(u),t)}return e}function An(t,n){for(var r=-1,e=null==t?0:t.length;++r<e&&!1!==n(t[r],r,t););return t}function En(t,n){for(var r=null==t?0:t.length;r--&&!1!==n(t[r],r,t););return t}function Pn(t,n){for(var r=-1,e=null==t?0:t.length;++r<e;)if(!n(t[r],r,t))return!1;return!0}function In(t,n){for(var r=-1,e=null==t?0:t.length,o=0,i=[];++r<e;){var u=t[r];n(u,r,t)&&(i[o++]=u)}return i}function kn(t,n){return!(null==t||!t.length)&&Fn(t,n,0)>-1}function Cn(t,n,r){for(var e=-1,o=null==t?0:t.length;++e<o;)if(r(n,t[e]))return!0;return!1}function Rn(t,n){for(var r=-1,e=null==t?0:t.length,o=Array(e);++r<e;)o[r]=n(t[r],r,t);return o}function Wn(t,n){for(var r=-1,e=n.length,o=t.length;++r<e;)t[o+r]=n[r];return t}function Ln(t,n,r,e){var o=-1,i=null==t?0:t.length;for(e&&i&&(r=t[++o]);++o<i;)r=n(r,t[o],o,t);return r}function Dn(t,n,r,e){var o=null==t?0:t.length;for(e&&o&&(r=t[--o]);o--;)r=n(r,t[o],o,t);return r}function Tn(t,n){for(var r=-1,e=null==t?0:t.length;++r<e;)if(n(t[r],r,t))return!0;return!1}var Gn=Un("length");function Mn(t,n,r){var e;return r(t,(function(t,r,o){if(n(t,r,o))return e=r,!1})),e}function zn(t,n,r,e){for(var o=t.length,i=r+(e?1:-1);e?i--:++i<o;)if(n(t[i],i,t))return i;return-1}function Fn(t,n,r){return n==n?function(t,n,r){for(var e=r-1,o=t.length;++e<o;)if(t[e]===n)return e;return-1}(t,n,r):zn(t,Nn,r)}function $n(t,n,r,e){for(var o=r-1,i=t.length;++o<i;)if(e(t[o],n))return o;return-1}function Nn(t){return t!=t}function Bn(t,n){var r=null==t?0:t.length;return r?Hn(t,n)/r:p}function Un(t){return function(n){return null==n?o:n[t]}}function qn(t){return function(n){return null==t?o:t[n]}}function Zn(t,n,r,e,o){return o(t,(function(t,o,i){r=e?(e=!1,t):n(r,t,o,i)})),r}function Hn(t,n){for(var r,e=-1,i=t.length;++e<i;){var u=n(t[e]);u!==o&&(r=r===o?u:r+u)}return r}function Kn(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function Vn(t){return t?t.slice(0,sr(t)+1).replace(et,""):t}function Jn(t){return function(n){return t(n)}}function Yn(t,n){return Rn(n,(function(n){return t[n]}))}function Qn(t,n){return t.has(n)}function Xn(t,n){for(var r=-1,e=t.length;++r<e&&Fn(n,t[r],0)>-1;);return r}function tr(t,n){for(var r=t.length;r--&&Fn(n,t[r],0)>-1;);return r}var nr=qn({À:"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"}),rr=qn({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function er(t){return"\\"+an[t]}function or(t){return tn.test(t)}function ir(t){var n=-1,r=Array(t.size);return t.forEach((function(t,e){r[++n]=[e,t]})),r}function ur(t,n){return function(r){return t(n(r))}}function ar(t,n){for(var r=-1,e=t.length,o=0,i=[];++r<e;){var u=t[r];u!==n&&u!==a||(t[r]=a,i[o++]=r)}return i}function cr(t){var n=-1,r=Array(t.size);return t.forEach((function(t){r[++n]=t})),r}function fr(t){return or(t)?function(t){for(var n=Qt.lastIndex=0;Qt.test(t);)++n;return n}(t):Gn(t)}function lr(t){return or(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.split("")}(t)}function sr(t){for(var n=t.length;n--&&ot.test(t.charAt(n)););return n}var pr=qn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),hr=function t(n){var r,e=(n=null==n?pn:hr.defaults(pn.Object(),n,hr.pick(pn,rn))).Array,ot=n.Date,wt=n.Error,St=n.Function,jt=n.Math,Ot=n.Object,xt=n.RegExp,At=n.String,Et=n.TypeError,Pt=e.prototype,It=St.prototype,kt=Ot.prototype,Ct=n["__core-js_shared__"],Rt=It.toString,Wt=kt.hasOwnProperty,Lt=0,Dt=(r=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Tt=kt.toString,Gt=Rt.call(Ot),Mt=pn._,zt=xt("^"+Rt.call(Wt).replace(nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ft=yn?n.Buffer:o,$t=n.Symbol,Nt=n.Uint8Array,Bt=Ft?Ft.allocUnsafe:o,Ut=ur(Ot.getPrototypeOf,Ot),qt=Ot.create,Zt=kt.propertyIsEnumerable,Ht=Pt.splice,Kt=$t?$t.isConcatSpreadable:o,Vt=$t?$t.iterator:o,Qt=$t?$t.toStringTag:o,tn=function(){try{var t=ci(Ot,"defineProperty");return t({},"",{}),t}catch(t){}}(),an=n.clearTimeout!==pn.clearTimeout&&n.clearTimeout,ln=ot&&ot.now!==pn.Date.now&&ot.now,sn=n.setTimeout!==pn.setTimeout&&n.setTimeout,hn=jt.ceil,vn=jt.floor,gn=Ot.getOwnPropertySymbols,dn=Ft?Ft.isBuffer:o,Gn=n.isFinite,qn=Pt.join,vr=ur(Ot.keys,Ot),yr=jt.max,gr=jt.min,dr=ot.now,br=n.parseInt,_r=jt.random,mr=Pt.reverse,wr=ci(n,"DataView"),Sr=ci(n,"Map"),jr=ci(n,"Promise"),Or=ci(n,"Set"),xr=ci(n,"WeakMap"),Ar=ci(Ot,"create"),Er=xr&&new xr,Pr={},Ir=Ti(wr),kr=Ti(Sr),Cr=Ti(jr),Rr=Ti(Or),Wr=Ti(xr),Lr=$t?$t.prototype:o,Dr=Lr?Lr.valueOf:o,Tr=Lr?Lr.toString:o;function Gr(t){if(Xu(t)&&!Nu(t)&&!(t instanceof $r)){if(t instanceof Fr)return t;if(Wt.call(t,"__wrapped__"))return Gi(t)}return new Fr(t)}var Mr=function(){function t(){}return function(n){if(!Qu(n))return{};if(qt)return qt(n);t.prototype=n;var r=new t;return t.prototype=o,r}}();function zr(){}function Fr(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=o}function $r(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Nr(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Br(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Ur(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function qr(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new Ur;++n<r;)this.add(t[n])}function Zr(t){var n=this.__data__=new Br(t);this.size=n.size}function Hr(t,n){var r=Nu(t),e=!r&&$u(t),o=!r&&!e&&Zu(t),i=!r&&!e&&!o&&aa(t),u=r||e||o||i,a=u?Kn(t.length,At):[],c=a.length;for(var f in t)!n&&!Wt.call(t,f)||u&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||yi(f,c))||a.push(f);return a}function Kr(t){var n=t.length;return n?t[Ue(0,n-1)]:o}function Vr(t,n){return Ci(Ao(t),oe(n,0,t.length))}function Jr(t){return Ci(Ao(t))}function Yr(t,n,r){(r!==o&&!Mu(t[n],r)||r===o&&!(n in t))&&re(t,n,r)}function Qr(t,n,r){var e=t[n];Wt.call(t,n)&&Mu(e,r)&&(r!==o||n in t)||re(t,n,r)}function Xr(t,n){for(var r=t.length;r--;)if(Mu(t[r][0],n))return r;return-1}function te(t,n,r,e){return fe(t,(function(t,o,i){n(e,t,r(t),i)})),e}function ne(t,n){return t&&Eo(n,Ia(n),t)}function re(t,n,r){"__proto__"==n&&tn?tn(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}function ee(t,n){for(var r=-1,i=n.length,u=e(i),a=null==t;++r<i;)u[r]=a?o:Oa(t,n[r]);return u}function oe(t,n,r){return t==t&&(r!==o&&(t=t<=r?t:r),n!==o&&(t=t>=n?t:n)),t}function ie(t,n,r,e,i,u){var a,c=1&n,f=2&n,l=4&n;if(r&&(a=i?r(t,e,i,u):r(t)),a!==o)return a;if(!Qu(t))return t;var s=Nu(t);if(s){if(a=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&Wt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!c)return Ao(t,a)}else{var p=si(t),h=p==m||p==w;if(Zu(t))return mo(t,c);if(p==O||p==y||h&&!i){if(a=f||h?{}:hi(t),!c)return f?function(t,n){return Eo(t,li(t),n)}(t,function(t,n){return t&&Eo(n,ka(n),t)}(a,t)):function(t,n){return Eo(t,fi(t),n)}(t,ne(a,t))}else{if(!un[p])return i?t:{};a=function(t,n,r){var e,o=t.constructor;switch(n){case C:return wo(t);case d:case b:return new o(+t);case R:return function(t,n){var r=n?wo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case W:case L:case D:case T:case G:case M:case z:case F:case $:return So(t,r);case S:return new o;case j:case P:return new o(t);case A:return function(t){var n=new t.constructor(t.source,pt.exec(t));return n.lastIndex=t.lastIndex,n}(t);case E:return new o;case I:return e=t,Dr?Ot(Dr.call(e)):{}}}(t,p,c)}}u||(u=new Zr);var v=u.get(t);if(v)return v;u.set(t,a),oa(t)?t.forEach((function(e){a.add(ie(e,n,r,e,t,u))})):ta(t)&&t.forEach((function(e,o){a.set(o,ie(e,n,r,o,t,u))}));var g=s?o:(l?f?ni:ti:f?ka:Ia)(t);return An(g||t,(function(e,o){g&&(e=t[o=e]),Qr(a,o,ie(e,n,r,o,t,u))})),a}function ue(t,n,r){var e=r.length;if(null==t)return!e;for(t=Ot(t);e--;){var i=r[e],u=n[i],a=t[i];if(a===o&&!(i in t)||!u(a))return!1}return!0}function ae(t,n,r){if("function"!=typeof t)throw new Et(i);return Ei((function(){t.apply(o,r)}),n)}function ce(t,n,r,e){var o=-1,i=kn,u=!0,a=t.length,c=[],f=n.length;if(!a)return c;r&&(n=Rn(n,Jn(r))),e?(i=Cn,u=!1):n.length>=200&&(i=Qn,u=!1,n=new qr(n));t:for(;++o<a;){var l=t[o],s=null==r?l:r(l);if(l=e||0!==l?l:0,u&&s==s){for(var p=f;p--;)if(n[p]===s)continue t;c.push(l)}else i(n,s,e)||c.push(l)}return c}Gr.templateSettings={escape:V,evaluate:J,interpolate:Y,variable:"",imports:{_:Gr}},Gr.prototype=zr.prototype,Gr.prototype.constructor=Gr,Fr.prototype=Mr(zr.prototype),Fr.prototype.constructor=Fr,$r.prototype=Mr(zr.prototype),$r.prototype.constructor=$r,Nr.prototype.clear=function(){this.__data__=Ar?Ar(null):{},this.size=0},Nr.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},Nr.prototype.get=function(t){var n=this.__data__;if(Ar){var r=n[t];return r===u?o:r}return Wt.call(n,t)?n[t]:o},Nr.prototype.has=function(t){var n=this.__data__;return Ar?n[t]!==o:Wt.call(n,t)},Nr.prototype.set=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ar&&n===o?u:n,this},Br.prototype.clear=function(){this.__data__=[],this.size=0},Br.prototype.delete=function(t){var n=this.__data__,r=Xr(n,t);return!(r<0||(r==n.length-1?n.pop():Ht.call(n,r,1),--this.size,0))},Br.prototype.get=function(t){var n=this.__data__,r=Xr(n,t);return r<0?o:n[r][1]},Br.prototype.has=function(t){return Xr(this.__data__,t)>-1},Br.prototype.set=function(t,n){var r=this.__data__,e=Xr(r,t);return e<0?(++this.size,r.push([t,n])):r[e][1]=n,this},Ur.prototype.clear=function(){this.size=0,this.__data__={hash:new Nr,map:new(Sr||Br),string:new Nr}},Ur.prototype.delete=function(t){var n=ui(this,t).delete(t);return this.size-=n?1:0,n},Ur.prototype.get=function(t){return ui(this,t).get(t)},Ur.prototype.has=function(t){return ui(this,t).has(t)},Ur.prototype.set=function(t,n){var r=ui(this,t),e=r.size;return r.set(t,n),this.size+=r.size==e?0:1,this},qr.prototype.add=qr.prototype.push=function(t){return this.__data__.set(t,u),this},qr.prototype.has=function(t){return this.__data__.has(t)},Zr.prototype.clear=function(){this.__data__=new Br,this.size=0},Zr.prototype.delete=function(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r},Zr.prototype.get=function(t){return this.__data__.get(t)},Zr.prototype.has=function(t){return this.__data__.has(t)},Zr.prototype.set=function(t,n){var r=this.__data__;if(r instanceof Br){var e=r.__data__;if(!Sr||e.length<199)return e.push([t,n]),this.size=++r.size,this;r=this.__data__=new Ur(e)}return r.set(t,n),this.size=r.size,this};var fe=ko(de),le=ko(be,!0);function se(t,n){var r=!0;return fe(t,(function(t,e,o){return r=!!n(t,e,o)})),r}function pe(t,n,r){for(var e=-1,i=t.length;++e<i;){var u=t[e],a=n(u);if(null!=a&&(c===o?a==a&&!ua(a):r(a,c)))var c=a,f=u}return f}function he(t,n){var r=[];return fe(t,(function(t,e,o){n(t,e,o)&&r.push(t)})),r}function ve(t,n,r,e,o){var i=-1,u=t.length;for(r||(r=vi),o||(o=[]);++i<u;){var a=t[i];n>0&&r(a)?n>1?ve(a,n-1,r,e,o):Wn(o,a):e||(o[o.length]=a)}return o}var ye=Co(),ge=Co(!0);function de(t,n){return t&&ye(t,n,Ia)}function be(t,n){return t&&ge(t,n,Ia)}function _e(t,n){return In(n,(function(n){return Vu(t[n])}))}function me(t,n){for(var r=0,e=(n=yo(n,t)).length;null!=t&&r<e;)t=t[Di(n[r++])];return r&&r==e?t:o}function we(t,n,r){var e=n(t);return Nu(t)?e:Wn(e,r(t))}function Se(t){return null==t?t===o?"[object Undefined]":"[object Null]":Qt&&Qt in Ot(t)?function(t){var n=Wt.call(t,Qt),r=t[Qt];try{t[Qt]=o;var e=!0}catch(t){}var i=Tt.call(t);return e&&(n?t[Qt]=r:delete t[Qt]),i}(t):function(t){return Tt.call(t)}(t)}function je(t,n){return t>n}function Oe(t,n){return null!=t&&Wt.call(t,n)}function xe(t,n){return null!=t&&n in Ot(t)}function Ae(t,n,r){for(var i=r?Cn:kn,u=t[0].length,a=t.length,c=a,f=e(a),l=1/0,s=[];c--;){var p=t[c];c&&n&&(p=Rn(p,Jn(n))),l=gr(p.length,l),f[c]=!r&&(n||u>=120&&p.length>=120)?new qr(c&&p):o}p=t[0];var h=-1,v=f[0];t:for(;++h<u&&s.length<l;){var y=p[h],g=n?n(y):y;if(y=r||0!==y?y:0,!(v?Qn(v,g):i(s,g,r))){for(c=a;--c;){var d=f[c];if(!(d?Qn(d,g):i(t[c],g,r)))continue t}v&&v.push(g),s.push(y)}}return s}function Ee(t,n,r){var e=null==(t=Oi(t,n=yo(n,t)))?t:t[Di(Ki(n))];return null==e?o:On(e,t,r)}function Pe(t){return Xu(t)&&Se(t)==y}function Ie(t,n,r,e,i){return t===n||(null==t||null==n||!Xu(t)&&!Xu(n)?t!=t&&n!=n:function(t,n,r,e,i,u){var a=Nu(t),c=Nu(n),f=a?g:si(t),l=c?g:si(n),s=(f=f==y?O:f)==O,p=(l=l==y?O:l)==O,h=f==l;if(h&&Zu(t)){if(!Zu(n))return!1;a=!0,s=!1}if(h&&!s)return u||(u=new Zr),a||aa(t)?Qo(t,n,r,e,i,u):function(t,n,r,e,o,i,u){switch(r){case R:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case C:return!(t.byteLength!=n.byteLength||!i(new Nt(t),new Nt(n)));case d:case b:case j:return Mu(+t,+n);case _:return t.name==n.name&&t.message==n.message;case A:case P:return t==n+"";case S:var a=ir;case E:var c=1&e;if(a||(a=cr),t.size!=n.size&&!c)return!1;var f=u.get(t);if(f)return f==n;e|=2,u.set(t,n);var l=Qo(a(t),a(n),e,o,i,u);return u.delete(t),l;case I:if(Dr)return Dr.call(t)==Dr.call(n)}return!1}(t,n,f,r,e,i,u);if(!(1&r)){var v=s&&Wt.call(t,"__wrapped__"),m=p&&Wt.call(n,"__wrapped__");if(v||m){var w=v?t.value():t,x=m?n.value():n;return u||(u=new Zr),i(w,x,r,e,u)}}return!!h&&(u||(u=new Zr),function(t,n,r,e,i,u){var a=1&r,c=ti(t),f=c.length;if(f!=ti(n).length&&!a)return!1;for(var l=f;l--;){var s=c[l];if(!(a?s in n:Wt.call(n,s)))return!1}var p=u.get(t),h=u.get(n);if(p&&h)return p==n&&h==t;var v=!0;u.set(t,n),u.set(n,t);for(var y=a;++l<f;){var g=t[s=c[l]],d=n[s];if(e)var b=a?e(d,g,s,n,t,u):e(g,d,s,t,n,u);if(!(b===o?g===d||i(g,d,r,e,u):b)){v=!1;break}y||(y="constructor"==s)}if(v&&!y){var _=t.constructor,m=n.constructor;_==m||!("constructor"in t)||!("constructor"in n)||"function"==typeof _&&_ instanceof _&&"function"==typeof m&&m instanceof m||(v=!1)}return u.delete(t),u.delete(n),v}(t,n,r,e,i,u))}(t,n,r,e,Ie,i))}function ke(t,n,r,e){var i=r.length,u=i,a=!e;if(null==t)return!u;for(t=Ot(t);i--;){var c=r[i];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<u;){var f=(c=r[i])[0],l=t[f],s=c[1];if(a&&c[2]){if(l===o&&!(f in t))return!1}else{var p=new Zr;if(e)var h=e(l,s,f,t,n,p);if(!(h===o?Ie(s,l,3,e,p):h))return!1}}return!0}function Ce(t){return!(!Qu(t)||(n=t,Dt&&Dt in n))&&(Vu(t)?zt:yt).test(Ti(t));var n}function Re(t){return"function"==typeof t?t:null==t?nc:"object"==typeof t?Nu(t)?Ge(t[0],t[1]):Te(t):lc(t)}function We(t){if(!mi(t))return vr(t);var n=[];for(var r in Ot(t))Wt.call(t,r)&&"constructor"!=r&&n.push(r);return n}function Le(t,n){return t<n}function De(t,n){var r=-1,o=Uu(t)?e(t.length):[];return fe(t,(function(t,e,i){o[++r]=n(t,e,i)})),o}function Te(t){var n=ai(t);return 1==n.length&&n[0][2]?Si(n[0][0],n[0][1]):function(r){return r===t||ke(r,t,n)}}function Ge(t,n){return di(t)&&wi(n)?Si(Di(t),n):function(r){var e=Oa(r,t);return e===o&&e===n?xa(r,t):Ie(n,e,3)}}function Me(t,n,r,e,i){t!==n&&ye(n,(function(u,a){if(i||(i=new Zr),Qu(u))!function(t,n,r,e,i,u,a){var c=xi(t,r),f=xi(n,r),l=a.get(f);if(l)Yr(t,r,l);else{var s=u?u(c,f,r+"",t,n,a):o,p=s===o;if(p){var h=Nu(f),v=!h&&Zu(f),y=!h&&!v&&aa(f);s=f,h||v||y?Nu(c)?s=c:qu(c)?s=Ao(c):v?(p=!1,s=mo(f,!0)):y?(p=!1,s=So(f,!0)):s=[]:ra(f)||$u(f)?(s=c,$u(c)?s=ya(c):Qu(c)&&!Vu(c)||(s=hi(f))):p=!1}p&&(a.set(f,s),i(s,f,e,u,a),a.delete(f)),Yr(t,r,s)}}(t,n,a,r,Me,e,i);else{var c=e?e(xi(t,a),u,a+"",t,n,i):o;c===o&&(c=u),Yr(t,a,c)}}),ka)}function ze(t,n){var r=t.length;if(r)return yi(n+=n<0?r:0,r)?t[n]:o}function Fe(t,n,r){n=n.length?Rn(n,(function(t){return Nu(t)?function(n){return me(n,1===t.length?t[0]:t)}:t})):[nc];var e=-1;n=Rn(n,Jn(ii()));var o=De(t,(function(t,r,o){var i=Rn(n,(function(n){return n(t)}));return{criteria:i,index:++e,value:t}}));return function(t,n){var e=t.length;for(t.sort((function(t,n){return function(t,n,r){for(var e=-1,o=t.criteria,i=n.criteria,u=o.length,a=r.length;++e<u;){var c=jo(o[e],i[e]);if(c)return e>=a?c:c*("desc"==r[e]?-1:1)}return t.index-n.index}(t,n,r)}));e--;)t[e]=t[e].value;return t}(o)}function $e(t,n,r){for(var e=-1,o=n.length,i={};++e<o;){var u=n[e],a=me(t,u);r(a,u)&&Ve(i,yo(u,t),a)}return i}function Ne(t,n,r,e){var o=e?$n:Fn,i=-1,u=n.length,a=t;for(t===n&&(n=Ao(n)),r&&(a=Rn(t,Jn(r)));++i<u;)for(var c=0,f=n[i],l=r?r(f):f;(c=o(a,l,c,e))>-1;)a!==t&&Ht.call(a,c,1),Ht.call(t,c,1);return t}function Be(t,n){for(var r=t?n.length:0,e=r-1;r--;){var o=n[r];if(r==e||o!==i){var i=o;yi(o)?Ht.call(t,o,1):ao(t,o)}}return t}function Ue(t,n){return t+vn(_r()*(n-t+1))}function qe(t,n){var r="";if(!t||n<1||n>s)return r;do{n%2&&(r+=t),(n=vn(n/2))&&(t+=t)}while(n);return r}function Ze(t,n){return Pi(ji(t,n,nc),t+"")}function He(t){return Kr(Ma(t))}function Ke(t,n){var r=Ma(t);return Ci(r,oe(n,0,r.length))}function Ve(t,n,r,e){if(!Qu(t))return t;for(var i=-1,u=(n=yo(n,t)).length,a=u-1,c=t;null!=c&&++i<u;){var f=Di(n[i]),l=r;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(i!=a){var s=c[f];(l=e?e(s,f,c):o)===o&&(l=Qu(s)?s:yi(n[i+1])?[]:{})}Qr(c,f,l),c=c[f]}return t}var Je=Er?function(t,n){return Er.set(t,n),t}:nc,Ye=tn?function(t,n){return tn(t,"toString",{configurable:!0,enumerable:!1,value:Qa(n),writable:!0})}:nc;function Qe(t){return Ci(Ma(t))}function Xe(t,n,r){var o=-1,i=t.length;n<0&&(n=-n>i?0:i+n),(r=r>i?i:r)<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var u=e(i);++o<i;)u[o]=t[o+n];return u}function to(t,n){var r;return fe(t,(function(t,e,o){return!(r=n(t,e,o))})),!!r}function no(t,n,r){var e=0,o=null==t?e:t.length;if("number"==typeof n&&n==n&&o<=2147483647){for(;e<o;){var i=e+o>>>1,u=t[i];null!==u&&!ua(u)&&(r?u<=n:u<n)?e=i+1:o=i}return o}return ro(t,n,nc,r)}function ro(t,n,r,e){var i=0,u=null==t?0:t.length;if(0===u)return 0;for(var a=(n=r(n))!=n,c=null===n,f=ua(n),l=n===o;i<u;){var s=vn((i+u)/2),p=r(t[s]),h=p!==o,v=null===p,y=p==p,g=ua(p);if(a)var d=e||y;else d=l?y&&(e||h):c?y&&h&&(e||!v):f?y&&h&&!v&&(e||!g):!v&&!g&&(e?p<=n:p<n);d?i=s+1:u=s}return gr(u,4294967294)}function eo(t,n){for(var r=-1,e=t.length,o=0,i=[];++r<e;){var u=t[r],a=n?n(u):u;if(!r||!Mu(a,c)){var c=a;i[o++]=0===u?0:u}}return i}function oo(t){return"number"==typeof t?t:ua(t)?p:+t}function io(t){if("string"==typeof t)return t;if(Nu(t))return Rn(t,io)+"";if(ua(t))return Tr?Tr.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function uo(t,n,r){var e=-1,o=kn,i=t.length,u=!0,a=[],c=a;if(r)u=!1,o=Cn;else if(i>=200){var f=n?null:Zo(t);if(f)return cr(f);u=!1,o=Qn,c=new qr}else c=n?[]:a;t:for(;++e<i;){var l=t[e],s=n?n(l):l;if(l=r||0!==l?l:0,u&&s==s){for(var p=c.length;p--;)if(c[p]===s)continue t;n&&c.push(s),a.push(l)}else o(c,s,r)||(c!==a&&c.push(s),a.push(l))}return a}function ao(t,n){return null==(t=Oi(t,n=yo(n,t)))||delete t[Di(Ki(n))]}function co(t,n,r,e){return Ve(t,n,r(me(t,n)),e)}function fo(t,n,r,e){for(var o=t.length,i=e?o:-1;(e?i--:++i<o)&&n(t[i],i,t););return r?Xe(t,e?0:i,e?i+1:o):Xe(t,e?i+1:0,e?o:i)}function lo(t,n){var r=t;return r instanceof $r&&(r=r.value()),Ln(n,(function(t,n){return n.func.apply(n.thisArg,Wn([t],n.args))}),r)}function so(t,n,r){var o=t.length;if(o<2)return o?uo(t[0]):[];for(var i=-1,u=e(o);++i<o;)for(var a=t[i],c=-1;++c<o;)c!=i&&(u[i]=ce(u[i]||a,t[c],n,r));return uo(ve(u,1),n,r)}function po(t,n,r){for(var e=-1,i=t.length,u=n.length,a={};++e<i;){var c=e<u?n[e]:o;r(a,t[e],c)}return a}function ho(t){return qu(t)?t:[]}function vo(t){return"function"==typeof t?t:nc}function yo(t,n){return Nu(t)?t:di(t,n)?[t]:Li(ga(t))}var go=Ze;function bo(t,n,r){var e=t.length;return r=r===o?e:r,!n&&r>=e?t:Xe(t,n,r)}var _o=an||function(t){return pn.clearTimeout(t)};function mo(t,n){if(n)return t.slice();var r=t.length,e=Bt?Bt(r):new t.constructor(r);return t.copy(e),e}function wo(t){var n=new t.constructor(t.byteLength);return new Nt(n).set(new Nt(t)),n}function So(t,n){var r=n?wo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function jo(t,n){if(t!==n){var r=t!==o,e=null===t,i=t==t,u=ua(t),a=n!==o,c=null===n,f=n==n,l=ua(n);if(!c&&!l&&!u&&t>n||u&&a&&f&&!c&&!l||e&&a&&f||!r&&f||!i)return 1;if(!e&&!u&&!l&&t<n||l&&r&&i&&!e&&!u||c&&r&&i||!a&&i||!f)return-1}return 0}function Oo(t,n,r,o){for(var i=-1,u=t.length,a=r.length,c=-1,f=n.length,l=yr(u-a,0),s=e(f+l),p=!o;++c<f;)s[c]=n[c];for(;++i<a;)(p||i<u)&&(s[r[i]]=t[i]);for(;l--;)s[c++]=t[i++];return s}function xo(t,n,r,o){for(var i=-1,u=t.length,a=-1,c=r.length,f=-1,l=n.length,s=yr(u-c,0),p=e(s+l),h=!o;++i<s;)p[i]=t[i];for(var v=i;++f<l;)p[v+f]=n[f];for(;++a<c;)(h||i<u)&&(p[v+r[a]]=t[i++]);return p}function Ao(t,n){var r=-1,o=t.length;for(n||(n=e(o));++r<o;)n[r]=t[r];return n}function Eo(t,n,r,e){var i=!r;r||(r={});for(var u=-1,a=n.length;++u<a;){var c=n[u],f=e?e(r[c],t[c],c,r,t):o;f===o&&(f=t[c]),i?re(r,c,f):Qr(r,c,f)}return r}function Po(t,n){return function(r,e){var o=Nu(r)?xn:te,i=n?n():{};return o(r,t,ii(e,2),i)}}function Io(t){return Ze((function(n,r){var e=-1,i=r.length,u=i>1?r[i-1]:o,a=i>2?r[2]:o;for(u=t.length>3&&"function"==typeof u?(i--,u):o,a&&gi(r[0],r[1],a)&&(u=i<3?o:u,i=1),n=Ot(n);++e<i;){var c=r[e];c&&t(n,c,e,u)}return n}))}function ko(t,n){return function(r,e){if(null==r)return r;if(!Uu(r))return t(r,e);for(var o=r.length,i=n?o:-1,u=Ot(r);(n?i--:++i<o)&&!1!==e(u[i],i,u););return r}}function Co(t){return function(n,r,e){for(var o=-1,i=Ot(n),u=e(n),a=u.length;a--;){var c=u[t?a:++o];if(!1===r(i[c],c,i))break}return n}}function Ro(t){return function(n){var r=or(n=ga(n))?lr(n):o,e=r?r[0]:n.charAt(0),i=r?bo(r,1).join(""):n.slice(1);return e[t]()+i}}function Wo(t){return function(n){return Ln(Va($a(n).replace(Jt,"")),t,"")}}function Lo(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=Mr(t.prototype),e=t.apply(r,n);return Qu(e)?e:r}}function Do(t){return function(n,r,e){var i=Ot(n);if(!Uu(n)){var u=ii(r,3);n=Ia(n),r=function(t){return u(i[t],t,i)}}var a=t(n,r,e);return a>-1?i[u?n[a]:a]:o}}function To(t){return Xo((function(n){var r=n.length,e=r,u=Fr.prototype.thru;for(t&&n.reverse();e--;){var a=n[e];if("function"!=typeof a)throw new Et(i);if(u&&!c&&"wrapper"==ei(a))var c=new Fr([],!0)}for(e=c?e:r;++e<r;){var f=ei(a=n[e]),l="wrapper"==f?ri(a):o;c=l&&bi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[ei(l[0])].apply(c,l[3]):1==a.length&&bi(a)?c[f]():c.thru(a)}return function(){var t=arguments,e=t[0];if(c&&1==t.length&&Nu(e))return c.plant(e).value();for(var o=0,i=r?n[o].apply(this,t):e;++o<r;)i=n[o].call(this,i);return i}}))}function Go(t,n,r,i,u,a,c,l,s,p){var h=n&f,v=1&n,y=2&n,g=24&n,d=512&n,b=y?o:Lo(t);return function f(){for(var _=arguments.length,m=e(_),w=_;w--;)m[w]=arguments[w];if(g)var S=oi(f),j=function(t,n){for(var r=t.length,e=0;r--;)t[r]===n&&++e;return e}(m,S);if(i&&(m=Oo(m,i,u,g)),a&&(m=xo(m,a,c,g)),_-=j,g&&_<p){var O=ar(m,S);return Uo(t,n,Go,f.placeholder,r,m,O,l,s,p-_)}var x=v?r:this,A=y?x[t]:t;return _=m.length,l?m=function(t,n){for(var r=t.length,e=gr(n.length,r),i=Ao(t);e--;){var u=n[e];t[e]=yi(u,r)?i[u]:o}return t}(m,l):d&&_>1&&m.reverse(),h&&s<_&&(m.length=s),this&&this!==pn&&this instanceof f&&(A=b||Lo(A)),A.apply(x,m)}}function Mo(t,n){return function(r,e){return function(t,n,r,e){return de(t,(function(t,o,i){n(e,r(t),o,i)})),e}(r,t,n(e),{})}}function zo(t,n){return function(r,e){var i;if(r===o&&e===o)return n;if(r!==o&&(i=r),e!==o){if(i===o)return e;"string"==typeof r||"string"==typeof e?(r=io(r),e=io(e)):(r=oo(r),e=oo(e)),i=t(r,e)}return i}}function Fo(t){return Xo((function(n){return n=Rn(n,Jn(ii())),Ze((function(r){var e=this;return t(n,(function(t){return On(t,e,r)}))}))}))}function $o(t,n){var r=(n=n===o?" ":io(n)).length;if(r<2)return r?qe(n,t):n;var e=qe(n,hn(t/fr(n)));return or(n)?bo(lr(e),0,t).join(""):e.slice(0,t)}function No(t){return function(n,r,i){return i&&"number"!=typeof i&&gi(n,r,i)&&(r=i=o),n=sa(n),r===o?(r=n,n=0):r=sa(r),function(t,n,r,o){for(var i=-1,u=yr(hn((n-t)/(r||1)),0),a=e(u);u--;)a[o?u:++i]=t,t+=r;return a}(n,r,i=i===o?n<r?1:-1:sa(i),t)}}function Bo(t){return function(n,r){return"string"==typeof n&&"string"==typeof r||(n=va(n),r=va(r)),t(n,r)}}function Uo(t,n,r,e,i,u,a,f,l,s){var p=8&n;n|=p?c:64,4&(n&=~(p?64:c))||(n&=-4);var h=[t,n,i,p?u:o,p?a:o,p?o:u,p?o:a,f,l,s],v=r.apply(o,h);return bi(t)&&Ai(v,h),v.placeholder=e,Ii(v,t,n)}function qo(t){var n=jt[t];return function(t,r){if(t=va(t),(r=null==r?0:gr(pa(r),292))&&Gn(t)){var e=(ga(t)+"e").split("e");return+((e=(ga(n(e[0]+"e"+(+e[1]+r)))+"e").split("e"))[0]+"e"+(+e[1]-r))}return n(t)}}var Zo=Or&&1/cr(new Or([,-0]))[1]==l?function(t){return new Or(t)}:uc;function Ho(t){return function(n){var r=si(n);return r==S?ir(n):r==E?function(t){var n=-1,r=Array(t.size);return t.forEach((function(t){r[++n]=[t,t]})),r}(n):function(t,n){return Rn(n,(function(n){return[n,t[n]]}))}(n,t(n))}}function Ko(t,n,r,u,l,s,p,h){var v=2&n;if(!v&&"function"!=typeof t)throw new Et(i);var y=u?u.length:0;if(y||(n&=-97,u=l=o),p=p===o?p:yr(pa(p),0),h=h===o?h:pa(h),y-=l?l.length:0,64&n){var g=u,d=l;u=l=o}var b=v?o:ri(t),_=[t,n,r,u,l,g,d,s,p,h];if(b&&function(t,n){var r=t[1],e=n[1],o=r|e,i=o<131,u=e==f&&8==r||e==f&&256==r&&t[7].length<=n[8]||384==e&&n[7].length<=n[8]&&8==r;if(!i&&!u)return t;1&e&&(t[2]=n[2],o|=1&r?0:4);var c=n[3];if(c){var l=t[3];t[3]=l?Oo(l,c,n[4]):c,t[4]=l?ar(t[3],a):n[4]}(c=n[5])&&(l=t[5],t[5]=l?xo(l,c,n[6]):c,t[6]=l?ar(t[5],a):n[6]),(c=n[7])&&(t[7]=c),e&f&&(t[8]=null==t[8]?n[8]:gr(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=o}(_,b),t=_[0],n=_[1],r=_[2],u=_[3],l=_[4],!(h=_[9]=_[9]===o?v?0:t.length:yr(_[9]-y,0))&&24&n&&(n&=-25),n&&1!=n)m=8==n||16==n?function(t,n,r){var i=Lo(t);return function u(){for(var a=arguments.length,c=e(a),f=a,l=oi(u);f--;)c[f]=arguments[f];var s=a<3&&c[0]!==l&&c[a-1]!==l?[]:ar(c,l);return(a-=s.length)<r?Uo(t,n,Go,u.placeholder,o,c,s,o,o,r-a):On(this&&this!==pn&&this instanceof u?i:t,this,c)}}(t,n,h):n!=c&&33!=n||l.length?Go.apply(o,_):function(t,n,r,o){var i=1&n,u=Lo(t);return function n(){for(var a=-1,c=arguments.length,f=-1,l=o.length,s=e(l+c),p=this&&this!==pn&&this instanceof n?u:t;++f<l;)s[f]=o[f];for(;c--;)s[f++]=arguments[++a];return On(p,i?r:this,s)}}(t,n,r,u);else var m=function(t,n,r){var e=1&n,o=Lo(t);return function n(){return(this&&this!==pn&&this instanceof n?o:t).apply(e?r:this,arguments)}}(t,n,r);return Ii((b?Je:Ai)(m,_),t,n)}function Vo(t,n,r,e){return t===o||Mu(t,kt[r])&&!Wt.call(e,r)?n:t}function Jo(t,n,r,e,i,u){return Qu(t)&&Qu(n)&&(u.set(n,t),Me(t,n,o,Jo,u),u.delete(n)),t}function Yo(t){return ra(t)?o:t}function Qo(t,n,r,e,i,u){var a=1&r,c=t.length,f=n.length;if(c!=f&&!(a&&f>c))return!1;var l=u.get(t),s=u.get(n);if(l&&s)return l==n&&s==t;var p=-1,h=!0,v=2&r?new qr:o;for(u.set(t,n),u.set(n,t);++p<c;){var y=t[p],g=n[p];if(e)var d=a?e(g,y,p,n,t,u):e(y,g,p,t,n,u);if(d!==o){if(d)continue;h=!1;break}if(v){if(!Tn(n,(function(t,n){if(!Qn(v,n)&&(y===t||i(y,t,r,e,u)))return v.push(n)}))){h=!1;break}}else if(y!==g&&!i(y,g,r,e,u)){h=!1;break}}return u.delete(t),u.delete(n),h}function Xo(t){return Pi(ji(t,o,Bi),t+"")}function ti(t){return we(t,Ia,fi)}function ni(t){return we(t,ka,li)}var ri=Er?function(t){return Er.get(t)}:uc;function ei(t){for(var n=t.name+"",r=Pr[n],e=Wt.call(Pr,n)?r.length:0;e--;){var o=r[e],i=o.func;if(null==i||i==t)return o.name}return n}function oi(t){return(Wt.call(Gr,"placeholder")?Gr:t).placeholder}function ii(){var t=Gr.iteratee||rc;return t=t===rc?Re:t,arguments.length?t(arguments[0],arguments[1]):t}function ui(t,n){var r,e,o=t.__data__;return("string"==(e=typeof(r=n))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==r:null===r)?o["string"==typeof n?"string":"hash"]:o.map}function ai(t){for(var n=Ia(t),r=n.length;r--;){var e=n[r],o=t[e];n[r]=[e,o,wi(o)]}return n}function ci(t,n){var r=function(t,n){return null==t?o:t[n]}(t,n);return Ce(r)?r:o}var fi=gn?function(t){return null==t?[]:(t=Ot(t),In(gn(t),(function(n){return Zt.call(t,n)})))}:hc,li=gn?function(t){for(var n=[];t;)Wn(n,fi(t)),t=Ut(t);return n}:hc,si=Se;function pi(t,n,r){for(var e=-1,o=(n=yo(n,t)).length,i=!1;++e<o;){var u=Di(n[e]);if(!(i=null!=t&&r(t,u)))break;t=t[u]}return i||++e!=o?i:!!(o=null==t?0:t.length)&&Yu(o)&&yi(u,o)&&(Nu(t)||$u(t))}function hi(t){return"function"!=typeof t.constructor||mi(t)?{}:Mr(Ut(t))}function vi(t){return Nu(t)||$u(t)||!!(Kt&&t&&t[Kt])}function yi(t,n){var r=typeof t;return!!(n=null==n?s:n)&&("number"==r||"symbol"!=r&&dt.test(t))&&t>-1&&t%1==0&&t<n}function gi(t,n,r){if(!Qu(r))return!1;var e=typeof n;return!!("number"==e?Uu(r)&&yi(n,r.length):"string"==e&&n in r)&&Mu(r[n],t)}function di(t,n){if(Nu(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!ua(t))||X.test(t)||!Q.test(t)||null!=n&&t in Ot(n)}function bi(t){var n=ei(t),r=Gr[n];if("function"!=typeof r||!(n in $r.prototype))return!1;if(t===r)return!0;var e=ri(r);return!!e&&t===e[0]}(wr&&si(new wr(new ArrayBuffer(1)))!=R||Sr&&si(new Sr)!=S||jr&&si(jr.resolve())!=x||Or&&si(new Or)!=E||xr&&si(new xr)!=k)&&(si=function(t){var n=Se(t),r=n==O?t.constructor:o,e=r?Ti(r):"";if(e)switch(e){case Ir:return R;case kr:return S;case Cr:return x;case Rr:return E;case Wr:return k}return n});var _i=Ct?Vu:vc;function mi(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||kt)}function wi(t){return t==t&&!Qu(t)}function Si(t,n){return function(r){return null!=r&&r[t]===n&&(n!==o||t in Ot(r))}}function ji(t,n,r){return n=yr(n===o?t.length-1:n,0),function(){for(var o=arguments,i=-1,u=yr(o.length-n,0),a=e(u);++i<u;)a[i]=o[n+i];i=-1;for(var c=e(n+1);++i<n;)c[i]=o[i];return c[n]=r(a),On(t,this,c)}}function Oi(t,n){return n.length<2?t:me(t,Xe(n,0,-1))}function xi(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}var Ai=ki(Je),Ei=sn||function(t,n){return pn.setTimeout(t,n)},Pi=ki(Ye);function Ii(t,n,r){var e=n+"";return Pi(t,function(t,n){var r=n.length;if(!r)return t;var e=r-1;return n[e]=(r>1?"& ":"")+n[e],n=n.join(r>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+n+"] */\n")}(e,function(t,n){return An(v,(function(r){var e="_."+r[0];n&r[1]&&!kn(t,e)&&t.push(e)})),t.sort()}(function(t){var n=t.match(ut);return n?n[1].split(at):[]}(e),r)))}function ki(t){var n=0,r=0;return function(){var e=dr(),i=16-(e-r);if(r=e,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(o,arguments)}}function Ci(t,n){var r=-1,e=t.length,i=e-1;for(n=n===o?e:n;++r<n;){var u=Ue(r,i),a=t[u];t[u]=t[r],t[r]=a}return t.length=n,t}var Ri,Wi,Li=(Ri=Ru((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(tt,(function(t,r,e,o){n.push(e?o.replace(lt,"$1"):r||t)})),n}),(function(t){return 500===Wi.size&&Wi.clear(),t})),Wi=Ri.cache,Ri);function Di(t){if("string"==typeof t||ua(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function Ti(t){if(null!=t){try{return Rt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Gi(t){if(t instanceof $r)return t.clone();var n=new Fr(t.__wrapped__,t.__chain__);return n.__actions__=Ao(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}var Mi=Ze((function(t,n){return qu(t)?ce(t,ve(n,1,qu,!0)):[]})),zi=Ze((function(t,n){var r=Ki(n);return qu(r)&&(r=o),qu(t)?ce(t,ve(n,1,qu,!0),ii(r,2)):[]})),Fi=Ze((function(t,n){var r=Ki(n);return qu(r)&&(r=o),qu(t)?ce(t,ve(n,1,qu,!0),o,r):[]}));function $i(t,n,r){var e=null==t?0:t.length;if(!e)return-1;var o=null==r?0:pa(r);return o<0&&(o=yr(e+o,0)),zn(t,ii(n,3),o)}function Ni(t,n,r){var e=null==t?0:t.length;if(!e)return-1;var i=e-1;return r!==o&&(i=pa(r),i=r<0?yr(e+i,0):gr(i,e-1)),zn(t,ii(n,3),i,!0)}function Bi(t){return null!=t&&t.length?ve(t,1):[]}function Ui(t){return t&&t.length?t[0]:o}var qi=Ze((function(t){var n=Rn(t,ho);return n.length&&n[0]===t[0]?Ae(n):[]})),Zi=Ze((function(t){var n=Ki(t),r=Rn(t,ho);return n===Ki(r)?n=o:r.pop(),r.length&&r[0]===t[0]?Ae(r,ii(n,2)):[]})),Hi=Ze((function(t){var n=Ki(t),r=Rn(t,ho);return(n="function"==typeof n?n:o)&&r.pop(),r.length&&r[0]===t[0]?Ae(r,o,n):[]}));function Ki(t){var n=null==t?0:t.length;return n?t[n-1]:o}var Vi=Ze(Ji);function Ji(t,n){return t&&t.length&&n&&n.length?Ne(t,n):t}var Yi=Xo((function(t,n){var r=null==t?0:t.length,e=ee(t,n);return Be(t,Rn(n,(function(t){return yi(t,r)?+t:t})).sort(jo)),e}));function Qi(t){return null==t?t:mr.call(t)}var Xi=Ze((function(t){return uo(ve(t,1,qu,!0))})),tu=Ze((function(t){var n=Ki(t);return qu(n)&&(n=o),uo(ve(t,1,qu,!0),ii(n,2))})),nu=Ze((function(t){var n=Ki(t);return n="function"==typeof n?n:o,uo(ve(t,1,qu,!0),o,n)}));function ru(t){if(!t||!t.length)return[];var n=0;return t=In(t,(function(t){if(qu(t))return n=yr(t.length,n),!0})),Kn(n,(function(n){return Rn(t,Un(n))}))}function eu(t,n){if(!t||!t.length)return[];var r=ru(t);return null==n?r:Rn(r,(function(t){return On(n,o,t)}))}var ou=Ze((function(t,n){return qu(t)?ce(t,n):[]})),iu=Ze((function(t){return so(In(t,qu))})),uu=Ze((function(t){var n=Ki(t);return qu(n)&&(n=o),so(In(t,qu),ii(n,2))})),au=Ze((function(t){var n=Ki(t);return n="function"==typeof n?n:o,so(In(t,qu),o,n)})),cu=Ze(ru),fu=Ze((function(t){var n=t.length,r=n>1?t[n-1]:o;return r="function"==typeof r?(t.pop(),r):o,eu(t,r)}));function lu(t){var n=Gr(t);return n.__chain__=!0,n}function su(t,n){return n(t)}var pu=Xo((function(t){var n=t.length,r=n?t[0]:0,e=this.__wrapped__,i=function(n){return ee(n,t)};return!(n>1||this.__actions__.length)&&e instanceof $r&&yi(r)?((e=e.slice(r,+r+(n?1:0))).__actions__.push({func:su,args:[i],thisArg:o}),new Fr(e,this.__chain__).thru((function(t){return n&&!t.length&&t.push(o),t}))):this.thru(i)})),hu=Po((function(t,n,r){Wt.call(t,r)?++t[r]:re(t,r,1)})),vu=Do($i),yu=Do(Ni);function gu(t,n){return(Nu(t)?An:fe)(t,ii(n,3))}function du(t,n){return(Nu(t)?En:le)(t,ii(n,3))}var bu=Po((function(t,n,r){Wt.call(t,r)?t[r].push(n):re(t,r,[n])})),_u=Ze((function(t,n,r){var o=-1,i="function"==typeof n,u=Uu(t)?e(t.length):[];return fe(t,(function(t){u[++o]=i?On(n,t,r):Ee(t,n,r)})),u})),mu=Po((function(t,n,r){re(t,r,n)}));function wu(t,n){return(Nu(t)?Rn:De)(t,ii(n,3))}var Su=Po((function(t,n,r){t[r?0:1].push(n)}),(function(){return[[],[]]})),ju=Ze((function(t,n){if(null==t)return[];var r=n.length;return r>1&&gi(t,n[0],n[1])?n=[]:r>2&&gi(n[0],n[1],n[2])&&(n=[n[0]]),Fe(t,ve(n,1),[])})),Ou=ln||function(){return pn.Date.now()};function xu(t,n,r){return n=r?o:n,n=t&&null==n?t.length:n,Ko(t,f,o,o,o,o,n)}function Au(t,n){var r;if("function"!=typeof n)throw new Et(i);return t=pa(t),function(){return--t>0&&(r=n.apply(this,arguments)),t<=1&&(n=o),r}}var Eu=Ze((function(t,n,r){var e=1;if(r.length){var o=ar(r,oi(Eu));e|=c}return Ko(t,e,n,r,o)})),Pu=Ze((function(t,n,r){var e=3;if(r.length){var o=ar(r,oi(Pu));e|=c}return Ko(n,e,t,r,o)}));function Iu(t,n,r){var e,u,a,c,f,l,s=0,p=!1,h=!1,v=!0;if("function"!=typeof t)throw new Et(i);function y(n){var r=e,i=u;return e=u=o,s=n,c=t.apply(i,r)}function g(t){var r=t-l;return l===o||r>=n||r<0||h&&t-s>=a}function d(){var t=Ou();if(g(t))return b(t);f=Ei(d,function(t){var r=n-(t-l);return h?gr(r,a-(t-s)):r}(t))}function b(t){return f=o,v&&e?y(t):(e=u=o,c)}function _(){var t=Ou(),r=g(t);if(e=arguments,u=this,l=t,r){if(f===o)return function(t){return s=t,f=Ei(d,n),p?y(t):c}(l);if(h)return _o(f),f=Ei(d,n),y(l)}return f===o&&(f=Ei(d,n)),c}return n=va(n)||0,Qu(r)&&(p=!!r.leading,a=(h="maxWait"in r)?yr(va(r.maxWait)||0,n):a,v="trailing"in r?!!r.trailing:v),_.cancel=function(){f!==o&&_o(f),s=0,e=l=u=f=o},_.flush=function(){return f===o?c:b(Ou())},_}var ku=Ze((function(t,n){return ae(t,1,n)})),Cu=Ze((function(t,n,r){return ae(t,va(n)||0,r)}));function Ru(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Et(i);var r=function(){var e=arguments,o=n?n.apply(this,e):e[0],i=r.cache;if(i.has(o))return i.get(o);var u=t.apply(this,e);return r.cache=i.set(o,u)||i,u};return r.cache=new(Ru.Cache||Ur),r}function Wu(t){if("function"!=typeof t)throw new Et(i);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}Ru.Cache=Ur;var Lu=go((function(t,n){var r=(n=1==n.length&&Nu(n[0])?Rn(n[0],Jn(ii())):Rn(ve(n,1),Jn(ii()))).length;return Ze((function(e){for(var o=-1,i=gr(e.length,r);++o<i;)e[o]=n[o].call(this,e[o]);return On(t,this,e)}))})),Du=Ze((function(t,n){var r=ar(n,oi(Du));return Ko(t,c,o,n,r)})),Tu=Ze((function(t,n){var r=ar(n,oi(Tu));return Ko(t,64,o,n,r)})),Gu=Xo((function(t,n){return Ko(t,256,o,o,o,n)}));function Mu(t,n){return t===n||t!=t&&n!=n}var zu=Bo(je),Fu=Bo((function(t,n){return t>=n})),$u=Pe(function(){return arguments}())?Pe:function(t){return Xu(t)&&Wt.call(t,"callee")&&!Zt.call(t,"callee")},Nu=e.isArray,Bu=bn?Jn(bn):function(t){return Xu(t)&&Se(t)==C};function Uu(t){return null!=t&&Yu(t.length)&&!Vu(t)}function qu(t){return Xu(t)&&Uu(t)}var Zu=dn||vc,Hu=_n?Jn(_n):function(t){return Xu(t)&&Se(t)==b};function Ku(t){if(!Xu(t))return!1;var n=Se(t);return n==_||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Vu(t){if(!Qu(t))return!1;var n=Se(t);return n==m||n==w||"[object AsyncFunction]"==n||"[object Proxy]"==n}function Ju(t){return"number"==typeof t&&t==pa(t)}function Yu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=s}function Qu(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function Xu(t){return null!=t&&"object"==typeof t}var ta=mn?Jn(mn):function(t){return Xu(t)&&si(t)==S};function na(t){return"number"==typeof t||Xu(t)&&Se(t)==j}function ra(t){if(!Xu(t)||Se(t)!=O)return!1;var n=Ut(t);if(null===n)return!0;var r=Wt.call(n,"constructor")&&n.constructor;return"function"==typeof r&&r instanceof r&&Rt.call(r)==Gt}var ea=wn?Jn(wn):function(t){return Xu(t)&&Se(t)==A},oa=Sn?Jn(Sn):function(t){return Xu(t)&&si(t)==E};function ia(t){return"string"==typeof t||!Nu(t)&&Xu(t)&&Se(t)==P}function ua(t){return"symbol"==typeof t||Xu(t)&&Se(t)==I}var aa=jn?Jn(jn):function(t){return Xu(t)&&Yu(t.length)&&!!on[Se(t)]},ca=Bo(Le),fa=Bo((function(t,n){return t<=n}));function la(t){if(!t)return[];if(Uu(t))return ia(t)?lr(t):Ao(t);if(Vt&&t[Vt])return function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}(t[Vt]());var n=si(t);return(n==S?ir:n==E?cr:Ma)(t)}function sa(t){return t?(t=va(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function pa(t){var n=sa(t),r=n%1;return n==n?r?n-r:n:0}function ha(t){return t?oe(pa(t),0,h):0}function va(t){if("number"==typeof t)return t;if(ua(t))return p;if(Qu(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=Qu(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Vn(t);var r=vt.test(t);return r||gt.test(t)?fn(t.slice(2),r?2:8):ht.test(t)?p:+t}function ya(t){return Eo(t,ka(t))}function ga(t){return null==t?"":io(t)}var da=Io((function(t,n){if(mi(n)||Uu(n))Eo(n,Ia(n),t);else for(var r in n)Wt.call(n,r)&&Qr(t,r,n[r])})),ba=Io((function(t,n){Eo(n,ka(n),t)})),_a=Io((function(t,n,r,e){Eo(n,ka(n),t,e)})),ma=Io((function(t,n,r,e){Eo(n,Ia(n),t,e)})),wa=Xo(ee),Sa=Ze((function(t,n){t=Ot(t);var r=-1,e=n.length,i=e>2?n[2]:o;for(i&&gi(n[0],n[1],i)&&(e=1);++r<e;)for(var u=n[r],a=ka(u),c=-1,f=a.length;++c<f;){var l=a[c],s=t[l];(s===o||Mu(s,kt[l])&&!Wt.call(t,l))&&(t[l]=u[l])}return t})),ja=Ze((function(t){return t.push(o,Jo),On(Ra,o,t)}));function Oa(t,n,r){var e=null==t?o:me(t,n);return e===o?r:e}function xa(t,n){return null!=t&&pi(t,n,xe)}var Aa=Mo((function(t,n,r){null!=n&&"function"!=typeof n.toString&&(n=Tt.call(n)),t[n]=r}),Qa(nc)),Ea=Mo((function(t,n,r){null!=n&&"function"!=typeof n.toString&&(n=Tt.call(n)),Wt.call(t,n)?t[n].push(r):t[n]=[r]}),ii),Pa=Ze(Ee);function Ia(t){return Uu(t)?Hr(t):We(t)}function ka(t){return Uu(t)?Hr(t,!0):function(t){if(!Qu(t))return function(t){var n=[];if(null!=t)for(var r in Ot(t))n.push(r);return n}(t);var n=mi(t),r=[];for(var e in t)("constructor"!=e||!n&&Wt.call(t,e))&&r.push(e);return r}(t)}var Ca=Io((function(t,n,r){Me(t,n,r)})),Ra=Io((function(t,n,r,e){Me(t,n,r,e)})),Wa=Xo((function(t,n){var r={};if(null==t)return r;var e=!1;n=Rn(n,(function(n){return n=yo(n,t),e||(e=n.length>1),n})),Eo(t,ni(t),r),e&&(r=ie(r,7,Yo));for(var o=n.length;o--;)ao(r,n[o]);return r})),La=Xo((function(t,n){return null==t?{}:function(t,n){return $e(t,n,(function(n,r){return xa(t,r)}))}(t,n)}));function Da(t,n){if(null==t)return{};var r=Rn(ni(t),(function(t){return[t]}));return n=ii(n),$e(t,r,(function(t,r){return n(t,r[0])}))}var Ta=Ho(Ia),Ga=Ho(ka);function Ma(t){return null==t?[]:Yn(t,Ia(t))}var za=Wo((function(t,n,r){return n=n.toLowerCase(),t+(r?Fa(n):n)}));function Fa(t){return Ka(ga(t).toLowerCase())}function $a(t){return(t=ga(t))&&t.replace(bt,nr).replace(Yt,"")}var Na=Wo((function(t,n,r){return t+(r?"-":"")+n.toLowerCase()})),Ba=Wo((function(t,n,r){return t+(r?" ":"")+n.toLowerCase()})),Ua=Ro("toLowerCase"),qa=Wo((function(t,n,r){return t+(r?"_":"")+n.toLowerCase()})),Za=Wo((function(t,n,r){return t+(r?" ":"")+Ka(n)})),Ha=Wo((function(t,n,r){return t+(r?" ":"")+n.toUpperCase()})),Ka=Ro("toUpperCase");function Va(t,n,r){return t=ga(t),(n=r?o:n)===o?function(t){return nn.test(t)}(t)?function(t){return t.match(Xt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(n)||[]}var Ja=Ze((function(t,n){try{return On(t,o,n)}catch(t){return Ku(t)?t:new wt(t)}})),Ya=Xo((function(t,n){return An(n,(function(n){n=Di(n),re(t,n,Eu(t[n],t))})),t}));function Qa(t){return function(){return t}}var Xa=To(),tc=To(!0);function nc(t){return t}function rc(t){return Re("function"==typeof t?t:ie(t,1))}var ec=Ze((function(t,n){return function(r){return Ee(r,t,n)}})),oc=Ze((function(t,n){return function(r){return Ee(t,r,n)}}));function ic(t,n,r){var e=Ia(n),o=_e(n,e);null!=r||Qu(n)&&(o.length||!e.length)||(r=n,n=t,t=this,o=_e(n,Ia(n)));var i=!(Qu(r)&&"chain"in r&&!r.chain),u=Vu(t);return An(o,(function(r){var e=n[r];t[r]=e,u&&(t.prototype[r]=function(){var n=this.__chain__;if(i||n){var r=t(this.__wrapped__);return(r.__actions__=Ao(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,Wn([this.value()],arguments))})})),t}function uc(){}var ac=Fo(Rn),cc=Fo(Pn),fc=Fo(Tn);function lc(t){return di(t)?Un(Di(t)):function(t){return function(n){return me(n,t)}}(t)}var sc=No(),pc=No(!0);function hc(){return[]}function vc(){return!1}var yc,gc=zo((function(t,n){return t+n}),0),dc=qo("ceil"),bc=zo((function(t,n){return t/n}),1),_c=qo("floor"),mc=zo((function(t,n){return t*n}),1),wc=qo("round"),Sc=zo((function(t,n){return t-n}),0);return Gr.after=function(t,n){if("function"!=typeof n)throw new Et(i);return t=pa(t),function(){if(--t<1)return n.apply(this,arguments)}},Gr.ary=xu,Gr.assign=da,Gr.assignIn=ba,Gr.assignInWith=_a,Gr.assignWith=ma,Gr.at=wa,Gr.before=Au,Gr.bind=Eu,Gr.bindAll=Ya,Gr.bindKey=Pu,Gr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Nu(t)?t:[t]},Gr.chain=lu,Gr.chunk=function(t,n,r){n=(r?gi(t,n,r):n===o)?1:yr(pa(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var u=0,a=0,c=e(hn(i/n));u<i;)c[a++]=Xe(t,u,u+=n);return c},Gr.compact=function(t){for(var n=-1,r=null==t?0:t.length,e=0,o=[];++n<r;){var i=t[n];i&&(o[e++]=i)}return o},Gr.concat=function(){var t=arguments.length;if(!t)return[];for(var n=e(t-1),r=arguments[0],o=t;o--;)n[o-1]=arguments[o];return Wn(Nu(r)?Ao(r):[r],ve(n,1))},Gr.cond=function(t){var n=null==t?0:t.length,r=ii();return t=n?Rn(t,(function(t){if("function"!=typeof t[1])throw new Et(i);return[r(t[0]),t[1]]})):[],Ze((function(r){for(var e=-1;++e<n;){var o=t[e];if(On(o[0],this,r))return On(o[1],this,r)}}))},Gr.conforms=function(t){return function(t){var n=Ia(t);return function(r){return ue(r,t,n)}}(ie(t,1))},Gr.constant=Qa,Gr.countBy=hu,Gr.create=function(t,n){var r=Mr(t);return null==n?r:ne(r,n)},Gr.curry=function t(n,r,e){var i=Ko(n,8,o,o,o,o,o,r=e?o:r);return i.placeholder=t.placeholder,i},Gr.curryRight=function t(n,r,e){var i=Ko(n,16,o,o,o,o,o,r=e?o:r);return i.placeholder=t.placeholder,i},Gr.debounce=Iu,Gr.defaults=Sa,Gr.defaultsDeep=ja,Gr.defer=ku,Gr.delay=Cu,Gr.difference=Mi,Gr.differenceBy=zi,Gr.differenceWith=Fi,Gr.drop=function(t,n,r){var e=null==t?0:t.length;return e?Xe(t,(n=r||n===o?1:pa(n))<0?0:n,e):[]},Gr.dropRight=function(t,n,r){var e=null==t?0:t.length;return e?Xe(t,0,(n=e-(n=r||n===o?1:pa(n)))<0?0:n):[]},Gr.dropRightWhile=function(t,n){return t&&t.length?fo(t,ii(n,3),!0,!0):[]},Gr.dropWhile=function(t,n){return t&&t.length?fo(t,ii(n,3),!0):[]},Gr.fill=function(t,n,r,e){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&gi(t,n,r)&&(r=0,e=i),function(t,n,r,e){var i=t.length;for((r=pa(r))<0&&(r=-r>i?0:i+r),(e=e===o||e>i?i:pa(e))<0&&(e+=i),e=r>e?0:ha(e);r<e;)t[r++]=n;return t}(t,n,r,e)):[]},Gr.filter=function(t,n){return(Nu(t)?In:he)(t,ii(n,3))},Gr.flatMap=function(t,n){return ve(wu(t,n),1)},Gr.flatMapDeep=function(t,n){return ve(wu(t,n),l)},Gr.flatMapDepth=function(t,n,r){return r=r===o?1:pa(r),ve(wu(t,n),r)},Gr.flatten=Bi,Gr.flattenDeep=function(t){return null!=t&&t.length?ve(t,l):[]},Gr.flattenDepth=function(t,n){return null!=t&&t.length?ve(t,n=n===o?1:pa(n)):[]},Gr.flip=function(t){return Ko(t,512)},Gr.flow=Xa,Gr.flowRight=tc,Gr.fromPairs=function(t){for(var n=-1,r=null==t?0:t.length,e={};++n<r;){var o=t[n];e[o[0]]=o[1]}return e},Gr.functions=function(t){return null==t?[]:_e(t,Ia(t))},Gr.functionsIn=function(t){return null==t?[]:_e(t,ka(t))},Gr.groupBy=bu,Gr.initial=function(t){return null!=t&&t.length?Xe(t,0,-1):[]},Gr.intersection=qi,Gr.intersectionBy=Zi,Gr.intersectionWith=Hi,Gr.invert=Aa,Gr.invertBy=Ea,Gr.invokeMap=_u,Gr.iteratee=rc,Gr.keyBy=mu,Gr.keys=Ia,Gr.keysIn=ka,Gr.map=wu,Gr.mapKeys=function(t,n){var r={};return n=ii(n,3),de(t,(function(t,e,o){re(r,n(t,e,o),t)})),r},Gr.mapValues=function(t,n){var r={};return n=ii(n,3),de(t,(function(t,e,o){re(r,e,n(t,e,o))})),r},Gr.matches=function(t){return Te(ie(t,1))},Gr.matchesProperty=function(t,n){return Ge(t,ie(n,1))},Gr.memoize=Ru,Gr.merge=Ca,Gr.mergeWith=Ra,Gr.method=ec,Gr.methodOf=oc,Gr.mixin=ic,Gr.negate=Wu,Gr.nthArg=function(t){return t=pa(t),Ze((function(n){return ze(n,t)}))},Gr.omit=Wa,Gr.omitBy=function(t,n){return Da(t,Wu(ii(n)))},Gr.once=function(t){return Au(2,t)},Gr.orderBy=function(t,n,r,e){return null==t?[]:(Nu(n)||(n=null==n?[]:[n]),Nu(r=e?o:r)||(r=null==r?[]:[r]),Fe(t,n,r))},Gr.over=ac,Gr.overArgs=Lu,Gr.overEvery=cc,Gr.overSome=fc,Gr.partial=Du,Gr.partialRight=Tu,Gr.partition=Su,Gr.pick=La,Gr.pickBy=Da,Gr.property=lc,Gr.propertyOf=function(t){return function(n){return null==t?o:me(t,n)}},Gr.pull=Vi,Gr.pullAll=Ji,Gr.pullAllBy=function(t,n,r){return t&&t.length&&n&&n.length?Ne(t,n,ii(r,2)):t},Gr.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?Ne(t,n,o,r):t},Gr.pullAt=Yi,Gr.range=sc,Gr.rangeRight=pc,Gr.rearg=Gu,Gr.reject=function(t,n){return(Nu(t)?In:he)(t,Wu(ii(n,3)))},Gr.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,o=[],i=t.length;for(n=ii(n,3);++e<i;){var u=t[e];n(u,e,t)&&(r.push(u),o.push(e))}return Be(t,o),r},Gr.rest=function(t,n){if("function"!=typeof t)throw new Et(i);return Ze(t,n=n===o?n:pa(n))},Gr.reverse=Qi,Gr.sampleSize=function(t,n,r){return n=(r?gi(t,n,r):n===o)?1:pa(n),(Nu(t)?Vr:Ke)(t,n)},Gr.set=function(t,n,r){return null==t?t:Ve(t,n,r)},Gr.setWith=function(t,n,r,e){return e="function"==typeof e?e:o,null==t?t:Ve(t,n,r,e)},Gr.shuffle=function(t){return(Nu(t)?Jr:Qe)(t)},Gr.slice=function(t,n,r){var e=null==t?0:t.length;return e?(r&&"number"!=typeof r&&gi(t,n,r)?(n=0,r=e):(n=null==n?0:pa(n),r=r===o?e:pa(r)),Xe(t,n,r)):[]},Gr.sortBy=ju,Gr.sortedUniq=function(t){return t&&t.length?eo(t):[]},Gr.sortedUniqBy=function(t,n){return t&&t.length?eo(t,ii(n,2)):[]},Gr.split=function(t,n,r){return r&&"number"!=typeof r&&gi(t,n,r)&&(n=r=o),(r=r===o?h:r>>>0)?(t=ga(t))&&("string"==typeof n||null!=n&&!ea(n))&&!(n=io(n))&&or(t)?bo(lr(t),0,r):t.split(n,r):[]},Gr.spread=function(t,n){if("function"!=typeof t)throw new Et(i);return n=null==n?0:yr(pa(n),0),Ze((function(r){var e=r[n],o=bo(r,0,n);return e&&Wn(o,e),On(t,this,o)}))},Gr.tail=function(t){var n=null==t?0:t.length;return n?Xe(t,1,n):[]},Gr.take=function(t,n,r){return t&&t.length?Xe(t,0,(n=r||n===o?1:pa(n))<0?0:n):[]},Gr.takeRight=function(t,n,r){var e=null==t?0:t.length;return e?Xe(t,(n=e-(n=r||n===o?1:pa(n)))<0?0:n,e):[]},Gr.takeRightWhile=function(t,n){return t&&t.length?fo(t,ii(n,3),!1,!0):[]},Gr.takeWhile=function(t,n){return t&&t.length?fo(t,ii(n,3)):[]},Gr.tap=function(t,n){return n(t),t},Gr.throttle=function(t,n,r){var e=!0,o=!0;if("function"!=typeof t)throw new Et(i);return Qu(r)&&(e="leading"in r?!!r.leading:e,o="trailing"in r?!!r.trailing:o),Iu(t,n,{leading:e,maxWait:n,trailing:o})},Gr.thru=su,Gr.toArray=la,Gr.toPairs=Ta,Gr.toPairsIn=Ga,Gr.toPath=function(t){return Nu(t)?Rn(t,Di):ua(t)?[t]:Ao(Li(ga(t)))},Gr.toPlainObject=ya,Gr.transform=function(t,n,r){var e=Nu(t),o=e||Zu(t)||aa(t);if(n=ii(n,4),null==r){var i=t&&t.constructor;r=o?e?new i:[]:Qu(t)&&Vu(i)?Mr(Ut(t)):{}}return(o?An:de)(t,(function(t,e,o){return n(r,t,e,o)})),r},Gr.unary=function(t){return xu(t,1)},Gr.union=Xi,Gr.unionBy=tu,Gr.unionWith=nu,Gr.uniq=function(t){return t&&t.length?uo(t):[]},Gr.uniqBy=function(t,n){return t&&t.length?uo(t,ii(n,2)):[]},Gr.uniqWith=function(t,n){return n="function"==typeof n?n:o,t&&t.length?uo(t,o,n):[]},Gr.unset=function(t,n){return null==t||ao(t,n)},Gr.unzip=ru,Gr.unzipWith=eu,Gr.update=function(t,n,r){return null==t?t:co(t,n,vo(r))},Gr.updateWith=function(t,n,r,e){return e="function"==typeof e?e:o,null==t?t:co(t,n,vo(r),e)},Gr.values=Ma,Gr.valuesIn=function(t){return null==t?[]:Yn(t,ka(t))},Gr.without=ou,Gr.words=Va,Gr.wrap=function(t,n){return Du(vo(n),t)},Gr.xor=iu,Gr.xorBy=uu,Gr.xorWith=au,Gr.zip=cu,Gr.zipObject=function(t,n){return po(t||[],n||[],Qr)},Gr.zipObjectDeep=function(t,n){return po(t||[],n||[],Ve)},Gr.zipWith=fu,Gr.entries=Ta,Gr.entriesIn=Ga,Gr.extend=ba,Gr.extendWith=_a,ic(Gr,Gr),Gr.add=gc,Gr.attempt=Ja,Gr.camelCase=za,Gr.capitalize=Fa,Gr.ceil=dc,Gr.clamp=function(t,n,r){return r===o&&(r=n,n=o),r!==o&&(r=(r=va(r))==r?r:0),n!==o&&(n=(n=va(n))==n?n:0),oe(va(t),n,r)},Gr.clone=function(t){return ie(t,4)},Gr.cloneDeep=function(t){return ie(t,5)},Gr.cloneDeepWith=function(t,n){return ie(t,5,n="function"==typeof n?n:o)},Gr.cloneWith=function(t,n){return ie(t,4,n="function"==typeof n?n:o)},Gr.conformsTo=function(t,n){return null==n||ue(t,n,Ia(n))},Gr.deburr=$a,Gr.defaultTo=function(t,n){return null==t||t!=t?n:t},Gr.divide=bc,Gr.endsWith=function(t,n,r){t=ga(t),n=io(n);var e=t.length,i=r=r===o?e:oe(pa(r),0,e);return(r-=n.length)>=0&&t.slice(r,i)==n},Gr.eq=Mu,Gr.escape=function(t){return(t=ga(t))&&K.test(t)?t.replace(Z,rr):t},Gr.escapeRegExp=function(t){return(t=ga(t))&&rt.test(t)?t.replace(nt,"\\$&"):t},Gr.every=function(t,n,r){var e=Nu(t)?Pn:se;return r&&gi(t,n,r)&&(n=o),e(t,ii(n,3))},Gr.find=vu,Gr.findIndex=$i,Gr.findKey=function(t,n){return Mn(t,ii(n,3),de)},Gr.findLast=yu,Gr.findLastIndex=Ni,Gr.findLastKey=function(t,n){return Mn(t,ii(n,3),be)},Gr.floor=_c,Gr.forEach=gu,Gr.forEachRight=du,Gr.forIn=function(t,n){return null==t?t:ye(t,ii(n,3),ka)},Gr.forInRight=function(t,n){return null==t?t:ge(t,ii(n,3),ka)},Gr.forOwn=function(t,n){return t&&de(t,ii(n,3))},Gr.forOwnRight=function(t,n){return t&&be(t,ii(n,3))},Gr.get=Oa,Gr.gt=zu,Gr.gte=Fu,Gr.has=function(t,n){return null!=t&&pi(t,n,Oe)},Gr.hasIn=xa,Gr.head=Ui,Gr.identity=nc,Gr.includes=function(t,n,r,e){t=Uu(t)?t:Ma(t),r=r&&!e?pa(r):0;var o=t.length;return r<0&&(r=yr(o+r,0)),ia(t)?r<=o&&t.indexOf(n,r)>-1:!!o&&Fn(t,n,r)>-1},Gr.indexOf=function(t,n,r){var e=null==t?0:t.length;if(!e)return-1;var o=null==r?0:pa(r);return o<0&&(o=yr(e+o,0)),Fn(t,n,o)},Gr.inRange=function(t,n,r){return n=sa(n),r===o?(r=n,n=0):r=sa(r),function(t,n,r){return t>=gr(n,r)&&t<yr(n,r)}(t=va(t),n,r)},Gr.invoke=Pa,Gr.isArguments=$u,Gr.isArray=Nu,Gr.isArrayBuffer=Bu,Gr.isArrayLike=Uu,Gr.isArrayLikeObject=qu,Gr.isBoolean=function(t){return!0===t||!1===t||Xu(t)&&Se(t)==d},Gr.isBuffer=Zu,Gr.isDate=Hu,Gr.isElement=function(t){return Xu(t)&&1===t.nodeType&&!ra(t)},Gr.isEmpty=function(t){if(null==t)return!0;if(Uu(t)&&(Nu(t)||"string"==typeof t||"function"==typeof t.splice||Zu(t)||aa(t)||$u(t)))return!t.length;var n=si(t);if(n==S||n==E)return!t.size;if(mi(t))return!We(t).length;for(var r in t)if(Wt.call(t,r))return!1;return!0},Gr.isEqual=function(t,n){return Ie(t,n)},Gr.isEqualWith=function(t,n,r){var e=(r="function"==typeof r?r:o)?r(t,n):o;return e===o?Ie(t,n,o,r):!!e},Gr.isError=Ku,Gr.isFinite=function(t){return"number"==typeof t&&Gn(t)},Gr.isFunction=Vu,Gr.isInteger=Ju,Gr.isLength=Yu,Gr.isMap=ta,Gr.isMatch=function(t,n){return t===n||ke(t,n,ai(n))},Gr.isMatchWith=function(t,n,r){return r="function"==typeof r?r:o,ke(t,n,ai(n),r)},Gr.isNaN=function(t){return na(t)&&t!=+t},Gr.isNative=function(t){if(_i(t))throw new wt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ce(t)},Gr.isNil=function(t){return null==t},Gr.isNull=function(t){return null===t},Gr.isNumber=na,Gr.isObject=Qu,Gr.isObjectLike=Xu,Gr.isPlainObject=ra,Gr.isRegExp=ea,Gr.isSafeInteger=function(t){return Ju(t)&&t>=-9007199254740991&&t<=s},Gr.isSet=oa,Gr.isString=ia,Gr.isSymbol=ua,Gr.isTypedArray=aa,Gr.isUndefined=function(t){return t===o},Gr.isWeakMap=function(t){return Xu(t)&&si(t)==k},Gr.isWeakSet=function(t){return Xu(t)&&"[object WeakSet]"==Se(t)},Gr.join=function(t,n){return null==t?"":qn.call(t,n)},Gr.kebabCase=Na,Gr.last=Ki,Gr.lastIndexOf=function(t,n,r){var e=null==t?0:t.length;if(!e)return-1;var i=e;return r!==o&&(i=(i=pa(r))<0?yr(e+i,0):gr(i,e-1)),n==n?function(t,n,r){for(var e=r+1;e--;)if(t[e]===n)return e;return e}(t,n,i):zn(t,Nn,i,!0)},Gr.lowerCase=Ba,Gr.lowerFirst=Ua,Gr.lt=ca,Gr.lte=fa,Gr.max=function(t){return t&&t.length?pe(t,nc,je):o},Gr.maxBy=function(t,n){return t&&t.length?pe(t,ii(n,2),je):o},Gr.mean=function(t){return Bn(t,nc)},Gr.meanBy=function(t,n){return Bn(t,ii(n,2))},Gr.min=function(t){return t&&t.length?pe(t,nc,Le):o},Gr.minBy=function(t,n){return t&&t.length?pe(t,ii(n,2),Le):o},Gr.stubArray=hc,Gr.stubFalse=vc,Gr.stubObject=function(){return{}},Gr.stubString=function(){return""},Gr.stubTrue=function(){return!0},Gr.multiply=mc,Gr.nth=function(t,n){return t&&t.length?ze(t,pa(n)):o},Gr.noConflict=function(){return pn._===this&&(pn._=Mt),this},Gr.noop=uc,Gr.now=Ou,Gr.pad=function(t,n,r){t=ga(t);var e=(n=pa(n))?fr(t):0;if(!n||e>=n)return t;var o=(n-e)/2;return $o(vn(o),r)+t+$o(hn(o),r)},Gr.padEnd=function(t,n,r){t=ga(t);var e=(n=pa(n))?fr(t):0;return n&&e<n?t+$o(n-e,r):t},Gr.padStart=function(t,n,r){t=ga(t);var e=(n=pa(n))?fr(t):0;return n&&e<n?$o(n-e,r)+t:t},Gr.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),br(ga(t).replace(et,""),n||0)},Gr.random=function(t,n,r){if(r&&"boolean"!=typeof r&&gi(t,n,r)&&(n=r=o),r===o&&("boolean"==typeof n?(r=n,n=o):"boolean"==typeof t&&(r=t,t=o)),t===o&&n===o?(t=0,n=1):(t=sa(t),n===o?(n=t,t=0):n=sa(n)),t>n){var e=t;t=n,n=e}if(r||t%1||n%1){var i=_r();return gr(t+i*(n-t+cn("1e-"+((i+"").length-1))),n)}return Ue(t,n)},Gr.reduce=function(t,n,r){var e=Nu(t)?Ln:Zn,o=arguments.length<3;return e(t,ii(n,4),r,o,fe)},Gr.reduceRight=function(t,n,r){var e=Nu(t)?Dn:Zn,o=arguments.length<3;return e(t,ii(n,4),r,o,le)},Gr.repeat=function(t,n,r){return n=(r?gi(t,n,r):n===o)?1:pa(n),qe(ga(t),n)},Gr.replace=function(){var t=arguments,n=ga(t[0]);return t.length<3?n:n.replace(t[1],t[2])},Gr.result=function(t,n,r){var e=-1,i=(n=yo(n,t)).length;for(i||(i=1,t=o);++e<i;){var u=null==t?o:t[Di(n[e])];u===o&&(e=i,u=r),t=Vu(u)?u.call(t):u}return t},Gr.round=wc,Gr.runInContext=t,Gr.sample=function(t){return(Nu(t)?Kr:He)(t)},Gr.size=function(t){if(null==t)return 0;if(Uu(t))return ia(t)?fr(t):t.length;var n=si(t);return n==S||n==E?t.size:We(t).length},Gr.snakeCase=qa,Gr.some=function(t,n,r){var e=Nu(t)?Tn:to;return r&&gi(t,n,r)&&(n=o),e(t,ii(n,3))},Gr.sortedIndex=function(t,n){return no(t,n)},Gr.sortedIndexBy=function(t,n,r){return ro(t,n,ii(r,2))},Gr.sortedIndexOf=function(t,n){var r=null==t?0:t.length;if(r){var e=no(t,n);if(e<r&&Mu(t[e],n))return e}return-1},Gr.sortedLastIndex=function(t,n){return no(t,n,!0)},Gr.sortedLastIndexBy=function(t,n,r){return ro(t,n,ii(r,2),!0)},Gr.sortedLastIndexOf=function(t,n){if(null!=t&&t.length){var r=no(t,n,!0)-1;if(Mu(t[r],n))return r}return-1},Gr.startCase=Za,Gr.startsWith=function(t,n,r){return t=ga(t),r=null==r?0:oe(pa(r),0,t.length),n=io(n),t.slice(r,r+n.length)==n},Gr.subtract=Sc,Gr.sum=function(t){return t&&t.length?Hn(t,nc):0},Gr.sumBy=function(t,n){return t&&t.length?Hn(t,ii(n,2)):0},Gr.template=function(t,n,r){var e=Gr.templateSettings;r&&gi(t,n,r)&&(n=o),t=ga(t),n=_a({},n,e,Vo);var i,u,a=_a({},n.imports,e.imports,Vo),c=Ia(a),f=Yn(a,c),l=0,s=n.interpolate||_t,p="__p += '",h=xt((n.escape||_t).source+"|"+s.source+"|"+(s===Y?st:_t).source+"|"+(n.evaluate||_t).source+"|$","g"),v="//# sourceURL="+(Wt.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++en+"]")+"\n";t.replace(h,(function(n,r,e,o,a,c){return e||(e=o),p+=t.slice(l,c).replace(mt,er),r&&(i=!0,p+="' +\n__e("+r+") +\n'"),a&&(u=!0,p+="';\n"+a+";\n__p += '"),e&&(p+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),l=c+n.length,n})),p+="';\n";var y=Wt.call(n,"variable")&&n.variable;if(y){if(ft.test(y))throw new wt("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(u?p.replace(N,""):p).replace(B,"$1").replace(U,"$1;"),p="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Ja((function(){return St(c,v+"return "+p).apply(o,f)}));if(g.source=p,Ku(g))throw g;return g},Gr.times=function(t,n){if((t=pa(t))<1||t>s)return[];var r=h,e=gr(t,h);n=ii(n),t-=h;for(var o=Kn(e,n);++r<t;)n(r);return o},Gr.toFinite=sa,Gr.toInteger=pa,Gr.toLength=ha,Gr.toLower=function(t){return ga(t).toLowerCase()},Gr.toNumber=va,Gr.toSafeInteger=function(t){return t?oe(pa(t),-9007199254740991,s):0===t?t:0},Gr.toString=ga,Gr.toUpper=function(t){return ga(t).toUpperCase()},Gr.trim=function(t,n,r){if((t=ga(t))&&(r||n===o))return Vn(t);if(!t||!(n=io(n)))return t;var e=lr(t),i=lr(n);return bo(e,Xn(e,i),tr(e,i)+1).join("")},Gr.trimEnd=function(t,n,r){if((t=ga(t))&&(r||n===o))return t.slice(0,sr(t)+1);if(!t||!(n=io(n)))return t;var e=lr(t);return bo(e,0,tr(e,lr(n))+1).join("")},Gr.trimStart=function(t,n,r){if((t=ga(t))&&(r||n===o))return t.replace(et,"");if(!t||!(n=io(n)))return t;var e=lr(t);return bo(e,Xn(e,lr(n))).join("")},Gr.truncate=function(t,n){var r=30,e="...";if(Qu(n)){var i="separator"in n?n.separator:i;r="length"in n?pa(n.length):r,e="omission"in n?io(n.omission):e}var u=(t=ga(t)).length;if(or(t)){var a=lr(t);u=a.length}if(r>=u)return t;var c=r-fr(e);if(c<1)return e;var f=a?bo(a,0,c).join(""):t.slice(0,c);if(i===o)return f+e;if(a&&(c+=f.length-c),ea(i)){if(t.slice(c).search(i)){var l,s=f;for(i.global||(i=xt(i.source,ga(pt.exec(i))+"g")),i.lastIndex=0;l=i.exec(s);)var p=l.index;f=f.slice(0,p===o?c:p)}}else if(t.indexOf(io(i),c)!=c){var h=f.lastIndexOf(i);h>-1&&(f=f.slice(0,h))}return f+e},Gr.unescape=function(t){return(t=ga(t))&&H.test(t)?t.replace(q,pr):t},Gr.uniqueId=function(t){var n=++Lt;return ga(t)+n},Gr.upperCase=Ha,Gr.upperFirst=Ka,Gr.each=gu,Gr.eachRight=du,Gr.first=Ui,ic(Gr,(yc={},de(Gr,(function(t,n){Wt.call(Gr.prototype,n)||(yc[n]=t)})),yc),{chain:!1}),Gr.VERSION="4.17.21",An(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Gr[t].placeholder=Gr})),An(["drop","take"],(function(t,n){$r.prototype[t]=function(r){r=r===o?1:yr(pa(r),0);var e=this.__filtered__&&!n?new $r(this):this.clone();return e.__filtered__?e.__takeCount__=gr(r,e.__takeCount__):e.__views__.push({size:gr(r,h),type:t+(e.__dir__<0?"Right":"")}),e},$r.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}})),An(["filter","map","takeWhile"],(function(t,n){var r=n+1,e=1==r||3==r;$r.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:ii(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}})),An(["head","last"],(function(t,n){var r="take"+(n?"Right":"");$r.prototype[t]=function(){return this[r](1).value()[0]}})),An(["initial","tail"],(function(t,n){var r="drop"+(n?"":"Right");$r.prototype[t]=function(){return this.__filtered__?new $r(this):this[r](1)}})),$r.prototype.compact=function(){return this.filter(nc)},$r.prototype.find=function(t){return this.filter(t).head()},$r.prototype.findLast=function(t){return this.reverse().find(t)},$r.prototype.invokeMap=Ze((function(t,n){return"function"==typeof t?new $r(this):this.map((function(r){return Ee(r,t,n)}))})),$r.prototype.reject=function(t){return this.filter(Wu(ii(t)))},$r.prototype.slice=function(t,n){t=pa(t);var r=this;return r.__filtered__&&(t>0||n<0)?new $r(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==o&&(r=(n=pa(n))<0?r.dropRight(-n):r.take(n-t)),r)},$r.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},$r.prototype.toArray=function(){return this.take(h)},de($r.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),i=Gr[e?"take"+("last"==n?"Right":""):n],u=e||/^find/.test(n);i&&(Gr.prototype[n]=function(){var n=this.__wrapped__,a=e?[1]:arguments,c=n instanceof $r,f=a[0],l=c||Nu(n),s=function(t){var n=i.apply(Gr,Wn([t],a));return e&&p?n[0]:n};l&&r&&"function"==typeof f&&1!=f.length&&(c=l=!1);var p=this.__chain__,h=!!this.__actions__.length,v=u&&!p,y=c&&!h;if(!u&&l){n=y?n:new $r(this);var g=t.apply(n,a);return g.__actions__.push({func:su,args:[s],thisArg:o}),new Fr(g,p)}return v&&y?t.apply(this,a):(g=this.thru(s),v?e?g.value()[0]:g.value():g)})})),An(["pop","push","shift","sort","splice","unshift"],(function(t){var n=Pt[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);Gr.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var o=this.value();return n.apply(Nu(o)?o:[],t)}return this[r]((function(r){return n.apply(Nu(r)?r:[],t)}))}})),de($r.prototype,(function(t,n){var r=Gr[n];if(r){var e=r.name+"";Wt.call(Pr,e)||(Pr[e]=[]),Pr[e].push({name:n,func:r})}})),Pr[Go(o,2).name]=[{name:"wrapper",func:o}],$r.prototype.clone=function(){var t=new $r(this.__wrapped__);return t.__actions__=Ao(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ao(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ao(this.__views__),t},$r.prototype.reverse=function(){if(this.__filtered__){var t=new $r(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},$r.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,r=Nu(t),e=n<0,o=r?t.length:0,i=function(t,n,r){for(var e=-1,o=r.length;++e<o;){var i=r[e],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":n-=u;break;case"take":n=gr(n,t+u);break;case"takeRight":t=yr(t,n-u)}}return{start:t,end:n}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,f=e?a:u-1,l=this.__iteratees__,s=l.length,p=0,h=gr(c,this.__takeCount__);if(!r||!e&&o==c&&h==c)return lo(t,this.__actions__);var v=[];t:for(;c--&&p<h;){for(var y=-1,g=t[f+=n];++y<s;){var d=l[y],b=d.iteratee,_=d.type,m=b(g);if(2==_)g=m;else if(!m){if(1==_)continue t;break t}}v[p++]=g}return v},Gr.prototype.at=pu,Gr.prototype.chain=function(){return lu(this)},Gr.prototype.commit=function(){return new Fr(this.value(),this.__chain__)},Gr.prototype.next=function(){this.__values__===o&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},Gr.prototype.plant=function(t){for(var n,r=this;r instanceof zr;){var e=Gi(r);e.__index__=0,e.__values__=o,n?i.__wrapped__=e:n=e;var i=e;r=r.__wrapped__}return i.__wrapped__=t,n},Gr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof $r){var n=t;return this.__actions__.length&&(n=new $r(this)),(n=n.reverse()).__actions__.push({func:su,args:[Qi],thisArg:o}),new Fr(n,this.__chain__)}return this.thru(Qi)},Gr.prototype.toJSON=Gr.prototype.valueOf=Gr.prototype.value=function(){return lo(this.__wrapped__,this.__actions__)},Gr.prototype.first=Gr.prototype.head,Vt&&(Gr.prototype[Vt]=function(){return this}),Gr}();pn._=hr,(e=function(){return hr}.call(n,r,n,t))===o||(t.exports=e)}.call(this)},156:n=>{"use strict";n.exports=t}},r={};function e(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={id:t,loaded:!1,exports:{}};return n[t].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}return e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),e(991)})(),t.exports=e(r(156))},156:n=>{"use strict";n.exports=t}},r={};function e(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return n[t].call(i.exports,i,i.exports,e),i.exports}var o={};return(()=>{"use strict";var t=o;Object.defineProperty(t,"__esModule",{value:!0}),t.setLocalStorageItem=t.getLocalStorageItem=t.createCustomGlobalStateWithDecoupledFuncs=t.createGlobalState=t.createGlobalStateWithDecoupledFuncs=t.GlobalStoreAbstract=t.GlobalStore=t.combineAsyncGetters=t.combineAsyncGettersEmitter=t.debounce=t.shallowCompare=t.createDerivateEmitter=t.createDerivate=t.throwNoSubscribersWereAdded=t.formatToStore=t.formatFromStore=t.isPrimitive=t.isFunction=t.isRegex=t.isDate=t.isString=t.isBoolean=t.isNumber=t.isNil=t.clone=void 0;var n=e(734);Object.defineProperty(t,"clone",{enumerable:!0,get:function(){return n.clone}}),Object.defineProperty(t,"isNil",{enumerable:!0,get:function(){return n.isNil}}),Object.defineProperty(t,"isNumber",{enumerable:!0,get:function(){return n.isNumber}}),Object.defineProperty(t,"isBoolean",{enumerable:!0,get:function(){return n.isBoolean}}),Object.defineProperty(t,"isString",{enumerable:!0,get:function(){return n.isString}}),Object.defineProperty(t,"isDate",{enumerable:!0,get:function(){return n.isDate}}),Object.defineProperty(t,"isRegex",{enumerable:!0,get:function(){return n.isRegex}}),Object.defineProperty(t,"isFunction",{enumerable:!0,get:function(){return n.isFunction}}),Object.defineProperty(t,"isPrimitive",{enumerable:!0,get:function(){return n.isPrimitive}}),Object.defineProperty(t,"formatFromStore",{enumerable:!0,get:function(){return n.formatFromStore}}),Object.defineProperty(t,"formatToStore",{enumerable:!0,get:function(){return n.formatToStore}}),Object.defineProperty(t,"throwNoSubscribersWereAdded",{enumerable:!0,get:function(){return n.throwNoSubscribersWereAdded}}),Object.defineProperty(t,"createDerivate",{enumerable:!0,get:function(){return n.createDerivate}}),Object.defineProperty(t,"createDerivateEmitter",{enumerable:!0,get:function(){return n.createDerivateEmitter}}),Object.defineProperty(t,"shallowCompare",{enumerable:!0,get:function(){return n.shallowCompare}}),Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return n.debounce}}),Object.defineProperty(t,"combineAsyncGettersEmitter",{enumerable:!0,get:function(){return n.combineAsyncGettersEmitter}}),Object.defineProperty(t,"combineAsyncGetters",{enumerable:!0,get:function(){return n.combineAsyncGetters}});var r=e(774);Object.defineProperty(t,"GlobalStore",{enumerable:!0,get:function(){return r.GlobalStore}});var i=e(195);Object.defineProperty(t,"GlobalStoreAbstract",{enumerable:!0,get:function(){return i.GlobalStoreAbstract}});var u=e(853);Object.defineProperty(t,"createGlobalStateWithDecoupledFuncs",{enumerable:!0,get:function(){return u.createGlobalStateWithDecoupledFuncs}}),Object.defineProperty(t,"createGlobalState",{enumerable:!0,get:function(){return u.createGlobalState}}),Object.defineProperty(t,"createCustomGlobalStateWithDecoupledFuncs",{enumerable:!0,get:function(){return u.createCustomGlobalStateWithDecoupledFuncs}});var a=e(608);Object.defineProperty(t,"getLocalStorageItem",{enumerable:!0,get:function(){return a.getLocalStorageItem}}),Object.defineProperty(t,"setLocalStorageItem",{enumerable:!0,get:function(){return a.setLocalStorageItem}})})(),o})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports["react-global-state-hooks"]=e(require("react")):t["react-global-state-hooks"]=e(t.react)}(this,(t=>{return e={113:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createStatefulContext=void 0;var n,o=r(853),i=r(684),a=(n=r(156))&&n.__esModule?n:{default:n};e.createStatefulContext=function(t,e){var r=a.default.createContext(null);return[function(){return a.default.useContext(r)},function(n){var u=n.children,c=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(n,["children"]),l=(0,o.createGlobalStateWithDecoupledFuncs)(function(){if(c.initialValue){if("function"==typeof c.initialValue)return c.initialValue((0,i.clone)(t));var e=Array.isArray(c.initialValue),r=c.initialValue instanceof Map,n=c.initialValue instanceof Set;return(0,i.isPrimitive)(c.initialValue)||(0,i.isDate)(c.initialValue)||e||r||n?c.initialValue:Object.assign(Object.assign({},t),c.initialValue)}return(0,i.clone)(t)}(),e);return a.default.createElement(r.Provider,{value:l},u)}]}},853:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var i=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.createCustomGlobalStateWithDecoupledFuncs=e.createGlobalState=e.createGlobalStateWithDecoupledFuncs=void 0;var a=r(774);e.createGlobalStateWithDecoupledFuncs=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.actions,o=i(e,["actions"]),u=new a.GlobalStore(t,o,r),c=n(u.getHookDecoupled(),2),l=c[0],f=c[1];return[u.getHook(),l,f]},e.createGlobalState=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n((0,e.createGlobalStateWithDecoupledFuncs)(t,r),3),i=o[0],a=o[1],u=o[2];return i.stateControls=function(){return[a,u]},i},e.createCustomGlobalStateWithDecoupledFuncs=function(t){var r=t.onInitialize,n=t.onChange;return function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{config:null},a=o.config,u=o.onInit,c=o.onStateChanged,l=i(o,["config","onInit","onStateChanged"]);return(0,e.createGlobalStateWithDecoupledFuncs)(t,Object.assign({onInit:function(t){r(t,a),null==u||u(t)},onStateChanged:function(t){n(t,a),null==c||c(t)}},l))}}},774:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function i(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalStore=void 0;var u=r(608),c=r(734),l=function(){return!!(null===globalThis||void 0===globalThis?void 0:globalThis.localStorage)},f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(f,t);var e,r,n,c=(r=f,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=a(r);if(n){var o=a(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return i(this,t)});function f(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),(e=c.call(this,t,r,n)).onInitialize=function(t){var r,n,o=t.setState,i=t.getState;if(l()&&(null===(n=null===(r=e.config)||void 0===r?void 0:r.localStorage)||void 0===n?void 0:n.key)){var a=(0,u.getLocalStorageItem)({config:e.config});if(null!==a)o(a);else{var c=i();(0,u.setLocalStorageItem)({item:c,config:e.config})}}},e.onChange=function(t){var r=t.getState;l()&&(0,u.setLocalStorageItem)({item:r(),config:e.config})},e.constructor!==f?i(e):(e.initialize(),e)}return e=f,Object.defineProperty(e,"prototype",{writable:!1}),e}(c.GlobalStoreAbstract);e.GlobalStore=f},608:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLocalStorageItem=e.getLocalStorageItem=void 0;var n=r(734);e.getLocalStorageItem=function(t){var e,r=t.config,o=null===(e=null==r?void 0:r.localStorage)||void 0===e?void 0:e.key;if(!o)return null;var i=localStorage.getItem(o);if(null===i)return null;var a=function(){var t,e=null!==(t=null==r?void 0:r.localStorage)&&void 0!==t?t:{},n=e.decrypt,o=e.encrypt;return n||o?"function"==typeof n?n(i):atob(i):i}();return(0,n.formatFromStore)(a,{jsonParse:!0})},e.setLocalStorageItem=function(t){var e,r=t.item,o=t.config,i=null===(e=null==o?void 0:o.localStorage)||void 0===e?void 0:e.key;if(!i)return null;var a=(0,n.formatToStore)(r,{stringify:!0,excludeTypes:["function"]}),u=function(){var t,e=(null!==(t=null==o?void 0:o.localStorage)&&void 0!==t?t:{}).encrypt;return e?"function"==typeof e?e(a):btoa(a):a}();localStorage.setItem(i,u)}},195:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalStoreAbstract=void 0;var a=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(c,t);var e,r,a,u=(r=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=i(r);if(a){var o=i(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(e=u.call(this,t,r,n)).onInit=function(t){e.onInitialize(t)},e.onStateChanged=function(t){e.onChange(t)},e}return e=c,Object.defineProperty(e,"prototype",{writable:!1}),e}(r(774).GlobalStore);e.GlobalStoreAbstract=a},991:(t,e,r)=>{"use strict";var n=Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]};Object.defineProperty(e,"__esModule",{value:!0}),e.setLocalStorageItem=e.getLocalStorageItem=e.createCustomGlobalStateWithDecoupledFuncs=e.createGlobalState=e.createGlobalStateWithDecoupledFuncs=e.GlobalStoreAbstract=e.GlobalStore=e.combineRetrieverAsynchronously=e.combineAsyncGetters=e.combineRetrieverEmitterAsynchronously=e.combineAsyncGettersEmitter=e.debounce=e.shallowCompare=e.createDerivateEmitter=e.createDerivate=e.throwNoSubscribersWereAdded=e.formatToStore=e.formatFromStore=e.isPrimitive=e.isFunction=e.isRegex=e.isDate=e.isString=e.isBoolean=e.isNumber=e.isNil=e.clone=void 0;var o=r(734);Object.defineProperty(e,"clone",{enumerable:!0,get:function(){return o.clone}}),Object.defineProperty(e,"isNil",{enumerable:!0,get:function(){return o.isNil}}),Object.defineProperty(e,"isNumber",{enumerable:!0,get:function(){return o.isNumber}}),Object.defineProperty(e,"isBoolean",{enumerable:!0,get:function(){return o.isBoolean}}),Object.defineProperty(e,"isString",{enumerable:!0,get:function(){return o.isString}}),Object.defineProperty(e,"isDate",{enumerable:!0,get:function(){return o.isDate}}),Object.defineProperty(e,"isRegex",{enumerable:!0,get:function(){return o.isRegex}}),Object.defineProperty(e,"isFunction",{enumerable:!0,get:function(){return o.isFunction}}),Object.defineProperty(e,"isPrimitive",{enumerable:!0,get:function(){return o.isPrimitive}}),Object.defineProperty(e,"formatFromStore",{enumerable:!0,get:function(){return o.formatFromStore}}),Object.defineProperty(e,"formatToStore",{enumerable:!0,get:function(){return o.formatToStore}}),Object.defineProperty(e,"throwNoSubscribersWereAdded",{enumerable:!0,get:function(){return o.throwNoSubscribersWereAdded}}),Object.defineProperty(e,"createDerivate",{enumerable:!0,get:function(){return o.createDerivate}}),Object.defineProperty(e,"createDerivateEmitter",{enumerable:!0,get:function(){return o.createDerivateEmitter}}),Object.defineProperty(e,"shallowCompare",{enumerable:!0,get:function(){return o.shallowCompare}}),Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return o.debounce}}),Object.defineProperty(e,"combineAsyncGettersEmitter",{enumerable:!0,get:function(){return o.combineAsyncGettersEmitter}}),Object.defineProperty(e,"combineRetrieverEmitterAsynchronously",{enumerable:!0,get:function(){return o.combineRetrieverEmitterAsynchronously}}),Object.defineProperty(e,"combineAsyncGetters",{enumerable:!0,get:function(){return o.combineAsyncGetters}}),Object.defineProperty(e,"combineRetrieverAsynchronously",{enumerable:!0,get:function(){return o.combineRetrieverAsynchronously}});var i=r(774);Object.defineProperty(e,"GlobalStore",{enumerable:!0,get:function(){return i.GlobalStore}});var a=r(195);Object.defineProperty(e,"GlobalStoreAbstract",{enumerable:!0,get:function(){return a.GlobalStoreAbstract}});var u=r(853);Object.defineProperty(e,"createGlobalStateWithDecoupledFuncs",{enumerable:!0,get:function(){return u.createGlobalStateWithDecoupledFuncs}}),Object.defineProperty(e,"createGlobalState",{enumerable:!0,get:function(){return u.createGlobalState}}),Object.defineProperty(e,"createCustomGlobalStateWithDecoupledFuncs",{enumerable:!0,get:function(){return u.createCustomGlobalStateWithDecoupledFuncs}});var c=r(608);Object.defineProperty(e,"getLocalStorageItem",{enumerable:!0,get:function(){return c.getLocalStorageItem}}),Object.defineProperty(e,"setLocalStorageItem",{enumerable:!0,get:function(){return c.setLocalStorageItem}}),function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)}(r(113),e)},684:function(t){t.exports=(()=>{"use strict";var t={991:(t,e,r)=>{var n=Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]};Object.defineProperty(e,"__esModule",{value:!0}),function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)}(r(729),e)},729:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===r(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.formatToStore=e.formatFromStore=e.isPrimitive=e.isFunction=e.isRegex=e.isDate=e.isString=e.isBoolean=e.isNumber=e.isNil=e.clone=void 0,e.clone=function(t){var r,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shallow;if((0,e.isPrimitive)(t)||(0,e.isDate)(t))return t;if(Array.isArray(t))return a?function(t){if(Array.isArray(t))return i(t)}(r=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||o(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}():t.map((function(t){return(0,e.clone)(t)}));if(t instanceof Map){var u=Array.from(t.entries());return a?new Map(u):new Map(u.map((function(t){return(0,e.clone)(t)})))}if(t instanceof Set){var c=Array.from(t.values());return a?new Set(c):new Set(c.map((function(t){return(0,e.clone)(t)})))}return t instanceof RegExp?new RegExp(t.toString()):(0,e.isFunction)(t)?a?t:Object.create(t):a?Object.assign({},t):t instanceof Error?new Error(t.message):Object.keys(t).reduce((function(r,o){var i=t[o];return Object.assign(Object.assign({},r),n({},o,(0,e.clone)(i)))}),{})},e.isNil=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isBoolean=function(t){return"boolean"==typeof t},e.isString=function(t){return"string"==typeof t},e.isDate=function(t){return t instanceof Date},e.isRegex=function(t){return t instanceof RegExp},e.isFunction=function(t){return"function"==typeof t||t instanceof Function},e.isPrimitive=function(t){return(0,e.isNil)(t)||(0,e.isNumber)(t)||(0,e.isBoolean)(t)||(0,e.isString)(t)||"symbol"===r(t)},e.formatFromStore=function(t){return function(t){var r,i;if((0,e.isPrimitive)(t))return t;if("date"===(null==t?void 0:t.$t))return new Date(t.$v);if("map"===(null==t?void 0:t.$t)){var a=(null!==(r=t.$v)&&void 0!==r?r:[]).map((function(t){var r,n=(2,function(t){if(Array.isArray(t))return t}(r=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{for(i=(r=r.call(t)).next,0;!(c=(n=i.call(r)).done)&&(u.push(n.value),2!==u.length);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r)||o(r,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=n[0],a=n[1];return[i,(0,e.formatFromStore)(a)]}));return new Map(a)}if("set"===(null==t?void 0:t.$t)){var u=null!==(i=t.$v)&&void 0!==i?i:[].map((function(t){return(0,e.formatFromStore)(t)}));return new Set(u)}return"regex"===(null==t?void 0:t.$t)?new RegExp(t.$v):"error"===(null==t?void 0:t.$t)?new Error(t.$v):Array.isArray(t)?t.map((function(t){return(0,e.formatFromStore)(t)})):"function"===(null==t?void 0:t.$t)?Function("(".concat(t.$v,")(...arguments)")):Object.keys(t).reduce((function(r,o){var i=t[o];return Object.assign(Object.assign({},r),n({},o,(0,e.formatFromStore)(i)))}),{})}((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).jsonParse?JSON.parse(t):(0,e.clone)(t))},e.formatToStore=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{stringify:!1},i=o.stringify,a=o.validator,u=o.excludeTypes,c=o.excludeKeys,l=new Set(null!=u?u:[]),f=new Set(null!=c?c:[]),s=l.size||f.size,p=null!=a?a:function(t){var e=t.key,n=t.value;if(!s)return!0;var o=f.has(e),i=l.has(r(n));return!o&&!i},y=function t(r){if((0,e.isPrimitive)(r))return r;if(Array.isArray(r))return r.map((function(e){return t(e)}));if(r instanceof Map)return{$t:"map",$v:Array.from(r.entries()).map((function(e){return t(e)}))};if(r instanceof Set)return{$t:"set",$v:Array.from(r.values()).map((function(e){return t(e)}))};if((0,e.isDate)(r))return{$t:"date",$v:r.toISOString()};if((0,e.isRegex)(r))return{$t:"regex",$v:r.toString()};if((0,e.isFunction)(r)){var o;try{o={$t:"function",$v:r.toString()}}catch(t){o={$t:"error",$v:"Error: Could not serialize function"}}return o}return r instanceof Error?{$t:"error",$v:r.message}:Object.keys(r).reduce((function(e,o){var i=r[o],a=t(i);return p({obj:r,key:o,value:a})?Object.assign(Object.assign({},e),n({},o,t(i))):e}),{})}((0,e.clone)(t));return i?JSON.stringify(y):y}}},e={};return function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}(991)})()},734:function(t,e,r){var n;n=t=>{return e={852:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.combineRetrieverAsynchronously=e.combineAsyncGetters=e.combineRetrieverEmitterAsynchronously=e.combineAsyncGettersEmitter=void 0;var i=r(608),a=r(156),u=r(774);e.combineAsyncGettersEmitter=function(t){for(var e,r,n,o=arguments.length,a=new Array(o>1?o-1:0),c=1;c<o;c++)a[c-1]=arguments[c];var l=a,f=new Map(l.map((function(t,e){return[e,t()]}))),s=t.selector(Array.from(f.values())),p=void 0!==(null===(e=null==t?void 0:t.config)||void 0===e?void 0:e.isEqual)?null===(r=null==t?void 0:t.config)||void 0===r?void 0:r.isEqual:i.shallowCompare,y=new Set,v=(0,i.debounce)((function(){var e=t.selector(Array.from(f.values()));(null==p?void 0:p(s,e))||(s=e,y.forEach((function(t){return t()})))}),null===(n=null==t?void 0:t.config)||void 0===n?void 0:n.delay),b=l.map((function(t,e){return t((function(t){t((function(t){f.set(e,t),v()}))}))})),d=function(t,e,r){var n,o,a="function"==typeof e,u=a?t:null,c=a?e:t,l=a?r:e,f=Object.assign({delay:0,isEqual:i.shallowCompare},null!=l?l:{}),p=null!==(n=null==u?void 0:u(s))&&void 0!==n?n:s;f.skipFirst||c(p);var v=(0,i.debounce)((function(){var t,e,r=null!==(t=null==u?void 0:u(s))&&void 0!==t?t:s;(null===(e=f.isEqual)||void 0===e?void 0:e.call(f,p,r))||(p=r,c(r))}),null!==(o=f.delay)&&void 0!==o?o:0);return y.add(v),function(){y.delete(v)}};return[d,function(t){if(!t)return s;var e=[];return t((function(){e.push(d.apply(void 0,arguments))})),e.length||(0,u.throwNoSubscribersWereAdded)(),function(){e.forEach((function(t){t(),y.delete(t)}))}},function(){b.forEach((function(t){return t()}))}]},e.combineRetrieverEmitterAsynchronously=e.combineAsyncGettersEmitter,e.combineAsyncGetters=function(t){for(var r=arguments.length,o=new Array(r>1?r-1:0),u=1;u<r;u++)o[u-1]=arguments[u];var c=n(e.combineAsyncGettersEmitter.apply(void 0,[t].concat(o)),3),l=c[0],f=c[1],s=c[2];return[function(t,e){var r=n((0,a.useState)((function(){var e=f();return t?t(e):e})),2),o=r[0],u=r[1];return(0,a.useEffect)((function(){var r,n=Object.assign({delay:0,isEqual:i.shallowCompare},null!=e?e:{}),o=void 0!==n.isEqual?n.isEqual:i.shallowCompare,a=l((function(e){return t?t(e):e}),(0,i.debounce)((function(e){var r=t?t(e):e;(null==o?void 0:o(e,r))||u(r)}),null!==(r=n.delay)&&void 0!==r?r:0));return function(){a()}}),[]),[o,null,null]},f,s]},e.combineRetrieverAsynchronously=e.combineAsyncGetters},113:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createStatefulContext=void 0;var n,o=r(853),i=r(684),a=(n=r(156))&&n.__esModule?n:{default:n};e.createStatefulContext=function(t,e){var r=a.default.createContext(null);return[function(){return a.default.useContext(r)},function(n){var u=n.children,c=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(n,["children"]),l=(0,o.createGlobalStateWithDecoupledFuncs)(function(){if(c.initialValue){if("function"==typeof c.initialValue)return c.initialValue((0,i.clone)(t));var e=Array.isArray(c.initialValue),r=c.initialValue instanceof Map,n=c.initialValue instanceof Set;return(0,i.isPrimitive)(c.initialValue)||(0,i.isDate)(c.initialValue)||e||r||n?c.initialValue:Object.assign(Object.assign({},t),c.initialValue)}return(0,i.clone)(t)}(),e);return a.default.createElement(r.Provider,{value:l},u)}]}},853:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var i=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.createDerivateEmitter=e.createDerivate=e.createCustomGlobalStateWithDecoupledFuncs=e.createGlobalState=e.createGlobalStateWithDecoupledFuncs=void 0;var a=r(774);e.createGlobalStateWithDecoupledFuncs=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.actions,o=i(e,["actions"]),u=new a.GlobalStore(t,o,r),c=n(u.getHookDecoupled(),2),l=c[0],f=c[1];return[u.getHook(),l,f]},e.createGlobalState=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n((0,e.createGlobalStateWithDecoupledFuncs)(t,r),3),i=o[0],a=o[1],u=o[2];return i.stateControls=function(){return[a,u]},i},e.createCustomGlobalStateWithDecoupledFuncs=function(t){var r=t.onInitialize,n=t.onChange;return function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{config:null},a=o.config,u=o.onInit,c=o.onStateChanged,l=i(o,["config","onInit","onStateChanged"]);return(0,e.createGlobalStateWithDecoupledFuncs)(t,Object.assign({onInit:function(t){r(t,a),null==u||u(t)},onStateChanged:function(t){n(t,a),null==c||c(t)}},l))}},e.createDerivate=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t((function(t){var r=e(t);return n?n(r):r}),n&&o?o:r)}},e.createDerivateEmitter=function(t,r){var n=t._father_emitter;if(n){var o=function(t){var e=n.selector(t);return r(e)},i=(0,e.createDerivateEmitter)(n.getter,o);return i._father_emitter={getter:n.getter,selector:o},i}var a=function(e,n){var o="function"==typeof n,i=o?e:null,a=o?n:e,u=o?arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}:n;return t((function(t){t((function(t){var e,n=r(t);return null!==(e=null==i?void 0:i(n))&&void 0!==e?e:n}),a,u)}))};return a._father_emitter={getter:t,selector:r},a}},774:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(){i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new E(n||[]);return o(a,"_invoke",{value:j(t,r,u)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var y={};function v(){}function b(){}function d(){}var m={};f(m,u,(function(){return this}));var h=Object.getPrototypeOf,g=h&&h(h(_([])));g&&g!==e&&r.call(g,u)&&(m=g);var S=d.prototype=v.prototype=Object.create(m);function O(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function i(o,a,u,c){var l=p(t[o],t,a);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==n(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){i("next",t,u,c)}),(function(t){i("throw",t,u,c)})):e.resolve(s).then((function(t){f.value=t,u(f)}),(function(t){return i("throw",t,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function j(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=P(a,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=p(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function P(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,P(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=p(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,y;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,y):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function _(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return b.prototype=d,o(S,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:b,configurable:!0}),b.displayName=f(d,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,f(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},O(w.prototype),f(w.prototype,c,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(S),f(S,l,"Generator"),f(S,u,(function(){return this})),f(S,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=_,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),y}},t}function a(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===n(e)?e:String(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalStore=e.throwNoSubscribersWereAdded=void 0;var u=r(608),c=r(156);e.throwNoSubscribersWereAdded=function(){throw new Error("No new subscribers were added, please make sure to add at least one subscriber with the subscribe method")};var l=function(){function t(r){var n=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.actionsConfig=f,this.subscribers=new Map,this.actions=null,this.config={metadata:null},this.onInit=null,this.onStateChanged=null,this.onSubscribed=null,this.computePreventStateChange=null,this.initialize=function(){return t=n,e=void 0,r=i().mark((function t(){var e,r,n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.actionsConfig&&(this.actions=this.getStoreActionsMap()),e=this.onInit,r=this.config.onInit,e||r){t.next=5;break}return t.abrupt("return");case 5:n=this.getConfigCallbackParam(),null==e||e(n),null==r||r(n);case 8:case"end":return t.stop()}}),t,this)})),new(e||(e=Promise))((function(n,o){function i(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var r;t.done?n(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(i,a)}u((r=r.apply(t,[])).next())}));var t,e,r},this.setState=function(t){var e=t.state,r=t.forceUpdate;n.stateWrapper={state:e},Array.from(n.subscribers.values()).forEach((function(t){!function(t){var n=t.selector,o=t.callback,i=t.currentState,a=t.config,c=(null==a?void 0:a.isEqual)||null===(null==a?void 0:a.isEqual)?null==a?void 0:a.isEqual:n?u.shallowCompare:null,l=n?n(e):e;!r&&(null==c?void 0:c(i,l))||o({state:l})}(t)}))},this.setMetadata=function(t){var e,r,o="function"==typeof t?t(null!==(e=n.config.metadata)&&void 0!==e?e:null):t;n.config=Object.assign(Object.assign({},null!==(r=n.config)&&void 0!==r?r:{}),{metadata:o})},this.getMetadata=function(){var t;return null!==(t=n.config.metadata)&&void 0!==t?t:null},this.createChangesSubscriber=function(t){var e=t.callback,r=t.selector,o=t.config,i=r?r(n.stateWrapper.state):n.stateWrapper.state,a={state:i};return(null==o?void 0:o.skipFirst)||e(i),{stateWrapper:a,subscriptionCallback:function(t){var r=t.state;a.state=r,e(r)}}},this.getState=function(t){if(!t)return n.stateWrapper.state;var r=[];return t((function(t,e,o){var i="function"==typeof e,a=i?t:null,c=i?e:t,l=i?o:e,f=n.createChangesSubscriber({selector:a,callback:c,config:l}),s=f.subscriptionCallback,p=f.stateWrapper,y=(0,u.uniqueId)();n.updateSubscription({subscriptionId:y,selector:a,config:l,stateWrapper:p,callback:s}),r.push(y)})),r.length||(0,e.throwNoSubscribersWereAdded)(),function(){r.forEach((function(t){n.subscribers.delete(t)}))}},this.getConfigCallbackParam=function(){var t=n.setMetadata,e=n.getMetadata,r=n.getState,o=n.actions;return{setMetadata:t,getMetadata:e,getState:r,setState:n.setStateWrapper,actions:o}},this.updateSubscription=function(t){var e=t.subscriptionId,r=t.callback,o=t.selector,i=t.config,a=void 0===i?{}:i,u=t.stateWrapper.state,c=n.subscribers.get(e);if(c)return c.currentState=u,c;var l={subscriptionId:e,selector:o,config:a,currentState:u,callback:r};return n.subscribers.set(e,l),l},this.executeOnSubscribed=function(){var t=n.onSubscribed,e=n.config.onSubscribed;if(t||e){var r=n.getConfigCallbackParam();null==t||t(r),null==e||e(r)}},this.getHook=function(){return function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,c.useRef)(null);(0,c.useEffect)((function(){return function(){n.subscribers.delete(i.current)}}),[]);var a,l=function(t){if(Array.isArray(t))return t}(a=(0,c.useState)((function(){return t?{state:t(n.stateWrapper.state)}:n.stateWrapper})))||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{for(i=(r=r.call(t)).next;!(c=(n=i.call(r)).done)&&(u.push(n.value),2!==u.length);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(a)||function(t,e){if(t){if("string"==typeof t)return o(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,2):void 0}}(a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),f=l[0],s=l[1];return(0,c.useEffect)((function(){null===i.current&&(i.current=(0,u.uniqueId)())}),[]),(0,c.useEffect)((function(){var e=i.current;if(null!==e){var o=!n.subscribers.has(e);n.updateSubscription({subscriptionId:e,stateWrapper:f,selector:t,config:r,callback:s}),o&&n.executeOnSubscribed()}}),[f]),[f.state,n.getStateOrchestrator(),null!==(e=n.config.metadata)&&void 0!==e?e:null]}},this.getHookDecoupled=function(){var t=n.getStateOrchestrator(),e=n.getMetadata;return[n.getState,t,e]},this.getStateOrchestrator=function(){return n.actions?n.actions:n.setStateWrapper},this.hasStateCallbacks=function(){var t=n.computePreventStateChange,e=n.onStateChanged,r=n.config,o=r.computePreventStateChange,i=r.onStateChanged;return!!(t||o||e||i)},this.setStateWrapper=function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).forceUpdate,r="function"==typeof t,o=n.stateWrapper.state,i=r?t(o):t;if(e||!Object.is(n.stateWrapper.state,i)){var a=n.setMetadata,u=n.getMetadata,c=n.getState,l=n.actions,f={setMetadata:a,getMetadata:u,setState:n.setState,getState:c,actions:l,previousState:o,state:i},s=n.computePreventStateChange,p=n.config.computePreventStateChange;if((s||p)&&((null==s?void 0:s(f))||(null==p?void 0:p(f))))return;n.setState({forceUpdate:e,state:i});var y=n.onStateChanged,v=n.config.onStateChanged;(y||v)&&(null==y||y(f),null==v||v(f))}},this.getStoreActionsMap=function(){if(!n.actionsConfig)return null;var t=n.actionsConfig,e=n.setMetadata,r=n.setStateWrapper,o=n.getState,i=n.getMetadata,u=Object.keys(t).reduce((function(n,c){var l,f,s;return Object.assign(n,(l={},s=function(){for(var n=t[c],a=arguments.length,l=new Array(a),f=0;f<a;f++)l[f]=arguments[f];var s=n.apply(u,l);return"function"!=typeof s&&function(t){throw new Error("[WRONG CONFIGURATION!]: Every key inside the storeActionsConfig must be a higher order function that returns a function \n[".concat(t,"]: key is not a valid function, try something like this: \n{\n\n ").concat(t,": (param) => ({ setState, getState, setMetadata, getMetadata, actions }) => {\n\n setState((state) => ({ ...state, ...param }))\n\n }\n\n}\n"))}(c),s.call(u,{setState:r,getState:o,setMetadata:e,getMetadata:i,actions:u})},(f=a(f=c))in l?Object.defineProperty(l,f,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[f]=s,l)),n}),{});return u},this.stateWrapper={state:r},this.config=Object.assign({metadata:null},null!=l?l:{}),this.constructor!==t||this.initialize()}var r,n;return r=t,(n=[{key:"state",get:function(){return this.stateWrapper.state}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}();e.GlobalStore=l},530:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},608:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueId=e.debounce=e.shallowCompare=void 0;var c=r(684);e.shallowCompare=function(t,e){if(t===e)return!0;var r=u(t),i=u(e);if(r!==i)return!1;if((0,c.isNil)(t)||(0,c.isNil)(e)||(0,c.isPrimitive)(t)&&(0,c.isPrimitive)(e)||(0,c.isDate)(t)&&(0,c.isDate)(e)||"function"===r&&"function"===i)return t===e;if(Array.isArray(t)){var a=t,l=e;if(a.length!==l.length)return!1;for(var f=0;f<a.length;f++)if(a[f]!==l[f])return!1}if(t instanceof Map){var s=t,p=e;if(s.size!==p.size)return!1;var y,v=o(s);try{for(v.s();!(y=v.n()).done;){var b=n(y.value,2),d=b[0];if(b[1]!==p.get(d))return!1}}catch(t){v.e(t)}finally{v.f()}}if(t instanceof Set){var m=t,h=e;if(m.size!==h.size)return!1;var g,S=o(m);try{for(S.s();!(g=S.n()).done;){var O=g.value;if(!h.has(O))return!1}}catch(t){S.e(t)}finally{S.f()}}var w=Object.keys(t),j=Object.keys(e);if(w.length!==j.length)return!1;for(var P=0,A=w;P<A.length;P++){var x=A[P];if(t[x]!==e[x])return!1}return!0},e.debounce=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];e&&clearTimeout(e),e=setTimeout((function(){t.apply(void 0,o)}),r)}},e.uniqueId=function(){return Date.now().toString(36)+Math.random().toString(36).substr(2,5)}},195:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalStoreAbstract=void 0;var a=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(c,t);var e,r,a,u=(r=c,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=i(r);if(a){var o=i(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(e=u.call(this,t,r,n)).onInit=function(t){e.onInitialize(t)},e.onStateChanged=function(t){e.onChange(t)},e}return e=c,Object.defineProperty(e,"prototype",{writable:!1}),e}(r(774).GlobalStore);e.GlobalStoreAbstract=a},991:(t,e,r)=>{"use strict";var n=Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]},o=function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(684),e),o(r(530),e),o(r(774),e),o(r(195),e),o(r(853),e),o(r(608),e),o(r(852),e),o(r(113),e)},684:function(t){t.exports=(()=>{"use strict";var t={991:(t,e,r)=>{var n=Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]};Object.defineProperty(e,"__esModule",{value:!0}),function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)}(r(729),e)},729:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===r(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.formatToStore=e.formatFromStore=e.isPrimitive=e.isFunction=e.isRegex=e.isDate=e.isString=e.isBoolean=e.isNumber=e.isNil=e.clone=void 0,e.clone=function(t){var r,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shallow;if((0,e.isPrimitive)(t)||(0,e.isDate)(t))return t;if(Array.isArray(t))return a?function(t){if(Array.isArray(t))return i(t)}(r=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||o(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}():t.map((function(t){return(0,e.clone)(t)}));if(t instanceof Map){var u=Array.from(t.entries());return a?new Map(u):new Map(u.map((function(t){return(0,e.clone)(t)})))}if(t instanceof Set){var c=Array.from(t.values());return a?new Set(c):new Set(c.map((function(t){return(0,e.clone)(t)})))}return t instanceof RegExp?new RegExp(t.toString()):(0,e.isFunction)(t)?a?t:Object.create(t):a?Object.assign({},t):t instanceof Error?new Error(t.message):Object.keys(t).reduce((function(r,o){var i=t[o];return Object.assign(Object.assign({},r),n({},o,(0,e.clone)(i)))}),{})},e.isNil=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isBoolean=function(t){return"boolean"==typeof t},e.isString=function(t){return"string"==typeof t},e.isDate=function(t){return t instanceof Date},e.isRegex=function(t){return t instanceof RegExp},e.isFunction=function(t){return"function"==typeof t||t instanceof Function},e.isPrimitive=function(t){return(0,e.isNil)(t)||(0,e.isNumber)(t)||(0,e.isBoolean)(t)||(0,e.isString)(t)||"symbol"===r(t)},e.formatFromStore=function(t){return function(t){var r,i;if((0,e.isPrimitive)(t))return t;if("date"===(null==t?void 0:t.$t))return new Date(t.$v);if("map"===(null==t?void 0:t.$t)){var a=(null!==(r=t.$v)&&void 0!==r?r:[]).map((function(t){var r,n=function(t){if(Array.isArray(t))return t}(r=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{for(i=(r=r.call(t)).next;!(c=(n=i.call(r)).done)&&(u.push(n.value),2!==u.length);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r)||o(r,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],a=n[1];return[i,(0,e.formatFromStore)(a)]}));return new Map(a)}if("set"===(null==t?void 0:t.$t)){var u=null!==(i=t.$v)&&void 0!==i?i:[].map((function(t){return(0,e.formatFromStore)(t)}));return new Set(u)}return"regex"===(null==t?void 0:t.$t)?new RegExp(t.$v):"error"===(null==t?void 0:t.$t)?new Error(t.$v):Array.isArray(t)?t.map((function(t){return(0,e.formatFromStore)(t)})):"function"===(null==t?void 0:t.$t)?Function("(".concat(t.$v,")(...arguments)")):Object.keys(t).reduce((function(r,o){var i=t[o];return Object.assign(Object.assign({},r),n({},o,(0,e.formatFromStore)(i)))}),{})}((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).jsonParse?JSON.parse(t):(0,e.clone)(t))},e.formatToStore=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{stringify:!1},i=o.stringify,a=o.validator,u=o.excludeTypes,c=o.excludeKeys,l=new Set(null!=u?u:[]),f=new Set(null!=c?c:[]),s=l.size||f.size,p=null!=a?a:function(t){var e=t.key,n=t.value;if(!s)return!0;var o=f.has(e),i=l.has(r(n));return!o&&!i},y=function t(r){if((0,e.isPrimitive)(r))return r;if(Array.isArray(r))return r.map((function(e){return t(e)}));if(r instanceof Map)return{$t:"map",$v:Array.from(r.entries()).map((function(e){return t(e)}))};if(r instanceof Set)return{$t:"set",$v:Array.from(r.values()).map((function(e){return t(e)}))};if((0,e.isDate)(r))return{$t:"date",$v:r.toISOString()};if((0,e.isRegex)(r))return{$t:"regex",$v:r.toString()};if((0,e.isFunction)(r)){var o;try{o={$t:"function",$v:r.toString()}}catch(t){o={$t:"error",$v:"Error: Could not serialize function"}}return o}return r instanceof Error?{$t:"error",$v:r.message}:Object.keys(r).reduce((function(e,o){var i=r[o],a=t(i);return p({obj:r,key:o,value:a})?Object.assign(Object.assign({},e),n({},o,t(i))):e}),{})}((0,e.clone)(t));return i?JSON.stringify(y):y}}},e={};return function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}(991)})()},156:e=>{"use strict";e.exports=t}},r={},function t(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return e[n].call(i.exports,i,i.exports,t),i.exports}(991);var e,r},t.exports=n(r(156))},156:e=>{"use strict";e.exports=t}},r={},function t(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return e[n].call(i.exports,i,i.exports,t),i.exports}(991);var e,r}));
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { ActionCollectionConfig, createStateConfig, StateHook, StateSetter, ActionCollectionResult, StateGetter } from 'react-hooks-global-states';
3
- export declare const createStatefulContext: <TState, TMetadata = null, TActions extends ActionCollectionConfig<TState, TMetadata> = null>(initialValue: TState, parameters?: createStateConfig<TState, TMetadata, TActions>) => readonly [() => [hook: StateHook<TState, keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, TMetadata, TActions>, TMetadata>, getter: StateGetter<TState>, setter: keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, TMetadata, TActions>], React.FC<React.PropsWithChildren<{
3
+ export declare const createStatefulContext: <TState, TMetadata = null, TActions extends ActionCollectionConfig<TState, TMetadata> = null>(initialValue: TState, parameters?: createStateConfig<TState, TMetadata, TActions>) => readonly [() => [hook: StateHook<TState, keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, TMetadata, TActions>, TMetadata>, stateRetriever: StateGetter<TState>, stateRetriever: keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, TMetadata, TActions>], React.FC<React.PropsWithChildren<{
4
4
  initialValue?: Partial<TState>;
5
5
  }>>];
@@ -2,17 +2,19 @@ import { createStateConfig, CustomGlobalHookParams } from './GlobalStore.types';
2
2
  import { ActionCollectionConfig, ActionCollectionResult, AvoidNever, CustomGlobalHookBuilderParams, StateGetter, StateHook, StateSetter } from 'react-hooks-global-states';
3
3
  /**
4
4
  * Creates a global state with the given state and config.
5
- * @returns {} [HOOK, DECOUPLED_GETTER, DECOUPLED_SETTER] this is an array with the hook, the decoupled getState function and the decoupled setter of the state
5
+ * @returns {} [HOOK, DECOUPLED_RETRIEVER, DECOUPLED_MUTATOR] this is an array with the hook, the decoupled getState function and the decoupled setter of the state
6
6
  */
7
- export declare const createGlobalStateWithDecoupledFuncs: <TState, TMetadata = null, TActions extends ActionCollectionConfig<TState, TMetadata> = null>(state: TState, { actions, ...config }?: createStateConfig<TState, TMetadata, TActions>) => [hook: StateHook<TState, keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, TMetadata, TActions>, TMetadata>, getter: StateGetter<TState>, setter: keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, TMetadata, TActions>];
7
+ export declare const createGlobalStateWithDecoupledFuncs: <TState, TMetadata = null, TActions extends ActionCollectionConfig<TState, TMetadata> = null>(state: TState, { actions, ...config }?: createStateConfig<TState, TMetadata, TActions>) => [hook: StateHook<TState, keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, TMetadata, TActions>, TMetadata>, stateRetriever: StateGetter<TState>, stateMutator: keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, TMetadata, TActions>];
8
8
  /**
9
9
  * Creates a global hook that can be used to access the state and actions across the application
10
- * @returns {} - () => [TState, Setter, TMetadata] the hook that can be used to access the state and the setter of the state
10
+ * @returns {} - () => [TState, stateMutator, TMetadata] the hook that can be used to access the state and the stateMutator of the state
11
11
  */
12
- export declare const createGlobalState: <TState, TMetadata = null, TActions extends ActionCollectionConfig<TState, TMetadata> = null>(state: TState, config?: createStateConfig<TState, TMetadata, TActions>) => StateHook<TState, keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, TMetadata, TActions>, TMetadata>;
12
+ export declare const createGlobalState: <TState, TMetadata = null, TActions extends ActionCollectionConfig<TState, TMetadata> = null>(state: TState, config?: createStateConfig<TState, TMetadata, TActions>) => StateHook<TState, keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, TMetadata, TActions>, TMetadata> & {
13
+ stateControls: () => [stateRetriever: StateGetter<TState>, stateMutator: keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, TMetadata, TActions>];
14
+ };
13
15
  /**
14
16
  * @description
15
17
  * Use this function to create a custom global store.
16
18
  * You can use this function to create a store with async storage.
17
19
  */
18
- export declare const createCustomGlobalStateWithDecoupledFuncs: <TInheritMetadata = null, TCustomConfig = null>({ onInitialize, onChange, }: CustomGlobalHookBuilderParams<TInheritMetadata, TCustomConfig>) => <TState, TMetadata = null, TActions extends ActionCollectionConfig<TState, AvoidNever<TInheritMetadata> & AvoidNever<TMetadata>> = null>(state: TState, { config: customConfig, onInit, onStateChanged, ...parameters }?: CustomGlobalHookParams<TCustomConfig, TState, AvoidNever<TInheritMetadata> & AvoidNever<TMetadata>, TActions>) => [hook: StateHook<TState, keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, AvoidNever<TInheritMetadata> & AvoidNever<TMetadata>, TActions>, AvoidNever<TInheritMetadata> & AvoidNever<TMetadata>>, getter: StateGetter<TState>, setter: keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, AvoidNever<TInheritMetadata> & AvoidNever<TMetadata>, TActions>];
20
+ export declare const createCustomGlobalStateWithDecoupledFuncs: <TInheritMetadata = null, TCustomConfig = null>({ onInitialize, onChange, }: CustomGlobalHookBuilderParams<TInheritMetadata, TCustomConfig>) => <TState, TMetadata = null, TActions extends ActionCollectionConfig<TState, AvoidNever<TInheritMetadata> & AvoidNever<TMetadata>> = null>(state: TState, { config: customConfig, onInit, onStateChanged, ...parameters }?: CustomGlobalHookParams<TCustomConfig, TState, AvoidNever<TInheritMetadata> & AvoidNever<TMetadata>, TActions>) => [hook: StateHook<TState, keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, AvoidNever<TInheritMetadata> & AvoidNever<TMetadata>, TActions>, AvoidNever<TInheritMetadata> & AvoidNever<TMetadata>>, stateRetriever: StateGetter<TState>, stateMutator: keyof TActions extends never ? StateSetter<TState> : ActionCollectionResult<TState, AvoidNever<TInheritMetadata> & AvoidNever<TMetadata>, TActions>];
@@ -3,9 +3,10 @@
3
3
  * The intention is to extend the capabilities to specially web development.
4
4
  * The original library is intended to be used just with react,
5
5
  */
6
- export { clone, isNil, isNumber, isBoolean, isString, isDate, isRegex, isFunction, isPrimitive, formatFromStore, formatToStore, throwNoSubscribersWereAdded, createDerivate, createDerivateEmitter, shallowCompare, debounce, combineAsyncGettersEmitter, combineAsyncGetters, StateSetter, StateHook, AvoidNever, MetadataSetter, StateChanges, StoreTools, ActionCollectionConfig, ActionCollectionResult, UseHookConfig, UnsubscribeCallback, SubscribeCallbackConfig, SubscribeCallback, SubscriberCallback, StateGetter, Subscribe, CustomGlobalHookBuilderParams, SelectorCallback, SubscribeToEmitter, SubscriberParameters, SubscriptionCallback, SetStateCallback, StateChangesParam, StateConfigCallbackParam, } from 'react-hooks-global-states';
6
+ export { clone, isNil, isNumber, isBoolean, isString, isDate, isRegex, isFunction, isPrimitive, formatFromStore, formatToStore, throwNoSubscribersWereAdded, createDerivate, createDerivateEmitter, shallowCompare, debounce, combineAsyncGettersEmitter, combineRetrieverEmitterAsynchronously, combineAsyncGetters, combineRetrieverAsynchronously, StateSetter, StateHook, AvoidNever, MetadataSetter, StateChanges, StoreTools, ActionCollectionConfig, ActionCollectionResult, UseHookConfig, UnsubscribeCallback, SubscribeCallbackConfig, SubscribeCallback, SubscriberCallback, StateGetter, Subscribe, CustomGlobalHookBuilderParams, SelectorCallback, SubscribeToEmitter, SubscriberParameters, SubscriptionCallback, SetStateCallback, StateChangesParam, StateConfigCallbackParam, } from 'react-hooks-global-states';
7
7
  export { LocalStorageConfig, GlobalStoreConfig, createStateConfig, CustomGlobalHookParams, } from './GlobalStore.types';
8
8
  export { GlobalStore } from './GlobalStore';
9
9
  export { GlobalStoreAbstract } from './GlobalStoreAbstract';
10
10
  export { createGlobalStateWithDecoupledFuncs, createGlobalState, createCustomGlobalStateWithDecoupledFuncs, } from './GlobalStore.functionHooks';
11
11
  export { getLocalStorageItem, setLocalStorageItem } from './GlobalStore.utils';
12
+ export * from './GlobalStore.context';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-global-state-hooks",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "description": "This is a package to easily handling global-state across your react components No-redux, No-context.",
5
5
  "main": "lib/bundle.js",
6
6
  "types": "lib/src/index.d.ts",
@@ -76,6 +76,6 @@
76
76
  "react": ">=17.0.0"
77
77
  },
78
78
  "dependencies": {
79
- "react-hooks-global-states": "^1.0.6"
79
+ "react-hooks-global-states": "^1.1.0"
80
80
  }
81
81
  }