import { $ as Te, u as dt, v as ht, S as vt, i as wt, s as ke, f as Ae, a as bt, n as Re, d as k, x as ye, b as B, m as r, k as c, e as C, l as p, w as yt, h as kt, o as Bt, G as et, E as j, Q as me, H as tt, y as At, z as it, p as pe, F as D, g as De, C as We, D as Le, A as Ct, B as st, j as g, O as Be, P as nt, q as Ce, I as Ie, L as Mt, M as Rt, N as Ht, c as Qt, K as Tt } from "./CasinoLobbyMiniGames-DGR9agaF.js";
import { f as zt, b as Me } from "./LotteryProgramWof-BnY7f6W9.js";
import "../stencil/ui-skeleton-W50o8tfg.js";
const je = {
  en: {
    NoContent: "You don't have any lottery programs available now.",
    NoNext: `You don't have any spins available. Please check <a href="javascript:void(0)">Terms and Conditions</a>`,
    NoHistories: "No histories",
    Program: "Program",
    History: "History",
    ActiveTickets: "Active Tickets",
    ImplicitTickets: "Implicit Tickets",
    RemainingTimes: "Remaining Times",
    Retry: "Network is a bit busy now, please click OK to re-spin",
    ShowNext: "{name} will be available on<br /> <strong>{startTime}</strong> <br />Please wait till it is open.",
    DrawFailed: "The prize assignment may be failed, please contact customer support for more details",
    Timeout: "Network is a bit busy now, please try again later.",
    ErrorNetwork: "You are offline, please check your network settings",
    ErrorJSON: "Unexpected Data Response, please contact customer support",
    Congratulation: "Congratulations!",
    Continue: "Continue",
    NoPrizeTitle: "Not This Time!",
    NoPrize: "Don't Worry! Your turn might come next. Try Again!",
    Success: "You won a {prize}!",
    OK: "OK",
    Rewards: "Rewards",
    Status: "Status",
    Time: "Time",
    Loss: "OOPs! You are close to a prize!",
    Fulfilled: "Successful",
    Drawn: "Failed",
    Rules: "Rules",
    LuckyWheels: "Lucky Wheels",
    InfoTooltip: "Luckywheel tooltips",
    RulesDescription: "Lucky Wheel is a particularly interesting game, will bring you a lot of surprises; When you obtained the Lucky Wheel, means you got a chance to spin the Lucky Wheel, and if you are lucky, you can get the surprise prize.",
    Terms: "Terms&Conditions",
    PrizeAgenda: "Prize agenda",
    TournamentTicket: "Tournament ticket",
    FreeSpins: "Free spins",
    BonusMoney: "Bonus Money",
    LoyaltyPoints: "Loyalty Points&Coins",
    LuckyWheel: "LuckyWheel",
    CoinRoyale: "Coin Royale",
    MysteryChest: "Mystery Chest",
    CustomRewards: "Custom Rewards",
    Play: "Play",
    Spin: "Spin",
    FlipCoin: "Flip Coin",
    OpenChest: "Open Chest",
    AvailablePeriod: "Available Period",
    Recurrence: "Recurrence",
    TopRewards: "Top Rewards",
    AreYouSure: "Are you sure",
    RejectWarningText: "Once rejected, this prize will be lost<br/>and cannot be recovered.<br/>Please confirm your decision",
    KeepPrize: "No, I want to keep prize",
    RejectPrize: "Yes, I reject prize",
    Accept: "Accept",
    Reject: "Reject",
    RewardIssued: "Your reward has issued successfully",
    BackToGame: "Back to Game",
    Spins: "Spins",
    Every: "every",
    Minute: "minute",
    Minutes: "minutes",
    Day: "day",
    Days: "days",
    Week: "week",
    Weeks: "weeks",
    Month: "month",
    Months: "months",
    InThisPeriod: "in this period",
    From: "from",
    To: "to",
    EveryWeek: "every week",
    EachMonth: "of each month",
    Monday: "Monday",
    Tuesday: "Tuesday",
    Wednesday: "Wednesday",
    Thursday: "Thursday",
    Friday: "Friday",
    Saturday: "Saturday",
    Sunday: "Sunday"
  }
};
function Dt({ withLocale: A, translations: e }) {
  Te.subscribe((t) => {
    t == null && (ht.set(e), Te.set(A));
  });
}
function ze(A, e) {
  dt(A, e);
}
function Wt(A) {
  Te.set(A);
}
const Lt = () => {
  Dt({ withLocale: "en", translations: {} }), Object.keys(je).forEach((A) => {
    ze(A, je[A]);
  });
};
if (typeof window < "u") {
  let A = function(e) {
    return function(...t) {
      try {
        return e.apply(this, t);
      } catch (i) {
        if (i instanceof DOMException && i.message.includes("has already been used with this registry") || i.message.includes("Cannot define multiple custom elements with the same tag name"))
          return !1;
        throw i;
      }
    };
  };
  customElements.define = A(customElements.define), import("./PrizeEngineChest-DD6edDIr.js").then(({ default: e }) => {
    !customElements.get("prize-engine-chest") && customElements.define("prize-engine-chest", e.element);
  });
}
if (typeof window < "u") {
  let A = function(e) {
    return function(...t) {
      try {
        return e.apply(this, t);
      } catch (i) {
        if (i instanceof DOMException && i.message.includes("has already been used with this registry") || i.message.includes("Cannot define multiple custom elements with the same tag name"))
          return !1;
        throw i;
      }
    };
  };
  customElements.define = A(customElements.define), import("./PrizeEngineCoin-2HiIHzLc.js").then(({ default: e }) => {
    !customElements.get("prize-engine-coin") && customElements.define("prize-engine-coin", e.element);
  });
}
if (typeof window < "u") {
  let A = function(e) {
    return function(...t) {
      try {
        return e.apply(this, t);
      } catch (i) {
        if (i instanceof DOMException && i.message.includes("has already been used with this registry") || i.message.includes("Cannot define multiple custom elements with the same tag name"))
          return !1;
        throw i;
      }
    };
  };
  customElements.define = A(customElements.define), import("./PrizeEngineLuckywheel-lYDyfC6Q.js").then(({ default: e }) => {
    !customElements.get("prize-engine-luckywheel") && customElements.define("prize-engine-luckywheel", e.element);
  });
}
const Pt = "data:image/webp;base64, ", It = "data:image/webp;base64, ", jt = "data:image/webp;base64, ", xt = "data:image/webp;base64, ", Xt = "data:image/webp;base64, ", Zt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAABCcAAAQnAEmzTo0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMVSURBVHgBbVTNThNRGD3fnSmYYNLizhVl4ZriC9AhcUFcWDYmbsQuiCsT0aioJJRogrJhacJC0MSwMsALMIUHsDQxYSeDCVspiWA7befz3Jm2AnGSm7k/3+85517Bf75F9fMOoikXjTzHkIO6OAgrnFcdNLaK8mjzso+cX5S0kk2h9ZHGeUNnOtY4MlzDRVjjP801DBpBG83xorwMur6mO3ml33MCqSg0r4h2Beo9kduDCtDYHDyUKc5lPAI+03z4CvTbFy3lLgSa1f2sC9dngWk6HjbQLjyTW+VOyb2qp2W6LGg95rRGu0EX2F7X2WwvkEG/z0oyHCesJNuHlF9SP2PPNA6hcbBVXeWeTQh7FgiiwRS344Sv9ehOhMami+aag7MZ/n3iMGLQrKZw4hloxUFTB3B2k7j4BD5HvPZa+O0NoL1BEsYitMdNC1qQOLP5VJLRWgunHtdVZssp+ivEbYhVDocwv2hGTEzQguMVpVSL+WExKeh9kxxK7a3ciDEpicdgraLGTant3zoEBHm30+NQF7O78mbHQI6ZKC/P9UjdmN7mgYM/pDxU0svew7QgXHgqEwvW6YOuUhoh2w6HDMJD6+PEo06iQvp3ACXl5p+4RJN9rXaDGBjLKiuUAIh6NCQfhcGKWEkzvSjZa93t97pbYFYC2ThwUd/heYGZM8wcOEiNFqVY69p+1RfHBDww7K9saZzT/XxH3ZkIMt+xGya4U8yYkViYFrNTf1WXY2ms6xx9lNqTPWPgrHFCEJ15G4RZfbY2wsL3BIaB9CfPgz7oKH33OEZctBmsxKsjUzxjDnfLLMp1Iq87QDtPx4plMSI2Z6R4RiaCJAlg23HQ5zFwlUlyV5D6Qck8YNJgUpY2Y4BTkCI3KHvN8n8c4qpnZYCeqhPwE2xangWccA/y7JgBvN4VKclwYBKD+A7143R5SbfHOhxq94qs6Ar33A3ECVFjB+OT8i5ImD73LfIZiXgNqKMsWeo+HZlEJ3XOwzTX9nkpU3fFe+eekQuBLtFfsHeOziNO/DaRYkqB/zU+bOXLPn8BG6xnv5+RMCQAAAAASUVORK5CYII=";
function Nt(A) {
  bt(A, "svelte-1m851ap", `:host{display:block;height:100%;width:100%;flex-grow:1}.PrizeDetailsContent.svelte-1m851ap.svelte-1m851ap{width:100%;height:100%;display:flex;flex-direction:column;position:relative;overflow:hidden;font-family:var(--emw--font-family-primary, "Ubuntu", sans-serif);background:transparent}.ViewLayer.svelte-1m851ap.svelte-1m851ap{width:100%;height:100%;display:flex;flex-direction:column;background:transparent}.ViewLayer.hidden.svelte-1m851ap.svelte-1m851ap{visibility:hidden}.GameLayer.svelte-1m851ap.svelte-1m851ap{position:relative;z-index:1;padding:40px 80px;box-sizing:border-box}.GameLayer.Mobile.svelte-1m851ap.svelte-1m851ap{padding:0}.GameLayer.Mobile.svelte-1m851ap .Header.svelte-1m851ap{height:auto;padding:32px 36px}.GameLayer.Mobile.svelte-1m851ap .HeaderTitle.svelte-1m851ap{font-size:var(--emw--font-size-medium, 16px);font-weight:500;line-height:1}.GameLayer.Mobile.svelte-1m851ap .IconButton.svelte-1m851ap{width:24px;height:24px}.GameLayer.Mobile.svelte-1m851ap .GameComponentContainer.svelte-1m851ap{height:370px;flex-grow:0;padding-top:20px}.GameLayer.Mobile.svelte-1m851ap .InfoSection.svelte-1m851ap{height:196px;flex-grow:0;margin:0;padding:20px 0;justify-content:flex-start;box-sizing:border-box;gap:12px}.GameLayer.Mobile.svelte-1m851ap .ActionButton.svelte-1m851ap{width:170px;height:48px;font-size:16px;box-shadow:0px 8px 12px 6px rgba(0, 0, 0, 0.15), 0px 4px 4px 0px rgba(0, 0, 0, 0.3);gap:4px;margin-bottom:8px}.GameLayer.Mobile.svelte-1m851ap .ActionButton .ButtonBase.svelte-1m851ap{text-transform:capitalize}.GameLayer.Mobile.svelte-1m851ap .ActionButton .ButtonCross.svelte-1m851ap{font-size:12px}.GameLayer.Mobile.svelte-1m851ap .ActionButton .ButtonCount.svelte-1m851ap{font-size:14px}.GameLayer.Mobile.svelte-1m851ap .InfoItem.svelte-1m851ap{font-size:12px;color:#a9ccbd;gap:4px;margin-bottom:12px}.GameLayer.Mobile.svelte-1m851ap .RulesToggle.svelte-1m851ap{position:relative;bottom:auto;left:auto;transform:none;opacity:0.5;font-size:12px;padding:8px;margin-top:auto}.RulesLayer.svelte-1m851ap.svelte-1m851ap{position:absolute;inset:0;z-index:100;padding:40px 80px;box-sizing:border-box;display:flex;flex-direction:column}.RulesLayer.Mobile.svelte-1m851ap.svelte-1m851ap{padding:20px 28px}.RulesLayer.Mobile.svelte-1m851ap .Header.svelte-1m851ap{padding:12px 8px 24px}.RulesLayer.Mobile.svelte-1m851ap .IconButton.svelte-1m851ap{width:24px;height:24px}.RulesLayer.svelte-1m851ap .HeaderPlaceholder.svelte-1m851ap{width:30px}.MessageLayer.svelte-1m851ap.svelte-1m851ap{position:absolute;inset:0;z-index:100;background:var(--emw--color-gray-transparency-30, rgba(13, 27, 29, 0.92))}.LayerContent.svelte-1m851ap.svelte-1m851ap{flex-grow:1;overflow-y:auto;display:flex;flex-direction:column;padding:0 24px}.LayerContent.Center.svelte-1m851ap.svelte-1m851ap{justify-content:center;align-items:center;text-align:center}.Header.svelte-1m851ap.svelte-1m851ap{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 24px;flex-shrink:0;position:relative}.Header.svelte-1m851ap .HeaderTitle.svelte-1m851ap{color:var(--emw--color-primary, #d3ffed);font-size:var(--emw--font-size-large, 22px);font-weight:700;text-align:center;flex-grow:1}.ViewWrapper.svelte-1m851ap.svelte-1m851ap{flex-grow:1;display:flex;flex-direction:column;overflow:hidden}.GameComponentContainer.svelte-1m851ap.svelte-1m851ap{flex-grow:1;display:flex;flex-direction:column;min-height:0;justify-content:center;align-items:center}.InfoSection.svelte-1m851ap.svelte-1m851ap{display:flex;flex-direction:column;align-items:center;gap:16px;margin-top:16px;margin-bottom:48px;flex-shrink:0}.InfoItem.svelte-1m851ap.svelte-1m851ap{display:flex;align-items:center;gap:8px;color:var(--emw--color-primary, #d3ffed);font-size:var(--emw--font-size-medium, 16px)}.SmallIcon.svelte-1m851ap.svelte-1m851ap{width:20px;height:20px;background-size:contain;background-repeat:no-repeat;background-position:center;display:flex;align-items:center;justify-content:center;color:var(--emw--color-secondary-variant, #729787)}.IconButton.svelte-1m851ap.svelte-1m851ap{width:30px;height:30px;border:0;cursor:pointer;background-color:transparent;background-size:100%;background-repeat:no-repeat;padding:0}.IconButton.Back.svelte-1m851ap.svelte-1m851ap{background:center/100% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M10.3579 5.26604C10.0032 4.91132 9.42806 4.91132 9.07334 5.26604L5.26604 9.07334C4.91132 9.42806 4.91132 10.0032 5.26604 10.3579L9.07334 14.1652C9.42806 14.5199 10.0032 14.5199 10.3579 14.1652C10.7126 13.8105 10.7126 13.2354 10.3579 12.8806L8.10118 10.6239H10.7817C12.0761 10.6239 12.9922 10.6246 13.7085 10.6832C14.4142 10.7408 14.8455 10.85 15.1847 11.0229C15.8735 11.3738 16.4335 11.9338 16.7844 12.6226C16.9573 12.9618 17.0665 13.3931 17.1241 14.0989C17.1827 14.8151 17.1834 15.7312 17.1834 17.0256V18.0917C17.1834 18.5933 17.59 19 18.0917 19C18.5933 19 19 18.5933 19 18.0917V16.9854C19 15.74 19 14.7498 18.9347 13.9509C18.8679 13.1329 18.7281 12.4359 18.403 11.7978C17.8779 10.7673 17.04 9.92938 16.0095 9.40427C15.3714 9.07918 14.6744 8.9394 13.8564 8.87257C13.0575 8.80729 12.0673 8.8073 10.8219 8.8073H8.10118L10.3579 6.55059C10.7126 6.19587 10.7126 5.62076 10.3579 5.26604Z" fill="%23729787"/></svg>') no-repeat}.IconButton.Close.svelte-1m851ap.svelte-1m851ap{background-image:url('data:image/svg+xml,<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18 6 6 18M6 6l12 12" stroke="%23729787" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>')}.GameDescription.svelte-1m851ap.svelte-1m851ap{margin-bottom:32px;font-size:var(--emw--font-size-small, 14px);color:var(--emw--color-primary-variant, #a9ccbe);line-height:1.6}.TermsLink.svelte-1m851ap.svelte-1m851ap{display:inline-flex;align-items:center;gap:6px;background:linear-gradient(90deg, var(--emw--color-teal, #75ffe9) 0%, var(--emw--color-green, #b2ff6d) 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;text-decoration:none;font-weight:700;margin-bottom:32px}.TermsLink.svelte-1m851ap .ExternalIcon.svelte-1m851ap{width:16px;height:16px;background:center/contain no-repeat url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M18 13V19C18 19.5304 17.7893 20.0391 17.4142 20.4142C17.0391 20.7893 16.5304 21 16 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V8C3 7.46957 3.21071 6.96086 3.58579 6.58579C3.96086 6.21071 4.46957 6 5 6H11M15 3H21M21 3V9M21 3L10 13" stroke="%2375FFE9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>')}.DetailsGrid.svelte-1m851ap.svelte-1m851ap{display:flex;flex-direction:column;gap:32px}.DetailItem.svelte-1m851ap.svelte-1m851ap{display:flex;gap:12px;align-items:flex-start}.DetailItem.svelte-1m851ap .Icon.svelte-1m851ap{width:20px;height:20px;flex-shrink:0}.DetailItem.svelte-1m851ap .Icon.History.svelte-1m851ap{background:center/contain no-repeat url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M12 8V12L15 14M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="%23ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>')}.DetailItem.svelte-1m851ap .Icon.Cup.svelte-1m851ap{background:center/contain no-repeat url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M6 9H4.5C3.67157 9 3 8.32843 3 7.5V6.5C3 5.67157 3.67157 5 4.5 5H6M18 9H19.5C20.3284 9 21 8.32843 21 7.5V6.5C21 5.67157 20.3284 5 19.5 5H18M18 22H6M12 15V22M18 5V12C18 15.3137 15.3137 18 12 18C8.68629 18 6 15.3137 6 12V5H18Z" stroke="%23ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>')}.DetailItem.svelte-1m851ap .DetailText strong.svelte-1m851ap{color:var(--emw--color-white, #ffffff);font-weight:700;font-size:var(--emw--font-size-small-plus, 15px);display:block;margin-bottom:4px}.DetailItem.svelte-1m851ap .DetailText span.svelte-1m851ap{color:var(--emw--color-secondary-variant, #a9ccbe);line-height:1.5}.RewardList.svelte-1m851ap.svelte-1m851ap{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.RewardItem.svelte-1m851ap.svelte-1m851ap{color:var(--emw--color-secondary-variant, #a9ccbe)}.RewardItem.svelte-1m851ap .RewardIcon.svelte-1m851ap{width:24px;height:24px;object-fit:contain}.ImageWrapper.svelte-1m851ap.svelte-1m851ap{position:relative;display:flex;justify-content:center;align-items:center;width:100px;height:100px;margin-bottom:24px}.ImageWrapper.svelte-1m851ap.svelte-1m851ap::before{content:"";position:absolute;width:160px;height:160px;background:radial-gradient(circle, var(--emw--color-teal-10, rgba(117, 255, 233, 0.1019607843)) 0%, transparent 50%);border-radius:50%;z-index:0;filter:blur(10px)}.ImageWrapper.svelte-1m851ap .GiftImage.svelte-1m851ap{height:100px;object-fit:contain;position:relative;z-index:1}.ViewDataContainer.svelte-1m851ap.svelte-1m851ap{display:grid;width:100%;min-height:200px;align-items:center;justify-items:center;transition:transform 0.4s cubic-bezier(0.4, 0, 0.2, 1)}.ViewDataContainer.shifted.svelte-1m851ap.svelte-1m851ap{transform:translateY(-16px)}.ViewDataContainer.svelte-1m851ap .ViewDataContent.svelte-1m851ap{grid-area:1/1;display:flex;flex-direction:column;align-items:center}.MessageTitle.svelte-1m851ap.svelte-1m851ap{font-size:var(--emw--size-medium-2x-minus, 32px);font-weight:700;margin:0 0 16px;color:var(--emw--color-white, white);line-height:1.2}.MessageText.svelte-1m851ap.svelte-1m851ap{font-size:var(--emw--font-size-medium, 16px);color:var(--emw--color-primary-variant, #a9ccbe);max-width:320px;line-height:1.5;margin:0 0 24px}.ButtonGroup.svelte-1m851ap.svelte-1m851ap{display:flex;flex-direction:column;gap:16px;width:100%;align-items:center;margin-top:8px}.ButtonGroup.wide-buttons.svelte-1m851ap .ActionButton.svelte-1m851ap{width:280px}.ActionButton.svelte-1m851ap.svelte-1m851ap{cursor:pointer;height:60px;width:240px;border-radius:54px;font-weight:700;font-size:var(--emw--font-size-medium-plus, 18px);transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);display:flex;align-items:center;justify-content:center;padding:0}.ActionButton.svelte-1m851ap .ButtonTextWrapper.svelte-1m851ap{display:grid;place-items:center}.ActionButton.svelte-1m851ap .ButtonTextWrapper span.svelte-1m851ap{grid-area:1/1}.ActionButton.primary.svelte-1m851ap.svelte-1m851ap{border:none;background:linear-gradient(90deg, var(--emw--color-teal, #75ffe9) 0%, var(--emw--color-green, #b2ff6d) 100%);color:var(--emw--color-background-secondary, #152b30)}.ActionButton.outline.svelte-1m851ap.svelte-1m851ap{background:transparent;border:1px solid var(--emw--color-teal, #75ffe9);color:var(--emw--color-white, white)}.ActionButton.svelte-1m851ap.svelte-1m851ap:disabled{opacity:0.5;cursor:not-allowed}.SkeletonWrapper.svelte-1m851ap.svelte-1m851ap{display:flex;flex-direction:column;align-items:center;width:100%;gap:32px}.SkeletonWrapper.svelte-1m851ap .SkeletonContent.svelte-1m851ap{display:flex;flex-direction:column;align-items:center;gap:24px;justify-content:center}.RulesToggle.svelte-1m851ap.svelte-1m851ap{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);background:transparent;border:none;color:var(--emw--color-secondary-variant, #729787);font-size:var(--emw--font-size-small, 14px);display:flex;align-items:center;gap:4px;cursor:pointer;padding:8px}.RulesToggle.svelte-1m851ap .ChevronUp.svelte-1m851ap{width:12px;height:12px;background-color:currentColor;mask:center/contain no-repeat url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 15L12 9L6 15" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg>')}`);
}
function xe(A, e, t) {
  const i = A.slice();
  return i[57] = e[t], i;
}
function Xe(A, e, t) {
  const i = A.slice();
  return i[60] = e[t], i;
}
function Ze(A) {
  let e, t, i, s, l, n = (
    /*activeGame*/
    (A[9].program.name[
      /*lang*/
      A[2]
    ] || /*activeGame*/
    A[9].program.name["*"]) + ""
  ), o, f, a, u, d, b, v, M, F, $, W, V, ie = (
    /*$_*/
    A[15]("Rules") + ""
  ), re, U, w, N, se, S, L;
  function J(y, I) {
    if (
      /*gameType*/
      y[14] === "wheelOfFortune"
    )
      return Et;
    if (
      /*gameType*/
      y[14] === "flipCoin"
    )
      return Jt;
    if (
      /*gameType*/
      y[14] === "mysteryChest"
    )
      return St;
  }
  let x = J(A), Q = x && x(A);
  function E(y, I) {
    return (
      /*gameType*/
      y[14] !== "wheelOfFortune" || /*themeIndex*/
      y[21] === 7 ? Ot : Ft
    );
  }
  let ee = E(A), X = ee(A), P = (
    /*displayExpiry*/
    A[23] && Ne(A)
  ), T = (
    /*showRulesOverlay*/
    A[18] && Se(A)
  );
  return {
    c() {
      e = c("div"), t = c("div"), i = c("button"), s = C(), l = c("div"), o = D(n), f = C(), a = c("button"), u = C(), d = c("div"), b = c("div"), Q && Q.c(), v = C(), M = c("div"), X.c(), F = C(), P && P.c(), $ = C(), W = c("button"), V = c("span"), re = D(ie), U = C(), w = c("span"), N = C(), T && T.c(), se = De(), p(i, "type", "button"), p(i, "class", "IconButton Back svelte-1m851ap"), p(l, "class", "HeaderTitle svelte-1m851ap"), p(a, "type", "button"), p(a, "class", "IconButton Close svelte-1m851ap"), p(t, "class", "Header svelte-1m851ap"), p(b, "class", "GameComponentContainer svelte-1m851ap"), p(w, "class", "ChevronUp svelte-1m851ap"), p(W, "type", "button"), p(W, "class", "RulesToggle svelte-1m851ap"), p(M, "class", "InfoSection svelte-1m851ap"), p(d, "class", "ViewWrapper svelte-1m851ap"), p(e, "class", "ViewLayer GameLayer svelte-1m851ap"), me(
        e,
        "Mobile",
        /*mobileView*/
        A[24]
      ), me(
        e,
        "hidden",
        /*showRulesOverlay*/
        A[18] || /*isMessageShown*/
        A[11]
      );
    },
    m(y, I) {
      B(y, e, I), r(e, t), r(t, i), r(t, s), r(t, l), r(l, o), r(t, f), r(t, a), r(e, u), r(e, d), r(d, b), Q && Q.m(b, null), r(d, v), r(d, M), X.m(M, null), r(M, F), P && P.m(M, null), r(M, $), r(M, W), r(W, V), r(V, re), r(W, U), r(W, w), B(y, N, I), T && T.m(y, I), B(y, se, I), S || (L = [
        pe(
          i,
          "click",
          /*onBack*/
          A[29]
        ),
        pe(
          a,
          "click",
          /*onClose*/
          A[30]
        ),
        pe(
          W,
          "click",
          /*click_handler*/
          A[37]
        )
      ], S = !0);
    },
    p(y, I) {
      I[0] & /*activeGame, lang*/
      516 && n !== (n = /*activeGame*/
      (y[9].program.name[
        /*lang*/
        y[2]
      ] || /*activeGame*/
      y[9].program.name["*"]) + "") && j(o, n), x === (x = J(y)) && Q ? Q.p(y, I) : (Q && Q.d(1), Q = x && x(y), Q && (Q.c(), Q.m(b, null))), ee === (ee = E(y)) && X ? X.p(y, I) : (X.d(1), X = ee(y), X && (X.c(), X.m(M, F))), /*displayExpiry*/
      y[23] ? P ? P.p(y, I) : (P = Ne(y), P.c(), P.m(M, $)) : P && (P.d(1), P = null), I[0] & /*$_*/
      32768 && ie !== (ie = /*$_*/
      y[15]("Rules") + "") && j(re, ie), I[0] & /*showRulesOverlay, isMessageShown*/
      264192 && me(
        e,
        "hidden",
        /*showRulesOverlay*/
        y[18] || /*isMessageShown*/
        y[11]
      ), /*showRulesOverlay*/
      y[18] ? T ? (T.p(y, I), I[0] & /*showRulesOverlay*/
      262144 && ye(T, 1)) : (T = Se(y), T.c(), ye(T, 1), T.m(se.parentNode, se)) : T && (tt(), At(T, 1, 1, () => {
        T = null;
      }), it());
    },
    d(y) {
      y && (k(e), k(N), k(se)), Q && Q.d(), X.d(), P && P.d(), T && T.d(y), S = !1, et(L);
    }
  };
}
function St(A) {
  let e;
  return {
    c() {
      e = c("prize-engine-chest"), g(
        e,
        "data",
        /*activeGame*/
        A[9]
      ), g(
        e,
        "endpoint",
        /*endpoint*/
        A[0]
      ), g(
        e,
        "session",
        /*session*/
        A[1]
      ), g(
        e,
        "lang",
        /*lang*/
        A[2]
      ), g(
        e,
        "clientstyling",
        /*clientstyling*/
        A[3]
      ), g(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        A[4]
      ), g(
        e,
        "translationurl",
        /*translationurl*/
        A[5]
      ), g(
        e,
        "mbsource",
        /*mbsource*/
        A[6]
      ), g(e, "isdrawer", "false");
    },
    m(t, i) {
      B(t, e, i);
    },
    p(t, i) {
      i[0] & /*activeGame*/
      512 && g(
        e,
        "data",
        /*activeGame*/
        t[9]
      ), i[0] & /*endpoint*/
      1 && g(
        e,
        "endpoint",
        /*endpoint*/
        t[0]
      ), i[0] & /*session*/
      2 && g(
        e,
        "session",
        /*session*/
        t[1]
      ), i[0] & /*lang*/
      4 && g(
        e,
        "lang",
        /*lang*/
        t[2]
      ), i[0] & /*clientstyling*/
      8 && g(
        e,
        "clientstyling",
        /*clientstyling*/
        t[3]
      ), i[0] & /*clientstylingurl*/
      16 && g(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        t[4]
      ), i[0] & /*translationurl*/
      32 && g(
        e,
        "translationurl",
        /*translationurl*/
        t[5]
      ), i[0] & /*mbsource*/
      64 && g(
        e,
        "mbsource",
        /*mbsource*/
        t[6]
      );
    },
    d(t) {
      t && k(e);
    }
  };
}
function Jt(A) {
  let e;
  return {
    c() {
      e = c("prize-engine-coin"), g(
        e,
        "data",
        /*activeGame*/
        A[9]
      ), g(
        e,
        "endpoint",
        /*endpoint*/
        A[0]
      ), g(
        e,
        "session",
        /*session*/
        A[1]
      ), g(
        e,
        "lang",
        /*lang*/
        A[2]
      ), g(
        e,
        "clientstyling",
        /*clientstyling*/
        A[3]
      ), g(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        A[4]
      ), g(
        e,
        "translationurl",
        /*translationurl*/
        A[5]
      ), g(
        e,
        "mbsource",
        /*mbsource*/
        A[6]
      ), g(e, "isdrawer", "false");
    },
    m(t, i) {
      B(t, e, i);
    },
    p(t, i) {
      i[0] & /*activeGame*/
      512 && g(
        e,
        "data",
        /*activeGame*/
        t[9]
      ), i[0] & /*endpoint*/
      1 && g(
        e,
        "endpoint",
        /*endpoint*/
        t[0]
      ), i[0] & /*session*/
      2 && g(
        e,
        "session",
        /*session*/
        t[1]
      ), i[0] & /*lang*/
      4 && g(
        e,
        "lang",
        /*lang*/
        t[2]
      ), i[0] & /*clientstyling*/
      8 && g(
        e,
        "clientstyling",
        /*clientstyling*/
        t[3]
      ), i[0] & /*clientstylingurl*/
      16 && g(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        t[4]
      ), i[0] & /*translationurl*/
      32 && g(
        e,
        "translationurl",
        /*translationurl*/
        t[5]
      ), i[0] & /*mbsource*/
      64 && g(
        e,
        "mbsource",
        /*mbsource*/
        t[6]
      );
    },
    d(t) {
      t && k(e);
    }
  };
}
function Et(A) {
  let e;
  return {
    c() {
      e = c("prize-engine-luckywheel"), g(
        e,
        "data",
        /*activeGame*/
        A[9]
      ), g(
        e,
        "endpoint",
        /*endpoint*/
        A[0]
      ), g(
        e,
        "session",
        /*session*/
        A[1]
      ), g(
        e,
        "lang",
        /*lang*/
        A[2]
      ), g(
        e,
        "clientstyling",
        /*clientstyling*/
        A[3]
      ), g(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        A[4]
      ), g(
        e,
        "translationurl",
        /*translationurl*/
        A[5]
      ), g(
        e,
        "mbsource",
        /*mbsource*/
        A[6]
      ), g(
        e,
        "size",
        /*luckywheelsize*/
        A[7]
      ), g(
        e,
        "mobilesize",
        /*luckywheelmobilesize*/
        A[8]
      ), g(e, "isdrawer", "false");
    },
    m(t, i) {
      B(t, e, i);
    },
    p(t, i) {
      i[0] & /*activeGame*/
      512 && g(
        e,
        "data",
        /*activeGame*/
        t[9]
      ), i[0] & /*endpoint*/
      1 && g(
        e,
        "endpoint",
        /*endpoint*/
        t[0]
      ), i[0] & /*session*/
      2 && g(
        e,
        "session",
        /*session*/
        t[1]
      ), i[0] & /*lang*/
      4 && g(
        e,
        "lang",
        /*lang*/
        t[2]
      ), i[0] & /*clientstyling*/
      8 && g(
        e,
        "clientstyling",
        /*clientstyling*/
        t[3]
      ), i[0] & /*clientstylingurl*/
      16 && g(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        t[4]
      ), i[0] & /*translationurl*/
      32 && g(
        e,
        "translationurl",
        /*translationurl*/
        t[5]
      ), i[0] & /*mbsource*/
      64 && g(
        e,
        "mbsource",
        /*mbsource*/
        t[6]
      ), i[0] & /*luckywheelsize*/
      128 && g(
        e,
        "size",
        /*luckywheelsize*/
        t[7]
      ), i[0] & /*luckywheelmobilesize*/
      256 && g(
        e,
        "mobilesize",
        /*luckywheelmobilesize*/
        t[8]
      );
    },
    d(t) {
      t && k(e);
    }
  };
}
function Ft(A) {
  let e, t, i = (
    /*$_*/
    A[15]("RemainingTimes") + ""
  ), s, l, n, o, f, a, u = (
    /*activeGame*/
    A[9].current.remainingTimes + ""
  ), d;
  return {
    c() {
      e = c("div"), t = c("span"), s = D(i), l = D(":"), n = C(), o = c("span"), o.innerHTML = `<img src="${Zt}" alt="Key"/>`, f = C(), a = c("span"), d = D(u), p(o, "class", "SmallIcon svelte-1m851ap"), p(e, "class", "InfoItem svelte-1m851ap");
    },
    m(b, v) {
      B(b, e, v), r(e, t), r(t, s), r(t, l), r(e, n), r(e, o), r(e, f), r(e, a), r(a, d);
    },
    p(b, v) {
      v[0] & /*$_*/
      32768 && i !== (i = /*$_*/
      b[15]("RemainingTimes") + "") && j(s, i), v[0] & /*activeGame*/
      512 && u !== (u = /*activeGame*/
      b[9].current.remainingTimes + "") && j(d, u);
    },
    d(b) {
      b && k(e);
    }
  };
}
function Ot(A) {
  let e, t, i = (
    /*buttonTextParts*/
    A[19].base + ""
  ), s, l, n, o, f, a = (
    /*buttonTextParts*/
    A[19].count + ""
  ), u, d, b, v;
  return {
    c() {
      e = c("button"), t = c("span"), s = D(i), l = C(), n = c("span"), n.textContent = "×", o = C(), f = c("span"), u = D(a), p(t, "class", "ButtonBase svelte-1m851ap"), p(n, "class", "ButtonCross svelte-1m851ap"), p(f, "class", "ButtonCount svelte-1m851ap"), p(e, "type", "button"), p(e, "class", "ActionButton primary svelte-1m851ap"), e.disabled = d = /*isDrawing*/
      A[17] || !/*activeGame*/
      A[9].current?.remainingTimes;
    },
    m(M, F) {
      B(M, e, F), r(e, t), r(t, s), r(e, l), r(e, n), r(e, o), r(e, f), r(f, u), b || (v = pe(
        e,
        "click",
        /*performDraw*/
        A[27]
      ), b = !0);
    },
    p(M, F) {
      F[0] & /*buttonTextParts*/
      524288 && i !== (i = /*buttonTextParts*/
      M[19].base + "") && j(s, i), F[0] & /*buttonTextParts*/
      524288 && a !== (a = /*buttonTextParts*/
      M[19].count + "") && j(u, a), F[0] & /*isDrawing, activeGame*/
      131584 && d !== (d = /*isDrawing*/
      M[17] || !/*activeGame*/
      M[9].current?.remainingTimes) && (e.disabled = d);
    },
    d(M) {
      M && k(e), b = !1, v();
    }
  };
}
function Ne(A) {
  let e, t, i, s, l;
  return {
    c() {
      e = c("div"), t = c("span"), t.innerHTML = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="14" r="7" stroke="currentColor" stroke-width="1.5"></circle><path d="M12 11V14L14 16" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 4V7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 4H15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 7L18 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7 7L6 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>', i = C(), s = c("span"), l = D(
        /*displayExpiry*/
        A[23]
      ), p(t, "class", "SmallIcon Timer svelte-1m851ap"), p(e, "class", "InfoItem svelte-1m851ap");
    },
    m(n, o) {
      B(n, e, o), r(e, t), r(e, i), r(e, s), r(s, l);
    },
    p(n, o) {
      o[0] & /*displayExpiry*/
      8388608 && j(
        l,
        /*displayExpiry*/
        n[23]
      );
    },
    d(n) {
      n && k(e);
    }
  };
}
function Se(A) {
  let e, t, i, s, l, n = (
    /*$_*/
    A[15]("Rules") + ""
  ), o, f, a, u, d, b, v = (
    /*$_*/
    A[15]("RulesDescription") + ""
  ), M, F, $, W, V, ie, re, U, w, N = (
    /*$_*/
    A[15]("AvailablePeriod") + ""
  ), se, S, L, J = (
    /*formatDateTime*/
    A[31](
      /*activeGame*/
      A[9].program.trigger?.startTime
    ) + ""
  ), x, Q, E = (
    /*formatDateTime*/
    A[31](
      /*activeGame*/
      A[9].program.trigger?.endTime
    ) + ""
  ), ee, X, P, T, y, I, le, de, he = (
    /*$_*/
    A[15]("TopRewards") + ""
  ), Y, ce, fe, ue, oe, q, ve, ge, O = (
    /*effectiveTermsUrl*/
    A[22] && Je(A)
  ), G = (
    /*activeGame*/
    A[9]?.program?.trigger?.periods && Ee(A)
  ), Z = (
    /*activeGame*/
    A[9].program.wheelOfFortune?.partitions && Oe(A)
  );
  return {
    c() {
      e = c("div"), t = c("div"), i = c("div"), s = C(), l = c("div"), o = D(n), f = C(), a = c("button"), u = C(), d = c("div"), b = c("div"), M = D(v), F = C(), O && O.c(), $ = C(), W = c("div"), V = c("div"), ie = c("span"), re = C(), U = c("div"), w = c("strong"), se = D(N), S = C(), L = c("span"), x = D(J), Q = D(" ~ "), ee = D(E), X = C(), G && G.c(), P = C(), T = c("div"), y = c("span"), I = C(), le = c("div"), de = c("strong"), Y = D(he), ce = C(), fe = c("span"), Z && Z.c(), p(i, "class", "HeaderPlaceholder svelte-1m851ap"), p(l, "class", "HeaderTitle svelte-1m851ap"), p(a, "type", "button"), p(a, "class", "IconButton Close svelte-1m851ap"), p(t, "class", "Header svelte-1m851ap"), p(b, "class", "GameDescription svelte-1m851ap"), p(ie, "class", "Icon History svelte-1m851ap"), p(w, "class", "svelte-1m851ap"), p(L, "class", "svelte-1m851ap"), p(U, "class", "DetailText"), p(V, "class", "DetailItem svelte-1m851ap"), p(y, "class", "Icon Cup svelte-1m851ap"), p(de, "class", "svelte-1m851ap"), p(fe, "class", "RewardList svelte-1m851ap"), p(le, "class", "DetailText"), p(T, "class", "DetailItem Rewards svelte-1m851ap"), p(W, "class", "DetailsGrid svelte-1m851ap"), p(d, "class", "LayerContent svelte-1m851ap"), p(e, "class", "ViewLayer RulesLayer svelte-1m851ap"), me(
        e,
        "Mobile",
        /*mobileView*/
        A[24]
      );
    },
    m(R, K) {
      B(R, e, K), r(e, t), r(t, i), r(t, s), r(t, l), r(l, o), r(t, f), r(t, a), r(e, u), r(e, d), r(d, b), r(b, M), r(d, F), O && O.m(d, null), r(d, $), r(d, W), r(W, V), r(V, ie), r(V, re), r(V, U), r(U, w), r(w, se), r(U, S), r(U, L), r(L, x), r(L, Q), r(L, ee), r(W, X), G && G.m(W, null), r(W, P), r(W, T), r(T, y), r(T, I), r(T, le), r(le, de), r(de, Y), r(le, ce), r(le, fe), Z && Z.m(fe, null), q = !0, ve || (ge = pe(
        a,
        "click",
        /*click_handler_1*/
        A[38]
      ), ve = !0);
    },
    p(R, K) {
      (!q || K[0] & /*$_*/
      32768) && n !== (n = /*$_*/
      R[15]("Rules") + "") && j(o, n), (!q || K[0] & /*$_*/
      32768) && v !== (v = /*$_*/
      R[15]("RulesDescription") + "") && j(M, v), /*effectiveTermsUrl*/
      R[22] ? O ? O.p(R, K) : (O = Je(R), O.c(), O.m(d, $)) : O && (O.d(1), O = null), (!q || K[0] & /*$_*/
      32768) && N !== (N = /*$_*/
      R[15]("AvailablePeriod") + "") && j(se, N), (!q || K[0] & /*activeGame*/
      512) && J !== (J = /*formatDateTime*/
      R[31](
        /*activeGame*/
        R[9].program.trigger?.startTime
      ) + "") && j(x, J), (!q || K[0] & /*activeGame*/
      512) && E !== (E = /*formatDateTime*/
      R[31](
        /*activeGame*/
        R[9].program.trigger?.endTime
      ) + "") && j(ee, E), /*activeGame*/
      R[9]?.program?.trigger?.periods ? G ? G.p(R, K) : (G = Ee(R), G.c(), G.m(W, P)) : G && (G.d(1), G = null), (!q || K[0] & /*$_*/
      32768) && he !== (he = /*$_*/
      R[15]("TopRewards") + "") && j(Y, he), /*activeGame*/
      R[9].program.wheelOfFortune?.partitions ? Z ? Z.p(R, K) : (Z = Oe(R), Z.c(), Z.m(fe, null)) : Z && (Z.d(1), Z = null);
    },
    i(R) {
      q || (R && We(() => {
        q && (oe && oe.end(1), ue = Le(e, Me, { y: "100%", duration: 400 }), ue.start());
      }), q = !0);
    },
    o(R) {
      ue && ue.invalidate(), R && (oe = st(e, Me, { y: "100%", duration: 400 })), q = !1;
    },
    d(R) {
      R && k(e), O && O.d(), G && G.d(), Z && Z.d(), R && oe && oe.end(), ve = !1, ge();
    }
  };
}
function Je(A) {
  let e, t, i = (
    /*$_*/
    A[15]("Terms") + ""
  ), s, l, n;
  return {
    c() {
      e = c("a"), t = c("span"), s = D(i), l = C(), n = c("span"), p(n, "class", "ExternalIcon svelte-1m851ap"), p(e, "class", "TermsLink svelte-1m851ap"), p(
        e,
        "href",
        /*effectiveTermsUrl*/
        A[22]
      ), p(e, "target", "_blank");
    },
    m(o, f) {
      B(o, e, f), r(e, t), r(t, s), r(e, l), r(e, n);
    },
    p(o, f) {
      f[0] & /*$_*/
      32768 && i !== (i = /*$_*/
      o[15]("Terms") + "") && j(s, i), f[0] & /*effectiveTermsUrl*/
      4194304 && p(
        e,
        "href",
        /*effectiveTermsUrl*/
        o[22]
      );
    },
    d(o) {
      o && k(e);
    }
  };
}
function Ee(A) {
  let e, t = Be(
    /*activeGame*/
    A[9].program.trigger.periods
  ), i = [];
  for (let s = 0; s < t.length; s += 1)
    i[s] = Fe(Xe(A, t, s));
  return {
    c() {
      for (let s = 0; s < i.length; s += 1)
        i[s].c();
      e = De();
    },
    m(s, l) {
      for (let n = 0; n < i.length; n += 1)
        i[n] && i[n].m(s, l);
      B(s, e, l);
    },
    p(s, l) {
      if (l[0] & /*getRecurrenceText, activeGame, $_*/
      33587712) {
        t = Be(
          /*activeGame*/
          s[9].program.trigger.periods
        );
        let n;
        for (n = 0; n < t.length; n += 1) {
          const o = Xe(s, t, n);
          i[n] ? i[n].p(o, l) : (i[n] = Fe(o), i[n].c(), i[n].m(e.parentNode, e));
        }
        for (; n < i.length; n += 1)
          i[n].d(1);
        i.length = t.length;
      }
    },
    d(s) {
      s && k(e), nt(i, s);
    }
  };
}
function Fe(A) {
  let e, t, i, s, l, n = (
    /*$_*/
    A[15]("Recurrence") + ""
  ), o, f, a, u = (
    /*getRecurrenceText*/
    A[25](
      /*period*/
      A[60]
    ) + ""
  ), d, b;
  return {
    c() {
      e = c("div"), t = c("span"), i = C(), s = c("div"), l = c("strong"), o = D(n), f = C(), a = c("span"), d = D(u), b = C(), p(t, "class", "Icon History svelte-1m851ap"), p(l, "class", "svelte-1m851ap"), p(a, "class", "svelte-1m851ap"), p(s, "class", "DetailText"), p(e, "class", "DetailItem svelte-1m851ap");
    },
    m(v, M) {
      B(v, e, M), r(e, t), r(e, i), r(e, s), r(s, l), r(l, o), r(s, f), r(s, a), r(a, d), r(e, b);
    },
    p(v, M) {
      M[0] & /*$_*/
      32768 && n !== (n = /*$_*/
      v[15]("Recurrence") + "") && j(o, n), M[0] & /*activeGame*/
      512 && u !== (u = /*getRecurrenceText*/
      v[25](
        /*period*/
        v[60]
      ) + "") && j(d, u);
    },
    d(v) {
      v && k(e);
    }
  };
}
function Oe(A) {
  let e, t = Be(
    /*activeGame*/
    A[9].program.wheelOfFortune.partitions
  ), i = [];
  for (let s = 0; s < t.length; s += 1)
    i[s] = Ge(xe(A, t, s));
  return {
    c() {
      for (let s = 0; s < i.length; s += 1)
        i[s].c();
      e = De();
    },
    m(s, l) {
      for (let n = 0; n < i.length; n += 1)
        i[n] && i[n].m(s, l);
      B(s, e, l);
    },
    p(s, l) {
      if (l[0] & /*activeGame, lang*/
      516) {
        t = Be(
          /*activeGame*/
          s[9].program.wheelOfFortune.partitions
        );
        let n;
        for (n = 0; n < t.length; n += 1) {
          const o = xe(s, t, n);
          i[n] ? i[n].p(o, l) : (i[n] = Ge(o), i[n].c(), i[n].m(e.parentNode, e));
        }
        for (; n < i.length; n += 1)
          i[n].d(1);
        i.length = t.length;
      }
    },
    d(s) {
      s && k(e), nt(i, s);
    }
  };
}
function Gt(A) {
  let e, t;
  return {
    c() {
      e = c("img"), p(e, "class", "RewardIcon svelte-1m851ap"), Ce(e.src, t = /*partition*/
      A[57].image1[
        /*lang*/
        A[2]
      ] || /*partition*/
      A[57].image1["*"]) || p(e, "src", t), p(e, "alt", "");
    },
    m(i, s) {
      B(i, e, s);
    },
    p(i, s) {
      s[0] & /*activeGame, lang*/
      516 && !Ce(e.src, t = /*partition*/
      i[57].image1[
        /*lang*/
        i[2]
      ] || /*partition*/
      i[57].image1["*"]) && p(e, "src", t);
    },
    d(i) {
      i && k(e);
    }
  };
}
function Yt(A) {
  let e, t = (
    /*partition*/
    (A[57].name[
      /*lang*/
      A[2]
    ] || /*partition*/
    A[57].name["*"]) + ""
  ), i;
  return {
    c() {
      e = c("span"), i = D(t), p(e, "class", "svelte-1m851ap");
    },
    m(s, l) {
      B(s, e, l), r(e, i);
    },
    p(s, l) {
      l[0] & /*activeGame, lang*/
      516 && t !== (t = /*partition*/
      (s[57].name[
        /*lang*/
        s[2]
      ] || /*partition*/
      s[57].name["*"]) + "") && j(i, t);
    },
    d(s) {
      s && k(e);
    }
  };
}
function Ge(A) {
  let e, t;
  function i(n, o) {
    if (
      /*partition*/
      n[57].name[
        /*lang*/
        n[2]
      ] || /*partition*/
      n[57].name["*"]
    )
      return Yt;
    if (
      /*partition*/
      n[57].image1
    )
      return Gt;
  }
  let s = i(A), l = s && s(A);
  return {
    c() {
      e = c("span"), l && l.c(), t = C(), p(e, "class", "RewardItem svelte-1m851ap");
    },
    m(n, o) {
      B(n, e, o), l && l.m(e, null), r(e, t);
    },
    p(n, o) {
      s === (s = i(n)) && l ? l.p(n, o) : (l && l.d(1), l = s && s(n), l && (l.c(), l.m(e, t)));
    },
    d(n) {
      n && k(e), l && l.d();
    }
  };
}
function Ye(A) {
  let e, t, i;
  function s(o, f) {
    if (
      /*internalLoading*/
      o[16]
    )
      return qt;
    if (
      /*viewData*/
      o[20]
    )
      return Vt;
  }
  let l = s(A), n = l && l(A);
  return {
    c() {
      e = c("div"), t = c("div"), n && n.c(), p(t, "class", "LayerContent Center svelte-1m851ap"), p(e, "class", "ViewLayer MessageLayer svelte-1m851ap");
    },
    m(o, f) {
      B(o, e, f), r(e, t), n && n.m(t, null);
    },
    p(o, f) {
      l === (l = s(o)) && n ? n.p(o, f) : (n && n.d(1), n = l && l(o), n && (n.c(), n.m(t, null)));
    },
    i(o) {
      o && (i || We(() => {
        i = Le(e, zt, { duration: 250 }), i.start();
      }));
    },
    o: Re,
    d(o) {
      o && k(e), n && n.d();
    }
  };
}
function Vt(A) {
  let e, t = (
    /*viewData*/
    A[20].key
  ), i, s, l = Ke(A);
  function n(a, u) {
    return (
      /*messageMode*/
      a[12] === "gift" ? Kt : Ut
    );
  }
  let o = n(A), f = o(A);
  return {
    c() {
      e = c("div"), l.c(), i = C(), s = c("div"), f.c(), p(e, "class", "ViewDataContainer svelte-1m851ap"), me(
        e,
        "shifted",
        /*internalMode*/
        A[13] === "confirmReject"
      ), p(s, "class", "ButtonGroup svelte-1m851ap"), me(
        s,
        "wide-buttons",
        /*internalMode*/
        A[13] === "confirmReject"
      );
    },
    m(a, u) {
      B(a, e, u), l.m(e, null), B(a, i, u), B(a, s, u), f.m(s, null);
    },
    p(a, u) {
      u[0] & /*viewData*/
      1048576 && ke(t, t = /*viewData*/
      a[20].key) ? (tt(), At(l, 1, 1, Re), it(), l = Ke(a), l.c(), ye(l, 1), l.m(e, null)) : l.p(a, u), u[0] & /*internalMode*/
      8192 && me(
        e,
        "shifted",
        /*internalMode*/
        a[13] === "confirmReject"
      ), o === (o = n(a)) && f ? f.p(a, u) : (f.d(1), f = o(a), f && (f.c(), f.m(s, null))), u[0] & /*internalMode*/
      8192 && me(
        s,
        "wide-buttons",
        /*internalMode*/
        a[13] === "confirmReject"
      );
    },
    d(a) {
      a && (k(e), k(i), k(s)), l.d(a), f.d();
    }
  };
}
function qt(A) {
  let e;
  return {
    c() {
      e = c("div"), e.innerHTML = '<div class="SkeletonContent svelte-1m851ap"><ui-skeleton structure="rectangle" width="100px" height="100px" border-radius="20px"></ui-skeleton> <ui-skeleton structure="text" width="240px" height="24px"></ui-skeleton></div> <div class="SkeletonFooter"><ui-skeleton structure="rectangle" width="240px" height="60px" border-radius="54px"></ui-skeleton></div>', p(e, "class", "SkeletonWrapper svelte-1m851ap");
    },
    m(t, i) {
      B(t, e, i);
    },
    p: Re,
    d(t) {
      t && k(e);
    }
  };
}
function Ve(A) {
  let e, t, i;
  return {
    c() {
      e = c("div"), t = c("img"), Ce(t.src, i = /*viewData*/
      A[20].image) || p(t, "src", i), p(t, "alt", ""), p(t, "class", "GiftImage svelte-1m851ap"), p(e, "class", "ImageWrapper svelte-1m851ap");
    },
    m(s, l) {
      B(s, e, l), r(e, t);
    },
    p(s, l) {
      l[0] & /*viewData*/
      1048576 && !Ce(t.src, i = /*viewData*/
      s[20].image) && p(t, "src", i);
    },
    d(s) {
      s && k(e);
    }
  };
}
function qe(A) {
  let e, t = (
    /*viewData*/
    A[20].title + ""
  );
  return {
    c() {
      e = c("p"), p(e, "class", "MessageTitle svelte-1m851ap");
    },
    m(i, s) {
      B(i, e, s), e.innerHTML = t;
    },
    p(i, s) {
      s[0] & /*viewData*/
      1048576 && t !== (t = /*viewData*/
      i[20].title + "") && (e.innerHTML = t);
    },
    d(i) {
      i && k(e);
    }
  };
}
function Ue(A) {
  let e, t = (
    /*viewData*/
    A[20].text + ""
  );
  return {
    c() {
      e = c("p"), p(e, "class", "MessageText svelte-1m851ap");
    },
    m(i, s) {
      B(i, e, s), e.innerHTML = t;
    },
    p(i, s) {
      s[0] & /*viewData*/
      1048576 && t !== (t = /*viewData*/
      i[20].text + "") && (e.innerHTML = t);
    },
    d(i) {
      i && k(e);
    }
  };
}
function Ke(A) {
  let e, t, i, s, l, n, o = (
    /*viewData*/
    A[20].image && Ve(A)
  ), f = (
    /*viewData*/
    A[20].title && qe(A)
  ), a = (
    /*viewData*/
    A[20].text && Ue(A)
  );
  return {
    c() {
      e = c("div"), o && o.c(), t = C(), f && f.c(), i = C(), a && a.c(), p(e, "class", "ViewDataContent svelte-1m851ap");
    },
    m(u, d) {
      B(u, e, d), o && o.m(e, null), r(e, t), f && f.m(e, null), r(e, i), a && a.m(e, null), n = !0;
    },
    p(u, d) {
      A = u, /*viewData*/
      A[20].image ? o ? o.p(A, d) : (o = Ve(A), o.c(), o.m(e, t)) : o && (o.d(1), o = null), /*viewData*/
      A[20].title ? f ? f.p(A, d) : (f = qe(A), f.c(), f.m(e, i)) : f && (f.d(1), f = null), /*viewData*/
      A[20].text ? a ? a.p(A, d) : (a = Ue(A), a.c(), a.m(e, null)) : a && (a.d(1), a = null);
    },
    i(u) {
      n || (u && We(() => {
        n && (l && l.end(1), s = Le(e, Me, {
          y: (
            /*internalMode*/
            A[13] === "confirmReject" ? 10 : -10
          ),
          duration: 300,
          delay: 100
        }), s.start());
      }), n = !0);
    },
    o(u) {
      s && s.invalidate(), u && (l = st(e, Me, {
        y: (
          /*internalMode*/
          A[13] === "confirmReject" ? -10 : 10
        ),
        duration: 150
      })), n = !1;
    },
    d(u) {
      u && k(e), o && o.d(), f && f.d(), a && a.d(), u && l && l.end();
    }
  };
}
function Ut(A) {
  let e, t, i;
  function s(o, f) {
    return (
      /*messageMode*/
      o[12] === "success" ? eA : (
        /*messageMode*/
        o[12] === "noprize" ? $t : _t
      )
    );
  }
  let l = s(A), n = l(A);
  return {
    c() {
      e = c("button"), n.c(), p(e, "type", "button"), p(e, "class", "ActionButton primary svelte-1m851ap");
    },
    m(o, f) {
      B(o, e, f), n.m(e, null), t || (i = pe(
        e,
        "click",
        /*click_handler_6*/
        A[43]
      ), t = !0);
    },
    p(o, f) {
      l === (l = s(o)) && n ? n.p(o, f) : (n.d(1), n = l(o), n && (n.c(), n.m(e, null)));
    },
    d(o) {
      o && k(e), n.d(), t = !1, i();
    }
  };
}
function Kt(A) {
  let e, t, i = (
    /*internalMode*/
    A[13]
  ), s, l, n, o = (
    /*internalMode*/
    A[13]
  ), f, a, u = _e(A), d = $e(A);
  return {
    c() {
      e = c("button"), t = c("div"), u.c(), s = C(), l = c("button"), n = c("div"), d.c(), p(t, "class", "ButtonTextWrapper svelte-1m851ap"), p(e, "type", "button"), p(e, "class", "ActionButton primary svelte-1m851ap"), e.disabled = /*internalLoading*/
      A[16], p(n, "class", "ButtonTextWrapper svelte-1m851ap"), p(l, "type", "button"), p(l, "class", "ActionButton outline svelte-1m851ap"), l.disabled = /*internalLoading*/
      A[16];
    },
    m(b, v) {
      B(b, e, v), r(e, t), u.m(t, null), B(b, s, v), B(b, l, v), r(l, n), d.m(n, null), f || (a = [
        pe(e, "click", function() {
          Ie(
            /*internalMode*/
            A[13] === "confirmReject" ? (
              /*click_handler_2*/
              A[39]
            ) : (
              /*click_handler_3*/
              A[40]
            )
          ) && /*internalMode*/
          (A[13] === "confirmReject" ? (
            /*click_handler_2*/
            A[39]
          ) : (
            /*click_handler_3*/
            A[40]
          )).apply(this, arguments);
        }),
        pe(l, "click", function() {
          Ie(
            /*internalMode*/
            A[13] === "confirmReject" ? (
              /*click_handler_4*/
              A[41]
            ) : (
              /*click_handler_5*/
              A[42]
            )
          ) && /*internalMode*/
          (A[13] === "confirmReject" ? (
            /*click_handler_4*/
            A[41]
          ) : (
            /*click_handler_5*/
            A[42]
          )).apply(this, arguments);
        })
      ], f = !0);
    },
    p(b, v) {
      A = b, v[0] & /*internalMode*/
      8192 && ke(i, i = /*internalMode*/
      A[13]) ? (u.d(1), u = _e(A), u.c(), u.m(t, null)) : u.p(A, v), v[0] & /*internalLoading*/
      65536 && (e.disabled = /*internalLoading*/
      A[16]), v[0] & /*internalMode*/
      8192 && ke(o, o = /*internalMode*/
      A[13]) ? (d.d(1), d = $e(A), d.c(), d.m(n, null)) : d.p(A, v), v[0] & /*internalLoading*/
      65536 && (l.disabled = /*internalLoading*/
      A[16]);
    },
    d(b) {
      b && (k(e), k(s), k(l)), u.d(b), d.d(b), f = !1, et(a);
    }
  };
}
function _t(A) {
  let e = (
    /*$_*/
    A[15]("OK") + ""
  ), t;
  return {
    c() {
      t = D(e);
    },
    m(i, s) {
      B(i, t, s);
    },
    p(i, s) {
      s[0] & /*$_*/
      32768 && e !== (e = /*$_*/
      i[15]("OK") + "") && j(t, e);
    },
    d(i) {
      i && k(t);
    }
  };
}
function $t(A) {
  let e = (
    /*$_*/
    A[15]("Continue") + ""
  ), t;
  return {
    c() {
      t = D(e);
    },
    m(i, s) {
      B(i, t, s);
    },
    p(i, s) {
      s[0] & /*$_*/
      32768 && e !== (e = /*$_*/
      i[15]("Continue") + "") && j(t, e);
    },
    d(i) {
      i && k(t);
    }
  };
}
function eA(A) {
  let e = (
    /*$_*/
    A[15]("BackToGame") + ""
  ), t;
  return {
    c() {
      t = D(e);
    },
    m(i, s) {
      B(i, t, s);
    },
    p(i, s) {
      s[0] & /*$_*/
      32768 && e !== (e = /*$_*/
      i[15]("BackToGame") + "") && j(t, e);
    },
    d(i) {
      i && k(t);
    }
  };
}
function _e(A) {
  let e, t = (
    /*internalMode*/
    (A[13] === "confirmReject" ? (
      /*$_*/
      A[15]("KeepPrize")
    ) : (
      /*$_*/
      A[15]("Accept")
    )) + ""
  ), i;
  return {
    c() {
      e = c("span"), i = D(t), p(e, "class", "svelte-1m851ap");
    },
    m(s, l) {
      B(s, e, l), r(e, i);
    },
    p(s, l) {
      l[0] & /*internalMode, $_*/
      40960 && t !== (t = /*internalMode*/
      (s[13] === "confirmReject" ? (
        /*$_*/
        s[15]("KeepPrize")
      ) : (
        /*$_*/
        s[15]("Accept")
      )) + "") && j(i, t);
    },
    d(s) {
      s && k(e);
    }
  };
}
function $e(A) {
  let e, t = (
    /*internalMode*/
    (A[13] === "confirmReject" ? (
      /*$_*/
      A[15]("RejectPrize")
    ) : (
      /*$_*/
      A[15]("Reject")
    )) + ""
  ), i;
  return {
    c() {
      e = c("span"), i = D(t), p(e, "class", "svelte-1m851ap");
    },
    m(s, l) {
      B(s, e, l), r(e, i);
    },
    p(s, l) {
      l[0] & /*internalMode, $_*/
      40960 && t !== (t = /*internalMode*/
      (s[13] === "confirmReject" ? (
        /*$_*/
        s[15]("RejectPrize")
      ) : (
        /*$_*/
        s[15]("Reject")
      )) + "") && j(i, t);
    },
    d(s) {
      s && k(e);
    }
  };
}
function tA(A) {
  let e, t, i = (
    /*activeGame*/
    A[9] && Ze(A)
  ), s = (
    /*isMessageShown*/
    A[11] && Ye(A)
  );
  return {
    c() {
      e = c("div"), i && i.c(), t = C(), s && s.c(), p(e, "class", "PrizeDetailsContent svelte-1m851ap");
    },
    m(l, n) {
      B(l, e, n), i && i.m(e, null), r(e, t), s && s.m(e, null), A[44](e);
    },
    p(l, n) {
      /*activeGame*/
      l[9] ? i ? i.p(l, n) : (i = Ze(l), i.c(), i.m(e, t)) : i && (i.d(1), i = null), /*isMessageShown*/
      l[11] ? s ? (s.p(l, n), n[0] & /*isMessageShown*/
      2048 && ye(s, 1)) : (s = Ye(l), s.c(), ye(s, 1), s.m(e, null)) : s && (s.d(1), s = null);
    },
    i(l) {
      ye(s);
    },
    o: Re,
    d(l) {
      l && k(e), i && i.d(), s && s.d(), A[44](null);
    }
  };
}
let AA = null;
function iA(A, e, t) {
  let i, s, l, n, o, f, a;
  yt(A, Tt, (m) => t(15, a = m));
  let { data: u = null } = e, { endpoint: d = "" } = e, { session: b = "" } = e, { lang: v = "en" } = e, { clientstyling: M = "" } = e, { clientstylingurl: F = "" } = e, { translationurl: $ = "" } = e, { mbsource: W = "" } = e, { twostepdraw: V = "false" } = e, { luckywheelsize: ie = 324 } = e, { luckywheelmobilesize: re = 240 } = e, { programs: U = [] } = e, w = null, N;
  const se = kt(window.navigator.userAgent);
  let S = !1, L = "", J = null, x = !1, Q = !1, E = "", ee = "", X = !1, P = Date.now(), T = null;
  const y = (m, h) => {
    if (!m)
      return "";
    const z = new Date(m).getTime() - h;
    if (z <= 0)
      return "00d:00h:00m";
    const _ = Math.floor(z / (1e3 * 60 * 60 * 24)), ae = Math.floor(z % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)), we = Math.floor(z % (1e3 * 60 * 60) / (1e3 * 60));
    return `${_.toString().padStart(2, "0")}d:${ae.toString().padStart(2, "0")}h:${we.toString().padStart(2, "0")}m`;
  }, I = (m) => [
    "",
    a("Monday"),
    a("Tuesday"),
    a("Wednesday"),
    a("Thursday"),
    a("Friday"),
    a("Saturday"),
    a("Sunday")
  ][m] || "", le = (m) => {
    const h = ["th", "st", "nd", "rd"], H = m % 100;
    return m + (h[(H - 20) % 10] || h[H] || h[0]);
  }, de = (m) => {
    if (!m)
      return "";
    const { recurrenceType: h, frequency: H, dayFrom: z, dayTo: _, maxImplicitTickets: ae, startTime: we, endTime: He } = m, Pe = ae || 0, ft = Pe > 1 ? a("Spins") : a("Spin");
    let ne = `${Pe} ${ft}`;
    const be = a("Every"), te = H || 1;
    switch (h?.toLowerCase()) {
      case "single":
        ne += ` ${a("InThisPeriod")}`;
        break;
      case "minute":
        const ut = te > 1 ? a("Minutes") : a("Minute");
        ne += ` ${be} ${te > 1 ? te + " " : ""}${ut}`;
        break;
      case "day":
        const gt = te > 1 ? a("Days") : a("Day");
        ne += ` ${be} ${te > 1 ? te + " " : ""}${gt}`;
        break;
      case "week":
        if (z && _)
          z === _ ? ne += ` ${be} ${I(z)}` : ne += ` ${a("From")} ${I(z)} ${a("To")} ${I(_)} ${a("EveryWeek")}`;
        else {
          const Qe = te > 1 ? a("Weeks") : a("Week");
          ne += ` ${be} ${te > 1 ? te + " " : ""}${Qe}`;
        }
        break;
      case "month":
        if (z && _)
          z === _ ? ne += ` ${be} ${le(z)} ${a("EachMonth")}` : ne += ` ${a("From")} ${le(z)} ${a("To")} ${le(_)} ${a("EachMonth")}`;
        else {
          const Qe = te > 1 ? a("Months") : a("Month");
          ne += ` ${be} ${te > 1 ? te + " " : ""}${Qe}`;
        }
        break;
      default:
        ne += ` ${a("InThisPeriod")}`;
    }
    return `${ne} [${Z(we)} ~ ${Z(He)}]`;
  };
  Lt();
  const he = async (m) => {
    try {
      const H = await (await fetch(m)).json();
      Object.keys(H).forEach((z) => {
        ze(z, H[z]);
      });
    } catch (h) {
      console.error("[PrizeDetails] Failed to load translations", h);
    }
  };
  var Y;
  (function(m) {
    m[m.Assign = 0] = "Assign", m[m.Reward = 1] = "Reward", m[m.Reject = 2] = "Reject";
  })(Y || (Y = {}));
  const ce = async (m, h = {}) => {
    const H = new URL(d + "/v1" + m);
    h.params && Object.keys(h.params).forEach((ae) => H.searchParams.append(ae, h.params[ae]));
    const _ = await (await fetch(H.toString(), {
      method: h.method || "GET",
      headers: {
        "Content-Type": "application/json",
        Accept: "text/plain",
        ...b ? { "x-SessionId": b } : {},
        ...h.headers
      },
      body: h.body
    })).text();
    try {
      return JSON.parse(_);
    } catch {
      return _;
    }
  }, fe = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (m) => {
    const h = Math.random() * 16 | 0;
    return (m === "x" ? h : h & 3 | 8).toString(16);
  }), ue = async () => {
    if (!w)
      return;
    const m = await ce("/wof/remainingTimes", {
      params: {
        filter: `ProgramId[]=${w.program.id}`
      }
    });
    let h = 0;
    if (m?.items?.length > 0) {
      const H = m.items.find((z) => z.programId === w.program.id);
      H && (h = +H.remainingTimes || 0);
    }
    t(9, w.current.remainingTimes = h, w), t(9, w = { ...w }), t(32, u = JSON.stringify(w)), window.postMessage(
      {
        type: "PrizeGameRemainingTimesUpdated",
        data: w
      },
      "*"
    );
  }, oe = async () => {
    if (!w)
      return;
    let m = w.next;
    if (!m) {
      let h = U;
      if (!h || h.length === 0)
        try {
          h = (await ce("/wof/lotteries"))?.items || [];
        } catch (z) {
          console.error("[PrizeDetails] Check next program failed", z);
        }
      m = h?.find((z) => z.program.id === w.program.id)?.next;
    }
    m ? (t(12, L = "show-next"), t(35, J = {
      startTime: Z(m.startTime),
      name: w.program.name[v] || w.program.name["*"]
    })) : t(12, L = "no-next"), t(11, S = !0);
  }, q = async () => {
    if (!(!w || x || Q || S) && w.current?.remainingTimes !== 0) {
      ee = fe(), t(16, x = !0), t(17, Q = !0), t(18, X = !1), window.postMessage({ type: "PrizeGameStartAnimation" }, "*");
      try {
        const m = V === "true" ? Y.Reward : Y.Assign, h = await ce(`/wof/draw/${w.program.id}`, {
          method: "PUT",
          body: JSON.stringify({ guid: ee, action: m })
        });
        await ve(h, m);
      } catch {
        window.postMessage(
          {
            type: "PrizeGameResult",
            data: { error: !0 }
          },
          "*"
        ), t(12, L = "error"), t(11, S = !0), t(16, x = !1), t(17, Q = !1);
      }
    }
  }, ve = async (m, h) => {
    if (m?.item?.state === "fulfilled" || m?.item?.state === "drawn") {
      window.postMessage({ type: "PrizeGameResult", data: m }, "*");
      const H = w.program.wheelOfFortune.partitions[m.item.result.wheelOfFortunePartitionIndex], z = H?.prizeText[v] || H?.prizeText["*"] || "", _ = H?.name[v] || H?.name["*"] || "", ae = H?.prizeImage[v] || H?.prizeImage["*"] || "", we = m.item.result.outcomes.some((He) => He.action?.type === "noprize");
      we ? (t(12, L = "noprize"), t(35, J = { text: z, image: ae })) : (h === Y.Assign && L === "gift" ? t(12, L = "success") : t(12, L = h === Y.Reward ? "gift" : "success-draw"), t(35, J = {
        text: z,
        image: ae,
        bold: _
      })), t(13, E = ""), (h !== Y.Reward || we) && await ue();
    } else
      window.postMessage(
        {
          type: "PrizeGameResult",
          data: { error: !0 }
        },
        "*"
      ), t(12, L = "error"), t(11, S = !0), t(17, Q = !1);
    t(16, x = !1);
  }, ge = async (m) => {
    if (!w || x)
      return;
    t(16, x = !0);
    const h = m === "Assign" ? Y.Assign : Y.Reject;
    try {
      const H = await ce(`/wof/draw/${w.program.id}`, {
        method: "PUT",
        body: JSON.stringify({ guid: ee, action: h })
      });
      h === Y.Assign ? await ve(H, Y.Assign) : (await ue(), t(17, Q = !1), t(16, x = !1), w.current?.remainingTimes === 0 ? (t(13, E = ""), oe()) : (t(11, S = !1), t(13, E = ""), window.postMessage({ type: "PrizeResultClose" }, "*")));
    } catch {
      window.postMessage(
        {
          type: "PrizeGameResult",
          data: { error: !0 }
        },
        "*"
      ), t(12, L = "error"), t(11, S = !0), t(16, x = !1), t(17, Q = !1);
    }
  }, O = () => window.postMessage({ type: "BackToList" }, "*"), G = () => window.postMessage({ type: "ClosePrizeEngineDrawer" }, "*"), Z = (m) => m ? new Date(m).toISOString().replace("T", " ").substring(0, 19).replace(/-/g, "/") : "", R = (m) => {
    const { type: h, action: H } = m.data;
    h === "PrizeGameRequestDraw" ? q() : h === "PrizeResultAction" ? ge(H) : h === "PrizeResultClose" ? (t(11, S = !1), t(17, Q = !1), t(13, E = "")) : h === "PrizeGameToggleRules" ? t(18, X = !X) : h === "PrizeGameSpinEnd" && (t(11, S = !0), t(17, Q = !1));
  };
  Bt(() => (T = setInterval(
    () => {
      t(36, P = Date.now());
    },
    6e4
  ), window.addEventListener("message", R), () => {
    window.removeEventListener("message", R), T && clearInterval(T);
  }));
  const K = () => t(18, X = !0), lt = () => t(18, X = !1), at = () => t(13, E = ""), rt = () => ge("Assign"), ot = () => ge("Reject"), mt = () => t(13, E = "confirmReject"), pt = () => {
    w?.current?.remainingTimes === 0 && ["success", "noprize", "success-draw", "error"].includes(L) ? (t(13, E = ""), oe()) : (t(11, S = !1), t(13, E = ""), window.postMessage({ type: "PrizeResultClose" }, "*"));
  };
  function ct(m) {
    Ct[m ? "unshift" : "push"](() => {
      N = m, t(10, N);
    });
  }
  return A.$$set = (m) => {
    "data" in m && t(32, u = m.data), "endpoint" in m && t(0, d = m.endpoint), "session" in m && t(1, b = m.session), "lang" in m && t(2, v = m.lang), "clientstyling" in m && t(3, M = m.clientstyling), "clientstylingurl" in m && t(4, F = m.clientstylingurl), "translationurl" in m && t(5, $ = m.translationurl), "mbsource" in m && t(6, W = m.mbsource), "twostepdraw" in m && t(33, V = m.twostepdraw), "luckywheelsize" in m && t(7, ie = m.luckywheelsize), "luckywheelmobilesize" in m && t(8, re = m.luckywheelmobilesize), "programs" in m && t(34, U = m.programs);
  }, A.$$.update = () => {
    if (A.$$.dirty[1] & /*data*/
    2)
      if (typeof u == "string")
        try {
          t(9, w = JSON.parse(u));
        } catch (m) {
          console.error("[PrizeDetails] Parse failed", m);
        }
      else
        t(9, w = u);
    A.$$.dirty[0] & /*activeGame*/
    512 | A.$$.dirty[1] & /*now*/
    32 && t(23, i = w?.current?.expiryTime ? y(w.current.expiryTime, P) : ""), A.$$.dirty[0] & /*activeGame, lang*/
    516 && t(22, s = w?.program?.termsUrl?.[v] || w?.program?.termsUrl?.["*"]), A.$$.dirty[0] & /*translationurl*/
    32 && $ && he($), A.$$.dirty[0] & /*lang*/
    4 && v && Wt(v), A.$$.dirty[0] & /*activeGame*/
    512 && w?.translations && Object.keys(w.translations).forEach((m) => {
      ze(m, w.translations[m]);
    }), A.$$.dirty[0] & /*clientstyling, rootContainer*/
    1032 && M && N && Mt(N, M), A.$$.dirty[0] & /*clientstylingurl, rootContainer*/
    1040 && F && N && Rt(N, F), A.$$.dirty[0] & /*mbsource, rootContainer*/
    1088 && W && N && Ht(N, `${W}.Style`, AA), A.$$.dirty[0] & /*activeGame*/
    512 && t(14, l = w?.program?.type), A.$$.dirty[0] & /*activeGame*/
    512 && t(21, n = Number(w?.program?.metadata?.template) || 0), A.$$.dirty[0] & /*isMessageShown, internalMode, $_, messageMode*/
    47104 | A.$$.dirty[1] & /*messageValue*/
    16 && t(20, o = (() => {
      if (!S)
        return null;
      if (E === "confirmReject")
        return {
          key: "confirmReject",
          image: xt,
          title: a("AreYouSure"),
          text: a("RejectWarningText")
        };
      switch (L) {
        case "error":
          return {
            key: "error",
            image: jt,
            title: a("DrawFailed")
          };
        case "noprize":
          return {
            key: "noprize",
            image: It,
            title: a("NoPrizeTitle"),
            text: J?.text || a("NoPrize")
          };
        case "gift":
        case "success-draw":
          return {
            key: L,
            image: J?.image || Pt,
            title: a("Congratulation"),
            text: J?.text || a("Success", {
              values: { prize: J?.bold || "" }
            })
          };
        case "success":
          return {
            key: "success",
            image: Xt,
            text: a("RewardIssued")
          };
        case "show-next":
          return {
            key: "show-next",
            text: a("ShowNext", {
              values: {
                startTime: J?.startTime,
                name: J?.name
              }
            })
          };
        case "no-next":
          return { key: "no-next", text: a("NoNext") };
        default:
          return null;
      }
    })()), A.$$.dirty[0] & /*$_, gameType, activeGame*/
    49664 && t(19, f = (() => {
      let m = a("Play");
      return l === "wheelOfFortune" ? m = a("Spin") : l === "flipCoin" ? m = a("FlipCoin") : l === "mysteryChest" && (m = a("OpenChest")), {
        base: m,
        count: w?.current?.remainingTimes || 0
      };
    })());
  }, [
    d,
    b,
    v,
    M,
    F,
    $,
    W,
    ie,
    re,
    w,
    N,
    S,
    L,
    E,
    l,
    a,
    x,
    Q,
    X,
    f,
    o,
    n,
    s,
    i,
    se,
    de,
    oe,
    q,
    ge,
    O,
    G,
    Z,
    u,
    V,
    U,
    J,
    P,
    K,
    lt,
    at,
    rt,
    ot,
    mt,
    pt,
    ct
  ];
}
class sA extends vt {
  constructor(e) {
    super(), wt(
      this,
      e,
      iA,
      tA,
      ke,
      {
        data: 32,
        endpoint: 0,
        session: 1,
        lang: 2,
        clientstyling: 3,
        clientstylingurl: 4,
        translationurl: 5,
        mbsource: 6,
        twostepdraw: 33,
        luckywheelsize: 7,
        luckywheelmobilesize: 8,
        programs: 34
      },
      Nt,
      [-1, -1, -1]
    );
  }
  get data() {
    return this.$$.ctx[32];
  }
  set data(e) {
    this.$$set({ data: e }), Ae();
  }
  get endpoint() {
    return this.$$.ctx[0];
  }
  set endpoint(e) {
    this.$$set({ endpoint: e }), Ae();
  }
  get session() {
    return this.$$.ctx[1];
  }
  set session(e) {
    this.$$set({ session: e }), Ae();
  }
  get lang() {
    return this.$$.ctx[2];
  }
  set lang(e) {
    this.$$set({ lang: e }), Ae();
  }
  get clientstyling() {
    return this.$$.ctx[3];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), Ae();
  }
  get clientstylingurl() {
    return this.$$.ctx[4];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), Ae();
  }
  get translationurl() {
    return this.$$.ctx[5];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), Ae();
  }
  get mbsource() {
    return this.$$.ctx[6];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), Ae();
  }
  get twostepdraw() {
    return this.$$.ctx[33];
  }
  set twostepdraw(e) {
    this.$$set({ twostepdraw: e }), Ae();
  }
  get luckywheelsize() {
    return this.$$.ctx[7];
  }
  set luckywheelsize(e) {
    this.$$set({ luckywheelsize: e }), Ae();
  }
  get luckywheelmobilesize() {
    return this.$$.ctx[8];
  }
  set luckywheelmobilesize(e) {
    this.$$set({ luckywheelmobilesize: e }), Ae();
  }
  get programs() {
    return this.$$.ctx[34];
  }
  set programs(e) {
    this.$$set({ programs: e }), Ae();
  }
}
customElements.define("prize-engine-details", Qt(sA, { data: {}, endpoint: {}, session: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, mbsource: {}, twostepdraw: {}, luckywheelsize: {}, luckywheelmobilesize: {}, programs: {} }, [], [], !0));
export {
  sA as default
};
