@popp0102/questify 0.1.3 → 0.1.5

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/questify.js CHANGED
@@ -1,5 +1,5 @@
1
- import Se, { createContext as vr, useState as Pe, useContext as pr } from "react";
2
- var Q = { exports: {} }, F = {};
1
+ import Oe, { createContext as pr, useState as Pe, useContext as gr } from "react";
2
+ var Z = { exports: {} }, L = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.min.js
@@ -9,19 +9,19 @@ var Q = { exports: {} }, F = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var we;
13
- function gr() {
14
- if (we) return F;
15
- we = 1;
16
- var w = Se, C = Symbol.for("react.element"), g = Symbol.for("react.fragment"), y = Object.prototype.hasOwnProperty, _ = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, R = { key: !0, ref: !0, __self: !0, __source: !0 };
17
- function T(d, u, m) {
18
- var f, b = {}, x = null, Y = null;
19
- m !== void 0 && (x = "" + m), u.key !== void 0 && (x = "" + u.key), u.ref !== void 0 && (Y = u.ref);
20
- for (f in u) y.call(u, f) && !R.hasOwnProperty(f) && (b[f] = u[f]);
21
- if (d && d.defaultProps) for (f in u = d.defaultProps, u) b[f] === void 0 && (b[f] = u[f]);
22
- return { $$typeof: C, type: d, key: x, ref: Y, props: b, _owner: _.current };
12
+ var Ce;
13
+ function yr() {
14
+ if (Ce) return L;
15
+ Ce = 1;
16
+ var R = Oe, S = Symbol.for("react.element"), f = Symbol.for("react.fragment"), E = Object.prototype.hasOwnProperty, x = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, C = { key: !0, ref: !0, __self: !0, __source: !0 };
17
+ function b(_, d, p) {
18
+ var u, v = {}, h = null, k = null;
19
+ p !== void 0 && (h = "" + p), d.key !== void 0 && (h = "" + d.key), d.ref !== void 0 && (k = d.ref);
20
+ for (u in d) E.call(d, u) && !C.hasOwnProperty(u) && (v[u] = d[u]);
21
+ if (_ && _.defaultProps) for (u in d = _.defaultProps, d) v[u] === void 0 && (v[u] = d[u]);
22
+ return { $$typeof: S, type: _, key: h, ref: k, props: v, _owner: x.current };
23
23
  }
24
- return F.Fragment = g, F.jsx = T, F.jsxs = T, F;
24
+ return L.Fragment = f, L.jsx = b, L.jsxs = b, L;
25
25
  }
26
26
  var $ = {};
27
27
  /**
@@ -33,25 +33,25 @@ var $ = {};
33
33
  * This source code is licensed under the MIT license found in the
34
34
  * LICENSE file in the root directory of this source tree.
35
35
  */
36
- var Ce;
37
- function yr() {
38
- return Ce || (Ce = 1, process.env.NODE_ENV !== "production" && function() {
39
- var w = Se, C = Symbol.for("react.element"), g = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), d = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Z = Symbol.iterator, je = "@@iterator";
36
+ var we;
37
+ function mr() {
38
+ return we || (we = 1, process.env.NODE_ENV !== "production" && function() {
39
+ var R = Oe, S = Symbol.for("react.element"), f = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), b = Symbol.for("react.provider"), _ = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), W = Symbol.iterator, Ae = "@@iterator";
40
40
  function Ie(e) {
41
41
  if (e === null || typeof e != "object")
42
42
  return null;
43
- var r = Z && e[Z] || e[je];
43
+ var r = W && e[W] || e[Ae];
44
44
  return typeof r == "function" ? r : null;
45
45
  }
46
- var j = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
- function v(e) {
46
+ var j = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
+ function g(e) {
48
48
  {
49
49
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
50
50
  t[n - 1] = arguments[n];
51
- Ae("error", e, t);
51
+ ke("error", e, t);
52
52
  }
53
53
  }
54
- function Ae(e, r, t) {
54
+ function ke(e, r, t) {
55
55
  {
56
56
  var n = j.ReactDebugCurrentFrame, i = n.getStackAddendum();
57
57
  i !== "" && (r += "%s", t = t.concat([i]));
@@ -61,63 +61,63 @@ function yr() {
61
61
  s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
62
62
  }
63
63
  }
64
- var ke = !1, De = !1, Fe = !1, $e = !1, Le = !1, ee;
65
- ee = Symbol.for("react.module.reference");
66
- function Ye(e) {
67
- return !!(typeof e == "string" || typeof e == "function" || e === y || e === R || Le || e === _ || e === m || e === f || $e || e === Y || ke || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === b || e.$$typeof === T || e.$$typeof === d || e.$$typeof === u || // This needs to include all possible module reference object
64
+ var De = !1, Fe = !1, Le = !1, $e = !1, Ye = !1, re;
65
+ re = Symbol.for("react.module.reference");
66
+ function We(e) {
67
+ return !!(typeof e == "string" || typeof e == "function" || e === E || e === C || Ye || e === x || e === p || e === u || $e || e === k || De || Fe || Le || typeof e == "object" && e !== null && (e.$$typeof === h || e.$$typeof === v || e.$$typeof === b || e.$$typeof === _ || e.$$typeof === d || // This needs to include all possible module reference object
68
68
  // types supported by any Flight configuration anywhere since
69
69
  // we don't know which Flight build this will end up being used
70
70
  // with.
71
- e.$$typeof === ee || e.getModuleId !== void 0));
71
+ e.$$typeof === re || e.getModuleId !== void 0));
72
72
  }
73
- function We(e, r, t) {
73
+ function Ve(e, r, t) {
74
74
  var n = e.displayName;
75
75
  if (n)
76
76
  return n;
77
77
  var i = r.displayName || r.name || "";
78
78
  return i !== "" ? t + "(" + i + ")" : t;
79
79
  }
80
- function re(e) {
80
+ function te(e) {
81
81
  return e.displayName || "Context";
82
82
  }
83
- function S(e) {
83
+ function w(e) {
84
84
  if (e == null)
85
85
  return null;
86
- if (typeof e.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
86
+ if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
87
87
  return e.displayName || e.name || null;
88
88
  if (typeof e == "string")
89
89
  return e;
90
90
  switch (e) {
91
- case y:
91
+ case E:
92
92
  return "Fragment";
93
- case g:
93
+ case f:
94
94
  return "Portal";
95
- case R:
95
+ case C:
96
96
  return "Profiler";
97
- case _:
97
+ case x:
98
98
  return "StrictMode";
99
- case m:
99
+ case p:
100
100
  return "Suspense";
101
- case f:
101
+ case u:
102
102
  return "SuspenseList";
103
103
  }
104
104
  if (typeof e == "object")
105
105
  switch (e.$$typeof) {
106
- case d:
106
+ case _:
107
107
  var r = e;
108
- return re(r) + ".Consumer";
109
- case T:
110
- var t = e;
111
- return re(t._context) + ".Provider";
112
- case u:
113
- return We(e, e.render, "ForwardRef");
108
+ return te(r) + ".Consumer";
114
109
  case b:
110
+ var t = e;
111
+ return te(t._context) + ".Provider";
112
+ case d:
113
+ return Ve(e, e.render, "ForwardRef");
114
+ case v:
115
115
  var n = e.displayName || null;
116
- return n !== null ? n : S(e.type) || "Memo";
117
- case x: {
116
+ return n !== null ? n : w(e.type) || "Memo";
117
+ case h: {
118
118
  var i = e, s = i._payload, o = i._init;
119
119
  try {
120
- return S(o(s));
120
+ return w(o(s));
121
121
  } catch {
122
122
  return null;
123
123
  }
@@ -125,18 +125,18 @@ function yr() {
125
125
  }
126
126
  return null;
127
127
  }
128
- var P = Object.assign, k = 0, te, ne, ae, oe, ie, ue, se;
129
- function le() {
128
+ var O = Object.assign, D = 0, ne, ae, oe, ie, ue, se, le;
129
+ function ce() {
130
130
  }
131
- le.__reactDisabledLog = !0;
132
- function Ve() {
131
+ ce.__reactDisabledLog = !0;
132
+ function Me() {
133
133
  {
134
- if (k === 0) {
135
- te = console.log, ne = console.info, ae = console.warn, oe = console.error, ie = console.group, ue = console.groupCollapsed, se = console.groupEnd;
134
+ if (D === 0) {
135
+ ne = console.log, ae = console.info, oe = console.warn, ie = console.error, ue = console.group, se = console.groupCollapsed, le = console.groupEnd;
136
136
  var e = {
137
137
  configurable: !0,
138
138
  enumerable: !0,
139
- value: le,
139
+ value: ce,
140
140
  writable: !0
141
141
  };
142
142
  Object.defineProperties(console, {
@@ -149,77 +149,77 @@ function yr() {
149
149
  groupEnd: e
150
150
  });
151
151
  }
152
- k++;
152
+ D++;
153
153
  }
154
154
  }
155
- function Me() {
155
+ function Ne() {
156
156
  {
157
- if (k--, k === 0) {
157
+ if (D--, D === 0) {
158
158
  var e = {
159
159
  configurable: !0,
160
160
  enumerable: !0,
161
161
  writable: !0
162
162
  };
163
163
  Object.defineProperties(console, {
164
- log: P({}, e, {
165
- value: te
166
- }),
167
- info: P({}, e, {
164
+ log: O({}, e, {
168
165
  value: ne
169
166
  }),
170
- warn: P({}, e, {
167
+ info: O({}, e, {
171
168
  value: ae
172
169
  }),
173
- error: P({}, e, {
170
+ warn: O({}, e, {
174
171
  value: oe
175
172
  }),
176
- group: P({}, e, {
173
+ error: O({}, e, {
177
174
  value: ie
178
175
  }),
179
- groupCollapsed: P({}, e, {
176
+ group: O({}, e, {
180
177
  value: ue
181
178
  }),
182
- groupEnd: P({}, e, {
179
+ groupCollapsed: O({}, e, {
183
180
  value: se
181
+ }),
182
+ groupEnd: O({}, e, {
183
+ value: le
184
184
  })
185
185
  });
186
186
  }
187
- k < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
187
+ D < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
188
  }
189
189
  }
190
- var N = j.ReactCurrentDispatcher, q;
191
- function W(e, r, t) {
190
+ var q = j.ReactCurrentDispatcher, B;
191
+ function V(e, r, t) {
192
192
  {
193
- if (q === void 0)
193
+ if (B === void 0)
194
194
  try {
195
195
  throw Error();
196
196
  } catch (i) {
197
197
  var n = i.stack.trim().match(/\n( *(at )?)/);
198
- q = n && n[1] || "";
198
+ B = n && n[1] || "";
199
199
  }
200
200
  return `
201
- ` + q + e;
201
+ ` + B + e;
202
202
  }
203
203
  }
204
- var B = !1, V;
204
+ var J = !1, M;
205
205
  {
206
206
  var Ue = typeof WeakMap == "function" ? WeakMap : Map;
207
- V = new Ue();
207
+ M = new Ue();
208
208
  }
209
- function ce(e, r) {
210
- if (!e || B)
209
+ function fe(e, r) {
210
+ if (!e || J)
211
211
  return "";
212
212
  {
213
- var t = V.get(e);
213
+ var t = M.get(e);
214
214
  if (t !== void 0)
215
215
  return t;
216
216
  }
217
217
  var n;
218
- B = !0;
218
+ J = !0;
219
219
  var i = Error.prepareStackTrace;
220
220
  Error.prepareStackTrace = void 0;
221
221
  var s;
222
- s = N.current, N.current = null, Ve();
222
+ s = q.current, q.current = null, Me();
223
223
  try {
224
224
  if (r) {
225
225
  var o = function() {
@@ -232,167 +232,167 @@ function yr() {
232
232
  }), typeof Reflect == "object" && Reflect.construct) {
233
233
  try {
234
234
  Reflect.construct(o, []);
235
- } catch (h) {
236
- n = h;
235
+ } catch (m) {
236
+ n = m;
237
237
  }
238
238
  Reflect.construct(e, [], o);
239
239
  } else {
240
240
  try {
241
241
  o.call();
242
- } catch (h) {
243
- n = h;
242
+ } catch (m) {
243
+ n = m;
244
244
  }
245
245
  e.call(o.prototype);
246
246
  }
247
247
  } else {
248
248
  try {
249
249
  throw Error();
250
- } catch (h) {
251
- n = h;
250
+ } catch (m) {
251
+ n = m;
252
252
  }
253
253
  e();
254
254
  }
255
- } catch (h) {
256
- if (h && n && typeof h.stack == "string") {
257
- for (var a = h.stack.split(`
258
- `), p = n.stack.split(`
259
- `), l = a.length - 1, c = p.length - 1; l >= 1 && c >= 0 && a[l] !== p[c]; )
255
+ } catch (m) {
256
+ if (m && n && typeof m.stack == "string") {
257
+ for (var a = m.stack.split(`
258
+ `), y = n.stack.split(`
259
+ `), l = a.length - 1, c = y.length - 1; l >= 1 && c >= 0 && a[l] !== y[c]; )
260
260
  c--;
261
261
  for (; l >= 1 && c >= 0; l--, c--)
262
- if (a[l] !== p[c]) {
262
+ if (a[l] !== y[c]) {
263
263
  if (l !== 1 || c !== 1)
264
264
  do
265
- if (l--, c--, c < 0 || a[l] !== p[c]) {
266
- var E = `
265
+ if (l--, c--, c < 0 || a[l] !== y[c]) {
266
+ var T = `
267
267
  ` + a[l].replace(" at new ", " at ");
268
- return e.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", e.displayName)), typeof e == "function" && V.set(e, E), E;
268
+ return e.displayName && T.includes("<anonymous>") && (T = T.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, T), T;
269
269
  }
270
270
  while (l >= 1 && c >= 0);
271
271
  break;
272
272
  }
273
273
  }
274
274
  } finally {
275
- B = !1, N.current = s, Me(), Error.prepareStackTrace = i;
275
+ J = !1, q.current = s, Ne(), Error.prepareStackTrace = i;
276
276
  }
277
- var A = e ? e.displayName || e.name : "", O = A ? W(A) : "";
278
- return typeof e == "function" && V.set(e, O), O;
277
+ var I = e ? e.displayName || e.name : "", P = I ? V(I) : "";
278
+ return typeof e == "function" && M.set(e, P), P;
279
279
  }
280
- function Ne(e, r, t) {
281
- return ce(e, !1);
280
+ function qe(e, r, t) {
281
+ return fe(e, !1);
282
282
  }
283
- function qe(e) {
283
+ function Be(e) {
284
284
  var r = e.prototype;
285
285
  return !!(r && r.isReactComponent);
286
286
  }
287
- function M(e, r, t) {
287
+ function N(e, r, t) {
288
288
  if (e == null)
289
289
  return "";
290
290
  if (typeof e == "function")
291
- return ce(e, qe(e));
291
+ return fe(e, Be(e));
292
292
  if (typeof e == "string")
293
- return W(e);
293
+ return V(e);
294
294
  switch (e) {
295
- case m:
296
- return W("Suspense");
297
- case f:
298
- return W("SuspenseList");
295
+ case p:
296
+ return V("Suspense");
297
+ case u:
298
+ return V("SuspenseList");
299
299
  }
300
300
  if (typeof e == "object")
301
301
  switch (e.$$typeof) {
302
- case u:
303
- return Ne(e.render);
304
- case b:
305
- return M(e.type, r, t);
306
- case x: {
302
+ case d:
303
+ return qe(e.render);
304
+ case v:
305
+ return N(e.type, r, t);
306
+ case h: {
307
307
  var n = e, i = n._payload, s = n._init;
308
308
  try {
309
- return M(s(i), r, t);
309
+ return N(s(i), r, t);
310
310
  } catch {
311
311
  }
312
312
  }
313
313
  }
314
314
  return "";
315
315
  }
316
- var D = Object.prototype.hasOwnProperty, fe = {}, de = j.ReactDebugCurrentFrame;
316
+ var F = Object.prototype.hasOwnProperty, de = {}, ve = j.ReactDebugCurrentFrame;
317
317
  function U(e) {
318
318
  if (e) {
319
- var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
320
- de.setExtraStackFrame(t);
319
+ var r = e._owner, t = N(e.type, e._source, r ? r.type : null);
320
+ ve.setExtraStackFrame(t);
321
321
  } else
322
- de.setExtraStackFrame(null);
322
+ ve.setExtraStackFrame(null);
323
323
  }
324
- function Be(e, r, t, n, i) {
324
+ function Je(e, r, t, n, i) {
325
325
  {
326
- var s = Function.call.bind(D);
326
+ var s = Function.call.bind(F);
327
327
  for (var o in e)
328
328
  if (s(e, o)) {
329
329
  var a = void 0;
330
330
  try {
331
331
  if (typeof e[o] != "function") {
332
- var p = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
- throw p.name = "Invariant Violation", p;
332
+ var y = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
+ throw y.name = "Invariant Violation", y;
334
334
  }
335
335
  a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
336
  } catch (l) {
337
337
  a = l;
338
338
  }
339
- a && !(a instanceof Error) && (U(i), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), U(null)), a instanceof Error && !(a.message in fe) && (fe[a.message] = !0, U(i), v("Failed %s type: %s", t, a.message), U(null));
339
+ a && !(a instanceof Error) && (U(i), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), U(null)), a instanceof Error && !(a.message in de) && (de[a.message] = !0, U(i), g("Failed %s type: %s", t, a.message), U(null));
340
340
  }
341
341
  }
342
342
  }
343
- var Je = Array.isArray;
344
- function J(e) {
345
- return Je(e);
343
+ var Ke = Array.isArray;
344
+ function K(e) {
345
+ return Ke(e);
346
346
  }
347
- function Ke(e) {
347
+ function Ge(e) {
348
348
  {
349
349
  var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
350
350
  return t;
351
351
  }
352
352
  }
353
- function Ge(e) {
353
+ function ze(e) {
354
354
  try {
355
- return ve(e), !1;
355
+ return pe(e), !1;
356
356
  } catch {
357
357
  return !0;
358
358
  }
359
359
  }
360
- function ve(e) {
360
+ function pe(e) {
361
361
  return "" + e;
362
362
  }
363
- function pe(e) {
364
- if (Ge(e))
365
- return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), ve(e);
363
+ function ge(e) {
364
+ if (ze(e))
365
+ return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), pe(e);
366
366
  }
367
- var ge = j.ReactCurrentOwner, ze = {
367
+ var ye = j.ReactCurrentOwner, Xe = {
368
368
  key: !0,
369
369
  ref: !0,
370
370
  __self: !0,
371
371
  __source: !0
372
- }, ye, he;
373
- function Xe(e) {
374
- if (D.call(e, "ref")) {
372
+ }, me, Ee;
373
+ function Qe(e) {
374
+ if (F.call(e, "ref")) {
375
375
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
376
376
  if (r && r.isReactWarning)
377
377
  return !1;
378
378
  }
379
379
  return e.ref !== void 0;
380
380
  }
381
- function Qe(e) {
382
- if (D.call(e, "key")) {
381
+ function He(e) {
382
+ if (F.call(e, "key")) {
383
383
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
384
384
  if (r && r.isReactWarning)
385
385
  return !1;
386
386
  }
387
387
  return e.key !== void 0;
388
388
  }
389
- function He(e, r) {
390
- typeof e.ref == "string" && ge.current;
391
- }
392
389
  function Ze(e, r) {
390
+ typeof e.ref == "string" && ye.current;
391
+ }
392
+ function er(e, r) {
393
393
  {
394
394
  var t = function() {
395
- ye || (ye = !0, v("%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://reactjs.org/link/special-props)", r));
395
+ me || (me = !0, g("%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://reactjs.org/link/special-props)", r));
396
396
  };
397
397
  t.isReactWarning = !0, Object.defineProperty(e, "key", {
398
398
  get: t,
@@ -400,10 +400,10 @@ function yr() {
400
400
  });
401
401
  }
402
402
  }
403
- function er(e, r) {
403
+ function rr(e, r) {
404
404
  {
405
405
  var t = function() {
406
- he || (he = !0, v("%s: `ref` 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://reactjs.org/link/special-props)", r));
406
+ Ee || (Ee = !0, g("%s: `ref` 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://reactjs.org/link/special-props)", r));
407
407
  };
408
408
  t.isReactWarning = !0, Object.defineProperty(e, "ref", {
409
409
  get: t,
@@ -411,10 +411,10 @@ function yr() {
411
411
  });
412
412
  }
413
413
  }
414
- var rr = function(e, r, t, n, i, s, o) {
414
+ var tr = function(e, r, t, n, i, s, o) {
415
415
  var a = {
416
416
  // This tag allows us to uniquely identify this as a React Element
417
- $$typeof: C,
417
+ $$typeof: S,
418
418
  // Built-in properties that belong on the element
419
419
  type: e,
420
420
  key: r,
@@ -440,41 +440,41 @@ function yr() {
440
440
  value: i
441
441
  }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
442
442
  };
443
- function tr(e, r, t, n, i) {
443
+ function nr(e, r, t, n, i) {
444
444
  {
445
- var s, o = {}, a = null, p = null;
446
- t !== void 0 && (pe(t), a = "" + t), Qe(r) && (pe(r.key), a = "" + r.key), Xe(r) && (p = r.ref, He(r, i));
445
+ var s, o = {}, a = null, y = null;
446
+ t !== void 0 && (ge(t), a = "" + t), He(r) && (ge(r.key), a = "" + r.key), Qe(r) && (y = r.ref, Ze(r, i));
447
447
  for (s in r)
448
- D.call(r, s) && !ze.hasOwnProperty(s) && (o[s] = r[s]);
448
+ F.call(r, s) && !Xe.hasOwnProperty(s) && (o[s] = r[s]);
449
449
  if (e && e.defaultProps) {
450
450
  var l = e.defaultProps;
451
451
  for (s in l)
452
452
  o[s] === void 0 && (o[s] = l[s]);
453
453
  }
454
- if (a || p) {
454
+ if (a || y) {
455
455
  var c = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
- a && Ze(o, c), p && er(o, c);
456
+ a && er(o, c), y && rr(o, c);
457
457
  }
458
- return rr(e, a, p, i, n, ge.current, o);
458
+ return tr(e, a, y, i, n, ye.current, o);
459
459
  }
460
460
  }
461
- var K = j.ReactCurrentOwner, me = j.ReactDebugCurrentFrame;
462
- function I(e) {
461
+ var G = j.ReactCurrentOwner, he = j.ReactDebugCurrentFrame;
462
+ function A(e) {
463
463
  if (e) {
464
- var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
465
- me.setExtraStackFrame(t);
464
+ var r = e._owner, t = N(e.type, e._source, r ? r.type : null);
465
+ he.setExtraStackFrame(t);
466
466
  } else
467
- me.setExtraStackFrame(null);
467
+ he.setExtraStackFrame(null);
468
468
  }
469
- var G;
470
- G = !1;
471
- function z(e) {
472
- return typeof e == "object" && e !== null && e.$$typeof === C;
469
+ var z;
470
+ z = !1;
471
+ function X(e) {
472
+ return typeof e == "object" && e !== null && e.$$typeof === S;
473
473
  }
474
- function Ee() {
474
+ function Te() {
475
475
  {
476
- if (K.current) {
477
- var e = S(K.current.type);
476
+ if (G.current) {
477
+ var e = w(G.current.type);
478
478
  if (e)
479
479
  return `
480
480
 
@@ -483,13 +483,13 @@ Check the render method of \`` + e + "`.";
483
483
  return "";
484
484
  }
485
485
  }
486
- function nr(e) {
486
+ function ar(e) {
487
487
  return "";
488
488
  }
489
- var be = {};
490
- function ar(e) {
489
+ var _e = {};
490
+ function or(e) {
491
491
  {
492
- var r = Ee();
492
+ var r = Te();
493
493
  if (!r) {
494
494
  var t = typeof e == "string" ? e : e.displayName || e.name;
495
495
  t && (r = `
@@ -499,39 +499,39 @@ Check the top-level render call using <` + t + ">.");
499
499
  return r;
500
500
  }
501
501
  }
502
- function _e(e, r) {
502
+ function be(e, r) {
503
503
  {
504
504
  if (!e._store || e._store.validated || e.key != null)
505
505
  return;
506
506
  e._store.validated = !0;
507
- var t = ar(r);
508
- if (be[t])
507
+ var t = or(r);
508
+ if (_e[t])
509
509
  return;
510
- be[t] = !0;
510
+ _e[t] = !0;
511
511
  var n = "";
512
- e && e._owner && e._owner !== K.current && (n = " It was passed a child from " + S(e._owner.type) + "."), I(e), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), I(null);
512
+ e && e._owner && e._owner !== G.current && (n = " It was passed a child from " + w(e._owner.type) + "."), A(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), A(null);
513
513
  }
514
514
  }
515
515
  function Re(e, r) {
516
516
  {
517
517
  if (typeof e != "object")
518
518
  return;
519
- if (J(e))
519
+ if (K(e))
520
520
  for (var t = 0; t < e.length; t++) {
521
521
  var n = e[t];
522
- z(n) && _e(n, r);
522
+ X(n) && be(n, r);
523
523
  }
524
- else if (z(e))
524
+ else if (X(e))
525
525
  e._store && (e._store.validated = !0);
526
526
  else if (e) {
527
527
  var i = Ie(e);
528
528
  if (typeof i == "function" && i !== e.entries)
529
529
  for (var s = i.call(e), o; !(o = s.next()).done; )
530
- z(o.value) && _e(o.value, r);
530
+ X(o.value) && be(o.value, r);
531
531
  }
532
532
  }
533
533
  }
534
- function or(e) {
534
+ function ir(e) {
535
535
  {
536
536
  var r = e.type;
537
537
  if (r == null || typeof r == "string")
@@ -539,158 +539,173 @@ Check the top-level render call using <` + t + ">.");
539
539
  var t;
540
540
  if (typeof r == "function")
541
541
  t = r.propTypes;
542
- else if (typeof r == "object" && (r.$$typeof === u || // Note: Memo only checks outer props here.
542
+ else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
543
543
  // Inner props are checked in the reconciler.
544
- r.$$typeof === b))
544
+ r.$$typeof === v))
545
545
  t = r.propTypes;
546
546
  else
547
547
  return;
548
548
  if (t) {
549
- var n = S(r);
550
- Be(t, e.props, "prop", n, e);
551
- } else if (r.PropTypes !== void 0 && !G) {
552
- G = !0;
553
- var i = S(r);
554
- v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
549
+ var n = w(r);
550
+ Je(t, e.props, "prop", n, e);
551
+ } else if (r.PropTypes !== void 0 && !z) {
552
+ z = !0;
553
+ var i = w(r);
554
+ g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
555
555
  }
556
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
556
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
557
  }
558
558
  }
559
- function ir(e) {
559
+ function ur(e) {
560
560
  {
561
561
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
562
562
  var n = r[t];
563
563
  if (n !== "children" && n !== "key") {
564
- I(e), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), I(null);
564
+ A(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), A(null);
565
565
  break;
566
566
  }
567
567
  }
568
- e.ref !== null && (I(e), v("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
568
+ e.ref !== null && (A(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
569
569
  }
570
570
  }
571
- var Te = {};
571
+ var Se = {};
572
572
  function xe(e, r, t, n, i, s) {
573
573
  {
574
- var o = Ye(e);
574
+ var o = We(e);
575
575
  if (!o) {
576
576
  var a = "";
577
577
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
578
- var p = nr();
579
- p ? a += p : a += Ee();
578
+ var y = ar();
579
+ y ? a += y : a += Te();
580
580
  var l;
581
- e === null ? l = "null" : J(e) ? l = "array" : e !== void 0 && e.$$typeof === C ? (l = "<" + (S(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, a);
581
+ e === null ? l = "null" : K(e) ? l = "array" : e !== void 0 && e.$$typeof === S ? (l = "<" + (w(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, a);
582
582
  }
583
- var c = tr(e, r, t, i, s);
583
+ var c = nr(e, r, t, i, s);
584
584
  if (c == null)
585
585
  return c;
586
586
  if (o) {
587
- var E = r.children;
588
- if (E !== void 0)
587
+ var T = r.children;
588
+ if (T !== void 0)
589
589
  if (n)
590
- if (J(E)) {
591
- for (var A = 0; A < E.length; A++)
592
- Re(E[A], e);
593
- Object.freeze && Object.freeze(E);
590
+ if (K(T)) {
591
+ for (var I = 0; I < T.length; I++)
592
+ Re(T[I], e);
593
+ Object.freeze && Object.freeze(T);
594
594
  } else
595
- v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
595
+ g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
596
596
  else
597
- Re(E, e);
597
+ Re(T, e);
598
598
  }
599
- if (D.call(r, "key")) {
600
- var O = S(e), h = Object.keys(r).filter(function(dr) {
601
- return dr !== "key";
602
- }), X = h.length > 0 ? "{key: someKey, " + h.join(": ..., ") + ": ...}" : "{key: someKey}";
603
- if (!Te[O + X]) {
604
- var fr = h.length > 0 ? "{" + h.join(": ..., ") + ": ...}" : "{}";
605
- v(`A props object containing a "key" prop is being spread into JSX:
599
+ if (F.call(r, "key")) {
600
+ var P = w(e), m = Object.keys(r).filter(function(vr) {
601
+ return vr !== "key";
602
+ }), Q = m.length > 0 ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}";
603
+ if (!Se[P + Q]) {
604
+ var dr = m.length > 0 ? "{" + m.join(": ..., ") + ": ...}" : "{}";
605
+ g(`A props object containing a "key" prop is being spread into JSX:
606
606
  let props = %s;
607
607
  <%s {...props} />
608
608
  React keys must be passed directly to JSX without using spread:
609
609
  let props = %s;
610
- <%s key={someKey} {...props} />`, X, O, fr, O), Te[O + X] = !0;
610
+ <%s key={someKey} {...props} />`, Q, P, dr, P), Se[P + Q] = !0;
611
611
  }
612
612
  }
613
- return e === y ? ir(c) : or(c), c;
613
+ return e === E ? ur(c) : ir(c), c;
614
614
  }
615
615
  }
616
- function ur(e, r, t) {
616
+ function sr(e, r, t) {
617
617
  return xe(e, r, t, !0);
618
618
  }
619
- function sr(e, r, t) {
619
+ function lr(e, r, t) {
620
620
  return xe(e, r, t, !1);
621
621
  }
622
- var lr = sr, cr = ur;
623
- $.Fragment = y, $.jsx = lr, $.jsxs = cr;
622
+ var cr = lr, fr = sr;
623
+ $.Fragment = E, $.jsx = cr, $.jsxs = fr;
624
624
  }()), $;
625
625
  }
626
- process.env.NODE_ENV === "production" ? Q.exports = gr() : Q.exports = yr();
627
- var L = Q.exports;
628
- function br() {
629
- return /* @__PURE__ */ L.jsxs(L.Fragment, { children: [
630
- /* @__PURE__ */ L.jsx("h1", { children: "New Package Created" }),
631
- /* @__PURE__ */ L.jsx("h2", { children: "Questify ready to go!" })
626
+ process.env.NODE_ENV === "production" ? Z.exports = yr() : Z.exports = mr();
627
+ var Y = Z.exports;
628
+ function _r() {
629
+ return /* @__PURE__ */ Y.jsxs(Y.Fragment, { children: [
630
+ /* @__PURE__ */ Y.jsx("h1", { children: "New Package Created" }),
631
+ /* @__PURE__ */ Y.jsx("h2", { children: "Questify ready to go!" })
632
632
  ] });
633
633
  }
634
- const H = "questify-trial", hr = localStorage.getItem(H) || 0, mr = parseInt(hr), Oe = vr({
634
+ const ee = "questify-last-completed-trial", Er = localStorage.getItem(ee) || 0, hr = parseInt(Er), je = pr({
635
+ playerLocation: "trail",
635
636
  currentTrialIdx: 0,
636
637
  trials: {},
637
638
  submitAnswer: () => {
638
639
  },
639
640
  completeTrial: () => {
640
641
  }
641
- });
642
- function _r({ trials: w, children: C }) {
643
- const g = w.map((u) => u.solution), [y, _] = Pe({ currentTrialIdx: mr, solutions: g });
644
- function R() {
645
- const u = y.currentTrialIdx + 1;
646
- _((m) => ({ ...m, currentTrialIdx: u })), localStorage.setItem(H, u);
642
+ }), H = -1;
643
+ function br({ trials: R, children: S }) {
644
+ const [f, E] = Pe({ currentTrialIdx: hr, playerLocation: H });
645
+ function x() {
646
+ const u = f.currentTrialIdx + 1;
647
+ E((v) => ({ ...v, currentTrialIdx: u })), localStorage.setItem(ee, u);
648
+ }
649
+ function C(u) {
650
+ let v = !1;
651
+ const h = f.currentTrialIdx + 1;
652
+ return R[h].solution === u.trim().toLowerCase() && (v = !0, E((W) => ({ ...W, currentTrialIdx: h })), localStorage.setItem(ee, h)), v;
647
653
  }
648
- function T(u) {
649
- let m = !1;
650
- const f = y.currentTrialIdx + 1;
651
- return y.solutions[f] === u.trim().toLowerCase() && (m = !0, _((x) => ({ ...x, currentTrialIdx: f })), localStorage.setItem(H, f)), m;
654
+ function b() {
655
+ f.playerLocation;
652
656
  }
653
- const d = {
654
- currentTrialIdx: y.currentTrialIdx,
655
- currentTrial: w[y.currentTrialIdx],
656
- trials: w,
657
- submitAnswer: T,
658
- completeTrial: R
657
+ function _() {
658
+ E((u) => ({ ...u, playerLocation: H }));
659
+ }
660
+ function d(u) {
661
+ E((v) => ({ ...v, playerLocation: u }));
662
+ }
663
+ const p = {
664
+ currentTrialIdx: f.currentTrialIdx,
665
+ currentTrial: R[f.currentTrialIdx],
666
+ trials: R,
667
+ submitAnswer: C,
668
+ completeTrial: x,
669
+ playerOnTrialSelectScreen: b,
670
+ moveToTrialSelectScreen: _,
671
+ moveToTrialScreen: d
659
672
  };
660
- return /* @__PURE__ */ L.jsx(Oe.Provider, { value: d, children: C });
673
+ return /* @__PURE__ */ Y.jsx(je.Provider, { value: p, children: S });
661
674
  }
662
675
  function Rr() {
663
- const [w, C] = Pe(-1), g = pr(Oe);
664
- if (!g) throw new Error("useQuestify must be used within a ProgressContextProvider");
665
- const y = g.trials.map((d) => d.solution);
666
- function _(d) {
676
+ const [R, S] = Pe(-1), f = gr(je);
677
+ if (!f) throw new Error("useQuestify must be used within a ProgressContextProvider");
678
+ const E = f.trials.map((p) => p.solution);
679
+ function x(p) {
667
680
  let u = !1;
668
- const m = g.currentTrialIdx;
669
- return y[m] === d.trim().toLowerCase() && (u = !0, g.completeTrial()), u;
681
+ const v = f.currentTrialIdx;
682
+ return E[v] === p.trim().toLowerCase() && (u = !0, f.completeTrial()), u;
670
683
  }
671
- function R() {
672
- const d = g.currentTrialIdx;
673
- return g.trials.filter((u) => u.section < d);
684
+ function C() {
685
+ const p = f.currentTrialIdx;
686
+ return f.trials.filter((u) => u.section < p);
674
687
  }
675
- function T() {
676
- return g.currentTrialIdx == -1 ? {
677
- type: "path",
678
- data: R().map((d) => ({ title: d.title }))
679
- } : {
680
- type: "trial",
681
- data: g.currentTrial
682
- };
688
+ function b() {
689
+ f.moveToTrialSelectScreen();
690
+ }
691
+ function _(p) {
692
+ f.moveToTrialScreen(p);
693
+ }
694
+ function d() {
695
+ f.playerOnTrialSelectScreen();
683
696
  }
684
697
  return {
685
- playerLocation: T,
686
- submitAnswer: _,
687
- solvedTrials: R
698
+ navigateSelectScreen: b,
699
+ navigateToTrial: _,
700
+ isOnTrialSelectScreen: d,
701
+ submitAnswer: x,
702
+ solvedTrials: C
688
703
  };
689
704
  }
690
705
  export {
691
- Oe as ProgressContext,
692
- _r as ProgressContextProvider,
693
- br as default,
706
+ je as ProgressContext,
707
+ br as ProgressContextProvider,
708
+ _r as default,
694
709
  Rr as useQuestify
695
710
  };
696
711
  //# sourceMappingURL=questify.js.map