@moonbase.sh/storefront 0.2.25 → 0.2.27
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 +1 -1
- package/dist/moonbase.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/moonbase.js
CHANGED
package/dist/moonbase.umd.cjs
CHANGED
|
@@ -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\\:input[data-v-65d18d50] label[data-v-65d18d50]{display:block;font-size:14px;font-weight:500;line-height:20px;color:#374151}.moonbase\\:input[data-v-65d18d50] input[data-v-65d18d50]{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\\:input[data-v-65d18d50] input[data-v-65d18d50][data-v-65d18d50]: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\\:input[data-v-65d18d50] .moonbase\\:input-hint[data-v-65d18d50]{margin-top:8px;font-size:14px;line-height:20px}.moonbase\\:input[data-v-65d18d50] .moonbase\\:input-hint[data-v-65d18d50][data-type=error][data-v-65d18d50]{color:var(--moonbase-input-error-color)}@keyframes moonbase\\:spin-f9a322c4{to{transform:rotate(360deg)}}.moonbase svg[data-v-f9a322c4]{animation:moonbase\\:spin-f9a322c4 1s linear infinite}.moonbase .moonbase\\:submit-button[data-v-052f0f36]{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-052f0f36][data-v-052f0f36],.moonbase .moonbase\\:submit-button[data-v-052f0f36][data-v-052f0f36]:hover,.moonbase .moonbase\\:submit-button[data-v-052f0f36][data-v-052f0f36]:focus,.moonbase .moonbase\\:submit-button[data-v-052f0f36][data-v-052f0f36]: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-052f0f36][data-v-052f0f36]:hover{background-color:hsl(from var(--moonbase-button-background-color) h s calc(l - 5))}.moonbase .moonbase\\:submit-button[data-v-052f0f36][data-v-052f0f36]: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-052f0f36][data-success][data-v-052f0f36]{background-color:var(--moonbase-button-success-color)}.moonbase .moonbase\\:submit-button[data-v-052f0f36][data-error][data-v-052f0f36]{background-color:var(--moonbase-button-error-color)}.moonbase .moonbase\\:submit-button[data-v-052f0f36] div[data-v-052f0f36]{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-052f0f36] div[data-v-052f0f36][data-visible][data-v-052f0f36]{width:20px;opacity:1}.moonbase .moonbase\\:submit-button[data-v-052f0f36] div[data-v-052f0f36] svg[data-v-052f0f36]{height:20px;width:20px}.moonbase\\:checkbox[data-v-20c4336e]{display:flex;align-items:flex-start}.moonbase\\:checkbox[data-v-20c4336e] label[data-v-20c4336e]{font-size:14px;font-weight:500;line-height:20px;color:#374151}.moonbase\\:checkbox[data-v-20c4336e] .moonbase\\:checkbox-container[data-v-20c4336e]{display:flex;height:24px;align-items:center}.moonbase\\:checkbox[data-v-20c4336e] input[data-v-20c4336e]{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\\:checkbox[data-v-20c4336e] input[data-v-20c4336e][data-v-20c4336e]: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\\:checkbox[data-v-20c4336e] .moonbase\\:checkbox-description[data-v-20c4336e]{margin-left:12px}.moonbase\\:checkbox[data-v-20c4336e] .moonbase\\:checkbox-description[data-v-20c4336e] label[data-v-20c4336e]{font-size:14px;line-height:24px;font-weight:500;color:hsl(from var(--moonbase-text-color) h s calc(l + 5))}.moonbase\\:checkbox[data-v-20c4336e] .moonbase\\:checkbox-description[data-v-20c4336e] p[data-v-20c4336e]{font-size:14px;line-height:24px;color:hsl(from var(--moonbase-text-color) h s calc(l + 15))}.moonbase\\:checkbox[data-v-20c4336e] .moonbase\\:checkbox-description[data-v-20c4336e] p[data-v-20c4336e][data-type=error][data-v-20c4336e]{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(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
2
|
(function(Dt,xe){typeof exports=="object"&&typeof module<"u"?xe(exports):typeof define=="function"&&define.amd?define(["exports"],xe):(Dt=typeof globalThis<"u"?globalThis:Dt||self,xe(Dt.Moonbase={}))})(this,function(Dt){"use strict";var ix=Object.defineProperty;var ax=(Dt,xe,Un)=>xe in Dt?ix(Dt,xe,{enumerable:!0,configurable:!0,writable:!0,value:Un}):Dt[xe]=Un;var Kr=(Dt,xe,Un)=>ax(Dt,typeof xe!="symbol"?xe+"":xe,Un);var xe;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),i={};for(const a of o)i[a]=s[a];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},t.find=(s,o)=>{for(const i of s)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(xe||(xe={}));var Un;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Un||(Un={}));const re=xe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Zn=t=>{switch(typeof t){case"undefined":return re.undefined;case"string":return re.string;case"number":return isNaN(t)?re.nan:re.number;case"boolean":return re.boolean;case"function":return re.function;case"bigint":return re.bigint;case"symbol":return re.symbol;case"object":return Array.isArray(t)?re.array:t===null?re.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?re.promise:typeof Map<"u"&&t instanceof Map?re.map:typeof Set<"u"&&t instanceof Set?re.set:typeof Date<"u"&&t instanceof Date?re.date:re.object;default:return re.unknown}},Z=xe.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"]),Mp=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");let zt=class Ap extends Error{constructor(e){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=e}get errors(){return this.issues}format(e){const n=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(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 c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(this),r}static assert(e){if(!(e instanceof Ap))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,xe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(e(s))):r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};zt.create=t=>new zt(t);const Gr=(t,e)=>{let n;switch(t.code){case Z.invalid_type:t.received===re.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case Z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,xe.jsonStringifyReplacer)}`;break;case Z.unrecognized_keys:n=`Unrecognized key(s) in object: ${xe.joinValues(t.keys,", ")}`;break;case Z.invalid_union:n="Invalid input";break;case Z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${xe.joinValues(t.options)}`;break;case Z.invalid_enum_value:n=`Invalid enum value. Expected ${xe.joinValues(t.options)}, received '${t.received}'`;break;case Z.invalid_arguments:n="Invalid function arguments";break;case Z.invalid_return_type:n="Invalid function return type";break;case Z.invalid_date:n="Invalid date";break;case Z.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:xe.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case Z.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case Z.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case Z.custom:n="Invalid input";break;case Z.invalid_intersection_types:n="Intersection results could not be merged";break;case Z.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case Z.not_finite:n="Number must be finite";break;default:n=e.defaultError,xe.assertNever(t)}return{message:n}};let hc=Gr;function Up(t){hc=t}function jo(){return hc}const Lo=t=>{const{data:e,path:n,errorMaps:r,issueData:s}=t,o=[...n,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:e,defaultError:a}).message;return{...s,path:o,message:a}},Zp=[];function te(t,e){const n=jo(),r=Lo({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Gr?void 0:Gr].filter(s=>!!s)});t.common.issues.push(r)}let $t=class Dp{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return we;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const o=await s.key,i=await s.value;r.push({key:o,value:i})}return Dp.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:o,value:i}=s;if(o.status==="aborted"||i.status==="aborted")return we;o.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(r[o.value]=i.value)}return{status:e.value,value:r}}};const we=Object.freeze({status:"aborted"}),Jr=t=>({status:"dirty",value:t}),kt=t=>({status:"valid",value:t}),pa=t=>t.status==="aborted",ha=t=>t.status==="dirty",vs=t=>t.status==="valid",gs=t=>typeof Promise<"u"&&t instanceof Promise;function Mo(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function mc(t,e,n,r,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var le;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(le||(le={}));var ys,_s;let nn=class{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}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 vc=(t,e)=>{if(vs(e))return{success:!0,data:e.value};if(!t.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 zt(t.common.issues);return this._error=n,this._error}}};function Te(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,a)=>{var l,c;const{message:u}=t;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:s}}let $e=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,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(e){return Zn(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Zn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new $t,ctx:{common:e.parent.common,data:e.data,parsedType:Zn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(gs(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const s={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:e,parsedType:Zn(e)},o=this._parseSync({data:e,path:s.path,parent:s});return vc(s,o)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,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:e,parsedType:Zn(e)},s=this._parse({data:e,path:r.path,parent:r}),o=await(gs(s)?s:Promise.resolve(s));return vc(r,o)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const i=e(s),a=()=>o.addIssue({code:Z.custom,...r(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new qt({schema:this,typeName:ye.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return rn.create(this,this._def)}nullable(){return Fn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _r.create(this,this._def)}promise(){return es.create(this,this._def)}or(e){return Ns.create([this,e],this._def)}and(e){return Ss.create(this,e,this._def)}transform(e){return new qt({...Te(this._def),schema:this,typeName:ye.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Is({...Te(this._def),innerType:this,defaultValue:n,typeName:ye.ZodDefault})}brand(){return new ga({typeName:ye.ZodBranded,type:this,...Te(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new As({...Te(this._def),innerType:this,catchValue:n,typeName:ye.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return ya.create(this,e)}readonly(){return Ds.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const Bp=/^c[^\s-]{8,}$/i,Fp=/^[0-9a-z]+$/,Hp=/^[0-9A-HJKMNP-TV-Z]{26}$/,zp=/^[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,qp=/^[a-z0-9_-]{21}$/i,Wp=/^[-+]?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)?)??$/,Kp=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Gp="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ma;const Jp=/^(?:(?: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])$/,Yp=/^(([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})))$/,Xp=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,gc="((\\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])))",Qp=new RegExp(`^${gc}$`);function yc(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function eh(t){return new RegExp(`^${yc(t)}$`)}function _c(t){let e=`${gc}T${yc(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function th(t,e){return!!((e==="v4"||!e)&&Jp.test(t)||(e==="v6"||!e)&&Yp.test(t))}let Yr=class Vo extends $e{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==re.string){const o=this._getOrReturnCtx(e);return te(o,{code:Z.invalid_type,expected:re.string,received:o.parsedType}),we}const r=new $t;let s;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(s=this._getOrReturnCtx(e,s),te(s,{code:Z.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(s=this._getOrReturnCtx(e,s),te(s,{code:Z.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const i=e.data.length>o.value,a=e.data.length<o.value;(i||a)&&(s=this._getOrReturnCtx(e,s),i?te(s,{code:Z.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&te(s,{code:Z.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Kp.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"email",code:Z.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")ma||(ma=new RegExp(Gp,"u")),ma.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"emoji",code:Z.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")zp.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"uuid",code:Z.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")qp.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"nanoid",code:Z.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")Bp.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"cuid",code:Z.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")Fp.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"cuid2",code:Z.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")Hp.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"ulid",code:Z.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),te(s,{validation:"url",code:Z.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"regex",code:Z.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(e,s),te(s,{code:Z.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(s=this._getOrReturnCtx(e,s),te(s,{code:Z.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(s=this._getOrReturnCtx(e,s),te(s,{code:Z.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?_c(o).test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{code:Z.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?Qp.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{code:Z.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?eh(o).test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{code:Z.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?Wp.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"duration",code:Z.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?th(e.data,o.version)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"ip",code:Z.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?Xp.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"base64",code:Z.invalid_string,message:o.message}),r.dirty()):xe.assertNever(o);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:Z.invalid_string,...le.errToObj(r)})}_addCheck(e){return new Vo({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...le.errToObj(e)})}url(e){return this._addCheck({kind:"url",...le.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...le.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...le.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...le.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...le.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...le.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...le.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...le.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...le.errToObj(e)})}datetime(e){var n,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(r=e==null?void 0:e.local)!==null&&r!==void 0?r:!1,...le.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...le.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...le.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...le.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...le.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...le.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...le.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...le.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...le.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...le.errToObj(n)})}nonempty(e){return this.min(1,le.errToObj(e))}trim(){return new Vo({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Vo({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Vo({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};Yr.create=t=>{var e;return new Yr({checks:[],typeName:ye.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Te(t)})};function nh(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,o=parseInt(t.toFixed(s).replace(".","")),i=parseInt(e.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}let bs=class cc extends $e{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==re.number){const o=this._getOrReturnCtx(e);return te(o,{code:Z.invalid_type,expected:re.number,received:o.parsedType}),we}let r;const s=new $t;for(const o of this._def.checks)o.kind==="int"?xe.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),te(r,{code:Z.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),te(r,{code:Z.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),te(r,{code:Z.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?nh(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),te(r,{code:Z.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),te(r,{code:Z.not_finite,message:o.message}),s.dirty()):xe.assertNever(o);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,le.toString(n))}gt(e,n){return this.setLimit("min",e,!1,le.toString(n))}lte(e,n){return this.setLimit("max",e,!0,le.toString(n))}lt(e,n){return this.setLimit("max",e,!1,le.toString(n))}setLimit(e,n,r,s){return new cc({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:le.toString(s)}]})}_addCheck(e){return new cc({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:le.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:le.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:le.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&xe.isInteger(e.value))}get isFinite(){let e=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"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};bs.create=t=>new bs({checks:[],typeName:ye.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Te(t)});let ws=class uc extends $e{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==re.bigint){const o=this._getOrReturnCtx(e);return te(o,{code:Z.invalid_type,expected:re.bigint,received:o.parsedType}),we}let r;const s=new $t;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),te(r,{code:Z.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),te(r,{code:Z.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),te(r,{code:Z.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):xe.assertNever(o);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,le.toString(n))}gt(e,n){return this.setLimit("min",e,!1,le.toString(n))}lte(e,n){return this.setLimit("max",e,!0,le.toString(n))}lt(e,n){return this.setLimit("max",e,!1,le.toString(n))}setLimit(e,n,r,s){return new uc({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:le.toString(s)}]})}_addCheck(e){return new uc({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:le.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};ws.create=t=>{var e;return new ws({checks:[],typeName:ye.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Te(t)})};let Es=class extends $e{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==re.boolean){const r=this._getOrReturnCtx(e);return te(r,{code:Z.invalid_type,expected:re.boolean,received:r.parsedType}),we}return kt(e.data)}};Es.create=t=>new Es({typeName:ye.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Te(t)});let xs=class Vp extends $e{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==re.date){const o=this._getOrReturnCtx(e);return te(o,{code:Z.invalid_type,expected:re.date,received:o.parsedType}),we}if(isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return te(o,{code:Z.invalid_date}),we}const r=new $t;let s;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(s=this._getOrReturnCtx(e,s),te(s,{code:Z.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(s=this._getOrReturnCtx(e,s),te(s,{code:Z.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):xe.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Vp({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:le.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:le.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};xs.create=t=>new xs({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ye.ZodDate,...Te(t)});let Uo=class extends $e{_parse(e){if(this._getType(e)!==re.symbol){const r=this._getOrReturnCtx(e);return te(r,{code:Z.invalid_type,expected:re.symbol,received:r.parsedType}),we}return kt(e.data)}};Uo.create=t=>new Uo({typeName:ye.ZodSymbol,...Te(t)});let ks=class extends $e{_parse(e){if(this._getType(e)!==re.undefined){const r=this._getOrReturnCtx(e);return te(r,{code:Z.invalid_type,expected:re.undefined,received:r.parsedType}),we}return kt(e.data)}};ks.create=t=>new ks({typeName:ye.ZodUndefined,...Te(t)});let Os=class extends $e{_parse(e){if(this._getType(e)!==re.null){const r=this._getOrReturnCtx(e);return te(r,{code:Z.invalid_type,expected:re.null,received:r.parsedType}),we}return kt(e.data)}};Os.create=t=>new Os({typeName:ye.ZodNull,...Te(t)});let Xr=class extends $e{constructor(){super(...arguments),this._any=!0}_parse(e){return kt(e.data)}};Xr.create=t=>new Xr({typeName:ye.ZodAny,...Te(t)});let yr=class extends $e{constructor(){super(...arguments),this._unknown=!0}_parse(e){return kt(e.data)}};yr.create=t=>new yr({typeName:ye.ZodUnknown,...Te(t)});let bn=class extends $e{_parse(e){const n=this._getOrReturnCtx(e);return te(n,{code:Z.invalid_type,expected:re.never,received:n.parsedType}),we}};bn.create=t=>new bn({typeName:ye.ZodNever,...Te(t)});let Zo=class extends $e{_parse(e){if(this._getType(e)!==re.undefined){const r=this._getOrReturnCtx(e);return te(r,{code:Z.invalid_type,expected:re.void,received:r.parsedType}),we}return kt(e.data)}};Zo.create=t=>new Zo({typeName:ye.ZodVoid,...Te(t)});let _r=class da extends $e{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==re.array)return te(n,{code:Z.invalid_type,expected:re.array,received:n.parsedType}),we;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(i||a)&&(te(n,{code:i?Z.too_big:Z.too_small,minimum:a?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(te(n,{code:Z.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(te(n,{code:Z.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>s.type._parseAsync(new nn(n,i,n.path,a)))).then(i=>$t.mergeArray(r,i));const o=[...n.data].map((i,a)=>s.type._parseSync(new nn(n,i,n.path,a)));return $t.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new da({...this._def,minLength:{value:e,message:le.toString(n)}})}max(e,n){return new da({...this._def,maxLength:{value:e,message:le.toString(n)}})}length(e,n){return new da({...this._def,exactLength:{value:e,message:le.toString(n)}})}nonempty(e){return this.min(1,e)}};_r.create=(t,e)=>new _r({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,...Te(e)});function Qr(t){if(t instanceof Mt){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=rn.create(Qr(r))}return new Mt({...t._def,shape:()=>e})}else return t instanceof _r?new _r({...t._def,type:Qr(t.element)}):t instanceof rn?rn.create(Qr(t.unwrap())):t instanceof Fn?Fn.create(Qr(t.unwrap())):t instanceof Bn?Bn.create(t.items.map(e=>Qr(e))):t}let Mt=class tn extends $e{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=xe.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==re.object){const c=this._getOrReturnCtx(e);return te(c,{code:Z.invalid_type,expected:re.object,received:c.parsedType}),we}const{status:r,ctx:s}=this._processInputParams(e),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof bn&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=o[c],d=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new nn(s,d,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof bn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(c==="strict")a.length>0&&(te(s,{code:Z.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new nn(s,d,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>$t.mergeObjectSync(r,c)):$t.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return le.errToObj,new tn({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var s,o,i,a;const l=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=le.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new tn({...this._def,unknownKeys:"strip"})}passthrough(){return new tn({...this._def,unknownKeys:"passthrough"})}extend(e){return new tn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new tn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ye.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new tn({...this._def,catchall:e})}pick(e){const n={};return xe.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new tn({...this._def,shape:()=>n})}omit(e){const n={};return xe.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new tn({...this._def,shape:()=>n})}deepPartial(){return Qr(this)}partial(e){const n={};return xe.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}),new tn({...this._def,shape:()=>n})}required(e){const n={};return xe.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof rn;)o=o._def.innerType;n[r]=o}}),new tn({...this._def,shape:()=>n})}keyof(){return xc(xe.objectKeys(this.shape))}};Mt.create=(t,e)=>new Mt({shape:()=>t,unknownKeys:"strip",catchall:bn.create(),typeName:ye.ZodObject,...Te(e)}),Mt.strictCreate=(t,e)=>new Mt({shape:()=>t,unknownKeys:"strict",catchall:bn.create(),typeName:ye.ZodObject,...Te(e)}),Mt.lazycreate=(t,e)=>new Mt({shape:t,unknownKeys:"strip",catchall:bn.create(),typeName:ye.ZodObject,...Te(e)});let Ns=class extends $e{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=o.map(a=>new zt(a.ctx.common.issues));return te(n,{code:Z.invalid_union,unionErrors:i}),we}if(n.common.async)return Promise.all(r.map(async o=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(s);{let o;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=i.map(l=>new zt(l));return te(n,{code:Z.invalid_union,unionErrors:a}),we}}get options(){return this._def.options}};Ns.create=(t,e)=>new Ns({options:t,typeName:ye.ZodUnion,...Te(e)});const wn=t=>t instanceof Ts?wn(t.schema):t instanceof qt?wn(t.innerType()):t instanceof Cs?[t.value]:t instanceof $s?t.options:t instanceof Ps?xe.objectValues(t.enum):t instanceof Is?wn(t._def.innerType):t instanceof ks?[void 0]:t instanceof Os?[null]:t instanceof rn?[void 0,...wn(t.unwrap())]:t instanceof Fn?[null,...wn(t.unwrap())]:t instanceof ga||t instanceof Ds?wn(t.unwrap()):t instanceof As?wn(t._def.innerType):[];let bc=class Rp extends $e{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==re.object)return te(n,{code:Z.invalid_type,expected:re.object,received:n.parsedType}),we;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(te(n,{code:Z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),we)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const s=new Map;for(const o of n){const i=wn(o.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of i){if(s.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);s.set(a,o)}}return new Rp({typeName:ye.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...Te(r)})}};function va(t,e){const n=Zn(t),r=Zn(e);if(t===e)return{valid:!0,data:t};if(n===re.object&&r===re.object){const s=xe.objectKeys(e),o=xe.objectKeys(t).filter(a=>s.indexOf(a)!==-1),i={...t,...e};for(const a of o){const l=va(t[a],e[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===re.array&&r===re.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let o=0;o<t.length;o++){const i=t[o],a=e[o],l=va(i,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===re.date&&r===re.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}let Ss=class extends $e{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,i)=>{if(pa(o)||pa(i))return we;const a=va(o.value,i.value);return a.valid?((ha(o)||ha(i))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:Z.invalid_intersection_types}),we)};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(([o,i])=>s(o,i)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Ss.create=(t,e,n)=>new Ss({left:t,right:e,typeName:ye.ZodIntersection,...Te(n)});let Bn=class jp extends $e{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==re.array)return te(r,{code:Z.invalid_type,expected:re.array,received:r.parsedType}),we;if(r.data.length<this._def.items.length)return te(r,{code:Z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),we;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:Z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new nn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(o).then(i=>$t.mergeArray(n,i)):$t.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new jp({...this._def,rest:e})}};Bn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Bn({items:t,typeName:ye.ZodTuple,rest:null,...Te(e)})};let wc=class dc extends $e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==re.object)return te(r,{code:Z.invalid_type,expected:re.object,received:r.parsedType}),we;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in r.data)s.push({key:o._parse(new nn(r,a,r.path,a)),value:i._parse(new nn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?$t.mergeObjectAsync(n,s):$t.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof $e?new dc({keyType:e,valueType:n,typeName:ye.ZodRecord,...Te(r)}):new dc({keyType:Yr.create(),valueType:e,typeName:ye.ZodRecord,...Te(n)})}},Bo=class extends $e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==re.map)return te(r,{code:Z.invalid_type,expected:re.map,received:r.parsedType}),we;const s=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:s._parse(new nn(r,a,r.path,[c,"key"])),value:o._parse(new nn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return we;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return we;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}};Bo.create=(t,e,n)=>new Bo({valueType:e,keyType:t,typeName:ye.ZodMap,...Te(n)});let Fo=class fc extends $e{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==re.set)return te(r,{code:Z.invalid_type,expected:re.set,received:r.parsedType}),we;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(te(r,{code:Z.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(te(r,{code:Z.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return we;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>o._parse(new nn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(e,n){return new fc({...this._def,minSize:{value:e,message:le.toString(n)}})}max(e,n){return new fc({...this._def,maxSize:{value:e,message:le.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};Fo.create=(t,e)=>new Fo({valueType:t,minSize:null,maxSize:null,typeName:ye.ZodSet,...Te(e)});let Ec=class fa extends $e{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==re.function)return te(n,{code:Z.invalid_type,expected:re.function,received:n.parsedType}),we;function r(a,l){return Lo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jo(),Gr].filter(c=>!!c),issueData:{code:Z.invalid_arguments,argumentsError:l}})}function s(a,l){return Lo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jo(),Gr].filter(c=>!!c),issueData:{code:Z.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof es){const a=this;return kt(async function(...l){const c=new zt([]),u=await a._def.args.parseAsync(l,o).catch(m=>{throw c.addIssue(r(l,m)),c}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,o).catch(m=>{throw c.addIssue(s(d,m)),c})})}else{const a=this;return kt(function(...l){const c=a._def.args.safeParse(l,o);if(!c.success)throw new zt([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,o);if(!d.success)throw new zt([s(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new fa({...this._def,args:Bn.create(e).rest(yr.create())})}returns(e){return new fa({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new fa({args:e||Bn.create([]).rest(yr.create()),returns:n||yr.create(),typeName:ye.ZodFunction,...Te(r)})}},Ts=class extends $e{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Ts.create=(t,e)=>new Ts({getter:t,typeName:ye.ZodLazy,...Te(e)});let Cs=class extends $e{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return te(n,{received:n.data,code:Z.invalid_literal,expected:this._def.value}),we}return{status:"valid",value:e.data}}get value(){return this._def.value}};Cs.create=(t,e)=>new Cs({value:t,typeName:ye.ZodLiteral,...Te(e)});function xc(t,e){return new $s({values:t,typeName:ye.ZodEnum,...Te(e)})}let $s=class pc extends $e{constructor(){super(...arguments),ys.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return te(n,{expected:xe.joinValues(r),received:n.parsedType,code:Z.invalid_type}),we}if(Mo(this,ys)||mc(this,ys,new Set(this._def.values)),!Mo(this,ys).has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return te(n,{received:n.data,code:Z.invalid_enum_value,options:r}),we}return kt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return pc.create(e,{...this._def,...n})}exclude(e,n=this._def){return pc.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};ys=new WeakMap,$s.create=xc;let Ps=class extends $e{constructor(){super(...arguments),_s.set(this,void 0)}_parse(e){const n=xe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==re.string&&r.parsedType!==re.number){const s=xe.objectValues(n);return te(r,{expected:xe.joinValues(s),received:r.parsedType,code:Z.invalid_type}),we}if(Mo(this,_s)||mc(this,_s,new Set(xe.getValidEnumValues(this._def.values))),!Mo(this,_s).has(e.data)){const s=xe.objectValues(n);return te(r,{received:r.data,code:Z.invalid_enum_value,options:s}),we}return kt(e.data)}get enum(){return this._def.values}};_s=new WeakMap,Ps.create=(t,e)=>new Ps({values:t,typeName:ye.ZodNativeEnum,...Te(e)});let es=class extends $e{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==re.promise&&n.common.async===!1)return te(n,{code:Z.invalid_type,expected:re.promise,received:n.parsedType}),we;const r=n.parsedType===re.promise?n.data:Promise.resolve(n.data);return kt(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}};es.create=(t,e)=>new es({type:t,typeName:ye.ZodPromise,...Te(e)});let qt=class extends $e{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,o={addIssue:i=>{te(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const i=s.transform(r.data,o);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return we;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?we:l.status==="dirty"||n.value==="dirty"?Jr(l.value):l});{if(n.value==="aborted")return we;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?we:a.status==="dirty"||n.value==="dirty"?Jr(a.value):a}}if(s.type==="refinement"){const i=a=>{const l=s.refinement(a,o);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"?we:(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"?we:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!vs(i))return i;const a=s.transform(i.value,o);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=>vs(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:n.value,value:a})):i);xe.assertNever(s)}};qt.create=(t,e,n)=>new qt({schema:t,typeName:ye.ZodEffects,effect:e,...Te(n)}),qt.createWithPreprocess=(t,e,n)=>new qt({schema:e,effect:{type:"preprocess",transform:t},typeName:ye.ZodEffects,...Te(n)});let rn=class extends $e{_parse(e){return this._getType(e)===re.undefined?kt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};rn.create=(t,e)=>new rn({innerType:t,typeName:ye.ZodOptional,...Te(e)});let Fn=class extends $e{_parse(e){return this._getType(e)===re.null?kt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Fn.create=(t,e)=>new Fn({innerType:t,typeName:ye.ZodNullable,...Te(e)});let Is=class extends $e{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Is.create=(t,e)=>new Is({innerType:t,typeName:ye.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Te(e)});let As=class extends $e{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return gs(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new zt(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new zt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};As.create=(t,e)=>new As({innerType:t,typeName:ye.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Te(e)});let Ho=class extends $e{_parse(e){if(this._getType(e)!==re.nan){const r=this._getOrReturnCtx(e);return te(r,{code:Z.invalid_type,expected:re.nan,received:r.parsedType}),we}return{status:"valid",value:e.data}}};Ho.create=t=>new Ho({typeName:ye.ZodNaN,...Te(t)});const rh=Symbol("zod_brand");let ga=class extends $e{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},ya=class Lp extends $e{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?we:o.status==="dirty"?(n.dirty(),Jr(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?we:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new Lp({in:e,out:n,typeName:ye.ZodPipeline})}},Ds=class extends $e{_parse(e){const n=this._def.innerType._parse(e),r=s=>(vs(s)&&(s.value=Object.freeze(s.value)),s);return gs(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}};Ds.create=(t,e)=>new Ds({innerType:t,typeName:ye.ZodReadonly,...Te(e)});function kc(t,e={},n){return t?Xr.create().superRefine((r,s)=>{var o,i;if(!t(r)){const a=typeof e=="function"?e(r):typeof e=="string"?{message:e}:e,l=(i=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:!0,c=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...c,fatal:l})}}):Xr.create()}const sh={object:Mt.lazycreate};var ye;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ye||(ye={}));const oh=(t,e={message:`Input not instance of ${t.name}`})=>kc(n=>n instanceof t,e),Oc=Yr.create,Nc=bs.create,ih=Ho.create,ah=ws.create,Sc=Es.create,lh=xs.create,ch=Uo.create,uh=ks.create,dh=Os.create,fh=Xr.create,ph=yr.create,hh=bn.create,mh=Zo.create,vh=_r.create,gh=Mt.create,yh=Mt.strictCreate,_h=Ns.create,bh=bc.create,wh=Ss.create,Eh=Bn.create,xh=wc.create,kh=Bo.create,Oh=Fo.create,Nh=Ec.create,Sh=Ts.create,Th=Cs.create,Ch=$s.create,$h=Ps.create,Ph=es.create,Tc=qt.create,Ih=rn.create,Ah=Fn.create,Dh=qt.createWithPreprocess,Vh=ya.create;var y=Object.freeze({__proto__:null,defaultErrorMap:Gr,setErrorMap:Up,getErrorMap:jo,makeIssue:Lo,EMPTY_PATH:Zp,addIssueToContext:te,ParseStatus:$t,INVALID:we,DIRTY:Jr,OK:kt,isAborted:pa,isDirty:ha,isValid:vs,isAsync:gs,get util(){return xe},get objectUtil(){return Un},ZodParsedType:re,getParsedType:Zn,ZodType:$e,datetimeRegex:_c,ZodString:Yr,ZodNumber:bs,ZodBigInt:ws,ZodBoolean:Es,ZodDate:xs,ZodSymbol:Uo,ZodUndefined:ks,ZodNull:Os,ZodAny:Xr,ZodUnknown:yr,ZodNever:bn,ZodVoid:Zo,ZodArray:_r,ZodObject:Mt,ZodUnion:Ns,ZodDiscriminatedUnion:bc,ZodIntersection:Ss,ZodTuple:Bn,ZodRecord:wc,ZodMap:Bo,ZodSet:Fo,ZodFunction:Ec,ZodLazy:Ts,ZodLiteral:Cs,ZodEnum:$s,ZodNativeEnum:Ps,ZodPromise:es,ZodEffects:qt,ZodTransformer:qt,ZodOptional:rn,ZodNullable:Fn,ZodDefault:Is,ZodCatch:As,ZodNaN:Ho,BRAND:rh,ZodBranded:ga,ZodPipeline:ya,ZodReadonly:Ds,custom:kc,Schema:$e,ZodSchema:$e,late:sh,get ZodFirstPartyTypeKind(){return ye},coerce:{string:t=>Yr.create({...t,coerce:!0}),number:t=>bs.create({...t,coerce:!0}),boolean:t=>Es.create({...t,coerce:!0}),bigint:t=>ws.create({...t,coerce:!0}),date:t=>xs.create({...t,coerce:!0})},any:fh,array:vh,bigint:ah,boolean:Sc,date:lh,discriminatedUnion:bh,effect:Tc,enum:Ch,function:Nh,instanceof:oh,intersection:wh,lazy:Sh,literal:Th,map:kh,nan:ih,nativeEnum:$h,never:hh,null:dh,nullable:Ah,number:Nc,object:gh,oboolean:()=>Sc().optional(),onumber:()=>Nc().optional(),optional:Ih,ostring:()=>Oc().optional(),pipeline:Vh,preprocess:Dh,promise:Ph,record:xh,set:Oh,strictObject:yh,string:Oc,symbol:ch,transformer:Tc,tuple:Eh,undefined:uh,union:_h,unknown:ph,void:mh,NEVER:we,ZodIssueCode:Z,quotelessJson:Mp,ZodError:zt}),Cc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _a={exports:{}};(function(t,e){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Cc<"u"&&Cc,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(i){var a=typeof o<"u"&&o||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 c(w){return w&&DataView.prototype.isPrototypeOf(w)}if(l.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(w){return w&&u.indexOf(Object.prototype.toString.call(w))>-1};function f(w){if(typeof w!="string"&&(w=String(w)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(w)||w==="")throw new TypeError('Invalid character in header field name: "'+w+'"');return w.toLowerCase()}function m(w){return typeof w!="string"&&(w=String(w)),w}function _(w){var $={next:function(){var Q=w.shift();return{done:Q===void 0,value:Q}}};return l.iterable&&($[Symbol.iterator]=function(){return $}),$}function E(w){this.map={},w instanceof E?w.forEach(function($,Q){this.append(Q,$)},this):Array.isArray(w)?w.forEach(function($){this.append($[0],$[1])},this):w&&Object.getOwnPropertyNames(w).forEach(function($){this.append($,w[$])},this)}E.prototype.append=function(w,$){w=f(w),$=m($);var Q=this.map[w];this.map[w]=Q?Q+", "+$:$},E.prototype.delete=function(w){delete this.map[f(w)]},E.prototype.get=function(w){return w=f(w),this.has(w)?this.map[w]:null},E.prototype.has=function(w){return this.map.hasOwnProperty(f(w))},E.prototype.set=function(w,$){this.map[f(w)]=m($)},E.prototype.forEach=function(w,$){for(var Q in this.map)this.map.hasOwnProperty(Q)&&w.call($,this.map[Q],Q,this)},E.prototype.keys=function(){var w=[];return this.forEach(function($,Q){w.push(Q)}),_(w)},E.prototype.values=function(){var w=[];return this.forEach(function($){w.push($)}),_(w)},E.prototype.entries=function(){var w=[];return this.forEach(function($,Q){w.push([Q,$])}),_(w)},l.iterable&&(E.prototype[Symbol.iterator]=E.prototype.entries);function k(w){if(w.bodyUsed)return Promise.reject(new TypeError("Already read"));w.bodyUsed=!0}function A(w){return new Promise(function($,Q){w.onload=function(){$(w.result)},w.onerror=function(){Q(w.error)}})}function B(w){var $=new FileReader,Q=A($);return $.readAsArrayBuffer(w),Q}function T(w){var $=new FileReader,Q=A($);return $.readAsText(w),Q}function J(w){for(var $=new Uint8Array(w),Q=new Array($.length),oe=0;oe<$.length;oe++)Q[oe]=String.fromCharCode($[oe]);return Q.join("")}function P(w){if(w.slice)return w.slice(0);var $=new Uint8Array(w.byteLength);return $.set(new Uint8Array(w)),$.buffer}function z(){return this.bodyUsed=!1,this._initBody=function(w){this.bodyUsed=this.bodyUsed,this._bodyInit=w,w?typeof w=="string"?this._bodyText=w:l.blob&&Blob.prototype.isPrototypeOf(w)?this._bodyBlob=w:l.formData&&FormData.prototype.isPrototypeOf(w)?this._bodyFormData=w:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(w)?this._bodyText=w.toString():l.arrayBuffer&&l.blob&&c(w)?(this._bodyArrayBuffer=P(w.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(w)||d(w))?this._bodyArrayBuffer=P(w):this._bodyText=w=Object.prototype.toString.call(w):this._bodyText="",this.headers.get("content-type")||(typeof w=="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(w)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var w=k(this);if(w)return w;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 w=k(this);return w||(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(B)}),this.text=function(){var w=k(this);if(w)return w;if(this._bodyBlob)return T(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(J(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(R)}),this.json=function(){return this.text().then(JSON.parse)},this}var N=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Oe(w){var $=w.toUpperCase();return N.indexOf($)>-1?$:w}function K(w,$){if(!(this instanceof K))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');$=$||{};var Q=$.body;if(w instanceof K){if(w.bodyUsed)throw new TypeError("Already read");this.url=w.url,this.credentials=w.credentials,$.headers||(this.headers=new E(w.headers)),this.method=w.method,this.mode=w.mode,this.signal=w.signal,!Q&&w._bodyInit!=null&&(Q=w._bodyInit,w.bodyUsed=!0)}else this.url=String(w);if(this.credentials=$.credentials||this.credentials||"same-origin",($.headers||!this.headers)&&(this.headers=new E($.headers)),this.method=Oe($.method||this.method||"GET"),this.mode=$.mode||this.mode||null,this.signal=$.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Q)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(Q),(this.method==="GET"||this.method==="HEAD")&&($.cache==="no-store"||$.cache==="no-cache")){var oe=/([?&])_=[^&]*/;if(oe.test(this.url))this.url=this.url.replace(oe,"$1_="+new Date().getTime());else{var be=/\?/;this.url+=(be.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}K.prototype.clone=function(){return new K(this,{body:this._bodyInit})};function R(w){var $=new FormData;return w.trim().split("&").forEach(function(Q){if(Q){var oe=Q.split("="),be=oe.shift().replace(/\+/g," "),ae=oe.join("=").replace(/\+/g," ");$.append(decodeURIComponent(be),decodeURIComponent(ae))}}),$}function V(w){var $=new E,Q=w.replace(/\r?\n[\t ]+/g," ");return Q.split("\r").map(function(oe){return oe.indexOf(`
|
|
3
|
-
`)===0?oe.substr(1,oe.length):oe}).forEach(function(oe){var be=oe.split(":"),ae=be.shift().trim();if(ae){var We=be.join(":").trim();$.append(ae,We)}}),$}z.call(K.prototype);function I(w,$){if(!(this instanceof I))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');$||($={}),this.type="default",this.status=$.status===void 0?200:$.status,this.ok=this.status>=200&&this.status<300,this.statusText=$.statusText===void 0?"":""+$.statusText,this.headers=new E($.headers),this.url=$.url||"",this._initBody(w)}z.call(I.prototype),I.prototype.clone=function(){return new I(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},I.error=function(){var w=new I(null,{status:0,statusText:""});return w.type="error",w};var ce=[301,302,303,307,308];I.redirect=function(w,$){if(ce.indexOf($)===-1)throw new RangeError("Invalid status code");return new I(null,{status:$,headers:{location:w}})},i.DOMException=a.DOMException;try{new i.DOMException}catch{i.DOMException=function($,Q){this.message=$,this.name=Q;var oe=Error($);this.stack=oe.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function Ze(w,$){return new Promise(function(Q,oe){var be=new K(w,$);if(be.signal&&be.signal.aborted)return oe(new i.DOMException("Aborted","AbortError"));var ae=new XMLHttpRequest;function We(){ae.abort()}ae.onload=function(){var Ke={status:ae.status,statusText:ae.statusText,headers:V(ae.getAllResponseHeaders()||"")};Ke.url="responseURL"in ae?ae.responseURL:Ke.headers.get("X-Request-URL");var At="response"in ae?ae.response:ae.responseText;setTimeout(function(){Q(new I(At,Ke))},0)},ae.onerror=function(){setTimeout(function(){oe(new TypeError("Network request failed"))},0)},ae.ontimeout=function(){setTimeout(function(){oe(new TypeError("Network request failed"))},0)},ae.onabort=function(){setTimeout(function(){oe(new i.DOMException("Aborted","AbortError"))},0)};function xt(Ke){try{return Ke===""&&a.location.href?a.location.href:Ke}catch{return Ke}}ae.open(be.method,xt(be.url),!0),be.credentials==="include"?ae.withCredentials=!0:be.credentials==="omit"&&(ae.withCredentials=!1),"responseType"in ae&&(l.blob?ae.responseType="blob":l.arrayBuffer&&be.headers.get("Content-Type")&&be.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(ae.responseType="arraybuffer")),$&&typeof $.headers=="object"&&!($.headers instanceof E)?Object.getOwnPropertyNames($.headers).forEach(function(Ke){ae.setRequestHeader(Ke,m($.headers[Ke]))}):be.headers.forEach(function(Ke,At){ae.setRequestHeader(At,Ke)}),be.signal&&(be.signal.addEventListener("abort",We),ae.onreadystatechange=function(){ae.readyState===4&&be.signal.removeEventListener("abort",We)}),ae.send(typeof be._bodyInit>"u"?null:be._bodyInit)})}return Ze.polyfill=!0,a.fetch||(a.fetch=Ze,a.Headers=E,a.Request=K,a.Response=I),i.Headers=E,i.Request=K,i.Response=I,i.fetch=Ze,i})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var s=n.fetch?n:r;e=s.fetch,e.default=s.fetch,e.fetch=s.fetch,e.Headers=s.Headers,e.Request=s.Request,e.Response=s.Response,t.exports=e})(_a,_a.exports);var jh=_a.exports;const zo=Rh(jh);var ts=y.record(y.number()),Lh=y.object({type:y.literal("PercentageOffDiscount"),name:y.string(),description:y.string().optional(),percentage:y.number(),total:ts.optional(),isExclusive:y.boolean()}),Mh=y.object({type:y.literal("FlatAmountOffDiscount"),name:y.string(),description:y.string().optional(),total:ts.optional(),isExclusive:y.boolean()}),ba=y.discriminatedUnion("type",[Lh,Mh]),ns=y.object({id:y.string(),name:y.string(),originalPrice:ts,price:ts,hasDiscount:y.boolean(),discount:ba.optional()});function Vs(t){return y.object({items:y.array(t),hasMore:y.boolean(),next:y.string().nullable()})}function $c(t){return y.object({value:t,quantity:y.number()})}var sn=(t=>(t.Universal="Universal",t.Windows="Windows",t.Linux="Linux",t.Mac="Mac",t))(sn||{}),Pc=y.object({name:y.string(),key:y.string(),platform:y.nativeEnum(sn),size:y.number(),path:y.string().nullable()}),wa=y.object({id:y.string(),name:y.string(),tagline:y.string(),website:y.string().optional(),iconUrl:y.string().optional(),numberOfLicenses:y.number().optional(),numberOfTrials:y.number().optional(),currentActivations:y.number().optional(),maxActivations:y.number().optional(),currentVersion:y.string().nullable(),version:y.string().optional(),prerelease:y.boolean().optional(),downloadsNeedsUser:y.boolean(),downloadsNeedsOwnership:y.boolean(),downloads:y.array(Pc).optional()}),Rs=y.object({id:y.string(),name:y.string(),tagline:y.string(),iconUrl:y.string().nullable(),website:y.string().nullish(),owned:y.boolean(),currentVersion:y.string().optional(),downloads:Pc.array().optional(),defaultVariation:ns.optional(),variations:ns.array().optional(),type:y.void().transform(()=>"product").pipe(y.literal("product"))}),Ea=y.object({id:y.string(),name:y.string(),tagline:y.string(),iconUrl:y.string().nullable(),owned:y.boolean(),partial:y.boolean(),products:Rs.and(y.object({included:y.boolean().optional()})).array(),defaultVariation:ns.optional(),variations:ns.array().optional(),type:y.void().transform(()=>"bundle").pipe(y.literal("bundle"))}),Uh=y.object({suggestedCurrency:y.string(),products:Rs.array(),bundles:Ea.array()}),on=(t=>(t.Requested="Requested",t.Fulfilled="Fulfilled",t.Completed="Completed",t.Cancelled="Cancelled",t))(on||{}),qo=y.object({id:y.string(),status:y.nativeEnum(on),product:Rs,trialEligibility:y.object({eligible:y.boolean(),existing:y.boolean(),requiresAccount:y.boolean(),numberOfDaysPerProduct:y.number(),numberOfDaysRemaining:y.number()}).optional(),licenseEligibility:y.object({eligible:y.boolean()}).optional()}),Zh=class{constructor(t){this.api=t}async get(t){const e=await this.api.fetch(`/api/customer/activations/${t}`);return qo.parse(e.data)}async isCompleted(t){const e=await this.api.fetch(`/api/customer/activations/${t}/completed`);return y.boolean().parse(e.data)}async fulfillLicense(t){const e=await this.api.authenticatedFetch(`/api/customer/activations/${t}/license`,"POST");return qo.parse(e.data)}async fulfillTrial(t){const e=await this.api.fetch(`/api/customer/activations/${t}/trial`,"POST");return qo.parse(e.data)}async cancel(t){const e=await this.api.fetch(`/api/customer/activations/${t}/cancel`,"POST");return qo.parse(e.data)}},Bh=class extends Error{constructor(){super(),this.name="NotAuthorizedError"}},xa=class extends Error{constructor(){super(),this.name="NotAuthenticatedError"}},rs=class extends Error{constructor(){super(),this.name="NotFoundError"}},Ic=class extends Error{constructor(t,e,n,r){super(),this.title=t,this.detail=e,this.status=n,this.errors=r,this.name="MoonbaseError",r&&Object.values(r).length===1?this.message=Object.values(r)[0]:this.message=e??t}},Fh=y.object({type:y.string(),title:y.string(),detail:y.string().optional(),status:y.number(),errors:y.record(y.string(),y.string().array()).optional()});function Hh(t){return t.split(".").map((e,n)=>{let[r,...s]=e;return r=n!==0?r.toUpperCase():r.toLowerCase(),s=[s.join("").toLowerCase()],r+s[0]}).join("")}async function ka(t){if(t.status===404)throw new rs;if(t.status===401)throw new xa;if(t.status===403)throw new Bh;let e;try{const n=await t.json();e=Fh.parse(n)}catch(n){throw console.error("Could not handle response",n),new Error("An unknown problem occurred")}throw new Ic(e.title,e.detail,e.status,e.errors?Object.fromEntries(Object.entries(e.errors).map(([n,r])=>[Hh(n),r.join(", ")])):void 0)}var Ac=y.object({countryCode:y.string(),streetAddress1:y.string(),streetAddress2:y.string().nullable(),locality:y.string().nullable(),region:y.string().nullable(),postCode:y.string()}),zh=y.object({newsletterOptIn:y.boolean()}),Dc=y.object({id:y.string(),email:y.string(),name:y.string(),tenantId:y.string(),address:Ac.optional(),communicationPreferences:zh,ownedProducts:y.string().array().optional()}),Oa=Dc.and(y.object({accessToken:y.string(),refreshToken:y.string()})),qh=y.object({id:y.string(),name:y.string(),email:y.string(),resetPasswordToken:y.string().nullable()}),Wh=class{constructor(t,e){this.api=t,this.tokenStore=e}async get(){const t=await this.api.authenticatedFetch("/api/customer/meta/user");return Dc.parse(t.data)}async signIn(t,e){const n=await zo(`${this.api.baseUrl}/api/customer/identity/sign-in?email=${t}&scheme=JWT`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:e});n.status>=400&&await ka(n);const r=await n.json(),s=Oa.parse(r);return this.tokenStore.setUser(s),s}async signUp(t,e,n,r,s,o,i){const a=await this.api.fetch(`/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${i?"true":"false"}`,"POST",{name:t,email:e,password:n,address:r,acceptedPrivacyPolicy:s,acceptedTermsAndConditions:o}),l=Oa.parse(a.data);return this.tokenStore.setUser(l),l}async update(t,e,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity","PATCH",{name:t,email:e,emailConfirmationToken:n,communicationPreferences:r})).status===201}}async setPassword(t,e){await this.api.authenticatedFetch("/api/customer/identity/set-password","POST",{currentPassword:t,newPassword:e})}async forgotPassword(t){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(t)}`,"POST")}async resetPassword(t,e,n){const r=await zo(`${this.api.baseUrl}/api/customer/identity/reset-password?email=${encodeURIComponent(t)}&code=${encodeURIComponent(n.replaceAll(" ","+"))}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:e});r.status>=400&&await ka(r)}async confirmAccount(t,e){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(t)}&code=${encodeURIComponent(e.replaceAll(" ","+"))}`,"POST");return qh.parse(n.data)}async confirmEmail(t,e){await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(t)}&code=${encodeURIComponent(e.replaceAll(" ","+"))}`,"POST")}async confirmEmailChange(t,e){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(t)}&code=${encodeURIComponent(e.replaceAll(" ","+"))}`,"POST")}},js=(t=>(t.Open="Open",t.PaymentProcessing="PaymentProcessing",t.Completed="Completed",t.Failed="Failed",t))(js||{}),Vc=y.object({code:y.string(),name:y.string(),description:y.string()}),Kh=y.object({id:y.string(),type:y.literal("Product"),productId:y.string(),quantity:y.number(),variationId:y.string(),price:ts.optional(),variation:ns.optional(),product:Rs.optional(),appliedDiscount:ba.optional()}),Gh=y.object({id:y.string(),type:y.literal("Bundle"),bundleId:y.string(),quantity:y.number(),variationId:y.string(),price:ts.optional(),variation:ns.optional(),bundle:Ea.optional(),appliedDiscount:ba.optional()}),Rc=y.discriminatedUnion("type",[Kh,Gh]),jc=y.object({id:y.string(),status:y.literal("Open"),currency:y.string(),items:Rc.array(),couponsApplied:Vc.array(),checkoutUrl:y.string().optional(),embeddedCheckoutUrl:y.string().optional()}),Ls=y.object({currency:y.string(),amount:y.number()}),Jh=y.object({original:Ls,discount:Ls,subtotal:Ls,taxes:Ls,due:Ls}),Yh=y.object({name:y.string().nullable(),businessName:y.string().nullable(),taxId:y.string().nullable(),email:y.string().nullable(),address:Ac.nullable()}),Xh=y.object({id:y.string(),status:y.literal("Completed"),currency:y.string(),customer:Yh,total:Jh,items:Rc.array(),couponsApplied:Vc.array()}),Qh=y.discriminatedUnion("status",[jc,Xh]),em=class{constructor(t){this.api=t}async get(t){const e=await this.api.fetch(`/api/customer/orders/${t}`);return Qh.parse(e.data)}async pushContent(t,e,n){const r={...Lc(n)};e&&(r.checkout="true",r.returnUrl=e.returnUrl);const s=await this.api.fetch(`/api/customer/orders/${t.id}?${new URLSearchParams(r).toString()}`,"PATCH",{currency:t.currency,items:t.items});return jc.parse(s.data)}};function Lc(t){return Object.entries({utm_source:t==null?void 0:t.source,utm_medium:t==null?void 0:t.medium,utm_campaign:t==null?void 0:t.campaign,utm_term:t==null?void 0:t.term,utm_content:t==null?void 0:t.content,utm_referrer:t==null?void 0:t.referrer}).filter(([e,n])=>n!==void 0).reduce((e,[n,r])=>({...e,[n]:r}),{})}var tm=class{constructor(t){this.api=t}async get(t){const e=new URLSearchParams(Lc(t)),n=await this.api.fetch(`/api/customer/storefront?${e.toString()}`);return Uh.parse(n.data)}},nm=class{constructor(t,e){this.baseUrl=t,this.tokenStore=e}async authenticatedFetch(t,e,n,r){if(!this.tokenStore.hasAccessToken)throw new xa;return await this.fetch(t,e,n,r)}async fetch(t,e,n,r){const s=await this.tokenStore.getAccessToken();r??(r="application/json");const o=await zo(this.baseUrl+t,{method:e||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":r,...s?{Authorization:`Bearer ${s}`}:{},"x-mb-cors":"1"},body:n?r!=="application/json"?n:JSON.stringify(n):void 0});return o.status>=400&&await ka(o),{data:(Number(o.headers.get("Content-Length"))||0)>0?await o.json():null,headers:o.headers,status:o.status}}},Mc=class Ro{constructor(e){if(this.configuration=e,this.tokens=null,this.refreshTimeoutId=null,this.refreshPromise=null,typeof window<"u"){window.addEventListener("storage",r=>this.handleStorageUpdate(r));const n=localStorage.getItem(Ro.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 e,n,r;if(this.isExpired){if(this.refreshPromise){const o=await this.refreshPromise;return(e=o==null?void 0:o.accessToken)!=null?e:null}this.refreshPromise=this.refreshTokens();const s=await this.refreshPromise;return(n=s==null?void 0:s.accessToken)!=null?n:null}return((r=this.tokens)==null?void 0:r.accessToken)||null}setUser(e){return e===null?(this.tokens=null,typeof window<"u"&&localStorage&&localStorage.removeItem(Ro.storageKey),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),null):(this.tokens={...e,expiresAt:new Date(new Date().getTime()+15*60*1e3)},typeof window<"u"&&localStorage&&localStorage.setItem(Ro.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 e=await zo(`${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(e.status!==200){if(e.status===403||e.status===404)return this.setUser(null),null;throw new Ic("Unexpected result",`Could not refresh access token, status code ${e.status}`,e.status)}const n=Oa.parse(await e.json());return this.setUser(n)}handleStorageUpdate(e){switch(e.key){case Ro.storageKey:this.tokens=e.newValue?JSON.parse(e.newValue):null,this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.tokens&&(this.tokens.expiresAt=new Date(this.tokens.expiresAt),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3+(Math.random()+1)*60*1e3));break}}};Mc.storageKey="moonbase_auth";var rm=Mc,Uc=y.object({id:y.string(),name:y.string(),description:y.string(),code:y.string(),redeemed:y.boolean(),redeemsProducts:$c(Rs).array(),redeemsBundles:$c(Ea).array()}),sm=class{constructor(t){this.api=t}async peek(t){const e=await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(t)}`);return Uc.parse(e.data)}async redeem(t){const e=await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(t)}`,"POST");return Uc.parse(e.data)}},Zc=(t=>(t.Active="Active",t.Revoked="Revoked",t))(Zc||{}),Bc=(t=>(t.Active="Active",t.Revoked="Revoked",t))(Bc||{}),Na=(t=>(t.Online="Online",t.Offline="Offline",t))(Na||{}),Sa=y.object({id:y.string(),status:y.nativeEnum(Zc),product:wa,activeNumberOfActivations:y.number(),maxNumberOfActivations:y.number(),createdAt:y.coerce.date()}),Fc=y.object({id:y.string(),licenseId:y.string(),name:y.string(),status:y.nativeEnum(Bc),activationMethod:y.nativeEnum(Na),lastValidatedAt:y.coerce.date().nullable()}),om=class{constructor(t){this.api=t}async activate(t,e){const n=await this.api.authenticatedFetch(`/api/customer/inventory/activate?method=${e}`,"POST",t,"text/plain");return{license:Sa.parse(n.data),url:y.string().parse(n.headers.get("location"))}}},im=class{constructor(t){this.api=t}async get(t){const e=await this.api.authenticatedFetch(t||"/api/customer/inventory/licenses");return Vs(Sa).parse(e.data)}async getActivations(t,e){const n=await this.api.authenticatedFetch(e||`/api/customer/inventory/licenses/${t}/activations`);return Vs(Fc).parse(n.data)}async revokeActivation(t,e){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${t}/activations/${e}/revoke`,"POST")}},am=class{constructor(t){this.api=t}async get(t,e){const n=await this.api.fetch(`/api/customer/inventory/products/${t}${e?`?version=${e}`:""}`);return wa.parse(n.data)}async getOwned(t){const e=await this.api.authenticatedFetch(t||"/api/customer/inventory/products");return Vs(wa).parse(e.data)}async getLicenses(t,e){const n=await this.api.authenticatedFetch(e||`/api/customer/inventory/products/${t}/licenses`);return Vs(Sa).parse(n.data)}async getActivations(t,e){const n=await this.api.authenticatedFetch(e||`/api/customer/inventory/products/${t}/licenses/activations`);return Vs(Fc).parse(n.data)}async getDownloadUrl(t){const e=new URL(t);e.searchParams.append("redirect","false");const n=await this.api.fetch(e.pathname+e.search);return y.object({location:y.string()}).parse(n.data).location}},lm=class{constructor(t){this.licenses=new im(t),this.products=new am(t),this.activation=new om(t)}},cm=class{constructor(t){this.configuration=t,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new rm(t);const e=new nm(this.configuration.endpoint,this.tokenStore);this.storefront=new tm(e),this.identity=new Wh(e,this.tokenStore),this.vouchers=new sm(e),this.orders=new em(e),this.inventory=new lm(e),this.activationRequests=new Zh(e)}},Hc={};/**
|
|
3
|
+
`)===0?oe.substr(1,oe.length):oe}).forEach(function(oe){var be=oe.split(":"),ae=be.shift().trim();if(ae){var We=be.join(":").trim();$.append(ae,We)}}),$}z.call(K.prototype);function I(w,$){if(!(this instanceof I))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');$||($={}),this.type="default",this.status=$.status===void 0?200:$.status,this.ok=this.status>=200&&this.status<300,this.statusText=$.statusText===void 0?"":""+$.statusText,this.headers=new E($.headers),this.url=$.url||"",this._initBody(w)}z.call(I.prototype),I.prototype.clone=function(){return new I(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},I.error=function(){var w=new I(null,{status:0,statusText:""});return w.type="error",w};var ce=[301,302,303,307,308];I.redirect=function(w,$){if(ce.indexOf($)===-1)throw new RangeError("Invalid status code");return new I(null,{status:$,headers:{location:w}})},i.DOMException=a.DOMException;try{new i.DOMException}catch{i.DOMException=function($,Q){this.message=$,this.name=Q;var oe=Error($);this.stack=oe.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function Ze(w,$){return new Promise(function(Q,oe){var be=new K(w,$);if(be.signal&&be.signal.aborted)return oe(new i.DOMException("Aborted","AbortError"));var ae=new XMLHttpRequest;function We(){ae.abort()}ae.onload=function(){var Ke={status:ae.status,statusText:ae.statusText,headers:V(ae.getAllResponseHeaders()||"")};Ke.url="responseURL"in ae?ae.responseURL:Ke.headers.get("X-Request-URL");var At="response"in ae?ae.response:ae.responseText;setTimeout(function(){Q(new I(At,Ke))},0)},ae.onerror=function(){setTimeout(function(){oe(new TypeError("Network request failed"))},0)},ae.ontimeout=function(){setTimeout(function(){oe(new TypeError("Network request failed"))},0)},ae.onabort=function(){setTimeout(function(){oe(new i.DOMException("Aborted","AbortError"))},0)};function xt(Ke){try{return Ke===""&&a.location.href?a.location.href:Ke}catch{return Ke}}ae.open(be.method,xt(be.url),!0),be.credentials==="include"?ae.withCredentials=!0:be.credentials==="omit"&&(ae.withCredentials=!1),"responseType"in ae&&(l.blob?ae.responseType="blob":l.arrayBuffer&&be.headers.get("Content-Type")&&be.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(ae.responseType="arraybuffer")),$&&typeof $.headers=="object"&&!($.headers instanceof E)?Object.getOwnPropertyNames($.headers).forEach(function(Ke){ae.setRequestHeader(Ke,m($.headers[Ke]))}):be.headers.forEach(function(Ke,At){ae.setRequestHeader(At,Ke)}),be.signal&&(be.signal.addEventListener("abort",We),ae.onreadystatechange=function(){ae.readyState===4&&be.signal.removeEventListener("abort",We)}),ae.send(typeof be._bodyInit>"u"?null:be._bodyInit)})}return Ze.polyfill=!0,a.fetch||(a.fetch=Ze,a.Headers=E,a.Request=K,a.Response=I),i.Headers=E,i.Request=K,i.Response=I,i.fetch=Ze,i})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var s=n.fetch?n:r;e=s.fetch,e.default=s.fetch,e.fetch=s.fetch,e.Headers=s.Headers,e.Request=s.Request,e.Response=s.Response,t.exports=e})(_a,_a.exports);var jh=_a.exports;const zo=Rh(jh);var ts=y.record(y.number()),Lh=y.object({type:y.literal("PercentageOffDiscount"),name:y.string(),description:y.string().optional(),percentage:y.number(),total:ts.optional(),isExclusive:y.boolean()}),Mh=y.object({type:y.literal("FlatAmountOffDiscount"),name:y.string(),description:y.string().optional(),total:ts.optional(),isExclusive:y.boolean()}),ba=y.discriminatedUnion("type",[Lh,Mh]),ns=y.object({id:y.string(),name:y.string(),originalPrice:ts,price:ts,hasDiscount:y.boolean(),discount:ba.optional()});function Vs(t){return y.object({items:y.array(t),hasMore:y.boolean(),next:y.string().nullable()})}function $c(t){return y.object({value:t,quantity:y.number()})}var sn=(t=>(t.Universal="Universal",t.Windows="Windows",t.Linux="Linux",t.Mac="Mac",t))(sn||{}),Pc=y.object({name:y.string(),key:y.string(),platform:y.nativeEnum(sn),size:y.number(),path:y.string().nullable()}),wa=y.object({id:y.string(),name:y.string(),tagline:y.string(),website:y.string().optional(),iconUrl:y.string().optional(),numberOfLicenses:y.number().optional(),numberOfTrials:y.number().optional(),currentActivations:y.number().optional(),maxActivations:y.number().optional(),currentVersion:y.string().nullable(),version:y.string().optional(),prerelease:y.boolean().optional(),downloadsNeedsUser:y.boolean(),downloadsNeedsOwnership:y.boolean(),downloads:y.array(Pc).optional()}),Rs=y.object({id:y.string(),name:y.string(),tagline:y.string(),iconUrl:y.string().nullable(),website:y.string().nullish(),owned:y.boolean(),currentVersion:y.string().optional(),downloads:Pc.array().optional(),defaultVariation:ns.optional(),variations:ns.array().optional(),type:y.void().transform(()=>"product").pipe(y.literal("product"))}),Ea=y.object({id:y.string(),name:y.string(),tagline:y.string(),iconUrl:y.string().nullable(),owned:y.boolean(),partial:y.boolean(),products:Rs.and(y.object({included:y.boolean().optional()})).array(),defaultVariation:ns.optional(),variations:ns.array().optional(),type:y.void().transform(()=>"bundle").pipe(y.literal("bundle"))}),Uh=y.object({suggestedCurrency:y.string(),products:Rs.array(),bundles:Ea.array()}),on=(t=>(t.Requested="Requested",t.Fulfilled="Fulfilled",t.Completed="Completed",t.Cancelled="Cancelled",t))(on||{}),qo=y.object({id:y.string(),status:y.nativeEnum(on),product:Rs,trialEligibility:y.object({eligible:y.boolean(),existing:y.boolean(),requiresAccount:y.boolean(),numberOfDaysPerProduct:y.number(),numberOfDaysRemaining:y.number()}).optional(),licenseEligibility:y.object({eligible:y.boolean()}).optional()}),Zh=class{constructor(t){this.api=t}async get(t){const e=await this.api.fetch(`/api/customer/activations/${t}`);return qo.parse(e.data)}async isCompleted(t){const e=await this.api.fetch(`/api/customer/activations/${t}/completed`);return y.boolean().parse(e.data)}async fulfillLicense(t){const e=await this.api.authenticatedFetch(`/api/customer/activations/${t}/license`,"POST");return qo.parse(e.data)}async fulfillTrial(t){const e=await this.api.fetch(`/api/customer/activations/${t}/trial`,"POST");return qo.parse(e.data)}async cancel(t){const e=await this.api.fetch(`/api/customer/activations/${t}/cancel`,"POST");return qo.parse(e.data)}},Bh=class extends Error{constructor(){super(),this.name="NotAuthorizedError"}},xa=class extends Error{constructor(){super(),this.name="NotAuthenticatedError"}},rs=class extends Error{constructor(){super(),this.name="NotFoundError"}},Ic=class extends Error{constructor(t,e,n,r){super(),this.title=t,this.detail=e,this.status=n,this.errors=r,this.name="MoonbaseError",r&&Object.values(r).length===1?this.message=Object.values(r)[0]:this.message=e??t}},Fh=y.object({type:y.string(),title:y.string(),detail:y.string().optional(),status:y.number(),errors:y.record(y.string(),y.string().array()).optional()});function Hh(t){return t.split(".").map((e,n)=>{let[r,...s]=e;return r=n!==0?r.toUpperCase():r.toLowerCase(),s=[s.join("").toLowerCase()],r+s[0]}).join("")}async function ka(t){if(t.status===404)throw new rs;if(t.status===401)throw new xa;if(t.status===403)throw new Bh;let e;try{const n=await t.json();e=Fh.parse(n)}catch(n){throw console.error("Could not handle response",n),new Error("An unknown problem occurred")}throw new Ic(e.title,e.detail,e.status,e.errors?Object.fromEntries(Object.entries(e.errors).map(([n,r])=>[Hh(n),r.join(", ")])):void 0)}var Ac=y.object({countryCode:y.string(),streetAddress1:y.string(),streetAddress2:y.string().nullable(),locality:y.string().nullable(),region:y.string().nullable(),postCode:y.string()}),zh=y.object({newsletterOptIn:y.boolean()}),Dc=y.object({id:y.string(),email:y.string(),name:y.string(),tenantId:y.string(),address:Ac.optional(),communicationPreferences:zh,ownedProducts:y.string().array().optional()}),Oa=Dc.and(y.object({accessToken:y.string(),refreshToken:y.string()})),qh=y.object({id:y.string(),name:y.string(),email:y.string(),resetPasswordToken:y.string().nullable()}),Wh=class{constructor(t,e){this.api=t,this.tokenStore=e}async get(){const t=await this.api.authenticatedFetch("/api/customer/meta/user");return Dc.parse(t.data)}async signIn(t,e){const n=await zo(`${this.api.baseUrl}/api/customer/identity/sign-in?email=${t}&scheme=JWT`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:e});n.status>=400&&await ka(n);const r=await n.json(),s=Oa.parse(r);return this.tokenStore.setUser(s),s}async signUp(t,e,n,r,s,o,i){const a=await this.api.fetch(`/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${i?"true":"false"}`,"POST",{name:t,email:e,password:n,address:r,acceptedPrivacyPolicy:s,acceptedTermsAndConditions:o}),l=Oa.parse(a.data);return this.tokenStore.setUser(l),l}async update(t,e,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity","PATCH",{name:t,email:e,emailConfirmationToken:n,communicationPreferences:r})).status===201}}async setPassword(t,e){await this.api.authenticatedFetch("/api/customer/identity/set-password","POST",{currentPassword:t,newPassword:e})}async forgotPassword(t){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(t)}`,"POST")}async resetPassword(t,e,n){const r=await zo(`${this.api.baseUrl}/api/customer/identity/reset-password?email=${encodeURIComponent(t)}&code=${encodeURIComponent(n.replaceAll(" ","+"))}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:e});r.status>=400&&await ka(r)}async confirmAccount(t,e){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(t)}&code=${encodeURIComponent(e.replaceAll(" ","+"))}`,"POST");return qh.parse(n.data)}async confirmEmail(t,e){await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(t)}&code=${encodeURIComponent(e.replaceAll(" ","+"))}`,"POST")}async confirmEmailChange(t,e){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(t)}&code=${encodeURIComponent(e.replaceAll(" ","+"))}`,"POST")}},js=(t=>(t.Open="Open",t.PaymentProcessing="PaymentProcessing",t.Completed="Completed",t.Failed="Failed",t))(js||{}),Vc=y.object({code:y.string(),name:y.string(),description:y.string()}),Kh=y.object({id:y.string(),type:y.literal("Product"),productId:y.string(),quantity:y.number(),variationId:y.string(),price:ts.optional(),variation:ns.optional(),product:Rs.optional(),appliedDiscount:ba.optional()}),Gh=y.object({id:y.string(),type:y.literal("Bundle"),bundleId:y.string(),quantity:y.number(),variationId:y.string(),price:ts.optional(),variation:ns.optional(),bundle:Ea.optional(),appliedDiscount:ba.optional()}),Rc=y.discriminatedUnion("type",[Kh,Gh]),jc=y.object({id:y.string(),status:y.literal("Open"),currency:y.string(),items:Rc.array(),couponsApplied:Vc.array(),checkoutUrl:y.string().optional(),embeddedCheckoutUrl:y.string().optional()}),Ls=y.object({currency:y.string(),amount:y.number()}),Jh=y.object({original:Ls,discount:Ls,subtotal:Ls,taxes:Ls,due:Ls}),Yh=y.object({name:y.string().nullable(),businessName:y.string().nullable(),taxId:y.string().nullable(),email:y.string().nullable(),address:Ac.nullable()}),Xh=y.object({id:y.string(),status:y.literal("Completed"),currency:y.string(),customer:Yh,total:Jh,items:Rc.array(),couponsApplied:Vc.array()}),Qh=y.discriminatedUnion("status",[jc,Xh]),em=class{constructor(t){this.api=t}async get(t){const e=await this.api.fetch(`/api/customer/orders/${t}`);return Qh.parse(e.data)}async pushContent(t,e,n){const r={...Lc(n)};e&&(r.checkout="true",r.returnUrl=e.returnUrl);const s=await this.api.fetch(`/api/customer/orders/${t.id}?${new URLSearchParams(r).toString()}`,"PATCH",{currency:t.currency||void 0,items:t.items});return jc.parse(s.data)}};function Lc(t){return Object.entries({utm_source:t==null?void 0:t.source,utm_medium:t==null?void 0:t.medium,utm_campaign:t==null?void 0:t.campaign,utm_term:t==null?void 0:t.term,utm_content:t==null?void 0:t.content,utm_referrer:t==null?void 0:t.referrer}).filter(([e,n])=>n!==void 0).reduce((e,[n,r])=>({...e,[n]:r}),{})}var tm=class{constructor(t){this.api=t}async get(t){const e=new URLSearchParams(Lc(t)),n=await this.api.fetch(`/api/customer/storefront?${e.toString()}`);return Uh.parse(n.data)}},nm=class{constructor(t,e){this.baseUrl=t,this.tokenStore=e}async authenticatedFetch(t,e,n,r){if(!this.tokenStore.hasAccessToken)throw new xa;return await this.fetch(t,e,n,r)}async fetch(t,e,n,r){const s=await this.tokenStore.getAccessToken();r??(r="application/json");const o=await zo(this.baseUrl+t,{method:e||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":r,...s?{Authorization:`Bearer ${s}`}:{},"x-mb-cors":"1"},body:n?r!=="application/json"?n:JSON.stringify(n):void 0});return o.status>=400&&await ka(o),{data:(Number(o.headers.get("Content-Length"))||0)>0?await o.json():null,headers:o.headers,status:o.status}}},Mc=class Ro{constructor(e){if(this.configuration=e,this.tokens=null,this.refreshTimeoutId=null,this.refreshPromise=null,typeof window<"u"){window.addEventListener("storage",r=>this.handleStorageUpdate(r));const n=localStorage.getItem(Ro.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 e,n,r;if(this.isExpired){if(this.refreshPromise){const o=await this.refreshPromise;return(e=o==null?void 0:o.accessToken)!=null?e:null}this.refreshPromise=this.refreshTokens();const s=await this.refreshPromise;return(n=s==null?void 0:s.accessToken)!=null?n:null}return((r=this.tokens)==null?void 0:r.accessToken)||null}setUser(e){return e===null?(this.tokens=null,typeof window<"u"&&localStorage&&localStorage.removeItem(Ro.storageKey),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),null):(this.tokens={...e,expiresAt:new Date(new Date().getTime()+15*60*1e3)},typeof window<"u"&&localStorage&&localStorage.setItem(Ro.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 e=await zo(`${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(e.status!==200){if(e.status===403||e.status===404)return this.setUser(null),null;throw new Ic("Unexpected result",`Could not refresh access token, status code ${e.status}`,e.status)}const n=Oa.parse(await e.json());return this.setUser(n)}handleStorageUpdate(e){switch(e.key){case Ro.storageKey:this.tokens=e.newValue?JSON.parse(e.newValue):null,this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.tokens&&(this.tokens.expiresAt=new Date(this.tokens.expiresAt),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3+(Math.random()+1)*60*1e3));break}}};Mc.storageKey="moonbase_auth";var rm=Mc,Uc=y.object({id:y.string(),name:y.string(),description:y.string(),code:y.string(),redeemed:y.boolean(),redeemsProducts:$c(Rs).array(),redeemsBundles:$c(Ea).array()}),sm=class{constructor(t){this.api=t}async peek(t){const e=await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(t)}`);return Uc.parse(e.data)}async redeem(t){const e=await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(t)}`,"POST");return Uc.parse(e.data)}},Zc=(t=>(t.Active="Active",t.Revoked="Revoked",t))(Zc||{}),Bc=(t=>(t.Active="Active",t.Revoked="Revoked",t))(Bc||{}),Na=(t=>(t.Online="Online",t.Offline="Offline",t))(Na||{}),Sa=y.object({id:y.string(),status:y.nativeEnum(Zc),product:wa,activeNumberOfActivations:y.number(),maxNumberOfActivations:y.number(),createdAt:y.coerce.date()}),Fc=y.object({id:y.string(),licenseId:y.string(),name:y.string(),status:y.nativeEnum(Bc),activationMethod:y.nativeEnum(Na),lastValidatedAt:y.coerce.date().nullable()}),om=class{constructor(t){this.api=t}async activate(t,e){const n=await this.api.authenticatedFetch(`/api/customer/inventory/activate?method=${e}`,"POST",t,"text/plain");return{license:Sa.parse(n.data),url:y.string().parse(n.headers.get("location"))}}},im=class{constructor(t){this.api=t}async get(t){const e=await this.api.authenticatedFetch(t||"/api/customer/inventory/licenses");return Vs(Sa).parse(e.data)}async getActivations(t,e){const n=await this.api.authenticatedFetch(e||`/api/customer/inventory/licenses/${t}/activations`);return Vs(Fc).parse(n.data)}async revokeActivation(t,e){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${t}/activations/${e}/revoke`,"POST")}},am=class{constructor(t){this.api=t}async get(t,e){const n=await this.api.fetch(`/api/customer/inventory/products/${t}${e?`?version=${e}`:""}`);return wa.parse(n.data)}async getOwned(t){const e=await this.api.authenticatedFetch(t||"/api/customer/inventory/products");return Vs(wa).parse(e.data)}async getLicenses(t,e){const n=await this.api.authenticatedFetch(e||`/api/customer/inventory/products/${t}/licenses`);return Vs(Sa).parse(n.data)}async getActivations(t,e){const n=await this.api.authenticatedFetch(e||`/api/customer/inventory/products/${t}/licenses/activations`);return Vs(Fc).parse(n.data)}async getDownloadUrl(t){const e=new URL(t);e.searchParams.append("redirect","false");const n=await this.api.fetch(e.pathname+e.search);return y.object({location:y.string()}).parse(n.data).location}},lm=class{constructor(t){this.licenses=new im(t),this.products=new am(t),this.activation=new om(t)}},cm=class{constructor(t){this.configuration=t,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new rm(t);const e=new nm(this.configuration.endpoint,this.tokenStore);this.storefront=new tm(e),this.identity=new Wh(e,this.tokenStore),this.vouchers=new sm(e),this.orders=new em(e),this.inventory=new lm(e),this.activationRequests=new Zh(e)}},Hc={};/**
|
|
4
4
|
* @vue/shared v3.4.38
|
|
5
5
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
6
6
|
* @license MIT
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.27",
|
|
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.4.29",
|
|
25
|
-
"@moonbase.sh/vue": "0.2.
|
|
25
|
+
"@moonbase.sh/vue": "0.2.27"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^18.14.2",
|