@moonbase.sh/storefront 0.2.46 β†’ 0.2.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/moonbase.js CHANGED
@@ -3396,7 +3396,7 @@ var Wu = v.object({
3396
3396
  return (await this.api.authenticatedFetch("/api/customer/meta/user", zu)).data;
3397
3397
  }
3398
3398
  async signIn(e, t) {
3399
- const n = await Vs(`${this.api.baseUrl}/api/customer/identity/sign-in?email=${e}&scheme=JWT`, {
3399
+ const n = await Vs(`${this.api.baseUrl}/api/customer/identity/sign-in?email=${encodeURIComponent(e)}&scheme=JWT`, {
3400
3400
  method: "POST",
3401
3401
  headers: {
3402
3402
  Accept: "application/json",
@@ -9847,19 +9847,20 @@ function ha(e) {
9847
9847
  t.currentOrder.value.items.splice(r, 1), t.pushOrderContent();
9848
9848
  },
9849
9849
  checkout: async (n) => {
9850
- const r = new URL(n.returnUrl, document.baseURI).href, o = await t.client.orders.pushContent(t.currentOrder.value, {
9851
- returnUrl: r
9850
+ var r;
9851
+ const o = typeof window < "u" ? window.location.pathname : "", s = new URL((r = n.returnUrl) != null ? r : o, document.baseURI).href, i = await t.client.orders.pushContent(t.currentOrder.value, {
9852
+ returnUrl: s
9852
9853
  });
9853
- if (!n.redirect && o.embeddedCheckoutUrl && typeof window < "u") {
9854
- const s = o.embeddedCheckoutUrl;
9855
- return new Promise((i) => {
9856
- Id(s.replace("acme-co.beta.moonbase.sh", "localhost:3002")), window.addEventListener("moonbase-checkout-closed", (a) => {
9857
- i({ next: a.detail.next });
9854
+ if (!n.redirect && i.embeddedCheckoutUrl && typeof window < "u") {
9855
+ const a = i.embeddedCheckoutUrl;
9856
+ return new Promise((l) => {
9857
+ Id(a.replace("acme-co.beta.moonbase.sh", "localhost:3002")), window.addEventListener("moonbase-checkout-closed", (u) => {
9858
+ l({ next: u.detail.next });
9858
9859
  });
9859
9860
  });
9860
9861
  } else {
9861
- if (n.redirect && o.checkoutUrl && typeof window < "u")
9862
- return window.location.href = o.checkoutUrl, { next: void 0 };
9862
+ if (n.redirect && i.checkoutUrl && typeof window < "u")
9863
+ return window.location.href = i.checkoutUrl, { next: void 0 };
9863
9864
  throw new Error("No checkout URL found");
9864
9865
  }
9865
9866
  }
@@ -1,6 +1,6 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('#moonbase .moonbase\\:toolbar{position:fixed;bottom:32px;border-radius:16px;background-color:#1a1a1a;color:#f9f9f9;display:flex;transition-duration:.1s;transition-property:all;transition-timing-function:ease-out;transform:translateY(8px);opacity:0}#moonbase .moonbase\\:toolbar[data-location=bottom-right]{right:32px}#moonbase .moonbase\\:toolbar[data-location=bottom-left]{left:32px}#moonbase .moonbase\\:toolbar[data-visible=true]{transform:translateY(0);opacity:1;transition-duration:.5s}#moonbase .moonbase\\:toolbar-action{padding:12px 16px;transition:background-color .25s ease-out;cursor:pointer;display:flex;align-items:center}#moonbase .moonbase\\:toolbar-action:nth-child(1){border-top-left-radius:16px;border-bottom-left-radius:16px}#moonbase .moonbase\\:toolbar-action:last-child{border-top-right-radius:16px;border-bottom-right-radius:16px}#moonbase .moonbase\\:toolbar-action:hover{background-color:#ffffff1a}#moonbase .moonbase\\:toolbar-action[data-action-width=narrow]{padding:12px}#moonbase .moonbase\\:input label{display:block;font-size:14px;font-weight:500;line-height:20px;color:#374151}#moonbase .moonbase\\:input input{display:block;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:calc(var(--moonbase-input-border-radius) * .5);border-width:1px;border-color:#d1d5db;background-color:var(--moonbase-input-background-color);font-size:.875rem;line-height:1.25rem;padding:8px 12px;margin-top:4px;box-shadow:0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:input input:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-input-active-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:input .moonbase\\:input-hint{margin-top:8px;font-size:14px;line-height:20px}#moonbase .moonbase\\:input .moonbase\\:input-hint[data-type=error]{color:var(--moonbase-input-error-color)}@keyframes moonbase\\:spin-687bcaf0{to{transform:rotate(360deg)}}#moonbase svg[data-v-687bcaf0]{animation:moonbase\\:spin-687bcaf0 1s linear infinite}#moonbase .moonbase\\:submit-button[data-v-1440b0cf]{position:relative;display:flex;justify-content:center;overflow:hidden;transition-property:color,background-color,border-color,box-shadow;transition-timing-function:ease-in-out;transition-duration:.2s;box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf],#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:hover,#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:focus,#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:active{font-size:.875rem;font-weight:500;line-height:1.25rem;border-radius:var(--moonbase-button-border-radius);border-width:1px;border-color:transparent;border-style:solid;color:var(--moonbase-button-text-color);background-color:var(--moonbase-button-background-color);padding:var(--moonbase-button-padding);height:unset;width:unset}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:hover{background-color:hsl(from var(--moonbase-button-background-color) h s calc(l - 5))}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-v-1440b0cf]:focus{transition-duration:.1s;outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-button-background-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-success][data-v-1440b0cf]{background-color:var(--moonbase-button-success-color)}#moonbase .moonbase\\:submit-button[data-v-1440b0cf][data-error][data-v-1440b0cf]{background-color:var(--moonbase-button-error-color)}#moonbase .moonbase\\:submit-button[data-v-1440b0cf] div[data-v-1440b0cf]{margin-left:-12px;margin-right:12px;height:20px;width:0px;opacity:0;transition-property:opacity,width;transition-duration:.2s;transition-timing-function:ease-in-out}#moonbase .moonbase\\:submit-button[data-v-1440b0cf] div[data-v-1440b0cf][data-visible][data-v-1440b0cf]{width:20px;opacity:1}#moonbase .moonbase\\:submit-button[data-v-1440b0cf] div[data-v-1440b0cf] svg[data-v-1440b0cf]{height:20px;width:20px}#moonbase .moonbase\\:checkbox{display:flex;align-items:flex-start}#moonbase .moonbase\\:checkbox label{font-size:14px;font-weight:500;line-height:20px;color:#374151}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-container{display:flex;height:24px;align-items:center}#moonbase .moonbase\\:checkbox input{height:16px;width:16px;border-radius:var(--moonbase-input-border-radius);border-width:1px;border-color:#d1d5db;background-color:var(--moonbase-input-background-color);font-size:.875rem;line-height:1.25rem;padding:8px 12px;margin-top:4px;box-shadow:0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:checkbox input:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-input-active-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-input-shadow-color)}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description{margin-left:12px}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description label{font-size:14px;line-height:24px;font-weight:500;color:hsl(from var(--moonbase-text-color) h s calc(l + 5))}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description p{font-size:14px;line-height:24px;color:hsl(from var(--moonbase-text-color) h s calc(l + 15))}#moonbase .moonbase\\:checkbox .moonbase\\:checkbox-description p[data-type=error]{color:var(--moonbase-input-error-color)}#moonbase .moonbase\\:sign-up{display:flex;flex-direction:column}#moonbase .moonbase\\:sign-up>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:sign-up .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:sign-up .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:confirm-account{display:flex;flex-direction:column}#moonbase .moonbase\\:confirm-account>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:confirm-account>.moonbase\\:loader{display:flex;justify-content:center;padding:36px 16px}#moonbase .moonbase\\:confirm-account>.moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:confirm-account .moonbase\\:error{text-align:center;color:var(--moonbase-error-color);font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:confirm-account .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:reset-password{display:flex;flex-direction:column}#moonbase .moonbase\\:reset-password>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:reset-password .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:reset-password .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:confirm-email-change{display:flex;flex-direction:column}#moonbase .moonbase\\:confirm-email-change>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:confirm-email-change>.moonbase\\:loader{display:flex;justify-content:center;padding:36px 16px}#moonbase .moonbase\\:confirm-email-change>.moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:confirm-email-change .moonbase\\:error{text-align:center;color:var(--moonbase-error-color);font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:confirm-email-change .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;overflow-y:auto}#moonbase .moonbase\\:modal-container{display:flex;min-height:100svh;align-items:flex-end;justify-content:center;padding:16px 16px 90px;text-align:center}@media (min-width: 640px){#moonbase .moonbase\\:modal-container{display:block;padding:0}}#moonbase .moonbase\\:modal-center{display:none}@media (min-width: 640px){#moonbase .moonbase\\:modal-center{display:inline-block;height:100svh;vertical-align:middle}}#moonbase .moonbase\\:modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;transition-property:opacity}#moonbase .moonbase\\:modal-overlay[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:modal-overlay[data-transition~=enter-from],#moonbase .moonbase\\:modal-overlay[data-transition~=leave-to]{opacity:0}#moonbase .moonbase\\:modal-overlay[data-transition~=enter-to],#moonbase .moonbase\\:modal-overlay[data-transition~=leave-from]{opacity:1}#moonbase .moonbase\\:modal-overlay[data-transition~=leave]{transition-timing-function:ease-in;transition-duration:.2s}#moonbase .moonbase\\:modal-content{position:relative;display:inline-block;margin:80px auto 16px;background-color:var(--moonbase-background-color, white);box-shadow:#64646f33 0 8px 32px;border-radius:calc(var(--moonbase-border-radius, 6px) * 2);vertical-align:bottom;transition-property:all;text-align:left}@media (min-width: 640px){#moonbase .moonbase\\:modal-content{vertical-align:middle}}#moonbase .moonbase\\:modal-content[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:modal-content[data-transition~=enter-from]{opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content[data-transition~=enter-from]{transform:scale(.95)}}#moonbase .moonbase\\:modal-content[data-transition~=enter-to]{opacity:1;transform:translateY(0)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content[data-transition~=enter-to]{transform:scale(1)}}#moonbase .moonbase\\:modal-content[data-transition~=leave]{transition-timing-function:ease-in;transition-duration:.2s}#moonbase .moonbase\\:modal-content[data-transition~=leave-from]{opacity:1;transform:translateY(0)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content[data-transition~=leave-from]{transform:scale(1)}}#moonbase .moonbase\\:modal-content[data-transition~=leave-to]{opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:modal-content[data-transition~=leave-to]{transform:scale(.95)}}#moonbase .moonbase\\:sign-in{display:flex;flex-direction:column}#moonbase .moonbase\\:sign-in>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:sign-in .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:sign-in .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:authentication{display:inline-block;color:var(--moonbase-text-color, black);padding:32px 64px}@media (min-width: 640px){#moonbase .moonbase\\:authentication{width:100vw;max-width:26rem}}#moonbase .moonbase\\:authentication>h3{font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;margin-bottom:1.5rem}#moonbase .moonbase\\:authentication>.moonbase\\:loader{display:flex;justify-content:center;padding:36px 16px}#moonbase .moonbase\\:authentication>.moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:product-cart-item{display:flex;align-items:center}#moonbase .moonbase\\:product-cart-item>:not(:first-child){margin-left:24px}#moonbase .moonbase\\:product-cart-item>img{height:80px;width:80px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:product-cart-item>.moonbase\\:image-placeholder{height:80px;width:80px;flex:none;border-radius:6px;background:var(--moonbase-primary-color, rgb(30 64 175))}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-content{display:flex;flex:1 1 auto;flex-direction:column;align-items:flex-start}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-content>:not(:first-child){margin-top:4px}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-content h3{font-weight:600}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-content .moonbase\\:cart-item-discount{color:hsl(from var(--moonbase-success-color, rgb(22 163 74)) h s calc(l - 10))}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-total{flex:none;text-align:right;font-weight:500;font-size:16px;line-height:21px}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-total>span{display:block;font-size:14px;line-height:20px;opacity:.75}#moonbase .moonbase\\:product-cart-item>.moonbase\\:product-cart-item-total>span.moonbase\\:discount{text-decoration:line-through}#moonbase .moonbase\\:bundle-cart-item{display:flex;align-items:center}#moonbase .moonbase\\:bundle-cart-item>:not(:first-child){margin-left:24px}#moonbase .moonbase\\:bundle-cart-item>img{height:80px;width:80px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:image-placeholder{height:80px;width:80px;flex:none;border-radius:6px;background:var(--moonbase-primary-color, rgb(30 64 175))}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content{display:flex;flex:1 1 auto;flex-direction:column;align-items:flex-start}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content>:not(:first-child){margin-top:4px}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content h3{font-weight:600}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:cart-item-discount{color:hsl(from var(--moonbase-success-color, rgb(22 163 74)) h s calc(l - 10))}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary{display:flex;align-items:flex-start;flex-direction:column}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary>:not(:first-child){margin-top:2px}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary button{display:flex;align-items:center}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary button svg{margin-left:4px;margin-top:4px;height:16px;width:16px;transition:transform .2s ease-in-out;transform:rotate(0)}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:bundle-cart-item-content .moonbase\\:bundle-cart-item-summary button svg[data-open]{transform:rotate(180deg)}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:product-cart-item-total{flex:none;text-align:right;font-weight:500;font-size:16px;line-height:21px}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:product-cart-item-total>span{display:block;font-size:14px;line-height:20px;opacity:.75}#moonbase .moonbase\\:bundle-cart-item>.moonbase\\:product-cart-item-total>span.moonbase\\:discount{text-decoration:line-through}#moonbase .moonbase\\:bundle-cart-item-product-list{overflow:hidden;padding-left:24px;transition-property:height;transition-duration:.3s;transition-timing-function:ease-in-out}#moonbase .moonbase\\:bundle-cart-item-product-list>:not(:first-child){border-top-width:1px;border-color:#0000001a}#moonbase .moonbase\\:bundle-cart-item-product-list>div{display:flex;align-items:center;padding:8px 0}#moonbase .moonbase\\:bundle-cart-item-product-list>div>:not(:first-child){margin-left:16px}#moonbase .moonbase\\:bundle-cart-item-product-list>div>img{height:64px;width:64px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:bundle-cart-item-product-list>div>.moonbase\\:image-placeholder{height:64px;width:64px;flex:none;border-radius:6px;background:var(--moonbase-primary-color, rgb(30 64 175))}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div{display:flex;flex:auto;flex-direction:column;align-items:flex-start}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div>:not(:first-child){margin-top:4px}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div h3{display:flex;align-items:center}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div h3:not([data-included]){text-decoration:line-through;opacity:.75}#moonbase .moonbase\\:bundle-cart-item-product-list>div>div h3 svg{margin-right:4px;height:16px;width:16px}#moonbase .moonbase\\:cart-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;overflow-y:auto}#moonbase .moonbase\\:cart-modal-container{display:flex;height:100svh;align-items:flex-end;justify-content:center;padding:16px 16px 90px}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-container{display:block;padding:0}}#moonbase .moonbase\\:cart-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;transition-property:opacity}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=enter-from],#moonbase .moonbase\\:cart-modal-overlay[data-transition~=leave-to]{opacity:0}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=enter-to],#moonbase .moonbase\\:cart-modal-overlay[data-transition~=leave-from]{opacity:1}#moonbase .moonbase\\:cart-modal-overlay[data-transition~=leave]{transition-timing-function:ease-in;transition-duration:.2s}#moonbase .moonbase\\:cart-modal-content{position:fixed;top:0;right:0;bottom:0;display:inline-block;background-color:var(--moonbase-background-color, white);box-shadow:#64646f33 0 8px 32px;transition-property:all}#moonbase .moonbase\\:cart-modal-content[data-transition~=enter]{transition-timing-function:ease-out;transition-duration:.3s}#moonbase .moonbase\\:cart-modal-content[data-transition~=enter-from]{opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-content[data-transition~=enter-from]{transform:translate(48px)}}#moonbase .moonbase\\:cart-modal-content[data-transition~=enter-to]{opacity:1;transform:translateY(0)}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-content[data-transition~=enter-to]{transform:translate(0)}}#moonbase .moonbase\\:cart-modal-content[data-transition~=leave]{transition-timing-function:ease-in;transition-duration:.3s}#moonbase .moonbase\\:cart-modal-content[data-transition~=leave-from]{opacity:1;transform:translateY(0)}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-content[data-transition~=leave-from]{transform:translate(0)}}#moonbase .moonbase\\:cart-modal-content[data-transition~=leave-to]{opacity:0;transform:translateY(16px)}@media (min-width: 640px){#moonbase .moonbase\\:cart-modal-content[data-transition~=leave-to]{transform:translate(48px)}}#moonbase .moonbase\\:button{position:relative;display:flex;justify-content:center;overflow:hidden;transition-property:color,background-color,border-color,box-shadow;transition-timing-function:ease-in-out;transition-duration:.2s;box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:button[data-variant=secondary]{--moonbase-button-background-color: rgb(107 114 128);--moonbase-button-text-color: white}#moonbase .moonbase\\:button,#moonbase .moonbase\\:button:hover,#moonbase .moonbase\\:button:focus,#moonbase .moonbase\\:button:active{font-size:.875rem;font-weight:500;line-height:1.25rem;border-radius:var(--moonbase-button-border-radius);border-width:1px;border-color:transparent;border-style:solid;color:var(--moonbase-button-text-color);background-color:var(--moonbase-button-background-color);padding:var(--moonbase-button-padding);height:unset;width:unset}#moonbase .moonbase\\:button:hover{background-color:hsl(from var(--moonbase-button-background-color) h s calc(l - 5))}#moonbase .moonbase\\:button:focus{transition-duration:.1s;outline:2px solid transparent;outline-offset:2px;box-shadow:#fff 0 0 0 2px,var(--moonbase-button-background-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:button[data-success]{background-color:var(--moonbase-button-success-color)}#moonbase .moonbase\\:button[data-error]{background-color:var(--moonbase-button-error-color)}#moonbase .moonbase\\:button div{margin-left:-12px;margin-right:12px;height:20px;width:0px;opacity:0;transition-property:opacity,width;transition-duration:.2s;transition-timing-function:ease-in-out}#moonbase .moonbase\\:button div[data-visible]{width:20px;opacity:1}#moonbase .moonbase\\:button div svg{height:20px;width:20px}#moonbase .moonbase\\:cart{display:inline-block;color:var(--moonbase-text-color, black);padding:32px}@media (min-width: 640px){#moonbase .moonbase\\:cart{width:100vw;max-width:26rem}}#moonbase .moonbase\\:cart>h3{font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;margin-bottom:1.5rem}#moonbase .moonbase\\:cart>.moonbase\\:cart-items{font-size:14px;line-height:20px;font-weight:500}#moonbase .moonbase\\:cart>.moonbase\\:cart-items>:not(:first-child){border-top-width:1px;border-color:#00000026}#moonbase .moonbase\\:cart>.moonbase\\:cart-items>li{padding:24px 0}#moonbase .moonbase\\:cart>.moonbase\\:cart-items>li>:not(:first-child){margin-left:16px}#moonbase .moonbase\\:cart>.moonbase\\:cart-empty{padding:32px 0;font-size:1.1rem;line-height:1.3rem;font-weight:500}#moonbase .moonbase\\:cart>.moonbase\\:cart-total{width:100%;margin-top:16px;padding:8px;border-radius:4px;background:#0000001a;display:grid;grid-template-columns:repeat(2,1fr);justify-content:space-between}#moonbase .moonbase\\:cart>.moonbase\\:cart-total>label{font-weight:500}#moonbase .moonbase\\:cart>.moonbase\\:cart-total>span{font-weight:600;text-align:right}#moonbase .moonbase\\:cart>.moonbase\\:cart-total>p{grid-column:-1 / 1;padding-top:8px;text-align:center}#moonbase .moonbase\\:cart>button{--moonbase-button-padding: 12px 32px;margin:32px auto 16px;min-width:164px}#moonbase .moonbase\\:account{padding-bottom:32px}#moonbase .moonbase\\:account>*:not(:last-child){margin-bottom:16px}#moonbase .moonbase\\:account form{margin:auto;max-width:420px}#moonbase .moonbase\\:account form>*:not(:first-child){margin-top:8px}#moonbase .moonbase\\:account form .moonbase\\:error{font-size:14px;line-height:20px;font-weight:600;color:var(--moonbase-error-color)}#moonbase .moonbase\\:account form .moonbase\\:notification{font-size:14px;line-height:20px;font-weight:600}#moonbase .moonbase\\:account>button{margin:32px auto 0}#moonbase .moonbase\\:product-downloads{display:flex;border-radius:var(--moonbase-border-radius);box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:product-downloads button{position:relative;display:inline-flex;align-items:center;transition-property:color,background-color,border-color,box-shadow;transition-timing-function:ease-in-out;transition-duration:.2s;box-shadow:0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:product-downloads button,#moonbase .moonbase\\:product-downloads button:hover,#moonbase .moonbase\\:product-downloads button:focus,#moonbase .moonbase\\:product-downloads button:active{font-size:.875rem;font-weight:500;line-height:1.25rem;border-radius:0;border-width:1px;border-color:transparent;border-style:solid;color:var(--moonbase-button-text-color);background-color:var(--moonbase-button-background-color);margin:0 -1px;padding:8px;height:unset;width:unset}#moonbase .moonbase\\:product-downloads button:hover{background-color:hsl(from var(--moonbase-button-background-color) h s calc(l - 5))}#moonbase .moonbase\\:product-downloads button:focus{transition-duration:.1s;outline:2px solid transparent;outline-offset:2px;box-shadow:inset #fff 0 0 0 2px,inset var(--moonbase-button-background-color) 0 0 0 4px,0 1px 2px 0 var(--moonbase-button-shadow-color)}#moonbase .moonbase\\:product-downloads>button{border-radius:0}#moonbase .moonbase\\:product-downloads>button:first-child{border-top-left-radius:var(--moonbase-border-radius);border-bottom-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads>button[data-last]{border-top-right-radius:var(--moonbase-border-radius);border-bottom-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group{position:relative;margin:0 -1px;display:block}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group:first-child>button{border-top-left-radius:var(--moonbase-border-radius);border-bottom-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group[data-last]>button{border-top-right-radius:var(--moonbase-border-radius);border-bottom-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-group button>:last-child{margin-left:8px}#moonbase .moonbase\\:product-downloads svg{height:20px;width:20px;color:#fff}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list{position:absolute;display:flex;flex-direction:column;right:0;margin-right:-4px;margin-top:8px;width:128px;transform-origin:top right;background-color:var(--moonbase-background-color);box-shadow:#0000001a 0 10px 15px -3px,#0000001a 0 4px 6px -4px,#00000040 0 0 0 1px;z-index:999999;border-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list:focus{outline:none}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button{border-radius:0}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:first-child{border-top-right-radius:var(--moonbase-border-radius);border-top-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:last-child{border-bottom-right-radius:var(--moonbase-border-radius);border-bottom-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:hover,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:focus,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:active{color:var(--moonbase-text-color);background-color:transparent;margin:0;padding:8px;height:unset;width:unset}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:hover,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:focus,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button[data-active]{background-color:hsl(from var(--moonbase-background-color) h s calc(l - 5))}#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button:focus,#moonbase .moonbase\\:product-downloads .moonbase\\:product-downloads-list button[data-active]{box-shadow:none}#moonbase .moonbase\\:product-activations{position:absolute;right:8px;margin-top:8px;transform-origin:top right;background-color:var(--moonbase-background-color);box-shadow:#0000001a 0 10px 15px -3px,#0000001a 0 4px 6px -4px,#00000040 0 0 0 1px;z-index:999999;border-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>thead{border-bottom:1px solid rgb(from var(--moonbase-text-color) r g b / .25)}#moonbase .moonbase\\:product-activations>thead>tr>th{white-space:nowrap;font-size:14px;font-weight:600;line-height:20px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10))}#moonbase .moonbase\\:product-activations>thead>tr>th:first-child{width:100%;padding:8px 12px 8px 16px;border-top-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>thead>tr>th:not(:first-child,:last-child){text-align:center;padding:8px 12px}#moonbase .moonbase\\:product-activations>thead>tr>th:last-child{text-align:right;padding:8px 16px 8px 12px;border-top-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>tbody>:not(:first-child){border-top-width:1px;border-color:#0000001a}#moonbase .moonbase\\:product-activations>tbody>tr>td{white-space:nowrap;text-overflow:ellipsis;position:relative;font-size:14px;font-weight:600;line-height:20px}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child{width:100%;padding:8px 12px 8px 16px;border-top-left-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>svg{height:16px;width:16px;display:inline;margin-right:8px}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div{display:flex;align-items:center}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color, rgb(30 64 175))}#moonbase .moonbase\\:product-activations>tbody>tr>td:first-child>div>span{margin-left:8px;font-size:14px;font-weight:500;line-height:20px}#moonbase .moonbase\\:product-activations>tbody>tr>td:not(:first-child,:last-child){text-align:center;padding:14px 12px}#moonbase .moonbase\\:product-activations>tbody>tr>td:last-child{text-align:right;padding:14px 16px 14px 12px;border-top-right-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:product-activations>tbody>tr>td:last-child>div{display:flex;align-items:center;justify-content:flex-end}#moonbase .moonbase\\:product-activations>tbody>tr>td:last-child>div>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:product-activations>tbody>tr>td>button{margin:auto}#moonbase .moonbase\\:product-activations>tbody>tr>td>button,#moonbase .moonbase\\:product-activations>tbody>tr>td>button:hover,#moonbase .moonbase\\:product-activations>tbody>tr>td>button:focus,#moonbase .moonbase\\:product-activations>tbody>tr>td>button:active{width:100%}#moonbase .moonbase\\:products{min-width:calc(100% + 128px);margin:0 -64px}#moonbase .moonbase\\:products>thead{border-bottom:1px solid rgb(from var(--moonbase-text-color) r g b / .25)}#moonbase .moonbase\\:products>thead>tr>th{white-space:nowrap;font-size:14px;font-weight:600;line-height:20px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10))}#moonbase .moonbase\\:products>thead>tr>th:first-child{width:100%;padding:14px 12px 14px 16px}#moonbase .moonbase\\:products>thead>tr>th:not(:first-child,:last-child){text-align:center;padding:14px 12px}#moonbase .moonbase\\:products>thead>tr>th:last-child{text-align:right;padding:14px 16px 14px 12px}#moonbase .moonbase\\:products>tbody>:not(:first-child){border-top-width:1px;border-color:#0000001a}#moonbase .moonbase\\:products>tbody>tr>td{white-space:nowrap;text-overflow:ellipsis;position:relative}#moonbase .moonbase\\:products>tbody>tr>td:first-child{width:100%;padding:14px 12px 14px 16px}#moonbase .moonbase\\:products>tbody>tr>td:first-child>svg{height:16px;width:16px;display:inline;margin-right:8px}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div{display:flex;align-items:center}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:products>tbody>tr>td:first-child>div>span{margin-left:8px;font-size:14px;font-weight:500;line-height:20px}#moonbase .moonbase\\:products>tbody>tr>td:not(:first-child,:last-child){text-align:center;padding:14px 12px}#moonbase .moonbase\\:products>tbody>tr>td:last-child{text-align:right;padding:14px 16px 14px 12px}#moonbase .moonbase\\:products>tbody>tr>td:last-child>div{display:flex;align-items:center;justify-content:flex-end}#moonbase .moonbase\\:products>tbody>tr>td:last-child>div>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:products>tbody>tr>td>button{margin:auto}#moonbase .moonbase\\:products>tbody>tr>td>button,#moonbase .moonbase\\:products>tbody>tr>td>button:hover,#moonbase .moonbase\\:products>tbody>tr>td>button:focus,#moonbase .moonbase\\:products>tbody>tr>td>button:active{width:100%}#moonbase .moonbase\\:redeem>form{display:flex;flex-direction:column;max-width:240px;margin:64px auto 32px}#moonbase .moonbase\\:redeem>form>*:not(:first-child){margin-top:16px}#moonbase .moonbase\\:redeem>form>button{margin:auto}#moonbase .moonbase\\:redeem>form .moonbase\\:error{text-align:center;color:var(--moonbase-error-color, rgb(167, 33, 33));font-weight:600;font-size:14px;line-height:16px;min-height:16px;opacity:0;transition:opacity .2s ease-in}#moonbase .moonbase\\:redeem>form .moonbase\\:error[data-visible]{transition:opacity .3s ease-in;opacity:1}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher{max-width:320px;margin:16px auto;padding:16px;box-shadow:0 0 0 2px var(--moonbase-button-shadow-color);border-radius:var(--moonbase-border-radius)}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-products>*:not(:first-child){border-top:1px solid rgb(from var(--moonbase-text-color) r g b / .3)}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle{display:flex;align-items:center;padding:8px 0}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>*:not(:first-child),#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>*:not(:first-child){margin-left:12px}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:first-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:first-child{flex-shrink:0}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:first-child>img,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:first-child>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:first-child>.moonbase\\:image-placeholder,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:first-child>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:last-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:last-child{flex:1;min-width:0}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:last-child>:first-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:last-child>:first-child{font-size:14px;font-weight:500;line-height:20px}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-product>:last-child>:last-child,#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle>:last-child>:last-child{font-size:14px;line-height:20px;text-overflow:ellipsis}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle-products{padding-left:32px}#moonbase .moonbase\\:redeem .moonbase\\:redeem-voucher-bundle-products>*:not(:first-child){border-top:1px solid rgb(from var(--moonbase-text-color) r g b / .3)}#moonbase .moonbase\\:customer{display:inline-block;color:var(--moonbase-text-color);padding:32px 64px 16px}@media (min-width: 640px){#moonbase .moonbase\\:customer{width:100vw;max-width:32rem}}#moonbase .moonbase\\:customer>[role=tablist]{margin:0 -32px 16px;padding:0 32px;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(from var(--moonbase-button-background-color) r g b / .25);display:flex}#moonbase .moonbase\\:customer>[role=tablist]>[role=tab]{margin-bottom:-1px;width:33%;padding:8px 4px;text-align:center;font-size:14px;font-weight:500;line-height:20px;border-bottom-width:2px;border-bottom-style:solid;border-bottom-color:transparent;color:hsl(from var(--moonbase-text-color) h s calc(l + 15));transition-property:border-bottom-color,color;transition-duration:.25s;transition-timing-function:ease-out}#moonbase .moonbase\\:customer>[role=tablist]>[role=tab]:hover{color:hsl(from var(--moonbase-text-color) h s calc(l + 5));border-bottom-color:hsl(from var(--moonbase-text-color) h s calc(l + 15))}#moonbase .moonbase\\:customer>[role=tablist]>[role=tab][aria-selected=true]{color:hsl(from var(--moonbase-primary-color) h s calc(l - 15));border-bottom-color:hsl(from var(--moonbase-primary-color) h s calc(l - 10))}#moonbase .moonbase\\:auto-activate .moonbase\\:loader{display:flex;align-items:center;flex-direction:column;padding:36px 16px;text-align:center}#moonbase .moonbase\\:auto-activate .moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:auto-activate .moonbase\\:loader h3{color:var(--moonbase-text-color);font-size:18px;font-weight:500;line-height:24px}#moonbase .moonbase\\:auto-activate .moonbase\\:loader p{margin-top:4px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product{display:flex;align-items:center}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product div{margin-left:8px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product div h2{color:var(--moonbase-text-color);font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-product div h3{margin-top:2px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-content{margin-top:16px;text-align:center;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-content .moonbase\\:auto-activate-cta{margin:16px auto 0;display:flex;justify-content:center;text-align:center}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-content .moonbase\\:auto-activate-cta>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:auto-activate .moonbase\\:auto-activate-content .moonbase\\:auto-activate-trial{margin-top:16px;padding-top:16px;border-top-width:1px;border-color:rgb(from var(--moonbase-text-color) r g b / .2);border-style:solid}#moonbase .moonbase\\:activation{display:inline-block;color:var(--moonbase-text-color, black);padding:32px 64px}@media (min-width: 640px){#moonbase .moonbase\\:activation{width:100vw;max-width:26rem}}#moonbase .moonbase\\:activation>h3{font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;margin-bottom:1.5rem}#moonbase .moonbase\\:download-product .moonbase\\:loader{display:flex;align-items:center;flex-direction:column;padding:36px 16px;text-align:center}#moonbase .moonbase\\:download-product .moonbase\\:loader svg{height:24px;width:24px}#moonbase .moonbase\\:download-product .moonbase\\:loader h3{color:var(--moonbase-text-color);font-size:18px;font-weight:500;line-height:24px}#moonbase .moonbase\\:download-product .moonbase\\:loader p{margin-top:4px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product{display:flex;align-items:center}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product>img{height:42px;width:42px;flex:none;border-radius:6px;object-fit:cover;object-position:center}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product>.moonbase\\:image-placeholder{height:42px;width:42px;flex:none;border-radius:6px;background:var(--moonbase-primary-color)}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div{margin-left:8px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div h2{color:var(--moonbase-text-color);font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div h2 span{opacity:.75;font-size:14px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-product div h3{margin-top:2px;color:hsl(from var(--moonbase-text-color) h s calc(l + 10));font-size:14px;font-weight:500;line-height:18px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content{margin-top:16px;text-align:left;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 10));font-size:16px;font-weight:500;line-height:20px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content>:not(:first-child){margin-top:16px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-cta{margin:16px auto 0;display:flex;justify-content:center;text-align:center}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content .moonbase\\:download-product-cta>:not(:first-child){margin-left:8px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul{border-radius:6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul>:not(:first-child){border-top:1px solid rgb(from var(--moonbase-text-color) r g b / .25)}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li{position:relative;display:flex;justify-content:space-between;transition:background-color .25s ease-in-out;padding:12px 16px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li:hover{background-color:#0000001a}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li:first-child{border-top-left-radius:6px;border-top-right-radius:6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>:not(:first-child){margin-left:20px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child{min-width:0}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-name{font-weight:600;line-height:24px;font-size:14px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-description{display:flex;align-items:center;line-height:24px;font-size:14px;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 20))}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-description svg{height:16px;width:16px;margin-right:6px;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 20))}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:first-child .moonbase\\:download-product-download-description span{opacity:.5;margin:0 6px}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:last-child{display:flex;align-items:center;flex-shrink:0}#moonbase .moonbase\\:download-product .moonbase\\:download-product-content ul li>div:last-child svg{flex:none;height:20px;width:20px;color:hsl(from var(--moonbase-text-color) h calc(s - 25) calc(l + 20))}#moonbase .moonbase\\:download-product .moonbase\\:download-product-clicker{position:absolute;top:0;right:0;left:0;padding:-1px 0;bottom:0}#moonbase .moonbase\\:download{display:inline-block;color:var(--moonbase-text-color, black);padding:32px 64px}@media (min-width: 640px){#moonbase .moonbase\\:download{width:100vw;max-width:26rem}}#moonbase .moonbase\\:download>h3{font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;margin-bottom:1.5rem}#moonbase,#moonbase *:not(svg,path),#moonbase :before,#moonbase :after{all:revert;box-sizing:border-box;border-width:0;border-style:solid}#moonbase *:not(svg,path){margin:0;padding:0;font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}#moonbase{--moonbase-text-color: rgb(17 24 39);--moonbase-primary-color: rgb(79 70 229);--moonbase-error-color: rgb(167, 33, 33);--moonbase-background-color: white;--moonbase-button-padding: 8px 32px;--moonbase-button-text-color: rgb(255 255 255);--moonbase-button-background-color: var(--moonbase-primary-color);--moonbase-button-shadow-color: rgb(0 0 0 / .05);--moonbase-button-success-color: rgb(22 163 74);--moonbase-button-error-color: rgb(167, 33, 33);--moonbase-button-border-radius: var(--moonbase-border-radius, 6px);--moonbase-input-active-color: var(--moonbase-primary-color, var(--moonbase-primary-color));--moonbase-input-shadow-color: rgb(0 0 0 / .05);--moonbase-input-error-color: rgb(167, 33, 33);--moonbase-input-background-color: transparent;--moonbase-input-text-color:var(--moonbase-text-color);--moonbase-input-border-radius: var(--moonbase-border-radius, 6px);--moonbase-modal-padding: 8px 32px;--moonbase-modal-text-color: var(--moonbase-text-color);--moonbase-modal-background-color: rgb(255 255 255);--moonbase-modal-shadow-color: rgb(0 0 0 / .05);--moonbase-modal-border-radius: var(--moonbase-border-radius, 6px)}#moonbase .moonbase\\:scale-enter-active{transition-property:transform,opacity;transition-timing-function:ease-out;transition-duration:.2s}#moonbase .moonbase\\:scale-enter-from{opacity:0;transform:scale(.95)}#moonbase .moonbase\\:scale-enter-to{opacity:1;transform:scale(1)}#moonbase .moonbase\\:scale-leave-active{transition-property:transform,opacity;transition-timing-function:ease-in;transition-duration:.15s}#moonbase .moonbase\\:scale-leave-from{opacity:1;transform:scale(1)}#moonbase .moonbase\\:scale-leave-to{opacity:0;transform:scale(.95)}#moonbase .moonbase\\:slide-left-enter-active{transition-property:transform,opacity;transition-timing-function:ease-out;transition-duration:.2s}#moonbase .moonbase\\:slide-left-enter-from{opacity:0;transform:translate(1rem)}#moonbase .moonbase\\:slide-left-enter-to{opacity:1;transform:translate(0)}#moonbase .moonbase\\:slide-left-leave-active{transition-property:transform,opacity;transition-timing-function:ease-in;transition-duration:.15s}#moonbase .moonbase\\:slide-left-leave-from{opacity:1;transform:translate(0)}#moonbase .moonbase\\:slide-left-leave-to{opacity:0;transform:translate(-1rem)}#moonbase .moonbase\\:sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#moonbase a{color:inherit;text-decoration:inherit}#moonbase input,#moonbase button,#moonbase textarea,#moonbase select{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;letter-spacing:inherit;background:none;font-size:100%;line-height:1.15;margin:0;padding:0;color:inherit}#moonbase button,#moonbase select{text-transform:none}#moonbase button,#moonbase [role=button]{cursor:pointer}#moonbase button,#moonbase [type=button],#moonbase [type=reset],#moonbase [type=submit]{-webkit-appearance:button}#moonbase h1,#moonbase h2,#moonbase h3,#moonbase h4,#moonbase h5,#moonbase h6{font-size:inherit;font-weight:inherit}#moonbase b,#moonbase strong{font-weight:bolder}#moonbase svg,.moonbase svg *{color:inherit}#moonbase table{text-indent:0;border-color:inherit;border-collapse:collapse}#moonbase img,#moonbase svg,#moonbase video,#moonbase canvas,#moonbase audio,#moonbase iframe,#moonbase embed,#moonbase object{display:block;vertical-align:middle}#moonbase ol,#moonbase ul,#moonbase menu{list-style:none;margin:0;padding:0}#moonbase img,#moonbase video{max-width:100%;height:auto}#moonbase :disabled{cursor:default}#moonbase [hidden]{display:none}#moonbase ::-moz-focus-inner{border-style:none;padding:0}#moonbase :-moz-focusring{outline:none}#moonbase :-moz-ui-invalid{box-shadow:none}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  (function(kt,be){typeof exports=="object"&&typeof module<"u"?be(exports):typeof define=="function"&&define.amd?define(["exports"],be):(kt=typeof globalThis<"u"?globalThis:kt||self,be(kt.Moonbase={}))})(this,function(kt){"use strict";var Ew=Object.defineProperty;var Ow=(kt,be,Tn)=>be in kt?Ew(kt,be,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):kt[be]=Tn;var Tr=(kt,be,Tn)=>Ow(kt,typeof be!="symbol"?be+"":be,Tn);var be;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(be||(be={}));var Tn;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Tn||(Tn={}));const ne=be.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Cn=e=>{switch(typeof e){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(e)?ne.array:e===null?ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ne.promise:typeof Map<"u"&&e instanceof Map?ne.map:typeof Set<"u"&&e instanceof Set?ne.set:typeof Date<"u"&&e instanceof Date?ne.date:ne.object;default:return ne.unknown}},B=be.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),$f=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Tt extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const u=i.path[l];l===i.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(i))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return o(this),r}static assert(t){if(!(t instanceof Tt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,be.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Tt.create=e=>new Tt(e);const Cr=(e,t)=>{let n;switch(e.code){case B.invalid_type:e.received===ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case B.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,be.jsonStringifyReplacer)}`;break;case B.unrecognized_keys:n=`Unrecognized key(s) in object: ${be.joinValues(e.keys,", ")}`;break;case B.invalid_union:n="Invalid input";break;case B.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${be.joinValues(e.options)}`;break;case B.invalid_enum_value:n=`Invalid enum value. Expected ${be.joinValues(e.options)}, received '${e.received}'`;break;case B.invalid_arguments:n="Invalid function arguments";break;case B.invalid_return_type:n="Invalid function return type";break;case B.invalid_date:n="Invalid date";break;case B.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:be.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case B.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case B.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case B.custom:n="Invalid input";break;case B.invalid_intersection_types:n="Intersection results could not be merged";break;case B.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case B.not_finite:n="Number must be finite";break;default:n=t.defaultError,be.assertNever(e)}return{message:n}};let vl=Cr;function If(e){vl=e}function os(){return vl}const ss=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},Af=[];function ee(e,t){const n=os(),r=ss({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Cr?void 0:Cr].filter(o=>!!o)});e.common.issues.push(r)}class ut{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return ve;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return ut.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return ve;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const ve=Object.freeze({status:"aborted"}),Pr=e=>({status:"dirty",value:e}),vt=e=>({status:"valid",value:e}),wi=e=>e.status==="aborted",Ei=e=>e.status==="dirty",Jr=e=>e.status==="valid",Yr=e=>typeof Promise<"u"&&e instanceof Promise;function is(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function gl(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var se;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(se||(se={}));var Xr,Qr;class Kt{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const yl=(e,t)=>{if(Jr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Tt(e.common.issues);return this._error=n,this._error}}};function Ee(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,u;const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:(l=c??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=c??n)!==null&&u!==void 0?u:a.defaultError}},description:o}}class Oe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Cn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Cn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ut,ctx:{common:t.parent.common,data:t.data,parsedType:Cn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Yr(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Cn(t)},s=this._parseSync({data:t,path:o.path,parent:o});return yl(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Cn(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Yr(o)?o:Promise.resolve(o));return yl(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:B.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Ft({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Jt.create(this,this._def)}nullable(){return In.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ut.create(this,this._def)}promise(){return Ar.create(this,this._def)}or(t){return ro.create([this,t],this._def)}and(t){return oo.create(this,t,this._def)}transform(t){return new Ft({...Ee(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new uo({...Ee(this._def),innerType:this,defaultValue:n,typeName:pe.ZodDefault})}brand(){return new Si({typeName:pe.ZodBranded,type:this,...Ee(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new co({...Ee(this._def),innerType:this,catchValue:n,typeName:pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return fo.create(this,t)}readonly(){return po.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Vf=/^c[^\s-]{8,}$/i,Rf=/^[0-9a-z]+$/,jf=/^[0-9A-HJKMNP-TV-Z]{26}$/,Lf=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Mf=/^[a-z0-9_-]{21}$/i,Uf=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ff=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Bf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Oi;const Hf=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Zf=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,qf=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bl="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Wf=new RegExp(`^${bl}$`);function _l(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function zf(e){return new RegExp(`^${_l(e)}$`)}function wl(e){let t=`${bl}T${_l(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Kf(e,t){return!!((t==="v4"||!t)&&Hf.test(e)||(t==="v6"||!t)&&Zf.test(e))}class Mt extends Oe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.string,received:s.parsedType}),ve}const r=new ut;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?ee(o,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&ee(o,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")Ff.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"email",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Oi||(Oi=new RegExp(Bf,"u")),Oi.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"emoji",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")Lf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"uuid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")Mf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"nanoid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")Vf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")Rf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid2",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")jf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ulid",code:B.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ee(o,{validation:"url",code:B.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"regex",code:B.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?wl(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?Wf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?zf(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:B.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?Uf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"duration",code:B.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Kf(t.data,s.version)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ip",code:B.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?qf.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"base64",code:B.invalid_string,message:s.message}),r.dirty()):be.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:B.invalid_string,...se.errToObj(r)})}_addCheck(t){return new Mt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...se.errToObj(t)})}url(t){return this._addCheck({kind:"url",...se.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...se.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...se.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...se.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...se.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...se.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...se.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...se.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...se.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...se.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...se.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...se.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...se.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...se.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...se.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...se.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...se.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...se.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...se.errToObj(n)})}nonempty(t){return this.min(1,se.errToObj(t))}trim(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Mt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Mt.create=e=>{var t;return new Mt({checks:[],typeName:pe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};function Gf(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Pn extends Oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ne.number){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.number,received:s.parsedType}),ve}let r;const o=new ut;for(const s of this._def.checks)s.kind==="int"?be.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:B.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Gf(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_finite,message:s.message}),o.dirty()):be.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,se.toString(n))}setLimit(t,n,r,o){return new Pn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new Pn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:se.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:se.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:se.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:se.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&be.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Pn.create=e=>new Pn({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Dn extends Oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ne.bigint){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.bigint,received:s.parsedType}),ve}let r;const o=new ut;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):be.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,se.toString(n))}gt(t,n){return this.setLimit("min",t,!1,se.toString(n))}lte(t,n){return this.setLimit("max",t,!0,se.toString(n))}lt(t,n){return this.setLimit("max",t,!1,se.toString(n))}setLimit(t,n,r,o){return new Dn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:se.toString(o)}]})}_addCheck(t){return new Dn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:se.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:se.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Dn.create=e=>{var t;return new Dn({checks:[],typeName:pe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};class eo extends Oe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ne.boolean){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.boolean,received:r.parsedType}),ve}return vt(t.data)}}eo.create=e=>new eo({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class rr extends Oe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_type,expected:ne.date,received:s.parsedType}),ve}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return ee(s,{code:B.invalid_date}),ve}const r=new ut;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:B.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):be.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new rr({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:se.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:se.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}rr.create=e=>new rr({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,...Ee(e)});class as extends Oe{_parse(t){if(this._getType(t)!==ne.symbol){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.symbol,received:r.parsedType}),ve}return vt(t.data)}}as.create=e=>new as({typeName:pe.ZodSymbol,...Ee(e)});class to extends Oe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.undefined,received:r.parsedType}),ve}return vt(t.data)}}to.create=e=>new to({typeName:pe.ZodUndefined,...Ee(e)});class no extends Oe{_parse(t){if(this._getType(t)!==ne.null){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.null,received:r.parsedType}),ve}return vt(t.data)}}no.create=e=>new no({typeName:pe.ZodNull,...Ee(e)});class Dr extends Oe{constructor(){super(...arguments),this._any=!0}_parse(t){return vt(t.data)}}Dr.create=e=>new Dr({typeName:pe.ZodAny,...Ee(e)});class or extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return vt(t.data)}}or.create=e=>new or({typeName:pe.ZodUnknown,...Ee(e)});class fn extends Oe{_parse(t){const n=this._getOrReturnCtx(t);return ee(n,{code:B.invalid_type,expected:ne.never,received:n.parsedType}),ve}}fn.create=e=>new fn({typeName:pe.ZodNever,...Ee(e)});class ls extends Oe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.void,received:r.parsedType}),ve}return vt(t.data)}}ls.create=e=>new ls({typeName:pe.ZodVoid,...Ee(e)});class Ut extends Oe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ne.array)return ee(n,{code:B.invalid_type,expected:ne.array,received:n.parsedType}),ve;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(ee(n,{code:i?B.too_big:B.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ee(n,{code:B.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ee(n,{code:B.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Kt(n,i,n.path,a)))).then(i=>ut.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Kt(n,i,n.path,a)));return ut.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Ut({...this._def,minLength:{value:t,message:se.toString(n)}})}max(t,n){return new Ut({...this._def,maxLength:{value:t,message:se.toString(n)}})}length(t,n){return new Ut({...this._def,exactLength:{value:t,message:se.toString(n)}})}nonempty(t){return this.min(1,t)}}Ut.create=(e,t)=>new Ut({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...Ee(t)});function $r(e){if(e instanceof ze){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Jt.create($r(r))}return new ze({...e._def,shape:()=>t})}else return e instanceof Ut?new Ut({...e._def,type:$r(e.element)}):e instanceof Jt?Jt.create($r(e.unwrap())):e instanceof In?In.create($r(e.unwrap())):e instanceof Gt?Gt.create(e.items.map(t=>$r(t))):e}class ze extends Oe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=be.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ne.object){const u=this._getOrReturnCtx(t);return ee(u,{code:B.invalid_type,expected:ne.object,received:u.parsedType}),ve}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof fn&&this._def.unknownKeys==="strip"))for(const u in o.data)i.includes(u)||a.push(u);const l=[];for(const u of i){const c=s[u],d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Kt(o,d,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof fn){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(u==="strict")a.length>0&&(ee(o,{code:B.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Kt(o,d,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>ut.mergeObjectSync(r,u)):ut.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return se.errToObj,new ze({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=se.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ze({...this._def,unknownKeys:"strip"})}passthrough(){return new ze({...this._def,unknownKeys:"passthrough"})}extend(t){return new ze({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ze({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ze({...this._def,catchall:t})}pick(t){const n={};return be.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ze({...this._def,shape:()=>n})}omit(t){const n={};return be.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ze({...this._def,shape:()=>n})}deepPartial(){return $r(this)}partial(t){const n={};return be.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new ze({...this._def,shape:()=>n})}required(t){const n={};return be.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Jt;)s=s._def.innerType;n[r]=s}}),new ze({...this._def,shape:()=>n})}keyof(){return El(be.objectKeys(this.shape))}}ze.create=(e,t)=>new ze({shape:()=>e,unknownKeys:"strip",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.strictCreate=(e,t)=>new ze({shape:()=>e,unknownKeys:"strict",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)}),ze.lazycreate=(e,t)=>new ze({shape:e,unknownKeys:"strip",catchall:fn.create(),typeName:pe.ZodObject,...Ee(t)});class ro extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new Tt(a.ctx.common.issues));return ee(n,{code:B.invalid_union,unionErrors:i}),ve}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new Tt(l));return ee(n,{code:B.invalid_union,unionErrors:a}),ve}}get options(){return this._def.options}}ro.create=(e,t)=>new ro({options:e,typeName:pe.ZodUnion,...Ee(t)});const pn=e=>e instanceof io?pn(e.schema):e instanceof Ft?pn(e.innerType()):e instanceof ao?[e.value]:e instanceof $n?e.options:e instanceof lo?be.objectValues(e.enum):e instanceof uo?pn(e._def.innerType):e instanceof to?[void 0]:e instanceof no?[null]:e instanceof Jt?[void 0,...pn(e.unwrap())]:e instanceof In?[null,...pn(e.unwrap())]:e instanceof Si||e instanceof po?pn(e.unwrap()):e instanceof co?pn(e._def.innerType):[];class us extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.object)return ee(n,{code:B.invalid_type,expected:ne.object,received:n.parsedType}),ve;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ee(n,{code:B.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=pn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new us({typeName:pe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ee(r)})}}function Ni(e,t){const n=Cn(e),r=Cn(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){const o=be.objectKeys(t),s=be.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Ni(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=Ni(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ne.date&&r===ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class oo extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(wi(s)||wi(i))return ve;const a=Ni(s.value,i.value);return a.valid?((Ei(s)||Ei(i))&&n.dirty(),{status:n.value,value:a.data}):(ee(r,{code:B.invalid_intersection_types}),ve)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}oo.create=(e,t,n)=>new oo({left:e,right:t,typeName:pe.ZodIntersection,...Ee(n)});class Gt extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.array)return ee(r,{code:B.invalid_type,expected:ne.array,received:r.parsedType}),ve;if(r.data.length<this._def.items.length)return ee(r,{code:B.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&r.data.length>this._def.items.length&&(ee(r,{code:B.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Kt(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>ut.mergeArray(n,i)):ut.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Gt({...this._def,rest:t})}}Gt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gt({items:e,typeName:pe.ZodTuple,rest:null,...Ee(t)})};class so extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.object)return ee(r,{code:B.invalid_type,expected:ne.object,received:r.parsedType}),ve;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Kt(r,a,r.path,a)),value:i._parse(new Kt(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ut.mergeObjectAsync(n,o):ut.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Oe?new so({keyType:t,valueType:n,typeName:pe.ZodRecord,...Ee(r)}):new so({keyType:Mt.create(),valueType:t,typeName:pe.ZodRecord,...Ee(n)})}}class cs extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.map)return ee(r,{code:B.invalid_type,expected:ne.map,received:r.parsedType}),ve;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],u)=>({key:o._parse(new Kt(r,a,r.path,[u,"key"])),value:s._parse(new Kt(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return ve;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return ve;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}cs.create=(e,t,n)=>new cs({valueType:t,keyType:e,typeName:pe.ZodMap,...Ee(n)});class sr extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.set)return ee(r,{code:B.invalid_type,expected:ne.set,received:r.parsedType}),ve;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ee(r,{code:B.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ee(r,{code:B.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const u=new Set;for(const c of l){if(c.status==="aborted")return ve;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>s._parse(new Kt(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new sr({...this._def,minSize:{value:t,message:se.toString(n)}})}max(t,n){return new sr({...this._def,maxSize:{value:t,message:se.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}sr.create=(e,t)=>new sr({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,...Ee(t)});class Ir extends Oe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.function)return ee(n,{code:B.invalid_type,expected:ne.function,received:n.parsedType}),ve;function r(a,l){return ss({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,os(),Cr].filter(u=>!!u),issueData:{code:B.invalid_arguments,argumentsError:l}})}function o(a,l){return ss({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,os(),Cr].filter(u=>!!u),issueData:{code:B.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Ar){const a=this;return vt(async function(...l){const u=new Tt([]),c=await a._def.args.parseAsync(l,s).catch(m=>{throw u.addIssue(r(l,m)),u}),d=await Reflect.apply(i,this,c);return await a._def.returns._def.type.parseAsync(d,s).catch(m=>{throw u.addIssue(o(d,m)),u})})}else{const a=this;return vt(function(...l){const u=a._def.args.safeParse(l,s);if(!u.success)throw new Tt([r(l,u.error)]);const c=Reflect.apply(i,this,u.data),d=a._def.returns.safeParse(c,s);if(!d.success)throw new Tt([o(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ir({...this._def,args:Gt.create(t).rest(or.create())})}returns(t){return new Ir({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ir({args:t||Gt.create([]).rest(or.create()),returns:n||or.create(),typeName:pe.ZodFunction,...Ee(r)})}}class io extends Oe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}io.create=(e,t)=>new io({getter:e,typeName:pe.ZodLazy,...Ee(t)});class ao extends Oe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ee(n,{received:n.data,code:B.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}ao.create=(e,t)=>new ao({value:e,typeName:pe.ZodLiteral,...Ee(t)});function El(e,t){return new $n({values:e,typeName:pe.ZodEnum,...Ee(t)})}class $n extends Oe{constructor(){super(...arguments),Xr.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{expected:be.joinValues(r),received:n.parsedType,code:B.invalid_type}),ve}if(is(this,Xr)||gl(this,Xr,new Set(this._def.values)),!is(this,Xr).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{received:n.data,code:B.invalid_enum_value,options:r}),ve}return vt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return $n.create(t,{...this._def,...n})}exclude(t,n=this._def){return $n.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Xr=new WeakMap,$n.create=El;class lo extends Oe{constructor(){super(...arguments),Qr.set(this,void 0)}_parse(t){const n=be.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ne.string&&r.parsedType!==ne.number){const o=be.objectValues(n);return ee(r,{expected:be.joinValues(o),received:r.parsedType,code:B.invalid_type}),ve}if(is(this,Qr)||gl(this,Qr,new Set(be.getValidEnumValues(this._def.values))),!is(this,Qr).has(t.data)){const o=be.objectValues(n);return ee(r,{received:r.data,code:B.invalid_enum_value,options:o}),ve}return vt(t.data)}get enum(){return this._def.values}}Qr=new WeakMap,lo.create=(e,t)=>new lo({values:e,typeName:pe.ZodNativeEnum,...Ee(t)});class Ar extends Oe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.promise&&n.common.async===!1)return ee(n,{code:B.invalid_type,expected:ne.promise,received:n.parsedType}),ve;const r=n.parsedType===ne.promise?n.data:Promise.resolve(n.data);return vt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ar.create=(e,t)=>new Ar({type:e,typeName:pe.ZodPromise,...Ee(t)});class Ft extends Oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{ee(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return ve;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?ve:l.status==="dirty"||n.value==="dirty"?Pr(l.value):l});{if(n.value==="aborted")return ve;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?ve:a.status==="dirty"||n.value==="dirty"?Pr(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Jr(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Jr(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);be.assertNever(o)}}Ft.create=(e,t,n)=>new Ft({schema:e,typeName:pe.ZodEffects,effect:t,...Ee(n)}),Ft.createWithPreprocess=(e,t,n)=>new Ft({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...Ee(n)});class Jt extends Oe{_parse(t){return this._getType(t)===ne.undefined?vt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jt.create=(e,t)=>new Jt({innerType:e,typeName:pe.ZodOptional,...Ee(t)});class In extends Oe{_parse(t){return this._getType(t)===ne.null?vt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}In.create=(e,t)=>new In({innerType:e,typeName:pe.ZodNullable,...Ee(t)});class uo extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}uo.create=(e,t)=>new uo({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class co extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Yr(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Tt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}co.create=(e,t)=>new co({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});class ds extends Oe{_parse(t){if(this._getType(t)!==ne.nan){const r=this._getOrReturnCtx(t);return ee(r,{code:B.invalid_type,expected:ne.nan,received:r.parsedType}),ve}return{status:"valid",value:t.data}}}ds.create=e=>new ds({typeName:pe.ZodNaN,...Ee(e)});const Jf=Symbol("zod_brand");class Si extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class fo extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ve:s.status==="dirty"?(n.dirty(),Pr(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ve:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new fo({in:t,out:n,typeName:pe.ZodPipeline})}}class po extends Oe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Jr(o)&&(o.value=Object.freeze(o.value)),o);return Yr(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}po.create=(e,t)=>new po({innerType:e,typeName:pe.ZodReadonly,...Ee(t)});function Ol(e,t={},n){return e?Dr.create().superRefine((r,o)=>{var s,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(i=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&i!==void 0?i:!0,u=typeof a=="string"?{message:a}:a;o.addIssue({code:"custom",...u,fatal:l})}}):Dr.create()}const Yf={object:ze.lazycreate};var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const Xf=(e,t={message:`Input not instance of ${e.name}`})=>Ol(n=>n instanceof e,t),Nl=Mt.create,Sl=Pn.create,Qf=ds.create,ep=Dn.create,xl=eo.create,tp=rr.create,np=as.create,rp=to.create,op=no.create,sp=Dr.create,ip=or.create,ap=fn.create,lp=ls.create,up=Ut.create,cp=ze.create,dp=ze.strictCreate,fp=ro.create,pp=us.create,hp=oo.create,mp=Gt.create,vp=so.create,gp=cs.create,yp=sr.create,bp=Ir.create,_p=io.create,wp=ao.create,Ep=$n.create,Op=lo.create,Np=Ar.create,kl=Ft.create,Sp=Jt.create,xp=In.create,kp=Ft.createWithPreprocess,Tp=fo.create;var v=Object.freeze({__proto__:null,defaultErrorMap:Cr,setErrorMap:If,getErrorMap:os,makeIssue:ss,EMPTY_PATH:Af,addIssueToContext:ee,ParseStatus:ut,INVALID:ve,DIRTY:Pr,OK:vt,isAborted:wi,isDirty:Ei,isValid:Jr,isAsync:Yr,get util(){return be},get objectUtil(){return Tn},ZodParsedType:ne,getParsedType:Cn,ZodType:Oe,datetimeRegex:wl,ZodString:Mt,ZodNumber:Pn,ZodBigInt:Dn,ZodBoolean:eo,ZodDate:rr,ZodSymbol:as,ZodUndefined:to,ZodNull:no,ZodAny:Dr,ZodUnknown:or,ZodNever:fn,ZodVoid:ls,ZodArray:Ut,ZodObject:ze,ZodUnion:ro,ZodDiscriminatedUnion:us,ZodIntersection:oo,ZodTuple:Gt,ZodRecord:so,ZodMap:cs,ZodSet:sr,ZodFunction:Ir,ZodLazy:io,ZodLiteral:ao,ZodEnum:$n,ZodNativeEnum:lo,ZodPromise:Ar,ZodEffects:Ft,ZodTransformer:Ft,ZodOptional:Jt,ZodNullable:In,ZodDefault:uo,ZodCatch:co,ZodNaN:ds,BRAND:Jf,ZodBranded:Si,ZodPipeline:fo,ZodReadonly:po,custom:Ol,Schema:Oe,ZodSchema:Oe,late:Yf,get ZodFirstPartyTypeKind(){return pe},coerce:{string:e=>Mt.create({...e,coerce:!0}),number:e=>Pn.create({...e,coerce:!0}),boolean:e=>eo.create({...e,coerce:!0}),bigint:e=>Dn.create({...e,coerce:!0}),date:e=>rr.create({...e,coerce:!0})},any:sp,array:up,bigint:ep,boolean:xl,date:tp,discriminatedUnion:pp,effect:kl,enum:Ep,function:bp,instanceof:Xf,intersection:hp,lazy:_p,literal:wp,map:gp,nan:Qf,nativeEnum:Op,never:ap,null:op,nullable:xp,number:Sl,object:cp,oboolean:()=>xl().optional(),onumber:()=>Sl().optional(),optional:Sp,ostring:()=>Nl().optional(),pipeline:Tp,preprocess:kp,promise:Np,record:vp,set:yp,strictObject:dp,string:Nl,symbol:np,transformer:kl,tuple:mp,undefined:rp,union:fp,unknown:ip,void:lp,NEVER:ve,ZodIssueCode:B,quotelessJson:$f,ZodError:Tt}),Tl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xi={exports:{}};(function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Tl<"u"&&Tl,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(i){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof a<"u"&&a,l={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function u(E){return E&&DataView.prototype.isPrototypeOf(E)}if(l.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(E){return E&&c.indexOf(Object.prototype.toString.call(E))>-1};function f(E){if(typeof E!="string"&&(E=String(E)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(E)||E==="")throw new TypeError('Invalid character in header field name: "'+E+'"');return E.toLowerCase()}function m(E){return typeof E!="string"&&(E=String(E)),E}function b(E){var P={next:function(){var Y=E.shift();return{done:Y===void 0,value:Y}}};return l.iterable&&(P[Symbol.iterator]=function(){return P}),P}function O(E){this.map={},E instanceof O?E.forEach(function(P,Y){this.append(Y,P)},this):Array.isArray(E)?E.forEach(function(P){this.append(P[0],P[1])},this):E&&Object.getOwnPropertyNames(E).forEach(function(P){this.append(P,E[P])},this)}O.prototype.append=function(E,P){E=f(E),P=m(P);var Y=this.map[E];this.map[E]=Y?Y+", "+P:P},O.prototype.delete=function(E){delete this.map[f(E)]},O.prototype.get=function(E){return E=f(E),this.has(E)?this.map[E]:null},O.prototype.has=function(E){return this.map.hasOwnProperty(f(E))},O.prototype.set=function(E,P){this.map[f(E)]=m(P)},O.prototype.forEach=function(E,P){for(var Y in this.map)this.map.hasOwnProperty(Y)&&E.call(P,this.map[Y],Y,this)},O.prototype.keys=function(){var E=[];return this.forEach(function(P,Y){E.push(Y)}),b(E)},O.prototype.values=function(){var E=[];return this.forEach(function(P){E.push(P)}),b(E)},O.prototype.entries=function(){var E=[];return this.forEach(function(P,Y){E.push([Y,P])}),b(E)},l.iterable&&(O.prototype[Symbol.iterator]=O.prototype.entries);function w(E){if(E.bodyUsed)return Promise.reject(new TypeError("Already read"));E.bodyUsed=!0}function $(E){return new Promise(function(P,Y){E.onload=function(){P(E.result)},E.onerror=function(){Y(E.error)}})}function H(E){var P=new FileReader,Y=$(P);return P.readAsArrayBuffer(E),Y}function T(E){var P=new FileReader,Y=$(P);return P.readAsText(E),Y}function te(E){for(var P=new Uint8Array(E),Y=new Array(P.length),re=0;re<P.length;re++)Y[re]=String.fromCharCode(P[re]);return Y.join("")}function S(E){if(E.slice)return E.slice(0);var P=new Uint8Array(E.byteLength);return P.set(new Uint8Array(E)),P.buffer}function U(){return this.bodyUsed=!1,this._initBody=function(E){this.bodyUsed=this.bodyUsed,this._bodyInit=E,E?typeof E=="string"?this._bodyText=E:l.blob&&Blob.prototype.isPrototypeOf(E)?this._bodyBlob=E:l.formData&&FormData.prototype.isPrototypeOf(E)?this._bodyFormData=E:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(E)?this._bodyText=E.toString():l.arrayBuffer&&l.blob&&u(E)?(this._bodyArrayBuffer=S(E.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(E)||d(E))?this._bodyArrayBuffer=S(E):this._bodyText=E=Object.prototype.toString.call(E):this._bodyText="",this.headers.get("content-type")||(typeof E=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(E)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var E=w(this);if(E)return E;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var E=w(this);return E||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(H)}),this.text=function(){var E=w(this);if(E)return E;if(this._bodyBlob)return T(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(te(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}var j=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ge(E){var P=E.toUpperCase();return j.indexOf(P)>-1?P:E}function q(E,P){if(!(this instanceof q))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P=P||{};var Y=P.body;if(E instanceof q){if(E.bodyUsed)throw new TypeError("Already read");this.url=E.url,this.credentials=E.credentials,P.headers||(this.headers=new O(E.headers)),this.method=E.method,this.mode=E.mode,this.signal=E.signal,!Y&&E._bodyInit!=null&&(Y=E._bodyInit,E.bodyUsed=!0)}else this.url=String(E);if(this.credentials=P.credentials||this.credentials||"same-origin",(P.headers||!this.headers)&&(this.headers=new O(P.headers)),this.method=ge(P.method||this.method||"GET"),this.mode=P.mode||this.mode||null,this.signal=P.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Y)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(Y),(this.method==="GET"||this.method==="HEAD")&&(P.cache==="no-store"||P.cache==="no-cache")){var re=/([?&])_=[^&]*/;if(re.test(this.url))this.url=this.url.replace(re,"$1_="+new Date().getTime());else{var he=/\?/;this.url+=(he.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}q.prototype.clone=function(){return new q(this,{body:this._bodyInit})};function A(E){var P=new FormData;return E.trim().split("&").forEach(function(Y){if(Y){var re=Y.split("="),he=re.shift().replace(/\+/g," "),oe=re.join("=").replace(/\+/g," ");P.append(decodeURIComponent(he),decodeURIComponent(oe))}}),P}function V(E){var P=new O,Y=E.replace(/\r?\n[\t ]+/g," ");return Y.split("\r").map(function(re){return re.indexOf(`
3
- `)===0?re.substr(1,re.length):re}).forEach(function(re){var he=re.split(":"),oe=he.shift().trim();if(oe){var Fe=he.join(":").trim();P.append(oe,Fe)}}),P}U.call(q.prototype);function D(E,P){if(!(this instanceof D))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P||(P={}),this.type="default",this.status=P.status===void 0?200:P.status,this.ok=this.status>=200&&this.status<300,this.statusText=P.statusText===void 0?"":""+P.statusText,this.headers=new O(P.headers),this.url=P.url||"",this._initBody(E)}U.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new O(this.headers),url:this.url})},D.error=function(){var E=new D(null,{status:0,statusText:""});return E.type="error",E};var ie=[301,302,303,307,308];D.redirect=function(E,P){if(ie.indexOf(P)===-1)throw new RangeError("Invalid status code");return new D(null,{status:P,headers:{location:E}})},i.DOMException=a.DOMException;try{new i.DOMException}catch{i.DOMException=function(P,Y){this.message=P,this.name=Y;var re=Error(P);this.stack=re.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function $e(E,P){return new Promise(function(Y,re){var he=new q(E,P);if(he.signal&&he.signal.aborted)return re(new i.DOMException("Aborted","AbortError"));var oe=new XMLHttpRequest;function Fe(){oe.abort()}oe.onload=function(){var Be={status:oe.status,statusText:oe.statusText,headers:V(oe.getAllResponseHeaders()||"")};Be.url="responseURL"in oe?oe.responseURL:Be.headers.get("X-Request-URL");var xt="response"in oe?oe.response:oe.responseText;setTimeout(function(){Y(new D(xt,Be))},0)},oe.onerror=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.ontimeout=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.onabort=function(){setTimeout(function(){re(new i.DOMException("Aborted","AbortError"))},0)};function ht(Be){try{return Be===""&&a.location.href?a.location.href:Be}catch{return Be}}oe.open(he.method,ht(he.url),!0),he.credentials==="include"?oe.withCredentials=!0:he.credentials==="omit"&&(oe.withCredentials=!1),"responseType"in oe&&(l.blob?oe.responseType="blob":l.arrayBuffer&&he.headers.get("Content-Type")&&he.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(oe.responseType="arraybuffer")),P&&typeof P.headers=="object"&&!(P.headers instanceof O)?Object.getOwnPropertyNames(P.headers).forEach(function(Be){oe.setRequestHeader(Be,m(P.headers[Be]))}):he.headers.forEach(function(Be,xt){oe.setRequestHeader(xt,Be)}),he.signal&&(he.signal.addEventListener("abort",Fe),oe.onreadystatechange=function(){oe.readyState===4&&he.signal.removeEventListener("abort",Fe)}),oe.send(typeof he._bodyInit>"u"?null:he._bodyInit)})}return $e.polyfill=!0,a.fetch||(a.fetch=$e,a.Headers=O,a.Request=q,a.Response=D),i.Headers=O,i.Request=q,i.Response=D,i.fetch=$e,i})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t})(xi,xi.exports);var Pp=xi.exports;const fs=Cp(Pp);var Dp=Object.defineProperty,Cl=(e,t)=>{for(var n in t)Dp(e,n,{get:t[n],enumerable:!0})},Vr=v.record(v.number()),$p=v.object({type:v.literal("PercentageOffDiscount"),name:v.string(),description:v.string().optional(),percentage:v.number(),total:Vr.optional(),isExclusive:v.boolean()}),Ip=v.object({type:v.literal("FlatAmountOffDiscount"),name:v.string(),description:v.string().optional(),total:Vr.optional(),isExclusive:v.boolean()}),ki=v.discriminatedUnion("type",[$p,Ip]),Rr=v.object({id:v.string(),name:v.string(),originalPrice:Vr,price:Vr,hasDiscount:v.boolean(),discount:ki.optional()});function ho(e){return v.object({items:v.array(e),hasMore:v.boolean(),next:v.string().nullable()})}function Pl(e){return v.object({value:e,quantity:v.number()})}var Yt=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Yt||{}),Dl=v.object({name:v.string(),key:v.string(),platform:v.nativeEnum(Yt),size:v.number(),path:v.string().nullable()}),Ti=v.object({id:v.string(),name:v.string(),tagline:v.string(),website:v.string().optional(),iconUrl:v.string().optional(),numberOfLicenses:v.number().optional(),numberOfTrials:v.number().optional(),currentActivations:v.number().optional(),maxActivations:v.number().optional(),currentVersion:v.string().nullable(),version:v.string().optional(),prerelease:v.boolean().optional(),downloadsNeedsUser:v.boolean(),downloadsNeedsOwnership:v.boolean(),downloads:v.array(Dl).optional()}),ps=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),website:v.string().nullish(),owned:v.boolean(),currentVersion:v.string().optional(),downloads:Dl.array().optional(),defaultVariation:Rr.optional(),variations:Rr.array().optional(),type:v.void().transform(()=>"product").pipe(v.literal("product"))}),$l=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),owned:v.boolean(),partial:v.boolean(),products:ps.and(v.object({included:v.boolean().optional()})).array(),defaultVariation:Rr.optional(),variations:Rr.array().optional(),type:v.void().transform(()=>"bundle").pipe(v.literal("bundle"))}),Ap=v.object({suggestedCurrency:v.string(),products:ps.array(),bundles:$l.array()}),Xt=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Xt||{}),hs=v.object({id:v.string(),status:v.nativeEnum(Xt),product:ps,trialEligibility:v.object({eligible:v.boolean(),existing:v.boolean(),requiresAccount:v.boolean(),numberOfDaysPerProduct:v.number(),numberOfDaysRemaining:v.number()}).optional(),licenseEligibility:v.object({eligible:v.boolean()}).optional()}),Vp=class{constructor(e){this.api=e}async get(e){return(await this.api.fetch(`/api/customer/activations/${e}`,hs)).data}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`,v.boolean());return v.boolean().parse(t.data)}async fulfillLicense(e){return(await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,hs,{method:"POST"})).data}async fulfillTrial(e){return(await this.api.fetch(`/api/customer/activations/${e}/trial`,hs,{method:"POST"})).data}async cancel(e){return(await this.api.fetch(`/api/customer/activations/${e}/cancel`,hs,{method:"POST"})).data}},Rp=class extends Error{constructor(){super(),this.name="NotAuthorizedError",this.message="Not allowed"}},Ci=class extends Error{constructor(){super(),this.name="NotAuthenticatedError",this.message="Not authenticated"}},An=class extends Error{constructor(e){super(),this.name="NotFoundError",this.message=e??"Not found"}},jr=class extends Error{constructor(e,t,n,r){super(),this.title=e,this.detail=t,this.status=n,this.errors=r,this.name="MoonbaseError",r&&Object.values(r).length===1?this.message=Object.values(r)[0]:this.message=t??e}},jp=v.object({type:v.string(),title:v.string(),detail:v.string().optional(),status:v.number(),errors:v.record(v.string(),v.string().array()).optional()});function Lp(e){return e.split(".").map((t,n)=>{let[r,...o]=t;return r=n!==0?r.toUpperCase():r.toLowerCase(),o=[o.join("").toLowerCase()],r+o[0]}).join("")}async function Pi(e){if(e.status===404)throw new An;if(e.status===401)throw new Ci;if(e.status===403)throw new Rp;let t;try{const n=await e.json();t=jp.parse(n)}catch(n){throw console.warn("Could not handle response",{response:e,err:n,content:await e.text()}),new Error("An unknown problem occurred")}throw new jr(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[Lp(n),r.join(", ")])):void 0)}var Il=v.object({countryCode:v.string(),streetAddress1:v.string(),streetAddress2:v.string().nullable(),locality:v.string().nullable(),region:v.string().nullable(),postCode:v.string()}),Mp=v.object({newsletterOptIn:v.boolean()}),Al=v.object({id:v.string(),email:v.string(),name:v.string(),tenantId:v.string(),address:Il.optional(),communicationPreferences:Mp,ownedProducts:v.string().array().optional()}),Di=Al.and(v.object({accessToken:v.string(),refreshToken:v.string()})),Vl=v.object({id:v.string(),name:v.string(),email:v.string(),resetPasswordToken:v.string().nullable()}),Up=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){return(await this.api.authenticatedFetch("/api/customer/meta/user",Al)).data}async signIn(e,t){const n=await fs(`${this.api.baseUrl}/api/customer/identity/sign-in?email=${e}&scheme=JWT`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});if(n.status===404)throw new An("User not found");n.status>=400&&await Pi(n);try{const r=await n.json(),o=Di.parse(r);return this.tokenStore.setUser(o),o}catch(r){throw console.warn("Could not sign in user",{email:e,response:n,err:r}),new jr("Bad response","Could not sign in user",n.status)}}async signUp(e,t,n,r,o,s,i){const a=await this.api.fetch(`/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${i?"true":"false"}`,Di,{method:"POST",body:{name:e,email:t,password:n,address:r,acceptedPrivacyPolicy:o,acceptedTermsAndConditions:s}});return this.tokenStore.setUser(a.data),a.data}async update(e,t,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity",null,{method:"PATCH",body:{name:e,email:t,emailConfirmationToken:n,communicationPreferences:r}})).status===201}}async setPassword(e,t){await this.api.authenticatedFetch("/api/customer/identity/set-password",null,{method:"POST",body:{currentPassword:e,newPassword:t}})}async forgotPassword(e){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(e)}`,null,{method:"POST"})}async resetPassword(e,t,n){const r=await fs(`${this.api.baseUrl}/api/customer/identity/reset-password?email=${encodeURIComponent(e)}&code=${encodeURIComponent(n.replaceAll(" ","+"))}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});r.status>=400&&await Pi(r)}async confirmAccount(e,t){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,Vl,{method:"POST"});try{return Vl.parse(n.data)}catch(r){throw console.warn("Could not confirm user account",{email:e,code:t,response:n,err:r}),new jr("Bad response","Could not confirm user account",n.status)}}async confirmEmail(e,t){await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,null,{method:"POST"})}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,null,{method:"POST"})}},Rl={};Cl(Rl,{completedOrderSchema:()=>Fl,openBundleLineItem:()=>Ul,openOrderLineItem:()=>$i,openOrderSchema:()=>ms,openProductLineItem:()=>Ml,orderSchema:()=>Bl});var mo=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(mo||{}),jl=v.object({code:v.string(),name:v.string(),description:v.string()}),Ll=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable()}),Ml=v.object({id:v.string(),type:v.literal("Product"),productId:v.string(),quantity:v.number(),variationId:v.string(),price:Vr.optional(),variation:Rr.optional(),product:Ll.optional(),appliedDiscount:ki.optional()}),Fp=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),partial:v.boolean(),products:Ll.and(v.object({included:v.boolean().optional()})).array()}),Ul=v.object({id:v.string(),type:v.literal("Bundle"),bundleId:v.string(),quantity:v.number(),variationId:v.string(),price:Vr.optional(),variation:Rr.optional(),bundle:Fp.optional(),appliedDiscount:ki.optional()}),$i=v.discriminatedUnion("type",[Ml,Ul]),ms=v.object({id:v.string(),status:v.literal("Open"),currency:v.string(),items:$i.array(),couponsApplied:jl.array(),checkoutUrl:v.string().optional(),embeddedCheckoutUrl:v.string().optional()}),vo=v.object({currency:v.string(),amount:v.number()}),Bp=v.object({original:vo,discount:vo,subtotal:vo,taxes:vo,due:vo}),Hp=v.object({name:v.string().nullable(),businessName:v.string().nullable(),taxId:v.string().nullable(),email:v.string().nullable(),address:Il.nullable()}),Fl=v.object({id:v.string(),status:v.literal("Completed"),currency:v.string(),customer:Hp,total:Bp,items:$i.array(),couponsApplied:jl.array()}),Bl=v.discriminatedUnion("status",[ms,Fl]),Zp=class{constructor(e){this.api=e}async get(e){return(await this.api.fetch(`/api/customer/orders/${e}`,Bl)).data}async pushContent(e,t,n){const r={...Hl(n)};return t&&(r.checkout="true",r.returnUrl=t.returnUrl),(await this.api.fetch(`/api/customer/orders/${e.id}?${new URLSearchParams(r).toString()}`,ms,{method:"PATCH",body:{currency:e.currency||void 0,items:e.items}})).data}async removeBillingDetails(e){return(await this.api.fetch(`/api/customer/orders/${e}/billing-details`,ms,{method:"DELETE"})).data}};function Hl(e){return Object.entries({utm_source:e==null?void 0:e.source,utm_medium:e==null?void 0:e.medium,utm_campaign:e==null?void 0:e.campaign,utm_term:e==null?void 0:e.term,utm_content:e==null?void 0:e.content,utm_referrer:e==null?void 0:e.referrer}).filter(([t,n])=>n!==void 0).reduce((t,[n,r])=>({...t,[n]:r}),{})}var qp=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(Hl(e));return(await this.api.fetch(`/api/customer/storefront?${t.toString()}`,Ap)).data}},Wp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n){if(!this.tokenStore.hasAccessToken)throw new Ci;return await this.fetch(e,t,n)}async fetch(e,t,n){var r;const o=await this.tokenStore.getAccessToken(),s=(r=n==null?void 0:n.contentType)!=null?r:"application/json",i=await fs(this.baseUrl+e,{method:(n==null?void 0:n.method)||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":s,...o?{Authorization:`Bearer ${o}`}:{},"x-mb-cors":"1"},body:n!=null&&n.body?s!=="application/json"?n.body:JSON.stringify(n.body):void 0});i.status>=400&&await Pi(i);let a;try{return a=t?await i.json():null,{data:t?t.parse(a):null,headers:Object.fromEntries(i.headers.entries()),status:i.status}}catch(l){throw console.warn("Could not parse response",{status:i.status,path:e,content:a||(i.bodyUsed?"unknown":await i.text()),headers:Object.fromEntries(i.headers.entries()),userAgent:window&&window.navigator&&window.navigator.userAgent,err:l}),new jr("Bad response","Could not parse server response",i.status)}}},Zl=class rs{constructor(t){if(this.configuration=t,this.tokens=null,this.refreshTimeoutId=null,this.refreshPromise=null,typeof window<"u"){window.addEventListener("storage",r=>this.handleStorageUpdate(r));const n=localStorage.getItem(rs.storageKey);n&&(this.tokens=JSON.parse(n),this.tokens.expiresAt=new Date(this.tokens.expiresAt))}}get user(){return this.tokens?this.tokens:null}get hasAccessToken(){return!!this.tokens}async getAccessToken(){var t,n,r;if(this.isExpired){if(this.refreshPromise){const s=await this.refreshPromise;return(t=s==null?void 0:s.accessToken)!=null?t:null}this.refreshPromise=this.refreshTokens();const o=await this.refreshPromise;return(n=o==null?void 0:o.accessToken)!=null?n:null}return((r=this.tokens)==null?void 0:r.accessToken)||null}setUser(t){return t===null?(this.tokens=null,typeof window<"u"&&localStorage&&localStorage.removeItem(rs.storageKey),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),null):(this.tokens={...t,expiresAt:new Date(new Date().getTime()+15*60*1e3)},typeof window<"u"&&localStorage&&localStorage.setItem(rs.storageKey,JSON.stringify(this.tokens)),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3),this.tokens)}get isExpired(){return this.tokens!=null&&this.tokens.expiresAt<new Date}async refreshTokens(){if(!this.tokens)throw new Error("No tokens found to refresh");const t=await fs(`${this.configuration.endpoint}/api/customer/identity/refresh?token=${this.tokens.refreshToken}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:this.tokens.accessToken});if(t.status!==200){if(t.status===403||t.status===404)return this.setUser(null),null;throw new jr("Unexpected result",`Could not refresh access token, status code ${t.status}`,t.status)}const n=Di.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case rs.storageKey:this.tokens=t.newValue?JSON.parse(t.newValue):null,this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.tokens&&(this.tokens.expiresAt=new Date(this.tokens.expiresAt));break}}};Zl.storageKey="moonbase_auth";var zp=Zl,ql=v.object({id:v.string(),name:v.string(),description:v.string(),code:v.string(),redeemed:v.boolean(),redeemsProducts:Pl(ps).array(),redeemsBundles:Pl($l).array()}),Kp=class{constructor(e){this.api=e}async peek(e){return(await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`,ql)).data}async redeem(e){return(await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,ql,{method:"POST"})).data}},Wl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(Wl||{}),zl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(zl||{}),Ii=(e=>(e.Online="Online",e.Offline="Offline",e))(Ii||{}),Ai=v.object({id:v.string(),status:v.nativeEnum(Wl),product:Ti,activeNumberOfActivations:v.number(),maxNumberOfActivations:v.number(),createdAt:v.coerce.date()}),Kl=v.object({id:v.string(),licenseId:v.string(),name:v.string(),status:v.nativeEnum(zl),activationMethod:v.nativeEnum(Ii),lastValidatedAt:v.coerce.date().nullable()}),Gp=class{constructor(e){this.api=e}async activate(e,t){const n=await this.api.authenticatedFetch(`/api/customer/inventory/activate?method=${t}`,Ai,{method:"POST",body:e,contentType:"text/plain"});return{license:n.data,url:v.string().parse(n.headers.location)}}},Jp=class{constructor(e){this.api=e}async get(e){return(await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses",ho(Ai))).data}async getActivations(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`,ho(Kl))).data}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,null,{method:"POST"})}},Yp=class{constructor(e){this.api=e}async get(e,t){return(await this.api.fetch(`/api/customer/inventory/products/${e}${t?`?version=${t}`:""}`,Ti)).data}async getOwned(e){return(await this.api.authenticatedFetch(e||"/api/customer/inventory/products",ho(Ti))).data}async getLicenses(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`,ho(Ai))).data}async getActivations(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`,ho(Kl))).data}async getDownloadUrl(e){const t=new URL(e);return t.searchParams.append("redirect","false"),(await this.api.fetch(t.pathname+t.search,v.object({location:v.string()}))).data.location}},Xp=class{constructor(e){this.licenses=new Jp(e),this.products=new Yp(e),this.activation=new Gp(e)}},Gl={};Cl(Gl,{orders:()=>Rl});var Qp=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new zp(e);const t=new Wp(this.configuration.endpoint,this.tokenStore);this.storefront=new qp(t),this.identity=new Up(t,this.tokenStore),this.vouchers=new Kp(t),this.orders=new Zp(t),this.inventory=new Xp(t),this.activationRequests=new Vp(t)}},Jl={};/**
3
+ `)===0?re.substr(1,re.length):re}).forEach(function(re){var he=re.split(":"),oe=he.shift().trim();if(oe){var Fe=he.join(":").trim();P.append(oe,Fe)}}),P}U.call(q.prototype);function D(E,P){if(!(this instanceof D))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P||(P={}),this.type="default",this.status=P.status===void 0?200:P.status,this.ok=this.status>=200&&this.status<300,this.statusText=P.statusText===void 0?"":""+P.statusText,this.headers=new O(P.headers),this.url=P.url||"",this._initBody(E)}U.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new O(this.headers),url:this.url})},D.error=function(){var E=new D(null,{status:0,statusText:""});return E.type="error",E};var ie=[301,302,303,307,308];D.redirect=function(E,P){if(ie.indexOf(P)===-1)throw new RangeError("Invalid status code");return new D(null,{status:P,headers:{location:E}})},i.DOMException=a.DOMException;try{new i.DOMException}catch{i.DOMException=function(P,Y){this.message=P,this.name=Y;var re=Error(P);this.stack=re.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function $e(E,P){return new Promise(function(Y,re){var he=new q(E,P);if(he.signal&&he.signal.aborted)return re(new i.DOMException("Aborted","AbortError"));var oe=new XMLHttpRequest;function Fe(){oe.abort()}oe.onload=function(){var Be={status:oe.status,statusText:oe.statusText,headers:V(oe.getAllResponseHeaders()||"")};Be.url="responseURL"in oe?oe.responseURL:Be.headers.get("X-Request-URL");var xt="response"in oe?oe.response:oe.responseText;setTimeout(function(){Y(new D(xt,Be))},0)},oe.onerror=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.ontimeout=function(){setTimeout(function(){re(new TypeError("Network request failed"))},0)},oe.onabort=function(){setTimeout(function(){re(new i.DOMException("Aborted","AbortError"))},0)};function ht(Be){try{return Be===""&&a.location.href?a.location.href:Be}catch{return Be}}oe.open(he.method,ht(he.url),!0),he.credentials==="include"?oe.withCredentials=!0:he.credentials==="omit"&&(oe.withCredentials=!1),"responseType"in oe&&(l.blob?oe.responseType="blob":l.arrayBuffer&&he.headers.get("Content-Type")&&he.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(oe.responseType="arraybuffer")),P&&typeof P.headers=="object"&&!(P.headers instanceof O)?Object.getOwnPropertyNames(P.headers).forEach(function(Be){oe.setRequestHeader(Be,m(P.headers[Be]))}):he.headers.forEach(function(Be,xt){oe.setRequestHeader(xt,Be)}),he.signal&&(he.signal.addEventListener("abort",Fe),oe.onreadystatechange=function(){oe.readyState===4&&he.signal.removeEventListener("abort",Fe)}),oe.send(typeof he._bodyInit>"u"?null:he._bodyInit)})}return $e.polyfill=!0,a.fetch||(a.fetch=$e,a.Headers=O,a.Request=q,a.Response=D),i.Headers=O,i.Request=q,i.Response=D,i.fetch=$e,i})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t})(xi,xi.exports);var Pp=xi.exports;const fs=Cp(Pp);var Dp=Object.defineProperty,Cl=(e,t)=>{for(var n in t)Dp(e,n,{get:t[n],enumerable:!0})},Vr=v.record(v.number()),$p=v.object({type:v.literal("PercentageOffDiscount"),name:v.string(),description:v.string().optional(),percentage:v.number(),total:Vr.optional(),isExclusive:v.boolean()}),Ip=v.object({type:v.literal("FlatAmountOffDiscount"),name:v.string(),description:v.string().optional(),total:Vr.optional(),isExclusive:v.boolean()}),ki=v.discriminatedUnion("type",[$p,Ip]),Rr=v.object({id:v.string(),name:v.string(),originalPrice:Vr,price:Vr,hasDiscount:v.boolean(),discount:ki.optional()});function ho(e){return v.object({items:v.array(e),hasMore:v.boolean(),next:v.string().nullable()})}function Pl(e){return v.object({value:e,quantity:v.number()})}var Yt=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Yt||{}),Dl=v.object({name:v.string(),key:v.string(),platform:v.nativeEnum(Yt),size:v.number(),path:v.string().nullable()}),Ti=v.object({id:v.string(),name:v.string(),tagline:v.string(),website:v.string().optional(),iconUrl:v.string().optional(),numberOfLicenses:v.number().optional(),numberOfTrials:v.number().optional(),currentActivations:v.number().optional(),maxActivations:v.number().optional(),currentVersion:v.string().nullable(),version:v.string().optional(),prerelease:v.boolean().optional(),downloadsNeedsUser:v.boolean(),downloadsNeedsOwnership:v.boolean(),downloads:v.array(Dl).optional()}),ps=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),website:v.string().nullish(),owned:v.boolean(),currentVersion:v.string().optional(),downloads:Dl.array().optional(),defaultVariation:Rr.optional(),variations:Rr.array().optional(),type:v.void().transform(()=>"product").pipe(v.literal("product"))}),$l=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),owned:v.boolean(),partial:v.boolean(),products:ps.and(v.object({included:v.boolean().optional()})).array(),defaultVariation:Rr.optional(),variations:Rr.array().optional(),type:v.void().transform(()=>"bundle").pipe(v.literal("bundle"))}),Ap=v.object({suggestedCurrency:v.string(),products:ps.array(),bundles:$l.array()}),Xt=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Xt||{}),hs=v.object({id:v.string(),status:v.nativeEnum(Xt),product:ps,trialEligibility:v.object({eligible:v.boolean(),existing:v.boolean(),requiresAccount:v.boolean(),numberOfDaysPerProduct:v.number(),numberOfDaysRemaining:v.number()}).optional(),licenseEligibility:v.object({eligible:v.boolean()}).optional()}),Vp=class{constructor(e){this.api=e}async get(e){return(await this.api.fetch(`/api/customer/activations/${e}`,hs)).data}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`,v.boolean());return v.boolean().parse(t.data)}async fulfillLicense(e){return(await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,hs,{method:"POST"})).data}async fulfillTrial(e){return(await this.api.fetch(`/api/customer/activations/${e}/trial`,hs,{method:"POST"})).data}async cancel(e){return(await this.api.fetch(`/api/customer/activations/${e}/cancel`,hs,{method:"POST"})).data}},Rp=class extends Error{constructor(){super(),this.name="NotAuthorizedError",this.message="Not allowed"}},Ci=class extends Error{constructor(){super(),this.name="NotAuthenticatedError",this.message="Not authenticated"}},An=class extends Error{constructor(e){super(),this.name="NotFoundError",this.message=e??"Not found"}},jr=class extends Error{constructor(e,t,n,r){super(),this.title=e,this.detail=t,this.status=n,this.errors=r,this.name="MoonbaseError",r&&Object.values(r).length===1?this.message=Object.values(r)[0]:this.message=t??e}},jp=v.object({type:v.string(),title:v.string(),detail:v.string().optional(),status:v.number(),errors:v.record(v.string(),v.string().array()).optional()});function Lp(e){return e.split(".").map((t,n)=>{let[r,...o]=t;return r=n!==0?r.toUpperCase():r.toLowerCase(),o=[o.join("").toLowerCase()],r+o[0]}).join("")}async function Pi(e){if(e.status===404)throw new An;if(e.status===401)throw new Ci;if(e.status===403)throw new Rp;let t;try{const n=await e.json();t=jp.parse(n)}catch(n){throw console.warn("Could not handle response",{response:e,err:n,content:await e.text()}),new Error("An unknown problem occurred")}throw new jr(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[Lp(n),r.join(", ")])):void 0)}var Il=v.object({countryCode:v.string(),streetAddress1:v.string(),streetAddress2:v.string().nullable(),locality:v.string().nullable(),region:v.string().nullable(),postCode:v.string()}),Mp=v.object({newsletterOptIn:v.boolean()}),Al=v.object({id:v.string(),email:v.string(),name:v.string(),tenantId:v.string(),address:Il.optional(),communicationPreferences:Mp,ownedProducts:v.string().array().optional()}),Di=Al.and(v.object({accessToken:v.string(),refreshToken:v.string()})),Vl=v.object({id:v.string(),name:v.string(),email:v.string(),resetPasswordToken:v.string().nullable()}),Up=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){return(await this.api.authenticatedFetch("/api/customer/meta/user",Al)).data}async signIn(e,t){const n=await fs(`${this.api.baseUrl}/api/customer/identity/sign-in?email=${encodeURIComponent(e)}&scheme=JWT`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});if(n.status===404)throw new An("User not found");n.status>=400&&await Pi(n);try{const r=await n.json(),o=Di.parse(r);return this.tokenStore.setUser(o),o}catch(r){throw console.warn("Could not sign in user",{email:e,response:n,err:r}),new jr("Bad response","Could not sign in user",n.status)}}async signUp(e,t,n,r,o,s,i){const a=await this.api.fetch(`/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${i?"true":"false"}`,Di,{method:"POST",body:{name:e,email:t,password:n,address:r,acceptedPrivacyPolicy:o,acceptedTermsAndConditions:s}});return this.tokenStore.setUser(a.data),a.data}async update(e,t,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity",null,{method:"PATCH",body:{name:e,email:t,emailConfirmationToken:n,communicationPreferences:r}})).status===201}}async setPassword(e,t){await this.api.authenticatedFetch("/api/customer/identity/set-password",null,{method:"POST",body:{currentPassword:e,newPassword:t}})}async forgotPassword(e){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(e)}`,null,{method:"POST"})}async resetPassword(e,t,n){const r=await fs(`${this.api.baseUrl}/api/customer/identity/reset-password?email=${encodeURIComponent(e)}&code=${encodeURIComponent(n.replaceAll(" ","+"))}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});r.status>=400&&await Pi(r)}async confirmAccount(e,t){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,Vl,{method:"POST"});try{return Vl.parse(n.data)}catch(r){throw console.warn("Could not confirm user account",{email:e,code:t,response:n,err:r}),new jr("Bad response","Could not confirm user account",n.status)}}async confirmEmail(e,t){await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,null,{method:"POST"})}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,null,{method:"POST"})}},Rl={};Cl(Rl,{completedOrderSchema:()=>Fl,openBundleLineItem:()=>Ul,openOrderLineItem:()=>$i,openOrderSchema:()=>ms,openProductLineItem:()=>Ml,orderSchema:()=>Bl});var mo=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(mo||{}),jl=v.object({code:v.string(),name:v.string(),description:v.string()}),Ll=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable()}),Ml=v.object({id:v.string(),type:v.literal("Product"),productId:v.string(),quantity:v.number(),variationId:v.string(),price:Vr.optional(),variation:Rr.optional(),product:Ll.optional(),appliedDiscount:ki.optional()}),Fp=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),partial:v.boolean(),products:Ll.and(v.object({included:v.boolean().optional()})).array()}),Ul=v.object({id:v.string(),type:v.literal("Bundle"),bundleId:v.string(),quantity:v.number(),variationId:v.string(),price:Vr.optional(),variation:Rr.optional(),bundle:Fp.optional(),appliedDiscount:ki.optional()}),$i=v.discriminatedUnion("type",[Ml,Ul]),ms=v.object({id:v.string(),status:v.literal("Open"),currency:v.string(),items:$i.array(),couponsApplied:jl.array(),checkoutUrl:v.string().optional(),embeddedCheckoutUrl:v.string().optional()}),vo=v.object({currency:v.string(),amount:v.number()}),Bp=v.object({original:vo,discount:vo,subtotal:vo,taxes:vo,due:vo}),Hp=v.object({name:v.string().nullable(),businessName:v.string().nullable(),taxId:v.string().nullable(),email:v.string().nullable(),address:Il.nullable()}),Fl=v.object({id:v.string(),status:v.literal("Completed"),currency:v.string(),customer:Hp,total:Bp,items:$i.array(),couponsApplied:jl.array()}),Bl=v.discriminatedUnion("status",[ms,Fl]),Zp=class{constructor(e){this.api=e}async get(e){return(await this.api.fetch(`/api/customer/orders/${e}`,Bl)).data}async pushContent(e,t,n){const r={...Hl(n)};return t&&(r.checkout="true",r.returnUrl=t.returnUrl),(await this.api.fetch(`/api/customer/orders/${e.id}?${new URLSearchParams(r).toString()}`,ms,{method:"PATCH",body:{currency:e.currency||void 0,items:e.items}})).data}async removeBillingDetails(e){return(await this.api.fetch(`/api/customer/orders/${e}/billing-details`,ms,{method:"DELETE"})).data}};function Hl(e){return Object.entries({utm_source:e==null?void 0:e.source,utm_medium:e==null?void 0:e.medium,utm_campaign:e==null?void 0:e.campaign,utm_term:e==null?void 0:e.term,utm_content:e==null?void 0:e.content,utm_referrer:e==null?void 0:e.referrer}).filter(([t,n])=>n!==void 0).reduce((t,[n,r])=>({...t,[n]:r}),{})}var qp=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(Hl(e));return(await this.api.fetch(`/api/customer/storefront?${t.toString()}`,Ap)).data}},Wp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n){if(!this.tokenStore.hasAccessToken)throw new Ci;return await this.fetch(e,t,n)}async fetch(e,t,n){var r;const o=await this.tokenStore.getAccessToken(),s=(r=n==null?void 0:n.contentType)!=null?r:"application/json",i=await fs(this.baseUrl+e,{method:(n==null?void 0:n.method)||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":s,...o?{Authorization:`Bearer ${o}`}:{},"x-mb-cors":"1"},body:n!=null&&n.body?s!=="application/json"?n.body:JSON.stringify(n.body):void 0});i.status>=400&&await Pi(i);let a;try{return a=t?await i.json():null,{data:t?t.parse(a):null,headers:Object.fromEntries(i.headers.entries()),status:i.status}}catch(l){throw console.warn("Could not parse response",{status:i.status,path:e,content:a||(i.bodyUsed?"unknown":await i.text()),headers:Object.fromEntries(i.headers.entries()),userAgent:window&&window.navigator&&window.navigator.userAgent,err:l}),new jr("Bad response","Could not parse server response",i.status)}}},Zl=class rs{constructor(t){if(this.configuration=t,this.tokens=null,this.refreshTimeoutId=null,this.refreshPromise=null,typeof window<"u"){window.addEventListener("storage",r=>this.handleStorageUpdate(r));const n=localStorage.getItem(rs.storageKey);n&&(this.tokens=JSON.parse(n),this.tokens.expiresAt=new Date(this.tokens.expiresAt))}}get user(){return this.tokens?this.tokens:null}get hasAccessToken(){return!!this.tokens}async getAccessToken(){var t,n,r;if(this.isExpired){if(this.refreshPromise){const s=await this.refreshPromise;return(t=s==null?void 0:s.accessToken)!=null?t:null}this.refreshPromise=this.refreshTokens();const o=await this.refreshPromise;return(n=o==null?void 0:o.accessToken)!=null?n:null}return((r=this.tokens)==null?void 0:r.accessToken)||null}setUser(t){return t===null?(this.tokens=null,typeof window<"u"&&localStorage&&localStorage.removeItem(rs.storageKey),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),null):(this.tokens={...t,expiresAt:new Date(new Date().getTime()+15*60*1e3)},typeof window<"u"&&localStorage&&localStorage.setItem(rs.storageKey,JSON.stringify(this.tokens)),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3),this.tokens)}get isExpired(){return this.tokens!=null&&this.tokens.expiresAt<new Date}async refreshTokens(){if(!this.tokens)throw new Error("No tokens found to refresh");const t=await fs(`${this.configuration.endpoint}/api/customer/identity/refresh?token=${this.tokens.refreshToken}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:this.tokens.accessToken});if(t.status!==200){if(t.status===403||t.status===404)return this.setUser(null),null;throw new jr("Unexpected result",`Could not refresh access token, status code ${t.status}`,t.status)}const n=Di.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case rs.storageKey:this.tokens=t.newValue?JSON.parse(t.newValue):null,this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.tokens&&(this.tokens.expiresAt=new Date(this.tokens.expiresAt));break}}};Zl.storageKey="moonbase_auth";var zp=Zl,ql=v.object({id:v.string(),name:v.string(),description:v.string(),code:v.string(),redeemed:v.boolean(),redeemsProducts:Pl(ps).array(),redeemsBundles:Pl($l).array()}),Kp=class{constructor(e){this.api=e}async peek(e){return(await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`,ql)).data}async redeem(e){return(await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,ql,{method:"POST"})).data}},Wl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(Wl||{}),zl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(zl||{}),Ii=(e=>(e.Online="Online",e.Offline="Offline",e))(Ii||{}),Ai=v.object({id:v.string(),status:v.nativeEnum(Wl),product:Ti,activeNumberOfActivations:v.number(),maxNumberOfActivations:v.number(),createdAt:v.coerce.date()}),Kl=v.object({id:v.string(),licenseId:v.string(),name:v.string(),status:v.nativeEnum(zl),activationMethod:v.nativeEnum(Ii),lastValidatedAt:v.coerce.date().nullable()}),Gp=class{constructor(e){this.api=e}async activate(e,t){const n=await this.api.authenticatedFetch(`/api/customer/inventory/activate?method=${t}`,Ai,{method:"POST",body:e,contentType:"text/plain"});return{license:n.data,url:v.string().parse(n.headers.location)}}},Jp=class{constructor(e){this.api=e}async get(e){return(await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses",ho(Ai))).data}async getActivations(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`,ho(Kl))).data}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,null,{method:"POST"})}},Yp=class{constructor(e){this.api=e}async get(e,t){return(await this.api.fetch(`/api/customer/inventory/products/${e}${t?`?version=${t}`:""}`,Ti)).data}async getOwned(e){return(await this.api.authenticatedFetch(e||"/api/customer/inventory/products",ho(Ti))).data}async getLicenses(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`,ho(Ai))).data}async getActivations(e,t){return(await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`,ho(Kl))).data}async getDownloadUrl(e){const t=new URL(e);return t.searchParams.append("redirect","false"),(await this.api.fetch(t.pathname+t.search,v.object({location:v.string()}))).data.location}},Xp=class{constructor(e){this.licenses=new Jp(e),this.products=new Yp(e),this.activation=new Gp(e)}},Gl={};Cl(Gl,{orders:()=>Rl});var Qp=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new zp(e);const t=new Wp(this.configuration.endpoint,this.tokenStore);this.storefront=new qp(t),this.identity=new Up(t,this.tokenStore),this.vouchers=new Kp(t),this.orders=new Zp(t),this.inventory=new Xp(t),this.activationRequests=new Vp(t)}},Jl={};/**
4
4
  * @vue/shared v3.5.3
5
5
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
6
6
  * @license MIT
@@ -12,7 +12,7 @@ If this is a native custom element, make sure to exclude it from component resol
12
12
 
13
13
  For more details, see https://link.vuejs.org/feature-flags.`)}}const Nt=wv;function lv(e){return uv(e)}function uv(e,t){av();const n=Mi();n.__VUE__=!0,g.NODE_ENV!=="production"&&Hu(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:m=Qe,insertStaticContent:b}=e,O=(p,h,k,L=null,I=null,R=null,J=void 0,z=null,W=g.NODE_ENV!=="production"&&Bn?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!yr(p,h)&&(L=_i(p),Be(p,I,R,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:M,ref:me,shapeFlag:X}=h;switch(M){case jo:w(p,h,k,L);break;case Ge:$(p,h,k,L);break;case Lo:p==null?H(h,k,L,J):g.NODE_ENV!=="production"&&T(p,h,k,J);break;case xe:ie(p,h,k,L,I,R,J,z,W);break;default:X&1?U(p,h,k,L,I,R,J,z,W):X&6?$e(p,h,k,L,I,R,J,z,W):X&64||X&128?M.process(p,h,k,L,I,R,J,z,W,ts):g.NODE_ENV!=="production"&&F("Invalid VNode type:",M,`(${typeof M})`)}me!=null&&I&&da(me,p&&p.ref,R,h||p,!h)},w=(p,h,k,L)=>{if(p==null)r(h.el=a(h.children),k,L);else{const I=h.el=p.el;h.children!==p.children&&u(I,h.children)}},$=(p,h,k,L)=>{p==null?r(h.el=l(h.children||""),k,L):h.el=p.el},H=(p,h,k,L)=>{[p.el,p.anchor]=b(p.children,h,k,L,p.el,p.anchor)},T=(p,h,k,L)=>{if(h.children!==p.children){const I=f(p.anchor);S(p),[h.el,h.anchor]=b(h.children,k,I,L)}else h.el=p.el,h.anchor=p.anchor},te=({el:p,anchor:h},k,L)=>{let I;for(;p&&p!==h;)I=f(p),r(p,k,L),p=I;r(h,k,L)},S=({el:p,anchor:h})=>{let k;for(;p&&p!==h;)k=f(p),o(p),p=k;o(h)},U=(p,h,k,L,I,R,J,z,W)=>{h.type==="svg"?J="svg":h.type==="math"&&(J="mathml"),p==null?j(h,k,L,I,R,J,z,W):A(p,h,I,R,J,z,W)},j=(p,h,k,L,I,R,J,z)=>{let W,M;const{props:me,shapeFlag:X,transition:ae,dirs:we}=p;if(W=p.el=i(p.type,R,me&&me.is,me),X&8?c(W,p.children):X&16&&q(p.children,W,null,L,I,Na(p,R),J,z),we&&pr(p,null,L,"created"),ge(W,p,p.scopeId,J,L),me){for(const He in me)He!=="value"&&!yo(He)&&s(W,He,null,me[He],R,L);"value"in me&&s(W,"value",null,me.value,R),(M=me.onVnodeBeforeMount)&&sn(M,L,p)}g.NODE_ENV!=="production"&&(bs(W,"__vnode",p,!0),bs(W,"__vueParentComponent",L,!0)),we&&pr(p,null,L,"beforeMount");const Pe=cv(I,ae);Pe&&ae.beforeEnter(W),r(W,h,k),((M=me&&me.onVnodeMounted)||Pe||we)&&Nt(()=>{M&&sn(M,L,p),Pe&&ae.enter(W),we&&pr(p,null,L,"mounted")},I)},ge=(p,h,k,L,I)=>{if(k&&m(p,k),L)for(let R=0;R<L.length;R++)m(p,L[R]);if(I){let R=I.subTree;if(g.NODE_ENV!=="production"&&R.patchFlag>0&&R.patchFlag&2048&&(R=Ta(R.children)||R),h===R||Rc(R.type)&&(R.ssContent===h||R.ssFallback===h)){const J=I.vnode;ge(p,J,J.scopeId,J.slotScopeIds,I.parent)}}},q=(p,h,k,L,I,R,J,z,W=0)=>{for(let M=W;M<p.length;M++){const me=p[M]=z?qn(p[M]):qt(p[M]);O(null,me,h,k,L,I,R,J,z)}},A=(p,h,k,L,I,R,J)=>{const z=h.el=p.el;g.NODE_ENV!=="production"&&(z.__vnode=h);let{patchFlag:W,dynamicChildren:M,dirs:me}=h;W|=p.patchFlag&16;const X=p.props||je,ae=h.props||je;let we;if(k&&gr(k,!1),(we=ae.onVnodeBeforeUpdate)&&sn(we,k,h,p),me&&pr(h,p,k,"beforeUpdate"),k&&gr(k,!0),g.NODE_ENV!=="production"&&Bn&&(W=0,J=!1,M=null),(X.innerHTML&&ae.innerHTML==null||X.textContent&&ae.textContent==null)&&c(z,""),M?(V(p.dynamicChildren,M,z,k,L,Na(h,I),R),g.NODE_ENV!=="production"&&Ro(p,h)):J||he(p,h,z,null,k,L,Na(h,I),R,!1),W>0){if(W&16)D(z,X,ae,k,I);else if(W&2&&X.class!==ae.class&&s(z,"class",null,ae.class,I),W&4&&s(z,"style",X.style,ae.style,I),W&8){const Pe=h.dynamicProps;for(let He=0;He<Pe.length;He++){const Me=Pe[He],$t=X[Me],mt=ae[Me];(mt!==$t||Me==="value")&&s(z,Me,$t,mt,I,k)}}W&1&&p.children!==h.children&&c(z,h.children)}else!J&&M==null&&D(z,X,ae,k,I);((we=ae.onVnodeUpdated)||me)&&Nt(()=>{we&&sn(we,k,h,p),me&&pr(h,p,k,"updated")},L)},V=(p,h,k,L,I,R,J)=>{for(let z=0;z<h.length;z++){const W=p[z],M=h[z],me=W.el&&(W.type===xe||!yr(W,M)||W.shapeFlag&70)?d(W.el):k;O(W,M,me,null,L,I,R,J,!0)}},D=(p,h,k,L,I)=>{if(h!==k){if(h!==je)for(const R in h)!yo(R)&&!(R in k)&&s(p,R,h[R],null,I,L);for(const R in k){if(yo(R))continue;const J=k[R],z=h[R];J!==z&&R!=="value"&&s(p,R,z,J,I,L)}"value"in k&&s(p,"value",h.value,k.value,I)}},ie=(p,h,k,L,I,R,J,z,W)=>{const M=h.el=p?p.el:a(""),me=h.anchor=p?p.anchor:a("");let{patchFlag:X,dynamicChildren:ae,slotScopeIds:we}=h;g.NODE_ENV!=="production"&&(Bn||X&2048)&&(X=0,W=!1,ae=null),we&&(z=z?z.concat(we):we),p==null?(r(M,k,L),r(me,k,L),q(h.children||[],k,me,I,R,J,z,W)):X>0&&X&64&&ae&&p.dynamicChildren?(V(p.dynamicChildren,ae,k,I,R,J,z),g.NODE_ENV!=="production"?Ro(p,h):(h.key!=null||I&&h===I.subTree)&&Ro(p,h,!0)):he(p,h,k,me,I,R,J,z,W)},$e=(p,h,k,L,I,R,J,z,W)=>{h.slotScopeIds=z,p==null?h.shapeFlag&512?I.ctx.activate(h,k,L,J,W):E(h,k,L,I,R,J,W):P(p,h,W)},E=(p,h,k,L,I,R,J)=>{const z=p.component=Tv(p,L,I);if(g.NODE_ENV!=="production"&&z.type.__hmrId&&om(z),g.NODE_ENV!=="production"&&(Is(p),wn(z,"mount")),Io(p)&&(z.ctx.renderer=ts),g.NODE_ENV!=="production"&&wn(z,"init"),Pv(z,!1,J),g.NODE_ENV!=="production"&&En(z,"init"),z.asyncDep){if(I&&I.registerDep(z,Y,J),!p.el){const W=z.subTree=Z(Ge);$(null,W,h,k)}}else Y(z,p,h,k,I,R,J);g.NODE_ENV!=="production"&&(As(),En(z,"mount"))},P=(p,h,k)=>{const L=h.component=p.component;if(bv(p,h,k))if(L.asyncDep&&!L.asyncResolved){g.NODE_ENV!=="production"&&Is(h),re(L,h,k),g.NODE_ENV!=="production"&&As();return}else L.next=h,L.update();else h.el=p.el,L.vnode=h},Y=(p,h,k,L,I,R,J)=>{const z=()=>{if(p.isMounted){let{next:X,bu:ae,u:we,parent:Pe,vnode:He}=p;{const It=Cc(p);if(It){X&&(X.el=He.el,re(p,X,J)),It.asyncDep.then(()=>{p.isUnmounted||z()});return}}let Me=X,$t;g.NODE_ENV!=="production"&&Is(X||p.vnode),gr(p,!1),X?(X.el=He.el,re(p,X,J)):X=He,ae&&bo(ae),($t=X.props&&X.props.onVnodeBeforeUpdate)&&sn($t,Pe,X,He),gr(p,!0),g.NODE_ENV!=="production"&&wn(p,"render");const mt=ka(p);g.NODE_ENV!=="production"&&En(p,"render");const zt=p.subTree;p.subTree=mt,g.NODE_ENV!=="production"&&wn(p,"patch"),O(zt,mt,d(zt.el),_i(zt),p,I,R),g.NODE_ENV!=="production"&&En(p,"patch"),X.el=mt.el,Me===null&&_v(p,mt.el),we&&Nt(we,I),($t=X.props&&X.props.onVnodeUpdated)&&Nt(()=>sn($t,Pe,X,He),I),g.NODE_ENV!=="production"&&Zu(p),g.NODE_ENV!=="production"&&As()}else{let X;const{el:ae,props:we}=h,{bm:Pe,m:He,parent:Me,root:$t,type:mt}=p,zt=Hr(h);if(gr(p,!1),Pe&&bo(Pe),!zt&&(X=we&&we.onVnodeBeforeMount)&&sn(X,Me,h),gr(p,!0),ae&&Cf){const It=()=>{g.NODE_ENV!=="production"&&wn(p,"render"),p.subTree=ka(p),g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"hydrate"),Cf(ae,p.subTree,p,I,null),g.NODE_ENV!=="production"&&En(p,"hydrate")};zt&&mt.__asyncHydrate?mt.__asyncHydrate(ae,p,It):It()}else{$t.ce&&$t.ce._injectChildStyle(mt),g.NODE_ENV!=="production"&&wn(p,"render");const It=p.subTree=ka(p);g.NODE_ENV!=="production"&&En(p,"render"),g.NODE_ENV!=="production"&&wn(p,"patch"),O(null,It,k,L,p,I,R),g.NODE_ENV!=="production"&&En(p,"patch"),h.el=It.el}if(He&&Nt(He,I),!zt&&(X=we&&we.onVnodeMounted)){const It=h;Nt(()=>sn(X,Me,It),I)}(h.shapeFlag&256||Me&&Hr(Me.vnode)&&Me.vnode.shapeFlag&256)&&p.a&&Nt(p.a,I),p.isMounted=!0,g.NODE_ENV!=="production"&&cm(p),h=k=L=null}};p.scope.on();const W=p.effect=new au(z);p.scope.off();const M=p.update=W.run.bind(W),me=p.job=W.runIfDirty.bind(W);me.i=p,me.id=p.uid,W.scheduler=()=>Vs(me),gr(p,!0),g.NODE_ENV!=="production"&&(W.onTrack=p.rtc?X=>bo(p.rtc,X):void 0,W.onTrigger=p.rtg?X=>bo(p.rtg,X):void 0),M()},re=(p,h,k)=>{h.component=p;const L=p.vnode.props;p.vnode=h,p.next=null,Jm(p,h.props,L,k),iv(p,h.children,k),vn(),Lu(p),gn()},he=(p,h,k,L,I,R,J,z,W=!1)=>{const M=p&&p.children,me=p?p.shapeFlag:0,X=h.children,{patchFlag:ae,shapeFlag:we}=h;if(ae>0){if(ae&128){Fe(M,X,k,L,I,R,J,z,W);return}else if(ae&256){oe(M,X,k,L,I,R,J,z,W);return}}we&8?(me&16&&es(M,I,R),X!==M&&c(k,X)):me&16?we&16?Fe(M,X,k,L,I,R,J,z,W):es(M,I,R,!0):(me&8&&c(k,""),we&16&&q(X,k,L,I,R,J,z,W))},oe=(p,h,k,L,I,R,J,z,W)=>{p=p||Lr,h=h||Lr;const M=p.length,me=h.length,X=Math.min(M,me);let ae;for(ae=0;ae<X;ae++){const we=h[ae]=W?qn(h[ae]):qt(h[ae]);O(p[ae],we,k,null,I,R,J,z,W)}M>me?es(p,I,R,!0,!1,X):q(h,k,L,I,R,J,z,W,X)},Fe=(p,h,k,L,I,R,J,z,W)=>{let M=0;const me=h.length;let X=p.length-1,ae=me-1;for(;M<=X&&M<=ae;){const we=p[M],Pe=h[M]=W?qn(h[M]):qt(h[M]);if(yr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;M++}for(;M<=X&&M<=ae;){const we=p[X],Pe=h[ae]=W?qn(h[ae]):qt(h[ae]);if(yr(we,Pe))O(we,Pe,k,null,I,R,J,z,W);else break;X--,ae--}if(M>X){if(M<=ae){const we=ae+1,Pe=we<me?h[we].el:L;for(;M<=ae;)O(null,h[M]=W?qn(h[M]):qt(h[M]),k,Pe,I,R,J,z,W),M++}}else if(M>ae)for(;M<=X;)Be(p[M],I,R,!0),M++;else{const we=M,Pe=M,He=new Map;for(M=Pe;M<=ae;M++){const Et=h[M]=W?qn(h[M]):qt(h[M]);Et.key!=null&&(g.NODE_ENV!=="production"&&He.has(Et.key)&&F("Duplicate keys found during update:",JSON.stringify(Et.key),"Make sure keys are unique."),He.set(Et.key,M))}let Me,$t=0;const mt=ae-Pe+1;let zt=!1,It=0;const ns=new Array(mt);for(M=0;M<mt;M++)ns[M]=0;for(M=we;M<=X;M++){const Et=p[M];if($t>=mt){Be(Et,I,R,!0);continue}let dn;if(Et.key!=null)dn=He.get(Et.key);else for(Me=Pe;Me<=ae;Me++)if(ns[Me-Pe]===0&&yr(Et,h[Me])){dn=Me;break}dn===void 0?Be(Et,I,R,!0):(ns[dn-Pe]=M+1,dn>=It?It=dn:zt=!0,O(Et,h[dn],k,null,I,R,J,z,W),$t++)}const Pf=zt?dv(ns):Lr;for(Me=Pf.length-1,M=mt-1;M>=0;M--){const Et=Pe+M,dn=h[Et],Df=Et+1<me?h[Et+1].el:L;ns[M]===0?O(null,dn,k,Df,I,R,J,z,W):zt&&(Me<0||M!==Pf[Me]?ht(dn,k,Df,2):Me--)}}},ht=(p,h,k,L,I=null)=>{const{el:R,type:J,transition:z,children:W,shapeFlag:M}=p;if(M&6){ht(p.component.subTree,h,k,L);return}if(M&128){p.suspense.move(h,k,L);return}if(M&64){J.move(p,h,k,ts);return}if(J===xe){r(R,h,k);for(let X=0;X<W.length;X++)ht(W[X],h,k,L);r(p.anchor,h,k);return}if(J===Lo){te(p,h,k);return}if(L!==2&&M&1&&z)if(L===0)z.beforeEnter(R),r(R,h,k),Nt(()=>z.enter(R),I);else{const{leave:X,delayLeave:ae,afterLeave:we}=z,Pe=()=>r(R,h,k),He=()=>{X(R,()=>{Pe(),we&&we()})};ae?ae(R,Pe,He):He()}else r(R,h,k)},Be=(p,h,k,L=!1,I=!1)=>{const{type:R,props:J,ref:z,children:W,dynamicChildren:M,shapeFlag:me,patchFlag:X,dirs:ae,cacheIndex:we}=p;if(X===-2&&(I=!1),z!=null&&da(z,null,k,p,!0),we!=null&&(h.renderCache[we]=void 0),me&256){h.ctx.deactivate(p);return}const Pe=me&1&&ae,He=!Hr(p);let Me;if(He&&(Me=J&&J.onVnodeBeforeUnmount)&&sn(Me,h,p),me&6)ww(p.component,k,L);else{if(me&128){p.suspense.unmount(k,L);return}Pe&&pr(p,null,h,"beforeUnmount"),me&64?p.type.remove(p,h,k,ts,L):M&&!M.hasOnce&&(R!==xe||X>0&&X&64)?es(M,h,k,!1,!0):(R===xe&&X&384||!I&&me&16)&&es(W,h,k),L&&xt(p)}(He&&(Me=J&&J.onVnodeUnmounted)||Pe)&&Nt(()=>{Me&&sn(Me,h,p),Pe&&pr(p,null,h,"unmounted")},k)},xt=p=>{const{type:h,el:k,anchor:L,transition:I}=p;if(h===xe){g.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&I&&!I.persisted?p.children.forEach(J=>{J.type===Ge?o(J.el):xt(J)}):nr(k,L);return}if(h===Lo){S(p);return}const R=()=>{o(k),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(p.shapeFlag&1&&I&&!I.persisted){const{leave:J,delayLeave:z}=I,W=()=>J(k,R);z?z(p.el,R,W):W()}else R()},nr=(p,h)=>{let k;for(;p!==h;)k=f(p),o(p),p=k;o(h)},ww=(p,h,k)=>{g.NODE_ENV!=="production"&&p.type.__hmrId&&sm(p);const{bum:L,scope:I,job:R,subTree:J,um:z,m:W,a:M}=p;Pc(W),Pc(M),L&&bo(L),I.stop(),R&&(R.flags|=8,Be(J,p,h,k)),z&&Nt(z,h),Nt(()=>{p.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve()),g.NODE_ENV!=="production"&&fm(p)},es=(p,h,k,L=!1,I=!1,R=0)=>{for(let J=R;J<p.length;J++)Be(p[J],h,k,L,I)},_i=p=>{if(p.shapeFlag&6)return _i(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),k=h&&h[Ku];return k?f(k):h};let ml=!1;const kf=(p,h,k)=>{p==null?h._vnode&&Be(h._vnode,null,null,!0):O(h._vnode||null,p,h,null,null,null,k),h._vnode=p,ml||(ml=!0,Lu(),Mu(),ml=!1)},ts={p:O,um:Be,m:ht,r:xt,mt:E,mc:q,pc:he,pbc:V,n:_i,o:e};let Tf,Cf;return{render:kf,hydrate:Tf,createApp:Wm(kf,Tf)}}function Na({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function gr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function cv(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ro(e,t,n=!1){const r=e.children,o=t.children;if(le(r)&&le(o))for(let s=0;s<r.length;s++){const i=r[s];let a=o[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[s]=qn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&Ro(i,a)),a.type===jo&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Ge&&!a.el&&(a.el=i.el)}}function dv(e){const t=e.slice(),n=[0];let r,o,s,i,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(o=n[n.length-1],e[o]<u){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<u?s=a+1:i=a;u<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function Cc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Cc(t)}function Pc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const fv=Symbol.for("v-scx"),pv=()=>{{const e=Ce(fv);return e||g.NODE_ENV!=="production"&&F("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function ft(e,t){return Sa(e,null,t)}function Je(e,t,n){return g.NODE_ENV!=="production"&&!ce(t)&&F("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Sa(e,t,n)}function Sa(e,t,n=je){const{immediate:r,deep:o,flush:s,once:i}=n;g.NODE_ENV!=="production"&&!t&&(r!==void 0&&F('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&F('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),i!==void 0&&F('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=Ke({},n);g.NODE_ENV!=="production"&&(a.onWarn=F);let l;if(Js)if(s==="sync"){const f=pv();l=f.__watcherHandles||(f.__watcherHandles=[])}else if(!t||r)a.once=!0;else return{stop:Qe,resume:Qe,pause:Qe};const u=Ye;a.call=(f,m,b)=>Ht(f,u,m,b);let c=!1;s==="post"?a.scheduler=f=>{Nt(f,u&&u.suspense)}:s!=="sync"&&(c=!0,a.scheduler=(f,m)=>{m?f():Vs(f)}),a.augmentJob=f=>{t&&(f.flags|=4),c&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=Gh(e,t,a);return l&&l.push(d),d}function hv(e,t,n){const r=this.proxy,o=Ze(e)?e.includes(".")?Dc(r,e):()=>r[e]:e.bind(r,r);let s;ce(t)?s=t:(s=t.handler,n=t);const i=Fo(this),a=Sa(o,s.bind(r),n);return i(),a}function Dc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}const mv=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ct(t)}Modifiers`]||e[`${mn(t)}Modifiers`];function vv(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||je;if(g.NODE_ENV!=="production"){const{emitsOptions:c,propsOptions:[d]}=e;if(c)if(!(t in c))(!d||!(lr(Ct(t))in d))&&F(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${lr(Ct(t))}" prop.`);else{const f=c[t];ce(f)&&(f(...n)||F(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&mv(r,t.slice(7));if(i&&(i.trim&&(o=n.map(c=>Ze(c)?c.trim():c)),i.number&&(o=n.map(sh))),g.NODE_ENV!=="production"&&mm(e,t,o),g.NODE_ENV!=="production"){const c=t.toLowerCase();c!==t&&r[lr(c)]&&F(`Event "${c}" is emitted in component ${Ys(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${mn(t)}" instead of "${t}".`)}let a,l=r[a=lr(t)]||r[a=lr(Ct(t))];!l&&s&&(l=r[a=lr(mn(t))]),l&&Ht(l,e,6,o);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Ht(u,e,6,o)}}function $c(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},a=!1;if(!ce(e)){const l=u=>{const c=$c(u,t,!0);c&&(a=!0,Ke(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(Ie(e)&&r.set(e,null),null):(le(s)?s.forEach(l=>i[l]=null):Ke(i,s),Ie(e)&&r.set(e,i),i)}function qs(e,t){return!e||!go(t)?!1:(t=t.slice(2).replace(/Once$/,""),De(e,t[0].toLowerCase()+t.slice(1))||De(e,mn(t))||De(e,t))}let xa=!1;function Ws(){xa=!0}function ka(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:m,ctx:b,inheritAttrs:O}=e,w=Ls(e);let $,H;g.NODE_ENV!=="production"&&(xa=!1);try{if(n.shapeFlag&4){const S=o||r,U=g.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy(S,{get(j,ge,q){return F(`Property '${String(ge)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(j,ge,q)}}):S;$=qt(u.call(U,S,c,g.NODE_ENV!=="production"?en(d):d,m,f,b)),H=a}else{const S=t;g.NODE_ENV!=="production"&&a===d&&Ws(),$=qt(S.length>1?S(g.NODE_ENV!=="production"?en(d):d,g.NODE_ENV!=="production"?{get attrs(){return Ws(),en(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):S(g.NODE_ENV!=="production"?en(d):d,null)),H=t.props?a:gv(a)}}catch(S){Mo.length=0,xo(S,e,1),$=Z(Ge)}let T=$,te;if(g.NODE_ENV!=="production"&&$.patchFlag>0&&$.patchFlag&2048&&([T,te]=Ic($)),H&&O!==!1){const S=Object.keys(H),{shapeFlag:U}=T;if(S.length){if(U&7)s&&S.some(vs)&&(H=yv(H,s)),T=Zt(T,H,!1,!0);else if(g.NODE_ENV!=="production"&&!xa&&T.type!==Ge){const j=Object.keys(a),ge=[],q=[];for(let A=0,V=j.length;A<V;A++){const D=j[A];go(D)?vs(D)||ge.push(D[2].toLowerCase()+D.slice(3)):q.push(D)}q.length&&F(`Extraneous non-props attributes (${q.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),ge.length&&F(`Extraneous non-emits event listeners (${ge.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(g.NODE_ENV!=="production"&&!Ac(T)&&F("Runtime directive used on component with non-element root node. The directives will not function as intended."),T=Zt(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!Ac(T)&&F("Component inside <Transition> renders non-element root node that cannot be animated."),$o(T,n.transition)),g.NODE_ENV!=="production"&&te?te(T):$=T,Ls(w),$}const Ic=e=>{const t=e.children,n=e.dynamicChildren,r=Ta(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Ic(r)}else return[e,void 0];const o=t.indexOf(r),s=n?n.indexOf(r):-1,i=a=>{t[o]=a,n&&(s>-1?n[s]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[qt(r),i]};function Ta(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(Zr(o)){if(o.type!==Ge||o.children==="v-if"){if(n)return;if(n=o,g.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return Ta(n.children)}}else return}return n}const gv=e=>{let t;for(const n in e)(n==="class"||n==="style"||go(n))&&((t||(t={}))[n]=e[n]);return t},yv=(e,t)=>{const n={};for(const r in e)(!vs(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Ac=e=>e.shapeFlag&7||e.type===Ge;function bv(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,u=s.emitsOptions;if(g.NODE_ENV!=="production"&&(o||a)&&Bn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Vc(r,i,u):!!i;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==r[f]&&!qs(u,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Vc(r,i,u):!0:!!i;return!1}function Vc(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const s=r[o];if(t[s]!==e[s]&&!qs(n,s))return!0}return!1}function _v({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const Rc=e=>e.__isSuspense;function wv(e,t){t&&t.pendingBranch?le(e)?t.effects.push(...e):t.effects.push(e):ju(e)}const xe=Symbol.for("v-fgt"),jo=Symbol.for("v-txt"),Ge=Symbol.for("v-cmt"),Lo=Symbol.for("v-stc"),Mo=[];let Pt=null;function y(e=!1){Mo.push(Pt=e?null:[])}function Ev(){Mo.pop(),Pt=Mo[Mo.length-1]||null}let Uo=1;function jc(e){Uo+=e,e<0&&Pt&&(Pt.hasOnce=!0)}function Lc(e){return e.dynamicChildren=Uo>0?Pt||Lr:null,Ev(),Uo>0&&Pt&&Pt.push(e),e}function x(e,t,n,r,o,s){return Lc(N(e,t,n,r,o,s,!0))}function Ne(e,t,n,r,o){return Lc(Z(e,t,n,r,o,!0))}function Zr(e){return e?e.__v_isVNode===!0:!1}function yr(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=Rs.get(t.type);if(n&&n.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const Ov=(...e)=>Uc(...e),Mc=({key:e})=>e??null,zs=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ze(e)||qe(e)||ce(e)?{i:tt,r:e,k:t,f:!!n}:e:null);function N(e,t=null,n=null,r=0,o=null,s=e===xe?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Mc(t),ref:t&&zs(t),scopeId:Wu,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:tt};return a?(Ca(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Ze(n)?8:16),g.NODE_ENV!=="production"&&l.key!==l.key&&F("VNode created with invalid key (NaN). VNode type:",l.type),Uo>0&&!i&&Pt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Pt.push(l),l}const Z=g.NODE_ENV!=="production"?Ov:Uc;function Uc(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===ac)&&(g.NODE_ENV!=="production"&&!e&&F(`Invalid vnode type when creating vnode: ${e}.`),e=Ge),Zr(e)){const a=Zt(e,t,!0);return n&&Ca(a,n),Uo>0&&!s&&Pt&&(a.shapeFlag&6?Pt[Pt.indexOf(e)]=a:Pt.push(a)),a.patchFlag=-2,a}if(zc(e)&&(e=e.__vccOpts),t){t=Nv(t);let{class:a,style:l}=t;a&&!Ze(a)&&(t.class=_s(a)),Ie(l)&&(So(l)&&!le(l)&&(l=Ke({},l)),t.style=Ui(l))}const i=Ze(e)?1:Rc(e)?128:Gu(e)?64:Ie(e)?4:ce(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&So(e)&&(e=ye(e),F("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
14
14
  Component that was made reactive: `,e)),N(e,t,n,r,o,i,s,!0)}function Nv(e){return e?So(e)||bc(e)?Ke({},e):e:null}function Zt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,u=t?Pa(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Mc(u),ref:t&&t.ref?n&&s?le(s)?s.concat(zs(t)):[s,zs(t)]:zs(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&le(a)?a.map(Fc):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Zt(e.ssContent),ssFallback:e.ssFallback&&Zt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&$o(c,l.clone(c)),c}function Fc(e){const t=Zt(e);return le(e.children)&&(t.children=e.children.map(Fc)),t}function ke(e=" ",t=0){return Z(jo,null,e,t)}function Sv(e,t){const n=Z(Lo,null,e);return n.staticCount=t,n}function fe(e="",t=!1){return t?(y(),Ne(Ge,null,e)):Z(Ge,null,e)}function qt(e){return e==null||typeof e=="boolean"?Z(Ge):le(e)?Z(xe,null,e.slice()):typeof e=="object"?qn(e):Z(jo,null,String(e))}function qn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Zt(e)}function Ca(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(le(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Ca(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!bc(t)?t._ctx=tt:o===3&&tt&&(tt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ce(t)?(t={default:t,_ctx:tt},n=32):(t=String(t),r&64?(n=16,t=[ke(t)]):n=8);e.children=t,e.shapeFlag|=n}function Pa(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=_s([t.class,r.class]));else if(o==="style")t.style=Ui([t.style,r.style]);else if(go(o)){const s=t[o],i=r[o];i&&s!==i&&!(le(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function sn(e,t,n,r=null){Ht(e,t,7,[n,r])}const xv=vc();let kv=0;function Tv(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||xv,s={uid:kv++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ou(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:wc(r,o),emitsOptions:$c(r,o),emit:null,emitted:null,propsDefaults:je,inheritAttrs:r.inheritAttrs,ctx:je,data:je,props:je,attrs:je,slots:je,refs:je,setupState:je,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return g.NODE_ENV!=="production"?s.ctx=Rm(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=vv.bind(null,s),e.ce&&e.ce(s),s}let Ye=null;const Ks=()=>Ye||tt;let Gs,Da;{const e=Mi(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),s=>{o.length>1?o.forEach(i=>i(s)):o[0](s)}};Gs=t("__VUE_INSTANCE_SETTERS__",n=>Ye=n),Da=t("__VUE_SSR_SETTERS__",n=>Js=n)}const Fo=e=>{const t=Ye;return Gs(e),e.scope.on(),()=>{e.scope.off(),Gs(t)}},Bc=()=>{Ye&&Ye.scope.off(),Gs(null)},Cv=hn("slot,component");function $a(e,{isNativeTag:t}){(Cv(e)||t(e))&&F("Do not use built-in or reserved HTML elements as component id: "+e)}function Hc(e){return e.vnode.shapeFlag&4}let Js=!1;function Pv(e,t=!1,n=!1){t&&Da(t);const{props:r,children:o}=e.vnode,s=Hc(e);Km(e,r,s,t),sv(e,o,n);const i=s?Dv(e,t):void 0;return t&&Da(!1),i}function Dv(e,t){var n;const r=e.type;if(g.NODE_ENV!=="production"){if(r.name&&$a(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)$a(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)zu(s[i])}r.compilerOptions&&$v()&&F('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,cc),g.NODE_ENV!=="production"&&jm(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?Av(e):null,i=Fo(e);vn();const a=Ur(o,e,0,[g.NODE_ENV!=="production"?en(e.props):e.props,s]);if(gn(),i(),Ri(a)){if(Hr(e)||sc(e),a.then(Bc,Bc),t)return a.then(l=>{Zc(e,l,t)}).catch(l=>{xo(l,e,0)});if(e.asyncDep=a,g.NODE_ENV!=="production"&&!e.suspense){const l=(n=r.name)!=null?n:"Anonymous";F(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else Zc(e,a,t)}else qc(e,t)}function Zc(e,t,n){ce(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ie(t)?(g.NODE_ENV!=="production"&&Zr(t)&&F("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Du(t),g.NODE_ENV!=="production"&&Lm(e)):g.NODE_ENV!=="production"&&t!==void 0&&F(`setup() should return an object. Received: ${t===null?"null":typeof t}`),qc(e,n)}let Ia;const $v=()=>!Ia;function qc(e,t,n){const r=e.type;if(!e.render){if(!t&&Ia&&!r.render){const o=r.template||ba(e).template;if(o){g.NODE_ENV!=="production"&&wn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=Ke(Ke({isCustomElement:s,delimiters:a},i),l);r.render=Ia(o,u),g.NODE_ENV!=="production"&&En(e,"compile")}}e.render=r.render||Qe}{const o=Fo(e);vn();try{Um(e)}finally{gn(),o()}}g.NODE_ENV!=="production"&&!r.render&&e.render===Qe&&!t&&(r.template?F('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):F("Component is missing template or render function: ",r))}const Wc=g.NODE_ENV!=="production"?{get(e,t){return Ws(),et(e,"get",""),e[t]},set(){return F("setupContext.attrs is readonly."),!1},deleteProperty(){return F("setupContext.attrs is readonly."),!1}}:{get(e,t){return et(e,"get",""),e[t]}};function Iv(e){return new Proxy(e.slots,{get(t,n){return et(e,"get","$slots"),t[n]}})}function Av(e){const t=n=>{if(g.NODE_ENV!=="production"&&(e.exposed&&F("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(le(n)?r="array":qe(n)&&(r="ref")),r!=="object"&&F(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(g.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,Wc))},get slots(){return r||(r=Iv(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,Wc),slots:e.slots,emit:e.emit,expose:t}}function Aa(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Du(Ln(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mr)return mr[n](e)},has(t,n){return n in t||n in mr}})):e.proxy}const Vv=/(?:^|[-_])(\w)/g,Rv=e=>e.replace(Vv,t=>t.toUpperCase()).replace(/[-_]/g,"");function Va(e,t=!0){return ce(e)?e.displayName||e.name:e.name||t&&e.__name}function Ys(e,t,n=!1){let r=Va(t);if(!r&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(r=o[1])}if(!r&&e&&e.parent){const o=s=>{for(const i in s)if(s[i]===t)return i};r=o(e.components||e.parent.type.components)||o(e.appContext.components)}return r?Rv(r):n?"App":"Anonymous"}function zc(e){return ce(e)&&"__vccOpts"in e}const Q=(e,t)=>{const n=zh(e,t,Js);if(g.NODE_ENV!=="production"){const r=Ks();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Ue(e,t,n){const r=arguments.length;return r===2?Ie(t)&&!le(t)?Zr(t)?Z(e,null,[t]):Z(e,t):Z(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Zr(n)&&(n=[n]),Z(e,t,n))}function jv(){if(g.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},o={__vue_custom_formatter:!0,header(d){return Ie(d)?d.__isVue?["div",e,"VueInstance"]:qe(d)?["div",{},["span",e,c(d)],"<",a("_value"in d?d._value:d),">"]:tn(d)?["div",{},["span",e,Ot(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${bn(d)?" (readonly)":""}`]:bn(d)?["div",{},["span",e,Ot(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]:null:null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...s(d.$)]}};function s(d){const f=[];d.type.props&&d.props&&f.push(i("props",ye(d.props))),d.setupState!==je&&f.push(i("setup",d.setupState)),d.data!==je&&f.push(i("data",ye(d.data)));const m=l(d,"computed");m&&f.push(i("computed",m));const b=l(d,"inject");return b&&f.push(i("injected",b)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=Ke({},f),Object.keys(f).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(f).map(m=>["div",{},["span",r,m+": "],a(f[m],!1)])]]:["span",{}]}function a(d,f=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",n,JSON.stringify(d)]:typeof d=="boolean"?["span",r,d]:Ie(d)?["object",{object:f?ye(d):d}]:["span",n,String(d)]}function l(d,f){const m=d.type;if(ce(m))return;const b={};for(const O in d.ctx)u(m,O,f)&&(b[O]=d.ctx[O]);return b}function u(d,f,m){const b=d[m];if(le(b)&&b.includes(f)||Ie(b)&&f in b||d.extends&&u(d.extends,f,m)||d.mixins&&d.mixins.some(O=>u(O,f,m)))return!0}function c(d){return Ot(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const Kc="3.5.3",On=g.NODE_ENV!=="production"?F:Qe;var an={};let Ra;const Gc=typeof window<"u"&&window.trustedTypes;if(Gc)try{Ra=Gc.createPolicy("vue",{createHTML:e=>e})}catch(e){an.NODE_ENV!=="production"&&On(`Error creating trusted types policy: ${e}`)}const Jc=Ra?e=>Ra.createHTML(e):e=>e,Lv="http://www.w3.org/2000/svg",Mv="http://www.w3.org/1998/Math/MathML",Nn=typeof document<"u"?document:null,Yc=Nn&&Nn.createElement("template"),Uv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Nn.createElementNS(Lv,e):t==="mathml"?Nn.createElementNS(Mv,e):n?Nn.createElement(e,{is:n}):Nn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Nn.createTextNode(e),createComment:e=>Nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{Yc.innerHTML=Jc(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Yc.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Wn="transition",Bo="animation",Ho=Symbol("_vtc"),Xc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Fv=Ke({},Qu,Xc),ja=(e=>(e.displayName="Transition",e.props=Fv,e))((e,{slots:t})=>Ue(Em,Bv(e),t)),br=(e,t=[])=>{le(e)?e.forEach(n=>n(...t)):e&&e(...t)},Qc=e=>e?le(e)?e.some(t=>t.length>1):e.length>1:!1;function Bv(e){const t={};for(const D in e)D in Xc||(t[D]=e[D]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:u=i,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,b=Hv(o),O=b&&b[0],w=b&&b[1],{onBeforeEnter:$,onEnter:H,onEnterCancelled:T,onLeave:te,onLeaveCancelled:S,onBeforeAppear:U=$,onAppear:j=H,onAppearCancelled:ge=T}=t,q=(D,ie,$e)=>{_r(D,ie?c:a),_r(D,ie?u:i),$e&&$e()},A=(D,ie)=>{D._isLeaving=!1,_r(D,d),_r(D,m),_r(D,f),ie&&ie()},V=D=>(ie,$e)=>{const E=D?j:H,P=()=>q(ie,D,$e);br(E,[ie,P]),ed(()=>{_r(ie,D?l:s),zn(ie,D?c:a),Qc(E)||td(ie,r,O,P)})};return Ke(t,{onBeforeEnter(D){br($,[D]),zn(D,s),zn(D,i)},onBeforeAppear(D){br(U,[D]),zn(D,l),zn(D,u)},onEnter:V(!1),onAppear:V(!0),onLeave(D,ie){D._isLeaving=!0;const $e=()=>A(D,ie);zn(D,d),zn(D,f),Wv(),ed(()=>{D._isLeaving&&(_r(D,d),zn(D,m),Qc(te)||td(D,r,w,$e))}),br(te,[D,$e])},onEnterCancelled(D){q(D,!1),br(T,[D])},onAppearCancelled(D){q(D,!0),br(ge,[D])},onLeaveCancelled(D){A(D),br(S,[D])}})}function Hv(e){if(e==null)return null;if(Ie(e))return[La(e.enter),La(e.leave)];{const t=La(e);return[t,t]}}function La(e){const t=ih(e);return an.NODE_ENV!=="production"&&em(t,"<transition> explicit duration"),t}function zn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ho]||(e[Ho]=new Set)).add(t)}function _r(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ho];n&&(n.delete(t),n.size||(e[Ho]=void 0))}function ed(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Zv=0;function td(e,t,n,r){const o=e._endId=++Zv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=qv(e,t);if(!i)return r();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=m=>{m.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function qv(e,t){const n=window.getComputedStyle(e),r=b=>(n[b]||"").split(", "),o=r(`${Wn}Delay`),s=r(`${Wn}Duration`),i=nd(o,s),a=r(`${Bo}Delay`),l=r(`${Bo}Duration`),u=nd(a,l);let c=null,d=0,f=0;t===Wn?i>0&&(c=Wn,d=i,f=s.length):t===Bo?u>0&&(c=Bo,d=u,f=l.length):(d=Math.max(i,u),c=d>0?i>u?Wn:Bo:null,f=c?c===Wn?s.length:l.length:0);const m=c===Wn&&/\b(transform|all)(,|$)/.test(r(`${Wn}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:m}}function nd(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>rd(n)+rd(e[r])))}function rd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Wv(){return document.body.offsetHeight}function zv(e,t,n){const r=e[Ho];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const od=Symbol("_vod"),Kv=Symbol("_vsh"),Gv=Symbol(an.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),Jv=/(^|;)\s*display\s*:/;function Yv(e,t,n){const r=e.style,o=Ze(n);let s=!1;if(n&&!o){if(t)if(Ze(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Xs(r,a,"")}else for(const i in t)n[i]==null&&Xs(r,i,"");for(const i in n)i==="display"&&(s=!0),Xs(r,i,n[i])}else if(o){if(t!==n){const i=r[Gv];i&&(n+=";"+i),r.cssText=n,s=Jv.test(n)}}else t&&e.removeAttribute("style");od in e&&(e[od]=s?r.display:"",e[Kv]&&(r.display="none"))}const Xv=/[^\\];\s*$/,sd=/\s*!important$/;function Xs(e,t,n){if(le(n))n.forEach(r=>Xs(e,t,r));else if(n==null&&(n=""),an.NODE_ENV!=="production"&&Xv.test(n)&&On(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=Qv(e,t);sd.test(n)?e.setProperty(mn(r),n.replace(sd,""),"important"):e[r]=n}}const id=["Webkit","Moz","ms"],Ma={};function Qv(e,t){const n=Ma[t];if(n)return n;let r=Ct(t);if(r!=="filter"&&r in e)return Ma[t]=r;r=ar(r);for(let o=0;o<id.length;o++){const s=id[o]+r;if(s in e)return Ma[t]=s}return t}const ad="http://www.w3.org/1999/xlink";function ld(e,t,n,r,o,s=gh(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ad,t.slice(6,t.length)):e.setAttributeNS(ad,t,n):n==null||s&&!tu(n)?e.removeAttribute(t):e.setAttribute(t,s?"":Vn(n)?String(n):n)}function eg(e,t,n,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Jc(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const i=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(i!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=tu(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){an.NODE_ENV!=="production"&&!s&&On(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function tg(e,t,n,r){e.addEventListener(t,n,r)}function ng(e,t,n,r){e.removeEventListener(t,n,r)}const ud=Symbol("_vei");function rg(e,t,n,r,o=null){const s=e[ud]||(e[ud]={}),i=s[t];if(r&&i)i.value=an.NODE_ENV!=="production"?dd(r,t):r;else{const[a,l]=og(t);if(r){const u=s[t]=ag(an.NODE_ENV!=="production"?dd(r,t):r,o);tg(e,a,u,l)}else i&&(ng(e,a,i,l),s[t]=void 0)}}const cd=/(?:Once|Passive|Capture)$/;function og(e){let t;if(cd.test(e)){t={};let r;for(;r=e.match(cd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):mn(e.slice(2)),t]}let Ua=0;const sg=Promise.resolve(),ig=()=>Ua||(sg.then(()=>Ua=0),Ua=Date.now());function ag(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ht(lg(r,n.value),t,5,[r])};return n.value=e,n.attached=ig(),n}function dd(e,t){return ce(e)||le(e)?e:(On(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
15
- Expected function or array of functions, received type ${typeof e}.`),Qe)}function lg(e,t){if(le(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const fd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ug=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?zv(e,r,i):t==="style"?Yv(e,n,r):go(t)?vs(t)||rg(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):cg(e,t,r,i))?(eg(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ld(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),ld(e,t,r,i))};function cg(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&fd(t)&&ce(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return fd(t)&&Ze(n)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!Ze(n)))}const dg=["ctrl","shift","alt","meta"],fg={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>dg.some(n=>e[`${n}Key`]&&!t.includes(n))},pg=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...s)=>{for(let i=0;i<t.length;i++){const a=fg[t[i]];if(a&&a(o,t))return}return e(o,...s)})},hg=Ke({patchProp:ug},Uv);let pd;function mg(){return pd||(pd=lv(hg))}const vg=(...e)=>{const t=mg().createApp(...e);an.NODE_ENV!=="production"&&(yg(t),bg(t));const{mount:n}=t;return t.mount=r=>{const o=_g(r);if(!o)return;const s=t._component;!ce(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,gg(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function gg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function yg(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>hh(t)||mh(t)||vh(t),writable:!1})}function bg(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){On("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=e.config.compilerOptions,r='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return On(r),n},set(){On(r)}})}}function _g(e){if(Ze(e)){const t=document.querySelector(e);return an.NODE_ENV!=="production"&&!t&&On(`Failed to mount app: mount target selector "${e}" returned null.`),t}return an.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&On('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var wg={};function Eg(){jv()}wg.NODE_ENV!=="production"&&Eg();let Qs;const Og=new Uint8Array(16);function Ng(){if(!Qs&&(Qs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qs(Og)}const st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function Sg(e,t=0){return st[e[t+0]]+st[e[t+1]]+st[e[t+2]]+st[e[t+3]]+"-"+st[e[t+4]]+st[e[t+5]]+"-"+st[e[t+6]]+st[e[t+7]]+"-"+st[e[t+8]]+st[e[t+9]]+"-"+st[e[t+10]]+st[e[t+11]]+st[e[t+12]]+st[e[t+13]]+st[e[t+14]]+st[e[t+15]]}const hd={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Fa(e,t,n){if(hd.randomUUID&&!t&&!e)return hd.randomUUID();e=e||{};const r=e.random||(e.rng||Ng)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Sg(r)}var Kn=Symbol("storefront");function xg(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var kg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),intent:v.string().optional()}),Tg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed"),order:Gl.orders.completedOrderSchema}),Cg=v.discriminatedUnion("event",[kg,Tg]);function Pg(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function md(e){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}const t=document.createElement("iframe");t.id="moonbase-checkout",t.src=e,t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.right="0px",t.style.border="none",t.style.colorScheme="normal",t.style.backgroundColor="transparent",t.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),t.setAttribute("background","transparent"),t.setAttribute("frameborder","0"),t.setAttribute("allowtransparency","true"),t.setAttribute("allow","payment"),t.height="100%",t.width="100%",document.body.append(t),document.documentElement.style.overflow="hidden",window.onmessage=function(n){var r;try{const o=Cg.parse(n.data);o.event==="close"&&(document.body.contains(t)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(t)),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:o}))),o.event==="completed"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:o}))}catch(o){((r=n.data)==null?void 0:r.source)==="moonbase-checkout"&&console.error("Could not parse event:",n.data,o)}}}var ei=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=Q(()=>!!this.utm.value&&Object.values(this.utm.value).some(l=>!!l)),this.currentUser=C(null),this.loadedUser=C(!1),this.debouncedPushOrderContent=xg(l=>this.client.orders.pushContent(l,void 0,this.hasUtm.value?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=C({id:Fa(),status:mo.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1),this.utm=r(`${lt.storefrontKey}_utm`,void 0);return}const s=new URLSearchParams(window.location.search);this.utm=r(`${lt.storefrontKey}_utm`,{referrer:((o=window.document.referrer)==null?void 0:o.replace(/https?:\/\//g,"").split("/")[0])||void 0,source:s.get("utm_source")||void 0,medium:s.get("utm_medium")||void 0,campaign:s.get("utm_campaign")||void 0,term:s.get("utm_term")||void 0,content:s.get("utm_content")||void 0}),window.addEventListener("storage",l=>this.handleStorageUpdate(l));const i=localStorage.getItem(lt.sessionKey);i?(this.currentOrder=C(JSON.parse(i)),this.refreshOrder()):this.currentOrder=C({id:Fa(),status:mo.Open,currency:"",items:[],couponsApplied:[]});const a=localStorage.getItem(lt.storefrontKey);if(a?(this.storefront=r(lt.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!0)):(this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const l=new URLSearchParams(window.location.search),u=l.get("mb_intent"),c=l.get("mb_endpoint");if(u==="checkout"&&l.get("mb_complete")&&c){const d=Object.fromEntries([...l.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(c));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);md(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{Je(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get loadedUserPromise(){return new Promise(t=>{Je(this.loadedUser,n=>{n&&t()},{immediate:!0})})}closeCheckout(){Pg()}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",n=>t(n.detail.order))}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.intent))}install(t){t.provide(Kn,this),console.log("Moonbase.sh storefront installed, learn more at https://moonbase.sh/docs")}async updateUser(){try{this.currentUser.value=await this.client.identity.get()}catch(t){t instanceof Ci||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}return this.currentUser.value}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm.value?this.utm.value:void 0);return t&&(typeof window<"u"&&localStorage.setItem(lt.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency)),t}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){switch(t.key){case lt.sessionKey:this.currentOrder.value=JSON.parse(t.newValue);break;case lt.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break}}async refreshOrder(){try{const t=await this.client.orders.get(this.currentOrder.value.id);t&&(t.status!==mo.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:Fa(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:mo.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}async surrenderOrder(){try{await this.client.orders.removeBillingDetails(this.currentOrder.value.id)}catch(t){if(t instanceof An)return;console.warn("Could not surrender order:",t)}}};ei.userKey="moonbase_user",ei.sessionKey="moonbase_session",ei.storefrontKey="moonbase_storefront";var Dg=ei;function vd(e,t){const n=t??Ce(Kn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function gd(e,t){const n=t??Ce(Kn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function ti(e){const t=Ce(Kn);if(!t)throw new Error("No storefront configured");return{getLicenses:async n=>t.client.inventory.licenses.get(n),getLicenseActivations:async(n,r)=>t.client.inventory.licenses.getActivations(n,r),getProduct:async(n,r)=>t.client.inventory.products.get(n,r),getProducts:async n=>t.client.inventory.products.getOwned(n),getProductLicenses:async(n,r)=>t.client.inventory.products.getLicenses(n,r),getProductActivations:async(n,r)=>t.client.inventory.products.getActivations(n,r),revokeActivation:async n=>t.client.inventory.licenses.revokeActivation(n.licenseId,n.id),activateProduct:async(n,r)=>t.client.inventory.activation.activate(n,r),downloadProduct:async n=>{if(!n.path)throw new Error("Product is not downloadable");window.location.href=await t.client.inventory.products.getDownloadUrl(n.path)}}}function $g(e,t){const n=Ce(Kn);if(!n)throw new Error("No storefront configured");const r=n.stateFactory(`activation-request-${Mn(e)}`,null),o=n.stateFactory(`activation-request-${Mn(e)}-error`,null),s=n.stateFactory(`activation-request-${Mn(e)}-loading`,!0),i=n.stateFactory(`activation-request-${Mn(e)}-fulfilling`,!1),a=n.stateFactory(`activation-request-${Mn(e)}-completing`,!1),l=n.stateFactory(`activation-request-${Mn(e)}-completion-timeout`,null),u=async()=>{if(!r.value)return;await n.client.activationRequests.isCompleted(r.value.id)&&r.value?(r.value.status=Xt.Completed,a.value=!1):l.value=setTimeout(u,1500)};return Je(()=>Mn(e),async c=>{try{c&&c.length>0?(r.value=await n.client.activationRequests.get(c),r.value.status===Xt.Fulfilled&&(a.value=!0,u()),s.value=!1):console.warn("No token given to `useActivationRequest`")}catch(d){o.value=d,s.value=!1}},{immediate:!0}),fa(()=>{l.value&&clearTimeout(l.value)}),Je(n.currentUser,async()=>{var c,d;const f=Mn(e);if(!(!f||(d=(c=r.value)==null?void 0:c.licenseEligibility)!=null&&d.eligible)){s.value=!0;try{r.value=await n.client.activationRequests.get(f),r.value.status===Xt.Fulfilled&&(a.value=!0,u())}catch(m){o.value=m}s.value=!1}}),{activationRequest:r,loading:s,fulfilling:i,completing:a,error:o,isInstalled:Q(()=>{var c;return r&&((c=r.value)==null?void 0:c.status)===Xt.Completed}),fulfillLicense:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillLicense(r.value.id),i.value=!1,a.value=!0,u()},fulfillTrial:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillTrial(r.value.id),i.value=!1,a.value=!0,u()},cancel:async()=>{!r.value||r.value.status===Xt.Cancelled||(r.value=await n.client.activationRequests.cancel(r.value.id))}}}function Ig(e){const t=Ce(Kn);if(!t)throw new Error("No storefront configured");return{peek:async n=>{try{return await t.client.vouchers.peek(n)}catch(r){throw r instanceof An?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof An?new Error("Voucher code invalid"):r}}}}function Ba(e){const t=e??Ce(Kn);if(!t)throw new Error("No storefront configured");return{items:Q(()=>t.currentOrder.value.items.map(n=>{var r,o;if(n.type==="Product"){const s=t.storefront.value.products.find(l=>l.id===n.productId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,product:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(r=a==null?void 0:a.discount)!=null?r:n.appliedDiscount}}else{const s=t.storefront.value.bundles.find(l=>l.id===n.bundleId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,bundle:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(o=a==null?void 0:a.discount)!=null?o:n.appliedDiscount}}})),currency:Q(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:Q(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,l,u,c,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(w=>w.id===s.productId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(l=(a=O==null?void 0:O.price[n])!=null?a:(i=m==null?void 0:m.defaultVariation)==null?void 0:i.price[n])!=null?l:0}else{const m=t.storefront.value.bundles.find(w=>w.id===s.bundleId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(d=(c=O==null?void 0:O.price[n])!=null?c:(u=m==null?void 0:m.defaultVariation)==null?void 0:u.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=_(n),r??(r=n.defaultVariation),!r)throw new Error("Added item does not have a default variation, and none have been specified");const o=`${n.type==="bundle"?"b":"p"}/${n.id}/${r.id}`;let s=t.currentOrder.value.items.find(i=>i.id===o);if(s)s.quantity+=1;else if(n.type==="bundle")s={id:o,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s);else if(n.type==="product")s={id:o,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s);else throw new jr("Invalid input",`Could not handle item of type '${n.type}'`);return t.pushOrderContent(),s},setQuantity:(n,r)=>{const o=t.currentOrder.value.items.find(s=>s.id===n.id);if(!o)throw new Error("Cart item not found");if(o.quantity=r,o.quantity<=0){const s=t.currentOrder.value.items.findIndex(i=>i.id===o.id);t.currentOrder.value.items.splice(s,1)}return t.pushOrderContent(),n},removeFromCart:n=>{const r=t.currentOrder.value.items.findIndex(o=>o.id===n.id);t.currentOrder.value.items.splice(r,1),t.pushOrderContent()},checkout:async n=>{const r=new URL(n.returnUrl,document.baseURI).href,o=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:r});if(!n.redirect&&o.embeddedCheckoutUrl&&typeof window<"u"){const s=o.embeddedCheckoutUrl;return new Promise(i=>{md(s.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",a=>{i({next:a.detail.next})})})}else{if(n.redirect&&o.checkoutUrl&&typeof window<"u")return window.location.href=o.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function St(e){const t=e??Ce(Kn);if(!t)throw new Error("No storefront configured");return{user:t.currentUser,loaded:t.loadedUser,loadedPromise:t.loadedUserPromise,signIn:async(n,r)=>{const o=await t.client.identity.signIn(n,r);return t.currentUser.value=o,t.updateStorefront(),o},signUp:async(n,r,o,s,i,a,l)=>{const u=await t.client.identity.signUp(n,r,o,s,i,a,l);return t.currentUser.value=u,t.updateStorefront(),u},signOut:async()=>{t.client.tokenStore.setUser(null),await Promise.all([t.updateStorefront(),t.surrenderOrder()]),t.currentUser.value=null},update:async(n,r,o,s)=>{const i=await t.client.identity.update(n,r,o,s);return t.currentUser.value&&(t.currentUser.value.name=n,s&&(t.currentUser.value.communicationPreferences=s)),i},setPassword:async(n,r)=>{await t.client.identity.setPassword(n,r)},forgotPassword:async n=>{await t.client.identity.forgotPassword(n)},resetPassword:async(n,r,o)=>{await t.client.identity.resetPassword(n,r,o)},confirmAccount:async(n,r)=>await t.client.identity.confirmAccount(n,r),confirmEmail:async(n,r)=>await t.client.identity.confirmEmail(n,r),confirmEmailChange:async(n,r)=>(await t.client.identity.confirmEmailChange(n,r),await t.updateUser())}}function Ag(e,t){const n={endpoint:e};return new Dg(n,new Qp(n),(r,o)=>C(o))}var yd=!1;function ni(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Ha(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Vg(){return bd().__VUE_DEVTOOLS_GLOBAL_HOOK__}function bd(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Rg=typeof Proxy=="function",jg="devtools-plugin:setup",Lg="plugin:settings:set";let qr,Za;function Mg(){var e;return qr!==void 0||(typeof window<"u"&&window.performance?(qr=!0,Za=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(qr=!0,Za=globalThis.perf_hooks.performance):qr=!1),qr}function Ug(){return Mg()?Za.now():Date.now()}class Fg{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const i in t.settings){const a=t.settings[i];r[i]=a.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(o),a=JSON.parse(i);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(o,JSON.stringify(i))}catch{}s=i},now(){return Ug()}},n&&n.on(Lg,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:a,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function _d(e,t){const n=e,r=bd(),o=Vg(),s=Rg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(jg,e,t);else{const i=s?new Fg(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Te={};let Zo;const qo=e=>Zo=e,wd=Te.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function wr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ln;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ln||(ln={}));const Er=typeof window<"u",Ed=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function Bg(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function qa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Sd(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Od(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function ri(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const oi=typeof navigator=="object"?navigator:{userAgent:""},Nd=/Macintosh/.test(oi.userAgent)&&/AppleWebKit/.test(oi.userAgent)&&!/Safari/.test(oi.userAgent),Sd=Er?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Nd?Hg:"msSaveOrOpenBlob"in oi?Zg:qg:()=>{};function Hg(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?Od(r.href)?qa(e,t,n):(r.target="_blank",ri(r)):ri(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){ri(r)},0))}function Zg(e,t="download",n){if(typeof e=="string")if(Od(e))qa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){ri(r)})}else navigator.msSaveOrOpenBlob(Bg(e,n),t)}function qg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return qa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Ed.HTMLElement))||"safari"in Ed,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Nd)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let l=a.result;if(typeof l!="string")throw r=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=l:location.assign(l),r=null},a.readAsDataURL(e)}else{const a=URL.createObjectURL(e);r?r.location.assign(a):location.href=a,r=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function ot(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Wa(e){return"_a"in e&&"install"in e}function xd(){if(!("clipboard"in navigator))return ot("Your browser doesn't support the Clipboard API","error"),!0}function kd(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(ot('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Wg(e){if(!xd())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),ot("Global state copied to clipboard.")}catch(t){if(kd(t))return;ot("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function zg(e){if(!xd())try{Td(e,JSON.parse(await navigator.clipboard.readText())),ot("Global state pasted from clipboard.")}catch(t){if(kd(t))return;ot("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function Kg(e){try{Sd(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){ot("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let Sn;function Gg(){Sn||(Sn=document.createElement("input"),Sn.type="file",Sn.accept=".json");function e(){return new Promise((t,n)=>{Sn.onchange=async()=>{const r=Sn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},Sn.oncancel=()=>t(null),Sn.onerror=n,Sn.click()})}return e}async function Jg(e){try{const n=await Gg()();if(!n)return;const{text:r,file:o}=n;Td(e,JSON.parse(r)),ot(`Global state imported from "${o.name}".`)}catch(t){ot("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Td(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function Wt(e){return{_custom:{display:e}}}const Cd="🍍 Pinia (root)",si="_root";function Yg(e){return Wa(e)?{id:si,label:Cd}:{id:e.$id,label:e.$id}}function Xg(e){if(Wa(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>r.get(s)._getters).map(s=>{const i=r.get(s);return{editable:!1,key:s,value:i._getters.reduce((a,l)=>(a[l]=i[l],a),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Qg(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Wt(e.type),key:Wt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function ey(e){switch(e){case ln.direct:return"mutation";case ln.patchFunction:return"$patch";case ln.patchObject:return"$patch";default:return"unknown"}}let Wr=!0;const ii=[],Or="pinia:mutations",pt="pinia",{assign:ty}=Object,ai=e=>"🍍 "+e;function ny(e,t){_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ii,app:e},n=>{typeof n.now!="function"&&ot("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:Or,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Wg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await zg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Kg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Jg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?ot(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),ot(`Store "${r}" reset.`)):ot(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((r,o)=>{const s=r.componentInstance&&r.componentInstance.proxy;if(s&&s._pStores){const i=r.componentInstance.proxy._pStores;Object.values(i).forEach(a=>{r.instanceData.state.push({type:ai(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ye(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,u)=>(l[u]=a.$state[u],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:ai(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,u)=>{try{l[u]=a[u]}catch(c){l[u]=c}return l},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===pt){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):Cd.toLowerCase().includes(r.filter.toLowerCase())):o).map(Yg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===si?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==si&&(globalThis.$store=ye(o)),r.state=Xg(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===si?t:t._s.get(r.nodeId);if(!s)return ot(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Wa(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Wr=!1,r.set(s,i,r.state.value),Wr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return ot(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return ot(`Invalid path for store "${o}":
15
+ Expected function or array of functions, received type ${typeof e}.`),Qe)}function lg(e,t){if(le(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const fd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ug=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?zv(e,r,i):t==="style"?Yv(e,n,r):go(t)?vs(t)||rg(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):cg(e,t,r,i))?(eg(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ld(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),ld(e,t,r,i))};function cg(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&fd(t)&&ce(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return fd(t)&&Ze(n)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!Ze(n)))}const dg=["ctrl","shift","alt","meta"],fg={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>dg.some(n=>e[`${n}Key`]&&!t.includes(n))},pg=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...s)=>{for(let i=0;i<t.length;i++){const a=fg[t[i]];if(a&&a(o,t))return}return e(o,...s)})},hg=Ke({patchProp:ug},Uv);let pd;function mg(){return pd||(pd=lv(hg))}const vg=(...e)=>{const t=mg().createApp(...e);an.NODE_ENV!=="production"&&(yg(t),bg(t));const{mount:n}=t;return t.mount=r=>{const o=_g(r);if(!o)return;const s=t._component;!ce(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=n(o,!1,gg(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function gg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function yg(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>hh(t)||mh(t)||vh(t),writable:!1})}function bg(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){On("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=e.config.compilerOptions,r='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return On(r),n},set(){On(r)}})}}function _g(e){if(Ze(e)){const t=document.querySelector(e);return an.NODE_ENV!=="production"&&!t&&On(`Failed to mount app: mount target selector "${e}" returned null.`),t}return an.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&On('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var wg={};function Eg(){jv()}wg.NODE_ENV!=="production"&&Eg();let Qs;const Og=new Uint8Array(16);function Ng(){if(!Qs&&(Qs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qs(Og)}const st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function Sg(e,t=0){return st[e[t+0]]+st[e[t+1]]+st[e[t+2]]+st[e[t+3]]+"-"+st[e[t+4]]+st[e[t+5]]+"-"+st[e[t+6]]+st[e[t+7]]+"-"+st[e[t+8]]+st[e[t+9]]+"-"+st[e[t+10]]+st[e[t+11]]+st[e[t+12]]+st[e[t+13]]+st[e[t+14]]+st[e[t+15]]}const hd={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Fa(e,t,n){if(hd.randomUUID&&!t&&!e)return hd.randomUUID();e=e||{};const r=e.random||(e.rng||Ng)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Sg(r)}var Kn=Symbol("storefront");function xg(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var kg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),intent:v.string().optional()}),Tg=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed"),order:Gl.orders.completedOrderSchema}),Cg=v.discriminatedUnion("event",[kg,Tg]);function Pg(){var e;const t=document.getElementById("moonbase-checkout");!t||!(t instanceof HTMLIFrameElement)||(e=t.contentWindow)==null||e.postMessage("close","*")}function md(e){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}const t=document.createElement("iframe");t.id="moonbase-checkout",t.src=e,t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.right="0px",t.style.border="none",t.style.colorScheme="normal",t.style.backgroundColor="transparent",t.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),t.setAttribute("background","transparent"),t.setAttribute("frameborder","0"),t.setAttribute("allowtransparency","true"),t.setAttribute("allow","payment"),t.height="100%",t.width="100%",document.body.append(t),document.documentElement.style.overflow="hidden",window.onmessage=function(n){var r;try{const o=Cg.parse(n.data);o.event==="close"&&(document.body.contains(t)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(t)),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:o}))),o.event==="completed"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:o}))}catch(o){((r=n.data)==null?void 0:r.source)==="moonbase-checkout"&&console.error("Could not parse event:",n.data,o)}}}var ei=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=Q(()=>!!this.utm.value&&Object.values(this.utm.value).some(l=>!!l)),this.currentUser=C(null),this.loadedUser=C(!1),this.debouncedPushOrderContent=xg(l=>this.client.orders.pushContent(l,void 0,this.hasUtm.value?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=C({id:Fa(),status:mo.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1),this.utm=r(`${lt.storefrontKey}_utm`,void 0);return}const s=new URLSearchParams(window.location.search);this.utm=r(`${lt.storefrontKey}_utm`,{referrer:((o=window.document.referrer)==null?void 0:o.replace(/https?:\/\//g,"").split("/")[0])||void 0,source:s.get("utm_source")||void 0,medium:s.get("utm_medium")||void 0,campaign:s.get("utm_campaign")||void 0,term:s.get("utm_term")||void 0,content:s.get("utm_content")||void 0}),window.addEventListener("storage",l=>this.handleStorageUpdate(l));const i=localStorage.getItem(lt.sessionKey);i?(this.currentOrder=C(JSON.parse(i)),this.refreshOrder()):this.currentOrder=C({id:Fa(),status:mo.Open,currency:"",items:[],couponsApplied:[]});const a=localStorage.getItem(lt.storefrontKey);if(a?(this.storefront=r(lt.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!0)):(this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const l=new URLSearchParams(window.location.search),u=l.get("mb_intent"),c=l.get("mb_endpoint");if(u==="checkout"&&l.get("mb_complete")&&c){const d=Object.fromEntries([...l.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(c));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);md(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{Je(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get loadedUserPromise(){return new Promise(t=>{Je(this.loadedUser,n=>{n&&t()},{immediate:!0})})}closeCheckout(){Pg()}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",n=>t(n.detail.order))}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.intent))}install(t){t.provide(Kn,this),console.log("Moonbase.sh storefront installed, learn more at https://moonbase.sh/docs")}async updateUser(){try{this.currentUser.value=await this.client.identity.get()}catch(t){t instanceof Ci||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}return this.currentUser.value}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm.value?this.utm.value:void 0);return t&&(typeof window<"u"&&localStorage.setItem(lt.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency)),t}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){switch(t.key){case lt.sessionKey:this.currentOrder.value=JSON.parse(t.newValue);break;case lt.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break}}async refreshOrder(){try{const t=await this.client.orders.get(this.currentOrder.value.id);t&&(t.status!==mo.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:Fa(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:mo.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}async surrenderOrder(){try{await this.client.orders.removeBillingDetails(this.currentOrder.value.id)}catch(t){if(t instanceof An)return;console.warn("Could not surrender order:",t)}}};ei.userKey="moonbase_user",ei.sessionKey="moonbase_session",ei.storefrontKey="moonbase_storefront";var Dg=ei;function vd(e,t){const n=t??Ce(Kn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function gd(e,t){const n=t??Ce(Kn);if(!n)throw new Error("No storefront configured");return Q(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function ti(e){const t=Ce(Kn);if(!t)throw new Error("No storefront configured");return{getLicenses:async n=>t.client.inventory.licenses.get(n),getLicenseActivations:async(n,r)=>t.client.inventory.licenses.getActivations(n,r),getProduct:async(n,r)=>t.client.inventory.products.get(n,r),getProducts:async n=>t.client.inventory.products.getOwned(n),getProductLicenses:async(n,r)=>t.client.inventory.products.getLicenses(n,r),getProductActivations:async(n,r)=>t.client.inventory.products.getActivations(n,r),revokeActivation:async n=>t.client.inventory.licenses.revokeActivation(n.licenseId,n.id),activateProduct:async(n,r)=>t.client.inventory.activation.activate(n,r),downloadProduct:async n=>{if(!n.path)throw new Error("Product is not downloadable");window.location.href=await t.client.inventory.products.getDownloadUrl(n.path)}}}function $g(e,t){const n=Ce(Kn);if(!n)throw new Error("No storefront configured");const r=n.stateFactory(`activation-request-${Mn(e)}`,null),o=n.stateFactory(`activation-request-${Mn(e)}-error`,null),s=n.stateFactory(`activation-request-${Mn(e)}-loading`,!0),i=n.stateFactory(`activation-request-${Mn(e)}-fulfilling`,!1),a=n.stateFactory(`activation-request-${Mn(e)}-completing`,!1),l=n.stateFactory(`activation-request-${Mn(e)}-completion-timeout`,null),u=async()=>{if(!r.value)return;await n.client.activationRequests.isCompleted(r.value.id)&&r.value?(r.value.status=Xt.Completed,a.value=!1):l.value=setTimeout(u,1500)};return Je(()=>Mn(e),async c=>{try{c&&c.length>0?(r.value=await n.client.activationRequests.get(c),r.value.status===Xt.Fulfilled&&(a.value=!0,u()),s.value=!1):console.warn("No token given to `useActivationRequest`")}catch(d){o.value=d,s.value=!1}},{immediate:!0}),fa(()=>{l.value&&clearTimeout(l.value)}),Je(n.currentUser,async()=>{var c,d;const f=Mn(e);if(!(!f||(d=(c=r.value)==null?void 0:c.licenseEligibility)!=null&&d.eligible)){s.value=!0;try{r.value=await n.client.activationRequests.get(f),r.value.status===Xt.Fulfilled&&(a.value=!0,u())}catch(m){o.value=m}s.value=!1}}),{activationRequest:r,loading:s,fulfilling:i,completing:a,error:o,isInstalled:Q(()=>{var c;return r&&((c=r.value)==null?void 0:c.status)===Xt.Completed}),fulfillLicense:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillLicense(r.value.id),i.value=!1,a.value=!0,u()},fulfillTrial:async()=>{i.value=!0,r.value=await n.client.activationRequests.fulfillTrial(r.value.id),i.value=!1,a.value=!0,u()},cancel:async()=>{!r.value||r.value.status===Xt.Cancelled||(r.value=await n.client.activationRequests.cancel(r.value.id))}}}function Ig(e){const t=Ce(Kn);if(!t)throw new Error("No storefront configured");return{peek:async n=>{try{return await t.client.vouchers.peek(n)}catch(r){throw r instanceof An?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof An?new Error("Voucher code invalid"):r}}}}function Ba(e){const t=e??Ce(Kn);if(!t)throw new Error("No storefront configured");return{items:Q(()=>t.currentOrder.value.items.map(n=>{var r,o;if(n.type==="Product"){const s=t.storefront.value.products.find(l=>l.id===n.productId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,product:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(r=a==null?void 0:a.discount)!=null?r:n.appliedDiscount}}else{const s=t.storefront.value.bundles.find(l=>l.id===n.bundleId),a=((s==null?void 0:s.variations)||[]).find(l=>l.id===n.variationId);return{...n,bundle:s,variation:a,price:a==null?void 0:a.price,appliedDiscount:(o=a==null?void 0:a.discount)!=null?o:n.appliedDiscount}}})),currency:Q(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:Q(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,l,u,c,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(w=>w.id===s.productId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(l=(a=O==null?void 0:O.price[n])!=null?a:(i=m==null?void 0:m.defaultVariation)==null?void 0:i.price[n])!=null?l:0}else{const m=t.storefront.value.bundles.find(w=>w.id===s.bundleId),O=((m==null?void 0:m.variations)||[]).find(w=>w.id===s.variationId);f=(d=(c=O==null?void 0:O.price[n])!=null?c:(u=m==null?void 0:m.defaultVariation)==null?void 0:u.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=_(n),r??(r=n.defaultVariation),!r)throw new Error("Added item does not have a default variation, and none have been specified");const o=`${n.type==="bundle"?"b":"p"}/${n.id}/${r.id}`;let s=t.currentOrder.value.items.find(i=>i.id===o);if(s)s.quantity+=1;else if(n.type==="bundle")s={id:o,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s);else if(n.type==="product")s={id:o,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price,appliedDiscount:r.discount},t.currentOrder.value.items.push(s);else throw new jr("Invalid input",`Could not handle item of type '${n.type}'`);return t.pushOrderContent(),s},setQuantity:(n,r)=>{const o=t.currentOrder.value.items.find(s=>s.id===n.id);if(!o)throw new Error("Cart item not found");if(o.quantity=r,o.quantity<=0){const s=t.currentOrder.value.items.findIndex(i=>i.id===o.id);t.currentOrder.value.items.splice(s,1)}return t.pushOrderContent(),n},removeFromCart:n=>{const r=t.currentOrder.value.items.findIndex(o=>o.id===n.id);t.currentOrder.value.items.splice(r,1),t.pushOrderContent()},checkout:async n=>{var r;const o=typeof window<"u"?window.location.pathname:"",s=new URL((r=n.returnUrl)!=null?r:o,document.baseURI).href,i=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:s});if(!n.redirect&&i.embeddedCheckoutUrl&&typeof window<"u"){const a=i.embeddedCheckoutUrl;return new Promise(l=>{md(a.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",u=>{l({next:u.detail.next})})})}else{if(n.redirect&&i.checkoutUrl&&typeof window<"u")return window.location.href=i.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function St(e){const t=e??Ce(Kn);if(!t)throw new Error("No storefront configured");return{user:t.currentUser,loaded:t.loadedUser,loadedPromise:t.loadedUserPromise,signIn:async(n,r)=>{const o=await t.client.identity.signIn(n,r);return t.currentUser.value=o,t.updateStorefront(),o},signUp:async(n,r,o,s,i,a,l)=>{const u=await t.client.identity.signUp(n,r,o,s,i,a,l);return t.currentUser.value=u,t.updateStorefront(),u},signOut:async()=>{t.client.tokenStore.setUser(null),await Promise.all([t.updateStorefront(),t.surrenderOrder()]),t.currentUser.value=null},update:async(n,r,o,s)=>{const i=await t.client.identity.update(n,r,o,s);return t.currentUser.value&&(t.currentUser.value.name=n,s&&(t.currentUser.value.communicationPreferences=s)),i},setPassword:async(n,r)=>{await t.client.identity.setPassword(n,r)},forgotPassword:async n=>{await t.client.identity.forgotPassword(n)},resetPassword:async(n,r,o)=>{await t.client.identity.resetPassword(n,r,o)},confirmAccount:async(n,r)=>await t.client.identity.confirmAccount(n,r),confirmEmail:async(n,r)=>await t.client.identity.confirmEmail(n,r),confirmEmailChange:async(n,r)=>(await t.client.identity.confirmEmailChange(n,r),await t.updateUser())}}function Ag(e,t){const n={endpoint:e};return new Dg(n,new Qp(n),(r,o)=>C(o))}var yd=!1;function ni(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Ha(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Vg(){return bd().__VUE_DEVTOOLS_GLOBAL_HOOK__}function bd(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Rg=typeof Proxy=="function",jg="devtools-plugin:setup",Lg="plugin:settings:set";let qr,Za;function Mg(){var e;return qr!==void 0||(typeof window<"u"&&window.performance?(qr=!0,Za=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(qr=!0,Za=globalThis.perf_hooks.performance):qr=!1),qr}function Ug(){return Mg()?Za.now():Date.now()}class Fg{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const i in t.settings){const a=t.settings[i];r[i]=a.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(o),a=JSON.parse(i);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(o,JSON.stringify(i))}catch{}s=i},now(){return Ug()}},n&&n.on(Lg,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:a,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function _d(e,t){const n=e,r=bd(),o=Vg(),s=Rg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(jg,e,t);else{const i=s?new Fg(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Te={};let Zo;const qo=e=>Zo=e,wd=Te.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function wr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ln;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ln||(ln={}));const Er=typeof window<"u",Ed=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function Bg(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function qa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Sd(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Od(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function ri(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const oi=typeof navigator=="object"?navigator:{userAgent:""},Nd=/Macintosh/.test(oi.userAgent)&&/AppleWebKit/.test(oi.userAgent)&&!/Safari/.test(oi.userAgent),Sd=Er?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Nd?Hg:"msSaveOrOpenBlob"in oi?Zg:qg:()=>{};function Hg(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?Od(r.href)?qa(e,t,n):(r.target="_blank",ri(r)):ri(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){ri(r)},0))}function Zg(e,t="download",n){if(typeof e=="string")if(Od(e))qa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){ri(r)})}else navigator.msSaveOrOpenBlob(Bg(e,n),t)}function qg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return qa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Ed.HTMLElement))||"safari"in Ed,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Nd)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let l=a.result;if(typeof l!="string")throw r=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=l:location.assign(l),r=null},a.readAsDataURL(e)}else{const a=URL.createObjectURL(e);r?r.location.assign(a):location.href=a,r=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function ot(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Wa(e){return"_a"in e&&"install"in e}function xd(){if(!("clipboard"in navigator))return ot("Your browser doesn't support the Clipboard API","error"),!0}function kd(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(ot('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Wg(e){if(!xd())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),ot("Global state copied to clipboard.")}catch(t){if(kd(t))return;ot("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function zg(e){if(!xd())try{Td(e,JSON.parse(await navigator.clipboard.readText())),ot("Global state pasted from clipboard.")}catch(t){if(kd(t))return;ot("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function Kg(e){try{Sd(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){ot("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let Sn;function Gg(){Sn||(Sn=document.createElement("input"),Sn.type="file",Sn.accept=".json");function e(){return new Promise((t,n)=>{Sn.onchange=async()=>{const r=Sn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},Sn.oncancel=()=>t(null),Sn.onerror=n,Sn.click()})}return e}async function Jg(e){try{const n=await Gg()();if(!n)return;const{text:r,file:o}=n;Td(e,JSON.parse(r)),ot(`Global state imported from "${o.name}".`)}catch(t){ot("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Td(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function Wt(e){return{_custom:{display:e}}}const Cd="🍍 Pinia (root)",si="_root";function Yg(e){return Wa(e)?{id:si,label:Cd}:{id:e.$id,label:e.$id}}function Xg(e){if(Wa(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>r.get(s)._getters).map(s=>{const i=r.get(s);return{editable:!1,key:s,value:i._getters.reduce((a,l)=>(a[l]=i[l],a),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Qg(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Wt(e.type),key:Wt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function ey(e){switch(e){case ln.direct:return"mutation";case ln.patchFunction:return"$patch";case ln.patchObject:return"$patch";default:return"unknown"}}let Wr=!0;const ii=[],Or="pinia:mutations",pt="pinia",{assign:ty}=Object,ai=e=>"🍍 "+e;function ny(e,t){_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ii,app:e},n=>{typeof n.now!="function"&&ot("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:Or,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Wg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await zg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Kg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Jg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?ot(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),ot(`Store "${r}" reset.`)):ot(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((r,o)=>{const s=r.componentInstance&&r.componentInstance.proxy;if(s&&s._pStores){const i=r.componentInstance.proxy._pStores;Object.values(i).forEach(a=>{r.instanceData.state.push({type:ai(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ye(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,u)=>(l[u]=a.$state[u],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:ai(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,u)=>{try{l[u]=a[u]}catch(c){l[u]=c}return l},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===pt){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):Cd.toLowerCase().includes(r.filter.toLowerCase())):o).map(Yg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===si?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==si&&(globalThis.$store=ye(o)),r.state=Xg(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===si?t:t._s.get(r.nodeId);if(!s)return ot(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Wa(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Wr=!1,r.set(s,i,r.state.value),Wr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return ot(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return ot(`Invalid path for store "${o}":
16
16
  ${i}
17
17
  Only state can be modified.`);i[0]="$state",Wr=!1,r.set(s,i,r.state.value),Wr=!0}})})}function ry(e,t){ii.includes(ai(t.$id))||ii.push(ai(t.$id)),_d({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ii,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:a,name:l,args:u})=>{const c=Pd++;n.addTimelineEvent({layerId:Or,event:{time:r(),title:"πŸ›« "+l,subtitle:"start",data:{store:Wt(t.$id),action:Wt(l),args:u},groupId:c}}),i(d=>{Gn=void 0,n.addTimelineEvent({layerId:Or,event:{time:r(),title:"πŸ›¬ "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,result:d},groupId:c}})}),a(d=>{Gn=void 0,n.addTimelineEvent({layerId:Or,event:{time:r(),logType:"error",title:"πŸ’₯ "+l,subtitle:"end",data:{store:Wt(t.$id),action:Wt(l),args:u,error:d},groupId:c}})})},!0),t._customProperties.forEach(i=>{Je(()=>_(t[i]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(pt),Wr&&n.addTimelineEvent({layerId:Or,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:l},groupId:Gn}})},{deep:!0})}),t.$subscribe(({events:i,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(pt),!Wr)return;const u={time:r(),title:ey(a),data:ty({store:Wt(t.$id)},Qg(i)),groupId:Gn};a===ln.patchFunction?u.subtitle="‡️":a===ln.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:Or,event:u})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=Ln(i=>{o(i),n.addTimelineEvent({layerId:Or,event:{time:r(),title:"πŸ”₯ "+t.$id,subtitle:"HMR update",data:{store:Wt(t.$id),info:Wt("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&ot(`Disposed "${t.$id}" store πŸ—‘`)},n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&ot(`"${t.$id}" store installed πŸ†•`)})}let Pd=0,Gn;function Dd(e,t,n){const r=t.reduce((o,s)=>(o[s]=ye(e)[s],o),{});for(const o in r)e[o]=function(){const s=Pd,i=n?new Proxy(e,{get(...l){return Gn=s,Reflect.get(...l)},set(...l){return Gn=s,Reflect.set(...l)}}):e;Gn=s;const a=r[o].apply(i,arguments);return Gn=void 0,a}}function oy({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Dd(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;ye(t)._hotUpdate=function(o){r.apply(this,arguments),Dd(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}ry(e,t)}}function sy(){const e=su(!0),t=e.run(()=>C({}));let n=[],r=[];const o=Ln({install(s){qo(o),o._a=s,s.provide(wd,o),s.config.globalProperties.$pinia=o,Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er&&ny(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!yd?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(oy),o}function $d(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];wr(o)&&wr(r)&&!qe(r)&&!tn(r)?e[n]=$d(o,r):e[n]=r}return e}const Id=()=>{};function Ad(e,t,n,r=Id){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&iu()&&yh(o),o}function zr(e,...t){e.slice().forEach(n=>{n(...t)})}const iy=e=>e(),Vd=Symbol(),za=Symbol();function Ka(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];wr(o)&&wr(r)&&e.hasOwnProperty(n)&&!qe(r)&&!tn(r)?e[n]=Ka(o,r):e[n]=r}return e}const ay=Te.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function ly(e){return!wr(e)||!e.hasOwnProperty(ay)}const{assign:Rt}=Object;function Rd(e){return!!(qe(e)&&e.effect)}function jd(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let l;function u(){!a&&(Te.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const c=Te.NODE_ENV!=="production"&&r?$u(C(o?o():{}).value):$u(n.state.value[e]);return Rt(c,s,Object.keys(i||{}).reduce((d,f)=>(Te.NODE_ENV!=="production"&&f in c&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`),d[f]=Ln(Q(()=>{qo(n);const m=n._s.get(e);return i[f].call(m,m)})),d),{}))}return l=Ga(e,u,t,n,r,!0),l}function Ga(e,t,n={},r,o,s){let i;const a=Rt({actions:{}},n);if(Te.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const l={deep:!0};Te.NODE_ENV!=="production"&&!yd&&(l.onTrigger=A=>{u?m=A:u==!1&&!j._hotUpdating&&(Array.isArray(m)?m.push(A):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,c,d=[],f=[],m;const b=r.state.value[e];!s&&!b&&(Te.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const O=C({});let w;function $(A){let V;u=c=!1,Te.NODE_ENV!=="production"&&(m=[]),typeof A=="function"?(A(r.state.value[e]),V={type:ln.patchFunction,storeId:e,events:m}):(Ka(r.state.value[e],A),V={type:ln.patchObject,payload:A,storeId:e,events:m});const D=w=Symbol();To().then(()=>{w===D&&(u=!0)}),c=!0,zr(d,V,r.state.value[e])}const H=s?function(){const{state:V}=n,D=V?V():{};this.$patch(ie=>{Rt(ie,D)})}:Te.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Id;function T(){i.stop(),d=[],f=[],r._s.delete(e)}const te=(A,V="")=>{if(Vd in A)return A[za]=V,A;const D=function(){qo(r);const ie=Array.from(arguments),$e=[],E=[];function P(he){$e.push(he)}function Y(he){E.push(he)}zr(f,{args:ie,name:D[za],store:j,after:P,onError:Y});let re;try{re=A.apply(this&&this.$id===e?this:j,ie)}catch(he){throw zr(E,he),he}return re instanceof Promise?re.then(he=>(zr($e,he),he)).catch(he=>(zr(E,he),Promise.reject(he))):(zr($e,re),re)};return D[Vd]=!0,D[za]=V,D},S=Ln({actions:{},getters:{},state:[],hotState:O}),U={_p:r,$id:e,$onAction:Ad.bind(null,f),$patch:$,$reset:H,$subscribe(A,V={}){const D=Ad(d,A,V.detached,()=>ie()),ie=i.run(()=>Je(()=>r.state.value[e],$e=>{(V.flush==="sync"?c:u)&&A({storeId:e,type:ln.direct,events:m},$e)},Rt({},l,V)));return D},$dispose:T},j=No(Te.NODE_ENV!=="production"||Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er?Rt({_hmrPayload:S,_customProperties:Ln(new Set)},U):U);r._s.set(e,j);const q=(r._a&&r._a.runWithContext||iy)(()=>r._e.run(()=>(i=su()).run(()=>t({action:te}))));for(const A in q){const V=q[A];if(qe(V)&&!Rd(V)||tn(V))Te.NODE_ENV!=="production"&&o?ni(O.value,A,Qi(q,A)):s||(b&&ly(V)&&(qe(V)?V.value=b[A]:Ka(V,b[A])),r.state.value[e][A]=V),Te.NODE_ENV!=="production"&&S.state.push(A);else if(typeof V=="function"){const D=Te.NODE_ENV!=="production"&&o?V:te(V,A);q[A]=D,Te.NODE_ENV!=="production"&&(S.actions[A]=V),a.actions[A]=V}else Te.NODE_ENV!=="production"&&Rd(V)&&(S.getters[A]=s?n.getters[A]:V,Er&&(q._getters||(q._getters=Ln([]))).push(A))}if(Rt(j,q),Rt(ye(j),q),Object.defineProperty(j,"$state",{get:()=>Te.NODE_ENV!=="production"&&o?O.value:r.state.value[e],set:A=>{if(Te.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");$(V=>{Rt(V,A)})}}),Te.NODE_ENV!=="production"&&(j._hotUpdate=Ln(A=>{j._hotUpdating=!0,A._hmrPayload.state.forEach(V=>{if(V in j.$state){const D=A.$state[V],ie=j.$state[V];typeof D=="object"&&wr(D)&&wr(ie)?$d(D,ie):A.$state[V]=ie}ni(j,V,Qi(A.$state,V))}),Object.keys(j.$state).forEach(V=>{V in A.$state||Ha(j,V)}),u=!1,c=!1,r.state.value[e]=Qi(A._hmrPayload,"hotState"),c=!0,To().then(()=>{u=!0});for(const V in A._hmrPayload.actions){const D=A[V];ni(j,V,te(D,V))}for(const V in A._hmrPayload.getters){const D=A._hmrPayload.getters[V],ie=s?Q(()=>(qo(r),D.call(j,j))):D;ni(j,V,ie)}Object.keys(j._hmrPayload.getters).forEach(V=>{V in A._hmrPayload.getters||Ha(j,V)}),Object.keys(j._hmrPayload.actions).forEach(V=>{V in A._hmrPayload.actions||Ha(j,V)}),j._hmrPayload=A._hmrPayload,j._getters=A._getters,j._hotUpdating=!1})),Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er){const A={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(V=>{Object.defineProperty(j,V,Rt({value:j[V]},A))})}return r._p.forEach(A=>{if(Te.NODE_ENV!=="production"&&Te.NODE_ENV!=="test"&&Er){const V=i.run(()=>A({store:j,app:r._a,pinia:r,options:a}));Object.keys(V||{}).forEach(D=>j._customProperties.add(D)),Rt(j,V)}else Rt(j,i.run(()=>A({store:j,app:r._a,pinia:r,options:a})))}),Te.NODE_ENV!=="production"&&j.$state&&typeof j.$state=="object"&&typeof j.$state.constructor=="function"&&!j.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
18
18
  state: () => new MyClass()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/storefront",
3
3
  "type": "module",
4
- "version": "0.2.46",
4
+ "version": "0.2.48",
5
5
  "description": "Package to let you embed Moonbase.sh into your storefront as a payment and delivery provider",
6
6
  "author": "Tobias LΓΈnnerΓΈd Madsen <m@dsen.tv>",
7
7
  "license": "MIT",
@@ -22,7 +22,7 @@
22
22
  "pinia": "^2.1.7",
23
23
  "vite-plugin-css-injected-by-js": "^3.5.1",
24
24
  "vue": "^3.5.3",
25
- "@moonbase.sh/vue": "0.2.46"
25
+ "@moonbase.sh/vue": "0.2.48"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^18.19.50",