@timardex/cluemart-server-shared 1.1.38 → 2.0.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/dist/{Affiliate-CZKOOaz_.d.ts → Affiliate-CMJdECzs.d.mts} +43 -30
- package/dist/{Affiliate-xCVhO2Cy.d.mts → Affiliate-VLZdlt5K.d.ts} +43 -30
- package/dist/chunk-3QS3WKRC.mjs +31 -0
- package/dist/chunk-3QS3WKRC.mjs.map +1 -0
- package/dist/{chunk-DJHOLZ3J.mjs → chunk-EGUFWI7R.mjs} +2336 -417
- package/dist/chunk-EGUFWI7R.mjs.map +1 -0
- package/dist/{Chat-Wn7yfc3v.d.mts → index-Bq-lT7a2.d.mts} +35 -35
- package/dist/{Chat-Wn7yfc3v.d.ts → index-Bq-lT7a2.d.ts} +35 -35
- package/dist/index.cjs +2379 -424
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +159 -84
- package/dist/index.d.ts +159 -84
- package/dist/index.mjs +2394 -421
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +2341 -421
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +69 -9
- package/dist/mongoose/index.d.ts +69 -9
- package/dist/mongoose/index.mjs +10 -1
- package/dist/service/index.cjs +2320 -431
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +12 -10
- package/dist/service/index.d.ts +12 -10
- package/dist/service/index.mjs +52 -16
- package/dist/service/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -0
- package/package.json +2 -2
- package/dist/chunk-DJHOLZ3J.mjs.map +0 -1
package/dist/service/index.cjs
CHANGED
|
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
8
11
|
var __export = (target, all) => {
|
|
9
12
|
for (var name in all)
|
|
10
13
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -27,6 +30,1467 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
30
|
));
|
|
28
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
32
|
|
|
33
|
+
// node_modules/react/cjs/react.production.js
|
|
34
|
+
var require_react_production = __commonJS({
|
|
35
|
+
"node_modules/react/cjs/react.production.js"(exports2) {
|
|
36
|
+
"use strict";
|
|
37
|
+
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element");
|
|
38
|
+
var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
|
|
39
|
+
var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
40
|
+
var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
|
|
41
|
+
var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
|
|
42
|
+
var REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer");
|
|
43
|
+
var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
|
|
44
|
+
var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
|
|
45
|
+
var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
|
|
46
|
+
var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
|
|
47
|
+
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
48
|
+
var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
|
|
49
|
+
var REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition");
|
|
50
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
51
|
+
function getIteratorFn(maybeIterable) {
|
|
52
|
+
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
|
|
53
|
+
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
54
|
+
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
55
|
+
}
|
|
56
|
+
var ReactNoopUpdateQueue = {
|
|
57
|
+
isMounted: function() {
|
|
58
|
+
return false;
|
|
59
|
+
},
|
|
60
|
+
enqueueForceUpdate: function() {
|
|
61
|
+
},
|
|
62
|
+
enqueueReplaceState: function() {
|
|
63
|
+
},
|
|
64
|
+
enqueueSetState: function() {
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var assign = Object.assign;
|
|
68
|
+
var emptyObject = {};
|
|
69
|
+
function Component(props, context, updater) {
|
|
70
|
+
this.props = props;
|
|
71
|
+
this.context = context;
|
|
72
|
+
this.refs = emptyObject;
|
|
73
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
74
|
+
}
|
|
75
|
+
Component.prototype.isReactComponent = {};
|
|
76
|
+
Component.prototype.setState = function(partialState, callback) {
|
|
77
|
+
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
|
|
78
|
+
throw Error(
|
|
79
|
+
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
80
|
+
);
|
|
81
|
+
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
82
|
+
};
|
|
83
|
+
Component.prototype.forceUpdate = function(callback) {
|
|
84
|
+
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
85
|
+
};
|
|
86
|
+
function ComponentDummy() {
|
|
87
|
+
}
|
|
88
|
+
ComponentDummy.prototype = Component.prototype;
|
|
89
|
+
function PureComponent(props, context, updater) {
|
|
90
|
+
this.props = props;
|
|
91
|
+
this.context = context;
|
|
92
|
+
this.refs = emptyObject;
|
|
93
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
94
|
+
}
|
|
95
|
+
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
96
|
+
pureComponentPrototype.constructor = PureComponent;
|
|
97
|
+
assign(pureComponentPrototype, Component.prototype);
|
|
98
|
+
pureComponentPrototype.isPureReactComponent = true;
|
|
99
|
+
var isArrayImpl = Array.isArray;
|
|
100
|
+
function noop() {
|
|
101
|
+
}
|
|
102
|
+
var ReactSharedInternals = { H: null, A: null, T: null, S: null };
|
|
103
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
104
|
+
function ReactElement(type, key, props) {
|
|
105
|
+
var refProp = props.ref;
|
|
106
|
+
return {
|
|
107
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
108
|
+
type,
|
|
109
|
+
key,
|
|
110
|
+
ref: void 0 !== refProp ? refProp : null,
|
|
111
|
+
props
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
115
|
+
return ReactElement(oldElement.type, newKey, oldElement.props);
|
|
116
|
+
}
|
|
117
|
+
function isValidElement(object) {
|
|
118
|
+
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
119
|
+
}
|
|
120
|
+
function escape(key) {
|
|
121
|
+
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
122
|
+
return "$" + key.replace(/[=:]/g, function(match) {
|
|
123
|
+
return escaperLookup[match];
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
127
|
+
function getElementKey(element, index) {
|
|
128
|
+
return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
|
|
129
|
+
}
|
|
130
|
+
function resolveThenable(thenable) {
|
|
131
|
+
switch (thenable.status) {
|
|
132
|
+
case "fulfilled":
|
|
133
|
+
return thenable.value;
|
|
134
|
+
case "rejected":
|
|
135
|
+
throw thenable.reason;
|
|
136
|
+
default:
|
|
137
|
+
switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
|
|
138
|
+
function(fulfilledValue) {
|
|
139
|
+
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
140
|
+
},
|
|
141
|
+
function(error) {
|
|
142
|
+
"pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
|
143
|
+
}
|
|
144
|
+
)), thenable.status) {
|
|
145
|
+
case "fulfilled":
|
|
146
|
+
return thenable.value;
|
|
147
|
+
case "rejected":
|
|
148
|
+
throw thenable.reason;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
throw thenable;
|
|
152
|
+
}
|
|
153
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
154
|
+
var type = typeof children;
|
|
155
|
+
if ("undefined" === type || "boolean" === type) children = null;
|
|
156
|
+
var invokeCallback = false;
|
|
157
|
+
if (null === children) invokeCallback = true;
|
|
158
|
+
else
|
|
159
|
+
switch (type) {
|
|
160
|
+
case "bigint":
|
|
161
|
+
case "string":
|
|
162
|
+
case "number":
|
|
163
|
+
invokeCallback = true;
|
|
164
|
+
break;
|
|
165
|
+
case "object":
|
|
166
|
+
switch (children.$$typeof) {
|
|
167
|
+
case REACT_ELEMENT_TYPE:
|
|
168
|
+
case REACT_PORTAL_TYPE:
|
|
169
|
+
invokeCallback = true;
|
|
170
|
+
break;
|
|
171
|
+
case REACT_LAZY_TYPE:
|
|
172
|
+
return invokeCallback = children._init, mapIntoArray(
|
|
173
|
+
invokeCallback(children._payload),
|
|
174
|
+
array,
|
|
175
|
+
escapedPrefix,
|
|
176
|
+
nameSoFar,
|
|
177
|
+
callback
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (invokeCallback)
|
|
182
|
+
return callback = callback(children), invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
|
|
183
|
+
return c;
|
|
184
|
+
})) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(
|
|
185
|
+
callback,
|
|
186
|
+
escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(
|
|
187
|
+
userProvidedKeyEscapeRegex,
|
|
188
|
+
"$&/"
|
|
189
|
+
) + "/") + invokeCallback
|
|
190
|
+
)), array.push(callback)), 1;
|
|
191
|
+
invokeCallback = 0;
|
|
192
|
+
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
193
|
+
if (isArrayImpl(children))
|
|
194
|
+
for (var i = 0; i < children.length; i++)
|
|
195
|
+
nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
|
|
196
|
+
nameSoFar,
|
|
197
|
+
array,
|
|
198
|
+
escapedPrefix,
|
|
199
|
+
type,
|
|
200
|
+
callback
|
|
201
|
+
);
|
|
202
|
+
else if (i = getIteratorFn(children), "function" === typeof i)
|
|
203
|
+
for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
|
|
204
|
+
nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
|
|
205
|
+
nameSoFar,
|
|
206
|
+
array,
|
|
207
|
+
escapedPrefix,
|
|
208
|
+
type,
|
|
209
|
+
callback
|
|
210
|
+
);
|
|
211
|
+
else if ("object" === type) {
|
|
212
|
+
if ("function" === typeof children.then)
|
|
213
|
+
return mapIntoArray(
|
|
214
|
+
resolveThenable(children),
|
|
215
|
+
array,
|
|
216
|
+
escapedPrefix,
|
|
217
|
+
nameSoFar,
|
|
218
|
+
callback
|
|
219
|
+
);
|
|
220
|
+
array = String(children);
|
|
221
|
+
throw Error(
|
|
222
|
+
"Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
return invokeCallback;
|
|
226
|
+
}
|
|
227
|
+
function mapChildren(children, func, context) {
|
|
228
|
+
if (null == children) return children;
|
|
229
|
+
var result = [], count = 0;
|
|
230
|
+
mapIntoArray(children, result, "", "", function(child) {
|
|
231
|
+
return func.call(context, child, count++);
|
|
232
|
+
});
|
|
233
|
+
return result;
|
|
234
|
+
}
|
|
235
|
+
function lazyInitializer(payload) {
|
|
236
|
+
if (-1 === payload._status) {
|
|
237
|
+
var ctor = payload._result, thenable = ctor();
|
|
238
|
+
thenable.then(
|
|
239
|
+
function(moduleObject) {
|
|
240
|
+
if (0 === payload._status || -1 === payload._status)
|
|
241
|
+
payload._status = 1, payload._result = moduleObject, void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
|
|
242
|
+
},
|
|
243
|
+
function(error) {
|
|
244
|
+
if (0 === payload._status || -1 === payload._status)
|
|
245
|
+
payload._status = 2, payload._result = error, void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
-1 === payload._status && (payload._status = 0, payload._result = thenable);
|
|
249
|
+
}
|
|
250
|
+
if (1 === payload._status) return payload._result.default;
|
|
251
|
+
throw payload._result;
|
|
252
|
+
}
|
|
253
|
+
var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
|
|
254
|
+
if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
|
|
255
|
+
var event = new window.ErrorEvent("error", {
|
|
256
|
+
bubbles: true,
|
|
257
|
+
cancelable: true,
|
|
258
|
+
message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
|
|
259
|
+
error
|
|
260
|
+
});
|
|
261
|
+
if (!window.dispatchEvent(event)) return;
|
|
262
|
+
} else if ("object" === typeof process && "function" === typeof process.emit) {
|
|
263
|
+
process.emit("uncaughtException", error);
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
console.error(error);
|
|
267
|
+
};
|
|
268
|
+
function startTransition(scope) {
|
|
269
|
+
var prevTransition = ReactSharedInternals.T, currentTransition = {};
|
|
270
|
+
currentTransition.types = null !== prevTransition ? prevTransition.types : null;
|
|
271
|
+
ReactSharedInternals.T = currentTransition;
|
|
272
|
+
try {
|
|
273
|
+
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
|
274
|
+
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
|
|
275
|
+
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
|
|
276
|
+
} catch (error) {
|
|
277
|
+
reportGlobalError(error);
|
|
278
|
+
} finally {
|
|
279
|
+
null !== prevTransition && null !== currentTransition.types && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
function addTransitionType(type) {
|
|
283
|
+
var transition = ReactSharedInternals.T;
|
|
284
|
+
if (null !== transition) {
|
|
285
|
+
var transitionTypes = transition.types;
|
|
286
|
+
null === transitionTypes ? transition.types = [type] : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
|
|
287
|
+
} else startTransition(addTransitionType.bind(null, type));
|
|
288
|
+
}
|
|
289
|
+
var Children = {
|
|
290
|
+
map: mapChildren,
|
|
291
|
+
forEach: function(children, forEachFunc, forEachContext) {
|
|
292
|
+
mapChildren(
|
|
293
|
+
children,
|
|
294
|
+
function() {
|
|
295
|
+
forEachFunc.apply(this, arguments);
|
|
296
|
+
},
|
|
297
|
+
forEachContext
|
|
298
|
+
);
|
|
299
|
+
},
|
|
300
|
+
count: function(children) {
|
|
301
|
+
var n = 0;
|
|
302
|
+
mapChildren(children, function() {
|
|
303
|
+
n++;
|
|
304
|
+
});
|
|
305
|
+
return n;
|
|
306
|
+
},
|
|
307
|
+
toArray: function(children) {
|
|
308
|
+
return mapChildren(children, function(child) {
|
|
309
|
+
return child;
|
|
310
|
+
}) || [];
|
|
311
|
+
},
|
|
312
|
+
only: function(children) {
|
|
313
|
+
if (!isValidElement(children))
|
|
314
|
+
throw Error(
|
|
315
|
+
"React.Children.only expected to receive a single React element child."
|
|
316
|
+
);
|
|
317
|
+
return children;
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
exports2.Activity = REACT_ACTIVITY_TYPE;
|
|
321
|
+
exports2.Children = Children;
|
|
322
|
+
exports2.Component = Component;
|
|
323
|
+
exports2.Fragment = REACT_FRAGMENT_TYPE;
|
|
324
|
+
exports2.Profiler = REACT_PROFILER_TYPE;
|
|
325
|
+
exports2.PureComponent = PureComponent;
|
|
326
|
+
exports2.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
327
|
+
exports2.Suspense = REACT_SUSPENSE_TYPE;
|
|
328
|
+
exports2.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
|
|
329
|
+
exports2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
|
330
|
+
exports2.__COMPILER_RUNTIME = {
|
|
331
|
+
__proto__: null,
|
|
332
|
+
c: function(size) {
|
|
333
|
+
return ReactSharedInternals.H.useMemoCache(size);
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
exports2.addTransitionType = addTransitionType;
|
|
337
|
+
exports2.cache = function(fn) {
|
|
338
|
+
return function() {
|
|
339
|
+
return fn.apply(null, arguments);
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
exports2.cacheSignal = function() {
|
|
343
|
+
return null;
|
|
344
|
+
};
|
|
345
|
+
exports2.cloneElement = function(element, config, children) {
|
|
346
|
+
if (null === element || void 0 === element)
|
|
347
|
+
throw Error(
|
|
348
|
+
"The argument must be a React element, but you passed " + element + "."
|
|
349
|
+
);
|
|
350
|
+
var props = assign({}, element.props), key = element.key;
|
|
351
|
+
if (null != config)
|
|
352
|
+
for (propName in void 0 !== config.key && (key = "" + config.key), config)
|
|
353
|
+
!hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
|
|
354
|
+
var propName = arguments.length - 2;
|
|
355
|
+
if (1 === propName) props.children = children;
|
|
356
|
+
else if (1 < propName) {
|
|
357
|
+
for (var childArray = Array(propName), i = 0; i < propName; i++)
|
|
358
|
+
childArray[i] = arguments[i + 2];
|
|
359
|
+
props.children = childArray;
|
|
360
|
+
}
|
|
361
|
+
return ReactElement(element.type, key, props);
|
|
362
|
+
};
|
|
363
|
+
exports2.createContext = function(defaultValue) {
|
|
364
|
+
defaultValue = {
|
|
365
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
366
|
+
_currentValue: defaultValue,
|
|
367
|
+
_currentValue2: defaultValue,
|
|
368
|
+
_threadCount: 0,
|
|
369
|
+
Provider: null,
|
|
370
|
+
Consumer: null
|
|
371
|
+
};
|
|
372
|
+
defaultValue.Provider = defaultValue;
|
|
373
|
+
defaultValue.Consumer = {
|
|
374
|
+
$$typeof: REACT_CONSUMER_TYPE,
|
|
375
|
+
_context: defaultValue
|
|
376
|
+
};
|
|
377
|
+
return defaultValue;
|
|
378
|
+
};
|
|
379
|
+
exports2.createElement = function(type, config, children) {
|
|
380
|
+
var propName, props = {}, key = null;
|
|
381
|
+
if (null != config)
|
|
382
|
+
for (propName in void 0 !== config.key && (key = "" + config.key), config)
|
|
383
|
+
hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]);
|
|
384
|
+
var childrenLength = arguments.length - 2;
|
|
385
|
+
if (1 === childrenLength) props.children = children;
|
|
386
|
+
else if (1 < childrenLength) {
|
|
387
|
+
for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
|
|
388
|
+
childArray[i] = arguments[i + 2];
|
|
389
|
+
props.children = childArray;
|
|
390
|
+
}
|
|
391
|
+
if (type && type.defaultProps)
|
|
392
|
+
for (propName in childrenLength = type.defaultProps, childrenLength)
|
|
393
|
+
void 0 === props[propName] && (props[propName] = childrenLength[propName]);
|
|
394
|
+
return ReactElement(type, key, props);
|
|
395
|
+
};
|
|
396
|
+
exports2.createRef = function() {
|
|
397
|
+
return { current: null };
|
|
398
|
+
};
|
|
399
|
+
exports2.forwardRef = function(render) {
|
|
400
|
+
return { $$typeof: REACT_FORWARD_REF_TYPE, render };
|
|
401
|
+
};
|
|
402
|
+
exports2.isValidElement = isValidElement;
|
|
403
|
+
exports2.lazy = function(ctor) {
|
|
404
|
+
return {
|
|
405
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
406
|
+
_payload: { _status: -1, _result: ctor },
|
|
407
|
+
_init: lazyInitializer
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
exports2.memo = function(type, compare) {
|
|
411
|
+
return {
|
|
412
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
413
|
+
type,
|
|
414
|
+
compare: void 0 === compare ? null : compare
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
exports2.startTransition = startTransition;
|
|
418
|
+
exports2.unstable_useCacheRefresh = function() {
|
|
419
|
+
return ReactSharedInternals.H.useCacheRefresh();
|
|
420
|
+
};
|
|
421
|
+
exports2.use = function(usable) {
|
|
422
|
+
return ReactSharedInternals.H.use(usable);
|
|
423
|
+
};
|
|
424
|
+
exports2.useActionState = function(action, initialState, permalink) {
|
|
425
|
+
return ReactSharedInternals.H.useActionState(action, initialState, permalink);
|
|
426
|
+
};
|
|
427
|
+
exports2.useCallback = function(callback, deps) {
|
|
428
|
+
return ReactSharedInternals.H.useCallback(callback, deps);
|
|
429
|
+
};
|
|
430
|
+
exports2.useContext = function(Context) {
|
|
431
|
+
return ReactSharedInternals.H.useContext(Context);
|
|
432
|
+
};
|
|
433
|
+
exports2.useDebugValue = function() {
|
|
434
|
+
};
|
|
435
|
+
exports2.useDeferredValue = function(value, initialValue) {
|
|
436
|
+
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
|
|
437
|
+
};
|
|
438
|
+
exports2.useEffect = function(create, deps) {
|
|
439
|
+
return ReactSharedInternals.H.useEffect(create, deps);
|
|
440
|
+
};
|
|
441
|
+
exports2.useEffectEvent = function(callback) {
|
|
442
|
+
return ReactSharedInternals.H.useEffectEvent(callback);
|
|
443
|
+
};
|
|
444
|
+
exports2.useId = function() {
|
|
445
|
+
return ReactSharedInternals.H.useId();
|
|
446
|
+
};
|
|
447
|
+
exports2.useImperativeHandle = function(ref, create, deps) {
|
|
448
|
+
return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
|
|
449
|
+
};
|
|
450
|
+
exports2.useInsertionEffect = function(create, deps) {
|
|
451
|
+
return ReactSharedInternals.H.useInsertionEffect(create, deps);
|
|
452
|
+
};
|
|
453
|
+
exports2.useLayoutEffect = function(create, deps) {
|
|
454
|
+
return ReactSharedInternals.H.useLayoutEffect(create, deps);
|
|
455
|
+
};
|
|
456
|
+
exports2.useMemo = function(create, deps) {
|
|
457
|
+
return ReactSharedInternals.H.useMemo(create, deps);
|
|
458
|
+
};
|
|
459
|
+
exports2.useOptimistic = function(passthrough, reducer) {
|
|
460
|
+
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
|
|
461
|
+
};
|
|
462
|
+
exports2.useReducer = function(reducer, initialArg, init) {
|
|
463
|
+
return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
|
|
464
|
+
};
|
|
465
|
+
exports2.useRef = function(initialValue) {
|
|
466
|
+
return ReactSharedInternals.H.useRef(initialValue);
|
|
467
|
+
};
|
|
468
|
+
exports2.useState = function(initialState) {
|
|
469
|
+
return ReactSharedInternals.H.useState(initialState);
|
|
470
|
+
};
|
|
471
|
+
exports2.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
472
|
+
return ReactSharedInternals.H.useSyncExternalStore(
|
|
473
|
+
subscribe,
|
|
474
|
+
getSnapshot,
|
|
475
|
+
getServerSnapshot
|
|
476
|
+
);
|
|
477
|
+
};
|
|
478
|
+
exports2.useTransition = function() {
|
|
479
|
+
return ReactSharedInternals.H.useTransition();
|
|
480
|
+
};
|
|
481
|
+
exports2.version = "19.3.0";
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
// node_modules/react/cjs/react.development.js
|
|
486
|
+
var require_react_development = __commonJS({
|
|
487
|
+
"node_modules/react/cjs/react.development.js"(exports2, module2) {
|
|
488
|
+
"use strict";
|
|
489
|
+
"production" !== process.env.NODE_ENV && (function() {
|
|
490
|
+
function defineDeprecationWarning(methodName, info) {
|
|
491
|
+
Object.defineProperty(Component.prototype, methodName, {
|
|
492
|
+
get: function() {
|
|
493
|
+
console.warn(
|
|
494
|
+
"%s(...) is deprecated in plain JavaScript React classes. %s",
|
|
495
|
+
info[0],
|
|
496
|
+
info[1]
|
|
497
|
+
);
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
function getIteratorFn(maybeIterable) {
|
|
502
|
+
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
503
|
+
return null;
|
|
504
|
+
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
505
|
+
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
506
|
+
}
|
|
507
|
+
function warnNoop(publicInstance, callerName) {
|
|
508
|
+
publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
|
|
509
|
+
var warningKey = publicInstance + "." + callerName;
|
|
510
|
+
didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
|
|
511
|
+
"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
|
|
512
|
+
callerName,
|
|
513
|
+
publicInstance
|
|
514
|
+
), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
|
|
515
|
+
}
|
|
516
|
+
function Component(props, context, updater) {
|
|
517
|
+
this.props = props;
|
|
518
|
+
this.context = context;
|
|
519
|
+
this.refs = emptyObject;
|
|
520
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
521
|
+
}
|
|
522
|
+
function ComponentDummy() {
|
|
523
|
+
}
|
|
524
|
+
function PureComponent(props, context, updater) {
|
|
525
|
+
this.props = props;
|
|
526
|
+
this.context = context;
|
|
527
|
+
this.refs = emptyObject;
|
|
528
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
529
|
+
}
|
|
530
|
+
function noop() {
|
|
531
|
+
}
|
|
532
|
+
function testStringCoercion(value) {
|
|
533
|
+
return "" + value;
|
|
534
|
+
}
|
|
535
|
+
function checkKeyStringCoercion(value) {
|
|
536
|
+
try {
|
|
537
|
+
testStringCoercion(value);
|
|
538
|
+
var JSCompiler_inline_result = false;
|
|
539
|
+
} catch (e) {
|
|
540
|
+
JSCompiler_inline_result = true;
|
|
541
|
+
}
|
|
542
|
+
if (JSCompiler_inline_result) {
|
|
543
|
+
JSCompiler_inline_result = console;
|
|
544
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
545
|
+
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
546
|
+
JSCompiler_temp_const.call(
|
|
547
|
+
JSCompiler_inline_result,
|
|
548
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
549
|
+
JSCompiler_inline_result$jscomp$0
|
|
550
|
+
);
|
|
551
|
+
return testStringCoercion(value);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
function getComponentNameFromType(type) {
|
|
555
|
+
if (null == type) return null;
|
|
556
|
+
if ("function" === typeof type)
|
|
557
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
558
|
+
if ("string" === typeof type) return type;
|
|
559
|
+
switch (type) {
|
|
560
|
+
case REACT_FRAGMENT_TYPE:
|
|
561
|
+
return "Fragment";
|
|
562
|
+
case REACT_PROFILER_TYPE:
|
|
563
|
+
return "Profiler";
|
|
564
|
+
case REACT_STRICT_MODE_TYPE:
|
|
565
|
+
return "StrictMode";
|
|
566
|
+
case REACT_SUSPENSE_TYPE:
|
|
567
|
+
return "Suspense";
|
|
568
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
569
|
+
return "SuspenseList";
|
|
570
|
+
case REACT_ACTIVITY_TYPE:
|
|
571
|
+
return "Activity";
|
|
572
|
+
case REACT_VIEW_TRANSITION_TYPE:
|
|
573
|
+
return "ViewTransition";
|
|
574
|
+
}
|
|
575
|
+
if ("object" === typeof type)
|
|
576
|
+
switch ("number" === typeof type.tag && console.error(
|
|
577
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
578
|
+
), type.$$typeof) {
|
|
579
|
+
case REACT_PORTAL_TYPE:
|
|
580
|
+
return "Portal";
|
|
581
|
+
case REACT_CONTEXT_TYPE:
|
|
582
|
+
return type.displayName || "Context";
|
|
583
|
+
case REACT_CONSUMER_TYPE:
|
|
584
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
585
|
+
case REACT_FORWARD_REF_TYPE:
|
|
586
|
+
var innerType = type.render;
|
|
587
|
+
type = type.displayName;
|
|
588
|
+
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
589
|
+
return type;
|
|
590
|
+
case REACT_MEMO_TYPE:
|
|
591
|
+
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
592
|
+
case REACT_LAZY_TYPE:
|
|
593
|
+
innerType = type._payload;
|
|
594
|
+
type = type._init;
|
|
595
|
+
try {
|
|
596
|
+
return getComponentNameFromType(type(innerType));
|
|
597
|
+
} catch (x) {
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
return null;
|
|
601
|
+
}
|
|
602
|
+
function getTaskName(type) {
|
|
603
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
604
|
+
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
|
|
605
|
+
return "<...>";
|
|
606
|
+
try {
|
|
607
|
+
var name = getComponentNameFromType(type);
|
|
608
|
+
return name ? "<" + name + ">" : "<...>";
|
|
609
|
+
} catch (x) {
|
|
610
|
+
return "<...>";
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
function getOwner() {
|
|
614
|
+
var dispatcher = ReactSharedInternals.A;
|
|
615
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
616
|
+
}
|
|
617
|
+
function UnknownOwner() {
|
|
618
|
+
return Error("react-stack-top-frame");
|
|
619
|
+
}
|
|
620
|
+
function hasValidKey(config) {
|
|
621
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
622
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
623
|
+
if (getter && getter.isReactWarning) return false;
|
|
624
|
+
}
|
|
625
|
+
return void 0 !== config.key;
|
|
626
|
+
}
|
|
627
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
628
|
+
function warnAboutAccessingKey() {
|
|
629
|
+
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
|
|
630
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
631
|
+
displayName
|
|
632
|
+
));
|
|
633
|
+
}
|
|
634
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
635
|
+
Object.defineProperty(props, "key", {
|
|
636
|
+
get: warnAboutAccessingKey,
|
|
637
|
+
configurable: true
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
641
|
+
var componentName = getComponentNameFromType(this.type);
|
|
642
|
+
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
|
|
643
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
644
|
+
));
|
|
645
|
+
componentName = this.props.ref;
|
|
646
|
+
return void 0 !== componentName ? componentName : null;
|
|
647
|
+
}
|
|
648
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
649
|
+
var refProp = props.ref;
|
|
650
|
+
type = {
|
|
651
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
652
|
+
type,
|
|
653
|
+
key,
|
|
654
|
+
props,
|
|
655
|
+
_owner: owner
|
|
656
|
+
};
|
|
657
|
+
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
658
|
+
enumerable: false,
|
|
659
|
+
get: elementRefGetterWithDeprecationWarning
|
|
660
|
+
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
661
|
+
type._store = {};
|
|
662
|
+
Object.defineProperty(type._store, "validated", {
|
|
663
|
+
configurable: false,
|
|
664
|
+
enumerable: false,
|
|
665
|
+
writable: true,
|
|
666
|
+
value: 0
|
|
667
|
+
});
|
|
668
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
669
|
+
configurable: false,
|
|
670
|
+
enumerable: false,
|
|
671
|
+
writable: true,
|
|
672
|
+
value: null
|
|
673
|
+
});
|
|
674
|
+
Object.defineProperty(type, "_debugStack", {
|
|
675
|
+
configurable: false,
|
|
676
|
+
enumerable: false,
|
|
677
|
+
writable: true,
|
|
678
|
+
value: debugStack
|
|
679
|
+
});
|
|
680
|
+
Object.defineProperty(type, "_debugTask", {
|
|
681
|
+
configurable: false,
|
|
682
|
+
enumerable: false,
|
|
683
|
+
writable: true,
|
|
684
|
+
value: debugTask
|
|
685
|
+
});
|
|
686
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
687
|
+
return type;
|
|
688
|
+
}
|
|
689
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
690
|
+
newKey = ReactElement(
|
|
691
|
+
oldElement.type,
|
|
692
|
+
newKey,
|
|
693
|
+
oldElement.props,
|
|
694
|
+
oldElement._owner,
|
|
695
|
+
oldElement._debugStack,
|
|
696
|
+
oldElement._debugTask
|
|
697
|
+
);
|
|
698
|
+
oldElement._store && (newKey._store.validated = oldElement._store.validated);
|
|
699
|
+
return newKey;
|
|
700
|
+
}
|
|
701
|
+
function validateChildKeys(node) {
|
|
702
|
+
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
703
|
+
}
|
|
704
|
+
function isValidElement(object) {
|
|
705
|
+
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
706
|
+
}
|
|
707
|
+
function escape(key) {
|
|
708
|
+
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
709
|
+
return "$" + key.replace(/[=:]/g, function(match) {
|
|
710
|
+
return escaperLookup[match];
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
function getElementKey(element, index) {
|
|
714
|
+
return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
|
|
715
|
+
}
|
|
716
|
+
function resolveThenable(thenable) {
|
|
717
|
+
switch (thenable.status) {
|
|
718
|
+
case "fulfilled":
|
|
719
|
+
return thenable.value;
|
|
720
|
+
case "rejected":
|
|
721
|
+
throw thenable.reason;
|
|
722
|
+
default:
|
|
723
|
+
switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
|
|
724
|
+
function(fulfilledValue) {
|
|
725
|
+
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
726
|
+
},
|
|
727
|
+
function(error) {
|
|
728
|
+
"pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
|
729
|
+
}
|
|
730
|
+
)), thenable.status) {
|
|
731
|
+
case "fulfilled":
|
|
732
|
+
return thenable.value;
|
|
733
|
+
case "rejected":
|
|
734
|
+
throw thenable.reason;
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
throw thenable;
|
|
738
|
+
}
|
|
739
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
740
|
+
var type = typeof children;
|
|
741
|
+
if ("undefined" === type || "boolean" === type) children = null;
|
|
742
|
+
var invokeCallback = false;
|
|
743
|
+
if (null === children) invokeCallback = true;
|
|
744
|
+
else
|
|
745
|
+
switch (type) {
|
|
746
|
+
case "bigint":
|
|
747
|
+
case "string":
|
|
748
|
+
case "number":
|
|
749
|
+
invokeCallback = true;
|
|
750
|
+
break;
|
|
751
|
+
case "object":
|
|
752
|
+
switch (children.$$typeof) {
|
|
753
|
+
case REACT_ELEMENT_TYPE:
|
|
754
|
+
case REACT_PORTAL_TYPE:
|
|
755
|
+
invokeCallback = true;
|
|
756
|
+
break;
|
|
757
|
+
case REACT_LAZY_TYPE:
|
|
758
|
+
return invokeCallback = children._init, mapIntoArray(
|
|
759
|
+
invokeCallback(children._payload),
|
|
760
|
+
array,
|
|
761
|
+
escapedPrefix,
|
|
762
|
+
nameSoFar,
|
|
763
|
+
callback
|
|
764
|
+
);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
if (invokeCallback) {
|
|
768
|
+
invokeCallback = children;
|
|
769
|
+
callback = callback(invokeCallback);
|
|
770
|
+
var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
|
|
771
|
+
isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
|
|
772
|
+
return c;
|
|
773
|
+
})) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
|
|
774
|
+
callback,
|
|
775
|
+
escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
|
|
776
|
+
userProvidedKeyEscapeRegex,
|
|
777
|
+
"$&/"
|
|
778
|
+
) + "/") + childKey
|
|
779
|
+
), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
|
|
780
|
+
return 1;
|
|
781
|
+
}
|
|
782
|
+
invokeCallback = 0;
|
|
783
|
+
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
784
|
+
if (isArrayImpl(children))
|
|
785
|
+
for (var i = 0; i < children.length; i++)
|
|
786
|
+
nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
|
|
787
|
+
nameSoFar,
|
|
788
|
+
array,
|
|
789
|
+
escapedPrefix,
|
|
790
|
+
type,
|
|
791
|
+
callback
|
|
792
|
+
);
|
|
793
|
+
else if (i = getIteratorFn(children), "function" === typeof i)
|
|
794
|
+
for (i === children.entries && (didWarnAboutMaps || console.warn(
|
|
795
|
+
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
|
|
796
|
+
), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
|
|
797
|
+
nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
|
|
798
|
+
nameSoFar,
|
|
799
|
+
array,
|
|
800
|
+
escapedPrefix,
|
|
801
|
+
type,
|
|
802
|
+
callback
|
|
803
|
+
);
|
|
804
|
+
else if ("object" === type) {
|
|
805
|
+
if ("function" === typeof children.then)
|
|
806
|
+
return mapIntoArray(
|
|
807
|
+
resolveThenable(children),
|
|
808
|
+
array,
|
|
809
|
+
escapedPrefix,
|
|
810
|
+
nameSoFar,
|
|
811
|
+
callback
|
|
812
|
+
);
|
|
813
|
+
array = String(children);
|
|
814
|
+
throw Error(
|
|
815
|
+
"Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
|
|
816
|
+
);
|
|
817
|
+
}
|
|
818
|
+
return invokeCallback;
|
|
819
|
+
}
|
|
820
|
+
function mapChildren(children, func, context) {
|
|
821
|
+
if (null == children) return children;
|
|
822
|
+
var result = [], count = 0;
|
|
823
|
+
mapIntoArray(children, result, "", "", function(child) {
|
|
824
|
+
return func.call(context, child, count++);
|
|
825
|
+
});
|
|
826
|
+
return result;
|
|
827
|
+
}
|
|
828
|
+
function lazyInitializer(payload) {
|
|
829
|
+
if (-1 === payload._status) {
|
|
830
|
+
var resolveDebugValue = null, rejectDebugValue = null, ioInfo = payload._ioInfo;
|
|
831
|
+
null != ioInfo && (ioInfo.start = ioInfo.end = performance.now(), ioInfo.value = new Promise(function(resolve, reject) {
|
|
832
|
+
resolveDebugValue = resolve;
|
|
833
|
+
rejectDebugValue = reject;
|
|
834
|
+
}));
|
|
835
|
+
ioInfo = payload._result;
|
|
836
|
+
var thenable = ioInfo();
|
|
837
|
+
thenable.then(
|
|
838
|
+
function(moduleObject) {
|
|
839
|
+
if (0 === payload._status || -1 === payload._status) {
|
|
840
|
+
payload._status = 1;
|
|
841
|
+
payload._result = moduleObject;
|
|
842
|
+
var _ioInfo = payload._ioInfo;
|
|
843
|
+
if (null != _ioInfo) {
|
|
844
|
+
_ioInfo.end = performance.now();
|
|
845
|
+
var debugValue = null == moduleObject ? void 0 : moduleObject.default;
|
|
846
|
+
resolveDebugValue(debugValue);
|
|
847
|
+
_ioInfo.value.status = "fulfilled";
|
|
848
|
+
_ioInfo.value.value = debugValue;
|
|
849
|
+
}
|
|
850
|
+
void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
|
|
851
|
+
}
|
|
852
|
+
},
|
|
853
|
+
function(error) {
|
|
854
|
+
if (0 === payload._status || -1 === payload._status) {
|
|
855
|
+
payload._status = 2;
|
|
856
|
+
payload._result = error;
|
|
857
|
+
var _ioInfo2 = payload._ioInfo;
|
|
858
|
+
null != _ioInfo2 && (_ioInfo2.end = performance.now(), _ioInfo2.value.then(noop, noop), rejectDebugValue(error), _ioInfo2.value.status = "rejected", _ioInfo2.value.reason = error);
|
|
859
|
+
void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
);
|
|
863
|
+
ioInfo = payload._ioInfo;
|
|
864
|
+
if (null != ioInfo) {
|
|
865
|
+
var displayName = thenable.displayName;
|
|
866
|
+
"string" === typeof displayName && (ioInfo.name = displayName);
|
|
867
|
+
}
|
|
868
|
+
-1 === payload._status && (payload._status = 0, payload._result = thenable);
|
|
869
|
+
}
|
|
870
|
+
if (1 === payload._status)
|
|
871
|
+
return ioInfo = payload._result, void 0 === ioInfo && console.error(
|
|
872
|
+
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
|
|
873
|
+
ioInfo
|
|
874
|
+
), "default" in ioInfo || console.error(
|
|
875
|
+
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
|
|
876
|
+
ioInfo
|
|
877
|
+
), ioInfo.default;
|
|
878
|
+
throw payload._result;
|
|
879
|
+
}
|
|
880
|
+
function resolveDispatcher() {
|
|
881
|
+
var dispatcher = ReactSharedInternals.H;
|
|
882
|
+
null === dispatcher && console.error(
|
|
883
|
+
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
|
884
|
+
);
|
|
885
|
+
return dispatcher;
|
|
886
|
+
}
|
|
887
|
+
function releaseAsyncTransition() {
|
|
888
|
+
ReactSharedInternals.asyncTransitions--;
|
|
889
|
+
}
|
|
890
|
+
function startTransition(scope) {
|
|
891
|
+
var prevTransition = ReactSharedInternals.T, currentTransition = {};
|
|
892
|
+
currentTransition.types = null !== prevTransition ? prevTransition.types : null;
|
|
893
|
+
currentTransition._updatedFibers = /* @__PURE__ */ new Set();
|
|
894
|
+
ReactSharedInternals.T = currentTransition;
|
|
895
|
+
try {
|
|
896
|
+
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
|
897
|
+
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
|
|
898
|
+
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
|
|
899
|
+
} catch (error) {
|
|
900
|
+
reportGlobalError(error);
|
|
901
|
+
} finally {
|
|
902
|
+
null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
|
|
903
|
+
"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
|
|
904
|
+
)), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
|
|
905
|
+
"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
|
|
906
|
+
), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
function addTransitionType(type) {
|
|
910
|
+
var transition = ReactSharedInternals.T;
|
|
911
|
+
if (null !== transition) {
|
|
912
|
+
var transitionTypes = transition.types;
|
|
913
|
+
null === transitionTypes ? transition.types = [type] : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
|
|
914
|
+
} else
|
|
915
|
+
0 === ReactSharedInternals.asyncTransitions && console.error(
|
|
916
|
+
"addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition."
|
|
917
|
+
), startTransition(addTransitionType.bind(null, type));
|
|
918
|
+
}
|
|
919
|
+
function enqueueTask(task) {
|
|
920
|
+
if (null === enqueueTaskImpl)
|
|
921
|
+
try {
|
|
922
|
+
var requireString = ("require" + Math.random()).slice(0, 7);
|
|
923
|
+
enqueueTaskImpl = (module2 && module2[requireString]).call(
|
|
924
|
+
module2,
|
|
925
|
+
"timers"
|
|
926
|
+
).setImmediate;
|
|
927
|
+
} catch (_err) {
|
|
928
|
+
enqueueTaskImpl = function(callback) {
|
|
929
|
+
false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
|
|
930
|
+
"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
|
|
931
|
+
));
|
|
932
|
+
var channel = new MessageChannel();
|
|
933
|
+
channel.port1.onmessage = callback;
|
|
934
|
+
channel.port2.postMessage(void 0);
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
return enqueueTaskImpl(task);
|
|
938
|
+
}
|
|
939
|
+
function aggregateErrors(errors) {
|
|
940
|
+
return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
|
|
941
|
+
}
|
|
942
|
+
function popActScope(prevActQueue, prevActScopeDepth) {
|
|
943
|
+
prevActScopeDepth !== actScopeDepth - 1 && console.error(
|
|
944
|
+
"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
|
|
945
|
+
);
|
|
946
|
+
actScopeDepth = prevActScopeDepth;
|
|
947
|
+
}
|
|
948
|
+
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
949
|
+
var queue = ReactSharedInternals.actQueue;
|
|
950
|
+
if (null !== queue)
|
|
951
|
+
if (0 !== queue.length)
|
|
952
|
+
try {
|
|
953
|
+
flushActQueue(queue);
|
|
954
|
+
enqueueTask(function() {
|
|
955
|
+
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
956
|
+
});
|
|
957
|
+
return;
|
|
958
|
+
} catch (error) {
|
|
959
|
+
ReactSharedInternals.thrownErrors.push(error);
|
|
960
|
+
}
|
|
961
|
+
else ReactSharedInternals.actQueue = null;
|
|
962
|
+
0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
|
|
963
|
+
}
|
|
964
|
+
function flushActQueue(queue) {
|
|
965
|
+
if (!isFlushing) {
|
|
966
|
+
isFlushing = true;
|
|
967
|
+
var i = 0;
|
|
968
|
+
try {
|
|
969
|
+
for (; i < queue.length; i++) {
|
|
970
|
+
var callback = queue[i];
|
|
971
|
+
do {
|
|
972
|
+
ReactSharedInternals.didUsePromise = false;
|
|
973
|
+
var continuation = callback(false);
|
|
974
|
+
if (null !== continuation) {
|
|
975
|
+
if (ReactSharedInternals.didUsePromise) {
|
|
976
|
+
queue[i] = callback;
|
|
977
|
+
queue.splice(0, i);
|
|
978
|
+
return;
|
|
979
|
+
}
|
|
980
|
+
callback = continuation;
|
|
981
|
+
} else break;
|
|
982
|
+
} while (1);
|
|
983
|
+
}
|
|
984
|
+
queue.length = 0;
|
|
985
|
+
} catch (error) {
|
|
986
|
+
queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
|
|
987
|
+
} finally {
|
|
988
|
+
isFlushing = false;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
993
|
+
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
|
|
994
|
+
isMounted: function() {
|
|
995
|
+
return false;
|
|
996
|
+
},
|
|
997
|
+
enqueueForceUpdate: function(publicInstance) {
|
|
998
|
+
warnNoop(publicInstance, "forceUpdate");
|
|
999
|
+
},
|
|
1000
|
+
enqueueReplaceState: function(publicInstance) {
|
|
1001
|
+
warnNoop(publicInstance, "replaceState");
|
|
1002
|
+
},
|
|
1003
|
+
enqueueSetState: function(publicInstance) {
|
|
1004
|
+
warnNoop(publicInstance, "setState");
|
|
1005
|
+
}
|
|
1006
|
+
}, assign = Object.assign, emptyObject = {};
|
|
1007
|
+
Object.freeze(emptyObject);
|
|
1008
|
+
Component.prototype.isReactComponent = {};
|
|
1009
|
+
Component.prototype.setState = function(partialState, callback) {
|
|
1010
|
+
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
|
|
1011
|
+
throw Error(
|
|
1012
|
+
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
1013
|
+
);
|
|
1014
|
+
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
1015
|
+
};
|
|
1016
|
+
Component.prototype.forceUpdate = function(callback) {
|
|
1017
|
+
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
1018
|
+
};
|
|
1019
|
+
var deprecatedAPIs = {
|
|
1020
|
+
isMounted: [
|
|
1021
|
+
"isMounted",
|
|
1022
|
+
"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
|
|
1023
|
+
],
|
|
1024
|
+
replaceState: [
|
|
1025
|
+
"replaceState",
|
|
1026
|
+
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
|
|
1027
|
+
]
|
|
1028
|
+
};
|
|
1029
|
+
for (fnName in deprecatedAPIs)
|
|
1030
|
+
deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
1031
|
+
ComponentDummy.prototype = Component.prototype;
|
|
1032
|
+
deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
|
|
1033
|
+
deprecatedAPIs.constructor = PureComponent;
|
|
1034
|
+
assign(deprecatedAPIs, Component.prototype);
|
|
1035
|
+
deprecatedAPIs.isPureReactComponent = true;
|
|
1036
|
+
var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = {
|
|
1037
|
+
H: null,
|
|
1038
|
+
A: null,
|
|
1039
|
+
T: null,
|
|
1040
|
+
S: null,
|
|
1041
|
+
actQueue: null,
|
|
1042
|
+
asyncTransitions: 0,
|
|
1043
|
+
isBatchingLegacy: false,
|
|
1044
|
+
didScheduleLegacyUpdate: false,
|
|
1045
|
+
didUsePromise: false,
|
|
1046
|
+
thrownErrors: [],
|
|
1047
|
+
getCurrentStack: null,
|
|
1048
|
+
recentlyCreatedOwnerStacks: 0
|
|
1049
|
+
}, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
|
|
1050
|
+
return null;
|
|
1051
|
+
};
|
|
1052
|
+
deprecatedAPIs = {
|
|
1053
|
+
react_stack_bottom_frame: function(callStackForError) {
|
|
1054
|
+
return callStackForError();
|
|
1055
|
+
}
|
|
1056
|
+
};
|
|
1057
|
+
var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
|
|
1058
|
+
var didWarnAboutElementRef = {};
|
|
1059
|
+
var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
|
|
1060
|
+
deprecatedAPIs,
|
|
1061
|
+
UnknownOwner
|
|
1062
|
+
)();
|
|
1063
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
1064
|
+
var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
|
|
1065
|
+
if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
|
|
1066
|
+
var event = new window.ErrorEvent("error", {
|
|
1067
|
+
bubbles: true,
|
|
1068
|
+
cancelable: true,
|
|
1069
|
+
message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
|
|
1070
|
+
error
|
|
1071
|
+
});
|
|
1072
|
+
if (!window.dispatchEvent(event)) return;
|
|
1073
|
+
} else if ("object" === typeof process && "function" === typeof process.emit) {
|
|
1074
|
+
process.emit("uncaughtException", error);
|
|
1075
|
+
return;
|
|
1076
|
+
}
|
|
1077
|
+
console.error(error);
|
|
1078
|
+
}, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
|
|
1079
|
+
queueMicrotask(function() {
|
|
1080
|
+
return queueMicrotask(callback);
|
|
1081
|
+
});
|
|
1082
|
+
} : enqueueTask;
|
|
1083
|
+
deprecatedAPIs = Object.freeze({
|
|
1084
|
+
__proto__: null,
|
|
1085
|
+
c: function(size) {
|
|
1086
|
+
return resolveDispatcher().useMemoCache(size);
|
|
1087
|
+
}
|
|
1088
|
+
});
|
|
1089
|
+
var fnName = {
|
|
1090
|
+
map: mapChildren,
|
|
1091
|
+
forEach: function(children, forEachFunc, forEachContext) {
|
|
1092
|
+
mapChildren(
|
|
1093
|
+
children,
|
|
1094
|
+
function() {
|
|
1095
|
+
forEachFunc.apply(this, arguments);
|
|
1096
|
+
},
|
|
1097
|
+
forEachContext
|
|
1098
|
+
);
|
|
1099
|
+
},
|
|
1100
|
+
count: function(children) {
|
|
1101
|
+
var n = 0;
|
|
1102
|
+
mapChildren(children, function() {
|
|
1103
|
+
n++;
|
|
1104
|
+
});
|
|
1105
|
+
return n;
|
|
1106
|
+
},
|
|
1107
|
+
toArray: function(children) {
|
|
1108
|
+
return mapChildren(children, function(child) {
|
|
1109
|
+
return child;
|
|
1110
|
+
}) || [];
|
|
1111
|
+
},
|
|
1112
|
+
only: function(children) {
|
|
1113
|
+
if (!isValidElement(children))
|
|
1114
|
+
throw Error(
|
|
1115
|
+
"React.Children.only expected to receive a single React element child."
|
|
1116
|
+
);
|
|
1117
|
+
return children;
|
|
1118
|
+
}
|
|
1119
|
+
};
|
|
1120
|
+
exports2.Activity = REACT_ACTIVITY_TYPE;
|
|
1121
|
+
exports2.Children = fnName;
|
|
1122
|
+
exports2.Component = Component;
|
|
1123
|
+
exports2.Fragment = REACT_FRAGMENT_TYPE;
|
|
1124
|
+
exports2.Profiler = REACT_PROFILER_TYPE;
|
|
1125
|
+
exports2.PureComponent = PureComponent;
|
|
1126
|
+
exports2.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1127
|
+
exports2.Suspense = REACT_SUSPENSE_TYPE;
|
|
1128
|
+
exports2.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
|
|
1129
|
+
exports2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
|
1130
|
+
exports2.__COMPILER_RUNTIME = deprecatedAPIs;
|
|
1131
|
+
exports2.act = function(callback) {
|
|
1132
|
+
var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
|
|
1133
|
+
actScopeDepth++;
|
|
1134
|
+
var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
|
|
1135
|
+
try {
|
|
1136
|
+
var result = callback();
|
|
1137
|
+
} catch (error) {
|
|
1138
|
+
ReactSharedInternals.thrownErrors.push(error);
|
|
1139
|
+
}
|
|
1140
|
+
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
1141
|
+
throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
1142
|
+
if (null !== result && "object" === typeof result && "function" === typeof result.then) {
|
|
1143
|
+
var thenable = result;
|
|
1144
|
+
queueSeveralMicrotasks(function() {
|
|
1145
|
+
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
|
|
1146
|
+
"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
|
|
1147
|
+
));
|
|
1148
|
+
});
|
|
1149
|
+
return {
|
|
1150
|
+
then: function(resolve, reject) {
|
|
1151
|
+
didAwaitActCall = true;
|
|
1152
|
+
thenable.then(
|
|
1153
|
+
function(returnValue) {
|
|
1154
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
1155
|
+
if (0 === prevActScopeDepth) {
|
|
1156
|
+
try {
|
|
1157
|
+
flushActQueue(queue), enqueueTask(function() {
|
|
1158
|
+
return recursivelyFlushAsyncActWork(
|
|
1159
|
+
returnValue,
|
|
1160
|
+
resolve,
|
|
1161
|
+
reject
|
|
1162
|
+
);
|
|
1163
|
+
});
|
|
1164
|
+
} catch (error$0) {
|
|
1165
|
+
ReactSharedInternals.thrownErrors.push(error$0);
|
|
1166
|
+
}
|
|
1167
|
+
if (0 < ReactSharedInternals.thrownErrors.length) {
|
|
1168
|
+
var _thrownError = aggregateErrors(
|
|
1169
|
+
ReactSharedInternals.thrownErrors
|
|
1170
|
+
);
|
|
1171
|
+
ReactSharedInternals.thrownErrors.length = 0;
|
|
1172
|
+
reject(_thrownError);
|
|
1173
|
+
}
|
|
1174
|
+
} else resolve(returnValue);
|
|
1175
|
+
},
|
|
1176
|
+
function(error) {
|
|
1177
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
1178
|
+
0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
|
|
1179
|
+
ReactSharedInternals.thrownErrors
|
|
1180
|
+
), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
|
|
1181
|
+
}
|
|
1182
|
+
);
|
|
1183
|
+
}
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
var returnValue$jscomp$0 = result;
|
|
1187
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
1188
|
+
0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
|
|
1189
|
+
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
|
|
1190
|
+
"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
|
|
1191
|
+
));
|
|
1192
|
+
}), ReactSharedInternals.actQueue = null);
|
|
1193
|
+
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
1194
|
+
throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
1195
|
+
return {
|
|
1196
|
+
then: function(resolve, reject) {
|
|
1197
|
+
didAwaitActCall = true;
|
|
1198
|
+
0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
|
|
1199
|
+
return recursivelyFlushAsyncActWork(
|
|
1200
|
+
returnValue$jscomp$0,
|
|
1201
|
+
resolve,
|
|
1202
|
+
reject
|
|
1203
|
+
);
|
|
1204
|
+
})) : resolve(returnValue$jscomp$0);
|
|
1205
|
+
}
|
|
1206
|
+
};
|
|
1207
|
+
};
|
|
1208
|
+
exports2.addTransitionType = addTransitionType;
|
|
1209
|
+
exports2.cache = function(fn) {
|
|
1210
|
+
return function() {
|
|
1211
|
+
return fn.apply(null, arguments);
|
|
1212
|
+
};
|
|
1213
|
+
};
|
|
1214
|
+
exports2.cacheSignal = function() {
|
|
1215
|
+
return null;
|
|
1216
|
+
};
|
|
1217
|
+
exports2.captureOwnerStack = function() {
|
|
1218
|
+
var getCurrentStack = ReactSharedInternals.getCurrentStack;
|
|
1219
|
+
return null === getCurrentStack ? null : getCurrentStack();
|
|
1220
|
+
};
|
|
1221
|
+
exports2.cloneElement = function(element, config, children) {
|
|
1222
|
+
if (null === element || void 0 === element)
|
|
1223
|
+
throw Error(
|
|
1224
|
+
"The argument must be a React element, but you passed " + element + "."
|
|
1225
|
+
);
|
|
1226
|
+
var props = assign({}, element.props), key = element.key, owner = element._owner;
|
|
1227
|
+
if (null != config) {
|
|
1228
|
+
var JSCompiler_inline_result;
|
|
1229
|
+
a: {
|
|
1230
|
+
if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
|
|
1231
|
+
config,
|
|
1232
|
+
"ref"
|
|
1233
|
+
).get) && JSCompiler_inline_result.isReactWarning) {
|
|
1234
|
+
JSCompiler_inline_result = false;
|
|
1235
|
+
break a;
|
|
1236
|
+
}
|
|
1237
|
+
JSCompiler_inline_result = void 0 !== config.ref;
|
|
1238
|
+
}
|
|
1239
|
+
JSCompiler_inline_result && (owner = getOwner());
|
|
1240
|
+
hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
|
|
1241
|
+
for (propName in config)
|
|
1242
|
+
!hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
|
|
1243
|
+
}
|
|
1244
|
+
var propName = arguments.length - 2;
|
|
1245
|
+
if (1 === propName) props.children = children;
|
|
1246
|
+
else if (1 < propName) {
|
|
1247
|
+
JSCompiler_inline_result = Array(propName);
|
|
1248
|
+
for (var i = 0; i < propName; i++)
|
|
1249
|
+
JSCompiler_inline_result[i] = arguments[i + 2];
|
|
1250
|
+
props.children = JSCompiler_inline_result;
|
|
1251
|
+
}
|
|
1252
|
+
props = ReactElement(
|
|
1253
|
+
element.type,
|
|
1254
|
+
key,
|
|
1255
|
+
props,
|
|
1256
|
+
owner,
|
|
1257
|
+
element._debugStack,
|
|
1258
|
+
element._debugTask
|
|
1259
|
+
);
|
|
1260
|
+
for (key = 2; key < arguments.length; key++)
|
|
1261
|
+
validateChildKeys(arguments[key]);
|
|
1262
|
+
return props;
|
|
1263
|
+
};
|
|
1264
|
+
exports2.createContext = function(defaultValue) {
|
|
1265
|
+
defaultValue = {
|
|
1266
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
1267
|
+
_currentValue: defaultValue,
|
|
1268
|
+
_currentValue2: defaultValue,
|
|
1269
|
+
_threadCount: 0,
|
|
1270
|
+
Provider: null,
|
|
1271
|
+
Consumer: null
|
|
1272
|
+
};
|
|
1273
|
+
defaultValue.Provider = defaultValue;
|
|
1274
|
+
defaultValue.Consumer = {
|
|
1275
|
+
$$typeof: REACT_CONSUMER_TYPE,
|
|
1276
|
+
_context: defaultValue
|
|
1277
|
+
};
|
|
1278
|
+
defaultValue._currentRenderer = null;
|
|
1279
|
+
defaultValue._currentRenderer2 = null;
|
|
1280
|
+
return defaultValue;
|
|
1281
|
+
};
|
|
1282
|
+
exports2.createElement = function(type, config, children) {
|
|
1283
|
+
for (var i = 2; i < arguments.length; i++)
|
|
1284
|
+
validateChildKeys(arguments[i]);
|
|
1285
|
+
var propName;
|
|
1286
|
+
i = {};
|
|
1287
|
+
var key = null;
|
|
1288
|
+
if (null != config)
|
|
1289
|
+
for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
|
|
1290
|
+
"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
|
|
1291
|
+
)), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config)
|
|
1292
|
+
hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
|
|
1293
|
+
var childrenLength = arguments.length - 2;
|
|
1294
|
+
if (1 === childrenLength) i.children = children;
|
|
1295
|
+
else if (1 < childrenLength) {
|
|
1296
|
+
for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
|
|
1297
|
+
childArray[_i] = arguments[_i + 2];
|
|
1298
|
+
Object.freeze && Object.freeze(childArray);
|
|
1299
|
+
i.children = childArray;
|
|
1300
|
+
}
|
|
1301
|
+
if (type && type.defaultProps)
|
|
1302
|
+
for (propName in childrenLength = type.defaultProps, childrenLength)
|
|
1303
|
+
void 0 === i[propName] && (i[propName] = childrenLength[propName]);
|
|
1304
|
+
key && defineKeyPropWarningGetter(
|
|
1305
|
+
i,
|
|
1306
|
+
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
|
|
1307
|
+
);
|
|
1308
|
+
(propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++) ? (childArray = Error.stackTraceLimit, Error.stackTraceLimit = 10, childrenLength = Error("react-stack-top-frame"), Error.stackTraceLimit = childArray) : childrenLength = unknownOwnerDebugStack;
|
|
1309
|
+
return ReactElement(
|
|
1310
|
+
type,
|
|
1311
|
+
key,
|
|
1312
|
+
i,
|
|
1313
|
+
getOwner(),
|
|
1314
|
+
childrenLength,
|
|
1315
|
+
propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
1316
|
+
);
|
|
1317
|
+
};
|
|
1318
|
+
exports2.createRef = function() {
|
|
1319
|
+
var refObject = { current: null };
|
|
1320
|
+
Object.seal(refObject);
|
|
1321
|
+
return refObject;
|
|
1322
|
+
};
|
|
1323
|
+
exports2.forwardRef = function(render) {
|
|
1324
|
+
null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
|
|
1325
|
+
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
|
|
1326
|
+
) : "function" !== typeof render ? console.error(
|
|
1327
|
+
"forwardRef requires a render function but was given %s.",
|
|
1328
|
+
null === render ? "null" : typeof render
|
|
1329
|
+
) : 0 !== render.length && 2 !== render.length && console.error(
|
|
1330
|
+
"forwardRef render functions accept exactly two parameters: props and ref. %s",
|
|
1331
|
+
1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
|
|
1332
|
+
);
|
|
1333
|
+
null != render && null != render.defaultProps && console.error(
|
|
1334
|
+
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
|
|
1335
|
+
);
|
|
1336
|
+
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
|
|
1337
|
+
Object.defineProperty(elementType, "displayName", {
|
|
1338
|
+
enumerable: false,
|
|
1339
|
+
configurable: true,
|
|
1340
|
+
get: function() {
|
|
1341
|
+
return ownName;
|
|
1342
|
+
},
|
|
1343
|
+
set: function(name) {
|
|
1344
|
+
ownName = name;
|
|
1345
|
+
render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
|
|
1346
|
+
}
|
|
1347
|
+
});
|
|
1348
|
+
return elementType;
|
|
1349
|
+
};
|
|
1350
|
+
exports2.isValidElement = isValidElement;
|
|
1351
|
+
exports2.lazy = function(ctor) {
|
|
1352
|
+
ctor = { _status: -1, _result: ctor };
|
|
1353
|
+
var lazyType = {
|
|
1354
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
1355
|
+
_payload: ctor,
|
|
1356
|
+
_init: lazyInitializer
|
|
1357
|
+
}, ioInfo = {
|
|
1358
|
+
name: "lazy",
|
|
1359
|
+
start: -1,
|
|
1360
|
+
end: -1,
|
|
1361
|
+
value: null,
|
|
1362
|
+
owner: null,
|
|
1363
|
+
debugStack: Error("react-stack-top-frame"),
|
|
1364
|
+
debugTask: console.createTask ? console.createTask("lazy()") : null
|
|
1365
|
+
};
|
|
1366
|
+
ctor._ioInfo = ioInfo;
|
|
1367
|
+
lazyType._debugInfo = [{ awaited: ioInfo }];
|
|
1368
|
+
return lazyType;
|
|
1369
|
+
};
|
|
1370
|
+
exports2.memo = function(type, compare) {
|
|
1371
|
+
null == type && console.error(
|
|
1372
|
+
"memo: The first argument must be a component. Instead received: %s",
|
|
1373
|
+
null === type ? "null" : typeof type
|
|
1374
|
+
);
|
|
1375
|
+
compare = {
|
|
1376
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
1377
|
+
type,
|
|
1378
|
+
compare: void 0 === compare ? null : compare
|
|
1379
|
+
};
|
|
1380
|
+
var ownName;
|
|
1381
|
+
Object.defineProperty(compare, "displayName", {
|
|
1382
|
+
enumerable: false,
|
|
1383
|
+
configurable: true,
|
|
1384
|
+
get: function() {
|
|
1385
|
+
return ownName;
|
|
1386
|
+
},
|
|
1387
|
+
set: function(name) {
|
|
1388
|
+
ownName = name;
|
|
1389
|
+
type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
|
|
1390
|
+
}
|
|
1391
|
+
});
|
|
1392
|
+
return compare;
|
|
1393
|
+
};
|
|
1394
|
+
exports2.startTransition = startTransition;
|
|
1395
|
+
exports2.unstable_useCacheRefresh = function() {
|
|
1396
|
+
return resolveDispatcher().useCacheRefresh();
|
|
1397
|
+
};
|
|
1398
|
+
exports2.use = function(usable) {
|
|
1399
|
+
return resolveDispatcher().use(usable);
|
|
1400
|
+
};
|
|
1401
|
+
exports2.useActionState = function(action, initialState, permalink) {
|
|
1402
|
+
return resolveDispatcher().useActionState(
|
|
1403
|
+
action,
|
|
1404
|
+
initialState,
|
|
1405
|
+
permalink
|
|
1406
|
+
);
|
|
1407
|
+
};
|
|
1408
|
+
exports2.useCallback = function(callback, deps) {
|
|
1409
|
+
return resolveDispatcher().useCallback(callback, deps);
|
|
1410
|
+
};
|
|
1411
|
+
exports2.useContext = function(Context) {
|
|
1412
|
+
var dispatcher = resolveDispatcher();
|
|
1413
|
+
Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
|
|
1414
|
+
"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
|
|
1415
|
+
);
|
|
1416
|
+
return dispatcher.useContext(Context);
|
|
1417
|
+
};
|
|
1418
|
+
exports2.useDebugValue = function(value, formatterFn) {
|
|
1419
|
+
return resolveDispatcher().useDebugValue(value, formatterFn);
|
|
1420
|
+
};
|
|
1421
|
+
exports2.useDeferredValue = function(value, initialValue) {
|
|
1422
|
+
return resolveDispatcher().useDeferredValue(value, initialValue);
|
|
1423
|
+
};
|
|
1424
|
+
exports2.useEffect = function(create, deps) {
|
|
1425
|
+
null == create && console.warn(
|
|
1426
|
+
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1427
|
+
);
|
|
1428
|
+
return resolveDispatcher().useEffect(create, deps);
|
|
1429
|
+
};
|
|
1430
|
+
exports2.useEffectEvent = function(callback) {
|
|
1431
|
+
return resolveDispatcher().useEffectEvent(callback);
|
|
1432
|
+
};
|
|
1433
|
+
exports2.useId = function() {
|
|
1434
|
+
return resolveDispatcher().useId();
|
|
1435
|
+
};
|
|
1436
|
+
exports2.useImperativeHandle = function(ref, create, deps) {
|
|
1437
|
+
return resolveDispatcher().useImperativeHandle(ref, create, deps);
|
|
1438
|
+
};
|
|
1439
|
+
exports2.useInsertionEffect = function(create, deps) {
|
|
1440
|
+
null == create && console.warn(
|
|
1441
|
+
"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1442
|
+
);
|
|
1443
|
+
return resolveDispatcher().useInsertionEffect(create, deps);
|
|
1444
|
+
};
|
|
1445
|
+
exports2.useLayoutEffect = function(create, deps) {
|
|
1446
|
+
null == create && console.warn(
|
|
1447
|
+
"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1448
|
+
);
|
|
1449
|
+
return resolveDispatcher().useLayoutEffect(create, deps);
|
|
1450
|
+
};
|
|
1451
|
+
exports2.useMemo = function(create, deps) {
|
|
1452
|
+
return resolveDispatcher().useMemo(create, deps);
|
|
1453
|
+
};
|
|
1454
|
+
exports2.useOptimistic = function(passthrough, reducer) {
|
|
1455
|
+
return resolveDispatcher().useOptimistic(passthrough, reducer);
|
|
1456
|
+
};
|
|
1457
|
+
exports2.useReducer = function(reducer, initialArg, init) {
|
|
1458
|
+
return resolveDispatcher().useReducer(reducer, initialArg, init);
|
|
1459
|
+
};
|
|
1460
|
+
exports2.useRef = function(initialValue) {
|
|
1461
|
+
return resolveDispatcher().useRef(initialValue);
|
|
1462
|
+
};
|
|
1463
|
+
exports2.useState = function(initialState) {
|
|
1464
|
+
return resolveDispatcher().useState(initialState);
|
|
1465
|
+
};
|
|
1466
|
+
exports2.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
1467
|
+
return resolveDispatcher().useSyncExternalStore(
|
|
1468
|
+
subscribe,
|
|
1469
|
+
getSnapshot,
|
|
1470
|
+
getServerSnapshot
|
|
1471
|
+
);
|
|
1472
|
+
};
|
|
1473
|
+
exports2.useTransition = function() {
|
|
1474
|
+
return resolveDispatcher().useTransition();
|
|
1475
|
+
};
|
|
1476
|
+
exports2.version = "19.3.0";
|
|
1477
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1478
|
+
})();
|
|
1479
|
+
}
|
|
1480
|
+
});
|
|
1481
|
+
|
|
1482
|
+
// node_modules/react/index.js
|
|
1483
|
+
var require_react = __commonJS({
|
|
1484
|
+
"node_modules/react/index.js"(exports2, module2) {
|
|
1485
|
+
"use strict";
|
|
1486
|
+
if (process.env.NODE_ENV === "production") {
|
|
1487
|
+
module2.exports = require_react_production();
|
|
1488
|
+
} else {
|
|
1489
|
+
module2.exports = require_react_development();
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
});
|
|
1493
|
+
|
|
30
1494
|
// src/service/index.ts
|
|
31
1495
|
var service_exports = {};
|
|
32
1496
|
__export(service_exports, {
|
|
@@ -45,6 +1509,7 @@ __export(service_exports, {
|
|
|
45
1509
|
createLicenceObject: () => createLicenceObject,
|
|
46
1510
|
didRemoveAnyEventDates: () => didRemoveAnyEventDates,
|
|
47
1511
|
ensureUserLicenseCompliance: () => ensureUserLicenseCompliance,
|
|
1512
|
+
ensureUserLicenseComplianceForUser: () => ensureUserLicenseComplianceForUser,
|
|
48
1513
|
eventLicences: () => eventLicences,
|
|
49
1514
|
findAffiliateByPromoCode: () => findAffiliateByPromoCode,
|
|
50
1515
|
findEventOrImportedMarketById: () => findEventOrImportedMarketById,
|
|
@@ -303,6 +1768,7 @@ setVerbosity(globalThis.__DEV__ !== false ? "log" : "silent");
|
|
|
303
1768
|
|
|
304
1769
|
// node_modules/@timardex/cluemart-shared/dist/index.mjs
|
|
305
1770
|
var import_graphql2 = require("graphql");
|
|
1771
|
+
var import_react = __toESM(require_react(), 1);
|
|
306
1772
|
var EnumInviteStatus = /* @__PURE__ */ ((EnumInviteStatus22) => {
|
|
307
1773
|
EnumInviteStatus22["ACCEPTED"] = "Accepted";
|
|
308
1774
|
EnumInviteStatus22["COMPLETED"] = "Completed";
|
|
@@ -388,8 +1854,8 @@ var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource22) => {
|
|
|
388
1854
|
return EnumRelationResource22;
|
|
389
1855
|
})(EnumRelationResource || {});
|
|
390
1856
|
var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceType22) => {
|
|
391
|
-
EnumNotificationResourceType22["APPROVED_AFFILIATE"] = "approved_affiliate";
|
|
392
1857
|
EnumNotificationResourceType22["AFFILIATE_REWARD_RECEIVED"] = "affiliate_reward_received";
|
|
1858
|
+
EnumNotificationResourceType22["APPROVED_AFFILIATE"] = "approved_affiliate";
|
|
393
1859
|
EnumNotificationResourceType22["APPROVED_EVENT"] = "approved_event";
|
|
394
1860
|
EnumNotificationResourceType22["APPROVED_PARTNER"] = "approved_partner";
|
|
395
1861
|
EnumNotificationResourceType22["APPROVED_SCHOOL"] = "approved_school";
|
|
@@ -417,6 +1883,7 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
|
|
|
417
1883
|
EnumNotificationResourceType22["NEW_POST_CREATED"] = "new_post_created";
|
|
418
1884
|
EnumNotificationResourceType22["REGISTERED_USER_BY_SCHOOL_CODE"] = "registered_user_by_school_code";
|
|
419
1885
|
EnumNotificationResourceType22["SYSTEM_ALERT"] = "system_alert";
|
|
1886
|
+
EnumNotificationResourceType22["USER_COUPON_REDEEMED"] = "user_coupon_redeemed";
|
|
420
1887
|
EnumNotificationResourceType22["VENDOR_APPLICATION_TO_EVENT"] = "vendor_application_to_event";
|
|
421
1888
|
EnumNotificationResourceType22["VENDOR_UPDATE_RELATION_TO_EVENT"] = "vendor_update_relation_to_event";
|
|
422
1889
|
return EnumNotificationResourceType22;
|
|
@@ -491,6 +1958,11 @@ var EnumSubscriptionStatus = /* @__PURE__ */ ((EnumSubscriptionStatus22) => {
|
|
|
491
1958
|
EnumSubscriptionStatus22["TRIALING"] = "trialing";
|
|
492
1959
|
return EnumSubscriptionStatus22;
|
|
493
1960
|
})(EnumSubscriptionStatus || {});
|
|
1961
|
+
var EnumBillingPeriod = /* @__PURE__ */ ((EnumBillingPeriod22) => {
|
|
1962
|
+
EnumBillingPeriod22["MONTHLY_CANCEL_ANYTIME"] = "monthly_cancel_anytime";
|
|
1963
|
+
EnumBillingPeriod22["YEARLY_ANNUAL_BILLED"] = "yearly_annual_billed";
|
|
1964
|
+
return EnumBillingPeriod22;
|
|
1965
|
+
})(EnumBillingPeriod || {});
|
|
494
1966
|
var EnumReward = /* @__PURE__ */ ((EnumReward22) => {
|
|
495
1967
|
EnumReward22["MYSTERY_JOY_BOX"] = "mystery_joy_box";
|
|
496
1968
|
EnumReward22["MYSTERY_SQUEEZE_BOX"] = "mystery_squeeze_box";
|
|
@@ -1773,6 +3245,42 @@ var availableCategories = assignColorToCategories([
|
|
|
1773
3245
|
...petProductsAndAnimalGoods,
|
|
1774
3246
|
...serviceAndExperience
|
|
1775
3247
|
]);
|
|
3248
|
+
var BILLING_CATALOG_KEYS = [
|
|
3249
|
+
"pro_vendor_monthly",
|
|
3250
|
+
"pro_vendor_yearly",
|
|
3251
|
+
"pro_plus_vendor_monthly",
|
|
3252
|
+
"pro_plus_vendor_yearly"
|
|
3253
|
+
];
|
|
3254
|
+
var BILLING_CATALOG_CURRENCY = "nzd";
|
|
3255
|
+
var BILLING_CATALOG_DEFINITIONS = {
|
|
3256
|
+
pro_plus_vendor_monthly: {
|
|
3257
|
+
billingPeriod: "monthly_cancel_anytime",
|
|
3258
|
+
licenceType: "pro_plus_vendor"
|
|
3259
|
+
/* PRO_PLUS_VENDOR */
|
|
3260
|
+
},
|
|
3261
|
+
pro_plus_vendor_yearly: {
|
|
3262
|
+
billingPeriod: "yearly_annual_billed",
|
|
3263
|
+
licenceType: "pro_plus_vendor"
|
|
3264
|
+
/* PRO_PLUS_VENDOR */
|
|
3265
|
+
},
|
|
3266
|
+
pro_vendor_monthly: {
|
|
3267
|
+
billingPeriod: "monthly_cancel_anytime",
|
|
3268
|
+
licenceType: "pro_vendor"
|
|
3269
|
+
/* PRO_VENDOR */
|
|
3270
|
+
},
|
|
3271
|
+
pro_vendor_yearly: {
|
|
3272
|
+
billingPeriod: "yearly_annual_billed",
|
|
3273
|
+
licenceType: "pro_vendor"
|
|
3274
|
+
/* PRO_VENDOR */
|
|
3275
|
+
}
|
|
3276
|
+
};
|
|
3277
|
+
function billingCatalogDefinitionMatches(entry) {
|
|
3278
|
+
const definition = BILLING_CATALOG_DEFINITIONS[entry.key];
|
|
3279
|
+
if (!definition) {
|
|
3280
|
+
return false;
|
|
3281
|
+
}
|
|
3282
|
+
return definition.billingPeriod === entry.billingPeriod && definition.licenceType === entry.licenceType;
|
|
3283
|
+
}
|
|
1776
3284
|
var packagingTypes = [
|
|
1777
3285
|
"Biodegradable",
|
|
1778
3286
|
"Compostable",
|
|
@@ -2217,12 +3725,19 @@ var REDEEMED_REWARD_FIELDS_FRAGMENT = gql`
|
|
|
2217
3725
|
`;
|
|
2218
3726
|
var STRIPE_FIELDS_FRAGMENT = gql`
|
|
2219
3727
|
fragment StripeSubscriptionFields on StripeSubscriptionType {
|
|
3728
|
+
billingPeriod
|
|
3729
|
+
cancelAtPeriodEnd
|
|
2220
3730
|
customerId
|
|
2221
3731
|
subscriptionId
|
|
2222
3732
|
status
|
|
2223
3733
|
currentPlan
|
|
2224
3734
|
startDate
|
|
2225
3735
|
endDate
|
|
3736
|
+
pendingPlan
|
|
3737
|
+
pendingBillingPeriod
|
|
3738
|
+
pendingChangeEffectiveAt
|
|
3739
|
+
priceId
|
|
3740
|
+
scheduleId
|
|
2226
3741
|
}
|
|
2227
3742
|
`;
|
|
2228
3743
|
var USER_FIELDS_FRAGMENT = gql`
|
|
@@ -2499,8 +4014,11 @@ var EVENT = gql`
|
|
|
2499
4014
|
${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
|
|
2500
4015
|
`;
|
|
2501
4016
|
var GET_EVENTS = gql`
|
|
2502
|
-
query getEvents(
|
|
2503
|
-
|
|
4017
|
+
query getEvents(
|
|
4018
|
+
$dateStatus: EventDateStatusEnumType
|
|
4019
|
+
$options: PaginationOptions
|
|
4020
|
+
) {
|
|
4021
|
+
events(dateStatus: $dateStatus, options: $options) {
|
|
2504
4022
|
...EventListItemFields
|
|
2505
4023
|
}
|
|
2506
4024
|
}
|
|
@@ -2802,8 +4320,8 @@ var UNREGISTERED_VENDOR = gql`
|
|
|
2802
4320
|
${UNREGISTERED_VENDOR_INVITATION_FRAGMENT}
|
|
2803
4321
|
`;
|
|
2804
4322
|
var GET_VENDORS = gql`
|
|
2805
|
-
query getVendors {
|
|
2806
|
-
vendors {
|
|
4323
|
+
query getVendors($options: PaginationOptions) {
|
|
4324
|
+
vendors(options: $options) {
|
|
2807
4325
|
...VendorFields
|
|
2808
4326
|
}
|
|
2809
4327
|
}
|
|
@@ -3040,8 +4558,8 @@ var PARTNER = gql`
|
|
|
3040
4558
|
${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
|
|
3041
4559
|
`;
|
|
3042
4560
|
var GET_PARTNERS = gql`
|
|
3043
|
-
query getPartners {
|
|
3044
|
-
partners {
|
|
4561
|
+
query getPartners($options: PaginationOptions) {
|
|
4562
|
+
partners(options: $options) {
|
|
3045
4563
|
...PartnerFields
|
|
3046
4564
|
}
|
|
3047
4565
|
}
|
|
@@ -3246,8 +4764,8 @@ var POST_FIELDS_FRAGMENT = gql`
|
|
|
3246
4764
|
${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
|
|
3247
4765
|
`;
|
|
3248
4766
|
var GET_POSTS = gql`
|
|
3249
|
-
query getPosts {
|
|
3250
|
-
posts {
|
|
4767
|
+
query getPosts($options: PaginationOptions) {
|
|
4768
|
+
posts(options: $options) {
|
|
3251
4769
|
...PostFields
|
|
3252
4770
|
}
|
|
3253
4771
|
}
|
|
@@ -3262,33 +4780,134 @@ var GET_POST = gql`
|
|
|
3262
4780
|
${POST_FIELDS_FRAGMENT}
|
|
3263
4781
|
`;
|
|
3264
4782
|
var GET_POSTS_BY_TYPE = gql`
|
|
3265
|
-
query getPostsByType($postType: PostTypeEnum
|
|
3266
|
-
postsByType(postType: $postType) {
|
|
4783
|
+
query getPostsByType($postType: PostTypeEnum!, $options: PaginationOptions) {
|
|
4784
|
+
postsByType(postType: $postType, options: $options) {
|
|
3267
4785
|
...PostFields
|
|
3268
4786
|
}
|
|
3269
4787
|
}
|
|
3270
4788
|
${POST_FIELDS_FRAGMENT}
|
|
3271
4789
|
`;
|
|
3272
|
-
var
|
|
3273
|
-
query
|
|
3274
|
-
|
|
3275
|
-
|
|
4790
|
+
var GET_USERS = gql`
|
|
4791
|
+
query getUsers($options: PaginationOptions) {
|
|
4792
|
+
users(options: $options) {
|
|
4793
|
+
...UserFields
|
|
3276
4794
|
}
|
|
3277
4795
|
}
|
|
4796
|
+
${USER_FIELDS_FRAGMENT}
|
|
3278
4797
|
`;
|
|
3279
|
-
var
|
|
3280
|
-
query
|
|
3281
|
-
|
|
3282
|
-
|
|
4798
|
+
var GET_USER = gql`
|
|
4799
|
+
query getUser($_id: ID!) {
|
|
4800
|
+
user(_id: $_id) {
|
|
4801
|
+
...UserFields
|
|
3283
4802
|
}
|
|
3284
4803
|
}
|
|
4804
|
+
${USER_FIELDS_FRAGMENT}
|
|
3285
4805
|
`;
|
|
3286
|
-
var
|
|
3287
|
-
query
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
}
|
|
3291
|
-
}
|
|
4806
|
+
var GET_USER_EVENTS = gql`
|
|
4807
|
+
query getUserEvents {
|
|
4808
|
+
userEvents {
|
|
4809
|
+
...EventFields
|
|
4810
|
+
}
|
|
4811
|
+
}
|
|
4812
|
+
${EVENT}
|
|
4813
|
+
`;
|
|
4814
|
+
var GET_USER_VENDORS = gql`
|
|
4815
|
+
query getUserVendors {
|
|
4816
|
+
userVendors {
|
|
4817
|
+
...VendorFields
|
|
4818
|
+
}
|
|
4819
|
+
}
|
|
4820
|
+
${VENDOR}
|
|
4821
|
+
`;
|
|
4822
|
+
var GET_USER_PARTNERS = gql`
|
|
4823
|
+
query getUserPartners {
|
|
4824
|
+
userPartners {
|
|
4825
|
+
...PartnerFields
|
|
4826
|
+
}
|
|
4827
|
+
}
|
|
4828
|
+
${PARTNER}
|
|
4829
|
+
`;
|
|
4830
|
+
var GET_USER_ACTIVITIES = gql`
|
|
4831
|
+
query getUserActivities {
|
|
4832
|
+
userActivities {
|
|
4833
|
+
favourites {
|
|
4834
|
+
events {
|
|
4835
|
+
...EventListItemFields
|
|
4836
|
+
}
|
|
4837
|
+
partners {
|
|
4838
|
+
...PartnerFields
|
|
4839
|
+
}
|
|
4840
|
+
vendors {
|
|
4841
|
+
...VendorFields
|
|
4842
|
+
}
|
|
4843
|
+
}
|
|
4844
|
+
going {
|
|
4845
|
+
events {
|
|
4846
|
+
...EventListItemFields
|
|
4847
|
+
}
|
|
4848
|
+
}
|
|
4849
|
+
interested {
|
|
4850
|
+
events {
|
|
4851
|
+
...EventListItemFields
|
|
4852
|
+
}
|
|
4853
|
+
}
|
|
4854
|
+
present {
|
|
4855
|
+
events {
|
|
4856
|
+
...EventListItemFields
|
|
4857
|
+
}
|
|
4858
|
+
}
|
|
4859
|
+
}
|
|
4860
|
+
}
|
|
4861
|
+
${EVENT_LIST_ITEM}
|
|
4862
|
+
${VENDOR}
|
|
4863
|
+
${PARTNER}
|
|
4864
|
+
`;
|
|
4865
|
+
var GET_USER_RESOURCES = gql`
|
|
4866
|
+
query getUserResources($userId: ID!) {
|
|
4867
|
+
userResources(userId: $userId) {
|
|
4868
|
+
resources {
|
|
4869
|
+
_id
|
|
4870
|
+
logo
|
|
4871
|
+
name
|
|
4872
|
+
resourceType
|
|
4873
|
+
}
|
|
4874
|
+
}
|
|
4875
|
+
}
|
|
4876
|
+
`;
|
|
4877
|
+
var GET_USERS_BY_PROMO_CODE = gql`
|
|
4878
|
+
query getUsersByPromoCode($promoCode: String!, $limit: Int, $offset: Int) {
|
|
4879
|
+
usersByPromoCode(promoCode: $promoCode, limit: $limit, offset: $offset) {
|
|
4880
|
+
active
|
|
4881
|
+
avatar {
|
|
4882
|
+
...ResourceImageFields
|
|
4883
|
+
}
|
|
4884
|
+
deletedAt
|
|
4885
|
+
nickName
|
|
4886
|
+
userId
|
|
4887
|
+
}
|
|
4888
|
+
}
|
|
4889
|
+
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
4890
|
+
`;
|
|
4891
|
+
var GET_EVENT_BY_SLUG = gql`
|
|
4892
|
+
query getEventBySlug($slug: String!) {
|
|
4893
|
+
eventBySlug(slug: $slug) {
|
|
4894
|
+
_id
|
|
4895
|
+
}
|
|
4896
|
+
}
|
|
4897
|
+
`;
|
|
4898
|
+
var GET_VENDOR_BY_SLUG = gql`
|
|
4899
|
+
query getVendorBySlug($slug: String!) {
|
|
4900
|
+
vendorBySlug(slug: $slug) {
|
|
4901
|
+
_id
|
|
4902
|
+
}
|
|
4903
|
+
}
|
|
4904
|
+
`;
|
|
4905
|
+
var GET_PARTNER_BY_SLUG = gql`
|
|
4906
|
+
query getPartnerBySlug($slug: String!) {
|
|
4907
|
+
partnerBySlug(slug: $slug) {
|
|
4908
|
+
_id
|
|
4909
|
+
}
|
|
4910
|
+
}
|
|
3292
4911
|
`;
|
|
3293
4912
|
var GET_POST_BY_SLUG = gql`
|
|
3294
4913
|
query getPostBySlug($slug: String!, $postType: PostTypeEnum!) {
|
|
@@ -3733,107 +5352,6 @@ var UPDATE_EVENT_INFO_MUTATION = gql`
|
|
|
3733
5352
|
}
|
|
3734
5353
|
${EVENT_INFO}
|
|
3735
5354
|
`;
|
|
3736
|
-
var GET_USERS = gql`
|
|
3737
|
-
query getUsers {
|
|
3738
|
-
users {
|
|
3739
|
-
...UserFields
|
|
3740
|
-
}
|
|
3741
|
-
}
|
|
3742
|
-
${USER_FIELDS_FRAGMENT}
|
|
3743
|
-
`;
|
|
3744
|
-
var GET_USER = gql`
|
|
3745
|
-
query getUser($_id: ID!) {
|
|
3746
|
-
user(_id: $_id) {
|
|
3747
|
-
...UserFields
|
|
3748
|
-
}
|
|
3749
|
-
}
|
|
3750
|
-
${USER_FIELDS_FRAGMENT}
|
|
3751
|
-
`;
|
|
3752
|
-
var GET_USER_EVENTS = gql`
|
|
3753
|
-
query getUserEvents {
|
|
3754
|
-
userEvents {
|
|
3755
|
-
...EventFields
|
|
3756
|
-
}
|
|
3757
|
-
}
|
|
3758
|
-
${EVENT}
|
|
3759
|
-
`;
|
|
3760
|
-
var GET_USER_VENDORS = gql`
|
|
3761
|
-
query getUserVendors {
|
|
3762
|
-
userVendors {
|
|
3763
|
-
...VendorFields
|
|
3764
|
-
}
|
|
3765
|
-
}
|
|
3766
|
-
${VENDOR}
|
|
3767
|
-
`;
|
|
3768
|
-
var GET_USER_PARTNERS = gql`
|
|
3769
|
-
query getUserPartners {
|
|
3770
|
-
userPartners {
|
|
3771
|
-
...PartnerFields
|
|
3772
|
-
}
|
|
3773
|
-
}
|
|
3774
|
-
${PARTNER}
|
|
3775
|
-
`;
|
|
3776
|
-
var GET_USER_ACTIVITIES = gql`
|
|
3777
|
-
query getUserActivities {
|
|
3778
|
-
userActivities {
|
|
3779
|
-
favourites {
|
|
3780
|
-
events {
|
|
3781
|
-
...EventListItemFields
|
|
3782
|
-
}
|
|
3783
|
-
partners {
|
|
3784
|
-
...PartnerFields
|
|
3785
|
-
}
|
|
3786
|
-
vendors {
|
|
3787
|
-
...VendorFields
|
|
3788
|
-
}
|
|
3789
|
-
}
|
|
3790
|
-
going {
|
|
3791
|
-
events {
|
|
3792
|
-
...EventListItemFields
|
|
3793
|
-
}
|
|
3794
|
-
}
|
|
3795
|
-
interested {
|
|
3796
|
-
events {
|
|
3797
|
-
...EventListItemFields
|
|
3798
|
-
}
|
|
3799
|
-
}
|
|
3800
|
-
present {
|
|
3801
|
-
events {
|
|
3802
|
-
...EventListItemFields
|
|
3803
|
-
}
|
|
3804
|
-
}
|
|
3805
|
-
}
|
|
3806
|
-
}
|
|
3807
|
-
${EVENT_LIST_ITEM}
|
|
3808
|
-
${VENDOR}
|
|
3809
|
-
${PARTNER}
|
|
3810
|
-
`;
|
|
3811
|
-
var GET_USER_RESOURCES = gql`
|
|
3812
|
-
query getUserResources($userId: ID!) {
|
|
3813
|
-
userResources(userId: $userId) {
|
|
3814
|
-
resources {
|
|
3815
|
-
_id
|
|
3816
|
-
logo
|
|
3817
|
-
name
|
|
3818
|
-
resourceType
|
|
3819
|
-
}
|
|
3820
|
-
}
|
|
3821
|
-
}
|
|
3822
|
-
`;
|
|
3823
|
-
var GET_USERS_BY_PROMO_CODE = gql`
|
|
3824
|
-
query getUsersByPromoCode($promoCode: String!, $limit: Int, $offset: Int) {
|
|
3825
|
-
usersByPromoCode(promoCode: $promoCode, limit: $limit, offset: $offset) {
|
|
3826
|
-
active
|
|
3827
|
-
avatar {
|
|
3828
|
-
...ResourceImageFields
|
|
3829
|
-
}
|
|
3830
|
-
deletedAt
|
|
3831
|
-
nickName
|
|
3832
|
-
userId
|
|
3833
|
-
}
|
|
3834
|
-
}
|
|
3835
|
-
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
3836
|
-
`;
|
|
3837
5355
|
var NOTIFICATION_FRAGMENT = gql`
|
|
3838
5356
|
fragment NotificationFields on Notification {
|
|
3839
5357
|
_id
|
|
@@ -4256,11 +5774,8 @@ var GET_RESOURCE_ACTIVITY = gql`
|
|
|
4256
5774
|
${RESOURCE_ACTIVITY_FIELDS_FRAGMENT}
|
|
4257
5775
|
`;
|
|
4258
5776
|
var CREATE_CHECKOUT_SESSION_MUTATION = gql`
|
|
4259
|
-
mutation createCheckoutSession(
|
|
4260
|
-
|
|
4261
|
-
$billingPeriod: BillingPeriodEnumType
|
|
4262
|
-
) {
|
|
4263
|
-
createCheckoutSession(planId: $planId, billingPeriod: $billingPeriod) {
|
|
5777
|
+
mutation createCheckoutSession($input: CreateCheckoutSessionInputType!) {
|
|
5778
|
+
createCheckoutSession(input: $input) {
|
|
4264
5779
|
data {
|
|
4265
5780
|
sessionId
|
|
4266
5781
|
checkoutUrl
|
|
@@ -4272,25 +5787,38 @@ var CREATE_CHECKOUT_SESSION_MUTATION = gql`
|
|
|
4272
5787
|
var CANCEL_SUBSCRIPTION_MUTATION = gql`
|
|
4273
5788
|
mutation cancelSubscription {
|
|
4274
5789
|
cancelSubscription {
|
|
4275
|
-
data
|
|
5790
|
+
data {
|
|
5791
|
+
billingPeriod
|
|
5792
|
+
cancelAtPeriodEnd
|
|
5793
|
+
currentPlan
|
|
5794
|
+
endDate
|
|
5795
|
+
pendingBillingPeriod
|
|
5796
|
+
pendingChangeEffectiveAt
|
|
5797
|
+
pendingPlan
|
|
5798
|
+
priceId
|
|
5799
|
+
scheduleId
|
|
5800
|
+
status
|
|
5801
|
+
subscriptionId
|
|
5802
|
+
}
|
|
4276
5803
|
message
|
|
4277
5804
|
}
|
|
4278
5805
|
}
|
|
4279
5806
|
`;
|
|
4280
5807
|
var UPDATE_SUBSCRIPTION_PLAN_MUTATION = gql`
|
|
4281
|
-
mutation updateSubscriptionPlan(
|
|
4282
|
-
|
|
4283
|
-
$billingPeriod: BillingPeriodEnumType
|
|
4284
|
-
) {
|
|
4285
|
-
updateSubscriptionPlan(
|
|
4286
|
-
newPlanId: $newPlanId
|
|
4287
|
-
billingPeriod: $billingPeriod
|
|
4288
|
-
) {
|
|
5808
|
+
mutation updateSubscriptionPlan($input: UpdateSubscriptionPlanInputType!) {
|
|
5809
|
+
updateSubscriptionPlan(input: $input) {
|
|
4289
5810
|
data {
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
priceId
|
|
5811
|
+
billingPeriod
|
|
5812
|
+
cancelAtPeriodEnd
|
|
4293
5813
|
currentPlan
|
|
5814
|
+
endDate
|
|
5815
|
+
pendingBillingPeriod
|
|
5816
|
+
pendingChangeEffectiveAt
|
|
5817
|
+
pendingPlan
|
|
5818
|
+
priceId
|
|
5819
|
+
scheduleId
|
|
5820
|
+
status
|
|
5821
|
+
subscriptionId
|
|
4294
5822
|
}
|
|
4295
5823
|
message
|
|
4296
5824
|
}
|
|
@@ -4306,36 +5834,20 @@ var CREATE_CUSTOMER_PORTAL = gql`
|
|
|
4306
5834
|
}
|
|
4307
5835
|
}
|
|
4308
5836
|
`;
|
|
4309
|
-
var SELECT_PACKAGE_MUTATION = gql`
|
|
4310
|
-
mutation selectPackage(
|
|
4311
|
-
$billingPeriod: BillingPeriodEnumType
|
|
4312
|
-
$selectedLicence: LicencesEnumType!
|
|
4313
|
-
$useStripe: Boolean
|
|
4314
|
-
) {
|
|
4315
|
-
selectPackage(
|
|
4316
|
-
billingPeriod: $billingPeriod
|
|
4317
|
-
selectedLicence: $selectedLicence
|
|
4318
|
-
useStripe: $useStripe
|
|
4319
|
-
) {
|
|
4320
|
-
data {
|
|
4321
|
-
checkoutUrl
|
|
4322
|
-
licences {
|
|
4323
|
-
...LicenceFields
|
|
4324
|
-
}
|
|
4325
|
-
userId
|
|
4326
|
-
}
|
|
4327
|
-
message
|
|
4328
|
-
}
|
|
4329
|
-
}
|
|
4330
|
-
${LICENCE_FIELDS_FRAGMENT}
|
|
4331
|
-
`;
|
|
4332
5837
|
var GET_SUBSCRIPTION_STATUS = gql`
|
|
4333
5838
|
query getSubscriptionStatus {
|
|
4334
5839
|
getSubscriptionStatus {
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
priceId
|
|
5840
|
+
billingPeriod
|
|
5841
|
+
cancelAtPeriodEnd
|
|
4338
5842
|
currentPlan
|
|
5843
|
+
endDate
|
|
5844
|
+
pendingBillingPeriod
|
|
5845
|
+
pendingChangeEffectiveAt
|
|
5846
|
+
pendingPlan
|
|
5847
|
+
priceId
|
|
5848
|
+
scheduleId
|
|
5849
|
+
status
|
|
5850
|
+
subscriptionId
|
|
4339
5851
|
}
|
|
4340
5852
|
}
|
|
4341
5853
|
`;
|
|
@@ -4362,7 +5874,6 @@ var GET_SUBSCRIPTION_PLANS = gql`
|
|
|
4362
5874
|
}
|
|
4363
5875
|
}
|
|
4364
5876
|
isNewUser
|
|
4365
|
-
isTester
|
|
4366
5877
|
appliedDiscountType
|
|
4367
5878
|
}
|
|
4368
5879
|
}
|
|
@@ -4470,6 +5981,57 @@ var GET_APP_SETTINGS = gql`
|
|
|
4470
5981
|
}
|
|
4471
5982
|
${APP_SETTINGS_FIELDS_FRAGMENT}
|
|
4472
5983
|
`;
|
|
5984
|
+
var BILLING_CATALOG_FIELDS_FRAGMENT = gql`
|
|
5985
|
+
fragment BillingCatalogFields on BillingCatalogEntryType {
|
|
5986
|
+
_id
|
|
5987
|
+
active
|
|
5988
|
+
billingPeriod
|
|
5989
|
+
createdAt
|
|
5990
|
+
currency
|
|
5991
|
+
effectiveFrom
|
|
5992
|
+
key
|
|
5993
|
+
licenceType
|
|
5994
|
+
revision
|
|
5995
|
+
stripePriceId
|
|
5996
|
+
stripeProductId
|
|
5997
|
+
taxInclusive
|
|
5998
|
+
unitAmount
|
|
5999
|
+
updatedAt
|
|
6000
|
+
updatedBy
|
|
6001
|
+
}
|
|
6002
|
+
`;
|
|
6003
|
+
var GET_BILLING_CATALOG = gql`
|
|
6004
|
+
query getBillingCatalog {
|
|
6005
|
+
billingCatalog {
|
|
6006
|
+
...BillingCatalogFields
|
|
6007
|
+
}
|
|
6008
|
+
}
|
|
6009
|
+
${BILLING_CATALOG_FIELDS_FRAGMENT}
|
|
6010
|
+
`;
|
|
6011
|
+
var UPDATE_BILLING_CATALOG_PRICE_MUTATION = gql`
|
|
6012
|
+
mutation updateBillingCatalogPrice(
|
|
6013
|
+
$input: UpdateBillingCatalogPriceInputType!
|
|
6014
|
+
) {
|
|
6015
|
+
updateBillingCatalogPrice(input: $input) {
|
|
6016
|
+
data {
|
|
6017
|
+
...BillingCatalogFields
|
|
6018
|
+
}
|
|
6019
|
+
message
|
|
6020
|
+
}
|
|
6021
|
+
}
|
|
6022
|
+
${BILLING_CATALOG_FIELDS_FRAGMENT}
|
|
6023
|
+
`;
|
|
6024
|
+
var SYNC_BILLING_CATALOG_PRICE_MUTATION = gql`
|
|
6025
|
+
mutation syncBillingCatalogPrice($input: SyncBillingCatalogPriceInputType!) {
|
|
6026
|
+
syncBillingCatalogPrice(input: $input) {
|
|
6027
|
+
data {
|
|
6028
|
+
...BillingCatalogFields
|
|
6029
|
+
}
|
|
6030
|
+
message
|
|
6031
|
+
}
|
|
6032
|
+
}
|
|
6033
|
+
${BILLING_CATALOG_FIELDS_FRAGMENT}
|
|
6034
|
+
`;
|
|
4473
6035
|
var GAME_HISTORY_FIELDS_FRAGMENT = gql`
|
|
4474
6036
|
fragment GameHistoryFields on GameHistoryType {
|
|
4475
6037
|
createdAt
|
|
@@ -5308,46 +6870,200 @@ schema.index({
|
|
|
5308
6870
|
start: 1,
|
|
5309
6871
|
status: 1
|
|
5310
6872
|
});
|
|
6873
|
+
schema.index({
|
|
6874
|
+
status: 1,
|
|
6875
|
+
targetRegion: 1,
|
|
6876
|
+
// eslint-disable-next-line sort-keys
|
|
6877
|
+
start: -1
|
|
6878
|
+
});
|
|
5311
6879
|
var AdModel = import_mongoose.default.models.Ad || import_mongoose.default.model("Ad", schema);
|
|
5312
6880
|
|
|
5313
|
-
// src/mongoose/
|
|
6881
|
+
// src/mongoose/BillingCatalog.ts
|
|
5314
6882
|
var import_mongoose2 = __toESM(require("mongoose"));
|
|
5315
6883
|
var MongooseSchema2 = import_mongoose2.default.Schema;
|
|
5316
|
-
var
|
|
6884
|
+
var BILLING_CATALOG_COLLECTION_NAME = "billingCatalog";
|
|
6885
|
+
var paidVendorLicences = [
|
|
6886
|
+
EnumUserLicence.PRO_VENDOR,
|
|
6887
|
+
EnumUserLicence.PRO_PLUS_VENDOR
|
|
6888
|
+
];
|
|
6889
|
+
var supportedBillingPeriods = [
|
|
6890
|
+
EnumBillingPeriod.MONTHLY_CANCEL_ANYTIME,
|
|
6891
|
+
EnumBillingPeriod.YEARLY_ANNUAL_BILLED
|
|
6892
|
+
];
|
|
6893
|
+
var unitAmountField = {
|
|
6894
|
+
min: 1,
|
|
6895
|
+
required: true,
|
|
6896
|
+
type: Number,
|
|
6897
|
+
validate: {
|
|
6898
|
+
message: "Billing catalogue price must be a positive integer.",
|
|
6899
|
+
validator: Number.isInteger
|
|
6900
|
+
}
|
|
6901
|
+
};
|
|
6902
|
+
var currencyField = {
|
|
6903
|
+
default: BILLING_CATALOG_CURRENCY,
|
|
6904
|
+
enum: [BILLING_CATALOG_CURRENCY],
|
|
6905
|
+
immutable: true,
|
|
6906
|
+
lowercase: true,
|
|
6907
|
+
required: true,
|
|
6908
|
+
trim: true,
|
|
6909
|
+
type: String
|
|
6910
|
+
};
|
|
6911
|
+
var stripePriceIdField = {
|
|
6912
|
+
default: null,
|
|
6913
|
+
required: false,
|
|
6914
|
+
trim: true,
|
|
6915
|
+
type: String
|
|
6916
|
+
};
|
|
6917
|
+
var stripeProductIdField = {
|
|
6918
|
+
default: null,
|
|
6919
|
+
required: false,
|
|
6920
|
+
trim: true,
|
|
6921
|
+
type: String
|
|
6922
|
+
};
|
|
6923
|
+
var priceHistorySchema = new MongooseSchema2(
|
|
6924
|
+
{
|
|
6925
|
+
changedAt: { required: true, type: Date },
|
|
6926
|
+
changedBy: {
|
|
6927
|
+
default: null,
|
|
6928
|
+
ref: "User",
|
|
6929
|
+
required: false,
|
|
6930
|
+
type: import_mongoose2.default.Schema.Types.ObjectId
|
|
6931
|
+
},
|
|
6932
|
+
currency: currencyField,
|
|
6933
|
+
effectiveFrom: { required: true, type: Date },
|
|
6934
|
+
effectiveTo: { required: true, type: Date },
|
|
6935
|
+
stripePriceId: stripePriceIdField,
|
|
6936
|
+
stripeProductId: stripeProductIdField,
|
|
6937
|
+
unitAmount: unitAmountField
|
|
6938
|
+
},
|
|
6939
|
+
{ _id: false }
|
|
6940
|
+
);
|
|
6941
|
+
var schema2 = new MongooseSchema2(
|
|
6942
|
+
{
|
|
6943
|
+
active: { default: true, required: true, type: Boolean },
|
|
6944
|
+
billingPeriod: {
|
|
6945
|
+
enum: supportedBillingPeriods,
|
|
6946
|
+
immutable: true,
|
|
6947
|
+
required: true,
|
|
6948
|
+
type: String
|
|
6949
|
+
},
|
|
6950
|
+
currency: currencyField,
|
|
6951
|
+
effectiveFrom: { default: Date.now, required: true, type: Date },
|
|
6952
|
+
key: {
|
|
6953
|
+
enum: BILLING_CATALOG_KEYS,
|
|
6954
|
+
immutable: true,
|
|
6955
|
+
required: true,
|
|
6956
|
+
type: String,
|
|
6957
|
+
unique: true
|
|
6958
|
+
},
|
|
6959
|
+
licenceType: {
|
|
6960
|
+
enum: paidVendorLicences,
|
|
6961
|
+
immutable: true,
|
|
6962
|
+
required: true,
|
|
6963
|
+
type: String
|
|
6964
|
+
},
|
|
6965
|
+
priceHistory: {
|
|
6966
|
+
default: [],
|
|
6967
|
+
required: true,
|
|
6968
|
+
type: [priceHistorySchema]
|
|
6969
|
+
},
|
|
6970
|
+
revision: {
|
|
6971
|
+
default: 1,
|
|
6972
|
+
min: 1,
|
|
6973
|
+
required: true,
|
|
6974
|
+
type: Number,
|
|
6975
|
+
validate: {
|
|
6976
|
+
message: "Billing catalogue revision must be a positive integer.",
|
|
6977
|
+
validator: Number.isInteger
|
|
6978
|
+
}
|
|
6979
|
+
},
|
|
6980
|
+
stripePriceId: stripePriceIdField,
|
|
6981
|
+
stripeProductId: stripeProductIdField,
|
|
6982
|
+
taxInclusive: {
|
|
6983
|
+
default: true,
|
|
6984
|
+
immutable: true,
|
|
6985
|
+
required: true,
|
|
6986
|
+
type: Boolean,
|
|
6987
|
+
validate: {
|
|
6988
|
+
message: "Billing catalogue prices must include GST.",
|
|
6989
|
+
validator: (value) => value === true
|
|
6990
|
+
}
|
|
6991
|
+
},
|
|
6992
|
+
unitAmount: unitAmountField,
|
|
6993
|
+
updatedBy: {
|
|
6994
|
+
default: null,
|
|
6995
|
+
ref: "User",
|
|
6996
|
+
required: false,
|
|
6997
|
+
type: import_mongoose2.default.Schema.Types.ObjectId
|
|
6998
|
+
}
|
|
6999
|
+
},
|
|
7000
|
+
{
|
|
7001
|
+
collection: BILLING_CATALOG_COLLECTION_NAME,
|
|
7002
|
+
strict: true,
|
|
7003
|
+
timestamps: true
|
|
7004
|
+
}
|
|
7005
|
+
);
|
|
7006
|
+
schema2.pre("validate", function validateDefinition() {
|
|
7007
|
+
if (!billingCatalogDefinitionMatches(this)) {
|
|
7008
|
+
this.invalidate(
|
|
7009
|
+
"key",
|
|
7010
|
+
"Billing catalogue key does not match its licence and billing period."
|
|
7011
|
+
);
|
|
7012
|
+
}
|
|
7013
|
+
});
|
|
7014
|
+
schema2.index({ billingPeriod: 1, licenceType: 1 }, { unique: true });
|
|
7015
|
+
schema2.index({ active: 1, licenceType: 1 });
|
|
7016
|
+
schema2.index(
|
|
7017
|
+
{ stripePriceId: 1 },
|
|
7018
|
+
{
|
|
7019
|
+
partialFilterExpression: { stripePriceId: { $type: "string" } },
|
|
7020
|
+
unique: true
|
|
7021
|
+
}
|
|
7022
|
+
);
|
|
7023
|
+
var BillingCatalogModel = import_mongoose2.default.models.BillingCatalogEntry || import_mongoose2.default.model(
|
|
7024
|
+
"BillingCatalogEntry",
|
|
7025
|
+
schema2,
|
|
7026
|
+
BILLING_CATALOG_COLLECTION_NAME
|
|
7027
|
+
);
|
|
7028
|
+
|
|
7029
|
+
// src/mongoose/chat/Chat.ts
|
|
7030
|
+
var import_mongoose3 = __toESM(require("mongoose"));
|
|
7031
|
+
var MongooseSchema3 = import_mongoose3.default.Schema;
|
|
7032
|
+
var MessageReplyPreviewSchema = new MongooseSchema3(
|
|
5317
7033
|
{
|
|
5318
7034
|
contentPreview: { required: true, type: String },
|
|
5319
7035
|
senderId: {
|
|
5320
7036
|
ref: "User",
|
|
5321
7037
|
required: true,
|
|
5322
|
-
type:
|
|
7038
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
5323
7039
|
},
|
|
5324
7040
|
senderName: { required: true, type: String }
|
|
5325
7041
|
},
|
|
5326
7042
|
{ _id: false }
|
|
5327
7043
|
);
|
|
5328
|
-
var MessageReactionSchema = new
|
|
7044
|
+
var MessageReactionSchema = new MongooseSchema3(
|
|
5329
7045
|
{
|
|
5330
7046
|
createdAt: { required: true, type: Date },
|
|
5331
7047
|
userId: {
|
|
5332
7048
|
ref: "User",
|
|
5333
7049
|
required: true,
|
|
5334
|
-
type:
|
|
7050
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
5335
7051
|
}
|
|
5336
7052
|
},
|
|
5337
7053
|
{ _id: false }
|
|
5338
7054
|
);
|
|
5339
|
-
var MessageSeenSchema = new
|
|
7055
|
+
var MessageSeenSchema = new MongooseSchema3(
|
|
5340
7056
|
{
|
|
5341
7057
|
seenAt: { required: true, type: Date },
|
|
5342
7058
|
userId: {
|
|
5343
7059
|
ref: "User",
|
|
5344
7060
|
required: true,
|
|
5345
|
-
type:
|
|
7061
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
5346
7062
|
}
|
|
5347
7063
|
},
|
|
5348
7064
|
{ _id: false }
|
|
5349
7065
|
);
|
|
5350
|
-
var MessageSchema = new
|
|
7066
|
+
var MessageSchema = new MongooseSchema3(
|
|
5351
7067
|
{
|
|
5352
7068
|
content: { required: true, type: String },
|
|
5353
7069
|
likedBy: { default: [], required: false, type: [MessageReactionSchema] },
|
|
@@ -5358,18 +7074,18 @@ var MessageSchema = new MongooseSchema2(
|
|
|
5358
7074
|
replyToMessageId: {
|
|
5359
7075
|
ref: "Chat.messages",
|
|
5360
7076
|
required: false,
|
|
5361
|
-
type:
|
|
7077
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
5362
7078
|
},
|
|
5363
7079
|
seenBy: { default: [], required: false, type: [MessageSeenSchema] },
|
|
5364
7080
|
senderId: {
|
|
5365
7081
|
ref: "User",
|
|
5366
7082
|
required: true,
|
|
5367
|
-
type:
|
|
7083
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
5368
7084
|
}
|
|
5369
7085
|
},
|
|
5370
7086
|
{ timestamps: true }
|
|
5371
7087
|
);
|
|
5372
|
-
var ParticipantSchema = new
|
|
7088
|
+
var ParticipantSchema = new MongooseSchema3(
|
|
5373
7089
|
{
|
|
5374
7090
|
active: { default: true, required: true, type: Boolean },
|
|
5375
7091
|
userAvatar: { required: false, type: String },
|
|
@@ -5377,14 +7093,14 @@ var ParticipantSchema = new MongooseSchema2(
|
|
|
5377
7093
|
userId: {
|
|
5378
7094
|
ref: "User",
|
|
5379
7095
|
required: true,
|
|
5380
|
-
type:
|
|
7096
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
5381
7097
|
},
|
|
5382
7098
|
userName: { required: true, type: String }
|
|
5383
7099
|
},
|
|
5384
7100
|
{ _id: false }
|
|
5385
7101
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5386
7102
|
);
|
|
5387
|
-
var ChatSchema = new
|
|
7103
|
+
var ChatSchema = new MongooseSchema3(
|
|
5388
7104
|
{
|
|
5389
7105
|
active: { default: true, required: true, type: Boolean },
|
|
5390
7106
|
chatDescription: { required: false, type: String },
|
|
@@ -5408,12 +7124,12 @@ ChatSchema.index({
|
|
|
5408
7124
|
"participants.userId": 1,
|
|
5409
7125
|
updatedAt: -1
|
|
5410
7126
|
});
|
|
5411
|
-
var ChatModel =
|
|
7127
|
+
var ChatModel = import_mongoose3.default.models.Chat || import_mongoose3.default.model("Chat", ChatSchema);
|
|
5412
7128
|
|
|
5413
7129
|
// src/mongoose/chat/ChatReport.ts
|
|
5414
|
-
var
|
|
5415
|
-
var
|
|
5416
|
-
var ReasonSchema = new
|
|
7130
|
+
var import_mongoose4 = __toESM(require("mongoose"));
|
|
7131
|
+
var MongooseSchema4 = import_mongoose4.default.Schema;
|
|
7132
|
+
var ReasonSchema = new MongooseSchema4(
|
|
5417
7133
|
{
|
|
5418
7134
|
details: { default: null, required: false, type: String },
|
|
5419
7135
|
reasonType: {
|
|
@@ -5424,23 +7140,23 @@ var ReasonSchema = new MongooseSchema3(
|
|
|
5424
7140
|
},
|
|
5425
7141
|
{ _id: false }
|
|
5426
7142
|
);
|
|
5427
|
-
var ChatReportSchema = new
|
|
7143
|
+
var ChatReportSchema = new MongooseSchema4(
|
|
5428
7144
|
{
|
|
5429
7145
|
chatId: {
|
|
5430
7146
|
ref: "Chat",
|
|
5431
7147
|
required: true,
|
|
5432
|
-
type:
|
|
7148
|
+
type: import_mongoose4.default.Schema.Types.ObjectId
|
|
5433
7149
|
},
|
|
5434
7150
|
reason: { required: true, type: ReasonSchema },
|
|
5435
7151
|
reportedUserId: {
|
|
5436
7152
|
ref: "User",
|
|
5437
7153
|
required: true,
|
|
5438
|
-
type:
|
|
7154
|
+
type: import_mongoose4.default.Schema.Types.ObjectId
|
|
5439
7155
|
},
|
|
5440
7156
|
reporterUserId: {
|
|
5441
7157
|
ref: "User",
|
|
5442
7158
|
required: true,
|
|
5443
|
-
type:
|
|
7159
|
+
type: import_mongoose4.default.Schema.Types.ObjectId
|
|
5444
7160
|
},
|
|
5445
7161
|
resolved: { default: false, required: true, type: Boolean }
|
|
5446
7162
|
},
|
|
@@ -5448,18 +7164,18 @@ var ChatReportSchema = new MongooseSchema3(
|
|
|
5448
7164
|
);
|
|
5449
7165
|
ChatReportSchema.index({ chatId: 1, reportedUserId: 1 });
|
|
5450
7166
|
ChatReportSchema.index({ createdAt: -1, reporterUserId: 1 });
|
|
5451
|
-
var ChatReportModel =
|
|
7167
|
+
var ChatReportModel = import_mongoose4.default.models.ChatReport || import_mongoose4.default.model("ChatReport", ChatReportSchema);
|
|
5452
7168
|
|
|
5453
7169
|
// src/mongoose/global.ts
|
|
5454
|
-
var
|
|
7170
|
+
var import_mongoose7 = __toESM(require("mongoose"));
|
|
5455
7171
|
|
|
5456
7172
|
// src/mongoose/Relation.ts
|
|
5457
|
-
var
|
|
7173
|
+
var import_mongoose6 = __toESM(require("mongoose"));
|
|
5458
7174
|
|
|
5459
7175
|
// src/mongoose/event/EventInfo.ts
|
|
5460
|
-
var
|
|
5461
|
-
var
|
|
5462
|
-
var StallTypeSchema = new
|
|
7176
|
+
var import_mongoose5 = __toESM(require("mongoose"));
|
|
7177
|
+
var MongooseSchema5 = import_mongoose5.default.Schema;
|
|
7178
|
+
var StallTypeSchema = new MongooseSchema5(
|
|
5463
7179
|
{
|
|
5464
7180
|
label: { required: false, type: String },
|
|
5465
7181
|
price: { required: false, type: Number },
|
|
@@ -5470,7 +7186,7 @@ var StallTypeSchema = new MongooseSchema4(
|
|
|
5470
7186
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5471
7187
|
}
|
|
5472
7188
|
);
|
|
5473
|
-
var dateTimeSchema = new
|
|
7189
|
+
var dateTimeSchema = new MongooseSchema5(
|
|
5474
7190
|
{
|
|
5475
7191
|
dateStatus: {
|
|
5476
7192
|
enum: Object.values(EnumEventDateStatus),
|
|
@@ -5486,7 +7202,7 @@ var dateTimeSchema = new MongooseSchema4(
|
|
|
5486
7202
|
{ _id: false }
|
|
5487
7203
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5488
7204
|
);
|
|
5489
|
-
var paymentInfoSchema = new
|
|
7205
|
+
var paymentInfoSchema = new MongooseSchema5(
|
|
5490
7206
|
{
|
|
5491
7207
|
accountHolderName: { required: false, type: String },
|
|
5492
7208
|
accountNumber: { required: false, type: String },
|
|
@@ -5500,7 +7216,7 @@ var paymentInfoSchema = new MongooseSchema4(
|
|
|
5500
7216
|
{ _id: false }
|
|
5501
7217
|
// Prevents Mongoose from creating an additional _id field
|
|
5502
7218
|
);
|
|
5503
|
-
var requirementsSchema = new
|
|
7219
|
+
var requirementsSchema = new MongooseSchema5(
|
|
5504
7220
|
{
|
|
5505
7221
|
category: { required: true, type: String },
|
|
5506
7222
|
label: { required: true, type: String },
|
|
@@ -5511,7 +7227,7 @@ var requirementsSchema = new MongooseSchema4(
|
|
|
5511
7227
|
// Prevents Mongoose from creating an additional _id field for
|
|
5512
7228
|
}
|
|
5513
7229
|
);
|
|
5514
|
-
var refundPolicySchema = new
|
|
7230
|
+
var refundPolicySchema = new MongooseSchema5(
|
|
5515
7231
|
{
|
|
5516
7232
|
category: { required: true, type: String },
|
|
5517
7233
|
label: { required: true, type: String },
|
|
@@ -5519,7 +7235,7 @@ var refundPolicySchema = new MongooseSchema4(
|
|
|
5519
7235
|
},
|
|
5520
7236
|
{ _id: false }
|
|
5521
7237
|
);
|
|
5522
|
-
var
|
|
7238
|
+
var schema3 = new MongooseSchema5(
|
|
5523
7239
|
{
|
|
5524
7240
|
active: { default: true, type: Boolean },
|
|
5525
7241
|
applicationDeadlineHours: { required: true, type: Number },
|
|
@@ -5527,7 +7243,7 @@ var schema2 = new MongooseSchema4(
|
|
|
5527
7243
|
eventId: {
|
|
5528
7244
|
ref: "Event",
|
|
5529
7245
|
required: true,
|
|
5530
|
-
type:
|
|
7246
|
+
type: import_mongoose5.default.Schema.Types.ObjectId
|
|
5531
7247
|
},
|
|
5532
7248
|
packInTime: { required: true, type: Number },
|
|
5533
7249
|
paymentDueHours: { required: true, type: Number },
|
|
@@ -5537,11 +7253,12 @@ var schema2 = new MongooseSchema4(
|
|
|
5537
7253
|
},
|
|
5538
7254
|
{ timestamps: true }
|
|
5539
7255
|
);
|
|
5540
|
-
|
|
7256
|
+
schema3.index({ eventId: 1 });
|
|
7257
|
+
var EventInfoModel = import_mongoose5.default.models.EventInfo || import_mongoose5.default.model("EventInfo", schema3);
|
|
5541
7258
|
|
|
5542
7259
|
// src/mongoose/Relation.ts
|
|
5543
|
-
var
|
|
5544
|
-
var relationDateTimeSchema = new
|
|
7260
|
+
var MongooseSchema6 = import_mongoose6.default.Schema;
|
|
7261
|
+
var relationDateTimeSchema = new MongooseSchema6(
|
|
5545
7262
|
{
|
|
5546
7263
|
dateStatus: {
|
|
5547
7264
|
enum: Object.values(EnumEventDateStatus),
|
|
@@ -5556,7 +7273,7 @@ var relationDateTimeSchema = new MongooseSchema5(
|
|
|
5556
7273
|
},
|
|
5557
7274
|
{ _id: false }
|
|
5558
7275
|
);
|
|
5559
|
-
var relationDatesSchema = new
|
|
7276
|
+
var relationDatesSchema = new MongooseSchema6(
|
|
5560
7277
|
{
|
|
5561
7278
|
dateTime: {
|
|
5562
7279
|
required: true,
|
|
@@ -5575,19 +7292,19 @@ var relationDatesSchema = new MongooseSchema5(
|
|
|
5575
7292
|
},
|
|
5576
7293
|
{ _id: false }
|
|
5577
7294
|
);
|
|
5578
|
-
var RelationTypeSchema = new
|
|
7295
|
+
var RelationTypeSchema = new MongooseSchema6(
|
|
5579
7296
|
{
|
|
5580
7297
|
active: { default: true, required: true, type: Boolean },
|
|
5581
7298
|
chatId: {
|
|
5582
7299
|
ref: "Chat",
|
|
5583
7300
|
required: true,
|
|
5584
|
-
type:
|
|
7301
|
+
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
5585
7302
|
},
|
|
5586
7303
|
deletedAt: { default: null, required: false, type: Date },
|
|
5587
7304
|
eventId: {
|
|
5588
7305
|
ref: "Event",
|
|
5589
7306
|
required: true,
|
|
5590
|
-
type:
|
|
7307
|
+
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
5591
7308
|
},
|
|
5592
7309
|
lastUpdateBy: {
|
|
5593
7310
|
enum: Object.values(EnumResourceType),
|
|
@@ -5603,7 +7320,7 @@ var RelationTypeSchema = new MongooseSchema5(
|
|
|
5603
7320
|
vendorId: {
|
|
5604
7321
|
ref: "Vendor",
|
|
5605
7322
|
required: true,
|
|
5606
|
-
type:
|
|
7323
|
+
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
5607
7324
|
}
|
|
5608
7325
|
},
|
|
5609
7326
|
{ timestamps: true }
|
|
@@ -5615,23 +7332,23 @@ RelationTypeSchema.index({
|
|
|
5615
7332
|
"relationDates.status": 1,
|
|
5616
7333
|
vendorId: 1
|
|
5617
7334
|
});
|
|
5618
|
-
var RelationModel =
|
|
7335
|
+
var RelationModel = import_mongoose6.default.models.Relation || import_mongoose6.default.model("Relation", RelationTypeSchema);
|
|
5619
7336
|
|
|
5620
7337
|
// src/mongoose/global.ts
|
|
5621
|
-
var
|
|
5622
|
-
var OwnerTypeSchema = new
|
|
7338
|
+
var MongooseSchema7 = import_mongoose7.default.Schema;
|
|
7339
|
+
var OwnerTypeSchema = new MongooseSchema7(
|
|
5623
7340
|
{
|
|
5624
7341
|
email: { required: true, type: String },
|
|
5625
7342
|
userId: {
|
|
5626
7343
|
ref: "User",
|
|
5627
7344
|
required: true,
|
|
5628
|
-
type:
|
|
7345
|
+
type: import_mongoose7.default.Schema.Types.ObjectId
|
|
5629
7346
|
}
|
|
5630
7347
|
},
|
|
5631
7348
|
{ _id: false }
|
|
5632
7349
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5633
7350
|
);
|
|
5634
|
-
var SocialMediaTypeSchema = new
|
|
7351
|
+
var SocialMediaTypeSchema = new MongooseSchema7(
|
|
5635
7352
|
{
|
|
5636
7353
|
link: { required: true, type: String },
|
|
5637
7354
|
name: { required: true, type: String }
|
|
@@ -5639,7 +7356,7 @@ var SocialMediaTypeSchema = new MongooseSchema6(
|
|
|
5639
7356
|
{ _id: false }
|
|
5640
7357
|
// Prevents Mongoose from creating an additional _id field
|
|
5641
7358
|
);
|
|
5642
|
-
var ResourceImageTypeSchema = new
|
|
7359
|
+
var ResourceImageTypeSchema = new MongooseSchema7(
|
|
5643
7360
|
{
|
|
5644
7361
|
active: { default: true, required: true, type: Boolean },
|
|
5645
7362
|
source: { required: false, type: String },
|
|
@@ -5648,7 +7365,7 @@ var ResourceImageTypeSchema = new MongooseSchema6(
|
|
|
5648
7365
|
{ _id: false }
|
|
5649
7366
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5650
7367
|
);
|
|
5651
|
-
var SubCategorySchema = new
|
|
7368
|
+
var SubCategorySchema = new MongooseSchema7(
|
|
5652
7369
|
{
|
|
5653
7370
|
id: { required: false, type: String },
|
|
5654
7371
|
items: [
|
|
@@ -5662,7 +7379,7 @@ var SubCategorySchema = new MongooseSchema6(
|
|
|
5662
7379
|
{ _id: false }
|
|
5663
7380
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5664
7381
|
);
|
|
5665
|
-
var CategorySchema = new
|
|
7382
|
+
var CategorySchema = new MongooseSchema7(
|
|
5666
7383
|
{
|
|
5667
7384
|
id: { required: true, type: String },
|
|
5668
7385
|
name: { required: true, type: String },
|
|
@@ -5671,7 +7388,7 @@ var CategorySchema = new MongooseSchema6(
|
|
|
5671
7388
|
{ _id: false }
|
|
5672
7389
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5673
7390
|
);
|
|
5674
|
-
var PosterUsageTypeSchema = new
|
|
7391
|
+
var PosterUsageTypeSchema = new MongooseSchema7(
|
|
5675
7392
|
{
|
|
5676
7393
|
count: { default: 0, required: false, type: Number },
|
|
5677
7394
|
month: { required: false, type: String }
|
|
@@ -5679,7 +7396,7 @@ var PosterUsageTypeSchema = new MongooseSchema6(
|
|
|
5679
7396
|
{ _id: false }
|
|
5680
7397
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5681
7398
|
);
|
|
5682
|
-
var userLicenseSchema = new
|
|
7399
|
+
var userLicenseSchema = new MongooseSchema7(
|
|
5683
7400
|
{
|
|
5684
7401
|
expiryDate: { required: true, type: Date },
|
|
5685
7402
|
issuedDate: { required: true, type: Date },
|
|
@@ -5696,7 +7413,7 @@ var userLicenseSchema = new MongooseSchema6(
|
|
|
5696
7413
|
},
|
|
5697
7414
|
{ _id: false, timestamps: false }
|
|
5698
7415
|
);
|
|
5699
|
-
var ContactDetailsSchema = new
|
|
7416
|
+
var ContactDetailsSchema = new MongooseSchema7(
|
|
5700
7417
|
{
|
|
5701
7418
|
email: { required: false, type: String },
|
|
5702
7419
|
landlinePhone: { required: false, type: String },
|
|
@@ -5705,7 +7422,7 @@ var ContactDetailsSchema = new MongooseSchema6(
|
|
|
5705
7422
|
{ _id: false }
|
|
5706
7423
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5707
7424
|
);
|
|
5708
|
-
var termsAgreementSchema = new
|
|
7425
|
+
var termsAgreementSchema = new MongooseSchema7(
|
|
5709
7426
|
{
|
|
5710
7427
|
appBuildNumber: { required: true, type: String },
|
|
5711
7428
|
appId: { required: true, type: String },
|
|
@@ -5722,7 +7439,7 @@ var termsAgreementSchema = new MongooseSchema6(
|
|
|
5722
7439
|
},
|
|
5723
7440
|
{ _id: false }
|
|
5724
7441
|
);
|
|
5725
|
-
var resourceRelationsSchema = new
|
|
7442
|
+
var resourceRelationsSchema = new MongooseSchema7(
|
|
5726
7443
|
{
|
|
5727
7444
|
relationDates: {
|
|
5728
7445
|
default: [],
|
|
@@ -5732,12 +7449,12 @@ var resourceRelationsSchema = new MongooseSchema6(
|
|
|
5732
7449
|
relationId: {
|
|
5733
7450
|
ref: "Relation",
|
|
5734
7451
|
required: false,
|
|
5735
|
-
type:
|
|
7452
|
+
type: import_mongoose7.default.Schema.Types.ObjectId
|
|
5736
7453
|
}
|
|
5737
7454
|
},
|
|
5738
7455
|
{ _id: false }
|
|
5739
7456
|
);
|
|
5740
|
-
var dateTimeSchema2 = new
|
|
7457
|
+
var dateTimeSchema2 = new MongooseSchema7(
|
|
5741
7458
|
{
|
|
5742
7459
|
dateStatus: {
|
|
5743
7460
|
enum: Object.values(EnumEventDateStatus),
|
|
@@ -5752,7 +7469,7 @@ var dateTimeSchema2 = new MongooseSchema6(
|
|
|
5752
7469
|
{ _id: false }
|
|
5753
7470
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5754
7471
|
);
|
|
5755
|
-
var locationGeoSchema = new
|
|
7472
|
+
var locationGeoSchema = new MongooseSchema7(
|
|
5756
7473
|
{
|
|
5757
7474
|
coordinates: { required: true, type: [Number] },
|
|
5758
7475
|
// [longitude, latitude]
|
|
@@ -5761,7 +7478,7 @@ var locationGeoSchema = new MongooseSchema6(
|
|
|
5761
7478
|
{ _id: false }
|
|
5762
7479
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5763
7480
|
);
|
|
5764
|
-
var locationsSchema = new
|
|
7481
|
+
var locationsSchema = new MongooseSchema7(
|
|
5765
7482
|
{
|
|
5766
7483
|
city: { required: true, type: String },
|
|
5767
7484
|
country: { required: true, type: String },
|
|
@@ -5777,13 +7494,13 @@ var locationsSchema = new MongooseSchema6(
|
|
|
5777
7494
|
{ _id: false }
|
|
5778
7495
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5779
7496
|
);
|
|
5780
|
-
var relatedPostSchema = new
|
|
7497
|
+
var relatedPostSchema = new MongooseSchema7(
|
|
5781
7498
|
{
|
|
5782
7499
|
postActive: { default: true, required: true, type: Boolean },
|
|
5783
7500
|
postId: {
|
|
5784
7501
|
ref: "Post",
|
|
5785
7502
|
required: true,
|
|
5786
|
-
type:
|
|
7503
|
+
type: import_mongoose7.default.Schema.Types.ObjectId
|
|
5787
7504
|
},
|
|
5788
7505
|
postSlug: { required: true, type: String },
|
|
5789
7506
|
postType: {
|
|
@@ -5795,7 +7512,7 @@ var relatedPostSchema = new MongooseSchema6(
|
|
|
5795
7512
|
{ _id: false }
|
|
5796
7513
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5797
7514
|
);
|
|
5798
|
-
var socialShareResourceSchema = new
|
|
7515
|
+
var socialShareResourceSchema = new MongooseSchema7(
|
|
5799
7516
|
{
|
|
5800
7517
|
qrCode: { required: true, type: ResourceImageTypeSchema },
|
|
5801
7518
|
socialImage: { required: true, type: ResourceImageTypeSchema }
|
|
@@ -5808,7 +7525,7 @@ var baseResourceFields = {
|
|
|
5808
7525
|
adIds: {
|
|
5809
7526
|
ref: "Ad",
|
|
5810
7527
|
required: false,
|
|
5811
|
-
type: [
|
|
7528
|
+
type: [import_mongoose7.default.Schema.Types.ObjectId]
|
|
5812
7529
|
},
|
|
5813
7530
|
approvedAt: { default: null, required: false, type: Date },
|
|
5814
7531
|
contactDetails: { required: false, type: ContactDetailsSchema },
|
|
@@ -5838,9 +7555,64 @@ var baseResourceFields = {
|
|
|
5838
7555
|
};
|
|
5839
7556
|
|
|
5840
7557
|
// src/mongoose/GoogleImportedMarket.ts
|
|
5841
|
-
var
|
|
5842
|
-
|
|
5843
|
-
|
|
7558
|
+
var import_mongoose8 = __toESM(require("mongoose"));
|
|
7559
|
+
|
|
7560
|
+
// src/mongoose/searchNamePlugin.ts
|
|
7561
|
+
function deriveSearchName(name) {
|
|
7562
|
+
return typeof name === "string" ? name.trim().toLowerCase() : "";
|
|
7563
|
+
}
|
|
7564
|
+
function searchNamePlugin(schema20) {
|
|
7565
|
+
schema20.add({ searchName: { default: "", required: false, type: String } });
|
|
7566
|
+
schema20.index({ searchName: 1 });
|
|
7567
|
+
schema20.pre("save", function syncSearchNameOnSave(next) {
|
|
7568
|
+
const doc = this;
|
|
7569
|
+
doc.searchName = deriveSearchName(doc.name);
|
|
7570
|
+
next();
|
|
7571
|
+
});
|
|
7572
|
+
schema20.pre("insertMany", function syncSearchNameOnInsertMany(next, docs) {
|
|
7573
|
+
const list = Array.isArray(docs) ? docs : [docs];
|
|
7574
|
+
for (const doc of list) {
|
|
7575
|
+
if (doc && typeof doc.name === "string") {
|
|
7576
|
+
doc.searchName = deriveSearchName(doc.name);
|
|
7577
|
+
}
|
|
7578
|
+
}
|
|
7579
|
+
next();
|
|
7580
|
+
});
|
|
7581
|
+
schema20.pre("bulkWrite", function syncSearchNameOnBulkWrite(next, ops) {
|
|
7582
|
+
for (const op of ops) {
|
|
7583
|
+
const doc = op.insertOne?.document ?? op.replaceOne?.replacement;
|
|
7584
|
+
if (doc && typeof doc.name === "string") {
|
|
7585
|
+
doc.searchName = deriveSearchName(doc.name);
|
|
7586
|
+
}
|
|
7587
|
+
const $set = op.updateOne?.update?.$set;
|
|
7588
|
+
if ($set && typeof $set.name === "string") {
|
|
7589
|
+
$set.searchName = deriveSearchName($set.name);
|
|
7590
|
+
}
|
|
7591
|
+
}
|
|
7592
|
+
next();
|
|
7593
|
+
});
|
|
7594
|
+
const syncSearchNameOnUpdate = function(next) {
|
|
7595
|
+
const update = this.getUpdate();
|
|
7596
|
+
if (update && typeof update === "object" && "$set" in update) {
|
|
7597
|
+
const $set = update.$set;
|
|
7598
|
+
if ($set && typeof $set.name === "string") {
|
|
7599
|
+
this.setUpdate({
|
|
7600
|
+
...update,
|
|
7601
|
+
$set: { ...$set, searchName: deriveSearchName($set.name) }
|
|
7602
|
+
});
|
|
7603
|
+
}
|
|
7604
|
+
}
|
|
7605
|
+
next();
|
|
7606
|
+
};
|
|
7607
|
+
schema20.pre(
|
|
7608
|
+
["findOneAndUpdate", "updateOne", "updateMany"],
|
|
7609
|
+
syncSearchNameOnUpdate
|
|
7610
|
+
);
|
|
7611
|
+
}
|
|
7612
|
+
|
|
7613
|
+
// src/mongoose/GoogleImportedMarket.ts
|
|
7614
|
+
var MongooseSchema8 = import_mongoose8.default.Schema;
|
|
7615
|
+
var addressComponentSchema = new MongooseSchema8(
|
|
5844
7616
|
{
|
|
5845
7617
|
longName: { required: false, type: String },
|
|
5846
7618
|
shortName: { required: false, type: String },
|
|
@@ -5848,7 +7620,7 @@ var addressComponentSchema = new MongooseSchema7(
|
|
|
5848
7620
|
},
|
|
5849
7621
|
{ _id: false }
|
|
5850
7622
|
);
|
|
5851
|
-
var
|
|
7623
|
+
var schema4 = new MongooseSchema8(
|
|
5852
7624
|
{
|
|
5853
7625
|
active: { default: false, required: true, type: Boolean },
|
|
5854
7626
|
address: { required: true, type: String },
|
|
@@ -5860,7 +7632,7 @@ var schema3 = new MongooseSchema7(
|
|
|
5860
7632
|
claimedByUserId: {
|
|
5861
7633
|
ref: "User",
|
|
5862
7634
|
required: false,
|
|
5863
|
-
type:
|
|
7635
|
+
type: import_mongoose8.default.Schema.Types.ObjectId
|
|
5864
7636
|
},
|
|
5865
7637
|
cover: {
|
|
5866
7638
|
required: false,
|
|
@@ -5872,7 +7644,7 @@ var schema3 = new MongooseSchema7(
|
|
|
5872
7644
|
eventId: {
|
|
5873
7645
|
ref: "Event",
|
|
5874
7646
|
required: false,
|
|
5875
|
-
type:
|
|
7647
|
+
type: import_mongoose8.default.Schema.Types.ObjectId
|
|
5876
7648
|
},
|
|
5877
7649
|
eventType: {
|
|
5878
7650
|
enum: Object.values(EnumEventType),
|
|
@@ -5911,18 +7683,20 @@ var schema3 = new MongooseSchema7(
|
|
|
5911
7683
|
},
|
|
5912
7684
|
{ timestamps: true }
|
|
5913
7685
|
);
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
7686
|
+
schema4.index({ "location.geo": "2dsphere" });
|
|
7687
|
+
schema4.index({ name: 1 });
|
|
7688
|
+
schema4.index({ region: 1 });
|
|
7689
|
+
schema4.index({ deletedAt: 1 });
|
|
7690
|
+
schema4.index({ "dateTime.dateStatus": 1 });
|
|
7691
|
+
schema4.index({ slug: 1 });
|
|
7692
|
+
schema4.index({ name: "text", description: "text" });
|
|
7693
|
+
schema4.plugin(searchNamePlugin);
|
|
7694
|
+
var GoogleImportedMarketModel = import_mongoose8.default.models.GoogleImportedMarket || import_mongoose8.default.model("GoogleImportedMarket", schema4);
|
|
5921
7695
|
|
|
5922
7696
|
// src/mongoose/Notification.ts
|
|
5923
|
-
var
|
|
5924
|
-
var
|
|
5925
|
-
var
|
|
7697
|
+
var import_mongoose9 = __toESM(require("mongoose"));
|
|
7698
|
+
var MongooseSchema9 = import_mongoose9.default.Schema;
|
|
7699
|
+
var schema5 = new MongooseSchema9(
|
|
5926
7700
|
{
|
|
5927
7701
|
data: {
|
|
5928
7702
|
resourceId: { required: true, type: String },
|
|
@@ -5945,16 +7719,16 @@ var schema4 = new MongooseSchema8(
|
|
|
5945
7719
|
userId: {
|
|
5946
7720
|
ref: "User",
|
|
5947
7721
|
required: true,
|
|
5948
|
-
type:
|
|
7722
|
+
type: import_mongoose9.default.Schema.Types.ObjectId
|
|
5949
7723
|
}
|
|
5950
7724
|
},
|
|
5951
7725
|
{ timestamps: true }
|
|
5952
7726
|
);
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
var NotificationModel =
|
|
7727
|
+
schema5.index({ isRead: 1, userId: 1 });
|
|
7728
|
+
schema5.index({ createdAt: -1, userId: 1 });
|
|
7729
|
+
var NotificationModel = import_mongoose9.default.models.Notification || import_mongoose9.default.model("Notification", schema5);
|
|
5956
7730
|
|
|
5957
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
7731
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-P4NLBWEJ.mjs
|
|
5958
7732
|
var EnumInviteStatus2 = /* @__PURE__ */ ((EnumInviteStatus22) => {
|
|
5959
7733
|
EnumInviteStatus22["ACCEPTED"] = "Accepted";
|
|
5960
7734
|
EnumInviteStatus22["COMPLETED"] = "Completed";
|
|
@@ -6032,9 +7806,9 @@ var EnumSubscriptionStatus2 = /* @__PURE__ */ ((EnumSubscriptionStatus22) => {
|
|
|
6032
7806
|
})(EnumSubscriptionStatus2 || {});
|
|
6033
7807
|
|
|
6034
7808
|
// src/mongoose/PushToken.ts
|
|
6035
|
-
var
|
|
6036
|
-
var
|
|
6037
|
-
var
|
|
7809
|
+
var import_mongoose10 = __toESM(require("mongoose"));
|
|
7810
|
+
var MongooseSchema10 = import_mongoose10.default.Schema;
|
|
7811
|
+
var schema6 = new MongooseSchema10(
|
|
6038
7812
|
{
|
|
6039
7813
|
platform: {
|
|
6040
7814
|
enum: Object.values(EnumOSPlatform2),
|
|
@@ -6045,17 +7819,17 @@ var schema5 = new MongooseSchema9(
|
|
|
6045
7819
|
userId: {
|
|
6046
7820
|
ref: "User",
|
|
6047
7821
|
required: true,
|
|
6048
|
-
type:
|
|
7822
|
+
type: import_mongoose10.default.Schema.Types.ObjectId
|
|
6049
7823
|
}
|
|
6050
7824
|
},
|
|
6051
7825
|
{ timestamps: true }
|
|
6052
7826
|
);
|
|
6053
|
-
var PushTokenModel =
|
|
7827
|
+
var PushTokenModel = import_mongoose10.default.models.PushToken || import_mongoose10.default.model("PushToken", schema6);
|
|
6054
7828
|
|
|
6055
7829
|
// src/mongoose/ResourceActivity.ts
|
|
6056
|
-
var
|
|
6057
|
-
var
|
|
6058
|
-
var ActivitySchema = new
|
|
7830
|
+
var import_mongoose11 = __toESM(require("mongoose"));
|
|
7831
|
+
var MongooseSchema11 = import_mongoose11.default.Schema;
|
|
7832
|
+
var ActivitySchema = new MongooseSchema11(
|
|
6059
7833
|
{
|
|
6060
7834
|
activityType: {
|
|
6061
7835
|
enum: Object.values(EnumActivity),
|
|
@@ -6083,7 +7857,7 @@ var ActivitySchema = new MongooseSchema10(
|
|
|
6083
7857
|
},
|
|
6084
7858
|
{ _id: false }
|
|
6085
7859
|
);
|
|
6086
|
-
var
|
|
7860
|
+
var schema7 = new MongooseSchema11(
|
|
6087
7861
|
{
|
|
6088
7862
|
activity: { default: [], type: [ActivitySchema] },
|
|
6089
7863
|
resourceId: { required: true, type: String },
|
|
@@ -6095,46 +7869,55 @@ var schema6 = new MongooseSchema10(
|
|
|
6095
7869
|
},
|
|
6096
7870
|
{ timestamps: true }
|
|
6097
7871
|
);
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
var ResourceActivityModel =
|
|
7872
|
+
schema7.index({ resourceId: 1, resourceType: 1 }, { unique: true });
|
|
7873
|
+
schema7.index({ "views.location": "2dsphere" });
|
|
7874
|
+
var ResourceActivityModel = import_mongoose11.default.models.ResourceActivity || import_mongoose11.default.model("ResourceActivity", schema7);
|
|
6101
7875
|
|
|
6102
7876
|
// src/mongoose/User.ts
|
|
6103
|
-
var
|
|
6104
|
-
var
|
|
6105
|
-
var userActivityEventSchema = new
|
|
7877
|
+
var import_mongoose12 = __toESM(require("mongoose"));
|
|
7878
|
+
var MongooseSchema12 = import_mongoose12.default.Schema;
|
|
7879
|
+
var userActivityEventSchema = new MongooseSchema12(
|
|
6106
7880
|
{
|
|
6107
7881
|
dateTime: dateTimeSchema2,
|
|
6108
7882
|
resourceId: {
|
|
6109
7883
|
ref: "Event",
|
|
6110
7884
|
required: false,
|
|
6111
|
-
type:
|
|
7885
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
6112
7886
|
}
|
|
6113
7887
|
},
|
|
6114
7888
|
{ _id: false }
|
|
6115
7889
|
);
|
|
6116
|
-
var userActivityFavouritesSchema = new
|
|
7890
|
+
var userActivityFavouritesSchema = new MongooseSchema12(
|
|
6117
7891
|
{
|
|
6118
7892
|
events: {
|
|
6119
7893
|
ref: "Event",
|
|
6120
7894
|
required: false,
|
|
6121
|
-
type: [
|
|
7895
|
+
type: [import_mongoose12.default.Schema.Types.ObjectId]
|
|
6122
7896
|
},
|
|
6123
7897
|
partners: {
|
|
6124
7898
|
ref: "Partner",
|
|
6125
7899
|
required: false,
|
|
6126
|
-
type: [
|
|
7900
|
+
type: [import_mongoose12.default.Schema.Types.ObjectId]
|
|
6127
7901
|
},
|
|
6128
7902
|
vendors: {
|
|
6129
7903
|
ref: "Vendor",
|
|
6130
7904
|
required: false,
|
|
6131
|
-
type: [
|
|
7905
|
+
type: [import_mongoose12.default.Schema.Types.ObjectId]
|
|
6132
7906
|
}
|
|
6133
7907
|
},
|
|
6134
7908
|
{ _id: false }
|
|
6135
7909
|
);
|
|
6136
|
-
var stripeSchema = new
|
|
7910
|
+
var stripeSchema = new MongooseSchema12(
|
|
6137
7911
|
{
|
|
7912
|
+
billingPeriod: {
|
|
7913
|
+
enum: Object.values(EnumBillingPeriod),
|
|
7914
|
+
required: false,
|
|
7915
|
+
type: String
|
|
7916
|
+
},
|
|
7917
|
+
cancelAtPeriodEnd: {
|
|
7918
|
+
required: false,
|
|
7919
|
+
type: Boolean
|
|
7920
|
+
},
|
|
6138
7921
|
currentPlan: {
|
|
6139
7922
|
enum: Object.values(EnumUserLicence),
|
|
6140
7923
|
required: false,
|
|
@@ -6148,6 +7931,28 @@ var stripeSchema = new MongooseSchema11(
|
|
|
6148
7931
|
required: false,
|
|
6149
7932
|
type: Date
|
|
6150
7933
|
},
|
|
7934
|
+
pendingBillingPeriod: {
|
|
7935
|
+
enum: Object.values(EnumBillingPeriod),
|
|
7936
|
+
required: false,
|
|
7937
|
+
type: String
|
|
7938
|
+
},
|
|
7939
|
+
pendingChangeEffectiveAt: {
|
|
7940
|
+
required: false,
|
|
7941
|
+
type: Date
|
|
7942
|
+
},
|
|
7943
|
+
pendingPlan: {
|
|
7944
|
+
enum: Object.values(EnumUserLicence),
|
|
7945
|
+
required: false,
|
|
7946
|
+
type: String
|
|
7947
|
+
},
|
|
7948
|
+
priceId: {
|
|
7949
|
+
required: false,
|
|
7950
|
+
type: String
|
|
7951
|
+
},
|
|
7952
|
+
scheduleId: {
|
|
7953
|
+
required: false,
|
|
7954
|
+
type: String
|
|
7955
|
+
},
|
|
6151
7956
|
startDate: {
|
|
6152
7957
|
required: false,
|
|
6153
7958
|
type: Date
|
|
@@ -6160,11 +7965,19 @@ var stripeSchema = new MongooseSchema11(
|
|
|
6160
7965
|
subscriptionId: {
|
|
6161
7966
|
required: false,
|
|
6162
7967
|
type: String
|
|
7968
|
+
},
|
|
7969
|
+
subscriptionMutationLockExpiresAt: {
|
|
7970
|
+
required: false,
|
|
7971
|
+
type: Date
|
|
7972
|
+
},
|
|
7973
|
+
subscriptionMutationLockId: {
|
|
7974
|
+
required: false,
|
|
7975
|
+
type: String
|
|
6163
7976
|
}
|
|
6164
7977
|
},
|
|
6165
7978
|
{ _id: false }
|
|
6166
7979
|
);
|
|
6167
|
-
var redeemedRewardSchema = new
|
|
7980
|
+
var redeemedRewardSchema = new MongooseSchema12(
|
|
6168
7981
|
{
|
|
6169
7982
|
name: {
|
|
6170
7983
|
enum: Object.values(EnumReward),
|
|
@@ -6176,13 +7989,13 @@ var redeemedRewardSchema = new MongooseSchema11(
|
|
|
6176
7989
|
},
|
|
6177
7990
|
{ _id: false }
|
|
6178
7991
|
);
|
|
6179
|
-
var
|
|
7992
|
+
var schema8 = new MongooseSchema12(
|
|
6180
7993
|
{
|
|
6181
7994
|
active: { default: false, required: true, type: Boolean },
|
|
6182
7995
|
affiliate: {
|
|
6183
7996
|
ref: "Affiliate",
|
|
6184
7997
|
required: false,
|
|
6185
|
-
type:
|
|
7998
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
6186
7999
|
},
|
|
6187
8000
|
avatar: {
|
|
6188
8001
|
required: false,
|
|
@@ -6191,7 +8004,7 @@ var schema7 = new MongooseSchema11(
|
|
|
6191
8004
|
coupon: {
|
|
6192
8005
|
ref: "Coupon",
|
|
6193
8006
|
required: false,
|
|
6194
|
-
type:
|
|
8007
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
6195
8008
|
},
|
|
6196
8009
|
deletedAt: { default: null, required: false, type: Date },
|
|
6197
8010
|
email: { required: true, type: String },
|
|
@@ -6203,13 +8016,13 @@ var schema7 = new MongooseSchema11(
|
|
|
6203
8016
|
events: {
|
|
6204
8017
|
ref: "Event",
|
|
6205
8018
|
required: false,
|
|
6206
|
-
type: [
|
|
8019
|
+
type: [import_mongoose12.default.Schema.Types.ObjectId]
|
|
6207
8020
|
},
|
|
6208
8021
|
firstName: { required: true, type: String },
|
|
6209
8022
|
game: {
|
|
6210
8023
|
ref: "Game",
|
|
6211
8024
|
required: false,
|
|
6212
|
-
type:
|
|
8025
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
6213
8026
|
},
|
|
6214
8027
|
interests: {
|
|
6215
8028
|
enum: Object.values(EnumResourceType),
|
|
@@ -6231,7 +8044,7 @@ var schema7 = new MongooseSchema11(
|
|
|
6231
8044
|
partner: {
|
|
6232
8045
|
ref: "Partner",
|
|
6233
8046
|
required: false,
|
|
6234
|
-
type:
|
|
8047
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
6235
8048
|
},
|
|
6236
8049
|
password: { required: true, type: String },
|
|
6237
8050
|
platform: {
|
|
@@ -6264,7 +8077,7 @@ var schema7 = new MongooseSchema11(
|
|
|
6264
8077
|
school: {
|
|
6265
8078
|
ref: "School",
|
|
6266
8079
|
required: false,
|
|
6267
|
-
type:
|
|
8080
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
6268
8081
|
},
|
|
6269
8082
|
stripe: {
|
|
6270
8083
|
required: false,
|
|
@@ -6289,19 +8102,20 @@ var schema7 = new MongooseSchema11(
|
|
|
6289
8102
|
vendor: {
|
|
6290
8103
|
ref: "Vendor",
|
|
6291
8104
|
required: false,
|
|
6292
|
-
type:
|
|
8105
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
6293
8106
|
}
|
|
6294
8107
|
},
|
|
6295
8108
|
{ strict: false, timestamps: true }
|
|
6296
8109
|
);
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
8110
|
+
schema8.index({ "licences.expiryDate": 1 });
|
|
8111
|
+
schema8.index({ "licences.licenceType": 1 });
|
|
8112
|
+
schema8.index({ promoCodes: 1, active: 1, deletedAt: 1 });
|
|
8113
|
+
var UserModel = import_mongoose12.default.models.User || import_mongoose12.default.model("User", schema8);
|
|
6300
8114
|
|
|
6301
8115
|
// src/mongoose/VerificationToken.ts
|
|
6302
|
-
var
|
|
6303
|
-
var
|
|
6304
|
-
var
|
|
8116
|
+
var import_mongoose13 = __toESM(require("mongoose"));
|
|
8117
|
+
var MongooseSchema13 = import_mongoose13.default.Schema;
|
|
8118
|
+
var schema9 = new MongooseSchema13(
|
|
6305
8119
|
{
|
|
6306
8120
|
createdAt: {
|
|
6307
8121
|
default: Date.now,
|
|
@@ -6316,12 +8130,12 @@ var schema8 = new MongooseSchema12(
|
|
|
6316
8130
|
},
|
|
6317
8131
|
{ timestamps: true }
|
|
6318
8132
|
);
|
|
6319
|
-
var VerificationTokenModel =
|
|
8133
|
+
var VerificationTokenModel = import_mongoose13.default.models.VerificationToken || import_mongoose13.default.model("VerificationToken", schema9);
|
|
6320
8134
|
|
|
6321
8135
|
// src/mongoose/vendor/Vendor.ts
|
|
6322
|
-
var
|
|
6323
|
-
var
|
|
6324
|
-
var vendorProductTypeSchema = new
|
|
8136
|
+
var import_mongoose14 = __toESM(require("mongoose"));
|
|
8137
|
+
var MongooseSchema14 = import_mongoose14.default.Schema;
|
|
8138
|
+
var vendorProductTypeSchema = new MongooseSchema14(
|
|
6325
8139
|
{
|
|
6326
8140
|
description: { required: false, type: String },
|
|
6327
8141
|
name: { required: true, type: String },
|
|
@@ -6332,14 +8146,14 @@ var vendorProductTypeSchema = new MongooseSchema13(
|
|
|
6332
8146
|
},
|
|
6333
8147
|
{ timestamps: true }
|
|
6334
8148
|
);
|
|
6335
|
-
var productWrapperSchema = new
|
|
8149
|
+
var productWrapperSchema = new MongooseSchema14(
|
|
6336
8150
|
{
|
|
6337
8151
|
active: { default: false, required: false, type: Boolean },
|
|
6338
8152
|
productsList: { required: false, type: [vendorProductTypeSchema] }
|
|
6339
8153
|
},
|
|
6340
8154
|
{ _id: false }
|
|
6341
8155
|
);
|
|
6342
|
-
var calendarSchema = new
|
|
8156
|
+
var calendarSchema = new MongooseSchema14(
|
|
6343
8157
|
{
|
|
6344
8158
|
dateTime: {
|
|
6345
8159
|
dateStatus: {
|
|
@@ -6360,14 +8174,14 @@ var calendarSchema = new MongooseSchema13(
|
|
|
6360
8174
|
},
|
|
6361
8175
|
{ _id: false }
|
|
6362
8176
|
);
|
|
6363
|
-
var calendarWrapperSchema = new
|
|
8177
|
+
var calendarWrapperSchema = new MongooseSchema14(
|
|
6364
8178
|
{
|
|
6365
8179
|
active: { default: false, required: true, type: Boolean },
|
|
6366
8180
|
calendarData: { required: false, type: [calendarSchema] }
|
|
6367
8181
|
},
|
|
6368
8182
|
{ _id: false }
|
|
6369
8183
|
);
|
|
6370
|
-
var
|
|
8184
|
+
var schema10 = new MongooseSchema14(
|
|
6371
8185
|
{
|
|
6372
8186
|
...baseResourceFields,
|
|
6373
8187
|
// Importing base resource fields from global.ts
|
|
@@ -6381,6 +8195,7 @@ var schema9 = new MongooseSchema13(
|
|
|
6381
8195
|
type: calendarWrapperSchema
|
|
6382
8196
|
},
|
|
6383
8197
|
categories: { required: true, type: [CategorySchema] },
|
|
8198
|
+
categoriesNames: { default: [], required: false, type: [String] },
|
|
6384
8199
|
claimed: { default: true, required: false, type: Boolean },
|
|
6385
8200
|
foodTruck: { required: true, type: Boolean },
|
|
6386
8201
|
products: { required: false, type: productWrapperSchema },
|
|
@@ -6393,12 +8208,12 @@ var schema9 = new MongooseSchema13(
|
|
|
6393
8208
|
unregisteredVendorId: {
|
|
6394
8209
|
ref: "UnregisteredVendor",
|
|
6395
8210
|
required: false,
|
|
6396
|
-
type:
|
|
8211
|
+
type: import_mongoose14.default.Schema.Types.ObjectId
|
|
6397
8212
|
},
|
|
6398
8213
|
vendorInfoId: {
|
|
6399
8214
|
ref: "VendorInfo",
|
|
6400
8215
|
required: false,
|
|
6401
|
-
type:
|
|
8216
|
+
type: import_mongoose14.default.Schema.Types.ObjectId
|
|
6402
8217
|
},
|
|
6403
8218
|
vendorType: {
|
|
6404
8219
|
enum: Object.values(EnumVendorType),
|
|
@@ -6408,24 +8223,31 @@ var schema9 = new MongooseSchema13(
|
|
|
6408
8223
|
},
|
|
6409
8224
|
{ timestamps: true }
|
|
6410
8225
|
);
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
8226
|
+
schema10.index({ name: 1 });
|
|
8227
|
+
schema10.index({ description: 1 });
|
|
8228
|
+
schema10.index({ region: 1 });
|
|
8229
|
+
schema10.index({ "categories.name": 1 });
|
|
8230
|
+
schema10.index({ slug: 1 });
|
|
8231
|
+
schema10.index({
|
|
8232
|
+
name: "text",
|
|
8233
|
+
description: "text",
|
|
8234
|
+
categoriesNames: "text"
|
|
8235
|
+
});
|
|
8236
|
+
schema10.index({ "owner.userId": 1, deletedAt: 1 });
|
|
8237
|
+
schema10.plugin(searchNamePlugin);
|
|
8238
|
+
var VendorModel = import_mongoose14.default.models.Vendor || import_mongoose14.default.model("Vendor", schema10);
|
|
6417
8239
|
|
|
6418
8240
|
// src/mongoose/vendor/VendorInfo.ts
|
|
6419
|
-
var
|
|
6420
|
-
var
|
|
6421
|
-
var AttributesSchema = new
|
|
8241
|
+
var import_mongoose15 = __toESM(require("mongoose"));
|
|
8242
|
+
var MongooseSchema15 = import_mongoose15.default.Schema;
|
|
8243
|
+
var AttributesSchema = new MongooseSchema15(
|
|
6422
8244
|
{
|
|
6423
8245
|
details: { required: false, type: String },
|
|
6424
8246
|
isRequired: { default: false, required: true, type: Boolean }
|
|
6425
8247
|
},
|
|
6426
8248
|
{ _id: false }
|
|
6427
8249
|
);
|
|
6428
|
-
var
|
|
8250
|
+
var schema11 = new MongooseSchema15(
|
|
6429
8251
|
{
|
|
6430
8252
|
active: { default: true, type: Boolean },
|
|
6431
8253
|
compliance: {
|
|
@@ -6460,28 +8282,29 @@ var schema10 = new MongooseSchema14(
|
|
|
6460
8282
|
vendorId: {
|
|
6461
8283
|
ref: "Vendor",
|
|
6462
8284
|
required: true,
|
|
6463
|
-
type:
|
|
8285
|
+
type: import_mongoose15.default.Schema.Types.ObjectId
|
|
6464
8286
|
}
|
|
6465
8287
|
},
|
|
6466
8288
|
{ timestamps: true }
|
|
6467
8289
|
);
|
|
6468
|
-
|
|
8290
|
+
schema11.index({ vendorId: 1 });
|
|
8291
|
+
var VendorInfoModel = import_mongoose15.default.models.VendorInfo || import_mongoose15.default.model("VendorInfo", schema11);
|
|
6469
8292
|
|
|
6470
8293
|
// src/mongoose/vendor/UnregisteredVendor.ts
|
|
6471
|
-
var
|
|
6472
|
-
var
|
|
6473
|
-
var invitationSchema = new
|
|
8294
|
+
var import_mongoose16 = __toESM(require("mongoose"));
|
|
8295
|
+
var MongooseSchema16 = import_mongoose16.default.Schema;
|
|
8296
|
+
var invitationSchema = new MongooseSchema16(
|
|
6474
8297
|
{
|
|
6475
8298
|
dateTime: { required: true, type: [dateTimeSchema2] },
|
|
6476
8299
|
inviterId: {
|
|
6477
8300
|
ref: "Event",
|
|
6478
8301
|
required: true,
|
|
6479
|
-
type:
|
|
8302
|
+
type: import_mongoose16.default.Schema.Types.ObjectId
|
|
6480
8303
|
}
|
|
6481
8304
|
},
|
|
6482
8305
|
{ _id: false }
|
|
6483
8306
|
);
|
|
6484
|
-
var
|
|
8307
|
+
var schema12 = new MongooseSchema16(
|
|
6485
8308
|
{
|
|
6486
8309
|
active: { default: true, required: true, type: Boolean },
|
|
6487
8310
|
categoryIds: { required: true, type: [String] },
|
|
@@ -6490,7 +8313,7 @@ var schema11 = new MongooseSchema15(
|
|
|
6490
8313
|
claimedByUserId: {
|
|
6491
8314
|
ref: "User",
|
|
6492
8315
|
required: false,
|
|
6493
|
-
type:
|
|
8316
|
+
type: import_mongoose16.default.Schema.Types.ObjectId
|
|
6494
8317
|
},
|
|
6495
8318
|
claimInitiatedAt: { default: null, required: false, type: Date },
|
|
6496
8319
|
claimToken: { default: null, required: false, type: String },
|
|
@@ -6503,14 +8326,14 @@ var schema11 = new MongooseSchema15(
|
|
|
6503
8326
|
},
|
|
6504
8327
|
{ timestamps: true }
|
|
6505
8328
|
);
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
var UnregisteredVendorModel =
|
|
8329
|
+
schema12.index({ name: 1 });
|
|
8330
|
+
schema12.index({ email: 1 });
|
|
8331
|
+
var UnregisteredVendorModel = import_mongoose16.default.models.UnregisteredVendor || import_mongoose16.default.model("UnregisteredVendor", schema12);
|
|
6509
8332
|
|
|
6510
8333
|
// src/mongoose/event/Event.ts
|
|
6511
|
-
var
|
|
6512
|
-
var
|
|
6513
|
-
var
|
|
8334
|
+
var import_mongoose17 = __toESM(require("mongoose"));
|
|
8335
|
+
var MongooseSchema17 = import_mongoose17.default.Schema;
|
|
8336
|
+
var schema13 = new MongooseSchema17(
|
|
6514
8337
|
{
|
|
6515
8338
|
...baseResourceFields,
|
|
6516
8339
|
// Importing base resource fields from global.ts
|
|
@@ -6519,7 +8342,7 @@ var schema12 = new MongooseSchema16(
|
|
|
6519
8342
|
eventInfoId: {
|
|
6520
8343
|
ref: "EventInfo",
|
|
6521
8344
|
required: false,
|
|
6522
|
-
type:
|
|
8345
|
+
type: import_mongoose17.default.Schema.Types.ObjectId
|
|
6523
8346
|
},
|
|
6524
8347
|
eventType: {
|
|
6525
8348
|
enum: Object.values(EnumEventType),
|
|
@@ -6548,20 +8371,23 @@ var schema12 = new MongooseSchema16(
|
|
|
6548
8371
|
},
|
|
6549
8372
|
{ timestamps: true }
|
|
6550
8373
|
);
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
8374
|
+
schema13.index({ name: 1 });
|
|
8375
|
+
schema13.index({ description: 1 });
|
|
8376
|
+
schema13.index({ region: 1 });
|
|
8377
|
+
schema13.index({ "location.geo": "2dsphere" });
|
|
8378
|
+
schema13.index({ tags: 1 });
|
|
8379
|
+
schema13.index({ deletedAt: 1 });
|
|
8380
|
+
schema13.index({ "dateTime.dateStatus": 1 });
|
|
8381
|
+
schema13.index({ slug: 1 });
|
|
8382
|
+
schema13.index({ name: "text", description: "text", tags: "text" });
|
|
8383
|
+
schema13.index({ "owner.userId": 1, deletedAt: 1 });
|
|
8384
|
+
schema13.plugin(searchNamePlugin);
|
|
8385
|
+
var EventModel = import_mongoose17.default.models.Event || import_mongoose17.default.model("Event", schema13);
|
|
6560
8386
|
|
|
6561
8387
|
// src/mongoose/Partner.ts
|
|
6562
|
-
var
|
|
6563
|
-
var
|
|
6564
|
-
var
|
|
8388
|
+
var import_mongoose18 = __toESM(require("mongoose"));
|
|
8389
|
+
var MongooseSchema18 = import_mongoose18.default.Schema;
|
|
8390
|
+
var schema14 = new MongooseSchema18(
|
|
6565
8391
|
{
|
|
6566
8392
|
...baseResourceFields,
|
|
6567
8393
|
location: {
|
|
@@ -6577,19 +8403,22 @@ var schema13 = new MongooseSchema17(
|
|
|
6577
8403
|
},
|
|
6578
8404
|
{ timestamps: true }
|
|
6579
8405
|
);
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
8406
|
+
schema14.index({ name: 1 });
|
|
8407
|
+
schema14.index({ description: 1 });
|
|
8408
|
+
schema14.index({ region: 1 });
|
|
8409
|
+
schema14.index({ "location.geo": "2dsphere" });
|
|
8410
|
+
schema14.index({ slug: 1 });
|
|
8411
|
+
schema14.index({ name: "text", description: "text" });
|
|
8412
|
+
schema14.index({ "owner.userId": 1, deletedAt: 1 });
|
|
8413
|
+
schema14.plugin(searchNamePlugin);
|
|
8414
|
+
var PartnerModel = import_mongoose18.default.models.Partner || import_mongoose18.default.model("Partner", schema14);
|
|
6586
8415
|
|
|
6587
8416
|
// src/mongoose/Post.ts
|
|
6588
|
-
var
|
|
6589
|
-
var
|
|
6590
|
-
var contentSchema = new
|
|
8417
|
+
var import_mongoose19 = __toESM(require("mongoose"));
|
|
8418
|
+
var MongooseSchema19 = import_mongoose19.default.Schema;
|
|
8419
|
+
var contentSchema = new MongooseSchema19(
|
|
6591
8420
|
{
|
|
6592
|
-
contentData:
|
|
8421
|
+
contentData: import_mongoose19.Schema.Types.Mixed,
|
|
6593
8422
|
contentOrder: { required: true, type: Number },
|
|
6594
8423
|
contentType: {
|
|
6595
8424
|
enum: Object.values(EnumPostContentType),
|
|
@@ -6599,7 +8428,7 @@ var contentSchema = new MongooseSchema18(
|
|
|
6599
8428
|
},
|
|
6600
8429
|
{ _id: false }
|
|
6601
8430
|
);
|
|
6602
|
-
var resourceSchema = new
|
|
8431
|
+
var resourceSchema = new MongooseSchema19(
|
|
6603
8432
|
{
|
|
6604
8433
|
resourceId: { required: true, type: String },
|
|
6605
8434
|
resourceRegion: { required: true, type: String },
|
|
@@ -6612,7 +8441,7 @@ var resourceSchema = new MongooseSchema18(
|
|
|
6612
8441
|
},
|
|
6613
8442
|
{ _id: false }
|
|
6614
8443
|
);
|
|
6615
|
-
var
|
|
8444
|
+
var schema15 = new MongooseSchema19(
|
|
6616
8445
|
{
|
|
6617
8446
|
active: { default: false, required: true, type: Boolean },
|
|
6618
8447
|
approvedAt: { default: null, required: false, type: Date },
|
|
@@ -6643,16 +8472,16 @@ var schema14 = new MongooseSchema18(
|
|
|
6643
8472
|
},
|
|
6644
8473
|
{ timestamps: true }
|
|
6645
8474
|
);
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
var PostModel =
|
|
8475
|
+
schema15.index({ title: 1 });
|
|
8476
|
+
schema15.index({ tags: 1 });
|
|
8477
|
+
schema15.index({ postType: 1, slug: 1 }, { unique: true });
|
|
8478
|
+
var PostModel = import_mongoose19.default.models.Post || import_mongoose19.default.model("Post", schema15);
|
|
6650
8479
|
|
|
6651
8480
|
// src/mongoose/AppSetting.ts
|
|
6652
|
-
var
|
|
6653
|
-
var
|
|
8481
|
+
var import_mongoose20 = __toESM(require("mongoose"));
|
|
8482
|
+
var MongooseSchema20 = import_mongoose20.default.Schema;
|
|
6654
8483
|
var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
|
|
6655
|
-
var AppSettingSchema = new
|
|
8484
|
+
var AppSettingSchema = new MongooseSchema20(
|
|
6656
8485
|
{
|
|
6657
8486
|
activeSchoolsStudentCountTotal: {
|
|
6658
8487
|
default: 0,
|
|
@@ -6683,18 +8512,18 @@ var AppSettingSchema = new MongooseSchema19(
|
|
|
6683
8512
|
},
|
|
6684
8513
|
{ timestamps: true }
|
|
6685
8514
|
);
|
|
6686
|
-
var AppSettingModel =
|
|
8515
|
+
var AppSettingModel = import_mongoose20.default.models.AppSetting || import_mongoose20.default.model("AppSetting", AppSettingSchema);
|
|
6687
8516
|
|
|
6688
8517
|
// src/mongoose/game/Game.ts
|
|
6689
|
-
var
|
|
8518
|
+
var import_mongoose24 = __toESM(require("mongoose"));
|
|
6690
8519
|
|
|
6691
8520
|
// src/mongoose/game/DailyClue.ts
|
|
6692
|
-
var
|
|
8521
|
+
var import_mongoose22 = __toESM(require("mongoose"));
|
|
6693
8522
|
|
|
6694
8523
|
// src/mongoose/game/utils.ts
|
|
6695
|
-
var
|
|
6696
|
-
var
|
|
6697
|
-
var schemaGameDate = new
|
|
8524
|
+
var import_mongoose21 = __toESM(require("mongoose"));
|
|
8525
|
+
var MongooseSchema21 = import_mongoose21.default.Schema;
|
|
8526
|
+
var schemaGameDate = new MongooseSchema21(
|
|
6698
8527
|
{
|
|
6699
8528
|
endDate: { required: true, type: Date },
|
|
6700
8529
|
startDate: { required: true, type: Date }
|
|
@@ -6703,8 +8532,8 @@ var schemaGameDate = new MongooseSchema20(
|
|
|
6703
8532
|
);
|
|
6704
8533
|
|
|
6705
8534
|
// src/mongoose/game/DailyClue.ts
|
|
6706
|
-
var
|
|
6707
|
-
var schemaLetters = new
|
|
8535
|
+
var MongooseSchema22 = import_mongoose22.default.Schema;
|
|
8536
|
+
var schemaLetters = new MongooseSchema22(
|
|
6708
8537
|
{
|
|
6709
8538
|
collected: { required: false, type: [String] },
|
|
6710
8539
|
solutionShuffled: { required: true, type: [String] }
|
|
@@ -6712,14 +8541,14 @@ var schemaLetters = new MongooseSchema21(
|
|
|
6712
8541
|
},
|
|
6713
8542
|
{ _id: false }
|
|
6714
8543
|
);
|
|
6715
|
-
var schemaDailyClueBaseGame = new
|
|
8544
|
+
var schemaDailyClueBaseGame = new MongooseSchema22(
|
|
6716
8545
|
{
|
|
6717
8546
|
gameDate: { required: true, type: schemaGameDate },
|
|
6718
8547
|
gameSolution: { required: true, type: String }
|
|
6719
8548
|
},
|
|
6720
8549
|
{ _id: false }
|
|
6721
8550
|
);
|
|
6722
|
-
var schemaDailyClueGameData = new
|
|
8551
|
+
var schemaDailyClueGameData = new MongooseSchema22(
|
|
6723
8552
|
{
|
|
6724
8553
|
gameFields: { required: true, type: schemaDailyClueBaseGame },
|
|
6725
8554
|
lastFoundDate: { default: null, required: false, type: Date },
|
|
@@ -6734,9 +8563,9 @@ var schemaDailyClueGameData = new MongooseSchema21(
|
|
|
6734
8563
|
);
|
|
6735
8564
|
|
|
6736
8565
|
// src/mongoose/game/PuzzleGame.ts
|
|
6737
|
-
var
|
|
6738
|
-
var
|
|
6739
|
-
var schemaPuzzleAnswer = new
|
|
8566
|
+
var import_mongoose23 = __toESM(require("mongoose"));
|
|
8567
|
+
var MongooseSchema23 = import_mongoose23.default.Schema;
|
|
8568
|
+
var schemaPuzzleAnswer = new MongooseSchema23(
|
|
6740
8569
|
{
|
|
6741
8570
|
answer: { required: true, type: String },
|
|
6742
8571
|
answerId: { required: true, type: String },
|
|
@@ -6744,7 +8573,7 @@ var schemaPuzzleAnswer = new MongooseSchema22(
|
|
|
6744
8573
|
},
|
|
6745
8574
|
{ _id: false }
|
|
6746
8575
|
);
|
|
6747
|
-
var schemaPuzzleQuestion = new
|
|
8576
|
+
var schemaPuzzleQuestion = new MongooseSchema23(
|
|
6748
8577
|
{
|
|
6749
8578
|
answers: { required: true, type: [schemaPuzzleAnswer] },
|
|
6750
8579
|
question: { required: true, type: String },
|
|
@@ -6752,20 +8581,20 @@ var schemaPuzzleQuestion = new MongooseSchema22(
|
|
|
6752
8581
|
},
|
|
6753
8582
|
{ _id: false }
|
|
6754
8583
|
);
|
|
6755
|
-
var schemaPuzzleBaseGame = new
|
|
8584
|
+
var schemaPuzzleBaseGame = new MongooseSchema23(
|
|
6756
8585
|
{
|
|
6757
8586
|
questions: { required: true, type: [schemaPuzzleQuestion] }
|
|
6758
8587
|
},
|
|
6759
8588
|
{ _id: false }
|
|
6760
8589
|
);
|
|
6761
|
-
var schemaPuzzleAnsweredQuestion = new
|
|
8590
|
+
var schemaPuzzleAnsweredQuestion = new MongooseSchema23(
|
|
6762
8591
|
{
|
|
6763
8592
|
questionId: { required: true, type: String },
|
|
6764
8593
|
selectedAnswerId: { required: true, type: String }
|
|
6765
8594
|
},
|
|
6766
8595
|
{ _id: false }
|
|
6767
8596
|
);
|
|
6768
|
-
var schemaPuzzleGameData = new
|
|
8597
|
+
var schemaPuzzleGameData = new MongooseSchema23(
|
|
6769
8598
|
{
|
|
6770
8599
|
answeredQuestions: {
|
|
6771
8600
|
default: null,
|
|
@@ -6780,19 +8609,19 @@ var schemaPuzzleGameData = new MongooseSchema22(
|
|
|
6780
8609
|
);
|
|
6781
8610
|
|
|
6782
8611
|
// src/mongoose/game/Game.ts
|
|
6783
|
-
var
|
|
8612
|
+
var MongooseSchema24 = import_mongoose24.default.Schema;
|
|
6784
8613
|
var gameDataSchemas = {
|
|
6785
8614
|
[EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
|
|
6786
8615
|
[EnumGameType.MINI_QUIZ]: schemaPuzzleGameData,
|
|
6787
8616
|
[EnumGameType.ODD_ONE_OUT]: schemaPuzzleGameData
|
|
6788
8617
|
};
|
|
6789
8618
|
var gameDataDefinition = Object.fromEntries(
|
|
6790
|
-
Object.entries(gameDataSchemas).map(([key,
|
|
8619
|
+
Object.entries(gameDataSchemas).map(([key, schema20]) => [
|
|
6791
8620
|
key,
|
|
6792
|
-
{ default: null, required: false, type:
|
|
8621
|
+
{ default: null, required: false, type: schema20 }
|
|
6793
8622
|
])
|
|
6794
8623
|
);
|
|
6795
|
-
var gameHistorySchema = new
|
|
8624
|
+
var gameHistorySchema = new MongooseSchema24(
|
|
6796
8625
|
{
|
|
6797
8626
|
createdAt: { required: true, type: Date },
|
|
6798
8627
|
gameDate: { required: true, type: schemaGameDate },
|
|
@@ -6812,7 +8641,7 @@ var gameHistorySchema = new MongooseSchema23(
|
|
|
6812
8641
|
},
|
|
6813
8642
|
{ _id: false }
|
|
6814
8643
|
);
|
|
6815
|
-
var gameTypeSchema = new
|
|
8644
|
+
var gameTypeSchema = new MongooseSchema24(
|
|
6816
8645
|
{
|
|
6817
8646
|
active: { default: true, required: true, type: Boolean },
|
|
6818
8647
|
gameData: gameDataDefinition,
|
|
@@ -6827,7 +8656,7 @@ var gameTypeSchema = new MongooseSchema23(
|
|
|
6827
8656
|
},
|
|
6828
8657
|
{ timestamps: true }
|
|
6829
8658
|
);
|
|
6830
|
-
var
|
|
8659
|
+
var schema16 = new MongooseSchema24(
|
|
6831
8660
|
{
|
|
6832
8661
|
active: { default: false, required: true, type: Boolean },
|
|
6833
8662
|
deletedAt: { default: null, required: false, type: Date },
|
|
@@ -6840,12 +8669,12 @@ var schema15 = new MongooseSchema23(
|
|
|
6840
8669
|
},
|
|
6841
8670
|
{ timestamps: true }
|
|
6842
8671
|
);
|
|
6843
|
-
var GameModel =
|
|
8672
|
+
var GameModel = import_mongoose24.default.models.Game || import_mongoose24.default.model("Game", schema16);
|
|
6844
8673
|
|
|
6845
8674
|
// src/mongoose/School.ts
|
|
6846
|
-
var
|
|
6847
|
-
var
|
|
6848
|
-
var campaignsSchema = new
|
|
8675
|
+
var import_mongoose25 = __toESM(require("mongoose"));
|
|
8676
|
+
var MongooseSchema25 = import_mongoose25.default.Schema;
|
|
8677
|
+
var campaignsSchema = new MongooseSchema25(
|
|
6849
8678
|
{
|
|
6850
8679
|
endDate: { required: true, type: Date },
|
|
6851
8680
|
name: { required: true, type: String },
|
|
@@ -6853,7 +8682,7 @@ var campaignsSchema = new MongooseSchema24(
|
|
|
6853
8682
|
},
|
|
6854
8683
|
{ _id: false }
|
|
6855
8684
|
);
|
|
6856
|
-
var
|
|
8685
|
+
var schema17 = new MongooseSchema25(
|
|
6857
8686
|
{
|
|
6858
8687
|
// New schools are active by default
|
|
6859
8688
|
active: { default: false, required: true, type: Boolean },
|
|
@@ -6880,19 +8709,19 @@ var schema16 = new MongooseSchema24(
|
|
|
6880
8709
|
},
|
|
6881
8710
|
{ timestamps: true }
|
|
6882
8711
|
);
|
|
6883
|
-
|
|
8712
|
+
schema17.index(
|
|
6884
8713
|
{ schoolCode: 1 },
|
|
6885
8714
|
{
|
|
6886
8715
|
partialFilterExpression: { active: true, deletedAt: null },
|
|
6887
8716
|
unique: true
|
|
6888
8717
|
}
|
|
6889
8718
|
);
|
|
6890
|
-
var SchoolModel =
|
|
8719
|
+
var SchoolModel = import_mongoose25.default.models.School || import_mongoose25.default.model("School", schema17);
|
|
6891
8720
|
|
|
6892
8721
|
// src/mongoose/Affiliate.ts
|
|
6893
|
-
var
|
|
6894
|
-
var
|
|
6895
|
-
var affiliateRewardSchema = new
|
|
8722
|
+
var import_mongoose26 = __toESM(require("mongoose"));
|
|
8723
|
+
var MongooseSchema26 = import_mongoose26.default.Schema;
|
|
8724
|
+
var affiliateRewardSchema = new MongooseSchema26(
|
|
6896
8725
|
{
|
|
6897
8726
|
createdAt: { required: true, type: Date },
|
|
6898
8727
|
redeemedAt: { default: null, required: false, type: Date },
|
|
@@ -6906,13 +8735,13 @@ var affiliateRewardSchema = new MongooseSchema25(
|
|
|
6906
8735
|
},
|
|
6907
8736
|
{ _id: false }
|
|
6908
8737
|
);
|
|
6909
|
-
var affiliateResourceSchema = new
|
|
8738
|
+
var affiliateResourceSchema = new MongooseSchema26(
|
|
6910
8739
|
{
|
|
6911
8740
|
resourceActive: { default: true, required: true, type: Boolean },
|
|
6912
8741
|
resourceDeletedAt: { default: null, required: false, type: Date },
|
|
6913
8742
|
resourceId: {
|
|
6914
8743
|
required: true,
|
|
6915
|
-
type:
|
|
8744
|
+
type: import_mongoose26.default.Schema.Types.ObjectId
|
|
6916
8745
|
},
|
|
6917
8746
|
resourceName: { required: true, type: String },
|
|
6918
8747
|
resourceOwner: {
|
|
@@ -6932,20 +8761,20 @@ var affiliateResourceSchema = new MongooseSchema25(
|
|
|
6932
8761
|
},
|
|
6933
8762
|
{ _id: false }
|
|
6934
8763
|
);
|
|
6935
|
-
var affiliateContactDetailsSchema = new
|
|
8764
|
+
var affiliateContactDetailsSchema = new MongooseSchema26(
|
|
6936
8765
|
{
|
|
6937
8766
|
mobilePhone: { required: true, type: String }
|
|
6938
8767
|
},
|
|
6939
8768
|
{ _id: false }
|
|
6940
8769
|
);
|
|
6941
|
-
var affiliateBankAccountDetailsSchema = new
|
|
8770
|
+
var affiliateBankAccountDetailsSchema = new MongooseSchema26(
|
|
6942
8771
|
{
|
|
6943
8772
|
accountHolderName: { required: true, type: String },
|
|
6944
8773
|
accountNumber: { required: true, type: String }
|
|
6945
8774
|
},
|
|
6946
8775
|
{ _id: false }
|
|
6947
8776
|
);
|
|
6948
|
-
var affiliateDetailsSchema = new
|
|
8777
|
+
var affiliateDetailsSchema = new MongooseSchema26(
|
|
6949
8778
|
{
|
|
6950
8779
|
bankAccountDetails: {
|
|
6951
8780
|
required: true,
|
|
@@ -6967,7 +8796,7 @@ var affiliateDetailsSchema = new MongooseSchema25(
|
|
|
6967
8796
|
},
|
|
6968
8797
|
{ _id: false }
|
|
6969
8798
|
);
|
|
6970
|
-
var redeemHistorySchema = new
|
|
8799
|
+
var redeemHistorySchema = new MongooseSchema26(
|
|
6971
8800
|
{
|
|
6972
8801
|
paidAt: { default: null, required: false, type: Date },
|
|
6973
8802
|
redeemedAt: { required: true, type: Date },
|
|
@@ -6975,7 +8804,7 @@ var redeemHistorySchema = new MongooseSchema25(
|
|
|
6975
8804
|
},
|
|
6976
8805
|
{ _id: false }
|
|
6977
8806
|
);
|
|
6978
|
-
var
|
|
8807
|
+
var schema18 = new MongooseSchema26(
|
|
6979
8808
|
{
|
|
6980
8809
|
active: { default: false, required: true, type: Boolean },
|
|
6981
8810
|
affiliateBonusRewards: {
|
|
@@ -7005,19 +8834,19 @@ var schema17 = new MongooseSchema25(
|
|
|
7005
8834
|
},
|
|
7006
8835
|
{ timestamps: true }
|
|
7007
8836
|
);
|
|
7008
|
-
|
|
8837
|
+
schema18.index(
|
|
7009
8838
|
{ affiliateCode: 1 },
|
|
7010
8839
|
{
|
|
7011
8840
|
partialFilterExpression: { active: true, deletedAt: null },
|
|
7012
8841
|
unique: true
|
|
7013
8842
|
}
|
|
7014
8843
|
);
|
|
7015
|
-
var AffiliateModel =
|
|
8844
|
+
var AffiliateModel = import_mongoose26.default.models.Affiliate || import_mongoose26.default.model("Affiliate", schema18);
|
|
7016
8845
|
|
|
7017
8846
|
// src/mongoose/Coupon.ts
|
|
7018
|
-
var
|
|
7019
|
-
var
|
|
7020
|
-
var couponOptionSchema = new
|
|
8847
|
+
var import_mongoose27 = __toESM(require("mongoose"));
|
|
8848
|
+
var MongooseSchema27 = import_mongoose27.default.Schema;
|
|
8849
|
+
var couponOptionSchema = new MongooseSchema27(
|
|
7021
8850
|
{
|
|
7022
8851
|
buy: { required: false, type: Number },
|
|
7023
8852
|
get: { required: false, type: Number },
|
|
@@ -7032,29 +8861,29 @@ var couponOptionSchema = new MongooseSchema26(
|
|
|
7032
8861
|
},
|
|
7033
8862
|
{ _id: false }
|
|
7034
8863
|
);
|
|
7035
|
-
var couponVendorProductSchema = new
|
|
8864
|
+
var couponVendorProductSchema = new MongooseSchema27(
|
|
7036
8865
|
{
|
|
7037
8866
|
couponId: {
|
|
7038
8867
|
required: true,
|
|
7039
|
-
type:
|
|
8868
|
+
type: import_mongoose27.default.Schema.Types.ObjectId
|
|
7040
8869
|
},
|
|
7041
8870
|
productId: {
|
|
7042
8871
|
required: true,
|
|
7043
|
-
type:
|
|
8872
|
+
type: import_mongoose27.default.Schema.Types.ObjectId
|
|
7044
8873
|
},
|
|
7045
8874
|
vendorCouponId: {
|
|
7046
8875
|
required: false,
|
|
7047
|
-
type:
|
|
8876
|
+
type: import_mongoose27.default.Schema.Types.ObjectId
|
|
7048
8877
|
},
|
|
7049
8878
|
vendorId: {
|
|
7050
8879
|
ref: "Vendor",
|
|
7051
8880
|
required: true,
|
|
7052
|
-
type:
|
|
8881
|
+
type: import_mongoose27.default.Schema.Types.ObjectId
|
|
7053
8882
|
}
|
|
7054
8883
|
},
|
|
7055
8884
|
{ _id: false }
|
|
7056
8885
|
);
|
|
7057
|
-
var couponCodeSchema = new
|
|
8886
|
+
var couponCodeSchema = new MongooseSchema27(
|
|
7058
8887
|
{
|
|
7059
8888
|
code: { required: true, type: String },
|
|
7060
8889
|
qrCode: { required: true, type: ResourceImageTypeSchema },
|
|
@@ -7062,7 +8891,7 @@ var couponCodeSchema = new MongooseSchema26(
|
|
|
7062
8891
|
},
|
|
7063
8892
|
{ _id: false }
|
|
7064
8893
|
);
|
|
7065
|
-
var couponParticipantUserSchema = new
|
|
8894
|
+
var couponParticipantUserSchema = new MongooseSchema27(
|
|
7066
8895
|
{
|
|
7067
8896
|
couponCollectedCount: { default: 0, required: true, type: Number },
|
|
7068
8897
|
couponCycleRedeemed: { default: false, required: true, type: Boolean },
|
|
@@ -7071,12 +8900,12 @@ var couponParticipantUserSchema = new MongooseSchema26(
|
|
|
7071
8900
|
userId: {
|
|
7072
8901
|
ref: "User",
|
|
7073
8902
|
required: true,
|
|
7074
|
-
type:
|
|
8903
|
+
type: import_mongoose27.default.Schema.Types.ObjectId
|
|
7075
8904
|
}
|
|
7076
8905
|
},
|
|
7077
8906
|
{ timestamps: true }
|
|
7078
8907
|
);
|
|
7079
|
-
var couponDataSchema = new
|
|
8908
|
+
var couponDataSchema = new MongooseSchema27(
|
|
7080
8909
|
{
|
|
7081
8910
|
active: { default: true, required: true, type: Boolean },
|
|
7082
8911
|
couponCode: { required: false, type: couponCodeSchema },
|
|
@@ -7103,7 +8932,7 @@ var couponDataSchema = new MongooseSchema26(
|
|
|
7103
8932
|
},
|
|
7104
8933
|
{ timestamps: true }
|
|
7105
8934
|
);
|
|
7106
|
-
var
|
|
8935
|
+
var schema19 = new MongooseSchema27(
|
|
7107
8936
|
{
|
|
7108
8937
|
active: { default: true, required: true, type: Boolean },
|
|
7109
8938
|
couponData: { default: [], required: false, type: [couponDataSchema] },
|
|
@@ -7115,7 +8944,9 @@ var schema18 = new MongooseSchema26(
|
|
|
7115
8944
|
},
|
|
7116
8945
|
{ timestamps: true }
|
|
7117
8946
|
);
|
|
7118
|
-
|
|
8947
|
+
schema19.index({ active: 1, deletedAt: 1, "owner.userId": 1 });
|
|
8948
|
+
schema19.index({ "couponData.participantUsers.userId": 1 });
|
|
8949
|
+
var CouponModel = import_mongoose27.default.models.Coupon || import_mongoose27.default.model("Coupon", schema19);
|
|
7119
8950
|
|
|
7120
8951
|
// src/service/promoCode/constants.ts
|
|
7121
8952
|
var ACTIVE_NOT_DELETED_FILTER = {
|
|
@@ -7132,7 +8963,7 @@ async function activeAffiliateCodeExists(affiliateCode) {
|
|
|
7132
8963
|
return existing !== null;
|
|
7133
8964
|
}
|
|
7134
8965
|
|
|
7135
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
8966
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-YRO6KEZG.mjs
|
|
7136
8967
|
var import_dayjs3 = __toESM(require("dayjs"), 1);
|
|
7137
8968
|
var import_customParseFormat2 = __toESM(require("dayjs/plugin/customParseFormat.js"), 1);
|
|
7138
8969
|
var import_isSameOrAfter2 = __toESM(require("dayjs/plugin/isSameOrAfter.js"), 1);
|
|
@@ -7205,7 +9036,7 @@ var SHARE_RESOURCE_LABEL2 = {
|
|
|
7205
9036
|
school: "School"
|
|
7206
9037
|
};
|
|
7207
9038
|
|
|
7208
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
9039
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-JJQL6LZE.mjs
|
|
7209
9040
|
var PROMO_CODE_PREFIX2 = "CM-";
|
|
7210
9041
|
var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
|
|
7211
9042
|
var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
|
|
@@ -7317,7 +9148,7 @@ var gameScreenIdentifierList2 = [
|
|
|
7317
9148
|
}
|
|
7318
9149
|
];
|
|
7319
9150
|
|
|
7320
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
9151
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-L3SNS6OJ.mjs
|
|
7321
9152
|
var import_dayjs4 = __toESM(require("dayjs"), 1);
|
|
7322
9153
|
var statusOptions2 = [
|
|
7323
9154
|
...Object.values(EnumInviteStatus2).map((status) => ({
|
|
@@ -8754,7 +10585,7 @@ function normalizeAffiliatePromoCodes(promoCodes) {
|
|
|
8754
10585
|
}
|
|
8755
10586
|
|
|
8756
10587
|
// src/service/database.ts
|
|
8757
|
-
var
|
|
10588
|
+
var import_mongoose31 = __toESM(require("mongoose"));
|
|
8758
10589
|
var connectToDatabase = async ({
|
|
8759
10590
|
appName,
|
|
8760
10591
|
dbName,
|
|
@@ -8767,7 +10598,7 @@ var connectToDatabase = async ({
|
|
|
8767
10598
|
// Fallback to MongoDB Atlas connection string
|
|
8768
10599
|
`mongodb+srv://${dbUser}:${dbPassword}@${dbName}.mongodb.net/?retryWrites=true&w=majority&appName=${appName}`
|
|
8769
10600
|
);
|
|
8770
|
-
await
|
|
10601
|
+
await import_mongoose31.default.connect(mongoUri);
|
|
8771
10602
|
const connectionType = mongodbUri ? "Local MongoDB" : "MongoDB Atlas";
|
|
8772
10603
|
console.log(
|
|
8773
10604
|
`${connectionType} connected from server/src/service/database.ts`
|
|
@@ -8780,7 +10611,7 @@ var connectToDatabase = async ({
|
|
|
8780
10611
|
|
|
8781
10612
|
// src/types/index.ts
|
|
8782
10613
|
var import_express = __toESM(require("express"));
|
|
8783
|
-
var
|
|
10614
|
+
var import_mongoose32 = __toESM(require("mongoose"));
|
|
8784
10615
|
|
|
8785
10616
|
// src/service/notifyUsers.ts
|
|
8786
10617
|
async function publishNotificationEvents(userId, pubsub) {
|
|
@@ -8863,15 +10694,15 @@ async function updateAdStatuses() {
|
|
|
8863
10694
|
}
|
|
8864
10695
|
|
|
8865
10696
|
// src/service/objectIdToString.ts
|
|
8866
|
-
var
|
|
10697
|
+
var import_mongoose34 = __toESM(require("mongoose"));
|
|
8867
10698
|
function isValidObjectId(value) {
|
|
8868
|
-
return
|
|
10699
|
+
return import_mongoose34.default.Types.ObjectId.isValid(value);
|
|
8869
10700
|
}
|
|
8870
10701
|
function convertObjectIdsToStrings(obj) {
|
|
8871
10702
|
if (obj === null || obj === void 0) {
|
|
8872
10703
|
return obj;
|
|
8873
10704
|
}
|
|
8874
|
-
if (obj instanceof
|
|
10705
|
+
if (obj instanceof import_mongoose34.default.Types.ObjectId) {
|
|
8875
10706
|
return obj.toString();
|
|
8876
10707
|
}
|
|
8877
10708
|
if (obj instanceof Date) {
|
|
@@ -9426,20 +11257,24 @@ var buildLicenceReplacePipeline = ({
|
|
|
9426
11257
|
async function replaceUserLicenceWithObject({
|
|
9427
11258
|
userId,
|
|
9428
11259
|
licenceObject,
|
|
9429
|
-
protectHigherLicence = true
|
|
11260
|
+
protectHigherLicence = true,
|
|
11261
|
+
refreshExistingLicence = false
|
|
9430
11262
|
}) {
|
|
9431
11263
|
const user = await UserModel.findById(userId, { licences: 1 }).lean();
|
|
9432
11264
|
if (!user) throw new import_graphql3.GraphQLError("User not found");
|
|
9433
|
-
|
|
11265
|
+
const existingLicence = user.licences?.find(
|
|
11266
|
+
(licence) => licence.licenceType === licenceObject.licenceType
|
|
11267
|
+
);
|
|
11268
|
+
if (existingLicence && !refreshExistingLicence) {
|
|
9434
11269
|
return;
|
|
9435
11270
|
}
|
|
11271
|
+
const category = getLicenceCategory(licenceObject.licenceType);
|
|
9436
11272
|
const updatedLicenceObject = {
|
|
9437
11273
|
...licenceObject,
|
|
9438
|
-
prevLicenceType: user.licences?.find(
|
|
9439
|
-
(
|
|
11274
|
+
prevLicenceType: existingLicence && refreshExistingLicence ? existingLicence.prevLicenceType : user.licences?.find(
|
|
11275
|
+
(licence) => licence.licenceType && getLicenceCategory(licence.licenceType) === category
|
|
9440
11276
|
)?.licenceType
|
|
9441
11277
|
};
|
|
9442
|
-
const category = getLicenceCategory(updatedLicenceObject.licenceType);
|
|
9443
11278
|
if (protectHigherLicence) {
|
|
9444
11279
|
const highestLicence = getHighestLicenceForCategory(
|
|
9445
11280
|
user.licences,
|
|
@@ -9553,6 +11388,17 @@ var vendorLicences = [
|
|
|
9553
11388
|
EnumUserLicence.PRO_VENDOR,
|
|
9554
11389
|
EnumUserLicence.PRO_PLUS_VENDOR
|
|
9555
11390
|
];
|
|
11391
|
+
function isProtectedByCurrentStripeSubscription(user, licenceType, now) {
|
|
11392
|
+
const stripe = user.stripe;
|
|
11393
|
+
if (!stripe?.subscriptionId || stripe.currentPlan !== licenceType || stripe.status !== EnumSubscriptionStatus.ACTIVE && stripe.status !== EnumSubscriptionStatus.TRIALING) {
|
|
11394
|
+
return false;
|
|
11395
|
+
}
|
|
11396
|
+
if (stripe.cancelAtPeriodEnd !== true || !stripe.endDate) {
|
|
11397
|
+
return true;
|
|
11398
|
+
}
|
|
11399
|
+
const paidThrough = (0, import_dayjs8.default)(stripe.endDate);
|
|
11400
|
+
return !paidThrough.isValid() || paidThrough.isAfter(now);
|
|
11401
|
+
}
|
|
9556
11402
|
async function handleVendorLicenceCompliance(user, now) {
|
|
9557
11403
|
if (!user.licences || !user.vendor) {
|
|
9558
11404
|
return;
|
|
@@ -9566,12 +11412,20 @@ async function handleVendorLicenceCompliance(user, now) {
|
|
|
9566
11412
|
const proLicences = vendorLicencesOfUser.filter(
|
|
9567
11413
|
(licence) => licence.licenceType !== EnumUserLicence.STANDARD_VENDOR
|
|
9568
11414
|
);
|
|
9569
|
-
const
|
|
11415
|
+
const expiredProLicences = proLicences.filter(
|
|
9570
11416
|
(licence) => !(0, import_dayjs8.default)(licence.expiryDate).isAfter(now)
|
|
9571
11417
|
);
|
|
9572
|
-
const
|
|
11418
|
+
const stripeProtectedLicenceTypes = new Set(
|
|
11419
|
+
expiredProLicences.filter(
|
|
11420
|
+
(licence) => isProtectedByCurrentStripeSubscription(user, licence.licenceType, now)
|
|
11421
|
+
).map((licence) => licence.licenceType)
|
|
11422
|
+
);
|
|
11423
|
+
const expiredProLicence = expiredProLicences.some(
|
|
11424
|
+
(licence) => !stripeProtectedLicenceTypes.has(licence.licenceType)
|
|
11425
|
+
);
|
|
11426
|
+
const hasValidProLicence = stripeProtectedLicenceTypes.size > 0 || hasValidLicence(proLicences, vendorLicences, now);
|
|
9573
11427
|
const hasExpiredVendorLicence = vendorLicencesOfUser.some(
|
|
9574
|
-
(licence) => !(0, import_dayjs8.default)(licence.expiryDate).isAfter(now)
|
|
11428
|
+
(licence) => !(0, import_dayjs8.default)(licence.expiryDate).isAfter(now) && !stripeProtectedLicenceTypes.has(licence.licenceType)
|
|
9575
11429
|
);
|
|
9576
11430
|
if (!hasExpiredVendorLicence) {
|
|
9577
11431
|
return;
|
|
@@ -9585,7 +11439,10 @@ async function handleVendorLicenceCompliance(user, now) {
|
|
|
9585
11439
|
"owner.userId": user._id
|
|
9586
11440
|
}).lean().exec();
|
|
9587
11441
|
}
|
|
9588
|
-
|
|
11442
|
+
const licencesToSync = vendorLicences.filter(
|
|
11443
|
+
(licenceType) => !stripeProtectedLicenceTypes.has(licenceType)
|
|
11444
|
+
);
|
|
11445
|
+
await syncUserLicencesAfterExpiry(user._id, licencesToSync, now, "downgrade");
|
|
9589
11446
|
if (!expiredProLicence || !vendor || hasValidProLicence) {
|
|
9590
11447
|
return;
|
|
9591
11448
|
}
|
|
@@ -9674,6 +11531,13 @@ async function processUserCompliance(user, now) {
|
|
|
9674
11531
|
}
|
|
9675
11532
|
|
|
9676
11533
|
// src/service/license/compliance/ensureUserLicenseCompliance.ts
|
|
11534
|
+
async function ensureUserLicenseComplianceForUser(userId, now = (0, import_dayjs10.default)()) {
|
|
11535
|
+
const user = await UserModel.findById(userId);
|
|
11536
|
+
if (!user) {
|
|
11537
|
+
return;
|
|
11538
|
+
}
|
|
11539
|
+
await processUserCompliance(user, now);
|
|
11540
|
+
}
|
|
9677
11541
|
async function ensureUserLicenseCompliance() {
|
|
9678
11542
|
const now = (0, import_dayjs10.default)();
|
|
9679
11543
|
console.log(`\u{1F50D} Checking license compliance at ${now.format()}`);
|
|
@@ -9925,7 +11789,7 @@ async function sendLicenseReminder(user, licence) {
|
|
|
9925
11789
|
await sendPushNotifications(payload);
|
|
9926
11790
|
console.log(`\u2705 Sent 7-day reminder to user ${userId} for ${licenceName}`);
|
|
9927
11791
|
}
|
|
9928
|
-
async function processLicenseReminder(
|
|
11792
|
+
async function processLicenseReminder(licence, now) {
|
|
9929
11793
|
if ((0, import_dayjs11.default)(licence.expiryDate).isBefore(now)) {
|
|
9930
11794
|
return false;
|
|
9931
11795
|
}
|
|
@@ -9957,7 +11821,7 @@ async function processUserLicenseReminders(user, now) {
|
|
|
9957
11821
|
const licenceChecks = await Promise.all(
|
|
9958
11822
|
validLicences.map(async (licence) => {
|
|
9959
11823
|
try {
|
|
9960
|
-
const shouldSend = await processLicenseReminder(
|
|
11824
|
+
const shouldSend = await processLicenseReminder(licence, now);
|
|
9961
11825
|
return { licence, shouldSend };
|
|
9962
11826
|
} catch (err) {
|
|
9963
11827
|
console.error(
|
|
@@ -10034,6 +11898,7 @@ async function remindUsersAboutLicenseExpiration() {
|
|
|
10034
11898
|
createLicenceObject,
|
|
10035
11899
|
didRemoveAnyEventDates,
|
|
10036
11900
|
ensureUserLicenseCompliance,
|
|
11901
|
+
ensureUserLicenseComplianceForUser,
|
|
10037
11902
|
eventLicences,
|
|
10038
11903
|
findAffiliateByPromoCode,
|
|
10039
11904
|
findEventOrImportedMarketById,
|
|
@@ -10081,4 +11946,28 @@ async function remindUsersAboutLicenseExpiration() {
|
|
|
10081
11946
|
vendorLicences,
|
|
10082
11947
|
vendorOwnerHasProLicence
|
|
10083
11948
|
});
|
|
11949
|
+
/*! Bundled license information:
|
|
11950
|
+
|
|
11951
|
+
react/cjs/react.production.js:
|
|
11952
|
+
(**
|
|
11953
|
+
* @license React
|
|
11954
|
+
* react.production.js
|
|
11955
|
+
*
|
|
11956
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
11957
|
+
*
|
|
11958
|
+
* This source code is licensed under the MIT license found in the
|
|
11959
|
+
* LICENSE file in the root directory of this source tree.
|
|
11960
|
+
*)
|
|
11961
|
+
|
|
11962
|
+
react/cjs/react.development.js:
|
|
11963
|
+
(**
|
|
11964
|
+
* @license React
|
|
11965
|
+
* react.development.js
|
|
11966
|
+
*
|
|
11967
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
11968
|
+
*
|
|
11969
|
+
* This source code is licensed under the MIT license found in the
|
|
11970
|
+
* LICENSE file in the root directory of this source tree.
|
|
11971
|
+
*)
|
|
11972
|
+
*/
|
|
10084
11973
|
//# sourceMappingURL=index.cjs.map
|