@everymatrix/casino-search 1.15.6 → 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.
@@ -204,7 +204,7 @@
204
204
  function schedule_update() {
205
205
  if (!update_scheduled) {
206
206
  update_scheduled = true;
207
- resolved_promise.then(flush);
207
+ resolved_promise.then(flush$1);
208
208
  }
209
209
  }
210
210
  function tick() {
@@ -234,7 +234,7 @@
234
234
  // function, guarantees this behavior.
235
235
  const seen_callbacks = new Set();
236
236
  let flushidx = 0; // Do *not* move this inside the flush() function
237
- function flush() {
237
+ function flush$1() {
238
238
  // Do not reenter flush while dirty components are updated, as this can
239
239
  // result in an infinite loop. Instead, let the inner flush handle it.
240
240
  // Reentrancy is ok afterwards for bindings etc.
@@ -411,7 +411,7 @@
411
411
  if (options.intro)
412
412
  transition_in(component.$$.fragment);
413
413
  mount_component(component, options.target, options.anchor, options.customElement);
414
- flush();
414
+ flush$1();
415
415
  }
416
416
  set_current_component(parent_component);
417
417
  }
@@ -4644,21 +4644,451 @@
4644
4644
  return IntlMessageFormat;
4645
4645
  }());
4646
4646
 
4647
- /*
4648
- Copyright (c) 2014, Yahoo! Inc. All rights reserved.
4649
- Copyrights licensed under the New BSD License.
4650
- See the accompanying LICENSE file for terms.
4651
- */
4652
- var o = IntlMessageFormat;
4647
+ function delve(obj, fullKey) {
4648
+ if (fullKey == null)
4649
+ return void 0;
4650
+ if (fullKey in obj) {
4651
+ return obj[fullKey];
4652
+ }
4653
+ const keys = fullKey.split(".");
4654
+ let result = obj;
4655
+ for (let p = 0; p < keys.length; p++) {
4656
+ if (typeof result === "object") {
4657
+ if (p > 0) {
4658
+ const partialKey = keys.slice(p, keys.length).join(".");
4659
+ if (partialKey in result) {
4660
+ result = result[partialKey];
4661
+ break;
4662
+ }
4663
+ }
4664
+ result = result[keys[p]];
4665
+ } else {
4666
+ result = void 0;
4667
+ }
4668
+ }
4669
+ return result;
4670
+ }
4653
4671
 
