@nizza/core 0.1.1-beta.2 → 0.1.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var V = Object.defineProperty;
2
2
  var U = (n, e, i) => e in n ? V(n, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : n[e] = i;
3
3
  var s = (n, e, i) => (U(n, typeof e != "symbol" ? e + "" : e, i), i);
4
- import G, { createContext as L, useContext as I, useMemo as M, lazy as q, Suspense as z } from "react";
4
+ import G, { createContext as z, useContext as O, useMemo as L, lazy as M, Suspense as q } from "react";
5
5
  class $ {
6
6
  constructor(e) {
7
7
  s(this, "aggregate");
@@ -17,6 +17,8 @@ class $ {
17
17
  return this._numSetPropsApplied === 1;
18
18
  }
19
19
  }
20
+ class ye {
21
+ }
20
22
  class y extends Error {
21
23
  constructor(e, i, a) {
22
24
  super(i), this.value = a, this.name = e;
@@ -29,7 +31,7 @@ class y extends Error {
29
31
  };
30
32
  }
31
33
  }
32
- class Se extends y {
34
+ class Fe extends y {
33
35
  constructor(e) {
34
36
  super(
35
37
  "RESOURCE_NOT_FOUND_ERROR",
@@ -38,7 +40,7 @@ class Se extends y {
38
40
  );
39
41
  }
40
42
  }
41
- class ge extends y {
43
+ class Ce extends y {
42
44
  constructor(e) {
43
45
  var i;
44
46
  super(
@@ -48,18 +50,18 @@ class ge extends y {
48
50
  );
49
51
  }
50
52
  }
51
- class ye extends y {
53
+ class he extends y {
52
54
  constructor() {
53
55
  super("APP_ACCOUNT_INVALID_ERROR", "Account not defined");
54
56
  }
55
57
  }
56
- var _ = { exports: {} }, u = {};
58
+ var D = { exports: {} }, u = {};
57
59
  /*
58
60
  object-assign
59
61
  (c) Sindre Sorhus
60
62
  @license MIT
61
63
  */
62
- var h = Object.getOwnPropertySymbols, W = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
64
+ var C = Object.getOwnPropertySymbols, B = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
63
65
  function Q(n) {
64
66
  if (n == null)
65
67
  throw new TypeError("Object.assign cannot be called with null or undefined");
@@ -74,14 +76,14 @@ function J() {
74
76
  return !1;
75
77
  for (var e = {}, i = 0; i < 10; i++)
76
78
  e["_" + String.fromCharCode(i)] = i;
77
- var a = Object.getOwnPropertyNames(e).map(function(d) {
78
- return e[d];
79
+ var a = Object.getOwnPropertyNames(e).map(function(l) {
80
+ return e[l];
79
81
  });
80
82
  if (a.join("") !== "0123456789")
81
83
  return !1;
82
84
  var t = {};
83
- return "abcdefghijklmnopqrst".split("").forEach(function(d) {
84
- t[d] = d;
85
+ return "abcdefghijklmnopqrst".split("").forEach(function(l) {
86
+ t[l] = l;
85
87
  }), Object.keys(Object.assign({}, t)).join("") === "abcdefghijklmnopqrst";
86
88
  } catch {
87
89
  return !1;
@@ -96,38 +98,37 @@ J();
96
98
  * This source code is licensed under the MIT license found in the
97
99
  * LICENSE file in the root directory of this source tree.
98
100
  */
99
- var H = G, D = 60103;
101
+ var H = G, _ = 60103;
100
102
  u.Fragment = 60107;
101
103
  if (typeof Symbol == "function" && Symbol.for) {
102
- var C = Symbol.for;
103
- D = C("react.element"), u.Fragment = C("react.fragment");
104
+ var h = Symbol.for;
105
+ _ = h("react.element"), u.Fragment = h("react.fragment");
104
106
  }
105
107
  var X = H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Y = Object.prototype.hasOwnProperty, Z = { key: !0, ref: !0, __self: !0, __source: !0 };
106
108
  function A(n, e, i) {
107
- var a, t = {}, d = null, o = null;
108
- i !== void 0 && (d = "" + i), e.key !== void 0 && (d = "" + e.key), e.ref !== void 0 && (o = e.ref);
109
+ var a, t = {}, l = null, d = null;
110
+ i !== void 0 && (l = "" + i), e.key !== void 0 && (l = "" + e.key), e.ref !== void 0 && (d = e.ref);
109
111
  for (a in e)
110
112
  Y.call(e, a) && !Z.hasOwnProperty(a) && (t[a] = e[a]);
111
113
  if (n && n.defaultProps)
112
114
  for (a in e = n.defaultProps, e)
113
115
  t[a] === void 0 && (t[a] = e[a]);
114
- return { $$typeof: D, type: n, key: d, ref: o, props: t, _owner: X.current };
116
+ return { $$typeof: _, type: n, key: l, ref: d, props: t, _owner: X.current };
115
117
  }
116
118
  u.jsx = A;
117
119
  u.jsxs = A;
118
120
  (function(n) {
119
121
  n.exports = u;
120
- })(_);
121
- const f = _.exports.jsx;
122
+ })(D);
123
+ const S = D.exports.jsx;
122
124
  let F = /* @__PURE__ */ new Map();
123
- const S = L(F), Fe = ({
125
+ const f = z(F), be = ({
124
126
  children: n,
125
- stores: e
127
+ stores: e,
128
+ instances: i
126
129
  }) => {
127
- const i = I(S), a = M(() => {
128
- if (!e.length)
129
- return i;
130
- const t = /* @__PURE__ */ new Map();
130
+ const a = O(f), t = L(() => {
131
+ const l = /* @__PURE__ */ new Map();
131
132
  return e.forEach((d) => {
132
133
  let o;
133
134
  try {
@@ -135,52 +136,56 @@ const S = L(F), Fe = ({
135
136
  } catch {
136
137
  o = new d();
137
138
  }
138
- t.set(d, o);
139
- }), F = new Map([...i, ...t]);
140
- }, [e]);
141
- return /* @__PURE__ */ f(S.Provider, {
142
- value: a,
139
+ l.set(d, o);
140
+ }), i == null || i.forEach((d) => l.set(d.constructor, d)), F = new Map([...a, ...l]);
141
+ }, []);
142
+ return /* @__PURE__ */ S(f.Provider, {
143
+ value: t,
143
144
  children: n
144
145
  });
145
146
  };
146
- function he(n) {
147
- return I(S).get(n);
147
+ function we(n) {
148
+ return O(f).get(n);
148
149
  }
149
- function Ce(n) {
150
+ function Te(n) {
150
151
  return F.get(n);
151
152
  }
152
153
  var j = /* @__PURE__ */ ((n) => (n.Add = "add", n.Remove = "remove", n))(j || {}), x = /* @__PURE__ */ ((n) => (n.Active = "active", n.Inactive = "inactive", n))(x || {});
153
- const K = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "AddCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CreateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ee = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ne = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ie = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetAllCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ae = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "ManageCollectionProduct" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ManageCollectionProductInInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "manageCollectionProduct" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, te = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, de = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "UpdateCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "UpdateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
154
+ const K = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "getAllCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "data" } }, { kind: "Field", name: { kind: "Name", value: "section" } }, { kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ee = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "updateCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ne = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "AddCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CreateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ie = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ae = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, te = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetAllCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, de = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "ManageCollectionProduct" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ManageCollectionProductInInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "manageCollectionProduct" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, le = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, oe = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "UpdateCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "UpdateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
154
155
  __proto__: null,
155
156
  Methods: j,
156
157
  Status: x,
157
- AddCollectionDocument: K,
158
- DeleteCollectionDocument: ee,
159
- FindCollectionDocument: ne,
160
- GetAllCollectionsDocument: ie,
161
- ManageCollectionProductDocument: ae,
162
- SearchCollectionsDocument: te,
163
- UpdateCollectionDocument: de
158
+ GetAllCustomizationDocument: K,
159
+ UpdateCustomizationDocument: ee,
160
+ AddCollectionDocument: ne,
161
+ DeleteCollectionDocument: ie,
162
+ FindCollectionDocument: ae,
163
+ GetAllCollectionsDocument: te,
164
+ ManageCollectionProductDocument: de,
165
+ SearchCollectionsDocument: le,
166
+ UpdateCollectionDocument: oe
164
167
  }, Symbol.toStringTag, { value: "Module" }));
165
- async function we({
168
+ class Ie {
169
+ }
170
+ async function Oe({
166
171
  url: n,
167
172
  method: e = "GET",
168
173
  raw: i = !1,
169
174
  ...a
170
175
  }) {
171
- var l;
176
+ var o;
172
177
  const t = {
173
178
  "Content-Type": "application/json",
174
179
  ...a.headers
175
- }, d = await fetch(n, { method: e, ...a, headers: t });
180
+ }, l = await fetch(n, { method: e, ...a, headers: t });
176
181
  if (i)
177
- return d;
178
- const o = await d.json();
179
- if (!d.ok) {
180
- const m = (l = o == null ? void 0 : o.message) != null ? l : d.statusText;
182
+ return l;
183
+ const d = await l.json();
184
+ if (!l.ok) {
185
+ const m = (o = d == null ? void 0 : d.message) != null ? o : l.statusText;
181
186
  throw new Error(m);
182
187
  }
183
- return o;
188
+ return d;
184
189
  }
185
190
  class b {
186
191
  constructor() {
@@ -229,7 +234,7 @@ function w(n) {
229
234
  return !1;
230
235
  }
231
236
  }
232
- function O(n, e, i) {
237
+ function T(n, e, i) {
233
238
  const a = {
234
239
  configurable: !1,
235
240
  enumerable: !1,
@@ -237,9 +242,9 @@ function O(n, e, i) {
237
242
  };
238
243
  typeof i < "u" && (a.value = i), Object.defineProperty(n, e, a);
239
244
  }
240
- class R {
245
+ class P {
241
246
  static init() {
242
- return new R();
247
+ return new P();
243
248
  }
244
249
  constructor() {
245
250
  window.top === window.self ? console.log("[CustomStorage] This is the main window") : console.log("[CustomStorage] This is NOT the main window"), this.replaceStorages();
@@ -247,13 +252,13 @@ class R {
247
252
  replaceStorages() {
248
253
  if (!this.isAvailable.localStorage) {
249
254
  const e = new b();
250
- O(window, "localStorage", e), console.log(
255
+ T(window, "localStorage", e), console.log(
251
256
  "[CustomStorage] LocalStorage is not available, custom implementation is defined"
252
257
  );
253
258
  }
254
259
  if (!this.isAvailable.sessionStorage) {
255
260
  const e = new b();
256
- O(window, "sessionStorage", e), console.log(
261
+ T(window, "sessionStorage", e), console.log(
257
262
  "[CustomStorage] SessionStorage is not available, custom implementation is defined"
258
263
  );
259
264
  }
@@ -266,7 +271,7 @@ class R {
266
271
  }
267
272
  }
268
273
  /*! js-cookie v3.0.1 | MIT */
269
- function c(n) {
274
+ function k(n) {
270
275
  for (var e = 1; e < arguments.length; e++) {
271
276
  var i = arguments[e];
272
277
  for (var a in i)
@@ -274,7 +279,7 @@ function c(n) {
274
279
  }
275
280
  return n;
276
281
  }
277
- var oe = {
282
+ var re = {
278
283
  read: function(n) {
279
284
  return n[0] === '"' && (n = n.slice(1, -1)), n.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
280
285
  },
@@ -286,47 +291,47 @@ var oe = {
286
291
  }
287
292
  };
288
293
  function g(n, e) {
289
- function i(t, d, o) {
294
+ function i(t, l, d) {
290
295
  if (!(typeof document > "u")) {
291
- o = c({}, e, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), t = encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
292
- var l = "";
293
- for (var m in o)
294
- !o[m] || (l += "; " + m, o[m] !== !0 && (l += "=" + o[m].split(";")[0]));
295
- return document.cookie = t + "=" + n.write(d, t) + l;
296
+ d = k({}, e, d), typeof d.expires == "number" && (d.expires = new Date(Date.now() + d.expires * 864e5)), d.expires && (d.expires = d.expires.toUTCString()), t = encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
297
+ var o = "";
298
+ for (var m in d)
299
+ !d[m] || (o += "; " + m, d[m] !== !0 && (o += "=" + d[m].split(";")[0]));
300
+ return document.cookie = t + "=" + n.write(l, t) + o;
296
301
  }
297
302
  }
298
303
  function a(t) {
299
304
  if (!(typeof document > "u" || arguments.length && !t)) {
300
- for (var d = document.cookie ? document.cookie.split("; ") : [], o = {}, l = 0; l < d.length; l++) {
301
- var m = d[l].split("="), P = m.slice(1).join("=");
305
+ for (var l = document.cookie ? document.cookie.split("; ") : [], d = {}, o = 0; o < l.length; o++) {
306
+ var m = l[o].split("="), R = m.slice(1).join("=");
302
307
  try {
303
308
  var p = decodeURIComponent(m[0]);
304
- if (o[p] = n.read(P, p), t === p)
309
+ if (d[p] = n.read(R, p), t === p)
305
310
  break;
306
311
  } catch {
307
312
  }
308
313
  }
309
- return t ? o[t] : o;
314
+ return t ? d[t] : d;
310
315
  }
311
316
  }
312
317
  return Object.create(
313
318
  {
314
319
  set: i,
315
320
  get: a,
316
- remove: function(t, d) {
321
+ remove: function(t, l) {
317
322
  i(
318
323
  t,
319
324
  "",
320
- c({}, d, {
325
+ k({}, l, {
321
326
  expires: -1
322
327
  })
323
328
  );
324
329
  },
325
330
  withAttributes: function(t) {
326
- return g(this.converter, c({}, this.attributes, t));
331
+ return g(this.converter, k({}, this.attributes, t));
327
332
  },
328
333
  withConverter: function(t) {
329
- return g(c({}, this.converter, t), this.attributes);
334
+ return g(k({}, this.converter, t), this.attributes);
330
335
  }
331
336
  },
332
337
  {
@@ -335,41 +340,41 @@ function g(n, e) {
335
340
  }
336
341
  );
337
342
  }
338
- var E = g(oe, { path: "/" }), k, le = new Uint8Array(16);
339
- function re() {
340
- if (!k && (k = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), !k))
343
+ var E = g(re, { path: "/" }), c, me = new Uint8Array(16);
344
+ function se() {
345
+ if (!c && (c = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), !c))
341
346
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
342
- return k(le);
347
+ return c(me);
343
348
  }
344
- const se = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
345
- function me(n) {
346
- return typeof n == "string" && se.test(n);
349
+ const ue = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
350
+ function ke(n) {
351
+ return typeof n == "string" && ue.test(n);
347
352
  }
348
353
  var r = [];
349
354
  for (var N = 0; N < 256; ++N)
350
355
  r.push((N + 256).toString(16).substr(1));
351
- function ue(n) {
356
+ function ce(n) {
352
357
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, i = (r[n[e + 0]] + r[n[e + 1]] + r[n[e + 2]] + r[n[e + 3]] + "-" + r[n[e + 4]] + r[n[e + 5]] + "-" + r[n[e + 6]] + r[n[e + 7]] + "-" + r[n[e + 8]] + r[n[e + 9]] + "-" + r[n[e + 10]] + r[n[e + 11]] + r[n[e + 12]] + r[n[e + 13]] + r[n[e + 14]] + r[n[e + 15]]).toLowerCase();
353
- if (!me(i))
358
+ if (!ke(i))
354
359
  throw TypeError("Stringified UUID is invalid");
355
360
  return i;
356
361
  }
357
- function ce(n, e, i) {
362
+ function ve(n, e, i) {
358
363
  n = n || {};
359
- var a = n.random || (n.rng || re)();
364
+ var a = n.random || (n.rng || se)();
360
365
  if (a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, e) {
361
366
  i = i || 0;
362
367
  for (var t = 0; t < 16; ++t)
363
368
  e[i + t] = a[t];
364
369
  return e;
365
370
  }
366
- return ue(a);
371
+ return ce(a);
367
372
  }
368
- const T = "FINGERPRINT_LIVE_SHOPPING", Oe = () => {
369
- let n = E.get(T);
370
- return n || (n = ce(), E.set(T, n, { expires: 1 }), n);
373
+ const I = "FINGERPRINT_LIVE_SHOPPING", De = () => {
374
+ let n = E.get(I);
375
+ return n || (n = ve(), E.set(I, n, { expires: 1 }), n);
371
376
  };
372
- function Ee(n = 8) {
377
+ function _e(n = 8) {
373
378
  const e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
374
379
  let i = "";
375
380
  const a = e.length;
@@ -377,24 +382,24 @@ function Ee(n = 8) {
377
382
  i += e.charAt(Math.floor(Math.random() * a));
378
383
  return i;
379
384
  }
380
- function Te(n) {
385
+ function Ae(n) {
381
386
  return new $(n);
382
387
  }
383
- const Ie = (n) => {
388
+ const je = (n) => {
384
389
  const e = Object.entries(n).map(([i, a]) => `${i}=${a}`).join("&");
385
390
  return e ? `?${e}` : "";
386
- }, _e = (n, e, i = {
391
+ }, xe = (n, e, i = {
387
392
  fallback: null
388
393
  }) => {
389
394
  let a = n;
390
- e && (a = () => n().then((d) => ({
391
- default: e(d)
395
+ e && (a = () => n().then((l) => ({
396
+ default: e(l)
392
397
  })));
393
- const t = q(a);
394
- return (d) => /* @__PURE__ */ f(z, {
398
+ const t = M(a);
399
+ return (l) => /* @__PURE__ */ S(q, {
395
400
  fallback: i.fallback,
396
- children: /* @__PURE__ */ f(t, {
397
- ...d
401
+ children: /* @__PURE__ */ S(t, {
402
+ ...l
398
403
  })
399
404
  });
400
405
  };
@@ -434,7 +439,7 @@ class v {
434
439
  return v.ok();
435
440
  }
436
441
  }
437
- class ke {
442
+ class pe {
438
443
  constructor(e) {
439
444
  s(this, "value");
440
445
  this.value = e;
@@ -446,7 +451,7 @@ class ke {
446
451
  return !1;
447
452
  }
448
453
  }
449
- class ve {
454
+ class Ne {
450
455
  constructor(e) {
451
456
  s(this, "value");
452
457
  this.value = e;
@@ -458,27 +463,29 @@ class ve {
458
463
  return !0;
459
464
  }
460
465
  }
461
- const De = (n) => new ke(n), Ae = (n) => new ve(n);
466
+ const Pe = (n) => new pe(n), Re = (n) => new Ne(n);
462
467
  export {
463
- ye as AccountInvalidError,
468
+ he as AccountInvalidError,
464
469
  $ as AggregateRoot,
465
- be as ApiGraphqlTypes,
466
- R as CustomStorage,
470
+ Ee as ApiGraphqlTypes,
471
+ ye as BaseMobxStore,
472
+ Ie as BaseStore,
473
+ P as CustomStorage,
467
474
  y as DomainError,
468
- ke as Err,
469
- ve as Ok,
470
- Se as ResourceNotFoundError,
475
+ pe as Err,
476
+ Ne as Ok,
477
+ Fe as ResourceNotFoundError,
471
478
  v as Result,
472
- Fe as StoreProvider,
473
- ge as UnexpectedError,
474
- we as apiCall,
475
- Te as createAggregateRoot,
476
- Ae as err,
477
- Oe as getFingerprint,
478
- Ce as getStore,
479
- _e as lazyLoad,
480
- De as ok,
481
- Ie as searchParams,
482
- Ee as shortId,
483
- he as useStore
479
+ be as StoreProvider,
480
+ Ce as UnexpectedError,
481
+ Oe as apiCall,
482
+ Ae as createAggregateRoot,
483
+ Re as err,
484
+ De as getFingerprint,
485
+ Te as getStore,
486
+ xe as lazyLoad,
487
+ Pe as ok,
488
+ je as searchParams,
489
+ _e as shortId,
490
+ we as useStore
484
491
  };
@@ -0,0 +1,2 @@
1
+ export declare abstract class BaseMobxStore {
2
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './AggregateRoot';
2
+ export * from './BaseMobxStore';
2
3
  export * from './errors';
@@ -1,6 +1,7 @@
1
1
  import { FC } from 'react';
2
- import { StoreClass, StoreFactory } from '../types';
2
+ import { BaseStore, StoreClass, StoreFactory } from '../types';
3
3
  interface Props {
4
+ instances?: BaseStore[];
4
5
  stores: (StoreClass | StoreFactory)[];
5
6
  children?: React.ReactNode;
6
7
  }
@@ -20,6 +20,7 @@ export declare type Scalars = {
20
20
  Int: number;
21
21
  Float: number;
22
22
  DateTime: any;
23
+ JSON: any;
23
24
  };
24
25
  export declare type Collection = {
25
26
  __typename?: 'Collection';
@@ -59,6 +60,42 @@ export declare type CreateCollectionInput = {
59
60
  name: Scalars['String'];
60
61
  status?: InputMaybe<Status>;
61
62
  };
63
+ export declare type CustomPlayer = {
64
+ __typename?: 'CustomPlayer';
65
+ account: Scalars['String'];
66
+ component: Scalars['String'];
67
+ data: Scalars['JSON'];
68
+ duration?: Maybe<Scalars['String']>;
69
+ id: Scalars['String'];
70
+ isArray?: Maybe<Scalars['Boolean']>;
71
+ method?: Maybe<Scalars['String']>;
72
+ path?: Maybe<Scalars['String']>;
73
+ section: Scalars['String'];
74
+ };
75
+ export declare type CustomPlayerInput = {
76
+ account: Scalars['String'];
77
+ data: Scalars['JSON'];
78
+ id: Scalars['String'];
79
+ section: Scalars['String'];
80
+ };
81
+ export declare type CustomPlayerResult = CustomPlayerSuccess | ErrorGeneral;
82
+ export declare type CustomPlayerResultArray = CustomPlayerSuccessArray | ErrorGeneral;
83
+ export declare type CustomPlayerSuccess = {
84
+ __typename?: 'CustomPlayerSuccess';
85
+ data?: Maybe<CustomPlayer>;
86
+ duration?: Maybe<Scalars['String']>;
87
+ isArray?: Maybe<Scalars['Boolean']>;
88
+ method?: Maybe<Scalars['String']>;
89
+ path?: Maybe<Scalars['String']>;
90
+ };
91
+ export declare type CustomPlayerSuccessArray = {
92
+ __typename?: 'CustomPlayerSuccessArray';
93
+ data?: Maybe<Array<CustomPlayer>>;
94
+ duration?: Maybe<Scalars['String']>;
95
+ isArray?: Maybe<Scalars['Boolean']>;
96
+ method?: Maybe<Scalars['String']>;
97
+ path?: Maybe<Scalars['String']>;
98
+ };
62
99
  export declare type Error = {
63
100
  message: Scalars['String'];
64
101
  statusCode: Scalars['String'];
@@ -86,6 +123,7 @@ export declare type Mutation = {
86
123
  deleteCollection: CollectionResult;
87
124
  manageCollectionProduct: CollectionResult;
88
125
  updateCollection: CollectionResult;
126
+ updateCustomPlayer: CustomPlayerResult;
89
127
  };
90
128
  export declare type MutationCreateCollectionArgs = {
91
129
  data: CreateCollectionInput;
@@ -99,6 +137,9 @@ export declare type MutationManageCollectionProductArgs = {
99
137
  export declare type MutationUpdateCollectionArgs = {
100
138
  data: UpdateCollectionInput;
101
139
  };
140
+ export declare type MutationUpdateCustomPlayerArgs = {
141
+ data: CustomPlayerInput;
142
+ };
102
143
  export declare type Product = {
103
144
  __typename?: 'Product';
104
145
  account: Scalars['String'];
@@ -115,6 +156,7 @@ export declare type Query = {
115
156
  __typename?: 'Query';
116
157
  findCollection: CollectionResult;
117
158
  getAllCollection: CollectionResultArray;
159
+ getAllCustomPlayer: CustomPlayerResultArray;
118
160
  searchCollection: CollectionResultArray;
119
161
  };
120
162
  export declare type QueryFindCollectionArgs = {
@@ -123,6 +165,9 @@ export declare type QueryFindCollectionArgs = {
123
165
  export declare type QueryGetAllCollectionArgs = {
124
166
  data: QueryInput;
125
167
  };
168
+ export declare type QueryGetAllCustomPlayerArgs = {
169
+ data: QueryInput;
170
+ };
126
171
  export declare type QuerySearchCollectionArgs = {
127
172
  data: QueryInput;
128
173
  };
@@ -144,6 +189,41 @@ export declare type UpdateCollectionInput = {
144
189
  name?: InputMaybe<Scalars['String']>;
145
190
  status?: InputMaybe<Status>;
146
191
  };
192
+ export declare type GetAllCustomizationQueryVariables = Exact<{
193
+ data: QueryInput;
194
+ }>;
195
+ export declare type GetAllCustomizationQuery = {
196
+ __typename?: 'Query';
197
+ getAllCustomPlayer: {
198
+ __typename: 'CustomPlayerSuccessArray';
199
+ data?: Array<{
200
+ __typename?: 'CustomPlayer';
201
+ account: string;
202
+ data: any;
203
+ section: string;
204
+ id: string;
205
+ }> | null;
206
+ } | {
207
+ __typename: 'ErrorGeneral';
208
+ message: string;
209
+ statusCode: string;
210
+ timestamp: string;
211
+ };
212
+ };
213
+ export declare type UpdateCustomizationMutationVariables = Exact<{
214
+ data: CustomPlayerInput;
215
+ }>;
216
+ export declare type UpdateCustomizationMutation = {
217
+ __typename?: 'Mutation';
218
+ updateCustomPlayer: {
219
+ __typename: 'CustomPlayerSuccess';
220
+ } | {
221
+ __typename: 'ErrorGeneral';
222
+ message: string;
223
+ statusCode: string;
224
+ timestamp: string;
225
+ };
226
+ };
147
227
  export declare type AddCollectionMutationVariables = Exact<{
148
228
  data: CreateCollectionInput;
149
229
  }>;
@@ -309,6 +389,12 @@ export declare type UpdateCollectionMutation = {
309
389
  timestamp: string;
310
390
  };
311
391
  };
392
+ export declare const GetAllCustomizationDocument: DocumentNode<GetAllCustomizationQuery, Exact<{
393
+ data: QueryInput;
394
+ }>>;
395
+ export declare const UpdateCustomizationDocument: DocumentNode<UpdateCustomizationMutation, Exact<{
396
+ data: CustomPlayerInput;
397
+ }>>;
312
398
  export declare const AddCollectionDocument: DocumentNode<AddCollectionMutation, Exact<{
313
399
  data: CreateCollectionInput;
314
400
  }>>;
@@ -1,8 +1,10 @@
1
1
  import { RouteProps } from 'react-router-dom';
2
2
  import { StoreClass, StoreFactory } from './mobx-store';
3
- export interface AppModule {
3
+ import { BaseStore } from './utils';
4
+ export interface AppModule<T extends BaseStore> {
4
5
  key: string;
5
6
  label: string;
6
7
  routeProps: RouteProps;
8
+ instance: T;
7
9
  stores?: (StoreClass | StoreFactory)[];
8
10
  }
@@ -1,5 +1,7 @@
1
1
  import environment from '../../environments/environment';
2
2
  export declare type Constructor<T = any> = new (...args: any[]) => T;
3
+ export declare abstract class BaseStore {
4
+ }
3
5
  export interface ApiV1Response<T = any> {
4
6
  success: boolean;
5
7
  message: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.1.1-beta.2",
3
+ "version": "0.1.1-beta.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",