@everymatrix/casino-tournaments-limited-controller 1.15.5 → 1.15.7
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.
@@ -205,7 +205,7 @@
|
|
205
205
|
function schedule_update() {
|
206
206
|
if (!update_scheduled) {
|
207
207
|
update_scheduled = true;
|
208
|
-
resolved_promise.then(flush);
|
208
|
+
resolved_promise.then(flush$1);
|
209
209
|
}
|
210
210
|
}
|
211
211
|
function add_render_callback(fn) {
|
@@ -231,7 +231,7 @@
|
|
231
231
|
// function, guarantees this behavior.
|
232
232
|
const seen_callbacks = new Set();
|
233
233
|
let flushidx = 0; // Do *not* move this inside the flush() function
|
234
|
-
function flush() {
|
234
|
+
function flush$1() {
|
235
235
|
// Do not reenter flush while dirty components are updated, as this can
|
236
236
|
// result in an infinite loop. Instead, let the inner flush handle it.
|
237
237
|
// Reentrancy is ok afterwards for bindings etc.
|
@@ -408,7 +408,7 @@
|
|
408
408
|
if (options.intro)
|
409
409
|
transition_in(component.$$.fragment);
|
410
410
|
mount_component(component, options.target, options.anchor, options.customElement);
|
411
|
-
flush();
|
411
|
+
flush$1();
|
412
412
|
}
|
413
413
|
set_current_component(parent_component);
|
414
414
|
}
|
@@ -526,7 +526,7 @@
|
|
526
526
|
return num.toString().padStart(2, '0');
|
527
527
|
}
|
528
528
|
|
529
|
-
function formatDate(date) {
|
529
|
+
function formatDate$1(date) {
|
530
530
|
|
531
531
|
const _date = new Date(date);
|
532
532
|
|
@@ -652,7 +652,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
652
652
|
customElements.define("casino-tournaments-limited-controller-loader", Private_loader);
|
653
653
|
|
654
654
|
/* eslint-disable no-prototype-builtins */
|
655
|
-
var g
|
655
|
+
var g =
|
656
656
|
(typeof globalThis !== 'undefined' && globalThis) ||
|
657
657
|
(typeof self !== 'undefined' && self) ||
|
658
658
|
// eslint-disable-next-line no-undef
|
@@ -660,11 +660,11 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
660
660
|
{};
|
661
661
|
|
662
662
|
var support = {
|
663
|
-
searchParams: 'URLSearchParams' in g
|
664
|
-
iterable: 'Symbol' in g
|
663
|
+
searchParams: 'URLSearchParams' in g,
|
664
|
+
iterable: 'Symbol' in g && 'iterator' in Symbol,
|
665
665
|
blob:
|
666
|
-
'FileReader' in g
|
667
|
-
'Blob' in g
|
666
|
+
'FileReader' in g &&
|
667
|
+
'Blob' in g &&
|
668
668
|
(function() {
|
669
669
|
try {
|
670
670
|
new Blob();
|
@@ -673,8 +673,8 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
673
673
|
return false
|
674
674
|
}
|
675
675
|
})(),
|
676
|
-
formData: 'FormData' in g
|
677
|
-
arrayBuffer: 'ArrayBuffer' in g
|
676
|
+
formData: 'FormData' in g,
|
677
|
+
arrayBuffer: 'ArrayBuffer' in g
|
678
678
|
};
|
679
679
|
|
680
680
|
function isDataView(obj) {
|
@@ -1035,7 +1035,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
1035
1035
|
this.method = normalizeMethod(options.method || this.method || 'GET');
|
1036
1036
|
this.mode = options.mode || this.mode || null;
|
1037
1037
|
this.signal = options.signal || this.signal || (function () {
|
1038
|
-
if ('AbortController' in g
|
1038
|
+
if ('AbortController' in g) {
|
1039
1039
|
var ctrl = new AbortController();
|
1040
1040
|
return ctrl.signal;
|
1041
1041
|
}
|
@@ -1161,7 +1161,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
1161
1161
|
return new Response(null, {status: status, headers: {location: url}})
|
1162
1162
|
};
|
1163
1163
|
|
1164
|
-
var DOMException = g
|
1164
|
+
var DOMException = g.DOMException;
|
1165
1165
|
try {
|
1166
1166
|
new DOMException();
|
1167
1167
|
} catch (err) {
|
@@ -1191,10 +1191,16 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
1191
1191
|
|
1192
1192
|
xhr.onload = function() {
|
1193
1193
|
var options = {
|
1194
|
-
status: xhr.status,
|
1195
1194
|
statusText: xhr.statusText,
|
1196
1195
|
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
|
1197
1196
|
};
|
1197
|
+
// This check if specifically for when a user fetches a file locally from the file system
|
1198
|
+
// Only if the status is out of a normal range
|
1199
|
+
if (request.url.startsWith('file://') && (xhr.status < 200 || xhr.status > 599)) {
|
1200
|
+
options.status = 200;
|
1201
|
+
} else {
|
1202
|
+
options.status = xhr.status;
|
1203
|
+
}
|
1198
1204
|
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
|
1199
1205
|
var body = 'response' in xhr ? xhr.response : xhr.responseText;
|
1200
1206
|
setTimeout(function() {
|
@@ -1210,7 +1216,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
1210
1216
|
|
1211
1217
|
xhr.ontimeout = function() {
|
1212
1218
|
setTimeout(function() {
|
1213
|
-
reject(new TypeError('Network request
|
1219
|
+
reject(new TypeError('Network request timed out'));
|
1214
1220
|
}, 0);
|
1215
1221
|
};
|
1216
1222
|
|
@@ -1222,7 +1228,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
1222
1228
|
|
1223
1229
|
function fixUrl(url) {
|
1224
1230
|
try {
|
1225
|
-
return url === '' && g
|
1231
|
+
return url === '' && g.location.href ? g.location.href : url
|
1226
1232
|
} catch (e) {
|
1227
1233
|
return url
|
1228
1234
|
}
|
@@ -1246,7 +1252,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
1246
1252
|
}
|
1247
1253
|
}
|
1248
1254
|
|
1249
|
-
if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g
|
1255
|
+
if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
|
1250
1256
|
var names = [];
|
1251
1257
|
Object.getOwnPropertyNames(init.headers).forEach(function(name) {
|
1252
1258
|
names.push(normalizeName(name));
|
@@ -1280,11 +1286,11 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
1280
1286
|
|
1281
1287
|
fetch$1.polyfill = true;
|
1282
1288
|
|
1283
|
-
if (!g
|
1284
|
-
g
|
1285
|
-
g
|
1286
|
-
g
|
1287
|
-
g
|
1289
|
+
if (!g.fetch) {
|
1290
|
+
g.fetch = fetch$1;
|
1291
|
+
g.Headers = Headers;
|
1292
|
+
g.Request = Request;
|
1293
|
+
g.Response = Response;
|
1288
1294
|
}
|
1289
1295
|
|
1290
1296
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
@@ -6251,14 +6257,444 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
6251
6257
|
return IntlMessageFormat;
|
6252
6258
|
}());
|
6253
6259
|
|
6254
|
-
|
6255
|
-
|
6256
|
-
|
6257
|
-
|
6258
|
-
|
6259
|
-
|
6260
|
+
function delve(obj, fullKey) {
|
6261
|
+
if (fullKey == null)
|
6262
|
+
return void 0;
|
6263
|
+
if (fullKey in obj) {
|
6264
|
+
return obj[fullKey];
|
6265
|
+
}
|
6266
|
+
const keys = fullKey.split(".");
|
6267
|
+
let result = obj;
|
6268
|
+
for (let p = 0; p < keys.length; p++) {
|
6269
|
+
if (typeof result === "object") {
|
6270
|
+
if (p > 0) {
|
6271
|
+
const partialKey = keys.slice(p, keys.length).join(".");
|
6272
|
+
if (partialKey in result) {
|
6273
|
+
result = result[partialKey];
|
6274
|
+
break;
|
6275
|
+
}
|
6276
|
+
}
|
6277
|
+
result = result[keys[p]];
|
6278
|
+
} else {
|
6279
|
+
result = void 0;
|
6280
|
+
}
|
6281
|
+
}
|
6282
|
+
return result;
|
6283
|
+
}
|
6284
|
+
|
6285
|
+
const lookupCache = {};
|
6286
|
+
const addToCache = (path, locale, message) => {
|
6287
|
+
if (!message)
|
6288
|
+
return message;
|
6289
|
+
if (!(locale in lookupCache))
|
6290
|
+
lookupCache[locale] = {};
|
6291
|
+
if (!(path in lookupCache[locale]))
|
6292
|
+
lookupCache[locale][path] = message;
|
6293
|
+
return message;
|
6294
|
+
};
|
6295
|
+
const lookup = (path, refLocale) => {
|
6296
|
+
if (refLocale == null)
|
6297
|
+
return void 0;
|
6298
|
+
if (refLocale in lookupCache && path in lookupCache[refLocale]) {
|
6299
|
+
return lookupCache[refLocale][path];
|
6300
|
+
}
|
6301
|
+
const locales = getPossibleLocales(refLocale);
|
6302
|
+
for (let i = 0; i < locales.length; i++) {
|
6303
|
+
const locale = locales[i];
|
6304
|
+
const message = getMessageFromDictionary(locale, path);
|
6305
|
+
if (message) {
|
6306
|
+
return addToCache(path, refLocale, message);
|
6307
|
+
}
|
6308
|
+
}
|
6309
|
+
return void 0;
|
6310
|
+
};
|
6311
|
+
|
6312
|
+
let dictionary;
|
6313
|
+
const $dictionary = writable({});
|
6314
|
+
function getLocaleDictionary(locale) {
|
6315
|
+
return dictionary[locale] || null;
|
6316
|
+
}
|
6317
|
+
function hasLocaleDictionary(locale) {
|
6318
|
+
return locale in dictionary;
|
6319
|
+
}
|
6320
|
+
function getMessageFromDictionary(locale, id) {
|
6321
|
+
if (!hasLocaleDictionary(locale)) {
|
6322
|
+
return null;
|
6323
|
+
}
|
6324
|
+
const localeDictionary = getLocaleDictionary(locale);
|
6325
|
+
const match = delve(localeDictionary, id);
|
6326
|
+
return match;
|
6327
|
+
}
|
6328
|
+
function getClosestAvailableLocale(refLocale) {
|
6329
|
+
if (refLocale == null)
|
6330
|
+
return void 0;
|
6331
|
+
const relatedLocales = getPossibleLocales(refLocale);
|
6332
|
+
for (let i = 0; i < relatedLocales.length; i++) {
|
6333
|
+
const locale = relatedLocales[i];
|
6334
|
+
if (hasLocaleDictionary(locale)) {
|
6335
|
+
return locale;
|
6336
|
+
}
|
6337
|
+
}
|
6338
|
+
return void 0;
|
6339
|
+
}
|
6340
|
+
function addMessages(locale, ...partials) {
|
6341
|
+
delete lookupCache[locale];
|
6342
|
+
$dictionary.update((d) => {
|
6343
|
+
d[locale] = cjs.all([d[locale] || {}, ...partials]);
|
6344
|
+
return d;
|
6345
|
+
});
|
6346
|
+
}
|
6347
|
+
derived(
|
6348
|
+
[$dictionary],
|
6349
|
+
([dictionary2]) => Object.keys(dictionary2)
|
6350
|
+
);
|
6351
|
+
$dictionary.subscribe((newDictionary) => dictionary = newDictionary);
|
6352
|
+
|
6353
|
+
const queue = {};
|
6354
|
+
function removeLoaderFromQueue(locale, loader) {
|
6355
|
+
queue[locale].delete(loader);
|
6356
|
+
if (queue[locale].size === 0) {
|
6357
|
+
delete queue[locale];
|
6358
|
+
}
|
6359
|
+
}
|
6360
|
+
function getLocaleQueue(locale) {
|
6361
|
+
return queue[locale];
|
6362
|
+
}
|
6363
|
+
function getLocalesQueues(locale) {
|
6364
|
+
return getPossibleLocales(locale).map((localeItem) => {
|
6365
|
+
const localeQueue = getLocaleQueue(localeItem);
|
6366
|
+
return [localeItem, localeQueue ? [...localeQueue] : []];
|
6367
|
+
}).filter(([, localeQueue]) => localeQueue.length > 0);
|
6368
|
+
}
|
6369
|
+
function hasLocaleQueue(locale) {
|
6370
|
+
if (locale == null)
|
6371
|
+
return false;
|
6372
|
+
return getPossibleLocales(locale).some(
|
6373
|
+
(localeQueue) => {
|
6374
|
+
var _a;
|
6375
|
+
return (_a = getLocaleQueue(localeQueue)) == null ? void 0 : _a.size;
|
6376
|
+
}
|
6377
|
+
);
|
6378
|
+
}
|
6379
|
+
function loadLocaleQueue(locale, localeQueue) {
|
6380
|
+
const allLoadersPromise = Promise.all(
|
6381
|
+
localeQueue.map((loader) => {
|
6382
|
+
removeLoaderFromQueue(locale, loader);
|
6383
|
+
return loader().then((partial) => partial.default || partial);
|
6384
|
+
})
|
6385
|
+
);
|
6386
|
+
return allLoadersPromise.then((partials) => addMessages(locale, ...partials));
|
6387
|
+
}
|
6388
|
+
const activeFlushes = {};
|
6389
|
+
function flush(locale) {
|
6390
|
+
if (!hasLocaleQueue(locale)) {
|
6391
|
+
if (locale in activeFlushes) {
|
6392
|
+
return activeFlushes[locale];
|
6393
|
+
}
|
6394
|
+
return Promise.resolve();
|
6395
|
+
}
|
6396
|
+
const queues = getLocalesQueues(locale);
|
6397
|
+
activeFlushes[locale] = Promise.all(
|
6398
|
+
queues.map(
|
6399
|
+
([localeName, localeQueue]) => loadLocaleQueue(localeName, localeQueue)
|
6400
|
+
)
|
6401
|
+
).then(() => {
|
6402
|
+
if (hasLocaleQueue(locale)) {
|
6403
|
+
return flush(locale);
|
6404
|
+
}
|
6405
|
+
delete activeFlushes[locale];
|
6406
|
+
});
|
6407
|
+
return activeFlushes[locale];
|
6408
|
+
}
|
6409
|
+
const defaultFormats = {
|
6410
|
+
number: {
|
6411
|
+
scientific: { notation: "scientific" },
|
6412
|
+
engineering: { notation: "engineering" },
|
6413
|
+
compactLong: { notation: "compact", compactDisplay: "long" },
|
6414
|
+
compactShort: { notation: "compact", compactDisplay: "short" }
|
6415
|
+
},
|
6416
|
+
date: {
|
6417
|
+
short: { month: "numeric", day: "numeric", year: "2-digit" },
|
6418
|
+
medium: { month: "short", day: "numeric", year: "numeric" },
|
6419
|
+
long: { month: "long", day: "numeric", year: "numeric" },
|
6420
|
+
full: { weekday: "long", month: "long", day: "numeric", year: "numeric" }
|
6421
|
+
},
|
6422
|
+
time: {
|
6423
|
+
short: { hour: "numeric", minute: "numeric" },
|
6424
|
+
medium: { hour: "numeric", minute: "numeric", second: "numeric" },
|
6425
|
+
long: {
|
6426
|
+
hour: "numeric",
|
6427
|
+
minute: "numeric",
|
6428
|
+
second: "numeric",
|
6429
|
+
timeZoneName: "short"
|
6430
|
+
},
|
6431
|
+
full: {
|
6432
|
+
hour: "numeric",
|
6433
|
+
minute: "numeric",
|
6434
|
+
second: "numeric",
|
6435
|
+
timeZoneName: "short"
|
6436
|
+
}
|
6437
|
+
}
|
6438
|
+
};
|
6439
|
+
const defaultOptions = {
|
6440
|
+
fallbackLocale: null,
|
6441
|
+
loadingDelay: 200,
|
6442
|
+
formats: defaultFormats,
|
6443
|
+
warnOnMissingMessages: true,
|
6444
|
+
handleMissingMessage: void 0,
|
6445
|
+
ignoreTag: true
|
6446
|
+
};
|
6447
|
+
const options = defaultOptions;
|
6448
|
+
function getOptions() {
|
6449
|
+
return options;
|
6450
|
+
}
|
6451
|
+
|
6452
|
+
const $isLoading = writable(false);
|
6453
|
+
|
6454
|
+
var __defProp$1 = Object.defineProperty;
|
6455
|
+
var __defProps = Object.defineProperties;
|
6456
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
6457
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
6458
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
6459
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
6460
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
6461
|
+
var __spreadValues$1 = (a, b) => {
|
6462
|
+
for (var prop in b || (b = {}))
|
6463
|
+
if (__hasOwnProp$1.call(b, prop))
|
6464
|
+
__defNormalProp$1(a, prop, b[prop]);
|
6465
|
+
if (__getOwnPropSymbols$1)
|
6466
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
6467
|
+
if (__propIsEnum$1.call(b, prop))
|
6468
|
+
__defNormalProp$1(a, prop, b[prop]);
|
6469
|
+
}
|
6470
|
+
return a;
|
6471
|
+
};
|
6472
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
6473
|
+
let current;
|
6474
|
+
const internalLocale = writable(null);
|
6475
|
+
function getSubLocales(refLocale) {
|
6476
|
+
return refLocale.split("-").map((_, i, arr) => arr.slice(0, i + 1).join("-")).reverse();
|
6477
|
+
}
|
6478
|
+
function getPossibleLocales(refLocale, fallbackLocale = getOptions().fallbackLocale) {
|
6479
|
+
const locales = getSubLocales(refLocale);
|
6480
|
+
if (fallbackLocale) {
|
6481
|
+
return [.../* @__PURE__ */ new Set([...locales, ...getSubLocales(fallbackLocale)])];
|
6482
|
+
}
|
6483
|
+
return locales;
|
6484
|
+
}
|
6485
|
+
function getCurrentLocale() {
|
6486
|
+
return current != null ? current : void 0;
|
6487
|
+
}
|
6488
|
+
internalLocale.subscribe((newLocale) => {
|
6489
|
+
current = newLocale != null ? newLocale : void 0;
|
6490
|
+
if (typeof window !== "undefined" && newLocale != null) {
|
6491
|
+
document.documentElement.setAttribute("lang", newLocale);
|
6492
|
+
}
|
6493
|
+
});
|
6494
|
+
const set = (newLocale) => {
|
6495
|
+
if (newLocale && getClosestAvailableLocale(newLocale) && hasLocaleQueue(newLocale)) {
|
6496
|
+
const { loadingDelay } = getOptions();
|
6497
|
+
let loadingTimer;
|
6498
|
+
if (typeof window !== "undefined" && getCurrentLocale() != null && loadingDelay) {
|
6499
|
+
loadingTimer = window.setTimeout(
|
6500
|
+
() => $isLoading.set(true),
|
6501
|
+
loadingDelay
|
6502
|
+
);
|
6503
|
+
} else {
|
6504
|
+
$isLoading.set(true);
|
6505
|
+
}
|
6506
|
+
return flush(newLocale).then(() => {
|
6507
|
+
internalLocale.set(newLocale);
|
6508
|
+
}).finally(() => {
|
6509
|
+
clearTimeout(loadingTimer);
|
6510
|
+
$isLoading.set(false);
|
6511
|
+
});
|
6512
|
+
}
|
6513
|
+
return internalLocale.set(newLocale);
|
6514
|
+
};
|
6515
|
+
const $locale = __spreadProps(__spreadValues$1({}, internalLocale), {
|
6516
|
+
set
|
6517
|
+
});
|
6518
|
+
|
6519
|
+
const monadicMemoize = (fn) => {
|
6520
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
6521
|
+
const memoizedFn = (arg) => {
|
6522
|
+
const cacheKey = JSON.stringify(arg);
|
6523
|
+
if (cacheKey in cache) {
|
6524
|
+
return cache[cacheKey];
|
6525
|
+
}
|
6526
|
+
return cache[cacheKey] = fn(arg);
|
6527
|
+
};
|
6528
|
+
return memoizedFn;
|
6529
|
+
};
|
6260
6530
|
|
6261
|
-
|
6531
|
+
var __defProp = Object.defineProperty;
|
6532
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
6533
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6534
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
6535
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
6536
|
+
var __spreadValues = (a, b) => {
|
6537
|
+
for (var prop in b || (b = {}))
|
6538
|
+
if (__hasOwnProp.call(b, prop))
|
6539
|
+
__defNormalProp(a, prop, b[prop]);
|
6540
|
+
if (__getOwnPropSymbols)
|
6541
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
6542
|
+
if (__propIsEnum.call(b, prop))
|
6543
|
+
__defNormalProp(a, prop, b[prop]);
|
6544
|
+
}
|
6545
|
+
return a;
|
6546
|
+
};
|
6547
|
+
var __objRest = (source, exclude) => {
|
6548
|
+
var target = {};
|
6549
|
+
for (var prop in source)
|
6550
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
6551
|
+
target[prop] = source[prop];
|
6552
|
+
if (source != null && __getOwnPropSymbols)
|
6553
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
6554
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
6555
|
+
target[prop] = source[prop];
|
6556
|
+
}
|
6557
|
+
return target;
|
6558
|
+
};
|
6559
|
+
const getIntlFormatterOptions = (type, name) => {
|
6560
|
+
const { formats } = getOptions();
|
6561
|
+
if (type in formats && name in formats[type]) {
|
6562
|
+
return formats[type][name];
|
6563
|
+
}
|
6564
|
+
throw new Error(`[svelte-i18n] Unknown "${name}" ${type} format.`);
|
6565
|
+
};
|
6566
|
+
const createNumberFormatter = monadicMemoize(
|
6567
|
+
(_a) => {
|
6568
|
+
var _b = _a, { locale, format } = _b, options = __objRest(_b, ["locale", "format"]);
|
6569
|
+
if (locale == null) {
|
6570
|
+
throw new Error('[svelte-i18n] A "locale" must be set to format numbers');
|
6571
|
+
}
|
6572
|
+
if (format) {
|
6573
|
+
options = getIntlFormatterOptions("number", format);
|
6574
|
+
}
|
6575
|
+
return new Intl.NumberFormat(locale, options);
|
6576
|
+
}
|
6577
|
+
);
|
6578
|
+
const createDateFormatter = monadicMemoize(
|
6579
|
+
(_c) => {
|
6580
|
+
var _d = _c, { locale, format } = _d, options = __objRest(_d, ["locale", "format"]);
|
6581
|
+
if (locale == null) {
|
6582
|
+
throw new Error('[svelte-i18n] A "locale" must be set to format dates');
|
6583
|
+
}
|
6584
|
+
if (format) {
|
6585
|
+
options = getIntlFormatterOptions("date", format);
|
6586
|
+
} else if (Object.keys(options).length === 0) {
|
6587
|
+
options = getIntlFormatterOptions("date", "short");
|
6588
|
+
}
|
6589
|
+
return new Intl.DateTimeFormat(locale, options);
|
6590
|
+
}
|
6591
|
+
);
|
6592
|
+
const createTimeFormatter = monadicMemoize(
|
6593
|
+
(_e) => {
|
6594
|
+
var _f = _e, { locale, format } = _f, options = __objRest(_f, ["locale", "format"]);
|
6595
|
+
if (locale == null) {
|
6596
|
+
throw new Error(
|
6597
|
+
'[svelte-i18n] A "locale" must be set to format time values'
|
6598
|
+
);
|
6599
|
+
}
|
6600
|
+
if (format) {
|
6601
|
+
options = getIntlFormatterOptions("time", format);
|
6602
|
+
} else if (Object.keys(options).length === 0) {
|
6603
|
+
options = getIntlFormatterOptions("time", "short");
|
6604
|
+
}
|
6605
|
+
return new Intl.DateTimeFormat(locale, options);
|
6606
|
+
}
|
6607
|
+
);
|
6608
|
+
const getNumberFormatter = (_g = {}) => {
|
6609
|
+
var _h = _g, {
|
6610
|
+
locale = getCurrentLocale()
|
6611
|
+
} = _h, args = __objRest(_h, [
|
6612
|
+
"locale"
|
6613
|
+
]);
|
6614
|
+
return createNumberFormatter(__spreadValues({ locale }, args));
|
6615
|
+
};
|
6616
|
+
const getDateFormatter = (_i = {}) => {
|
6617
|
+
var _j = _i, {
|
6618
|
+
locale = getCurrentLocale()
|
6619
|
+
} = _j, args = __objRest(_j, [
|
6620
|
+
"locale"
|
6621
|
+
]);
|
6622
|
+
return createDateFormatter(__spreadValues({ locale }, args));
|
6623
|
+
};
|
6624
|
+
const getTimeFormatter = (_k = {}) => {
|
6625
|
+
var _l = _k, {
|
6626
|
+
locale = getCurrentLocale()
|
6627
|
+
} = _l, args = __objRest(_l, [
|
6628
|
+
"locale"
|
6629
|
+
]);
|
6630
|
+
return createTimeFormatter(__spreadValues({ locale }, args));
|
6631
|
+
};
|
6632
|
+
const getMessageFormatter = monadicMemoize(
|
6633
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
6634
|
+
(message, locale = getCurrentLocale()) => new IntlMessageFormat(message, locale, getOptions().formats, {
|
6635
|
+
ignoreTag: getOptions().ignoreTag
|
6636
|
+
})
|
6637
|
+
);
|
6638
|
+
|
6639
|
+
const formatMessage = (id, options = {}) => {
|
6640
|
+
var _a, _b, _c, _d;
|
6641
|
+
let messageObj = options;
|
6642
|
+
if (typeof id === "object") {
|
6643
|
+
messageObj = id;
|
6644
|
+
id = messageObj.id;
|
6645
|
+
}
|
6646
|
+
const {
|
6647
|
+
values,
|
6648
|
+
locale = getCurrentLocale(),
|
6649
|
+
default: defaultValue
|
6650
|
+
} = messageObj;
|
6651
|
+
if (locale == null) {
|
6652
|
+
throw new Error(
|
6653
|
+
"[svelte-i18n] Cannot format a message without first setting the initial locale."
|
6654
|
+
);
|
6655
|
+
}
|
6656
|
+
let message = lookup(id, locale);
|
6657
|
+
if (!message) {
|
6658
|
+
message = (_d = (_c = (_b = (_a = getOptions()).handleMissingMessage) == null ? void 0 : _b.call(_a, { locale, id, defaultValue })) != null ? _c : defaultValue) != null ? _d : id;
|
6659
|
+
} else if (typeof message !== "string") {
|
6660
|
+
console.warn(
|
6661
|
+
`[svelte-i18n] Message with id "${id}" must be of type "string", found: "${typeof message}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`
|
6662
|
+
);
|
6663
|
+
return message;
|
6664
|
+
}
|
6665
|
+
if (!values) {
|
6666
|
+
return message;
|
6667
|
+
}
|
6668
|
+
let result = message;
|
6669
|
+
try {
|
6670
|
+
result = getMessageFormatter(message, locale).format(values);
|
6671
|
+
} catch (e) {
|
6672
|
+
if (e instanceof Error) {
|
6673
|
+
console.warn(
|
6674
|
+
`[svelte-i18n] Message "${id}" has syntax error:`,
|
6675
|
+
e.message
|
6676
|
+
);
|
6677
|
+
}
|
6678
|
+
}
|
6679
|
+
return result;
|
6680
|
+
};
|
6681
|
+
const formatTime = (t, options) => {
|
6682
|
+
return getTimeFormatter(options).format(t);
|
6683
|
+
};
|
6684
|
+
const formatDate = (d, options) => {
|
6685
|
+
return getDateFormatter(options).format(d);
|
6686
|
+
};
|
6687
|
+
const formatNumber = (n, options) => {
|
6688
|
+
return getNumberFormatter(options).format(n);
|
6689
|
+
};
|
6690
|
+
const getJSON = (id, locale = getCurrentLocale()) => {
|
6691
|
+
return lookup(id, locale);
|
6692
|
+
};
|
6693
|
+
const $format = derived([$locale, $dictionary], () => formatMessage);
|
6694
|
+
derived([$locale], () => formatTime);
|
6695
|
+
derived([$locale], () => formatDate);
|
6696
|
+
derived([$locale], () => formatNumber);
|
6697
|
+
derived([$locale, $dictionary], () => getJSON);
|
6262
6698
|
|
6263
6699
|
window.emWidgets = { topic };
|
6264
6700
|
|
@@ -6457,10 +6893,10 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
6457
6893
|
};
|
6458
6894
|
|
6459
6895
|
function setupI18n({ withLocale: _locale, translations }) {
|
6460
|
-
|
6896
|
+
$locale.subscribe((data) => {
|
6461
6897
|
if (data == null) {
|
6462
|
-
|
6463
|
-
|
6898
|
+
$dictionary.set(translations);
|
6899
|
+
$locale.set(_locale);
|
6464
6900
|
}
|
6465
6901
|
}); // maybe we will need this to make sure that the i18n is set up only once
|
6466
6902
|
/*dictionary.set(translations);
|
@@ -6468,11 +6904,11 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
6468
6904
|
}
|
6469
6905
|
|
6470
6906
|
function addNewMessages(lang, dict) {
|
6471
|
-
|
6907
|
+
addMessages(lang, dict);
|
6472
6908
|
}
|
6473
6909
|
|
6474
6910
|
function setLocale(_locale) {
|
6475
|
-
|
6911
|
+
$locale.set(_locale);
|
6476
6912
|
}
|
6477
6913
|
|
6478
6914
|
const setLocaleWhenInit = () => {
|
@@ -8053,7 +8489,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
8053
8489
|
|
8054
8490
|
if (options.props) {
|
8055
8491
|
this.$set(options.props);
|
8056
|
-
flush();
|
8492
|
+
flush$1();
|
8057
8493
|
}
|
8058
8494
|
}
|
8059
8495
|
}
|
@@ -8068,7 +8504,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
8068
8504
|
|
8069
8505
|
set tabs(tabs) {
|
8070
8506
|
this.$$set({ tabs });
|
8071
|
-
flush();
|
8507
|
+
flush$1();
|
8072
8508
|
}
|
8073
8509
|
|
8074
8510
|
get tab() {
|
@@ -8077,7 +8513,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
8077
8513
|
|
8078
8514
|
set tab(tab) {
|
8079
8515
|
this.$$set({ tab });
|
8080
|
-
flush();
|
8516
|
+
flush$1();
|
8081
8517
|
}
|
8082
8518
|
|
8083
8519
|
get clientstyling() {
|
@@ -8086,7 +8522,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
8086
8522
|
|
8087
8523
|
set clientstyling(clientstyling) {
|
8088
8524
|
this.$$set({ clientstyling });
|
8089
|
-
flush();
|
8525
|
+
flush$1();
|
8090
8526
|
}
|
8091
8527
|
|
8092
8528
|
get clientstylingurl() {
|
@@ -8095,7 +8531,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
8095
8531
|
|
8096
8532
|
set clientstylingurl(clientstylingurl) {
|
8097
8533
|
this.$$set({ clientstylingurl });
|
8098
|
-
flush();
|
8534
|
+
flush$1();
|
8099
8535
|
}
|
8100
8536
|
}
|
8101
8537
|
|
@@ -8487,7 +8923,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
8487
8923
|
return /*click_handler_1*/ ctx[19](/*item*/ ctx[31]);
|
8488
8924
|
}
|
8489
8925
|
|
8490
|
-
let each_value_1 = formatDate(/*item*/ ctx[31].enddate);
|
8926
|
+
let each_value_1 = formatDate$1(/*item*/ ctx[31].enddate);
|
8491
8927
|
validate_each_argument(each_value_1);
|
8492
8928
|
let each_blocks = [];
|
8493
8929
|
|
@@ -8560,7 +8996,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
8560
8996
|
}
|
8561
8997
|
|
8562
8998
|
if (dirty[0] & /*list*/ 32) {
|
8563
|
-
each_value_1 = formatDate(/*item*/ ctx[31].enddate);
|
8999
|
+
each_value_1 = formatDate$1(/*item*/ ctx[31].enddate);
|
8564
9000
|
validate_each_argument(each_value_1);
|
8565
9001
|
let i;
|
8566
9002
|
|
@@ -8881,8 +9317,8 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
8881
9317
|
let statesNeedSubscribe;
|
8882
9318
|
let list;
|
8883
9319
|
let $_;
|
8884
|
-
validate_store(
|
8885
|
-
component_subscribe($$self,
|
9320
|
+
validate_store($format, '_');
|
9321
|
+
component_subscribe($$self, $format, $$value => $$invalidate(6, $_ = $$value));
|
8886
9322
|
let { $$slots: slots = {}, $$scope } = $$props;
|
8887
9323
|
validate_slots('undefined', slots, []);
|
8888
9324
|
let { endpoint = '' } = $$props;
|
@@ -9089,12 +9525,12 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
9089
9525
|
|
9090
9526
|
$$self.$capture_state = () => ({
|
9091
9527
|
onMount,
|
9092
|
-
formatDate,
|
9528
|
+
formatDate: formatDate$1,
|
9093
9529
|
icon,
|
9094
9530
|
matchStatusFromApiToView,
|
9095
9531
|
setLocale,
|
9096
9532
|
setLocaleWhenInit,
|
9097
|
-
_:
|
9533
|
+
_: $format,
|
9098
9534
|
onMountMessageLifeCycle: onMountMessageLifeCycle$1,
|
9099
9535
|
updateEventSourceLifeCycle,
|
9100
9536
|
composeEventSourceMessageHandler,
|
@@ -9261,7 +9697,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
9261
9697
|
|
9262
9698
|
if (options.props) {
|
9263
9699
|
this.$set(options.props);
|
9264
|
-
flush();
|
9700
|
+
flush$1();
|
9265
9701
|
}
|
9266
9702
|
}
|
9267
9703
|
}
|
@@ -9285,7 +9721,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
9285
9721
|
|
9286
9722
|
set endpoint(endpoint) {
|
9287
9723
|
this.$$set({ endpoint });
|
9288
|
-
flush();
|
9724
|
+
flush$1();
|
9289
9725
|
}
|
9290
9726
|
|
9291
9727
|
get lang() {
|
@@ -9294,7 +9730,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
9294
9730
|
|
9295
9731
|
set lang(lang) {
|
9296
9732
|
this.$$set({ lang });
|
9297
|
-
flush();
|
9733
|
+
flush$1();
|
9298
9734
|
}
|
9299
9735
|
|
9300
9736
|
get session() {
|
@@ -9303,7 +9739,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
9303
9739
|
|
9304
9740
|
set session(session) {
|
9305
9741
|
this.$$set({ session });
|
9306
|
-
flush();
|
9742
|
+
flush$1();
|
9307
9743
|
}
|
9308
9744
|
|
9309
9745
|
get state() {
|
@@ -9312,7 +9748,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
9312
9748
|
|
9313
9749
|
set state(state) {
|
9314
9750
|
this.$$set({ state });
|
9315
|
-
flush();
|
9751
|
+
flush$1();
|
9316
9752
|
}
|
9317
9753
|
|
9318
9754
|
get states() {
|
@@ -9321,7 +9757,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
9321
9757
|
|
9322
9758
|
set states(states) {
|
9323
9759
|
this.$$set({ states });
|
9324
|
-
flush();
|
9760
|
+
flush$1();
|
9325
9761
|
}
|
9326
9762
|
|
9327
9763
|
get filter() {
|
@@ -9330,7 +9766,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
9330
9766
|
|
9331
9767
|
set filter(filter) {
|
9332
9768
|
this.$$set({ filter });
|
9333
|
-
flush();
|
9769
|
+
flush$1();
|
9334
9770
|
}
|
9335
9771
|
|
9336
9772
|
get clientstyling() {
|
@@ -9339,7 +9775,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
9339
9775
|
|
9340
9776
|
set clientstyling(clientstyling) {
|
9341
9777
|
this.$$set({ clientstyling });
|
9342
|
-
flush();
|
9778
|
+
flush$1();
|
9343
9779
|
}
|
9344
9780
|
|
9345
9781
|
get clientstylingurl() {
|
@@ -9348,7 +9784,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICA
|
|
9348
9784
|
|
9349
9785
|
set clientstylingurl(clientstylingurl) {
|
9350
9786
|
this.$$set({ clientstylingurl });
|
9351
|
-
flush();
|
9787
|
+
flush$1();
|
9352
9788
|
}
|
9353
9789
|
}
|
9354
9790
|
|