@neutron.co.id/operasional-interfaces 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.cjs +170 -3413
- package/build/index.mjs +165 -3408
- package/build/style.css +5 -5
- package/package.json +50 -41
package/build/index.cjs
CHANGED
|
@@ -12,13 +12,17 @@ const model = require("@neon.id/model");
|
|
|
12
12
|
const query = require("@neon.id/query");
|
|
13
13
|
const relation = require("@neon.id/relation");
|
|
14
14
|
const code = require("@neon.id/utils/code");
|
|
15
|
+
const vue$1 = require("@urql/vue");
|
|
16
|
+
const dateFns = require("date-fns");
|
|
15
17
|
const tempatModels = require("@neutron.co.id/tempat-models");
|
|
16
18
|
const core = require("@vueuse/core");
|
|
17
19
|
const office = require("@neon.id/office");
|
|
18
20
|
const pinia = require("pinia");
|
|
19
21
|
const vueRouter = require("vue-router");
|
|
20
22
|
const component = require("@neon.id/utils/component");
|
|
23
|
+
const Scanner = require("qr-scanner");
|
|
21
24
|
const personaliaModels = require("@neutron.co.id/personalia-models");
|
|
25
|
+
const catatInterfaces = require("@neon.id/catat-interfaces");
|
|
22
26
|
const _hoisted_1$b = { class: "xxx-button" };
|
|
23
27
|
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
24
28
|
...{ name: "XxxButton" },
|
|
@@ -37,2718 +41,6 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
37
41
|
};
|
|
38
42
|
}
|
|
39
43
|
});
|
|
40
|
-
var e$2 = {
|
|
41
|
-
NAME: "Name",
|
|
42
|
-
DOCUMENT: "Document",
|
|
43
|
-
OPERATION_DEFINITION: "OperationDefinition",
|
|
44
|
-
VARIABLE_DEFINITION: "VariableDefinition",
|
|
45
|
-
SELECTION_SET: "SelectionSet",
|
|
46
|
-
FIELD: "Field",
|
|
47
|
-
ARGUMENT: "Argument",
|
|
48
|
-
FRAGMENT_SPREAD: "FragmentSpread",
|
|
49
|
-
INLINE_FRAGMENT: "InlineFragment",
|
|
50
|
-
FRAGMENT_DEFINITION: "FragmentDefinition",
|
|
51
|
-
VARIABLE: "Variable",
|
|
52
|
-
INT: "IntValue",
|
|
53
|
-
FLOAT: "FloatValue",
|
|
54
|
-
STRING: "StringValue",
|
|
55
|
-
BOOLEAN: "BooleanValue",
|
|
56
|
-
NULL: "NullValue",
|
|
57
|
-
ENUM: "EnumValue",
|
|
58
|
-
LIST: "ListValue",
|
|
59
|
-
OBJECT: "ObjectValue",
|
|
60
|
-
OBJECT_FIELD: "ObjectField",
|
|
61
|
-
DIRECTIVE: "Directive",
|
|
62
|
-
NAMED_TYPE: "NamedType",
|
|
63
|
-
LIST_TYPE: "ListType",
|
|
64
|
-
NON_NULL_TYPE: "NonNullType"
|
|
65
|
-
};
|
|
66
|
-
class GraphQLError extends Error {
|
|
67
|
-
constructor(e3, r, i3, n2, a4, t3, o2) {
|
|
68
|
-
super(e3);
|
|
69
|
-
this.name = "GraphQLError";
|
|
70
|
-
this.message = e3;
|
|
71
|
-
if (a4) {
|
|
72
|
-
this.path = a4;
|
|
73
|
-
}
|
|
74
|
-
if (r) {
|
|
75
|
-
this.nodes = Array.isArray(r) ? r : [r];
|
|
76
|
-
}
|
|
77
|
-
if (i3) {
|
|
78
|
-
this.source = i3;
|
|
79
|
-
}
|
|
80
|
-
if (n2) {
|
|
81
|
-
this.positions = n2;
|
|
82
|
-
}
|
|
83
|
-
if (t3) {
|
|
84
|
-
this.originalError = t3;
|
|
85
|
-
}
|
|
86
|
-
var l2 = o2;
|
|
87
|
-
if (!l2 && t3) {
|
|
88
|
-
var u3 = t3.extensions;
|
|
89
|
-
if (u3 && "object" == typeof u3) {
|
|
90
|
-
l2 = u3;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
this.extensions = l2 || {};
|
|
94
|
-
}
|
|
95
|
-
toJSON() {
|
|
96
|
-
return {
|
|
97
|
-
...this,
|
|
98
|
-
message: this.message
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
toString() {
|
|
102
|
-
return this.message;
|
|
103
|
-
}
|
|
104
|
-
get [Symbol.toStringTag]() {
|
|
105
|
-
return "GraphQLError";
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
var i$1;
|
|
109
|
-
var n;
|
|
110
|
-
function error(e3) {
|
|
111
|
-
return new GraphQLError(`Syntax Error: Unexpected token at ${n} in ${e3}`);
|
|
112
|
-
}
|
|
113
|
-
function advance(e3) {
|
|
114
|
-
e3.lastIndex = n;
|
|
115
|
-
if (e3.test(i$1)) {
|
|
116
|
-
return i$1.slice(n, n = e3.lastIndex);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
var a = / +(?=[^\s])/y;
|
|
120
|
-
function blockString(e3) {
|
|
121
|
-
var r = e3.split("\n");
|
|
122
|
-
var i3 = "";
|
|
123
|
-
var n2 = 0;
|
|
124
|
-
var t3 = 0;
|
|
125
|
-
var o2 = r.length - 1;
|
|
126
|
-
for (var l2 = 0; l2 < r.length; l2++) {
|
|
127
|
-
a.lastIndex = 0;
|
|
128
|
-
if (a.test(r[l2])) {
|
|
129
|
-
if (l2 && (!n2 || a.lastIndex < n2)) {
|
|
130
|
-
n2 = a.lastIndex;
|
|
131
|
-
}
|
|
132
|
-
t3 = t3 || l2;
|
|
133
|
-
o2 = l2;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
for (var u3 = t3; u3 <= o2; u3++) {
|
|
137
|
-
if (u3 !== t3) {
|
|
138
|
-
i3 += "\n";
|
|
139
|
-
}
|
|
140
|
-
i3 += r[u3].slice(n2).replace(/\\"""/g, '"""');
|
|
141
|
-
}
|
|
142
|
-
return i3;
|
|
143
|
-
}
|
|
144
|
-
function ignored() {
|
|
145
|
-
for (var e3 = 0 | i$1.charCodeAt(n++); 9 === e3 || 10 === e3 || 13 === e3 || 32 === e3 || 35 === e3 || 44 === e3 || 65279 === e3; e3 = 0 | i$1.charCodeAt(n++)) {
|
|
146
|
-
if (35 === e3) {
|
|
147
|
-
while (10 !== (e3 = i$1.charCodeAt(n++)) && 13 !== e3) {
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
n--;
|
|
152
|
-
}
|
|
153
|
-
var t = /[_\w][_\d\w]*/y;
|
|
154
|
-
function name() {
|
|
155
|
-
var e3;
|
|
156
|
-
if (e3 = advance(t)) {
|
|
157
|
-
return {
|
|
158
|
-
kind: "Name",
|
|
159
|
-
value: e3
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
var o = /null|true|false/y;
|
|
164
|
-
var l$1 = /\$[_\w][_\d\w]*/y;
|
|
165
|
-
var u = /-?\d+/y;
|
|
166
|
-
var v$1 = /(?:\.\d+)?(?:[eE][+-]?\d+)?/y;
|
|
167
|
-
var d$2 = /\\/g;
|
|
168
|
-
var s$1 = /"""(?:[\s\S]+(?="""))?"""/y;
|
|
169
|
-
var c$1 = /"(?:[^"\r\n]+)?"/y;
|
|
170
|
-
function value(e3) {
|
|
171
|
-
var r;
|
|
172
|
-
var a4;
|
|
173
|
-
if (a4 = advance(o)) {
|
|
174
|
-
r = "null" === a4 ? {
|
|
175
|
-
kind: "NullValue"
|
|
176
|
-
} : {
|
|
177
|
-
kind: "BooleanValue",
|
|
178
|
-
value: "true" === a4
|
|
179
|
-
};
|
|
180
|
-
} else if (!e3 && (a4 = advance(l$1))) {
|
|
181
|
-
r = {
|
|
182
|
-
kind: "Variable",
|
|
183
|
-
name: {
|
|
184
|
-
kind: "Name",
|
|
185
|
-
value: a4.slice(1)
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
} else if (a4 = advance(u)) {
|
|
189
|
-
var f2 = a4;
|
|
190
|
-
if (a4 = advance(v$1)) {
|
|
191
|
-
r = {
|
|
192
|
-
kind: "FloatValue",
|
|
193
|
-
value: f2 + a4
|
|
194
|
-
};
|
|
195
|
-
} else {
|
|
196
|
-
r = {
|
|
197
|
-
kind: "IntValue",
|
|
198
|
-
value: f2
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
} else if (a4 = advance(t)) {
|
|
202
|
-
r = {
|
|
203
|
-
kind: "EnumValue",
|
|
204
|
-
value: a4
|
|
205
|
-
};
|
|
206
|
-
} else if (a4 = advance(s$1)) {
|
|
207
|
-
r = {
|
|
208
|
-
kind: "StringValue",
|
|
209
|
-
value: blockString(a4.slice(3, -3)),
|
|
210
|
-
block: true
|
|
211
|
-
};
|
|
212
|
-
} else if (a4 = advance(c$1)) {
|
|
213
|
-
r = {
|
|
214
|
-
kind: "StringValue",
|
|
215
|
-
value: d$2.test(a4) ? JSON.parse(a4) : a4.slice(1, -1),
|
|
216
|
-
block: false
|
|
217
|
-
};
|
|
218
|
-
} else if (r = function list(e4) {
|
|
219
|
-
var r2;
|
|
220
|
-
if (91 === i$1.charCodeAt(n)) {
|
|
221
|
-
n++;
|
|
222
|
-
ignored();
|
|
223
|
-
var a5 = [];
|
|
224
|
-
while (r2 = value(e4)) {
|
|
225
|
-
a5.push(r2);
|
|
226
|
-
}
|
|
227
|
-
if (93 !== i$1.charCodeAt(n++)) {
|
|
228
|
-
throw error("ListValue");
|
|
229
|
-
}
|
|
230
|
-
ignored();
|
|
231
|
-
return {
|
|
232
|
-
kind: "ListValue",
|
|
233
|
-
values: a5
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
}(e3) || function object(e4) {
|
|
237
|
-
if (123 === i$1.charCodeAt(n)) {
|
|
238
|
-
n++;
|
|
239
|
-
ignored();
|
|
240
|
-
var r2 = [];
|
|
241
|
-
var a5;
|
|
242
|
-
while (a5 = name()) {
|
|
243
|
-
ignored();
|
|
244
|
-
if (58 !== i$1.charCodeAt(n++)) {
|
|
245
|
-
throw error("ObjectField");
|
|
246
|
-
}
|
|
247
|
-
ignored();
|
|
248
|
-
var t3 = value(e4);
|
|
249
|
-
if (!t3) {
|
|
250
|
-
throw error("ObjectField");
|
|
251
|
-
}
|
|
252
|
-
r2.push({
|
|
253
|
-
kind: "ObjectField",
|
|
254
|
-
name: a5,
|
|
255
|
-
value: t3
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
if (125 !== i$1.charCodeAt(n++)) {
|
|
259
|
-
throw error("ObjectValue");
|
|
260
|
-
}
|
|
261
|
-
ignored();
|
|
262
|
-
return {
|
|
263
|
-
kind: "ObjectValue",
|
|
264
|
-
fields: r2
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
}(e3)) {
|
|
268
|
-
return r;
|
|
269
|
-
}
|
|
270
|
-
ignored();
|
|
271
|
-
return r;
|
|
272
|
-
}
|
|
273
|
-
function arguments_(e3) {
|
|
274
|
-
var r = [];
|
|
275
|
-
ignored();
|
|
276
|
-
if (40 === i$1.charCodeAt(n)) {
|
|
277
|
-
n++;
|
|
278
|
-
ignored();
|
|
279
|
-
var a4;
|
|
280
|
-
while (a4 = name()) {
|
|
281
|
-
ignored();
|
|
282
|
-
if (58 !== i$1.charCodeAt(n++)) {
|
|
283
|
-
throw error("Argument");
|
|
284
|
-
}
|
|
285
|
-
ignored();
|
|
286
|
-
var t3 = value(e3);
|
|
287
|
-
if (!t3) {
|
|
288
|
-
throw error("Argument");
|
|
289
|
-
}
|
|
290
|
-
r.push({
|
|
291
|
-
kind: "Argument",
|
|
292
|
-
name: a4,
|
|
293
|
-
value: t3
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
if (!r.length || 41 !== i$1.charCodeAt(n++)) {
|
|
297
|
-
throw error("Argument");
|
|
298
|
-
}
|
|
299
|
-
ignored();
|
|
300
|
-
}
|
|
301
|
-
return r;
|
|
302
|
-
}
|
|
303
|
-
function directives(e3) {
|
|
304
|
-
var r = [];
|
|
305
|
-
ignored();
|
|
306
|
-
while (64 === i$1.charCodeAt(n)) {
|
|
307
|
-
n++;
|
|
308
|
-
var a4 = name();
|
|
309
|
-
if (!a4) {
|
|
310
|
-
throw error("Directive");
|
|
311
|
-
}
|
|
312
|
-
ignored();
|
|
313
|
-
r.push({
|
|
314
|
-
kind: "Directive",
|
|
315
|
-
name: a4,
|
|
316
|
-
arguments: arguments_(e3)
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
return r;
|
|
320
|
-
}
|
|
321
|
-
function field() {
|
|
322
|
-
var e3 = name();
|
|
323
|
-
if (e3) {
|
|
324
|
-
ignored();
|
|
325
|
-
var r;
|
|
326
|
-
if (58 === i$1.charCodeAt(n)) {
|
|
327
|
-
n++;
|
|
328
|
-
ignored();
|
|
329
|
-
r = e3;
|
|
330
|
-
if (!(e3 = name())) {
|
|
331
|
-
throw error("Field");
|
|
332
|
-
}
|
|
333
|
-
ignored();
|
|
334
|
-
}
|
|
335
|
-
return {
|
|
336
|
-
kind: "Field",
|
|
337
|
-
alias: r,
|
|
338
|
-
name: e3,
|
|
339
|
-
arguments: arguments_(false),
|
|
340
|
-
directives: directives(false),
|
|
341
|
-
selectionSet: selectionSet()
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
function type() {
|
|
346
|
-
var e3;
|
|
347
|
-
ignored();
|
|
348
|
-
if (91 === i$1.charCodeAt(n)) {
|
|
349
|
-
n++;
|
|
350
|
-
ignored();
|
|
351
|
-
var r = type();
|
|
352
|
-
if (!r || 93 !== i$1.charCodeAt(n++)) {
|
|
353
|
-
throw error("ListType");
|
|
354
|
-
}
|
|
355
|
-
e3 = {
|
|
356
|
-
kind: "ListType",
|
|
357
|
-
type: r
|
|
358
|
-
};
|
|
359
|
-
} else if (e3 = name()) {
|
|
360
|
-
e3 = {
|
|
361
|
-
kind: "NamedType",
|
|
362
|
-
name: e3
|
|
363
|
-
};
|
|
364
|
-
} else {
|
|
365
|
-
throw error("NamedType");
|
|
366
|
-
}
|
|
367
|
-
ignored();
|
|
368
|
-
if (33 === i$1.charCodeAt(n)) {
|
|
369
|
-
n++;
|
|
370
|
-
ignored();
|
|
371
|
-
return {
|
|
372
|
-
kind: "NonNullType",
|
|
373
|
-
type: e3
|
|
374
|
-
};
|
|
375
|
-
} else {
|
|
376
|
-
return e3;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
var f$1 = /on/y;
|
|
380
|
-
function typeCondition() {
|
|
381
|
-
if (advance(f$1)) {
|
|
382
|
-
ignored();
|
|
383
|
-
var e3 = name();
|
|
384
|
-
if (!e3) {
|
|
385
|
-
throw error("NamedType");
|
|
386
|
-
}
|
|
387
|
-
ignored();
|
|
388
|
-
return {
|
|
389
|
-
kind: "NamedType",
|
|
390
|
-
name: e3
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
var p$1 = /\.\.\./y;
|
|
395
|
-
function fragmentSpread() {
|
|
396
|
-
if (advance(p$1)) {
|
|
397
|
-
ignored();
|
|
398
|
-
var e3 = n;
|
|
399
|
-
var r;
|
|
400
|
-
if ((r = name()) && "on" !== r.value) {
|
|
401
|
-
return {
|
|
402
|
-
kind: "FragmentSpread",
|
|
403
|
-
name: r,
|
|
404
|
-
directives: directives(false)
|
|
405
|
-
};
|
|
406
|
-
} else {
|
|
407
|
-
n = e3;
|
|
408
|
-
var i3 = typeCondition();
|
|
409
|
-
var a4 = directives(false);
|
|
410
|
-
var t3 = selectionSet();
|
|
411
|
-
if (!t3) {
|
|
412
|
-
throw error("InlineFragment");
|
|
413
|
-
}
|
|
414
|
-
return {
|
|
415
|
-
kind: "InlineFragment",
|
|
416
|
-
typeCondition: i3,
|
|
417
|
-
directives: a4,
|
|
418
|
-
selectionSet: t3
|
|
419
|
-
};
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
function selectionSet() {
|
|
424
|
-
var e3;
|
|
425
|
-
ignored();
|
|
426
|
-
if (123 === i$1.charCodeAt(n)) {
|
|
427
|
-
n++;
|
|
428
|
-
ignored();
|
|
429
|
-
var r = [];
|
|
430
|
-
while (e3 = fragmentSpread() || field()) {
|
|
431
|
-
r.push(e3);
|
|
432
|
-
}
|
|
433
|
-
if (!r.length || 125 !== i$1.charCodeAt(n++)) {
|
|
434
|
-
throw error("SelectionSet");
|
|
435
|
-
}
|
|
436
|
-
ignored();
|
|
437
|
-
return {
|
|
438
|
-
kind: "SelectionSet",
|
|
439
|
-
selections: r
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
var m = /fragment/y;
|
|
444
|
-
function fragmentDefinition() {
|
|
445
|
-
if (advance(m)) {
|
|
446
|
-
ignored();
|
|
447
|
-
var e3 = name();
|
|
448
|
-
if (!e3) {
|
|
449
|
-
throw error("FragmentDefinition");
|
|
450
|
-
}
|
|
451
|
-
ignored();
|
|
452
|
-
var r = typeCondition();
|
|
453
|
-
if (!r) {
|
|
454
|
-
throw error("FragmentDefinition");
|
|
455
|
-
}
|
|
456
|
-
var i3 = directives(false);
|
|
457
|
-
var n2 = selectionSet();
|
|
458
|
-
if (!n2) {
|
|
459
|
-
throw error("FragmentDefinition");
|
|
460
|
-
}
|
|
461
|
-
return {
|
|
462
|
-
kind: "FragmentDefinition",
|
|
463
|
-
name: e3,
|
|
464
|
-
typeCondition: r,
|
|
465
|
-
directives: i3,
|
|
466
|
-
selectionSet: n2
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
var g = /query|mutation|subscription/y;
|
|
471
|
-
function operationDefinition() {
|
|
472
|
-
var e3;
|
|
473
|
-
var r;
|
|
474
|
-
var a4 = [];
|
|
475
|
-
var t3 = [];
|
|
476
|
-
if (e3 = advance(g)) {
|
|
477
|
-
ignored();
|
|
478
|
-
r = name();
|
|
479
|
-
a4 = function variableDefinitions() {
|
|
480
|
-
var e4;
|
|
481
|
-
var r2 = [];
|
|
482
|
-
ignored();
|
|
483
|
-
if (40 === i$1.charCodeAt(n)) {
|
|
484
|
-
n++;
|
|
485
|
-
ignored();
|
|
486
|
-
while (e4 = advance(l$1)) {
|
|
487
|
-
ignored();
|
|
488
|
-
if (58 !== i$1.charCodeAt(n++)) {
|
|
489
|
-
throw error("VariableDefinition");
|
|
490
|
-
}
|
|
491
|
-
var a5 = type();
|
|
492
|
-
var t4 = void 0;
|
|
493
|
-
if (61 === i$1.charCodeAt(n)) {
|
|
494
|
-
n++;
|
|
495
|
-
ignored();
|
|
496
|
-
if (!(t4 = value(true))) {
|
|
497
|
-
throw error("VariableDefinition");
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
ignored();
|
|
501
|
-
r2.push({
|
|
502
|
-
kind: "VariableDefinition",
|
|
503
|
-
variable: {
|
|
504
|
-
kind: "Variable",
|
|
505
|
-
name: {
|
|
506
|
-
kind: "Name",
|
|
507
|
-
value: e4.slice(1)
|
|
508
|
-
}
|
|
509
|
-
},
|
|
510
|
-
type: a5,
|
|
511
|
-
defaultValue: t4,
|
|
512
|
-
directives: directives(true)
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
if (41 !== i$1.charCodeAt(n++)) {
|
|
516
|
-
throw error("VariableDefinition");
|
|
517
|
-
}
|
|
518
|
-
ignored();
|
|
519
|
-
}
|
|
520
|
-
return r2;
|
|
521
|
-
}();
|
|
522
|
-
t3 = directives(false);
|
|
523
|
-
}
|
|
524
|
-
var o2 = selectionSet();
|
|
525
|
-
if (o2) {
|
|
526
|
-
return {
|
|
527
|
-
kind: "OperationDefinition",
|
|
528
|
-
operation: e3 || "query",
|
|
529
|
-
name: r,
|
|
530
|
-
variableDefinitions: a4,
|
|
531
|
-
directives: t3,
|
|
532
|
-
selectionSet: o2
|
|
533
|
-
};
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
function parse(e3, r) {
|
|
537
|
-
i$1 = "string" == typeof e3.body ? e3.body : e3;
|
|
538
|
-
n = 0;
|
|
539
|
-
return function document2() {
|
|
540
|
-
var e4;
|
|
541
|
-
ignored();
|
|
542
|
-
var r2 = [];
|
|
543
|
-
while (e4 = fragmentDefinition() || operationDefinition()) {
|
|
544
|
-
r2.push(e4);
|
|
545
|
-
}
|
|
546
|
-
return {
|
|
547
|
-
kind: "Document",
|
|
548
|
-
definitions: r2
|
|
549
|
-
};
|
|
550
|
-
}();
|
|
551
|
-
}
|
|
552
|
-
function printString(e3) {
|
|
553
|
-
return JSON.stringify(e3);
|
|
554
|
-
}
|
|
555
|
-
function printBlockString(e3) {
|
|
556
|
-
return '"""\n' + e3.replace(/"""/g, '\\"""') + '\n"""';
|
|
557
|
-
}
|
|
558
|
-
var hasItems = (e3) => !(!e3 || !e3.length);
|
|
559
|
-
var y = {
|
|
560
|
-
OperationDefinition(e3) {
|
|
561
|
-
if ("query" === e3.operation && !e3.name && !hasItems(e3.variableDefinitions) && !hasItems(e3.directives)) {
|
|
562
|
-
return y.SelectionSet(e3.selectionSet);
|
|
563
|
-
}
|
|
564
|
-
var r = e3.operation;
|
|
565
|
-
if (e3.name) {
|
|
566
|
-
r += " " + e3.name.value;
|
|
567
|
-
}
|
|
568
|
-
if (hasItems(e3.variableDefinitions)) {
|
|
569
|
-
if (!e3.name) {
|
|
570
|
-
r += " ";
|
|
571
|
-
}
|
|
572
|
-
r += "(" + e3.variableDefinitions.map(y.VariableDefinition).join(", ") + ")";
|
|
573
|
-
}
|
|
574
|
-
if (hasItems(e3.directives)) {
|
|
575
|
-
r += " " + e3.directives.map(y.Directive).join(" ");
|
|
576
|
-
}
|
|
577
|
-
return r + " " + y.SelectionSet(e3.selectionSet);
|
|
578
|
-
},
|
|
579
|
-
VariableDefinition(e3) {
|
|
580
|
-
var r = y.Variable(e3.variable) + ": " + print(e3.type);
|
|
581
|
-
if (e3.defaultValue) {
|
|
582
|
-
r += " = " + print(e3.defaultValue);
|
|
583
|
-
}
|
|
584
|
-
if (hasItems(e3.directives)) {
|
|
585
|
-
r += " " + e3.directives.map(y.Directive).join(" ");
|
|
586
|
-
}
|
|
587
|
-
return r;
|
|
588
|
-
},
|
|
589
|
-
Field(e3) {
|
|
590
|
-
var r = (e3.alias ? e3.alias.value + ": " : "") + e3.name.value;
|
|
591
|
-
if (hasItems(e3.arguments)) {
|
|
592
|
-
var i3 = e3.arguments.map(y.Argument);
|
|
593
|
-
var n2 = r + "(" + i3.join(", ") + ")";
|
|
594
|
-
r = n2.length > 80 ? r + "(\n " + i3.join("\n").replace(/\n/g, "\n ") + "\n)" : n2;
|
|
595
|
-
}
|
|
596
|
-
if (hasItems(e3.directives)) {
|
|
597
|
-
r += " " + e3.directives.map(y.Directive).join(" ");
|
|
598
|
-
}
|
|
599
|
-
return e3.selectionSet ? r + " " + y.SelectionSet(e3.selectionSet) : r;
|
|
600
|
-
},
|
|
601
|
-
StringValue: (e3) => e3.block ? printBlockString(e3.value) : printString(e3.value),
|
|
602
|
-
BooleanValue: (e3) => "" + e3.value,
|
|
603
|
-
NullValue: (e3) => "null",
|
|
604
|
-
IntValue: (e3) => e3.value,
|
|
605
|
-
FloatValue: (e3) => e3.value,
|
|
606
|
-
EnumValue: (e3) => e3.value,
|
|
607
|
-
Name: (e3) => e3.value,
|
|
608
|
-
Variable: (e3) => "$" + e3.name.value,
|
|
609
|
-
ListValue: (e3) => "[" + e3.values.map(print).join(", ") + "]",
|
|
610
|
-
ObjectValue: (e3) => "{" + e3.fields.map(y.ObjectField).join(", ") + "}",
|
|
611
|
-
ObjectField: (e3) => e3.name.value + ": " + print(e3.value),
|
|
612
|
-
Document: (e3) => hasItems(e3.definitions) ? e3.definitions.map(print).join("\n\n") : "",
|
|
613
|
-
SelectionSet: (e3) => "{\n " + e3.selections.map(print).join("\n").replace(/\n/g, "\n ") + "\n}",
|
|
614
|
-
Argument: (e3) => e3.name.value + ": " + print(e3.value),
|
|
615
|
-
FragmentSpread(e3) {
|
|
616
|
-
var r = "..." + e3.name.value;
|
|
617
|
-
if (hasItems(e3.directives)) {
|
|
618
|
-
r += " " + e3.directives.map(y.Directive).join(" ");
|
|
619
|
-
}
|
|
620
|
-
return r;
|
|
621
|
-
},
|
|
622
|
-
InlineFragment(e3) {
|
|
623
|
-
var r = "...";
|
|
624
|
-
if (e3.typeCondition) {
|
|
625
|
-
r += " on " + e3.typeCondition.name.value;
|
|
626
|
-
}
|
|
627
|
-
if (hasItems(e3.directives)) {
|
|
628
|
-
r += " " + e3.directives.map(y.Directive).join(" ");
|
|
629
|
-
}
|
|
630
|
-
return r + " " + print(e3.selectionSet);
|
|
631
|
-
},
|
|
632
|
-
FragmentDefinition(e3) {
|
|
633
|
-
var r = "fragment " + e3.name.value;
|
|
634
|
-
r += " on " + e3.typeCondition.name.value;
|
|
635
|
-
if (hasItems(e3.directives)) {
|
|
636
|
-
r += " " + e3.directives.map(y.Directive).join(" ");
|
|
637
|
-
}
|
|
638
|
-
return r + " " + print(e3.selectionSet);
|
|
639
|
-
},
|
|
640
|
-
Directive(e3) {
|
|
641
|
-
var r = "@" + e3.name.value;
|
|
642
|
-
if (hasItems(e3.arguments)) {
|
|
643
|
-
r += "(" + e3.arguments.map(y.Argument).join(", ") + ")";
|
|
644
|
-
}
|
|
645
|
-
return r;
|
|
646
|
-
},
|
|
647
|
-
NamedType: (e3) => e3.name.value,
|
|
648
|
-
ListType: (e3) => "[" + print(e3.type) + "]",
|
|
649
|
-
NonNullType: (e3) => print(e3.type) + "!"
|
|
650
|
-
};
|
|
651
|
-
function print(e3) {
|
|
652
|
-
return y[e3.kind] ? y[e3.kind](e3) : "";
|
|
653
|
-
}
|
|
654
|
-
var teardownPlaceholder = () => {
|
|
655
|
-
};
|
|
656
|
-
var e$1 = teardownPlaceholder;
|
|
657
|
-
function start(e3) {
|
|
658
|
-
return {
|
|
659
|
-
tag: 0,
|
|
660
|
-
0: e3
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
|
-
function filter(r) {
|
|
664
|
-
return (t3) => (i3) => {
|
|
665
|
-
var a4 = e$1;
|
|
666
|
-
t3((e3) => {
|
|
667
|
-
if (0 === e3) {
|
|
668
|
-
i3(0);
|
|
669
|
-
} else if (0 === e3.tag) {
|
|
670
|
-
a4 = e3[0];
|
|
671
|
-
i3(e3);
|
|
672
|
-
} else if (!r(e3[0])) {
|
|
673
|
-
a4(0);
|
|
674
|
-
} else {
|
|
675
|
-
i3(e3);
|
|
676
|
-
}
|
|
677
|
-
});
|
|
678
|
-
};
|
|
679
|
-
}
|
|
680
|
-
function onEnd(e3) {
|
|
681
|
-
return (r) => (t3) => {
|
|
682
|
-
var i3 = false;
|
|
683
|
-
r((r2) => {
|
|
684
|
-
if (i3)
|
|
685
|
-
;
|
|
686
|
-
else if (0 === r2) {
|
|
687
|
-
i3 = true;
|
|
688
|
-
t3(0);
|
|
689
|
-
e3();
|
|
690
|
-
} else if (0 === r2.tag) {
|
|
691
|
-
var a4 = r2[0];
|
|
692
|
-
t3(start((r3) => {
|
|
693
|
-
if (1 === r3) {
|
|
694
|
-
i3 = true;
|
|
695
|
-
a4(1);
|
|
696
|
-
e3();
|
|
697
|
-
} else {
|
|
698
|
-
a4(r3);
|
|
699
|
-
}
|
|
700
|
-
}));
|
|
701
|
-
} else {
|
|
702
|
-
t3(r2);
|
|
703
|
-
}
|
|
704
|
-
});
|
|
705
|
-
};
|
|
706
|
-
}
|
|
707
|
-
function onPush(e3) {
|
|
708
|
-
return (r) => (t3) => {
|
|
709
|
-
var i3 = false;
|
|
710
|
-
r((r2) => {
|
|
711
|
-
if (i3)
|
|
712
|
-
;
|
|
713
|
-
else if (0 === r2) {
|
|
714
|
-
i3 = true;
|
|
715
|
-
t3(0);
|
|
716
|
-
} else if (0 === r2.tag) {
|
|
717
|
-
var a4 = r2[0];
|
|
718
|
-
t3(start((e4) => {
|
|
719
|
-
if (1 === e4) {
|
|
720
|
-
i3 = true;
|
|
721
|
-
}
|
|
722
|
-
a4(e4);
|
|
723
|
-
}));
|
|
724
|
-
} else {
|
|
725
|
-
e3(r2[0]);
|
|
726
|
-
t3(r2);
|
|
727
|
-
}
|
|
728
|
-
});
|
|
729
|
-
};
|
|
730
|
-
}
|
|
731
|
-
function take(r) {
|
|
732
|
-
return (t3) => (i3) => {
|
|
733
|
-
var a4 = e$1;
|
|
734
|
-
var f2 = false;
|
|
735
|
-
var n2 = 0;
|
|
736
|
-
t3((e3) => {
|
|
737
|
-
if (f2)
|
|
738
|
-
;
|
|
739
|
-
else if (0 === e3) {
|
|
740
|
-
f2 = true;
|
|
741
|
-
i3(0);
|
|
742
|
-
} else if (0 === e3.tag) {
|
|
743
|
-
if (r <= 0) {
|
|
744
|
-
f2 = true;
|
|
745
|
-
i3(0);
|
|
746
|
-
e3[0](1);
|
|
747
|
-
} else {
|
|
748
|
-
a4 = e3[0];
|
|
749
|
-
}
|
|
750
|
-
} else if (n2++ < r) {
|
|
751
|
-
i3(e3);
|
|
752
|
-
if (!f2 && n2 >= r) {
|
|
753
|
-
f2 = true;
|
|
754
|
-
i3(0);
|
|
755
|
-
a4(1);
|
|
756
|
-
}
|
|
757
|
-
} else {
|
|
758
|
-
i3(e3);
|
|
759
|
-
}
|
|
760
|
-
});
|
|
761
|
-
i3(start((e3) => {
|
|
762
|
-
if (1 === e3 && !f2) {
|
|
763
|
-
f2 = true;
|
|
764
|
-
a4(1);
|
|
765
|
-
} else if (0 === e3 && !f2 && n2 < r) {
|
|
766
|
-
a4(0);
|
|
767
|
-
}
|
|
768
|
-
}));
|
|
769
|
-
};
|
|
770
|
-
}
|
|
771
|
-
function subscribe(r) {
|
|
772
|
-
return (t3) => {
|
|
773
|
-
var i3 = e$1;
|
|
774
|
-
var a4 = false;
|
|
775
|
-
t3((e3) => {
|
|
776
|
-
if (0 === e3) {
|
|
777
|
-
a4 = true;
|
|
778
|
-
} else if (0 === e3.tag) {
|
|
779
|
-
(i3 = e3[0])(0);
|
|
780
|
-
} else if (!a4) {
|
|
781
|
-
r(e3[0]);
|
|
782
|
-
i3(0);
|
|
783
|
-
}
|
|
784
|
-
});
|
|
785
|
-
return {
|
|
786
|
-
unsubscribe() {
|
|
787
|
-
if (!a4) {
|
|
788
|
-
a4 = true;
|
|
789
|
-
i3(1);
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
};
|
|
793
|
-
};
|
|
794
|
-
}
|
|
795
|
-
function toPromise(r) {
|
|
796
|
-
return new Promise((t3) => {
|
|
797
|
-
var i3 = e$1;
|
|
798
|
-
var a4;
|
|
799
|
-
r((e3) => {
|
|
800
|
-
if (0 === e3) {
|
|
801
|
-
Promise.resolve(a4).then(t3);
|
|
802
|
-
} else if (0 === e3.tag) {
|
|
803
|
-
(i3 = e3[0])(0);
|
|
804
|
-
} else {
|
|
805
|
-
a4 = e3[0];
|
|
806
|
-
i3(0);
|
|
807
|
-
}
|
|
808
|
-
});
|
|
809
|
-
});
|
|
810
|
-
}
|
|
811
|
-
var phash = (r, e3) => {
|
|
812
|
-
var t3 = 0 | (e3 || 5381);
|
|
813
|
-
for (var a4 = 0, o2 = 0 | r.length; a4 < o2; a4++) {
|
|
814
|
-
t3 = (t3 << 5) + t3 + r.charCodeAt(a4);
|
|
815
|
-
}
|
|
816
|
-
return t3;
|
|
817
|
-
};
|
|
818
|
-
var s = /* @__PURE__ */ new Set();
|
|
819
|
-
var i = /* @__PURE__ */ new WeakMap();
|
|
820
|
-
var stringify = (r) => {
|
|
821
|
-
if (null === r || s.has(r)) {
|
|
822
|
-
return "null";
|
|
823
|
-
} else if ("object" != typeof r) {
|
|
824
|
-
return JSON.stringify(r) || "";
|
|
825
|
-
} else if (r.toJSON) {
|
|
826
|
-
return stringify(r.toJSON());
|
|
827
|
-
} else if (Array.isArray(r)) {
|
|
828
|
-
var e3 = "[";
|
|
829
|
-
for (var t3 of r) {
|
|
830
|
-
if (e3.length > 1) {
|
|
831
|
-
e3 += ",";
|
|
832
|
-
}
|
|
833
|
-
e3 += stringify(t3) || "null";
|
|
834
|
-
}
|
|
835
|
-
return e3 += "]";
|
|
836
|
-
} else if (f !== NoopConstructor && r instanceof f || l !== NoopConstructor && r instanceof l) {
|
|
837
|
-
return "null";
|
|
838
|
-
}
|
|
839
|
-
var a4 = Object.keys(r).sort();
|
|
840
|
-
if (!a4.length && r.constructor && r.constructor !== Object) {
|
|
841
|
-
var o2 = i.get(r) || Math.random().toString(36).slice(2);
|
|
842
|
-
i.set(r, o2);
|
|
843
|
-
return stringify({
|
|
844
|
-
__key: o2
|
|
845
|
-
});
|
|
846
|
-
}
|
|
847
|
-
s.add(r);
|
|
848
|
-
var n2 = "{";
|
|
849
|
-
for (var v2 of a4) {
|
|
850
|
-
var c3 = stringify(r[v2]);
|
|
851
|
-
if (c3) {
|
|
852
|
-
if (n2.length > 1) {
|
|
853
|
-
n2 += ",";
|
|
854
|
-
}
|
|
855
|
-
n2 += stringify(v2) + ":" + c3;
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
s.delete(r);
|
|
859
|
-
return n2 += "}";
|
|
860
|
-
};
|
|
861
|
-
var stringifyVariables = (r) => {
|
|
862
|
-
s.clear();
|
|
863
|
-
return stringify(r);
|
|
864
|
-
};
|
|
865
|
-
class NoopConstructor {
|
|
866
|
-
}
|
|
867
|
-
var f = "undefined" != typeof File ? File : NoopConstructor;
|
|
868
|
-
var l = "undefined" != typeof Blob ? Blob : NoopConstructor;
|
|
869
|
-
var v = /("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g;
|
|
870
|
-
var c = /(?:#[^\n\r]+)?(?:[\r\n]+|$)/g;
|
|
871
|
-
var replaceOutsideStrings = (r, e3) => e3 % 2 == 0 ? r.replace(c, "\n") : r;
|
|
872
|
-
var sanitizeDocument = (r) => r.split(v).map(replaceOutsideStrings).join("").trim();
|
|
873
|
-
var d$1 = /* @__PURE__ */ new Map();
|
|
874
|
-
var p = /* @__PURE__ */ new Map();
|
|
875
|
-
var stringifyDocument = (r) => {
|
|
876
|
-
var t3;
|
|
877
|
-
if ("string" == typeof r) {
|
|
878
|
-
t3 = sanitizeDocument(r);
|
|
879
|
-
} else if (r.loc && p.get(r.__key) === r) {
|
|
880
|
-
t3 = r.loc.source.body;
|
|
881
|
-
} else {
|
|
882
|
-
t3 = d$1.get(r) || sanitizeDocument(print(r));
|
|
883
|
-
d$1.set(r, t3);
|
|
884
|
-
}
|
|
885
|
-
if ("string" != typeof r && !r.loc) {
|
|
886
|
-
r.loc = {
|
|
887
|
-
start: 0,
|
|
888
|
-
end: t3.length,
|
|
889
|
-
source: {
|
|
890
|
-
body: t3,
|
|
891
|
-
name: "gql",
|
|
892
|
-
locationOffset: {
|
|
893
|
-
line: 1,
|
|
894
|
-
column: 1
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
};
|
|
898
|
-
}
|
|
899
|
-
return t3;
|
|
900
|
-
};
|
|
901
|
-
var hashDocument = (r) => {
|
|
902
|
-
var e3 = phash(stringifyDocument(r));
|
|
903
|
-
if (r.definitions) {
|
|
904
|
-
var t3 = getOperationName(r);
|
|
905
|
-
if (t3) {
|
|
906
|
-
e3 = phash(`
|
|
907
|
-
# ${t3}`, e3);
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
return e3;
|
|
911
|
-
};
|
|
912
|
-
var keyDocument = (r) => {
|
|
913
|
-
var e3;
|
|
914
|
-
var a4;
|
|
915
|
-
if ("string" == typeof r) {
|
|
916
|
-
e3 = hashDocument(r);
|
|
917
|
-
a4 = p.get(e3) || parse(r);
|
|
918
|
-
} else {
|
|
919
|
-
e3 = r.__key || hashDocument(r);
|
|
920
|
-
a4 = p.get(e3) || r;
|
|
921
|
-
}
|
|
922
|
-
if (!a4.loc) {
|
|
923
|
-
stringifyDocument(a4);
|
|
924
|
-
}
|
|
925
|
-
a4.__key = e3;
|
|
926
|
-
p.set(e3, a4);
|
|
927
|
-
return a4;
|
|
928
|
-
};
|
|
929
|
-
var createRequest = (r, e3, t3) => {
|
|
930
|
-
var a4 = e3 || {};
|
|
931
|
-
var o2 = keyDocument(r);
|
|
932
|
-
var n2 = stringifyVariables(a4);
|
|
933
|
-
var s4 = o2.__key;
|
|
934
|
-
if ("{}" !== n2) {
|
|
935
|
-
s4 = phash(n2, s4);
|
|
936
|
-
}
|
|
937
|
-
return {
|
|
938
|
-
key: s4,
|
|
939
|
-
query: o2,
|
|
940
|
-
variables: a4,
|
|
941
|
-
extensions: t3
|
|
942
|
-
};
|
|
943
|
-
};
|
|
944
|
-
var getOperationName = (r) => {
|
|
945
|
-
for (var e3 of r.definitions) {
|
|
946
|
-
if (e3.kind === e$2.OPERATION_DEFINITION) {
|
|
947
|
-
return e3.name ? e3.name.value : void 0;
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
};
|
|
951
|
-
"undefined" != typeof TextDecoder ? new TextDecoder() : null;
|
|
952
|
-
/* @__PURE__ */ new Map();
|
|
953
|
-
/* @__PURE__ */ new Set();
|
|
954
|
-
var d = /* @__PURE__ */ new WeakMap();
|
|
955
|
-
function useClient() {
|
|
956
|
-
var e3 = vue.getCurrentInstance();
|
|
957
|
-
if ("production" !== process.env.NODE_ENV && !e3) {
|
|
958
|
-
throw new Error("use* functions may only be called during the `setup()` or other lifecycle hooks.");
|
|
959
|
-
}
|
|
960
|
-
var r = vue.inject("$urql");
|
|
961
|
-
if (!r && e3) {
|
|
962
|
-
r = d.get(e3);
|
|
963
|
-
}
|
|
964
|
-
if ("production" !== process.env.NODE_ENV && !r) {
|
|
965
|
-
throw new Error("No urql Client was provided. Did you forget to install the plugin or call `provideClient` in a parent?");
|
|
966
|
-
}
|
|
967
|
-
return r;
|
|
968
|
-
}
|
|
969
|
-
function unwrapPossibleProxy(e3) {
|
|
970
|
-
return e3 && vue.isRef(e3) ? e3.value : e3;
|
|
971
|
-
}
|
|
972
|
-
var h = {
|
|
973
|
-
flush: "pre"
|
|
974
|
-
};
|
|
975
|
-
function callUseQuery(e3, l2 = useClient(), s4 = []) {
|
|
976
|
-
var n2 = vue.reactive(e3);
|
|
977
|
-
var i3 = vue.ref();
|
|
978
|
-
var v2 = vue.ref(false);
|
|
979
|
-
var f2 = vue.ref(false);
|
|
980
|
-
var y4 = vue.ref();
|
|
981
|
-
var b2 = vue.ref();
|
|
982
|
-
var P = vue.ref();
|
|
983
|
-
var d4 = vue.isRef(e3.pause) ? e3.pause : vue.ref(!!e3.pause);
|
|
984
|
-
var x3 = vue.ref(createRequest(unwrapPossibleProxy(n2.query), unwrapPossibleProxy(n2.variables)));
|
|
985
|
-
var w2 = vue.ref();
|
|
986
|
-
s4.push(vue.watchEffect(() => {
|
|
987
|
-
var e4 = createRequest(unwrapPossibleProxy(n2.query), unwrapPossibleProxy(n2.variables));
|
|
988
|
-
if (x3.value.key !== e4.key) {
|
|
989
|
-
x3.value = e4;
|
|
990
|
-
}
|
|
991
|
-
}, h));
|
|
992
|
-
s4.push(vue.watchEffect(() => {
|
|
993
|
-
w2.value = !d4.value ? l2.value.executeQuery(x3.value, {
|
|
994
|
-
requestPolicy: unwrapPossibleProxy(n2.requestPolicy),
|
|
995
|
-
...unwrapPossibleProxy(n2.context)
|
|
996
|
-
}) : void 0;
|
|
997
|
-
}, h));
|
|
998
|
-
var q2 = {
|
|
999
|
-
data: i3,
|
|
1000
|
-
stale: v2,
|
|
1001
|
-
error: y4,
|
|
1002
|
-
operation: b2,
|
|
1003
|
-
extensions: P,
|
|
1004
|
-
fetching: f2,
|
|
1005
|
-
isPaused: d4,
|
|
1006
|
-
executeQuery(e4) {
|
|
1007
|
-
var r = w2.value = l2.value.executeQuery(x3.value, {
|
|
1008
|
-
requestPolicy: unwrapPossibleProxy(n2.requestPolicy),
|
|
1009
|
-
...n2.context,
|
|
1010
|
-
...e4
|
|
1011
|
-
});
|
|
1012
|
-
return {
|
|
1013
|
-
...E2,
|
|
1014
|
-
then(e5, u3) {
|
|
1015
|
-
var a4;
|
|
1016
|
-
return new Promise((e6) => {
|
|
1017
|
-
var u4 = false;
|
|
1018
|
-
a4 = subscribe(() => {
|
|
1019
|
-
if (!q2.fetching.value && !q2.stale.value) {
|
|
1020
|
-
if (a4) {
|
|
1021
|
-
a4.unsubscribe();
|
|
1022
|
-
}
|
|
1023
|
-
u4 = true;
|
|
1024
|
-
e6(q2);
|
|
1025
|
-
}
|
|
1026
|
-
})(r);
|
|
1027
|
-
if (u4) {
|
|
1028
|
-
a4.unsubscribe();
|
|
1029
|
-
}
|
|
1030
|
-
}).then(e5, u3);
|
|
1031
|
-
}
|
|
1032
|
-
};
|
|
1033
|
-
},
|
|
1034
|
-
pause() {
|
|
1035
|
-
d4.value = true;
|
|
1036
|
-
},
|
|
1037
|
-
resume() {
|
|
1038
|
-
d4.value = false;
|
|
1039
|
-
}
|
|
1040
|
-
};
|
|
1041
|
-
s4.push(vue.watchEffect((e4) => {
|
|
1042
|
-
if (w2.value) {
|
|
1043
|
-
f2.value = true;
|
|
1044
|
-
v2.value = false;
|
|
1045
|
-
e4(subscribe((e5) => {
|
|
1046
|
-
i3.value = e5.data;
|
|
1047
|
-
v2.value = !!e5.stale;
|
|
1048
|
-
f2.value = false;
|
|
1049
|
-
y4.value = e5.error;
|
|
1050
|
-
b2.value = e5.operation;
|
|
1051
|
-
P.value = e5.extensions;
|
|
1052
|
-
})(onEnd(() => {
|
|
1053
|
-
f2.value = false;
|
|
1054
|
-
v2.value = false;
|
|
1055
|
-
})(w2.value)).unsubscribe);
|
|
1056
|
-
} else {
|
|
1057
|
-
f2.value = false;
|
|
1058
|
-
v2.value = false;
|
|
1059
|
-
}
|
|
1060
|
-
}, {
|
|
1061
|
-
flush: "sync"
|
|
1062
|
-
}));
|
|
1063
|
-
var E2 = {
|
|
1064
|
-
...q2,
|
|
1065
|
-
then(e4, r) {
|
|
1066
|
-
var u3;
|
|
1067
|
-
return new Promise((e5) => {
|
|
1068
|
-
if (!w2.value) {
|
|
1069
|
-
return e5(q2);
|
|
1070
|
-
}
|
|
1071
|
-
var r2 = false;
|
|
1072
|
-
u3 = subscribe(() => {
|
|
1073
|
-
if (!q2.fetching.value && !q2.stale.value) {
|
|
1074
|
-
if (u3) {
|
|
1075
|
-
u3.unsubscribe();
|
|
1076
|
-
}
|
|
1077
|
-
r2 = true;
|
|
1078
|
-
e5(q2);
|
|
1079
|
-
}
|
|
1080
|
-
})(w2.value);
|
|
1081
|
-
if (r2) {
|
|
1082
|
-
u3.unsubscribe();
|
|
1083
|
-
}
|
|
1084
|
-
}).then(e4, r);
|
|
1085
|
-
}
|
|
1086
|
-
};
|
|
1087
|
-
return E2;
|
|
1088
|
-
}
|
|
1089
|
-
function callUseMutation(e3, u3 = useClient()) {
|
|
1090
|
-
var l2 = vue.ref();
|
|
1091
|
-
var s4 = vue.ref(false);
|
|
1092
|
-
var n2 = vue.ref(false);
|
|
1093
|
-
var t3 = vue.ref();
|
|
1094
|
-
var o2 = vue.ref();
|
|
1095
|
-
var i3 = vue.ref();
|
|
1096
|
-
return {
|
|
1097
|
-
data: l2,
|
|
1098
|
-
stale: s4,
|
|
1099
|
-
fetching: n2,
|
|
1100
|
-
error: t3,
|
|
1101
|
-
operation: o2,
|
|
1102
|
-
extensions: i3,
|
|
1103
|
-
executeMutation(a4, v2) {
|
|
1104
|
-
n2.value = true;
|
|
1105
|
-
return toPromise(take(1)(filter((e4) => !e4.hasNext)(onPush((e4) => {
|
|
1106
|
-
l2.value = e4.data;
|
|
1107
|
-
s4.value = e4.stale;
|
|
1108
|
-
n2.value = false;
|
|
1109
|
-
t3.value = e4.error;
|
|
1110
|
-
o2.value = e4.operation;
|
|
1111
|
-
i3.value = e4.extensions;
|
|
1112
|
-
})(u3.value.executeMutation(createRequest(e3, unwrapPossibleProxy(a4)), v2 || {})))));
|
|
1113
|
-
}
|
|
1114
|
-
};
|
|
1115
|
-
}
|
|
1116
|
-
var x = {
|
|
1117
|
-
flush: "pre"
|
|
1118
|
-
};
|
|
1119
|
-
function callUseSubscription(e3, l2, s4 = useClient(), n2 = []) {
|
|
1120
|
-
var i3 = vue.reactive(e3);
|
|
1121
|
-
var v2 = vue.ref();
|
|
1122
|
-
var f2 = vue.ref(false);
|
|
1123
|
-
var y4 = vue.ref(false);
|
|
1124
|
-
var b2 = vue.ref();
|
|
1125
|
-
var P = vue.ref();
|
|
1126
|
-
var d4 = vue.ref();
|
|
1127
|
-
var h4 = vue.ref(l2);
|
|
1128
|
-
var w2 = vue.isRef(e3.pause) ? e3.pause : vue.ref(!!e3.pause);
|
|
1129
|
-
var q2 = vue.ref(createRequest(unwrapPossibleProxy(i3.query), unwrapPossibleProxy(i3.variables)));
|
|
1130
|
-
var E2 = vue.ref();
|
|
1131
|
-
n2.push(vue.watchEffect(() => {
|
|
1132
|
-
var e4 = createRequest(unwrapPossibleProxy(i3.query), unwrapPossibleProxy(i3.variables));
|
|
1133
|
-
if (q2.value.key !== e4.key) {
|
|
1134
|
-
q2.value = e4;
|
|
1135
|
-
}
|
|
1136
|
-
}, x));
|
|
1137
|
-
n2.push(vue.watchEffect(() => {
|
|
1138
|
-
E2.value = !w2.value ? s4.value.executeSubscription(q2.value, {
|
|
1139
|
-
...unwrapPossibleProxy(i3.context)
|
|
1140
|
-
}) : void 0;
|
|
1141
|
-
}, x));
|
|
1142
|
-
n2.push(vue.watchEffect((e4) => {
|
|
1143
|
-
if (E2.value) {
|
|
1144
|
-
y4.value = true;
|
|
1145
|
-
e4(subscribe((e5) => {
|
|
1146
|
-
y4.value = true;
|
|
1147
|
-
v2.value = void 0 !== e5.data ? "function" == typeof h4.value ? h4.value(v2.value, e5.data) : e5.data : e5.data, b2.value = e5.error;
|
|
1148
|
-
d4.value = e5.extensions;
|
|
1149
|
-
f2.value = !!e5.stale;
|
|
1150
|
-
P.value = e5.operation;
|
|
1151
|
-
})(onEnd(() => {
|
|
1152
|
-
y4.value = false;
|
|
1153
|
-
})(E2.value)).unsubscribe);
|
|
1154
|
-
} else {
|
|
1155
|
-
y4.value = false;
|
|
1156
|
-
}
|
|
1157
|
-
}, x));
|
|
1158
|
-
var m4 = {
|
|
1159
|
-
data: v2,
|
|
1160
|
-
stale: f2,
|
|
1161
|
-
error: b2,
|
|
1162
|
-
operation: P,
|
|
1163
|
-
extensions: d4,
|
|
1164
|
-
fetching: y4,
|
|
1165
|
-
isPaused: w2,
|
|
1166
|
-
executeSubscription(e4) {
|
|
1167
|
-
E2.value = s4.value.executeSubscription(q2.value, {
|
|
1168
|
-
...unwrapPossibleProxy(i3.context),
|
|
1169
|
-
...e4
|
|
1170
|
-
});
|
|
1171
|
-
return m4;
|
|
1172
|
-
},
|
|
1173
|
-
pause() {
|
|
1174
|
-
w2.value = true;
|
|
1175
|
-
},
|
|
1176
|
-
resume() {
|
|
1177
|
-
w2.value = false;
|
|
1178
|
-
}
|
|
1179
|
-
};
|
|
1180
|
-
return m4;
|
|
1181
|
-
}
|
|
1182
|
-
function useClientHandle() {
|
|
1183
|
-
var e3 = useClient();
|
|
1184
|
-
var r = [];
|
|
1185
|
-
vue.onBeforeUnmount(() => {
|
|
1186
|
-
var e4;
|
|
1187
|
-
while (e4 = r.shift()) {
|
|
1188
|
-
e4();
|
|
1189
|
-
}
|
|
1190
|
-
});
|
|
1191
|
-
var u3 = {
|
|
1192
|
-
client: e3.value,
|
|
1193
|
-
useQuery: (u4) => callUseQuery(u4, e3, r),
|
|
1194
|
-
useSubscription: (u4, a4) => callUseSubscription(u4, a4, e3, r),
|
|
1195
|
-
useMutation: (r2) => callUseMutation(r2, e3)
|
|
1196
|
-
};
|
|
1197
|
-
if ("production" !== process.env.NODE_ENV) {
|
|
1198
|
-
vue.onMounted(() => {
|
|
1199
|
-
Object.assign(u3, {
|
|
1200
|
-
useQuery(u4) {
|
|
1201
|
-
if ("production" !== process.env.NODE_ENV && !vue.getCurrentInstance()) {
|
|
1202
|
-
throw new Error("`handle.useQuery()` should only be called in the `setup()` or a lifecycle hook.");
|
|
1203
|
-
}
|
|
1204
|
-
return callUseQuery(u4, e3, r);
|
|
1205
|
-
},
|
|
1206
|
-
useSubscription(u4, a4) {
|
|
1207
|
-
if ("production" !== process.env.NODE_ENV && !vue.getCurrentInstance()) {
|
|
1208
|
-
throw new Error("`handle.useSubscription()` should only be called in the `setup()` or a lifecycle hook.");
|
|
1209
|
-
}
|
|
1210
|
-
return callUseSubscription(u4, a4, e3, r);
|
|
1211
|
-
}
|
|
1212
|
-
});
|
|
1213
|
-
});
|
|
1214
|
-
}
|
|
1215
|
-
return u3;
|
|
1216
|
-
}
|
|
1217
|
-
function _typeof(obj) {
|
|
1218
|
-
"@babel/helpers - typeof";
|
|
1219
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
|
|
1220
|
-
return typeof obj2;
|
|
1221
|
-
} : function(obj2) {
|
|
1222
|
-
return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
1223
|
-
}, _typeof(obj);
|
|
1224
|
-
}
|
|
1225
|
-
function toInteger(dirtyNumber) {
|
|
1226
|
-
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
1227
|
-
return NaN;
|
|
1228
|
-
}
|
|
1229
|
-
var number = Number(dirtyNumber);
|
|
1230
|
-
if (isNaN(number)) {
|
|
1231
|
-
return number;
|
|
1232
|
-
}
|
|
1233
|
-
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
1234
|
-
}
|
|
1235
|
-
function requiredArgs(required, args) {
|
|
1236
|
-
if (args.length < required) {
|
|
1237
|
-
throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
function toDate(argument) {
|
|
1241
|
-
requiredArgs(1, arguments);
|
|
1242
|
-
var argStr = Object.prototype.toString.call(argument);
|
|
1243
|
-
if (argument instanceof Date || _typeof(argument) === "object" && argStr === "[object Date]") {
|
|
1244
|
-
return new Date(argument.getTime());
|
|
1245
|
-
} else if (typeof argument === "number" || argStr === "[object Number]") {
|
|
1246
|
-
return new Date(argument);
|
|
1247
|
-
} else {
|
|
1248
|
-
if ((typeof argument === "string" || argStr === "[object String]") && typeof console !== "undefined") {
|
|
1249
|
-
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
|
|
1250
|
-
console.warn(new Error().stack);
|
|
1251
|
-
}
|
|
1252
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
1256
|
-
requiredArgs(2, arguments);
|
|
1257
|
-
var timestamp = toDate(dirtyDate).getTime();
|
|
1258
|
-
var amount = toInteger(dirtyAmount);
|
|
1259
|
-
return new Date(timestamp + amount);
|
|
1260
|
-
}
|
|
1261
|
-
var defaultOptions = {};
|
|
1262
|
-
function getDefaultOptions() {
|
|
1263
|
-
return defaultOptions;
|
|
1264
|
-
}
|
|
1265
|
-
function getTimezoneOffsetInMilliseconds(date) {
|
|
1266
|
-
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
1267
|
-
utcDate.setUTCFullYear(date.getFullYear());
|
|
1268
|
-
return date.getTime() - utcDate.getTime();
|
|
1269
|
-
}
|
|
1270
|
-
function startOfDay(dirtyDate) {
|
|
1271
|
-
requiredArgs(1, arguments);
|
|
1272
|
-
var date = toDate(dirtyDate);
|
|
1273
|
-
date.setHours(0, 0, 0, 0);
|
|
1274
|
-
return date;
|
|
1275
|
-
}
|
|
1276
|
-
function isDate(value2) {
|
|
1277
|
-
requiredArgs(1, arguments);
|
|
1278
|
-
return value2 instanceof Date || _typeof(value2) === "object" && Object.prototype.toString.call(value2) === "[object Date]";
|
|
1279
|
-
}
|
|
1280
|
-
function isValid(dirtyDate) {
|
|
1281
|
-
requiredArgs(1, arguments);
|
|
1282
|
-
if (!isDate(dirtyDate) && typeof dirtyDate !== "number") {
|
|
1283
|
-
return false;
|
|
1284
|
-
}
|
|
1285
|
-
var date = toDate(dirtyDate);
|
|
1286
|
-
return !isNaN(Number(date));
|
|
1287
|
-
}
|
|
1288
|
-
function endOfDay(dirtyDate) {
|
|
1289
|
-
requiredArgs(1, arguments);
|
|
1290
|
-
var date = toDate(dirtyDate);
|
|
1291
|
-
date.setHours(23, 59, 59, 999);
|
|
1292
|
-
return date;
|
|
1293
|
-
}
|
|
1294
|
-
function endOfToday() {
|
|
1295
|
-
return endOfDay(Date.now());
|
|
1296
|
-
}
|
|
1297
|
-
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
1298
|
-
requiredArgs(2, arguments);
|
|
1299
|
-
var amount = toInteger(dirtyAmount);
|
|
1300
|
-
return addMilliseconds(dirtyDate, -amount);
|
|
1301
|
-
}
|
|
1302
|
-
var MILLISECONDS_IN_DAY = 864e5;
|
|
1303
|
-
function getUTCDayOfYear(dirtyDate) {
|
|
1304
|
-
requiredArgs(1, arguments);
|
|
1305
|
-
var date = toDate(dirtyDate);
|
|
1306
|
-
var timestamp = date.getTime();
|
|
1307
|
-
date.setUTCMonth(0, 1);
|
|
1308
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
1309
|
-
var startOfYearTimestamp = date.getTime();
|
|
1310
|
-
var difference = timestamp - startOfYearTimestamp;
|
|
1311
|
-
return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
|
|
1312
|
-
}
|
|
1313
|
-
function startOfUTCISOWeek(dirtyDate) {
|
|
1314
|
-
requiredArgs(1, arguments);
|
|
1315
|
-
var weekStartsOn = 1;
|
|
1316
|
-
var date = toDate(dirtyDate);
|
|
1317
|
-
var day = date.getUTCDay();
|
|
1318
|
-
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
1319
|
-
date.setUTCDate(date.getUTCDate() - diff);
|
|
1320
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
1321
|
-
return date;
|
|
1322
|
-
}
|
|
1323
|
-
function getUTCISOWeekYear(dirtyDate) {
|
|
1324
|
-
requiredArgs(1, arguments);
|
|
1325
|
-
var date = toDate(dirtyDate);
|
|
1326
|
-
var year = date.getUTCFullYear();
|
|
1327
|
-
var fourthOfJanuaryOfNextYear = /* @__PURE__ */ new Date(0);
|
|
1328
|
-
fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
|
|
1329
|
-
fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
1330
|
-
var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
|
|
1331
|
-
var fourthOfJanuaryOfThisYear = /* @__PURE__ */ new Date(0);
|
|
1332
|
-
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
|
1333
|
-
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
1334
|
-
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
|
1335
|
-
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
1336
|
-
return year + 1;
|
|
1337
|
-
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
1338
|
-
return year;
|
|
1339
|
-
} else {
|
|
1340
|
-
return year - 1;
|
|
1341
|
-
}
|
|
1342
|
-
}
|
|
1343
|
-
function startOfUTCISOWeekYear(dirtyDate) {
|
|
1344
|
-
requiredArgs(1, arguments);
|
|
1345
|
-
var year = getUTCISOWeekYear(dirtyDate);
|
|
1346
|
-
var fourthOfJanuary = /* @__PURE__ */ new Date(0);
|
|
1347
|
-
fourthOfJanuary.setUTCFullYear(year, 0, 4);
|
|
1348
|
-
fourthOfJanuary.setUTCHours(0, 0, 0, 0);
|
|
1349
|
-
var date = startOfUTCISOWeek(fourthOfJanuary);
|
|
1350
|
-
return date;
|
|
1351
|
-
}
|
|
1352
|
-
var MILLISECONDS_IN_WEEK$1 = 6048e5;
|
|
1353
|
-
function getUTCISOWeek(dirtyDate) {
|
|
1354
|
-
requiredArgs(1, arguments);
|
|
1355
|
-
var date = toDate(dirtyDate);
|
|
1356
|
-
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
|
1357
|
-
return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
|
|
1358
|
-
}
|
|
1359
|
-
function startOfUTCWeek(dirtyDate, options) {
|
|
1360
|
-
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
1361
|
-
requiredArgs(1, arguments);
|
|
1362
|
-
var defaultOptions2 = getDefaultOptions();
|
|
1363
|
-
var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
|
|
1364
|
-
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
1365
|
-
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
1366
|
-
}
|
|
1367
|
-
var date = toDate(dirtyDate);
|
|
1368
|
-
var day = date.getUTCDay();
|
|
1369
|
-
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
1370
|
-
date.setUTCDate(date.getUTCDate() - diff);
|
|
1371
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
1372
|
-
return date;
|
|
1373
|
-
}
|
|
1374
|
-
function getUTCWeekYear(dirtyDate, options) {
|
|
1375
|
-
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
1376
|
-
requiredArgs(1, arguments);
|
|
1377
|
-
var date = toDate(dirtyDate);
|
|
1378
|
-
var year = date.getUTCFullYear();
|
|
1379
|
-
var defaultOptions2 = getDefaultOptions();
|
|
1380
|
-
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
1381
|
-
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
1382
|
-
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
1383
|
-
}
|
|
1384
|
-
var firstWeekOfNextYear = /* @__PURE__ */ new Date(0);
|
|
1385
|
-
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
|
1386
|
-
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
1387
|
-
var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
|
|
1388
|
-
var firstWeekOfThisYear = /* @__PURE__ */ new Date(0);
|
|
1389
|
-
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
1390
|
-
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
1391
|
-
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
|
|
1392
|
-
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
1393
|
-
return year + 1;
|
|
1394
|
-
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
1395
|
-
return year;
|
|
1396
|
-
} else {
|
|
1397
|
-
return year - 1;
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
function startOfUTCWeekYear(dirtyDate, options) {
|
|
1401
|
-
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
1402
|
-
requiredArgs(1, arguments);
|
|
1403
|
-
var defaultOptions2 = getDefaultOptions();
|
|
1404
|
-
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
1405
|
-
var year = getUTCWeekYear(dirtyDate, options);
|
|
1406
|
-
var firstWeek = /* @__PURE__ */ new Date(0);
|
|
1407
|
-
firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
1408
|
-
firstWeek.setUTCHours(0, 0, 0, 0);
|
|
1409
|
-
var date = startOfUTCWeek(firstWeek, options);
|
|
1410
|
-
return date;
|
|
1411
|
-
}
|
|
1412
|
-
var MILLISECONDS_IN_WEEK = 6048e5;
|
|
1413
|
-
function getUTCWeek(dirtyDate, options) {
|
|
1414
|
-
requiredArgs(1, arguments);
|
|
1415
|
-
var date = toDate(dirtyDate);
|
|
1416
|
-
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
1417
|
-
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
|
1418
|
-
}
|
|
1419
|
-
function addLeadingZeros(number, targetLength) {
|
|
1420
|
-
var sign = number < 0 ? "-" : "";
|
|
1421
|
-
var output = Math.abs(number).toString();
|
|
1422
|
-
while (output.length < targetLength) {
|
|
1423
|
-
output = "0" + output;
|
|
1424
|
-
}
|
|
1425
|
-
return sign + output;
|
|
1426
|
-
}
|
|
1427
|
-
var formatters$2 = {
|
|
1428
|
-
// Year
|
|
1429
|
-
y: function y2(date, token) {
|
|
1430
|
-
var signedYear = date.getUTCFullYear();
|
|
1431
|
-
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
1432
|
-
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
|
1433
|
-
},
|
|
1434
|
-
// Month
|
|
1435
|
-
M: function M(date, token) {
|
|
1436
|
-
var month = date.getUTCMonth();
|
|
1437
|
-
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
1438
|
-
},
|
|
1439
|
-
// Day of the month
|
|
1440
|
-
d: function d2(date, token) {
|
|
1441
|
-
return addLeadingZeros(date.getUTCDate(), token.length);
|
|
1442
|
-
},
|
|
1443
|
-
// AM or PM
|
|
1444
|
-
a: function a2(date, token) {
|
|
1445
|
-
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
|
|
1446
|
-
switch (token) {
|
|
1447
|
-
case "a":
|
|
1448
|
-
case "aa":
|
|
1449
|
-
return dayPeriodEnumValue.toUpperCase();
|
|
1450
|
-
case "aaa":
|
|
1451
|
-
return dayPeriodEnumValue;
|
|
1452
|
-
case "aaaaa":
|
|
1453
|
-
return dayPeriodEnumValue[0];
|
|
1454
|
-
case "aaaa":
|
|
1455
|
-
default:
|
|
1456
|
-
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
|
1457
|
-
}
|
|
1458
|
-
},
|
|
1459
|
-
// Hour [1-12]
|
|
1460
|
-
h: function h2(date, token) {
|
|
1461
|
-
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
|
1462
|
-
},
|
|
1463
|
-
// Hour [0-23]
|
|
1464
|
-
H: function H(date, token) {
|
|
1465
|
-
return addLeadingZeros(date.getUTCHours(), token.length);
|
|
1466
|
-
},
|
|
1467
|
-
// Minute
|
|
1468
|
-
m: function m2(date, token) {
|
|
1469
|
-
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
|
1470
|
-
},
|
|
1471
|
-
// Second
|
|
1472
|
-
s: function s2(date, token) {
|
|
1473
|
-
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
|
1474
|
-
},
|
|
1475
|
-
// Fraction of second
|
|
1476
|
-
S: function S(date, token) {
|
|
1477
|
-
var numberOfDigits = token.length;
|
|
1478
|
-
var milliseconds = date.getUTCMilliseconds();
|
|
1479
|
-
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
1480
|
-
return addLeadingZeros(fractionalSeconds, token.length);
|
|
1481
|
-
}
|
|
1482
|
-
};
|
|
1483
|
-
const formatters$3 = formatters$2;
|
|
1484
|
-
var dayPeriodEnum = {
|
|
1485
|
-
am: "am",
|
|
1486
|
-
pm: "pm",
|
|
1487
|
-
midnight: "midnight",
|
|
1488
|
-
noon: "noon",
|
|
1489
|
-
morning: "morning",
|
|
1490
|
-
afternoon: "afternoon",
|
|
1491
|
-
evening: "evening",
|
|
1492
|
-
night: "night"
|
|
1493
|
-
};
|
|
1494
|
-
var formatters = {
|
|
1495
|
-
// Era
|
|
1496
|
-
G: function G(date, token, localize2) {
|
|
1497
|
-
var era = date.getUTCFullYear() > 0 ? 1 : 0;
|
|
1498
|
-
switch (token) {
|
|
1499
|
-
case "G":
|
|
1500
|
-
case "GG":
|
|
1501
|
-
case "GGG":
|
|
1502
|
-
return localize2.era(era, {
|
|
1503
|
-
width: "abbreviated"
|
|
1504
|
-
});
|
|
1505
|
-
case "GGGGG":
|
|
1506
|
-
return localize2.era(era, {
|
|
1507
|
-
width: "narrow"
|
|
1508
|
-
});
|
|
1509
|
-
case "GGGG":
|
|
1510
|
-
default:
|
|
1511
|
-
return localize2.era(era, {
|
|
1512
|
-
width: "wide"
|
|
1513
|
-
});
|
|
1514
|
-
}
|
|
1515
|
-
},
|
|
1516
|
-
// Year
|
|
1517
|
-
y: function y3(date, token, localize2) {
|
|
1518
|
-
if (token === "yo") {
|
|
1519
|
-
var signedYear = date.getUTCFullYear();
|
|
1520
|
-
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
1521
|
-
return localize2.ordinalNumber(year, {
|
|
1522
|
-
unit: "year"
|
|
1523
|
-
});
|
|
1524
|
-
}
|
|
1525
|
-
return formatters$3.y(date, token);
|
|
1526
|
-
},
|
|
1527
|
-
// Local week-numbering year
|
|
1528
|
-
Y: function Y(date, token, localize2, options) {
|
|
1529
|
-
var signedWeekYear = getUTCWeekYear(date, options);
|
|
1530
|
-
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
1531
|
-
if (token === "YY") {
|
|
1532
|
-
var twoDigitYear = weekYear % 100;
|
|
1533
|
-
return addLeadingZeros(twoDigitYear, 2);
|
|
1534
|
-
}
|
|
1535
|
-
if (token === "Yo") {
|
|
1536
|
-
return localize2.ordinalNumber(weekYear, {
|
|
1537
|
-
unit: "year"
|
|
1538
|
-
});
|
|
1539
|
-
}
|
|
1540
|
-
return addLeadingZeros(weekYear, token.length);
|
|
1541
|
-
},
|
|
1542
|
-
// ISO week-numbering year
|
|
1543
|
-
R: function R(date, token) {
|
|
1544
|
-
var isoWeekYear = getUTCISOWeekYear(date);
|
|
1545
|
-
return addLeadingZeros(isoWeekYear, token.length);
|
|
1546
|
-
},
|
|
1547
|
-
// Extended year. This is a single number designating the year of this calendar system.
|
|
1548
|
-
// The main difference between `y` and `u` localizers are B.C. years:
|
|
1549
|
-
// | Year | `y` | `u` |
|
|
1550
|
-
// |------|-----|-----|
|
|
1551
|
-
// | AC 1 | 1 | 1 |
|
|
1552
|
-
// | BC 1 | 1 | 0 |
|
|
1553
|
-
// | BC 2 | 2 | -1 |
|
|
1554
|
-
// Also `yy` always returns the last two digits of a year,
|
|
1555
|
-
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
1556
|
-
u: function u2(date, token) {
|
|
1557
|
-
var year = date.getUTCFullYear();
|
|
1558
|
-
return addLeadingZeros(year, token.length);
|
|
1559
|
-
},
|
|
1560
|
-
// Quarter
|
|
1561
|
-
Q: function Q(date, token, localize2) {
|
|
1562
|
-
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
1563
|
-
switch (token) {
|
|
1564
|
-
case "Q":
|
|
1565
|
-
return String(quarter);
|
|
1566
|
-
case "QQ":
|
|
1567
|
-
return addLeadingZeros(quarter, 2);
|
|
1568
|
-
case "Qo":
|
|
1569
|
-
return localize2.ordinalNumber(quarter, {
|
|
1570
|
-
unit: "quarter"
|
|
1571
|
-
});
|
|
1572
|
-
case "QQQ":
|
|
1573
|
-
return localize2.quarter(quarter, {
|
|
1574
|
-
width: "abbreviated",
|
|
1575
|
-
context: "formatting"
|
|
1576
|
-
});
|
|
1577
|
-
case "QQQQQ":
|
|
1578
|
-
return localize2.quarter(quarter, {
|
|
1579
|
-
width: "narrow",
|
|
1580
|
-
context: "formatting"
|
|
1581
|
-
});
|
|
1582
|
-
case "QQQQ":
|
|
1583
|
-
default:
|
|
1584
|
-
return localize2.quarter(quarter, {
|
|
1585
|
-
width: "wide",
|
|
1586
|
-
context: "formatting"
|
|
1587
|
-
});
|
|
1588
|
-
}
|
|
1589
|
-
},
|
|
1590
|
-
// Stand-alone quarter
|
|
1591
|
-
q: function q(date, token, localize2) {
|
|
1592
|
-
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
1593
|
-
switch (token) {
|
|
1594
|
-
case "q":
|
|
1595
|
-
return String(quarter);
|
|
1596
|
-
case "qq":
|
|
1597
|
-
return addLeadingZeros(quarter, 2);
|
|
1598
|
-
case "qo":
|
|
1599
|
-
return localize2.ordinalNumber(quarter, {
|
|
1600
|
-
unit: "quarter"
|
|
1601
|
-
});
|
|
1602
|
-
case "qqq":
|
|
1603
|
-
return localize2.quarter(quarter, {
|
|
1604
|
-
width: "abbreviated",
|
|
1605
|
-
context: "standalone"
|
|
1606
|
-
});
|
|
1607
|
-
case "qqqqq":
|
|
1608
|
-
return localize2.quarter(quarter, {
|
|
1609
|
-
width: "narrow",
|
|
1610
|
-
context: "standalone"
|
|
1611
|
-
});
|
|
1612
|
-
case "qqqq":
|
|
1613
|
-
default:
|
|
1614
|
-
return localize2.quarter(quarter, {
|
|
1615
|
-
width: "wide",
|
|
1616
|
-
context: "standalone"
|
|
1617
|
-
});
|
|
1618
|
-
}
|
|
1619
|
-
},
|
|
1620
|
-
// Month
|
|
1621
|
-
M: function M2(date, token, localize2) {
|
|
1622
|
-
var month = date.getUTCMonth();
|
|
1623
|
-
switch (token) {
|
|
1624
|
-
case "M":
|
|
1625
|
-
case "MM":
|
|
1626
|
-
return formatters$3.M(date, token);
|
|
1627
|
-
case "Mo":
|
|
1628
|
-
return localize2.ordinalNumber(month + 1, {
|
|
1629
|
-
unit: "month"
|
|
1630
|
-
});
|
|
1631
|
-
case "MMM":
|
|
1632
|
-
return localize2.month(month, {
|
|
1633
|
-
width: "abbreviated",
|
|
1634
|
-
context: "formatting"
|
|
1635
|
-
});
|
|
1636
|
-
case "MMMMM":
|
|
1637
|
-
return localize2.month(month, {
|
|
1638
|
-
width: "narrow",
|
|
1639
|
-
context: "formatting"
|
|
1640
|
-
});
|
|
1641
|
-
case "MMMM":
|
|
1642
|
-
default:
|
|
1643
|
-
return localize2.month(month, {
|
|
1644
|
-
width: "wide",
|
|
1645
|
-
context: "formatting"
|
|
1646
|
-
});
|
|
1647
|
-
}
|
|
1648
|
-
},
|
|
1649
|
-
// Stand-alone month
|
|
1650
|
-
L: function L(date, token, localize2) {
|
|
1651
|
-
var month = date.getUTCMonth();
|
|
1652
|
-
switch (token) {
|
|
1653
|
-
case "L":
|
|
1654
|
-
return String(month + 1);
|
|
1655
|
-
case "LL":
|
|
1656
|
-
return addLeadingZeros(month + 1, 2);
|
|
1657
|
-
case "Lo":
|
|
1658
|
-
return localize2.ordinalNumber(month + 1, {
|
|
1659
|
-
unit: "month"
|
|
1660
|
-
});
|
|
1661
|
-
case "LLL":
|
|
1662
|
-
return localize2.month(month, {
|
|
1663
|
-
width: "abbreviated",
|
|
1664
|
-
context: "standalone"
|
|
1665
|
-
});
|
|
1666
|
-
case "LLLLL":
|
|
1667
|
-
return localize2.month(month, {
|
|
1668
|
-
width: "narrow",
|
|
1669
|
-
context: "standalone"
|
|
1670
|
-
});
|
|
1671
|
-
case "LLLL":
|
|
1672
|
-
default:
|
|
1673
|
-
return localize2.month(month, {
|
|
1674
|
-
width: "wide",
|
|
1675
|
-
context: "standalone"
|
|
1676
|
-
});
|
|
1677
|
-
}
|
|
1678
|
-
},
|
|
1679
|
-
// Local week of year
|
|
1680
|
-
w: function w(date, token, localize2, options) {
|
|
1681
|
-
var week = getUTCWeek(date, options);
|
|
1682
|
-
if (token === "wo") {
|
|
1683
|
-
return localize2.ordinalNumber(week, {
|
|
1684
|
-
unit: "week"
|
|
1685
|
-
});
|
|
1686
|
-
}
|
|
1687
|
-
return addLeadingZeros(week, token.length);
|
|
1688
|
-
},
|
|
1689
|
-
// ISO week of year
|
|
1690
|
-
I: function I(date, token, localize2) {
|
|
1691
|
-
var isoWeek = getUTCISOWeek(date);
|
|
1692
|
-
if (token === "Io") {
|
|
1693
|
-
return localize2.ordinalNumber(isoWeek, {
|
|
1694
|
-
unit: "week"
|
|
1695
|
-
});
|
|
1696
|
-
}
|
|
1697
|
-
return addLeadingZeros(isoWeek, token.length);
|
|
1698
|
-
},
|
|
1699
|
-
// Day of the month
|
|
1700
|
-
d: function d3(date, token, localize2) {
|
|
1701
|
-
if (token === "do") {
|
|
1702
|
-
return localize2.ordinalNumber(date.getUTCDate(), {
|
|
1703
|
-
unit: "date"
|
|
1704
|
-
});
|
|
1705
|
-
}
|
|
1706
|
-
return formatters$3.d(date, token);
|
|
1707
|
-
},
|
|
1708
|
-
// Day of year
|
|
1709
|
-
D: function D(date, token, localize2) {
|
|
1710
|
-
var dayOfYear = getUTCDayOfYear(date);
|
|
1711
|
-
if (token === "Do") {
|
|
1712
|
-
return localize2.ordinalNumber(dayOfYear, {
|
|
1713
|
-
unit: "dayOfYear"
|
|
1714
|
-
});
|
|
1715
|
-
}
|
|
1716
|
-
return addLeadingZeros(dayOfYear, token.length);
|
|
1717
|
-
},
|
|
1718
|
-
// Day of week
|
|
1719
|
-
E: function E(date, token, localize2) {
|
|
1720
|
-
var dayOfWeek = date.getUTCDay();
|
|
1721
|
-
switch (token) {
|
|
1722
|
-
case "E":
|
|
1723
|
-
case "EE":
|
|
1724
|
-
case "EEE":
|
|
1725
|
-
return localize2.day(dayOfWeek, {
|
|
1726
|
-
width: "abbreviated",
|
|
1727
|
-
context: "formatting"
|
|
1728
|
-
});
|
|
1729
|
-
case "EEEEE":
|
|
1730
|
-
return localize2.day(dayOfWeek, {
|
|
1731
|
-
width: "narrow",
|
|
1732
|
-
context: "formatting"
|
|
1733
|
-
});
|
|
1734
|
-
case "EEEEEE":
|
|
1735
|
-
return localize2.day(dayOfWeek, {
|
|
1736
|
-
width: "short",
|
|
1737
|
-
context: "formatting"
|
|
1738
|
-
});
|
|
1739
|
-
case "EEEE":
|
|
1740
|
-
default:
|
|
1741
|
-
return localize2.day(dayOfWeek, {
|
|
1742
|
-
width: "wide",
|
|
1743
|
-
context: "formatting"
|
|
1744
|
-
});
|
|
1745
|
-
}
|
|
1746
|
-
},
|
|
1747
|
-
// Local day of week
|
|
1748
|
-
e: function e(date, token, localize2, options) {
|
|
1749
|
-
var dayOfWeek = date.getUTCDay();
|
|
1750
|
-
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
1751
|
-
switch (token) {
|
|
1752
|
-
case "e":
|
|
1753
|
-
return String(localDayOfWeek);
|
|
1754
|
-
case "ee":
|
|
1755
|
-
return addLeadingZeros(localDayOfWeek, 2);
|
|
1756
|
-
case "eo":
|
|
1757
|
-
return localize2.ordinalNumber(localDayOfWeek, {
|
|
1758
|
-
unit: "day"
|
|
1759
|
-
});
|
|
1760
|
-
case "eee":
|
|
1761
|
-
return localize2.day(dayOfWeek, {
|
|
1762
|
-
width: "abbreviated",
|
|
1763
|
-
context: "formatting"
|
|
1764
|
-
});
|
|
1765
|
-
case "eeeee":
|
|
1766
|
-
return localize2.day(dayOfWeek, {
|
|
1767
|
-
width: "narrow",
|
|
1768
|
-
context: "formatting"
|
|
1769
|
-
});
|
|
1770
|
-
case "eeeeee":
|
|
1771
|
-
return localize2.day(dayOfWeek, {
|
|
1772
|
-
width: "short",
|
|
1773
|
-
context: "formatting"
|
|
1774
|
-
});
|
|
1775
|
-
case "eeee":
|
|
1776
|
-
default:
|
|
1777
|
-
return localize2.day(dayOfWeek, {
|
|
1778
|
-
width: "wide",
|
|
1779
|
-
context: "formatting"
|
|
1780
|
-
});
|
|
1781
|
-
}
|
|
1782
|
-
},
|
|
1783
|
-
// Stand-alone local day of week
|
|
1784
|
-
c: function c2(date, token, localize2, options) {
|
|
1785
|
-
var dayOfWeek = date.getUTCDay();
|
|
1786
|
-
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
1787
|
-
switch (token) {
|
|
1788
|
-
case "c":
|
|
1789
|
-
return String(localDayOfWeek);
|
|
1790
|
-
case "cc":
|
|
1791
|
-
return addLeadingZeros(localDayOfWeek, token.length);
|
|
1792
|
-
case "co":
|
|
1793
|
-
return localize2.ordinalNumber(localDayOfWeek, {
|
|
1794
|
-
unit: "day"
|
|
1795
|
-
});
|
|
1796
|
-
case "ccc":
|
|
1797
|
-
return localize2.day(dayOfWeek, {
|
|
1798
|
-
width: "abbreviated",
|
|
1799
|
-
context: "standalone"
|
|
1800
|
-
});
|
|
1801
|
-
case "ccccc":
|
|
1802
|
-
return localize2.day(dayOfWeek, {
|
|
1803
|
-
width: "narrow",
|
|
1804
|
-
context: "standalone"
|
|
1805
|
-
});
|
|
1806
|
-
case "cccccc":
|
|
1807
|
-
return localize2.day(dayOfWeek, {
|
|
1808
|
-
width: "short",
|
|
1809
|
-
context: "standalone"
|
|
1810
|
-
});
|
|
1811
|
-
case "cccc":
|
|
1812
|
-
default:
|
|
1813
|
-
return localize2.day(dayOfWeek, {
|
|
1814
|
-
width: "wide",
|
|
1815
|
-
context: "standalone"
|
|
1816
|
-
});
|
|
1817
|
-
}
|
|
1818
|
-
},
|
|
1819
|
-
// ISO day of week
|
|
1820
|
-
i: function i2(date, token, localize2) {
|
|
1821
|
-
var dayOfWeek = date.getUTCDay();
|
|
1822
|
-
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
1823
|
-
switch (token) {
|
|
1824
|
-
case "i":
|
|
1825
|
-
return String(isoDayOfWeek);
|
|
1826
|
-
case "ii":
|
|
1827
|
-
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
1828
|
-
case "io":
|
|
1829
|
-
return localize2.ordinalNumber(isoDayOfWeek, {
|
|
1830
|
-
unit: "day"
|
|
1831
|
-
});
|
|
1832
|
-
case "iii":
|
|
1833
|
-
return localize2.day(dayOfWeek, {
|
|
1834
|
-
width: "abbreviated",
|
|
1835
|
-
context: "formatting"
|
|
1836
|
-
});
|
|
1837
|
-
case "iiiii":
|
|
1838
|
-
return localize2.day(dayOfWeek, {
|
|
1839
|
-
width: "narrow",
|
|
1840
|
-
context: "formatting"
|
|
1841
|
-
});
|
|
1842
|
-
case "iiiiii":
|
|
1843
|
-
return localize2.day(dayOfWeek, {
|
|
1844
|
-
width: "short",
|
|
1845
|
-
context: "formatting"
|
|
1846
|
-
});
|
|
1847
|
-
case "iiii":
|
|
1848
|
-
default:
|
|
1849
|
-
return localize2.day(dayOfWeek, {
|
|
1850
|
-
width: "wide",
|
|
1851
|
-
context: "formatting"
|
|
1852
|
-
});
|
|
1853
|
-
}
|
|
1854
|
-
},
|
|
1855
|
-
// AM or PM
|
|
1856
|
-
a: function a3(date, token, localize2) {
|
|
1857
|
-
var hours = date.getUTCHours();
|
|
1858
|
-
var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
1859
|
-
switch (token) {
|
|
1860
|
-
case "a":
|
|
1861
|
-
case "aa":
|
|
1862
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1863
|
-
width: "abbreviated",
|
|
1864
|
-
context: "formatting"
|
|
1865
|
-
});
|
|
1866
|
-
case "aaa":
|
|
1867
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1868
|
-
width: "abbreviated",
|
|
1869
|
-
context: "formatting"
|
|
1870
|
-
}).toLowerCase();
|
|
1871
|
-
case "aaaaa":
|
|
1872
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1873
|
-
width: "narrow",
|
|
1874
|
-
context: "formatting"
|
|
1875
|
-
});
|
|
1876
|
-
case "aaaa":
|
|
1877
|
-
default:
|
|
1878
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1879
|
-
width: "wide",
|
|
1880
|
-
context: "formatting"
|
|
1881
|
-
});
|
|
1882
|
-
}
|
|
1883
|
-
},
|
|
1884
|
-
// AM, PM, midnight, noon
|
|
1885
|
-
b: function b(date, token, localize2) {
|
|
1886
|
-
var hours = date.getUTCHours();
|
|
1887
|
-
var dayPeriodEnumValue;
|
|
1888
|
-
if (hours === 12) {
|
|
1889
|
-
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
1890
|
-
} else if (hours === 0) {
|
|
1891
|
-
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
1892
|
-
} else {
|
|
1893
|
-
dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
1894
|
-
}
|
|
1895
|
-
switch (token) {
|
|
1896
|
-
case "b":
|
|
1897
|
-
case "bb":
|
|
1898
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1899
|
-
width: "abbreviated",
|
|
1900
|
-
context: "formatting"
|
|
1901
|
-
});
|
|
1902
|
-
case "bbb":
|
|
1903
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1904
|
-
width: "abbreviated",
|
|
1905
|
-
context: "formatting"
|
|
1906
|
-
}).toLowerCase();
|
|
1907
|
-
case "bbbbb":
|
|
1908
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1909
|
-
width: "narrow",
|
|
1910
|
-
context: "formatting"
|
|
1911
|
-
});
|
|
1912
|
-
case "bbbb":
|
|
1913
|
-
default:
|
|
1914
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1915
|
-
width: "wide",
|
|
1916
|
-
context: "formatting"
|
|
1917
|
-
});
|
|
1918
|
-
}
|
|
1919
|
-
},
|
|
1920
|
-
// in the morning, in the afternoon, in the evening, at night
|
|
1921
|
-
B: function B(date, token, localize2) {
|
|
1922
|
-
var hours = date.getUTCHours();
|
|
1923
|
-
var dayPeriodEnumValue;
|
|
1924
|
-
if (hours >= 17) {
|
|
1925
|
-
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
1926
|
-
} else if (hours >= 12) {
|
|
1927
|
-
dayPeriodEnumValue = dayPeriodEnum.afternoon;
|
|
1928
|
-
} else if (hours >= 4) {
|
|
1929
|
-
dayPeriodEnumValue = dayPeriodEnum.morning;
|
|
1930
|
-
} else {
|
|
1931
|
-
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
1932
|
-
}
|
|
1933
|
-
switch (token) {
|
|
1934
|
-
case "B":
|
|
1935
|
-
case "BB":
|
|
1936
|
-
case "BBB":
|
|
1937
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1938
|
-
width: "abbreviated",
|
|
1939
|
-
context: "formatting"
|
|
1940
|
-
});
|
|
1941
|
-
case "BBBBB":
|
|
1942
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1943
|
-
width: "narrow",
|
|
1944
|
-
context: "formatting"
|
|
1945
|
-
});
|
|
1946
|
-
case "BBBB":
|
|
1947
|
-
default:
|
|
1948
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
1949
|
-
width: "wide",
|
|
1950
|
-
context: "formatting"
|
|
1951
|
-
});
|
|
1952
|
-
}
|
|
1953
|
-
},
|
|
1954
|
-
// Hour [1-12]
|
|
1955
|
-
h: function h3(date, token, localize2) {
|
|
1956
|
-
if (token === "ho") {
|
|
1957
|
-
var hours = date.getUTCHours() % 12;
|
|
1958
|
-
if (hours === 0)
|
|
1959
|
-
hours = 12;
|
|
1960
|
-
return localize2.ordinalNumber(hours, {
|
|
1961
|
-
unit: "hour"
|
|
1962
|
-
});
|
|
1963
|
-
}
|
|
1964
|
-
return formatters$3.h(date, token);
|
|
1965
|
-
},
|
|
1966
|
-
// Hour [0-23]
|
|
1967
|
-
H: function H2(date, token, localize2) {
|
|
1968
|
-
if (token === "Ho") {
|
|
1969
|
-
return localize2.ordinalNumber(date.getUTCHours(), {
|
|
1970
|
-
unit: "hour"
|
|
1971
|
-
});
|
|
1972
|
-
}
|
|
1973
|
-
return formatters$3.H(date, token);
|
|
1974
|
-
},
|
|
1975
|
-
// Hour [0-11]
|
|
1976
|
-
K: function K(date, token, localize2) {
|
|
1977
|
-
var hours = date.getUTCHours() % 12;
|
|
1978
|
-
if (token === "Ko") {
|
|
1979
|
-
return localize2.ordinalNumber(hours, {
|
|
1980
|
-
unit: "hour"
|
|
1981
|
-
});
|
|
1982
|
-
}
|
|
1983
|
-
return addLeadingZeros(hours, token.length);
|
|
1984
|
-
},
|
|
1985
|
-
// Hour [1-24]
|
|
1986
|
-
k: function k(date, token, localize2) {
|
|
1987
|
-
var hours = date.getUTCHours();
|
|
1988
|
-
if (hours === 0)
|
|
1989
|
-
hours = 24;
|
|
1990
|
-
if (token === "ko") {
|
|
1991
|
-
return localize2.ordinalNumber(hours, {
|
|
1992
|
-
unit: "hour"
|
|
1993
|
-
});
|
|
1994
|
-
}
|
|
1995
|
-
return addLeadingZeros(hours, token.length);
|
|
1996
|
-
},
|
|
1997
|
-
// Minute
|
|
1998
|
-
m: function m3(date, token, localize2) {
|
|
1999
|
-
if (token === "mo") {
|
|
2000
|
-
return localize2.ordinalNumber(date.getUTCMinutes(), {
|
|
2001
|
-
unit: "minute"
|
|
2002
|
-
});
|
|
2003
|
-
}
|
|
2004
|
-
return formatters$3.m(date, token);
|
|
2005
|
-
},
|
|
2006
|
-
// Second
|
|
2007
|
-
s: function s3(date, token, localize2) {
|
|
2008
|
-
if (token === "so") {
|
|
2009
|
-
return localize2.ordinalNumber(date.getUTCSeconds(), {
|
|
2010
|
-
unit: "second"
|
|
2011
|
-
});
|
|
2012
|
-
}
|
|
2013
|
-
return formatters$3.s(date, token);
|
|
2014
|
-
},
|
|
2015
|
-
// Fraction of second
|
|
2016
|
-
S: function S2(date, token) {
|
|
2017
|
-
return formatters$3.S(date, token);
|
|
2018
|
-
},
|
|
2019
|
-
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
2020
|
-
X: function X(date, token, _localize, options) {
|
|
2021
|
-
var originalDate = options._originalDate || date;
|
|
2022
|
-
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
2023
|
-
if (timezoneOffset === 0) {
|
|
2024
|
-
return "Z";
|
|
2025
|
-
}
|
|
2026
|
-
switch (token) {
|
|
2027
|
-
case "X":
|
|
2028
|
-
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
2029
|
-
case "XXXX":
|
|
2030
|
-
case "XX":
|
|
2031
|
-
return formatTimezone(timezoneOffset);
|
|
2032
|
-
case "XXXXX":
|
|
2033
|
-
case "XXX":
|
|
2034
|
-
default:
|
|
2035
|
-
return formatTimezone(timezoneOffset, ":");
|
|
2036
|
-
}
|
|
2037
|
-
},
|
|
2038
|
-
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
2039
|
-
x: function x2(date, token, _localize, options) {
|
|
2040
|
-
var originalDate = options._originalDate || date;
|
|
2041
|
-
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
2042
|
-
switch (token) {
|
|
2043
|
-
case "x":
|
|
2044
|
-
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
2045
|
-
case "xxxx":
|
|
2046
|
-
case "xx":
|
|
2047
|
-
return formatTimezone(timezoneOffset);
|
|
2048
|
-
case "xxxxx":
|
|
2049
|
-
case "xxx":
|
|
2050
|
-
default:
|
|
2051
|
-
return formatTimezone(timezoneOffset, ":");
|
|
2052
|
-
}
|
|
2053
|
-
},
|
|
2054
|
-
// Timezone (GMT)
|
|
2055
|
-
O: function O(date, token, _localize, options) {
|
|
2056
|
-
var originalDate = options._originalDate || date;
|
|
2057
|
-
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
2058
|
-
switch (token) {
|
|
2059
|
-
case "O":
|
|
2060
|
-
case "OO":
|
|
2061
|
-
case "OOO":
|
|
2062
|
-
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
2063
|
-
case "OOOO":
|
|
2064
|
-
default:
|
|
2065
|
-
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
2066
|
-
}
|
|
2067
|
-
},
|
|
2068
|
-
// Timezone (specific non-location)
|
|
2069
|
-
z: function z(date, token, _localize, options) {
|
|
2070
|
-
var originalDate = options._originalDate || date;
|
|
2071
|
-
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
2072
|
-
switch (token) {
|
|
2073
|
-
case "z":
|
|
2074
|
-
case "zz":
|
|
2075
|
-
case "zzz":
|
|
2076
|
-
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
2077
|
-
case "zzzz":
|
|
2078
|
-
default:
|
|
2079
|
-
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
2080
|
-
}
|
|
2081
|
-
},
|
|
2082
|
-
// Seconds timestamp
|
|
2083
|
-
t: function t2(date, token, _localize, options) {
|
|
2084
|
-
var originalDate = options._originalDate || date;
|
|
2085
|
-
var timestamp = Math.floor(originalDate.getTime() / 1e3);
|
|
2086
|
-
return addLeadingZeros(timestamp, token.length);
|
|
2087
|
-
},
|
|
2088
|
-
// Milliseconds timestamp
|
|
2089
|
-
T: function T(date, token, _localize, options) {
|
|
2090
|
-
var originalDate = options._originalDate || date;
|
|
2091
|
-
var timestamp = originalDate.getTime();
|
|
2092
|
-
return addLeadingZeros(timestamp, token.length);
|
|
2093
|
-
}
|
|
2094
|
-
};
|
|
2095
|
-
function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
2096
|
-
var sign = offset > 0 ? "-" : "+";
|
|
2097
|
-
var absOffset = Math.abs(offset);
|
|
2098
|
-
var hours = Math.floor(absOffset / 60);
|
|
2099
|
-
var minutes = absOffset % 60;
|
|
2100
|
-
if (minutes === 0) {
|
|
2101
|
-
return sign + String(hours);
|
|
2102
|
-
}
|
|
2103
|
-
var delimiter = dirtyDelimiter || "";
|
|
2104
|
-
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
2105
|
-
}
|
|
2106
|
-
function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
|
|
2107
|
-
if (offset % 60 === 0) {
|
|
2108
|
-
var sign = offset > 0 ? "-" : "+";
|
|
2109
|
-
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
2110
|
-
}
|
|
2111
|
-
return formatTimezone(offset, dirtyDelimiter);
|
|
2112
|
-
}
|
|
2113
|
-
function formatTimezone(offset, dirtyDelimiter) {
|
|
2114
|
-
var delimiter = dirtyDelimiter || "";
|
|
2115
|
-
var sign = offset > 0 ? "-" : "+";
|
|
2116
|
-
var absOffset = Math.abs(offset);
|
|
2117
|
-
var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
|
|
2118
|
-
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
2119
|
-
return sign + hours + delimiter + minutes;
|
|
2120
|
-
}
|
|
2121
|
-
const formatters$1 = formatters;
|
|
2122
|
-
var dateLongFormatter = function dateLongFormatter2(pattern, formatLong2) {
|
|
2123
|
-
switch (pattern) {
|
|
2124
|
-
case "P":
|
|
2125
|
-
return formatLong2.date({
|
|
2126
|
-
width: "short"
|
|
2127
|
-
});
|
|
2128
|
-
case "PP":
|
|
2129
|
-
return formatLong2.date({
|
|
2130
|
-
width: "medium"
|
|
2131
|
-
});
|
|
2132
|
-
case "PPP":
|
|
2133
|
-
return formatLong2.date({
|
|
2134
|
-
width: "long"
|
|
2135
|
-
});
|
|
2136
|
-
case "PPPP":
|
|
2137
|
-
default:
|
|
2138
|
-
return formatLong2.date({
|
|
2139
|
-
width: "full"
|
|
2140
|
-
});
|
|
2141
|
-
}
|
|
2142
|
-
};
|
|
2143
|
-
var timeLongFormatter = function timeLongFormatter2(pattern, formatLong2) {
|
|
2144
|
-
switch (pattern) {
|
|
2145
|
-
case "p":
|
|
2146
|
-
return formatLong2.time({
|
|
2147
|
-
width: "short"
|
|
2148
|
-
});
|
|
2149
|
-
case "pp":
|
|
2150
|
-
return formatLong2.time({
|
|
2151
|
-
width: "medium"
|
|
2152
|
-
});
|
|
2153
|
-
case "ppp":
|
|
2154
|
-
return formatLong2.time({
|
|
2155
|
-
width: "long"
|
|
2156
|
-
});
|
|
2157
|
-
case "pppp":
|
|
2158
|
-
default:
|
|
2159
|
-
return formatLong2.time({
|
|
2160
|
-
width: "full"
|
|
2161
|
-
});
|
|
2162
|
-
}
|
|
2163
|
-
};
|
|
2164
|
-
var dateTimeLongFormatter = function dateTimeLongFormatter2(pattern, formatLong2) {
|
|
2165
|
-
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
2166
|
-
var datePattern = matchResult[1];
|
|
2167
|
-
var timePattern = matchResult[2];
|
|
2168
|
-
if (!timePattern) {
|
|
2169
|
-
return dateLongFormatter(pattern, formatLong2);
|
|
2170
|
-
}
|
|
2171
|
-
var dateTimeFormat;
|
|
2172
|
-
switch (datePattern) {
|
|
2173
|
-
case "P":
|
|
2174
|
-
dateTimeFormat = formatLong2.dateTime({
|
|
2175
|
-
width: "short"
|
|
2176
|
-
});
|
|
2177
|
-
break;
|
|
2178
|
-
case "PP":
|
|
2179
|
-
dateTimeFormat = formatLong2.dateTime({
|
|
2180
|
-
width: "medium"
|
|
2181
|
-
});
|
|
2182
|
-
break;
|
|
2183
|
-
case "PPP":
|
|
2184
|
-
dateTimeFormat = formatLong2.dateTime({
|
|
2185
|
-
width: "long"
|
|
2186
|
-
});
|
|
2187
|
-
break;
|
|
2188
|
-
case "PPPP":
|
|
2189
|
-
default:
|
|
2190
|
-
dateTimeFormat = formatLong2.dateTime({
|
|
2191
|
-
width: "full"
|
|
2192
|
-
});
|
|
2193
|
-
break;
|
|
2194
|
-
}
|
|
2195
|
-
return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
|
|
2196
|
-
};
|
|
2197
|
-
var longFormatters = {
|
|
2198
|
-
p: timeLongFormatter,
|
|
2199
|
-
P: dateTimeLongFormatter
|
|
2200
|
-
};
|
|
2201
|
-
const longFormatters$1 = longFormatters;
|
|
2202
|
-
var protectedDayOfYearTokens = ["D", "DD"];
|
|
2203
|
-
var protectedWeekYearTokens = ["YY", "YYYY"];
|
|
2204
|
-
function isProtectedDayOfYearToken(token) {
|
|
2205
|
-
return protectedDayOfYearTokens.indexOf(token) !== -1;
|
|
2206
|
-
}
|
|
2207
|
-
function isProtectedWeekYearToken(token) {
|
|
2208
|
-
return protectedWeekYearTokens.indexOf(token) !== -1;
|
|
2209
|
-
}
|
|
2210
|
-
function throwProtectedError(token, format2, input) {
|
|
2211
|
-
if (token === "YYYY") {
|
|
2212
|
-
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
2213
|
-
} else if (token === "YY") {
|
|
2214
|
-
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
2215
|
-
} else if (token === "D") {
|
|
2216
|
-
throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
2217
|
-
} else if (token === "DD") {
|
|
2218
|
-
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
2219
|
-
}
|
|
2220
|
-
}
|
|
2221
|
-
var formatDistanceLocale = {
|
|
2222
|
-
lessThanXSeconds: {
|
|
2223
|
-
one: "less than a second",
|
|
2224
|
-
other: "less than {{count}} seconds"
|
|
2225
|
-
},
|
|
2226
|
-
xSeconds: {
|
|
2227
|
-
one: "1 second",
|
|
2228
|
-
other: "{{count}} seconds"
|
|
2229
|
-
},
|
|
2230
|
-
halfAMinute: "half a minute",
|
|
2231
|
-
lessThanXMinutes: {
|
|
2232
|
-
one: "less than a minute",
|
|
2233
|
-
other: "less than {{count}} minutes"
|
|
2234
|
-
},
|
|
2235
|
-
xMinutes: {
|
|
2236
|
-
one: "1 minute",
|
|
2237
|
-
other: "{{count}} minutes"
|
|
2238
|
-
},
|
|
2239
|
-
aboutXHours: {
|
|
2240
|
-
one: "about 1 hour",
|
|
2241
|
-
other: "about {{count}} hours"
|
|
2242
|
-
},
|
|
2243
|
-
xHours: {
|
|
2244
|
-
one: "1 hour",
|
|
2245
|
-
other: "{{count}} hours"
|
|
2246
|
-
},
|
|
2247
|
-
xDays: {
|
|
2248
|
-
one: "1 day",
|
|
2249
|
-
other: "{{count}} days"
|
|
2250
|
-
},
|
|
2251
|
-
aboutXWeeks: {
|
|
2252
|
-
one: "about 1 week",
|
|
2253
|
-
other: "about {{count}} weeks"
|
|
2254
|
-
},
|
|
2255
|
-
xWeeks: {
|
|
2256
|
-
one: "1 week",
|
|
2257
|
-
other: "{{count}} weeks"
|
|
2258
|
-
},
|
|
2259
|
-
aboutXMonths: {
|
|
2260
|
-
one: "about 1 month",
|
|
2261
|
-
other: "about {{count}} months"
|
|
2262
|
-
},
|
|
2263
|
-
xMonths: {
|
|
2264
|
-
one: "1 month",
|
|
2265
|
-
other: "{{count}} months"
|
|
2266
|
-
},
|
|
2267
|
-
aboutXYears: {
|
|
2268
|
-
one: "about 1 year",
|
|
2269
|
-
other: "about {{count}} years"
|
|
2270
|
-
},
|
|
2271
|
-
xYears: {
|
|
2272
|
-
one: "1 year",
|
|
2273
|
-
other: "{{count}} years"
|
|
2274
|
-
},
|
|
2275
|
-
overXYears: {
|
|
2276
|
-
one: "over 1 year",
|
|
2277
|
-
other: "over {{count}} years"
|
|
2278
|
-
},
|
|
2279
|
-
almostXYears: {
|
|
2280
|
-
one: "almost 1 year",
|
|
2281
|
-
other: "almost {{count}} years"
|
|
2282
|
-
}
|
|
2283
|
-
};
|
|
2284
|
-
var formatDistance = function formatDistance2(token, count, options) {
|
|
2285
|
-
var result;
|
|
2286
|
-
var tokenValue = formatDistanceLocale[token];
|
|
2287
|
-
if (typeof tokenValue === "string") {
|
|
2288
|
-
result = tokenValue;
|
|
2289
|
-
} else if (count === 1) {
|
|
2290
|
-
result = tokenValue.one;
|
|
2291
|
-
} else {
|
|
2292
|
-
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
2293
|
-
}
|
|
2294
|
-
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
2295
|
-
if (options.comparison && options.comparison > 0) {
|
|
2296
|
-
return "in " + result;
|
|
2297
|
-
} else {
|
|
2298
|
-
return result + " ago";
|
|
2299
|
-
}
|
|
2300
|
-
}
|
|
2301
|
-
return result;
|
|
2302
|
-
};
|
|
2303
|
-
const formatDistance$1 = formatDistance;
|
|
2304
|
-
function buildFormatLongFn(args) {
|
|
2305
|
-
return function() {
|
|
2306
|
-
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2307
|
-
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
2308
|
-
var format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
2309
|
-
return format2;
|
|
2310
|
-
};
|
|
2311
|
-
}
|
|
2312
|
-
var dateFormats = {
|
|
2313
|
-
full: "EEEE, MMMM do, y",
|
|
2314
|
-
long: "MMMM do, y",
|
|
2315
|
-
medium: "MMM d, y",
|
|
2316
|
-
short: "MM/dd/yyyy"
|
|
2317
|
-
};
|
|
2318
|
-
var timeFormats = {
|
|
2319
|
-
full: "h:mm:ss a zzzz",
|
|
2320
|
-
long: "h:mm:ss a z",
|
|
2321
|
-
medium: "h:mm:ss a",
|
|
2322
|
-
short: "h:mm a"
|
|
2323
|
-
};
|
|
2324
|
-
var dateTimeFormats = {
|
|
2325
|
-
full: "{{date}} 'at' {{time}}",
|
|
2326
|
-
long: "{{date}} 'at' {{time}}",
|
|
2327
|
-
medium: "{{date}}, {{time}}",
|
|
2328
|
-
short: "{{date}}, {{time}}"
|
|
2329
|
-
};
|
|
2330
|
-
var formatLong = {
|
|
2331
|
-
date: buildFormatLongFn({
|
|
2332
|
-
formats: dateFormats,
|
|
2333
|
-
defaultWidth: "full"
|
|
2334
|
-
}),
|
|
2335
|
-
time: buildFormatLongFn({
|
|
2336
|
-
formats: timeFormats,
|
|
2337
|
-
defaultWidth: "full"
|
|
2338
|
-
}),
|
|
2339
|
-
dateTime: buildFormatLongFn({
|
|
2340
|
-
formats: dateTimeFormats,
|
|
2341
|
-
defaultWidth: "full"
|
|
2342
|
-
})
|
|
2343
|
-
};
|
|
2344
|
-
const formatLong$1 = formatLong;
|
|
2345
|
-
var formatRelativeLocale = {
|
|
2346
|
-
lastWeek: "'last' eeee 'at' p",
|
|
2347
|
-
yesterday: "'yesterday at' p",
|
|
2348
|
-
today: "'today at' p",
|
|
2349
|
-
tomorrow: "'tomorrow at' p",
|
|
2350
|
-
nextWeek: "eeee 'at' p",
|
|
2351
|
-
other: "P"
|
|
2352
|
-
};
|
|
2353
|
-
var formatRelative = function formatRelative2(token, _date, _baseDate, _options) {
|
|
2354
|
-
return formatRelativeLocale[token];
|
|
2355
|
-
};
|
|
2356
|
-
const formatRelative$1 = formatRelative;
|
|
2357
|
-
function buildLocalizeFn(args) {
|
|
2358
|
-
return function(dirtyIndex, options) {
|
|
2359
|
-
var context2 = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
|
|
2360
|
-
var valuesArray;
|
|
2361
|
-
if (context2 === "formatting" && args.formattingValues) {
|
|
2362
|
-
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
2363
|
-
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
|
|
2364
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
2365
|
-
} else {
|
|
2366
|
-
var _defaultWidth = args.defaultWidth;
|
|
2367
|
-
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
|
|
2368
|
-
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
2369
|
-
}
|
|
2370
|
-
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
2371
|
-
return valuesArray[index];
|
|
2372
|
-
};
|
|
2373
|
-
}
|
|
2374
|
-
var eraValues = {
|
|
2375
|
-
narrow: ["B", "A"],
|
|
2376
|
-
abbreviated: ["BC", "AD"],
|
|
2377
|
-
wide: ["Before Christ", "Anno Domini"]
|
|
2378
|
-
};
|
|
2379
|
-
var quarterValues = {
|
|
2380
|
-
narrow: ["1", "2", "3", "4"],
|
|
2381
|
-
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
2382
|
-
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
2383
|
-
};
|
|
2384
|
-
var monthValues = {
|
|
2385
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
2386
|
-
abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
|
2387
|
-
wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
|
|
2388
|
-
};
|
|
2389
|
-
var dayValues = {
|
|
2390
|
-
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
2391
|
-
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
2392
|
-
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
2393
|
-
wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
|
|
2394
|
-
};
|
|
2395
|
-
var dayPeriodValues = {
|
|
2396
|
-
narrow: {
|
|
2397
|
-
am: "a",
|
|
2398
|
-
pm: "p",
|
|
2399
|
-
midnight: "mi",
|
|
2400
|
-
noon: "n",
|
|
2401
|
-
morning: "morning",
|
|
2402
|
-
afternoon: "afternoon",
|
|
2403
|
-
evening: "evening",
|
|
2404
|
-
night: "night"
|
|
2405
|
-
},
|
|
2406
|
-
abbreviated: {
|
|
2407
|
-
am: "AM",
|
|
2408
|
-
pm: "PM",
|
|
2409
|
-
midnight: "midnight",
|
|
2410
|
-
noon: "noon",
|
|
2411
|
-
morning: "morning",
|
|
2412
|
-
afternoon: "afternoon",
|
|
2413
|
-
evening: "evening",
|
|
2414
|
-
night: "night"
|
|
2415
|
-
},
|
|
2416
|
-
wide: {
|
|
2417
|
-
am: "a.m.",
|
|
2418
|
-
pm: "p.m.",
|
|
2419
|
-
midnight: "midnight",
|
|
2420
|
-
noon: "noon",
|
|
2421
|
-
morning: "morning",
|
|
2422
|
-
afternoon: "afternoon",
|
|
2423
|
-
evening: "evening",
|
|
2424
|
-
night: "night"
|
|
2425
|
-
}
|
|
2426
|
-
};
|
|
2427
|
-
var formattingDayPeriodValues = {
|
|
2428
|
-
narrow: {
|
|
2429
|
-
am: "a",
|
|
2430
|
-
pm: "p",
|
|
2431
|
-
midnight: "mi",
|
|
2432
|
-
noon: "n",
|
|
2433
|
-
morning: "in the morning",
|
|
2434
|
-
afternoon: "in the afternoon",
|
|
2435
|
-
evening: "in the evening",
|
|
2436
|
-
night: "at night"
|
|
2437
|
-
},
|
|
2438
|
-
abbreviated: {
|
|
2439
|
-
am: "AM",
|
|
2440
|
-
pm: "PM",
|
|
2441
|
-
midnight: "midnight",
|
|
2442
|
-
noon: "noon",
|
|
2443
|
-
morning: "in the morning",
|
|
2444
|
-
afternoon: "in the afternoon",
|
|
2445
|
-
evening: "in the evening",
|
|
2446
|
-
night: "at night"
|
|
2447
|
-
},
|
|
2448
|
-
wide: {
|
|
2449
|
-
am: "a.m.",
|
|
2450
|
-
pm: "p.m.",
|
|
2451
|
-
midnight: "midnight",
|
|
2452
|
-
noon: "noon",
|
|
2453
|
-
morning: "in the morning",
|
|
2454
|
-
afternoon: "in the afternoon",
|
|
2455
|
-
evening: "in the evening",
|
|
2456
|
-
night: "at night"
|
|
2457
|
-
}
|
|
2458
|
-
};
|
|
2459
|
-
var ordinalNumber = function ordinalNumber2(dirtyNumber, _options) {
|
|
2460
|
-
var number = Number(dirtyNumber);
|
|
2461
|
-
var rem100 = number % 100;
|
|
2462
|
-
if (rem100 > 20 || rem100 < 10) {
|
|
2463
|
-
switch (rem100 % 10) {
|
|
2464
|
-
case 1:
|
|
2465
|
-
return number + "st";
|
|
2466
|
-
case 2:
|
|
2467
|
-
return number + "nd";
|
|
2468
|
-
case 3:
|
|
2469
|
-
return number + "rd";
|
|
2470
|
-
}
|
|
2471
|
-
}
|
|
2472
|
-
return number + "th";
|
|
2473
|
-
};
|
|
2474
|
-
var localize = {
|
|
2475
|
-
ordinalNumber,
|
|
2476
|
-
era: buildLocalizeFn({
|
|
2477
|
-
values: eraValues,
|
|
2478
|
-
defaultWidth: "wide"
|
|
2479
|
-
}),
|
|
2480
|
-
quarter: buildLocalizeFn({
|
|
2481
|
-
values: quarterValues,
|
|
2482
|
-
defaultWidth: "wide",
|
|
2483
|
-
argumentCallback: function argumentCallback(quarter) {
|
|
2484
|
-
return quarter - 1;
|
|
2485
|
-
}
|
|
2486
|
-
}),
|
|
2487
|
-
month: buildLocalizeFn({
|
|
2488
|
-
values: monthValues,
|
|
2489
|
-
defaultWidth: "wide"
|
|
2490
|
-
}),
|
|
2491
|
-
day: buildLocalizeFn({
|
|
2492
|
-
values: dayValues,
|
|
2493
|
-
defaultWidth: "wide"
|
|
2494
|
-
}),
|
|
2495
|
-
dayPeriod: buildLocalizeFn({
|
|
2496
|
-
values: dayPeriodValues,
|
|
2497
|
-
defaultWidth: "wide",
|
|
2498
|
-
formattingValues: formattingDayPeriodValues,
|
|
2499
|
-
defaultFormattingWidth: "wide"
|
|
2500
|
-
})
|
|
2501
|
-
};
|
|
2502
|
-
const localize$1 = localize;
|
|
2503
|
-
function buildMatchFn(args) {
|
|
2504
|
-
return function(string) {
|
|
2505
|
-
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2506
|
-
var width = options.width;
|
|
2507
|
-
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
2508
|
-
var matchResult = string.match(matchPattern);
|
|
2509
|
-
if (!matchResult) {
|
|
2510
|
-
return null;
|
|
2511
|
-
}
|
|
2512
|
-
var matchedString = matchResult[0];
|
|
2513
|
-
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
2514
|
-
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
|
|
2515
|
-
return pattern.test(matchedString);
|
|
2516
|
-
}) : findKey(parsePatterns, function(pattern) {
|
|
2517
|
-
return pattern.test(matchedString);
|
|
2518
|
-
});
|
|
2519
|
-
var value2;
|
|
2520
|
-
value2 = args.valueCallback ? args.valueCallback(key) : key;
|
|
2521
|
-
value2 = options.valueCallback ? options.valueCallback(value2) : value2;
|
|
2522
|
-
var rest = string.slice(matchedString.length);
|
|
2523
|
-
return {
|
|
2524
|
-
value: value2,
|
|
2525
|
-
rest
|
|
2526
|
-
};
|
|
2527
|
-
};
|
|
2528
|
-
}
|
|
2529
|
-
function findKey(object, predicate) {
|
|
2530
|
-
for (var key in object) {
|
|
2531
|
-
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
2532
|
-
return key;
|
|
2533
|
-
}
|
|
2534
|
-
}
|
|
2535
|
-
return void 0;
|
|
2536
|
-
}
|
|
2537
|
-
function findIndex(array, predicate) {
|
|
2538
|
-
for (var key = 0; key < array.length; key++) {
|
|
2539
|
-
if (predicate(array[key])) {
|
|
2540
|
-
return key;
|
|
2541
|
-
}
|
|
2542
|
-
}
|
|
2543
|
-
return void 0;
|
|
2544
|
-
}
|
|
2545
|
-
function buildMatchPatternFn(args) {
|
|
2546
|
-
return function(string) {
|
|
2547
|
-
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2548
|
-
var matchResult = string.match(args.matchPattern);
|
|
2549
|
-
if (!matchResult)
|
|
2550
|
-
return null;
|
|
2551
|
-
var matchedString = matchResult[0];
|
|
2552
|
-
var parseResult = string.match(args.parsePattern);
|
|
2553
|
-
if (!parseResult)
|
|
2554
|
-
return null;
|
|
2555
|
-
var value2 = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
2556
|
-
value2 = options.valueCallback ? options.valueCallback(value2) : value2;
|
|
2557
|
-
var rest = string.slice(matchedString.length);
|
|
2558
|
-
return {
|
|
2559
|
-
value: value2,
|
|
2560
|
-
rest
|
|
2561
|
-
};
|
|
2562
|
-
};
|
|
2563
|
-
}
|
|
2564
|
-
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
2565
|
-
var parseOrdinalNumberPattern = /\d+/i;
|
|
2566
|
-
var matchEraPatterns = {
|
|
2567
|
-
narrow: /^(b|a)/i,
|
|
2568
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
2569
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
2570
|
-
};
|
|
2571
|
-
var parseEraPatterns = {
|
|
2572
|
-
any: [/^b/i, /^(a|c)/i]
|
|
2573
|
-
};
|
|
2574
|
-
var matchQuarterPatterns = {
|
|
2575
|
-
narrow: /^[1234]/i,
|
|
2576
|
-
abbreviated: /^q[1234]/i,
|
|
2577
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
2578
|
-
};
|
|
2579
|
-
var parseQuarterPatterns = {
|
|
2580
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
2581
|
-
};
|
|
2582
|
-
var matchMonthPatterns = {
|
|
2583
|
-
narrow: /^[jfmasond]/i,
|
|
2584
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
2585
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
2586
|
-
};
|
|
2587
|
-
var parseMonthPatterns = {
|
|
2588
|
-
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
2589
|
-
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
2590
|
-
};
|
|
2591
|
-
var matchDayPatterns = {
|
|
2592
|
-
narrow: /^[smtwf]/i,
|
|
2593
|
-
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
2594
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
2595
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
2596
|
-
};
|
|
2597
|
-
var parseDayPatterns = {
|
|
2598
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
2599
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
2600
|
-
};
|
|
2601
|
-
var matchDayPeriodPatterns = {
|
|
2602
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
2603
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
2604
|
-
};
|
|
2605
|
-
var parseDayPeriodPatterns = {
|
|
2606
|
-
any: {
|
|
2607
|
-
am: /^a/i,
|
|
2608
|
-
pm: /^p/i,
|
|
2609
|
-
midnight: /^mi/i,
|
|
2610
|
-
noon: /^no/i,
|
|
2611
|
-
morning: /morning/i,
|
|
2612
|
-
afternoon: /afternoon/i,
|
|
2613
|
-
evening: /evening/i,
|
|
2614
|
-
night: /night/i
|
|
2615
|
-
}
|
|
2616
|
-
};
|
|
2617
|
-
var match = {
|
|
2618
|
-
ordinalNumber: buildMatchPatternFn({
|
|
2619
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
2620
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
2621
|
-
valueCallback: function valueCallback(value2) {
|
|
2622
|
-
return parseInt(value2, 10);
|
|
2623
|
-
}
|
|
2624
|
-
}),
|
|
2625
|
-
era: buildMatchFn({
|
|
2626
|
-
matchPatterns: matchEraPatterns,
|
|
2627
|
-
defaultMatchWidth: "wide",
|
|
2628
|
-
parsePatterns: parseEraPatterns,
|
|
2629
|
-
defaultParseWidth: "any"
|
|
2630
|
-
}),
|
|
2631
|
-
quarter: buildMatchFn({
|
|
2632
|
-
matchPatterns: matchQuarterPatterns,
|
|
2633
|
-
defaultMatchWidth: "wide",
|
|
2634
|
-
parsePatterns: parseQuarterPatterns,
|
|
2635
|
-
defaultParseWidth: "any",
|
|
2636
|
-
valueCallback: function valueCallback2(index) {
|
|
2637
|
-
return index + 1;
|
|
2638
|
-
}
|
|
2639
|
-
}),
|
|
2640
|
-
month: buildMatchFn({
|
|
2641
|
-
matchPatterns: matchMonthPatterns,
|
|
2642
|
-
defaultMatchWidth: "wide",
|
|
2643
|
-
parsePatterns: parseMonthPatterns,
|
|
2644
|
-
defaultParseWidth: "any"
|
|
2645
|
-
}),
|
|
2646
|
-
day: buildMatchFn({
|
|
2647
|
-
matchPatterns: matchDayPatterns,
|
|
2648
|
-
defaultMatchWidth: "wide",
|
|
2649
|
-
parsePatterns: parseDayPatterns,
|
|
2650
|
-
defaultParseWidth: "any"
|
|
2651
|
-
}),
|
|
2652
|
-
dayPeriod: buildMatchFn({
|
|
2653
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
2654
|
-
defaultMatchWidth: "any",
|
|
2655
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
2656
|
-
defaultParseWidth: "any"
|
|
2657
|
-
})
|
|
2658
|
-
};
|
|
2659
|
-
const match$1 = match;
|
|
2660
|
-
var locale = {
|
|
2661
|
-
code: "en-US",
|
|
2662
|
-
formatDistance: formatDistance$1,
|
|
2663
|
-
formatLong: formatLong$1,
|
|
2664
|
-
formatRelative: formatRelative$1,
|
|
2665
|
-
localize: localize$1,
|
|
2666
|
-
match: match$1,
|
|
2667
|
-
options: {
|
|
2668
|
-
weekStartsOn: 0,
|
|
2669
|
-
firstWeekContainsDate: 1
|
|
2670
|
-
}
|
|
2671
|
-
};
|
|
2672
|
-
const defaultLocale = locale;
|
|
2673
|
-
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
2674
|
-
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
2675
|
-
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
2676
|
-
var doubleQuoteRegExp = /''/g;
|
|
2677
|
-
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
2678
|
-
function format(dirtyDate, dirtyFormatStr, options) {
|
|
2679
|
-
var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
|
|
2680
|
-
requiredArgs(2, arguments);
|
|
2681
|
-
var formatStr = String(dirtyFormatStr);
|
|
2682
|
-
var defaultOptions2 = getDefaultOptions();
|
|
2683
|
-
var locale2 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions2.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;
|
|
2684
|
-
var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions2.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
|
|
2685
|
-
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
2686
|
-
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
2687
|
-
}
|
|
2688
|
-
var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions2.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions2.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
|
|
2689
|
-
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
2690
|
-
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
2691
|
-
}
|
|
2692
|
-
if (!locale2.localize) {
|
|
2693
|
-
throw new RangeError("locale must contain localize property");
|
|
2694
|
-
}
|
|
2695
|
-
if (!locale2.formatLong) {
|
|
2696
|
-
throw new RangeError("locale must contain formatLong property");
|
|
2697
|
-
}
|
|
2698
|
-
var originalDate = toDate(dirtyDate);
|
|
2699
|
-
if (!isValid(originalDate)) {
|
|
2700
|
-
throw new RangeError("Invalid time value");
|
|
2701
|
-
}
|
|
2702
|
-
var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
|
|
2703
|
-
var utcDate = subMilliseconds(originalDate, timezoneOffset);
|
|
2704
|
-
var formatterOptions = {
|
|
2705
|
-
firstWeekContainsDate,
|
|
2706
|
-
weekStartsOn,
|
|
2707
|
-
locale: locale2,
|
|
2708
|
-
_originalDate: originalDate
|
|
2709
|
-
};
|
|
2710
|
-
var result = formatStr.match(longFormattingTokensRegExp).map(function(substring) {
|
|
2711
|
-
var firstCharacter = substring[0];
|
|
2712
|
-
if (firstCharacter === "p" || firstCharacter === "P") {
|
|
2713
|
-
var longFormatter = longFormatters$1[firstCharacter];
|
|
2714
|
-
return longFormatter(substring, locale2.formatLong);
|
|
2715
|
-
}
|
|
2716
|
-
return substring;
|
|
2717
|
-
}).join("").match(formattingTokensRegExp).map(function(substring) {
|
|
2718
|
-
if (substring === "''") {
|
|
2719
|
-
return "'";
|
|
2720
|
-
}
|
|
2721
|
-
var firstCharacter = substring[0];
|
|
2722
|
-
if (firstCharacter === "'") {
|
|
2723
|
-
return cleanEscapedString(substring);
|
|
2724
|
-
}
|
|
2725
|
-
var formatter = formatters$1[firstCharacter];
|
|
2726
|
-
if (formatter) {
|
|
2727
|
-
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
|
|
2728
|
-
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
2729
|
-
}
|
|
2730
|
-
if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
|
|
2731
|
-
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
2732
|
-
}
|
|
2733
|
-
return formatter(utcDate, substring, locale2.localize, formatterOptions);
|
|
2734
|
-
}
|
|
2735
|
-
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
2736
|
-
throw new RangeError("Format string contains an unescaped latin alphabet character `" + firstCharacter + "`");
|
|
2737
|
-
}
|
|
2738
|
-
return substring;
|
|
2739
|
-
}).join("");
|
|
2740
|
-
return result;
|
|
2741
|
-
}
|
|
2742
|
-
function cleanEscapedString(input) {
|
|
2743
|
-
var matched = input.match(escapedStringRegExp);
|
|
2744
|
-
if (!matched) {
|
|
2745
|
-
return input;
|
|
2746
|
-
}
|
|
2747
|
-
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
2748
|
-
}
|
|
2749
|
-
function startOfToday() {
|
|
2750
|
-
return startOfDay(Date.now());
|
|
2751
|
-
}
|
|
2752
44
|
const _hoisted_1$a = { class: "operasional-identitas" };
|
|
2753
45
|
const _hoisted_2$6 = {
|
|
2754
46
|
key: 2,
|
|
@@ -2841,7 +133,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
2841
133
|
const initialRegistration = vue.ref({
|
|
2842
134
|
defaultPassword: getDefaultPassword()
|
|
2843
135
|
});
|
|
2844
|
-
const { client: client2 } = useClientHandle();
|
|
136
|
+
const { client: client2 } = vue$1.useClientHandle();
|
|
2845
137
|
const UserModel = identitasModels.models.UserModel;
|
|
2846
138
|
relation.withRelation({
|
|
2847
139
|
field: model.Field.define({
|
|
@@ -2904,7 +196,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
2904
196
|
if (!profile.value.birthDate)
|
|
2905
197
|
return code.CodeUtil.getCode({ chars: 6 });
|
|
2906
198
|
const birthDate = new Date(profile.value.birthDate);
|
|
2907
|
-
return format(birthDate, "yyyy-MM-dd");
|
|
199
|
+
return dateFns.format(birthDate, "yyyy-MM-dd");
|
|
2908
200
|
}
|
|
2909
201
|
function onWillChoose() {
|
|
2910
202
|
isChoosing.value = true;
|
|
@@ -2932,8 +224,8 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
2932
224
|
candidateId.value = userId;
|
|
2933
225
|
state.value = "connect";
|
|
2934
226
|
}
|
|
2935
|
-
} catch (
|
|
2936
|
-
console.log(
|
|
227
|
+
} catch (error) {
|
|
228
|
+
console.log(error);
|
|
2937
229
|
} finally {
|
|
2938
230
|
isLoading.value = false;
|
|
2939
231
|
}
|
|
@@ -3148,11 +440,11 @@ const useAttendanceStore = pinia.defineStore("neu:personalia:attendance", {
|
|
|
3148
440
|
state.checkInId = "";
|
|
3149
441
|
});
|
|
3150
442
|
},
|
|
3151
|
-
async checkInStaff(qrKey,
|
|
3152
|
-
const { client: client2 } = useClientHandle();
|
|
443
|
+
async checkInStaff(qrKey, type, staffId) {
|
|
444
|
+
const { client: client2 } = vue$1.useClientHandle();
|
|
3153
445
|
try {
|
|
3154
446
|
this.qrKey = qrKey;
|
|
3155
|
-
this.type =
|
|
447
|
+
this.type = type;
|
|
3156
448
|
const resp = await client2.mutation(context.GraphUtil.executeOne(tempatModels.models.CheckInModel, {}), {
|
|
3157
449
|
action: "presence",
|
|
3158
450
|
input: {
|
|
@@ -3168,8 +460,8 @@ const useAttendanceStore = pinia.defineStore("neu:personalia:attendance", {
|
|
|
3168
460
|
this.isScanned = true;
|
|
3169
461
|
} else
|
|
3170
462
|
throw new Error("Terjadi kesalahan.");
|
|
3171
|
-
} catch (
|
|
3172
|
-
console.log(
|
|
463
|
+
} catch (error) {
|
|
464
|
+
console.log(error);
|
|
3173
465
|
this.isScanError = true;
|
|
3174
466
|
}
|
|
3175
467
|
}
|
|
@@ -3190,7 +482,7 @@ function withOperasional() {
|
|
|
3190
482
|
const { userId } = pinia.storeToRefs(authStore);
|
|
3191
483
|
const store = useOperasionalStore();
|
|
3192
484
|
const { isLoading, staff } = pinia.storeToRefs(store);
|
|
3193
|
-
const { client: client2 } = useClientHandle();
|
|
485
|
+
const { client: client2 } = vue$1.useClientHandle();
|
|
3194
486
|
const context$1 = {
|
|
3195
487
|
isLoading,
|
|
3196
488
|
staff,
|
|
@@ -3234,24 +526,24 @@ function withOperasional() {
|
|
|
3234
526
|
store.setStaff(items[0]);
|
|
3235
527
|
}
|
|
3236
528
|
}
|
|
3237
|
-
function mitt(
|
|
3238
|
-
return { all:
|
|
3239
|
-
var
|
|
3240
|
-
|
|
3241
|
-
}, off: function(
|
|
3242
|
-
var
|
|
3243
|
-
|
|
3244
|
-
}, emit: function(
|
|
3245
|
-
var
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
}), (
|
|
3249
|
-
|
|
529
|
+
function mitt(n) {
|
|
530
|
+
return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e) {
|
|
531
|
+
var i = n.get(t);
|
|
532
|
+
i ? i.push(e) : n.set(t, [e]);
|
|
533
|
+
}, off: function(t, e) {
|
|
534
|
+
var i = n.get(t);
|
|
535
|
+
i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, []));
|
|
536
|
+
}, emit: function(t, e) {
|
|
537
|
+
var i = n.get(t);
|
|
538
|
+
i && i.slice().map(function(n2) {
|
|
539
|
+
n2(e);
|
|
540
|
+
}), (i = n.get("*")) && i.slice().map(function(n2) {
|
|
541
|
+
n2(t, e);
|
|
3250
542
|
});
|
|
3251
543
|
} };
|
|
3252
544
|
}
|
|
3253
545
|
const bus = mitt();
|
|
3254
|
-
const _withScopeId$2 = (
|
|
546
|
+
const _withScopeId$2 = (n) => (vue.pushScopeId("data-v-533df021"), n = n(), vue.popScopeId(), n);
|
|
3255
547
|
const _hoisted_1$9 = { id: "view-checkIns" };
|
|
3256
548
|
const _hoisted_2$5 = { class: "summary" };
|
|
3257
549
|
const _hoisted_3$1 = { class: "wrapper" };
|
|
@@ -3275,12 +567,12 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
3275
567
|
setup(__props) {
|
|
3276
568
|
const collectionBus = core.useEventBus("neu:tempat:checkIn");
|
|
3277
569
|
const router = vueRouter.useRouter();
|
|
3278
|
-
const { client: client2 } = useClientHandle();
|
|
570
|
+
const { client: client2 } = vue$1.useClientHandle();
|
|
3279
571
|
const authStore = identitasInterfaces.useAuthStore();
|
|
3280
572
|
const { userId } = pinia.storeToRefs(authStore);
|
|
3281
573
|
const { staff } = useOperasional();
|
|
3282
574
|
const attendanceStore = useAttendanceStore();
|
|
3283
|
-
const { isAsking, isScanning, isEntering, isScanError, isScanned, type
|
|
575
|
+
const { isAsking, isScanning, isEntering, isScanError, isScanned, type } = pinia.storeToRefs(attendanceStore);
|
|
3284
576
|
const toast = interfaces.useToastStore();
|
|
3285
577
|
const id = vue.ref("new");
|
|
3286
578
|
const isCheckpoint = vue.ref(false);
|
|
@@ -3324,8 +616,8 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
3324
616
|
// $and: PeriodUtil.getPeriodFilter('checkInAt', new Date().toISOString()),
|
|
3325
617
|
$and: [
|
|
3326
618
|
{ staffId: (_a = staff.value) == null ? void 0 : _a.id },
|
|
3327
|
-
{ checkInAt: { $gte: startOfToday() } },
|
|
3328
|
-
{ checkInAt: { $lte: endOfToday() } }
|
|
619
|
+
{ checkInAt: { $gte: dateFns.startOfToday() } },
|
|
620
|
+
{ checkInAt: { $lte: dateFns.endOfToday() } }
|
|
3329
621
|
]
|
|
3330
622
|
}
|
|
3331
623
|
}
|
|
@@ -3333,7 +625,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
3333
625
|
});
|
|
3334
626
|
function onPresenceIn(data) {
|
|
3335
627
|
isAsking.value = true;
|
|
3336
|
-
|
|
628
|
+
type.value = "in";
|
|
3337
629
|
}
|
|
3338
630
|
function onPresenceCheckpoint() {
|
|
3339
631
|
isCheckpoint.value = true;
|
|
@@ -3341,7 +633,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
3341
633
|
}
|
|
3342
634
|
function onPresenceOut(data) {
|
|
3343
635
|
isAsking.value = true;
|
|
3344
|
-
|
|
636
|
+
type.value = "out";
|
|
3345
637
|
}
|
|
3346
638
|
async function onPresenceHome() {
|
|
3347
639
|
var _a;
|
|
@@ -3356,9 +648,9 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
3356
648
|
}
|
|
3357
649
|
async function onScanned(data) {
|
|
3358
650
|
var _a;
|
|
3359
|
-
id.value = await checkInStaff(data,
|
|
651
|
+
id.value = await checkInStaff(data, type.value, (_a = staff.value) == null ? void 0 : _a.id);
|
|
3360
652
|
}
|
|
3361
|
-
async function checkInStaff(qrKey,
|
|
653
|
+
async function checkInStaff(qrKey, type2, staffId) {
|
|
3362
654
|
const toastId = "neu:personalia:staff:checkIn";
|
|
3363
655
|
let checkInId;
|
|
3364
656
|
console.log("bangunan...", qrKey);
|
|
@@ -3369,7 +661,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
3369
661
|
userId: userId.value,
|
|
3370
662
|
staffId,
|
|
3371
663
|
key: qrKey,
|
|
3372
|
-
type:
|
|
664
|
+
type: type2
|
|
3373
665
|
}
|
|
3374
666
|
}).toPromise();
|
|
3375
667
|
const data = resp.data.executeCheckIn.output;
|
|
@@ -3377,7 +669,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
3377
669
|
if (data) {
|
|
3378
670
|
isScanning.value = false;
|
|
3379
671
|
isScanned.value = true;
|
|
3380
|
-
if (
|
|
672
|
+
if (type2 === "out") {
|
|
3381
673
|
isOut.value = true;
|
|
3382
674
|
}
|
|
3383
675
|
toast.push({
|
|
@@ -3386,15 +678,15 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
3386
678
|
content: "Presensi berhasil.",
|
|
3387
679
|
color: "success"
|
|
3388
680
|
});
|
|
3389
|
-
if (
|
|
681
|
+
if (type2 === "in") {
|
|
3390
682
|
setTimeout(() => {
|
|
3391
683
|
router.go(0);
|
|
3392
684
|
}, 500);
|
|
3393
685
|
}
|
|
3394
686
|
} else
|
|
3395
687
|
throw new Error("Terjadi kesalahan.");
|
|
3396
|
-
} catch (
|
|
3397
|
-
console.log(
|
|
688
|
+
} catch (error) {
|
|
689
|
+
console.log(error);
|
|
3398
690
|
isScanError.value = true;
|
|
3399
691
|
toast.push({
|
|
3400
692
|
id: toastId,
|
|
@@ -3783,7 +1075,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
3783
1075
|
});
|
|
3784
1076
|
const CheckInExternal_vue_vue_type_style_index_0_scoped_9c4a435e_lang = "";
|
|
3785
1077
|
const CheckInExternal = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-9c4a435e"]]);
|
|
3786
|
-
const _withScopeId$1 = (
|
|
1078
|
+
const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-d23b6de5"), n = n(), vue.popScopeId(), n);
|
|
3787
1079
|
const _hoisted_1$6 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode(
|
|
3788
1080
|
"h4",
|
|
3789
1081
|
{ align: "center" },
|
|
@@ -3904,418 +1196,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
|
3904
1196
|
};
|
|
3905
1197
|
}
|
|
3906
1198
|
});
|
|
3907
|
-
|
|
3908
|
-
constructor(a4, b2, c3, d4, f2) {
|
|
3909
|
-
this._legacyCanvasSize = e2.DEFAULT_CANVAS_SIZE;
|
|
3910
|
-
this._preferredCamera = "environment";
|
|
3911
|
-
this._maxScansPerSecond = 25;
|
|
3912
|
-
this._lastScanTimestamp = -1;
|
|
3913
|
-
this._destroyed = this._flashOn = this._paused = this._active = false;
|
|
3914
|
-
this.$video = a4;
|
|
3915
|
-
this.$canvas = document.createElement("canvas");
|
|
3916
|
-
c3 && "object" === typeof c3 ? this._onDecode = b2 : (c3 || d4 || f2 ? console.warn("You're using a deprecated version of the QrScanner constructor which will be removed in the future") : console.warn("Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."), this._legacyOnDecode = b2);
|
|
3917
|
-
b2 = "object" === typeof c3 ? c3 : {};
|
|
3918
|
-
this._onDecodeError = b2.onDecodeError || ("function" === typeof c3 ? c3 : this._onDecodeError);
|
|
3919
|
-
this._calculateScanRegion = b2.calculateScanRegion || ("function" === typeof d4 ? d4 : this._calculateScanRegion);
|
|
3920
|
-
this._preferredCamera = b2.preferredCamera || f2 || this._preferredCamera;
|
|
3921
|
-
this._legacyCanvasSize = "number" === typeof c3 ? c3 : "number" === typeof d4 ? d4 : this._legacyCanvasSize;
|
|
3922
|
-
this._maxScansPerSecond = b2.maxScansPerSecond || this._maxScansPerSecond;
|
|
3923
|
-
this._onPlay = this._onPlay.bind(this);
|
|
3924
|
-
this._onLoadedMetaData = this._onLoadedMetaData.bind(this);
|
|
3925
|
-
this._onVisibilityChange = this._onVisibilityChange.bind(this);
|
|
3926
|
-
this._updateOverlay = this._updateOverlay.bind(this);
|
|
3927
|
-
a4.disablePictureInPicture = true;
|
|
3928
|
-
a4.playsInline = true;
|
|
3929
|
-
a4.muted = true;
|
|
3930
|
-
let h4 = false;
|
|
3931
|
-
a4.hidden && (a4.hidden = false, h4 = true);
|
|
3932
|
-
document.body.contains(a4) || (document.body.appendChild(a4), h4 = true);
|
|
3933
|
-
c3 = a4.parentElement;
|
|
3934
|
-
if (b2.highlightScanRegion || b2.highlightCodeOutline) {
|
|
3935
|
-
d4 = !!b2.overlay;
|
|
3936
|
-
this.$overlay = b2.overlay || document.createElement("div");
|
|
3937
|
-
f2 = this.$overlay.style;
|
|
3938
|
-
f2.position = "absolute";
|
|
3939
|
-
f2.display = "none";
|
|
3940
|
-
f2.pointerEvents = "none";
|
|
3941
|
-
this.$overlay.classList.add("scan-region-highlight");
|
|
3942
|
-
if (!d4 && b2.highlightScanRegion) {
|
|
3943
|
-
this.$overlay.innerHTML = '<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';
|
|
3944
|
-
try {
|
|
3945
|
-
this.$overlay.firstElementChild.animate({ transform: [
|
|
3946
|
-
"scale(.98)",
|
|
3947
|
-
"scale(1.01)"
|
|
3948
|
-
] }, { duration: 400, iterations: Infinity, direction: "alternate", easing: "ease-in-out" });
|
|
3949
|
-
} catch (m4) {
|
|
3950
|
-
}
|
|
3951
|
-
c3.insertBefore(this.$overlay, this.$video.nextSibling);
|
|
3952
|
-
}
|
|
3953
|
-
b2.highlightCodeOutline && (this.$overlay.insertAdjacentHTML("beforeend", '<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'), this.$codeOutlineHighlight = this.$overlay.lastElementChild);
|
|
3954
|
-
}
|
|
3955
|
-
this._scanRegion = this._calculateScanRegion(a4);
|
|
3956
|
-
requestAnimationFrame(() => {
|
|
3957
|
-
let m4 = window.getComputedStyle(a4);
|
|
3958
|
-
"none" === m4.display && (a4.style.setProperty("display", "block", "important"), h4 = true);
|
|
3959
|
-
"visible" !== m4.visibility && (a4.style.setProperty("visibility", "visible", "important"), h4 = true);
|
|
3960
|
-
h4 && (console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."), a4.style.opacity = "0", a4.style.width = "0", a4.style.height = "0", this.$overlay && this.$overlay.parentElement && this.$overlay.parentElement.removeChild(this.$overlay), delete this.$overlay, delete this.$codeOutlineHighlight);
|
|
3961
|
-
this.$overlay && this._updateOverlay();
|
|
3962
|
-
});
|
|
3963
|
-
a4.addEventListener("play", this._onPlay);
|
|
3964
|
-
a4.addEventListener("loadedmetadata", this._onLoadedMetaData);
|
|
3965
|
-
document.addEventListener("visibilitychange", this._onVisibilityChange);
|
|
3966
|
-
window.addEventListener("resize", this._updateOverlay);
|
|
3967
|
-
this._qrEnginePromise = e2.createQrEngine();
|
|
3968
|
-
}
|
|
3969
|
-
static set WORKER_PATH(a4) {
|
|
3970
|
-
console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.");
|
|
3971
|
-
}
|
|
3972
|
-
static async hasCamera() {
|
|
3973
|
-
try {
|
|
3974
|
-
return !!(await e2.listCameras(false)).length;
|
|
3975
|
-
} catch (a4) {
|
|
3976
|
-
return false;
|
|
3977
|
-
}
|
|
3978
|
-
}
|
|
3979
|
-
static async listCameras(a4 = false) {
|
|
3980
|
-
if (!navigator.mediaDevices)
|
|
3981
|
-
return [];
|
|
3982
|
-
let b2 = async () => (await navigator.mediaDevices.enumerateDevices()).filter((d4) => "videoinput" === d4.kind), c3;
|
|
3983
|
-
try {
|
|
3984
|
-
a4 && (await b2()).every((d4) => !d4.label) && (c3 = await navigator.mediaDevices.getUserMedia({ audio: false, video: true }));
|
|
3985
|
-
} catch (d4) {
|
|
3986
|
-
}
|
|
3987
|
-
try {
|
|
3988
|
-
return (await b2()).map((d4, f2) => ({ id: d4.deviceId, label: d4.label || (0 === f2 ? "Default Camera" : `Camera ${f2 + 1}`) }));
|
|
3989
|
-
} finally {
|
|
3990
|
-
c3 && (console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"), e2._stopVideoStream(c3));
|
|
3991
|
-
}
|
|
3992
|
-
}
|
|
3993
|
-
async hasFlash() {
|
|
3994
|
-
let a4;
|
|
3995
|
-
try {
|
|
3996
|
-
if (this.$video.srcObject) {
|
|
3997
|
-
if (!(this.$video.srcObject instanceof MediaStream))
|
|
3998
|
-
return false;
|
|
3999
|
-
a4 = this.$video.srcObject;
|
|
4000
|
-
} else
|
|
4001
|
-
a4 = (await this._getCameraStream()).stream;
|
|
4002
|
-
return "torch" in a4.getVideoTracks()[0].getSettings();
|
|
4003
|
-
} catch (b2) {
|
|
4004
|
-
return false;
|
|
4005
|
-
} finally {
|
|
4006
|
-
a4 && a4 !== this.$video.srcObject && (console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"), e2._stopVideoStream(a4));
|
|
4007
|
-
}
|
|
4008
|
-
}
|
|
4009
|
-
isFlashOn() {
|
|
4010
|
-
return this._flashOn;
|
|
4011
|
-
}
|
|
4012
|
-
async toggleFlash() {
|
|
4013
|
-
this._flashOn ? await this.turnFlashOff() : await this.turnFlashOn();
|
|
4014
|
-
}
|
|
4015
|
-
async turnFlashOn() {
|
|
4016
|
-
if (!this._flashOn && !this._destroyed && (this._flashOn = true, this._active && !this._paused))
|
|
4017
|
-
try {
|
|
4018
|
-
if (!await this.hasFlash())
|
|
4019
|
-
throw "No flash available";
|
|
4020
|
-
await this.$video.srcObject.getVideoTracks()[0].applyConstraints({ advanced: [{ torch: true }] });
|
|
4021
|
-
} catch (a4) {
|
|
4022
|
-
throw this._flashOn = false, a4;
|
|
4023
|
-
}
|
|
4024
|
-
}
|
|
4025
|
-
async turnFlashOff() {
|
|
4026
|
-
this._flashOn && (this._flashOn = false, await this._restartVideoStream());
|
|
4027
|
-
}
|
|
4028
|
-
destroy() {
|
|
4029
|
-
this.$video.removeEventListener("loadedmetadata", this._onLoadedMetaData);
|
|
4030
|
-
this.$video.removeEventListener("play", this._onPlay);
|
|
4031
|
-
document.removeEventListener(
|
|
4032
|
-
"visibilitychange",
|
|
4033
|
-
this._onVisibilityChange
|
|
4034
|
-
);
|
|
4035
|
-
window.removeEventListener("resize", this._updateOverlay);
|
|
4036
|
-
this._destroyed = true;
|
|
4037
|
-
this._flashOn = false;
|
|
4038
|
-
this.stop();
|
|
4039
|
-
e2._postWorkerMessage(this._qrEnginePromise, "close");
|
|
4040
|
-
}
|
|
4041
|
-
async start() {
|
|
4042
|
-
if (this._destroyed)
|
|
4043
|
-
throw Error("The QR scanner can not be started as it had been destroyed.");
|
|
4044
|
-
if (!this._active || this._paused) {
|
|
4045
|
-
if ("https:" !== window.location.protocol && console.warn("The camera stream is only accessible if the page is transferred via https."), this._active = true, !document.hidden)
|
|
4046
|
-
if (this._paused = false, this.$video.srcObject)
|
|
4047
|
-
await this.$video.play();
|
|
4048
|
-
else
|
|
4049
|
-
try {
|
|
4050
|
-
let { stream: a4, facingMode: b2 } = await this._getCameraStream();
|
|
4051
|
-
!this._active || this._paused ? e2._stopVideoStream(a4) : (this._setVideoMirror(b2), this.$video.srcObject = a4, await this.$video.play(), this._flashOn && (this._flashOn = false, this.turnFlashOn().catch(() => {
|
|
4052
|
-
})));
|
|
4053
|
-
} catch (a4) {
|
|
4054
|
-
if (!this._paused)
|
|
4055
|
-
throw this._active = false, a4;
|
|
4056
|
-
}
|
|
4057
|
-
}
|
|
4058
|
-
}
|
|
4059
|
-
stop() {
|
|
4060
|
-
this.pause();
|
|
4061
|
-
this._active = false;
|
|
4062
|
-
}
|
|
4063
|
-
async pause(a4 = false) {
|
|
4064
|
-
this._paused = true;
|
|
4065
|
-
if (!this._active)
|
|
4066
|
-
return true;
|
|
4067
|
-
this.$video.pause();
|
|
4068
|
-
this.$overlay && (this.$overlay.style.display = "none");
|
|
4069
|
-
let b2 = () => {
|
|
4070
|
-
this.$video.srcObject instanceof MediaStream && (e2._stopVideoStream(this.$video.srcObject), this.$video.srcObject = null);
|
|
4071
|
-
};
|
|
4072
|
-
if (a4)
|
|
4073
|
-
return b2(), true;
|
|
4074
|
-
await new Promise((c3) => setTimeout(c3, 300));
|
|
4075
|
-
if (!this._paused)
|
|
4076
|
-
return false;
|
|
4077
|
-
b2();
|
|
4078
|
-
return true;
|
|
4079
|
-
}
|
|
4080
|
-
async setCamera(a4) {
|
|
4081
|
-
a4 !== this._preferredCamera && (this._preferredCamera = a4, await this._restartVideoStream());
|
|
4082
|
-
}
|
|
4083
|
-
static async scanImage(a4, b2, c3, d4, f2 = false, h4 = false) {
|
|
4084
|
-
let m4, n2 = false;
|
|
4085
|
-
b2 && ("scanRegion" in b2 || "qrEngine" in b2 || "canvas" in b2 || "disallowCanvasResizing" in b2 || "alsoTryWithoutScanRegion" in b2 || "returnDetailedScanResult" in b2) ? (m4 = b2.scanRegion, c3 = b2.qrEngine, d4 = b2.canvas, f2 = b2.disallowCanvasResizing || false, h4 = b2.alsoTryWithoutScanRegion || false, n2 = true) : b2 || c3 || d4 || f2 || h4 ? console.warn("You're using a deprecated api for scanImage which will be removed in the future.") : console.warn("Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true.");
|
|
4086
|
-
b2 = !!c3;
|
|
4087
|
-
try {
|
|
4088
|
-
let p2, k2;
|
|
4089
|
-
[c3, p2] = await Promise.all([c3 || e2.createQrEngine(), e2._loadImage(a4)]);
|
|
4090
|
-
[d4, k2] = e2._drawToCanvas(p2, m4, d4, f2);
|
|
4091
|
-
let q2;
|
|
4092
|
-
if (c3 instanceof Worker) {
|
|
4093
|
-
let g2 = c3;
|
|
4094
|
-
b2 || e2._postWorkerMessageSync(g2, "inversionMode", "both");
|
|
4095
|
-
q2 = await new Promise((l2, v2) => {
|
|
4096
|
-
let w2, u3, r, y4 = -1;
|
|
4097
|
-
u3 = (t3) => {
|
|
4098
|
-
t3.data.id === y4 && (g2.removeEventListener("message", u3), g2.removeEventListener("error", r), clearTimeout(w2), null !== t3.data.data ? l2({ data: t3.data.data, cornerPoints: e2._convertPoints(t3.data.cornerPoints, m4) }) : v2(e2.NO_QR_CODE_FOUND));
|
|
4099
|
-
};
|
|
4100
|
-
r = (t3) => {
|
|
4101
|
-
g2.removeEventListener("message", u3);
|
|
4102
|
-
g2.removeEventListener("error", r);
|
|
4103
|
-
clearTimeout(w2);
|
|
4104
|
-
v2("Scanner error: " + (t3 ? t3.message || t3 : "Unknown Error"));
|
|
4105
|
-
};
|
|
4106
|
-
g2.addEventListener("message", u3);
|
|
4107
|
-
g2.addEventListener("error", r);
|
|
4108
|
-
w2 = setTimeout(() => r("timeout"), 1e4);
|
|
4109
|
-
let x3 = k2.getImageData(0, 0, d4.width, d4.height);
|
|
4110
|
-
y4 = e2._postWorkerMessageSync(g2, "decode", x3, [x3.data.buffer]);
|
|
4111
|
-
});
|
|
4112
|
-
} else
|
|
4113
|
-
q2 = await Promise.race([new Promise((g2, l2) => window.setTimeout(() => l2("Scanner error: timeout"), 1e4)), (async () => {
|
|
4114
|
-
try {
|
|
4115
|
-
var [g2] = await c3.detect(d4);
|
|
4116
|
-
if (!g2)
|
|
4117
|
-
throw e2.NO_QR_CODE_FOUND;
|
|
4118
|
-
return { data: g2.rawValue, cornerPoints: e2._convertPoints(g2.cornerPoints, m4) };
|
|
4119
|
-
} catch (l2) {
|
|
4120
|
-
g2 = l2.message || l2;
|
|
4121
|
-
if (/not implemented|service unavailable/.test(g2))
|
|
4122
|
-
return e2._disableBarcodeDetector = true, e2.scanImage(a4, { scanRegion: m4, canvas: d4, disallowCanvasResizing: f2, alsoTryWithoutScanRegion: h4 });
|
|
4123
|
-
throw `Scanner error: ${g2}`;
|
|
4124
|
-
}
|
|
4125
|
-
})()]);
|
|
4126
|
-
return n2 ? q2 : q2.data;
|
|
4127
|
-
} catch (p2) {
|
|
4128
|
-
if (!m4 || !h4)
|
|
4129
|
-
throw p2;
|
|
4130
|
-
let k2 = await e2.scanImage(a4, { qrEngine: c3, canvas: d4, disallowCanvasResizing: f2 });
|
|
4131
|
-
return n2 ? k2 : k2.data;
|
|
4132
|
-
} finally {
|
|
4133
|
-
b2 || e2._postWorkerMessage(c3, "close");
|
|
4134
|
-
}
|
|
4135
|
-
}
|
|
4136
|
-
setGrayscaleWeights(a4, b2, c3, d4 = true) {
|
|
4137
|
-
e2._postWorkerMessage(this._qrEnginePromise, "grayscaleWeights", {
|
|
4138
|
-
red: a4,
|
|
4139
|
-
green: b2,
|
|
4140
|
-
blue: c3,
|
|
4141
|
-
useIntegerApproximation: d4
|
|
4142
|
-
});
|
|
4143
|
-
}
|
|
4144
|
-
setInversionMode(a4) {
|
|
4145
|
-
e2._postWorkerMessage(this._qrEnginePromise, "inversionMode", a4);
|
|
4146
|
-
}
|
|
4147
|
-
static async createQrEngine(a4) {
|
|
4148
|
-
a4 && console.warn("Specifying a worker path is not required and not supported anymore.");
|
|
4149
|
-
a4 = () => Promise.resolve().then(() => qrScannerWorker_min).then((c3) => c3.createWorker());
|
|
4150
|
-
if (!(!e2._disableBarcodeDetector && "BarcodeDetector" in window && BarcodeDetector.getSupportedFormats && (await BarcodeDetector.getSupportedFormats()).includes("qr_code")))
|
|
4151
|
-
return a4();
|
|
4152
|
-
let b2 = navigator.userAgentData;
|
|
4153
|
-
return b2 && b2.brands.some(({ brand: c3 }) => /Chromium/i.test(c3)) && /mac ?OS/i.test(b2.platform) && await b2.getHighEntropyValues(["architecture", "platformVersion"]).then(({ architecture: c3, platformVersion: d4 }) => /arm/i.test(c3 || "arm") && 13 <= parseInt(d4 || "13")).catch(() => true) ? a4() : new BarcodeDetector({ formats: ["qr_code"] });
|
|
4154
|
-
}
|
|
4155
|
-
_onPlay() {
|
|
4156
|
-
this._scanRegion = this._calculateScanRegion(this.$video);
|
|
4157
|
-
this._updateOverlay();
|
|
4158
|
-
this.$overlay && (this.$overlay.style.display = "");
|
|
4159
|
-
this._scanFrame();
|
|
4160
|
-
}
|
|
4161
|
-
_onLoadedMetaData() {
|
|
4162
|
-
this._scanRegion = this._calculateScanRegion(this.$video);
|
|
4163
|
-
this._updateOverlay();
|
|
4164
|
-
}
|
|
4165
|
-
_onVisibilityChange() {
|
|
4166
|
-
document.hidden ? this.pause() : this._active && this.start();
|
|
4167
|
-
}
|
|
4168
|
-
_calculateScanRegion(a4) {
|
|
4169
|
-
let b2 = Math.round(2 / 3 * Math.min(a4.videoWidth, a4.videoHeight));
|
|
4170
|
-
return { x: Math.round((a4.videoWidth - b2) / 2), y: Math.round((a4.videoHeight - b2) / 2), width: b2, height: b2, downScaledWidth: this._legacyCanvasSize, downScaledHeight: this._legacyCanvasSize };
|
|
4171
|
-
}
|
|
4172
|
-
_updateOverlay() {
|
|
4173
|
-
requestAnimationFrame(() => {
|
|
4174
|
-
if (this.$overlay) {
|
|
4175
|
-
var a4 = this.$video, b2 = a4.videoWidth, c3 = a4.videoHeight, d4 = a4.offsetWidth, f2 = a4.offsetHeight, h4 = a4.offsetLeft, m4 = a4.offsetTop, n2 = window.getComputedStyle(a4), p2 = n2.objectFit, k2 = b2 / c3, q2 = d4 / f2;
|
|
4176
|
-
switch (p2) {
|
|
4177
|
-
case "none":
|
|
4178
|
-
var g2 = b2;
|
|
4179
|
-
var l2 = c3;
|
|
4180
|
-
break;
|
|
4181
|
-
case "fill":
|
|
4182
|
-
g2 = d4;
|
|
4183
|
-
l2 = f2;
|
|
4184
|
-
break;
|
|
4185
|
-
default:
|
|
4186
|
-
("cover" === p2 ? k2 > q2 : k2 < q2) ? (l2 = f2, g2 = l2 * k2) : (g2 = d4, l2 = g2 / k2), "scale-down" === p2 && (g2 = Math.min(g2, b2), l2 = Math.min(l2, c3));
|
|
4187
|
-
}
|
|
4188
|
-
var [v2, w2] = n2.objectPosition.split(" ").map((r, y4) => {
|
|
4189
|
-
const x3 = parseFloat(r);
|
|
4190
|
-
return r.endsWith("%") ? (y4 ? f2 - l2 : d4 - g2) * x3 / 100 : x3;
|
|
4191
|
-
});
|
|
4192
|
-
n2 = this._scanRegion.width || b2;
|
|
4193
|
-
q2 = this._scanRegion.height || c3;
|
|
4194
|
-
p2 = this._scanRegion.x || 0;
|
|
4195
|
-
var u3 = this._scanRegion.y || 0;
|
|
4196
|
-
k2 = this.$overlay.style;
|
|
4197
|
-
k2.width = `${n2 / b2 * g2}px`;
|
|
4198
|
-
k2.height = `${q2 / c3 * l2}px`;
|
|
4199
|
-
k2.top = `${m4 + w2 + u3 / c3 * l2}px`;
|
|
4200
|
-
c3 = /scaleX\(-1\)/.test(a4.style.transform);
|
|
4201
|
-
k2.left = `${h4 + (c3 ? d4 - v2 - g2 : v2) + (c3 ? b2 - p2 - n2 : p2) / b2 * g2}px`;
|
|
4202
|
-
k2.transform = a4.style.transform;
|
|
4203
|
-
}
|
|
4204
|
-
});
|
|
4205
|
-
}
|
|
4206
|
-
static _convertPoints(a4, b2) {
|
|
4207
|
-
if (!b2)
|
|
4208
|
-
return a4;
|
|
4209
|
-
let c3 = b2.x || 0, d4 = b2.y || 0, f2 = b2.width && b2.downScaledWidth ? b2.width / b2.downScaledWidth : 1;
|
|
4210
|
-
b2 = b2.height && b2.downScaledHeight ? b2.height / b2.downScaledHeight : 1;
|
|
4211
|
-
for (let h4 of a4)
|
|
4212
|
-
h4.x = h4.x * f2 + c3, h4.y = h4.y * b2 + d4;
|
|
4213
|
-
return a4;
|
|
4214
|
-
}
|
|
4215
|
-
_scanFrame() {
|
|
4216
|
-
!this._active || this.$video.paused || this.$video.ended || ("requestVideoFrameCallback" in this.$video ? this.$video.requestVideoFrameCallback.bind(this.$video) : requestAnimationFrame)(async () => {
|
|
4217
|
-
if (!(1 >= this.$video.readyState)) {
|
|
4218
|
-
var a4 = Date.now() - this._lastScanTimestamp, b2 = 1e3 / this._maxScansPerSecond;
|
|
4219
|
-
a4 < b2 && await new Promise((d4) => setTimeout(d4, b2 - a4));
|
|
4220
|
-
this._lastScanTimestamp = Date.now();
|
|
4221
|
-
try {
|
|
4222
|
-
var c3 = await e2.scanImage(this.$video, { scanRegion: this._scanRegion, qrEngine: this._qrEnginePromise, canvas: this.$canvas });
|
|
4223
|
-
} catch (d4) {
|
|
4224
|
-
if (!this._active)
|
|
4225
|
-
return;
|
|
4226
|
-
this._onDecodeError(d4);
|
|
4227
|
-
}
|
|
4228
|
-
!e2._disableBarcodeDetector || await this._qrEnginePromise instanceof Worker || (this._qrEnginePromise = e2.createQrEngine());
|
|
4229
|
-
c3 ? (this._onDecode ? this._onDecode(c3) : this._legacyOnDecode && this._legacyOnDecode(c3.data), this.$codeOutlineHighlight && (clearTimeout(this._codeOutlineHighlightRemovalTimeout), this._codeOutlineHighlightRemovalTimeout = void 0, this.$codeOutlineHighlight.setAttribute("viewBox", `${this._scanRegion.x || 0} ${this._scanRegion.y || 0} ${this._scanRegion.width || this.$video.videoWidth} ${this._scanRegion.height || this.$video.videoHeight}`), this.$codeOutlineHighlight.firstElementChild.setAttribute(
|
|
4230
|
-
"points",
|
|
4231
|
-
c3.cornerPoints.map(({ x: d4, y: f2 }) => `${d4},${f2}`).join(" ")
|
|
4232
|
-
), this.$codeOutlineHighlight.style.display = "")) : this.$codeOutlineHighlight && !this._codeOutlineHighlightRemovalTimeout && (this._codeOutlineHighlightRemovalTimeout = setTimeout(() => this.$codeOutlineHighlight.style.display = "none", 100));
|
|
4233
|
-
}
|
|
4234
|
-
this._scanFrame();
|
|
4235
|
-
});
|
|
4236
|
-
}
|
|
4237
|
-
_onDecodeError(a4) {
|
|
4238
|
-
a4 !== e2.NO_QR_CODE_FOUND && console.log(a4);
|
|
4239
|
-
}
|
|
4240
|
-
async _getCameraStream() {
|
|
4241
|
-
if (!navigator.mediaDevices)
|
|
4242
|
-
throw "Camera not found.";
|
|
4243
|
-
let a4 = /^(environment|user)$/.test(this._preferredCamera) ? "facingMode" : "deviceId", b2 = [{ width: { min: 1024 } }, { width: { min: 768 } }, {}], c3 = b2.map((d4) => Object.assign({}, d4, { [a4]: { exact: this._preferredCamera } }));
|
|
4244
|
-
for (let d4 of [...c3, ...b2])
|
|
4245
|
-
try {
|
|
4246
|
-
let f2 = await navigator.mediaDevices.getUserMedia({ video: d4, audio: false }), h4 = this._getFacingMode(f2) || (d4.facingMode ? this._preferredCamera : "environment" === this._preferredCamera ? "user" : "environment");
|
|
4247
|
-
return { stream: f2, facingMode: h4 };
|
|
4248
|
-
} catch (f2) {
|
|
4249
|
-
}
|
|
4250
|
-
throw "Camera not found.";
|
|
4251
|
-
}
|
|
4252
|
-
async _restartVideoStream() {
|
|
4253
|
-
let a4 = this._paused;
|
|
4254
|
-
await this.pause(true) && !a4 && this._active && await this.start();
|
|
4255
|
-
}
|
|
4256
|
-
static _stopVideoStream(a4) {
|
|
4257
|
-
for (let b2 of a4.getTracks())
|
|
4258
|
-
b2.stop(), a4.removeTrack(b2);
|
|
4259
|
-
}
|
|
4260
|
-
_setVideoMirror(a4) {
|
|
4261
|
-
this.$video.style.transform = "scaleX(" + ("user" === a4 ? -1 : 1) + ")";
|
|
4262
|
-
}
|
|
4263
|
-
_getFacingMode(a4) {
|
|
4264
|
-
return (a4 = a4.getVideoTracks()[0]) ? /rear|back|environment/i.test(a4.label) ? "environment" : /front|user|face/i.test(a4.label) ? "user" : null : null;
|
|
4265
|
-
}
|
|
4266
|
-
static _drawToCanvas(a4, b2, c3, d4 = false) {
|
|
4267
|
-
c3 = c3 || document.createElement("canvas");
|
|
4268
|
-
let f2 = b2 && b2.x ? b2.x : 0, h4 = b2 && b2.y ? b2.y : 0, m4 = b2 && b2.width ? b2.width : a4.videoWidth || a4.width, n2 = b2 && b2.height ? b2.height : a4.videoHeight || a4.height;
|
|
4269
|
-
d4 || (d4 = b2 && b2.downScaledWidth ? b2.downScaledWidth : m4, b2 = b2 && b2.downScaledHeight ? b2.downScaledHeight : n2, c3.width !== d4 && (c3.width = d4), c3.height !== b2 && (c3.height = b2));
|
|
4270
|
-
b2 = c3.getContext("2d", { alpha: false });
|
|
4271
|
-
b2.imageSmoothingEnabled = false;
|
|
4272
|
-
b2.drawImage(a4, f2, h4, m4, n2, 0, 0, c3.width, c3.height);
|
|
4273
|
-
return [c3, b2];
|
|
4274
|
-
}
|
|
4275
|
-
static async _loadImage(a4) {
|
|
4276
|
-
if (a4 instanceof Image)
|
|
4277
|
-
return await e2._awaitImageLoad(a4), a4;
|
|
4278
|
-
if (a4 instanceof HTMLVideoElement || a4 instanceof HTMLCanvasElement || a4 instanceof SVGImageElement || "OffscreenCanvas" in window && a4 instanceof OffscreenCanvas || "ImageBitmap" in window && a4 instanceof ImageBitmap)
|
|
4279
|
-
return a4;
|
|
4280
|
-
if (a4 instanceof File || a4 instanceof Blob || a4 instanceof URL || "string" === typeof a4) {
|
|
4281
|
-
let b2 = new Image();
|
|
4282
|
-
b2.src = a4 instanceof File || a4 instanceof Blob ? URL.createObjectURL(a4) : a4.toString();
|
|
4283
|
-
try {
|
|
4284
|
-
return await e2._awaitImageLoad(b2), b2;
|
|
4285
|
-
} finally {
|
|
4286
|
-
(a4 instanceof File || a4 instanceof Blob) && URL.revokeObjectURL(b2.src);
|
|
4287
|
-
}
|
|
4288
|
-
} else
|
|
4289
|
-
throw "Unsupported image type.";
|
|
4290
|
-
}
|
|
4291
|
-
static async _awaitImageLoad(a4) {
|
|
4292
|
-
a4.complete && 0 !== a4.naturalWidth || await new Promise((b2, c3) => {
|
|
4293
|
-
let d4 = (f2) => {
|
|
4294
|
-
a4.removeEventListener("load", d4);
|
|
4295
|
-
a4.removeEventListener("error", d4);
|
|
4296
|
-
f2 instanceof ErrorEvent ? c3("Image load error") : b2();
|
|
4297
|
-
};
|
|
4298
|
-
a4.addEventListener("load", d4);
|
|
4299
|
-
a4.addEventListener("error", d4);
|
|
4300
|
-
});
|
|
4301
|
-
}
|
|
4302
|
-
static async _postWorkerMessage(a4, b2, c3, d4) {
|
|
4303
|
-
return e2._postWorkerMessageSync(await a4, b2, c3, d4);
|
|
4304
|
-
}
|
|
4305
|
-
static _postWorkerMessageSync(a4, b2, c3, d4) {
|
|
4306
|
-
if (!(a4 instanceof Worker))
|
|
4307
|
-
return -1;
|
|
4308
|
-
let f2 = e2._workerMessageId++;
|
|
4309
|
-
a4.postMessage({ id: f2, type: b2, data: c3 }, d4);
|
|
4310
|
-
return f2;
|
|
4311
|
-
}
|
|
4312
|
-
}
|
|
4313
|
-
e2.DEFAULT_CANVAS_SIZE = 400;
|
|
4314
|
-
e2.NO_QR_CODE_FOUND = "No QR code found";
|
|
4315
|
-
e2._disableBarcodeDetector = false;
|
|
4316
|
-
e2._workerMessageId = 0;
|
|
4317
|
-
const Scanner = e2;
|
|
4318
|
-
const _withScopeId = (n2) => (vue.pushScopeId("data-v-ef426ef3"), n2 = n2(), vue.popScopeId(), n2);
|
|
1199
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-ef426ef3"), n = n(), vue.popScopeId(), n);
|
|
4319
1200
|
const _hoisted_1$4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode(
|
|
4320
1201
|
"div",
|
|
4321
1202
|
{ class: "invalid-message" },
|
|
@@ -4911,7 +1792,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
4911
1792
|
setup(__props) {
|
|
4912
1793
|
const { values, saveOne, executeOne, syncOne } = context.useSingle();
|
|
4913
1794
|
const StaffModel2 = personaliaModels.models.StaffModel;
|
|
4914
|
-
const { client: client2 } = useClientHandle();
|
|
1795
|
+
const { client: client2 } = vue$1.useClientHandle();
|
|
4915
1796
|
const errors = vue.ref({});
|
|
4916
1797
|
const conflict = vue.ref();
|
|
4917
1798
|
const profile = vue.computed(() => getProfile(values.value));
|
|
@@ -4968,7 +1849,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
4968
1849
|
if (!staff)
|
|
4969
1850
|
return;
|
|
4970
1851
|
const user = staff.user;
|
|
4971
|
-
const branches = (_a = staff.branches) == null ? void 0 : _a.map((
|
|
1852
|
+
const branches = (_a = staff.branches) == null ? void 0 : _a.map((s) => s.name).join(", ");
|
|
4972
1853
|
return {
|
|
4973
1854
|
name: staff.name,
|
|
4974
1855
|
image: user == null ? void 0 : user.image,
|
|
@@ -5582,7 +2463,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
5582
2463
|
...{ name: "TaskWorkButton" },
|
|
5583
2464
|
__name: "TaskWorkButton",
|
|
5584
2465
|
setup(__props) {
|
|
5585
|
-
const { client: client2 } = useClientHandle();
|
|
2466
|
+
const { client: client2 } = vue$1.useClientHandle();
|
|
5586
2467
|
const {
|
|
5587
2468
|
fields,
|
|
5588
2469
|
id,
|
|
@@ -5645,7 +2526,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
5645
2526
|
}).toPromise();
|
|
5646
2527
|
const wrapper = (_b = responseStartTaskWork.data) == null ? void 0 : _b.executeStartTaskWork;
|
|
5647
2528
|
window.location.reload();
|
|
5648
|
-
} catch (
|
|
2529
|
+
} catch (error) {
|
|
5649
2530
|
}
|
|
5650
2531
|
};
|
|
5651
2532
|
const onClickHandlerFinishTaskWork = async () => {
|
|
@@ -5663,7 +2544,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
5663
2544
|
}).toPromise();
|
|
5664
2545
|
const wrapper = (_b = responseFinishedTaskWork.data) == null ? void 0 : _b.executeStartTaskWork;
|
|
5665
2546
|
window.location.reload();
|
|
5666
|
-
} catch (
|
|
2547
|
+
} catch (error) {
|
|
5667
2548
|
}
|
|
5668
2549
|
};
|
|
5669
2550
|
return (_ctx, _cache) => {
|
|
@@ -6211,6 +3092,10 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6211
3092
|
saveOne,
|
|
6212
3093
|
discardChanges
|
|
6213
3094
|
} = context.useSingle();
|
|
3095
|
+
const appStore = context.useAppStore();
|
|
3096
|
+
const objectDef = vue.computed(
|
|
3097
|
+
() => `neu:operasional:submission:${id.value}`
|
|
3098
|
+
);
|
|
6214
3099
|
return (_ctx, _cache) => {
|
|
6215
3100
|
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-submission-single" }, {
|
|
6216
3101
|
default: vue.withCtx(() => [
|
|
@@ -6359,30 +3244,19 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6359
3244
|
icon: "circle-info",
|
|
6360
3245
|
title: "Dokumen"
|
|
6361
3246
|
}, {
|
|
6362
|
-
default: vue.withCtx(() => [
|
|
6363
|
-
vue.createVNode(
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
modelValue: vue.unref(values).document,
|
|
6376
|
-
"onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => vue.unref(values).document = $event)
|
|
6377
|
-
}, vue.unref(fields).document), null, 16, ["modelValue"])) : vue.createCommentVNode("v-if", true),
|
|
6378
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
6379
|
-
modelValue: vue.unref(values).image,
|
|
6380
|
-
"onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => vue.unref(values).image = $event)
|
|
6381
|
-
}, vue.unref(fields).image), null, 16, ["modelValue"])
|
|
6382
|
-
]),
|
|
6383
|
-
_: 1
|
|
6384
|
-
/* STABLE */
|
|
6385
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
3247
|
+
default: vue.withCtx(({ isTouched }) => [
|
|
3248
|
+
vue.createVNode(
|
|
3249
|
+
vue.unref(catatInterfaces.CatatSketchPad),
|
|
3250
|
+
vue.normalizeProps(vue.guardReactiveProps({
|
|
3251
|
+
applicationId: vue.unref(appStore).appId,
|
|
3252
|
+
object: `${objectDef.value}:office`,
|
|
3253
|
+
isReady: vue.unref(isReady) && isTouched,
|
|
3254
|
+
isLoading: vue.unref(isLoading)
|
|
3255
|
+
})),
|
|
3256
|
+
null,
|
|
3257
|
+
16
|
|
3258
|
+
/* FULL_PROPS */
|
|
3259
|
+
)
|
|
6386
3260
|
]),
|
|
6387
3261
|
_: 1
|
|
6388
3262
|
/* STABLE */
|
|
@@ -6398,8 +3272,8 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6398
3272
|
};
|
|
6399
3273
|
}
|
|
6400
3274
|
});
|
|
6401
|
-
const
|
|
6402
|
-
const SubmissionSingle = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
3275
|
+
const SubmissionSingle_vue_vue_type_style_index_0_scoped_39553dbd_lang = "";
|
|
3276
|
+
const SubmissionSingle = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-39553dbd"]]);
|
|
6403
3277
|
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
6404
3278
|
__name: "SubmissionStaff",
|
|
6405
3279
|
setup(__props) {
|
|
@@ -6447,10 +3321,17 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6447
3321
|
vue.watch(
|
|
6448
3322
|
isNew,
|
|
6449
3323
|
(isNew2) => {
|
|
3324
|
+
var _a2;
|
|
6450
3325
|
if (!isNew2)
|
|
6451
3326
|
return;
|
|
6452
3327
|
values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
6453
3328
|
values.value.submissionStaffIds = [staffId];
|
|
3329
|
+
values.value.submissionStaffs = [
|
|
3330
|
+
{
|
|
3331
|
+
id: staffId,
|
|
3332
|
+
flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
|
|
3333
|
+
}
|
|
3334
|
+
];
|
|
6454
3335
|
},
|
|
6455
3336
|
{
|
|
6456
3337
|
immediate: true
|
|
@@ -6460,6 +3341,10 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6460
3341
|
executeOne("raiseSubmission", { submissionId: id.value });
|
|
6461
3342
|
syncOne();
|
|
6462
3343
|
};
|
|
3344
|
+
const appStore = context.useAppStore();
|
|
3345
|
+
const objectDef = vue.computed(
|
|
3346
|
+
() => `neu:operasional:submission:${id.value}`
|
|
3347
|
+
);
|
|
6463
3348
|
return (_ctx, _cache) => {
|
|
6464
3349
|
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-submission-single" }, {
|
|
6465
3350
|
default: vue.withCtx(() => [
|
|
@@ -6637,34 +3522,20 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6637
3522
|
icon: "circle-info",
|
|
6638
3523
|
title: "Dokumen"
|
|
6639
3524
|
}, {
|
|
6640
|
-
default: vue.withCtx(() => [
|
|
6641
|
-
vue.createVNode(
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => vue.unref(values).document = $event)
|
|
6655
|
-
}, vue.unref(fields).document, {
|
|
6656
|
-
"is-disabled": vue.unref(values).status === "raised" || vue.unref(values).status === "processed" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved"
|
|
6657
|
-
}), null, 16, ["modelValue", "is-disabled"])) : vue.createCommentVNode("v-if", true),
|
|
6658
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
6659
|
-
modelValue: vue.unref(values).image,
|
|
6660
|
-
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => vue.unref(values).image = $event)
|
|
6661
|
-
}, vue.unref(fields).image, {
|
|
6662
|
-
"is-disabled": vue.unref(values).status === "raised" || vue.unref(values).status === "processed" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved"
|
|
6663
|
-
}), null, 16, ["modelValue", "is-disabled"])
|
|
6664
|
-
]),
|
|
6665
|
-
_: 1
|
|
6666
|
-
/* STABLE */
|
|
6667
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
3525
|
+
default: vue.withCtx(({ isTouched }) => [
|
|
3526
|
+
vue.createVNode(
|
|
3527
|
+
vue.unref(catatInterfaces.CatatSketchPad),
|
|
3528
|
+
vue.normalizeProps(vue.guardReactiveProps({
|
|
3529
|
+
applicationId: vue.unref(appStore).appId,
|
|
3530
|
+
object: `${objectDef.value}:office`,
|
|
3531
|
+
isReady: vue.unref(isReady) && isTouched,
|
|
3532
|
+
isLoading: vue.unref(isLoading),
|
|
3533
|
+
isReadonly: vue.unref(values).status === "raised" || vue.unref(values).status === "processed" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved"
|
|
3534
|
+
})),
|
|
3535
|
+
null,
|
|
3536
|
+
16
|
|
3537
|
+
/* FULL_PROPS */
|
|
3538
|
+
)
|
|
6668
3539
|
]),
|
|
6669
3540
|
_: 1
|
|
6670
3541
|
/* STABLE */
|
|
@@ -6680,8 +3551,8 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6680
3551
|
};
|
|
6681
3552
|
}
|
|
6682
3553
|
});
|
|
6683
|
-
const
|
|
6684
|
-
const SubmissionStaff = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
3554
|
+
const SubmissionStaff_vue_vue_type_style_index_0_scoped_af256a74_lang = "";
|
|
3555
|
+
const SubmissionStaff = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-af256a74"]]);
|
|
6685
3556
|
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
6686
3557
|
__name: "SubmissionFollowUp",
|
|
6687
3558
|
setup(__props) {
|
|
@@ -6700,6 +3571,10 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6700
3571
|
discardChanges,
|
|
6701
3572
|
executeOne
|
|
6702
3573
|
} = context.useSingle();
|
|
3574
|
+
const appStore = context.useAppStore();
|
|
3575
|
+
const objectDef = vue.computed(
|
|
3576
|
+
() => `neu:operasional:submission:${id.value}`
|
|
3577
|
+
);
|
|
6703
3578
|
return (_ctx, _cache) => {
|
|
6704
3579
|
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-submission-single" }, {
|
|
6705
3580
|
default: vue.withCtx(() => [
|
|
@@ -6839,30 +3714,20 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6839
3714
|
icon: "circle-info",
|
|
6840
3715
|
title: "Dokumen"
|
|
6841
3716
|
}, {
|
|
6842
|
-
default: vue.withCtx(() => [
|
|
6843
|
-
vue.createVNode(
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
"onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => vue.unref(values).document = $event)
|
|
6857
|
-
}, vue.unref(fields).document, { "is-disabled": "" }), null, 16, ["modelValue"])) : vue.createCommentVNode("v-if", true),
|
|
6858
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
6859
|
-
modelValue: vue.unref(values).image,
|
|
6860
|
-
"onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => vue.unref(values).image = $event)
|
|
6861
|
-
}, vue.unref(fields).image, { "is-disabled": "" }), null, 16, ["modelValue"])
|
|
6862
|
-
]),
|
|
6863
|
-
_: 1
|
|
6864
|
-
/* STABLE */
|
|
6865
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
3717
|
+
default: vue.withCtx(({ isTouched }) => [
|
|
3718
|
+
vue.createVNode(
|
|
3719
|
+
vue.unref(catatInterfaces.CatatSketchPad),
|
|
3720
|
+
vue.normalizeProps(vue.guardReactiveProps({
|
|
3721
|
+
applicationId: vue.unref(appStore).appId,
|
|
3722
|
+
object: `${objectDef.value}:office`,
|
|
3723
|
+
isReady: vue.unref(isReady) && isTouched,
|
|
3724
|
+
isLoading: vue.unref(isLoading),
|
|
3725
|
+
isReadonly: true
|
|
3726
|
+
})),
|
|
3727
|
+
null,
|
|
3728
|
+
16
|
|
3729
|
+
/* FULL_PROPS */
|
|
3730
|
+
)
|
|
6866
3731
|
]),
|
|
6867
3732
|
_: 1
|
|
6868
3733
|
/* STABLE */
|
|
@@ -6878,8 +3743,8 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6878
3743
|
};
|
|
6879
3744
|
}
|
|
6880
3745
|
});
|
|
6881
|
-
const
|
|
6882
|
-
const SubmissionFollowUp = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
3746
|
+
const SubmissionFollowUp_vue_vue_type_style_index_0_scoped_6fd14e52_lang = "";
|
|
3747
|
+
const SubmissionFollowUp = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-6fd14e52"]]);
|
|
6883
3748
|
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
6884
3749
|
__name: "SubmissionAudit",
|
|
6885
3750
|
setup(__props) {
|
|
@@ -6927,10 +3792,17 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6927
3792
|
vue.watch(
|
|
6928
3793
|
isNew,
|
|
6929
3794
|
(isNew2) => {
|
|
3795
|
+
var _a2;
|
|
6930
3796
|
if (!isNew2)
|
|
6931
3797
|
return;
|
|
6932
3798
|
values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
6933
3799
|
values.value.submissionStaffIds = [staffId];
|
|
3800
|
+
values.value.submissionStaffs = [
|
|
3801
|
+
{
|
|
3802
|
+
id: staffId,
|
|
3803
|
+
flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
|
|
3804
|
+
}
|
|
3805
|
+
];
|
|
6934
3806
|
},
|
|
6935
3807
|
{
|
|
6936
3808
|
immediate: true
|
|
@@ -6952,6 +3824,10 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6952
3824
|
executeOne("processedSubmission", { submissionId: id.value });
|
|
6953
3825
|
syncOne();
|
|
6954
3826
|
};
|
|
3827
|
+
const appStore = context.useAppStore();
|
|
3828
|
+
const objectDef = vue.computed(
|
|
3829
|
+
() => `neu:operasional:submission:${id.value}`
|
|
3830
|
+
);
|
|
6955
3831
|
return (_ctx, _cache) => {
|
|
6956
3832
|
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-submission-single" }, {
|
|
6957
3833
|
default: vue.withCtx(() => [
|
|
@@ -7187,34 +4063,20 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7187
4063
|
icon: "circle-info",
|
|
7188
4064
|
title: "Dokumen"
|
|
7189
4065
|
}, {
|
|
7190
|
-
default: vue.withCtx(() => [
|
|
7191
|
-
vue.createVNode(
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => vue.unref(values).document = $event)
|
|
7205
|
-
}, vue.unref(fields).document, {
|
|
7206
|
-
"is-disabled": vue.unref(values).status === "processed" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved"
|
|
7207
|
-
}), null, 16, ["modelValue", "is-disabled"])) : vue.createCommentVNode("v-if", true),
|
|
7208
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
7209
|
-
modelValue: vue.unref(values).image,
|
|
7210
|
-
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => vue.unref(values).image = $event)
|
|
7211
|
-
}, vue.unref(fields).image, {
|
|
7212
|
-
"is-disabled": vue.unref(values).status === "processed" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved"
|
|
7213
|
-
}), null, 16, ["modelValue", "is-disabled"])
|
|
7214
|
-
]),
|
|
7215
|
-
_: 1
|
|
7216
|
-
/* STABLE */
|
|
7217
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
4066
|
+
default: vue.withCtx(({ isTouched }) => [
|
|
4067
|
+
vue.createVNode(
|
|
4068
|
+
vue.unref(catatInterfaces.CatatSketchPad),
|
|
4069
|
+
vue.normalizeProps(vue.guardReactiveProps({
|
|
4070
|
+
applicationId: vue.unref(appStore).appId,
|
|
4071
|
+
object: `${objectDef.value}:office`,
|
|
4072
|
+
isReady: vue.unref(isReady) && isTouched,
|
|
4073
|
+
isLoading: vue.unref(isLoading),
|
|
4074
|
+
isReadonly: vue.unref(values).status === "processed" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved"
|
|
4075
|
+
})),
|
|
4076
|
+
null,
|
|
4077
|
+
16
|
|
4078
|
+
/* FULL_PROPS */
|
|
4079
|
+
)
|
|
7218
4080
|
]),
|
|
7219
4081
|
_: 1
|
|
7220
4082
|
/* STABLE */
|
|
@@ -7230,8 +4092,8 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7230
4092
|
};
|
|
7231
4093
|
}
|
|
7232
4094
|
});
|
|
7233
|
-
const
|
|
7234
|
-
const SubmissionAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
4095
|
+
const SubmissionAudit_vue_vue_type_style_index_0_scoped_cf27d98b_lang = "";
|
|
4096
|
+
const SubmissionAudit = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-cf27d98b"]]);
|
|
7235
4097
|
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
7236
4098
|
__name: "SubmissionDecision",
|
|
7237
4099
|
setup(__props) {
|
|
@@ -7279,10 +4141,17 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7279
4141
|
vue.watch(
|
|
7280
4142
|
isNew,
|
|
7281
4143
|
(isNew2) => {
|
|
4144
|
+
var _a2;
|
|
7282
4145
|
if (!isNew2)
|
|
7283
4146
|
return;
|
|
7284
4147
|
values.value.preparedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
7285
4148
|
values.value.submissionStaffIds = [staffId];
|
|
4149
|
+
values.value.submissionStaffs = [
|
|
4150
|
+
{
|
|
4151
|
+
id: staffId,
|
|
4152
|
+
flag: (_a2 = staff.value) == null ? void 0 : _a2.flag
|
|
4153
|
+
}
|
|
4154
|
+
];
|
|
7286
4155
|
},
|
|
7287
4156
|
{
|
|
7288
4157
|
immediate: true
|
|
@@ -7304,6 +4173,10 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7304
4173
|
});
|
|
7305
4174
|
syncOne();
|
|
7306
4175
|
};
|
|
4176
|
+
const appStore = context.useAppStore();
|
|
4177
|
+
const objectDef = vue.computed(
|
|
4178
|
+
() => `neu:operasional:submission:${id.value}`
|
|
4179
|
+
);
|
|
7307
4180
|
return (_ctx, _cache) => {
|
|
7308
4181
|
return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-submission-single" }, {
|
|
7309
4182
|
default: vue.withCtx(() => [
|
|
@@ -7501,34 +4374,20 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7501
4374
|
icon: "circle-info",
|
|
7502
4375
|
title: "Dokumen"
|
|
7503
4376
|
}, {
|
|
7504
|
-
default: vue.withCtx(() => [
|
|
7505
|
-
vue.createVNode(
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => vue.unref(values).document = $event)
|
|
7519
|
-
}, vue.unref(fields).document, {
|
|
7520
|
-
"is-disabled": vue.unref(values).status === "raised" || vue.unref(values).status === "processed" || vue.unref(values).status === "delay" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved"
|
|
7521
|
-
}), null, 16, ["modelValue", "is-disabled"])) : vue.createCommentVNode("v-if", true),
|
|
7522
|
-
vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
|
|
7523
|
-
modelValue: vue.unref(values).image,
|
|
7524
|
-
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => vue.unref(values).image = $event)
|
|
7525
|
-
}, vue.unref(fields).image, {
|
|
7526
|
-
"is-disabled": vue.unref(values).status === "raised" || vue.unref(values).status === "processed" || vue.unref(values).status === "delay" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved"
|
|
7527
|
-
}), null, 16, ["modelValue", "is-disabled"])
|
|
7528
|
-
]),
|
|
7529
|
-
_: 1
|
|
7530
|
-
/* STABLE */
|
|
7531
|
-
}, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
|
|
4377
|
+
default: vue.withCtx(({ isTouched }) => [
|
|
4378
|
+
vue.createVNode(
|
|
4379
|
+
vue.unref(catatInterfaces.CatatSketchPad),
|
|
4380
|
+
vue.normalizeProps(vue.guardReactiveProps({
|
|
4381
|
+
applicationId: vue.unref(appStore).appId,
|
|
4382
|
+
object: `${objectDef.value}:office`,
|
|
4383
|
+
isReady: vue.unref(isReady) && isTouched,
|
|
4384
|
+
isLoading: vue.unref(isLoading),
|
|
4385
|
+
isReadonly: vue.unref(values).status === "raised" || vue.unref(values).status === "processed" || vue.unref(values).status === "delay" || vue.unref(values).status === "approved" || vue.unref(values).status === "monitored" || vue.unref(values).status === "discontinued" || vue.unref(values).status === "resolved"
|
|
4386
|
+
})),
|
|
4387
|
+
null,
|
|
4388
|
+
16
|
|
4389
|
+
/* FULL_PROPS */
|
|
4390
|
+
)
|
|
7532
4391
|
]),
|
|
7533
4392
|
_: 1
|
|
7534
4393
|
/* STABLE */
|
|
@@ -7544,8 +4403,8 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7544
4403
|
};
|
|
7545
4404
|
}
|
|
7546
4405
|
});
|
|
7547
|
-
const
|
|
7548
|
-
const SubmissionDecision = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
4406
|
+
const SubmissionDecision_vue_vue_type_style_index_0_scoped_5b7cb4ef_lang = "";
|
|
4407
|
+
const SubmissionDecision = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-5b7cb4ef"]]);
|
|
7549
4408
|
const SubmissionTypeModel = personaliaModels.models.SubmissionTypeModel;
|
|
7550
4409
|
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
7551
4410
|
...{
|
|
@@ -7675,8 +4534,8 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
7675
4534
|
XxxButton: _sfc_main$v
|
|
7676
4535
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
7677
4536
|
function registerComponents(app) {
|
|
7678
|
-
Object.entries(components).forEach(([
|
|
7679
|
-
client.ComponentUtil.register(app,
|
|
4537
|
+
Object.entries(components).forEach(([name, component2]) => {
|
|
4538
|
+
client.ComponentUtil.register(app, name, component2);
|
|
7680
4539
|
});
|
|
7681
4540
|
}
|
|
7682
4541
|
const graphql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -7687,108 +4546,6 @@ const OperasionalInterfacesPlugin = {
|
|
|
7687
4546
|
registerComponents(app);
|
|
7688
4547
|
}
|
|
7689
4548
|
};
|
|
7690
|
-
const createWorker = () => new Worker(URL.createObjectURL(new Blob([`class x{constructor(a,b){this.width=b;this.height=a.length/b;this.data=a}static createEmpty(a,b){return new x(new Uint8ClampedArray(a*b),a)}get(a,b){return 0>a||a>=this.width||0>b||b>=this.height?!1:!!this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c?1:0}setRegion(a,b,c,d,e){for(let f=b;f<b+d;f++)for(let g=a;g<a+c;g++)this.set(g,f,!!e)}}
|
|
7691
|
-
class A{constructor(a,b,c){this.width=a;a*=b;if(c&&c.length!==a)throw Error("Wrong buffer size");this.data=c||new Uint8ClampedArray(a)}get(a,b){return this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c}}
|
|
7692
|
-
class ba{constructor(a){this.bitOffset=this.byteOffset=0;this.bytes=a}readBits(a){if(1>a||32<a||a>this.available())throw Error("Cannot read "+a.toString()+" bits");var b=0;if(0<this.bitOffset){b=8-this.bitOffset;var c=a<b?a:b;b-=c;b=(this.bytes[this.byteOffset]&255>>8-c<<b)>>b;a-=c;this.bitOffset+=c;8===this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(0<a){for(;8<=a;)b=b<<8|this.bytes[this.byteOffset]&255,this.byteOffset++,a-=8;0<a&&(c=8-a,b=b<<a|(this.bytes[this.byteOffset]&255>>c<<c)>>c,
|
|
7693
|
-
this.bitOffset+=a)}return b}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}var B,C=B||(B={});C.Numeric="numeric";C.Alphanumeric="alphanumeric";C.Byte="byte";C.Kanji="kanji";C.ECI="eci";C.StructuredAppend="structuredappend";var D,E=D||(D={});E[E.Terminator=0]="Terminator";E[E.Numeric=1]="Numeric";E[E.Alphanumeric=2]="Alphanumeric";E[E.Byte=4]="Byte";E[E.Kanji=8]="Kanji";E[E.ECI=7]="ECI";E[E.StructuredAppend=3]="StructuredAppend";let F="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".split("");
|
|
7694
|
-
function ca(a,b){let c=[],d="";b=a.readBits([8,16,16][b]);for(let e=0;e<b;e++){let f=a.readBits(8);c.push(f)}try{d+=decodeURIComponent(c.map(e=>\`%\${("0"+e.toString(16)).substr(-2)}\`).join(""))}catch(e){}return{bytes:c,text:d}}
|
|
7695
|
-
function da(a,b){a=new ba(a);let c=9>=b?0:26>=b?1:2;for(b={text:"",bytes:[],chunks:[],version:b};4<=a.available();){var d=a.readBits(4);if(d===D.Terminator)return b;if(d===D.ECI)0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(7)}):0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(14)}):0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(21)}):b.chunks.push({type:B.ECI,assignmentNumber:-1});else if(d===D.Numeric){var e=a,f=[];d="";for(var g=
|
|
7696
|
-
e.readBits([10,12,14][c]);3<=g;){var h=e.readBits(10);if(1E3<=h)throw Error("Invalid numeric value above 999");var k=Math.floor(h/100),m=Math.floor(h/10)%10;h%=10;f.push(48+k,48+m,48+h);d+=k.toString()+m.toString()+h.toString();g-=3}if(2===g){g=e.readBits(7);if(100<=g)throw Error("Invalid numeric value above 99");e=Math.floor(g/10);g%=10;f.push(48+e,48+g);d+=e.toString()+g.toString()}else if(1===g){e=e.readBits(4);if(10<=e)throw Error("Invalid numeric value above 9");f.push(48+e);d+=e.toString()}b.text+=
|
|
7697
|
-
d;b.bytes.push(...f);b.chunks.push({type:B.Numeric,text:d})}else if(d===D.Alphanumeric){e=a;f=[];d="";for(g=e.readBits([9,11,13][c]);2<=g;)m=e.readBits(11),k=Math.floor(m/45),m%=45,f.push(F[k].charCodeAt(0),F[m].charCodeAt(0)),d+=F[k]+F[m],g-=2;1===g&&(e=e.readBits(6),f.push(F[e].charCodeAt(0)),d+=F[e]);b.text+=d;b.bytes.push(...f);b.chunks.push({type:B.Alphanumeric,text:d})}else if(d===D.Byte)d=ca(a,c),b.text+=d.text,b.bytes.push(...d.bytes),b.chunks.push({type:B.Byte,bytes:d.bytes,text:d.text});
|
|
7698
|
-
else if(d===D.Kanji){f=a;d=[];e=f.readBits([8,10,12][c]);for(g=0;g<e;g++)k=f.readBits(13),k=Math.floor(k/192)<<8|k%192,k=7936>k?k+33088:k+49472,d.push(k>>8,k&255);f=(new TextDecoder("shift-jis")).decode(Uint8Array.from(d));b.text+=f;b.bytes.push(...d);b.chunks.push({type:B.Kanji,bytes:d,text:f})}else d===D.StructuredAppend&&b.chunks.push({type:B.StructuredAppend,currentSequence:a.readBits(4),totalSequence:a.readBits(4),parity:a.readBits(8)})}if(0===a.available()||0===a.readBits(a.available()))return b}
|
|
7699
|
-
class G{constructor(a,b){if(0===b.length)throw Error("No coefficients.");this.field=a;let c=b.length;if(1<c&&0===b[0]){let d=1;for(;d<c&&0===b[d];)d++;if(d===c)this.coefficients=a.zero.coefficients;else for(this.coefficients=new Uint8ClampedArray(c-d),a=0;a<this.coefficients.length;a++)this.coefficients[a]=b[d+a]}else this.coefficients=b}degree(){return this.coefficients.length-1}isZero(){return 0===this.coefficients[0]}getCoefficient(a){return this.coefficients[this.coefficients.length-1-a]}addOrSubtract(a){if(this.isZero())return a;
|
|
7700
|
-
if(a.isZero())return this;let b=this.coefficients;a=a.coefficients;b.length>a.length&&([b,a]=[a,b]);let c=new Uint8ClampedArray(a.length),d=a.length-b.length;for(var e=0;e<d;e++)c[e]=a[e];for(e=d;e<a.length;e++)c[e]=b[e-d]^a[e];return new G(this.field,c)}multiply(a){if(0===a)return this.field.zero;if(1===a)return this;let b=this.coefficients.length,c=new Uint8ClampedArray(b);for(let d=0;d<b;d++)c[d]=this.field.multiply(this.coefficients[d],a);return new G(this.field,c)}multiplyPoly(a){if(this.isZero()||
|
|
7701
|
-
a.isZero())return this.field.zero;let b=this.coefficients,c=b.length;a=a.coefficients;let d=a.length,e=new Uint8ClampedArray(c+d-1);for(let f=0;f<c;f++){let g=b[f];for(let h=0;h<d;h++)e[f+h]=H(e[f+h],this.field.multiply(g,a[h]))}return new G(this.field,e)}multiplyByMonomial(a,b){if(0>a)throw Error("Invalid degree less than 0");if(0===b)return this.field.zero;let c=this.coefficients.length;a=new Uint8ClampedArray(c+a);for(let d=0;d<c;d++)a[d]=this.field.multiply(this.coefficients[d],b);return new G(this.field,
|
|
7702
|
-
a)}evaluateAt(a){let b=0;if(0===a)return this.getCoefficient(0);let c=this.coefficients.length;if(1===a)return this.coefficients.forEach(d=>{b^=d}),b;b=this.coefficients[0];for(let d=1;d<c;d++)b=H(this.field.multiply(a,b),this.coefficients[d]);return b}}function H(a,b){return a^b}
|
|
7703
|
-
class ea{constructor(a,b,c){this.primitive=a;this.size=b;this.generatorBase=c;this.expTable=Array(this.size);this.logTable=Array(this.size);a=1;for(b=0;b<this.size;b++)this.expTable[b]=a,a*=2,a>=this.size&&(a=(a^this.primitive)&this.size-1);for(a=0;a<this.size-1;a++)this.logTable[this.expTable[a]]=a;this.zero=new G(this,Uint8ClampedArray.from([0]));this.one=new G(this,Uint8ClampedArray.from([1]))}multiply(a,b){return 0===a||0===b?0:this.expTable[(this.logTable[a]+this.logTable[b])%(this.size-1)]}inverse(a){if(0===
|
|
7704
|
-
a)throw Error("Can't invert 0");return this.expTable[this.size-this.logTable[a]-1]}buildMonomial(a,b){if(0>a)throw Error("Invalid monomial degree less than 0");if(0===b)return this.zero;a=new Uint8ClampedArray(a+1);a[0]=b;return new G(this,a)}log(a){if(0===a)throw Error("Can't take log(0)");return this.logTable[a]}exp(a){return this.expTable[a]}}
|
|
7705
|
-
function fa(a,b,c,d){b.degree()<c.degree()&&([b,c]=[c,b]);let e=a.zero;for(var f=a.one;c.degree()>=d/2;){var g=b;let h=e;b=c;e=f;if(b.isZero())return null;c=g;f=a.zero;g=b.getCoefficient(b.degree());for(g=a.inverse(g);c.degree()>=b.degree()&&!c.isZero();){let k=c.degree()-b.degree(),m=a.multiply(c.getCoefficient(c.degree()),g);f=f.addOrSubtract(a.buildMonomial(k,m));c=c.addOrSubtract(b.multiplyByMonomial(k,m))}f=f.multiplyPoly(e).addOrSubtract(h);if(c.degree()>=b.degree())return null}d=f.getCoefficient(0);
|
|
7706
|
-
if(0===d)return null;a=a.inverse(d);return[f.multiply(a),c.multiply(a)]}
|
|
7707
|
-
function ha(a,b){let c=new Uint8ClampedArray(a.length);c.set(a);a=new ea(285,256,0);var d=new G(a,c),e=new Uint8ClampedArray(b),f=!1;for(var g=0;g<b;g++){var h=d.evaluateAt(a.exp(g+a.generatorBase));e[e.length-1-g]=h;0!==h&&(f=!0)}if(!f)return c;d=new G(a,e);d=fa(a,a.buildMonomial(b,1),d,b);if(null===d)return null;b=d[0];g=b.degree();if(1===g)b=[b.getCoefficient(1)];else{e=Array(g);f=0;for(h=1;h<a.size&&f<g;h++)0===b.evaluateAt(h)&&(e[f]=a.inverse(h),f++);b=f!==g?null:e}if(null==b)return null;e=d[1];
|
|
7708
|
-
f=b.length;d=Array(f);for(g=0;g<f;g++){h=a.inverse(b[g]);let k=1;for(let m=0;m<f;m++)g!==m&&(k=a.multiply(k,H(1,a.multiply(b[m],h))));d[g]=a.multiply(e.evaluateAt(h),a.inverse(k));0!==a.generatorBase&&(d[g]=a.multiply(d[g],h))}for(e=0;e<b.length;e++){f=c.length-1-a.log(b[e]);if(0>f)return null;c[f]^=d[e]}return c}
|
|
7709
|
-
let I=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,
|
|
7710
|
-
dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,
|
|
7711
|
-
ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},
|
|
7712
|
-
{infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,
|
|
7713
|
-
34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,
|
|
7714
|
-
ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},
|
|
7715
|
-
{numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},
|
|
7716
|
-
{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,
|
|
7717
|
-
dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,
|
|
7718
|
-
dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},
|
|
7719
|
-
{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},
|
|
7720
|
-
{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},
|
|
7721
|
-
{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,
|
|
7722
|
-
ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,
|
|
7723
|
-
74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,
|
|
7724
|
-
versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,
|
|
7725
|
-
dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,
|
|
7726
|
-
dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},
|
|
7727
|
-
{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},
|
|
7728
|
-
{numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},
|
|
7729
|
-
{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},
|
|
7730
|
-
{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},
|
|
7731
|
-
{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,
|
|
7732
|
-
ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,
|
|
7733
|
-
dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,
|
|
7734
|
-
dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},
|
|
7735
|
-
{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},
|
|
7736
|
-
{numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,
|
|
7737
|
-
ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,
|
|
7738
|
-
26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},
|
|
7739
|
-
{infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},
|
|
7740
|
-
{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,
|
|
7741
|
-
dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},
|
|
7742
|
-
{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,
|
|
7743
|
-
dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},
|
|
7744
|
-
{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,
|
|
7745
|
-
dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},
|
|
7746
|
-
{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,
|
|
7747
|
-
dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],
|
|
7748
|
-
errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,
|
|
7749
|
-
versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},
|
|
7750
|
-
{numBlocks:61,dataCodewordsPerBlock:16}]}]}];function J(a,b){a^=b;for(b=0;a;)b++,a&=a-1;return b}function K(a,b){return b<<1|a}
|
|
7751
|
-
let ia=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,
|
|
7752
|
-
dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,
|
|
7753
|
-
formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,
|
|
7754
|
-
dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],ja=[a=>0===(a.y+a.x)%2,a=>0===a.y%2,a=>0===a.x%3,a=>0===(a.y+a.x)%3,a=>0===(Math.floor(a.y/2)+Math.floor(a.x/3))%2,a=>0===a.x*a.y%
|
|
7755
|
-
2+a.x*a.y%3,a=>0===(a.y*a.x%2+a.y*a.x%3)%2,a=>0===((a.y+a.x)%2+a.y*a.x%3)%2];
|
|
7756
|
-
function ka(a,b,c){c=ja[c.dataMask];let d=a.height;var e=17+4*b.versionNumber;let f=x.createEmpty(e,e);f.setRegion(0,0,9,9,!0);f.setRegion(e-8,0,8,9,!0);f.setRegion(0,e-8,9,8,!0);for(var g of b.alignmentPatternCenters)for(var h of b.alignmentPatternCenters)6===g&&6===h||6===g&&h===e-7||g===e-7&&6===h||f.setRegion(g-2,h-2,5,5,!0);f.setRegion(6,9,1,e-17,!0);f.setRegion(9,6,e-17,1,!0);6<b.versionNumber&&(f.setRegion(e-11,0,3,6,!0),f.setRegion(0,e-11,6,3,!0));b=[];h=g=0;e=!0;for(let k=d-1;0<k;k-=2){6===
|
|
7757
|
-
k&&k--;for(let m=0;m<d;m++){let l=e?d-1-m:m;for(let n=0;2>n;n++){let q=k-n;if(!f.get(q,l)){h++;let r=a.get(q,l);c({y:l,x:q})&&(r=!r);g=g<<1|r;8===h&&(b.push(g),g=h=0)}}}e=!e}return b}
|
|
7758
|
-
function la(a){var b=a.height,c=Math.floor((b-17)/4);if(6>=c)return I[c-1];c=0;for(var d=5;0<=d;d--)for(var e=b-9;e>=b-11;e--)c=K(a.get(e,d),c);d=0;for(e=5;0<=e;e--)for(let g=b-9;g>=b-11;g--)d=K(a.get(e,g),d);a=Infinity;let f;for(let g of I){if(g.infoBits===c||g.infoBits===d)return g;b=J(c,g.infoBits);b<a&&(f=g,a=b);b=J(d,g.infoBits);b<a&&(f=g,a=b)}if(3>=a)return f}
|
|
7759
|
-
function ma(a){let b=0;for(var c=0;8>=c;c++)6!==c&&(b=K(a.get(c,8),b));for(c=7;0<=c;c--)6!==c&&(b=K(a.get(8,c),b));var d=a.height;c=0;for(var e=d-1;e>=d-7;e--)c=K(a.get(8,e),c);for(e=d-8;e<d;e++)c=K(a.get(e,8),c);a=Infinity;d=null;for(let {bits:f,formatInfo:g}of ia){if(f===b||f===c)return g;e=J(b,f);e<a&&(d=g,a=e);b!==c&&(e=J(c,f),e<a&&(d=g,a=e))}return 3>=a?d:null}
|
|
7760
|
-
function na(a,b,c){let d=b.errorCorrectionLevels[c],e=[],f=0;d.ecBlocks.forEach(h=>{for(let k=0;k<h.numBlocks;k++)e.push({numDataCodewords:h.dataCodewordsPerBlock,codewords:[]}),f+=h.dataCodewordsPerBlock+d.ecCodewordsPerBlock});if(a.length<f)return null;a=a.slice(0,f);b=d.ecBlocks[0].dataCodewordsPerBlock;for(c=0;c<b;c++)for(var g of e)g.codewords.push(a.shift());if(1<d.ecBlocks.length)for(g=d.ecBlocks[0].numBlocks,b=d.ecBlocks[1].numBlocks,c=0;c<b;c++)e[g+c].codewords.push(a.shift());for(;0<a.length;)for(let h of e)h.codewords.push(a.shift());
|
|
7761
|
-
return e}function L(a){let b=la(a);if(!b)return null;var c=ma(a);if(!c)return null;a=ka(a,b,c);var d=na(a,b,c.errorCorrectionLevel);if(!d)return null;c=d.reduce((e,f)=>e+f.numDataCodewords,0);c=new Uint8ClampedArray(c);a=0;for(let e of d){d=ha(e.codewords,e.codewords.length-e.numDataCodewords);if(!d)return null;for(let f=0;f<e.numDataCodewords;f++)c[a++]=d[f]}try{return da(c,b.versionNumber)}catch(e){return null}}
|
|
7762
|
-
function M(a,b,c,d){var e=a.x-b.x+c.x-d.x;let f=a.y-b.y+c.y-d.y;if(0===e&&0===f)return{a11:b.x-a.x,a12:b.y-a.y,a13:0,a21:c.x-b.x,a22:c.y-b.y,a23:0,a31:a.x,a32:a.y,a33:1};let g=b.x-c.x;var h=d.x-c.x;let k=b.y-c.y,m=d.y-c.y;c=g*m-h*k;h=(e*m-h*f)/c;e=(g*f-e*k)/c;return{a11:b.x-a.x+h*b.x,a12:b.y-a.y+h*b.y,a13:h,a21:d.x-a.x+e*d.x,a22:d.y-a.y+e*d.y,a23:e,a31:a.x,a32:a.y,a33:1}}
|
|
7763
|
-
function oa(a,b,c,d){a=M(a,b,c,d);return{a11:a.a22*a.a33-a.a23*a.a32,a12:a.a13*a.a32-a.a12*a.a33,a13:a.a12*a.a23-a.a13*a.a22,a21:a.a23*a.a31-a.a21*a.a33,a22:a.a11*a.a33-a.a13*a.a31,a23:a.a13*a.a21-a.a11*a.a23,a31:a.a21*a.a32-a.a22*a.a31,a32:a.a12*a.a31-a.a11*a.a32,a33:a.a11*a.a22-a.a12*a.a21}}
|
|
7764
|
-
function pa(a,b){var c=oa({x:3.5,y:3.5},{x:b.dimension-3.5,y:3.5},{x:b.dimension-6.5,y:b.dimension-6.5},{x:3.5,y:b.dimension-3.5}),d=M(b.topLeft,b.topRight,b.alignmentPattern,b.bottomLeft),e=d.a11*c.a11+d.a21*c.a12+d.a31*c.a13,f=d.a12*c.a11+d.a22*c.a12+d.a32*c.a13,g=d.a13*c.a11+d.a23*c.a12+d.a33*c.a13,h=d.a11*c.a21+d.a21*c.a22+d.a31*c.a23,k=d.a12*c.a21+d.a22*c.a22+d.a32*c.a23,m=d.a13*c.a21+d.a23*c.a22+d.a33*c.a23,l=d.a11*c.a31+d.a21*c.a32+d.a31*c.a33,n=d.a12*c.a31+d.a22*c.a32+d.a32*c.a33,q=d.a13*
|
|
7765
|
-
c.a31+d.a23*c.a32+d.a33*c.a33;c=x.createEmpty(b.dimension,b.dimension);d=(r,u)=>{const p=g*r+m*u+q;return{x:(e*r+h*u+l)/p,y:(f*r+k*u+n)/p}};for(let r=0;r<b.dimension;r++)for(let u=0;u<b.dimension;u++){let p=d(u+.5,r+.5);c.set(u,r,a.get(Math.floor(p.x),Math.floor(p.y)))}return{matrix:c,mappingFunction:d}}let N=(a,b)=>Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2));function O(a){return a.reduce((b,c)=>b+c)}
|
|
7766
|
-
function qa(a,b,c){let d=N(a,b),e=N(b,c),f=N(a,c),g,h,k;e>=d&&e>=f?[g,h,k]=[b,a,c]:f>=e&&f>=d?[g,h,k]=[a,b,c]:[g,h,k]=[a,c,b];0>(k.x-h.x)*(g.y-h.y)-(k.y-h.y)*(g.x-h.x)&&([g,k]=[k,g]);return{bottomLeft:g,topLeft:h,topRight:k}}
|
|
7767
|
-
function ra(a,b,c,d){d=(O(P(a,c,d,5))/7+O(P(a,b,d,5))/7+O(P(c,a,d,5))/7+O(P(b,a,d,5))/7)/4;if(1>d)throw Error("Invalid module size");b=Math.round(N(a,b)/d);a=Math.round(N(a,c)/d);a=Math.floor((b+a)/2)+7;switch(a%4){case 0:a++;break;case 2:a--}return{dimension:a,moduleSize:d}}
|
|
7768
|
-
function Q(a,b,c,d){let e=[{x:Math.floor(a.x),y:Math.floor(a.y)}];var f=Math.abs(b.y-a.y)>Math.abs(b.x-a.x);if(f){var g=Math.floor(a.y);var h=Math.floor(a.x);a=Math.floor(b.y);b=Math.floor(b.x)}else g=Math.floor(a.x),h=Math.floor(a.y),a=Math.floor(b.x),b=Math.floor(b.y);let k=Math.abs(a-g),m=Math.abs(b-h),l=Math.floor(-k/2),n=g<a?1:-1,q=h<b?1:-1,r=!0;for(let u=g,p=h;u!==a+n;u+=n){g=f?p:u;h=f?u:p;if(c.get(g,h)!==r&&(r=!r,e.push({x:g,y:h}),e.length===d+1))break;l+=m;if(0<l){if(p===b)break;p+=q;l-=k}}c=
|
|
7769
|
-
[];for(f=0;f<d;f++)e[f]&&e[f+1]?c.push(N(e[f],e[f+1])):c.push(0);return c}function P(a,b,c,d){let e=b.y-a.y,f=b.x-a.x;b=Q(a,b,c,Math.ceil(d/2));a=Q(a,{x:a.x-f,y:a.y-e},c,Math.ceil(d/2));c=b.shift()+a.shift()-1;return a.concat(c).concat(...b)}function R(a,b){let c=O(a)/O(b),d=0;b.forEach((e,f)=>{d+=Math.pow(a[f]-e*c,2)});return{averageSize:c,error:d}}
|
|
7770
|
-
function S(a,b,c){try{let d=P(a,{x:-1,y:a.y},c,b.length),e=P(a,{x:a.x,y:-1},c,b.length),f=P(a,{x:Math.max(0,a.x-a.y)-1,y:Math.max(0,a.y-a.x)-1},c,b.length),g=P(a,{x:Math.min(c.width,a.x+a.y)+1,y:Math.min(c.height,a.y+a.x)+1},c,b.length),h=R(d,b),k=R(e,b),m=R(f,b),l=R(g,b),n=(h.averageSize+k.averageSize+m.averageSize+l.averageSize)/4;return Math.sqrt(h.error*h.error+k.error*k.error+m.error*m.error+l.error*l.error)+(Math.pow(h.averageSize-n,2)+Math.pow(k.averageSize-n,2)+Math.pow(m.averageSize-n,2)+
|
|
7771
|
-
Math.pow(l.averageSize-n,2))/n}catch(d){return Infinity}}function T(a,b){for(var c=Math.round(b.x);a.get(c,Math.round(b.y));)c--;for(var d=Math.round(b.x);a.get(d,Math.round(b.y));)d++;c=(c+d)/2;for(d=Math.round(b.y);a.get(Math.round(c),d);)d--;for(b=Math.round(b.y);a.get(Math.round(c),b);)b++;return{x:c,y:(d+b)/2}}
|
|
7772
|
-
function sa(a){var b=[],c=[];let d=[];var e=[];for(let p=0;p<=a.height;p++){var f=0,g=!1;let t=[0,0,0,0,0];for(let v=-1;v<=a.width;v++){var h=a.get(v,p);if(h===g)f++;else{t=[t[1],t[2],t[3],t[4],f];f=1;g=h;var k=O(t)/7;k=Math.abs(t[0]-k)<k&&Math.abs(t[1]-k)<k&&Math.abs(t[2]-3*k)<3*k&&Math.abs(t[3]-k)<k&&Math.abs(t[4]-k)<k&&!h;var m=O(t.slice(-3))/3;h=Math.abs(t[2]-m)<m&&Math.abs(t[3]-m)<m&&Math.abs(t[4]-m)<m&&h;if(k){let z=v-t[3]-t[4],y=z-t[2];k={startX:y,endX:z,y:p};m=c.filter(w=>y>=w.bottom.startX&&
|
|
7773
|
-
y<=w.bottom.endX||z>=w.bottom.startX&&y<=w.bottom.endX||y<=w.bottom.startX&&z>=w.bottom.endX&&1.5>t[2]/(w.bottom.endX-w.bottom.startX)&&.5<t[2]/(w.bottom.endX-w.bottom.startX));0<m.length?m[0].bottom=k:c.push({top:k,bottom:k})}if(h){let z=v-t[4],y=z-t[3];h={startX:y,y:p,endX:z};k=e.filter(w=>y>=w.bottom.startX&&y<=w.bottom.endX||z>=w.bottom.startX&&y<=w.bottom.endX||y<=w.bottom.startX&&z>=w.bottom.endX&&1.5>t[2]/(w.bottom.endX-w.bottom.startX)&&.5<t[2]/(w.bottom.endX-w.bottom.startX));0<k.length?
|
|
7774
|
-
k[0].bottom=h:e.push({top:h,bottom:h})}}}b.push(...c.filter(v=>v.bottom.y!==p&&2<=v.bottom.y-v.top.y));c=c.filter(v=>v.bottom.y===p);d.push(...e.filter(v=>v.bottom.y!==p));e=e.filter(v=>v.bottom.y===p)}b.push(...c.filter(p=>2<=p.bottom.y-p.top.y));d.push(...e);c=[];for(var l of b)2>l.bottom.y-l.top.y||(b=(l.top.startX+l.top.endX+l.bottom.startX+l.bottom.endX)/4,e=(l.top.y+l.bottom.y+1)/2,a.get(Math.round(b),Math.round(e))&&(f=[l.top.endX-l.top.startX,l.bottom.endX-l.bottom.startX,l.bottom.y-l.top.y+
|
|
7775
|
-
1],f=O(f)/f.length,g=S({x:Math.round(b),y:Math.round(e)},[1,1,3,1,1],a),c.push({score:g,x:b,y:e,size:f})));if(3>c.length)return null;c.sort((p,t)=>p.score-t.score);l=[];for(b=0;b<Math.min(c.length,5);++b){e=c[b];f=[];for(var n of c)n!==e&&f.push(Object.assign(Object.assign({},n),{score:n.score+Math.pow(n.size-e.size,2)/e.size}));f.sort((p,t)=>p.score-t.score);l.push({points:[e,f[0],f[1]],score:e.score+f[0].score+f[1].score})}l.sort((p,t)=>p.score-t.score);let {topRight:q,topLeft:r,bottomLeft:u}=qa(...l[0].points);
|
|
7776
|
-
l=U(a,d,q,r,u);n=[];l&&n.push({alignmentPattern:{x:l.alignmentPattern.x,y:l.alignmentPattern.y},bottomLeft:{x:u.x,y:u.y},dimension:l.dimension,topLeft:{x:r.x,y:r.y},topRight:{x:q.x,y:q.y}});l=T(a,q);b=T(a,r);c=T(a,u);(a=U(a,d,l,b,c))&&n.push({alignmentPattern:{x:a.alignmentPattern.x,y:a.alignmentPattern.y},bottomLeft:{x:c.x,y:c.y},topLeft:{x:b.x,y:b.y},topRight:{x:l.x,y:l.y},dimension:a.dimension});return 0===n.length?null:n}
|
|
7777
|
-
function U(a,b,c,d,e){let f,g;try{({dimension:f,moduleSize:g}=ra(d,c,e,a))}catch(l){return null}var h=c.x-d.x+e.x,k=c.y-d.y+e.y;c=(N(d,e)+N(d,c))/2/g;e=1-3/c;let m={x:d.x+e*(h-d.x),y:d.y+e*(k-d.y)};b=b.map(l=>{const n=(l.top.startX+l.top.endX+l.bottom.startX+l.bottom.endX)/4;l=(l.top.y+l.bottom.y+1)/2;if(a.get(Math.floor(n),Math.floor(l))){var q=S({x:Math.floor(n),y:Math.floor(l)},[1,1,1],a)+N({x:n,y:l},m);return{x:n,y:l,score:q}}}).filter(l=>!!l).sort((l,n)=>l.score-n.score);return{alignmentPattern:15<=
|
|
7778
|
-
c&&b.length?b[0]:m,dimension:f}}
|
|
7779
|
-
function V(a){var b=sa(a);if(!b)return null;for(let e of b){b=pa(a,e);var c=b.matrix;if(null==c)c=null;else{var d=L(c);if(d)c=d;else{for(d=0;d<c.width;d++)for(let f=d+1;f<c.height;f++)c.get(d,f)!==c.get(f,d)&&(c.set(d,f,!c.get(d,f)),c.set(f,d,!c.get(f,d)));c=L(c)}}if(c)return{binaryData:c.bytes,data:c.text,chunks:c.chunks,version:c.version,location:{topRightCorner:b.mappingFunction(e.dimension,0),topLeftCorner:b.mappingFunction(0,0),bottomRightCorner:b.mappingFunction(e.dimension,e.dimension),bottomLeftCorner:b.mappingFunction(0,
|
|
7780
|
-
e.dimension),topRightFinderPattern:e.topRight,topLeftFinderPattern:e.topLeft,bottomLeftFinderPattern:e.bottomLeft,bottomRightAlignmentPattern:e.alignmentPattern},matrix:b.matrix}}return null}let ta={inversionAttempts:"attemptBoth",greyScaleWeights:{red:.2126,green:.7152,blue:.0722,useIntegerApproximation:!1},canOverwriteImage:!0};function W(a,b){Object.keys(b).forEach(c=>{a[c]=b[c]})}
|
|
7781
|
-
function X(a,b,c,d={}){let e=Object.create(null);W(e,ta);W(e,d);d="onlyInvert"===e.inversionAttempts||"invertFirst"===e.inversionAttempts;var f="attemptBoth"===e.inversionAttempts||d;var g=e.greyScaleWeights,h=e.canOverwriteImage,k=b*c;if(a.length!==4*k)throw Error("Malformed data passed to binarizer.");var m=0;if(h){var l=new Uint8ClampedArray(a.buffer,m,k);m+=k}l=new A(b,c,l);if(g.useIntegerApproximation)for(var n=0;n<c;n++)for(var q=0;q<b;q++){var r=4*(n*b+q);l.set(q,n,g.red*a[r]+g.green*a[r+1]+
|
|
7782
|
-
g.blue*a[r+2]+128>>8)}else for(n=0;n<c;n++)for(q=0;q<b;q++)r=4*(n*b+q),l.set(q,n,g.red*a[r]+g.green*a[r+1]+g.blue*a[r+2]);g=Math.ceil(b/8);n=Math.ceil(c/8);q=g*n;if(h){var u=new Uint8ClampedArray(a.buffer,m,q);m+=q}u=new A(g,n,u);for(q=0;q<n;q++)for(r=0;r<g;r++){var p=Infinity,t=0;for(var v=0;8>v;v++)for(let w=0;8>w;w++){let aa=l.get(8*r+w,8*q+v);p=Math.min(p,aa);t=Math.max(t,aa)}v=(p+t)/2;v=Math.min(255,1.11*v);24>=t-p&&(v=p/2,0<q&&0<r&&(t=(u.get(r,q-1)+2*u.get(r-1,q)+u.get(r-1,q-1))/4,p<t&&(v=t)));
|
|
7783
|
-
u.set(r,q,v)}h?(q=new Uint8ClampedArray(a.buffer,m,k),m+=k,q=new x(q,b)):q=x.createEmpty(b,c);r=null;f&&(h?(a=new Uint8ClampedArray(a.buffer,m,k),r=new x(a,b)):r=x.createEmpty(b,c));for(b=0;b<n;b++)for(a=0;a<g;a++){c=g-3;c=2>a?2:a>c?c:a;h=n-3;h=2>b?2:b>h?h:b;k=0;for(m=-2;2>=m;m++)for(p=-2;2>=p;p++)k+=u.get(c+m,h+p);c=k/25;for(h=0;8>h;h++)for(k=0;8>k;k++)m=8*a+h,p=8*b+k,t=l.get(m,p),q.set(m,p,t<=c),f&&r.set(m,p,!(t<=c))}f=f?{binarized:q,inverted:r}:{binarized:q};let {binarized:z,inverted:y}=f;(f=V(d?
|
|
7784
|
-
y:z))||"attemptBoth"!==e.inversionAttempts&&"invertFirst"!==e.inversionAttempts||(f=V(d?z:y));return f}X.default=X;let Y="dontInvert",Z={red:77,green:150,blue:29,useIntegerApproximation:!0};
|
|
7785
|
-
self.onmessage=a=>{let b=a.data.id,c=a.data.data;switch(a.data.type){case "decode":(a=X(c.data,c.width,c.height,{inversionAttempts:Y,greyScaleWeights:Z}))?self.postMessage({id:b,type:"qrResult",data:a.data,cornerPoints:[a.location.topLeftCorner,a.location.topRightCorner,a.location.bottomRightCorner,a.location.bottomLeftCorner]}):self.postMessage({id:b,type:"qrResult",data:null});break;case "grayscaleWeights":Z.red=c.red;Z.green=c.green;Z.blue=c.blue;Z.useIntegerApproximation=c.useIntegerApproximation;
|
|
7786
|
-
break;case "inversionMode":switch(c){case "original":Y="dontInvert";break;case "invert":Y="onlyInvert";break;case "both":Y="attemptBoth";break;default:throw Error("Invalid inversion mode");}break;case "close":self.close()}}
|
|
7787
|
-
`]), { type: "application/javascript" }));
|
|
7788
|
-
const qrScannerWorker_min = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7789
|
-
__proto__: null,
|
|
7790
|
-
createWorker
|
|
7791
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
7792
4549
|
exports.CheckInAccess = CheckInAccess;
|
|
7793
4550
|
exports.CheckInCollection = _sfc_main$m;
|
|
7794
4551
|
exports.CheckInExternal = CheckInExternal;
|