@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/index.mjs
CHANGED
|
@@ -1,3 +1,1490 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// node_modules/react/cjs/react.production.js
|
|
28
|
+
var require_react_production = __commonJS({
|
|
29
|
+
"node_modules/react/cjs/react.production.js"(exports) {
|
|
30
|
+
"use strict";
|
|
31
|
+
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element");
|
|
32
|
+
var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
|
|
33
|
+
var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
34
|
+
var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
|
|
35
|
+
var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
|
|
36
|
+
var REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer");
|
|
37
|
+
var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
|
|
38
|
+
var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
|
|
39
|
+
var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
|
|
40
|
+
var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
|
|
41
|
+
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
42
|
+
var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
|
|
43
|
+
var REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition");
|
|
44
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
45
|
+
function getIteratorFn(maybeIterable) {
|
|
46
|
+
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
|
|
47
|
+
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
48
|
+
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
49
|
+
}
|
|
50
|
+
var ReactNoopUpdateQueue = {
|
|
51
|
+
isMounted: function() {
|
|
52
|
+
return false;
|
|
53
|
+
},
|
|
54
|
+
enqueueForceUpdate: function() {
|
|
55
|
+
},
|
|
56
|
+
enqueueReplaceState: function() {
|
|
57
|
+
},
|
|
58
|
+
enqueueSetState: function() {
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var assign = Object.assign;
|
|
62
|
+
var emptyObject = {};
|
|
63
|
+
function Component(props, context, updater) {
|
|
64
|
+
this.props = props;
|
|
65
|
+
this.context = context;
|
|
66
|
+
this.refs = emptyObject;
|
|
67
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
68
|
+
}
|
|
69
|
+
Component.prototype.isReactComponent = {};
|
|
70
|
+
Component.prototype.setState = function(partialState, callback) {
|
|
71
|
+
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
|
|
72
|
+
throw Error(
|
|
73
|
+
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
74
|
+
);
|
|
75
|
+
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
76
|
+
};
|
|
77
|
+
Component.prototype.forceUpdate = function(callback) {
|
|
78
|
+
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
79
|
+
};
|
|
80
|
+
function ComponentDummy() {
|
|
81
|
+
}
|
|
82
|
+
ComponentDummy.prototype = Component.prototype;
|
|
83
|
+
function PureComponent(props, context, updater) {
|
|
84
|
+
this.props = props;
|
|
85
|
+
this.context = context;
|
|
86
|
+
this.refs = emptyObject;
|
|
87
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
88
|
+
}
|
|
89
|
+
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
90
|
+
pureComponentPrototype.constructor = PureComponent;
|
|
91
|
+
assign(pureComponentPrototype, Component.prototype);
|
|
92
|
+
pureComponentPrototype.isPureReactComponent = true;
|
|
93
|
+
var isArrayImpl = Array.isArray;
|
|
94
|
+
function noop() {
|
|
95
|
+
}
|
|
96
|
+
var ReactSharedInternals = { H: null, A: null, T: null, S: null };
|
|
97
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
98
|
+
function ReactElement(type, key, props) {
|
|
99
|
+
var refProp = props.ref;
|
|
100
|
+
return {
|
|
101
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
102
|
+
type,
|
|
103
|
+
key,
|
|
104
|
+
ref: void 0 !== refProp ? refProp : null,
|
|
105
|
+
props
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
109
|
+
return ReactElement(oldElement.type, newKey, oldElement.props);
|
|
110
|
+
}
|
|
111
|
+
function isValidElement(object) {
|
|
112
|
+
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
113
|
+
}
|
|
114
|
+
function escape(key) {
|
|
115
|
+
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
116
|
+
return "$" + key.replace(/[=:]/g, function(match) {
|
|
117
|
+
return escaperLookup[match];
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
121
|
+
function getElementKey(element, index) {
|
|
122
|
+
return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
|
|
123
|
+
}
|
|
124
|
+
function resolveThenable(thenable) {
|
|
125
|
+
switch (thenable.status) {
|
|
126
|
+
case "fulfilled":
|
|
127
|
+
return thenable.value;
|
|
128
|
+
case "rejected":
|
|
129
|
+
throw thenable.reason;
|
|
130
|
+
default:
|
|
131
|
+
switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
|
|
132
|
+
function(fulfilledValue) {
|
|
133
|
+
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
134
|
+
},
|
|
135
|
+
function(error) {
|
|
136
|
+
"pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
|
137
|
+
}
|
|
138
|
+
)), thenable.status) {
|
|
139
|
+
case "fulfilled":
|
|
140
|
+
return thenable.value;
|
|
141
|
+
case "rejected":
|
|
142
|
+
throw thenable.reason;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
throw thenable;
|
|
146
|
+
}
|
|
147
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
148
|
+
var type = typeof children;
|
|
149
|
+
if ("undefined" === type || "boolean" === type) children = null;
|
|
150
|
+
var invokeCallback = false;
|
|
151
|
+
if (null === children) invokeCallback = true;
|
|
152
|
+
else
|
|
153
|
+
switch (type) {
|
|
154
|
+
case "bigint":
|
|
155
|
+
case "string":
|
|
156
|
+
case "number":
|
|
157
|
+
invokeCallback = true;
|
|
158
|
+
break;
|
|
159
|
+
case "object":
|
|
160
|
+
switch (children.$$typeof) {
|
|
161
|
+
case REACT_ELEMENT_TYPE:
|
|
162
|
+
case REACT_PORTAL_TYPE:
|
|
163
|
+
invokeCallback = true;
|
|
164
|
+
break;
|
|
165
|
+
case REACT_LAZY_TYPE:
|
|
166
|
+
return invokeCallback = children._init, mapIntoArray(
|
|
167
|
+
invokeCallback(children._payload),
|
|
168
|
+
array,
|
|
169
|
+
escapedPrefix,
|
|
170
|
+
nameSoFar,
|
|
171
|
+
callback
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (invokeCallback)
|
|
176
|
+
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) {
|
|
177
|
+
return c;
|
|
178
|
+
})) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(
|
|
179
|
+
callback,
|
|
180
|
+
escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(
|
|
181
|
+
userProvidedKeyEscapeRegex,
|
|
182
|
+
"$&/"
|
|
183
|
+
) + "/") + invokeCallback
|
|
184
|
+
)), array.push(callback)), 1;
|
|
185
|
+
invokeCallback = 0;
|
|
186
|
+
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
187
|
+
if (isArrayImpl(children))
|
|
188
|
+
for (var i = 0; i < children.length; i++)
|
|
189
|
+
nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
|
|
190
|
+
nameSoFar,
|
|
191
|
+
array,
|
|
192
|
+
escapedPrefix,
|
|
193
|
+
type,
|
|
194
|
+
callback
|
|
195
|
+
);
|
|
196
|
+
else if (i = getIteratorFn(children), "function" === typeof i)
|
|
197
|
+
for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
|
|
198
|
+
nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
|
|
199
|
+
nameSoFar,
|
|
200
|
+
array,
|
|
201
|
+
escapedPrefix,
|
|
202
|
+
type,
|
|
203
|
+
callback
|
|
204
|
+
);
|
|
205
|
+
else if ("object" === type) {
|
|
206
|
+
if ("function" === typeof children.then)
|
|
207
|
+
return mapIntoArray(
|
|
208
|
+
resolveThenable(children),
|
|
209
|
+
array,
|
|
210
|
+
escapedPrefix,
|
|
211
|
+
nameSoFar,
|
|
212
|
+
callback
|
|
213
|
+
);
|
|
214
|
+
array = String(children);
|
|
215
|
+
throw Error(
|
|
216
|
+
"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."
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
return invokeCallback;
|
|
220
|
+
}
|
|
221
|
+
function mapChildren(children, func, context) {
|
|
222
|
+
if (null == children) return children;
|
|
223
|
+
var result = [], count = 0;
|
|
224
|
+
mapIntoArray(children, result, "", "", function(child) {
|
|
225
|
+
return func.call(context, child, count++);
|
|
226
|
+
});
|
|
227
|
+
return result;
|
|
228
|
+
}
|
|
229
|
+
function lazyInitializer(payload) {
|
|
230
|
+
if (-1 === payload._status) {
|
|
231
|
+
var ctor = payload._result, thenable = ctor();
|
|
232
|
+
thenable.then(
|
|
233
|
+
function(moduleObject) {
|
|
234
|
+
if (0 === payload._status || -1 === payload._status)
|
|
235
|
+
payload._status = 1, payload._result = moduleObject, void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
|
|
236
|
+
},
|
|
237
|
+
function(error) {
|
|
238
|
+
if (0 === payload._status || -1 === payload._status)
|
|
239
|
+
payload._status = 2, payload._result = error, void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
|
240
|
+
}
|
|
241
|
+
);
|
|
242
|
+
-1 === payload._status && (payload._status = 0, payload._result = thenable);
|
|
243
|
+
}
|
|
244
|
+
if (1 === payload._status) return payload._result.default;
|
|
245
|
+
throw payload._result;
|
|
246
|
+
}
|
|
247
|
+
var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
|
|
248
|
+
if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
|
|
249
|
+
var event = new window.ErrorEvent("error", {
|
|
250
|
+
bubbles: true,
|
|
251
|
+
cancelable: true,
|
|
252
|
+
message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
|
|
253
|
+
error
|
|
254
|
+
});
|
|
255
|
+
if (!window.dispatchEvent(event)) return;
|
|
256
|
+
} else if ("object" === typeof process && "function" === typeof process.emit) {
|
|
257
|
+
process.emit("uncaughtException", error);
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
console.error(error);
|
|
261
|
+
};
|
|
262
|
+
function startTransition(scope) {
|
|
263
|
+
var prevTransition = ReactSharedInternals.T, currentTransition = {};
|
|
264
|
+
currentTransition.types = null !== prevTransition ? prevTransition.types : null;
|
|
265
|
+
ReactSharedInternals.T = currentTransition;
|
|
266
|
+
try {
|
|
267
|
+
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
|
268
|
+
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
|
|
269
|
+
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
|
|
270
|
+
} catch (error) {
|
|
271
|
+
reportGlobalError(error);
|
|
272
|
+
} finally {
|
|
273
|
+
null !== prevTransition && null !== currentTransition.types && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
function addTransitionType(type) {
|
|
277
|
+
var transition = ReactSharedInternals.T;
|
|
278
|
+
if (null !== transition) {
|
|
279
|
+
var transitionTypes = transition.types;
|
|
280
|
+
null === transitionTypes ? transition.types = [type] : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
|
|
281
|
+
} else startTransition(addTransitionType.bind(null, type));
|
|
282
|
+
}
|
|
283
|
+
var Children = {
|
|
284
|
+
map: mapChildren,
|
|
285
|
+
forEach: function(children, forEachFunc, forEachContext) {
|
|
286
|
+
mapChildren(
|
|
287
|
+
children,
|
|
288
|
+
function() {
|
|
289
|
+
forEachFunc.apply(this, arguments);
|
|
290
|
+
},
|
|
291
|
+
forEachContext
|
|
292
|
+
);
|
|
293
|
+
},
|
|
294
|
+
count: function(children) {
|
|
295
|
+
var n = 0;
|
|
296
|
+
mapChildren(children, function() {
|
|
297
|
+
n++;
|
|
298
|
+
});
|
|
299
|
+
return n;
|
|
300
|
+
},
|
|
301
|
+
toArray: function(children) {
|
|
302
|
+
return mapChildren(children, function(child) {
|
|
303
|
+
return child;
|
|
304
|
+
}) || [];
|
|
305
|
+
},
|
|
306
|
+
only: function(children) {
|
|
307
|
+
if (!isValidElement(children))
|
|
308
|
+
throw Error(
|
|
309
|
+
"React.Children.only expected to receive a single React element child."
|
|
310
|
+
);
|
|
311
|
+
return children;
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
exports.Activity = REACT_ACTIVITY_TYPE;
|
|
315
|
+
exports.Children = Children;
|
|
316
|
+
exports.Component = Component;
|
|
317
|
+
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
318
|
+
exports.Profiler = REACT_PROFILER_TYPE;
|
|
319
|
+
exports.PureComponent = PureComponent;
|
|
320
|
+
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
321
|
+
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
322
|
+
exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
|
|
323
|
+
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
|
324
|
+
exports.__COMPILER_RUNTIME = {
|
|
325
|
+
__proto__: null,
|
|
326
|
+
c: function(size) {
|
|
327
|
+
return ReactSharedInternals.H.useMemoCache(size);
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
exports.addTransitionType = addTransitionType;
|
|
331
|
+
exports.cache = function(fn) {
|
|
332
|
+
return function() {
|
|
333
|
+
return fn.apply(null, arguments);
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
exports.cacheSignal = function() {
|
|
337
|
+
return null;
|
|
338
|
+
};
|
|
339
|
+
exports.cloneElement = function(element, config, children) {
|
|
340
|
+
if (null === element || void 0 === element)
|
|
341
|
+
throw Error(
|
|
342
|
+
"The argument must be a React element, but you passed " + element + "."
|
|
343
|
+
);
|
|
344
|
+
var props = assign({}, element.props), key = element.key;
|
|
345
|
+
if (null != config)
|
|
346
|
+
for (propName in void 0 !== config.key && (key = "" + config.key), config)
|
|
347
|
+
!hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
|
|
348
|
+
var propName = arguments.length - 2;
|
|
349
|
+
if (1 === propName) props.children = children;
|
|
350
|
+
else if (1 < propName) {
|
|
351
|
+
for (var childArray = Array(propName), i = 0; i < propName; i++)
|
|
352
|
+
childArray[i] = arguments[i + 2];
|
|
353
|
+
props.children = childArray;
|
|
354
|
+
}
|
|
355
|
+
return ReactElement(element.type, key, props);
|
|
356
|
+
};
|
|
357
|
+
exports.createContext = function(defaultValue) {
|
|
358
|
+
defaultValue = {
|
|
359
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
360
|
+
_currentValue: defaultValue,
|
|
361
|
+
_currentValue2: defaultValue,
|
|
362
|
+
_threadCount: 0,
|
|
363
|
+
Provider: null,
|
|
364
|
+
Consumer: null
|
|
365
|
+
};
|
|
366
|
+
defaultValue.Provider = defaultValue;
|
|
367
|
+
defaultValue.Consumer = {
|
|
368
|
+
$$typeof: REACT_CONSUMER_TYPE,
|
|
369
|
+
_context: defaultValue
|
|
370
|
+
};
|
|
371
|
+
return defaultValue;
|
|
372
|
+
};
|
|
373
|
+
exports.createElement = function(type, config, children) {
|
|
374
|
+
var propName, props = {}, key = null;
|
|
375
|
+
if (null != config)
|
|
376
|
+
for (propName in void 0 !== config.key && (key = "" + config.key), config)
|
|
377
|
+
hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]);
|
|
378
|
+
var childrenLength = arguments.length - 2;
|
|
379
|
+
if (1 === childrenLength) props.children = children;
|
|
380
|
+
else if (1 < childrenLength) {
|
|
381
|
+
for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
|
|
382
|
+
childArray[i] = arguments[i + 2];
|
|
383
|
+
props.children = childArray;
|
|
384
|
+
}
|
|
385
|
+
if (type && type.defaultProps)
|
|
386
|
+
for (propName in childrenLength = type.defaultProps, childrenLength)
|
|
387
|
+
void 0 === props[propName] && (props[propName] = childrenLength[propName]);
|
|
388
|
+
return ReactElement(type, key, props);
|
|
389
|
+
};
|
|
390
|
+
exports.createRef = function() {
|
|
391
|
+
return { current: null };
|
|
392
|
+
};
|
|
393
|
+
exports.forwardRef = function(render) {
|
|
394
|
+
return { $$typeof: REACT_FORWARD_REF_TYPE, render };
|
|
395
|
+
};
|
|
396
|
+
exports.isValidElement = isValidElement;
|
|
397
|
+
exports.lazy = function(ctor) {
|
|
398
|
+
return {
|
|
399
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
400
|
+
_payload: { _status: -1, _result: ctor },
|
|
401
|
+
_init: lazyInitializer
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
exports.memo = function(type, compare) {
|
|
405
|
+
return {
|
|
406
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
407
|
+
type,
|
|
408
|
+
compare: void 0 === compare ? null : compare
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
exports.startTransition = startTransition;
|
|
412
|
+
exports.unstable_useCacheRefresh = function() {
|
|
413
|
+
return ReactSharedInternals.H.useCacheRefresh();
|
|
414
|
+
};
|
|
415
|
+
exports.use = function(usable) {
|
|
416
|
+
return ReactSharedInternals.H.use(usable);
|
|
417
|
+
};
|
|
418
|
+
exports.useActionState = function(action, initialState, permalink) {
|
|
419
|
+
return ReactSharedInternals.H.useActionState(action, initialState, permalink);
|
|
420
|
+
};
|
|
421
|
+
exports.useCallback = function(callback, deps) {
|
|
422
|
+
return ReactSharedInternals.H.useCallback(callback, deps);
|
|
423
|
+
};
|
|
424
|
+
exports.useContext = function(Context) {
|
|
425
|
+
return ReactSharedInternals.H.useContext(Context);
|
|
426
|
+
};
|
|
427
|
+
exports.useDebugValue = function() {
|
|
428
|
+
};
|
|
429
|
+
exports.useDeferredValue = function(value, initialValue) {
|
|
430
|
+
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
|
|
431
|
+
};
|
|
432
|
+
exports.useEffect = function(create, deps) {
|
|
433
|
+
return ReactSharedInternals.H.useEffect(create, deps);
|
|
434
|
+
};
|
|
435
|
+
exports.useEffectEvent = function(callback) {
|
|
436
|
+
return ReactSharedInternals.H.useEffectEvent(callback);
|
|
437
|
+
};
|
|
438
|
+
exports.useId = function() {
|
|
439
|
+
return ReactSharedInternals.H.useId();
|
|
440
|
+
};
|
|
441
|
+
exports.useImperativeHandle = function(ref, create, deps) {
|
|
442
|
+
return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
|
|
443
|
+
};
|
|
444
|
+
exports.useInsertionEffect = function(create, deps) {
|
|
445
|
+
return ReactSharedInternals.H.useInsertionEffect(create, deps);
|
|
446
|
+
};
|
|
447
|
+
exports.useLayoutEffect = function(create, deps) {
|
|
448
|
+
return ReactSharedInternals.H.useLayoutEffect(create, deps);
|
|
449
|
+
};
|
|
450
|
+
exports.useMemo = function(create, deps) {
|
|
451
|
+
return ReactSharedInternals.H.useMemo(create, deps);
|
|
452
|
+
};
|
|
453
|
+
exports.useOptimistic = function(passthrough, reducer) {
|
|
454
|
+
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
|
|
455
|
+
};
|
|
456
|
+
exports.useReducer = function(reducer, initialArg, init) {
|
|
457
|
+
return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
|
|
458
|
+
};
|
|
459
|
+
exports.useRef = function(initialValue) {
|
|
460
|
+
return ReactSharedInternals.H.useRef(initialValue);
|
|
461
|
+
};
|
|
462
|
+
exports.useState = function(initialState) {
|
|
463
|
+
return ReactSharedInternals.H.useState(initialState);
|
|
464
|
+
};
|
|
465
|
+
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
466
|
+
return ReactSharedInternals.H.useSyncExternalStore(
|
|
467
|
+
subscribe,
|
|
468
|
+
getSnapshot,
|
|
469
|
+
getServerSnapshot
|
|
470
|
+
);
|
|
471
|
+
};
|
|
472
|
+
exports.useTransition = function() {
|
|
473
|
+
return ReactSharedInternals.H.useTransition();
|
|
474
|
+
};
|
|
475
|
+
exports.version = "19.3.0";
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
|
|
479
|
+
// node_modules/react/cjs/react.development.js
|
|
480
|
+
var require_react_development = __commonJS({
|
|
481
|
+
"node_modules/react/cjs/react.development.js"(exports, module) {
|
|
482
|
+
"use strict";
|
|
483
|
+
"production" !== process.env.NODE_ENV && (function() {
|
|
484
|
+
function defineDeprecationWarning(methodName, info) {
|
|
485
|
+
Object.defineProperty(Component.prototype, methodName, {
|
|
486
|
+
get: function() {
|
|
487
|
+
console.warn(
|
|
488
|
+
"%s(...) is deprecated in plain JavaScript React classes. %s",
|
|
489
|
+
info[0],
|
|
490
|
+
info[1]
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
function getIteratorFn(maybeIterable) {
|
|
496
|
+
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
497
|
+
return null;
|
|
498
|
+
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
499
|
+
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
500
|
+
}
|
|
501
|
+
function warnNoop(publicInstance, callerName) {
|
|
502
|
+
publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
|
|
503
|
+
var warningKey = publicInstance + "." + callerName;
|
|
504
|
+
didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
|
|
505
|
+
"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.",
|
|
506
|
+
callerName,
|
|
507
|
+
publicInstance
|
|
508
|
+
), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
|
|
509
|
+
}
|
|
510
|
+
function Component(props, context, updater) {
|
|
511
|
+
this.props = props;
|
|
512
|
+
this.context = context;
|
|
513
|
+
this.refs = emptyObject;
|
|
514
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
515
|
+
}
|
|
516
|
+
function ComponentDummy() {
|
|
517
|
+
}
|
|
518
|
+
function PureComponent(props, context, updater) {
|
|
519
|
+
this.props = props;
|
|
520
|
+
this.context = context;
|
|
521
|
+
this.refs = emptyObject;
|
|
522
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
523
|
+
}
|
|
524
|
+
function noop() {
|
|
525
|
+
}
|
|
526
|
+
function testStringCoercion(value) {
|
|
527
|
+
return "" + value;
|
|
528
|
+
}
|
|
529
|
+
function checkKeyStringCoercion(value) {
|
|
530
|
+
try {
|
|
531
|
+
testStringCoercion(value);
|
|
532
|
+
var JSCompiler_inline_result = false;
|
|
533
|
+
} catch (e) {
|
|
534
|
+
JSCompiler_inline_result = true;
|
|
535
|
+
}
|
|
536
|
+
if (JSCompiler_inline_result) {
|
|
537
|
+
JSCompiler_inline_result = console;
|
|
538
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
539
|
+
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
540
|
+
JSCompiler_temp_const.call(
|
|
541
|
+
JSCompiler_inline_result,
|
|
542
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
543
|
+
JSCompiler_inline_result$jscomp$0
|
|
544
|
+
);
|
|
545
|
+
return testStringCoercion(value);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
function getComponentNameFromType(type) {
|
|
549
|
+
if (null == type) return null;
|
|
550
|
+
if ("function" === typeof type)
|
|
551
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
552
|
+
if ("string" === typeof type) return type;
|
|
553
|
+
switch (type) {
|
|
554
|
+
case REACT_FRAGMENT_TYPE:
|
|
555
|
+
return "Fragment";
|
|
556
|
+
case REACT_PROFILER_TYPE:
|
|
557
|
+
return "Profiler";
|
|
558
|
+
case REACT_STRICT_MODE_TYPE:
|
|
559
|
+
return "StrictMode";
|
|
560
|
+
case REACT_SUSPENSE_TYPE:
|
|
561
|
+
return "Suspense";
|
|
562
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
563
|
+
return "SuspenseList";
|
|
564
|
+
case REACT_ACTIVITY_TYPE:
|
|
565
|
+
return "Activity";
|
|
566
|
+
case REACT_VIEW_TRANSITION_TYPE:
|
|
567
|
+
return "ViewTransition";
|
|
568
|
+
}
|
|
569
|
+
if ("object" === typeof type)
|
|
570
|
+
switch ("number" === typeof type.tag && console.error(
|
|
571
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
572
|
+
), type.$$typeof) {
|
|
573
|
+
case REACT_PORTAL_TYPE:
|
|
574
|
+
return "Portal";
|
|
575
|
+
case REACT_CONTEXT_TYPE:
|
|
576
|
+
return type.displayName || "Context";
|
|
577
|
+
case REACT_CONSUMER_TYPE:
|
|
578
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
579
|
+
case REACT_FORWARD_REF_TYPE:
|
|
580
|
+
var innerType = type.render;
|
|
581
|
+
type = type.displayName;
|
|
582
|
+
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
583
|
+
return type;
|
|
584
|
+
case REACT_MEMO_TYPE:
|
|
585
|
+
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
586
|
+
case REACT_LAZY_TYPE:
|
|
587
|
+
innerType = type._payload;
|
|
588
|
+
type = type._init;
|
|
589
|
+
try {
|
|
590
|
+
return getComponentNameFromType(type(innerType));
|
|
591
|
+
} catch (x) {
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
return null;
|
|
595
|
+
}
|
|
596
|
+
function getTaskName(type) {
|
|
597
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
598
|
+
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
|
|
599
|
+
return "<...>";
|
|
600
|
+
try {
|
|
601
|
+
var name = getComponentNameFromType(type);
|
|
602
|
+
return name ? "<" + name + ">" : "<...>";
|
|
603
|
+
} catch (x) {
|
|
604
|
+
return "<...>";
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
function getOwner() {
|
|
608
|
+
var dispatcher = ReactSharedInternals.A;
|
|
609
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
610
|
+
}
|
|
611
|
+
function UnknownOwner() {
|
|
612
|
+
return Error("react-stack-top-frame");
|
|
613
|
+
}
|
|
614
|
+
function hasValidKey(config) {
|
|
615
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
616
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
617
|
+
if (getter && getter.isReactWarning) return false;
|
|
618
|
+
}
|
|
619
|
+
return void 0 !== config.key;
|
|
620
|
+
}
|
|
621
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
622
|
+
function warnAboutAccessingKey() {
|
|
623
|
+
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
|
|
624
|
+
"%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)",
|
|
625
|
+
displayName
|
|
626
|
+
));
|
|
627
|
+
}
|
|
628
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
629
|
+
Object.defineProperty(props, "key", {
|
|
630
|
+
get: warnAboutAccessingKey,
|
|
631
|
+
configurable: true
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
635
|
+
var componentName = getComponentNameFromType(this.type);
|
|
636
|
+
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
|
|
637
|
+
"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."
|
|
638
|
+
));
|
|
639
|
+
componentName = this.props.ref;
|
|
640
|
+
return void 0 !== componentName ? componentName : null;
|
|
641
|
+
}
|
|
642
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
643
|
+
var refProp = props.ref;
|
|
644
|
+
type = {
|
|
645
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
646
|
+
type,
|
|
647
|
+
key,
|
|
648
|
+
props,
|
|
649
|
+
_owner: owner
|
|
650
|
+
};
|
|
651
|
+
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
652
|
+
enumerable: false,
|
|
653
|
+
get: elementRefGetterWithDeprecationWarning
|
|
654
|
+
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
655
|
+
type._store = {};
|
|
656
|
+
Object.defineProperty(type._store, "validated", {
|
|
657
|
+
configurable: false,
|
|
658
|
+
enumerable: false,
|
|
659
|
+
writable: true,
|
|
660
|
+
value: 0
|
|
661
|
+
});
|
|
662
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
663
|
+
configurable: false,
|
|
664
|
+
enumerable: false,
|
|
665
|
+
writable: true,
|
|
666
|
+
value: null
|
|
667
|
+
});
|
|
668
|
+
Object.defineProperty(type, "_debugStack", {
|
|
669
|
+
configurable: false,
|
|
670
|
+
enumerable: false,
|
|
671
|
+
writable: true,
|
|
672
|
+
value: debugStack
|
|
673
|
+
});
|
|
674
|
+
Object.defineProperty(type, "_debugTask", {
|
|
675
|
+
configurable: false,
|
|
676
|
+
enumerable: false,
|
|
677
|
+
writable: true,
|
|
678
|
+
value: debugTask
|
|
679
|
+
});
|
|
680
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
681
|
+
return type;
|
|
682
|
+
}
|
|
683
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
684
|
+
newKey = ReactElement(
|
|
685
|
+
oldElement.type,
|
|
686
|
+
newKey,
|
|
687
|
+
oldElement.props,
|
|
688
|
+
oldElement._owner,
|
|
689
|
+
oldElement._debugStack,
|
|
690
|
+
oldElement._debugTask
|
|
691
|
+
);
|
|
692
|
+
oldElement._store && (newKey._store.validated = oldElement._store.validated);
|
|
693
|
+
return newKey;
|
|
694
|
+
}
|
|
695
|
+
function validateChildKeys(node) {
|
|
696
|
+
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));
|
|
697
|
+
}
|
|
698
|
+
function isValidElement(object) {
|
|
699
|
+
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
700
|
+
}
|
|
701
|
+
function escape(key) {
|
|
702
|
+
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
703
|
+
return "$" + key.replace(/[=:]/g, function(match) {
|
|
704
|
+
return escaperLookup[match];
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
function getElementKey(element, index) {
|
|
708
|
+
return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
|
|
709
|
+
}
|
|
710
|
+
function resolveThenable(thenable) {
|
|
711
|
+
switch (thenable.status) {
|
|
712
|
+
case "fulfilled":
|
|
713
|
+
return thenable.value;
|
|
714
|
+
case "rejected":
|
|
715
|
+
throw thenable.reason;
|
|
716
|
+
default:
|
|
717
|
+
switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
|
|
718
|
+
function(fulfilledValue) {
|
|
719
|
+
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
720
|
+
},
|
|
721
|
+
function(error) {
|
|
722
|
+
"pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
|
723
|
+
}
|
|
724
|
+
)), thenable.status) {
|
|
725
|
+
case "fulfilled":
|
|
726
|
+
return thenable.value;
|
|
727
|
+
case "rejected":
|
|
728
|
+
throw thenable.reason;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
throw thenable;
|
|
732
|
+
}
|
|
733
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
734
|
+
var type = typeof children;
|
|
735
|
+
if ("undefined" === type || "boolean" === type) children = null;
|
|
736
|
+
var invokeCallback = false;
|
|
737
|
+
if (null === children) invokeCallback = true;
|
|
738
|
+
else
|
|
739
|
+
switch (type) {
|
|
740
|
+
case "bigint":
|
|
741
|
+
case "string":
|
|
742
|
+
case "number":
|
|
743
|
+
invokeCallback = true;
|
|
744
|
+
break;
|
|
745
|
+
case "object":
|
|
746
|
+
switch (children.$$typeof) {
|
|
747
|
+
case REACT_ELEMENT_TYPE:
|
|
748
|
+
case REACT_PORTAL_TYPE:
|
|
749
|
+
invokeCallback = true;
|
|
750
|
+
break;
|
|
751
|
+
case REACT_LAZY_TYPE:
|
|
752
|
+
return invokeCallback = children._init, mapIntoArray(
|
|
753
|
+
invokeCallback(children._payload),
|
|
754
|
+
array,
|
|
755
|
+
escapedPrefix,
|
|
756
|
+
nameSoFar,
|
|
757
|
+
callback
|
|
758
|
+
);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
if (invokeCallback) {
|
|
762
|
+
invokeCallback = children;
|
|
763
|
+
callback = callback(invokeCallback);
|
|
764
|
+
var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
|
|
765
|
+
isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
|
|
766
|
+
return c;
|
|
767
|
+
})) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
|
|
768
|
+
callback,
|
|
769
|
+
escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
|
|
770
|
+
userProvidedKeyEscapeRegex,
|
|
771
|
+
"$&/"
|
|
772
|
+
) + "/") + childKey
|
|
773
|
+
), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
|
|
774
|
+
return 1;
|
|
775
|
+
}
|
|
776
|
+
invokeCallback = 0;
|
|
777
|
+
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
778
|
+
if (isArrayImpl(children))
|
|
779
|
+
for (var i = 0; i < children.length; i++)
|
|
780
|
+
nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
|
|
781
|
+
nameSoFar,
|
|
782
|
+
array,
|
|
783
|
+
escapedPrefix,
|
|
784
|
+
type,
|
|
785
|
+
callback
|
|
786
|
+
);
|
|
787
|
+
else if (i = getIteratorFn(children), "function" === typeof i)
|
|
788
|
+
for (i === children.entries && (didWarnAboutMaps || console.warn(
|
|
789
|
+
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
|
|
790
|
+
), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
|
|
791
|
+
nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
|
|
792
|
+
nameSoFar,
|
|
793
|
+
array,
|
|
794
|
+
escapedPrefix,
|
|
795
|
+
type,
|
|
796
|
+
callback
|
|
797
|
+
);
|
|
798
|
+
else if ("object" === type) {
|
|
799
|
+
if ("function" === typeof children.then)
|
|
800
|
+
return mapIntoArray(
|
|
801
|
+
resolveThenable(children),
|
|
802
|
+
array,
|
|
803
|
+
escapedPrefix,
|
|
804
|
+
nameSoFar,
|
|
805
|
+
callback
|
|
806
|
+
);
|
|
807
|
+
array = String(children);
|
|
808
|
+
throw Error(
|
|
809
|
+
"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."
|
|
810
|
+
);
|
|
811
|
+
}
|
|
812
|
+
return invokeCallback;
|
|
813
|
+
}
|
|
814
|
+
function mapChildren(children, func, context) {
|
|
815
|
+
if (null == children) return children;
|
|
816
|
+
var result = [], count = 0;
|
|
817
|
+
mapIntoArray(children, result, "", "", function(child) {
|
|
818
|
+
return func.call(context, child, count++);
|
|
819
|
+
});
|
|
820
|
+
return result;
|
|
821
|
+
}
|
|
822
|
+
function lazyInitializer(payload) {
|
|
823
|
+
if (-1 === payload._status) {
|
|
824
|
+
var resolveDebugValue = null, rejectDebugValue = null, ioInfo = payload._ioInfo;
|
|
825
|
+
null != ioInfo && (ioInfo.start = ioInfo.end = performance.now(), ioInfo.value = new Promise(function(resolve, reject) {
|
|
826
|
+
resolveDebugValue = resolve;
|
|
827
|
+
rejectDebugValue = reject;
|
|
828
|
+
}));
|
|
829
|
+
ioInfo = payload._result;
|
|
830
|
+
var thenable = ioInfo();
|
|
831
|
+
thenable.then(
|
|
832
|
+
function(moduleObject) {
|
|
833
|
+
if (0 === payload._status || -1 === payload._status) {
|
|
834
|
+
payload._status = 1;
|
|
835
|
+
payload._result = moduleObject;
|
|
836
|
+
var _ioInfo = payload._ioInfo;
|
|
837
|
+
if (null != _ioInfo) {
|
|
838
|
+
_ioInfo.end = performance.now();
|
|
839
|
+
var debugValue = null == moduleObject ? void 0 : moduleObject.default;
|
|
840
|
+
resolveDebugValue(debugValue);
|
|
841
|
+
_ioInfo.value.status = "fulfilled";
|
|
842
|
+
_ioInfo.value.value = debugValue;
|
|
843
|
+
}
|
|
844
|
+
void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
|
|
845
|
+
}
|
|
846
|
+
},
|
|
847
|
+
function(error) {
|
|
848
|
+
if (0 === payload._status || -1 === payload._status) {
|
|
849
|
+
payload._status = 2;
|
|
850
|
+
payload._result = error;
|
|
851
|
+
var _ioInfo2 = payload._ioInfo;
|
|
852
|
+
null != _ioInfo2 && (_ioInfo2.end = performance.now(), _ioInfo2.value.then(noop, noop), rejectDebugValue(error), _ioInfo2.value.status = "rejected", _ioInfo2.value.reason = error);
|
|
853
|
+
void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
);
|
|
857
|
+
ioInfo = payload._ioInfo;
|
|
858
|
+
if (null != ioInfo) {
|
|
859
|
+
var displayName = thenable.displayName;
|
|
860
|
+
"string" === typeof displayName && (ioInfo.name = displayName);
|
|
861
|
+
}
|
|
862
|
+
-1 === payload._status && (payload._status = 0, payload._result = thenable);
|
|
863
|
+
}
|
|
864
|
+
if (1 === payload._status)
|
|
865
|
+
return ioInfo = payload._result, void 0 === ioInfo && console.error(
|
|
866
|
+
"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?",
|
|
867
|
+
ioInfo
|
|
868
|
+
), "default" in ioInfo || console.error(
|
|
869
|
+
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
|
|
870
|
+
ioInfo
|
|
871
|
+
), ioInfo.default;
|
|
872
|
+
throw payload._result;
|
|
873
|
+
}
|
|
874
|
+
function resolveDispatcher() {
|
|
875
|
+
var dispatcher = ReactSharedInternals.H;
|
|
876
|
+
null === dispatcher && console.error(
|
|
877
|
+
"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."
|
|
878
|
+
);
|
|
879
|
+
return dispatcher;
|
|
880
|
+
}
|
|
881
|
+
function releaseAsyncTransition() {
|
|
882
|
+
ReactSharedInternals.asyncTransitions--;
|
|
883
|
+
}
|
|
884
|
+
function startTransition(scope) {
|
|
885
|
+
var prevTransition = ReactSharedInternals.T, currentTransition = {};
|
|
886
|
+
currentTransition.types = null !== prevTransition ? prevTransition.types : null;
|
|
887
|
+
currentTransition._updatedFibers = /* @__PURE__ */ new Set();
|
|
888
|
+
ReactSharedInternals.T = currentTransition;
|
|
889
|
+
try {
|
|
890
|
+
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
|
891
|
+
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
|
|
892
|
+
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
|
|
893
|
+
} catch (error) {
|
|
894
|
+
reportGlobalError(error);
|
|
895
|
+
} finally {
|
|
896
|
+
null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
|
|
897
|
+
"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."
|
|
898
|
+
)), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
|
|
899
|
+
"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."
|
|
900
|
+
), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
function addTransitionType(type) {
|
|
904
|
+
var transition = ReactSharedInternals.T;
|
|
905
|
+
if (null !== transition) {
|
|
906
|
+
var transitionTypes = transition.types;
|
|
907
|
+
null === transitionTypes ? transition.types = [type] : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
|
|
908
|
+
} else
|
|
909
|
+
0 === ReactSharedInternals.asyncTransitions && console.error(
|
|
910
|
+
"addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition."
|
|
911
|
+
), startTransition(addTransitionType.bind(null, type));
|
|
912
|
+
}
|
|
913
|
+
function enqueueTask(task) {
|
|
914
|
+
if (null === enqueueTaskImpl)
|
|
915
|
+
try {
|
|
916
|
+
var requireString = ("require" + Math.random()).slice(0, 7);
|
|
917
|
+
enqueueTaskImpl = (module && module[requireString]).call(
|
|
918
|
+
module,
|
|
919
|
+
"timers"
|
|
920
|
+
).setImmediate;
|
|
921
|
+
} catch (_err) {
|
|
922
|
+
enqueueTaskImpl = function(callback) {
|
|
923
|
+
false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
|
|
924
|
+
"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."
|
|
925
|
+
));
|
|
926
|
+
var channel = new MessageChannel();
|
|
927
|
+
channel.port1.onmessage = callback;
|
|
928
|
+
channel.port2.postMessage(void 0);
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
return enqueueTaskImpl(task);
|
|
932
|
+
}
|
|
933
|
+
function aggregateErrors(errors) {
|
|
934
|
+
return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
|
|
935
|
+
}
|
|
936
|
+
function popActScope(prevActQueue, prevActScopeDepth) {
|
|
937
|
+
prevActScopeDepth !== actScopeDepth - 1 && console.error(
|
|
938
|
+
"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
|
|
939
|
+
);
|
|
940
|
+
actScopeDepth = prevActScopeDepth;
|
|
941
|
+
}
|
|
942
|
+
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
943
|
+
var queue = ReactSharedInternals.actQueue;
|
|
944
|
+
if (null !== queue)
|
|
945
|
+
if (0 !== queue.length)
|
|
946
|
+
try {
|
|
947
|
+
flushActQueue(queue);
|
|
948
|
+
enqueueTask(function() {
|
|
949
|
+
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
950
|
+
});
|
|
951
|
+
return;
|
|
952
|
+
} catch (error) {
|
|
953
|
+
ReactSharedInternals.thrownErrors.push(error);
|
|
954
|
+
}
|
|
955
|
+
else ReactSharedInternals.actQueue = null;
|
|
956
|
+
0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
|
|
957
|
+
}
|
|
958
|
+
function flushActQueue(queue) {
|
|
959
|
+
if (!isFlushing) {
|
|
960
|
+
isFlushing = true;
|
|
961
|
+
var i = 0;
|
|
962
|
+
try {
|
|
963
|
+
for (; i < queue.length; i++) {
|
|
964
|
+
var callback = queue[i];
|
|
965
|
+
do {
|
|
966
|
+
ReactSharedInternals.didUsePromise = false;
|
|
967
|
+
var continuation = callback(false);
|
|
968
|
+
if (null !== continuation) {
|
|
969
|
+
if (ReactSharedInternals.didUsePromise) {
|
|
970
|
+
queue[i] = callback;
|
|
971
|
+
queue.splice(0, i);
|
|
972
|
+
return;
|
|
973
|
+
}
|
|
974
|
+
callback = continuation;
|
|
975
|
+
} else break;
|
|
976
|
+
} while (1);
|
|
977
|
+
}
|
|
978
|
+
queue.length = 0;
|
|
979
|
+
} catch (error) {
|
|
980
|
+
queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
|
|
981
|
+
} finally {
|
|
982
|
+
isFlushing = false;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
987
|
+
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 = {
|
|
988
|
+
isMounted: function() {
|
|
989
|
+
return false;
|
|
990
|
+
},
|
|
991
|
+
enqueueForceUpdate: function(publicInstance) {
|
|
992
|
+
warnNoop(publicInstance, "forceUpdate");
|
|
993
|
+
},
|
|
994
|
+
enqueueReplaceState: function(publicInstance) {
|
|
995
|
+
warnNoop(publicInstance, "replaceState");
|
|
996
|
+
},
|
|
997
|
+
enqueueSetState: function(publicInstance) {
|
|
998
|
+
warnNoop(publicInstance, "setState");
|
|
999
|
+
}
|
|
1000
|
+
}, assign = Object.assign, emptyObject = {};
|
|
1001
|
+
Object.freeze(emptyObject);
|
|
1002
|
+
Component.prototype.isReactComponent = {};
|
|
1003
|
+
Component.prototype.setState = function(partialState, callback) {
|
|
1004
|
+
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
|
|
1005
|
+
throw Error(
|
|
1006
|
+
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
1007
|
+
);
|
|
1008
|
+
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
1009
|
+
};
|
|
1010
|
+
Component.prototype.forceUpdate = function(callback) {
|
|
1011
|
+
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
1012
|
+
};
|
|
1013
|
+
var deprecatedAPIs = {
|
|
1014
|
+
isMounted: [
|
|
1015
|
+
"isMounted",
|
|
1016
|
+
"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
|
|
1017
|
+
],
|
|
1018
|
+
replaceState: [
|
|
1019
|
+
"replaceState",
|
|
1020
|
+
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
|
|
1021
|
+
]
|
|
1022
|
+
};
|
|
1023
|
+
for (fnName in deprecatedAPIs)
|
|
1024
|
+
deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
1025
|
+
ComponentDummy.prototype = Component.prototype;
|
|
1026
|
+
deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
|
|
1027
|
+
deprecatedAPIs.constructor = PureComponent;
|
|
1028
|
+
assign(deprecatedAPIs, Component.prototype);
|
|
1029
|
+
deprecatedAPIs.isPureReactComponent = true;
|
|
1030
|
+
var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = {
|
|
1031
|
+
H: null,
|
|
1032
|
+
A: null,
|
|
1033
|
+
T: null,
|
|
1034
|
+
S: null,
|
|
1035
|
+
actQueue: null,
|
|
1036
|
+
asyncTransitions: 0,
|
|
1037
|
+
isBatchingLegacy: false,
|
|
1038
|
+
didScheduleLegacyUpdate: false,
|
|
1039
|
+
didUsePromise: false,
|
|
1040
|
+
thrownErrors: [],
|
|
1041
|
+
getCurrentStack: null,
|
|
1042
|
+
recentlyCreatedOwnerStacks: 0
|
|
1043
|
+
}, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
|
|
1044
|
+
return null;
|
|
1045
|
+
};
|
|
1046
|
+
deprecatedAPIs = {
|
|
1047
|
+
react_stack_bottom_frame: function(callStackForError) {
|
|
1048
|
+
return callStackForError();
|
|
1049
|
+
}
|
|
1050
|
+
};
|
|
1051
|
+
var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
|
|
1052
|
+
var didWarnAboutElementRef = {};
|
|
1053
|
+
var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
|
|
1054
|
+
deprecatedAPIs,
|
|
1055
|
+
UnknownOwner
|
|
1056
|
+
)();
|
|
1057
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
1058
|
+
var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
|
|
1059
|
+
if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
|
|
1060
|
+
var event = new window.ErrorEvent("error", {
|
|
1061
|
+
bubbles: true,
|
|
1062
|
+
cancelable: true,
|
|
1063
|
+
message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
|
|
1064
|
+
error
|
|
1065
|
+
});
|
|
1066
|
+
if (!window.dispatchEvent(event)) return;
|
|
1067
|
+
} else if ("object" === typeof process && "function" === typeof process.emit) {
|
|
1068
|
+
process.emit("uncaughtException", error);
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1071
|
+
console.error(error);
|
|
1072
|
+
}, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
|
|
1073
|
+
queueMicrotask(function() {
|
|
1074
|
+
return queueMicrotask(callback);
|
|
1075
|
+
});
|
|
1076
|
+
} : enqueueTask;
|
|
1077
|
+
deprecatedAPIs = Object.freeze({
|
|
1078
|
+
__proto__: null,
|
|
1079
|
+
c: function(size) {
|
|
1080
|
+
return resolveDispatcher().useMemoCache(size);
|
|
1081
|
+
}
|
|
1082
|
+
});
|
|
1083
|
+
var fnName = {
|
|
1084
|
+
map: mapChildren,
|
|
1085
|
+
forEach: function(children, forEachFunc, forEachContext) {
|
|
1086
|
+
mapChildren(
|
|
1087
|
+
children,
|
|
1088
|
+
function() {
|
|
1089
|
+
forEachFunc.apply(this, arguments);
|
|
1090
|
+
},
|
|
1091
|
+
forEachContext
|
|
1092
|
+
);
|
|
1093
|
+
},
|
|
1094
|
+
count: function(children) {
|
|
1095
|
+
var n = 0;
|
|
1096
|
+
mapChildren(children, function() {
|
|
1097
|
+
n++;
|
|
1098
|
+
});
|
|
1099
|
+
return n;
|
|
1100
|
+
},
|
|
1101
|
+
toArray: function(children) {
|
|
1102
|
+
return mapChildren(children, function(child) {
|
|
1103
|
+
return child;
|
|
1104
|
+
}) || [];
|
|
1105
|
+
},
|
|
1106
|
+
only: function(children) {
|
|
1107
|
+
if (!isValidElement(children))
|
|
1108
|
+
throw Error(
|
|
1109
|
+
"React.Children.only expected to receive a single React element child."
|
|
1110
|
+
);
|
|
1111
|
+
return children;
|
|
1112
|
+
}
|
|
1113
|
+
};
|
|
1114
|
+
exports.Activity = REACT_ACTIVITY_TYPE;
|
|
1115
|
+
exports.Children = fnName;
|
|
1116
|
+
exports.Component = Component;
|
|
1117
|
+
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
1118
|
+
exports.Profiler = REACT_PROFILER_TYPE;
|
|
1119
|
+
exports.PureComponent = PureComponent;
|
|
1120
|
+
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1121
|
+
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
1122
|
+
exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
|
|
1123
|
+
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
|
1124
|
+
exports.__COMPILER_RUNTIME = deprecatedAPIs;
|
|
1125
|
+
exports.act = function(callback) {
|
|
1126
|
+
var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
|
|
1127
|
+
actScopeDepth++;
|
|
1128
|
+
var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
|
|
1129
|
+
try {
|
|
1130
|
+
var result = callback();
|
|
1131
|
+
} catch (error) {
|
|
1132
|
+
ReactSharedInternals.thrownErrors.push(error);
|
|
1133
|
+
}
|
|
1134
|
+
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
1135
|
+
throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
1136
|
+
if (null !== result && "object" === typeof result && "function" === typeof result.then) {
|
|
1137
|
+
var thenable = result;
|
|
1138
|
+
queueSeveralMicrotasks(function() {
|
|
1139
|
+
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
|
|
1140
|
+
"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 () => ...);"
|
|
1141
|
+
));
|
|
1142
|
+
});
|
|
1143
|
+
return {
|
|
1144
|
+
then: function(resolve, reject) {
|
|
1145
|
+
didAwaitActCall = true;
|
|
1146
|
+
thenable.then(
|
|
1147
|
+
function(returnValue) {
|
|
1148
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
1149
|
+
if (0 === prevActScopeDepth) {
|
|
1150
|
+
try {
|
|
1151
|
+
flushActQueue(queue), enqueueTask(function() {
|
|
1152
|
+
return recursivelyFlushAsyncActWork(
|
|
1153
|
+
returnValue,
|
|
1154
|
+
resolve,
|
|
1155
|
+
reject
|
|
1156
|
+
);
|
|
1157
|
+
});
|
|
1158
|
+
} catch (error$0) {
|
|
1159
|
+
ReactSharedInternals.thrownErrors.push(error$0);
|
|
1160
|
+
}
|
|
1161
|
+
if (0 < ReactSharedInternals.thrownErrors.length) {
|
|
1162
|
+
var _thrownError = aggregateErrors(
|
|
1163
|
+
ReactSharedInternals.thrownErrors
|
|
1164
|
+
);
|
|
1165
|
+
ReactSharedInternals.thrownErrors.length = 0;
|
|
1166
|
+
reject(_thrownError);
|
|
1167
|
+
}
|
|
1168
|
+
} else resolve(returnValue);
|
|
1169
|
+
},
|
|
1170
|
+
function(error) {
|
|
1171
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
1172
|
+
0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
|
|
1173
|
+
ReactSharedInternals.thrownErrors
|
|
1174
|
+
), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
}
|
|
1178
|
+
};
|
|
1179
|
+
}
|
|
1180
|
+
var returnValue$jscomp$0 = result;
|
|
1181
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
1182
|
+
0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
|
|
1183
|
+
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
|
|
1184
|
+
"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(() => ...)"
|
|
1185
|
+
));
|
|
1186
|
+
}), ReactSharedInternals.actQueue = null);
|
|
1187
|
+
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
1188
|
+
throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
1189
|
+
return {
|
|
1190
|
+
then: function(resolve, reject) {
|
|
1191
|
+
didAwaitActCall = true;
|
|
1192
|
+
0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
|
|
1193
|
+
return recursivelyFlushAsyncActWork(
|
|
1194
|
+
returnValue$jscomp$0,
|
|
1195
|
+
resolve,
|
|
1196
|
+
reject
|
|
1197
|
+
);
|
|
1198
|
+
})) : resolve(returnValue$jscomp$0);
|
|
1199
|
+
}
|
|
1200
|
+
};
|
|
1201
|
+
};
|
|
1202
|
+
exports.addTransitionType = addTransitionType;
|
|
1203
|
+
exports.cache = function(fn) {
|
|
1204
|
+
return function() {
|
|
1205
|
+
return fn.apply(null, arguments);
|
|
1206
|
+
};
|
|
1207
|
+
};
|
|
1208
|
+
exports.cacheSignal = function() {
|
|
1209
|
+
return null;
|
|
1210
|
+
};
|
|
1211
|
+
exports.captureOwnerStack = function() {
|
|
1212
|
+
var getCurrentStack = ReactSharedInternals.getCurrentStack;
|
|
1213
|
+
return null === getCurrentStack ? null : getCurrentStack();
|
|
1214
|
+
};
|
|
1215
|
+
exports.cloneElement = function(element, config, children) {
|
|
1216
|
+
if (null === element || void 0 === element)
|
|
1217
|
+
throw Error(
|
|
1218
|
+
"The argument must be a React element, but you passed " + element + "."
|
|
1219
|
+
);
|
|
1220
|
+
var props = assign({}, element.props), key = element.key, owner = element._owner;
|
|
1221
|
+
if (null != config) {
|
|
1222
|
+
var JSCompiler_inline_result;
|
|
1223
|
+
a: {
|
|
1224
|
+
if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
|
|
1225
|
+
config,
|
|
1226
|
+
"ref"
|
|
1227
|
+
).get) && JSCompiler_inline_result.isReactWarning) {
|
|
1228
|
+
JSCompiler_inline_result = false;
|
|
1229
|
+
break a;
|
|
1230
|
+
}
|
|
1231
|
+
JSCompiler_inline_result = void 0 !== config.ref;
|
|
1232
|
+
}
|
|
1233
|
+
JSCompiler_inline_result && (owner = getOwner());
|
|
1234
|
+
hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
|
|
1235
|
+
for (propName in config)
|
|
1236
|
+
!hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
|
|
1237
|
+
}
|
|
1238
|
+
var propName = arguments.length - 2;
|
|
1239
|
+
if (1 === propName) props.children = children;
|
|
1240
|
+
else if (1 < propName) {
|
|
1241
|
+
JSCompiler_inline_result = Array(propName);
|
|
1242
|
+
for (var i = 0; i < propName; i++)
|
|
1243
|
+
JSCompiler_inline_result[i] = arguments[i + 2];
|
|
1244
|
+
props.children = JSCompiler_inline_result;
|
|
1245
|
+
}
|
|
1246
|
+
props = ReactElement(
|
|
1247
|
+
element.type,
|
|
1248
|
+
key,
|
|
1249
|
+
props,
|
|
1250
|
+
owner,
|
|
1251
|
+
element._debugStack,
|
|
1252
|
+
element._debugTask
|
|
1253
|
+
);
|
|
1254
|
+
for (key = 2; key < arguments.length; key++)
|
|
1255
|
+
validateChildKeys(arguments[key]);
|
|
1256
|
+
return props;
|
|
1257
|
+
};
|
|
1258
|
+
exports.createContext = function(defaultValue) {
|
|
1259
|
+
defaultValue = {
|
|
1260
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
1261
|
+
_currentValue: defaultValue,
|
|
1262
|
+
_currentValue2: defaultValue,
|
|
1263
|
+
_threadCount: 0,
|
|
1264
|
+
Provider: null,
|
|
1265
|
+
Consumer: null
|
|
1266
|
+
};
|
|
1267
|
+
defaultValue.Provider = defaultValue;
|
|
1268
|
+
defaultValue.Consumer = {
|
|
1269
|
+
$$typeof: REACT_CONSUMER_TYPE,
|
|
1270
|
+
_context: defaultValue
|
|
1271
|
+
};
|
|
1272
|
+
defaultValue._currentRenderer = null;
|
|
1273
|
+
defaultValue._currentRenderer2 = null;
|
|
1274
|
+
return defaultValue;
|
|
1275
|
+
};
|
|
1276
|
+
exports.createElement = function(type, config, children) {
|
|
1277
|
+
for (var i = 2; i < arguments.length; i++)
|
|
1278
|
+
validateChildKeys(arguments[i]);
|
|
1279
|
+
var propName;
|
|
1280
|
+
i = {};
|
|
1281
|
+
var key = null;
|
|
1282
|
+
if (null != config)
|
|
1283
|
+
for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
|
|
1284
|
+
"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"
|
|
1285
|
+
)), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config)
|
|
1286
|
+
hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
|
|
1287
|
+
var childrenLength = arguments.length - 2;
|
|
1288
|
+
if (1 === childrenLength) i.children = children;
|
|
1289
|
+
else if (1 < childrenLength) {
|
|
1290
|
+
for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
|
|
1291
|
+
childArray[_i] = arguments[_i + 2];
|
|
1292
|
+
Object.freeze && Object.freeze(childArray);
|
|
1293
|
+
i.children = childArray;
|
|
1294
|
+
}
|
|
1295
|
+
if (type && type.defaultProps)
|
|
1296
|
+
for (propName in childrenLength = type.defaultProps, childrenLength)
|
|
1297
|
+
void 0 === i[propName] && (i[propName] = childrenLength[propName]);
|
|
1298
|
+
key && defineKeyPropWarningGetter(
|
|
1299
|
+
i,
|
|
1300
|
+
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
|
|
1301
|
+
);
|
|
1302
|
+
(propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++) ? (childArray = Error.stackTraceLimit, Error.stackTraceLimit = 10, childrenLength = Error("react-stack-top-frame"), Error.stackTraceLimit = childArray) : childrenLength = unknownOwnerDebugStack;
|
|
1303
|
+
return ReactElement(
|
|
1304
|
+
type,
|
|
1305
|
+
key,
|
|
1306
|
+
i,
|
|
1307
|
+
getOwner(),
|
|
1308
|
+
childrenLength,
|
|
1309
|
+
propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
1310
|
+
);
|
|
1311
|
+
};
|
|
1312
|
+
exports.createRef = function() {
|
|
1313
|
+
var refObject = { current: null };
|
|
1314
|
+
Object.seal(refObject);
|
|
1315
|
+
return refObject;
|
|
1316
|
+
};
|
|
1317
|
+
exports.forwardRef = function(render) {
|
|
1318
|
+
null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
|
|
1319
|
+
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
|
|
1320
|
+
) : "function" !== typeof render ? console.error(
|
|
1321
|
+
"forwardRef requires a render function but was given %s.",
|
|
1322
|
+
null === render ? "null" : typeof render
|
|
1323
|
+
) : 0 !== render.length && 2 !== render.length && console.error(
|
|
1324
|
+
"forwardRef render functions accept exactly two parameters: props and ref. %s",
|
|
1325
|
+
1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
|
|
1326
|
+
);
|
|
1327
|
+
null != render && null != render.defaultProps && console.error(
|
|
1328
|
+
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
|
|
1329
|
+
);
|
|
1330
|
+
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
|
|
1331
|
+
Object.defineProperty(elementType, "displayName", {
|
|
1332
|
+
enumerable: false,
|
|
1333
|
+
configurable: true,
|
|
1334
|
+
get: function() {
|
|
1335
|
+
return ownName;
|
|
1336
|
+
},
|
|
1337
|
+
set: function(name) {
|
|
1338
|
+
ownName = name;
|
|
1339
|
+
render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
|
|
1340
|
+
}
|
|
1341
|
+
});
|
|
1342
|
+
return elementType;
|
|
1343
|
+
};
|
|
1344
|
+
exports.isValidElement = isValidElement;
|
|
1345
|
+
exports.lazy = function(ctor) {
|
|
1346
|
+
ctor = { _status: -1, _result: ctor };
|
|
1347
|
+
var lazyType = {
|
|
1348
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
1349
|
+
_payload: ctor,
|
|
1350
|
+
_init: lazyInitializer
|
|
1351
|
+
}, ioInfo = {
|
|
1352
|
+
name: "lazy",
|
|
1353
|
+
start: -1,
|
|
1354
|
+
end: -1,
|
|
1355
|
+
value: null,
|
|
1356
|
+
owner: null,
|
|
1357
|
+
debugStack: Error("react-stack-top-frame"),
|
|
1358
|
+
debugTask: console.createTask ? console.createTask("lazy()") : null
|
|
1359
|
+
};
|
|
1360
|
+
ctor._ioInfo = ioInfo;
|
|
1361
|
+
lazyType._debugInfo = [{ awaited: ioInfo }];
|
|
1362
|
+
return lazyType;
|
|
1363
|
+
};
|
|
1364
|
+
exports.memo = function(type, compare) {
|
|
1365
|
+
null == type && console.error(
|
|
1366
|
+
"memo: The first argument must be a component. Instead received: %s",
|
|
1367
|
+
null === type ? "null" : typeof type
|
|
1368
|
+
);
|
|
1369
|
+
compare = {
|
|
1370
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
1371
|
+
type,
|
|
1372
|
+
compare: void 0 === compare ? null : compare
|
|
1373
|
+
};
|
|
1374
|
+
var ownName;
|
|
1375
|
+
Object.defineProperty(compare, "displayName", {
|
|
1376
|
+
enumerable: false,
|
|
1377
|
+
configurable: true,
|
|
1378
|
+
get: function() {
|
|
1379
|
+
return ownName;
|
|
1380
|
+
},
|
|
1381
|
+
set: function(name) {
|
|
1382
|
+
ownName = name;
|
|
1383
|
+
type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
|
|
1384
|
+
}
|
|
1385
|
+
});
|
|
1386
|
+
return compare;
|
|
1387
|
+
};
|
|
1388
|
+
exports.startTransition = startTransition;
|
|
1389
|
+
exports.unstable_useCacheRefresh = function() {
|
|
1390
|
+
return resolveDispatcher().useCacheRefresh();
|
|
1391
|
+
};
|
|
1392
|
+
exports.use = function(usable) {
|
|
1393
|
+
return resolveDispatcher().use(usable);
|
|
1394
|
+
};
|
|
1395
|
+
exports.useActionState = function(action, initialState, permalink) {
|
|
1396
|
+
return resolveDispatcher().useActionState(
|
|
1397
|
+
action,
|
|
1398
|
+
initialState,
|
|
1399
|
+
permalink
|
|
1400
|
+
);
|
|
1401
|
+
};
|
|
1402
|
+
exports.useCallback = function(callback, deps) {
|
|
1403
|
+
return resolveDispatcher().useCallback(callback, deps);
|
|
1404
|
+
};
|
|
1405
|
+
exports.useContext = function(Context) {
|
|
1406
|
+
var dispatcher = resolveDispatcher();
|
|
1407
|
+
Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
|
|
1408
|
+
"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
|
|
1409
|
+
);
|
|
1410
|
+
return dispatcher.useContext(Context);
|
|
1411
|
+
};
|
|
1412
|
+
exports.useDebugValue = function(value, formatterFn) {
|
|
1413
|
+
return resolveDispatcher().useDebugValue(value, formatterFn);
|
|
1414
|
+
};
|
|
1415
|
+
exports.useDeferredValue = function(value, initialValue) {
|
|
1416
|
+
return resolveDispatcher().useDeferredValue(value, initialValue);
|
|
1417
|
+
};
|
|
1418
|
+
exports.useEffect = function(create, deps) {
|
|
1419
|
+
null == create && console.warn(
|
|
1420
|
+
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1421
|
+
);
|
|
1422
|
+
return resolveDispatcher().useEffect(create, deps);
|
|
1423
|
+
};
|
|
1424
|
+
exports.useEffectEvent = function(callback) {
|
|
1425
|
+
return resolveDispatcher().useEffectEvent(callback);
|
|
1426
|
+
};
|
|
1427
|
+
exports.useId = function() {
|
|
1428
|
+
return resolveDispatcher().useId();
|
|
1429
|
+
};
|
|
1430
|
+
exports.useImperativeHandle = function(ref, create, deps) {
|
|
1431
|
+
return resolveDispatcher().useImperativeHandle(ref, create, deps);
|
|
1432
|
+
};
|
|
1433
|
+
exports.useInsertionEffect = function(create, deps) {
|
|
1434
|
+
null == create && console.warn(
|
|
1435
|
+
"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1436
|
+
);
|
|
1437
|
+
return resolveDispatcher().useInsertionEffect(create, deps);
|
|
1438
|
+
};
|
|
1439
|
+
exports.useLayoutEffect = function(create, deps) {
|
|
1440
|
+
null == create && console.warn(
|
|
1441
|
+
"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1442
|
+
);
|
|
1443
|
+
return resolveDispatcher().useLayoutEffect(create, deps);
|
|
1444
|
+
};
|
|
1445
|
+
exports.useMemo = function(create, deps) {
|
|
1446
|
+
return resolveDispatcher().useMemo(create, deps);
|
|
1447
|
+
};
|
|
1448
|
+
exports.useOptimistic = function(passthrough, reducer) {
|
|
1449
|
+
return resolveDispatcher().useOptimistic(passthrough, reducer);
|
|
1450
|
+
};
|
|
1451
|
+
exports.useReducer = function(reducer, initialArg, init) {
|
|
1452
|
+
return resolveDispatcher().useReducer(reducer, initialArg, init);
|
|
1453
|
+
};
|
|
1454
|
+
exports.useRef = function(initialValue) {
|
|
1455
|
+
return resolveDispatcher().useRef(initialValue);
|
|
1456
|
+
};
|
|
1457
|
+
exports.useState = function(initialState) {
|
|
1458
|
+
return resolveDispatcher().useState(initialState);
|
|
1459
|
+
};
|
|
1460
|
+
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
1461
|
+
return resolveDispatcher().useSyncExternalStore(
|
|
1462
|
+
subscribe,
|
|
1463
|
+
getSnapshot,
|
|
1464
|
+
getServerSnapshot
|
|
1465
|
+
);
|
|
1466
|
+
};
|
|
1467
|
+
exports.useTransition = function() {
|
|
1468
|
+
return resolveDispatcher().useTransition();
|
|
1469
|
+
};
|
|
1470
|
+
exports.version = "19.3.0";
|
|
1471
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1472
|
+
})();
|
|
1473
|
+
}
|
|
1474
|
+
});
|
|
1475
|
+
|
|
1476
|
+
// node_modules/react/index.js
|
|
1477
|
+
var require_react = __commonJS({
|
|
1478
|
+
"node_modules/react/index.js"(exports, module) {
|
|
1479
|
+
"use strict";
|
|
1480
|
+
if (process.env.NODE_ENV === "production") {
|
|
1481
|
+
module.exports = require_react_production();
|
|
1482
|
+
} else {
|
|
1483
|
+
module.exports = require_react_development();
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
});
|
|
1487
|
+
|
|
1
1488
|
// node_modules/@timardex/cluemart-shared/dist/index.mjs
|
|
2
1489
|
import dayjs from "dayjs";
|
|
3
1490
|
import customParseFormat from "dayjs/plugin/customParseFormat.js";
|
|
@@ -207,6 +1694,7 @@ setVerbosity(globalThis.__DEV__ !== false ? "log" : "silent");
|
|
|
207
1694
|
|
|
208
1695
|
// node_modules/@timardex/cluemart-shared/dist/index.mjs
|
|
209
1696
|
import { print } from "graphql";
|
|
1697
|
+
var import_react = __toESM(require_react(), 1);
|
|
210
1698
|
var EnumInviteStatus = /* @__PURE__ */ ((EnumInviteStatus22) => {
|
|
211
1699
|
EnumInviteStatus22["ACCEPTED"] = "Accepted";
|
|
212
1700
|
EnumInviteStatus22["COMPLETED"] = "Completed";
|
|
@@ -292,8 +1780,8 @@ var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource22) => {
|
|
|
292
1780
|
return EnumRelationResource22;
|
|
293
1781
|
})(EnumRelationResource || {});
|
|
294
1782
|
var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceType22) => {
|
|
295
|
-
EnumNotificationResourceType22["APPROVED_AFFILIATE"] = "approved_affiliate";
|
|
296
1783
|
EnumNotificationResourceType22["AFFILIATE_REWARD_RECEIVED"] = "affiliate_reward_received";
|
|
1784
|
+
EnumNotificationResourceType22["APPROVED_AFFILIATE"] = "approved_affiliate";
|
|
297
1785
|
EnumNotificationResourceType22["APPROVED_EVENT"] = "approved_event";
|
|
298
1786
|
EnumNotificationResourceType22["APPROVED_PARTNER"] = "approved_partner";
|
|
299
1787
|
EnumNotificationResourceType22["APPROVED_SCHOOL"] = "approved_school";
|
|
@@ -321,6 +1809,7 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
|
|
|
321
1809
|
EnumNotificationResourceType22["NEW_POST_CREATED"] = "new_post_created";
|
|
322
1810
|
EnumNotificationResourceType22["REGISTERED_USER_BY_SCHOOL_CODE"] = "registered_user_by_school_code";
|
|
323
1811
|
EnumNotificationResourceType22["SYSTEM_ALERT"] = "system_alert";
|
|
1812
|
+
EnumNotificationResourceType22["USER_COUPON_REDEEMED"] = "user_coupon_redeemed";
|
|
324
1813
|
EnumNotificationResourceType22["VENDOR_APPLICATION_TO_EVENT"] = "vendor_application_to_event";
|
|
325
1814
|
EnumNotificationResourceType22["VENDOR_UPDATE_RELATION_TO_EVENT"] = "vendor_update_relation_to_event";
|
|
326
1815
|
return EnumNotificationResourceType22;
|
|
@@ -395,6 +1884,11 @@ var EnumSubscriptionStatus = /* @__PURE__ */ ((EnumSubscriptionStatus22) => {
|
|
|
395
1884
|
EnumSubscriptionStatus22["TRIALING"] = "trialing";
|
|
396
1885
|
return EnumSubscriptionStatus22;
|
|
397
1886
|
})(EnumSubscriptionStatus || {});
|
|
1887
|
+
var EnumBillingPeriod = /* @__PURE__ */ ((EnumBillingPeriod22) => {
|
|
1888
|
+
EnumBillingPeriod22["MONTHLY_CANCEL_ANYTIME"] = "monthly_cancel_anytime";
|
|
1889
|
+
EnumBillingPeriod22["YEARLY_ANNUAL_BILLED"] = "yearly_annual_billed";
|
|
1890
|
+
return EnumBillingPeriod22;
|
|
1891
|
+
})(EnumBillingPeriod || {});
|
|
398
1892
|
var EnumReward = /* @__PURE__ */ ((EnumReward22) => {
|
|
399
1893
|
EnumReward22["MYSTERY_JOY_BOX"] = "mystery_joy_box";
|
|
400
1894
|
EnumReward22["MYSTERY_SQUEEZE_BOX"] = "mystery_squeeze_box";
|
|
@@ -1677,6 +3171,80 @@ var availableCategories = assignColorToCategories([
|
|
|
1677
3171
|
...petProductsAndAnimalGoods,
|
|
1678
3172
|
...serviceAndExperience
|
|
1679
3173
|
]);
|
|
3174
|
+
var BILLING_CATALOG_KEYS = [
|
|
3175
|
+
"pro_vendor_monthly",
|
|
3176
|
+
"pro_vendor_yearly",
|
|
3177
|
+
"pro_plus_vendor_monthly",
|
|
3178
|
+
"pro_plus_vendor_yearly"
|
|
3179
|
+
];
|
|
3180
|
+
var BILLING_CATALOG_CURRENCY = "nzd";
|
|
3181
|
+
var BILLING_CATALOG_DEFINITIONS = {
|
|
3182
|
+
pro_plus_vendor_monthly: {
|
|
3183
|
+
billingPeriod: "monthly_cancel_anytime",
|
|
3184
|
+
licenceType: "pro_plus_vendor"
|
|
3185
|
+
/* PRO_PLUS_VENDOR */
|
|
3186
|
+
},
|
|
3187
|
+
pro_plus_vendor_yearly: {
|
|
3188
|
+
billingPeriod: "yearly_annual_billed",
|
|
3189
|
+
licenceType: "pro_plus_vendor"
|
|
3190
|
+
/* PRO_PLUS_VENDOR */
|
|
3191
|
+
},
|
|
3192
|
+
pro_vendor_monthly: {
|
|
3193
|
+
billingPeriod: "monthly_cancel_anytime",
|
|
3194
|
+
licenceType: "pro_vendor"
|
|
3195
|
+
/* PRO_VENDOR */
|
|
3196
|
+
},
|
|
3197
|
+
pro_vendor_yearly: {
|
|
3198
|
+
billingPeriod: "yearly_annual_billed",
|
|
3199
|
+
licenceType: "pro_vendor"
|
|
3200
|
+
/* PRO_VENDOR */
|
|
3201
|
+
}
|
|
3202
|
+
};
|
|
3203
|
+
var INITIAL_BILLING_CATALOG = [
|
|
3204
|
+
{
|
|
3205
|
+
active: true,
|
|
3206
|
+
billingPeriod: "monthly_cancel_anytime",
|
|
3207
|
+
currency: BILLING_CATALOG_CURRENCY,
|
|
3208
|
+
key: "pro_vendor_monthly",
|
|
3209
|
+
licenceType: "pro_vendor",
|
|
3210
|
+
taxInclusive: true,
|
|
3211
|
+
unitAmount: 3999
|
|
3212
|
+
},
|
|
3213
|
+
{
|
|
3214
|
+
active: true,
|
|
3215
|
+
billingPeriod: "yearly_annual_billed",
|
|
3216
|
+
currency: BILLING_CATALOG_CURRENCY,
|
|
3217
|
+
key: "pro_vendor_yearly",
|
|
3218
|
+
licenceType: "pro_vendor",
|
|
3219
|
+
taxInclusive: true,
|
|
3220
|
+
unitAmount: 40788
|
|
3221
|
+
},
|
|
3222
|
+
{
|
|
3223
|
+
active: true,
|
|
3224
|
+
billingPeriod: "monthly_cancel_anytime",
|
|
3225
|
+
currency: BILLING_CATALOG_CURRENCY,
|
|
3226
|
+
key: "pro_plus_vendor_monthly",
|
|
3227
|
+
licenceType: "pro_plus_vendor",
|
|
3228
|
+
taxInclusive: true,
|
|
3229
|
+
unitAmount: 6499
|
|
3230
|
+
},
|
|
3231
|
+
{
|
|
3232
|
+
active: true,
|
|
3233
|
+
billingPeriod: "yearly_annual_billed",
|
|
3234
|
+
currency: BILLING_CATALOG_CURRENCY,
|
|
3235
|
+
key: "pro_plus_vendor_yearly",
|
|
3236
|
+
licenceType: "pro_plus_vendor",
|
|
3237
|
+
taxInclusive: true,
|
|
3238
|
+
unitAmount: 62388
|
|
3239
|
+
}
|
|
3240
|
+
];
|
|
3241
|
+
function billingCatalogDefinitionMatches(entry) {
|
|
3242
|
+
const definition = BILLING_CATALOG_DEFINITIONS[entry.key];
|
|
3243
|
+
if (!definition) {
|
|
3244
|
+
return false;
|
|
3245
|
+
}
|
|
3246
|
+
return definition.billingPeriod === entry.billingPeriod && definition.licenceType === entry.licenceType;
|
|
3247
|
+
}
|
|
1680
3248
|
var packagingTypes = [
|
|
1681
3249
|
"Biodegradable",
|
|
1682
3250
|
"Compostable",
|
|
@@ -2121,12 +3689,19 @@ var REDEEMED_REWARD_FIELDS_FRAGMENT = gql`
|
|
|
2121
3689
|
`;
|
|
2122
3690
|
var STRIPE_FIELDS_FRAGMENT = gql`
|
|
2123
3691
|
fragment StripeSubscriptionFields on StripeSubscriptionType {
|
|
3692
|
+
billingPeriod
|
|
3693
|
+
cancelAtPeriodEnd
|
|
2124
3694
|
customerId
|
|
2125
3695
|
subscriptionId
|
|
2126
3696
|
status
|
|
2127
3697
|
currentPlan
|
|
2128
3698
|
startDate
|
|
2129
3699
|
endDate
|
|
3700
|
+
pendingPlan
|
|
3701
|
+
pendingBillingPeriod
|
|
3702
|
+
pendingChangeEffectiveAt
|
|
3703
|
+
priceId
|
|
3704
|
+
scheduleId
|
|
2130
3705
|
}
|
|
2131
3706
|
`;
|
|
2132
3707
|
var USER_FIELDS_FRAGMENT = gql`
|
|
@@ -2403,8 +3978,11 @@ var EVENT = gql`
|
|
|
2403
3978
|
${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
|
|
2404
3979
|
`;
|
|
2405
3980
|
var GET_EVENTS = gql`
|
|
2406
|
-
query getEvents(
|
|
2407
|
-
|
|
3981
|
+
query getEvents(
|
|
3982
|
+
$dateStatus: EventDateStatusEnumType
|
|
3983
|
+
$options: PaginationOptions
|
|
3984
|
+
) {
|
|
3985
|
+
events(dateStatus: $dateStatus, options: $options) {
|
|
2408
3986
|
...EventListItemFields
|
|
2409
3987
|
}
|
|
2410
3988
|
}
|
|
@@ -2706,8 +4284,8 @@ var UNREGISTERED_VENDOR = gql`
|
|
|
2706
4284
|
${UNREGISTERED_VENDOR_INVITATION_FRAGMENT}
|
|
2707
4285
|
`;
|
|
2708
4286
|
var GET_VENDORS = gql`
|
|
2709
|
-
query getVendors {
|
|
2710
|
-
vendors {
|
|
4287
|
+
query getVendors($options: PaginationOptions) {
|
|
4288
|
+
vendors(options: $options) {
|
|
2711
4289
|
...VendorFields
|
|
2712
4290
|
}
|
|
2713
4291
|
}
|
|
@@ -2944,8 +4522,8 @@ var PARTNER = gql`
|
|
|
2944
4522
|
${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
|
|
2945
4523
|
`;
|
|
2946
4524
|
var GET_PARTNERS = gql`
|
|
2947
|
-
query getPartners {
|
|
2948
|
-
partners {
|
|
4525
|
+
query getPartners($options: PaginationOptions) {
|
|
4526
|
+
partners(options: $options) {
|
|
2949
4527
|
...PartnerFields
|
|
2950
4528
|
}
|
|
2951
4529
|
}
|
|
@@ -3150,8 +4728,8 @@ var POST_FIELDS_FRAGMENT = gql`
|
|
|
3150
4728
|
${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
|
|
3151
4729
|
`;
|
|
3152
4730
|
var GET_POSTS = gql`
|
|
3153
|
-
query getPosts {
|
|
3154
|
-
posts {
|
|
4731
|
+
query getPosts($options: PaginationOptions) {
|
|
4732
|
+
posts(options: $options) {
|
|
3155
4733
|
...PostFields
|
|
3156
4734
|
}
|
|
3157
4735
|
}
|
|
@@ -3166,17 +4744,118 @@ var GET_POST = gql`
|
|
|
3166
4744
|
${POST_FIELDS_FRAGMENT}
|
|
3167
4745
|
`;
|
|
3168
4746
|
var GET_POSTS_BY_TYPE = gql`
|
|
3169
|
-
query getPostsByType($postType: PostTypeEnum
|
|
3170
|
-
postsByType(postType: $postType) {
|
|
4747
|
+
query getPostsByType($postType: PostTypeEnum!, $options: PaginationOptions) {
|
|
4748
|
+
postsByType(postType: $postType, options: $options) {
|
|
3171
4749
|
...PostFields
|
|
3172
4750
|
}
|
|
3173
4751
|
}
|
|
3174
4752
|
${POST_FIELDS_FRAGMENT}
|
|
3175
4753
|
`;
|
|
3176
|
-
var
|
|
3177
|
-
query
|
|
3178
|
-
|
|
3179
|
-
|
|
4754
|
+
var GET_USERS = gql`
|
|
4755
|
+
query getUsers($options: PaginationOptions) {
|
|
4756
|
+
users(options: $options) {
|
|
4757
|
+
...UserFields
|
|
4758
|
+
}
|
|
4759
|
+
}
|
|
4760
|
+
${USER_FIELDS_FRAGMENT}
|
|
4761
|
+
`;
|
|
4762
|
+
var GET_USER = gql`
|
|
4763
|
+
query getUser($_id: ID!) {
|
|
4764
|
+
user(_id: $_id) {
|
|
4765
|
+
...UserFields
|
|
4766
|
+
}
|
|
4767
|
+
}
|
|
4768
|
+
${USER_FIELDS_FRAGMENT}
|
|
4769
|
+
`;
|
|
4770
|
+
var GET_USER_EVENTS = gql`
|
|
4771
|
+
query getUserEvents {
|
|
4772
|
+
userEvents {
|
|
4773
|
+
...EventFields
|
|
4774
|
+
}
|
|
4775
|
+
}
|
|
4776
|
+
${EVENT}
|
|
4777
|
+
`;
|
|
4778
|
+
var GET_USER_VENDORS = gql`
|
|
4779
|
+
query getUserVendors {
|
|
4780
|
+
userVendors {
|
|
4781
|
+
...VendorFields
|
|
4782
|
+
}
|
|
4783
|
+
}
|
|
4784
|
+
${VENDOR}
|
|
4785
|
+
`;
|
|
4786
|
+
var GET_USER_PARTNERS = gql`
|
|
4787
|
+
query getUserPartners {
|
|
4788
|
+
userPartners {
|
|
4789
|
+
...PartnerFields
|
|
4790
|
+
}
|
|
4791
|
+
}
|
|
4792
|
+
${PARTNER}
|
|
4793
|
+
`;
|
|
4794
|
+
var GET_USER_ACTIVITIES = gql`
|
|
4795
|
+
query getUserActivities {
|
|
4796
|
+
userActivities {
|
|
4797
|
+
favourites {
|
|
4798
|
+
events {
|
|
4799
|
+
...EventListItemFields
|
|
4800
|
+
}
|
|
4801
|
+
partners {
|
|
4802
|
+
...PartnerFields
|
|
4803
|
+
}
|
|
4804
|
+
vendors {
|
|
4805
|
+
...VendorFields
|
|
4806
|
+
}
|
|
4807
|
+
}
|
|
4808
|
+
going {
|
|
4809
|
+
events {
|
|
4810
|
+
...EventListItemFields
|
|
4811
|
+
}
|
|
4812
|
+
}
|
|
4813
|
+
interested {
|
|
4814
|
+
events {
|
|
4815
|
+
...EventListItemFields
|
|
4816
|
+
}
|
|
4817
|
+
}
|
|
4818
|
+
present {
|
|
4819
|
+
events {
|
|
4820
|
+
...EventListItemFields
|
|
4821
|
+
}
|
|
4822
|
+
}
|
|
4823
|
+
}
|
|
4824
|
+
}
|
|
4825
|
+
${EVENT_LIST_ITEM}
|
|
4826
|
+
${VENDOR}
|
|
4827
|
+
${PARTNER}
|
|
4828
|
+
`;
|
|
4829
|
+
var GET_USER_RESOURCES = gql`
|
|
4830
|
+
query getUserResources($userId: ID!) {
|
|
4831
|
+
userResources(userId: $userId) {
|
|
4832
|
+
resources {
|
|
4833
|
+
_id
|
|
4834
|
+
logo
|
|
4835
|
+
name
|
|
4836
|
+
resourceType
|
|
4837
|
+
}
|
|
4838
|
+
}
|
|
4839
|
+
}
|
|
4840
|
+
`;
|
|
4841
|
+
var GET_USERS_BY_PROMO_CODE = gql`
|
|
4842
|
+
query getUsersByPromoCode($promoCode: String!, $limit: Int, $offset: Int) {
|
|
4843
|
+
usersByPromoCode(promoCode: $promoCode, limit: $limit, offset: $offset) {
|
|
4844
|
+
active
|
|
4845
|
+
avatar {
|
|
4846
|
+
...ResourceImageFields
|
|
4847
|
+
}
|
|
4848
|
+
deletedAt
|
|
4849
|
+
nickName
|
|
4850
|
+
userId
|
|
4851
|
+
}
|
|
4852
|
+
}
|
|
4853
|
+
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
4854
|
+
`;
|
|
4855
|
+
var GET_EVENT_BY_SLUG = gql`
|
|
4856
|
+
query getEventBySlug($slug: String!) {
|
|
4857
|
+
eventBySlug(slug: $slug) {
|
|
4858
|
+
_id
|
|
3180
4859
|
}
|
|
3181
4860
|
}
|
|
3182
4861
|
`;
|
|
@@ -3637,107 +5316,6 @@ var UPDATE_EVENT_INFO_MUTATION = gql`
|
|
|
3637
5316
|
}
|
|
3638
5317
|
${EVENT_INFO}
|
|
3639
5318
|
`;
|
|
3640
|
-
var GET_USERS = gql`
|
|
3641
|
-
query getUsers {
|
|
3642
|
-
users {
|
|
3643
|
-
...UserFields
|
|
3644
|
-
}
|
|
3645
|
-
}
|
|
3646
|
-
${USER_FIELDS_FRAGMENT}
|
|
3647
|
-
`;
|
|
3648
|
-
var GET_USER = gql`
|
|
3649
|
-
query getUser($_id: ID!) {
|
|
3650
|
-
user(_id: $_id) {
|
|
3651
|
-
...UserFields
|
|
3652
|
-
}
|
|
3653
|
-
}
|
|
3654
|
-
${USER_FIELDS_FRAGMENT}
|
|
3655
|
-
`;
|
|
3656
|
-
var GET_USER_EVENTS = gql`
|
|
3657
|
-
query getUserEvents {
|
|
3658
|
-
userEvents {
|
|
3659
|
-
...EventFields
|
|
3660
|
-
}
|
|
3661
|
-
}
|
|
3662
|
-
${EVENT}
|
|
3663
|
-
`;
|
|
3664
|
-
var GET_USER_VENDORS = gql`
|
|
3665
|
-
query getUserVendors {
|
|
3666
|
-
userVendors {
|
|
3667
|
-
...VendorFields
|
|
3668
|
-
}
|
|
3669
|
-
}
|
|
3670
|
-
${VENDOR}
|
|
3671
|
-
`;
|
|
3672
|
-
var GET_USER_PARTNERS = gql`
|
|
3673
|
-
query getUserPartners {
|
|
3674
|
-
userPartners {
|
|
3675
|
-
...PartnerFields
|
|
3676
|
-
}
|
|
3677
|
-
}
|
|
3678
|
-
${PARTNER}
|
|
3679
|
-
`;
|
|
3680
|
-
var GET_USER_ACTIVITIES = gql`
|
|
3681
|
-
query getUserActivities {
|
|
3682
|
-
userActivities {
|
|
3683
|
-
favourites {
|
|
3684
|
-
events {
|
|
3685
|
-
...EventListItemFields
|
|
3686
|
-
}
|
|
3687
|
-
partners {
|
|
3688
|
-
...PartnerFields
|
|
3689
|
-
}
|
|
3690
|
-
vendors {
|
|
3691
|
-
...VendorFields
|
|
3692
|
-
}
|
|
3693
|
-
}
|
|
3694
|
-
going {
|
|
3695
|
-
events {
|
|
3696
|
-
...EventListItemFields
|
|
3697
|
-
}
|
|
3698
|
-
}
|
|
3699
|
-
interested {
|
|
3700
|
-
events {
|
|
3701
|
-
...EventListItemFields
|
|
3702
|
-
}
|
|
3703
|
-
}
|
|
3704
|
-
present {
|
|
3705
|
-
events {
|
|
3706
|
-
...EventListItemFields
|
|
3707
|
-
}
|
|
3708
|
-
}
|
|
3709
|
-
}
|
|
3710
|
-
}
|
|
3711
|
-
${EVENT_LIST_ITEM}
|
|
3712
|
-
${VENDOR}
|
|
3713
|
-
${PARTNER}
|
|
3714
|
-
`;
|
|
3715
|
-
var GET_USER_RESOURCES = gql`
|
|
3716
|
-
query getUserResources($userId: ID!) {
|
|
3717
|
-
userResources(userId: $userId) {
|
|
3718
|
-
resources {
|
|
3719
|
-
_id
|
|
3720
|
-
logo
|
|
3721
|
-
name
|
|
3722
|
-
resourceType
|
|
3723
|
-
}
|
|
3724
|
-
}
|
|
3725
|
-
}
|
|
3726
|
-
`;
|
|
3727
|
-
var GET_USERS_BY_PROMO_CODE = gql`
|
|
3728
|
-
query getUsersByPromoCode($promoCode: String!, $limit: Int, $offset: Int) {
|
|
3729
|
-
usersByPromoCode(promoCode: $promoCode, limit: $limit, offset: $offset) {
|
|
3730
|
-
active
|
|
3731
|
-
avatar {
|
|
3732
|
-
...ResourceImageFields
|
|
3733
|
-
}
|
|
3734
|
-
deletedAt
|
|
3735
|
-
nickName
|
|
3736
|
-
userId
|
|
3737
|
-
}
|
|
3738
|
-
}
|
|
3739
|
-
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
3740
|
-
`;
|
|
3741
5319
|
var NOTIFICATION_FRAGMENT = gql`
|
|
3742
5320
|
fragment NotificationFields on Notification {
|
|
3743
5321
|
_id
|
|
@@ -4160,11 +5738,8 @@ var GET_RESOURCE_ACTIVITY = gql`
|
|
|
4160
5738
|
${RESOURCE_ACTIVITY_FIELDS_FRAGMENT}
|
|
4161
5739
|
`;
|
|
4162
5740
|
var CREATE_CHECKOUT_SESSION_MUTATION = gql`
|
|
4163
|
-
mutation createCheckoutSession(
|
|
4164
|
-
|
|
4165
|
-
$billingPeriod: BillingPeriodEnumType
|
|
4166
|
-
) {
|
|
4167
|
-
createCheckoutSession(planId: $planId, billingPeriod: $billingPeriod) {
|
|
5741
|
+
mutation createCheckoutSession($input: CreateCheckoutSessionInputType!) {
|
|
5742
|
+
createCheckoutSession(input: $input) {
|
|
4168
5743
|
data {
|
|
4169
5744
|
sessionId
|
|
4170
5745
|
checkoutUrl
|
|
@@ -4176,25 +5751,38 @@ var CREATE_CHECKOUT_SESSION_MUTATION = gql`
|
|
|
4176
5751
|
var CANCEL_SUBSCRIPTION_MUTATION = gql`
|
|
4177
5752
|
mutation cancelSubscription {
|
|
4178
5753
|
cancelSubscription {
|
|
4179
|
-
data
|
|
5754
|
+
data {
|
|
5755
|
+
billingPeriod
|
|
5756
|
+
cancelAtPeriodEnd
|
|
5757
|
+
currentPlan
|
|
5758
|
+
endDate
|
|
5759
|
+
pendingBillingPeriod
|
|
5760
|
+
pendingChangeEffectiveAt
|
|
5761
|
+
pendingPlan
|
|
5762
|
+
priceId
|
|
5763
|
+
scheduleId
|
|
5764
|
+
status
|
|
5765
|
+
subscriptionId
|
|
5766
|
+
}
|
|
4180
5767
|
message
|
|
4181
5768
|
}
|
|
4182
5769
|
}
|
|
4183
5770
|
`;
|
|
4184
5771
|
var UPDATE_SUBSCRIPTION_PLAN_MUTATION = gql`
|
|
4185
|
-
mutation updateSubscriptionPlan(
|
|
4186
|
-
|
|
4187
|
-
$billingPeriod: BillingPeriodEnumType
|
|
4188
|
-
) {
|
|
4189
|
-
updateSubscriptionPlan(
|
|
4190
|
-
newPlanId: $newPlanId
|
|
4191
|
-
billingPeriod: $billingPeriod
|
|
4192
|
-
) {
|
|
5772
|
+
mutation updateSubscriptionPlan($input: UpdateSubscriptionPlanInputType!) {
|
|
5773
|
+
updateSubscriptionPlan(input: $input) {
|
|
4193
5774
|
data {
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
priceId
|
|
5775
|
+
billingPeriod
|
|
5776
|
+
cancelAtPeriodEnd
|
|
4197
5777
|
currentPlan
|
|
5778
|
+
endDate
|
|
5779
|
+
pendingBillingPeriod
|
|
5780
|
+
pendingChangeEffectiveAt
|
|
5781
|
+
pendingPlan
|
|
5782
|
+
priceId
|
|
5783
|
+
scheduleId
|
|
5784
|
+
status
|
|
5785
|
+
subscriptionId
|
|
4198
5786
|
}
|
|
4199
5787
|
message
|
|
4200
5788
|
}
|
|
@@ -4210,36 +5798,20 @@ var CREATE_CUSTOMER_PORTAL = gql`
|
|
|
4210
5798
|
}
|
|
4211
5799
|
}
|
|
4212
5800
|
`;
|
|
4213
|
-
var SELECT_PACKAGE_MUTATION = gql`
|
|
4214
|
-
mutation selectPackage(
|
|
4215
|
-
$billingPeriod: BillingPeriodEnumType
|
|
4216
|
-
$selectedLicence: LicencesEnumType!
|
|
4217
|
-
$useStripe: Boolean
|
|
4218
|
-
) {
|
|
4219
|
-
selectPackage(
|
|
4220
|
-
billingPeriod: $billingPeriod
|
|
4221
|
-
selectedLicence: $selectedLicence
|
|
4222
|
-
useStripe: $useStripe
|
|
4223
|
-
) {
|
|
4224
|
-
data {
|
|
4225
|
-
checkoutUrl
|
|
4226
|
-
licences {
|
|
4227
|
-
...LicenceFields
|
|
4228
|
-
}
|
|
4229
|
-
userId
|
|
4230
|
-
}
|
|
4231
|
-
message
|
|
4232
|
-
}
|
|
4233
|
-
}
|
|
4234
|
-
${LICENCE_FIELDS_FRAGMENT}
|
|
4235
|
-
`;
|
|
4236
5801
|
var GET_SUBSCRIPTION_STATUS = gql`
|
|
4237
5802
|
query getSubscriptionStatus {
|
|
4238
5803
|
getSubscriptionStatus {
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
priceId
|
|
5804
|
+
billingPeriod
|
|
5805
|
+
cancelAtPeriodEnd
|
|
4242
5806
|
currentPlan
|
|
5807
|
+
endDate
|
|
5808
|
+
pendingBillingPeriod
|
|
5809
|
+
pendingChangeEffectiveAt
|
|
5810
|
+
pendingPlan
|
|
5811
|
+
priceId
|
|
5812
|
+
scheduleId
|
|
5813
|
+
status
|
|
5814
|
+
subscriptionId
|
|
4243
5815
|
}
|
|
4244
5816
|
}
|
|
4245
5817
|
`;
|
|
@@ -4266,7 +5838,6 @@ var GET_SUBSCRIPTION_PLANS = gql`
|
|
|
4266
5838
|
}
|
|
4267
5839
|
}
|
|
4268
5840
|
isNewUser
|
|
4269
|
-
isTester
|
|
4270
5841
|
appliedDiscountType
|
|
4271
5842
|
}
|
|
4272
5843
|
}
|
|
@@ -4374,6 +5945,57 @@ var GET_APP_SETTINGS = gql`
|
|
|
4374
5945
|
}
|
|
4375
5946
|
${APP_SETTINGS_FIELDS_FRAGMENT}
|
|
4376
5947
|
`;
|
|
5948
|
+
var BILLING_CATALOG_FIELDS_FRAGMENT = gql`
|
|
5949
|
+
fragment BillingCatalogFields on BillingCatalogEntryType {
|
|
5950
|
+
_id
|
|
5951
|
+
active
|
|
5952
|
+
billingPeriod
|
|
5953
|
+
createdAt
|
|
5954
|
+
currency
|
|
5955
|
+
effectiveFrom
|
|
5956
|
+
key
|
|
5957
|
+
licenceType
|
|
5958
|
+
revision
|
|
5959
|
+
stripePriceId
|
|
5960
|
+
stripeProductId
|
|
5961
|
+
taxInclusive
|
|
5962
|
+
unitAmount
|
|
5963
|
+
updatedAt
|
|
5964
|
+
updatedBy
|
|
5965
|
+
}
|
|
5966
|
+
`;
|
|
5967
|
+
var GET_BILLING_CATALOG = gql`
|
|
5968
|
+
query getBillingCatalog {
|
|
5969
|
+
billingCatalog {
|
|
5970
|
+
...BillingCatalogFields
|
|
5971
|
+
}
|
|
5972
|
+
}
|
|
5973
|
+
${BILLING_CATALOG_FIELDS_FRAGMENT}
|
|
5974
|
+
`;
|
|
5975
|
+
var UPDATE_BILLING_CATALOG_PRICE_MUTATION = gql`
|
|
5976
|
+
mutation updateBillingCatalogPrice(
|
|
5977
|
+
$input: UpdateBillingCatalogPriceInputType!
|
|
5978
|
+
) {
|
|
5979
|
+
updateBillingCatalogPrice(input: $input) {
|
|
5980
|
+
data {
|
|
5981
|
+
...BillingCatalogFields
|
|
5982
|
+
}
|
|
5983
|
+
message
|
|
5984
|
+
}
|
|
5985
|
+
}
|
|
5986
|
+
${BILLING_CATALOG_FIELDS_FRAGMENT}
|
|
5987
|
+
`;
|
|
5988
|
+
var SYNC_BILLING_CATALOG_PRICE_MUTATION = gql`
|
|
5989
|
+
mutation syncBillingCatalogPrice($input: SyncBillingCatalogPriceInputType!) {
|
|
5990
|
+
syncBillingCatalogPrice(input: $input) {
|
|
5991
|
+
data {
|
|
5992
|
+
...BillingCatalogFields
|
|
5993
|
+
}
|
|
5994
|
+
message
|
|
5995
|
+
}
|
|
5996
|
+
}
|
|
5997
|
+
${BILLING_CATALOG_FIELDS_FRAGMENT}
|
|
5998
|
+
`;
|
|
4377
5999
|
var GAME_HISTORY_FIELDS_FRAGMENT = gql`
|
|
4378
6000
|
fragment GameHistoryFields on GameHistoryType {
|
|
4379
6001
|
createdAt
|
|
@@ -5212,46 +6834,220 @@ schema.index({
|
|
|
5212
6834
|
start: 1,
|
|
5213
6835
|
status: 1
|
|
5214
6836
|
});
|
|
6837
|
+
schema.index({
|
|
6838
|
+
status: 1,
|
|
6839
|
+
targetRegion: 1,
|
|
6840
|
+
// eslint-disable-next-line sort-keys
|
|
6841
|
+
start: -1
|
|
6842
|
+
});
|
|
5215
6843
|
var AdModel = mongoose.models.Ad || mongoose.model("Ad", schema);
|
|
5216
6844
|
|
|
5217
|
-
// src/mongoose/
|
|
6845
|
+
// src/mongoose/BillingCatalog.ts
|
|
5218
6846
|
import mongoose2 from "mongoose";
|
|
5219
6847
|
var MongooseSchema2 = mongoose2.Schema;
|
|
5220
|
-
var
|
|
6848
|
+
var BILLING_CATALOG_COLLECTION_NAME = "billingCatalog";
|
|
6849
|
+
var paidVendorLicences = [
|
|
6850
|
+
EnumUserLicence.PRO_VENDOR,
|
|
6851
|
+
EnumUserLicence.PRO_PLUS_VENDOR
|
|
6852
|
+
];
|
|
6853
|
+
var supportedBillingPeriods = [
|
|
6854
|
+
EnumBillingPeriod.MONTHLY_CANCEL_ANYTIME,
|
|
6855
|
+
EnumBillingPeriod.YEARLY_ANNUAL_BILLED
|
|
6856
|
+
];
|
|
6857
|
+
var unitAmountField = {
|
|
6858
|
+
min: 1,
|
|
6859
|
+
required: true,
|
|
6860
|
+
type: Number,
|
|
6861
|
+
validate: {
|
|
6862
|
+
message: "Billing catalogue price must be a positive integer.",
|
|
6863
|
+
validator: Number.isInteger
|
|
6864
|
+
}
|
|
6865
|
+
};
|
|
6866
|
+
var currencyField = {
|
|
6867
|
+
default: BILLING_CATALOG_CURRENCY,
|
|
6868
|
+
enum: [BILLING_CATALOG_CURRENCY],
|
|
6869
|
+
immutable: true,
|
|
6870
|
+
lowercase: true,
|
|
6871
|
+
required: true,
|
|
6872
|
+
trim: true,
|
|
6873
|
+
type: String
|
|
6874
|
+
};
|
|
6875
|
+
var stripePriceIdField = {
|
|
6876
|
+
default: null,
|
|
6877
|
+
required: false,
|
|
6878
|
+
trim: true,
|
|
6879
|
+
type: String
|
|
6880
|
+
};
|
|
6881
|
+
var stripeProductIdField = {
|
|
6882
|
+
default: null,
|
|
6883
|
+
required: false,
|
|
6884
|
+
trim: true,
|
|
6885
|
+
type: String
|
|
6886
|
+
};
|
|
6887
|
+
var priceHistorySchema = new MongooseSchema2(
|
|
6888
|
+
{
|
|
6889
|
+
changedAt: { required: true, type: Date },
|
|
6890
|
+
changedBy: {
|
|
6891
|
+
default: null,
|
|
6892
|
+
ref: "User",
|
|
6893
|
+
required: false,
|
|
6894
|
+
type: mongoose2.Schema.Types.ObjectId
|
|
6895
|
+
},
|
|
6896
|
+
currency: currencyField,
|
|
6897
|
+
effectiveFrom: { required: true, type: Date },
|
|
6898
|
+
effectiveTo: { required: true, type: Date },
|
|
6899
|
+
stripePriceId: stripePriceIdField,
|
|
6900
|
+
stripeProductId: stripeProductIdField,
|
|
6901
|
+
unitAmount: unitAmountField
|
|
6902
|
+
},
|
|
6903
|
+
{ _id: false }
|
|
6904
|
+
);
|
|
6905
|
+
var schema2 = new MongooseSchema2(
|
|
6906
|
+
{
|
|
6907
|
+
active: { default: true, required: true, type: Boolean },
|
|
6908
|
+
billingPeriod: {
|
|
6909
|
+
enum: supportedBillingPeriods,
|
|
6910
|
+
immutable: true,
|
|
6911
|
+
required: true,
|
|
6912
|
+
type: String
|
|
6913
|
+
},
|
|
6914
|
+
currency: currencyField,
|
|
6915
|
+
effectiveFrom: { default: Date.now, required: true, type: Date },
|
|
6916
|
+
key: {
|
|
6917
|
+
enum: BILLING_CATALOG_KEYS,
|
|
6918
|
+
immutable: true,
|
|
6919
|
+
required: true,
|
|
6920
|
+
type: String,
|
|
6921
|
+
unique: true
|
|
6922
|
+
},
|
|
6923
|
+
licenceType: {
|
|
6924
|
+
enum: paidVendorLicences,
|
|
6925
|
+
immutable: true,
|
|
6926
|
+
required: true,
|
|
6927
|
+
type: String
|
|
6928
|
+
},
|
|
6929
|
+
priceHistory: {
|
|
6930
|
+
default: [],
|
|
6931
|
+
required: true,
|
|
6932
|
+
type: [priceHistorySchema]
|
|
6933
|
+
},
|
|
6934
|
+
revision: {
|
|
6935
|
+
default: 1,
|
|
6936
|
+
min: 1,
|
|
6937
|
+
required: true,
|
|
6938
|
+
type: Number,
|
|
6939
|
+
validate: {
|
|
6940
|
+
message: "Billing catalogue revision must be a positive integer.",
|
|
6941
|
+
validator: Number.isInteger
|
|
6942
|
+
}
|
|
6943
|
+
},
|
|
6944
|
+
stripePriceId: stripePriceIdField,
|
|
6945
|
+
stripeProductId: stripeProductIdField,
|
|
6946
|
+
taxInclusive: {
|
|
6947
|
+
default: true,
|
|
6948
|
+
immutable: true,
|
|
6949
|
+
required: true,
|
|
6950
|
+
type: Boolean,
|
|
6951
|
+
validate: {
|
|
6952
|
+
message: "Billing catalogue prices must include GST.",
|
|
6953
|
+
validator: (value) => value === true
|
|
6954
|
+
}
|
|
6955
|
+
},
|
|
6956
|
+
unitAmount: unitAmountField,
|
|
6957
|
+
updatedBy: {
|
|
6958
|
+
default: null,
|
|
6959
|
+
ref: "User",
|
|
6960
|
+
required: false,
|
|
6961
|
+
type: mongoose2.Schema.Types.ObjectId
|
|
6962
|
+
}
|
|
6963
|
+
},
|
|
6964
|
+
{
|
|
6965
|
+
collection: BILLING_CATALOG_COLLECTION_NAME,
|
|
6966
|
+
strict: true,
|
|
6967
|
+
timestamps: true
|
|
6968
|
+
}
|
|
6969
|
+
);
|
|
6970
|
+
schema2.pre("validate", function validateDefinition() {
|
|
6971
|
+
if (!billingCatalogDefinitionMatches(this)) {
|
|
6972
|
+
this.invalidate(
|
|
6973
|
+
"key",
|
|
6974
|
+
"Billing catalogue key does not match its licence and billing period."
|
|
6975
|
+
);
|
|
6976
|
+
}
|
|
6977
|
+
});
|
|
6978
|
+
schema2.index({ billingPeriod: 1, licenceType: 1 }, { unique: true });
|
|
6979
|
+
schema2.index({ active: 1, licenceType: 1 });
|
|
6980
|
+
schema2.index(
|
|
6981
|
+
{ stripePriceId: 1 },
|
|
6982
|
+
{
|
|
6983
|
+
partialFilterExpression: { stripePriceId: { $type: "string" } },
|
|
6984
|
+
unique: true
|
|
6985
|
+
}
|
|
6986
|
+
);
|
|
6987
|
+
var BillingCatalogModel = mongoose2.models.BillingCatalogEntry || mongoose2.model(
|
|
6988
|
+
"BillingCatalogEntry",
|
|
6989
|
+
schema2,
|
|
6990
|
+
BILLING_CATALOG_COLLECTION_NAME
|
|
6991
|
+
);
|
|
6992
|
+
function buildInitialBillingCatalogEntries(now = /* @__PURE__ */ new Date()) {
|
|
6993
|
+
return INITIAL_BILLING_CATALOG.map((entry) => ({
|
|
6994
|
+
active: entry.active,
|
|
6995
|
+
billingPeriod: entry.billingPeriod,
|
|
6996
|
+
currency: entry.currency,
|
|
6997
|
+
effectiveFrom: new Date(now.getTime()),
|
|
6998
|
+
key: entry.key,
|
|
6999
|
+
licenceType: entry.licenceType,
|
|
7000
|
+
priceHistory: [],
|
|
7001
|
+
revision: 1,
|
|
7002
|
+
stripePriceId: null,
|
|
7003
|
+
stripeProductId: null,
|
|
7004
|
+
taxInclusive: entry.taxInclusive,
|
|
7005
|
+
unitAmount: entry.unitAmount,
|
|
7006
|
+
updatedBy: null
|
|
7007
|
+
}));
|
|
7008
|
+
}
|
|
7009
|
+
function getBillingCatalogDefinition(key) {
|
|
7010
|
+
return BILLING_CATALOG_DEFINITIONS[key];
|
|
7011
|
+
}
|
|
7012
|
+
|
|
7013
|
+
// src/mongoose/chat/Chat.ts
|
|
7014
|
+
import mongoose3 from "mongoose";
|
|
7015
|
+
var MongooseSchema3 = mongoose3.Schema;
|
|
7016
|
+
var MessageReplyPreviewSchema = new MongooseSchema3(
|
|
5221
7017
|
{
|
|
5222
7018
|
contentPreview: { required: true, type: String },
|
|
5223
7019
|
senderId: {
|
|
5224
7020
|
ref: "User",
|
|
5225
7021
|
required: true,
|
|
5226
|
-
type:
|
|
7022
|
+
type: mongoose3.Schema.Types.ObjectId
|
|
5227
7023
|
},
|
|
5228
7024
|
senderName: { required: true, type: String }
|
|
5229
7025
|
},
|
|
5230
7026
|
{ _id: false }
|
|
5231
7027
|
);
|
|
5232
|
-
var MessageReactionSchema = new
|
|
7028
|
+
var MessageReactionSchema = new MongooseSchema3(
|
|
5233
7029
|
{
|
|
5234
7030
|
createdAt: { required: true, type: Date },
|
|
5235
7031
|
userId: {
|
|
5236
7032
|
ref: "User",
|
|
5237
7033
|
required: true,
|
|
5238
|
-
type:
|
|
7034
|
+
type: mongoose3.Schema.Types.ObjectId
|
|
5239
7035
|
}
|
|
5240
7036
|
},
|
|
5241
7037
|
{ _id: false }
|
|
5242
7038
|
);
|
|
5243
|
-
var MessageSeenSchema = new
|
|
7039
|
+
var MessageSeenSchema = new MongooseSchema3(
|
|
5244
7040
|
{
|
|
5245
7041
|
seenAt: { required: true, type: Date },
|
|
5246
7042
|
userId: {
|
|
5247
7043
|
ref: "User",
|
|
5248
7044
|
required: true,
|
|
5249
|
-
type:
|
|
7045
|
+
type: mongoose3.Schema.Types.ObjectId
|
|
5250
7046
|
}
|
|
5251
7047
|
},
|
|
5252
7048
|
{ _id: false }
|
|
5253
7049
|
);
|
|
5254
|
-
var MessageSchema = new
|
|
7050
|
+
var MessageSchema = new MongooseSchema3(
|
|
5255
7051
|
{
|
|
5256
7052
|
content: { required: true, type: String },
|
|
5257
7053
|
likedBy: { default: [], required: false, type: [MessageReactionSchema] },
|
|
@@ -5262,18 +7058,18 @@ var MessageSchema = new MongooseSchema2(
|
|
|
5262
7058
|
replyToMessageId: {
|
|
5263
7059
|
ref: "Chat.messages",
|
|
5264
7060
|
required: false,
|
|
5265
|
-
type:
|
|
7061
|
+
type: mongoose3.Schema.Types.ObjectId
|
|
5266
7062
|
},
|
|
5267
7063
|
seenBy: { default: [], required: false, type: [MessageSeenSchema] },
|
|
5268
7064
|
senderId: {
|
|
5269
7065
|
ref: "User",
|
|
5270
7066
|
required: true,
|
|
5271
|
-
type:
|
|
7067
|
+
type: mongoose3.Schema.Types.ObjectId
|
|
5272
7068
|
}
|
|
5273
7069
|
},
|
|
5274
7070
|
{ timestamps: true }
|
|
5275
7071
|
);
|
|
5276
|
-
var ParticipantSchema = new
|
|
7072
|
+
var ParticipantSchema = new MongooseSchema3(
|
|
5277
7073
|
{
|
|
5278
7074
|
active: { default: true, required: true, type: Boolean },
|
|
5279
7075
|
userAvatar: { required: false, type: String },
|
|
@@ -5281,14 +7077,14 @@ var ParticipantSchema = new MongooseSchema2(
|
|
|
5281
7077
|
userId: {
|
|
5282
7078
|
ref: "User",
|
|
5283
7079
|
required: true,
|
|
5284
|
-
type:
|
|
7080
|
+
type: mongoose3.Schema.Types.ObjectId
|
|
5285
7081
|
},
|
|
5286
7082
|
userName: { required: true, type: String }
|
|
5287
7083
|
},
|
|
5288
7084
|
{ _id: false }
|
|
5289
7085
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5290
7086
|
);
|
|
5291
|
-
var ChatSchema = new
|
|
7087
|
+
var ChatSchema = new MongooseSchema3(
|
|
5292
7088
|
{
|
|
5293
7089
|
active: { default: true, required: true, type: Boolean },
|
|
5294
7090
|
chatDescription: { required: false, type: String },
|
|
@@ -5312,12 +7108,12 @@ ChatSchema.index({
|
|
|
5312
7108
|
"participants.userId": 1,
|
|
5313
7109
|
updatedAt: -1
|
|
5314
7110
|
});
|
|
5315
|
-
var ChatModel =
|
|
7111
|
+
var ChatModel = mongoose3.models.Chat || mongoose3.model("Chat", ChatSchema);
|
|
5316
7112
|
|
|
5317
7113
|
// src/mongoose/chat/ChatReport.ts
|
|
5318
|
-
import
|
|
5319
|
-
var
|
|
5320
|
-
var ReasonSchema = new
|
|
7114
|
+
import mongoose4 from "mongoose";
|
|
7115
|
+
var MongooseSchema4 = mongoose4.Schema;
|
|
7116
|
+
var ReasonSchema = new MongooseSchema4(
|
|
5321
7117
|
{
|
|
5322
7118
|
details: { default: null, required: false, type: String },
|
|
5323
7119
|
reasonType: {
|
|
@@ -5328,23 +7124,23 @@ var ReasonSchema = new MongooseSchema3(
|
|
|
5328
7124
|
},
|
|
5329
7125
|
{ _id: false }
|
|
5330
7126
|
);
|
|
5331
|
-
var ChatReportSchema = new
|
|
7127
|
+
var ChatReportSchema = new MongooseSchema4(
|
|
5332
7128
|
{
|
|
5333
7129
|
chatId: {
|
|
5334
7130
|
ref: "Chat",
|
|
5335
7131
|
required: true,
|
|
5336
|
-
type:
|
|
7132
|
+
type: mongoose4.Schema.Types.ObjectId
|
|
5337
7133
|
},
|
|
5338
7134
|
reason: { required: true, type: ReasonSchema },
|
|
5339
7135
|
reportedUserId: {
|
|
5340
7136
|
ref: "User",
|
|
5341
7137
|
required: true,
|
|
5342
|
-
type:
|
|
7138
|
+
type: mongoose4.Schema.Types.ObjectId
|
|
5343
7139
|
},
|
|
5344
7140
|
reporterUserId: {
|
|
5345
7141
|
ref: "User",
|
|
5346
7142
|
required: true,
|
|
5347
|
-
type:
|
|
7143
|
+
type: mongoose4.Schema.Types.ObjectId
|
|
5348
7144
|
},
|
|
5349
7145
|
resolved: { default: false, required: true, type: Boolean }
|
|
5350
7146
|
},
|
|
@@ -5352,18 +7148,18 @@ var ChatReportSchema = new MongooseSchema3(
|
|
|
5352
7148
|
);
|
|
5353
7149
|
ChatReportSchema.index({ chatId: 1, reportedUserId: 1 });
|
|
5354
7150
|
ChatReportSchema.index({ createdAt: -1, reporterUserId: 1 });
|
|
5355
|
-
var ChatReportModel =
|
|
7151
|
+
var ChatReportModel = mongoose4.models.ChatReport || mongoose4.model("ChatReport", ChatReportSchema);
|
|
5356
7152
|
|
|
5357
7153
|
// src/mongoose/global.ts
|
|
5358
|
-
import
|
|
7154
|
+
import mongoose7 from "mongoose";
|
|
5359
7155
|
|
|
5360
7156
|
// src/mongoose/Relation.ts
|
|
5361
|
-
import
|
|
7157
|
+
import mongoose6 from "mongoose";
|
|
5362
7158
|
|
|
5363
7159
|
// src/mongoose/event/EventInfo.ts
|
|
5364
|
-
import
|
|
5365
|
-
var
|
|
5366
|
-
var StallTypeSchema = new
|
|
7160
|
+
import mongoose5 from "mongoose";
|
|
7161
|
+
var MongooseSchema5 = mongoose5.Schema;
|
|
7162
|
+
var StallTypeSchema = new MongooseSchema5(
|
|
5367
7163
|
{
|
|
5368
7164
|
label: { required: false, type: String },
|
|
5369
7165
|
price: { required: false, type: Number },
|
|
@@ -5374,7 +7170,7 @@ var StallTypeSchema = new MongooseSchema4(
|
|
|
5374
7170
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5375
7171
|
}
|
|
5376
7172
|
);
|
|
5377
|
-
var dateTimeSchema = new
|
|
7173
|
+
var dateTimeSchema = new MongooseSchema5(
|
|
5378
7174
|
{
|
|
5379
7175
|
dateStatus: {
|
|
5380
7176
|
enum: Object.values(EnumEventDateStatus),
|
|
@@ -5390,7 +7186,7 @@ var dateTimeSchema = new MongooseSchema4(
|
|
|
5390
7186
|
{ _id: false }
|
|
5391
7187
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5392
7188
|
);
|
|
5393
|
-
var paymentInfoSchema = new
|
|
7189
|
+
var paymentInfoSchema = new MongooseSchema5(
|
|
5394
7190
|
{
|
|
5395
7191
|
accountHolderName: { required: false, type: String },
|
|
5396
7192
|
accountNumber: { required: false, type: String },
|
|
@@ -5404,7 +7200,7 @@ var paymentInfoSchema = new MongooseSchema4(
|
|
|
5404
7200
|
{ _id: false }
|
|
5405
7201
|
// Prevents Mongoose from creating an additional _id field
|
|
5406
7202
|
);
|
|
5407
|
-
var requirementsSchema = new
|
|
7203
|
+
var requirementsSchema = new MongooseSchema5(
|
|
5408
7204
|
{
|
|
5409
7205
|
category: { required: true, type: String },
|
|
5410
7206
|
label: { required: true, type: String },
|
|
@@ -5415,7 +7211,7 @@ var requirementsSchema = new MongooseSchema4(
|
|
|
5415
7211
|
// Prevents Mongoose from creating an additional _id field for
|
|
5416
7212
|
}
|
|
5417
7213
|
);
|
|
5418
|
-
var refundPolicySchema = new
|
|
7214
|
+
var refundPolicySchema = new MongooseSchema5(
|
|
5419
7215
|
{
|
|
5420
7216
|
category: { required: true, type: String },
|
|
5421
7217
|
label: { required: true, type: String },
|
|
@@ -5423,7 +7219,7 @@ var refundPolicySchema = new MongooseSchema4(
|
|
|
5423
7219
|
},
|
|
5424
7220
|
{ _id: false }
|
|
5425
7221
|
);
|
|
5426
|
-
var
|
|
7222
|
+
var schema3 = new MongooseSchema5(
|
|
5427
7223
|
{
|
|
5428
7224
|
active: { default: true, type: Boolean },
|
|
5429
7225
|
applicationDeadlineHours: { required: true, type: Number },
|
|
@@ -5431,7 +7227,7 @@ var schema2 = new MongooseSchema4(
|
|
|
5431
7227
|
eventId: {
|
|
5432
7228
|
ref: "Event",
|
|
5433
7229
|
required: true,
|
|
5434
|
-
type:
|
|
7230
|
+
type: mongoose5.Schema.Types.ObjectId
|
|
5435
7231
|
},
|
|
5436
7232
|
packInTime: { required: true, type: Number },
|
|
5437
7233
|
paymentDueHours: { required: true, type: Number },
|
|
@@ -5441,11 +7237,12 @@ var schema2 = new MongooseSchema4(
|
|
|
5441
7237
|
},
|
|
5442
7238
|
{ timestamps: true }
|
|
5443
7239
|
);
|
|
5444
|
-
|
|
7240
|
+
schema3.index({ eventId: 1 });
|
|
7241
|
+
var EventInfoModel = mongoose5.models.EventInfo || mongoose5.model("EventInfo", schema3);
|
|
5445
7242
|
|
|
5446
7243
|
// src/mongoose/Relation.ts
|
|
5447
|
-
var
|
|
5448
|
-
var relationDateTimeSchema = new
|
|
7244
|
+
var MongooseSchema6 = mongoose6.Schema;
|
|
7245
|
+
var relationDateTimeSchema = new MongooseSchema6(
|
|
5449
7246
|
{
|
|
5450
7247
|
dateStatus: {
|
|
5451
7248
|
enum: Object.values(EnumEventDateStatus),
|
|
@@ -5460,7 +7257,7 @@ var relationDateTimeSchema = new MongooseSchema5(
|
|
|
5460
7257
|
},
|
|
5461
7258
|
{ _id: false }
|
|
5462
7259
|
);
|
|
5463
|
-
var relationDatesSchema = new
|
|
7260
|
+
var relationDatesSchema = new MongooseSchema6(
|
|
5464
7261
|
{
|
|
5465
7262
|
dateTime: {
|
|
5466
7263
|
required: true,
|
|
@@ -5479,19 +7276,19 @@ var relationDatesSchema = new MongooseSchema5(
|
|
|
5479
7276
|
},
|
|
5480
7277
|
{ _id: false }
|
|
5481
7278
|
);
|
|
5482
|
-
var RelationTypeSchema = new
|
|
7279
|
+
var RelationTypeSchema = new MongooseSchema6(
|
|
5483
7280
|
{
|
|
5484
7281
|
active: { default: true, required: true, type: Boolean },
|
|
5485
7282
|
chatId: {
|
|
5486
7283
|
ref: "Chat",
|
|
5487
7284
|
required: true,
|
|
5488
|
-
type:
|
|
7285
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
5489
7286
|
},
|
|
5490
7287
|
deletedAt: { default: null, required: false, type: Date },
|
|
5491
7288
|
eventId: {
|
|
5492
7289
|
ref: "Event",
|
|
5493
7290
|
required: true,
|
|
5494
|
-
type:
|
|
7291
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
5495
7292
|
},
|
|
5496
7293
|
lastUpdateBy: {
|
|
5497
7294
|
enum: Object.values(EnumResourceType),
|
|
@@ -5507,7 +7304,7 @@ var RelationTypeSchema = new MongooseSchema5(
|
|
|
5507
7304
|
vendorId: {
|
|
5508
7305
|
ref: "Vendor",
|
|
5509
7306
|
required: true,
|
|
5510
|
-
type:
|
|
7307
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
5511
7308
|
}
|
|
5512
7309
|
},
|
|
5513
7310
|
{ timestamps: true }
|
|
@@ -5519,23 +7316,23 @@ RelationTypeSchema.index({
|
|
|
5519
7316
|
"relationDates.status": 1,
|
|
5520
7317
|
vendorId: 1
|
|
5521
7318
|
});
|
|
5522
|
-
var RelationModel =
|
|
7319
|
+
var RelationModel = mongoose6.models.Relation || mongoose6.model("Relation", RelationTypeSchema);
|
|
5523
7320
|
|
|
5524
7321
|
// src/mongoose/global.ts
|
|
5525
|
-
var
|
|
5526
|
-
var OwnerTypeSchema = new
|
|
7322
|
+
var MongooseSchema7 = mongoose7.Schema;
|
|
7323
|
+
var OwnerTypeSchema = new MongooseSchema7(
|
|
5527
7324
|
{
|
|
5528
7325
|
email: { required: true, type: String },
|
|
5529
7326
|
userId: {
|
|
5530
7327
|
ref: "User",
|
|
5531
7328
|
required: true,
|
|
5532
|
-
type:
|
|
7329
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
5533
7330
|
}
|
|
5534
7331
|
},
|
|
5535
7332
|
{ _id: false }
|
|
5536
7333
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5537
7334
|
);
|
|
5538
|
-
var SocialMediaTypeSchema = new
|
|
7335
|
+
var SocialMediaTypeSchema = new MongooseSchema7(
|
|
5539
7336
|
{
|
|
5540
7337
|
link: { required: true, type: String },
|
|
5541
7338
|
name: { required: true, type: String }
|
|
@@ -5543,7 +7340,7 @@ var SocialMediaTypeSchema = new MongooseSchema6(
|
|
|
5543
7340
|
{ _id: false }
|
|
5544
7341
|
// Prevents Mongoose from creating an additional _id field
|
|
5545
7342
|
);
|
|
5546
|
-
var ResourceImageTypeSchema = new
|
|
7343
|
+
var ResourceImageTypeSchema = new MongooseSchema7(
|
|
5547
7344
|
{
|
|
5548
7345
|
active: { default: true, required: true, type: Boolean },
|
|
5549
7346
|
source: { required: false, type: String },
|
|
@@ -5552,7 +7349,7 @@ var ResourceImageTypeSchema = new MongooseSchema6(
|
|
|
5552
7349
|
{ _id: false }
|
|
5553
7350
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5554
7351
|
);
|
|
5555
|
-
var SubCategorySchema = new
|
|
7352
|
+
var SubCategorySchema = new MongooseSchema7(
|
|
5556
7353
|
{
|
|
5557
7354
|
id: { required: false, type: String },
|
|
5558
7355
|
items: [
|
|
@@ -5566,7 +7363,7 @@ var SubCategorySchema = new MongooseSchema6(
|
|
|
5566
7363
|
{ _id: false }
|
|
5567
7364
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5568
7365
|
);
|
|
5569
|
-
var CategorySchema = new
|
|
7366
|
+
var CategorySchema = new MongooseSchema7(
|
|
5570
7367
|
{
|
|
5571
7368
|
id: { required: true, type: String },
|
|
5572
7369
|
name: { required: true, type: String },
|
|
@@ -5575,7 +7372,7 @@ var CategorySchema = new MongooseSchema6(
|
|
|
5575
7372
|
{ _id: false }
|
|
5576
7373
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5577
7374
|
);
|
|
5578
|
-
var PosterUsageTypeSchema = new
|
|
7375
|
+
var PosterUsageTypeSchema = new MongooseSchema7(
|
|
5579
7376
|
{
|
|
5580
7377
|
count: { default: 0, required: false, type: Number },
|
|
5581
7378
|
month: { required: false, type: String }
|
|
@@ -5583,7 +7380,7 @@ var PosterUsageTypeSchema = new MongooseSchema6(
|
|
|
5583
7380
|
{ _id: false }
|
|
5584
7381
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5585
7382
|
);
|
|
5586
|
-
var userLicenseSchema = new
|
|
7383
|
+
var userLicenseSchema = new MongooseSchema7(
|
|
5587
7384
|
{
|
|
5588
7385
|
expiryDate: { required: true, type: Date },
|
|
5589
7386
|
issuedDate: { required: true, type: Date },
|
|
@@ -5600,7 +7397,7 @@ var userLicenseSchema = new MongooseSchema6(
|
|
|
5600
7397
|
},
|
|
5601
7398
|
{ _id: false, timestamps: false }
|
|
5602
7399
|
);
|
|
5603
|
-
var ContactDetailsSchema = new
|
|
7400
|
+
var ContactDetailsSchema = new MongooseSchema7(
|
|
5604
7401
|
{
|
|
5605
7402
|
email: { required: false, type: String },
|
|
5606
7403
|
landlinePhone: { required: false, type: String },
|
|
@@ -5609,7 +7406,7 @@ var ContactDetailsSchema = new MongooseSchema6(
|
|
|
5609
7406
|
{ _id: false }
|
|
5610
7407
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5611
7408
|
);
|
|
5612
|
-
var termsAgreementSchema = new
|
|
7409
|
+
var termsAgreementSchema = new MongooseSchema7(
|
|
5613
7410
|
{
|
|
5614
7411
|
appBuildNumber: { required: true, type: String },
|
|
5615
7412
|
appId: { required: true, type: String },
|
|
@@ -5626,7 +7423,7 @@ var termsAgreementSchema = new MongooseSchema6(
|
|
|
5626
7423
|
},
|
|
5627
7424
|
{ _id: false }
|
|
5628
7425
|
);
|
|
5629
|
-
var resourceRelationsSchema = new
|
|
7426
|
+
var resourceRelationsSchema = new MongooseSchema7(
|
|
5630
7427
|
{
|
|
5631
7428
|
relationDates: {
|
|
5632
7429
|
default: [],
|
|
@@ -5636,12 +7433,12 @@ var resourceRelationsSchema = new MongooseSchema6(
|
|
|
5636
7433
|
relationId: {
|
|
5637
7434
|
ref: "Relation",
|
|
5638
7435
|
required: false,
|
|
5639
|
-
type:
|
|
7436
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
5640
7437
|
}
|
|
5641
7438
|
},
|
|
5642
7439
|
{ _id: false }
|
|
5643
7440
|
);
|
|
5644
|
-
var dateTimeSchema2 = new
|
|
7441
|
+
var dateTimeSchema2 = new MongooseSchema7(
|
|
5645
7442
|
{
|
|
5646
7443
|
dateStatus: {
|
|
5647
7444
|
enum: Object.values(EnumEventDateStatus),
|
|
@@ -5656,7 +7453,7 @@ var dateTimeSchema2 = new MongooseSchema6(
|
|
|
5656
7453
|
{ _id: false }
|
|
5657
7454
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5658
7455
|
);
|
|
5659
|
-
var locationGeoSchema = new
|
|
7456
|
+
var locationGeoSchema = new MongooseSchema7(
|
|
5660
7457
|
{
|
|
5661
7458
|
coordinates: { required: true, type: [Number] },
|
|
5662
7459
|
// [longitude, latitude]
|
|
@@ -5665,7 +7462,7 @@ var locationGeoSchema = new MongooseSchema6(
|
|
|
5665
7462
|
{ _id: false }
|
|
5666
7463
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5667
7464
|
);
|
|
5668
|
-
var locationsSchema = new
|
|
7465
|
+
var locationsSchema = new MongooseSchema7(
|
|
5669
7466
|
{
|
|
5670
7467
|
city: { required: true, type: String },
|
|
5671
7468
|
country: { required: true, type: String },
|
|
@@ -5681,13 +7478,13 @@ var locationsSchema = new MongooseSchema6(
|
|
|
5681
7478
|
{ _id: false }
|
|
5682
7479
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5683
7480
|
);
|
|
5684
|
-
var relatedPostSchema = new
|
|
7481
|
+
var relatedPostSchema = new MongooseSchema7(
|
|
5685
7482
|
{
|
|
5686
7483
|
postActive: { default: true, required: true, type: Boolean },
|
|
5687
7484
|
postId: {
|
|
5688
7485
|
ref: "Post",
|
|
5689
7486
|
required: true,
|
|
5690
|
-
type:
|
|
7487
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
5691
7488
|
},
|
|
5692
7489
|
postSlug: { required: true, type: String },
|
|
5693
7490
|
postType: {
|
|
@@ -5699,7 +7496,7 @@ var relatedPostSchema = new MongooseSchema6(
|
|
|
5699
7496
|
{ _id: false }
|
|
5700
7497
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5701
7498
|
);
|
|
5702
|
-
var socialShareResourceSchema = new
|
|
7499
|
+
var socialShareResourceSchema = new MongooseSchema7(
|
|
5703
7500
|
{
|
|
5704
7501
|
qrCode: { required: true, type: ResourceImageTypeSchema },
|
|
5705
7502
|
socialImage: { required: true, type: ResourceImageTypeSchema }
|
|
@@ -5712,7 +7509,7 @@ var baseResourceFields = {
|
|
|
5712
7509
|
adIds: {
|
|
5713
7510
|
ref: "Ad",
|
|
5714
7511
|
required: false,
|
|
5715
|
-
type: [
|
|
7512
|
+
type: [mongoose7.Schema.Types.ObjectId]
|
|
5716
7513
|
},
|
|
5717
7514
|
approvedAt: { default: null, required: false, type: Date },
|
|
5718
7515
|
contactDetails: { required: false, type: ContactDetailsSchema },
|
|
@@ -5742,9 +7539,64 @@ var baseResourceFields = {
|
|
|
5742
7539
|
};
|
|
5743
7540
|
|
|
5744
7541
|
// src/mongoose/GoogleImportedMarket.ts
|
|
5745
|
-
import
|
|
5746
|
-
|
|
5747
|
-
|
|
7542
|
+
import mongoose8 from "mongoose";
|
|
7543
|
+
|
|
7544
|
+
// src/mongoose/searchNamePlugin.ts
|
|
7545
|
+
function deriveSearchName(name) {
|
|
7546
|
+
return typeof name === "string" ? name.trim().toLowerCase() : "";
|
|
7547
|
+
}
|
|
7548
|
+
function searchNamePlugin(schema20) {
|
|
7549
|
+
schema20.add({ searchName: { default: "", required: false, type: String } });
|
|
7550
|
+
schema20.index({ searchName: 1 });
|
|
7551
|
+
schema20.pre("save", function syncSearchNameOnSave(next) {
|
|
7552
|
+
const doc = this;
|
|
7553
|
+
doc.searchName = deriveSearchName(doc.name);
|
|
7554
|
+
next();
|
|
7555
|
+
});
|
|
7556
|
+
schema20.pre("insertMany", function syncSearchNameOnInsertMany(next, docs) {
|
|
7557
|
+
const list = Array.isArray(docs) ? docs : [docs];
|
|
7558
|
+
for (const doc of list) {
|
|
7559
|
+
if (doc && typeof doc.name === "string") {
|
|
7560
|
+
doc.searchName = deriveSearchName(doc.name);
|
|
7561
|
+
}
|
|
7562
|
+
}
|
|
7563
|
+
next();
|
|
7564
|
+
});
|
|
7565
|
+
schema20.pre("bulkWrite", function syncSearchNameOnBulkWrite(next, ops) {
|
|
7566
|
+
for (const op of ops) {
|
|
7567
|
+
const doc = op.insertOne?.document ?? op.replaceOne?.replacement;
|
|
7568
|
+
if (doc && typeof doc.name === "string") {
|
|
7569
|
+
doc.searchName = deriveSearchName(doc.name);
|
|
7570
|
+
}
|
|
7571
|
+
const $set = op.updateOne?.update?.$set;
|
|
7572
|
+
if ($set && typeof $set.name === "string") {
|
|
7573
|
+
$set.searchName = deriveSearchName($set.name);
|
|
7574
|
+
}
|
|
7575
|
+
}
|
|
7576
|
+
next();
|
|
7577
|
+
});
|
|
7578
|
+
const syncSearchNameOnUpdate = function(next) {
|
|
7579
|
+
const update = this.getUpdate();
|
|
7580
|
+
if (update && typeof update === "object" && "$set" in update) {
|
|
7581
|
+
const $set = update.$set;
|
|
7582
|
+
if ($set && typeof $set.name === "string") {
|
|
7583
|
+
this.setUpdate({
|
|
7584
|
+
...update,
|
|
7585
|
+
$set: { ...$set, searchName: deriveSearchName($set.name) }
|
|
7586
|
+
});
|
|
7587
|
+
}
|
|
7588
|
+
}
|
|
7589
|
+
next();
|
|
7590
|
+
};
|
|
7591
|
+
schema20.pre(
|
|
7592
|
+
["findOneAndUpdate", "updateOne", "updateMany"],
|
|
7593
|
+
syncSearchNameOnUpdate
|
|
7594
|
+
);
|
|
7595
|
+
}
|
|
7596
|
+
|
|
7597
|
+
// src/mongoose/GoogleImportedMarket.ts
|
|
7598
|
+
var MongooseSchema8 = mongoose8.Schema;
|
|
7599
|
+
var addressComponentSchema = new MongooseSchema8(
|
|
5748
7600
|
{
|
|
5749
7601
|
longName: { required: false, type: String },
|
|
5750
7602
|
shortName: { required: false, type: String },
|
|
@@ -5752,7 +7604,7 @@ var addressComponentSchema = new MongooseSchema7(
|
|
|
5752
7604
|
},
|
|
5753
7605
|
{ _id: false }
|
|
5754
7606
|
);
|
|
5755
|
-
var
|
|
7607
|
+
var schema4 = new MongooseSchema8(
|
|
5756
7608
|
{
|
|
5757
7609
|
active: { default: false, required: true, type: Boolean },
|
|
5758
7610
|
address: { required: true, type: String },
|
|
@@ -5764,7 +7616,7 @@ var schema3 = new MongooseSchema7(
|
|
|
5764
7616
|
claimedByUserId: {
|
|
5765
7617
|
ref: "User",
|
|
5766
7618
|
required: false,
|
|
5767
|
-
type:
|
|
7619
|
+
type: mongoose8.Schema.Types.ObjectId
|
|
5768
7620
|
},
|
|
5769
7621
|
cover: {
|
|
5770
7622
|
required: false,
|
|
@@ -5776,7 +7628,7 @@ var schema3 = new MongooseSchema7(
|
|
|
5776
7628
|
eventId: {
|
|
5777
7629
|
ref: "Event",
|
|
5778
7630
|
required: false,
|
|
5779
|
-
type:
|
|
7631
|
+
type: mongoose8.Schema.Types.ObjectId
|
|
5780
7632
|
},
|
|
5781
7633
|
eventType: {
|
|
5782
7634
|
enum: Object.values(EnumEventType),
|
|
@@ -5815,18 +7667,20 @@ var schema3 = new MongooseSchema7(
|
|
|
5815
7667
|
},
|
|
5816
7668
|
{ timestamps: true }
|
|
5817
7669
|
);
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
7670
|
+
schema4.index({ "location.geo": "2dsphere" });
|
|
7671
|
+
schema4.index({ name: 1 });
|
|
7672
|
+
schema4.index({ region: 1 });
|
|
7673
|
+
schema4.index({ deletedAt: 1 });
|
|
7674
|
+
schema4.index({ "dateTime.dateStatus": 1 });
|
|
7675
|
+
schema4.index({ slug: 1 });
|
|
7676
|
+
schema4.index({ name: "text", description: "text" });
|
|
7677
|
+
schema4.plugin(searchNamePlugin);
|
|
7678
|
+
var GoogleImportedMarketModel = mongoose8.models.GoogleImportedMarket || mongoose8.model("GoogleImportedMarket", schema4);
|
|
5825
7679
|
|
|
5826
7680
|
// src/mongoose/Notification.ts
|
|
5827
|
-
import
|
|
5828
|
-
var
|
|
5829
|
-
var
|
|
7681
|
+
import mongoose9 from "mongoose";
|
|
7682
|
+
var MongooseSchema9 = mongoose9.Schema;
|
|
7683
|
+
var schema5 = new MongooseSchema9(
|
|
5830
7684
|
{
|
|
5831
7685
|
data: {
|
|
5832
7686
|
resourceId: { required: true, type: String },
|
|
@@ -5849,16 +7703,16 @@ var schema4 = new MongooseSchema8(
|
|
|
5849
7703
|
userId: {
|
|
5850
7704
|
ref: "User",
|
|
5851
7705
|
required: true,
|
|
5852
|
-
type:
|
|
7706
|
+
type: mongoose9.Schema.Types.ObjectId
|
|
5853
7707
|
}
|
|
5854
7708
|
},
|
|
5855
7709
|
{ timestamps: true }
|
|
5856
7710
|
);
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
var NotificationModel =
|
|
7711
|
+
schema5.index({ isRead: 1, userId: 1 });
|
|
7712
|
+
schema5.index({ createdAt: -1, userId: 1 });
|
|
7713
|
+
var NotificationModel = mongoose9.models.Notification || mongoose9.model("Notification", schema5);
|
|
5860
7714
|
|
|
5861
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
7715
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-P4NLBWEJ.mjs
|
|
5862
7716
|
var EnumInviteStatus2 = /* @__PURE__ */ ((EnumInviteStatus22) => {
|
|
5863
7717
|
EnumInviteStatus22["ACCEPTED"] = "Accepted";
|
|
5864
7718
|
EnumInviteStatus22["COMPLETED"] = "Completed";
|
|
@@ -5936,9 +7790,9 @@ var EnumSubscriptionStatus2 = /* @__PURE__ */ ((EnumSubscriptionStatus22) => {
|
|
|
5936
7790
|
})(EnumSubscriptionStatus2 || {});
|
|
5937
7791
|
|
|
5938
7792
|
// src/mongoose/PushToken.ts
|
|
5939
|
-
import
|
|
5940
|
-
var
|
|
5941
|
-
var
|
|
7793
|
+
import mongoose10 from "mongoose";
|
|
7794
|
+
var MongooseSchema10 = mongoose10.Schema;
|
|
7795
|
+
var schema6 = new MongooseSchema10(
|
|
5942
7796
|
{
|
|
5943
7797
|
platform: {
|
|
5944
7798
|
enum: Object.values(EnumOSPlatform2),
|
|
@@ -5949,17 +7803,17 @@ var schema5 = new MongooseSchema9(
|
|
|
5949
7803
|
userId: {
|
|
5950
7804
|
ref: "User",
|
|
5951
7805
|
required: true,
|
|
5952
|
-
type:
|
|
7806
|
+
type: mongoose10.Schema.Types.ObjectId
|
|
5953
7807
|
}
|
|
5954
7808
|
},
|
|
5955
7809
|
{ timestamps: true }
|
|
5956
7810
|
);
|
|
5957
|
-
var PushTokenModel =
|
|
7811
|
+
var PushTokenModel = mongoose10.models.PushToken || mongoose10.model("PushToken", schema6);
|
|
5958
7812
|
|
|
5959
7813
|
// src/mongoose/ResourceActivity.ts
|
|
5960
|
-
import
|
|
5961
|
-
var
|
|
5962
|
-
var ActivitySchema = new
|
|
7814
|
+
import mongoose11 from "mongoose";
|
|
7815
|
+
var MongooseSchema11 = mongoose11.Schema;
|
|
7816
|
+
var ActivitySchema = new MongooseSchema11(
|
|
5963
7817
|
{
|
|
5964
7818
|
activityType: {
|
|
5965
7819
|
enum: Object.values(EnumActivity),
|
|
@@ -5987,7 +7841,7 @@ var ActivitySchema = new MongooseSchema10(
|
|
|
5987
7841
|
},
|
|
5988
7842
|
{ _id: false }
|
|
5989
7843
|
);
|
|
5990
|
-
var
|
|
7844
|
+
var schema7 = new MongooseSchema11(
|
|
5991
7845
|
{
|
|
5992
7846
|
activity: { default: [], type: [ActivitySchema] },
|
|
5993
7847
|
resourceId: { required: true, type: String },
|
|
@@ -5999,46 +7853,55 @@ var schema6 = new MongooseSchema10(
|
|
|
5999
7853
|
},
|
|
6000
7854
|
{ timestamps: true }
|
|
6001
7855
|
);
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
var ResourceActivityModel =
|
|
7856
|
+
schema7.index({ resourceId: 1, resourceType: 1 }, { unique: true });
|
|
7857
|
+
schema7.index({ "views.location": "2dsphere" });
|
|
7858
|
+
var ResourceActivityModel = mongoose11.models.ResourceActivity || mongoose11.model("ResourceActivity", schema7);
|
|
6005
7859
|
|
|
6006
7860
|
// src/mongoose/User.ts
|
|
6007
|
-
import
|
|
6008
|
-
var
|
|
6009
|
-
var userActivityEventSchema = new
|
|
7861
|
+
import mongoose12 from "mongoose";
|
|
7862
|
+
var MongooseSchema12 = mongoose12.Schema;
|
|
7863
|
+
var userActivityEventSchema = new MongooseSchema12(
|
|
6010
7864
|
{
|
|
6011
7865
|
dateTime: dateTimeSchema2,
|
|
6012
7866
|
resourceId: {
|
|
6013
7867
|
ref: "Event",
|
|
6014
7868
|
required: false,
|
|
6015
|
-
type:
|
|
7869
|
+
type: mongoose12.Schema.Types.ObjectId
|
|
6016
7870
|
}
|
|
6017
7871
|
},
|
|
6018
7872
|
{ _id: false }
|
|
6019
7873
|
);
|
|
6020
|
-
var userActivityFavouritesSchema = new
|
|
7874
|
+
var userActivityFavouritesSchema = new MongooseSchema12(
|
|
6021
7875
|
{
|
|
6022
7876
|
events: {
|
|
6023
7877
|
ref: "Event",
|
|
6024
7878
|
required: false,
|
|
6025
|
-
type: [
|
|
7879
|
+
type: [mongoose12.Schema.Types.ObjectId]
|
|
6026
7880
|
},
|
|
6027
7881
|
partners: {
|
|
6028
7882
|
ref: "Partner",
|
|
6029
7883
|
required: false,
|
|
6030
|
-
type: [
|
|
7884
|
+
type: [mongoose12.Schema.Types.ObjectId]
|
|
6031
7885
|
},
|
|
6032
7886
|
vendors: {
|
|
6033
7887
|
ref: "Vendor",
|
|
6034
7888
|
required: false,
|
|
6035
|
-
type: [
|
|
7889
|
+
type: [mongoose12.Schema.Types.ObjectId]
|
|
6036
7890
|
}
|
|
6037
7891
|
},
|
|
6038
7892
|
{ _id: false }
|
|
6039
7893
|
);
|
|
6040
|
-
var stripeSchema = new
|
|
7894
|
+
var stripeSchema = new MongooseSchema12(
|
|
6041
7895
|
{
|
|
7896
|
+
billingPeriod: {
|
|
7897
|
+
enum: Object.values(EnumBillingPeriod),
|
|
7898
|
+
required: false,
|
|
7899
|
+
type: String
|
|
7900
|
+
},
|
|
7901
|
+
cancelAtPeriodEnd: {
|
|
7902
|
+
required: false,
|
|
7903
|
+
type: Boolean
|
|
7904
|
+
},
|
|
6042
7905
|
currentPlan: {
|
|
6043
7906
|
enum: Object.values(EnumUserLicence),
|
|
6044
7907
|
required: false,
|
|
@@ -6052,6 +7915,28 @@ var stripeSchema = new MongooseSchema11(
|
|
|
6052
7915
|
required: false,
|
|
6053
7916
|
type: Date
|
|
6054
7917
|
},
|
|
7918
|
+
pendingBillingPeriod: {
|
|
7919
|
+
enum: Object.values(EnumBillingPeriod),
|
|
7920
|
+
required: false,
|
|
7921
|
+
type: String
|
|
7922
|
+
},
|
|
7923
|
+
pendingChangeEffectiveAt: {
|
|
7924
|
+
required: false,
|
|
7925
|
+
type: Date
|
|
7926
|
+
},
|
|
7927
|
+
pendingPlan: {
|
|
7928
|
+
enum: Object.values(EnumUserLicence),
|
|
7929
|
+
required: false,
|
|
7930
|
+
type: String
|
|
7931
|
+
},
|
|
7932
|
+
priceId: {
|
|
7933
|
+
required: false,
|
|
7934
|
+
type: String
|
|
7935
|
+
},
|
|
7936
|
+
scheduleId: {
|
|
7937
|
+
required: false,
|
|
7938
|
+
type: String
|
|
7939
|
+
},
|
|
6055
7940
|
startDate: {
|
|
6056
7941
|
required: false,
|
|
6057
7942
|
type: Date
|
|
@@ -6064,11 +7949,19 @@ var stripeSchema = new MongooseSchema11(
|
|
|
6064
7949
|
subscriptionId: {
|
|
6065
7950
|
required: false,
|
|
6066
7951
|
type: String
|
|
7952
|
+
},
|
|
7953
|
+
subscriptionMutationLockExpiresAt: {
|
|
7954
|
+
required: false,
|
|
7955
|
+
type: Date
|
|
7956
|
+
},
|
|
7957
|
+
subscriptionMutationLockId: {
|
|
7958
|
+
required: false,
|
|
7959
|
+
type: String
|
|
6067
7960
|
}
|
|
6068
7961
|
},
|
|
6069
7962
|
{ _id: false }
|
|
6070
7963
|
);
|
|
6071
|
-
var redeemedRewardSchema = new
|
|
7964
|
+
var redeemedRewardSchema = new MongooseSchema12(
|
|
6072
7965
|
{
|
|
6073
7966
|
name: {
|
|
6074
7967
|
enum: Object.values(EnumReward),
|
|
@@ -6080,13 +7973,13 @@ var redeemedRewardSchema = new MongooseSchema11(
|
|
|
6080
7973
|
},
|
|
6081
7974
|
{ _id: false }
|
|
6082
7975
|
);
|
|
6083
|
-
var
|
|
7976
|
+
var schema8 = new MongooseSchema12(
|
|
6084
7977
|
{
|
|
6085
7978
|
active: { default: false, required: true, type: Boolean },
|
|
6086
7979
|
affiliate: {
|
|
6087
7980
|
ref: "Affiliate",
|
|
6088
7981
|
required: false,
|
|
6089
|
-
type:
|
|
7982
|
+
type: mongoose12.Schema.Types.ObjectId
|
|
6090
7983
|
},
|
|
6091
7984
|
avatar: {
|
|
6092
7985
|
required: false,
|
|
@@ -6095,7 +7988,7 @@ var schema7 = new MongooseSchema11(
|
|
|
6095
7988
|
coupon: {
|
|
6096
7989
|
ref: "Coupon",
|
|
6097
7990
|
required: false,
|
|
6098
|
-
type:
|
|
7991
|
+
type: mongoose12.Schema.Types.ObjectId
|
|
6099
7992
|
},
|
|
6100
7993
|
deletedAt: { default: null, required: false, type: Date },
|
|
6101
7994
|
email: { required: true, type: String },
|
|
@@ -6107,13 +8000,13 @@ var schema7 = new MongooseSchema11(
|
|
|
6107
8000
|
events: {
|
|
6108
8001
|
ref: "Event",
|
|
6109
8002
|
required: false,
|
|
6110
|
-
type: [
|
|
8003
|
+
type: [mongoose12.Schema.Types.ObjectId]
|
|
6111
8004
|
},
|
|
6112
8005
|
firstName: { required: true, type: String },
|
|
6113
8006
|
game: {
|
|
6114
8007
|
ref: "Game",
|
|
6115
8008
|
required: false,
|
|
6116
|
-
type:
|
|
8009
|
+
type: mongoose12.Schema.Types.ObjectId
|
|
6117
8010
|
},
|
|
6118
8011
|
interests: {
|
|
6119
8012
|
enum: Object.values(EnumResourceType),
|
|
@@ -6135,7 +8028,7 @@ var schema7 = new MongooseSchema11(
|
|
|
6135
8028
|
partner: {
|
|
6136
8029
|
ref: "Partner",
|
|
6137
8030
|
required: false,
|
|
6138
|
-
type:
|
|
8031
|
+
type: mongoose12.Schema.Types.ObjectId
|
|
6139
8032
|
},
|
|
6140
8033
|
password: { required: true, type: String },
|
|
6141
8034
|
platform: {
|
|
@@ -6168,7 +8061,7 @@ var schema7 = new MongooseSchema11(
|
|
|
6168
8061
|
school: {
|
|
6169
8062
|
ref: "School",
|
|
6170
8063
|
required: false,
|
|
6171
|
-
type:
|
|
8064
|
+
type: mongoose12.Schema.Types.ObjectId
|
|
6172
8065
|
},
|
|
6173
8066
|
stripe: {
|
|
6174
8067
|
required: false,
|
|
@@ -6193,19 +8086,20 @@ var schema7 = new MongooseSchema11(
|
|
|
6193
8086
|
vendor: {
|
|
6194
8087
|
ref: "Vendor",
|
|
6195
8088
|
required: false,
|
|
6196
|
-
type:
|
|
8089
|
+
type: mongoose12.Schema.Types.ObjectId
|
|
6197
8090
|
}
|
|
6198
8091
|
},
|
|
6199
8092
|
{ strict: false, timestamps: true }
|
|
6200
8093
|
);
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
8094
|
+
schema8.index({ "licences.expiryDate": 1 });
|
|
8095
|
+
schema8.index({ "licences.licenceType": 1 });
|
|
8096
|
+
schema8.index({ promoCodes: 1, active: 1, deletedAt: 1 });
|
|
8097
|
+
var UserModel = mongoose12.models.User || mongoose12.model("User", schema8);
|
|
6204
8098
|
|
|
6205
8099
|
// src/mongoose/VerificationToken.ts
|
|
6206
|
-
import
|
|
6207
|
-
var
|
|
6208
|
-
var
|
|
8100
|
+
import mongoose13 from "mongoose";
|
|
8101
|
+
var MongooseSchema13 = mongoose13.Schema;
|
|
8102
|
+
var schema9 = new MongooseSchema13(
|
|
6209
8103
|
{
|
|
6210
8104
|
createdAt: {
|
|
6211
8105
|
default: Date.now,
|
|
@@ -6220,12 +8114,12 @@ var schema8 = new MongooseSchema12(
|
|
|
6220
8114
|
},
|
|
6221
8115
|
{ timestamps: true }
|
|
6222
8116
|
);
|
|
6223
|
-
var VerificationTokenModel =
|
|
8117
|
+
var VerificationTokenModel = mongoose13.models.VerificationToken || mongoose13.model("VerificationToken", schema9);
|
|
6224
8118
|
|
|
6225
8119
|
// src/mongoose/vendor/Vendor.ts
|
|
6226
|
-
import
|
|
6227
|
-
var
|
|
6228
|
-
var vendorProductTypeSchema = new
|
|
8120
|
+
import mongoose14 from "mongoose";
|
|
8121
|
+
var MongooseSchema14 = mongoose14.Schema;
|
|
8122
|
+
var vendorProductTypeSchema = new MongooseSchema14(
|
|
6229
8123
|
{
|
|
6230
8124
|
description: { required: false, type: String },
|
|
6231
8125
|
name: { required: true, type: String },
|
|
@@ -6236,14 +8130,14 @@ var vendorProductTypeSchema = new MongooseSchema13(
|
|
|
6236
8130
|
},
|
|
6237
8131
|
{ timestamps: true }
|
|
6238
8132
|
);
|
|
6239
|
-
var productWrapperSchema = new
|
|
8133
|
+
var productWrapperSchema = new MongooseSchema14(
|
|
6240
8134
|
{
|
|
6241
8135
|
active: { default: false, required: false, type: Boolean },
|
|
6242
8136
|
productsList: { required: false, type: [vendorProductTypeSchema] }
|
|
6243
8137
|
},
|
|
6244
8138
|
{ _id: false }
|
|
6245
8139
|
);
|
|
6246
|
-
var calendarSchema = new
|
|
8140
|
+
var calendarSchema = new MongooseSchema14(
|
|
6247
8141
|
{
|
|
6248
8142
|
dateTime: {
|
|
6249
8143
|
dateStatus: {
|
|
@@ -6264,14 +8158,14 @@ var calendarSchema = new MongooseSchema13(
|
|
|
6264
8158
|
},
|
|
6265
8159
|
{ _id: false }
|
|
6266
8160
|
);
|
|
6267
|
-
var calendarWrapperSchema = new
|
|
8161
|
+
var calendarWrapperSchema = new MongooseSchema14(
|
|
6268
8162
|
{
|
|
6269
8163
|
active: { default: false, required: true, type: Boolean },
|
|
6270
8164
|
calendarData: { required: false, type: [calendarSchema] }
|
|
6271
8165
|
},
|
|
6272
8166
|
{ _id: false }
|
|
6273
8167
|
);
|
|
6274
|
-
var
|
|
8168
|
+
var schema10 = new MongooseSchema14(
|
|
6275
8169
|
{
|
|
6276
8170
|
...baseResourceFields,
|
|
6277
8171
|
// Importing base resource fields from global.ts
|
|
@@ -6285,6 +8179,7 @@ var schema9 = new MongooseSchema13(
|
|
|
6285
8179
|
type: calendarWrapperSchema
|
|
6286
8180
|
},
|
|
6287
8181
|
categories: { required: true, type: [CategorySchema] },
|
|
8182
|
+
categoriesNames: { default: [], required: false, type: [String] },
|
|
6288
8183
|
claimed: { default: true, required: false, type: Boolean },
|
|
6289
8184
|
foodTruck: { required: true, type: Boolean },
|
|
6290
8185
|
products: { required: false, type: productWrapperSchema },
|
|
@@ -6297,12 +8192,12 @@ var schema9 = new MongooseSchema13(
|
|
|
6297
8192
|
unregisteredVendorId: {
|
|
6298
8193
|
ref: "UnregisteredVendor",
|
|
6299
8194
|
required: false,
|
|
6300
|
-
type:
|
|
8195
|
+
type: mongoose14.Schema.Types.ObjectId
|
|
6301
8196
|
},
|
|
6302
8197
|
vendorInfoId: {
|
|
6303
8198
|
ref: "VendorInfo",
|
|
6304
8199
|
required: false,
|
|
6305
|
-
type:
|
|
8200
|
+
type: mongoose14.Schema.Types.ObjectId
|
|
6306
8201
|
},
|
|
6307
8202
|
vendorType: {
|
|
6308
8203
|
enum: Object.values(EnumVendorType),
|
|
@@ -6312,24 +8207,31 @@ var schema9 = new MongooseSchema13(
|
|
|
6312
8207
|
},
|
|
6313
8208
|
{ timestamps: true }
|
|
6314
8209
|
);
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
8210
|
+
schema10.index({ name: 1 });
|
|
8211
|
+
schema10.index({ description: 1 });
|
|
8212
|
+
schema10.index({ region: 1 });
|
|
8213
|
+
schema10.index({ "categories.name": 1 });
|
|
8214
|
+
schema10.index({ slug: 1 });
|
|
8215
|
+
schema10.index({
|
|
8216
|
+
name: "text",
|
|
8217
|
+
description: "text",
|
|
8218
|
+
categoriesNames: "text"
|
|
8219
|
+
});
|
|
8220
|
+
schema10.index({ "owner.userId": 1, deletedAt: 1 });
|
|
8221
|
+
schema10.plugin(searchNamePlugin);
|
|
8222
|
+
var VendorModel = mongoose14.models.Vendor || mongoose14.model("Vendor", schema10);
|
|
6321
8223
|
|
|
6322
8224
|
// src/mongoose/vendor/VendorInfo.ts
|
|
6323
|
-
import
|
|
6324
|
-
var
|
|
6325
|
-
var AttributesSchema = new
|
|
8225
|
+
import mongoose15 from "mongoose";
|
|
8226
|
+
var MongooseSchema15 = mongoose15.Schema;
|
|
8227
|
+
var AttributesSchema = new MongooseSchema15(
|
|
6326
8228
|
{
|
|
6327
8229
|
details: { required: false, type: String },
|
|
6328
8230
|
isRequired: { default: false, required: true, type: Boolean }
|
|
6329
8231
|
},
|
|
6330
8232
|
{ _id: false }
|
|
6331
8233
|
);
|
|
6332
|
-
var
|
|
8234
|
+
var schema11 = new MongooseSchema15(
|
|
6333
8235
|
{
|
|
6334
8236
|
active: { default: true, type: Boolean },
|
|
6335
8237
|
compliance: {
|
|
@@ -6364,28 +8266,29 @@ var schema10 = new MongooseSchema14(
|
|
|
6364
8266
|
vendorId: {
|
|
6365
8267
|
ref: "Vendor",
|
|
6366
8268
|
required: true,
|
|
6367
|
-
type:
|
|
8269
|
+
type: mongoose15.Schema.Types.ObjectId
|
|
6368
8270
|
}
|
|
6369
8271
|
},
|
|
6370
8272
|
{ timestamps: true }
|
|
6371
8273
|
);
|
|
6372
|
-
|
|
8274
|
+
schema11.index({ vendorId: 1 });
|
|
8275
|
+
var VendorInfoModel = mongoose15.models.VendorInfo || mongoose15.model("VendorInfo", schema11);
|
|
6373
8276
|
|
|
6374
8277
|
// src/mongoose/vendor/UnregisteredVendor.ts
|
|
6375
|
-
import
|
|
6376
|
-
var
|
|
6377
|
-
var invitationSchema = new
|
|
8278
|
+
import mongoose16 from "mongoose";
|
|
8279
|
+
var MongooseSchema16 = mongoose16.Schema;
|
|
8280
|
+
var invitationSchema = new MongooseSchema16(
|
|
6378
8281
|
{
|
|
6379
8282
|
dateTime: { required: true, type: [dateTimeSchema2] },
|
|
6380
8283
|
inviterId: {
|
|
6381
8284
|
ref: "Event",
|
|
6382
8285
|
required: true,
|
|
6383
|
-
type:
|
|
8286
|
+
type: mongoose16.Schema.Types.ObjectId
|
|
6384
8287
|
}
|
|
6385
8288
|
},
|
|
6386
8289
|
{ _id: false }
|
|
6387
8290
|
);
|
|
6388
|
-
var
|
|
8291
|
+
var schema12 = new MongooseSchema16(
|
|
6389
8292
|
{
|
|
6390
8293
|
active: { default: true, required: true, type: Boolean },
|
|
6391
8294
|
categoryIds: { required: true, type: [String] },
|
|
@@ -6394,7 +8297,7 @@ var schema11 = new MongooseSchema15(
|
|
|
6394
8297
|
claimedByUserId: {
|
|
6395
8298
|
ref: "User",
|
|
6396
8299
|
required: false,
|
|
6397
|
-
type:
|
|
8300
|
+
type: mongoose16.Schema.Types.ObjectId
|
|
6398
8301
|
},
|
|
6399
8302
|
claimInitiatedAt: { default: null, required: false, type: Date },
|
|
6400
8303
|
claimToken: { default: null, required: false, type: String },
|
|
@@ -6407,14 +8310,14 @@ var schema11 = new MongooseSchema15(
|
|
|
6407
8310
|
},
|
|
6408
8311
|
{ timestamps: true }
|
|
6409
8312
|
);
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
var UnregisteredVendorModel =
|
|
8313
|
+
schema12.index({ name: 1 });
|
|
8314
|
+
schema12.index({ email: 1 });
|
|
8315
|
+
var UnregisteredVendorModel = mongoose16.models.UnregisteredVendor || mongoose16.model("UnregisteredVendor", schema12);
|
|
6413
8316
|
|
|
6414
8317
|
// src/mongoose/event/Event.ts
|
|
6415
|
-
import
|
|
6416
|
-
var
|
|
6417
|
-
var
|
|
8318
|
+
import mongoose17 from "mongoose";
|
|
8319
|
+
var MongooseSchema17 = mongoose17.Schema;
|
|
8320
|
+
var schema13 = new MongooseSchema17(
|
|
6418
8321
|
{
|
|
6419
8322
|
...baseResourceFields,
|
|
6420
8323
|
// Importing base resource fields from global.ts
|
|
@@ -6423,7 +8326,7 @@ var schema12 = new MongooseSchema16(
|
|
|
6423
8326
|
eventInfoId: {
|
|
6424
8327
|
ref: "EventInfo",
|
|
6425
8328
|
required: false,
|
|
6426
|
-
type:
|
|
8329
|
+
type: mongoose17.Schema.Types.ObjectId
|
|
6427
8330
|
},
|
|
6428
8331
|
eventType: {
|
|
6429
8332
|
enum: Object.values(EnumEventType),
|
|
@@ -6452,20 +8355,23 @@ var schema12 = new MongooseSchema16(
|
|
|
6452
8355
|
},
|
|
6453
8356
|
{ timestamps: true }
|
|
6454
8357
|
);
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
8358
|
+
schema13.index({ name: 1 });
|
|
8359
|
+
schema13.index({ description: 1 });
|
|
8360
|
+
schema13.index({ region: 1 });
|
|
8361
|
+
schema13.index({ "location.geo": "2dsphere" });
|
|
8362
|
+
schema13.index({ tags: 1 });
|
|
8363
|
+
schema13.index({ deletedAt: 1 });
|
|
8364
|
+
schema13.index({ "dateTime.dateStatus": 1 });
|
|
8365
|
+
schema13.index({ slug: 1 });
|
|
8366
|
+
schema13.index({ name: "text", description: "text", tags: "text" });
|
|
8367
|
+
schema13.index({ "owner.userId": 1, deletedAt: 1 });
|
|
8368
|
+
schema13.plugin(searchNamePlugin);
|
|
8369
|
+
var EventModel = mongoose17.models.Event || mongoose17.model("Event", schema13);
|
|
6464
8370
|
|
|
6465
8371
|
// src/mongoose/Partner.ts
|
|
6466
|
-
import
|
|
6467
|
-
var
|
|
6468
|
-
var
|
|
8372
|
+
import mongoose18 from "mongoose";
|
|
8373
|
+
var MongooseSchema18 = mongoose18.Schema;
|
|
8374
|
+
var schema14 = new MongooseSchema18(
|
|
6469
8375
|
{
|
|
6470
8376
|
...baseResourceFields,
|
|
6471
8377
|
location: {
|
|
@@ -6481,17 +8387,20 @@ var schema13 = new MongooseSchema17(
|
|
|
6481
8387
|
},
|
|
6482
8388
|
{ timestamps: true }
|
|
6483
8389
|
);
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
8390
|
+
schema14.index({ name: 1 });
|
|
8391
|
+
schema14.index({ description: 1 });
|
|
8392
|
+
schema14.index({ region: 1 });
|
|
8393
|
+
schema14.index({ "location.geo": "2dsphere" });
|
|
8394
|
+
schema14.index({ slug: 1 });
|
|
8395
|
+
schema14.index({ name: "text", description: "text" });
|
|
8396
|
+
schema14.index({ "owner.userId": 1, deletedAt: 1 });
|
|
8397
|
+
schema14.plugin(searchNamePlugin);
|
|
8398
|
+
var PartnerModel = mongoose18.models.Partner || mongoose18.model("Partner", schema14);
|
|
6490
8399
|
|
|
6491
8400
|
// src/mongoose/Post.ts
|
|
6492
|
-
import
|
|
6493
|
-
var
|
|
6494
|
-
var contentSchema = new
|
|
8401
|
+
import mongoose19, { Schema } from "mongoose";
|
|
8402
|
+
var MongooseSchema19 = mongoose19.Schema;
|
|
8403
|
+
var contentSchema = new MongooseSchema19(
|
|
6495
8404
|
{
|
|
6496
8405
|
contentData: Schema.Types.Mixed,
|
|
6497
8406
|
contentOrder: { required: true, type: Number },
|
|
@@ -6503,7 +8412,7 @@ var contentSchema = new MongooseSchema18(
|
|
|
6503
8412
|
},
|
|
6504
8413
|
{ _id: false }
|
|
6505
8414
|
);
|
|
6506
|
-
var resourceSchema = new
|
|
8415
|
+
var resourceSchema = new MongooseSchema19(
|
|
6507
8416
|
{
|
|
6508
8417
|
resourceId: { required: true, type: String },
|
|
6509
8418
|
resourceRegion: { required: true, type: String },
|
|
@@ -6516,7 +8425,7 @@ var resourceSchema = new MongooseSchema18(
|
|
|
6516
8425
|
},
|
|
6517
8426
|
{ _id: false }
|
|
6518
8427
|
);
|
|
6519
|
-
var
|
|
8428
|
+
var schema15 = new MongooseSchema19(
|
|
6520
8429
|
{
|
|
6521
8430
|
active: { default: false, required: true, type: Boolean },
|
|
6522
8431
|
approvedAt: { default: null, required: false, type: Date },
|
|
@@ -6547,16 +8456,16 @@ var schema14 = new MongooseSchema18(
|
|
|
6547
8456
|
},
|
|
6548
8457
|
{ timestamps: true }
|
|
6549
8458
|
);
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
var PostModel =
|
|
8459
|
+
schema15.index({ title: 1 });
|
|
8460
|
+
schema15.index({ tags: 1 });
|
|
8461
|
+
schema15.index({ postType: 1, slug: 1 }, { unique: true });
|
|
8462
|
+
var PostModel = mongoose19.models.Post || mongoose19.model("Post", schema15);
|
|
6554
8463
|
|
|
6555
8464
|
// src/mongoose/AppSetting.ts
|
|
6556
|
-
import
|
|
6557
|
-
var
|
|
8465
|
+
import mongoose20 from "mongoose";
|
|
8466
|
+
var MongooseSchema20 = mongoose20.Schema;
|
|
6558
8467
|
var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
|
|
6559
|
-
var AppSettingSchema = new
|
|
8468
|
+
var AppSettingSchema = new MongooseSchema20(
|
|
6560
8469
|
{
|
|
6561
8470
|
activeSchoolsStudentCountTotal: {
|
|
6562
8471
|
default: 0,
|
|
@@ -6587,18 +8496,18 @@ var AppSettingSchema = new MongooseSchema19(
|
|
|
6587
8496
|
},
|
|
6588
8497
|
{ timestamps: true }
|
|
6589
8498
|
);
|
|
6590
|
-
var AppSettingModel =
|
|
8499
|
+
var AppSettingModel = mongoose20.models.AppSetting || mongoose20.model("AppSetting", AppSettingSchema);
|
|
6591
8500
|
|
|
6592
8501
|
// src/mongoose/game/Game.ts
|
|
6593
|
-
import
|
|
8502
|
+
import mongoose24 from "mongoose";
|
|
6594
8503
|
|
|
6595
8504
|
// src/mongoose/game/DailyClue.ts
|
|
6596
|
-
import
|
|
8505
|
+
import mongoose22 from "mongoose";
|
|
6597
8506
|
|
|
6598
8507
|
// src/mongoose/game/utils.ts
|
|
6599
|
-
import
|
|
6600
|
-
var
|
|
6601
|
-
var schemaGameDate = new
|
|
8508
|
+
import mongoose21 from "mongoose";
|
|
8509
|
+
var MongooseSchema21 = mongoose21.Schema;
|
|
8510
|
+
var schemaGameDate = new MongooseSchema21(
|
|
6602
8511
|
{
|
|
6603
8512
|
endDate: { required: true, type: Date },
|
|
6604
8513
|
startDate: { required: true, type: Date }
|
|
@@ -6607,8 +8516,8 @@ var schemaGameDate = new MongooseSchema20(
|
|
|
6607
8516
|
);
|
|
6608
8517
|
|
|
6609
8518
|
// src/mongoose/game/DailyClue.ts
|
|
6610
|
-
var
|
|
6611
|
-
var schemaLetters = new
|
|
8519
|
+
var MongooseSchema22 = mongoose22.Schema;
|
|
8520
|
+
var schemaLetters = new MongooseSchema22(
|
|
6612
8521
|
{
|
|
6613
8522
|
collected: { required: false, type: [String] },
|
|
6614
8523
|
solutionShuffled: { required: true, type: [String] }
|
|
@@ -6616,14 +8525,14 @@ var schemaLetters = new MongooseSchema21(
|
|
|
6616
8525
|
},
|
|
6617
8526
|
{ _id: false }
|
|
6618
8527
|
);
|
|
6619
|
-
var schemaDailyClueBaseGame = new
|
|
8528
|
+
var schemaDailyClueBaseGame = new MongooseSchema22(
|
|
6620
8529
|
{
|
|
6621
8530
|
gameDate: { required: true, type: schemaGameDate },
|
|
6622
8531
|
gameSolution: { required: true, type: String }
|
|
6623
8532
|
},
|
|
6624
8533
|
{ _id: false }
|
|
6625
8534
|
);
|
|
6626
|
-
var schemaDailyClueGameData = new
|
|
8535
|
+
var schemaDailyClueGameData = new MongooseSchema22(
|
|
6627
8536
|
{
|
|
6628
8537
|
gameFields: { required: true, type: schemaDailyClueBaseGame },
|
|
6629
8538
|
lastFoundDate: { default: null, required: false, type: Date },
|
|
@@ -6638,9 +8547,9 @@ var schemaDailyClueGameData = new MongooseSchema21(
|
|
|
6638
8547
|
);
|
|
6639
8548
|
|
|
6640
8549
|
// src/mongoose/game/PuzzleGame.ts
|
|
6641
|
-
import
|
|
6642
|
-
var
|
|
6643
|
-
var schemaPuzzleAnswer = new
|
|
8550
|
+
import mongoose23 from "mongoose";
|
|
8551
|
+
var MongooseSchema23 = mongoose23.Schema;
|
|
8552
|
+
var schemaPuzzleAnswer = new MongooseSchema23(
|
|
6644
8553
|
{
|
|
6645
8554
|
answer: { required: true, type: String },
|
|
6646
8555
|
answerId: { required: true, type: String },
|
|
@@ -6648,7 +8557,7 @@ var schemaPuzzleAnswer = new MongooseSchema22(
|
|
|
6648
8557
|
},
|
|
6649
8558
|
{ _id: false }
|
|
6650
8559
|
);
|
|
6651
|
-
var schemaPuzzleQuestion = new
|
|
8560
|
+
var schemaPuzzleQuestion = new MongooseSchema23(
|
|
6652
8561
|
{
|
|
6653
8562
|
answers: { required: true, type: [schemaPuzzleAnswer] },
|
|
6654
8563
|
question: { required: true, type: String },
|
|
@@ -6656,20 +8565,20 @@ var schemaPuzzleQuestion = new MongooseSchema22(
|
|
|
6656
8565
|
},
|
|
6657
8566
|
{ _id: false }
|
|
6658
8567
|
);
|
|
6659
|
-
var schemaPuzzleBaseGame = new
|
|
8568
|
+
var schemaPuzzleBaseGame = new MongooseSchema23(
|
|
6660
8569
|
{
|
|
6661
8570
|
questions: { required: true, type: [schemaPuzzleQuestion] }
|
|
6662
8571
|
},
|
|
6663
8572
|
{ _id: false }
|
|
6664
8573
|
);
|
|
6665
|
-
var schemaPuzzleAnsweredQuestion = new
|
|
8574
|
+
var schemaPuzzleAnsweredQuestion = new MongooseSchema23(
|
|
6666
8575
|
{
|
|
6667
8576
|
questionId: { required: true, type: String },
|
|
6668
8577
|
selectedAnswerId: { required: true, type: String }
|
|
6669
8578
|
},
|
|
6670
8579
|
{ _id: false }
|
|
6671
8580
|
);
|
|
6672
|
-
var schemaPuzzleGameData = new
|
|
8581
|
+
var schemaPuzzleGameData = new MongooseSchema23(
|
|
6673
8582
|
{
|
|
6674
8583
|
answeredQuestions: {
|
|
6675
8584
|
default: null,
|
|
@@ -6684,19 +8593,19 @@ var schemaPuzzleGameData = new MongooseSchema22(
|
|
|
6684
8593
|
);
|
|
6685
8594
|
|
|
6686
8595
|
// src/mongoose/game/Game.ts
|
|
6687
|
-
var
|
|
8596
|
+
var MongooseSchema24 = mongoose24.Schema;
|
|
6688
8597
|
var gameDataSchemas = {
|
|
6689
8598
|
[EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
|
|
6690
8599
|
[EnumGameType.MINI_QUIZ]: schemaPuzzleGameData,
|
|
6691
8600
|
[EnumGameType.ODD_ONE_OUT]: schemaPuzzleGameData
|
|
6692
8601
|
};
|
|
6693
8602
|
var gameDataDefinition = Object.fromEntries(
|
|
6694
|
-
Object.entries(gameDataSchemas).map(([key,
|
|
8603
|
+
Object.entries(gameDataSchemas).map(([key, schema20]) => [
|
|
6695
8604
|
key,
|
|
6696
|
-
{ default: null, required: false, type:
|
|
8605
|
+
{ default: null, required: false, type: schema20 }
|
|
6697
8606
|
])
|
|
6698
8607
|
);
|
|
6699
|
-
var gameHistorySchema = new
|
|
8608
|
+
var gameHistorySchema = new MongooseSchema24(
|
|
6700
8609
|
{
|
|
6701
8610
|
createdAt: { required: true, type: Date },
|
|
6702
8611
|
gameDate: { required: true, type: schemaGameDate },
|
|
@@ -6716,7 +8625,7 @@ var gameHistorySchema = new MongooseSchema23(
|
|
|
6716
8625
|
},
|
|
6717
8626
|
{ _id: false }
|
|
6718
8627
|
);
|
|
6719
|
-
var gameTypeSchema = new
|
|
8628
|
+
var gameTypeSchema = new MongooseSchema24(
|
|
6720
8629
|
{
|
|
6721
8630
|
active: { default: true, required: true, type: Boolean },
|
|
6722
8631
|
gameData: gameDataDefinition,
|
|
@@ -6731,7 +8640,7 @@ var gameTypeSchema = new MongooseSchema23(
|
|
|
6731
8640
|
},
|
|
6732
8641
|
{ timestamps: true }
|
|
6733
8642
|
);
|
|
6734
|
-
var
|
|
8643
|
+
var schema16 = new MongooseSchema24(
|
|
6735
8644
|
{
|
|
6736
8645
|
active: { default: false, required: true, type: Boolean },
|
|
6737
8646
|
deletedAt: { default: null, required: false, type: Date },
|
|
@@ -6744,12 +8653,12 @@ var schema15 = new MongooseSchema23(
|
|
|
6744
8653
|
},
|
|
6745
8654
|
{ timestamps: true }
|
|
6746
8655
|
);
|
|
6747
|
-
var GameModel =
|
|
8656
|
+
var GameModel = mongoose24.models.Game || mongoose24.model("Game", schema16);
|
|
6748
8657
|
|
|
6749
8658
|
// src/mongoose/School.ts
|
|
6750
|
-
import
|
|
6751
|
-
var
|
|
6752
|
-
var campaignsSchema = new
|
|
8659
|
+
import mongoose25 from "mongoose";
|
|
8660
|
+
var MongooseSchema25 = mongoose25.Schema;
|
|
8661
|
+
var campaignsSchema = new MongooseSchema25(
|
|
6753
8662
|
{
|
|
6754
8663
|
endDate: { required: true, type: Date },
|
|
6755
8664
|
name: { required: true, type: String },
|
|
@@ -6757,7 +8666,7 @@ var campaignsSchema = new MongooseSchema24(
|
|
|
6757
8666
|
},
|
|
6758
8667
|
{ _id: false }
|
|
6759
8668
|
);
|
|
6760
|
-
var
|
|
8669
|
+
var schema17 = new MongooseSchema25(
|
|
6761
8670
|
{
|
|
6762
8671
|
// New schools are active by default
|
|
6763
8672
|
active: { default: false, required: true, type: Boolean },
|
|
@@ -6784,19 +8693,19 @@ var schema16 = new MongooseSchema24(
|
|
|
6784
8693
|
},
|
|
6785
8694
|
{ timestamps: true }
|
|
6786
8695
|
);
|
|
6787
|
-
|
|
8696
|
+
schema17.index(
|
|
6788
8697
|
{ schoolCode: 1 },
|
|
6789
8698
|
{
|
|
6790
8699
|
partialFilterExpression: { active: true, deletedAt: null },
|
|
6791
8700
|
unique: true
|
|
6792
8701
|
}
|
|
6793
8702
|
);
|
|
6794
|
-
var SchoolModel =
|
|
8703
|
+
var SchoolModel = mongoose25.models.School || mongoose25.model("School", schema17);
|
|
6795
8704
|
|
|
6796
8705
|
// src/mongoose/Affiliate.ts
|
|
6797
|
-
import
|
|
6798
|
-
var
|
|
6799
|
-
var affiliateRewardSchema = new
|
|
8706
|
+
import mongoose26 from "mongoose";
|
|
8707
|
+
var MongooseSchema26 = mongoose26.Schema;
|
|
8708
|
+
var affiliateRewardSchema = new MongooseSchema26(
|
|
6800
8709
|
{
|
|
6801
8710
|
createdAt: { required: true, type: Date },
|
|
6802
8711
|
redeemedAt: { default: null, required: false, type: Date },
|
|
@@ -6810,13 +8719,13 @@ var affiliateRewardSchema = new MongooseSchema25(
|
|
|
6810
8719
|
},
|
|
6811
8720
|
{ _id: false }
|
|
6812
8721
|
);
|
|
6813
|
-
var affiliateResourceSchema = new
|
|
8722
|
+
var affiliateResourceSchema = new MongooseSchema26(
|
|
6814
8723
|
{
|
|
6815
8724
|
resourceActive: { default: true, required: true, type: Boolean },
|
|
6816
8725
|
resourceDeletedAt: { default: null, required: false, type: Date },
|
|
6817
8726
|
resourceId: {
|
|
6818
8727
|
required: true,
|
|
6819
|
-
type:
|
|
8728
|
+
type: mongoose26.Schema.Types.ObjectId
|
|
6820
8729
|
},
|
|
6821
8730
|
resourceName: { required: true, type: String },
|
|
6822
8731
|
resourceOwner: {
|
|
@@ -6836,20 +8745,20 @@ var affiliateResourceSchema = new MongooseSchema25(
|
|
|
6836
8745
|
},
|
|
6837
8746
|
{ _id: false }
|
|
6838
8747
|
);
|
|
6839
|
-
var affiliateContactDetailsSchema = new
|
|
8748
|
+
var affiliateContactDetailsSchema = new MongooseSchema26(
|
|
6840
8749
|
{
|
|
6841
8750
|
mobilePhone: { required: true, type: String }
|
|
6842
8751
|
},
|
|
6843
8752
|
{ _id: false }
|
|
6844
8753
|
);
|
|
6845
|
-
var affiliateBankAccountDetailsSchema = new
|
|
8754
|
+
var affiliateBankAccountDetailsSchema = new MongooseSchema26(
|
|
6846
8755
|
{
|
|
6847
8756
|
accountHolderName: { required: true, type: String },
|
|
6848
8757
|
accountNumber: { required: true, type: String }
|
|
6849
8758
|
},
|
|
6850
8759
|
{ _id: false }
|
|
6851
8760
|
);
|
|
6852
|
-
var affiliateDetailsSchema = new
|
|
8761
|
+
var affiliateDetailsSchema = new MongooseSchema26(
|
|
6853
8762
|
{
|
|
6854
8763
|
bankAccountDetails: {
|
|
6855
8764
|
required: true,
|
|
@@ -6871,7 +8780,7 @@ var affiliateDetailsSchema = new MongooseSchema25(
|
|
|
6871
8780
|
},
|
|
6872
8781
|
{ _id: false }
|
|
6873
8782
|
);
|
|
6874
|
-
var redeemHistorySchema = new
|
|
8783
|
+
var redeemHistorySchema = new MongooseSchema26(
|
|
6875
8784
|
{
|
|
6876
8785
|
paidAt: { default: null, required: false, type: Date },
|
|
6877
8786
|
redeemedAt: { required: true, type: Date },
|
|
@@ -6879,7 +8788,7 @@ var redeemHistorySchema = new MongooseSchema25(
|
|
|
6879
8788
|
},
|
|
6880
8789
|
{ _id: false }
|
|
6881
8790
|
);
|
|
6882
|
-
var
|
|
8791
|
+
var schema18 = new MongooseSchema26(
|
|
6883
8792
|
{
|
|
6884
8793
|
active: { default: false, required: true, type: Boolean },
|
|
6885
8794
|
affiliateBonusRewards: {
|
|
@@ -6909,19 +8818,19 @@ var schema17 = new MongooseSchema25(
|
|
|
6909
8818
|
},
|
|
6910
8819
|
{ timestamps: true }
|
|
6911
8820
|
);
|
|
6912
|
-
|
|
8821
|
+
schema18.index(
|
|
6913
8822
|
{ affiliateCode: 1 },
|
|
6914
8823
|
{
|
|
6915
8824
|
partialFilterExpression: { active: true, deletedAt: null },
|
|
6916
8825
|
unique: true
|
|
6917
8826
|
}
|
|
6918
8827
|
);
|
|
6919
|
-
var AffiliateModel =
|
|
8828
|
+
var AffiliateModel = mongoose26.models.Affiliate || mongoose26.model("Affiliate", schema18);
|
|
6920
8829
|
|
|
6921
8830
|
// src/mongoose/Coupon.ts
|
|
6922
|
-
import
|
|
6923
|
-
var
|
|
6924
|
-
var couponOptionSchema = new
|
|
8831
|
+
import mongoose27 from "mongoose";
|
|
8832
|
+
var MongooseSchema27 = mongoose27.Schema;
|
|
8833
|
+
var couponOptionSchema = new MongooseSchema27(
|
|
6925
8834
|
{
|
|
6926
8835
|
buy: { required: false, type: Number },
|
|
6927
8836
|
get: { required: false, type: Number },
|
|
@@ -6936,29 +8845,29 @@ var couponOptionSchema = new MongooseSchema26(
|
|
|
6936
8845
|
},
|
|
6937
8846
|
{ _id: false }
|
|
6938
8847
|
);
|
|
6939
|
-
var couponVendorProductSchema = new
|
|
8848
|
+
var couponVendorProductSchema = new MongooseSchema27(
|
|
6940
8849
|
{
|
|
6941
8850
|
couponId: {
|
|
6942
8851
|
required: true,
|
|
6943
|
-
type:
|
|
8852
|
+
type: mongoose27.Schema.Types.ObjectId
|
|
6944
8853
|
},
|
|
6945
8854
|
productId: {
|
|
6946
8855
|
required: true,
|
|
6947
|
-
type:
|
|
8856
|
+
type: mongoose27.Schema.Types.ObjectId
|
|
6948
8857
|
},
|
|
6949
8858
|
vendorCouponId: {
|
|
6950
8859
|
required: false,
|
|
6951
|
-
type:
|
|
8860
|
+
type: mongoose27.Schema.Types.ObjectId
|
|
6952
8861
|
},
|
|
6953
8862
|
vendorId: {
|
|
6954
8863
|
ref: "Vendor",
|
|
6955
8864
|
required: true,
|
|
6956
|
-
type:
|
|
8865
|
+
type: mongoose27.Schema.Types.ObjectId
|
|
6957
8866
|
}
|
|
6958
8867
|
},
|
|
6959
8868
|
{ _id: false }
|
|
6960
8869
|
);
|
|
6961
|
-
var couponCodeSchema = new
|
|
8870
|
+
var couponCodeSchema = new MongooseSchema27(
|
|
6962
8871
|
{
|
|
6963
8872
|
code: { required: true, type: String },
|
|
6964
8873
|
qrCode: { required: true, type: ResourceImageTypeSchema },
|
|
@@ -6966,7 +8875,7 @@ var couponCodeSchema = new MongooseSchema26(
|
|
|
6966
8875
|
},
|
|
6967
8876
|
{ _id: false }
|
|
6968
8877
|
);
|
|
6969
|
-
var couponParticipantUserSchema = new
|
|
8878
|
+
var couponParticipantUserSchema = new MongooseSchema27(
|
|
6970
8879
|
{
|
|
6971
8880
|
couponCollectedCount: { default: 0, required: true, type: Number },
|
|
6972
8881
|
couponCycleRedeemed: { default: false, required: true, type: Boolean },
|
|
@@ -6975,12 +8884,12 @@ var couponParticipantUserSchema = new MongooseSchema26(
|
|
|
6975
8884
|
userId: {
|
|
6976
8885
|
ref: "User",
|
|
6977
8886
|
required: true,
|
|
6978
|
-
type:
|
|
8887
|
+
type: mongoose27.Schema.Types.ObjectId
|
|
6979
8888
|
}
|
|
6980
8889
|
},
|
|
6981
8890
|
{ timestamps: true }
|
|
6982
8891
|
);
|
|
6983
|
-
var couponDataSchema = new
|
|
8892
|
+
var couponDataSchema = new MongooseSchema27(
|
|
6984
8893
|
{
|
|
6985
8894
|
active: { default: true, required: true, type: Boolean },
|
|
6986
8895
|
couponCode: { required: false, type: couponCodeSchema },
|
|
@@ -7007,7 +8916,7 @@ var couponDataSchema = new MongooseSchema26(
|
|
|
7007
8916
|
},
|
|
7008
8917
|
{ timestamps: true }
|
|
7009
8918
|
);
|
|
7010
|
-
var
|
|
8919
|
+
var schema19 = new MongooseSchema27(
|
|
7011
8920
|
{
|
|
7012
8921
|
active: { default: true, required: true, type: Boolean },
|
|
7013
8922
|
couponData: { default: [], required: false, type: [couponDataSchema] },
|
|
@@ -7019,7 +8928,9 @@ var schema18 = new MongooseSchema26(
|
|
|
7019
8928
|
},
|
|
7020
8929
|
{ timestamps: true }
|
|
7021
8930
|
);
|
|
7022
|
-
|
|
8931
|
+
schema19.index({ active: 1, deletedAt: 1, "owner.userId": 1 });
|
|
8932
|
+
schema19.index({ "couponData.participantUsers.userId": 1 });
|
|
8933
|
+
var CouponModel = mongoose27.models.Coupon || mongoose27.model("Coupon", schema19);
|
|
7023
8934
|
|
|
7024
8935
|
// src/service/promoCode/constants.ts
|
|
7025
8936
|
var ACTIVE_NOT_DELETED_FILTER = {
|
|
@@ -7036,7 +8947,7 @@ async function activeAffiliateCodeExists(affiliateCode) {
|
|
|
7036
8947
|
return existing !== null;
|
|
7037
8948
|
}
|
|
7038
8949
|
|
|
7039
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
8950
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-YRO6KEZG.mjs
|
|
7040
8951
|
import dayjs3 from "dayjs";
|
|
7041
8952
|
import customParseFormat2 from "dayjs/plugin/customParseFormat.js";
|
|
7042
8953
|
import isSameOrAfter2 from "dayjs/plugin/isSameOrAfter.js";
|
|
@@ -7109,7 +9020,7 @@ var SHARE_RESOURCE_LABEL2 = {
|
|
|
7109
9020
|
school: "School"
|
|
7110
9021
|
};
|
|
7111
9022
|
|
|
7112
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
9023
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-JJQL6LZE.mjs
|
|
7113
9024
|
var PROMO_CODE_PREFIX2 = "CM-";
|
|
7114
9025
|
var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
|
|
7115
9026
|
var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
|
|
@@ -7221,7 +9132,7 @@ var gameScreenIdentifierList2 = [
|
|
|
7221
9132
|
}
|
|
7222
9133
|
];
|
|
7223
9134
|
|
|
7224
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
9135
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-L3SNS6OJ.mjs
|
|
7225
9136
|
import dayjs4 from "dayjs";
|
|
7226
9137
|
var statusOptions2 = [
|
|
7227
9138
|
...Object.values(EnumInviteStatus2).map((status) => ({
|
|
@@ -8658,7 +10569,7 @@ function normalizeAffiliatePromoCodes(promoCodes) {
|
|
|
8658
10569
|
}
|
|
8659
10570
|
|
|
8660
10571
|
// src/service/database.ts
|
|
8661
|
-
import
|
|
10572
|
+
import mongoose28 from "mongoose";
|
|
8662
10573
|
var connectToDatabase = async ({
|
|
8663
10574
|
appName,
|
|
8664
10575
|
dbName,
|
|
@@ -8671,7 +10582,7 @@ var connectToDatabase = async ({
|
|
|
8671
10582
|
// Fallback to MongoDB Atlas connection string
|
|
8672
10583
|
`mongodb+srv://${dbUser}:${dbPassword}@${dbName}.mongodb.net/?retryWrites=true&w=majority&appName=${appName}`
|
|
8673
10584
|
);
|
|
8674
|
-
await
|
|
10585
|
+
await mongoose28.connect(mongoUri);
|
|
8675
10586
|
const connectionType = mongodbUri ? "Local MongoDB" : "MongoDB Atlas";
|
|
8676
10587
|
console.log(
|
|
8677
10588
|
`${connectionType} connected from server/src/service/database.ts`
|
|
@@ -8684,7 +10595,7 @@ var connectToDatabase = async ({
|
|
|
8684
10595
|
|
|
8685
10596
|
// src/types/index.ts
|
|
8686
10597
|
import express from "express";
|
|
8687
|
-
import
|
|
10598
|
+
import mongoose29 from "mongoose";
|
|
8688
10599
|
var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
|
|
8689
10600
|
EnumPubSubEvents2["GET_CHAT_MESSAGE"] = "GET_CHAT_MESSAGE";
|
|
8690
10601
|
EnumPubSubEvents2["GET_NOTIFICATIONS"] = "GET_NOTIFICATIONS";
|
|
@@ -8774,15 +10685,15 @@ async function updateAdStatuses() {
|
|
|
8774
10685
|
}
|
|
8775
10686
|
|
|
8776
10687
|
// src/service/objectIdToString.ts
|
|
8777
|
-
import
|
|
10688
|
+
import mongoose30 from "mongoose";
|
|
8778
10689
|
function isValidObjectId(value) {
|
|
8779
|
-
return
|
|
10690
|
+
return mongoose30.Types.ObjectId.isValid(value);
|
|
8780
10691
|
}
|
|
8781
10692
|
function convertObjectIdsToStrings(obj) {
|
|
8782
10693
|
if (obj === null || obj === void 0) {
|
|
8783
10694
|
return obj;
|
|
8784
10695
|
}
|
|
8785
|
-
if (obj instanceof
|
|
10696
|
+
if (obj instanceof mongoose30.Types.ObjectId) {
|
|
8786
10697
|
return obj.toString();
|
|
8787
10698
|
}
|
|
8788
10699
|
if (obj instanceof Date) {
|
|
@@ -9337,20 +11248,24 @@ var buildLicenceReplacePipeline = ({
|
|
|
9337
11248
|
async function replaceUserLicenceWithObject({
|
|
9338
11249
|
userId,
|
|
9339
11250
|
licenceObject,
|
|
9340
|
-
protectHigherLicence = true
|
|
11251
|
+
protectHigherLicence = true,
|
|
11252
|
+
refreshExistingLicence = false
|
|
9341
11253
|
}) {
|
|
9342
11254
|
const user = await UserModel.findById(userId, { licences: 1 }).lean();
|
|
9343
11255
|
if (!user) throw new GraphQLError("User not found");
|
|
9344
|
-
|
|
11256
|
+
const existingLicence = user.licences?.find(
|
|
11257
|
+
(licence) => licence.licenceType === licenceObject.licenceType
|
|
11258
|
+
);
|
|
11259
|
+
if (existingLicence && !refreshExistingLicence) {
|
|
9345
11260
|
return;
|
|
9346
11261
|
}
|
|
11262
|
+
const category = getLicenceCategory(licenceObject.licenceType);
|
|
9347
11263
|
const updatedLicenceObject = {
|
|
9348
11264
|
...licenceObject,
|
|
9349
|
-
prevLicenceType: user.licences?.find(
|
|
9350
|
-
(
|
|
11265
|
+
prevLicenceType: existingLicence && refreshExistingLicence ? existingLicence.prevLicenceType : user.licences?.find(
|
|
11266
|
+
(licence) => licence.licenceType && getLicenceCategory(licence.licenceType) === category
|
|
9351
11267
|
)?.licenceType
|
|
9352
11268
|
};
|
|
9353
|
-
const category = getLicenceCategory(updatedLicenceObject.licenceType);
|
|
9354
11269
|
if (protectHigherLicence) {
|
|
9355
11270
|
const highestLicence = getHighestLicenceForCategory(
|
|
9356
11271
|
user.licences,
|
|
@@ -9464,6 +11379,17 @@ var vendorLicences = [
|
|
|
9464
11379
|
EnumUserLicence.PRO_VENDOR,
|
|
9465
11380
|
EnumUserLicence.PRO_PLUS_VENDOR
|
|
9466
11381
|
];
|
|
11382
|
+
function isProtectedByCurrentStripeSubscription(user, licenceType, now) {
|
|
11383
|
+
const stripe = user.stripe;
|
|
11384
|
+
if (!stripe?.subscriptionId || stripe.currentPlan !== licenceType || stripe.status !== EnumSubscriptionStatus.ACTIVE && stripe.status !== EnumSubscriptionStatus.TRIALING) {
|
|
11385
|
+
return false;
|
|
11386
|
+
}
|
|
11387
|
+
if (stripe.cancelAtPeriodEnd !== true || !stripe.endDate) {
|
|
11388
|
+
return true;
|
|
11389
|
+
}
|
|
11390
|
+
const paidThrough = dayjs8(stripe.endDate);
|
|
11391
|
+
return !paidThrough.isValid() || paidThrough.isAfter(now);
|
|
11392
|
+
}
|
|
9467
11393
|
async function handleVendorLicenceCompliance(user, now) {
|
|
9468
11394
|
if (!user.licences || !user.vendor) {
|
|
9469
11395
|
return;
|
|
@@ -9477,12 +11403,20 @@ async function handleVendorLicenceCompliance(user, now) {
|
|
|
9477
11403
|
const proLicences = vendorLicencesOfUser.filter(
|
|
9478
11404
|
(licence) => licence.licenceType !== EnumUserLicence.STANDARD_VENDOR
|
|
9479
11405
|
);
|
|
9480
|
-
const
|
|
11406
|
+
const expiredProLicences = proLicences.filter(
|
|
9481
11407
|
(licence) => !dayjs8(licence.expiryDate).isAfter(now)
|
|
9482
11408
|
);
|
|
9483
|
-
const
|
|
11409
|
+
const stripeProtectedLicenceTypes = new Set(
|
|
11410
|
+
expiredProLicences.filter(
|
|
11411
|
+
(licence) => isProtectedByCurrentStripeSubscription(user, licence.licenceType, now)
|
|
11412
|
+
).map((licence) => licence.licenceType)
|
|
11413
|
+
);
|
|
11414
|
+
const expiredProLicence = expiredProLicences.some(
|
|
11415
|
+
(licence) => !stripeProtectedLicenceTypes.has(licence.licenceType)
|
|
11416
|
+
);
|
|
11417
|
+
const hasValidProLicence = stripeProtectedLicenceTypes.size > 0 || hasValidLicence(proLicences, vendorLicences, now);
|
|
9484
11418
|
const hasExpiredVendorLicence = vendorLicencesOfUser.some(
|
|
9485
|
-
(licence) => !dayjs8(licence.expiryDate).isAfter(now)
|
|
11419
|
+
(licence) => !dayjs8(licence.expiryDate).isAfter(now) && !stripeProtectedLicenceTypes.has(licence.licenceType)
|
|
9486
11420
|
);
|
|
9487
11421
|
if (!hasExpiredVendorLicence) {
|
|
9488
11422
|
return;
|
|
@@ -9496,7 +11430,10 @@ async function handleVendorLicenceCompliance(user, now) {
|
|
|
9496
11430
|
"owner.userId": user._id
|
|
9497
11431
|
}).lean().exec();
|
|
9498
11432
|
}
|
|
9499
|
-
|
|
11433
|
+
const licencesToSync = vendorLicences.filter(
|
|
11434
|
+
(licenceType) => !stripeProtectedLicenceTypes.has(licenceType)
|
|
11435
|
+
);
|
|
11436
|
+
await syncUserLicencesAfterExpiry(user._id, licencesToSync, now, "downgrade");
|
|
9500
11437
|
if (!expiredProLicence || !vendor || hasValidProLicence) {
|
|
9501
11438
|
return;
|
|
9502
11439
|
}
|
|
@@ -9585,6 +11522,13 @@ async function processUserCompliance(user, now) {
|
|
|
9585
11522
|
}
|
|
9586
11523
|
|
|
9587
11524
|
// src/service/license/compliance/ensureUserLicenseCompliance.ts
|
|
11525
|
+
async function ensureUserLicenseComplianceForUser(userId, now = dayjs10()) {
|
|
11526
|
+
const user = await UserModel.findById(userId);
|
|
11527
|
+
if (!user) {
|
|
11528
|
+
return;
|
|
11529
|
+
}
|
|
11530
|
+
await processUserCompliance(user, now);
|
|
11531
|
+
}
|
|
9588
11532
|
async function ensureUserLicenseCompliance() {
|
|
9589
11533
|
const now = dayjs10();
|
|
9590
11534
|
console.log(`\u{1F50D} Checking license compliance at ${now.format()}`);
|
|
@@ -9836,7 +11780,7 @@ async function sendLicenseReminder(user, licence) {
|
|
|
9836
11780
|
await sendPushNotifications(payload);
|
|
9837
11781
|
console.log(`\u2705 Sent 7-day reminder to user ${userId} for ${licenceName}`);
|
|
9838
11782
|
}
|
|
9839
|
-
async function processLicenseReminder(
|
|
11783
|
+
async function processLicenseReminder(licence, now) {
|
|
9840
11784
|
if (dayjs11(licence.expiryDate).isBefore(now)) {
|
|
9841
11785
|
return false;
|
|
9842
11786
|
}
|
|
@@ -9868,7 +11812,7 @@ async function processUserLicenseReminders(user, now) {
|
|
|
9868
11812
|
const licenceChecks = await Promise.all(
|
|
9869
11813
|
validLicences.map(async (licence) => {
|
|
9870
11814
|
try {
|
|
9871
|
-
const shouldSend = await processLicenseReminder(
|
|
11815
|
+
const shouldSend = await processLicenseReminder(licence, now);
|
|
9872
11816
|
return { licence, shouldSend };
|
|
9873
11817
|
} catch (err) {
|
|
9874
11818
|
console.error(
|
|
@@ -9934,6 +11878,8 @@ export {
|
|
|
9934
11878
|
AdModel,
|
|
9935
11879
|
AffiliateModel,
|
|
9936
11880
|
AppSettingModel,
|
|
11881
|
+
BILLING_CATALOG_COLLECTION_NAME,
|
|
11882
|
+
BillingCatalogModel,
|
|
9937
11883
|
CategorySchema,
|
|
9938
11884
|
ChatModel,
|
|
9939
11885
|
ChatReportModel,
|
|
@@ -9969,6 +11915,7 @@ export {
|
|
|
9969
11915
|
activeAffiliateCodeExists,
|
|
9970
11916
|
awardAffiliateVendorSubscriptionRewards,
|
|
9971
11917
|
baseResourceFields,
|
|
11918
|
+
buildInitialBillingCatalogEntries,
|
|
9972
11919
|
buildLicenceExpiryPipeline,
|
|
9973
11920
|
checkOwnerHasLicence,
|
|
9974
11921
|
connectToDatabase,
|
|
@@ -9977,10 +11924,12 @@ export {
|
|
|
9977
11924
|
dateTimeSchema2 as dateTimeSchema,
|
|
9978
11925
|
didRemoveAnyEventDates,
|
|
9979
11926
|
ensureUserLicenseCompliance,
|
|
11927
|
+
ensureUserLicenseComplianceForUser,
|
|
9980
11928
|
eventLicences,
|
|
9981
11929
|
express,
|
|
9982
11930
|
findAffiliateByPromoCode,
|
|
9983
11931
|
findEventOrImportedMarketById,
|
|
11932
|
+
getBillingCatalogDefinition,
|
|
9984
11933
|
getEventResourceInfo,
|
|
9985
11934
|
getHighestLicenceForCategory,
|
|
9986
11935
|
getLicenceCategory,
|
|
@@ -10002,7 +11951,7 @@ export {
|
|
|
10002
11951
|
locationGeoSchema,
|
|
10003
11952
|
locationsSchema,
|
|
10004
11953
|
mapVendorLicenceToSubscriptionRewardType,
|
|
10005
|
-
|
|
11954
|
+
mongoose29 as mongoose,
|
|
10006
11955
|
normalizeAffiliatePromoCodes,
|
|
10007
11956
|
normalizePromoCode,
|
|
10008
11957
|
notifyUsers,
|
|
@@ -10036,4 +11985,28 @@ export {
|
|
|
10036
11985
|
vendorOwnerHasProLicence,
|
|
10037
11986
|
vendorProductTypeSchema
|
|
10038
11987
|
};
|
|
11988
|
+
/*! Bundled license information:
|
|
11989
|
+
|
|
11990
|
+
react/cjs/react.production.js:
|
|
11991
|
+
(**
|
|
11992
|
+
* @license React
|
|
11993
|
+
* react.production.js
|
|
11994
|
+
*
|
|
11995
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
11996
|
+
*
|
|
11997
|
+
* This source code is licensed under the MIT license found in the
|
|
11998
|
+
* LICENSE file in the root directory of this source tree.
|
|
11999
|
+
*)
|
|
12000
|
+
|
|
12001
|
+
react/cjs/react.development.js:
|
|
12002
|
+
(**
|
|
12003
|
+
* @license React
|
|
12004
|
+
* react.development.js
|
|
12005
|
+
*
|
|
12006
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
12007
|
+
*
|
|
12008
|
+
* This source code is licensed under the MIT license found in the
|
|
12009
|
+
* LICENSE file in the root directory of this source tree.
|
|
12010
|
+
*)
|
|
12011
|
+
*/
|
|
10039
12012
|
//# sourceMappingURL=index.mjs.map
|