4654
- const i={},r=(e,n,t)=>t?(n in i||(i[n]={}),e in i[n]||(i[n][e]=t),t):t,s=(e,n)=>{if(null==n)return;if(n in i&&e in i[n])return i[n][e];const t=E(n);for(let o=0;o<t.length;o++){const i=c(t[o],e);if(i)return r(e,n,i)}};let l;const a=writable({});function u(e){return e in l}function c(e,n){if(!u(e))return null;const t=function(e){return l[e]||null}(e);return function(e,n){if(null==n)return;if(n in e)return e[n];const t=n.split(".");let o=e;for(let e=0;e<t.length;e++)if("object"==typeof o){if(e>0){const n=t.slice(e,t.length).join(".");if(n in o){o=o[n];break}}o=o[t[e]];}else o=void 0;return o}(t,n)}function m(e,...n){delete i[e],a.update((o=>(o[e]=cjs.all([o[e]||{},...n]),o)));}derived([a],(([e])=>Object.keys(e)));a.subscribe((e=>l=e));const d={};function g$1(e){return d[e]}function h(e){return null!=e&&E(e).some((e=>{var n;return null===(n=g$1(e))||void 0===n?void 0:n.size}))}function w(e,n){const t=Promise.all(n.map((n=>(function(e,n){d[e].delete(n),0===d[e].size&&delete d[e];}(e,n),n().then((e=>e.default||e))))));return t.then((n=>m(e,...n)))}const p={};function b(e){if(!h(e))return e in p?p[e]:Promise.resolve();const n=function(e){return E(e).map((e=>{const n=g$1(e);return [e,n?[...n]:[]]})).filter((([,e])=>e.length>0))}(e);return p[e]=Promise.all(n.map((([e,n])=>w(e,n)))).then((()=>{if(h(e))return b(e);delete p[e];})),p[e]}const M={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function j(){return M}const $=writable(!1);let k;const T=writable(null);function L(e){return e.split("-").map(((e,n,t)=>t.slice(0,n+1).join("-"))).reverse()}function E(e,n=j().fallbackLocale){const t=L(e);return n?[...new Set([...t,...L(n)])]:t}function D(){return null!=k?k:void 0}T.subscribe((e=>{k=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e);}));const x={...T,set:e=>{if(e&&function(e){if(null==e)return;const n=E(e);for(let e=0;e<n.length;e++){const t=n[e];if(u(t))return t}}(e)&&h(e)){const{loadingDelay:n}=j();let t;return "undefined"!=typeof window&&null!=D()&&n?t=window.setTimeout((()=>$.set(!0)),n):$.set(!0),b(e).then((()=>{T.set(e);})).finally((()=>{clearTimeout(t),$.set(!1);}))}return T.set(e)}},Z=e=>{const n=Object.create(null);return t=>{const o=JSON.stringify(t);return o in n?n[o]:n[o]=e(t)}},C=(e,n)=>{const{formats:t}=j();if(e in t&&n in t[e])return t[e][n];throw new Error(`[svelte-i18n] Unknown "${n}" ${e} format.`)},G=Z((({locale:e,format:n,...t})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(t=C("number",n)),new Intl.NumberFormat(e,t)})),J=Z((({locale:e,format:n,...t})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?t=C("date",n):0===Object.keys(t).length&&(t=C("date","short")),new Intl.DateTimeFormat(e,t)})),U=Z((({locale:e,format:n,...t})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?t=C("time",n):0===Object.keys(t).length&&(t=C("time","short")),new Intl.DateTimeFormat(e,t)})),V=({locale:e=D(),...n}={})=>G({locale:e,...n}),_=({locale:e=D(),...n}={})=>J({locale:e,...n}),q=({locale:e=D(),...n}={})=>U({locale:e,...n}),B=Z(((e,n=D())=>new o(e,n,j().formats,{ignoreTag:j().ignoreTag}))),H=(e,n={})=>{var t,o,i,r;let l=n;"object"==typeof e&&(l=e,e=l.id);const{values:a,locale:u=D(),default:c}=l;if(null==u)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let m=s(e,u);if(m){if("string"!=typeof m)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof m}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),m}else m=null!==(r=null!==(i=null===(o=(t=j()).handleMissingMessage)||void 0===o?void 0:o.call(t,{locale:u,id:e,defaultValue:c}))&&void 0!==i?i:c)&&void 0!==r?r:e;if(!a)return m;let f=m;try{f=B(m,u).format(a);}catch(n){n instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,n.message);}return f},K=(e,n)=>q(n).format(e),Q=(e,n)=>_(n).format(e),R=(e,n)=>V(n).format(e),W=(e,n=D())=>s(e,n),X=derived([x,a],(()=>H));derived([x],(()=>K));derived([x],(()=>Q));derived([x],(()=>R));derived([x,a],(()=>W));
4672
+ const lookupCache = {};
4673
+ const addToCache = (path, locale, message) => {
4674
+ if (!message)
4675
+ return message;
4676
+ if (!(locale in lookupCache))
4677
+ lookupCache[locale] = {};
4678
+ if (!(path in lookupCache[locale]))
4679
+ lookupCache[locale][path] = message;
4680
+ return message;
4681
+ };
4682
+ const lookup = (path, refLocale) => {
4683
+ if (refLocale == null)
4684
+ return void 0;
4685
+ if (refLocale in lookupCache && path in lookupCache[refLocale]) {
4686
+ return lookupCache[refLocale][path];
4687
+ }
4688
+ const locales = getPossibleLocales(refLocale);
4689
+ for (let i = 0; i < locales.length; i++) {
4690
+ const locale = locales[i];
4691
+ const message = getMessageFromDictionary(locale, path);
4692
+ if (message) {
4693
+ return addToCache(path, refLocale, message);
4694
+ }
4695
+ }
4696
+ return void 0;
4697
+ };
4698
+
4699
+ let dictionary;
4700
+ const $dictionary = writable({});
4701
+ function getLocaleDictionary(locale) {
4702
+ return dictionary[locale] || null;
4703
+ }
4704
+ function hasLocaleDictionary(locale) {
4705
+ return locale in dictionary;
4706
+ }
4707
+ function getMessageFromDictionary(locale, id) {
4708
+ if (!hasLocaleDictionary(locale)) {
4709
+ return null;
4710
+ }
4711
+ const localeDictionary = getLocaleDictionary(locale);
4712
+ const match = delve(localeDictionary, id);
4713
+ return match;
4714
+ }
4715
+ function getClosestAvailableLocale(refLocale) {
4716
+ if (refLocale == null)
4717
+ return void 0;
4718
+ const relatedLocales = getPossibleLocales(refLocale);
4719
+ for (let i = 0; i < relatedLocales.length; i++) {
4720
+ const locale = relatedLocales[i];
4721
+ if (hasLocaleDictionary(locale)) {
4722
+ return locale;
4723
+ }
4724
+ }
4725
+ return void 0;
4726
+ }
4727
+ function addMessages(locale, ...partials) {
4728
+ delete lookupCache[locale];
4729
+ $dictionary.update((d) => {
4730
+ d[locale] = cjs.all([d[locale] || {}, ...partials]);
4731
+ return d;
4732
+ });
4733
+ }
4734
+ derived(
4735
+ [$dictionary],
4736
+ ([dictionary2]) => Object.keys(dictionary2)
4737
+ );
4738
+ $dictionary.subscribe((newDictionary) => dictionary = newDictionary);
4739
+
4740
+ const queue = {};
4741
+ function removeLoaderFromQueue(locale, loader) {
4742
+ queue[locale].delete(loader);
4743
+ if (queue[locale].size === 0) {
4744
+ delete queue[locale];
4745
+ }
4746
+ }
4747
+ function getLocaleQueue(locale) {
4748
+ return queue[locale];
4749
+ }
4750
+ function getLocalesQueues(locale) {
4751
+ return getPossibleLocales(locale).map((localeItem) => {
4752
+ const localeQueue = getLocaleQueue(localeItem);
4753
+ return [localeItem, localeQueue ? [...localeQueue] : []];
4754
+ }).filter(([, localeQueue]) => localeQueue.length > 0);
4755
+ }
4756
+ function hasLocaleQueue(locale) {
4757
+ if (locale == null)
4758
+ return false;
4759
+ return getPossibleLocales(locale).some(
4760
+ (localeQueue) => {
4761
+ var _a;
4762
+ return (_a = getLocaleQueue(localeQueue)) == null ? void 0 : _a.size;
4763
+ }
4764
+ );
4765
+ }
4766
+ function loadLocaleQueue(locale, localeQueue) {
4767
+ const allLoadersPromise = Promise.all(
4768
+ localeQueue.map((loader) => {
4769
+ removeLoaderFromQueue(locale, loader);
4770
+ return loader().then((partial) => partial.default || partial);
4771
+ })
4772
+ );
4773
+ return allLoadersPromise.then((partials) => addMessages(locale, ...partials));
4774
+ }
4775
+ const activeFlushes = {};
4776
+ function flush(locale) {
4777
+ if (!hasLocaleQueue(locale)) {
4778
+ if (locale in activeFlushes) {
4779
+ return activeFlushes[locale];
4780
+ }
4781
+ return Promise.resolve();
4782
+ }
4783
+ const queues = getLocalesQueues(locale);
4784
+ activeFlushes[locale] = Promise.all(
4785
+ queues.map(
4786
+ ([localeName, localeQueue]) => loadLocaleQueue(localeName, localeQueue)
4787
+ )
4788
+ ).then(() => {
4789
+ if (hasLocaleQueue(locale)) {
4790
+ return flush(locale);
4791
+ }
4792
+ delete activeFlushes[locale];
4793
+ });
4794
+ return activeFlushes[locale];
4795
+ }
4796
+ const defaultFormats = {
4797
+ number: {
4798
+ scientific: { notation: "scientific" },
4799
+ engineering: { notation: "engineering" },
4800
+ compactLong: { notation: "compact", compactDisplay: "long" },
4801
+ compactShort: { notation: "compact", compactDisplay: "short" }
4802
+ },
4803
+ date: {
4804
+ short: { month: "numeric", day: "numeric", year: "2-digit" },
4805
+ medium: { month: "short", day: "numeric", year: "numeric" },
4806
+ long: { month: "long", day: "numeric", year: "numeric" },
4807
+ full: { weekday: "long", month: "long", day: "numeric", year: "numeric" }
4808
+ },
4809
+ time: {
4810
+ short: { hour: "numeric", minute: "numeric" },
4811
+ medium: { hour: "numeric", minute: "numeric", second: "numeric" },
4812
+ long: {
4813
+ hour: "numeric",
4814
+ minute: "numeric",
4815
+ second: "numeric",
4816
+ timeZoneName: "short"
4817
+ },
4818
+ full: {
4819
+ hour: "numeric",
4820
+ minute: "numeric",
4821
+ second: "numeric",
4822
+ timeZoneName: "short"
4823
+ }
4824
+ }
4825
+ };
4826
+ const defaultOptions = {
4827
+ fallbackLocale: null,
4828
+ loadingDelay: 200,
4829
+ formats: defaultFormats,
4830
+ warnOnMissingMessages: true,
4831
+ handleMissingMessage: void 0,
4832
+ ignoreTag: true
4833
+ };
4834
+ const options = defaultOptions;
4835
+ function getOptions() {
4836
+ return options;
4837
+ }
4838
+
4839
+ const $isLoading = writable(false);
4840
+
4841
+ var __defProp$1 = Object.defineProperty;
4842
+ var __defProps = Object.defineProperties;
4843
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4844
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
4845
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
4846
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
4847
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4848
+ var __spreadValues$1 = (a, b) => {
4849
+ for (var prop in b || (b = {}))
4850
+ if (__hasOwnProp$1.call(b, prop))
4851
+ __defNormalProp$1(a, prop, b[prop]);
4852
+ if (__getOwnPropSymbols$1)
4853
+ for (var prop of __getOwnPropSymbols$1(b)) {
4854
+ if (__propIsEnum$1.call(b, prop))
4855
+ __defNormalProp$1(a, prop, b[prop]);
4856
+ }
4857
+ return a;
4858
+ };
4859
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
4860
+ let current;
4861
+ const internalLocale = writable(null);
4862
+ function getSubLocales(refLocale) {
4863
+ return refLocale.split("-").map((_, i, arr) => arr.slice(0, i + 1).join("-")).reverse();
4864
+ }
4865
+ function getPossibleLocales(refLocale, fallbackLocale = getOptions().fallbackLocale) {
4866
+ const locales = getSubLocales(refLocale);
4867
+ if (fallbackLocale) {
4868
+ return [.../* @__PURE__ */ new Set([...locales, ...getSubLocales(fallbackLocale)])];
4869
+ }
4870
+ return locales;
4871
+ }
4872
+ function getCurrentLocale() {
4873
+ return current != null ? current : void 0;
4874
+ }
4875
+ internalLocale.subscribe((newLocale) => {
4876
+ current = newLocale != null ? newLocale : void 0;
4877
+ if (typeof window !== "undefined" && newLocale != null) {
4878
+ document.documentElement.setAttribute("lang", newLocale);
4879
+ }
4880
+ });
4881
+ const set = (newLocale) => {
4882
+ if (newLocale && getClosestAvailableLocale(newLocale) && hasLocaleQueue(newLocale)) {
4883
+ const { loadingDelay } = getOptions();
4884
+ let loadingTimer;
4885
+ if (typeof window !== "undefined" && getCurrentLocale() != null && loadingDelay) {
4886
+ loadingTimer = window.setTimeout(
4887
+ () => $isLoading.set(true),
4888
+ loadingDelay
4889
+ );
4890
+ } else {
4891
+ $isLoading.set(true);
4892
+ }
4893
+ return flush(newLocale).then(() => {
4894
+ internalLocale.set(newLocale);
4895
+ }).finally(() => {
4896
+ clearTimeout(loadingTimer);
4897
+ $isLoading.set(false);
4898
+ });
4899
+ }
4900
+ return internalLocale.set(newLocale);
4901
+ };
4902
+ const $locale = __spreadProps(__spreadValues$1({}, internalLocale), {
4903
+ set
4904
+ });
4905
+
4906
+ const monadicMemoize = (fn) => {
4907
+ const cache = /* @__PURE__ */ Object.create(null);
4908
+ const memoizedFn = (arg) => {
4909
+ const cacheKey = JSON.stringify(arg);
4910
+ if (cacheKey in cache) {
4911
+ return cache[cacheKey];
4912
+ }
4913
+ return cache[cacheKey] = fn(arg);
4914
+ };
4915
+ return memoizedFn;
4916
+ };
4917
+
4918
+ var __defProp = Object.defineProperty;
4919
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4920
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4921
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
4922
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4923
+ var __spreadValues = (a, b) => {
4924
+ for (var prop in b || (b = {}))
4925
+ if (__hasOwnProp.call(b, prop))
4926
+ __defNormalProp(a, prop, b[prop]);
4927
+ if (__getOwnPropSymbols)
4928
+ for (var prop of __getOwnPropSymbols(b)) {
4929
+ if (__propIsEnum.call(b, prop))
4930
+ __defNormalProp(a, prop, b[prop]);
4931
+ }
4932
+ return a;
4933
+ };
4934
+ var __objRest = (source, exclude) => {
4935
+ var target = {};
4936
+ for (var prop in source)
4937
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
4938
+ target[prop] = source[prop];
4939
+ if (source != null && __getOwnPropSymbols)
4940
+ for (var prop of __getOwnPropSymbols(source)) {
4941
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
4942
+ target[prop] = source[prop];
4943
+ }
4944
+ return target;
4945
+ };
4946
+ const getIntlFormatterOptions = (type, name) => {
4947
+ const { formats } = getOptions();
4948
+ if (type in formats && name in formats[type]) {
4949
+ return formats[type][name];
4950
+ }
4951
+ throw new Error(`[svelte-i18n] Unknown "${name}" ${type} format.`);
4952
+ };
4953
+ const createNumberFormatter = monadicMemoize(
4954
+ (_a) => {
4955
+ var _b = _a, { locale, format } = _b, options = __objRest(_b, ["locale", "format"]);
4956
+ if (locale == null) {
4957
+ throw new Error('[svelte-i18n] A "locale" must be set to format numbers');
4958
+ }
4959
+ if (format) {
4960
+ options = getIntlFormatterOptions("number", format);
4961
+ }
4962
+ return new Intl.NumberFormat(locale, options);
4963
+ }
4964
+ );
4965
+ const createDateFormatter = monadicMemoize(
4966
+ (_c) => {
4967
+ var _d = _c, { locale, format } = _d, options = __objRest(_d, ["locale", "format"]);
4968
+ if (locale == null) {
4969
+ throw new Error('[svelte-i18n] A "locale" must be set to format dates');
4970
+ }
4971
+ if (format) {
4972
+ options = getIntlFormatterOptions("date", format);
4973
+ } else if (Object.keys(options).length === 0) {
4974
+ options = getIntlFormatterOptions("date", "short");
4975
+ }
4976
+ return new Intl.DateTimeFormat(locale, options);
4977
+ }
4978
+ );
4979
+ const createTimeFormatter = monadicMemoize(
4980
+ (_e) => {
4981
+ var _f = _e, { locale, format } = _f, options = __objRest(_f, ["locale", "format"]);
4982
+ if (locale == null) {
4983
+ throw new Error(
4984
+ '[svelte-i18n] A "locale" must be set to format time values'
4985
+ );
4986
+ }
4987
+ if (format) {
4988
+ options = getIntlFormatterOptions("time", format);
4989
+ } else if (Object.keys(options).length === 0) {
4990
+ options = getIntlFormatterOptions("time", "short");
4991
+ }
4992
+ return new Intl.DateTimeFormat(locale, options);
4993
+ }
4994
+ );
4995
+ const getNumberFormatter = (_g = {}) => {
4996
+ var _h = _g, {
4997
+ locale = getCurrentLocale()
4998
+ } = _h, args = __objRest(_h, [
4999
+ "locale"
5000
+ ]);
5001
+ return createNumberFormatter(__spreadValues({ locale }, args));
5002
+ };
5003
+ const getDateFormatter = (_i = {}) => {
5004
+ var _j = _i, {
5005
+ locale = getCurrentLocale()
5006
+ } = _j, args = __objRest(_j, [
5007
+ "locale"
5008
+ ]);
5009
+ return createDateFormatter(__spreadValues({ locale }, args));
5010
+ };
5011
+ const getTimeFormatter = (_k = {}) => {
5012
+ var _l = _k, {
5013
+ locale = getCurrentLocale()
5014
+ } = _l, args = __objRest(_l, [
5015
+ "locale"
5016
+ ]);
5017
+ return createTimeFormatter(__spreadValues({ locale }, args));
5018
+ };
5019
+ const getMessageFormatter = monadicMemoize(
5020
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
5021
+ (message, locale = getCurrentLocale()) => new IntlMessageFormat(message, locale, getOptions().formats, {
5022
+ ignoreTag: getOptions().ignoreTag
5023
+ })
5024
+ );
5025
+
5026
+ const formatMessage = (id, options = {}) => {
5027
+ var _a, _b, _c, _d;
5028
+ let messageObj = options;
5029
+ if (typeof id === "object") {
5030
+ messageObj = id;
5031
+ id = messageObj.id;
5032
+ }
5033
+ const {
5034
+ values,
5035
+ locale = getCurrentLocale(),
5036
+ default: defaultValue
5037
+ } = messageObj;
5038
+ if (locale == null) {
5039
+ throw new Error(
5040
+ "[svelte-i18n] Cannot format a message without first setting the initial locale."
5041
+ );
5042
+ }
5043
+ let message = lookup(id, locale);
5044
+ if (!message) {
5045
+ message = (_d = (_c = (_b = (_a = getOptions()).handleMissingMessage) == null ? void 0 : _b.call(_a, { locale, id, defaultValue })) != null ? _c : defaultValue) != null ? _d : id;
5046
+ } else if (typeof message !== "string") {
5047
+ console.warn(
5048
+ `[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.`
5049
+ );
5050
+ return message;
5051
+ }
5052
+ if (!values) {
5053
+ return message;
5054
+ }
5055
+ let result = message;
5056
+ try {
5057
+ result = getMessageFormatter(message, locale).format(values);
5058
+ } catch (e) {
5059
+ if (e instanceof Error) {
5060
+ console.warn(
5061
+ `[svelte-i18n] Message "${id}" has syntax error:`,
5062
+ e.message
5063
+ );
5064
+ }
5065
+ }
5066
+ return result;
5067
+ };
5068
+ const formatTime = (t, options) => {
5069
+ return getTimeFormatter(options).format(t);
5070
+ };
5071
+ const formatDate = (d, options) => {
5072
+ return getDateFormatter(options).format(d);
5073
+ };
5074
+ const formatNumber = (n, options) => {
5075
+ return getNumberFormatter(options).format(n);
5076
+ };
5077
+ const getJSON = (id, locale = getCurrentLocale()) => {
5078
+ return lookup(id, locale);
5079
+ };
5080
+ const $format = derived([$locale, $dictionary], () => formatMessage);
5081
+ derived([$locale], () => formatTime);
5082
+ derived([$locale], () => formatDate);
5083
+ derived([$locale], () => formatNumber);
5084
+ derived([$locale, $dictionary], () => getJSON);
4655
5085
 
