@civet/core 6.1.1 → 6.2.1

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.
@@ -1,6 +1,7 @@
1
1
  export default class ChannelNotifier<TriggerArgs extends unknown[] = never[]> {
2
2
  private channels;
3
3
  subscribe: (channel: string, callback: (...args: TriggerArgs) => void) => (() => void);
4
+ once: (channel: string, callback: (...args: TriggerArgs) => void) => (() => void);
4
5
  isSubscribed: (channel: string, callback: (...args: TriggerArgs) => void) => boolean;
5
- trigger: (channel: string, ...args: TriggerArgs) => void;
6
+ trigger: (channel: string | undefined, ...args: TriggerArgs) => void;
6
7
  }
@@ -69,7 +69,7 @@ export default abstract class DataProvider<Item, Query, Options, MetaType extend
69
69
  releaseInstance(_: InferInstance<MetaType>): void;
70
70
  normalizeResource(resource: string): string;
71
71
  subscribe(resource: string, callback: () => void): () => void;
72
- notify(resource: string): void;
72
+ notify(resource?: string): void;
73
73
  get<ResponseI extends Response = Response, QueryI extends Query = Query, OptionsI extends Options = Options, MetaTypeI extends MetaType = MetaType>(resource: string, query: QueryI, options?: OptionsI, meta?: MetaLike<MetaTypeI>, abortSignal?: AbortSignal): Promise<ResponseI>;
74
74
  continuousGet<ResponseI extends Response = Response, QueryI extends Query = Query, OptionsI extends Options = Options, MetaTypeI extends MetaType = MetaType>(resource: string, query: QueryI, options: OptionsI | undefined, meta: MetaLike<MetaTypeI> | undefined, callback: GetCallback<ResponseI>, abortSignal?: AbortSignal): void;
75
75
  abstract handleGet(resource: string, query: Query, options: Options | undefined, meta: MetaType, abortSignal: AbortSignalProxy): Promise<Response | ContinuousGet<Response>> | Response | ContinuousGet<Response>;
@@ -1,6 +1,7 @@
1
1
  export default class Notifier<TriggerArgs extends unknown[] = never[]> {
2
2
  listeners: Set<(...args: TriggerArgs) => void>;
3
3
  subscribe: (callback: (...args: TriggerArgs) => void) => (() => void);
4
+ once: (callback: (...args: TriggerArgs) => void) => (() => void);
4
5
  isSubscribed: (callback: (...args: TriggerArgs) => void) => boolean;
5
6
  trigger: (...args: TriggerArgs) => void;
6
7
  }
package/dist/main.js CHANGED
@@ -1,8 +1,8 @@
1
- import { createContext as Ee, useContext as xe, useMemo as oe, useReducer as qe, useState as Ce, useEffect as ce, useCallback as Le } from "react";
1
+ import { createContext as xe, useContext as Ae, useMemo as oe, useReducer as qe, useState as Ce, useEffect as ce, useCallback as Le } from "react";
2
2
  import { jsx as se } from "react/jsx-runtime";
3
- const ue = Ee({});
3
+ const ue = xe({});
4
4
  ue.displayName = "ConfigContext";
