@everymatrix/lottery-tipping-latest-result 1.85.15 → 1.85.17

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2ca263e9.js');
6
- const lotteryTippingLatestResult = require('./lottery-tipping-latest-result-11b3ed7e.js');
6
+ const lotteryTippingLatestResult = require('./lottery-tipping-latest-result-99667237.js');
7
7
 
8
8
  // This icon file is generated automatically.
9
9
  var CalendarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, "name": "calendar", "theme": "outlined" };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const lotteryTippingLatestResult = require('./lottery-tipping-latest-result-11b3ed7e.js');
5
+ const lotteryTippingLatestResult = require('./lottery-tipping-latest-result-99667237.js');
6
6
  require('./index-2ca263e9.js');
7
7
 
8
8
 
@@ -212,7 +212,7 @@ const TRANSLATIONS = {
212
212
  en: {
213
213
  weeks: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
214
214
  bettingType: 'Betting Type:',
215
- prizeAllocation: 'Prize Allocation (Turnover: {turnover})',
215
+ prizeAllocation: 'Prize Allocation (Turnover: {turnover})',
216
216
  prizes: 'Prizes',
217
217
  numberOfWinners: 'Number of Winners',
218
218
  prizeMoney: 'Prize Money',
@@ -4,7 +4,7 @@ const TRANSLATIONS = {
4
4
  en: {
5
5
  weeks: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
6
6
  bettingType: 'Betting Type:',
7
- prizeAllocation: 'Prize Allocation (Turnover: {turnover})',
7
+ prizeAllocation: 'Prize Allocation (Turnover: {turnover})',
8
8
  prizes: 'Prizes',
9
9
  numberOfWinners: 'Number of Winners',
10
10
  prizeMoney: 'Prize Money',
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, g as getElement, c as createEvent } from './index-32d8a144.js';
2
- import { r as requiredArgs, t as toDate, _ as _typeof, s as setClientStyling, a as setClientStylingURL, b as setStreamStyling, c as renderIconDefinitionToSVGElement, g as getTranslations$1, d as translate$1, e as LeftOutlined, R as RightOutlined } from './lottery-tipping-latest-result-2895aaa8.js';
3
- export { L as lottery_tipping_latest_result } from './lottery-tipping-latest-result-2895aaa8.js';
2
+ import { r as requiredArgs, t as toDate, _ as _typeof, s as setClientStyling, a as setClientStylingURL, b as setStreamStyling, c as renderIconDefinitionToSVGElement, g as getTranslations$1, d as translate$1, e as LeftOutlined, R as RightOutlined } from './lottery-tipping-latest-result-bf6bd8d3.js';
3
+ export { L as lottery_tipping_latest_result } from './lottery-tipping-latest-result-bf6bd8d3.js';
4
4
 
5
5
  // This icon file is generated automatically.
6
6
  var CalendarOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z" } }] }, "name": "calendar", "theme": "outlined" };
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { L as LotteryTippingLatestResult } from './lottery-tipping-latest-result-2895aaa8.js';
1
+ export { L as LotteryTippingLatestResult } from './lottery-tipping-latest-result-bf6bd8d3.js';
2
2
  import './index-32d8a144.js';
@@ -210,7 +210,7 @@ const TRANSLATIONS = {
210
210
  en: {
211
211
  weeks: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
212
212
  bettingType: 'Betting Type:',
213
- prizeAllocation: 'Prize Allocation (Turnover: {turnover})',
213
+ prizeAllocation: 'Prize Allocation (Turnover: {turnover})',
214
214
  prizes: 'Prizes',
215
215
  numberOfWinners: 'Number of Winners',
216
216
  prizeMoney: 'Prize Money',
@@ -1,4 +1,4 @@
1
- import{r as t,h as e,g as i,c as o}from"./index-32d8a144.js";import{r as s,t as r,_ as n,s as a,a as l,b as h,c,g as d,d as u,e as p,R as m}from"./lottery-tipping-latest-result-2895aaa8.js";export{L as lottery_tipping_latest_result}from"./lottery-tipping-latest-result-2895aaa8.js";function v(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}var f={};function g(){return f}var b=36e5;function y(t){s(1,arguments);var e=r(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function w(t){s(1,arguments);var e=r(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var n=y(o),a=new Date(0);a.setUTCFullYear(i,0,4),a.setUTCHours(0,0,0,0);var l=y(a);return e.getTime()>=n.getTime()?i+1:e.getTime()>=l.getTime()?i:i-1}function _(t,e){var i,o,n,a,l,h,c,d;s(1,arguments);var u=g(),p=v(null!==(i=null!==(o=null!==(n=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(l=e.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:u.weekStartsOn)&&void 0!==o?o:null===(c=u.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==i?i:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=r(t),f=m.getUTCDay(),b=(f<p?7:0)+f-p;return m.setUTCDate(m.getUTCDate()-b),m.setUTCHours(0,0,0,0),m}function x(t,e){var i,o,n,a,l,h,c,d;s(1,arguments);var u=r(t),p=u.getUTCFullYear(),m=g(),f=v(null!==(i=null!==(o=null!==(n=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(l=e.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:m.firstWeekContainsDate)&&void 0!==o?o:null===(c=m.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(p+1,0,f),b.setUTCHours(0,0,0,0);var y=_(b,e),w=new Date(0);w.setUTCFullYear(p,0,f),w.setUTCHours(0,0,0,0);var x=_(w,e);return u.getTime()>=y.getTime()?p+1:u.getTime()>=x.getTime()?p:p-1}function k(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const C=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return k("yy"===e?o%100:o,e.length)},S=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):k(i+1,2)},A=function(t,e){return k(t.getUTCDate(),e.length)},z=function(t,e){return k(t.getUTCHours()%12||12,e.length)},T=function(t,e){return k(t.getUTCHours(),e.length)},I=function(t,e){return k(t.getUTCMinutes(),e.length)},D=function(t,e){return k(t.getUTCSeconds(),e.length)},O=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return k(Math.floor(o*Math.pow(10,i-3)),e.length)};var M={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return C(t,e)},Y:function(t,e,i,o){var s=x(t,o),r=s>0?s:1-s;return"YY"===e?k(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):k(r,e.length)},R:function(t,e){return k(w(t),e.length)},u:function(t,e){return k(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return k(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return k(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return S(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return k(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var n=function(t,e){s(1,arguments);var i=r(t),o=_(i,e).getTime()-function(t,e){var i,o,r,n,a,l,h,c;s(1,arguments);var d=g(),u=v(null!==(i=null!==(o=null!==(r=null!==(n=null==e?void 0:e.firstWeekContainsDate)&&void 0!==n?n:null==e||null===(a=e.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==o?o:null===(h=d.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==i?i:1),p=x(t,e),m=new Date(0);return m.setUTCFullYear(p,0,u),m.setUTCHours(0,0,0,0),_(m,e)}(i,e).getTime();return Math.round(o/6048e5)+1}(t,o);return"wo"===e?i.ordinalNumber(n,{unit:"week"}):k(n,e.length)},I:function(t,e,i){var o=function(t){s(1,arguments);var e=r(t),i=y(e).getTime()-function(t){s(1,arguments);var e=w(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),y(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):k(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):A(t,e)},D:function(t,e,i){var o=function(t){s(1,arguments);var e=r(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):k(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return k(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return k(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),s=0===o?7:o;switch(e){case"i":return String(s);case"ii":return k(s,e.length);case"io":return i.ordinalNumber(s,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,s=t.getUTCHours();switch(o=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,s=t.getUTCHours();switch(o=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return z(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):T(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):k(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):k(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):I(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):D(t,e)},S:function(t,e){return O(t,e)},X:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return P(s);case"XXXX":case"XX":return N(s);default:return N(s,":")}},x:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return P(s);case"xxxx":case"xx":return N(s);default:return N(s,":")}},O:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+E(s,":");default:return"GMT"+N(s,":")}},z:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+E(s,":");default:return"GMT"+N(s,":")}},t:function(t,e,i,o){return k(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return k((o._originalDate||t).getTime(),e.length)}};function E(t,e){var i=t>0?"-":"+",o=Math.abs(t),s=Math.floor(o/60),r=o%60;if(0===r)return i+String(s);var n=e||"";return i+String(s)+n+k(r,2)}function P(t,e){return t%60==0?(t>0?"-":"+")+k(Math.abs(t)/60,2):N(t,e)}function N(t,e){var i=e||"",o=t>0?"-":"+",s=Math.abs(t);return o+k(Math.floor(s/60),2)+i+k(s%60,2)}const B=M;var j=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},F=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},$={p:F,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],s=o[1],r=o[2];if(!r)return j(t,e);switch(s){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",j(s,e)).replace("{{time}}",F(r,e))}};const V=$;var R=["D","DD"],q=["YY","YYYY"];function W(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var H={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function U(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var Y,G={date:U({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:U({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:U({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},X={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function J(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):s;o=t.formattingValues[r]||t.formattingValues[s]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[a]||t.values[n]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function K(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,s=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!s)return null;var r,n=s[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(n.length)}}}const Z={code:"en-US",formatDistance:function(t,e,i){var o,s=H[t];return o="string"==typeof s?s:1===e?s.one:s.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:G,formatRelative:function(t){return X[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:J({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:J({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:J({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:J({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:J({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Y={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(Y.matchPattern);if(!i)return null;var o=i[0],s=t.match(Y.parsePattern);if(!s)return null;var r=Y.valueCallback?Y.valueCallback(s[0]):s[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(o.length)}}),era:K({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:K({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:K({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{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],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]},defaultParseWidth:"any"}),day:K({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:K({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var Q=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,et=/^'([^]*?)'?$/,it=/''/g,ot=/[a-zA-Z]/;function st(t,e,i){var o,a,l,h,c,d,u,p,m,f,b,y,w,_,x,k,C,S;s(2,arguments);var A=String(e),z=g(),T=null!==(o=null!==(a=null==i?void 0:i.locale)&&void 0!==a?a:z.locale)&&void 0!==o?o:Z,I=v(null!==(l=null!==(h=null!==(c=null!==(d=null==i?void 0:i.firstWeekContainsDate)&&void 0!==d?d:null==i||null===(u=i.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==c?c:z.firstWeekContainsDate)&&void 0!==h?h:null===(m=z.locale)||void 0===m||null===(f=m.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==l?l:1);if(!(I>=1&&I<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=v(null!==(b=null!==(y=null!==(w=null!==(_=null==i?void 0:i.weekStartsOn)&&void 0!==_?_:null==i||null===(x=i.locale)||void 0===x||null===(k=x.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==w?w:z.weekStartsOn)&&void 0!==y?y:null===(C=z.locale)||void 0===C||null===(S=C.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==b?b:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var O=r(t);if(!function(t){if(s(1,arguments),!function(t){return s(1,arguments),t instanceof Date||"object"===n(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=r(t);return!isNaN(Number(e))}(O))throw new RangeError("Invalid time value");var M=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(O),E=function(t,e){return s(2,arguments),function(t,e){s(2,arguments);var i=r(t).getTime(),o=v(e);return new Date(i+o)}(t,-v(e))}(O,M),P={firstWeekContainsDate:I,weekStartsOn:D,locale:T,_originalDate:O};return A.match(tt).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,V[e])(t,T.formatLong):t})).join("").match(Q).map((function(o){if("''"===o)return"'";var s,r,n=o[0];if("'"===n)return(r=(s=o).match(et))?r[1].replace(it,"'"):s;var a=B[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||-1===q.indexOf(o)||W(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==R.indexOf(o))||W(o,e,String(t)),a(E,o,T.localize,P);if(n.match(ot))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return o})).join("")}var rt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},nt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,at=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,lt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ht(t){return t?parseInt(t):1}function ct(t){return t&&parseFloat(t.replace(",","."))||0}var dt=[31,null,31,30,31,30,31,31,30,31,30,31];function ut(t){return t%400==0||t%4==0&&t%100!=0}const pt=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.position="top",this.delay=200,this.isVisible=!1,this._tooltipId=void 0}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this._tooltipId=`general-tooltip-${Math.random().toString(36).substring(2,9)}`}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl))}handleMouseEnterOrFocus(){clearTimeout(this.hideTimeout),this.showTimeout&&clearTimeout(this.showTimeout),this.showTimeout=setTimeout((()=>{this.isVisible=!0}),this.delay)}handleMouseLeaveOrBlur(){this.showTimeout&&clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>{this.isVisible=!1}),100)}handleKeyDown(t){"Escape"===t.key&&this.isVisible&&(this.isVisible=!1)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),clearTimeout(this.showTimeout),clearTimeout(this.hideTimeout)}render(){const t={"general-tooltip-popup":!0,visible:this.isVisible,[`general-tooltip-${this.position}`]:!0};return e("div",{key:"c0d52518e1e196e0d022789f7c6b7e64173b2c7d",class:"general-tooltip-wrapper"},e("slot",{key:"a935e103e16b0b619a024706e8224f4a937de6b9",name:"trigger"}),e("div",{key:"35c60e35ce3f8d5c2c42cd333fe64a3b289d34d4",class:"general-tooltip-container",role:"tooltip",ref:t=>this.stylingContainer=t},e("div",{key:"9d3fd9f142c1e3bd263dee289a2c1a9e4eebfddc",id:this._tooltipId,class:t,role:"tooltip"},e("slot",{key:"31344f0d4d4139f913d1819cc4f42a39f5113d8a",name:"content"}),e("div",{key:"f5cdd93060baec37b2a2879056efe2d66c5a553a",class:"general-tooltip-arrow"}))))}get hostElement(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};pt.style=".general-tooltip-wrapper{display:inline-block;position:relative;line-height:0}.general-tooltip-container{display:contents;}.general-tooltip-popup{position:absolute;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background-inverse, #000);padding:8px 12px;border-radius:4px;font-size:0.875em;line-height:1.4;z-index:1000;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;white-space:nowrap;pointer-events:none;}.general-tooltip-popup.visible{opacity:1;visibility:visible}.general-tooltip-arrow{position:absolute;width:0;height:0;border-style:solid}.general-tooltip-top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:8px;}.general-tooltip-top .general-tooltip-arrow{top:100%;left:50%;transform:translateX(-50%);border-width:6px 6px 0 6px;border-color:var(--emw--color-gray-300, #333) transparent transparent transparent}.general-tooltip-bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:8px;}.general-tooltip-bottom .general-tooltip-arrow{bottom:100%;left:50%;transform:translateX(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent var(--emw--color-gray-300, #333) transparent}.general-tooltip-left{right:100%;top:50%;transform:translateY(-50%);margin-right:8px;}.general-tooltip-left .general-tooltip-arrow{left:100%;top:50%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent var(--emw--color-gray-300, #333)}.general-tooltip-right{left:100%;top:50%;transform:translateY(-50%);margin-left:8px;}.general-tooltip-right .general-tooltip-arrow{right:100%;top:50%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent var(--emw--color-gray-300, #333) transparent transparent}";const mt=class{constructor(e){t(this,e),this.lotteryTippingBulletToggleEvent=o(this,"lotteryTippingBulletToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.value="",this.disabled=!1,this.isSelected=!1}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl))}handleClick(){this.disabled||this.lotteryTippingBulletToggleEvent.emit({positionIdx:this.positionIdx})}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"ef0fee38ed62adb7809b5a60668af6a499ebe5a6",ref:t=>this.stylingContainer=t},"text"===this.theme?e("div",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--text":!0}},this.value):e("button",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--disabled":this.disabled,"LotteryTippingBullet__segment--active":this.isSelected},onClick:this.handleClick.bind(this)},this.isSelected?"X":this.value))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};mt.style=".LotteryTippingBullet__segment{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:16px;line-height:1;font-weight:500;color:var(--emw--color-typography, #000);background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;cursor:pointer;transition:all 0.2s ease;user-select:none}.LotteryTippingBullet__segment:not(.LotteryTippingBullet__segment--disabled):hover{cursor:pointer;animation:jelly 0.3s ease-in-out;transform:scale(1.02)}.LotteryTippingBullet__segment--text{border:none;color:var(--emw--color-typography, #000);background:transparent;font-weight:400}.LotteryTippingBullet__segment--text:hover{cursor:not-allowed !important}.LotteryTippingBullet__segment--active{font-weight:600;background-color:var(--emw--color-background-inverse, #000);color:var(--emw--color-primary, #fed275)}.LotteryTippingBullet__segment--disabled:not(.LotteryTippingBullet__segment--active){background-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-gray-150, #6f6f6f);border-color:var(--emw--color-gray-100, #e6e6e6)}.LotteryTippingBullet__segment--disabled:hover{cursor:not-allowed}@keyframes jelly{0%{transform:translate(0, 0)}20%{transform:translate(-0.5px, -0.5px)}40%{transform:translate(0.5px, 0.5px)}60%{transform:translate(-0.25px, -0.25px)}80%{transform:translate(0.25px, 0.25px)}100%{transform:translate(0, 0)}}";const vt=class{constructor(e){t(this,e),this.lotteryTippingBulletGroupToggleEvent=o(this,"lotteryTippingBulletGroupToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.mode="single",this.bulletConfigContent=""}get bulletConfigArr(){const t=[{value:"1"},{value:"X"},{value:"2"}];if("string"!=typeof this.bulletConfigContent||!this.bulletConfigContent)return t;try{return JSON.parse(this.bulletConfigContent)}catch(e){return console.error("Error parsing bulletConfigContent:",e),t}}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryTippingBulletSelectionHandler(t){const{positionIdx:e}=t.detail;this.handleToggle(e)}handleToggle(t){let e=[...this.bulletConfigArr];"single"===this.mode?(e=e.map((t=>Object.assign(Object.assign({},t),{isSelected:!1}))),e[t].isSelected=!0):(e=e.map((t=>Object.assign({},t))),e[t].isSelected=!e[t].isSelected),this.lotteryTippingBulletGroupToggleEvent.emit({bulletConfigArr:e,positionIdx:this.positionIdx+"-"+t})}render(){var t;return e("div",{ref:t=>this.stylingContainer=t,key:this.positionIdx},e("div",{key:"68223022eed831932c571378164be913206d98e9",style:{display:"flex",flexDirection:"row",gap:"10px"}},null===(t=this.bulletConfigArr)||void 0===t?void 0:t.map(((t,i)=>e("div",{key:i},e("lottery-tipping-bullet",{value:t.value,isSelected:t.isSelected,"position-idx":i,disabled:t.disabled,theme:this.theme,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};vt.style="";var ft=Object.defineProperty,gt=Object.defineProperties,bt=Object.getOwnPropertyDescriptors,yt=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,xt=(t,e,i)=>e in t?ft(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,kt=(t,e)=>{for(var i in e||(e={}))wt.call(e,i)&&xt(t,i,e[i]);if(yt)for(var i of yt(e))_t.call(e,i)&&xt(t,i,e[i]);return t},Ct=(t,e)=>gt(t,bt(e)),St=(t,e,i)=>(xt(t,"symbol"!=typeof e?e+"":e,i),i),At=(t,e,i)=>new Promise(((o,s)=>{var r=t=>{try{a(i.next(t))}catch(t){s(t)}},n=t=>{try{a(i.throw(t))}catch(t){s(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
1
+ import{r as t,h as e,g as i,c as o}from"./index-32d8a144.js";import{r as s,t as r,_ as n,s as a,a as l,b as h,c,g as d,d as u,e as p,R as m}from"./lottery-tipping-latest-result-bf6bd8d3.js";export{L as lottery_tipping_latest_result}from"./lottery-tipping-latest-result-bf6bd8d3.js";function v(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}var f={};function g(){return f}var b=36e5;function y(t){s(1,arguments);var e=r(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function w(t){s(1,arguments);var e=r(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var n=y(o),a=new Date(0);a.setUTCFullYear(i,0,4),a.setUTCHours(0,0,0,0);var l=y(a);return e.getTime()>=n.getTime()?i+1:e.getTime()>=l.getTime()?i:i-1}function _(t,e){var i,o,n,a,l,h,c,d;s(1,arguments);var u=g(),p=v(null!==(i=null!==(o=null!==(n=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(l=e.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:u.weekStartsOn)&&void 0!==o?o:null===(c=u.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==i?i:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=r(t),f=m.getUTCDay(),b=(f<p?7:0)+f-p;return m.setUTCDate(m.getUTCDate()-b),m.setUTCHours(0,0,0,0),m}function x(t,e){var i,o,n,a,l,h,c,d;s(1,arguments);var u=r(t),p=u.getUTCFullYear(),m=g(),f=v(null!==(i=null!==(o=null!==(n=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(l=e.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:m.firstWeekContainsDate)&&void 0!==o?o:null===(c=m.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(p+1,0,f),b.setUTCHours(0,0,0,0);var y=_(b,e),w=new Date(0);w.setUTCFullYear(p,0,f),w.setUTCHours(0,0,0,0);var x=_(w,e);return u.getTime()>=y.getTime()?p+1:u.getTime()>=x.getTime()?p:p-1}function k(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const C=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return k("yy"===e?o%100:o,e.length)},S=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):k(i+1,2)},A=function(t,e){return k(t.getUTCDate(),e.length)},z=function(t,e){return k(t.getUTCHours()%12||12,e.length)},T=function(t,e){return k(t.getUTCHours(),e.length)},I=function(t,e){return k(t.getUTCMinutes(),e.length)},D=function(t,e){return k(t.getUTCSeconds(),e.length)},O=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return k(Math.floor(o*Math.pow(10,i-3)),e.length)};var M={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return C(t,e)},Y:function(t,e,i,o){var s=x(t,o),r=s>0?s:1-s;return"YY"===e?k(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):k(r,e.length)},R:function(t,e){return k(w(t),e.length)},u:function(t,e){return k(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return k(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return k(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return S(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return k(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var n=function(t,e){s(1,arguments);var i=r(t),o=_(i,e).getTime()-function(t,e){var i,o,r,n,a,l,h,c;s(1,arguments);var d=g(),u=v(null!==(i=null!==(o=null!==(r=null!==(n=null==e?void 0:e.firstWeekContainsDate)&&void 0!==n?n:null==e||null===(a=e.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==o?o:null===(h=d.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==i?i:1),p=x(t,e),m=new Date(0);return m.setUTCFullYear(p,0,u),m.setUTCHours(0,0,0,0),_(m,e)}(i,e).getTime();return Math.round(o/6048e5)+1}(t,o);return"wo"===e?i.ordinalNumber(n,{unit:"week"}):k(n,e.length)},I:function(t,e,i){var o=function(t){s(1,arguments);var e=r(t),i=y(e).getTime()-function(t){s(1,arguments);var e=w(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),y(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):k(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):A(t,e)},D:function(t,e,i){var o=function(t){s(1,arguments);var e=r(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):k(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return k(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var s=t.getUTCDay(),r=(s-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return k(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),s=0===o?7:o;switch(e){case"i":return String(s);case"ii":return k(s,e.length);case"io":return i.ordinalNumber(s,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,s=t.getUTCHours();switch(o=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,s=t.getUTCHours();switch(o=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return z(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):T(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):k(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):k(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):I(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):D(t,e)},S:function(t,e){return O(t,e)},X:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return P(s);case"XXXX":case"XX":return N(s);default:return N(s,":")}},x:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return P(s);case"xxxx":case"xx":return N(s);default:return N(s,":")}},O:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+E(s,":");default:return"GMT"+N(s,":")}},z:function(t,e,i,o){var s=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+E(s,":");default:return"GMT"+N(s,":")}},t:function(t,e,i,o){return k(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return k((o._originalDate||t).getTime(),e.length)}};function E(t,e){var i=t>0?"-":"+",o=Math.abs(t),s=Math.floor(o/60),r=o%60;if(0===r)return i+String(s);var n=e||"";return i+String(s)+n+k(r,2)}function P(t,e){return t%60==0?(t>0?"-":"+")+k(Math.abs(t)/60,2):N(t,e)}function N(t,e){var i=e||"",o=t>0?"-":"+",s=Math.abs(t);return o+k(Math.floor(s/60),2)+i+k(s%60,2)}const B=M;var j=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},F=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},$={p:F,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],s=o[1],r=o[2];if(!r)return j(t,e);switch(s){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",j(s,e)).replace("{{time}}",F(r,e))}};const V=$;var R=["D","DD"],q=["YY","YYYY"];function W(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var H={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function U(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var Y,G={date:U({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:U({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:U({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},X={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function J(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):s;o=t.formattingValues[r]||t.formattingValues[s]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[a]||t.values[n]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function K(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,s=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!s)return null;var r,n=s[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(n.length)}}}const Z={code:"en-US",formatDistance:function(t,e,i){var o,s=H[t];return o="string"==typeof s?s:1===e?s.one:s.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:G,formatRelative:function(t){return X[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:J({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:J({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:J({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:J({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:J({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Y={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(Y.matchPattern);if(!i)return null;var o=i[0],s=t.match(Y.parsePattern);if(!s)return null;var r=Y.valueCallback?Y.valueCallback(s[0]):s[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(o.length)}}),era:K({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:K({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:K({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{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],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]},defaultParseWidth:"any"}),day:K({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:K({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var Q=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,et=/^'([^]*?)'?$/,it=/''/g,ot=/[a-zA-Z]/;function st(t,e,i){var o,a,l,h,c,d,u,p,m,f,b,y,w,_,x,k,C,S;s(2,arguments);var A=String(e),z=g(),T=null!==(o=null!==(a=null==i?void 0:i.locale)&&void 0!==a?a:z.locale)&&void 0!==o?o:Z,I=v(null!==(l=null!==(h=null!==(c=null!==(d=null==i?void 0:i.firstWeekContainsDate)&&void 0!==d?d:null==i||null===(u=i.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==c?c:z.firstWeekContainsDate)&&void 0!==h?h:null===(m=z.locale)||void 0===m||null===(f=m.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==l?l:1);if(!(I>=1&&I<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=v(null!==(b=null!==(y=null!==(w=null!==(_=null==i?void 0:i.weekStartsOn)&&void 0!==_?_:null==i||null===(x=i.locale)||void 0===x||null===(k=x.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==w?w:z.weekStartsOn)&&void 0!==y?y:null===(C=z.locale)||void 0===C||null===(S=C.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==b?b:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!T.localize)throw new RangeError("locale must contain localize property");if(!T.formatLong)throw new RangeError("locale must contain formatLong property");var O=r(t);if(!function(t){if(s(1,arguments),!function(t){return s(1,arguments),t instanceof Date||"object"===n(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=r(t);return!isNaN(Number(e))}(O))throw new RangeError("Invalid time value");var M=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(O),E=function(t,e){return s(2,arguments),function(t,e){s(2,arguments);var i=r(t).getTime(),o=v(e);return new Date(i+o)}(t,-v(e))}(O,M),P={firstWeekContainsDate:I,weekStartsOn:D,locale:T,_originalDate:O};return A.match(tt).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,V[e])(t,T.formatLong):t})).join("").match(Q).map((function(o){if("''"===o)return"'";var s,r,n=o[0];if("'"===n)return(r=(s=o).match(et))?r[1].replace(it,"'"):s;var a=B[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||-1===q.indexOf(o)||W(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==R.indexOf(o))||W(o,e,String(t)),a(E,o,T.localize,P);if(n.match(ot))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return o})).join("")}var rt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},nt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,at=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,lt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ht(t){return t?parseInt(t):1}function ct(t){return t&&parseFloat(t.replace(",","."))||0}var dt=[31,null,31,30,31,30,31,31,30,31,30,31];function ut(t){return t%400==0||t%4==0&&t%100!=0}const pt=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.position="top",this.delay=200,this.isVisible=!1,this._tooltipId=void 0}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this._tooltipId=`general-tooltip-${Math.random().toString(36).substring(2,9)}`}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl))}handleMouseEnterOrFocus(){clearTimeout(this.hideTimeout),this.showTimeout&&clearTimeout(this.showTimeout),this.showTimeout=setTimeout((()=>{this.isVisible=!0}),this.delay)}handleMouseLeaveOrBlur(){this.showTimeout&&clearTimeout(this.showTimeout),this.hideTimeout=setTimeout((()=>{this.isVisible=!1}),100)}handleKeyDown(t){"Escape"===t.key&&this.isVisible&&(this.isVisible=!1)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),clearTimeout(this.showTimeout),clearTimeout(this.hideTimeout)}render(){const t={"general-tooltip-popup":!0,visible:this.isVisible,[`general-tooltip-${this.position}`]:!0};return e("div",{key:"c0d52518e1e196e0d022789f7c6b7e64173b2c7d",class:"general-tooltip-wrapper"},e("slot",{key:"a935e103e16b0b619a024706e8224f4a937de6b9",name:"trigger"}),e("div",{key:"35c60e35ce3f8d5c2c42cd333fe64a3b289d34d4",class:"general-tooltip-container",role:"tooltip",ref:t=>this.stylingContainer=t},e("div",{key:"9d3fd9f142c1e3bd263dee289a2c1a9e4eebfddc",id:this._tooltipId,class:t,role:"tooltip"},e("slot",{key:"31344f0d4d4139f913d1819cc4f42a39f5113d8a",name:"content"}),e("div",{key:"f5cdd93060baec37b2a2879056efe2d66c5a553a",class:"general-tooltip-arrow"}))))}get hostElement(){return i(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};pt.style=".general-tooltip-wrapper{display:inline-block;position:relative;line-height:0}.general-tooltip-container{display:contents;}.general-tooltip-popup{position:absolute;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background-inverse, #000);padding:8px 12px;border-radius:4px;font-size:0.875em;line-height:1.4;z-index:1000;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;white-space:nowrap;pointer-events:none;}.general-tooltip-popup.visible{opacity:1;visibility:visible}.general-tooltip-arrow{position:absolute;width:0;height:0;border-style:solid}.general-tooltip-top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:8px;}.general-tooltip-top .general-tooltip-arrow{top:100%;left:50%;transform:translateX(-50%);border-width:6px 6px 0 6px;border-color:var(--emw--color-gray-300, #333) transparent transparent transparent}.general-tooltip-bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:8px;}.general-tooltip-bottom .general-tooltip-arrow{bottom:100%;left:50%;transform:translateX(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent var(--emw--color-gray-300, #333) transparent}.general-tooltip-left{right:100%;top:50%;transform:translateY(-50%);margin-right:8px;}.general-tooltip-left .general-tooltip-arrow{left:100%;top:50%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent var(--emw--color-gray-300, #333)}.general-tooltip-right{left:100%;top:50%;transform:translateY(-50%);margin-left:8px;}.general-tooltip-right .general-tooltip-arrow{right:100%;top:50%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent var(--emw--color-gray-300, #333) transparent transparent}";const mt=class{constructor(e){t(this,e),this.lotteryTippingBulletToggleEvent=o(this,"lotteryTippingBulletToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.value="",this.disabled=!1,this.isSelected=!1}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl))}handleClick(){this.disabled||this.lotteryTippingBulletToggleEvent.emit({positionIdx:this.positionIdx})}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"ef0fee38ed62adb7809b5a60668af6a499ebe5a6",ref:t=>this.stylingContainer=t},"text"===this.theme?e("div",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--text":!0}},this.value):e("button",{class:{LotteryTippingBullet__segment:!0,"LotteryTippingBullet__segment--disabled":this.disabled,"LotteryTippingBullet__segment--active":this.isSelected},onClick:this.handleClick.bind(this)},this.isSelected?"X":this.value))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};mt.style=".LotteryTippingBullet__segment{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:16px;line-height:1;font-weight:500;color:var(--emw--color-typography, #000);background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;cursor:pointer;transition:all 0.2s ease;user-select:none}.LotteryTippingBullet__segment:not(.LotteryTippingBullet__segment--disabled):hover{cursor:pointer;animation:jelly 0.3s ease-in-out;transform:scale(1.02)}.LotteryTippingBullet__segment--text{border:none;color:var(--emw--color-typography, #000);background:transparent;font-weight:400}.LotteryTippingBullet__segment--text:hover{cursor:not-allowed !important}.LotteryTippingBullet__segment--active{font-weight:600;background-color:var(--emw--color-background-inverse, #000);color:var(--emw--color-primary, #fed275)}.LotteryTippingBullet__segment--disabled:not(.LotteryTippingBullet__segment--active){background-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-gray-150, #6f6f6f);border-color:var(--emw--color-gray-100, #e6e6e6)}.LotteryTippingBullet__segment--disabled:hover{cursor:not-allowed}@keyframes jelly{0%{transform:translate(0, 0)}20%{transform:translate(-0.5px, -0.5px)}40%{transform:translate(0.5px, 0.5px)}60%{transform:translate(-0.25px, -0.25px)}80%{transform:translate(0.25px, 0.25px)}100%{transform:translate(0, 0)}}";const vt=class{constructor(e){t(this,e),this.lotteryTippingBulletGroupToggleEvent=o(this,"lotteryTippingBulletGroupToggle",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.positionIdx=void 0,this.theme="default",this.mode="single",this.bulletConfigContent=""}get bulletConfigArr(){const t=[{value:"1"},{value:"X"},{value:"2"}];if("string"!=typeof this.bulletConfigContent||!this.bulletConfigContent)return t;try{return JSON.parse(this.bulletConfigContent)}catch(e){return console.error("Error parsing bulletConfigContent:",e),t}}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&l(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&h(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&h(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&l(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}lotteryTippingBulletSelectionHandler(t){const{positionIdx:e}=t.detail;this.handleToggle(e)}handleToggle(t){let e=[...this.bulletConfigArr];"single"===this.mode?(e=e.map((t=>Object.assign(Object.assign({},t),{isSelected:!1}))),e[t].isSelected=!0):(e=e.map((t=>Object.assign({},t))),e[t].isSelected=!e[t].isSelected),this.lotteryTippingBulletGroupToggleEvent.emit({bulletConfigArr:e,positionIdx:this.positionIdx+"-"+t})}render(){var t;return e("div",{ref:t=>this.stylingContainer=t,key:this.positionIdx},e("div",{key:"68223022eed831932c571378164be913206d98e9",style:{display:"flex",flexDirection:"row",gap:"10px"}},null===(t=this.bulletConfigArr)||void 0===t?void 0:t.map(((t,i)=>e("div",{key:i},e("lottery-tipping-bullet",{value:t.value,isSelected:t.isSelected,"position-idx":i,disabled:t.disabled,theme:this.theme,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,mbSource:this.mbSource}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};vt.style="";var ft=Object.defineProperty,gt=Object.defineProperties,bt=Object.getOwnPropertyDescriptors,yt=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,xt=(t,e,i)=>e in t?ft(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,kt=(t,e)=>{for(var i in e||(e={}))wt.call(e,i)&&xt(t,i,e[i]);if(yt)for(var i of yt(e))_t.call(e,i)&&xt(t,i,e[i]);return t},Ct=(t,e)=>gt(t,bt(e)),St=(t,e,i)=>(xt(t,"symbol"!=typeof e?e+"":e,i),i),At=(t,e,i)=>new Promise(((o,s)=>{var r=t=>{try{a(i.next(t))}catch(t){s(t)}},n=t=>{try{a(i.throw(t))}catch(t){s(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
2
2
  /**
3
3
  * @license
4
4
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -1 +1 @@
1
- export{L as LotteryTippingLatestResult}from"./lottery-tipping-latest-result-2895aaa8.js";import"./index-32d8a144.js";
1
+ export{L as LotteryTippingLatestResult}from"./lottery-tipping-latest-result-bf6bd8d3.js";import"./index-32d8a144.js";
@@ -0,0 +1 @@
1
+ import{r as t,h as e}from"./index-32d8a144.js";const n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var r=function(){return r=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},r.apply(this,arguments)},s={primaryColor:"#333",secondaryColor:"#E6E6E6"};function a(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var n=e.placeholders||s;return o(t.icon(n.primaryColor,n.secondaryColor),e)}return o(t.icon,e)}function o(t,e){var n="svg"===t.tag?r(r({},t.attrs),e.extraSVGAttrs||{}):t.attrs,i=Object.keys(n).reduce((function(t,e){var i=n[e],r="".concat(e,'="').concat(i,'"');return t.push(r),t}),[]),s=i.length?" "+i.join(" "):"",a=(t.children||[]).map((function(t){return o(t,e)})).join("");return a&&a.length?"<".concat(t.tag).concat(s,">").concat(a,"</").concat(t.tag,">"):"<".concat(t.tag).concat(s," />")}function l(t,e){if(t){const n=document.createElement("style");n.innerHTML=e,t.appendChild(n)}}function c(t,e){const n=new URL(e);fetch(n.href).then((t=>t.text())).then((e=>{const n=document.createElement("style");n.innerHTML=e,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function d(t,e){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{n.innerHTML=e,t&&t.appendChild(n)}))}}function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function u(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function p(t){u(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===h(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(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"),console.warn((new Error).stack)),new Date(NaN))}const b=["ro","en","fr","ar","hr"],f={en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],bettingType:"Betting Type:",prizeAllocation:"Prize Allocation (Turnover: {turnover})",prizes:"Prizes",numberOfWinners:"Number of Winners",prizeMoney:"Prize Money",noLatestResult:"No latest result.",loading:"Loading...."},ro:{bettingType:"Tip de pariu:",prizeAllocation:"Alocarea premiilor (Cifră de afaceri: €{turnover})",prizes:"Premii",numberOfWinners:"Număr de câștigători",prizeMoney:"Bani de premiu",noLatestResult:"Niciun rezultat recent.",loading:"Se încarcă...."},fr:{bettingType:"Type de pari:",prizeAllocation:"Répartition des prix (Chiffre d'affaires: € {turnover})",prizes:"Prix",numberOfWinners:"Nombre de gagnants",prizeMoney:"Prix en argent",noLatestResult:"Aucun résultat récent.",loading:"Chargement...."},ar:{bettingType:"نوع الرهان:",prizeAllocation:"تخصيص الجائزة (دوران: € {turnover})",prizes:"الجوائز",numberOfWinners:"عدد الفائزين",prizeMoney:"أموال الجائزة",noLatestResult:"لا يوجد أحدث نتيجة.",loading:"جار التحميل...."},hr:{bettingType:"Vrsta oklade:",prizeAllocation:"Raspodjela nagrada (Promet: € {turnover})",prizes:"Nagrade",numberOfWinners:"Broj pobjednika",prizeMoney:"Novčana nagrada",noLatestResult:"Nema najnovijih rezultata.",loading:"Učitavanje...."}},g=(t,e,n)=>{const i=e;let r=f[void 0!==i&&b.includes(i)?i:"en"][t];return n&&Object.keys(n).forEach((t=>{r=r.replace(`{${t}}`,n[t])})),r},y=t=>{Object.keys(t).forEach((e=>{for(let n in t[e])f[e][n]=t[e][n]}))};function m(t,e="GET",n=null,i={}){return new Promise(((r,s)=>{const a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),o=Object.assign({"Content-Type":"application/json"},i);"GET"!==e&&"HEAD"!==e&&(o["X-Idempotency-Key"]=a);const l={method:e,headers:o,body:null};n&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(n):delete l.body,fetch(t,l).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>r(t))).catch((t=>s(t)))}))}function v(t,e){return null==t||""===t||(0!==t||!e)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let n=0;for(let i=0;i<e;i++){if(!v(t[i]))return!1;n++}return n===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let n=0;for(const e of Object.values(t)){if(!v(e))return!1;n++}return n===e}(t):!t)}const w={0:"1",1:"X",2:"2"};function x(t){const e=[],n=[];for(let e=0;e<t.length;e+=2){const[i,r]=[t[e],t[e+1]];n[r]?n[r].push(i):n[r]=[i]}return n.forEach((t=>{e.push(function(t){const e=[];return Object.keys(w).forEach((n=>{e.push({isSelected:t.includes(Number(n)),value:w[n]})})),e}(t))})),e}function z(t){if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}const k=a(n,{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),T=a(i,{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),C=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.endpointTicket=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.hasDrawDates=["2025-05-28T02:00:00Z","2025-05-16T02:00:00Z"],this.lastestDate="2025-05-28T02:00:00Z",this.drawList=void 0,this.curDrawItem=void 0,this.curDrawItemIdx=0,this.curDrawSelection=[],this.curDrawSelectionBettingType=void 0,this.curDrawSelectionMap={},this.curPrizes=void 0,this.curPrizeMap={},this.curTurnOver=0,this.isLoading=!1,this.playTypes=null,this.bettingTypes=void 0,this.vendorGameId=void 0}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&y(JSON.parse(this.translationUrl)),this.getGameById(),this.fetDrawList()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async getGameById(){var t,e,n,i;try{this.isLoading=!0;const r=await async function(t,e){try{return await m(`${t}/games/${e}`,"GET",{})}catch(t){throw console.error("Failed to fetch game info:",t),new Error("The game is currently not available. Please try again later.")}}(this.endpoint,this.gameId);this.vendorGameId=null==r?void 0:r.type,this.playTypes=null===(e=null===(t=null==r?void 0:r.rules)||void 0===t?void 0:t.poolGame)||void 0===e?void 0:e.playTypes,this.bettingTypes=null===(i=null===(n=null==r?void 0:r.rules)||void 0===n?void 0:n.poolGame)||void 0===i?void 0:i.bettingTypes}catch(t){console.log(t)}finally{this.isLoading=!1}}findLatestDateIdx(t){const e=new Date;let n=0,i=1/0;return t.forEach(((t,r)=>{const s=new Date(t),a=Math.abs(function(t,e){return u(2,arguments),p(t).getTime()-p(e).getTime()}(e,s));a<i&&(i=a,n=r)})),n}async fetDrawList(){try{this.isLoading=!0;const t={status:"PAYABLE",limit:9999},{items:e}=await m(`${this.endpoint}/games/${this.gameId}/draws${function(t){const e={};Object.entries(t).forEach((([t,n])=>{v(n,!0)||(e[t]=n)}));const n=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return n?`?${n}`:""}(t)}`,"GET");if(!e||0===e.length)return;const n=e;n.sort(((t,e)=>t.date.localeCompare(e.date))),this.drawList=n,this.hasDrawDates=n.map((t=>t.date)),this.curDrawItemIdx=this.findLatestDateIdx(this.hasDrawDates),this.lastestDate=this.hasDrawDates[this.curDrawItemIdx],this.curDrawItem=n[this.curDrawItemIdx],this.curDrawSelectionBettingType=n[this.curDrawItemIdx].winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[x(t.numbers)]})),this.curDrawItem.prizes.forEach((t=>{const e=t.winningType;this.curPrizeMap[e]?(this.curPrizeMap[e].push(t),this.curPrizeMap[e].sort(((t,e)=>e.totalAmount.value-t.totalAmount.value))):this.curPrizeMap[e]=[t]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],this.curTurnOver=this.curPrizes.reduce(((t,e)=>t+Number(e.totalAmount.value)),0)}catch(t){console.log(t)}finally{this.isLoading=!1}}get displayedPrizes(){return[...this.curPrizes.filter((t=>t.divisionDisplayName.includes("Correct"))).sort(((t,e)=>{const n=Number(t.divisionDisplayName.match(/\d+/)[0]);return Number(null==e?void 0:e.divisionDisplayName.match(/\d+/)[0])-n})),...this.curPrizes.filter((t=>"Bonus"===t.divisionDisplayName))]}changeCurDateItem(t){this.lastestDate=this.hasDrawDates[t],this.curDrawItemIdx=t,this.curDrawItem=this.drawList[t],this.curDrawSelectionBettingType=this.curDrawItem.winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[x(t.numbers)]})),this.curPrizeMap={},this.curDrawItem.prizes.forEach((t=>{const e=t.winningType;this.curPrizeMap[e]?(this.curPrizeMap[e].push(t),this.curPrizeMap[e].sort(((t,e)=>e.totalAmount.value-t.totalAmount.value))):this.curPrizeMap[e]=[t]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],this.curTurnOver=this.curPrizes.reduce(((t,e)=>t+Number(e.totalAmount.value)),0)}handleChangeDate(t){this.changeCurDateItem(t.detail)}preDraw(){this.curDrawItemIdx>0&&this.changeCurDateItem(--this.curDrawItemIdx)}nextDraw(){this.curDrawItemIdx<this.drawList.length-1&&this.changeCurDateItem(++this.curDrawItemIdx)}handleDrawBettingTypeChange(t){this.curDrawSelectionBettingType=t,this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],console.log("this.curPrizes",this.curPrizes),this.curTurnOver=this.curPrizes.reduce(((t,e)=>t+Number(e.totalAmount.value)),0)}getBettingTypeName(t){var e,n;const i=null===(n=null===(e=this.bettingTypes)||void 0===e?void 0:e.find((e=>e.code===t)))||void 0===n?void 0:n.name;return null!=i?i:t}render(){return e("div",{key:"7007ddb59aed34fc20fecdf06d0d53452313e787",class:"lottery-tipping-latest-result",ref:t=>this.stylingContainer=t},this.curDrawSelection&&this.curDrawSelection.length>0&&e("div",{key:"59a729ba714503d5b536133e80b68ad6fa3d97a2",class:"result-wrapper"},e("div",{key:"54e9234aaa863b63c7560ea3bba43b78501046d3",class:"date-selection"},e("div",{key:"aed56b08b9f7fe29c58ba5e55353397b906ac686",class:"date-selection-leftIcon",innerHTML:k,onClick:this.preDraw.bind(this)}),e("div",{key:"56a8536a2e6b81947adffad3f865d605c3b9c32e",class:"date-selection-calendar"},e("lottery-tipping-calendar",{key:"e6f6498838ec7d2ca56db9f85bd888b2b7d6511f",date:this.lastestDate,highLightDates:this.hasDrawDates,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl})),e("div",{key:"6f2380ab5945ba0fb53a0fc69541312723306202",class:"date-selection-rightIcon",innerHTML:T,onClick:this.nextDraw.bind(this)})),e("div",{key:"74771044a8391de4ae6caad07b3c4c39a3e1a1e1",class:"winning-result"},e("div",{key:"999094cbf4db0b96479ceadfb58e39393438ae30",class:"betting-type"},e("div",{key:"38af0c363d784156fb5835f59775e29c620800ac",class:"betting-type-title"},g("bettingType",this.language)),e("div",{key:"496a1eebcd1cc0f8d4a5ece6c0e472e0d2595b8e",class:"betting-type-text"},e("div",{key:"e2d7bf643dcea0909228ec15b27c3bd8223a037d",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>e("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:this.handleDrawBettingTypeChange.bind(this,t)},this.getBettingTypeName(t))))))),e("lottery-tipping-ticket-bet",{key:"0075d96aa6f5a3278be09a9859d09de127d1d4a1","session-id":this.sessionId,endpoint:this.endpoint,"game-id":this.vendorGameId,"draw-id":this.curDrawItem.id,"default-bullet-config-line-group":JSON.stringify(this.curDrawSelection),"read-pretty":!0,"total-pages":this.curDrawSelection.length,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl})),e("div",{key:"1b1203abf46c48ce37301ad964995548488fab13",class:"prize-result"},e("div",{key:"6ca0a57e88e2f104f7cd9b9c8b656259c4f85c48",class:"prize-result-title"},g("prizeAllocation",this.language,{turnover:(t=this.curTurnOver,null==t?"":`€${t?z(t):0}`)})),e("div",{key:"eb5c63f5cf063bf3d58e5f67a934d4aa646e5d2a",class:"prize-result-table"},e("div",{key:"f4aa7aa010af6b7cc7461029cd3b6d0cd5f1fa17",class:"prize-result-table-header"},e("div",{key:"ce5afb5067aaa10d2b8aed55eb9bf2e456640a22",class:"prize-result-table-row"},e("div",{key:"a25246d5ed02922cdc424e3ba995219e248298cc",class:"prize-result-table-column"},g("prizes",this.language)),e("div",{key:"701aed9ffb565e7530d96afa946f630b27cb6bc4",class:"prize-result-table-column"},g("numberOfWinners",this.language)),e("div",{key:"c8dcd3e3c5315a29a76d641898b569667a32c6a3",class:"prize-result-table-column"},g("prizeMoney",this.language)))),e("div",{key:"a1fe82d196b3db775a8e671b107b0b8aa835b2c4",class:"prize-result-table-body"},this.displayedPrizes.map((t=>e("div",{class:"prize-result-table-row"},e("div",{class:"prize-result-table-column"},t.divisionDisplayName),e("div",{class:"prize-result-table-column"},t.players),e("div",{class:"prize-result-table-column"},z(t.totalAmount.value))))))))),0==this.curDrawSelection.length&&!this.isLoading&&e("div",{key:"84d70585471cffd14e2e0c0db37966b54f4150ac"},g("noLatestResult",this.language)),this.isLoading&&e("div",{key:"b8988afe78bf47497f09743cf5841014e8611a05",class:"loading-wrap"},g("loading",this.language)));var t}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};C.style=".lottery-tipping-latest-result {\n padding: 16px;\n container-type: inline-size;\n background-color: var(--emw--color-background, #fff);\n}\n.lottery-tipping-latest-result .date-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 24px;\n width: 400px;\n}\n.lottery-tipping-latest-result .date-selection-leftIcon, .lottery-tipping-latest-result .date-selection-rightIcon {\n cursor: pointer;\n}\n\n.LotteryTippingTicketController__segmented-control {\n height: 2.2rem;\n display: inline-flex;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 2rem;\n padding: 0.2rem;\n}\n.LotteryTippingTicketController__segment {\n background-color: transparent;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n transition: background-color 0.25s ease, color 0.25s ease;\n white-space: nowrap;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketController__segment--active {\n background-color: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n}\n.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.betting-type {\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n gap: 20px;\n}\n.betting-type-title {\n font-weight: 600;\n font-size: 16px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.betting-type-text {\n font-size: 16px;\n}\n\n.result-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 60%;\n margin: 0 auto;\n}\n.result-wrapper .winning-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .prize-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .prize-result-title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 12px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.result-wrapper .prize-result-table {\n width: 100%;\n}\n.result-wrapper .prize-result-table-row {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n}\n.result-wrapper .prize-result-table-column {\n text-align: left;\n padding: 12px 14px;\n width: 160px;\n font-size: 14px;\n width: calc((100% - 2px) / 3);\n color: var(--emw--color-typography, #000);\n}\n.result-wrapper .prize-result-table-header {\n width: 100%;\n background-color: var(--emw--color-background-secondary, #e6e6e6);\n border-radius: 4px;\n}\n.result-wrapper .prize-result-table-body {\n background-color: var(--emw--color-background-tertiary, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-header .prize-result-table-column {\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n border-right: 1px solid var(--emw--color-background, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-body .prize-result-table-row:hover {\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n@container (max-width: 980px) and (min-width: 780px) {\n .result-wrapper {\n width: 84%;\n }\n}\n@container (max-width: 780px) and (min-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n}\n@container (max-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n .result-wrapper .winning-result {\n width: 100%;\n margin-top: 14px;\n }\n .result-wrapper .prize-result {\n width: 100%;\n }\n .result-wrapper .prize-result-table-column {\n padding: 6px;\n width: 100px;\n }\n}";export{C as L,i as R,h as _,c as a,d as b,a as c,g as d,n as e,y as g,u as r,l as s,p as t}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-tipping-latest-result",
3
- "version": "1.85.15",
3
+ "version": "1.85.17",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,h as e}from"./index-32d8a144.js";const n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var r=function(){return r=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},r.apply(this,arguments)},s={primaryColor:"#333",secondaryColor:"#E6E6E6"};function a(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var n=e.placeholders||s;return o(t.icon(n.primaryColor,n.secondaryColor),e)}return o(t.icon,e)}function o(t,e){var n="svg"===t.tag?r(r({},t.attrs),e.extraSVGAttrs||{}):t.attrs,i=Object.keys(n).reduce((function(t,e){var i=n[e],r="".concat(e,'="').concat(i,'"');return t.push(r),t}),[]),s=i.length?" "+i.join(" "):"",a=(t.children||[]).map((function(t){return o(t,e)})).join("");return a&&a.length?"<".concat(t.tag).concat(s,">").concat(a,"</").concat(t.tag,">"):"<".concat(t.tag).concat(s," />")}function l(t,e){if(t){const n=document.createElement("style");n.innerHTML=e,t.appendChild(n)}}function c(t,e){const n=new URL(e);fetch(n.href).then((t=>t.text())).then((e=>{const n=document.createElement("style");n.innerHTML=e,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function d(t,e){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{n.innerHTML=e,t&&t.appendChild(n)}))}}function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function u(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function p(t){u(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===h(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(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"),console.warn((new Error).stack)),new Date(NaN))}const b=["ro","en","fr","ar","hr"],f={en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],bettingType:"Betting Type:",prizeAllocation:"Prize Allocation (Turnover: €{turnover})",prizes:"Prizes",numberOfWinners:"Number of Winners",prizeMoney:"Prize Money",noLatestResult:"No latest result.",loading:"Loading...."},ro:{bettingType:"Tip de pariu:",prizeAllocation:"Alocarea premiilor (Cifră de afaceri: €{turnover})",prizes:"Premii",numberOfWinners:"Număr de câștigători",prizeMoney:"Bani de premiu",noLatestResult:"Niciun rezultat recent.",loading:"Se încarcă...."},fr:{bettingType:"Type de pari:",prizeAllocation:"Répartition des prix (Chiffre d'affaires: € {turnover})",prizes:"Prix",numberOfWinners:"Nombre de gagnants",prizeMoney:"Prix en argent",noLatestResult:"Aucun résultat récent.",loading:"Chargement...."},ar:{bettingType:"نوع الرهان:",prizeAllocation:"تخصيص الجائزة (دوران: € {turnover})",prizes:"الجوائز",numberOfWinners:"عدد الفائزين",prizeMoney:"أموال الجائزة",noLatestResult:"لا يوجد أحدث نتيجة.",loading:"جار التحميل...."},hr:{bettingType:"Vrsta oklade:",prizeAllocation:"Raspodjela nagrada (Promet: € {turnover})",prizes:"Nagrade",numberOfWinners:"Broj pobjednika",prizeMoney:"Novčana nagrada",noLatestResult:"Nema najnovijih rezultata.",loading:"Učitavanje...."}},g=(t,e,n)=>{const i=e;let r=f[void 0!==i&&b.includes(i)?i:"en"][t];return n&&Object.keys(n).forEach((t=>{r=r.replace(`{${t}}`,n[t])})),r},y=t=>{Object.keys(t).forEach((e=>{for(let n in t[e])f[e][n]=t[e][n]}))};function m(t,e="GET",n=null,i={}){return new Promise(((r,s)=>{const a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),o=Object.assign({"Content-Type":"application/json"},i);"GET"!==e&&"HEAD"!==e&&(o["X-Idempotency-Key"]=a);const l={method:e,headers:o,body:null};n&&"GET"!==e&&"HEAD"!==e?l.body=JSON.stringify(n):delete l.body,fetch(t,l).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>r(t))).catch((t=>s(t)))}))}function v(t,e){return null==t||""===t||(0!==t||!e)&&(Array.isArray(t)?function(t){if(0===t.length)return!0;const e=t.length;let n=0;for(let i=0;i<e;i++){if(!v(t[i]))return!1;n++}return n===e}(t):"[object Object]"===Object.prototype.toString.call(t)?function(t){if(0===Object.keys(t).length)return!0;const e=Object.keys(t).length;let n=0;for(const e of Object.values(t)){if(!v(e))return!1;n++}return n===e}(t):!t)}const w={0:"1",1:"X",2:"2"};function x(t){const e=[],n=[];for(let e=0;e<t.length;e+=2){const[i,r]=[t[e],t[e+1]];n[r]?n[r].push(i):n[r]=[i]}return n.forEach((t=>{e.push(function(t){const e=[];return Object.keys(w).forEach((n=>{e.push({isSelected:t.includes(Number(n)),value:w[n]})})),e}(t))})),e}function z(t){if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}const k=a(n,{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),T=a(i,{extraSVGAttrs:{width:"16px",height:"16px",fill:""}}),C=class{constructor(e){t(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.endpoint=void 0,this.endpointTicket=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.hasDrawDates=["2025-05-28T02:00:00Z","2025-05-16T02:00:00Z"],this.lastestDate="2025-05-28T02:00:00Z",this.drawList=void 0,this.curDrawItem=void 0,this.curDrawItemIdx=0,this.curDrawSelection=[],this.curDrawSelectionBettingType=void 0,this.curDrawSelectionMap={},this.curPrizes=void 0,this.curPrizeMap={},this.curTurnOver=0,this.isLoading=!1,this.playTypes=null,this.bettingTypes=void 0,this.vendorGameId=void 0}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&c(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&y(JSON.parse(this.translationUrl)),this.getGameById(),this.fetDrawList()}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async getGameById(){var t,e,n,i;try{this.isLoading=!0;const r=await async function(t,e){try{return await m(`${t}/games/${e}`,"GET",{})}catch(t){throw console.error("Failed to fetch game info:",t),new Error("The game is currently not available. Please try again later.")}}(this.endpoint,this.gameId);this.vendorGameId=null==r?void 0:r.type,this.playTypes=null===(e=null===(t=null==r?void 0:r.rules)||void 0===t?void 0:t.poolGame)||void 0===e?void 0:e.playTypes,this.bettingTypes=null===(i=null===(n=null==r?void 0:r.rules)||void 0===n?void 0:n.poolGame)||void 0===i?void 0:i.bettingTypes}catch(t){console.log(t)}finally{this.isLoading=!1}}findLatestDateIdx(t){const e=new Date;let n=0,i=1/0;return t.forEach(((t,r)=>{const s=new Date(t),a=Math.abs(function(t,e){return u(2,arguments),p(t).getTime()-p(e).getTime()}(e,s));a<i&&(i=a,n=r)})),n}async fetDrawList(){try{this.isLoading=!0;const t={status:"PAYABLE",limit:9999},{items:e}=await m(`${this.endpoint}/games/${this.gameId}/draws${function(t){const e={};Object.entries(t).forEach((([t,n])=>{v(n,!0)||(e[t]=n)}));const n=Object.entries(e).map((([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`)).join("&");return n?`?${n}`:""}(t)}`,"GET");if(!e||0===e.length)return;const n=e;n.sort(((t,e)=>t.date.localeCompare(e.date))),this.drawList=n,this.hasDrawDates=n.map((t=>t.date)),this.curDrawItemIdx=this.findLatestDateIdx(this.hasDrawDates),this.lastestDate=this.hasDrawDates[this.curDrawItemIdx],this.curDrawItem=n[this.curDrawItemIdx],this.curDrawSelectionBettingType=n[this.curDrawItemIdx].winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[x(t.numbers)]})),this.curDrawItem.prizes.forEach((t=>{const e=t.winningType;this.curPrizeMap[e]?(this.curPrizeMap[e].push(t),this.curPrizeMap[e].sort(((t,e)=>e.totalAmount.value-t.totalAmount.value))):this.curPrizeMap[e]=[t]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],this.curTurnOver=this.curPrizes.reduce(((t,e)=>t+Number(e.totalAmount.value)),0)}catch(t){console.log(t)}finally{this.isLoading=!1}}get displayedPrizes(){return[...this.curPrizes.filter((t=>t.divisionDisplayName.includes("Correct"))).sort(((t,e)=>{const n=Number(t.divisionDisplayName.match(/\d+/)[0]);return Number(null==e?void 0:e.divisionDisplayName.match(/\d+/)[0])-n})),...this.curPrizes.filter((t=>"Bonus"===t.divisionDisplayName))]}changeCurDateItem(t){this.lastestDate=this.hasDrawDates[t],this.curDrawItemIdx=t,this.curDrawItem=this.drawList[t],this.curDrawSelectionBettingType=this.curDrawItem.winningNumbers[0].winning_type,this.curDrawItem.winningNumbers.forEach((t=>{this.curDrawSelectionMap[t.winning_type]=[x(t.numbers)]})),this.curPrizeMap={},this.curDrawItem.prizes.forEach((t=>{const e=t.winningType;this.curPrizeMap[e]?(this.curPrizeMap[e].push(t),this.curPrizeMap[e].sort(((t,e)=>e.totalAmount.value-t.totalAmount.value))):this.curPrizeMap[e]=[t]})),this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],this.curTurnOver=this.curPrizes.reduce(((t,e)=>t+Number(e.totalAmount.value)),0)}handleChangeDate(t){this.changeCurDateItem(t.detail)}preDraw(){this.curDrawItemIdx>0&&this.changeCurDateItem(--this.curDrawItemIdx)}nextDraw(){this.curDrawItemIdx<this.drawList.length-1&&this.changeCurDateItem(++this.curDrawItemIdx)}handleDrawBettingTypeChange(t){this.curDrawSelectionBettingType=t,this.curDrawSelection=this.curDrawSelectionMap[this.curDrawSelectionBettingType],this.curPrizes=this.curPrizeMap[this.curDrawSelectionBettingType],console.log("this.curPrizes",this.curPrizes),this.curTurnOver=this.curPrizes.reduce(((t,e)=>t+Number(e.totalAmount.value)),0)}getBettingTypeName(t){var e,n;const i=null===(n=null===(e=this.bettingTypes)||void 0===e?void 0:e.find((e=>e.code===t)))||void 0===n?void 0:n.name;return null!=i?i:t}render(){return e("div",{key:"7007ddb59aed34fc20fecdf06d0d53452313e787",class:"lottery-tipping-latest-result",ref:t=>this.stylingContainer=t},this.curDrawSelection&&this.curDrawSelection.length>0&&e("div",{key:"59a729ba714503d5b536133e80b68ad6fa3d97a2",class:"result-wrapper"},e("div",{key:"54e9234aaa863b63c7560ea3bba43b78501046d3",class:"date-selection"},e("div",{key:"aed56b08b9f7fe29c58ba5e55353397b906ac686",class:"date-selection-leftIcon",innerHTML:k,onClick:this.preDraw.bind(this)}),e("div",{key:"56a8536a2e6b81947adffad3f865d605c3b9c32e",class:"date-selection-calendar"},e("lottery-tipping-calendar",{key:"e6f6498838ec7d2ca56db9f85bd888b2b7d6511f",date:this.lastestDate,highLightDates:this.hasDrawDates,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl})),e("div",{key:"6f2380ab5945ba0fb53a0fc69541312723306202",class:"date-selection-rightIcon",innerHTML:T,onClick:this.nextDraw.bind(this)})),e("div",{key:"74771044a8391de4ae6caad07b3c4c39a3e1a1e1",class:"winning-result"},e("div",{key:"999094cbf4db0b96479ceadfb58e39393438ae30",class:"betting-type"},e("div",{key:"38af0c363d784156fb5835f59775e29c620800ac",class:"betting-type-title"},g("bettingType",this.language)),e("div",{key:"496a1eebcd1cc0f8d4a5ece6c0e472e0d2595b8e",class:"betting-type-text"},e("div",{key:"e2d7bf643dcea0909228ec15b27c3bd8223a037d",class:"LotteryTippingTicketController__segmented-control"},Object.keys(this.curDrawSelectionMap).map((t=>e("button",{class:{LotteryTippingTicketController__segment:!0,"LotteryTippingTicketController__segment--active":this.curDrawSelectionBettingType===t},onClick:this.handleDrawBettingTypeChange.bind(this,t)},this.getBettingTypeName(t))))))),e("lottery-tipping-ticket-bet",{key:"0075d96aa6f5a3278be09a9859d09de127d1d4a1","session-id":this.sessionId,endpoint:this.endpoint,"game-id":this.vendorGameId,"draw-id":this.curDrawItem.id,"default-bullet-config-line-group":JSON.stringify(this.curDrawSelection),"read-pretty":!0,"total-pages":this.curDrawSelection.length,language:this.language,"mb-source":this.mbSource,"client-styling-url":this.clientStylingUrl,"translation-url":this.translationUrl})),e("div",{key:"1b1203abf46c48ce37301ad964995548488fab13",class:"prize-result"},e("div",{key:"6ca0a57e88e2f104f7cd9b9c8b656259c4f85c48",class:"prize-result-title"},g("prizeAllocation",this.language,{turnover:(t=this.curTurnOver,null==t?"":`€${t?z(t):0}`)})),e("div",{key:"eb5c63f5cf063bf3d58e5f67a934d4aa646e5d2a",class:"prize-result-table"},e("div",{key:"f4aa7aa010af6b7cc7461029cd3b6d0cd5f1fa17",class:"prize-result-table-header"},e("div",{key:"ce5afb5067aaa10d2b8aed55eb9bf2e456640a22",class:"prize-result-table-row"},e("div",{key:"a25246d5ed02922cdc424e3ba995219e248298cc",class:"prize-result-table-column"},g("prizes",this.language)),e("div",{key:"701aed9ffb565e7530d96afa946f630b27cb6bc4",class:"prize-result-table-column"},g("numberOfWinners",this.language)),e("div",{key:"c8dcd3e3c5315a29a76d641898b569667a32c6a3",class:"prize-result-table-column"},g("prizeMoney",this.language)))),e("div",{key:"a1fe82d196b3db775a8e671b107b0b8aa835b2c4",class:"prize-result-table-body"},this.displayedPrizes.map((t=>e("div",{class:"prize-result-table-row"},e("div",{class:"prize-result-table-column"},t.divisionDisplayName),e("div",{class:"prize-result-table-column"},t.players),e("div",{class:"prize-result-table-column"},z(t.totalAmount.value))))))))),0==this.curDrawSelection.length&&!this.isLoading&&e("div",{key:"84d70585471cffd14e2e0c0db37966b54f4150ac"},g("noLatestResult",this.language)),this.isLoading&&e("div",{key:"b8988afe78bf47497f09743cf5841014e8611a05",class:"loading-wrap"},g("loading",this.language)));var t}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};C.style=".lottery-tipping-latest-result {\n padding: 16px;\n container-type: inline-size;\n background-color: var(--emw--color-background, #fff);\n}\n.lottery-tipping-latest-result .date-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 24px;\n width: 400px;\n}\n.lottery-tipping-latest-result .date-selection-leftIcon, .lottery-tipping-latest-result .date-selection-rightIcon {\n cursor: pointer;\n}\n\n.LotteryTippingTicketController__segmented-control {\n height: 2.2rem;\n display: inline-flex;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 2rem;\n padding: 0.2rem;\n}\n.LotteryTippingTicketController__segment {\n background-color: transparent;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n transition: background-color 0.25s ease, color 0.25s ease;\n white-space: nowrap;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketController__segment--active {\n background-color: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n}\n.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.betting-type {\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n gap: 20px;\n}\n.betting-type-title {\n font-weight: 600;\n font-size: 16px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.betting-type-text {\n font-size: 16px;\n}\n\n.result-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 60%;\n margin: 0 auto;\n}\n.result-wrapper .winning-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .prize-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .prize-result-title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 12px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.result-wrapper .prize-result-table {\n width: 100%;\n}\n.result-wrapper .prize-result-table-row {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n}\n.result-wrapper .prize-result-table-column {\n text-align: left;\n padding: 12px 14px;\n width: 160px;\n font-size: 14px;\n width: calc((100% - 2px) / 3);\n color: var(--emw--color-typography, #000);\n}\n.result-wrapper .prize-result-table-header {\n width: 100%;\n background-color: var(--emw--color-background-secondary, #e6e6e6);\n border-radius: 4px;\n}\n.result-wrapper .prize-result-table-body {\n background-color: var(--emw--color-background-tertiary, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-header .prize-result-table-column {\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n border-right: 1px solid var(--emw--color-background, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-body .prize-result-table-row:hover {\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n@container (max-width: 980px) and (min-width: 780px) {\n .result-wrapper {\n width: 84%;\n }\n}\n@container (max-width: 780px) and (min-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n}\n@container (max-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n .result-wrapper .winning-result {\n width: 100%;\n margin-top: 14px;\n }\n .result-wrapper .prize-result {\n width: 100%;\n }\n .result-wrapper .prize-result-table-column {\n padding: 6px;\n width: 100px;\n }\n}";export{C as L,i as R,h as _,c as a,d as b,a as c,g as d,n as e,y as g,u as r,l as s,p as t}