4656
5086
  function addNewMessages$1(lang, dict) {
4657
- m(lang, dict);
5087
+ addMessages(lang, dict);
4658
5088
  }
4659
5089
 
4660
5090
  function setLocale$1(_locale) {
4661
- x.set(_locale);
5091
+ $locale.set(_locale);
4662
5092
  }
4663
5093
 
4664
5094
  const TRANSLATIONS$1 = {
@@ -5352,10 +5782,16 @@
5352
5782
 
5353
5783
  xhr.onload = function() {
5354
5784
  var options = {
5355
- status: xhr.status,
5356
5785
  statusText: xhr.statusText,
5357
5786
  headers: parseHeaders(xhr.getAllResponseHeaders() || '')
5358
5787
  };
5788
+ // This check if specifically for when a user fetches a file locally from the file system
5789
+ // Only if the status is out of a normal range
5790
+ if (request.url.startsWith('file://') && (xhr.status < 200 || xhr.status > 599)) {
5791
+ options.status = 200;
5792
+ } else {
5793
+ options.status = xhr.status;
5794
+ }
5359
5795
  options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
5360
5796
  var body = 'response' in xhr ? xhr.response : xhr.responseText;
5361
5797
  setTimeout(function() {
@@ -5371,7 +5807,7 @@
5371
5807
 
5372
5808
  xhr.ontimeout = function() {
5373
5809
  setTimeout(function() {
5374
- reject(new TypeError('Network request failed'));
5810
+ reject(new TypeError('Network request timed out'));
5375
5811
  }, 0);
5376
5812
  };
5377
5813
 
@@ -12012,11 +12448,11 @@
12012
12448
  });
12013
12449
 
12014
12450
  function addNewMessages(lang, dict) {
12015
- m(lang, dict);
12451
+ addMessages(lang, dict);
12016
12452
  }
12017
12453
 
12018
12454
  function setLocale(_locale) {
12019
- x.set(_locale);
12455
+ $locale.set(_locale);
12020
12456
  }
12021
12457
 
12022
12458
  const TRANSLATIONS = {
@@ -13716,8 +14152,8 @@
13716
14152
 
13717
14153
  function instance$1($$self, $$props, $$invalidate) {
13718
14154
  let $_;
13719
- validate_store(X, '_');
13720
- component_subscribe($$self, X, $$value => $$invalidate(36, $_ = $$value));
14155
+ validate_store($format, '_');
14156
+ component_subscribe($$self, $format, $$value => $$invalidate(36, $_ = $$value));
13721
14157
  let { $$slots: slots = {}, $$scope } = $$props;
13722
14158
  validate_slots('undefined', slots, []);
13723
14159
  let { session = '' } = $$props;
@@ -14441,7 +14877,7 @@
14441
14877
  tick,
14442
14878
  isMobile,
14443
14879
  getDevice,
14444
- _: X,
14880
+ _: $format,
14445
14881
  addNewMessages,
14446
14882
  setLocale,
14447
14883
  TRANSLATIONS,
@@ -14800,7 +15236,7 @@
14800
15236
 
14801
15237
  if (options.props) {
14802
15238
  this.$set(options.props);
14803
- flush();
15239
+ flush$1();
14804
15240
  }
14805
15241
  }
14806
15242
  }
@@ -14845,7 +15281,7 @@
14845
15281
 
14846
15282
  set session(session) {
14847
15283
  this.$$set({ session });
14848
- flush();
15284
+ flush$1();
14849
15285
  }
14850
15286
 
14851
15287
  get userid() {
@@ -14854,7 +15290,7 @@
14854
15290
 
14855
15291
  set userid(userid) {
14856
15292
  this.$$set({ userid });
14857
- flush();
15293
+ flush$1();
14858
15294
  }
14859
15295
 
14860
15296
  get lang() {
@@ -14863,7 +15299,7 @@
14863
15299
 
14864
15300
  set lang(lang) {
14865
15301
  this.$$set({ lang });
14866
- flush();
15302
+ flush$1();
14867
15303
  }
14868
15304
 
14869
15305
  get clientstyling() {
@@ -14872,7 +15308,7 @@
14872
15308
 
14873
15309
  set clientstyling(clientstyling) {
14874
15310
  this.$$set({ clientstyling });
14875
- flush();
15311
+ flush$1();
14876
15312
  }
14877
15313
 
14878
15314
  get clientstylingurl() {
@@ -14881,7 +15317,7 @@
14881
15317
 
14882
15318
  set clientstylingurl(clientstylingurl) {
14883
15319
  this.$$set({ clientstylingurl });
14884
- flush();
15320
+ flush$1();
14885
15321
  }
14886
15322
 
14887
15323
  get translationurl() {
@@ -14890,7 +15326,7 @@
14890
15326
 
14891
15327
  set translationurl(translationurl) {
14892
15328
  this.$$set({ translationurl });
14893
- flush();
15329
+ flush$1();
14894
15330
  }
14895
15331
 
14896
15332
  get favorites() {
@@ -14899,7 +15335,7 @@
14899
15335
 
14900
15336
  set favorites(favorites) {
14901
15337
  this.$$set({ favorites });
14902
- flush();
15338
+ flush$1();
14903
15339
  }
14904
15340
 
14905
15341
  get gamethumbnail() {
@@ -14908,7 +15344,7 @@
14908
15344
 
14909
15345
  set gamethumbnail(gamethumbnail) {
14910
15346
  this.$$set({ gamethumbnail });
14911
- flush();
15347
+ flush$1();
14912
15348
  }
14913
15349
 
14914
15350
  get gamename() {
@@ -14917,7 +15353,7 @@
14917
15353
 
14918
15354
  set gamename(gamename) {
14919
15355
  this.$$set({ gamename });
14920
- flush();
15356
+ flush$1();
14921
15357
  }
14922
15358
 
14923
15359
  get gamevendor() {
@@ -14926,7 +15362,7 @@
14926
15362
 
14927
15363
  set gamevendor(gamevendor) {
14928
15364
  this.$$set({ gamevendor });
14929
- flush();
15365
+ flush$1();
14930
15366
  }
14931
15367
 
14932
15368
  get gameid() {
@@ -14935,7 +15371,7 @@
14935
15371
 
14936
15372
  set gameid(gameid) {
14937
15373
  this.$$set({ gameid });
14938
- flush();
15374
+ flush$1();
14939
15375
  }
14940
15376
 
14941
15377
  get gameisnew() {
@@ -14944,7 +15380,7 @@
14944
15380
 
14945
15381
  set gameisnew(gameisnew) {
14946
15382
  this.$$set({ gameisnew });
14947
- flush();
15383
+ flush$1();
14948
15384
  }
14949
15385
 
14950
15386
  get gametag() {
@@ -14953,7 +15389,7 @@
14953
15389
 
14954
15390
  set gametag(gametag) {
14955
15391
  this.$$set({ gametag });
14956
- flush();
15392
+ flush$1();
14957
15393
  }
14958
15394
 
14959
15395
  get gamefunmode() {
@@ -14962,7 +15398,7 @@
14962
15398
 
14963
15399
  set gamefunmode(gamefunmode) {
14964
15400
  this.$$set({ gamefunmode });
14965
- flush();
15401
+ flush$1();
14966
15402
  }
14967
15403
 
14968
15404
  get gamefavorite() {
@@ -14971,7 +15407,7 @@
14971
15407
 
14972
15408
  set gamefavorite(gamefavorite) {
14973
15409
  this.$$set({ gamefavorite });
14974
- flush();
15410
+ flush$1();
14975
15411
  }
14976
15412
 
14977
15413
  get gamecellsize() {
@@ -14980,7 +15416,7 @@
14980
15416
 
14981
15417
  set gamecellsize(gamecellsize) {
14982
15418
  this.$$set({ gamecellsize });
14983
- flush();
15419
+ flush$1();
14984
15420
  }
14985
15421
 
14986
15422
  get showfavoredcategory() {
@@ -14989,7 +15425,7 @@
14989
15425
 
14990
15426
  set showfavoredcategory(showfavoredcategory) {
14991
15427
  this.$$set({ showfavoredcategory });
14992
- flush();
15428
+ flush$1();
14993
15429
  }
14994
15430
 
14995
15431
  get showgamename() {
@@ -14998,7 +15434,7 @@
14998
15434
 
14999
15435
  set showgamename(showgamename) {
15000
15436
  this.$$set({ showgamename });
15001
- flush();
15437
+ flush$1();
15002
15438
  }
15003
15439
 
15004
15440
  get currency() {
@@ -15007,7 +15443,7 @@
15007
15443
 
15008
15444
  set currency(currency) {
15009
15445
  this.$$set({ currency });
15010
- flush();
15446
+ flush$1();
15011
15447
  }
15012
15448
 
15013
15449
  get gamepagemodalurl() {
@@ -15016,7 +15452,7 @@
15016
15452
 
15017
15453
  set gamepagemodalurl(gamepagemodalurl) {
15018
15454
  this.$$set({ gamepagemodalurl });
15019
- flush();
15455
+ flush$1();
15020
15456
  }
15021
15457
 
15022
15458
  get endpoint() {
@@ -15025,7 +15461,7 @@
15025
15461
 
15026
15462
  set endpoint(endpoint) {
15027
15463
  this.$$set({ endpoint });
15028
- flush();
15464
+ flush$1();
15029
15465
  }
15030
15466
 
15031
15467
  get livelobbyendpoint() {
@@ -15034,7 +15470,7 @@
15034
15470
 
15035
15471
  set livelobbyendpoint(livelobbyendpoint) {
15036
15472
  this.$$set({ livelobbyendpoint });
15037
- flush();
15473
+ flush$1();
15038
15474
  }
15039
15475
 
15040
15476
  get connectlive() {
@@ -15043,7 +15479,7 @@
15043
15479
 
15044
15480
  set connectlive(connectlive) {
15045
15481
  this.$$set({ connectlive });
15046
- flush();
15482
+ flush$1();
15047
15483
  }
15048
15484
 
15049
15485
  get visibilityconnect() {
@@ -15052,7 +15488,7 @@
15052
15488
 
15053
15489
  set visibilityconnect(visibilityconnect) {
15054
15490
  this.$$set({ visibilityconnect });
15055
- flush();
15491
+ flush$1();
15056
15492
  }
15057
15493
 
15058
15494
  get integratedgameframedesktop() {
@@ -15061,7 +15497,7 @@
15061
15497
 
15062
15498
  set integratedgameframedesktop(integratedgameframedesktop) {
15063
15499
  this.$$set({ integratedgameframedesktop });
15064
- flush();
15500
+ flush$1();
15065
15501
  }
15066
15502
 
15067
15503
  get integratedgameframemobile() {
@@ -15070,7 +15506,7 @@
15070
15506
 
15071
15507
  set integratedgameframemobile(integratedgameframemobile) {
15072
15508
  this.$$set({ integratedgameframemobile });
15073
- flush();
15509
+ flush$1();
15074
15510
  }
15075
15511
 
15076
15512
  get casinogamesgridslider() {
@@ -15079,7 +15515,7 @@
15079
15515
 
15080
15516
  set casinogamesgridslider(casinogamesgridslider) {
15081
15517
  this.$$set({ casinogamesgridslider });
15082
- flush();
15518
+ flush$1();
15083
15519
  }
15084
15520
 
15085
15521
  get MONEY_WHEEL_COLOR_MAP() {
@@ -15853,8 +16289,8 @@
15853
16289
 
15854
16290
  function instance($$self, $$props, $$invalidate) {
15855
16291
  let $_;
15856
- validate_store(X, '_');
15857
- component_subscribe($$self, X, $$value => $$invalidate(17, $_ = $$value));
16292
+ validate_store($format, '_');
16293
+ component_subscribe($$self, $format, $$value => $$invalidate(17, $_ = $$value));
15858
16294
  let { $$slots: slots = {}, $$scope } = $$props;
15859
16295
  validate_slots('undefined', slots, []);
15860
16296
  let { endpoint = '' } = $$props;
@@ -16194,7 +16630,7 @@
16194
16630
  };
16195
16631
 
16196
16632
  $$self.$capture_state = () => ({
16197
- _: X,
16633
+ _: $format,
16198
16634
  addNewMessages: addNewMessages$1,
16199
16635
  setLocale: setLocale$1,
16200
16636
  TRANSLATIONS: TRANSLATIONS$1,
@@ -16410,7 +16846,7 @@
16410
16846
 
16411
16847
  if (options.props) {
16412
16848
  this.$set(options.props);
16413
- flush();
16849
+ flush$1();
16414
16850
  }
16415
16851
  }
16416
16852
  }
@@ -16438,7 +16874,7 @@
16438
16874
 
16439
16875
  set endpoint(endpoint) {
16440
16876
  this.$$set({ endpoint });
16441
- flush();
16877
+ flush$1();
16442
16878
  }
16443
16879
 
16444
16880
  get datasource() {
@@ -16447,7 +16883,7 @@
16447
16883
 
16448
16884
  set datasource(datasource) {
16449
16885
  this.$$set({ datasource });
16450
- flush();
16886
+ flush$1();
16451
16887
  }
16452
16888
 
16453
16889
  get session() {
@@ -16456,7 +16892,7 @@
16456
16892
 
16457
16893
  set session(session) {
16458
16894
  this.$$set({ session });
16459
- flush();
16895
+ flush$1();
16460
16896
  }
16461
16897
 
16462
16898
  get userid() {
@@ -16465,7 +16901,7 @@
16465
16901
 
16466
16902
  set userid(userid) {
16467
16903
  this.$$set({ userid });
16468
- flush();
16904
+ flush$1();
16469
16905
  }
16470
16906
 
16471
16907
  get lang() {
@@ -16474,7 +16910,7 @@
16474
16910
 
16475
16911
  set lang(lang) {
16476
16912
  this.$$set({ lang });
16477
- flush();
16913
+ flush$1();
16478
16914
  }
16479
16915
 
16480
16916
  get clientstyling() {
@@ -16483,7 +16919,7 @@
16483
16919
 
16484
16920
  set clientstyling(clientstyling) {
16485
16921
  this.$$set({ clientstyling });
16486
- flush();
16922
+ flush$1();
16487
16923
  }
16488
16924
 
16489
16925
  get clientstylingurl() {
@@ -16492,7 +16928,7 @@
16492
16928
 
16493
16929
  set clientstylingurl(clientstylingurl) {
16494
16930
  this.$$set({ clientstylingurl });
16495
- flush();
16931
+ flush$1();
16496
16932
  }
16497
16933
 
16498
16934
  get integratedgameframedesktop() {
@@ -16501,7 +16937,7 @@
16501
16937
 
16502
16938
  set integratedgameframedesktop(integratedgameframedesktop) {
16503
16939
  this.$$set({ integratedgameframedesktop });
16504
- flush();
16940
+ flush$1();
16505
16941
  }
16506
16942
 
16507
16943
  get integratedgameframemobile() {
@@ -16510,7 +16946,7 @@
16510
16946
 
16511
16947
  set integratedgameframemobile(integratedgameframemobile) {
16512
16948
  this.$$set({ integratedgameframemobile });
16513
- flush();
16949
+ flush$1();
16514
16950
  }
16515
16951
 
16516
16952
  get gamepagemodalurl() {
@@ -16519,7 +16955,7 @@
16519
16955
 
16520
16956
  set gamepagemodalurl(gamepagemodalurl) {
16521
16957
  this.$$set({ gamepagemodalurl });
16522
- flush();
16958
+ flush$1();
16523
16959
  }
16524
16960
 
16525
16961
  get translationurl() {
@@ -16528,7 +16964,7 @@
16528
16964
 
16529
16965
  set translationurl(translationurl) {
16530
16966
  this.$$set({ translationurl });
16531
- flush();
16967
+ flush$1();
16532
16968
  }
16533
16969
 
16534
16970
  get showfavorites() {
@@ -16537,7 +16973,7 @@
16537
16973
 
16538
16974
  set showfavorites(showfavorites) {
16539
16975
  this.$$set({ showfavorites });
16540
- flush();
16976
+ flush$1();
16541
16977
  }
16542
16978
  }
16543
16979