5
- const et = ue.Consumer, Ue = () => xe(ue), ae = Ee({
5
+ const et = ue.Consumer, Ue = () => Ae(ue), ae = xe({
6
6
  name: "",
7
7
  query: void 0,
8
8
  options: void 0,
@@ -21,8 +21,8 @@ const et = ue.Consumer, Ue = () => xe(ue), ae = Ee({
21
21
  notify: () => Promise.reject(new Error("Missing context provider"))
22
22
  });
23
23
  ae.displayName = "ResourceContext";
24
- const Pe = ae.Provider, tt = ae.Consumer, rt = () => xe(ae);
25
- class Ae {
24
+ const Pe = ae.Provider, tt = ae.Consumer, rt = () => Ae(ae);
25
+ class ge {
26
26
  listeners = /* @__PURE__ */ new Set();
27
27
  subscribe = (s) => {
28
28
  if (typeof s != "function")
@@ -31,13 +31,19 @@ class Ae {
31
31
  this.listeners.delete(s);
32
32
  };
33
33
  };
34
+ once = (s) => {
35
+ const u = this.subscribe((...p) => {
36
+ u(), s(...p);
37
+ });
38
+ return u;
39
+ };
34
40
  isSubscribed = (s) => this.listeners.has(s);
35
41
  trigger = (...s) => {
36
- this.listeners.forEach((a) => a(...s));
42
+ this.listeners.forEach((u) => u(...s));
37
43
  };
38
44
  }
39
45
  class Be {
40
- notifier = new Ae();
46
+ notifier = new ge();
41
47
  locked = !1;
42
48
  aborted = !1;
43
49
  constructor() {
@@ -59,8 +65,8 @@ class Be {
59
65
  listen = (s) => {
60
66
  if (this.locked) return () => {
61
67
  };
62
- const a = this.notifier.isSubscribed(s), p = this.notifier.subscribe(s);
63
- return this.aborted && !a && s(), p;
68
+ const u = this.notifier.isSubscribed(s), p = this.notifier.subscribe(s);
69
+ return this.aborted && !u && s(), p;
64
70
  };
65
71
  abort = () => {
66
72
  this.locked || (this.lock(), Object.defineProperty(this, "aborted", {
@@ -81,8 +87,8 @@ class Be {
81
87
  proxy = () => {
82
88
  const s = this;
83
89
  return {
84
- listen(a) {
85
- return s.listen(a);
90
+ listen(u) {
91
+ return s.listen(u);
86
92
  },
87
93
  get locked() {
88
94
  return s.locked;
@@ -95,54 +101,59 @@ class Be {
95
101
  }
96
102
  class ke {
97
103
  channels = {};
98
- subscribe = (s, a) => {
104
+ subscribe = (s, u) => {
99
105
  if (s == null || !`${s}`)
100
106
  throw new Error("Channel is required");
101
- return this.channels[s] == null && (this.channels[s] = new Ae()), this.channels[s].subscribe(a);
107
+ return this.channels[s] == null && (this.channels[s] = new ge()), this.channels[s].subscribe(u);
102
108
  };
103
- isSubscribed = (s, a) => {
109
+ once = (s, u) => {
104
110
  if (s == null || !`${s}`)
105
111
  throw new Error("Channel is required");
106
- return this.channels[s] != null && this.channels[s].isSubscribed(a);
112
+ return this.channels[s] == null && (this.channels[s] = new ge()), this.channels[s].once(u);
107
113
  };
108
- trigger = (s, ...a) => {
114
+ isSubscribed = (s, u) => {
115
+ if (s == null || !`${s}`)
116
+ throw new Error("Channel is required");
117
+ return this.channels[s] != null && this.channels[s].isSubscribed(u);
118
+ };
119
+ trigger = (s, ...u) => {
109
120
  s == null ? Object.values(this.channels).forEach(
110
- (p) => p.trigger(...a)
111
- ) : this.channels[s] != null && this.channels[s].trigger(...a);
121
+ (p) => p.trigger(...u)
122
+ ) : this.channels[s] != null && this.channels[s].trigger(...u);
112
123
  };
113
124
  }
114
125
  function nt(...h) {
115
- return h.length === 0 ? (s) => s : h.length === 1 ? h[0] : h.reduce((s, a) => (p) => s(a(p)));
126
+ return h.length === 0 ? (s) => s : h.length === 1 ? h[0] : h.reduce((s, u) => (p) => s(u(p)));
116
127
  }
117
128
  function je(h) {
118
129
  return h && h.__esModule && Object.prototype.hasOwnProperty.call(h, "default") ? h.default : h;
119
130
  }
120
- var de, _e;
131
+ var de, Ee;
121
132
  function Re() {
122
- return _e || (_e = 1, de = function h(s, a) {
123
- if (s === a) return !0;
124
- if (s && a && typeof s == "object" && typeof a == "object") {
125
- if (s.constructor !== a.constructor) return !1;
133
+ return Ee || (Ee = 1, de = function h(s, u) {
134
+ if (s === u) return !0;
135
+ if (s && u && typeof s == "object" && typeof u == "object") {
136
+ if (s.constructor !== u.constructor) return !1;
126
137
  var p, m, b;
127
138
  if (Array.isArray(s)) {
128
- if (p = s.length, p != a.length) return !1;
139
+ if (p = s.length, p != u.length) return !1;
129
140
  for (m = p; m-- !== 0; )
130
- if (!h(s[m], a[m])) return !1;
141
+ if (!h(s[m], u[m])) return !1;
131
142
  return !0;
132
143
  }
133
- if (s.constructor === RegExp) return s.source === a.source && s.flags === a.flags;
134
- if (s.valueOf !== Object.prototype.valueOf) return s.valueOf() === a.valueOf();
135
- if (s.toString !== Object.prototype.toString) return s.toString() === a.toString();
136
- if (b = Object.keys(s), p = b.length, p !== Object.keys(a).length) return !1;
144
+ if (s.constructor === RegExp) return s.source === u.source && s.flags === u.flags;
145
+ if (s.valueOf !== Object.prototype.valueOf) return s.valueOf() === u.valueOf();
146
+ if (s.toString !== Object.prototype.toString) return s.toString() === u.toString();
147
+ if (b = Object.keys(s), p = b.length, p !== Object.keys(u).length) return !1;
137
148
  for (m = p; m-- !== 0; )
138
- if (!Object.prototype.hasOwnProperty.call(a, b[m])) return !1;
149
+ if (!Object.prototype.hasOwnProperty.call(u, b[m])) return !1;
139
150
  for (m = p; m-- !== 0; ) {
140
151
  var j = b[m];
141
- if (!h(s[j], a[j])) return !1;
152
+ if (!h(s[j], u[j])) return !1;
142
153
  }
143
154
  return !0;
144
155
  }
145
- return s !== s && a !== a;
156
+ return s !== s && u !== u;
146
157
  }), de;
147
158
  }
148
159
  var De = Re();
@@ -153,10 +164,10 @@ function ie(h) {
153
164
  var he = { exports: {} }, Ie;
154
165
  function Te() {
155
166
  return Ie || (Ie = 1, (function(h, s) {
156
- (function(a) {
157
- h.exports = a();
167
+ (function(u) {
168
+ h.exports = u();
158
169
  })(function() {
159
- return (function a(p, m, b) {
170
+ return (function u(p, m, b) {
160
171
  function j(R, D) {
161
172
  if (!m[R]) {
162
173
  if (!p[R]) {
@@ -168,71 +179,71 @@ function Te() {
168
179
  D = m[R] = { exports: {} }, p[R][0].call(D.exports, function(F) {
169
180
  var T = p[R][1][F];
170
181
  return j(T || F);
171
- }, D, D.exports, a, p, m, b);
182
+ }, D, D.exports, u, p, m, b);
172
183
  }
173
184
  return m[R].exports;
174
185
  }
175
186
  for (var P = typeof ie == "function" && ie, U = 0; U < b.length; U++) j(b[U]);
176
187
  return j;
177
- })({ 1: [function(a, p, m) {
188
+ })({ 1: [function(u, p, m) {
178
189
  (function(b, j, P, U, R, D, N, F, T) {
179
- var _ = a("crypto");
180
- function S(u, d) {
181
- d = E(u, d);
190
+ var _ = u("crypto");
191
+ function S(a, d) {
192
+ d = I(a, d);
182
193
  var r;
183
- return (r = d.algorithm !== "passthrough" ? _.createHash(d.algorithm) : new C()).write === void 0 && (r.write = r.update, r.end = r.update), v(d, r).dispatch(u), r.update || r.end(""), r.digest ? r.digest(d.encoding === "buffer" ? void 0 : d.encoding) : (u = r.read(), d.encoding !== "buffer" ? u.toString(d.encoding) : u);
194
+ return (r = d.algorithm !== "passthrough" ? _.createHash(d.algorithm) : new C()).write === void 0 && (r.write = r.update, r.end = r.update), v(d, r).dispatch(a), r.update || r.end(""), r.digest ? r.digest(d.encoding === "buffer" ? void 0 : d.encoding) : (a = r.read(), d.encoding !== "buffer" ? a.toString(d.encoding) : a);
184
195
  }
185
- (m = p.exports = S).sha1 = function(u) {
186
- return S(u);
187
- }, m.keys = function(u) {
188
- return S(u, { excludeValues: !0, algorithm: "sha1", encoding: "hex" });
189
- }, m.MD5 = function(u) {
190
- return S(u, { algorithm: "md5", encoding: "hex" });
191
- }, m.keysMD5 = function(u) {
192
- return S(u, { algorithm: "md5", encoding: "hex", excludeValues: !0 });
196
+ (m = p.exports = S).sha1 = function(a) {
197
+ return S(a);
198
+ }, m.keys = function(a) {
199
+ return S(a, { excludeValues: !0, algorithm: "sha1", encoding: "hex" });
200
+ }, m.MD5 = function(a) {
201
+ return S(a, { algorithm: "md5", encoding: "hex" });
202
+ }, m.keysMD5 = function(a) {
203
+ return S(a, { algorithm: "md5", encoding: "hex", excludeValues: !0 });
193
204
  };
194
205
  var c = _.getHashes ? _.getHashes().slice() : ["sha1", "md5"], w = (c.push("passthrough"), ["buffer", "hex", "binary", "base64"]);
195
- function E(u, d) {
206
+ function I(a, d) {
196
207
  var r = {};
197
- if (r.algorithm = (d = d || {}).algorithm || "sha1", r.encoding = d.encoding || "hex", r.excludeValues = !!d.excludeValues, r.algorithm = r.algorithm.toLowerCase(), r.encoding = r.encoding.toLowerCase(), r.ignoreUnknown = d.ignoreUnknown === !0, r.respectType = d.respectType !== !1, r.respectFunctionNames = d.respectFunctionNames !== !1, r.respectFunctionProperties = d.respectFunctionProperties !== !1, r.unorderedArrays = d.unorderedArrays === !0, r.unorderedSets = d.unorderedSets !== !1, r.unorderedObjects = d.unorderedObjects !== !1, r.replacer = d.replacer || void 0, r.excludeKeys = d.excludeKeys || void 0, u === void 0) throw new Error("Object argument required.");
208
+ if (r.algorithm = (d = d || {}).algorithm || "sha1", r.encoding = d.encoding || "hex", r.excludeValues = !!d.excludeValues, r.algorithm = r.algorithm.toLowerCase(), r.encoding = r.encoding.toLowerCase(), r.ignoreUnknown = d.ignoreUnknown === !0, r.respectType = d.respectType !== !1, r.respectFunctionNames = d.respectFunctionNames !== !1, r.respectFunctionProperties = d.respectFunctionProperties !== !1, r.unorderedArrays = d.unorderedArrays === !0, r.unorderedSets = d.unorderedSets !== !1, r.unorderedObjects = d.unorderedObjects !== !1, r.replacer = d.replacer || void 0, r.excludeKeys = d.excludeKeys || void 0, a === void 0) throw new Error("Object argument required.");
198
209
  for (var i = 0; i < c.length; ++i) c[i].toLowerCase() === r.algorithm.toLowerCase() && (r.algorithm = c[i]);
199
210
  if (c.indexOf(r.algorithm) === -1) throw new Error('Algorithm "' + r.algorithm + '" not supported. supported values: ' + c.join(", "));
200
211
  if (w.indexOf(r.encoding) === -1 && r.algorithm !== "passthrough") throw new Error('Encoding "' + r.encoding + '" not supported. supported values: ' + w.join(", "));
201
212
  return r;
202
213
  }
203
- function I(u) {
204
- if (typeof u == "function") return /^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(u)) != null;
214
+ function E(a) {
215
+ if (typeof a == "function") return /^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(a)) != null;
205
216
  }
206
- function v(u, d, r) {
217
+ function v(a, d, r) {
207
218
  r = r || [];
208
219
  function i(t) {
209
220
  return d.update ? d.update(t, "utf8") : d.write(t, "utf8");
210
221
  }
211
222
  return { dispatch: function(t) {
212
- return this["_" + ((t = u.replacer ? u.replacer(t) : t) === null ? "null" : typeof t)](t);
223
+ return this["_" + ((t = a.replacer ? a.replacer(t) : t) === null ? "null" : typeof t)](t);
213
224
  }, _object: function(t) {
214
225
  var f, l = Object.prototype.toString.call(t), q = /\[object (.*)\]/i.exec(l);
215
226
  if (q = (q = q ? q[1] : "unknown:[" + l + "]").toLowerCase(), 0 <= (l = r.indexOf(t))) return this.dispatch("[CIRCULAR:" + l + "]");
216
227
  if (r.push(t), P !== void 0 && P.isBuffer && P.isBuffer(t)) return i("buffer:"), i(t);
217
- if (q === "object" || q === "function" || q === "asyncfunction") return l = Object.keys(t), u.unorderedObjects && (l = l.sort()), u.respectType === !1 || I(t) || l.splice(0, 0, "prototype", "__proto__", "constructor"), u.excludeKeys && (l = l.filter(function(L) {
218
- return !u.excludeKeys(L);
228
+ if (q === "object" || q === "function" || q === "asyncfunction") return l = Object.keys(t), a.unorderedObjects && (l = l.sort()), a.respectType === !1 || E(t) || l.splice(0, 0, "prototype", "__proto__", "constructor"), a.excludeKeys && (l = l.filter(function(L) {
229
+ return !a.excludeKeys(L);
219
230
  })), i("object:" + l.length + ":"), f = this, l.forEach(function(L) {
220
- f.dispatch(L), i(":"), u.excludeValues || f.dispatch(t[L]), i(",");
231
+ f.dispatch(L), i(":"), a.excludeValues || f.dispatch(t[L]), i(",");
221
232
  });
222
233
  if (!this["_" + q]) {
223
- if (u.ignoreUnknown) return i("[" + q + "]");
234
+ if (a.ignoreUnknown) return i("[" + q + "]");
224
235
  throw new Error('Unknown object type "' + q + '"');
225
236
  }
226
237
  this["_" + q](t);
227
238
  }, _array: function(t, L) {
228
- L = L !== void 0 ? L : u.unorderedArrays !== !1;
239
+ L = L !== void 0 ? L : a.unorderedArrays !== !1;
229
240
  var l = this;
230
241
  if (i("array:" + t.length + ":"), !L || t.length <= 1) return t.forEach(function(k) {
231
242
  return l.dispatch(k);
232
243
  });
233
244
  var q = [], L = t.map(function(k) {
234
245
  var B = new C(), Y = r.slice();
235
- return v(u, B, Y).dispatch(k), q = q.concat(Y.slice(r.length)), B.read().toString();
246
+ return v(a, B, Y).dispatch(k), q = q.concat(Y.slice(r.length)), B.read().toString();
236
247
  });
237
248
  return r = r.concat(q), L.sort(), this._array(L, !1);
238
249
  }, _date: function(t) {
@@ -246,7 +257,7 @@ function Te() {
246
257
  }, _string: function(t) {
247
258
  i("string:" + t.length + ":"), i(t.toString());
248
259
  }, _function: function(t) {
249
- i("fn:"), I(t) ? this.dispatch("[native]") : this.dispatch(t.toString()), u.respectFunctionNames !== !1 && this.dispatch("function-name:" + String(t.name)), u.respectFunctionProperties && this._object(t);
260
+ i("fn:"), E(t) ? this.dispatch("[native]") : this.dispatch(t.toString()), a.respectFunctionNames !== !1 && this.dispatch("function-name:" + String(t.name)), a.respectFunctionProperties && this._object(t);
250
261
  }, _number: function(t) {
251
262
  return i("number:" + t.toString());
252
263
  }, _xml: function(t) {
@@ -280,13 +291,13 @@ function Te() {
280
291
  }, _url: function(t) {
281
292
  return i("url:" + t.toString());
282
293
  }, _map: function(t) {
283
- return i("map:"), t = Array.from(t), this._array(t, u.unorderedSets !== !1);
294
+ return i("map:"), t = Array.from(t), this._array(t, a.unorderedSets !== !1);
284
295
  }, _set: function(t) {
285
- return i("set:"), t = Array.from(t), this._array(t, u.unorderedSets !== !1);
296
+ return i("set:"), t = Array.from(t), this._array(t, a.unorderedSets !== !1);
286
297
  }, _file: function(t) {
287
298
  return i("file:"), this.dispatch([t.name, t.size, t.type, t.lastModfied]);
288
299
  }, _blob: function() {
289
- if (u.ignoreUnknown) return i("[blob]");
300
+ if (a.ignoreUnknown) return i("[blob]");
290
301
  throw Error(`Hashing Blob objects is currently not supported
291
302
  (see https://github.com/puleos/object-hash/issues/26)
292
303
  Use "options.replacer" or "options.ignoreUnknown"
@@ -332,24 +343,24 @@ Use "options.replacer" or "options.ignoreUnknown"
332
343
  } };
333
344
  }
334
345
  function C() {
335
- return { buf: "", write: function(u) {
336
- this.buf += u;
337
- }, end: function(u) {
338
- this.buf += u;
346
+ return { buf: "", write: function(a) {
347
+ this.buf += a;
348
+ }, end: function(a) {
349
+ this.buf += a;
339
350
  }, read: function() {
340
351
  return this.buf;
341
352
  } };
342
353
  }
343
- m.writeToStream = function(u, d, r) {
344
- return r === void 0 && (r = d, d = {}), v(d = E(u, d), r).dispatch(u);
354
+ m.writeToStream = function(a, d, r) {
355
+ return r === void 0 && (r = d, d = {}), v(d = I(a, d), r).dispatch(a);
345
356
  };
346
- }).call(this, a("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, a("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/fake_9a5aa49d.js", "/");
347
- }, { buffer: 3, crypto: 5, lYpoI2: 11 }], 2: [function(a, p, m) {
357
+ }).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/fake_9a5aa49d.js", "/");
358
+ }, { buffer: 3, crypto: 5, lYpoI2: 11 }], 2: [function(u, p, m) {
348
359
  (function(b, j, P, U, R, D, N, F, T) {
349
360
  (function(_) {
350
- var S = typeof Uint8Array < "u" ? Uint8Array : Array, c = 43, w = 47, E = 48, I = 97, v = 65, C = 45, u = 95;
361
+ var S = typeof Uint8Array < "u" ? Uint8Array : Array, c = 43, w = 47, I = 48, E = 97, v = 65, C = 45, a = 95;
351
362
  function d(r) {
352
- return r = r.charCodeAt(0), r === c || r === C ? 62 : r === w || r === u ? 63 : r < E ? -1 : r < E + 10 ? r - E + 26 + 26 : r < v + 26 ? r - v : r < I + 26 ? r - I + 26 : void 0;
363
+ return r = r.charCodeAt(0), r === c || r === C ? 62 : r === w || r === a ? 63 : r < I ? -1 : r < I + 10 ? r - I + 26 + 26 : r < v + 26 ? r - v : r < E + 26 ? r - E + 26 : void 0;
353
364
  }
354
365
  _.toByteArray = function(r) {
355
366
  var i, t;
@@ -376,10 +387,10 @@ Use "options.replacer" or "options.ignoreUnknown"
376
387
  return L;
377
388
  };
378
389
  })(m === void 0 ? this.base64js = {} : m);
379
- }).call(this, a("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, a("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js", "/node_modules/gulp-browserify/node_modules/base64-js/lib");
380
- }, { buffer: 3, lYpoI2: 11 }], 3: [function(a, p, m) {
390
+ }).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js", "/node_modules/gulp-browserify/node_modules/base64-js/lib");
391
+ }, { buffer: 3, lYpoI2: 11 }], 3: [function(u, p, m) {
381
392
  (function(b, j, c, U, R, D, N, F, T) {
382
- var _ = a("base64-js"), S = a("ieee754");
393
+ var _ = u("base64-js"), S = u("ieee754");
383
394
  function c(e, n, o) {
384
395
  if (!(this instanceof c)) return new c(e, n, o);
385
396
  var y, g, A, O, $ = typeof e;
@@ -402,13 +413,13 @@ Use "options.replacer" or "options.ignoreUnknown"
402
413
  return A;
403
414
  })(n), e, o, y);
404
415
  }
405
- function E(e, n, o, y) {
416
+ function I(e, n, o, y) {
406
417
  return c._charsWritten = ne((function(g) {
407
418
  for (var A, O, $ = [], H = 0; H < g.length; H++) O = g.charCodeAt(H), A = O >> 8, O = O % 256, $.push(O), $.push(A);
408
419
  return $;
409
420
  })(n), e, o, y);
410
421
  }
411
- function I(e, n, o) {
422
+ function E(e, n, o) {
412
423
  var y = "";
413
424
  o = Math.min(e.length, o);
414
425
  for (var g = n; g < o; g++) y += String.fromCharCode(e[g]);
@@ -424,7 +435,7 @@ Use "options.replacer" or "options.ignoreUnknown"
424
435
  var g, A = e.length;
425
436
  if (!(A <= n)) return o ? (n + 2 < A && (g = e[n + 2] << 16), n + 1 < A && (g |= e[n + 1] << 8), g |= e[n], n + 3 < A && (g += e[n + 3] << 24 >>> 0)) : (n + 1 < A && (g = e[n + 1] << 16), n + 2 < A && (g |= e[n + 2] << 8), n + 3 < A && (g |= e[n + 3]), g += e[n] << 24 >>> 0), g;
426
437
  }
427
- function u(e, n, o, y) {
438
+ function a(e, n, o, y) {
428
439
  if (y || (x(typeof o == "boolean", "missing or invalid endian"), x(n != null, "missing offset"), x(n + 1 < e.length, "Trying to read beyond buffer length")), !(e.length <= n)) return y = v(e, n, o, !0), 32768 & y ? -1 * (65535 - y + 1) : y;
429
440
  }
430
441
  function d(e, n, o, y) {
@@ -449,10 +460,10 @@ Use "options.replacer" or "options.ignoreUnknown"
449
460
  g || (x(n != null, "missing value"), x(typeof y == "boolean", "missing or invalid endian"), x(o != null, "missing offset"), x(o + 3 < e.length, "Trying to write beyond buffer length"), le(n, 2147483647, -2147483648)), e.length <= o || f(e, 0 <= n ? n : 4294967295 + n + 1, o, y, g);
450
461
  }
451
462
  function L(e, n, o, y, g) {
452
- g || (x(n != null, "missing value"), x(typeof y == "boolean", "missing or invalid endian"), x(o != null, "missing offset"), x(o + 3 < e.length, "Trying to write beyond buffer length"), we(n, 34028234663852886e22, -34028234663852886e22)), e.length <= o || S.write(e, n, o, y, 23, 4);
463
+ g || (x(n != null, "missing value"), x(typeof y == "boolean", "missing or invalid endian"), x(o != null, "missing offset"), x(o + 3 < e.length, "Trying to write beyond buffer length"), ve(n, 34028234663852886e22, -34028234663852886e22)), e.length <= o || S.write(e, n, o, y, 23, 4);
453
464
  }
454
465
  function k(e, n, o, y, g) {
455
- g || (x(n != null, "missing value"), x(typeof y == "boolean", "missing or invalid endian"), x(o != null, "missing offset"), x(o + 7 < e.length, "Trying to write beyond buffer length"), we(n, 17976931348623157e292, -17976931348623157e292)), e.length <= o || S.write(e, n, o, y, 52, 8);
466
+ g || (x(n != null, "missing value"), x(typeof y == "boolean", "missing or invalid endian"), x(o != null, "missing offset"), x(o + 7 < e.length, "Trying to write beyond buffer length"), ve(n, 17976931348623157e292, -17976931348623157e292)), e.length <= o || S.write(e, n, o, y, 52, 8);
456
467
  }
457
468
  m.Buffer = c, m.SlowBuffer = c, m.INSPECT_MAX_BYTES = 50, c.poolSize = 8192, c._useTypedArrays = (function() {
458
469
  try {
@@ -498,7 +509,7 @@ Use "options.replacer" or "options.ignoreUnknown"
498
509
  o = e.length;
499
510
  break;
500
511
  case "base64":
501
- o = me(e).length;
512
+ o = be(e).length;
502
513
  break;
503
514
  case "ucs2":
504
515
  case "ucs-2":
@@ -530,8 +541,8 @@ list should be an Array.`), e.length === 0) return new c(0);
530
541
  var V = Q.length - X;
531
542
  (!G || V < (G = Number(G))) && (G = V), x((V = K.length) % 2 == 0, "Invalid hex string"), V / 2 < G && (G = V / 2);
532
543
  for (var ee = 0; ee < G; ee++) {
533
- var ve = parseInt(K.substr(2 * ee, 2), 16);
534
- x(!isNaN(ve), "Invalid hex string"), Q[X + ee] = ve;
544
+ var _e = parseInt(K.substr(2 * ee, 2), 16);
545
+ x(!isNaN(_e), "Invalid hex string"), Q[X + ee] = _e;
535
546
  }
536
547
  return c._charsWritten = 2 * ee, ee;
537
548
  })(this, e, n, o);
@@ -545,13 +556,13 @@ list should be an Array.`), e.length === 0) return new c(0);
545
556
  g = w(this, e, n, o);
546
557
  break;
547
558
  case "base64":
548
- A = this, O = n, $ = o, g = c._charsWritten = ne(me(e), A, O, $);
559
+ A = this, O = n, $ = o, g = c._charsWritten = ne(be(e), A, O, $);
549
560
  break;
550
561
  case "ucs2":
551
562
  case "ucs-2":
552
563
  case "utf16le":
553
564
  case "utf-16le":
554
- g = E(this, e, n, o);
565
+ g = I(this, e, n, o);
555
566
  break;
556
567
  default:
557
568
  throw new Error("Unknown encoding");
@@ -574,13 +585,13 @@ list should be an Array.`), e.length === 0) return new c(0);
574
585
  y = (function(H, Q, K) {
575
586
  var X = "", G = "";
576
587
  K = Math.min(H.length, K);
577
- for (var V = Q; V < K; V++) H[V] <= 127 ? (X += be(G) + String.fromCharCode(H[V]), G = "") : G += "%" + H[V].toString(16);
578
- return X + be(G);
588
+ for (var V = Q; V < K; V++) H[V] <= 127 ? (X += we(G) + String.fromCharCode(H[V]), G = "") : G += "%" + H[V].toString(16);
589
+ return X + we(G);
579
590
  })($, n, o);
580
591
  break;
581
592
  case "ascii":
582
593
  case "binary":
583
- y = I($, n, o);
594
+ y = E($, n, o);
584
595
  break;
585
596
  case "base64":
586
597
  g = $, O = o, y = (A = n) === 0 && O === g.length ? _.fromByteArray(g) : _.fromByteArray(g.slice(A, O));
@@ -629,9 +640,9 @@ list should be an Array.`), e.length === 0) return new c(0);
629
640
  }, c.prototype.readInt8 = function(e, n) {
630
641
  if (n || (x(e != null, "missing offset"), x(e < this.length, "Trying to read beyond buffer length")), !(e >= this.length)) return 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e];
631
642
  }, c.prototype.readInt16LE = function(e, n) {
632
- return u(this, e, !0, n);
643
+ return a(this, e, !0, n);
633
644
  }, c.prototype.readInt16BE = function(e, n) {
634
- return u(this, e, !1, n);
645
+ return a(this, e, !1, n);
635
646
  }, c.prototype.readInt32LE = function(e, n) {
636
647
  return d(this, e, !0, n);
637
648
  }, c.prototype.readInt32BE = function(e, n) {
@@ -712,14 +723,14 @@ list should be an Array.`), e.length === 0) return new c(0);
712
723
  }
713
724
  return n;
714
725
  }
715
- function me(e) {
726
+ function be(e) {
716
727
  return _.toByteArray(e);
717
728
  }
718
729
  function ne(e, n, o, y) {
719
730
  for (var g = 0; g < y && !(g + o >= n.length || g >= e.length); g++) n[g + o] = e[g];
720
731
  return g;
721
732
  }
722
- function be(e) {
733
+ function we(e) {
723
734
  try {
724
735
  return decodeURIComponent(e);
725
736
  } catch {
@@ -732,7 +743,7 @@ list should be an Array.`), e.length === 0) return new c(0);
732
743
  function le(e, n, o) {
733
744
  x(typeof e == "number", "cannot write a non-number as a number"), x(e <= n, "value larger than maximum allowed value"), x(o <= e, "value smaller than minimum allowed value"), x(Math.floor(e) === e, "value has a fractional component");
734
745
  }
735
- function we(e, n, o) {
746
+ function ve(e, n, o) {
736
747
  x(typeof e == "number", "cannot write a non-number as a number"), x(e <= n, "value larger than maximum allowed value"), x(o <= e, "value smaller than minimum allowed value");
737
748
  }
738
749
  function x(e, n) {
@@ -741,36 +752,36 @@ list should be an Array.`), e.length === 0) return new c(0);
741
752
  c._augment = function(e) {
742
753
  return e._isBuffer = !0, e._get = e.get, e._set = e.set, e.get = B.get, e.set = B.set, e.write = B.write, e.toString = B.toString, e.toLocaleString = B.toString, e.toJSON = B.toJSON, e.copy = B.copy, e.slice = B.slice, e.readUInt8 = B.readUInt8, e.readUInt16LE = B.readUInt16LE, e.readUInt16BE = B.readUInt16BE, e.readUInt32LE = B.readUInt32LE, e.readUInt32BE = B.readUInt32BE, e.readInt8 = B.readInt8, e.readInt16LE = B.readInt16LE, e.readInt16BE = B.readInt16BE, e.readInt32LE = B.readInt32LE, e.readInt32BE = B.readInt32BE, e.readFloatLE = B.readFloatLE, e.readFloatBE = B.readFloatBE, e.readDoubleLE = B.readDoubleLE, e.readDoubleBE = B.readDoubleBE, e.writeUInt8 = B.writeUInt8, e.writeUInt16LE = B.writeUInt16LE, e.writeUInt16BE = B.writeUInt16BE, e.writeUInt32LE = B.writeUInt32LE, e.writeUInt32BE = B.writeUInt32BE, e.writeInt8 = B.writeInt8, e.writeInt16LE = B.writeInt16LE, e.writeInt16BE = B.writeInt16BE, e.writeInt32LE = B.writeInt32LE, e.writeInt32BE = B.writeInt32BE, e.writeFloatLE = B.writeFloatLE, e.writeFloatBE = B.writeFloatBE, e.writeDoubleLE = B.writeDoubleLE, e.writeDoubleBE = B.writeDoubleBE, e.fill = B.fill, e.inspect = B.inspect, e.toArrayBuffer = B.toArrayBuffer, e;
743
754
  };
744
- }).call(this, a("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, a("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/buffer/index.js", "/node_modules/gulp-browserify/node_modules/buffer");
745
- }, { "base64-js": 2, buffer: 3, ieee754: 10, lYpoI2: 11 }], 4: [function(a, p, m) {
755
+ }).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/buffer/index.js", "/node_modules/gulp-browserify/node_modules/buffer");
756
+ }, { "base64-js": 2, buffer: 3, ieee754: 10, lYpoI2: 11 }], 4: [function(u, p, m) {
746
757
  (function(b, j, _, U, R, D, N, F, T) {
747
- var _ = a("buffer").Buffer, S = 4, c = new _(S);
748
- c.fill(0), p.exports = { hash: function(w, E, I, v) {
749
- for (var C = E((function(t, f) {
758
+ var _ = u("buffer").Buffer, S = 4, c = new _(S);
759
+ c.fill(0), p.exports = { hash: function(w, I, E, v) {
760
+ for (var C = I((function(t, f) {
750
761
  t.length % S != 0 && (l = t.length + (S - t.length % S), t = _.concat([t, c], l));
751
762
  for (var l, q = [], L = f ? t.readInt32BE : t.readInt32LE, k = 0; k < t.length; k += S) q.push(L.call(t, k));
752
763
  return q;
753
- })(w = _.isBuffer(w) ? w : new _(w), v), 8 * w.length), E = v, u = new _(I), d = E ? u.writeInt32BE : u.writeInt32LE, r = 0; r < C.length; r++) d.call(u, C[r], 4 * r, !0);
754
- return u;
764
+ })(w = _.isBuffer(w) ? w : new _(w), v), 8 * w.length), I = v, a = new _(E), d = I ? a.writeInt32BE : a.writeInt32LE, r = 0; r < C.length; r++) d.call(a, C[r], 4 * r, !0);
765
+ return a;
755
766
  } };
756
- }).call(this, a("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, a("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
757
- }, { buffer: 3, lYpoI2: 11 }], 5: [function(a, p, m) {
767
+ }).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
768
+ }, { buffer: 3, lYpoI2: 11 }], 5: [function(u, p, m) {
758
769
  (function(b, j, _, U, R, D, N, F, T) {
759
- var _ = a("buffer").Buffer, S = a("./sha"), c = a("./sha256"), w = a("./rng"), E = { sha1: S, sha256: c, md5: a("./md5") }, I = 64, v = new _(I);
770
+ var _ = u("buffer").Buffer, S = u("./sha"), c = u("./sha256"), w = u("./rng"), I = { sha1: S, sha256: c, md5: u("./md5") }, E = 64, v = new _(E);
760
771
  function C(t, f) {
761
- var l = E[t = t || "sha1"], q = [];
762
- return l || u("algorithm:", t, "is not yet supported"), { update: function(L) {
772
+ var l = I[t = t || "sha1"], q = [];
773
+ return l || a("algorithm:", t, "is not yet supported"), { update: function(L) {
763
774
  return _.isBuffer(L) || (L = new _(L)), q.push(L), L.length, this;
764
775
  }, digest: function(L) {
765
776
  var k = _.concat(q), k = f ? (function(B, Y, J) {
766
- _.isBuffer(Y) || (Y = new _(Y)), _.isBuffer(J) || (J = new _(J)), Y.length > I ? Y = B(Y) : Y.length < I && (Y = _.concat([Y, v], I));
767
- for (var z = new _(I), M = new _(I), Z = 0; Z < I; Z++) z[Z] = 54 ^ Y[Z], M[Z] = 92 ^ Y[Z];
777
+ _.isBuffer(Y) || (Y = new _(Y)), _.isBuffer(J) || (J = new _(J)), Y.length > E ? Y = B(Y) : Y.length < E && (Y = _.concat([Y, v], E));
778
+ for (var z = new _(E), M = new _(E), Z = 0; Z < E; Z++) z[Z] = 54 ^ Y[Z], M[Z] = 92 ^ Y[Z];
768
779
  return J = B(_.concat([z, J])), B(_.concat([M, J]));
769
780
  })(l, f, k) : l(k);
770
781
  return q = null, L ? k.toString(L) : k;
771
782
  } };
772
783
  }
773
- function u() {
784
+ function a() {
774
785
  var t = [].slice.call(arguments).join(" ");
775
786
  throw new Error([t, "we accept pull requests", "http://github.com/dominictarr/crypto-browserify"].join(`
776
787
  `));
@@ -787,155 +798,155 @@ list should be an Array.`), e.length === 0) return new c(0);
787
798
  };
788
799
  var d, r = ["createCredentials", "createCipher", "createCipheriv", "createDecipher", "createDecipheriv", "createSign", "createVerify", "createDiffieHellman", "pbkdf2"], i = function(t) {
789
800
  m[t] = function() {
790
- u("sorry,", t, "is not implemented yet");
801
+ a("sorry,", t, "is not implemented yet");
791
802
  };
792
803
  };
793
804
  for (d in r) i(r[d]);
794
- }).call(this, a("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, a("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
795
- }, { "./md5": 6, "./rng": 7, "./sha": 8, "./sha256": 9, buffer: 3, lYpoI2: 11 }], 6: [function(a, p, m) {
805
+ }).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
806
+ }, { "./md5": 6, "./rng": 7, "./sha": 8, "./sha256": 9, buffer: 3, lYpoI2: 11 }], 6: [function(u, p, m) {
796
807
  (function(b, j, P, U, R, D, N, F, T) {
797
- var _ = a("./helpers");
798
- function S(u, d) {
799
- u[d >> 5] |= 128 << d % 32, u[14 + (d + 64 >>> 9 << 4)] = d;
800
- for (var r = 1732584193, i = -271733879, t = -1732584194, f = 271733878, l = 0; l < u.length; l += 16) {
801
- var q = r, L = i, k = t, B = f, r = w(r, i, t, f, u[l + 0], 7, -680876936), f = w(f, r, i, t, u[l + 1], 12, -389564586), t = w(t, f, r, i, u[l + 2], 17, 606105819), i = w(i, t, f, r, u[l + 3], 22, -1044525330);
802
- r = w(r, i, t, f, u[l + 4], 7, -176418897), f = w(f, r, i, t, u[l + 5], 12, 1200080426), t = w(t, f, r, i, u[l + 6], 17, -1473231341), i = w(i, t, f, r, u[l + 7], 22, -45705983), r = w(r, i, t, f, u[l + 8], 7, 1770035416), f = w(f, r, i, t, u[l + 9], 12, -1958414417), t = w(t, f, r, i, u[l + 10], 17, -42063), i = w(i, t, f, r, u[l + 11], 22, -1990404162), r = w(r, i, t, f, u[l + 12], 7, 1804603682), f = w(f, r, i, t, u[l + 13], 12, -40341101), t = w(t, f, r, i, u[l + 14], 17, -1502002290), r = E(r, i = w(i, t, f, r, u[l + 15], 22, 1236535329), t, f, u[l + 1], 5, -165796510), f = E(f, r, i, t, u[l + 6], 9, -1069501632), t = E(t, f, r, i, u[l + 11], 14, 643717713), i = E(i, t, f, r, u[l + 0], 20, -373897302), r = E(r, i, t, f, u[l + 5], 5, -701558691), f = E(f, r, i, t, u[l + 10], 9, 38016083), t = E(t, f, r, i, u[l + 15], 14, -660478335), i = E(i, t, f, r, u[l + 4], 20, -405537848), r = E(r, i, t, f, u[l + 9], 5, 568446438), f = E(f, r, i, t, u[l + 14], 9, -1019803690), t = E(t, f, r, i, u[l + 3], 14, -187363961), i = E(i, t, f, r, u[l + 8], 20, 1163531501), r = E(r, i, t, f, u[l + 13], 5, -1444681467), f = E(f, r, i, t, u[l + 2], 9, -51403784), t = E(t, f, r, i, u[l + 7], 14, 1735328473), r = I(r, i = E(i, t, f, r, u[l + 12], 20, -1926607734), t, f, u[l + 5], 4, -378558), f = I(f, r, i, t, u[l + 8], 11, -2022574463), t = I(t, f, r, i, u[l + 11], 16, 1839030562), i = I(i, t, f, r, u[l + 14], 23, -35309556), r = I(r, i, t, f, u[l + 1], 4, -1530992060), f = I(f, r, i, t, u[l + 4], 11, 1272893353), t = I(t, f, r, i, u[l + 7], 16, -155497632), i = I(i, t, f, r, u[l + 10], 23, -1094730640), r = I(r, i, t, f, u[l + 13], 4, 681279174), f = I(f, r, i, t, u[l + 0], 11, -358537222), t = I(t, f, r, i, u[l + 3], 16, -722521979), i = I(i, t, f, r, u[l + 6], 23, 76029189), r = I(r, i, t, f, u[l + 9], 4, -640364487), f = I(f, r, i, t, u[l + 12], 11, -421815835), t = I(t, f, r, i, u[l + 15], 16, 530742520), r = v(r, i = I(i, t, f, r, u[l + 2], 23, -995338651), t, f, u[l + 0], 6, -198630844), f = v(f, r, i, t, u[l + 7], 10, 1126891415), t = v(t, f, r, i, u[l + 14], 15, -1416354905), i = v(i, t, f, r, u[l + 5], 21, -57434055), r = v(r, i, t, f, u[l + 12], 6, 1700485571), f = v(f, r, i, t, u[l + 3], 10, -1894986606), t = v(t, f, r, i, u[l + 10], 15, -1051523), i = v(i, t, f, r, u[l + 1], 21, -2054922799), r = v(r, i, t, f, u[l + 8], 6, 1873313359), f = v(f, r, i, t, u[l + 15], 10, -30611744), t = v(t, f, r, i, u[l + 6], 15, -1560198380), i = v(i, t, f, r, u[l + 13], 21, 1309151649), r = v(r, i, t, f, u[l + 4], 6, -145523070), f = v(f, r, i, t, u[l + 11], 10, -1120210379), t = v(t, f, r, i, u[l + 2], 15, 718787259), i = v(i, t, f, r, u[l + 9], 21, -343485551), r = C(r, q), i = C(i, L), t = C(t, k), f = C(f, B);
808
+ var _ = u("./helpers");
809
+ function S(a, d) {
810
+ a[d >> 5] |= 128 << d % 32, a[14 + (d + 64 >>> 9 << 4)] = d;
811
+ for (var r = 1732584193, i = -271733879, t = -1732584194, f = 271733878, l = 0; l < a.length; l += 16) {
812
+ var q = r, L = i, k = t, B = f, r = w(r, i, t, f, a[l + 0], 7, -680876936), f = w(f, r, i, t, a[l + 1], 12, -389564586), t = w(t, f, r, i, a[l + 2], 17, 606105819), i = w(i, t, f, r, a[l + 3], 22, -1044525330);
813
+ r = w(r, i, t, f, a[l + 4], 7, -176418897), f = w(f, r, i, t, a[l + 5], 12, 1200080426), t = w(t, f, r, i, a[l + 6], 17, -1473231341), i = w(i, t, f, r, a[l + 7], 22, -45705983), r = w(r, i, t, f, a[l + 8], 7, 1770035416), f = w(f, r, i, t, a[l + 9], 12, -1958414417), t = w(t, f, r, i, a[l + 10], 17, -42063), i = w(i, t, f, r, a[l + 11], 22, -1990404162), r = w(r, i, t, f, a[l + 12], 7, 1804603682), f = w(f, r, i, t, a[l + 13], 12, -40341101), t = w(t, f, r, i, a[l + 14], 17, -1502002290), r = I(r, i = w(i, t, f, r, a[l + 15], 22, 1236535329), t, f, a[l + 1], 5, -165796510), f = I(f, r, i, t, a[l + 6], 9, -1069501632), t = I(t, f, r, i, a[l + 11], 14, 643717713), i = I(i, t, f, r, a[l + 0], 20, -373897302), r = I(r, i, t, f, a[l + 5], 5, -701558691), f = I(f, r, i, t, a[l + 10], 9, 38016083), t = I(t, f, r, i, a[l + 15], 14, -660478335), i = I(i, t, f, r, a[l + 4], 20, -405537848), r = I(r, i, t, f, a[l + 9], 5, 568446438), f = I(f, r, i, t, a[l + 14], 9, -1019803690), t = I(t, f, r, i, a[l + 3], 14, -187363961), i = I(i, t, f, r, a[l + 8], 20, 1163531501), r = I(r, i, t, f, a[l + 13], 5, -1444681467), f = I(f, r, i, t, a[l + 2], 9, -51403784), t = I(t, f, r, i, a[l + 7], 14, 1735328473), r = E(r, i = I(i, t, f, r, a[l + 12], 20, -1926607734), t, f, a[l + 5], 4, -378558), f = E(f, r, i, t, a[l + 8], 11, -2022574463), t = E(t, f, r, i, a[l + 11], 16, 1839030562), i = E(i, t, f, r, a[l + 14], 23, -35309556), r = E(r, i, t, f, a[l + 1], 4, -1530992060), f = E(f, r, i, t, a[l + 4], 11, 1272893353), t = E(t, f, r, i, a[l + 7], 16, -155497632), i = E(i, t, f, r, a[l + 10], 23, -1094730640), r = E(r, i, t, f, a[l + 13], 4, 681279174), f = E(f, r, i, t, a[l + 0], 11, -358537222), t = E(t, f, r, i, a[l + 3], 16, -722521979), i = E(i, t, f, r, a[l + 6], 23, 76029189), r = E(r, i, t, f, a[l + 9], 4, -640364487), f = E(f, r, i, t, a[l + 12], 11, -421815835), t = E(t, f, r, i, a[l + 15], 16, 530742520), r = v(r, i = E(i, t, f, r, a[l + 2], 23, -995338651), t, f, a[l + 0], 6, -198630844), f = v(f, r, i, t, a[l + 7], 10, 1126891415), t = v(t, f, r, i, a[l + 14], 15, -1416354905), i = v(i, t, f, r, a[l + 5], 21, -57434055), r = v(r, i, t, f, a[l + 12], 6, 1700485571), f = v(f, r, i, t, a[l + 3], 10, -1894986606), t = v(t, f, r, i, a[l + 10], 15, -1051523), i = v(i, t, f, r, a[l + 1], 21, -2054922799), r = v(r, i, t, f, a[l + 8], 6, 1873313359), f = v(f, r, i, t, a[l + 15], 10, -30611744), t = v(t, f, r, i, a[l + 6], 15, -1560198380), i = v(i, t, f, r, a[l + 13], 21, 1309151649), r = v(r, i, t, f, a[l + 4], 6, -145523070), f = v(f, r, i, t, a[l + 11], 10, -1120210379), t = v(t, f, r, i, a[l + 2], 15, 718787259), i = v(i, t, f, r, a[l + 9], 21, -343485551), r = C(r, q), i = C(i, L), t = C(t, k), f = C(f, B);
803
814
  }
804
815
  return Array(r, i, t, f);
805
816
  }
806
- function c(u, d, r, i, t, f) {
807
- return C((d = C(C(d, u), C(i, f))) << t | d >>> 32 - t, r);
817
+ function c(a, d, r, i, t, f) {
818
+ return C((d = C(C(d, a), C(i, f))) << t | d >>> 32 - t, r);
808
819
  }
809
- function w(u, d, r, i, t, f, l) {
810
- return c(d & r | ~d & i, u, d, t, f, l);
820
+ function w(a, d, r, i, t, f, l) {
821
+ return c(d & r | ~d & i, a, d, t, f, l);
811
822
  }
812
- function E(u, d, r, i, t, f, l) {
813
- return c(d & i | r & ~i, u, d, t, f, l);
823
+ function I(a, d, r, i, t, f, l) {
824
+ return c(d & i | r & ~i, a, d, t, f, l);
814
825
  }
815
- function I(u, d, r, i, t, f, l) {
816
- return c(d ^ r ^ i, u, d, t, f, l);
826
+ function E(a, d, r, i, t, f, l) {
827
+ return c(d ^ r ^ i, a, d, t, f, l);
817
828
  }
818
- function v(u, d, r, i, t, f, l) {
819
- return c(r ^ (d | ~i), u, d, t, f, l);
829
+ function v(a, d, r, i, t, f, l) {
830
+ return c(r ^ (d | ~i), a, d, t, f, l);
820
831
  }
821
- function C(u, d) {
822
- var r = (65535 & u) + (65535 & d);
823
- return (u >> 16) + (d >> 16) + (r >> 16) << 16 | 65535 & r;
832
+ function C(a, d) {
833
+ var r = (65535 & a) + (65535 & d);
834
+ return (a >> 16) + (d >> 16) + (r >> 16) << 16 | 65535 & r;
824
835
  }
825
- p.exports = function(u) {
826
- return _.hash(u, S, 16);
836
+ p.exports = function(a) {
837
+ return _.hash(a, S, 16);
827
838
  };
828
- }).call(this, a("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, a("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
829
- }, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 7: [function(a, p, m) {
839
+ }).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
840
+ }, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 7: [function(u, p, m) {
830
841
  (function(b, j, P, U, R, D, N, F, T) {
831
842
  p.exports = function(_) {
832
843
  for (var S, c = new Array(_), w = 0; w < _; w++) (3 & w) == 0 && (S = 4294967296 * Math.random()), c[w] = S >>> ((3 & w) << 3) & 255;
833
844
  return c;
834
845
  };
835
- }).call(this, a("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, a("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
836
- }, { buffer: 3, lYpoI2: 11 }], 8: [function(a, p, m) {
846
+ }).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
847
+ }, { buffer: 3, lYpoI2: 11 }], 8: [function(u, p, m) {
837
848
  (function(b, j, P, U, R, D, N, F, T) {
838
- var _ = a("./helpers");
839
- function S(E, I) {
840
- E[I >> 5] |= 128 << 24 - I % 32, E[15 + (I + 64 >> 9 << 4)] = I;
841
- for (var v, C, u, d = Array(80), r = 1732584193, i = -271733879, t = -1732584194, f = 271733878, l = -1009589776, q = 0; q < E.length; q += 16) {
849
+ var _ = u("./helpers");
850
+ function S(I, E) {
851
+ I[E >> 5] |= 128 << 24 - E % 32, I[15 + (E + 64 >> 9 << 4)] = E;
852
+ for (var v, C, a, d = Array(80), r = 1732584193, i = -271733879, t = -1732584194, f = 271733878, l = -1009589776, q = 0; q < I.length; q += 16) {
842
853
  for (var L = r, k = i, B = t, Y = f, J = l, z = 0; z < 80; z++) {
843
- d[z] = z < 16 ? E[q + z] : w(d[z - 3] ^ d[z - 8] ^ d[z - 14] ^ d[z - 16], 1);
844
- var M = c(c(w(r, 5), (M = i, C = t, u = f, (v = z) < 20 ? M & C | ~M & u : !(v < 40) && v < 60 ? M & C | M & u | C & u : M ^ C ^ u)), c(c(l, d[z]), (v = z) < 20 ? 1518500249 : v < 40 ? 1859775393 : v < 60 ? -1894007588 : -899497514)), l = f, f = t, t = w(i, 30), i = r, r = M;
854
+ d[z] = z < 16 ? I[q + z] : w(d[z - 3] ^ d[z - 8] ^ d[z - 14] ^ d[z - 16], 1);
855
+ var M = c(c(w(r, 5), (M = i, C = t, a = f, (v = z) < 20 ? M & C | ~M & a : !(v < 40) && v < 60 ? M & C | M & a | C & a : M ^ C ^ a)), c(c(l, d[z]), (v = z) < 20 ? 1518500249 : v < 40 ? 1859775393 : v < 60 ? -1894007588 : -899497514)), l = f, f = t, t = w(i, 30), i = r, r = M;
845
856
  }
846
857
  r = c(r, L), i = c(i, k), t = c(t, B), f = c(f, Y), l = c(l, J);
847
858
  }
848
859
  return Array(r, i, t, f, l);
849
860
  }
850
- function c(E, I) {
851
- var v = (65535 & E) + (65535 & I);
852
- return (E >> 16) + (I >> 16) + (v >> 16) << 16 | 65535 & v;
861
+ function c(I, E) {
862
+ var v = (65535 & I) + (65535 & E);
863
+ return (I >> 16) + (E >> 16) + (v >> 16) << 16 | 65535 & v;
853
864
  }
854
- function w(E, I) {
855
- return E << I | E >>> 32 - I;
865
+ function w(I, E) {
866
+ return I << E | I >>> 32 - E;
856
867
  }
857
- p.exports = function(E) {
858
- return _.hash(E, S, 20, !0);
868
+ p.exports = function(I) {
869
+ return _.hash(I, S, 20, !0);
859
870
  };
860
- }).call(this, a("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, a("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
861
- }, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 9: [function(a, p, m) {
871
+ }).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
872
+ }, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 9: [function(u, p, m) {
862
873
  (function(b, j, P, U, R, D, N, F, T) {
863
- function _(I, v) {
864
- var C = (65535 & I) + (65535 & v);
865
- return (I >> 16) + (v >> 16) + (C >> 16) << 16 | 65535 & C;
874
+ function _(E, v) {
875
+ var C = (65535 & E) + (65535 & v);
876
+ return (E >> 16) + (v >> 16) + (C >> 16) << 16 | 65535 & C;
866
877
  }
867
- function S(I, v) {
868
- var C, u = new Array(1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298), d = new Array(1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225), r = new Array(64);
869
- I[v >> 5] |= 128 << 24 - v % 32, I[15 + (v + 64 >> 9 << 4)] = v;
870
- for (var i, t, f = 0; f < I.length; f += 16) {
871
- for (var l = d[0], q = d[1], L = d[2], k = d[3], B = d[4], Y = d[5], J = d[6], z = d[7], M = 0; M < 64; M++) r[M] = M < 16 ? I[M + f] : _(_(_((t = r[M - 2], w(t, 17) ^ w(t, 19) ^ E(t, 10)), r[M - 7]), (t = r[M - 15], w(t, 7) ^ w(t, 18) ^ E(t, 3))), r[M - 16]), C = _(_(_(_(z, w(t = B, 6) ^ w(t, 11) ^ w(t, 25)), B & Y ^ ~B & J), u[M]), r[M]), i = _(w(i = l, 2) ^ w(i, 13) ^ w(i, 22), l & q ^ l & L ^ q & L), z = J, J = Y, Y = B, B = _(k, C), k = L, L = q, q = l, l = _(C, i);
878
+ function S(E, v) {
879
+ var C, a = new Array(1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298), d = new Array(1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225), r = new Array(64);
880
+ E[v >> 5] |= 128 << 24 - v % 32, E[15 + (v + 64 >> 9 << 4)] = v;
881
+ for (var i, t, f = 0; f < E.length; f += 16) {
882
+ for (var l = d[0], q = d[1], L = d[2], k = d[3], B = d[4], Y = d[5], J = d[6], z = d[7], M = 0; M < 64; M++) r[M] = M < 16 ? E[M + f] : _(_(_((t = r[M - 2], w(t, 17) ^ w(t, 19) ^ I(t, 10)), r[M - 7]), (t = r[M - 15], w(t, 7) ^ w(t, 18) ^ I(t, 3))), r[M - 16]), C = _(_(_(_(z, w(t = B, 6) ^ w(t, 11) ^ w(t, 25)), B & Y ^ ~B & J), a[M]), r[M]), i = _(w(i = l, 2) ^ w(i, 13) ^ w(i, 22), l & q ^ l & L ^ q & L), z = J, J = Y, Y = B, B = _(k, C), k = L, L = q, q = l, l = _(C, i);
872
883
  d[0] = _(l, d[0]), d[1] = _(q, d[1]), d[2] = _(L, d[2]), d[3] = _(k, d[3]), d[4] = _(B, d[4]), d[5] = _(Y, d[5]), d[6] = _(J, d[6]), d[7] = _(z, d[7]);
873
884
  }
874
885
  return d;
875
886
  }
876
- var c = a("./helpers"), w = function(I, v) {
877
- return I >>> v | I << 32 - v;
878
- }, E = function(I, v) {
879
- return I >>> v;
887
+ var c = u("./helpers"), w = function(E, v) {
888
+ return E >>> v | E << 32 - v;
889
+ }, I = function(E, v) {
890
+ return E >>> v;
880
891
  };
881
- p.exports = function(I) {
882
- return c.hash(I, S, 32, !0);
892
+ p.exports = function(E) {
893
+ return c.hash(E, S, 32, !0);
883
894
  };
884
- }).call(this, a("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, a("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
885
- }, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 10: [function(a, p, m) {
895
+ }).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
896
+ }, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 10: [function(u, p, m) {
886
897
  (function(b, j, P, U, R, D, N, F, T) {
887
898
  m.read = function(_, S, c, w, f) {
888
- var I, v, C = 8 * f - w - 1, u = (1 << C) - 1, d = u >> 1, r = -7, i = c ? f - 1 : 0, t = c ? -1 : 1, f = _[S + i];
889
- for (i += t, I = f & (1 << -r) - 1, f >>= -r, r += C; 0 < r; I = 256 * I + _[S + i], i += t, r -= 8) ;
890
- for (v = I & (1 << -r) - 1, I >>= -r, r += w; 0 < r; v = 256 * v + _[S + i], i += t, r -= 8) ;
891
- if (I === 0) I = 1 - d;
899
+ var E, v, C = 8 * f - w - 1, a = (1 << C) - 1, d = a >> 1, r = -7, i = c ? f - 1 : 0, t = c ? -1 : 1, f = _[S + i];
900
+ for (i += t, E = f & (1 << -r) - 1, f >>= -r, r += C; 0 < r; E = 256 * E + _[S + i], i += t, r -= 8) ;
901
+ for (v = E & (1 << -r) - 1, E >>= -r, r += w; 0 < r; v = 256 * v + _[S + i], i += t, r -= 8) ;
902
+ if (E === 0) E = 1 - d;
892
903
  else {
893
- if (I === u) return v ? NaN : 1 / 0 * (f ? -1 : 1);
894
- v += Math.pow(2, w), I -= d;
904
+ if (E === a) return v ? NaN : 1 / 0 * (f ? -1 : 1);
905
+ v += Math.pow(2, w), E -= d;
895
906
  }
896
- return (f ? -1 : 1) * v * Math.pow(2, I - w);
897
- }, m.write = function(_, S, c, w, E, l) {
898
- var v, C, u = 8 * l - E - 1, d = (1 << u) - 1, r = d >> 1, i = E === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, t = w ? 0 : l - 1, f = w ? 1 : -1, l = S < 0 || S === 0 && 1 / S < 0 ? 1 : 0;
899
- for (S = Math.abs(S), isNaN(S) || S === 1 / 0 ? (C = isNaN(S) ? 1 : 0, v = d) : (v = Math.floor(Math.log(S) / Math.LN2), S * (w = Math.pow(2, -v)) < 1 && (v--, w *= 2), 2 <= (S += 1 <= v + r ? i / w : i * Math.pow(2, 1 - r)) * w && (v++, w /= 2), d <= v + r ? (C = 0, v = d) : 1 <= v + r ? (C = (S * w - 1) * Math.pow(2, E), v += r) : (C = S * Math.pow(2, r - 1) * Math.pow(2, E), v = 0)); 8 <= E; _[c + t] = 255 & C, t += f, C /= 256, E -= 8) ;
900
- for (v = v << E | C, u += E; 0 < u; _[c + t] = 255 & v, t += f, v /= 256, u -= 8) ;
907
+ return (f ? -1 : 1) * v * Math.pow(2, E - w);
908
+ }, m.write = function(_, S, c, w, I, l) {
909
+ var v, C, a = 8 * l - I - 1, d = (1 << a) - 1, r = d >> 1, i = I === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, t = w ? 0 : l - 1, f = w ? 1 : -1, l = S < 0 || S === 0 && 1 / S < 0 ? 1 : 0;
910
+ for (S = Math.abs(S), isNaN(S) || S === 1 / 0 ? (C = isNaN(S) ? 1 : 0, v = d) : (v = Math.floor(Math.log(S) / Math.LN2), S * (w = Math.pow(2, -v)) < 1 && (v--, w *= 2), 2 <= (S += 1 <= v + r ? i / w : i * Math.pow(2, 1 - r)) * w && (v++, w /= 2), d <= v + r ? (C = 0, v = d) : 1 <= v + r ? (C = (S * w - 1) * Math.pow(2, I), v += r) : (C = S * Math.pow(2, r - 1) * Math.pow(2, I), v = 0)); 8 <= I; _[c + t] = 255 & C, t += f, C /= 256, I -= 8) ;
911
+ for (v = v << I | C, a += I; 0 < a; _[c + t] = 255 & v, t += f, v /= 256, a -= 8) ;
901
912
  _[c + t - f] |= 128 * l;
902
913
  };
903
- }).call(this, a("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, a("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/ieee754/index.js", "/node_modules/gulp-browserify/node_modules/ieee754");
904
- }, { buffer: 3, lYpoI2: 11 }], 11: [function(a, p, m) {
914
+ }).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/ieee754/index.js", "/node_modules/gulp-browserify/node_modules/ieee754");
915
+ }, { buffer: 3, lYpoI2: 11 }], 11: [function(u, p, m) {
905
916
  (function(b, j, P, U, R, D, N, F, T) {
906
917
  var _, S, c;
907
918
  function w() {
908
919
  }
909
- (b = p.exports = {}).nextTick = (S = typeof window < "u" && window.setImmediate, c = typeof window < "u" && window.postMessage && window.addEventListener, S ? function(E) {
910
- return window.setImmediate(E);
911
- } : c ? (_ = [], window.addEventListener("message", function(E) {
912
- var I = E.source;
913
- I !== window && I !== null || E.data !== "process-tick" || (E.stopPropagation(), 0 < _.length && _.shift()());
914
- }, !0), function(E) {
915
- _.push(E), window.postMessage("process-tick", "*");
916
- }) : function(E) {
917
- setTimeout(E, 0);
918
- }), b.title = "browser", b.browser = !0, b.env = {}, b.argv = [], b.on = w, b.addListener = w, b.once = w, b.off = w, b.removeListener = w, b.removeAllListeners = w, b.emit = w, b.binding = function(E) {
920
+ (b = p.exports = {}).nextTick = (S = typeof window < "u" && window.setImmediate, c = typeof window < "u" && window.postMessage && window.addEventListener, S ? function(I) {
921
+ return window.setImmediate(I);
922
+ } : c ? (_ = [], window.addEventListener("message", function(I) {
923
+ var E = I.source;
924
+ E !== window && E !== null || I.data !== "process-tick" || (I.stopPropagation(), 0 < _.length && _.shift()());
925
+ }, !0), function(I) {
926
+ _.push(I), window.postMessage("process-tick", "*");
927
+ }) : function(I) {
928
+ setTimeout(I, 0);
929
+ }), b.title = "browser", b.browser = !0, b.env = {}, b.argv = [], b.on = w, b.addListener = w, b.once = w, b.off = w, b.removeListener = w, b.removeAllListeners = w, b.emit = w, b.binding = function(I) {
919
930
  throw new Error("process.binding is not supported");
920
931
  }, b.cwd = function() {
921
932
  return "/";
922
- }, b.chdir = function(E) {
933
+ }, b.chdir = function(I) {
923
934
  throw new Error("process.chdir is not supported");
924
935
  };
925
- }).call(this, a("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, a("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/process/browser.js", "/node_modules/gulp-browserify/node_modules/process");
936
+ }).call(this, u("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, u("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/process/browser.js", "/node_modules/gulp-browserify/node_modules/process");
926
937
  }, { buffer: 3, lYpoI2: 11 }] }, {}, [1])(1);
927
938
  });
928
939
  })(he)), he.exports;
929
940
  }
930
941
  var Ne = Te();
931
942
  const Me = /* @__PURE__ */ je(Ne);
932
- class ge {
943
+ class ye {
933
944
  _inferSchema;
934
945
  _inferInstance;
935
946
  data;
936
947
  instance;
937
- constructor(s, a) {
938
- this.data = s ?? {}, this.instance = a;
948
+ constructor(s, u) {
949
+ this.data = s ?? {}, this.instance = u;
939
950
  }
940
951
  clear = () => {
941
952
  Object.keys(this.data).forEach((s) => {
@@ -943,27 +954,27 @@ class ge {
943
954
  });
944
955
  };
945
956
  delete = (s) => {
946
- const a = this.data[s];
947
- return delete this.data[s], a;
957
+ const u = this.data[s];
958
+ return delete this.data[s], u;
948
959
  };
949
960
  entries = () => Object.entries(this.data);
950
961
  get = (s) => this.data[s];
951
962
  has = (s) => Object.prototype.hasOwnProperty.call(this.data, s);
952
963
  keys = () => Object.keys(this.data);
953
- set = (s, a) => {
954
- this.data[s] = a;
964
+ set = (s, u) => {
965
+ this.data[s] = u;
955
966
  };
956
967
  values = () => Object.values(this.data);
957
- commit = (s, a) => {
968
+ commit = (s, u) => {
958
969
  const p = { ...this.data };
959
- a?.forEach((b) => {
970
+ u?.forEach((b) => {
960
971
  delete p[b];
961
972
  });
962
973
  const m = Object.keys(p);
963
974
  return s != null && Object.keys(s).length === m.length && m.reduce((b, j) => b && Object.is(p[j], s[j]), !0) ? s : p;
964
975
  };
965
976
  }
966
- const Fe = (h) => h instanceof ge ? h : new ge(h);
977
+ const Fe = (h) => h instanceof ye ? h : new ye(h);
967
978
  class Se {
968
979
  _inferItem;
969
980
  _inferQuery;
@@ -978,14 +989,14 @@ class Se {
978
989
  contextPlugins = [];
979
990
  uiPlugins = [];
980
991
  constructor() {
981
- const s = [], a = [];
992
+ const s = [], u = [];
982
993
  this.extend({
983
994
  context: (p) => {
984
995
  const m = s;
985
996
  p != null && !m.includes(p) && m.push(p);
986
997
  },
987
998
  ui: (p) => {
988
- const m = a;
999
+ const m = u;
989
1000
  p != null && !m.includes(p) && m.push(p);
990
1001
  }
991
1002
  }), Object.defineProperties(this, {
@@ -996,7 +1007,7 @@ class Se {
996
1007
  configurable: !1
997
1008
  },
998
1009
  uiPlugins: {
999
- value: Object.freeze([...a]),
1010
+ value: Object.freeze([...u]),
1000
1011
  enumerable: !0,
1001
1012
  writable: !1,
1002
1013
  configurable: !1
@@ -1012,18 +1023,20 @@ class Se {
1012
1023
  normalizeResource(s) {
1013
1024
  return s;
1014
1025
  }
1015
- subscribe(s, a) {
1026
+ subscribe(s, u) {
1016
1027
  if (s == null) throw new Error("No resource name specified");
1017
- return this.notifier.subscribe(this.normalizeResource(s), a);
1028
+ return this.notifier.subscribe(this.normalizeResource(s), u);
1018
1029
  }
1019
1030
  notify(s) {
1020
- this.notifier.trigger(this.normalizeResource(s));
1031
+ this.notifier.trigger(
1032
+ s == null ? void 0 : this.normalizeResource(s)
1033
+ );
1021
1034
  }
1022
- get(s, a, p, m, b) {
1035
+ get(s, u, p, m, b) {
1023
1036
  return new Promise(
1024
1037
  (j, P) => this.continuousGet(
1025
1038
  this.normalizeResource(s),
1026
- a,
1039
+ u,
1027
1040
  p,
1028
1041
  m,
1029
1042
  (U, R, D) => {
@@ -1034,7 +1047,7 @@ class Se {
1034
1047
  R && j(
1035
1048
  D ?? this.createEmptyResponse({
1036
1049
  name: this.normalizeResource(s),
1037
- query: a,
1050
+ query: u,
1038
1051
  disabled: !1,
1039
1052
  options: p
1040
1053
  })
@@ -1044,7 +1057,7 @@ class Se {
1044
1057
  )
1045
1058
  );
1046
1059
  }
1047
- continuousGet(s, a, p, m, b, j) {
1060
+ continuousGet(s, u, p, m, b, j) {
1048
1061
  const P = j ?? new Be();
1049
1062
  new Promise((U) => {
1050
1063
  if (s == null) throw new Error("No resource name specified");
@@ -1054,7 +1067,7 @@ class Se {
1054
1067
  F,
1055
1068
  T ?? this.createEmptyResponse({
1056
1069
  name: this.normalizeResource(s),
1057
- query: a,
1070
+ query: u,
1058
1071
  disabled: !1,
1059
1072
  options: p
1060
1073
  })
@@ -1064,7 +1077,7 @@ class Se {
1064
1077
  Promise.resolve(
1065
1078
  this.handleGet(
1066
1079
  this.normalizeResource(s),
1067
- a,
1080
+ u,
1068
1081
  p,
1069
1082
  Fe(m),
1070
1083
  D
@@ -1077,27 +1090,27 @@ class Se {
1077
1090
  P.locked || b(U, !0, void 0);
1078
1091
  });
1079
1092
  }
1080
- compareRequests(s, a) {
1081
- return Oe(s, a);
1093
+ compareRequests(s, u) {
1094
+ return Oe(s, u);
1082
1095
  }
1083
1096
  createEmptyResponse(s) {
1084
1097
  }
1085
- shouldPersist(s, a, p, m) {
1086
- return p === "very" || p && a.name === s.name;
1098
+ shouldPersist(s, u, p, m) {
1099
+ return p === "very" || p && u.name === s.name;
1087
1100
  }
1088
- compareItemVersions(s, a) {
1101
+ compareItemVersions(s, u) {
1089
1102
  return !0;
1090
1103
  }
1091
1104
  getItemIdentifier(s) {
1092
1105
  return Me(s);
1093
1106
  }
1094
- transition(s, a) {
1107
+ transition(s, u) {
1095
1108
  return s.data;
1096
1109
  }
1097
- recycleItems(s, a) {
1098
- if (s.data == null || a.data == null)
1110
+ recycleItems(s, u) {
1111
+ if (s.data == null || u.data == null)
1099
1112
  return s.data;
1100
- const p = Array.isArray(s.data) ? s.data : [s.data], m = Array.isArray(a.data) ? a.data : [a.data], b = {};
1113
+ const p = Array.isArray(s.data) ? s.data : [s.data], m = Array.isArray(u.data) ? u.data : [u.data], b = {};
1101
1114
  p.length > 0 && m.forEach((P) => {
1102
1115
  const U = this.getItemIdentifier(P);
1103
1116
  U != null && (b[U] = P);
@@ -1121,8 +1134,8 @@ function ot({
1121
1134
  dataProvider: h,
1122
1135
  children: s
1123
1136
  }) {
1124
- const a = oe(() => ({ dataProvider: h }), [h]);
1125
- return /* @__PURE__ */ se(ue.Provider, { value: a, children: s });
1137
+ const u = oe(() => ({ dataProvider: h }), [h]);
1138
+ return /* @__PURE__ */ se(ue.Provider, { value: u, children: s });
1126
1139
  }
1127
1140
  function st(h) {
1128
1141
  if (typeof h != "function")
@@ -1143,10 +1156,10 @@ function st(h) {
1143
1156
  function Ye({
1144
1157
  resource: h,
1145
1158
  children: s,
1146
- ...a
1159
+ ...u
1147
1160
  }) {
1148
1161
  return h.dataProvider.uiPlugins.reduceRight(
1149
- (p, m) => (b) => /* @__PURE__ */ se(m, { ...a, context: b, children: p }),
1162
+ (p, m) => (b) => /* @__PURE__ */ se(m, { ...u, context: b, children: p }),
1150
1163
  (p) => /* @__PURE__ */ se(
1151
1164
  Pe,
1152
1165
  {
@@ -1173,26 +1186,26 @@ function Ve() {
1173
1186
  return pe($e);
1174
1187
  }
1175
1188
  const te = {};
1176
- function He(h, s, a) {
1189
+ function He(h, s, u) {
1177
1190
  let p;
1178
1191
  {
1179
1192
  const m = Date.now(), b = Ve();
1180
- Ge(te, m, b), p = We(b, te.msecs, te.nsecs, te.clockseq, te.node, s, a);
1193
+ Ge(te, m, b), p = We(b, te.msecs, te.nsecs, te.clockseq, te.node, s, u);
1181
1194
  }
1182
1195
  return s ?? ze(p);
1183
1196
  }
1184
- function Ge(h, s, a) {
1185
- return h.msecs ??= -1 / 0, h.nsecs ??= 0, s === h.msecs ? (h.nsecs++, h.nsecs >= 1e4 && (h.node = void 0, h.nsecs = 0)) : s > h.msecs ? h.nsecs = 0 : s < h.msecs && (h.node = void 0), h.node || (h.node = a.slice(10, 16), h.node[0] |= 1, h.clockseq = (a[8] << 8 | a[9]) & 16383), h.msecs = s, h;
1197
+ function Ge(h, s, u) {
1198
+ return h.msecs ??= -1 / 0, h.nsecs ??= 0, s === h.msecs ? (h.nsecs++, h.nsecs >= 1e4 && (h.node = void 0, h.nsecs = 0)) : s > h.msecs ? h.nsecs = 0 : s < h.msecs && (h.node = void 0), h.node || (h.node = u.slice(10, 16), h.node[0] |= 1, h.clockseq = (u[8] << 8 | u[9]) & 16383), h.msecs = s, h;
1186
1199
  }
1187
- function We(h, s, a, p, m, b, j = 0) {
1200
+ function We(h, s, u, p, m, b, j = 0) {
1188
1201
  if (h.length < 16)
1189
1202
  throw new Error("Random bytes length must be >= 16");
1190
1203
  if (!b)
1191
1204
  b = new Uint8Array(16), j = 0;
1192
1205
  else if (j < 0 || j + 16 > b.length)
1193
1206
  throw new RangeError(`UUID byte range ${j}:${j + 15} is out of buffer bounds`);
1194
- s ??= Date.now(), a ??= 0, p ??= (h[8] << 8 | h[9]) & 16383, m ??= h.slice(10, 16), s += 122192928e5;
1195
- const P = ((s & 268435455) * 1e4 + a) % 4294967296;
1207
+ s ??= Date.now(), u ??= 0, p ??= (h[8] << 8 | h[9]) & 16383, m ??= h.slice(10, 16), s += 122192928e5;
1208
+ const P = ((s & 268435455) * 1e4 + u) % 4294967296;
1196
1209
  b[j++] = P >>> 24 & 255, b[j++] = P >>> 16 & 255, b[j++] = P >>> 8 & 255, b[j++] = P & 255;
1197
1210
  const U = s / 4294967296 * 1e4 & 268435455;
1198
1211
  b[j++] = U >>> 8 & 255, b[j++] = U & 255, b[j++] = U >>> 24 & 15 | 16, b[j++] = U >>> 16 & 255, b[j++] = p >>> 8 | 128, b[j++] = p & 255;
@@ -1201,16 +1214,16 @@ function We(h, s, a, p, m, b, j = 0) {
1201
1214
  return b;
1202
1215
  }
1203
1216
  function re(h) {
1204
- let s, a, p;
1217
+ let s, u, p;
1205
1218
  if (typeof h != "string")
1206
- s = "~", a = 0, p = He();
1219
+ s = "~", u = 0, p = He();
1207
1220
  else {
1208
1221
  let m;
1209
- [s, m, p] = h.split("$"), a = ((parseInt(m, 36) || 0) + 1) % Number.MAX_SAFE_INTEGER, a === 0 && (s += "~");
1222
+ [s, m, p] = h.split("$"), u = ((parseInt(m, 36) || 0) + 1) % Number.MAX_SAFE_INTEGER, u === 0 && (s += "~");
1210
1223
  }
1211
- return `${s}$${a.toString(36).padStart(11, "0")}$${p}`;
1224
+ return `${s}$${u.toString(36).padStart(11, "0")}$${p}`;
1212
1225
  }
1213
- function ye(h) {
1226
+ function me(h) {
1214
1227
  return {
1215
1228
  ...h,
1216
1229
  requestInstruction: {
@@ -1226,43 +1239,43 @@ function Je(h, s) {
1226
1239
  switch (s.type) {
1227
1240
  // Creates a new request and instructs the resource to fetch data.
1228
1241
  case "next-request": {
1229
- const { requestDetails: a, persistent: p } = s, m = re(h.request), b = re(h.revision);
1242
+ const { requestDetails: u, persistent: p } = s, m = re(h.request), b = re(h.revision);
1230
1243
  let j = !1;
1231
1244
  h.persistent === "very" && p === "very" ? j = "very" : h.persistent && p && (j = !0);
1232
- const P = !a.disabled && h.dataProvider.shouldPersist(
1233
- a,
1245
+ const P = !u.disabled && h.dataProvider.shouldPersist(
1246
+ u,
1234
1247
  h.requestDetails,
1235
1248
  j,
1236
1249
  h.value
1237
1250
  );
1238
- return ye({
1251
+ return me({
1239
1252
  dataProvider: h.dataProvider,
1240
- requestDetails: a,
1253
+ requestDetails: u,
1241
1254
  request: m,
1242
1255
  revision: b,
1243
- isLoading: !a.disabled,
1256
+ isLoading: !u.disabled,
1244
1257
  value: P ? h.value : {
1245
- name: a.name,
1246
- query: a.query,
1247
- options: a.options,
1258
+ name: u.name,
1259
+ query: u.query,
1260
+ options: u.options,
1248
1261
  request: m,
1249
1262
  revision: b,
1250
1263
  data: h.dataProvider.createEmptyResponse(
1251
- a
1264
+ u
1252
1265
  ),
1253
1266
  meta: {},
1254
1267
  error: void 0,
1255
- isDisabled: !!a.disabled,
1256
- isIncomplete: !a.disabled,
1257
- isInitial: !a.disabled
1268
+ isDisabled: !!u.disabled,
1269
+ isIncomplete: !u.disabled,
1270
+ isInitial: !u.disabled
1258
1271
  },
1259
1272
  persistent: p
1260
1273
  });
1261
1274
  }
1262
1275
  // Creates a new revision for the current request and instructs the resource to fetch data.
1263
1276
  case "next-revision": {
1264
- const { notify: a } = s, p = re(h.revision);
1265
- return a({ request: h.request, revision: p }), ye({
1277
+ const { notify: u } = s, p = re(h.revision);
1278
+ return u({ request: h.request, revision: p }), me({
1266
1279
  ...h,
1267
1280
  revision: p,
1268
1281
  isLoading: !h.requestDetails.disabled
@@ -1270,16 +1283,16 @@ function Je(h, s) {
1270
1283
  }
1271
1284
  // Sets a new persistence level.
1272
1285
  case "set-persistence": {
1273
- const { persistent: a } = s;
1286
+ const { persistent: u } = s;
1274
1287
  return {
1275
1288
  ...h,
1276
- persistent: a
1289
+ persistent: u
1277
1290
  };
1278
1291
  }
1279
1292
  // Updates the current request's data.
1280
1293
  case "update-data": {
1281
- const { request: a, revision: p, value: m } = s;
1282
- return a !== h.request || p !== h.revision ? h : {
1294
+ const { request: u, revision: p, value: m } = s;
1295
+ return u !== h.request || p !== h.revision ? h : {
1283
1296
  ...h,
1284
1297
  isLoading: m.isIncomplete,
1285
1298
  value: m
@@ -1288,8 +1301,8 @@ function Je(h, s) {
1288
1301
  }
1289
1302
  return h;
1290
1303
  }
1291
- function Ke(h, s, a, p) {
1292
- const { dataProvider: m, requestDetails: b, request: j, revision: P, value: U } = h, R = new ge({ ...U.meta }, s);
1304
+ function Ke(h, s, u, p) {
1305
+ const { dataProvider: m, requestDetails: b, request: j, revision: P, value: U } = h, R = new ye({ ...U.meta }, s);
1293
1306
  let D = Promise.resolve(U);
1294
1307
  const N = (F, T, _) => {
1295
1308
  D = D.then((S) => {
@@ -1335,13 +1348,13 @@ function Ke(h, s, a, p) {
1335
1348
  b.options,
1336
1349
  R,
1337
1350
  N,
1338
- a
1351
+ u
1339
1352
  );
1340
1353
  }
1341
1354
  function Xe({
1342
1355
  dataProvider: h,
1343
1356
  name: s,
1344
- query: a,
1357
+ query: u,
1345
1358
  disabled: p,
1346
1359
  options: m,
1347
1360
  persistent: b,
@@ -1350,14 +1363,14 @@ function Xe({
1350
1363
  const P = Ue(), U = h || P.dataProvider, R = U?.normalizeResource(s) ?? s, D = oe(
1351
1364
  () => ({
1352
1365
  name: R,
1353
- query: a,
1366
+ query: u,
1354
1367
  disabled: !!p,
1355
1368
  options: m
1356
1369
  }),
1357
- [R, a, p, m]
1370
+ [R, u, p, m]
1358
1371
  ), [N, F] = qe(Je, void 0, () => {
1359
1372
  const q = re(), L = re();
1360
- return ye({
1373
+ return me({
1361
1374
  dataProvider: U,
1362
1375
  requestDetails: D,
1363
1376
  request: q,
@@ -1386,8 +1399,8 @@ function Xe({
1386
1399
  request: S,
1387
1400
  revision: c,
1388
1401
  isLoading: w,
1389
- value: E,
1390
- persistent: I,
1402
+ value: I,
1403
+ persistent: E,
1391
1404
  requestInstruction: v
1392
1405
  } = N;
1393
1406
  if (T == null)
@@ -1398,17 +1411,17 @@ function Xe({
1398
1411
  throw new Error(
1399
1412
  "Constant violation: The DataProvider provided to the useResource hook must not be replaced - Check your ConfigContext provider and the dataProvider property"
1400
1413
  );
1401
- const [C, u] = Ce();
1414
+ const [C, a] = Ce();
1402
1415
  ce(() => {
1403
1416
  const q = T.createInstance() ?? {};
1404
- return u(q), () => {
1417
+ return a(q), () => {
1405
1418
  T.releaseInstance(q);
1406
1419
  };
1407
1420
  }, [T]), _ !== D && !T.compareRequests(D, _) ? F({
1408
1421
  type: "next-request",
1409
1422
  requestDetails: D,
1410
1423
  persistent: b ?? !1
1411
- }) : I !== (b ?? !1) && F({ type: "set-persistence", persistent: b ?? !1 });
1424
+ }) : E !== (b ?? !1) && F({ type: "set-persistence", persistent: b ?? !1 });
1412
1425
  const d = Le(
1413
1426
  async () => new Promise((q) => {
1414
1427
  F({ type: "next-revision", notify: q });
@@ -1428,19 +1441,19 @@ function Xe({
1428
1441
  q.abort();
1429
1442
  };
1430
1443
  }, [C, v]);
1431
- const r = c !== E.revision, i = r ? S : E.request, t = r ? c : E.revision, f = oe(
1444
+ const r = c !== I.revision, i = r ? S : I.request, t = r ? c : I.revision, f = oe(
1432
1445
  () => ({ request: i, revision: t }),
1433
1446
  [i, t]
1434
1447
  ), l = oe(
1435
- () => ({ ...E, dataProvider: T, isLoading: w, isStale: r, next: f, notify: d }),
1436
- [E, T, w, r, f, d]
1448
+ () => ({ ...I, dataProvider: T, isLoading: w, isStale: r, next: f, notify: d }),
1449
+ [I, T, w, r, f, d]
1437
1450
  );
1438
1451
  return T.contextPlugins.reduce((q, L) => L(q, j), l);
1439
1452
  }
1440
1453
  function ut({
1441
1454
  dataProvider: h,
1442
1455
  name: s,
1443
- query: a,
1456
+ query: u,
1444
1457
  disabled: p,
1445
1458
  options: m,
1446
1459
  persistent: b,
@@ -1450,7 +1463,7 @@ function ut({
1450
1463
  const U = Xe({
1451
1464
  dataProvider: h,
1452
1465
  name: s,
1453
- query: a,
1466
+ query: u,
1454
1467
  disabled: p,
1455
1468
  options: m,
1456
1469
  persistent: b,
@@ -1471,8 +1484,8 @@ export {
1471
1484
  et as ConfigConsumer,
1472
1485
  ot as ConfigProvider,
1473
1486
  Se as DataProvider,
1474
- ge as Meta,
1475
- Ae as Notifier,
1487
+ ye as Meta,
1488
+ ge as Notifier,
1476
1489
  ut as Resource,
1477
1490
  tt as ResourceConsumer,
1478
1491
  Ye as ResourceProvider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civet/core",
3
- "version": "6.1.1",
3
+ "version": "6.2.1",
4
4
  "description": "Civet",
5
5
  "author": {
6
6
  "name": "Aaron Burmeister"