@moonbase.sh/storefront 0.2.21 → 0.2.22
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 +10845 -7942
- package/dist/moonbase.umd.cjs +16 -15
- package/package.json +2 -2
package/dist/moonbase.umd.cjs
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
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
|
-
(function(Et,_e){typeof exports=="object"&&typeof module<"u"?_e(exports):typeof define=="function"&&define.amd?define(["exports"],_e):(Et=typeof globalThis<"u"?globalThis:Et||self,_e(Et.Moonbase={}))})(this,function(Et){"use strict";var xw=Object.defineProperty;var kw=(Et,_e,wn)=>_e in Et?xw(Et,_e,{enumerable:!0,configurable:!0,writable:!0,value:wn}):Et[_e]=wn;var Nr=(Et,_e,wn)=>kw(Et,typeof _e!="symbol"?_e+"":_e,wn);var _e;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(_e||(_e={}));var wn;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(wn||(wn={}));const ee=_e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),En=e=>{switch(typeof e){case"undefined":return ee.undefined;case"string":return ee.string;case"number":return isNaN(e)?ee.nan:ee.number;case"boolean":return ee.boolean;case"function":return ee.function;case"bigint":return ee.bigint;case"symbol":return ee.symbol;case"object":return Array.isArray(e)?ee.array:e===null?ee.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ee.promise:typeof Map<"u"&&e instanceof Map?ee.map:typeof Set<"u"&&e instanceof Set?ee.set:typeof Date<"u"&&e instanceof Date?ee.date:ee.object;default:return ee.unknown}},H=_e.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"]),Yd=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class It extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const 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 o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,_e.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}It.create=e=>new It(e);const Mr=(e,t)=>{let n;switch(e.code){case H.invalid_type:e.received===ee.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case H.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,_e.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:n=`Unrecognized key(s) in object: ${_e.joinValues(e.keys,", ")}`;break;case H.invalid_union:n="Invalid input";break;case H.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${_e.joinValues(e.options)}`;break;case H.invalid_enum_value:n=`Invalid enum value. Expected ${_e.joinValues(e.options)}, received '${e.received}'`;break;case H.invalid_arguments:n="Invalid function arguments";break;case H.invalid_return_type:n="Invalid function return type";break;case H.invalid_date:n="Invalid date";break;case H.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:_e.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case H.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case H.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case H.custom:n="Invalid input";break;case H.invalid_intersection_types:n="Intersection results could not be merged";break;case H.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case H.not_finite:n="Number must be finite";break;default:n=t.defaultError,_e.assertNever(e)}return{message:n}};let Ka=Mr;function Xd(e){Ka=e}function Uo(){return Ka}const Fo=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:o.message||a}},Qd=[];function te(e,t){const n=Fo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Uo(),Mr].filter(r=>!!r)});e.common.issues.push(n)}class ct{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return be;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n)r.push({key:await o.key,value:await o.value});return ct.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return be;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const be=Object.freeze({status:"aborted"}),Ga=e=>({status:"dirty",value:e}),ht=e=>({status:"valid",value:e}),ii=e=>e.status==="aborted",ai=e=>e.status==="dirty",Ur=e=>e.status==="valid",Bo=e=>typeof Promise<"u"&&e instanceof Promise;var ue;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ue||(ue={}));class Ut{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ja=(e,t)=>{if(Ur(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new It(e.common.issues);return this._error=n,this._error}}};function Ee(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>i.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:r??a.defaultError}:{message:n??a.defaultError},description:o}}class Oe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return En(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:En(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ct,ctx:{common:t.parent.common,data:t.data,parsedType:En(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Bo(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:En(t)},s=this._parseSync({data:t,path:o.path,parent:o});return Ja(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:En(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Bo(o)?o:Promise.resolve(o));return Ja(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:H.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Vt({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return nn.create(this,this._def)}nullable(){return Qn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return At.create(this,this._def)}promise(){return Cr.create(this,this._def)}or(t){return Zr.create([this,t],this._def)}and(t){return qr.create(this,t,this._def)}transform(t){return new Vt({...Ee(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Jr({...Ee(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new Xa({typeName:ve.ZodBranded,type:this,...Ee(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ko({...Ee(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Yr.create(this,t)}readonly(){return Jo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ef=/^c[^\s-]{8,}$/i,tf=/^[a-z][a-z0-9]*$/,nf=/^[0-9A-HJKMNP-TV-Z]{26}$/,rf=/^[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,of=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sf="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let li;const af=/^(((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}))$/,lf=/^(([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})))$/,cf=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function uf(e,t){return!!((t==="v4"||!t)&&af.test(e)||(t==="v6"||!t)&&lf.test(e))}class Dt extends Oe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ee.string){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ee.string,received:s.parsedType}),be}const r=new ct;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:H.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:H.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?te(o,{code:H.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&te(o,{code:H.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")of.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"email",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")li||(li=new RegExp(sf,"u")),li.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"emoji",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")rf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"uuid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")ef.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")tf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid2",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")nf.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ulid",code:H.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),te(o,{validation:"url",code:H.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"regex",code:H.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?cf(s).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:H.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="ip"?uf(t.data,s.version)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ip",code:H.invalid_string,message:s.message}),r.dirty()):_e.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:H.invalid_string,...ue.errToObj(r)})}_addCheck(t){return new Dt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ue.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ue.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ue.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ue.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ue.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ue.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ue.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ue.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...ue.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ue.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ue.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ue.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ue.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ue.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ue.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ue.errToObj(n)})}nonempty(t){return this.min(1,ue.errToObj(t))}trim(){return new Dt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Dt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Dt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Dt.create=e=>{var t;return new Dt({checks:[],typeName:ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};function df(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class On extends Oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ee.number){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ee.number,received:s.parsedType}),be}let r;const o=new ct;for(const s of this._def.checks)s.kind==="int"?_e.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:H.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?df(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:H.not_finite,message:s.message}),o.dirty()):_e.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ue.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ue.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ue.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ue.toString(n))}setLimit(t,n,r,o){return new On({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ue.toString(o)}]})}_addCheck(t){return new On({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ue.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ue.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ue.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ue.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ue.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ue.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ue.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ue.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ue.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&_e.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}On.create=e=>new On({checks:[],typeName:ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Nn extends Oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ee.bigint){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ee.bigint,received:s.parsedType}),be}let r;const o=new ct;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),te(r,{code:H.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):_e.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ue.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ue.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ue.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ue.toString(n))}setLimit(t,n,r,o){return new Nn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ue.toString(o)}]})}_addCheck(t){return new Nn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ue.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ue.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ue.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ue.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ue.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Nn.create=e=>{var t;return new Nn({checks:[],typeName:ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};class Fr extends Oe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ee.boolean){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.boolean,received:r.parsedType}),be}return ht(t.data)}}Fr.create=e=>new Fr({typeName:ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Jn extends Oe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ee.date){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_type,expected:ee.date,received:s.parsedType}),be}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return te(s,{code:H.invalid_date}),be}const r=new ct;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:H.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),te(o,{code:H.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):_e.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Jn({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ue.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ue.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Jn.create=e=>new Jn({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ve.ZodDate,...Ee(e)});class Ho extends Oe{_parse(t){if(this._getType(t)!==ee.symbol){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.symbol,received:r.parsedType}),be}return ht(t.data)}}Ho.create=e=>new Ho({typeName:ve.ZodSymbol,...Ee(e)});class Br extends Oe{_parse(t){if(this._getType(t)!==ee.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.undefined,received:r.parsedType}),be}return ht(t.data)}}Br.create=e=>new Br({typeName:ve.ZodUndefined,...Ee(e)});class Hr extends Oe{_parse(t){if(this._getType(t)!==ee.null){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.null,received:r.parsedType}),be}return ht(t.data)}}Hr.create=e=>new Hr({typeName:ve.ZodNull,...Ee(e)});class Sr extends Oe{constructor(){super(...arguments),this._any=!0}_parse(t){return ht(t.data)}}Sr.create=e=>new Sr({typeName:ve.ZodAny,...Ee(e)});class Yn extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ht(t.data)}}Yn.create=e=>new Yn({typeName:ve.ZodUnknown,...Ee(e)});class tn extends Oe{_parse(t){const n=this._getOrReturnCtx(t);return te(n,{code:H.invalid_type,expected:ee.never,received:n.parsedType}),be}}tn.create=e=>new tn({typeName:ve.ZodNever,...Ee(e)});class Zo extends Oe{_parse(t){if(this._getType(t)!==ee.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.void,received:r.parsedType}),be}return ht(t.data)}}Zo.create=e=>new Zo({typeName:ve.ZodVoid,...Ee(e)});class At extends Oe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ee.array)return te(n,{code:H.invalid_type,expected:ee.array,received:n.parsedType}),be;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(te(n,{code:i?H.too_big:H.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(te(n,{code:H.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(te(n,{code:H.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Ut(n,i,n.path,a)))).then(i=>ct.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Ut(n,i,n.path,a)));return ct.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new At({...this._def,minLength:{value:t,message:ue.toString(n)}})}max(t,n){return new At({...this._def,maxLength:{value:t,message:ue.toString(n)}})}length(t,n){return new At({...this._def,exactLength:{value:t,message:ue.toString(n)}})}nonempty(t){return this.min(1,t)}}At.create=(e,t)=>new At({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Ee(t)});function xr(e){if(e instanceof Ze){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=nn.create(xr(r))}return new Ze({...e._def,shape:()=>t})}else return e instanceof At?new At({...e._def,type:xr(e.element)}):e instanceof nn?nn.create(xr(e.unwrap())):e instanceof Qn?Qn.create(xr(e.unwrap())):e instanceof Ft?Ft.create(e.items.map(t=>xr(t))):e}class Ze extends Oe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=_e.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ee.object){const c=this._getOrReturnCtx(t);return te(c,{code:H.invalid_type,expected:ee.object,received:c.parsedType}),be}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof tn&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Ut(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof tn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(te(o,{code:H.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=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Ut(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key;c.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return c}).then(c=>ct.mergeObjectSync(r,c)):ct.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ue.errToObj,new Ze({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=ue.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Ze({...this._def,unknownKeys:"strip"})}passthrough(){return new Ze({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ze({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ze({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ze({...this._def,catchall:t})}pick(t){const n={};return _e.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ze({...this._def,shape:()=>n})}omit(t){const n={};return _e.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Ze({...this._def,shape:()=>n})}deepPartial(){return xr(this)}partial(t){const n={};return _e.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new Ze({...this._def,shape:()=>n})}required(t){const n={};return _e.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof nn;)s=s._def.innerType;n[r]=s}}),new Ze({...this._def,shape:()=>n})}keyof(){return Ya(_e.objectKeys(this.shape))}}Ze.create=(e,t)=>new Ze({shape:()=>e,unknownKeys:"strip",catchall:tn.create(),typeName:ve.ZodObject,...Ee(t)}),Ze.strictCreate=(e,t)=>new Ze({shape:()=>e,unknownKeys:"strict",catchall:tn.create(),typeName:ve.ZodObject,...Ee(t)}),Ze.lazycreate=(e,t)=>new Ze({shape:e,unknownKeys:"strip",catchall:tn.create(),typeName:ve.ZodObject,...Ee(t)});class Zr extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new It(a.ctx.common.issues));return te(n,{code:H.invalid_union,unionErrors:i}),be}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const 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"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new It(l));return te(n,{code:H.invalid_union,unionErrors:a}),be}}get options(){return this._def.options}}Zr.create=(e,t)=>new Zr({options:e,typeName:ve.ZodUnion,...Ee(t)});const qo=e=>e instanceof zr?qo(e.schema):e instanceof Vt?qo(e.innerType()):e instanceof Kr?[e.value]:e instanceof Sn?e.options:e instanceof Gr?Object.keys(e.enum):e instanceof Jr?qo(e._def.innerType):e instanceof Br?[void 0]:e instanceof Hr?[null]:null;class Wo extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.object)return te(n,{code:H.invalid_type,expected:ee.object,received:n.parsedType}),be;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(te(n,{code:H.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=qo(s.shape[t]);if(!i)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new Wo({typeName:ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Ee(r)})}}function ci(e,t){const n=En(e),r=En(t);if(e===t)return{valid:!0,data:e};if(n===ee.object&&r===ee.object){const o=_e.objectKeys(t),s=_e.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=ci(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===ee.array&&r===ee.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=ci(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ee.date&&r===ee.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class qr extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(ii(s)||ii(i))return be;const a=ci(s.value,i.value);return a.valid?((ai(s)||ai(i))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:H.invalid_intersection_types}),be)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}qr.create=(e,t,n)=>new qr({left:e,right:t,typeName:ve.ZodIntersection,...Ee(n)});class Ft extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.array)return te(r,{code:H.invalid_type,expected:ee.array,received:r.parsedType}),be;if(r.data.length<this._def.items.length)return te(r,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:H.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Ut(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>ct.mergeArray(n,i)):ct.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Ft({...this._def,rest:t})}}Ft.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ft({items:e,typeName:ve.ZodTuple,rest:null,...Ee(t)})};class Wr extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.object)return te(r,{code:H.invalid_type,expected:ee.object,received:r.parsedType}),be;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Ut(r,a,r.path,a)),value:i._parse(new Ut(r,r.data[a],r.path,a))});return r.common.async?ct.mergeObjectAsync(n,o):ct.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Oe?new Wr({keyType:t,valueType:n,typeName:ve.ZodRecord,...Ee(r)}):new Wr({keyType:Dt.create(),valueType:t,typeName:ve.ZodRecord,...Ee(n)})}}class zo extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.map)return te(r,{code:H.invalid_type,expected:ee.map,received:r.parsedType}),be;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Ut(r,a,r.path,[c,"key"])),value:s._parse(new Ut(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 be;(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 be;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}zo.create=(e,t,n)=>new zo({valueType:t,keyType:e,typeName:ve.ZodMap,...Ee(n)});class Xn extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ee.set)return te(r,{code:H.invalid_type,expected:ee.set,received:r.parsedType}),be;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(te(r,{code:H.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(te(r,{code:H.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return be;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Ut(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Xn({...this._def,minSize:{value:t,message:ue.toString(n)}})}max(t,n){return new Xn({...this._def,maxSize:{value:t,message:ue.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Xn.create=(e,t)=>new Xn({valueType:e,minSize:null,maxSize:null,typeName:ve.ZodSet,...Ee(t)});class kr extends Oe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.function)return te(n,{code:H.invalid_type,expected:ee.function,received:n.parsedType}),be;function r(a,l){return Fo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Uo(),Mr].filter(c=>!!c),issueData:{code:H.invalid_arguments,argumentsError:l}})}function o(a,l){return Fo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Uo(),Mr].filter(c=>!!c),issueData:{code:H.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Cr){const a=this;return ht(async function(...l){const c=new It([]),u=await a._def.args.parseAsync(l,s).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,s).catch(m=>{throw c.addIssue(o(d,m)),c})})}else{const a=this;return ht(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new It([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new It([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new kr({...this._def,args:Ft.create(t).rest(Yn.create())})}returns(t){return new kr({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new kr({args:t||Ft.create([]).rest(Yn.create()),returns:n||Yn.create(),typeName:ve.ZodFunction,...Ee(r)})}}class zr extends Oe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}zr.create=(e,t)=>new zr({getter:e,typeName:ve.ZodLazy,...Ee(t)});class Kr extends Oe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:H.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:t.data}}get value(){return this._def.value}}Kr.create=(e,t)=>new Kr({value:e,typeName:ve.ZodLiteral,...Ee(t)});function Ya(e,t){return new Sn({values:e,typeName:ve.ZodEnum,...Ee(t)})}class Sn extends Oe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:_e.joinValues(r),received:n.parsedType,code:H.invalid_type}),be}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{received:n.data,code:H.invalid_enum_value,options:r}),be}return ht(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return Sn.create(t)}exclude(t){return Sn.create(this.options.filter(n=>!t.includes(n)))}}Sn.create=Ya;class Gr extends Oe{_parse(t){const n=_e.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ee.string&&r.parsedType!==ee.number){const o=_e.objectValues(n);return te(r,{expected:_e.joinValues(o),received:r.parsedType,code:H.invalid_type}),be}if(n.indexOf(t.data)===-1){const o=_e.objectValues(n);return te(r,{received:r.data,code:H.invalid_enum_value,options:o}),be}return ht(t.data)}get enum(){return this._def.values}}Gr.create=(e,t)=>new Gr({values:e,typeName:ve.ZodNativeEnum,...Ee(t)});class Cr extends Oe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ee.promise&&n.common.async===!1)return te(n,{code:H.invalid_type,expected:ee.promise,received:n.parsedType}),be;const r=n.parsedType===ee.promise?n.data:Promise.resolve(n.data);return ht(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Cr.create=(e,t)=>new Cr({type:e,typeName:ve.ZodPromise,...Ee(t)});class Vt extends Oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{te(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(i).then(a=>this._def.schema._parseAsync({data:a,path:r.path,parent:r})):this._def.schema._parseSync({data:i,path:r.path,parent:r})}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?be:(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"?be:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ur(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Ur(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);_e.assertNever(o)}}Vt.create=(e,t,n)=>new Vt({schema:e,typeName:ve.ZodEffects,effect:t,...Ee(n)}),Vt.createWithPreprocess=(e,t,n)=>new Vt({schema:t,effect:{type:"preprocess",transform:e},typeName:ve.ZodEffects,...Ee(n)});class nn extends Oe{_parse(t){return this._getType(t)===ee.undefined?ht(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}nn.create=(e,t)=>new nn({innerType:e,typeName:ve.ZodOptional,...Ee(t)});class Qn extends Oe{_parse(t){return this._getType(t)===ee.null?ht(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qn.create=(e,t)=>new Qn({innerType:e,typeName:ve.ZodNullable,...Ee(t)});class Jr extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ee.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Jr.create=(e,t)=>new Jr({innerType:e,typeName:ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class Ko extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Bo(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new It(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new It(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ko.create=(e,t)=>new Ko({innerType:e,typeName:ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});class Go extends Oe{_parse(t){if(this._getType(t)!==ee.nan){const r=this._getOrReturnCtx(t);return te(r,{code:H.invalid_type,expected:ee.nan,received:r.parsedType}),be}return{status:"valid",value:t.data}}}Go.create=e=>new Go({typeName:ve.ZodNaN,...Ee(e)});const ff=Symbol("zod_brand");class Xa extends Oe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Yr extends Oe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?be:s.status==="dirty"?(n.dirty(),Ga(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?be:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Yr({in:t,out:n,typeName:ve.ZodPipeline})}}class Jo extends Oe{_parse(t){const n=this._def.innerType._parse(t);return Ur(n)&&(n.value=Object.freeze(n.value)),n}}Jo.create=(e,t)=>new Jo({innerType:e,typeName:ve.ZodReadonly,...Ee(t)});const Qa=(e,t={},n)=>e?Sr.create().superRefine((r,o)=>{var s,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(i=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&i!==void 0?i:!0,c=typeof a=="string"?{message:a}:a;o.addIssue({code:"custom",...c,fatal:l})}}):Sr.create(),pf={object:Ze.lazycreate};var ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ve||(ve={}));const hf=(e,t={message:`Input not instance of ${e.name}`})=>Qa(n=>n instanceof e,t),el=Dt.create,tl=On.create,mf=Go.create,vf=Nn.create,nl=Fr.create,gf=Jn.create,yf=Ho.create,_f=Br.create,bf=Hr.create,wf=Sr.create,Ef=Yn.create,Of=tn.create,Nf=Zo.create,Sf=At.create,xf=Ze.create,kf=Ze.strictCreate,Cf=Zr.create,Tf=Wo.create,Pf=qr.create,$f=Ft.create,If=Wr.create,Df=zo.create,Af=Xn.create,Vf=kr.create,Rf=zr.create,jf=Kr.create,Lf=Sn.create,Mf=Gr.create,Uf=Cr.create,rl=Vt.create,Ff=nn.create,Bf=Qn.create,Hf=Vt.createWithPreprocess,Zf=Yr.create;var v=Object.freeze({__proto__:null,defaultErrorMap:Mr,setErrorMap:Xd,getErrorMap:Uo,makeIssue:Fo,EMPTY_PATH:Qd,addIssueToContext:te,ParseStatus:ct,INVALID:be,DIRTY:Ga,OK:ht,isAborted:ii,isDirty:ai,isValid:Ur,isAsync:Bo,get util(){return _e},get objectUtil(){return wn},ZodParsedType:ee,getParsedType:En,ZodType:Oe,ZodString:Dt,ZodNumber:On,ZodBigInt:Nn,ZodBoolean:Fr,ZodDate:Jn,ZodSymbol:Ho,ZodUndefined:Br,ZodNull:Hr,ZodAny:Sr,ZodUnknown:Yn,ZodNever:tn,ZodVoid:Zo,ZodArray:At,ZodObject:Ze,ZodUnion:Zr,ZodDiscriminatedUnion:Wo,ZodIntersection:qr,ZodTuple:Ft,ZodRecord:Wr,ZodMap:zo,ZodSet:Xn,ZodFunction:kr,ZodLazy:zr,ZodLiteral:Kr,ZodEnum:Sn,ZodNativeEnum:Gr,ZodPromise:Cr,ZodEffects:Vt,ZodTransformer:Vt,ZodOptional:nn,ZodNullable:Qn,ZodDefault:Jr,ZodCatch:Ko,ZodNaN:Go,BRAND:ff,ZodBranded:Xa,ZodPipeline:Yr,ZodReadonly:Jo,custom:Qa,Schema:Oe,ZodSchema:Oe,late:pf,get ZodFirstPartyTypeKind(){return ve},coerce:{string:e=>Dt.create({...e,coerce:!0}),number:e=>On.create({...e,coerce:!0}),boolean:e=>Fr.create({...e,coerce:!0}),bigint:e=>Nn.create({...e,coerce:!0}),date:e=>Jn.create({...e,coerce:!0})},any:wf,array:Sf,bigint:vf,boolean:nl,date:gf,discriminatedUnion:Tf,effect:rl,enum:Lf,function:Vf,instanceof:hf,intersection:Pf,lazy:Rf,literal:jf,map:Df,nan:mf,nativeEnum:Mf,never:Of,null:bf,nullable:Bf,number:tl,object:xf,oboolean:()=>nl().optional(),onumber:()=>tl().optional(),optional:Ff,ostring:()=>el().optional(),pipeline:Zf,preprocess:Hf,promise:Uf,record:If,set:Af,strictObject:kf,string:el,symbol:yf,transformer:rl,tuple:$f,undefined:_f,union:Cf,unknown:Ef,void:Nf,NEVER:be,ZodIssueCode:H,quotelessJson:Yd,ZodError:It}),qf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ui={exports:{}};(function(e,t){var n=typeof self<"u"?self:qf,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(i){var a={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function l(w){return w&&DataView.prototype.isPrototypeOf(w)}if(a.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(w){return w&&c.indexOf(Object.prototype.toString.call(w))>-1};function d(w){if(typeof w!="string"&&(w=String(w)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(w))throw new TypeError("Invalid character in header field name");return w.toLowerCase()}function f(w){return typeof w!="string"&&(w=String(w)),w}function m(w){var I={next:function(){var ne=w.shift();return{done:ne===void 0,value:ne}}};return a.iterable&&(I[Symbol.iterator]=function(){return I}),I}function y(w){this.map={},w instanceof y?w.forEach(function(I,ne){this.append(ne,I)},this):Array.isArray(w)?w.forEach(function(I){this.append(I[0],I[1])},this):w&&Object.getOwnPropertyNames(w).forEach(function(I){this.append(I,w[I])},this)}y.prototype.append=function(w,I){w=d(w),I=f(I);var ne=this.map[w];this.map[w]=ne?ne+", "+I:I},y.prototype.delete=function(w){delete this.map[d(w)]},y.prototype.get=function(w){return w=d(w),this.has(w)?this.map[w]:null},y.prototype.has=function(w){return this.map.hasOwnProperty(d(w))},y.prototype.set=function(w,I){this.map[d(w)]=f(I)},y.prototype.forEach=function(w,I){for(var ne in this.map)this.map.hasOwnProperty(ne)&&w.call(I,this.map[ne],ne,this)},y.prototype.keys=function(){var w=[];return this.forEach(function(I,ne){w.push(ne)}),m(w)},y.prototype.values=function(){var w=[];return this.forEach(function(I){w.push(I)}),m(w)},y.prototype.entries=function(){var w=[];return this.forEach(function(I,ne){w.push([ne,I])}),m(w)},a.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function E(w){if(w.bodyUsed)return Promise.reject(new TypeError("Already read"));w.bodyUsed=!0}function S(w){return new Promise(function(I,ne){w.onload=function(){I(w.result)},w.onerror=function(){ne(w.error)}})}function A(w){var I=new FileReader,ne=S(I);return I.readAsArrayBuffer(w),ne}function F(w){var I=new FileReader,ne=S(I);return I.readAsText(w),ne}function C(w){for(var I=new Uint8Array(w),ne=new Array(I.length),ae=0;ae<I.length;ae++)ne[ae]=String.fromCharCode(I[ae]);return ne.join("")}function z(w){if(w.slice)return w.slice(0);var I=new Uint8Array(w.byteLength);return I.set(new Uint8Array(w)),I.buffer}function $(){return this.bodyUsed=!1,this._initBody=function(w){this._bodyInit=w,w?typeof w=="string"?this._bodyText=w:a.blob&&Blob.prototype.isPrototypeOf(w)?this._bodyBlob=w:a.formData&&FormData.prototype.isPrototypeOf(w)?this._bodyFormData=w:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(w)?this._bodyText=w.toString():a.arrayBuffer&&a.blob&&l(w)?(this._bodyArrayBuffer=z(w.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(w)||u(w))?this._bodyArrayBuffer=z(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):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(w)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var w=E(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(){return this._bodyArrayBuffer?E(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(A)}),this.text=function(){var w=E(this);if(w)return w;if(this._bodyBlob)return F(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(C(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(Y)}),this.json=function(){return this.text().then(JSON.parse)},this}var Z=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function x(w){var I=w.toUpperCase();return Z.indexOf(I)>-1?I:w}function fe(w,I){I=I||{};var ne=I.body;if(w instanceof fe){if(w.bodyUsed)throw new TypeError("Already read");this.url=w.url,this.credentials=w.credentials,I.headers||(this.headers=new y(w.headers)),this.method=w.method,this.mode=w.mode,this.signal=w.signal,!ne&&w._bodyInit!=null&&(ne=w._bodyInit,w.bodyUsed=!0)}else this.url=String(w);if(this.credentials=I.credentials||this.credentials||"same-origin",(I.headers||!this.headers)&&(this.headers=new y(I.headers)),this.method=x(I.method||this.method||"GET"),this.mode=I.mode||this.mode||null,this.signal=I.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&ne)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(ne)}fe.prototype.clone=function(){return new fe(this,{body:this._bodyInit})};function Y(w){var I=new FormData;return w.trim().split("&").forEach(function(ne){if(ne){var ae=ne.split("="),re=ae.shift().replace(/\+/g," "),ce=ae.join("=").replace(/\+/g," ");I.append(decodeURIComponent(re),decodeURIComponent(ce))}}),I}function V(w){var I=new y,ne=w.replace(/\r?\n[\t ]+/g," ");return ne.split(/\r?\n/).forEach(function(ae){var re=ae.split(":"),ce=re.shift().trim();if(ce){var Ie=re.join(":").trim();I.append(ce,Ie)}}),I}$.call(fe.prototype);function P(w,I){I||(I={}),this.type="default",this.status=I.status===void 0?200:I.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in I?I.statusText:"OK",this.headers=new y(I.headers),this.url=I.url||"",this._initBody(w)}$.call(P.prototype),P.prototype.clone=function(){return new P(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},P.error=function(){var w=new P(null,{status:0,statusText:""});return w.type="error",w};var j=[301,302,303,307,308];P.redirect=function(w,I){if(j.indexOf(I)===-1)throw new RangeError("Invalid status code");return new P(null,{status:I,headers:{location:w}})},i.DOMException=s.DOMException;try{new i.DOMException}catch{i.DOMException=function(I,ne){this.message=I,this.name=ne;var ae=Error(I);this.stack=ae.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function oe(w,I){return new Promise(function(ne,ae){var re=new fe(w,I);if(re.signal&&re.signal.aborted)return ae(new i.DOMException("Aborted","AbortError"));var ce=new XMLHttpRequest;function Ie(){ce.abort()}ce.onload=function(){var je={status:ce.status,statusText:ce.statusText,headers:V(ce.getAllResponseHeaders()||"")};je.url="responseURL"in ce?ce.responseURL:je.headers.get("X-Request-URL");var nt="response"in ce?ce.response:ce.responseText;ne(new P(nt,je))},ce.onerror=function(){ae(new TypeError("Network request failed"))},ce.ontimeout=function(){ae(new TypeError("Network request failed"))},ce.onabort=function(){ae(new i.DOMException("Aborted","AbortError"))},ce.open(re.method,re.url,!0),re.credentials==="include"?ce.withCredentials=!0:re.credentials==="omit"&&(ce.withCredentials=!1),"responseType"in ce&&a.blob&&(ce.responseType="blob"),re.headers.forEach(function(je,nt){ce.setRequestHeader(nt,je)}),re.signal&&(re.signal.addEventListener("abort",Ie),ce.onreadystatechange=function(){ce.readyState===4&&re.signal.removeEventListener("abort",Ie)}),ce.send(typeof re._bodyInit>"u"?null:re._bodyInit)})}return oe.polyfill=!0,s.fetch||(s.fetch=oe,s.Headers=y,s.Request=fe,s.Response=P),i.Headers=y,i.Request=fe,i.Response=P,i.fetch=oe,Object.defineProperty(i,"__esModule",{value:!0}),i})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t})(ui,ui.exports);var zf=ui.exports;const Yo=Wf(zf);var xn=v.record(v.number()),Kf=v.object({type:v.literal("PercentageOffDiscount"),name:v.string(),description:v.string().optional(),percentage:v.number(),total:xn}),Gf=v.object({type:v.literal("FlatAmountOffDiscount"),name:v.string(),description:v.string().optional(),total:xn}),Jf=v.discriminatedUnion("type",[Kf,Gf]),Tr=v.object({id:v.string(),name:v.string(),originalPrice:xn,price:xn,hasDiscount:v.boolean(),discount:Jf.optional()});function Xr(e){return v.object({items:v.array(e),hasMore:v.boolean(),next:v.string().nullable()})}function ol(e){return v.object({value:e,quantity:v.number()})}var Bt=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Bt||{}),sl=v.object({name:v.string(),key:v.string(),platform:v.nativeEnum(Bt),size:v.number(),path:v.string().nullable()}),di=v.object({id:v.string(),name:v.string(),tagline:v.string(),website:v.string().optional(),iconUrl:v.string().optional(),numberOfLicenses:v.number().optional(),numberOfTrials:v.number().optional(),currentActivations:v.number().optional(),maxActivations:v.number().optional(),currentVersion:v.string().nullable(),version:v.string().optional(),prerelease:v.boolean().optional(),downloadsNeedsUser:v.boolean(),downloadsNeedsOwnership:v.boolean(),downloads:v.array(sl).optional()}),Qr=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),website:v.string().nullish(),owned:v.boolean(),currentVersion:v.string().optional(),downloads:sl.array().optional(),defaultVariation:Tr.optional(),variations:Tr.array().optional(),type:v.void().transform(()=>"product").pipe(v.literal("product"))}),fi=v.object({id:v.string(),name:v.string(),tagline:v.string(),iconUrl:v.string().nullable(),owned:v.boolean(),partial:v.boolean(),products:Qr.and(v.object({included:v.boolean().optional()})).array(),defaultVariation:Tr.optional(),variations:Tr.array().optional(),type:v.void().transform(()=>"bundle").pipe(v.literal("bundle"))}),Yf=v.object({suggestedCurrency:v.string(),products:Qr.array(),bundles:fi.array()}),Ht=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Ht||{}),Xo=v.object({id:v.string(),status:v.nativeEnum(Ht),product:Qr,trialEligibility:v.object({eligible:v.boolean(),existing:v.boolean(),requiresAccount:v.boolean(),numberOfDaysPerProduct:v.number(),numberOfDaysRemaining:v.number()}).optional(),licenseEligibility:v.object({eligible:v.boolean()}).optional()}),Xf=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/activations/${e}`);return Xo.parse(t.data)}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`);return v.boolean().parse(t.data)}async fulfillLicense(e){const t=await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,"POST");return Xo.parse(t.data)}async fulfillTrial(e){const t=await this.api.fetch(`/api/customer/activations/${e}/trial`,"POST");return Xo.parse(t.data)}async cancel(e){const t=await this.api.fetch(`/api/customer/activations/${e}/cancel`,"POST");return Xo.parse(t.data)}},Qf=class extends Error{constructor(){super(),this.name="NotAuthorizedError"}},pi=class extends Error{constructor(){super(),this.name="NotAuthenticatedError"}},Pr=class extends Error{constructor(){super(),this.name="NotFoundError"}},il=class extends Error{constructor(e,t,n,r){super(),this.title=e,this.detail=t,this.status=n,this.errors=r,this.name="MoonbaseError",r&&Object.values(r).length===1?this.message=Object.values(r)[0]:this.message=t??e}},ep=v.object({type:v.string(),title:v.string(),detail:v.string().optional(),status:v.number(),errors:v.record(v.string(),v.string().array()).optional()});function tp(e){return e.split(".").map((t,n)=>{let[r,...o]=t;return r=n!==0?r.toUpperCase():r.toLowerCase(),o=[o.join("").toLowerCase()],r+o[0]}).join("")}async function hi(e){if(e.status===404)throw new Pr;if(e.status===401)throw new pi;if(e.status===403)throw new Qf;let t;try{const n=await e.json();t=ep.parse(n)}catch{throw new Error("An unknown problem occurred")}throw new il(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[tp(n),r.join(", ")])):void 0)}var al=v.object({countryCode:v.string(),streetAddress1:v.string(),streetAddress2:v.string().nullable(),locality:v.string().nullable(),region:v.string().nullable(),postCode:v.string()}),np=v.object({newsletterOptIn:v.boolean()}),ll=v.object({id:v.string(),email:v.string(),name:v.string(),tenantId:v.string(),address:al.optional(),communicationPreferences:np,ownedProducts:v.string().array().optional()}),mi=ll.and(v.object({accessToken:v.string(),refreshToken:v.string()})),rp=v.object({id:v.string(),name:v.string(),email:v.string(),resetPasswordToken:v.string().nullable()}),op=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){const e=await this.api.authenticatedFetch("/api/customer/meta/user");return ll.parse(e.data)}async signIn(e,t){const n=await Yo(`${this.api.baseUrl}/api/customer/identity/sign-in?email=${e}&scheme=JWT`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});n.status>=400&&await hi(n);const r=await n.json(),o=mi.parse(r);return this.tokenStore.setUser(o),o}async signUp(e,t,n,r,o,s,i){const a=await this.api.fetch(`/api/customer/identity/sign-up?scheme=JWT&communicationOptIn=${i?"true":"false"}`,"POST",{name:e,email:t,password:n,address:r,acceptedPrivacyPolicy:o,acceptedTermsAndConditions:s}),l=mi.parse(a.data);return this.tokenStore.setUser(l),l}async update(e,t,n,r){return{needsEmailConfirmationToken:(await this.api.authenticatedFetch("/api/customer/identity","PATCH",{name:e,email:t,emailConfirmationToken:n,communicationPreferences:r})).status===201}}async setPassword(e,t){await this.api.authenticatedFetch("/api/customer/identity/set-password","POST",{currentPassword:e,newPassword:t})}async forgotPassword(e){await this.api.fetch(`/api/customer/identity/forgot-password?email=${encodeURIComponent(e)}`,"POST")}async resetPassword(e,t,n){const r=await Yo(`${this.api.baseUrl}/api/customer/identity/reset-password?email=${encodeURIComponent(e)}&code=${encodeURIComponent(n.replaceAll(" ","+"))}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:t});r.status>=400&&await hi(r)}async confirmAccount(e,t){const n=await this.api.fetch(`/api/customer/identity/confirm-account?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST");return rp.parse(n.data)}async confirmEmail(e,t){await this.api.fetch(`/api/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/api/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}},eo=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(eo||{}),cl=v.object({code:v.string(),name:v.string(),description:v.string()}),sp=v.object({type:v.literal("PercentageOffDiscount"),name:v.string(),description:v.string().optional(),percentage:v.number(),total:xn.optional(),isExclusive:v.boolean()}),ip=v.object({type:v.literal("FlatAmountOffDiscount"),name:v.string(),description:v.string().optional(),total:xn.optional(),isExclusive:v.boolean()}),ul=v.discriminatedUnion("type",[sp,ip]),ap=v.object({id:v.string(),type:v.literal("Product"),productId:v.string(),quantity:v.number(),variationId:v.string(),price:xn.optional(),variation:Tr.optional(),product:Qr.optional(),appliedDiscount:ul.optional()}),lp=v.object({id:v.string(),type:v.literal("Bundle"),bundleId:v.string(),quantity:v.number(),variationId:v.string(),price:xn.optional(),variation:Tr.optional(),bundle:fi.optional(),appliedDiscount:ul.optional()}),dl=v.discriminatedUnion("type",[ap,lp]),fl=v.object({id:v.string(),status:v.literal("Open"),currency:v.string(),items:dl.array(),couponsApplied:cl.array(),checkoutUrl:v.string().optional(),embeddedCheckoutUrl:v.string().optional()}),to=v.object({currency:v.string(),amount:v.number()}),cp=v.object({original:to,discount:to,subtotal:to,taxes:to,due:to}),up=v.object({name:v.string().nullable(),businessName:v.string().nullable(),taxId:v.string().nullable(),email:v.string().nullable(),address:al.nullable()}),dp=v.object({id:v.string(),status:v.literal("Completed"),currency:v.string(),customer:up,total:cp,items:dl.array(),couponsApplied:cl.array()}),fp=v.discriminatedUnion("status",[fl,dp]),pp=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/orders/${e}`);return fp.parse(t.data)}async pushContent(e,t,n){const r={...pl(n)};t&&(r.checkout="true",r.returnUrl=t.returnUrl);const o=await this.api.fetch(`/api/customer/orders/${e.id}?${new URLSearchParams(r).toString()}`,"PATCH",{currency:e.currency,items:e.items});return fl.parse(o.data)}};function pl(e){return Object.entries({utm_source:e==null?void 0:e.source,utm_medium:e==null?void 0:e.medium,utm_campaign:e==null?void 0:e.campaign,utm_term:e==null?void 0:e.term,utm_content:e==null?void 0:e.content,utm_referrer:e==null?void 0:e.referrer}).filter(([t,n])=>n!==void 0).reduce((t,[n,r])=>({...t,[n]:r}),{})}var hp=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(pl(e)),n=await this.api.fetch(`/api/customer/storefront?${t.toString()}`);return Yf.parse(n.data)}},mp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n,r){if(!this.tokenStore.hasAccessToken)throw new pi;return await this.fetch(e,t,n,r)}async fetch(e,t,n,r){const o=await this.tokenStore.getAccessToken();r??(r="application/json");const s=await Yo(this.baseUrl+e,{method:t||"GET",mode:"cors",headers:{Accept:"application/json","Content-Type":r,...o?{Authorization:`Bearer ${o}`}:{},"x-mb-cors":"1"},body:n?r!=="application/json"?n:JSON.stringify(n):void 0});return s.status>=400&&await hi(s),{data:(Number(s.headers.get("Content-Length"))||0)>0?await s.json():null,headers:s.headers,status:s.status}}},hl=class Mo{constructor(t){if(this.configuration=t,this.tokens=null,this.refreshTimeoutId=null,this.refreshPromise=null,typeof window<"u"){window.addEventListener("storage",r=>this.handleStorageUpdate(r));const n=localStorage.getItem(Mo.storageKey);n&&(this.tokens=JSON.parse(n),this.tokens.expiresAt=new Date(this.tokens.expiresAt))}}get user(){return this.tokens?this.tokens:null}get hasAccessToken(){return!!this.tokens}async getAccessToken(){var t,n,r;if(this.isExpired){if(this.refreshPromise){const s=await this.refreshPromise;return(t=s==null?void 0:s.accessToken)!=null?t:null}this.refreshPromise=this.refreshTokens();const o=await this.refreshPromise;return(n=o==null?void 0:o.accessToken)!=null?n:null}return((r=this.tokens)==null?void 0:r.accessToken)||null}setUser(t){return t===null?(this.tokens=null,typeof window<"u"&&localStorage&&localStorage.removeItem(Mo.storageKey),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),null):(this.tokens={...t,expiresAt:new Date(new Date().getTime()+15*60*1e3)},typeof window<"u"&&localStorage&&localStorage.setItem(Mo.storageKey,JSON.stringify(this.tokens)),this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3),this.tokens)}get isExpired(){return this.tokens!=null&&this.tokens.expiresAt<new Date}async refreshTokens(){if(!this.tokens)throw new Error("No tokens found to refresh");const t=await Yo(`${this.configuration.endpoint}/api/customer/identity/refresh?token=${this.tokens.refreshToken}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"text/plain","x-mb-cors":"1"},body:this.tokens.accessToken});if(t.status!==200){if(t.status===403||t.status===404)return this.setUser(null),null;throw new il("Unexpected result",`Could not refresh access token, status code ${t.status}`,t.status)}const n=mi.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case Mo.storageKey:this.tokens=t.newValue?JSON.parse(t.newValue):null,this.refreshTimeoutId!=null&&window.clearTimeout(this.refreshTimeoutId),this.tokens&&(this.tokens.expiresAt=new Date(this.tokens.expiresAt),this.refreshTimeoutId=window.setTimeout(()=>{this.refreshPromise=this.refreshTokens()},10*60*1e3+(Math.random()+1)*60*1e3));break}}};hl.storageKey="moonbase_auth";var vp=hl,ml=v.object({id:v.string(),name:v.string(),description:v.string(),code:v.string(),redeemed:v.boolean(),redeemsProducts:ol(Qr).array(),redeemsBundles:ol(fi).array()}),gp=class{constructor(e){this.api=e}async peek(e){const t=await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`);return ml.parse(t.data)}async redeem(e){const t=await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,"POST");return ml.parse(t.data)}},vl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(vl||{}),gl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(gl||{}),vi=(e=>(e.Online="Online",e.Offline="Offline",e))(vi||{}),gi=v.object({id:v.string(),status:v.nativeEnum(vl),product:di,activeNumberOfActivations:v.number(),maxNumberOfActivations:v.number(),createdAt:v.coerce.date()}),yl=v.object({id:v.string(),licenseId:v.string(),name:v.string(),status:v.nativeEnum(gl),activationMethod:v.nativeEnum(vi),lastValidatedAt:v.coerce.date().nullable()}),yp=class{constructor(e){this.api=e}async activate(e,t){const n=await this.api.authenticatedFetch(`/api/customer/inventory/activate?method=${t}`,"POST",e,"text/plain");return{license:gi.parse(n.data),url:v.string().parse(n.headers.get("location"))}}},_p=class{constructor(e){this.api=e}async get(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses");return Xr(gi).parse(t.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`);return Xr(yl).parse(n.data)}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,"POST")}},bp=class{constructor(e){this.api=e}async get(e,t){const n=await this.api.fetch(`/api/customer/inventory/products/${e}${t?`?version=${t}`:""}`);return di.parse(n.data)}async getOwned(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/products");return Xr(di).parse(t.data)}async getLicenses(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`);return Xr(gi).parse(n.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`);return Xr(yl).parse(n.data)}async getDownloadUrl(e){const t=new URL(e);t.searchParams.append("redirect","false");const n=await this.api.fetch(t.pathname+t.search);return v.object({location:v.string()}).parse(n.data).location}},wp=class{constructor(e){this.licenses=new _p(e),this.products=new bp(e),this.activation=new yp(e)}},Ep=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new vp(e);const t=new mp(this.configuration.endpoint,this.tokenStore);this.storefront=new hp(t),this.identity=new op(t,this.tokenStore),this.vouchers=new gp(t),this.orders=new pp(t),this.inventory=new wp(t),this.activationRequests=new Xf(t)}},_l={};/**
|
|
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 cx=Object.defineProperty;var ux=(Dt,xe,Un)=>xe in Dt?cx(Dt,xe,{enumerable:!0,configurable:!0,writable:!0,value:Un}):Dt[xe]=Un;var Gr=(Dt,xe,Un)=>ux(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 Jr=(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 pc=Jr;function Up(t){pc=t}function jo(){return pc}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===Jr?void 0:Jr].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"}),Yr=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 hc(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 mc=(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 mc(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 mc(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 br.create(this,this._def)}promise(){return ts.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}=))?$/,vc="((\\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(`^${vc}$`);function gc(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(`^${gc(t)}$`)}function yc(t){let e=`${vc}T${gc(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 Xr=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"?yc(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}};Xr.create=t=>{var e;return new Xr({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 lc 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 lc({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:le.toString(s)}]})}_addCheck(e){return new lc({...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 cc 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 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]})}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 Qr=class extends $e{constructor(){super(...arguments),this._any=!0}_parse(e){return kt(e.data)}};Qr.create=t=>new Qr({typeName:ye.ZodAny,...Te(t)});let _r=class extends $e{constructor(){super(...arguments),this._unknown=!0}_parse(e){return kt(e.data)}};_r.create=t=>new _r({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 br=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)}};br.create=(t,e)=>new br({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,...Te(e)});function es(t){if(t instanceof Mt){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=rn.create(es(r))}return new Mt({...t._def,shape:()=>e})}else return t instanceof br?new br({...t._def,type:es(t.element)}):t instanceof rn?rn.create(es(t.unwrap())):t instanceof Fn?Fn.create(es(t.unwrap())):t instanceof Bn?Bn.create(t.items.map(e=>es(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 es(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 Ec(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 _c=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 bc=class uc 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 uc({keyType:e,valueType:n,typeName:ye.ZodRecord,...Te(r)}):new uc({keyType:Xr.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 dc 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 dc({...this._def,minSize:{value:e,message:le.toString(n)}})}max(e,n){return new dc({...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 wc=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(),Jr].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(),Jr].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 ts){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(_r.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(_r.create()),returns:n||_r.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 Ec(t,e){return new $s({values:t,typeName:ye.ZodEnum,...Te(e)})}let $s=class fc 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)||hc(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 fc.create(e,{...this._def,...n})}exclude(e,n=this._def){return fc.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};ys=new WeakMap,$s.create=Ec;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)||hc(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 ts=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})))}};ts.create=(t,e)=>new ts({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"?Yr(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"?Yr(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(),Yr(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 xc(t,e={},n){return t?Qr.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})}}):Qr.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}`})=>xc(n=>n instanceof t,e),kc=Xr.create,Oc=bs.create,ih=Ho.create,ah=ws.create,Nc=Es.create,lh=xs.create,ch=Uo.create,uh=ks.create,dh=Os.create,fh=Qr.create,ph=_r.create,hh=bn.create,mh=Zo.create,vh=br.create,gh=Mt.create,yh=Mt.strictCreate,_h=Ns.create,bh=_c.create,wh=Ss.create,Eh=Bn.create,xh=bc.create,kh=Bo.create,Oh=Fo.create,Nh=wc.create,Sh=Ts.create,Th=Cs.create,Ch=$s.create,$h=Ps.create,Ph=ts.create,Sc=qt.create,Ih=rn.create,Ah=Fn.create,Dh=qt.createWithPreprocess,Vh=ya.create;var g=Object.freeze({__proto__:null,defaultErrorMap:Jr,setErrorMap:Up,getErrorMap:jo,makeIssue:Lo,EMPTY_PATH:Zp,addIssueToContext:te,ParseStatus:$t,INVALID:we,DIRTY:Yr,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:yc,ZodString:Xr,ZodNumber:bs,ZodBigInt:ws,ZodBoolean:Es,ZodDate:xs,ZodSymbol:Uo,ZodUndefined:ks,ZodNull:Os,ZodAny:Qr,ZodUnknown:_r,ZodNever:bn,ZodVoid:Zo,ZodArray:br,ZodObject:Mt,ZodUnion:Ns,ZodDiscriminatedUnion:_c,ZodIntersection:Ss,ZodTuple:Bn,ZodRecord:bc,ZodMap:Bo,ZodSet:Fo,ZodFunction:wc,ZodLazy:Ts,ZodLiteral:Cs,ZodEnum:$s,ZodNativeEnum:Ps,ZodPromise:ts,ZodEffects:qt,ZodTransformer:qt,ZodOptional:rn,ZodNullable:Fn,ZodDefault:Is,ZodCatch:As,ZodNaN:Ho,BRAND:rh,ZodBranded:ga,ZodPipeline:ya,ZodReadonly:Ds,custom:xc,Schema:$e,ZodSchema:$e,late:sh,get ZodFirstPartyTypeKind(){return ye},coerce:{string:t=>Xr.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:Nc,date:lh,discriminatedUnion:bh,effect:Sc,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:Oc,object:gh,oboolean:()=>Nc().optional(),onumber:()=>Oc().optional(),optional:Ih,ostring:()=>kc().optional(),pipeline:Vh,preprocess:Dh,promise:Ph,record:xh,set:Oh,strictObject:yh,string:kc,symbol:ch,transformer:Sc,tuple:Eh,undefined:uh,union:_h,unknown:ph,void:mh,NEVER:we,ZodIssueCode:Z,quotelessJson:Mp,ZodError:zt}),Tc=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 Tc<"u"&&Tc,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 Hn=g.record(g.number()),Lh=g.object({type:g.literal("PercentageOffDiscount"),name:g.string(),description:g.string().optional(),percentage:g.number(),total:Hn}),Mh=g.object({type:g.literal("FlatAmountOffDiscount"),name:g.string(),description:g.string().optional(),total:Hn}),Uh=g.discriminatedUnion("type",[Lh,Mh]),ns=g.object({id:g.string(),name:g.string(),originalPrice:Hn,price:Hn,hasDiscount:g.boolean(),discount:Uh.optional()});function Vs(t){return g.object({items:g.array(t),hasMore:g.boolean(),next:g.string().nullable()})}function Cc(t){return g.object({value:t,quantity:g.number()})}var sn=(t=>(t.Universal="Universal",t.Windows="Windows",t.Linux="Linux",t.Mac="Mac",t))(sn||{}),$c=g.object({name:g.string(),key:g.string(),platform:g.nativeEnum(sn),size:g.number(),path:g.string().nullable()}),ba=g.object({id:g.string(),name:g.string(),tagline:g.string(),website:g.string().optional(),iconUrl:g.string().optional(),numberOfLicenses:g.number().optional(),numberOfTrials:g.number().optional(),currentActivations:g.number().optional(),maxActivations:g.number().optional(),currentVersion:g.string().nullable(),version:g.string().optional(),prerelease:g.boolean().optional(),downloadsNeedsUser:g.boolean(),downloadsNeedsOwnership:g.boolean(),downloads:g.array($c).optional()}),Rs=g.object({id:g.string(),name:g.string(),tagline:g.string(),iconUrl:g.string().nullable(),website:g.string().nullish(),owned:g.boolean(),currentVersion:g.string().optional(),downloads:$c.array().optional(),defaultVariation:ns.optional(),variations:ns.array().optional(),type:g.void().transform(()=>"product").pipe(g.literal("product"))}),wa=g.object({id:g.string(),name:g.string(),tagline:g.string(),iconUrl:g.string().nullable(),owned:g.boolean(),partial:g.boolean(),products:Rs.and(g.object({included:g.boolean().optional()})).array(),defaultVariation:ns.optional(),variations:ns.array().optional(),type:g.void().transform(()=>"bundle").pipe(g.literal("bundle"))}),Zh=g.object({suggestedCurrency:g.string(),products:Rs.array(),bundles:wa.array()}),on=(t=>(t.Requested="Requested",t.Fulfilled="Fulfilled",t.Completed="Completed",t.Cancelled="Cancelled",t))(on||{}),qo=g.object({id:g.string(),status:g.nativeEnum(on),product:Rs,trialEligibility:g.object({eligible:g.boolean(),existing:g.boolean(),requiresAccount:g.boolean(),numberOfDaysPerProduct:g.number(),numberOfDaysRemaining:g.number()}).optional(),licenseEligibility:g.object({eligible:g.boolean()}).optional()}),Bh=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 g.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)}},Fh=class extends Error{constructor(){super(),this.name="NotAuthorizedError"}},Ea=class extends Error{constructor(){super(),this.name="NotAuthenticatedError"}},rs=class extends Error{constructor(){super(),this.name="NotFoundError"}},Pc=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}},Hh=g.object({type:g.string(),title:g.string(),detail:g.string().optional(),status:g.number(),errors:g.record(g.string(),g.string().array()).optional()});function zh(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 xa(t){if(t.status===404)throw new rs;if(t.status===401)throw new Ea;if(t.status===403)throw new Fh;let e;try{const n=await t.json();e=Hh.parse(n)}catch(n){throw console.error("Could not handle response",n),new Error("An unknown problem occurred")}throw new Pc(e.title,e.detail,e.status,e.errors?Object.fromEntries(Object.entries(e.errors).map(([n,r])=>[zh(n),r.join(", ")])):void 0)}var Ic=g.object({countryCode:g.string(),streetAddress1:g.string(),streetAddress2:g.string().nullable(),locality:g.string().nullable(),region:g.string().nullable(),postCode:g.string()}),qh=g.object({newsletterOptIn:g.boolean()}),Ac=g.object({id:g.string(),email:g.string(),name:g.string(),tenantId:g.string(),address:Ic.optional(),communicationPreferences:qh,ownedProducts:g.string().array().optional()}),ka=Ac.and(g.object({accessToken:g.string(),refreshToken:g.string()})),Wh=g.object({id:g.string(),name:g.string(),email:g.string(),resetPasswordToken:g.string().nullable()}),Kh=class{constructor(t,e){this.api=t,this.tokenStore=e}async get(){const t=await this.api.authenticatedFetch("/api/customer/meta/user");return Ac.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 xa(n);const r=await n.json(),s=ka.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=ka.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 xa(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 Wh.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||{}),Dc=g.object({code:g.string(),name:g.string(),description:g.string()}),Gh=g.object({type:g.literal("PercentageOffDiscount"),name:g.string(),description:g.string().optional(),percentage:g.number(),total:Hn.optional(),isExclusive:g.boolean()}),Jh=g.object({type:g.literal("FlatAmountOffDiscount"),name:g.string(),description:g.string().optional(),total:Hn.optional(),isExclusive:g.boolean()}),Vc=g.discriminatedUnion("type",[Gh,Jh]),Yh=g.object({id:g.string(),type:g.literal("Product"),productId:g.string(),quantity:g.number(),variationId:g.string(),price:Hn.optional(),variation:ns.optional(),product:Rs.optional(),appliedDiscount:Vc.optional()}),Xh=g.object({id:g.string(),type:g.literal("Bundle"),bundleId:g.string(),quantity:g.number(),variationId:g.string(),price:Hn.optional(),variation:ns.optional(),bundle:wa.optional(),appliedDiscount:Vc.optional()}),Rc=g.discriminatedUnion("type",[Yh,Xh]),jc=g.object({id:g.string(),status:g.literal("Open"),currency:g.string(),items:Rc.array(),couponsApplied:Dc.array(),checkoutUrl:g.string().optional(),embeddedCheckoutUrl:g.string().optional()}),Ls=g.object({currency:g.string(),amount:g.number()}),Qh=g.object({original:Ls,discount:Ls,subtotal:Ls,taxes:Ls,due:Ls}),em=g.object({name:g.string().nullable(),businessName:g.string().nullable(),taxId:g.string().nullable(),email:g.string().nullable(),address:Ic.nullable()}),tm=g.object({id:g.string(),status:g.literal("Completed"),currency:g.string(),customer:em,total:Qh,items:Rc.array(),couponsApplied:Dc.array()}),nm=g.discriminatedUnion("status",[jc,tm]),rm=class{constructor(t){this.api=t}async get(t){const e=await this.api.fetch(`/api/customer/orders/${t}`);return nm.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 sm=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 Zh.parse(n.data)}},om=class{constructor(t,e){this.baseUrl=t,this.tokenStore=e}async authenticatedFetch(t,e,n,r){if(!this.tokenStore.hasAccessToken)throw new Ea;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 xa(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 Pc("Unexpected result",`Could not refresh access token, status code ${e.status}`,e.status)}const n=ka.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 im=Mc,Uc=g.object({id:g.string(),name:g.string(),description:g.string(),code:g.string(),redeemed:g.boolean(),redeemsProducts:Cc(Rs).array(),redeemsBundles:Cc(wa).array()}),am=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||{}),Oa=(t=>(t.Online="Online",t.Offline="Offline",t))(Oa||{}),Na=g.object({id:g.string(),status:g.nativeEnum(Zc),product:ba,activeNumberOfActivations:g.number(),maxNumberOfActivations:g.number(),createdAt:g.coerce.date()}),Fc=g.object({id:g.string(),licenseId:g.string(),name:g.string(),status:g.nativeEnum(Bc),activationMethod:g.nativeEnum(Oa),lastValidatedAt:g.coerce.date().nullable()}),lm=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:Na.parse(n.data),url:g.string().parse(n.headers.get("location"))}}},cm=class{constructor(t){this.api=t}async get(t){const e=await this.api.authenticatedFetch(t||"/api/customer/inventory/licenses");return Vs(Na).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")}},um=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 ba.parse(n.data)}async getOwned(t){const e=await this.api.authenticatedFetch(t||"/api/customer/inventory/products");return Vs(ba).parse(e.data)}async getLicenses(t,e){const n=await this.api.authenticatedFetch(e||`/api/customer/inventory/products/${t}/licenses`);return Vs(Na).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 g.object({location:g.string()}).parse(n.data).location}},dm=class{constructor(t){this.licenses=new cm(t),this.products=new um(t),this.activation=new lm(t)}},fm=class{constructor(t){this.configuration=t,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new im(t);const e=new om(this.configuration.endpoint,this.tokenStore);this.storefront=new sm(e),this.identity=new Kh(e,this.tokenStore),this.vouchers=new am(e),this.orders=new rm(e),this.inventory=new dm(e),this.activationRequests=new Bh(e)}},Hc={};/**
|
|
3
4
|
* @vue/shared v3.4.38
|
|
4
5
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5
6
|
* @license MIT
|
|
6
|
-
**//*! #__NO_SIDE_EFFECTS__ */function rn(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const Me=_l.NODE_ENV!=="production"?Object.freeze({}):{},$r=_l.NODE_ENV!=="production"?Object.freeze([]):[],We=()=>{},Op=()=>!1,no=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Qo=e=>e.startsWith("onUpdate:"),qe=Object.assign,yi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Np=Object.prototype.hasOwnProperty,Ne=(e,t)=>Np.call(e,t),ie=Array.isArray,er=e=>es(e)==="[object Map]",bl=e=>es(e)==="[object Set]",pe=e=>typeof e=="function",Be=e=>typeof e=="string",kn=e=>typeof e=="symbol",De=e=>e!==null&&typeof e=="object",_i=e=>(De(e)||pe(e))&&pe(e.then)&&pe(e.catch),wl=Object.prototype.toString,es=e=>wl.call(e),bi=e=>es(e).slice(8,-1),El=e=>es(e)==="[object Object]",wi=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ro=rn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Sp=rn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),ts=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},xp=/-(\w)/g,Ot=ts(e=>e.replace(xp,(t,n)=>n?n.toUpperCase():"")),kp=/\B([A-Z])/g,on=ts(e=>e.replace(kp,"-$1").toLowerCase()),tr=ts(e=>e.charAt(0).toUpperCase()+e.slice(1)),nr=ts(e=>e?`on${tr(e)}`:""),Cn=(e,t)=>!Object.is(e,t),oo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ns=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Cp=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Tp=e=>{const t=Be(e)?Number(e):NaN;return isNaN(t)?e:t};let Ol;const Ei=()=>Ol||(Ol=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Oi(e){if(ie(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Be(r)?Dp(r):Oi(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Be(e)||De(e))return e}const Pp=/;(?![^(]*\))/g,$p=/:([^]+)/,Ip=/\/\*[^]*?\*\//g;function Dp(e){const t={};return e.replace(Ip,"").split(Pp).forEach(n=>{if(n){const r=n.split($p);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function rs(e){let t="";if(Be(e))t=e;else if(ie(e))for(let n=0;n<e.length;n++){const r=rs(e[n]);r&&(t+=r+" ")}else if(De(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Ap="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",Vp="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Rp="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",jp=rn(Ap),Lp=rn(Vp),Mp=rn(Rp),Up=rn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Nl(e){return!!e||e===""}const Sl=e=>!!(e&&e.__v_isRef===!0),K=e=>Be(e)?e:e==null?"":ie(e)||De(e)&&(e.toString===wl||!pe(e.toString))?Sl(e)?K(e.value):JSON.stringify(e,xl,2):String(e),xl=(e,t)=>Sl(t)?xl(e,t.value):er(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[Ni(r,s)+" =>"]=o,n),{})}:bl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ni(n))}:kn(t)?Ni(t):De(t)&&!ie(t)&&!El(t)?String(t):t,Ni=(e,t="")=>{var n;return kn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var ze={};function Zt(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let Nt;class kl{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Nt,!t&&Nt&&(this.index=(Nt.scopes||(Nt.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Nt;try{return Nt=this,t()}finally{Nt=n}}else ze.NODE_ENV!=="production"&&Zt("cannot run an inactive effect scope.")}on(){Nt=this}off(){Nt=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this._active=!1}}}function Cl(e){return new kl(e)}function Fp(e,t=Nt){t&&t.active&&t.effects.push(e)}function Tl(){return Nt}function Bp(e){Nt?Nt.cleanups.push(e):ze.NODE_ENV!=="production"&&Zt("onScopeDispose() is called when there is no active effect scope to be associated with.")}let rr;class Si{constructor(t,n,r,o){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,Fp(this,o)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,sn();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(Hp(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),an()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Tn,n=rr;try{return Tn=!0,rr=this,this._runnings++,Pl(this),this.fn()}finally{$l(this),this._runnings--,rr=n,Tn=t}}stop(){this.active&&(Pl(this),$l(this),this.onStop&&this.onStop(),this.active=!1)}}function Hp(e){return e.value}function Pl(e){e._trackId++,e._depsLength=0}function $l(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Il(e.deps[t],e);e.deps.length=e._depsLength}}function Il(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let Tn=!0,xi=0;const Dl=[];function sn(){Dl.push(Tn),Tn=!1}function an(){const e=Dl.pop();Tn=e===void 0?!0:e}function ki(){xi++}function Ci(){for(xi--;!xi&&Ti.length;)Ti.shift()()}function Al(e,t,n){var r;if(t.get(e)!==e._trackId){t.set(e,e._trackId);const o=e.deps[e._depsLength];o!==t?(o&&Il(o,e),e.deps[e._depsLength++]=t):e._depsLength++,ze.NODE_ENV!=="production"&&((r=e.onTrack)==null||r.call(e,qe({effect:e},n)))}}const Ti=[];function Vl(e,t,n){var r;ki();for(const o of e.keys()){let s;o._dirtyLevel<t&&(s??(s=e.get(o)===o._trackId))&&(o._shouldSchedule||(o._shouldSchedule=o._dirtyLevel===0),o._dirtyLevel=t),o._shouldSchedule&&(s??(s=e.get(o)===o._trackId))&&(ze.NODE_ENV!=="production"&&((r=o.onTrigger)==null||r.call(o,qe({effect:o},n))),o.trigger(),(!o._runnings||o.allowRecurse)&&o._dirtyLevel!==2&&(o._shouldSchedule=!1,o.scheduler&&Ti.push(o.scheduler)))}Ci()}const Rl=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},os=new WeakMap,or=Symbol(ze.NODE_ENV!=="production"?"iterate":""),Pi=Symbol(ze.NODE_ENV!=="production"?"Map key iterate":"");function ot(e,t,n){if(Tn&&rr){let r=os.get(e);r||os.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=Rl(()=>r.delete(n))),Al(rr,o,ze.NODE_ENV!=="production"?{target:e,type:t,key:n}:void 0)}}function qt(e,t,n,r,o,s){const i=os.get(e);if(!i)return;let a=[];if(t==="clear")a=[...i.values()];else if(n==="length"&&ie(e)){const l=Number(r);i.forEach((c,u)=>{(u==="length"||!kn(u)&&u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(i.get(n)),t){case"add":ie(e)?wi(n)&&a.push(i.get("length")):(a.push(i.get(or)),er(e)&&a.push(i.get(Pi)));break;case"delete":ie(e)||(a.push(i.get(or)),er(e)&&a.push(i.get(Pi)));break;case"set":er(e)&&a.push(i.get(or));break}ki();for(const l of a)l&&Vl(l,4,ze.NODE_ENV!=="production"?{target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}:void 0);Ci()}function Zp(e,t){const n=os.get(e);return n&&n.get(t)}const qp=rn("__proto__,__v_isRef,__isVue"),jl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(kn)),Ll=Wp();function Wp(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=ge(this);for(let s=0,i=this.length;s<i;s++)ot(r,"get",s+"");const o=r[t](...n);return o===-1||o===!1?r[t](...n.map(ge)):o}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){sn(),ki();const r=ge(this)[t].apply(this,n);return Ci(),an(),r}}),e}function zp(e){kn(e)||(e=String(e));const t=ge(this);return ot(t,"has",e),t.hasOwnProperty(e)}class Ml{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const o=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return s;if(n==="__v_raw")return r===(o?s?Jl:Gl:s?Kl:zl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=ie(t);if(!o){if(i&&Ne(Ll,n))return Reflect.get(Ll,n,r);if(n==="hasOwnProperty")return zp}const a=Reflect.get(t,n,r);return(kn(n)?jl.has(n):qp(n))||(o||ot(t,"get",n),s)?a:He(a)?i&&wi(n)?a:a.value:De(a)?o?Yl(a):so(a):a}}class Ul extends Ml{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const l=cn(s);if(!un(r)&&!cn(r)&&(s=ge(s),r=ge(r)),!ie(t)&&He(s)&&!He(r))return l?!1:(s.value=r,!0)}const i=ie(t)&&wi(n)?Number(n)<t.length:Ne(t,n),a=Reflect.set(t,n,r,o);return t===ge(o)&&(i?Cn(r,s)&&qt(t,"set",n,r,s):qt(t,"add",n,r)),a}deleteProperty(t,n){const r=Ne(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&qt(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!kn(n)||!jl.has(n))&&ot(t,"has",n),r}ownKeys(t){return ot(t,"iterate",ie(t)?"length":or),Reflect.ownKeys(t)}}class Fl extends Ml{constructor(t=!1){super(!0,t)}set(t,n){return ze.NODE_ENV!=="production"&&Zt(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return ze.NODE_ENV!=="production"&&Zt(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Kp=new Ul,Gp=new Fl,Jp=new Ul(!0),Yp=new Fl(!0),$i=e=>e,ss=e=>Reflect.getPrototypeOf(e);function is(e,t,n=!1,r=!1){e=e.__v_raw;const o=ge(e),s=ge(t);n||(Cn(t,s)&&ot(o,"get",t),ot(o,"get",s));const{has:i}=ss(o),a=r?$i:n?Ii:io;if(i.call(o,t))return a(e.get(t));if(i.call(o,s))return a(e.get(s));e!==o&&e.get(t)}function as(e,t=!1){const n=this.__v_raw,r=ge(n),o=ge(e);return t||(Cn(e,o)&&ot(r,"has",e),ot(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function ls(e,t=!1){return e=e.__v_raw,!t&&ot(ge(e),"iterate",or),Reflect.get(e,"size",e)}function Bl(e,t=!1){!t&&!un(e)&&!cn(e)&&(e=ge(e));const n=ge(this);return ss(n).has.call(n,e)||(n.add(e),qt(n,"add",e,e)),this}function Hl(e,t,n=!1){!n&&!un(t)&&!cn(t)&&(t=ge(t));const r=ge(this),{has:o,get:s}=ss(r);let i=o.call(r,e);i?ze.NODE_ENV!=="production"&&Wl(r,o,e):(e=ge(e),i=o.call(r,e));const a=s.call(r,e);return r.set(e,t),i?Cn(t,a)&&qt(r,"set",e,t,a):qt(r,"add",e,t),this}function Zl(e){const t=ge(this),{has:n,get:r}=ss(t);let o=n.call(t,e);o?ze.NODE_ENV!=="production"&&Wl(t,n,e):(e=ge(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&qt(t,"delete",e,void 0,s),i}function ql(){const e=ge(this),t=e.size!==0,n=ze.NODE_ENV!=="production"?er(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&qt(e,"clear",void 0,void 0,n),r}function cs(e,t){return function(r,o){const s=this,i=s.__v_raw,a=ge(i),l=t?$i:e?Ii:io;return!e&&ot(a,"iterate",or),i.forEach((c,u)=>r.call(o,l(c),l(u),s))}}function us(e,t,n){return function(...r){const o=this.__v_raw,s=ge(o),i=er(s),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,c=o[e](...r),u=n?$i:t?Ii:io;return!t&&ot(s,"iterate",l?Pi:or),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:a?[u(d[0]),u(d[1])]:u(d),done:f}},[Symbol.iterator](){return this}}}}function Pn(e){return function(...t){if(ze.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";Zt(`${tr(e)} operation ${n}failed: target is readonly.`,ge(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Xp(){const e={get(s){return is(this,s)},get size(){return ls(this)},has:as,add:Bl,set:Hl,delete:Zl,clear:ql,forEach:cs(!1,!1)},t={get(s){return is(this,s,!1,!0)},get size(){return ls(this)},has:as,add(s){return Bl.call(this,s,!0)},set(s,i){return Hl.call(this,s,i,!0)},delete:Zl,clear:ql,forEach:cs(!1,!0)},n={get(s){return is(this,s,!0)},get size(){return ls(this,!0)},has(s){return as.call(this,s,!0)},add:Pn("add"),set:Pn("set"),delete:Pn("delete"),clear:Pn("clear"),forEach:cs(!0,!1)},r={get(s){return is(this,s,!0,!0)},get size(){return ls(this,!0)},has(s){return as.call(this,s,!0)},add:Pn("add"),set:Pn("set"),delete:Pn("delete"),clear:Pn("clear"),forEach:cs(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=us(s,!1,!1),n[s]=us(s,!0,!1),t[s]=us(s,!1,!0),r[s]=us(s,!0,!0)}),[e,n,t,r]}const[Qp,eh,th,nh]=Xp();function ds(e,t){const n=t?e?nh:th:e?eh:Qp;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Ne(n,o)&&o in r?n:r,o,s)}const rh={get:ds(!1,!1)},oh={get:ds(!1,!0)},sh={get:ds(!0,!1)},ih={get:ds(!0,!0)};function Wl(e,t,n){const r=ge(n);if(r!==n&&t.call(e,r)){const o=bi(e);Zt(`Reactive ${o} contains both the raw and reactive versions of the same object${o==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const zl=new WeakMap,Kl=new WeakMap,Gl=new WeakMap,Jl=new WeakMap;function ah(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function lh(e){return e.__v_skip||!Object.isExtensible(e)?0:ah(bi(e))}function so(e){return cn(e)?e:fs(e,!1,Kp,rh,zl)}function ch(e){return fs(e,!1,Jp,oh,Kl)}function Yl(e){return fs(e,!0,Gp,sh,Gl)}function Wt(e){return fs(e,!0,Yp,ih,Jl)}function fs(e,t,n,r,o){if(!De(e))return ze.NODE_ENV!=="production"&&Zt(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=lh(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function ln(e){return cn(e)?ln(e.__v_raw):!!(e&&e.__v_isReactive)}function cn(e){return!!(e&&e.__v_isReadonly)}function un(e){return!!(e&&e.__v_isShallow)}function ps(e){return e?!!e.__v_raw:!1}function ge(e){const t=e&&e.__v_raw;return t?ge(t):e}function $n(e){return Object.isExtensible(e)&&ns(e,"__v_skip",!0),e}const io=e=>De(e)?so(e):e,Ii=e=>De(e)?Yl(e):e,uh="Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free";class Xl{constructor(t,n,r,o){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Si(()=>t(this._value),()=>hs(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const t=ge(this);return(!t._cacheable||t.effect.dirty)&&Cn(t._value,t._value=t.effect.run())&&hs(t,4),Ql(t),t.effect._dirtyLevel>=2&&(ze.NODE_ENV!=="production"&&this._warnRecursive&&Zt(uh,`
|
|
7
|
+
**//*! #__NO_SIDE_EFFECTS__ */function En(t,e){const n=new Set(t.split(","));return r=>n.has(r)}const Ge=Hc.NODE_ENV!=="production"?Object.freeze({}):{},ss=Hc.NODE_ENV!=="production"?Object.freeze([]):[],nt=()=>{},pm=()=>!1,Ms=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Wo=t=>t.startsWith("onUpdate:"),tt=Object.assign,Sa=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},hm=Object.prototype.hasOwnProperty,Ie=(t,e)=>hm.call(t,e),de=Array.isArray,wr=t=>Ko(t)==="[object Map]",zc=t=>Ko(t)==="[object Set]",me=t=>typeof t=="function",Xe=t=>typeof t=="string",zn=t=>typeof t=="symbol",Be=t=>t!==null&&typeof t=="object",Ta=t=>(Be(t)||me(t))&&me(t.then)&&me(t.catch),qc=Object.prototype.toString,Ko=t=>qc.call(t),Ca=t=>Ko(t).slice(8,-1),Wc=t=>Ko(t)==="[object Object]",$a=t=>Xe(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Us=En(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),mm=En("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Go=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},vm=/-(\w)/g,Vt=Go(t=>t.replace(vm,(e,n)=>n?n.toUpperCase():"")),gm=/\B([A-Z])/g,xn=Go(t=>t.replace(gm,"-$1").toLowerCase()),Er=Go(t=>t.charAt(0).toUpperCase()+t.slice(1)),xr=Go(t=>t?`on${Er(t)}`:""),qn=(t,e)=>!Object.is(t,e),Zs=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},Jo=(t,e,n,r=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:r,value:n})},ym=t=>{const e=parseFloat(t);return isNaN(e)?t:e},_m=t=>{const e=Xe(t)?Number(t):NaN;return isNaN(e)?t:e};let Kc;const Pa=()=>Kc||(Kc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ia(t){if(de(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],s=Xe(r)?xm(r):Ia(r);if(s)for(const o in s)e[o]=s[o]}return e}else if(Xe(t)||Be(t))return t}const bm=/;(?![^(]*\))/g,wm=/:([^]+)/,Em=/\/\*[^]*?\*\//g;function xm(t){const e={};return t.replace(Em,"").split(bm).forEach(n=>{if(n){const r=n.split(wm);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Yo(t){let e="";if(Xe(t))e=t;else if(de(t))for(let n=0;n<t.length;n++){const r=Yo(t[n]);r&&(e+=r+" ")}else if(Be(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}const km="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",Om="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Nm="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",Sm=En(km),Tm=En(Om),Cm=En(Nm),$m=En("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Gc(t){return!!t||t===""}const Jc=t=>!!(t&&t.__v_isRef===!0),G=t=>Xe(t)?t:t==null?"":de(t)||Be(t)&&(t.toString===qc||!me(t.toString))?Jc(t)?G(t.value):JSON.stringify(t,Yc,2):String(t),Yc=(t,e)=>Jc(e)?Yc(t,e.value):wr(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,s],o)=>(n[Aa(r,o)+" =>"]=s,n),{})}:zc(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Aa(n))}:zn(e)?Aa(e):Be(e)&&!de(e)&&!Wc(e)?String(e):e,Aa=(t,e="")=>{var n;return zn(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};var rt={};function an(t,...e){console.warn(`[Vue warn] ${t}`,...e)}let Rt;class Xc{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Rt,!e&&Rt&&(this.index=(Rt.scopes||(Rt.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=Rt;try{return Rt=this,e()}finally{Rt=n}}else rt.NODE_ENV!=="production"&&an("cannot run an inactive effect scope.")}on(){Rt=this}off(){Rt=this.parent}stop(e){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0,this._active=!1}}}function Qc(t){return new Xc(t)}function Pm(t,e=Rt){e&&e.active&&e.effects.push(t)}function eu(){return Rt}function Im(t){Rt?Rt.cleanups.push(t):rt.NODE_ENV!=="production"&&an("onScopeDispose() is called when there is no active effect scope to be associated with.")}let kr;class Da{constructor(e,n,r,s){this.fn=e,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,Pm(this,s)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,kn();for(let e=0;e<this._depsLength;e++){const n=this.deps[e];if(n.computed&&(Am(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),On()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=Wn,n=kr;try{return Wn=!0,kr=this,this._runnings++,tu(this),this.fn()}finally{nu(this),this._runnings--,kr=n,Wn=e}}stop(){this.active&&(tu(this),nu(this),this.onStop&&this.onStop(),this.active=!1)}}function Am(t){return t.value}function tu(t){t._trackId++,t._depsLength=0}function nu(t){if(t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)ru(t.deps[e],t);t.deps.length=t._depsLength}}function ru(t,e){const n=t.get(e);n!==void 0&&e._trackId!==n&&(t.delete(e),t.size===0&&t.cleanup())}let Wn=!0,Va=0;const su=[];function kn(){su.push(Wn),Wn=!1}function On(){const t=su.pop();Wn=t===void 0?!0:t}function Ra(){Va++}function ja(){for(Va--;!Va&&La.length;)La.shift()()}function ou(t,e,n){var r;if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&ru(s,t),t.deps[t._depsLength++]=e):t._depsLength++,rt.NODE_ENV!=="production"&&((r=t.onTrack)==null||r.call(t,tt({effect:t},n)))}}const La=[];function iu(t,e,n){var r;Ra();for(const s of t.keys()){let o;s._dirtyLevel<e&&(o??(o=t.get(s)===s._trackId))&&(s._shouldSchedule||(s._shouldSchedule=s._dirtyLevel===0),s._dirtyLevel=e),s._shouldSchedule&&(o??(o=t.get(s)===s._trackId))&&(rt.NODE_ENV!=="production"&&((r=s.onTrigger)==null||r.call(s,tt({effect:s},n))),s.trigger(),(!s._runnings||s.allowRecurse)&&s._dirtyLevel!==2&&(s._shouldSchedule=!1,s.scheduler&&La.push(s.scheduler)))}ja()}const au=(t,e)=>{const n=new Map;return n.cleanup=t,n.computed=e,n},Xo=new WeakMap,Or=Symbol(rt.NODE_ENV!=="production"?"iterate":""),Ma=Symbol(rt.NODE_ENV!=="production"?"Map key iterate":"");function pt(t,e,n){if(Wn&&kr){let r=Xo.get(t);r||Xo.set(t,r=new Map);let s=r.get(n);s||r.set(n,s=au(()=>r.delete(n))),ou(kr,s,rt.NODE_ENV!=="production"?{target:t,type:e,key:n}:void 0)}}function ln(t,e,n,r,s,o){const i=Xo.get(t);if(!i)return;let a=[];if(e==="clear")a=[...i.values()];else if(n==="length"&&de(t)){const l=Number(r);i.forEach((c,u)=>{(u==="length"||!zn(u)&&u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(i.get(n)),e){case"add":de(t)?$a(n)&&a.push(i.get("length")):(a.push(i.get(Or)),wr(t)&&a.push(i.get(Ma)));break;case"delete":de(t)||(a.push(i.get(Or)),wr(t)&&a.push(i.get(Ma)));break;case"set":wr(t)&&a.push(i.get(Or));break}Ra();for(const l of a)l&&iu(l,4,rt.NODE_ENV!=="production"?{target:t,type:e,key:n,newValue:r,oldValue:s,oldTarget:o}:void 0);ja()}function Dm(t,e){const n=Xo.get(t);return n&&n.get(e)}const Vm=En("__proto__,__v_isRef,__isVue"),lu=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(zn)),cu=Rm();function Rm(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const r=Ee(this);for(let o=0,i=this.length;o<i;o++)pt(r,"get",o+"");const s=r[e](...n);return s===-1||s===!1?r[e](...n.map(Ee)):s}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...n){kn(),Ra();const r=Ee(this)[e].apply(this,n);return ja(),On(),r}}),t}function jm(t){zn(t)||(t=String(t));const e=Ee(this);return pt(e,"has",t),e.hasOwnProperty(t)}class uu{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?wu:bu:o?_u:yu).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=de(e);if(!s){if(i&&Ie(cu,n))return Reflect.get(cu,n,r);if(n==="hasOwnProperty")return jm}const a=Reflect.get(e,n,r);return(zn(n)?lu.has(n):Vm(n))||(s||pt(e,"get",n),o)?a:Qe(a)?i&&$a(n)?a:a.value:Be(a)?s?Eu(a):Bs(a):a}}class du extends uu{constructor(e=!1){super(!1,e)}set(e,n,r,s){let o=e[n];if(!this._isShallow){const l=Sn(o);if(!Tn(r)&&!Sn(r)&&(o=Ee(o),r=Ee(r)),!de(e)&&Qe(o)&&!Qe(r))return l?!1:(o.value=r,!0)}const i=de(e)&&$a(n)?Number(n)<e.length:Ie(e,n),a=Reflect.set(e,n,r,s);return e===Ee(s)&&(i?qn(r,o)&&ln(e,"set",n,r,o):ln(e,"add",n,r)),a}deleteProperty(e,n){const r=Ie(e,n),s=e[n],o=Reflect.deleteProperty(e,n);return o&&r&&ln(e,"delete",n,void 0,s),o}has(e,n){const r=Reflect.has(e,n);return(!zn(n)||!lu.has(n))&&pt(e,"has",n),r}ownKeys(e){return pt(e,"iterate",de(e)?"length":Or),Reflect.ownKeys(e)}}class fu extends uu{constructor(e=!1){super(!0,e)}set(e,n){return rt.NODE_ENV!=="production"&&an(`Set operation on key "${String(n)}" failed: target is readonly.`,e),!0}deleteProperty(e,n){return rt.NODE_ENV!=="production"&&an(`Delete operation on key "${String(n)}" failed: target is readonly.`,e),!0}}const Lm=new du,Mm=new fu,Um=new du(!0),Zm=new fu(!0),Ua=t=>t,Qo=t=>Reflect.getPrototypeOf(t);function ei(t,e,n=!1,r=!1){t=t.__v_raw;const s=Ee(t),o=Ee(e);n||(qn(e,o)&&pt(s,"get",e),pt(s,"get",o));const{has:i}=Qo(s),a=r?Ua:n?Za:Fs;if(i.call(s,e))return a(t.get(e));if(i.call(s,o))return a(t.get(o));t!==s&&t.get(e)}function ti(t,e=!1){const n=this.__v_raw,r=Ee(n),s=Ee(t);return e||(qn(t,s)&&pt(r,"has",t),pt(r,"has",s)),t===s?n.has(t):n.has(t)||n.has(s)}function ni(t,e=!1){return t=t.__v_raw,!e&&pt(Ee(t),"iterate",Or),Reflect.get(t,"size",t)}function pu(t,e=!1){!e&&!Tn(t)&&!Sn(t)&&(t=Ee(t));const n=Ee(this);return Qo(n).has.call(n,t)||(n.add(t),ln(n,"add",t,t)),this}function hu(t,e,n=!1){!n&&!Tn(e)&&!Sn(e)&&(e=Ee(e));const r=Ee(this),{has:s,get:o}=Qo(r);let i=s.call(r,t);i?rt.NODE_ENV!=="production"&&gu(r,s,t):(t=Ee(t),i=s.call(r,t));const a=o.call(r,t);return r.set(t,e),i?qn(e,a)&&ln(r,"set",t,e,a):ln(r,"add",t,e),this}function mu(t){const e=Ee(this),{has:n,get:r}=Qo(e);let s=n.call(e,t);s?rt.NODE_ENV!=="production"&&gu(e,n,t):(t=Ee(t),s=n.call(e,t));const o=r?r.call(e,t):void 0,i=e.delete(t);return s&&ln(e,"delete",t,void 0,o),i}function vu(){const t=Ee(this),e=t.size!==0,n=rt.NODE_ENV!=="production"?wr(t)?new Map(t):new Set(t):void 0,r=t.clear();return e&&ln(t,"clear",void 0,void 0,n),r}function ri(t,e){return function(r,s){const o=this,i=o.__v_raw,a=Ee(i),l=e?Ua:t?Za:Fs;return!t&&pt(a,"iterate",Or),i.forEach((c,u)=>r.call(s,l(c),l(u),o))}}function si(t,e,n){return function(...r){const s=this.__v_raw,o=Ee(s),i=wr(o),a=t==="entries"||t===Symbol.iterator&&i,l=t==="keys"&&i,c=s[t](...r),u=n?Ua:e?Za:Fs;return!e&&pt(o,"iterate",l?Ma:Or),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:a?[u(d[0]),u(d[1])]:u(d),done:f}},[Symbol.iterator](){return this}}}}function Kn(t){return function(...e){if(rt.NODE_ENV!=="production"){const n=e[0]?`on key "${e[0]}" `:"";an(`${Er(t)} operation ${n}failed: target is readonly.`,Ee(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function Bm(){const t={get(o){return ei(this,o)},get size(){return ni(this)},has:ti,add:pu,set:hu,delete:mu,clear:vu,forEach:ri(!1,!1)},e={get(o){return ei(this,o,!1,!0)},get size(){return ni(this)},has:ti,add(o){return pu.call(this,o,!0)},set(o,i){return hu.call(this,o,i,!0)},delete:mu,clear:vu,forEach:ri(!1,!0)},n={get(o){return ei(this,o,!0)},get size(){return ni(this,!0)},has(o){return ti.call(this,o,!0)},add:Kn("add"),set:Kn("set"),delete:Kn("delete"),clear:Kn("clear"),forEach:ri(!0,!1)},r={get(o){return ei(this,o,!0,!0)},get size(){return ni(this,!0)},has(o){return ti.call(this,o,!0)},add:Kn("add"),set:Kn("set"),delete:Kn("delete"),clear:Kn("clear"),forEach:ri(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{t[o]=si(o,!1,!1),n[o]=si(o,!0,!1),e[o]=si(o,!1,!0),r[o]=si(o,!0,!0)}),[t,n,e,r]}const[Fm,Hm,zm,qm]=Bm();function oi(t,e){const n=e?t?qm:zm:t?Hm:Fm;return(r,s,o)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get(Ie(n,s)&&s in r?n:r,s,o)}const Wm={get:oi(!1,!1)},Km={get:oi(!1,!0)},Gm={get:oi(!0,!1)},Jm={get:oi(!0,!0)};function gu(t,e,n){const r=Ee(n);if(r!==n&&e.call(t,r)){const s=Ca(t);an(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const yu=new WeakMap,_u=new WeakMap,bu=new WeakMap,wu=new WeakMap;function Ym(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Xm(t){return t.__v_skip||!Object.isExtensible(t)?0:Ym(Ca(t))}function Bs(t){return Sn(t)?t:ii(t,!1,Lm,Wm,yu)}function Qm(t){return ii(t,!1,Um,Km,_u)}function Eu(t){return ii(t,!0,Mm,Gm,bu)}function cn(t){return ii(t,!0,Zm,Jm,wu)}function ii(t,e,n,r,s){if(!Be(t))return rt.NODE_ENV!=="production"&&an(`value cannot be made ${e?"readonly":"reactive"}: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=s.get(t);if(o)return o;const i=Xm(t);if(i===0)return t;const a=new Proxy(t,i===2?r:n);return s.set(t,a),a}function Nn(t){return Sn(t)?Nn(t.__v_raw):!!(t&&t.__v_isReactive)}function Sn(t){return!!(t&&t.__v_isReadonly)}function Tn(t){return!!(t&&t.__v_isShallow)}function ai(t){return t?!!t.__v_raw:!1}function Ee(t){const e=t&&t.__v_raw;return e?Ee(e):t}function Gn(t){return Object.isExtensible(t)&&Jo(t,"__v_skip",!0),t}const Fs=t=>Be(t)?Bs(t):t,Za=t=>Be(t)?Eu(t):t,ev="Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free";class xu{constructor(e,n,r,s){this.getter=e,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Da(()=>e(this._value),()=>li(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=r}get value(){const e=Ee(this);return(!e._cacheable||e.effect.dirty)&&qn(e._value,e._value=e.effect.run())&&li(e,4),ku(e),e.effect._dirtyLevel>=2&&(rt.NODE_ENV!=="production"&&this._warnRecursive&&an(ev,`
|
|
7
8
|
|
|
8
|
-
getter: `,this.getter),
|
|
9
|
-
`),
|
|
10
|
-
`,...
|
|
11
|
-
`],...bh(n))}),t}function bh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Vs(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...wh(e.props),s]:[o+s]}function wh(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...oc(r,e[r]))}),n.length>3&&t.push(" ..."),t}function oc(e,t,n){return Be(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:He(t)?(t=oc(e,ge(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):pe(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ge(t),n?t:[`${e}=`,t])}function Eh(e,t){g.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?U(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&U(`${t} is NaN - the duration expression might be incorrect.`))}const Vi={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update"};function dn(e,t,n,r){try{return r?e(...r):e()}catch(o){ao(o,t,n)}}function kt(e,t,n,r){if(pe(e)){const o=dn(e,t,n,r);return o&&_i(o)&&o.catch(s=>{ao(s,t,n)}),o}if(ie(e)){const o=[];for(let s=0;s<e.length;s++)o.push(kt(e[s],t,n,r));return o}else g.NODE_ENV!=="production"&&U(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function ao(e,t,n,r=!0){const o=t?t.vnode:null;if(t){let s=t.parent;const i=t.proxy,a=g.NODE_ENV!=="production"?Vi[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){const c=s.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](e,i,a)===!1)return}s=s.parent}const l=t.appContext.config.errorHandler;if(l){sn(),dn(l,null,10,[e,i,a]),an();return}}Oh(e,n,o,r)}function Oh(e,t,n,r=!0){if(g.NODE_ENV!=="production"){const o=Vi[t];if(n&&ms(n),U(`Unhandled error${o?` during execution of ${o}`:""}`),n&&vs(),r)throw e;console.error(e)}else console.error(e)}let lo=!1,Ri=!1;const ut=[];let zt=0;const Ir=[];let In=null,ir=0;const sc=Promise.resolve();let ji=null;const Nh=100;function co(e){const t=ji||sc;return e?t.then(this?e.bind(this):e):t}function Sh(e){let t=zt+1,n=ut.length;for(;t<n;){const r=t+n>>>1,o=ut[r],s=uo(o);s<e||s===e&&o.pre?t=r+1:n=r}return t}function gs(e){(!ut.length||!ut.includes(e,lo&&e.allowRecurse?zt+1:zt))&&(e.id==null?ut.push(e):ut.splice(Sh(e.id),0,e),ic())}function ic(){!lo&&!Ri&&(Ri=!0,ji=sc.then(uc))}function xh(e){const t=ut.indexOf(e);t>zt&&ut.splice(t,1)}function ac(e){ie(e)?Ir.push(...e):(!In||!In.includes(e,e.allowRecurse?ir+1:ir))&&Ir.push(e),ic()}function lc(e,t,n=lo?zt+1:0){for(g.NODE_ENV!=="production"&&(t=t||new Map);n<ut.length;n++){const r=ut[n];if(r&&r.pre){if(e&&r.id!==e.uid||g.NODE_ENV!=="production"&&Li(t,r))continue;ut.splice(n,1),n--,r()}}}function cc(e){if(Ir.length){const t=[...new Set(Ir)].sort((n,r)=>uo(n)-uo(r));if(Ir.length=0,In){In.push(...t);return}for(In=t,g.NODE_ENV!=="production"&&(e=e||new Map),ir=0;ir<In.length;ir++){const n=In[ir];g.NODE_ENV!=="production"&&Li(e,n)||n.active!==!1&&n()}In=null,ir=0}}const uo=e=>e.id==null?1/0:e.id,kh=(e,t)=>{const n=uo(e)-uo(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function uc(e){Ri=!1,lo=!0,g.NODE_ENV!=="production"&&(e=e||new Map),ut.sort(kh);const t=g.NODE_ENV!=="production"?n=>Li(e,n):We;try{for(zt=0;zt<ut.length;zt++){const n=ut[zt];if(n&&n.active!==!1){if(g.NODE_ENV!=="production"&&t(n))continue;dn(n,n.i,n.i?15:14)}}}finally{zt=0,ut.length=0,cc(e),lo=!1,ji=null,(ut.length||Ir.length)&&uc(e)}}function Li(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>Nh){const r=t.i,o=r&&ma(r.type);return ao(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}else e.set(t,n+1)}}let Dn=!1;const ys=new Map;g.NODE_ENV!=="production"&&(Ei().__VUE_HMR_RUNTIME__={createRecord:Mi(dc),rerender:Mi(Ph),reload:Mi($h)});const ar=new Map;function Ch(e){const t=e.type.__hmrId;let n=ar.get(t);n||(dc(t,e.type),n=ar.get(t)),n.instances.add(e)}function Th(e){ar.get(e.type.__hmrId).instances.delete(e)}function dc(e,t){return ar.has(e)?!1:(ar.set(e,{initialDef:_s(t),instances:new Set}),!0)}function _s(e){return pu(e)?e.__vccOpts:e}function Ph(e,t){const n=ar.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,_s(r.type).render=t),r.renderCache=[],Dn=!0,r.effect.dirty=!0,r.update(),Dn=!1}))}function $h(e,t){const n=ar.get(e);if(!n)return;t=_s(t),fc(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=_s(s.type);let a=ys.get(i);a||(i!==n.initialDef&&fc(i,t),ys.set(i,a=new Set)),a.add(s),s.appContext.propsCache.delete(s.type),s.appContext.emitsCache.delete(s.type),s.appContext.optionsCache.delete(s.type),s.ceReload?(a.add(s),s.ceReload(t.styles),a.delete(s)):s.parent?(s.parent.effect.dirty=!0,gs(()=>{s.parent.update(),a.delete(s)})):s.appContext.reload?s.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}ac(()=>{ys.clear()})}function fc(e,t){qe(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Mi(e){return(t,n)=>{try{return e(t,n)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let Kt,fo=[],Ui=!1;function po(e,...t){Kt?Kt.emit(e,...t):Ui||fo.push({event:e,args:t})}function pc(e,t){var n,r;Kt=e,Kt?(Kt.enabled=!0,fo.forEach(({event:o,args:s})=>Kt.emit(o,...s)),fo=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{pc(s,t)}),setTimeout(()=>{Kt||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ui=!0,fo=[])},3e3)):(Ui=!0,fo=[])}function Ih(e,t){po("app:init",e,t,{Fragment:Ce,Text:_o,Comment:Ke,Static:bo})}function Dh(e){po("app:unmount",e)}const Ah=Fi("component:added"),hc=Fi("component:updated"),Vh=Fi("component:removed"),Rh=e=>{Kt&&typeof Kt.cleanupBuffer=="function"&&!Kt.cleanupBuffer(e)&&Vh(e)};/*! #__NO_SIDE_EFFECTS__ */function Fi(e){return t=>{po(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const jh=mc("perf:start"),Lh=mc("perf:end");function mc(e){return(t,n,r)=>{po(e,t.appContext.app,t.uid,t,n,r)}}function Mh(e,t,n){po("component:emit",e.appContext.app,e,t,n)}let Ye=null,bs=null;function ws(e){const t=Ye;return Ye=e,bs=e&&e.type.__scopeId||null,t}function Uh(e){bs=e}function Fh(){bs=null}function ye(e,t=Ye,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&ru(-1);const s=ws(t);let i;try{i=e(...o)}finally{ws(s),r._d&&ru(1)}return g.NODE_ENV!=="production"&&hc(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function vc(e){Sp(e)&&U("Do not use built-in directive ids as custom directive id: "+e)}function lr(e,t,n,r){const o=e.dirs,s=t&&t.dirs;for(let i=0;i<o.length;i++){const a=o[i];s&&(a.oldValue=s[i].value);let l=a.dir[r];l&&(sn(),kt(l,n,8,[e.el,a,e,t]),an())}}const An=Symbol("_leaveCb"),Es=Symbol("_enterCb");function Bh(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Re(()=>{e.isMounted=!0}),Zi(()=>{e.isUnmounting=!0}),e}const Ct=[Function,Array],gc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ct,onEnter:Ct,onAfterEnter:Ct,onEnterCancelled:Ct,onBeforeLeave:Ct,onLeave:Ct,onAfterLeave:Ct,onLeaveCancelled:Ct,onBeforeAppear:Ct,onAppear:Ct,onAfterAppear:Ct,onAppearCancelled:Ct},yc=e=>{const t=e.subTree;return t.component?yc(t.component):t},Hh={name:"BaseTransition",props:gc,setup(e,{slots:t}){const n=Is(),r=Bh();return()=>{const o=t.default&&wc(t.default(),!0);if(!o||!o.length)return;let s=o[0];if(o.length>1){let f=!1;for(const m of o)if(m.type!==Ke){if(g.NODE_ENV!=="production"&&f){U("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(s=m,f=!0,g.NODE_ENV==="production")break}}const i=ge(e),{mode:a}=i;if(g.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&U(`invalid <transition> mode: ${a}`),r.isLeaving)return Hi(s);const l=bc(s);if(!l)return Hi(s);let c=Bi(l,i,r,n,f=>c=f);Os(l,c);const u=n.subTree,d=u&&bc(u);if(d&&d.type!==Ke&&!hr(l,d)&&yc(n).type!==Ke){const f=Bi(d,i,r,n);if(Os(d,f),a==="out-in"&&l.type!==Ke)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Hi(s);a==="in-out"&&l.type!==Ke&&(f.delayLeave=(m,y,E)=>{const S=_c(r,d);S[String(d.key)]=d,m[An]=()=>{y(),m[An]=void 0,delete c.delayedLeave},c.delayedLeave=E})}return s}}};function _c(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Bi(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:m,onAfterLeave:y,onLeaveCancelled:E,onBeforeAppear:S,onAppear:A,onAfterAppear:F,onAppearCancelled:C}=t,z=String(e.key),$=_c(n,e),Z=(Y,V)=>{Y&&kt(Y,r,9,V)},x=(Y,V)=>{const P=V[1];Z(Y,V),ie(Y)?Y.every(j=>j.length<=1)&&P():Y.length<=1&&P()},fe={mode:i,persisted:a,beforeEnter(Y){let V=l;if(!n.isMounted)if(s)V=S||l;else return;Y[An]&&Y[An](!0);const P=$[z];P&&hr(e,P)&&P.el[An]&&P.el[An](),Z(V,[Y])},enter(Y){let V=c,P=u,j=d;if(!n.isMounted)if(s)V=A||c,P=F||u,j=C||d;else return;let oe=!1;const w=Y[Es]=I=>{oe||(oe=!0,I?Z(j,[Y]):Z(P,[Y]),fe.delayedLeave&&fe.delayedLeave(),Y[Es]=void 0)};V?x(V,[Y,w]):w()},leave(Y,V){const P=String(e.key);if(Y[Es]&&Y[Es](!0),n.isUnmounting)return V();Z(f,[Y]);let j=!1;const oe=Y[An]=w=>{j||(j=!0,V(),w?Z(E,[Y]):Z(y,[Y]),Y[An]=void 0,$[P]===e&&delete $[P])};$[P]=e,m?x(m,[Y,oe]):oe()},clone(Y){const V=Bi(Y,t,n,r,o);return o&&o(V),V}};return fe}function Hi(e){if(mo(e))return e=Rt(e),e.children=null,e}function bc(e){if(!mo(e))return e;if(g.NODE_ENV!=="production"&&e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&pe(n.default))return n.default()}}function Os(e,t){e.shapeFlag&6&&e.component?Os(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function wc(e,t=!1,n){let r=[],o=0;for(let s=0;s<e.length;s++){let i=e[s];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:s);i.type===Ce?(i.patchFlag&128&&o++,r=r.concat(wc(i.children,t,a))):(t||i.type!==Ke)&&r.push(a!=null?Rt(i,{key:a}):i)}if(o>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function he(e,t){return pe(e)?qe({name:e.name},t,{setup:e}):e}const ho=e=>!!e.type.__asyncLoader,mo=e=>e.type.__isKeepAlive;function Zh(e,t){Ec(e,"a",t)}function qh(e,t){Ec(e,"da",t)}function Ec(e,t,n=Ge){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ns(t,r,n),n){let o=n.parent;for(;o&&o.parent;)mo(o.parent.vnode)&&Wh(r,t,n,o),o=o.parent}}function Wh(e,t,n,r){const o=Ns(t,e,r,!0);mt(()=>{yi(r[t],o)},n)}function Ns(e,t,n=Ge,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{sn();const a=Oo(n),l=kt(t,n,e,i);return a(),an(),l});return r?o.unshift(s):o.push(s),s}else if(g.NODE_ENV!=="production"){const o=nr(Vi[e].replace(/ hook$/,""));U(`${o} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const fn=e=>(t,n=Ge)=>{(!As||e==="sp")&&Ns(e,(...r)=>t(...r),n)},zh=fn("bm"),Re=fn("m"),Kh=fn("bu"),Gh=fn("u"),Zi=fn("bum"),mt=fn("um"),Jh=fn("sp"),Yh=fn("rtg"),Xh=fn("rtc");function Qh(e,t=Ge){Ns("ec",e,t)}const em="components",Oc=Symbol.for("v-ndc");function qi(e){return Be(e)?tm(em,e,!1)||e:e||Oc}function tm(e,t,n=!0,r=!1){const o=Ye||Ge;if(o){const s=o.type;{const a=ma(s,!1);if(a&&(a===t||a===Ot(t)||a===tr(Ot(t))))return s}const i=Nc(o[e]||s[e],t)||Nc(o.appContext[e],t);return!i&&r?s:(g.NODE_ENV!=="production"&&n&&!i&&U(`Failed to resolve ${e.slice(0,-1)}: ${t}
|
|
12
|
-
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else g.NODE_ENV!=="production"&&U(`resolve${tr(e.slice(0,-1))} can only be used in render() or setup().`)}function Nc(e,t){return e&&(e[t]||e[Ot(t)]||e[tr(Ot(t))])}function Gt(e,t,n,r){let o;const s=n;if(ie(e)||Be(e)){o=new Array(e.length);for(let i=0,a=e.length;i<a;i++)o[i]=t(e[i],i,void 0,s)}else if(typeof e=="number"){g.NODE_ENV!=="production"&&!Number.isInteger(e)&&U(`The v-for range expect an integer value but got ${e}.`),o=new Array(e);for(let i=0;i<e;i++)o[i]=t(i+1,i,void 0,s)}else if(De(e))if(e[Symbol.iterator])o=Array.from(e,(i,a)=>t(i,a,void 0,s));else{const i=Object.keys(e);o=new Array(i.length);for(let a=0,l=i.length;a<l;a++){const c=i[a];o[a]=t(e[c],c,a,s)}}else o=[];return o}function Wi(e,t,n={},r,o){if(Ye.isCE||Ye.parent&&ho(Ye.parent)&&Ye.parent.isCE)return B("slot",n,r);let s=e[t];g.NODE_ENV!=="production"&&s&&s.length>1&&(U("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),s=()=>[]),s&&s._c&&(s._d=!1),_();const i=s&&Sc(s(n)),a=ke(Ce,{key:(n.key||i&&i.key||`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function Sc(e){return e.some(t=>Dr(t)?!(t.type===Ke||t.type===Ce&&!Sc(t.children)):!0)?e:null}const zi=e=>e?cu(e)?ha(e):zi(e.parent):null,cr=qe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>g.NODE_ENV!=="production"?Wt(e.props):e.props,$attrs:e=>g.NODE_ENV!=="production"?Wt(e.attrs):e.attrs,$slots:e=>g.NODE_ENV!=="production"?Wt(e.slots):e.slots,$refs:e=>g.NODE_ENV!=="production"?Wt(e.refs):e.refs,$parent:e=>zi(e.parent),$root:e=>zi(e.root),$emit:e=>e.emit,$options:e=>Yi(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,gs(e.update)}),$nextTick:e=>e.n||(e.n=co.bind(e.proxy)),$watch:e=>Lm.bind(e)}),Ki=e=>e==="_"||e==="$",Gi=(e,t)=>e!==Me&&!e.__isScriptSetup&&Ne(e,t),xc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:a,appContext:l}=e;if(g.NODE_ENV!=="production"&&t==="__isVue")return!0;let c;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(Gi(r,t))return i[t]=1,r[t];if(o!==Me&&Ne(o,t))return i[t]=2,o[t];if((c=e.propsOptions[0])&&Ne(c,t))return i[t]=3,s[t];if(n!==Me&&Ne(n,t))return i[t]=4,n[t];Ji&&(i[t]=0)}}const u=cr[t];let d,f;if(u)return t==="$attrs"?(ot(e.attrs,"get",""),g.NODE_ENV!=="production"&&Ps()):g.NODE_ENV!=="production"&&t==="$slots"&&ot(e,"get",t),u(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==Me&&Ne(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,Ne(f,t))return f[t];g.NODE_ENV!=="production"&&Ye&&(!Be(t)||t.indexOf("__v")!==0)&&(o!==Me&&Ki(t[0])&&Ne(o,t)?U(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===Ye&&U(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return Gi(o,t)?(o[t]=n,!0):g.NODE_ENV!=="production"&&o.__isScriptSetup&&Ne(o,t)?(U(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==Me&&Ne(r,t)?(r[t]=n,!0):Ne(e.props,t)?(g.NODE_ENV!=="production"&&U(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(g.NODE_ENV!=="production"&&U(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(g.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},i){let a;return!!n[i]||e!==Me&&Ne(e,i)||Gi(t,i)||(a=s[0])&&Ne(a,i)||Ne(r,i)||Ne(cr,i)||Ne(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ne(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};g.NODE_ENV!=="production"&&(xc.ownKeys=e=>(U("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function nm(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(cr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>cr[n](e),set:We})}),t}function rm(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(r=>{Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>e.props[r],set:We})})}function om(e){const{ctx:t,setupState:n}=e;Object.keys(ge(n)).forEach(r=>{if(!n.__isScriptSetup){if(Ki(r[0])){U(`setup() return property ${JSON.stringify(r)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>n[r],set:We})}})}function kc(e){return ie(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function sm(){const e=Object.create(null);return(t,n)=>{e[n]?U(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let Ji=!0;function im(e){const t=Yi(e),n=e.proxy,r=e.ctx;Ji=!1,t.beforeCreate&&Cc(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:m,updated:y,activated:E,deactivated:S,beforeDestroy:A,beforeUnmount:F,destroyed:C,unmounted:z,render:$,renderTracked:Z,renderTriggered:x,errorCaptured:fe,serverPrefetch:Y,expose:V,inheritAttrs:P,components:j,directives:oe,filters:w}=t,I=g.NODE_ENV!=="production"?sm():null;if(g.NODE_ENV!=="production"){const[ae]=e.propsOptions;if(ae)for(const re in ae)I("Props",re)}if(c&&am(c,r,I),i)for(const ae in i){const re=i[ae];pe(re)?(g.NODE_ENV!=="production"?Object.defineProperty(r,ae,{value:re.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[ae]=re.bind(n),g.NODE_ENV!=="production"&&I("Methods",ae)):g.NODE_ENV!=="production"&&U(`Method "${ae}" has type "${typeof re}" in the component definition. Did you reference the function correctly?`)}if(o){g.NODE_ENV!=="production"&&!pe(o)&&U("The data option must be a function. Plain object usage is no longer supported.");const ae=o.call(n,n);if(g.NODE_ENV!=="production"&&_i(ae)&&U("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!De(ae))g.NODE_ENV!=="production"&&U("data() should return an object.");else if(e.data=so(ae),g.NODE_ENV!=="production")for(const re in ae)I("Data",re),Ki(re[0])||Object.defineProperty(r,re,{configurable:!0,enumerable:!0,get:()=>ae[re],set:We})}if(Ji=!0,s)for(const ae in s){const re=s[ae],ce=pe(re)?re.bind(n,n):pe(re.get)?re.get.bind(n,n):We;g.NODE_ENV!=="production"&&ce===We&&U(`Computed property "${ae}" has no getter.`);const Ie=!pe(re)&&pe(re.set)?re.set.bind(n):g.NODE_ENV!=="production"?()=>{U(`Write operation failed: computed property "${ae}" is readonly.`)}:We,je=X({get:ce,set:Ie});Object.defineProperty(r,ae,{enumerable:!0,configurable:!0,get:()=>je.value,set:nt=>je.value=nt}),g.NODE_ENV!=="production"&&I("Computed",ae)}if(a)for(const ae in a)Tc(a[ae],r,n,ae);if(l){const ae=pe(l)?l.call(n):l;Reflect.ownKeys(ae).forEach(re=>{dt(re,ae[re])})}u&&Cc(u,e,"c");function ne(ae,re){ie(re)?re.forEach(ce=>ae(ce.bind(n))):re&&ae(re.bind(n))}if(ne(zh,d),ne(Re,f),ne(Kh,m),ne(Gh,y),ne(Zh,E),ne(qh,S),ne(Qh,fe),ne(Xh,Z),ne(Yh,x),ne(Zi,F),ne(mt,z),ne(Jh,Y),ie(V))if(V.length){const ae=e.exposed||(e.exposed={});V.forEach(re=>{Object.defineProperty(ae,re,{get:()=>n[re],set:ce=>n[re]=ce})})}else e.exposed||(e.exposed={});$&&e.render===We&&(e.render=$),P!=null&&(e.inheritAttrs=P),j&&(e.components=j),oe&&(e.directives=oe)}function am(e,t,n=We){ie(e)&&(e=Xi(e));for(const r in e){const o=e[r];let s;De(o)?"default"in o?s=$e(o.from||r,o.default,!0):s=$e(o.from||r):s=$e(o),He(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,g.NODE_ENV!=="production"&&n("Inject",r)}}function Cc(e,t,n){kt(ie(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Tc(e,t,n,r){const o=r.includes(".")?Xc(n,r):()=>n[r];if(Be(e)){const s=t[e];pe(s)?Xe(o,s):g.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${e}"`,s)}else if(pe(e))Xe(o,e.bind(n));else if(De(e))if(ie(e))e.forEach(s=>Tc(s,t,n,r));else{const s=pe(e.handler)?e.handler.bind(n):t[e.handler];pe(s)?Xe(o,s,e):g.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${e.handler}"`,s)}else g.NODE_ENV!=="production"&&U(`Invalid watch option: "${r}"`,e)}function Yi(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,a=s.get(t);let l;return a?l=a:!o.length&&!n&&!r?l=t:(l={},o.length&&o.forEach(c=>Ss(l,c,i,!0)),Ss(l,t,i)),De(t)&&s.set(t,l),l}function Ss(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&Ss(e,s,n,!0),o&&o.forEach(i=>Ss(e,i,n,!0));for(const i in t)if(r&&i==="expose")g.NODE_ENV!=="production"&&U('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=lm[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const lm={data:Pc,props:$c,emits:$c,methods:vo,computed:vo,beforeCreate:vt,created:vt,beforeMount:vt,mounted:vt,beforeUpdate:vt,updated:vt,beforeDestroy:vt,beforeUnmount:vt,destroyed:vt,unmounted:vt,activated:vt,deactivated:vt,errorCaptured:vt,serverPrefetch:vt,components:vo,directives:vo,watch:um,provide:Pc,inject:cm};function Pc(e,t){return t?e?function(){return qe(pe(e)?e.call(this,this):e,pe(t)?t.call(this,this):t)}:t:e}function cm(e,t){return vo(Xi(e),Xi(t))}function Xi(e){if(ie(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function vt(e,t){return e?[...new Set([].concat(e,t))]:t}function vo(e,t){return e?qe(Object.create(null),e,t):t}function $c(e,t){return e?ie(e)&&ie(t)?[...new Set([...e,...t])]:qe(Object.create(null),kc(e),kc(t??{})):t}function um(e,t){if(!e)return t;if(!t)return e;const n=qe(Object.create(null),e);for(const r in t)n[r]=vt(e[r],t[r]);return n}function Ic(){return{app:null,config:{isNativeTag:Op,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let dm=0;function fm(e,t){return function(r,o=null){pe(r)||(r=qe({},r)),o!=null&&!De(o)&&(g.NODE_ENV!=="production"&&U("root props passed to app.mount() must be an object."),o=null);const s=Ic(),i=new WeakSet;let a=!1;const l=s.app={_uid:dm++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:hu,get config(){return s.config},set config(c){g.NODE_ENV!=="production"&&U("app.config cannot be replaced. Modify individual options instead.")},use(c,...u){return i.has(c)?g.NODE_ENV!=="production"&&U("Plugin has already been applied to target app."):c&&pe(c.install)?(i.add(c),c.install(l,...u)):pe(c)?(i.add(c),c(l,...u)):g.NODE_ENV!=="production"&&U('A plugin must either be a function or an object with an "install" function.'),l},mixin(c){return s.mixins.includes(c)?g.NODE_ENV!=="production"&&U("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):s.mixins.push(c),l},component(c,u){return g.NODE_ENV!=="production"&&fa(c,s.config),u?(g.NODE_ENV!=="production"&&s.components[c]&&U(`Component "${c}" has already been registered in target app.`),s.components[c]=u,l):s.components[c]},directive(c,u){return g.NODE_ENV!=="production"&&vc(c),u?(g.NODE_ENV!=="production"&&s.directives[c]&&U(`Directive "${c}" has already been registered in target app.`),s.directives[c]=u,l):s.directives[c]},mount(c,u,d){if(a)g.NODE_ENV!=="production"&&U("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{g.NODE_ENV!=="production"&&c.__vue_app__&&U("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const f=B(r,o);return f.appContext=s,d===!0?d="svg":d===!1&&(d=void 0),g.NODE_ENV!=="production"&&(s.reload=()=>{e(Rt(f),c,d)}),u&&t?t(f,c):e(f,c,d),a=!0,l._container=c,c.__vue_app__=l,g.NODE_ENV!=="production"&&(l._instance=f.component,Ih(l,hu)),ha(f.component)}},unmount(){a?(e(null,l._container),g.NODE_ENV!=="production"&&(l._instance=null,Dh(l)),delete l._container.__vue_app__):g.NODE_ENV!=="production"&&U("Cannot unmount an app that is not mounted.")},provide(c,u){return g.NODE_ENV!=="production"&&c in s.provides&&U(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),s.provides[c]=u,l},runWithContext(c){const u=ur;ur=l;try{return c()}finally{ur=u}}};return l}}let ur=null;function dt(e,t){if(!Ge)g.NODE_ENV!=="production"&&U("provide() can only be used inside setup().");else{let n=Ge.provides;const r=Ge.parent&&Ge.parent.provides;r===n&&(n=Ge.provides=Object.create(r)),n[e]=t}}function $e(e,t,n=!1){const r=Ge||Ye;if(r||ur){const o=ur?ur._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&pe(t)?t.call(r&&r.proxy):t;g.NODE_ENV!=="production"&&U(`injection "${String(e)}" not found.`)}else g.NODE_ENV!=="production"&&U("inject() can only be used inside setup() or functional components.")}function pm(){return!!(Ge||Ye||ur)}const Dc={},Ac=()=>Object.create(Dc),Vc=e=>Object.getPrototypeOf(e)===Dc;function hm(e,t,n,r=!1){const o={},s=Ac();e.propsDefaults=Object.create(null),Rc(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);g.NODE_ENV!=="production"&&Mc(t||{},o,e),n?e.props=r?o:ch(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function mm(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function vm(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=ge(o),[l]=e.propsOptions;let c=!1;if(!(g.NODE_ENV!=="production"&&mm(e))&&(r||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let f=u[d];if(Ts(e.emitsOptions,f))continue;const m=t[f];if(l)if(Ne(s,f))m!==s[f]&&(s[f]=m,c=!0);else{const y=Ot(f);o[y]=Qi(l,a,y,m,e,!1)}else m!==s[f]&&(s[f]=m,c=!0)}}}else{Rc(e,t,o,s)&&(c=!0);let u;for(const d in a)(!t||!Ne(t,d)&&((u=on(d))===d||!Ne(t,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(o[d]=Qi(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!Ne(t,d))&&(delete s[d],c=!0)}c&&qt(e.attrs,"set",""),g.NODE_ENV!=="production"&&Mc(t||{},o,e)}function Rc(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(ro(l))continue;const c=t[l];let u;o&&Ne(o,u=Ot(l))?!s||!s.includes(u)?n[u]=c:(a||(a={}))[u]=c:Ts(e.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,i=!0)}if(s){const l=ge(n),c=a||Me;for(let u=0;u<s.length;u++){const d=s[u];n[d]=Qi(o,l,d,c[d],e,!Ne(c,d))}}return i}function Qi(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=Ne(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&pe(l)){const{propsDefaults:c}=o;if(n in c)r=c[n];else{const u=Oo(o);r=c[n]=l.call(null,t),u()}}else r=l}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===on(n))&&(r=!0))}return r}const gm=new WeakMap;function jc(e,t,n=!1){const r=n?gm:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let l=!1;if(!pe(e)){const u=d=>{l=!0;const[f,m]=jc(d,t,!0);qe(i,f),m&&a.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!s&&!l)return De(e)&&r.set(e,$r),$r;if(ie(s))for(let u=0;u<s.length;u++){g.NODE_ENV!=="production"&&!Be(s[u])&&U("props must be strings when using array syntax.",s[u]);const d=Ot(s[u]);Lc(d)&&(i[d]=Me)}else if(s){g.NODE_ENV!=="production"&&!De(s)&&U("invalid props options",s);for(const u in s){const d=Ot(u);if(Lc(d)){const f=s[u],m=i[d]=ie(f)||pe(f)?{type:f}:qe({},f),y=m.type;let E=!1,S=!0;if(ie(y))for(let A=0;A<y.length;++A){const F=y[A],C=pe(F)&&F.name;if(C==="Boolean"){E=!0;break}else C==="String"&&(S=!1)}else E=pe(y)&&y.name==="Boolean";m[0]=E,m[1]=S,(E||Ne(m,"default"))&&a.push(d)}}}const c=[i,a];return De(e)&&r.set(e,c),c}function Lc(e){return e[0]!=="$"&&!ro(e)?!0:(g.NODE_ENV!=="production"&&U(`Invalid prop name: "${e}" is a reserved property.`),!1)}function ym(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Mc(e,t,n){const r=ge(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&_m(s,r[s],i,g.NODE_ENV!=="production"?Wt(r):r,!Ne(e,s)&&!Ne(e,on(s)))}}function _m(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:l}=n;if(i&&o){U('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!l){let c=!1;const u=ie(s)?s:[s],d=[];for(let f=0;f<u.length&&!c;f++){const{valid:m,expectedType:y}=wm(t,u[f]);d.push(y||""),c=m}if(!c){U(Em(e,t,d));return}}a&&!a(t,r)&&U('Invalid prop: custom validator check failed for prop "'+e+'".')}}const bm=rn("String,Number,Boolean,Function,Symbol,BigInt");function wm(e,t){let n;const r=ym(t);if(bm(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=De(e):r==="Array"?n=ie(e):r==="null"?n=e===null:n=e instanceof t;return{valid:n,expectedType:r}}function Em(e,t,n){if(n.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let r=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(tr).join(" | ")}`;const o=n[0],s=bi(t),i=Uc(t,o),a=Uc(t,s);return n.length===1&&Fc(o)&&!Om(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Fc(s)&&(r+=`with value ${a}.`),r}function Uc(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Fc(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function Om(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Bc=e=>e[0]==="_"||e==="$stable",ea=e=>ie(e)?e.map(jt):[jt(e)],Nm=(e,t,n)=>{if(t._n)return t;const r=ye((...o)=>(g.NODE_ENV!=="production"&&Ge&&(!n||n.root===Ge.root)&&U(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),ea(t(...o))),n);return r._c=!1,r},Hc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Bc(o))continue;const s=e[o];if(pe(s))t[o]=Nm(o,s,r);else if(s!=null){g.NODE_ENV!=="production"&&U(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=ea(s);t[o]=()=>i}}},Zc=(e,t)=>{g.NODE_ENV!=="production"&&!mo(e.vnode)&&U("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=ea(t);e.slots.default=()=>n},ta=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},Sm=(e,t,n)=>{const r=e.slots=Ac();if(e.vnode.shapeFlag&32){const o=t._;o?(ta(r,t,n),n&&ns(r,"_",o,!0)):Hc(t,r)}else t&&Zc(e,t)},xm=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=Me;if(r.shapeFlag&32){const a=t._;a?g.NODE_ENV!=="production"&&Dn?(ta(o,t,n),qt(e,"set","$slots")):n&&a===1?s=!1:ta(o,t,n):(s=!t.$stable,Hc(t,o)),i=t}else t&&(Zc(e,t),i={default:1});if(s)for(const a in o)!Bc(a)&&i[a]==null&&delete o[a]};function na(e,t,n,r,o=!1){if(ie(e)){e.forEach((f,m)=>na(f,t&&(ie(t)?t[m]:t),n,r,o));return}if(ho(r)&&!o)return;const s=r.shapeFlag&4?ha(r.component):r.el,i=o?null:s,{i:a,r:l}=e;if(g.NODE_ENV!=="production"&&!a){U("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const c=t&&t.r,u=a.refs===Me?a.refs={}:a.refs,d=a.setupState;if(c!=null&&c!==l&&(Be(c)?(u[c]=null,Ne(d,c)&&(d[c]=null)):He(c)&&(c.value=null)),pe(l))dn(l,a,12,[i,u]);else{const f=Be(l),m=He(l);if(f||m){const y=()=>{if(e.f){const E=f?Ne(d,l)?d[l]:u[l]:l.value;o?ie(E)&&yi(E,s):ie(E)?E.includes(s)||E.push(s):f?(u[l]=[s],Ne(d,l)&&(d[l]=u[l])):(l.value=[s],e.k&&(u[e.k]=l.value))}else f?(u[l]=i,Ne(d,l)&&(d[l]=i)):m?(l.value=i,e.k&&(u[e.k]=i)):g.NODE_ENV!=="production"&&U("Invalid template ref type:",l,`(${typeof l})`)};i?(y.id=-1,_t(y,n)):y()}else g.NODE_ENV!=="production"&&U("Invalid template ref type:",l,`(${typeof l})`)}}const qc=Symbol("_vte"),km=e=>e.__isTeleport,dr=e=>e&&(e.disabled||e.disabled===""),Wc=e=>typeof SVGElement<"u"&&e instanceof SVGElement,zc=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ra=(e,t)=>{const n=e&&e.to;if(Be(n))if(t){const r=t(n);return g.NODE_ENV!=="production"&&!r&&!dr(e)&&U(`Failed to locate Teleport target with selector "${n}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),r}else return g.NODE_ENV!=="production"&&U("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return g.NODE_ENV!=="production"&&!n&&!dr(e)&&U(`Invalid Teleport target: ${n}`),n},Cm={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,l,c){const{mc:u,pc:d,pbc:f,o:{insert:m,querySelector:y,createText:E,createComment:S}}=c,A=dr(t.props);let{shapeFlag:F,children:C,dynamicChildren:z}=t;if(g.NODE_ENV!=="production"&&Dn&&(l=!1,z=null),e==null){const $=t.el=g.NODE_ENV!=="production"?S("teleport start"):E(""),Z=t.anchor=g.NODE_ENV!=="production"?S("teleport end"):E("");m($,n,r),m(Z,n,r);const x=t.target=ra(t.props,y),fe=Gc(x,t,E,m);x?i==="svg"||Wc(x)?i="svg":(i==="mathml"||zc(x))&&(i="mathml"):g.NODE_ENV!=="production"&&!A&&U("Invalid Teleport target on mount:",x,`(${typeof x})`);const Y=(V,P)=>{F&16&&u(C,V,P,o,s,i,a,l)};A?Y(n,Z):x&&Y(x,fe)}else{t.el=e.el,t.targetStart=e.targetStart;const $=t.anchor=e.anchor,Z=t.target=e.target,x=t.targetAnchor=e.targetAnchor,fe=dr(e.props),Y=fe?n:Z,V=fe?$:x;if(i==="svg"||Wc(Z)?i="svg":(i==="mathml"||zc(Z))&&(i="mathml"),z?(f(e.dynamicChildren,z,Y,o,s,i,a),yo(e,t,!0)):l||d(e,t,Y,V,o,s,i,a,!1),A)fe?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):xs(t,n,$,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const P=t.target=ra(t.props,y);P?xs(t,P,null,c,0):g.NODE_ENV!=="production"&&U("Invalid Teleport target on update:",Z,`(${typeof Z})`)}else fe&&xs(t,Z,x,c,1)}Kc(t)},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:f}=e;if(d&&(o(c),o(u)),s&&o(l),i&16){const m=s||!dr(f);for(let y=0;y<a.length;y++){const E=a[y];r(E,t,n,m,!!E.dynamicChildren)}}},move:xs,hydrate:Tm};function xs(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:c,props:u}=e,d=s===2;if(d&&r(i,t,n),(!d||dr(u))&&l&16)for(let f=0;f<c.length;f++)o(c[f],t,n,2);d&&r(a,t,n)}function Tm(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:c,createText:u}},d){const f=t.target=ra(t.props,l);if(f){const m=f._lpa||f.firstChild;if(t.shapeFlag&16)if(dr(t.props))t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=m,t.targetAnchor=m&&i(m);else{t.anchor=i(e);let y=m;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,f._lpa=t.targetAnchor&&i(t.targetAnchor);break}}y=i(y)}t.targetAnchor||Gc(f,t,u,c),d(m&&i(m),t,f,n,r,o,s)}Kc(t)}return t.anchor&&i(t.anchor)}const Pm=Cm;function Kc(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}function Gc(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[qc]=s,e&&(r(o,e),r(s,e)),s}let go,Vn;function pn(e,t){e.appContext.config.performance&&ks()&&Vn.mark(`vue-${t}-${e.uid}`),g.NODE_ENV!=="production"&&jh(e,t,ks()?Vn.now():Date.now())}function hn(e,t){if(e.appContext.config.performance&&ks()){const n=`vue-${t}-${e.uid}`,r=n+":end";Vn.mark(r),Vn.measure(`<${Vs(e,e.type)}> ${t}`,n,r),Vn.clearMarks(n),Vn.clearMarks(r)}g.NODE_ENV!=="production"&&Lh(e,t,ks()?Vn.now():Date.now())}function ks(){return go!==void 0||(typeof window<"u"&&window.performance?(go=!0,Vn=window.performance):go=!1),go}function $m(){const e=[];if(g.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
9
|
+
getter: `,this.getter),li(e,2)),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function tv(t,e,n=!1){let r,s;const o=me(t);o?(r=t,s=rt.NODE_ENV!=="production"?()=>{an("Write operation failed: computed value is readonly")}:nt):(r=t.get,s=t.set);const i=new xu(r,s,o||!s,n);return rt.NODE_ENV!=="production"&&e&&!n&&(i.effect.onTrack=e.onTrack,i.effect.onTrigger=e.onTrigger),i}function ku(t){var e;Wn&&kr&&(t=Ee(t),ou(kr,(e=t.dep)!=null?e:t.dep=au(()=>t.dep=void 0,t instanceof xu?t:void 0),rt.NODE_ENV!=="production"?{target:t,type:"get",key:"value"}:void 0))}function li(t,e=4,n,r){t=Ee(t);const s=t.dep;s&&iu(s,e,rt.NODE_ENV!=="production"?{target:t,type:"set",key:"value",newValue:n,oldValue:r}:void 0)}function Qe(t){return!!(t&&t.__v_isRef===!0)}function C(t){return Ou(t,!1)}function nv(t){return Ou(t,!0)}function Ou(t,e){return Qe(t)?t:new rv(t,e)}class rv{constructor(e,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?e:Ee(e),this._value=n?e:Fs(e)}get value(){return ku(this),this._value}set value(e){const n=this.__v_isShallow||Tn(e)||Sn(e);if(e=n?e:Ee(e),qn(e,this._rawValue)){const r=this._rawValue;this._rawValue=e,this._value=n?e:Fs(e),li(this,4,e,r)}}}function b(t){return Qe(t)?t.value:t}function sv(t){return me(t)?t():b(t)}const ov={get:(t,e,n)=>b(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const s=t[e];return Qe(s)&&!Qe(n)?(s.value=n,!0):Reflect.set(t,e,n,r)}};function Nu(t){return Nn(t)?t:new Proxy(t,ov)}function Su(t){rt.NODE_ENV!=="production"&&!ai(t)&&an("toRefs() expects a reactive object but received a plain one.");const e=de(t)?new Array(t.length):{};for(const n in t)e[n]=Tu(t,n);return e}class iv{constructor(e,n,r){this._object=e,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return Dm(Ee(this._object),this._key)}}class av{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Ba(t,e,n){return Qe(t)?t:me(t)?new av(t):Be(t)&&arguments.length>1?Tu(t,e,n):C(t)}function Tu(t,e,n){const r=t[e];return Qe(r)?r:new iv(t,e,n)}var v={};const Nr=[];function ci(t){Nr.push(t)}function ui(){Nr.pop()}let Fa=!1;function U(t,...e){if(Fa)return;Fa=!0,kn();const n=Nr.length?Nr[Nr.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=lv();if(r)Cn(r,n,11,[t+e.map(o=>{var i,a;return(a=(i=o.toString)==null?void 0:i.call(o))!=null?a:JSON.stringify(o)}).join(""),n&&n.proxy,s.map(({vnode:o})=>`at <${Ci(n,o.type)}>`).join(`
|
|
10
|
+
`),s]);else{const o=[`[Vue warn]: ${t}`,...e];s.length&&o.push(`
|
|
11
|
+
`,...cv(s)),console.warn(...o)}On(),Fa=!1}function lv(){let t=Nr[Nr.length-1];if(!t)return[];const e=[];for(;t;){const n=e[0];n&&n.vnode===t?n.recurseCount++:e.push({vnode:t,recurseCount:0});const r=t.component&&t.component.parent;t=r&&r.vnode}return e}function cv(t){const e=[];return t.forEach((n,r)=>{e.push(...r===0?[]:[`
|
|
12
|
+
`],...uv(n))}),e}function uv({vnode:t,recurseCount:e}){const n=e>0?`... (${e} recursive calls)`:"",r=t.component?t.component.parent==null:!1,s=` at <${Ci(t.component,t.type,r)}`,o=">"+n;return t.props?[s,...dv(t.props),o]:[s+o]}function dv(t){const e=[],n=Object.keys(t);return n.slice(0,3).forEach(r=>{e.push(...Cu(r,t[r]))}),n.length>3&&e.push(" ..."),e}function Cu(t,e,n){return Xe(e)?(e=JSON.stringify(e),n?e:[`${t}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?n?e:[`${t}=${e}`]:Qe(e)?(e=Cu(t,Ee(e.value),!0),n?e:[`${t}=Ref<`,e,">"]):me(e)?[`${t}=fn${e.name?`<${e.name}>`:""}`]:(e=Ee(e),n?e:[`${t}=`,e])}function fv(t,e){v.NODE_ENV!=="production"&&t!==void 0&&(typeof t!="number"?U(`${e} is not a valid number - got ${JSON.stringify(t)}.`):isNaN(t)&&U(`${e} is NaN - the duration expression might be incorrect.`))}const Ha={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update"};function Cn(t,e,n,r){try{return r?t(...r):t()}catch(s){Hs(s,e,n)}}function Ut(t,e,n,r){if(me(t)){const s=Cn(t,e,n,r);return s&&Ta(s)&&s.catch(o=>{Hs(o,e,n)}),s}if(de(t)){const s=[];for(let o=0;o<t.length;o++)s.push(Ut(t[o],e,n,r));return s}else v.NODE_ENV!=="production"&&U(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof t}`)}function Hs(t,e,n,r=!0){const s=e?e.vnode:null;if(e){let o=e.parent;const i=e.proxy,a=v.NODE_ENV!=="production"?Ha[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const c=o.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](t,i,a)===!1)return}o=o.parent}const l=e.appContext.config.errorHandler;if(l){kn(),Cn(l,null,10,[t,i,a]),On();return}}pv(t,n,s,r)}function pv(t,e,n,r=!0){if(v.NODE_ENV!=="production"){const s=Ha[e];if(n&&ci(n),U(`Unhandled error${s?` during execution of ${s}`:""}`),n&&ui(),r)throw t;console.error(t)}else console.error(t)}let zs=!1,za=!1;const yt=[];let un=0;const os=[];let Jn=null,Sr=0;const $u=Promise.resolve();let qa=null;const hv=100;function qs(t){const e=qa||$u;return t?e.then(this?t.bind(this):t):e}function mv(t){let e=un+1,n=yt.length;for(;e<n;){const r=e+n>>>1,s=yt[r],o=Ws(s);o<t||o===t&&s.pre?e=r+1:n=r}return e}function di(t){(!yt.length||!yt.includes(t,zs&&t.allowRecurse?un+1:un))&&(t.id==null?yt.push(t):yt.splice(mv(t.id),0,t),Pu())}function Pu(){!zs&&!za&&(za=!0,qa=$u.then(Vu))}function vv(t){const e=yt.indexOf(t);e>un&&yt.splice(e,1)}function Iu(t){de(t)?os.push(...t):(!Jn||!Jn.includes(t,t.allowRecurse?Sr+1:Sr))&&os.push(t),Pu()}function Au(t,e,n=zs?un+1:0){for(v.NODE_ENV!=="production"&&(e=e||new Map);n<yt.length;n++){const r=yt[n];if(r&&r.pre){if(t&&r.id!==t.uid||v.NODE_ENV!=="production"&&Wa(e,r))continue;yt.splice(n,1),n--,r()}}}function Du(t){if(os.length){const e=[...new Set(os)].sort((n,r)=>Ws(n)-Ws(r));if(os.length=0,Jn){Jn.push(...e);return}for(Jn=e,v.NODE_ENV!=="production"&&(t=t||new Map),Sr=0;Sr<Jn.length;Sr++){const n=Jn[Sr];v.NODE_ENV!=="production"&&Wa(t,n)||n.active!==!1&&n()}Jn=null,Sr=0}}const Ws=t=>t.id==null?1/0:t.id,gv=(t,e)=>{const n=Ws(t)-Ws(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function Vu(t){za=!1,zs=!0,v.NODE_ENV!=="production"&&(t=t||new Map),yt.sort(gv);const e=v.NODE_ENV!=="production"?n=>Wa(t,n):nt;try{for(un=0;un<yt.length;un++){const n=yt[un];if(n&&n.active!==!1){if(v.NODE_ENV!=="production"&&e(n))continue;Cn(n,n.i,n.i?15:14)}}}finally{un=0,yt.length=0,Du(t),zs=!1,qa=null,(yt.length||os.length)&&Vu(t)}}function Wa(t,e){if(!t.has(e))t.set(e,1);else{const n=t.get(e);if(n>hv){const r=e.i,s=r&&kl(r.type);return Hs(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}else t.set(e,n+1)}}let Yn=!1;const fi=new Map;v.NODE_ENV!=="production"&&(Pa().__VUE_HMR_RUNTIME__={createRecord:Ka(Ru),rerender:Ka(bv),reload:Ka(wv)});const Tr=new Map;function yv(t){const e=t.type.__hmrId;let n=Tr.get(e);n||(Ru(e,t.type),n=Tr.get(e)),n.instances.add(t)}function _v(t){Tr.get(t.type.__hmrId).instances.delete(t)}function Ru(t,e){return Tr.has(t)?!1:(Tr.set(t,{initialDef:pi(e),instances:new Set}),!0)}function pi(t){return Ld(t)?t.__vccOpts:t}function bv(t,e){const n=Tr.get(t);n&&(n.initialDef.render=e,[...n.instances].forEach(r=>{e&&(r.render=e,pi(r.type).render=e),r.renderCache=[],Yn=!0,r.effect.dirty=!0,r.update(),Yn=!1}))}function wv(t,e){const n=Tr.get(t);if(!n)return;e=pi(e),ju(n.initialDef,e);const r=[...n.instances];for(let s=0;s<r.length;s++){const o=r[s],i=pi(o.type);let a=fi.get(i);a||(i!==n.initialDef&&ju(i,e),fi.set(i,a=new Set)),a.add(o),o.appContext.propsCache.delete(o.type),o.appContext.emitsCache.delete(o.type),o.appContext.optionsCache.delete(o.type),o.ceReload?(a.add(o),o.ceReload(e.styles),a.delete(o)):o.parent?(o.parent.effect.dirty=!0,di(()=>{o.parent.update(),a.delete(o)})):o.appContext.reload?o.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}Iu(()=>{fi.clear()})}function ju(t,e){tt(t,e);for(const n in t)n!=="__file"&&!(n in e)&&delete t[n]}function Ka(t){return(e,n)=>{try{return t(e,n)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let dn,Ks=[],Ga=!1;function Gs(t,...e){dn?dn.emit(t,...e):Ga||Ks.push({event:t,args:e})}function Lu(t,e){var n,r;dn=t,dn?(dn.enabled=!0,Ks.forEach(({event:s,args:o})=>dn.emit(s,...o)),Ks=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{Lu(o,e)}),setTimeout(()=>{dn||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ga=!0,Ks=[])},3e3)):(Ga=!0,Ks=[])}function Ev(t,e){Gs("app:init",t,e,{Fragment:Re,Text:to,Comment:st,Static:no})}function xv(t){Gs("app:unmount",t)}const kv=Ja("component:added"),Mu=Ja("component:updated"),Ov=Ja("component:removed"),Nv=t=>{dn&&typeof dn.cleanupBuffer=="function"&&!dn.cleanupBuffer(t)&&Ov(t)};/*! #__NO_SIDE_EFFECTS__ */function Ja(t){return e=>{Gs(t,e.appContext.app,e.uid,e.parent?e.parent.uid:void 0,e)}}const Sv=Uu("perf:start"),Tv=Uu("perf:end");function Uu(t){return(e,n,r)=>{Gs(t,e.appContext.app,e.uid,e,n,r)}}function Cv(t,e,n){Gs("component:emit",t.appContext.app,t,e,n)}let at=null,hi=null;function mi(t){const e=at;return at=t,hi=t&&t.type.__scopeId||null,e}function $v(t){hi=t}function Pv(){hi=null}function ke(t,e=at,n){if(!e||t._n)return t;const r=(...s)=>{r._d&&Td(-1);const o=mi(e);let i;try{i=t(...s)}finally{mi(o),r._d&&Td(1)}return v.NODE_ENV!=="production"&&Mu(e),i};return r._n=!0,r._c=!0,r._d=!0,r}function Zu(t){mm(t)&&U("Do not use built-in directive ids as custom directive id: "+t)}function Cr(t,e,n,r){const s=t.dirs,o=e&&e.dirs;for(let i=0;i<s.length;i++){const a=s[i];o&&(a.oldValue=o[i].value);let l=a.dir[r];l&&(kn(),Ut(l,n,8,[t.el,a,t,e]),On())}}const Xn=Symbol("_leaveCb"),vi=Symbol("_enterCb");function Iv(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ze(()=>{t.isMounted=!0}),Qa(()=>{t.isUnmounting=!0}),t}const Zt=[Function,Array],Bu={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Zt,onEnter:Zt,onAfterEnter:Zt,onEnterCancelled:Zt,onBeforeLeave:Zt,onLeave:Zt,onAfterLeave:Zt,onLeaveCancelled:Zt,onBeforeAppear:Zt,onAppear:Zt,onAfterAppear:Zt,onAppearCancelled:Zt},Fu=t=>{const e=t.subTree;return e.component?Fu(e.component):e},Av={name:"BaseTransition",props:Bu,setup(t,{slots:e}){const n=Ni(),r=Iv();return()=>{const s=e.default&&qu(e.default(),!0);if(!s||!s.length)return;let o=s[0];if(s.length>1){let f=!1;for(const m of s)if(m.type!==st){if(v.NODE_ENV!=="production"&&f){U("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(o=m,f=!0,v.NODE_ENV==="production")break}}const i=Ee(t),{mode:a}=i;if(v.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&U(`invalid <transition> mode: ${a}`),r.isLeaving)return Xa(o);const l=zu(o);if(!l)return Xa(o);let c=Ya(l,i,r,n,f=>c=f);gi(l,c);const u=n.subTree,d=u&&zu(u);if(d&&d.type!==st&&!Vr(l,d)&&Fu(n).type!==st){const f=Ya(d,i,r,n);if(gi(d,f),a==="out-in"&&l.type!==st)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Xa(o);a==="in-out"&&l.type!==st&&(f.delayLeave=(m,_,E)=>{const k=Hu(r,d);k[String(d.key)]=d,m[Xn]=()=>{_(),m[Xn]=void 0,delete c.delayedLeave},c.delayedLeave=E})}return o}}};function Hu(t,e){const{leavingVNodes:n}=t;let r=n.get(e.type);return r||(r=Object.create(null),n.set(e.type,r)),r}function Ya(t,e,n,r,s){const{appear:o,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:m,onAfterLeave:_,onLeaveCancelled:E,onBeforeAppear:k,onAppear:A,onAfterAppear:B,onAppearCancelled:T}=e,J=String(t.key),P=Hu(n,t),z=(K,R)=>{K&&Ut(K,r,9,R)},N=(K,R)=>{const V=R[1];z(K,R),de(K)?K.every(I=>I.length<=1)&&V():K.length<=1&&V()},Oe={mode:i,persisted:a,beforeEnter(K){let R=l;if(!n.isMounted)if(o)R=k||l;else return;K[Xn]&&K[Xn](!0);const V=P[J];V&&Vr(t,V)&&V.el[Xn]&&V.el[Xn](),z(R,[K])},enter(K){let R=c,V=u,I=d;if(!n.isMounted)if(o)R=A||c,V=B||u,I=T||d;else return;let ce=!1;const Ze=K[vi]=w=>{ce||(ce=!0,w?z(I,[K]):z(V,[K]),Oe.delayedLeave&&Oe.delayedLeave(),K[vi]=void 0)};R?N(R,[K,Ze]):Ze()},leave(K,R){const V=String(t.key);if(K[vi]&&K[vi](!0),n.isUnmounting)return R();z(f,[K]);let I=!1;const ce=K[Xn]=Ze=>{I||(I=!0,R(),Ze?z(E,[K]):z(_,[K]),K[Xn]=void 0,P[V]===t&&delete P[V])};P[V]=t,m?N(m,[K,ce]):ce()},clone(K){const R=Ya(K,e,n,r,s);return s&&s(R),R}};return Oe}function Xa(t){if(Ys(t))return t=Wt(t),t.children=null,t}function zu(t){if(!Ys(t))return t;if(v.NODE_ENV!=="production"&&t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&me(n.default))return n.default()}}function gi(t,e){t.shapeFlag&6&&t.component?gi(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function qu(t,e=!1,n){let r=[],s=0;for(let o=0;o<t.length;o++){let i=t[o];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:o);i.type===Re?(i.patchFlag&128&&s++,r=r.concat(qu(i.children,e,a))):(e||i.type!==st)&&r.push(a!=null?Wt(i,{key:a}):i)}if(s>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function ve(t,e){return me(t)?tt({name:t.name},e,{setup:t}):t}const Js=t=>!!t.type.__asyncLoader,Ys=t=>t.type.__isKeepAlive;function Dv(t,e){Wu(t,"a",e)}function Vv(t,e){Wu(t,"da",e)}function Wu(t,e,n=ot){const r=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(yi(e,r,n),n){let s=n.parent;for(;s&&s.parent;)Ys(s.parent.vnode)&&Rv(r,e,n,s),s=s.parent}}function Rv(t,e,n,r){const s=yi(e,t,r,!0);Ot(()=>{Sa(r[e],s)},n)}function yi(t,e,n=ot,r=!1){if(n){const s=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...i)=>{kn();const a=oo(n),l=Ut(e,n,t,i);return a(),On(),l});return r?s.unshift(o):s.push(o),o}else if(v.NODE_ENV!=="production"){const s=xr(Ha[t].replace(/ hook$/,""));U(`${s} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const $n=t=>(e,n=ot)=>{(!Ti||t==="sp")&&yi(t,(...r)=>e(...r),n)},jv=$n("bm"),ze=$n("m"),Lv=$n("bu"),Mv=$n("u"),Qa=$n("bum"),Ot=$n("um"),Uv=$n("sp"),Zv=$n("rtg"),Bv=$n("rtc");function Fv(t,e=ot){yi("ec",t,e)}const Hv="components",Ku=Symbol.for("v-ndc");function el(t){return Xe(t)?zv(Hv,t,!1)||t:t||Ku}function zv(t,e,n=!0,r=!1){const s=at||ot;if(s){const o=s.type;{const a=kl(o,!1);if(a&&(a===e||a===Vt(e)||a===Er(Vt(e))))return o}const i=Gu(s[t]||o[t],e)||Gu(s.appContext[t],e);return!i&&r?o:(v.NODE_ENV!=="production"&&n&&!i&&U(`Failed to resolve ${t.slice(0,-1)}: ${e}
|
|
13
|
+
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`),i)}else v.NODE_ENV!=="production"&&U(`resolve${Er(t.slice(0,-1))} can only be used in render() or setup().`)}function Gu(t,e){return t&&(t[e]||t[Vt(e)]||t[Er(Vt(e))])}function fn(t,e,n,r){let s;const o=n;if(de(t)||Xe(t)){s=new Array(t.length);for(let i=0,a=t.length;i<a;i++)s[i]=e(t[i],i,void 0,o)}else if(typeof t=="number"){v.NODE_ENV!=="production"&&!Number.isInteger(t)&&U(`The v-for range expect an integer value but got ${t}.`),s=new Array(t);for(let i=0;i<t;i++)s[i]=e(i+1,i,void 0,o)}else if(Be(t))if(t[Symbol.iterator])s=Array.from(t,(i,a)=>e(i,a,void 0,o));else{const i=Object.keys(t);s=new Array(i.length);for(let a=0,l=i.length;a<l;a++){const c=i[a];s[a]=e(t[c],c,a,o)}}else s=[];return s}function tl(t,e,n={},r,s){if(at.isCE||at.parent&&Js(at.parent)&&at.parent.isCE)return F("slot",n,r);let o=t[e];v.NODE_ENV!=="production"&&o&&o.length>1&&(U("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),o=()=>[]),o&&o._c&&(o._d=!1),y();const i=o&&Ju(o(n)),a=Ve(Re,{key:(n.key||i&&i.key||`_${e}`)+(!i&&r?"_fb":"")},i||[],i&&t._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function Ju(t){return t.some(e=>is(e)?!(e.type===st||e.type===Re&&!Ju(e.children)):!0)?t:null}const nl=t=>t?Dd(t)?xl(t):nl(t.parent):null,$r=tt(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>v.NODE_ENV!=="production"?cn(t.props):t.props,$attrs:t=>v.NODE_ENV!=="production"?cn(t.attrs):t.attrs,$slots:t=>v.NODE_ENV!=="production"?cn(t.slots):t.slots,$refs:t=>v.NODE_ENV!=="production"?cn(t.refs):t.refs,$parent:t=>nl(t.parent),$root:t=>nl(t.root),$emit:t=>t.emit,$options:t=>il(t),$forceUpdate:t=>t.f||(t.f=()=>{t.effect.dirty=!0,di(t.update)}),$nextTick:t=>t.n||(t.n=qs.bind(t.proxy)),$watch:t=>Tg.bind(t)}),rl=t=>t==="_"||t==="$",sl=(t,e)=>t!==Ge&&!t.__isScriptSetup&&Ie(t,e),Yu={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:a,appContext:l}=t;if(v.NODE_ENV!=="production"&&e==="__isVue")return!0;let c;if(e[0]!=="$"){const m=i[e];if(m!==void 0)switch(m){case 1:return r[e];case 2:return s[e];case 4:return n[e];case 3:return o[e]}else{if(sl(r,e))return i[e]=1,r[e];if(s!==Ge&&Ie(s,e))return i[e]=2,s[e];if((c=t.propsOptions[0])&&Ie(c,e))return i[e]=3,o[e];if(n!==Ge&&Ie(n,e))return i[e]=4,n[e];ol&&(i[e]=0)}}const u=$r[e];let d,f;if(u)return e==="$attrs"?(pt(t.attrs,"get",""),v.NODE_ENV!=="production"&&ki()):v.NODE_ENV!=="production"&&e==="$slots"&&pt(t,"get",e),u(t);if((d=a.__cssModules)&&(d=d[e]))return d;if(n!==Ge&&Ie(n,e))return i[e]=4,n[e];if(f=l.config.globalProperties,Ie(f,e))return f[e];v.NODE_ENV!=="production"&&at&&(!Xe(e)||e.indexOf("__v")!==0)&&(s!==Ge&&rl(e[0])&&Ie(s,e)?U(`Property ${JSON.stringify(e)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):t===at&&U(`Property ${JSON.stringify(e)} was accessed during render but is not defined on instance.`))},set({_:t},e,n){const{data:r,setupState:s,ctx:o}=t;return sl(s,e)?(s[e]=n,!0):v.NODE_ENV!=="production"&&s.__isScriptSetup&&Ie(s,e)?(U(`Cannot mutate <script setup> binding "${e}" from Options API.`),!1):r!==Ge&&Ie(r,e)?(r[e]=n,!0):Ie(t.props,e)?(v.NODE_ENV!=="production"&&U(`Attempting to mutate prop "${e}". Props are readonly.`),!1):e[0]==="$"&&e.slice(1)in t?(v.NODE_ENV!=="production"&&U(`Attempting to mutate public property "${e}". Properties starting with $ are reserved and readonly.`),!1):(v.NODE_ENV!=="production"&&e in t.appContext.config.globalProperties?Object.defineProperty(o,e,{enumerable:!0,configurable:!0,value:n}):o[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:s,propsOptions:o}},i){let a;return!!n[i]||t!==Ge&&Ie(t,i)||sl(e,i)||(a=o[0])&&Ie(a,i)||Ie(r,i)||Ie($r,i)||Ie(s.config.globalProperties,i)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Ie(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};v.NODE_ENV!=="production"&&(Yu.ownKeys=t=>(U("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(t)));function qv(t){const e={};return Object.defineProperty(e,"_",{configurable:!0,enumerable:!1,get:()=>t}),Object.keys($r).forEach(n=>{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,get:()=>$r[n](t),set:nt})}),e}function Wv(t){const{ctx:e,propsOptions:[n]}=t;n&&Object.keys(n).forEach(r=>{Object.defineProperty(e,r,{enumerable:!0,configurable:!0,get:()=>t.props[r],set:nt})})}function Kv(t){const{ctx:e,setupState:n}=t;Object.keys(Ee(n)).forEach(r=>{if(!n.__isScriptSetup){if(rl(r[0])){U(`setup() return property ${JSON.stringify(r)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(e,r,{enumerable:!0,configurable:!0,get:()=>n[r],set:nt})}})}function Xu(t){return de(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function Gv(){const t=Object.create(null);return(e,n)=>{t[n]?U(`${e} property "${n}" is already defined in ${t[n]}.`):t[n]=e}}let ol=!0;function Jv(t){const e=il(t),n=t.proxy,r=t.ctx;ol=!1,e.beforeCreate&&Qu(e.beforeCreate,t,"bc");const{data:s,computed:o,methods:i,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:m,updated:_,activated:E,deactivated:k,beforeDestroy:A,beforeUnmount:B,destroyed:T,unmounted:J,render:P,renderTracked:z,renderTriggered:N,errorCaptured:Oe,serverPrefetch:K,expose:R,inheritAttrs:V,components:I,directives:ce,filters:Ze}=e,w=v.NODE_ENV!=="production"?Gv():null;if(v.NODE_ENV!=="production"){const[Q]=t.propsOptions;if(Q)for(const oe in Q)w("Props",oe)}if(c&&Yv(c,r,w),i)for(const Q in i){const oe=i[Q];me(oe)?(v.NODE_ENV!=="production"?Object.defineProperty(r,Q,{value:oe.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[Q]=oe.bind(n),v.NODE_ENV!=="production"&&w("Methods",Q)):v.NODE_ENV!=="production"&&U(`Method "${Q}" has type "${typeof oe}" in the component definition. Did you reference the function correctly?`)}if(s){v.NODE_ENV!=="production"&&!me(s)&&U("The data option must be a function. Plain object usage is no longer supported.");const Q=s.call(n,n);if(v.NODE_ENV!=="production"&&Ta(Q)&&U("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Be(Q))v.NODE_ENV!=="production"&&U("data() should return an object.");else if(t.data=Bs(Q),v.NODE_ENV!=="production")for(const oe in Q)w("Data",oe),rl(oe[0])||Object.defineProperty(r,oe,{configurable:!0,enumerable:!0,get:()=>Q[oe],set:nt})}if(ol=!0,o)for(const Q in o){const oe=o[Q],be=me(oe)?oe.bind(n,n):me(oe.get)?oe.get.bind(n,n):nt;v.NODE_ENV!=="production"&&be===nt&&U(`Computed property "${Q}" has no getter.`);const ae=!me(oe)&&me(oe.set)?oe.set.bind(n):v.NODE_ENV!=="production"?()=>{U(`Write operation failed: computed property "${Q}" is readonly.`)}:nt,We=ee({get:be,set:ae});Object.defineProperty(r,Q,{enumerable:!0,configurable:!0,get:()=>We.value,set:xt=>We.value=xt}),v.NODE_ENV!=="production"&&w("Computed",Q)}if(a)for(const Q in a)ed(a[Q],r,n,Q);if(l){const Q=me(l)?l.call(n):l;Reflect.ownKeys(Q).forEach(oe=>{_t(oe,Q[oe])})}u&&Qu(u,t,"c");function $(Q,oe){de(oe)?oe.forEach(be=>Q(be.bind(n))):oe&&Q(oe.bind(n))}if($(jv,d),$(ze,f),$(Lv,m),$(Mv,_),$(Dv,E),$(Vv,k),$(Fv,Oe),$(Bv,z),$(Zv,N),$(Qa,B),$(Ot,J),$(Uv,K),de(R))if(R.length){const Q=t.exposed||(t.exposed={});R.forEach(oe=>{Object.defineProperty(Q,oe,{get:()=>n[oe],set:be=>n[oe]=be})})}else t.exposed||(t.exposed={});P&&t.render===nt&&(t.render=P),V!=null&&(t.inheritAttrs=V),I&&(t.components=I),ce&&(t.directives=ce)}function Yv(t,e,n=nt){de(t)&&(t=al(t));for(const r in t){const s=t[r];let o;Be(s)?"default"in s?o=Me(s.from||r,s.default,!0):o=Me(s.from||r):o=Me(s),Qe(o)?Object.defineProperty(e,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):e[r]=o,v.NODE_ENV!=="production"&&n("Inject",r)}}function Qu(t,e,n){Ut(de(t)?t.map(r=>r.bind(e.proxy)):t.bind(e.proxy),e,n)}function ed(t,e,n,r){const s=r.includes(".")?xd(n,r):()=>n[r];if(Xe(t)){const o=e[t];me(o)?lt(s,o):v.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${t}"`,o)}else if(me(t))lt(s,t.bind(n));else if(Be(t))if(de(t))t.forEach(o=>ed(o,e,n,r));else{const o=me(t.handler)?t.handler.bind(n):e[t.handler];me(o)?lt(s,o,t):v.NODE_ENV!=="production"&&U(`Invalid watch handler specified by key "${t.handler}"`,o)}else v.NODE_ENV!=="production"&&U(`Invalid watch option: "${r}"`,t)}function il(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=t.appContext,a=o.get(e);let l;return a?l=a:!s.length&&!n&&!r?l=e:(l={},s.length&&s.forEach(c=>_i(l,c,i,!0)),_i(l,e,i)),Be(e)&&o.set(e,l),l}function _i(t,e,n,r=!1){const{mixins:s,extends:o}=e;o&&_i(t,o,n,!0),s&&s.forEach(i=>_i(t,i,n,!0));for(const i in e)if(r&&i==="expose")v.NODE_ENV!=="production"&&U('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Xv[i]||n&&n[i];t[i]=a?a(t[i],e[i]):e[i]}return t}const Xv={data:td,props:nd,emits:nd,methods:Xs,computed:Xs,beforeCreate:Nt,created:Nt,beforeMount:Nt,mounted:Nt,beforeUpdate:Nt,updated:Nt,beforeDestroy:Nt,beforeUnmount:Nt,destroyed:Nt,unmounted:Nt,activated:Nt,deactivated:Nt,errorCaptured:Nt,serverPrefetch:Nt,components:Xs,directives:Xs,watch:eg,provide:td,inject:Qv};function td(t,e){return e?t?function(){return tt(me(t)?t.call(this,this):t,me(e)?e.call(this,this):e)}:e:t}function Qv(t,e){return Xs(al(t),al(e))}function al(t){if(de(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function Nt(t,e){return t?[...new Set([].concat(t,e))]:e}function Xs(t,e){return t?tt(Object.create(null),t,e):e}function nd(t,e){return t?de(t)&&de(e)?[...new Set([...t,...e])]:tt(Object.create(null),Xu(t),Xu(e??{})):e}function eg(t,e){if(!t)return e;if(!e)return t;const n=tt(Object.create(null),t);for(const r in e)n[r]=Nt(t[r],e[r]);return n}function rd(){return{app:null,config:{isNativeTag:pm,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let tg=0;function ng(t,e){return function(r,s=null){me(r)||(r=tt({},r)),s!=null&&!Be(s)&&(v.NODE_ENV!=="production"&&U("root props passed to app.mount() must be an object."),s=null);const o=rd(),i=new WeakSet;let a=!1;const l=o.app={_uid:tg++,_component:r,_props:s,_container:null,_context:o,_instance:null,version:Md,get config(){return o.config},set config(c){v.NODE_ENV!=="production"&&U("app.config cannot be replaced. Modify individual options instead.")},use(c,...u){return i.has(c)?v.NODE_ENV!=="production"&&U("Plugin has already been applied to target app."):c&&me(c.install)?(i.add(c),c.install(l,...u)):me(c)?(i.add(c),c(l,...u)):v.NODE_ENV!=="production"&&U('A plugin must either be a function or an object with an "install" function.'),l},mixin(c){return o.mixins.includes(c)?v.NODE_ENV!=="production"&&U("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):o.mixins.push(c),l},component(c,u){return v.NODE_ENV!=="production"&&wl(c,o.config),u?(v.NODE_ENV!=="production"&&o.components[c]&&U(`Component "${c}" has already been registered in target app.`),o.components[c]=u,l):o.components[c]},directive(c,u){return v.NODE_ENV!=="production"&&Zu(c),u?(v.NODE_ENV!=="production"&&o.directives[c]&&U(`Directive "${c}" has already been registered in target app.`),o.directives[c]=u,l):o.directives[c]},mount(c,u,d){if(a)v.NODE_ENV!=="production"&&U("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{v.NODE_ENV!=="production"&&c.__vue_app__&&U("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const f=F(r,s);return f.appContext=o,d===!0?d="svg":d===!1&&(d=void 0),v.NODE_ENV!=="production"&&(o.reload=()=>{t(Wt(f),c,d)}),u&&e?e(f,c):t(f,c,d),a=!0,l._container=c,c.__vue_app__=l,v.NODE_ENV!=="production"&&(l._instance=f.component,Ev(l,Md)),xl(f.component)}},unmount(){a?(t(null,l._container),v.NODE_ENV!=="production"&&(l._instance=null,xv(l)),delete l._container.__vue_app__):v.NODE_ENV!=="production"&&U("Cannot unmount an app that is not mounted.")},provide(c,u){return v.NODE_ENV!=="production"&&c in o.provides&&U(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),o.provides[c]=u,l},runWithContext(c){const u=Pr;Pr=l;try{return c()}finally{Pr=u}}};return l}}let Pr=null;function _t(t,e){if(!ot)v.NODE_ENV!=="production"&&U("provide() can only be used inside setup().");else{let n=ot.provides;const r=ot.parent&&ot.parent.provides;r===n&&(n=ot.provides=Object.create(r)),n[t]=e}}function Me(t,e,n=!1){const r=ot||at;if(r||Pr){const s=Pr?Pr._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&t in s)return s[t];if(arguments.length>1)return n&&me(e)?e.call(r&&r.proxy):e;v.NODE_ENV!=="production"&&U(`injection "${String(t)}" not found.`)}else v.NODE_ENV!=="production"&&U("inject() can only be used inside setup() or functional components.")}function rg(){return!!(ot||at||Pr)}const sd={},od=()=>Object.create(sd),id=t=>Object.getPrototypeOf(t)===sd;function sg(t,e,n,r=!1){const s={},o=od();t.propsDefaults=Object.create(null),ad(t,e,s,o);for(const i in t.propsOptions[0])i in s||(s[i]=void 0);v.NODE_ENV!=="production"&&ud(e||{},s,t),n?t.props=r?s:Qm(s):t.type.props?t.props=s:t.props=o,t.attrs=o}function og(t){for(;t;){if(t.type.__hmrId)return!0;t=t.parent}}function ig(t,e,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=t,a=Ee(s),[l]=t.propsOptions;let c=!1;if(!(v.NODE_ENV!=="production"&&og(t))&&(r||i>0)&&!(i&16)){if(i&8){const u=t.vnode.dynamicProps;for(let d=0;d<u.length;d++){let f=u[d];if(xi(t.emitsOptions,f))continue;const m=e[f];if(l)if(Ie(o,f))m!==o[f]&&(o[f]=m,c=!0);else{const _=Vt(f);s[_]=ll(l,a,_,m,t,!1)}else m!==o[f]&&(o[f]=m,c=!0)}}}else{ad(t,e,s,o)&&(c=!0);let u;for(const d in a)(!e||!Ie(e,d)&&((u=xn(d))===d||!Ie(e,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(s[d]=ll(l,a,d,void 0,t,!0)):delete s[d]);if(o!==a)for(const d in o)(!e||!Ie(e,d))&&(delete o[d],c=!0)}c&&ln(t.attrs,"set",""),v.NODE_ENV!=="production"&&ud(e||{},s,t)}function ad(t,e,n,r){const[s,o]=t.propsOptions;let i=!1,a;if(e)for(let l in e){if(Us(l))continue;const c=e[l];let u;s&&Ie(s,u=Vt(l))?!o||!o.includes(u)?n[u]=c:(a||(a={}))[u]=c:xi(t.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,i=!0)}if(o){const l=Ee(n),c=a||Ge;for(let u=0;u<o.length;u++){const d=o[u];n[d]=ll(s,l,d,c[d],t,!Ie(c,d))}}return i}function ll(t,e,n,r,s,o){const i=t[n];if(i!=null){const a=Ie(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&me(l)){const{propsDefaults:c}=s;if(n in c)r=c[n];else{const u=oo(s);r=c[n]=l.call(null,e),u()}}else r=l}i[0]&&(o&&!a?r=!1:i[1]&&(r===""||r===xn(n))&&(r=!0))}return r}const ag=new WeakMap;function ld(t,e,n=!1){const r=n?ag:e.propsCache,s=r.get(t);if(s)return s;const o=t.props,i={},a=[];let l=!1;if(!me(t)){const u=d=>{l=!0;const[f,m]=ld(d,e,!0);tt(i,f),m&&a.push(...m)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!o&&!l)return Be(t)&&r.set(t,ss),ss;if(de(o))for(let u=0;u<o.length;u++){v.NODE_ENV!=="production"&&!Xe(o[u])&&U("props must be strings when using array syntax.",o[u]);const d=Vt(o[u]);cd(d)&&(i[d]=Ge)}else if(o){v.NODE_ENV!=="production"&&!Be(o)&&U("invalid props options",o);for(const u in o){const d=Vt(u);if(cd(d)){const f=o[u],m=i[d]=de(f)||me(f)?{type:f}:tt({},f),_=m.type;let E=!1,k=!0;if(de(_))for(let A=0;A<_.length;++A){const B=_[A],T=me(B)&&B.name;if(T==="Boolean"){E=!0;break}else T==="String"&&(k=!1)}else E=me(_)&&_.name==="Boolean";m[0]=E,m[1]=k,(E||Ie(m,"default"))&&a.push(d)}}}const c=[i,a];return Be(t)&&r.set(t,c),c}function cd(t){return t[0]!=="$"&&!Us(t)?!0:(v.NODE_ENV!=="production"&&U(`Invalid prop name: "${t}" is a reserved property.`),!1)}function lg(t){return t===null?"null":typeof t=="function"?t.name||"":typeof t=="object"&&t.constructor&&t.constructor.name||""}function ud(t,e,n){const r=Ee(e),s=n.propsOptions[0];for(const o in s){let i=s[o];i!=null&&cg(o,r[o],i,v.NODE_ENV!=="production"?cn(r):r,!Ie(t,o)&&!Ie(t,xn(o)))}}function cg(t,e,n,r,s){const{type:o,required:i,validator:a,skipCheck:l}=n;if(i&&s){U('Missing required prop: "'+t+'"');return}if(!(e==null&&!i)){if(o!=null&&o!==!0&&!l){let c=!1;const u=de(o)?o:[o],d=[];for(let f=0;f<u.length&&!c;f++){const{valid:m,expectedType:_}=dg(e,u[f]);d.push(_||""),c=m}if(!c){U(fg(t,e,d));return}}a&&!a(e,r)&&U('Invalid prop: custom validator check failed for prop "'+t+'".')}}const ug=En("String,Number,Boolean,Function,Symbol,BigInt");function dg(t,e){let n;const r=lg(e);if(ug(r)){const s=typeof t;n=s===r.toLowerCase(),!n&&s==="object"&&(n=t instanceof e)}else r==="Object"?n=Be(t):r==="Array"?n=de(t):r==="null"?n=t===null:n=t instanceof e;return{valid:n,expectedType:r}}function fg(t,e,n){if(n.length===0)return`Prop type [] for prop "${t}" won't match anything. Did you mean to use type Array instead?`;let r=`Invalid prop: type check failed for prop "${t}". Expected ${n.map(Er).join(" | ")}`;const s=n[0],o=Ca(e),i=dd(e,s),a=dd(e,o);return n.length===1&&fd(s)&&!pg(s,o)&&(r+=` with value ${i}`),r+=`, got ${o} `,fd(o)&&(r+=`with value ${a}.`),r}function dd(t,e){return e==="String"?`"${t}"`:e==="Number"?`${Number(t)}`:`${t}`}function fd(t){return["string","number","boolean"].some(n=>t.toLowerCase()===n)}function pg(...t){return t.some(e=>e.toLowerCase()==="boolean")}const pd=t=>t[0]==="_"||t==="$stable",cl=t=>de(t)?t.map(Kt):[Kt(t)],hg=(t,e,n)=>{if(e._n)return e;const r=ke((...s)=>(v.NODE_ENV!=="production"&&ot&&(!n||n.root===ot.root)&&U(`Slot "${t}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),cl(e(...s))),n);return r._c=!1,r},hd=(t,e,n)=>{const r=t._ctx;for(const s in t){if(pd(s))continue;const o=t[s];if(me(o))e[s]=hg(s,o,r);else if(o!=null){v.NODE_ENV!=="production"&&U(`Non-function value encountered for slot "${s}". Prefer function slots for better performance.`);const i=cl(o);e[s]=()=>i}}},md=(t,e)=>{v.NODE_ENV!=="production"&&!Ys(t.vnode)&&U("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=cl(e);t.slots.default=()=>n},ul=(t,e,n)=>{for(const r in e)(n||r!=="_")&&(t[r]=e[r])},mg=(t,e,n)=>{const r=t.slots=od();if(t.vnode.shapeFlag&32){const s=e._;s?(ul(r,e,n),n&&Jo(r,"_",s,!0)):hd(e,r)}else e&&md(t,e)},vg=(t,e,n)=>{const{vnode:r,slots:s}=t;let o=!0,i=Ge;if(r.shapeFlag&32){const a=e._;a?v.NODE_ENV!=="production"&&Yn?(ul(s,e,n),ln(t,"set","$slots")):n&&a===1?o=!1:ul(s,e,n):(o=!e.$stable,hd(e,s)),i=e}else e&&(md(t,e),i={default:1});if(o)for(const a in s)!pd(a)&&i[a]==null&&delete s[a]};function dl(t,e,n,r,s=!1){if(de(t)){t.forEach((f,m)=>dl(f,e&&(de(e)?e[m]:e),n,r,s));return}if(Js(r)&&!s)return;const o=r.shapeFlag&4?xl(r.component):r.el,i=s?null:o,{i:a,r:l}=t;if(v.NODE_ENV!=="production"&&!a){U("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const c=e&&e.r,u=a.refs===Ge?a.refs={}:a.refs,d=a.setupState;if(c!=null&&c!==l&&(Xe(c)?(u[c]=null,Ie(d,c)&&(d[c]=null)):Qe(c)&&(c.value=null)),me(l))Cn(l,a,12,[i,u]);else{const f=Xe(l),m=Qe(l);if(f||m){const _=()=>{if(t.f){const E=f?Ie(d,l)?d[l]:u[l]:l.value;s?de(E)&&Sa(E,o):de(E)?E.includes(o)||E.push(o):f?(u[l]=[o],Ie(d,l)&&(d[l]=u[l])):(l.value=[o],t.k&&(u[t.k]=l.value))}else f?(u[l]=i,Ie(d,l)&&(d[l]=i)):m?(l.value=i,t.k&&(u[t.k]=i)):v.NODE_ENV!=="production"&&U("Invalid template ref type:",l,`(${typeof l})`)};i?(_.id=-1,Pt(_,n)):_()}else v.NODE_ENV!=="production"&&U("Invalid template ref type:",l,`(${typeof l})`)}}const vd=Symbol("_vte"),gg=t=>t.__isTeleport,Ir=t=>t&&(t.disabled||t.disabled===""),gd=t=>typeof SVGElement<"u"&&t instanceof SVGElement,yd=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,fl=(t,e)=>{const n=t&&t.to;if(Xe(n))if(e){const r=e(n);return v.NODE_ENV!=="production"&&!r&&!Ir(t)&&U(`Failed to locate Teleport target with selector "${n}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),r}else return v.NODE_ENV!=="production"&&U("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return v.NODE_ENV!=="production"&&!n&&!Ir(t)&&U(`Invalid Teleport target: ${n}`),n},yg={name:"Teleport",__isTeleport:!0,process(t,e,n,r,s,o,i,a,l,c){const{mc:u,pc:d,pbc:f,o:{insert:m,querySelector:_,createText:E,createComment:k}}=c,A=Ir(e.props);let{shapeFlag:B,children:T,dynamicChildren:J}=e;if(v.NODE_ENV!=="production"&&Yn&&(l=!1,J=null),t==null){const P=e.el=v.NODE_ENV!=="production"?k("teleport start"):E(""),z=e.anchor=v.NODE_ENV!=="production"?k("teleport end"):E("");m(P,n,r),m(z,n,r);const N=e.target=fl(e.props,_),Oe=bd(N,e,E,m);N?i==="svg"||gd(N)?i="svg":(i==="mathml"||yd(N))&&(i="mathml"):v.NODE_ENV!=="production"&&!A&&U("Invalid Teleport target on mount:",N,`(${typeof N})`);const K=(R,V)=>{B&16&&u(T,R,V,s,o,i,a,l)};A?K(n,z):N&&K(N,Oe)}else{e.el=t.el,e.targetStart=t.targetStart;const P=e.anchor=t.anchor,z=e.target=t.target,N=e.targetAnchor=t.targetAnchor,Oe=Ir(t.props),K=Oe?n:z,R=Oe?P:N;if(i==="svg"||gd(z)?i="svg":(i==="mathml"||yd(z))&&(i="mathml"),J?(f(t.dynamicChildren,J,K,s,o,i,a),eo(t,e,!0)):l||d(t,e,K,R,s,o,i,a,!1),A)Oe?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):bi(e,n,P,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const V=e.target=fl(e.props,_);V?bi(e,V,null,c,0):v.NODE_ENV!=="production"&&U("Invalid Teleport target on update:",z,`(${typeof z})`)}else Oe&&bi(e,z,N,c,1)}_d(e)},remove(t,e,n,{um:r,o:{remove:s}},o){const{shapeFlag:i,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:f}=t;if(d&&(s(c),s(u)),o&&s(l),i&16){const m=o||!Ir(f);for(let _=0;_<a.length;_++){const E=a[_];r(E,e,n,m,!!E.dynamicChildren)}}},move:bi,hydrate:_g};function bi(t,e,n,{o:{insert:r},m:s},o=2){o===0&&r(t.targetAnchor,e,n);const{el:i,anchor:a,shapeFlag:l,children:c,props:u}=t,d=o===2;if(d&&r(i,e,n),(!d||Ir(u))&&l&16)for(let f=0;f<c.length;f++)s(c[f],e,n,2);d&&r(a,e,n)}function _g(t,e,n,r,s,o,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:c,createText:u}},d){const f=e.target=fl(e.props,l);if(f){const m=f._lpa||f.firstChild;if(e.shapeFlag&16)if(Ir(e.props))e.anchor=d(i(t),e,a(t),n,r,s,o),e.targetStart=m,e.targetAnchor=m&&i(m);else{e.anchor=i(t);let _=m;for(;_;){if(_&&_.nodeType===8){if(_.data==="teleport start anchor")e.targetStart=_;else if(_.data==="teleport anchor"){e.targetAnchor=_,f._lpa=e.targetAnchor&&i(e.targetAnchor);break}}_=i(_)}e.targetAnchor||bd(f,e,u,c),d(m&&i(m),e,f,n,r,s,o)}_d(e)}return e.anchor&&i(e.anchor)}const bg=yg;function _d(t){const e=t.ctx;if(e&&e.ut){let n=t.children[0].el;for(;n&&n!==t.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",e.uid),n=n.nextSibling;e.ut()}}function bd(t,e,n,r){const s=e.targetStart=n(""),o=e.targetAnchor=n("");return s[vd]=o,t&&(r(s,t),r(o,t)),o}let Qs,Qn;function Pn(t,e){t.appContext.config.performance&&wi()&&Qn.mark(`vue-${e}-${t.uid}`),v.NODE_ENV!=="production"&&Sv(t,e,wi()?Qn.now():Date.now())}function In(t,e){if(t.appContext.config.performance&&wi()){const n=`vue-${e}-${t.uid}`,r=n+":end";Qn.mark(r),Qn.measure(`<${Ci(t,t.type)}> ${e}`,n,r),Qn.clearMarks(n),Qn.clearMarks(r)}v.NODE_ENV!=="production"&&Tv(t,e,wi()?Qn.now():Date.now())}function wi(){return Qs!==void 0||(typeof window<"u"&&window.performance?(Qs=!0,Qn=window.performance):Qs=!1),Qs}function wg(){const t=[];if(v.NODE_ENV!=="production"&&t.length){const e=t.length>1;console.warn(`Feature flag${e?"s":""} ${t.join(", ")} ${e?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
13
14
|
|
|
14
|
-
For more details, see https://link.vuejs.org/feature-flags.`)}}const _t=Wm;function Im(e){return Dm(e)}function Dm(e,t){$m();const n=Ei();n.__VUE__=!0,g.NODE_ENV!=="production"&&pc(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:m=We,insertStaticContent:y}=e,E=(p,h,k,L=null,D=null,M=null,J=void 0,q=null,W=g.NODE_ENV!=="production"&&Dn?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!hr(p,h)&&(L=si(p),wt(p,D,M,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:R,ref:Q,shapeFlag:le}=h;switch(R){case _o:S(p,h,k,L);break;case Ke:A(p,h,k,L);break;case bo:p==null?F(h,k,L,J):g.NODE_ENV!=="production"&&C(p,h,k,J);break;case Ce:oe(p,h,k,L,D,M,J,q,W);break;default:le&1?Z(p,h,k,L,D,M,J,q,W):le&6?w(p,h,k,L,D,M,J,q,W):le&64||le&128?R.process(p,h,k,L,D,M,J,q,W,jo):g.NODE_ENV!=="production"&&U("Invalid VNode type:",R,`(${typeof R})`)}Q!=null&&D&&na(Q,p&&p.ref,M,h||p,!h)},S=(p,h,k,L)=>{if(p==null)r(h.el=a(h.children),k,L);else{const D=h.el=p.el;h.children!==p.children&&c(D,h.children)}},A=(p,h,k,L)=>{p==null?r(h.el=l(h.children||""),k,L):h.el=p.el},F=(p,h,k,L)=>{[p.el,p.anchor]=y(p.children,h,k,L,p.el,p.anchor)},C=(p,h,k,L)=>{if(h.children!==p.children){const D=f(p.anchor);$(p),[h.el,h.anchor]=y(h.children,k,D,L)}else h.el=p.el,h.anchor=p.anchor},z=({el:p,anchor:h},k,L)=>{let D;for(;p&&p!==h;)D=f(p),r(p,k,L),p=D;r(h,k,L)},$=({el:p,anchor:h})=>{let k;for(;p&&p!==h;)k=f(p),o(p),p=k;o(h)},Z=(p,h,k,L,D,M,J,q,W)=>{h.type==="svg"?J="svg":h.type==="math"&&(J="mathml"),p==null?x(h,k,L,D,M,J,q,W):V(p,h,D,M,J,q,W)},x=(p,h,k,L,D,M,J,q)=>{let W,R;const{props:Q,shapeFlag:le,transition:se,dirs:we}=p;if(W=p.el=i(p.type,M,Q&&Q.is,Q),le&8?u(W,p.children):le&16&&Y(p.children,W,null,L,D,oa(p,M),J,q),we&&lr(p,null,L,"created"),fe(W,p,p.scopeId,J,L),Q){for(const Fe in Q)Fe!=="value"&&!ro(Fe)&&s(W,Fe,null,Q[Fe],M,L);"value"in Q&&s(W,"value",null,Q.value,M),(R=Q.onVnodeBeforeMount)&&Jt(R,L,p)}g.NODE_ENV!=="production"&&(ns(W,"__vnode",p,!0),ns(W,"__vueParentComponent",L,!0)),we&&lr(p,null,L,"beforeMount");const xe=Am(D,se);xe&&se.beforeEnter(W),r(W,h,k),((R=Q&&Q.onVnodeMounted)||xe||we)&&_t(()=>{R&&Jt(R,L,p),xe&&se.enter(W),we&&lr(p,null,L,"mounted")},D)},fe=(p,h,k,L,D)=>{if(k&&m(p,k),L)for(let M=0;M<L.length;M++)m(p,L[M]);if(D){let M=D.subTree;if(g.NODE_ENV!=="production"&&M.patchFlag>0&&M.patchFlag&2048&&(M=la(M.children)||M),h===M){const J=D.vnode;fe(p,J,J.scopeId,J.slotScopeIds,D.parent)}}},Y=(p,h,k,L,D,M,J,q,W=0)=>{for(let R=W;R<p.length;R++){const Q=p[R]=q?Rn(p[R]):jt(p[R]);E(null,Q,h,k,L,D,M,J,q)}},V=(p,h,k,L,D,M,J)=>{const q=h.el=p.el;g.NODE_ENV!=="production"&&(q.__vnode=h);let{patchFlag:W,dynamicChildren:R,dirs:Q}=h;W|=p.patchFlag&16;const le=p.props||Me,se=h.props||Me;let we;if(k&&fr(k,!1),(we=se.onVnodeBeforeUpdate)&&Jt(we,k,h,p),Q&&lr(h,p,k,"beforeUpdate"),k&&fr(k,!0),g.NODE_ENV!=="production"&&Dn&&(W=0,J=!1,R=null),(le.innerHTML&&se.innerHTML==null||le.textContent&&se.textContent==null)&&u(q,""),R?(P(p.dynamicChildren,R,q,k,L,oa(h,D),M),g.NODE_ENV!=="production"&&yo(p,h)):J||ce(p,h,q,null,k,L,oa(h,D),M,!1),W>0){if(W&16)j(q,le,se,k,D);else if(W&2&&le.class!==se.class&&s(q,"class",null,se.class,D),W&4&&s(q,"style",le.style,se.style,D),W&8){const xe=h.dynamicProps;for(let Fe=0;Fe<xe.length;Fe++){const Ve=xe[Fe],rt=le[Ve],Mt=se[Ve];(Mt!==rt||Ve==="value")&&s(q,Ve,rt,Mt,D,k)}}W&1&&p.children!==h.children&&u(q,h.children)}else!J&&R==null&&j(q,le,se,k,D);((we=se.onVnodeUpdated)||Q)&&_t(()=>{we&&Jt(we,k,h,p),Q&&lr(h,p,k,"updated")},L)},P=(p,h,k,L,D,M,J)=>{for(let q=0;q<h.length;q++){const W=p[q],R=h[q],Q=W.el&&(W.type===Ce||!hr(W,R)||W.shapeFlag&70)?d(W.el):k;E(W,R,Q,null,L,D,M,J,!0)}},j=(p,h,k,L,D)=>{if(h!==k){if(h!==Me)for(const M in h)!ro(M)&&!(M in k)&&s(p,M,h[M],null,D,L);for(const M in k){if(ro(M))continue;const J=k[M],q=h[M];J!==q&&M!=="value"&&s(p,M,q,J,D,L)}"value"in k&&s(p,"value",h.value,k.value,D)}},oe=(p,h,k,L,D,M,J,q,W)=>{const R=h.el=p?p.el:a(""),Q=h.anchor=p?p.anchor:a("");let{patchFlag:le,dynamicChildren:se,slotScopeIds:we}=h;g.NODE_ENV!=="production"&&(Dn||le&2048)&&(le=0,W=!1,se=null),we&&(q=q?q.concat(we):we),p==null?(r(R,k,L),r(Q,k,L),Y(h.children||[],k,Q,D,M,J,q,W)):le>0&&le&64&&se&&p.dynamicChildren?(P(p.dynamicChildren,se,k,D,M,J,q),g.NODE_ENV!=="production"?yo(p,h):(h.key!=null||D&&h===D.subTree)&&yo(p,h,!0)):ce(p,h,k,Q,D,M,J,q,W)},w=(p,h,k,L,D,M,J,q,W)=>{h.slotScopeIds=q,p==null?h.shapeFlag&512?D.ctx.activate(h,k,L,J,W):I(h,k,L,D,M,J,W):ne(p,h,W)},I=(p,h,k,L,D,M,J)=>{const q=p.component=Qm(p,L,D);if(g.NODE_ENV!=="production"&&q.type.__hmrId&&Ch(q),g.NODE_ENV!=="production"&&(ms(p),pn(q,"mount")),mo(p)&&(q.ctx.renderer=jo),g.NODE_ENV!=="production"&&pn(q,"init"),tv(q,!1,J),g.NODE_ENV!=="production"&&hn(q,"init"),q.asyncDep){if(D&&D.registerDep(q,ae,J),!p.el){const W=q.subTree=B(Ke);A(null,W,h,k)}}else ae(q,p,h,k,D,M,J);g.NODE_ENV!=="production"&&(vs(),hn(q,"mount"))},ne=(p,h,k)=>{const L=h.component=p.component;if(Hm(p,h,k))if(L.asyncDep&&!L.asyncResolved){g.NODE_ENV!=="production"&&ms(h),re(L,h,k),g.NODE_ENV!=="production"&&vs();return}else L.next=h,xh(L.update),L.effect.dirty=!0,L.update();else h.el=p.el,L.vnode=h},ae=(p,h,k,L,D,M,J)=>{const q=()=>{if(p.isMounted){let{next:Q,bu:le,u:se,parent:we,vnode:xe}=p;{const Lr=Jc(p);if(Lr){Q&&(Q.el=xe.el,re(p,Q,J)),Lr.asyncDep.then(()=>{p.isUnmounted||q()});return}}let Fe=Q,Ve;g.NODE_ENV!=="production"&&ms(Q||p.vnode),fr(p,!1),Q?(Q.el=xe.el,re(p,Q,J)):Q=xe,le&&oo(le),(Ve=Q.props&&Q.props.onVnodeBeforeUpdate)&&Jt(Ve,we,Q,xe),fr(p,!0),g.NODE_ENV!=="production"&&pn(p,"render");const rt=aa(p);g.NODE_ENV!=="production"&&hn(p,"render");const Mt=p.subTree;p.subTree=rt,g.NODE_ENV!=="production"&&pn(p,"patch"),E(Mt,rt,d(Mt.el),si(Mt),p,D,M),g.NODE_ENV!=="production"&&hn(p,"patch"),Q.el=rt.el,Fe===null&&Zm(p,rt.el),se&&_t(se,D),(Ve=Q.props&&Q.props.onVnodeUpdated)&&_t(()=>Jt(Ve,we,Q,xe),D),g.NODE_ENV!=="production"&&hc(p),g.NODE_ENV!=="production"&&vs()}else{let Q;const{el:le,props:se}=h,{bm:we,m:xe,parent:Fe}=p,Ve=ho(h);if(fr(p,!1),we&&oo(we),!Ve&&(Q=se&&se.onVnodeBeforeMount)&&Jt(Q,Fe,h),fr(p,!0),le&&zd){const rt=()=>{g.NODE_ENV!=="production"&&pn(p,"render"),p.subTree=aa(p),g.NODE_ENV!=="production"&&hn(p,"render"),g.NODE_ENV!=="production"&&pn(p,"hydrate"),zd(le,p.subTree,p,D,null),g.NODE_ENV!=="production"&&hn(p,"hydrate")};Ve?h.type.__asyncLoader().then(()=>!p.isUnmounted&&rt()):rt()}else{g.NODE_ENV!=="production"&&pn(p,"render");const rt=p.subTree=aa(p);g.NODE_ENV!=="production"&&hn(p,"render"),g.NODE_ENV!=="production"&&pn(p,"patch"),E(null,rt,k,L,p,D,M),g.NODE_ENV!=="production"&&hn(p,"patch"),h.el=rt.el}if(xe&&_t(xe,D),!Ve&&(Q=se&&se.onVnodeMounted)){const rt=h;_t(()=>Jt(Q,Fe,rt),D)}(h.shapeFlag&256||Fe&&ho(Fe.vnode)&&Fe.vnode.shapeFlag&256)&&p.a&&_t(p.a,D),p.isMounted=!0,g.NODE_ENV!=="production"&&Ah(p),h=k=L=null}},W=p.effect=new Si(q,We,()=>gs(R),p.scope),R=p.update=()=>{W.dirty&&W.run()};R.i=p,R.id=p.uid,fr(p,!0),g.NODE_ENV!=="production"&&(W.onTrack=p.rtc?Q=>oo(p.rtc,Q):void 0,W.onTrigger=p.rtg?Q=>oo(p.rtg,Q):void 0),R()},re=(p,h,k)=>{h.component=p;const L=p.vnode.props;p.vnode=h,p.next=null,vm(p,h.props,L,k),xm(p,h.children,k),sn(),lc(p),an()},ce=(p,h,k,L,D,M,J,q,W=!1)=>{const R=p&&p.children,Q=p?p.shapeFlag:0,le=h.children,{patchFlag:se,shapeFlag:we}=h;if(se>0){if(se&128){je(R,le,k,L,D,M,J,q,W);return}else if(se&256){Ie(R,le,k,L,D,M,J,q,W);return}}we&8?(Q&16&&Ro(R,D,M),le!==R&&u(k,le)):Q&16?we&16?je(R,le,k,L,D,M,J,q,W):Ro(R,D,M,!0):(Q&8&&u(k,""),we&16&&Y(le,k,L,D,M,J,q,W))},Ie=(p,h,k,L,D,M,J,q,W)=>{p=p||$r,h=h||$r;const R=p.length,Q=h.length,le=Math.min(R,Q);let se;for(se=0;se<le;se++){const we=h[se]=W?Rn(h[se]):jt(h[se]);E(p[se],we,k,null,D,M,J,q,W)}R>Q?Ro(p,D,M,!0,!1,le):Y(h,k,L,D,M,J,q,W,le)},je=(p,h,k,L,D,M,J,q,W)=>{let R=0;const Q=h.length;let le=p.length-1,se=Q-1;for(;R<=le&&R<=se;){const we=p[R],xe=h[R]=W?Rn(h[R]):jt(h[R]);if(hr(we,xe))E(we,xe,k,null,D,M,J,q,W);else break;R++}for(;R<=le&&R<=se;){const we=p[le],xe=h[se]=W?Rn(h[se]):jt(h[se]);if(hr(we,xe))E(we,xe,k,null,D,M,J,q,W);else break;le--,se--}if(R>le){if(R<=se){const we=se+1,xe=we<Q?h[we].el:L;for(;R<=se;)E(null,h[R]=W?Rn(h[R]):jt(h[R]),k,xe,D,M,J,q,W),R++}}else if(R>se)for(;R<=le;)wt(p[R],D,M,!0),R++;else{const we=R,xe=R,Fe=new Map;for(R=xe;R<=se;R++){const yt=h[R]=W?Rn(h[R]):jt(h[R]);yt.key!=null&&(g.NODE_ENV!=="production"&&Fe.has(yt.key)&&U("Duplicate keys found during update:",JSON.stringify(yt.key),"Make sure keys are unique."),Fe.set(yt.key,R))}let Ve,rt=0;const Mt=se-xe+1;let Lr=!1,Kd=0;const Lo=new Array(Mt);for(R=0;R<Mt;R++)Lo[R]=0;for(R=we;R<=le;R++){const yt=p[R];if(rt>=Mt){wt(yt,D,M,!0);continue}let en;if(yt.key!=null)en=Fe.get(yt.key);else for(Ve=xe;Ve<=se;Ve++)if(Lo[Ve-xe]===0&&hr(yt,h[Ve])){en=Ve;break}en===void 0?wt(yt,D,M,!0):(Lo[en-xe]=R+1,en>=Kd?Kd=en:Lr=!0,E(yt,h[en],k,null,D,M,J,q,W),rt++)}const Gd=Lr?Vm(Lo):$r;for(Ve=Gd.length-1,R=Mt-1;R>=0;R--){const yt=xe+R,en=h[yt],Jd=yt+1<Q?h[yt+1].el:L;Lo[R]===0?E(null,en,k,Jd,D,M,J,q,W):Lr&&(Ve<0||R!==Gd[Ve]?nt(en,k,Jd,2):Ve--)}}},nt=(p,h,k,L,D=null)=>{const{el:M,type:J,transition:q,children:W,shapeFlag:R}=p;if(R&6){nt(p.component.subTree,h,k,L);return}if(R&128){p.suspense.move(h,k,L);return}if(R&64){J.move(p,h,k,jo);return}if(J===Ce){r(M,h,k);for(let le=0;le<W.length;le++)nt(W[le],h,k,L);r(p.anchor,h,k);return}if(J===bo){z(p,h,k);return}if(L!==2&&R&1&&q)if(L===0)q.beforeEnter(M),r(M,h,k),_t(()=>q.enter(M),D);else{const{leave:le,delayLeave:se,afterLeave:we}=q,xe=()=>r(M,h,k),Fe=()=>{le(M,()=>{xe(),we&&we()})};se?se(M,xe,Fe):Fe()}else r(M,h,k)},wt=(p,h,k,L=!1,D=!1)=>{const{type:M,props:J,ref:q,children:W,dynamicChildren:R,shapeFlag:Q,patchFlag:le,dirs:se,cacheIndex:we}=p;if(le===-2&&(D=!1),q!=null&&na(q,null,k,p,!0),we!=null&&(h.renderCache[we]=void 0),Q&256){h.ctx.deactivate(p);return}const xe=Q&1&&se,Fe=!ho(p);let Ve;if(Fe&&(Ve=J&&J.onVnodeBeforeUnmount)&&Jt(Ve,h,p),Q&6)Sw(p.component,k,L);else{if(Q&128){p.suspense.unmount(k,L);return}xe&&lr(p,null,h,"beforeUnmount"),Q&64?p.type.remove(p,h,k,jo,L):R&&!R.hasOnce&&(M!==Ce||le>0&&le&64)?Ro(R,h,k,!1,!0):(M===Ce&&le&384||!D&&Q&16)&&Ro(W,h,k),L&&bn(p)}(Fe&&(Ve=J&&J.onVnodeUnmounted)||xe)&&_t(()=>{Ve&&Jt(Ve,h,p),xe&&lr(p,null,h,"unmounted")},k)},bn=p=>{const{type:h,el:k,anchor:L,transition:D}=p;if(h===Ce){g.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&D&&!D.persisted?p.children.forEach(J=>{J.type===Ke?o(J.el):bn(J)}):Gn(k,L);return}if(h===bo){$(p);return}const M=()=>{o(k),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(p.shapeFlag&1&&D&&!D.persisted){const{leave:J,delayLeave:q}=D,W=()=>J(k,M);q?q(p.el,M,W):W()}else M()},Gn=(p,h)=>{let k;for(;p!==h;)k=f(p),o(p),p=k;o(h)},Sw=(p,h,k)=>{g.NODE_ENV!=="production"&&p.type.__hmrId&&Th(p);const{bum:L,scope:D,update:M,subTree:J,um:q,m:W,a:R}=p;Yc(W),Yc(R),L&&oo(L),D.stop(),M&&(M.active=!1,wt(J,p,h,k)),q&&_t(q,h),_t(()=>{p.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve()),g.NODE_ENV!=="production"&&Rh(p)},Ro=(p,h,k,L=!1,D=!1,M=0)=>{for(let J=M;J<p.length;J++)wt(p[J],h,k,L,D)},si=p=>{if(p.shapeFlag&6)return si(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),k=h&&h[qc];return k?f(k):h};let za=!1;const qd=(p,h,k)=>{p==null?h._vnode&&wt(h._vnode,null,null,!0):E(h._vnode||null,p,h,null,null,null,k),h._vnode=p,za||(za=!0,lc(),cc(),za=!1)},jo={p:E,um:wt,m:nt,r:bn,mt:I,mc:Y,pc:ce,pbc:P,n:si,o:e};let Wd,zd;return{render:qd,hydrate:Wd,createApp:fm(qd,Wd)}}function oa({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function fr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Am(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function yo(e,t,n=!1){const r=e.children,o=t.children;if(ie(r)&&ie(o))for(let s=0;s<r.length;s++){const i=r[s];let a=o[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[s]=Rn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&yo(i,a)),a.type===_o&&(a.el=i.el),g.NODE_ENV!=="production"&&a.type===Ke&&!a.el&&(a.el=i.el)}}function Vm(e){const t=e.slice(),n=[0];let r,o,s,i,a;const l=e.length;for(r=0;r<l;r++){const c=e[r];if(c!==0){if(o=n[n.length-1],e[o]<c){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<c?s=a+1:i=a;c<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function Jc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Jc(t)}function Yc(e){if(e)for(let t=0;t<e.length;t++)e[t].active=!1}const Rm=Symbol.for("v-scx"),jm=()=>{{const e=$e(Rm);return e||g.NODE_ENV!=="production"&&U("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function ft(e,t){return sa(e,null,t)}const Cs={};function Xe(e,t,n){return g.NODE_ENV!=="production"&&!pe(t)&&U("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),sa(e,t,n)}function sa(e,t,{immediate:n,deep:r,flush:o,once:s,onTrack:i,onTrigger:a}=Me){if(t&&s){const x=t;t=(...fe)=>{x(...fe),Z()}}g.NODE_ENV!=="production"&&r!==void 0&&typeof r=="number"&&U('watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.'),g.NODE_ENV!=="production"&&!t&&(n!==void 0&&U('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),r!==void 0&&U('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&U('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const l=x=>{U("Invalid watch source: ",x,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=Ge,u=x=>r===!0?x:pr(x,r===!1?1:void 0);let d,f=!1,m=!1;if(He(e)?(d=()=>e.value,f=un(e)):ln(e)?(d=()=>u(e),f=!0):ie(e)?(m=!0,f=e.some(x=>ln(x)||un(x)),d=()=>e.map(x=>{if(He(x))return x.value;if(ln(x))return u(x);if(pe(x))return dn(x,c,2);g.NODE_ENV!=="production"&&l(x)})):pe(e)?t?d=()=>dn(e,c,2):d=()=>(y&&y(),kt(e,c,3,[E])):(d=We,g.NODE_ENV!=="production"&&l(e)),t&&r){const x=d;d=()=>pr(x())}let y,E=x=>{y=z.onStop=()=>{dn(x,c,4),y=z.onStop=void 0}},S;if(As)if(E=We,t?n&&kt(t,c,3,[d(),m?[]:void 0,E]):d(),o==="sync"){const x=jm();S=x.__watcherHandles||(x.__watcherHandles=[])}else return We;let A=m?new Array(e.length).fill(Cs):Cs;const F=()=>{if(!(!z.active||!z.dirty))if(t){const x=z.run();(r||f||(m?x.some((fe,Y)=>Cn(fe,A[Y])):Cn(x,A)))&&(y&&y(),kt(t,c,3,[x,A===Cs?void 0:m&&A[0]===Cs?[]:A,E]),A=x)}else z.run()};F.allowRecurse=!!t;let C;o==="sync"?C=F:o==="post"?C=()=>_t(F,c&&c.suspense):(F.pre=!0,c&&(F.id=c.uid),C=()=>gs(F));const z=new Si(d,We,C),$=Tl(),Z=()=>{z.stop(),$&&yi($.effects,z)};return g.NODE_ENV!=="production"&&(z.onTrack=i,z.onTrigger=a),t?n?F():A=z.run():o==="post"?_t(z.run.bind(z),c&&c.suspense):z.run(),S&&S.push(Z),Z}function Lm(e,t,n){const r=this.proxy,o=Be(e)?e.includes(".")?Xc(r,e):()=>r[e]:e.bind(r,r);let s;pe(t)?s=t:(s=t.handler,n=t);const i=Oo(this),a=sa(o,s.bind(r),n);return i(),a}function Xc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}function pr(e,t=1/0,n){if(t<=0||!De(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,He(e))pr(e.value,t,n);else if(ie(e))for(let r=0;r<e.length;r++)pr(e[r],t,n);else if(bl(e)||er(e))e.forEach(r=>{pr(r,t,n)});else if(El(e)){for(const r in e)pr(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&pr(e[r],t,n)}return e}const Mm=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ot(t)}Modifiers`]||e[`${on(t)}Modifiers`];function Um(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Me;if(g.NODE_ENV!=="production"){const{emitsOptions:u,propsOptions:[d]}=e;if(u)if(!(t in u))(!d||!(nr(Ot(t))in d))&&U(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${nr(Ot(t))}" prop.`);else{const f=u[t];pe(f)&&(f(...n)||U(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&Mm(r,t.slice(7));if(i&&(i.trim&&(o=n.map(u=>Be(u)?u.trim():u)),i.number&&(o=n.map(Cp))),g.NODE_ENV!=="production"&&Mh(e,t,o),g.NODE_ENV!=="production"){const u=t.toLowerCase();u!==t&&r[nr(u)]&&U(`Event "${u}" is emitted in component ${Vs(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${on(t)}" instead of "${t}".`)}let a,l=r[a=nr(t)]||r[a=nr(Ot(t))];!l&&s&&(l=r[a=nr(on(t))]),l&&kt(l,e,6,o);const c=r[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,kt(c,e,6,o)}}function Qc(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let i={},a=!1;if(!pe(e)){const l=c=>{const u=Qc(c,t,!0);u&&(a=!0,qe(i,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(De(e)&&r.set(e,null),null):(ie(s)?s.forEach(l=>i[l]=null):qe(i,s),De(e)&&r.set(e,i),i)}function Ts(e,t){return!e||!no(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ne(e,t[0].toLowerCase()+t.slice(1))||Ne(e,on(t))||Ne(e,t))}let ia=!1;function Ps(){ia=!0}function aa(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:l,render:c,renderCache:u,props:d,data:f,setupState:m,ctx:y,inheritAttrs:E}=e,S=ws(e);let A,F;g.NODE_ENV!=="production"&&(ia=!1);try{if(n.shapeFlag&4){const $=o||r,Z=g.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy($,{get(x,fe,Y){return U(`Property '${String(fe)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(x,fe,Y)}}):$;A=jt(c.call(Z,$,u,g.NODE_ENV!=="production"?Wt(d):d,m,f,y)),F=a}else{const $=t;g.NODE_ENV!=="production"&&a===d&&Ps(),A=jt($.length>1?$(g.NODE_ENV!=="production"?Wt(d):d,g.NODE_ENV!=="production"?{get attrs(){return Ps(),Wt(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):$(g.NODE_ENV!=="production"?Wt(d):d,null)),F=t.props?a:Fm(a)}}catch($){wo.length=0,ao($,e,1),A=B(Ke)}let C=A,z;if(g.NODE_ENV!=="production"&&A.patchFlag>0&&A.patchFlag&2048&&([C,z]=eu(A)),F&&E!==!1){const $=Object.keys(F),{shapeFlag:Z}=C;if($.length){if(Z&7)s&&$.some(Qo)&&(F=Bm(F,s)),C=Rt(C,F,!1,!0);else if(g.NODE_ENV!=="production"&&!ia&&C.type!==Ke){const x=Object.keys(a),fe=[],Y=[];for(let V=0,P=x.length;V<P;V++){const j=x[V];no(j)?Qo(j)||fe.push(j[2].toLowerCase()+j.slice(3)):Y.push(j)}Y.length&&U(`Extraneous non-props attributes (${Y.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),fe.length&&U(`Extraneous non-emits event listeners (${fe.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(g.NODE_ENV!=="production"&&!tu(C)&&U("Runtime directive used on component with non-element root node. The directives will not function as intended."),C=Rt(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&(g.NODE_ENV!=="production"&&!tu(C)&&U("Component inside <Transition> renders non-element root node that cannot be animated."),C.transition=n.transition),g.NODE_ENV!=="production"&&z?z(C):A=C,ws(S),A}const eu=e=>{const t=e.children,n=e.dynamicChildren,r=la(t,!1);if(r){if(g.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return eu(r)}else return[e,void 0];const o=t.indexOf(r),s=n?n.indexOf(r):-1,i=a=>{t[o]=a,n&&(s>-1?n[s]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[jt(r),i]};function la(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(Dr(o)){if(o.type!==Ke||o.children==="v-if"){if(n)return;if(n=o,g.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return la(n.children)}}else return}return n}const Fm=e=>{let t;for(const n in e)(n==="class"||n==="style"||no(n))&&((t||(t={}))[n]=e[n]);return t},Bm=(e,t)=>{const n={};for(const r in e)(!Qo(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},tu=e=>e.shapeFlag&7||e.type===Ke;function Hm(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:l}=t,c=s.emitsOptions;if(g.NODE_ENV!=="production"&&(o||a)&&Dn||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?nu(r,i,c):!!i;if(l&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const f=u[d];if(i[f]!==r[f]&&!Ts(c,f))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?nu(r,i,c):!0:!!i;return!1}function nu(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const s=r[o];if(t[s]!==e[s]&&!Ts(n,s))return!0}return!1}function Zm({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const qm=e=>e.__isSuspense;function Wm(e,t){t&&t.pendingBranch?ie(e)?t.effects.push(...e):t.effects.push(e):ac(e)}const Ce=Symbol.for("v-fgt"),_o=Symbol.for("v-txt"),Ke=Symbol.for("v-cmt"),bo=Symbol.for("v-stc"),wo=[];let St=null;function _(e=!1){wo.push(St=e?null:[])}function zm(){wo.pop(),St=wo[wo.length-1]||null}let Eo=1;function ru(e){Eo+=e,e<0&&St&&(St.hasOnce=!0)}function ou(e){return e.dynamicChildren=Eo>0?St||$r:null,zm(),Eo>0&&St&&St.push(e),e}function N(e,t,n,r,o,s){return ou(O(e,t,n,r,o,s,!0))}function ke(e,t,n,r,o){return ou(B(e,t,n,r,o,!0))}function Dr(e){return e?e.__v_isVNode===!0:!1}function hr(e,t){if(g.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=ys.get(t.type);if(n&&n.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const Km=(...e)=>iu(...e),su=({key:e})=>e??null,$s=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Be(e)||He(e)||pe(e)?{i:Ye,r:e,k:t,f:!!n}:e:null);function O(e,t=null,n=null,r=0,o=null,s=e===Ce?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&su(t),ref:t&&$s(t),scopeId:bs,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ye};return a?(ca(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=Be(n)?8:16),g.NODE_ENV!=="production"&&l.key!==l.key&&U("VNode created with invalid key (NaN). VNode type:",l.type),Eo>0&&!i&&St&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&St.push(l),l}const B=g.NODE_ENV!=="production"?Km:iu;function iu(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===Oc)&&(g.NODE_ENV!=="production"&&!e&&U(`Invalid vnode type when creating vnode: ${e}.`),e=Ke),Dr(e)){const a=Rt(e,t,!0);return n&&ca(a,n),Eo>0&&!s&&St&&(a.shapeFlag&6?St[St.indexOf(e)]=a:St.push(a)),a.patchFlag=-2,a}if(pu(e)&&(e=e.__vccOpts),t){t=Gm(t);let{class:a,style:l}=t;a&&!Be(a)&&(t.class=rs(a)),De(l)&&(ps(l)&&!ie(l)&&(l=qe({},l)),t.style=Oi(l))}const i=Be(e)?1:qm(e)?128:km(e)?64:De(e)?4:pe(e)?2:0;return g.NODE_ENV!=="production"&&i&4&&ps(e)&&(e=ge(e),U("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
15
|
-
Component that was made reactive: `,e)),O(e,t,n,r,o,i,s,!0)}function Gm(e){return e?ps(e)||Vc(e)?qe({},e):e:null}function Rt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:l}=e,c=t?ua(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&su(c),ref:t&&t.ref?n&&s?ie(s)?s.concat($s(t)):[s,$s(t)]:$s(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:g.NODE_ENV!=="production"&&i===-1&&ie(a)?a.map(au):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ce?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Rt(e.ssContent),ssFallback:e.ssFallback&&Rt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Os(u,l.clone(u)),u}function au(e){const t=Rt(e);return ie(e.children)&&(t.children=e.children.map(au)),t}function Te(e=" ",t=0){return B(_o,null,e,t)}function Jm(e,t){const n=B(bo,null,e);return n.staticCount=t,n}function me(e="",t=!1){return t?(_(),ke(Ke,null,e)):B(Ke,null,e)}function jt(e){return e==null||typeof e=="boolean"?B(Ke):ie(e)?B(Ce,null,e.slice()):typeof e=="object"?Rn(e):B(_o,null,String(e))}function Rn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Rt(e)}function ca(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ie(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),ca(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Vc(t)?t._ctx=Ye:o===3&&Ye&&(Ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else pe(t)?(t={default:t,_ctx:Ye},n=32):(t=String(t),r&64?(n=16,t=[Te(t)]):n=8);e.children=t,e.shapeFlag|=n}function ua(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=rs([t.class,r.class]));else if(o==="style")t.style=Oi([t.style,r.style]);else if(no(o)){const s=t[o],i=r[o];i&&s!==i&&!(ie(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function Jt(e,t,n,r=null){kt(e,t,7,[n,r])}const Ym=Ic();let Xm=0;function Qm(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Ym,s={uid:Xm++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new kl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:jc(r,o),emitsOptions:Qc(r,o),emit:null,emitted:null,propsDefaults:Me,inheritAttrs:r.inheritAttrs,ctx:Me,data:Me,props:Me,attrs:Me,slots:Me,refs:Me,setupState:Me,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return g.NODE_ENV!=="production"?s.ctx=nm(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=Um.bind(null,s),e.ce&&e.ce(s),s}let Ge=null;const Is=()=>Ge||Ye;let Ds,da;{const e=Ei(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),s=>{o.length>1?o.forEach(i=>i(s)):o[0](s)}};Ds=t("__VUE_INSTANCE_SETTERS__",n=>Ge=n),da=t("__VUE_SSR_SETTERS__",n=>As=n)}const Oo=e=>{const t=Ge;return Ds(e),e.scope.on(),()=>{e.scope.off(),Ds(t)}},lu=()=>{Ge&&Ge.scope.off(),Ds(null)},ev=rn("slot,component");function fa(e,{isNativeTag:t}){(ev(e)||t(e))&&U("Do not use built-in or reserved HTML elements as component id: "+e)}function cu(e){return e.vnode.shapeFlag&4}let As=!1;function tv(e,t=!1,n=!1){t&&da(t);const{props:r,children:o}=e.vnode,s=cu(e);hm(e,r,s,t),Sm(e,o,n);const i=s?nv(e,t):void 0;return t&&da(!1),i}function nv(e,t){var n;const r=e.type;if(g.NODE_ENV!=="production"){if(r.name&&fa(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)fa(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)vc(s[i])}r.compilerOptions&&rv()&&U('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,xc),g.NODE_ENV!=="production"&&rm(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?sv(e):null,i=Oo(e);sn();const a=dn(o,e,0,[g.NODE_ENV!=="production"?Wt(e.props):e.props,s]);if(an(),i(),_i(a)){if(a.then(lu,lu),t)return a.then(l=>{uu(e,l,t)}).catch(l=>{ao(l,e,0)});if(e.asyncDep=a,g.NODE_ENV!=="production"&&!e.suspense){const l=(n=r.name)!=null?n:"Anonymous";U(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else uu(e,a,t)}else du(e,t)}function uu(e,t,n){pe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:De(t)?(g.NODE_ENV!=="production"&&Dr(t)&&U("setup() should not return VNodes directly - return a render function instead."),g.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=tc(t),g.NODE_ENV!=="production"&&om(e)):g.NODE_ENV!=="production"&&t!==void 0&&U(`setup() should return an object. Received: ${t===null?"null":typeof t}`),du(e,n)}let pa;const rv=()=>!pa;function du(e,t,n){const r=e.type;if(!e.render){if(!t&&pa&&!r.render){const o=r.template||Yi(e).template;if(o){g.NODE_ENV!=="production"&&pn(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,c=qe(qe({isCustomElement:s,delimiters:a},i),l);r.render=pa(o,c),g.NODE_ENV!=="production"&&hn(e,"compile")}}e.render=r.render||We}{const o=Oo(e);sn();try{im(e)}finally{an(),o()}}g.NODE_ENV!=="production"&&!r.render&&e.render===We&&!t&&(r.template?U('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):U("Component is missing template or render function: ",r))}const fu=g.NODE_ENV!=="production"?{get(e,t){return Ps(),ot(e,"get",""),e[t]},set(){return U("setupContext.attrs is readonly."),!1},deleteProperty(){return U("setupContext.attrs is readonly."),!1}}:{get(e,t){return ot(e,"get",""),e[t]}};function ov(e){return new Proxy(e.slots,{get(t,n){return ot(e,"get","$slots"),t[n]}})}function sv(e){const t=n=>{if(g.NODE_ENV!=="production"&&(e.exposed&&U("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(ie(n)?r="array":He(n)&&(r="ref")),r!=="object"&&U(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(g.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,fu))},get slots(){return r||(r=ov(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,fu),slots:e.slots,emit:e.emit,expose:t}}function ha(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tc($n(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in cr)return cr[n](e)},has(t,n){return n in t||n in cr}})):e.proxy}const iv=/(?:^|[-_])(\w)/g,av=e=>e.replace(iv,t=>t.toUpperCase()).replace(/[-_]/g,"");function ma(e,t=!0){return pe(e)?e.displayName||e.name:e.name||t&&e.__name}function Vs(e,t,n=!1){let r=ma(t);if(!r&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(r=o[1])}if(!r&&e&&e.parent){const o=s=>{for(const i in s)if(s[i]===t)return i};r=o(e.components||e.parent.type.components)||o(e.appContext.components)}return r?av(r):n?"App":"Anonymous"}function pu(e){return pe(e)&&"__vccOpts"in e}const X=(e,t)=>{const n=dh(e,t,As);if(g.NODE_ENV!=="production"){const r=Is();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Le(e,t,n){const r=arguments.length;return r===2?De(t)&&!ie(t)?Dr(t)?B(e,null,[t]):B(e,t):B(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Dr(n)&&(n=[n]),B(e,t,n))}function lv(){if(g.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},o={__vue_custom_formatter:!0,header(d){return De(d)?d.__isVue?["div",e,"VueInstance"]:He(d)?["div",{},["span",e,u(d)],"<",a(d.value),">"]:ln(d)?["div",{},["span",e,un(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${cn(d)?" (readonly)":""}`]:cn(d)?["div",{},["span",e,un(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]:null:null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...s(d.$)]}};function s(d){const f=[];d.type.props&&d.props&&f.push(i("props",ge(d.props))),d.setupState!==Me&&f.push(i("setup",d.setupState)),d.data!==Me&&f.push(i("data",ge(d.data)));const m=l(d,"computed");m&&f.push(i("computed",m));const y=l(d,"inject");return y&&f.push(i("injected",y)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=qe({},f),Object.keys(f).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(f).map(m=>["div",{},["span",r,m+": "],a(f[m],!1)])]]:["span",{}]}function a(d,f=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",n,JSON.stringify(d)]:typeof d=="boolean"?["span",r,d]:De(d)?["object",{object:f?ge(d):d}]:["span",n,String(d)]}function l(d,f){const m=d.type;if(pe(m))return;const y={};for(const E in d.ctx)c(m,E,f)&&(y[E]=d.ctx[E]);return y}function c(d,f,m){const y=d[m];if(ie(y)&&y.includes(f)||De(y)&&f in y||d.extends&&c(d.extends,f,m)||d.mixins&&d.mixins.some(E=>c(E,f,m)))return!0}function u(d){return un(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const hu="3.4.38",jn=g.NODE_ENV!=="production"?U:We;var mn={};const cv="http://www.w3.org/2000/svg",uv="http://www.w3.org/1998/Math/MathML",vn=typeof document<"u"?document:null,mu=vn&&vn.createElement("template"),dv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?vn.createElementNS(cv,e):t==="mathml"?vn.createElementNS(uv,e):n?vn.createElement(e,{is:n}):vn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>vn.createTextNode(e),createComment:e=>vn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>vn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{mu.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const a=mu.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ln="transition",No="animation",So=Symbol("_vtc"),xo=(e,{slots:t})=>Le(Hh,fv(e),t);xo.displayName="Transition";const vu={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};xo.props=qe({},gc,vu);const mr=(e,t=[])=>{ie(e)?e.forEach(n=>n(...t)):e&&e(...t)},gu=e=>e?ie(e)?e.some(t=>t.length>1):e.length>1:!1;function fv(e){const t={};for(const j in e)j in vu||(t[j]=e[j]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:c=i,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,y=pv(o),E=y&&y[0],S=y&&y[1],{onBeforeEnter:A,onEnter:F,onEnterCancelled:C,onLeave:z,onLeaveCancelled:$,onBeforeAppear:Z=A,onAppear:x=F,onAppearCancelled:fe=C}=t,Y=(j,oe,w)=>{vr(j,oe?u:a),vr(j,oe?c:i),w&&w()},V=(j,oe)=>{j._isLeaving=!1,vr(j,d),vr(j,m),vr(j,f),oe&&oe()},P=j=>(oe,w)=>{const I=j?x:F,ne=()=>Y(oe,j,w);mr(I,[oe,ne]),yu(()=>{vr(oe,j?l:s),Mn(oe,j?u:a),gu(I)||_u(oe,r,E,ne)})};return qe(t,{onBeforeEnter(j){mr(A,[j]),Mn(j,s),Mn(j,i)},onBeforeAppear(j){mr(Z,[j]),Mn(j,l),Mn(j,c)},onEnter:P(!1),onAppear:P(!0),onLeave(j,oe){j._isLeaving=!0;const w=()=>V(j,oe);Mn(j,d),Mn(j,f),vv(),yu(()=>{j._isLeaving&&(vr(j,d),Mn(j,m),gu(z)||_u(j,r,S,w))}),mr(z,[j,w])},onEnterCancelled(j){Y(j,!1),mr(C,[j])},onAppearCancelled(j){Y(j,!0),mr(fe,[j])},onLeaveCancelled(j){V(j),mr($,[j])}})}function pv(e){if(e==null)return null;if(De(e))return[va(e.enter),va(e.leave)];{const t=va(e);return[t,t]}}function va(e){const t=Tp(e);return mn.NODE_ENV!=="production"&&Eh(t,"<transition> explicit duration"),t}function Mn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[So]||(e[So]=new Set)).add(t)}function vr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[So];n&&(n.delete(t),n.size||(e[So]=void 0))}function yu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let hv=0;function _u(e,t,n,r){const o=e._endId=++hv,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:l}=mv(e,t);if(!i)return r();const c=i+"end";let u=0;const d=()=>{e.removeEventListener(c,f),s()},f=m=>{m.target===e&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),e.addEventListener(c,f)}function mv(e,t){const n=window.getComputedStyle(e),r=y=>(n[y]||"").split(", "),o=r(`${Ln}Delay`),s=r(`${Ln}Duration`),i=bu(o,s),a=r(`${No}Delay`),l=r(`${No}Duration`),c=bu(a,l);let u=null,d=0,f=0;t===Ln?i>0&&(u=Ln,d=i,f=s.length):t===No?c>0&&(u=No,d=c,f=l.length):(d=Math.max(i,c),u=d>0?i>c?Ln:No:null,f=u?u===Ln?s.length:l.length:0);const m=u===Ln&&/\b(transform|all)(,|$)/.test(r(`${Ln}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:m}}function bu(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>wu(n)+wu(e[r])))}function wu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function vv(){return document.body.offsetHeight}function gv(e,t,n){const r=e[So];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Eu=Symbol("_vod"),yv=Symbol("_vsh"),_v=Symbol(mn.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),bv=/(^|;)\s*display\s*:/;function wv(e,t,n){const r=e.style,o=Be(n);let s=!1;if(n&&!o){if(t)if(Be(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&Rs(r,a,"")}else for(const i in t)n[i]==null&&Rs(r,i,"");for(const i in n)i==="display"&&(s=!0),Rs(r,i,n[i])}else if(o){if(t!==n){const i=r[_v];i&&(n+=";"+i),r.cssText=n,s=bv.test(n)}}else t&&e.removeAttribute("style");Eu in e&&(e[Eu]=s?r.display:"",e[yv]&&(r.display="none"))}const Ev=/[^\\];\s*$/,Ou=/\s*!important$/;function Rs(e,t,n){if(ie(n))n.forEach(r=>Rs(e,t,r));else if(n==null&&(n=""),mn.NODE_ENV!=="production"&&Ev.test(n)&&jn(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=Ov(e,t);Ou.test(n)?e.setProperty(on(r),n.replace(Ou,""),"important"):e[r]=n}}const Nu=["Webkit","Moz","ms"],ga={};function Ov(e,t){const n=ga[t];if(n)return n;let r=Ot(t);if(r!=="filter"&&r in e)return ga[t]=r;r=tr(r);for(let o=0;o<Nu.length;o++){const s=Nu[o]+r;if(s in e)return ga[t]=s}return t}const Su="http://www.w3.org/1999/xlink";function xu(e,t,n,r,o,s=Up(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Su,t.slice(6,t.length)):e.setAttributeNS(Su,t,n):n==null||s&&!Nl(n)?e.removeAttribute(t):e.setAttribute(t,s?"":kn(n)?String(n):n)}function Nv(e,t,n,r){if(t==="innerHTML"||t==="textContent"){if(n==null)return;e[t]=n;return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const i=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?"":String(n);(i!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=Nl(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){mn.NODE_ENV!=="production"&&!s&&jn(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function Sv(e,t,n,r){e.addEventListener(t,n,r)}function xv(e,t,n,r){e.removeEventListener(t,n,r)}const ku=Symbol("_vei");function kv(e,t,n,r,o=null){const s=e[ku]||(e[ku]={}),i=s[t];if(r&&i)i.value=mn.NODE_ENV!=="production"?Tu(r,t):r;else{const[a,l]=Cv(t);if(r){const c=s[t]=$v(mn.NODE_ENV!=="production"?Tu(r,t):r,o);Sv(e,a,c,l)}else i&&(xv(e,a,i,l),s[t]=void 0)}}const Cu=/(?:Once|Passive|Capture)$/;function Cv(e){let t;if(Cu.test(e)){t={};let r;for(;r=e.match(Cu);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):on(e.slice(2)),t]}let ya=0;const Tv=Promise.resolve(),Pv=()=>ya||(Tv.then(()=>ya=0),ya=Date.now());function $v(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;kt(Iv(r,n.value),t,5,[r])};return n.value=e,n.attached=Pv(),n}function Tu(e,t){return pe(e)||ie(e)?e:(jn(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
|
|
16
|
-
Expected function or array of functions, received type ${typeof e}.`),We)}function Iv(e,t){if(ie(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const Pu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Dv=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?gv(e,r,i):t==="style"?wv(e,n,r):no(t)?Qo(t)||kv(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Av(e,t,r,i))?(Nv(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&xu(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),xu(e,t,r,i))};function Av(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Pu(t)&&pe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Pu(t)&&Be(n)?!1:t in e}const Vv=["ctrl","shift","alt","meta"],Rv={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Vv.some(n=>e[`${n}Key`]&&!t.includes(n))},jv=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...s)=>{for(let i=0;i<t.length;i++){const a=Rv[t[i]];if(a&&a(o,t))return}return e(o,...s)})},Lv=qe({patchProp:Dv},dv);let $u;function Mv(){return $u||($u=Im(Lv))}const Uv=(...e)=>{const t=Mv().createApp(...e);mn.NODE_ENV!=="production"&&(Bv(t),Hv(t));const{mount:n}=t;return t.mount=r=>{const o=Zv(r);if(!o)return;const s=t._component;!pe(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.innerHTML="";const i=n(o,!1,Fv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function Fv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Bv(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>jp(t)||Lp(t)||Mp(t),writable:!1})}function Hv(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){jn("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=e.config.compilerOptions,r='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(e.config,"compilerOptions",{get(){return jn(r),n},set(){jn(r)}})}}function Zv(e){if(Be(e)){const t=document.querySelector(e);return mn.NODE_ENV!=="production"&&!t&&jn(`Failed to mount app: mount target selector "${e}" returned null.`),t}return mn.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&jn('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var qv={};function Wv(){lv()}qv.NODE_ENV!=="production"&&Wv();let js;const zv=new Uint8Array(16);function Kv(){if(!js&&(js=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!js))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return js(zv)}const st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1));function Gv(e,t=0){return st[e[t+0]]+st[e[t+1]]+st[e[t+2]]+st[e[t+3]]+"-"+st[e[t+4]]+st[e[t+5]]+"-"+st[e[t+6]]+st[e[t+7]]+"-"+st[e[t+8]]+st[e[t+9]]+"-"+st[e[t+10]]+st[e[t+11]]+st[e[t+12]]+st[e[t+13]]+st[e[t+14]]+st[e[t+15]]}const Iu={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _a(e,t,n){if(Iu.randomUUID&&!t&&!e)return Iu.randomUUID();e=e||{};const r=e.random||(e.rng||Kv)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Gv(r)}var Un=Symbol("storefront");function Jv(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var Yv=v.object({source:v.literal("moonbase-checkout"),event:v.literal("close"),intent:v.string().optional()}),Xv=v.object({source:v.literal("moonbase-checkout"),event:v.literal("completed")}),Qv=v.discriminatedUnion("event",[Yv,Xv]);function Du(e){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}const t=document.createElement("iframe");t.id="moonbase-checkout",t.src=e,t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.right="0px",t.style.border="none",t.style.colorScheme="normal",t.style.backgroundColor="transparent",t.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),t.setAttribute("background","transparent"),t.setAttribute("frameborder","0"),t.setAttribute("allowtransparency","true"),t.height="100%",t.width="100%",document.body.append(t),document.documentElement.style.overflow="hidden",window.onmessage=function(n){var r;try{const o=Qv.parse(n.data);o.event==="close"&&(document.body.contains(t)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(t)),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:o}))),o.event==="completed"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:o}))}catch(o){((r=n.data)==null?void 0:r.source)==="moonbase-checkout"&&console.error("Could not parse event:",n.data,o)}}}var Ls=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=X(()=>!!this.utm.value&&Object.values(this.utm.value).some(l=>!!l)),this.currentUser=T(null),this.loadedUser=T(!1),this.debouncedPushOrderContent=Jv(l=>this.client.orders.pushContent(l,void 0,this.hasUtm.value?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=T({id:_a(),status:eo.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1),this.utm=r(`${lt.storefrontKey}_utm`,void 0);return}const s=new URLSearchParams(window.location.search);this.utm=r(`${lt.storefrontKey}_utm`,{referrer:((o=window.document.referrer)==null?void 0:o.replace(/https?:\/\//g,"").split("/")[0])||void 0,source:s.get("utm_source")||void 0,medium:s.get("utm_medium")||void 0,campaign:s.get("utm_campaign")||void 0,term:s.get("utm_term")||void 0,content:s.get("utm_content")||void 0}),window.addEventListener("storage",l=>this.handleStorageUpdate(l));const i=localStorage.getItem(lt.sessionKey);i?(this.currentOrder=T(JSON.parse(i)),this.refreshOrder()):this.currentOrder=T({id:_a(),status:eo.Open,currency:"",items:[],couponsApplied:[]});const a=localStorage.getItem(lt.storefrontKey);if(a?(this.storefront=r(lt.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!0)):(this.storefront=r(lt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${lt.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const l=new URLSearchParams(window.location.search),c=l.get("mb_intent"),u=l.get("mb_endpoint");if(c==="checkout"&&l.get("mb_complete")&&u){const d=Object.fromEntries([...l.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(u));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);Du(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(t=>{Xe(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get loadedUserPromise(){return new Promise(t=>{Xe(this.loadedUser,n=>{n&&t()},{immediate:!0})})}onCheckoutCompleted(t){window.addEventListener("moonbase-checkout-completed",()=>t())}onCheckoutClosed(t){window.addEventListener("moonbase-checkout-closed",n=>t(n.detail.intent))}install(t){t.provide(Un,this),console.log("Moonbase.sh storefront installed, learn more at https://moonbase.sh/docs")}async updateUser(){try{this.currentUser.value=await this.client.identity.get()}catch(t){t instanceof pi||console.error("Could not load user",t)}finally{this.loadedUser.value=!0}}async updateStorefront(){const t=await this.client.storefront.get(this.hasUtm.value?this.utm.value:void 0);t&&(typeof window<"u"&&localStorage.setItem(lt.storefrontKey,JSON.stringify(t)),this.storefront.value=t,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=t.suggestedCurrency))}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(t){switch(t.key){case lt.sessionKey:this.currentOrder.value=JSON.parse(t.newValue);break;case lt.storefrontKey:this.storefront.value=JSON.parse(t.newValue);break}}async refreshOrder(){try{const t=await this.client.orders.get(this.currentOrder.value.id);t&&(t.status!==eo.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(lt.sessionKey,JSON.stringify(t)),this.currentOrder.value=t))}catch(t){t!=null&&this.resetOrder()}}resetOrder(){var t;this.currentOrder.value={id:_a(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:eo.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}};Ls.userKey="moonbase_user",Ls.sessionKey="moonbase_session",Ls.storefrontKey="moonbase_storefront";var eg=Ls;function Au(e,t){const n=t??$e(Un);if(!n)throw new Error("No storefront configured");return X(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function Vu(e,t){const n=t??$e(Un);if(!n)throw new Error("No storefront configured");return X(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function Ms(e){const t=$e(Un);if(!t)throw new Error("No storefront configured");return{getLicenses:async n=>t.client.inventory.licenses.get(n),getLicenseActivations:async(n,r)=>t.client.inventory.licenses.getActivations(n,r),getProduct:async(n,r)=>t.client.inventory.products.get(n,r),getProducts:async n=>t.client.inventory.products.getOwned(n),getProductLicenses:async(n,r)=>t.client.inventory.products.getLicenses(n,r),getProductActivations:async(n,r)=>t.client.inventory.products.getActivations(n,r),revokeActivation:async n=>t.client.inventory.licenses.revokeActivation(n.licenseId,n.id),activateProduct:async(n,r)=>t.client.inventory.activation.activate(n,r),downloadProduct:async n=>{if(!n.path)throw new Error("Product is not downloadable");window.location.href=await t.client.inventory.products.getDownloadUrl(n.path)}}}function tg(e,t){const n=$e(Un),r=hh(e);if(!r)throw new Error("No request ID was given when calling `useActivationRequest`");if(!n)throw new Error("No storefront configured");const o=n.stateFactory(`activation-request-${r}`,null),s=n.stateFactory(`activation-request-${r}-error`,null),i=n.stateFactory(`activation-request-${r}-loading`,!0),a=n.stateFactory(`activation-request-${r}-fulfilling`,!1),l=n.stateFactory(`activation-request-${r}-completing`,!1),c=n.stateFactory(`activation-request-${r}-completion-timeout`,null),u=async()=>{await n.client.activationRequests.isCompleted(r)&&o.value?(o.value.status=Ht.Completed,l.value=!1):c.value=setTimeout(u,1500)};return r&&r.length>0?n.client.activationRequests.get(r).then(d=>{o.value=d,o.value.status===Ht.Fulfilled&&(l.value=!0,u()),i.value=!1}).catch(d=>{s.value=d,i.value=!1}):(s.value=new Error("Missing request id"),i.value=!1),Zi(()=>{c.value&&clearTimeout(c.value)}),Xe(n.currentUser,async()=>{var d,f;if(!(!r||(f=(d=o.value)==null?void 0:d.licenseEligibility)!=null&&f.eligible)){i.value=!0;try{o.value=await n.client.activationRequests.get(r),o.value.status===Ht.Fulfilled&&(l.value=!0,u())}catch(m){s.value=m}i.value=!1}}),{activationRequest:o,loading:i,fulfilling:a,completing:l,error:s,isInstalled:X(()=>{var d;return o&&((d=o.value)==null?void 0:d.status)===Ht.Completed}),fulfillLicense:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillLicense(r),a.value=!1,l.value=!0,u()},fulfillTrial:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillTrial(r),a.value=!1,l.value=!0,u()},cancel:async()=>{var d;((d=o.value)==null?void 0:d.status)!==Ht.Cancelled&&(o.value=await n.client.activationRequests.cancel(r))}}}function ng(e){const t=$e(Un);if(!t)throw new Error("No storefront configured");return{peek:async n=>{try{return await t.client.vouchers.peek(n)}catch(r){throw r instanceof Pr?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await t.client.vouchers.redeem(n)}catch(r){throw r instanceof Pr?new Error("Voucher code invalid"):r}}}}function ba(e){const t=e??$e(Un);if(!t)throw new Error("No storefront configured");return{items:X(()=>t.currentOrder.value.items.map(n=>{if(n.type==="Product"){const r=t.storefront.value.products.find(i=>i.id===n.productId),s=((r==null?void 0:r.variations)||[]).find(i=>i.id===n.variationId);return{...n,product:r,variation:s,price:s==null?void 0:s.price}}else{const r=t.storefront.value.bundles.find(i=>i.id===n.bundleId),s=((r==null?void 0:r.variations)||[]).find(i=>i.id===n.variationId);return{...n,bundle:r,variation:s,price:s==null?void 0:s.price}}})),currency:X(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:X(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,l,c,u,d;let f;if(s.type==="Product"){const m=t.storefront.value.products.find(S=>S.id===s.productId),E=((m==null?void 0:m.variations)||[]).find(S=>S.id===s.variationId);f=(l=(a=E==null?void 0:E.price[n])!=null?a:(i=m==null?void 0:m.defaultVariation)==null?void 0:i.price[n])!=null?l:0}else{const m=t.storefront.value.bundles.find(S=>S.id===s.bundleId),E=((m==null?void 0:m.variations)||[]).find(S=>S.id===s.variationId);f=(d=(u=E==null?void 0:E.price[n])!=null?u:(c=m==null?void 0:m.defaultVariation)==null?void 0:c.price[n])!=null?d:0}return o+f*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=b(n),r??(r=n.defaultVariation),!r)throw new Error("Added item does not have a default variation, and none have been specified");const o=`${n.type==="bundle"?"b":"p"}/${n.id}/${r.id}`;let s=t.currentOrder.value.items.find(i=>i.id===o);s?s.quantity+=1:n.type==="bundle"?(s={id:o,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price},t.currentOrder.value.items.push(s)):n.type==="product"&&(s={id:o,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price},t.currentOrder.value.items.push(s)),t.pushOrderContent()},setQuantity:(n,r)=>{const o=t.currentOrder.value.items.find(s=>s.id===n.id);if(!o)throw new Error("Cart item not found");if(o.quantity=r,o.quantity<=0){const s=t.currentOrder.value.items.findIndex(i=>i.id===o.id);t.currentOrder.value.items.splice(s,1)}t.pushOrderContent()},removeFromCart:n=>{const r=t.currentOrder.value.items.findIndex(o=>o.id===n.id);t.currentOrder.value.items.splice(r,1),t.pushOrderContent()},checkout:async n=>{const r=new URL(n,document.baseURI).href,o=await t.client.orders.pushContent(t.currentOrder.value,{returnUrl:r});if(o.embeddedCheckoutUrl&&typeof window<"u"){const s=o.embeddedCheckoutUrl;return new Promise(i=>{Du(s.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",a=>{i({next:a.detail.next})})})}else{if(o.checkoutUrl&&typeof window<"u")return window.location.href=o.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function bt(e){const t=e??$e(Un);if(!t)throw new Error("No storefront configured");return{user:t.currentUser,loaded:t.loadedUser,loadedPromise:t.loadedUserPromise,signIn:async(n,r)=>{const o=await t.client.identity.signIn(n,r);return t.currentUser.value=o,t.updateStorefront(),o},signUp:async(n,r,o,s,i,a,l)=>{const c=await t.client.identity.signUp(n,r,o,s,i,a,l);return t.currentUser.value=c,t.updateStorefront(),c},signOut:async()=>{t.client.tokenStore.setUser(null),await t.updateStorefront(),t.currentUser.value=null},update:async(n,r,o,s)=>{const i=await t.client.identity.update(n,r,o,s);return t.currentUser.value&&(t.currentUser.value.name=n,s&&(t.currentUser.value.communicationPreferences=s)),i},setPassword:async(n,r)=>{await t.client.identity.setPassword(n,r)},forgotPassword:async n=>{await t.client.identity.forgotPassword(n)},resetPassword:async(n,r,o)=>{await t.client.identity.resetPassword(n,r,o)},confirmAccount:async(n,r)=>await t.client.identity.confirmAccount(n,r),confirmEmail:async(n,r)=>await t.client.identity.confirmEmail(n,r),confirmEmailChange:async(n,r)=>{await t.client.identity.confirmEmailChange(n,r),t.updateUser()}}}function rg(e,t){const n={endpoint:e};return new eg(n,new Ep(n),(r,o)=>T(o))}var Ru=!1;function Us(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function wa(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function og(){return ju().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ju(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const sg=typeof Proxy=="function",ig="devtools-plugin:setup",ag="plugin:settings:set";let Ar,Ea;function lg(){var e;return Ar!==void 0||(typeof window<"u"&&window.performance?(Ar=!0,Ea=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Ar=!0,Ea=globalThis.perf_hooks.performance):Ar=!1),Ar}function cg(){return lg()?Ea.now():Date.now()}class ug{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const i in t.settings){const a=t.settings[i];r[i]=a.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(o),a=JSON.parse(i);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(o,JSON.stringify(i))}catch{}s=i},now(){return cg()}},n&&n.on(ag,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(c=>{this.targetQueue.push({method:a,args:l,resolve:c})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Lu(e,t){const n=e,r=ju(),o=og(),s=sg&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(ig,e,t);else{const i=s?new ug(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Pe={};let ko;const Co=e=>ko=e,Mu=Pe.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function gr(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Yt;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Yt||(Yt={}));const yr=typeof window<"u",Uu=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function dg(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function Oa(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Hu(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Fu(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Fs(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const Bs=typeof navigator=="object"?navigator:{userAgent:""},Bu=/Macintosh/.test(Bs.userAgent)&&/AppleWebKit/.test(Bs.userAgent)&&!/Safari/.test(Bs.userAgent),Hu=yr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Bu?fg:"msSaveOrOpenBlob"in Bs?pg:hg:()=>{};function fg(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?Fu(r.href)?Oa(e,t,n):(r.target="_blank",Fs(r)):Fs(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Fs(r)},0))}function pg(e,t="download",n){if(typeof e=="string")if(Fu(e))Oa(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Fs(r)})}else navigator.msSaveOrOpenBlob(dg(e,n),t)}function hg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return Oa(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Uu.HTMLElement))||"safari"in Uu,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Bu)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let l=a.result;if(typeof l!="string")throw r=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=l:location.assign(l),r=null},a.readAsDataURL(e)}else{const a=URL.createObjectURL(e);r?r.location.assign(a):location.href=a,r=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function tt(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Na(e){return"_a"in e&&"install"in e}function Zu(){if(!("clipboard"in navigator))return tt("Your browser doesn't support the Clipboard API","error"),!0}function qu(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(tt('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function mg(e){if(!Zu())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),tt("Global state copied to clipboard.")}catch(t){if(qu(t))return;tt("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function vg(e){if(!Zu())try{Wu(e,JSON.parse(await navigator.clipboard.readText())),tt("Global state pasted from clipboard.")}catch(t){if(qu(t))return;tt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function gg(e){try{Hu(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){tt("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let gn;function yg(){gn||(gn=document.createElement("input"),gn.type="file",gn.accept=".json");function e(){return new Promise((t,n)=>{gn.onchange=async()=>{const r=gn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},gn.oncancel=()=>t(null),gn.onerror=n,gn.click()})}return e}async function _g(e){try{const n=await yg()();if(!n)return;const{text:r,file:o}=n;Wu(e,JSON.parse(r)),tt(`Global state imported from "${o.name}".`)}catch(t){tt("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Wu(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function Lt(e){return{_custom:{display:e}}}const zu="🍍 Pinia (root)",Hs="_root";function bg(e){return Na(e)?{id:Hs,label:zu}:{id:e.$id,label:e.$id}}function wg(e){if(Na(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>r.get(s)._getters).map(s=>{const i=r.get(s);return{editable:!1,key:s,value:i._getters.reduce((a,l)=>(a[l]=i[l],a),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Eg(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Lt(e.type),key:Lt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Og(e){switch(e){case Yt.direct:return"mutation";case Yt.patchFunction:return"$patch";case Yt.patchObject:return"$patch";default:return"unknown"}}let Vr=!0;const Zs=[],_r="pinia:mutations",pt="pinia",{assign:Ng}=Object,qs=e=>"🍍 "+e;function Sg(e,t){Lu({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Zs,app:e},n=>{typeof n.now!="function"&&tt("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:_r,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{mg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await vg(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{gg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await _g(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const o=t._s.get(r);o?typeof o.$reset!="function"?tt(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),tt(`Store "${r}" reset.`)):tt(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((r,o)=>{const s=r.componentInstance&&r.componentInstance.proxy;if(s&&s._pStores){const i=r.componentInstance.proxy._pStores;Object.values(i).forEach(a=>{r.instanceData.state.push({type:qs(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:ge(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,c)=>(l[c]=a.$state[c],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:qs(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,c)=>{try{l[c]=a[c]}catch(u){l[c]=u}return l},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===pt){let o=[t];o=o.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?o.filter(s=>"$id"in s?s.$id.toLowerCase().includes(r.filter.toLowerCase()):zu.toLowerCase().includes(r.filter.toLowerCase())):o).map(bg)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===Hs?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==Hs&&(globalThis.$store=ge(o)),r.state=wg(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===Hs?t:t._s.get(r.nodeId);if(!s)return tt(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Na(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Vr=!1,r.set(s,i,r.state.value),Vr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return tt(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return tt(`Invalid path for store "${o}":
|
|
15
|
+
For more details, see https://link.vuejs.org/feature-flags.`)}}const Pt=Rg;function Eg(t){return xg(t)}function xg(t,e){wg();const n=Pa();n.__VUE__=!0,v.NODE_ENV!=="production"&&Lu(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:s,patchProp:o,createElement:i,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:m=nt,insertStaticContent:_}=t,E=(p,h,S,L=null,D=null,M=null,X=void 0,q=null,W=v.NODE_ENV!=="production"&&Yn?!1:!!h.dynamicChildren)=>{if(p===h)return;p&&!Vr(p,h)&&(L=ua(p),Ke(p,D,M,!0),p=null),h.patchFlag===-2&&(W=!1,h.dynamicChildren=null);const{type:j,ref:ne,shapeFlag:fe}=h;switch(j){case to:k(p,h,S,L);break;case st:A(p,h,S,L);break;case no:p==null?B(h,S,L,X):v.NODE_ENV!=="production"&&T(p,h,S,X);break;case Re:ce(p,h,S,L,D,M,X,q,W);break;default:fe&1?z(p,h,S,L,D,M,X,q,W):fe&6?Ze(p,h,S,L,D,M,X,q,W):fe&64||fe&128?j.process(p,h,S,L,D,M,X,q,W,Ao):v.NODE_ENV!=="production"&&U("Invalid VNode type:",j,`(${typeof j})`)}ne!=null&&D&&dl(ne,p&&p.ref,M,h||p,!h)},k=(p,h,S,L)=>{if(p==null)r(h.el=a(h.children),S,L);else{const D=h.el=p.el;h.children!==p.children&&c(D,h.children)}},A=(p,h,S,L)=>{p==null?r(h.el=l(h.children||""),S,L):h.el=p.el},B=(p,h,S,L)=>{[p.el,p.anchor]=_(p.children,h,S,L,p.el,p.anchor)},T=(p,h,S,L)=>{if(h.children!==p.children){const D=f(p.anchor);P(p),[h.el,h.anchor]=_(h.children,S,D,L)}else h.el=p.el,h.anchor=p.anchor},J=({el:p,anchor:h},S,L)=>{let D;for(;p&&p!==h;)D=f(p),r(p,S,L),p=D;r(h,S,L)},P=({el:p,anchor:h})=>{let S;for(;p&&p!==h;)S=f(p),s(p),p=S;s(h)},z=(p,h,S,L,D,M,X,q,W)=>{h.type==="svg"?X="svg":h.type==="math"&&(X="mathml"),p==null?N(h,S,L,D,M,X,q,W):R(p,h,D,M,X,q,W)},N=(p,h,S,L,D,M,X,q)=>{let W,j;const{props:ne,shapeFlag:fe,transition:ue,dirs:Se}=p;if(W=p.el=i(p.type,M,ne&&ne.is,ne),fe&8?u(W,p.children):fe&16&&K(p.children,W,null,L,D,pl(p,M),X,q),Se&&Cr(p,null,L,"created"),Oe(W,p,p.scopeId,X,L),ne){for(const Ye in ne)Ye!=="value"&&!Us(Ye)&&o(W,Ye,null,ne[Ye],M,L);"value"in ne&&o(W,"value",null,ne.value,M),(j=ne.onVnodeBeforeMount)&&pn(j,L,p)}v.NODE_ENV!=="production"&&(Jo(W,"__vnode",p,!0),Jo(W,"__vueParentComponent",L,!0)),Se&&Cr(p,null,L,"beforeMount");const De=kg(D,ue);De&&ue.beforeEnter(W),r(W,h,S),((j=ne&&ne.onVnodeMounted)||De||Se)&&Pt(()=>{j&&pn(j,L,p),De&&ue.enter(W),Se&&Cr(p,null,L,"mounted")},D)},Oe=(p,h,S,L,D)=>{if(S&&m(p,S),L)for(let M=0;M<L.length;M++)m(p,L[M]);if(D){let M=D.subTree;if(v.NODE_ENV!=="production"&&M.patchFlag>0&&M.patchFlag&2048&&(M=gl(M.children)||M),h===M){const X=D.vnode;Oe(p,X,X.scopeId,X.slotScopeIds,D.parent)}}},K=(p,h,S,L,D,M,X,q,W=0)=>{for(let j=W;j<p.length;j++){const ne=p[j]=q?er(p[j]):Kt(p[j]);E(null,ne,h,S,L,D,M,X,q)}},R=(p,h,S,L,D,M,X)=>{const q=h.el=p.el;v.NODE_ENV!=="production"&&(q.__vnode=h);let{patchFlag:W,dynamicChildren:j,dirs:ne}=h;W|=p.patchFlag&16;const fe=p.props||Ge,ue=h.props||Ge;let Se;if(S&&Ar(S,!1),(Se=ue.onVnodeBeforeUpdate)&&pn(Se,S,h,p),ne&&Cr(h,p,S,"beforeUpdate"),S&&Ar(S,!0),v.NODE_ENV!=="production"&&Yn&&(W=0,X=!1,j=null),(fe.innerHTML&&ue.innerHTML==null||fe.textContent&&ue.textContent==null)&&u(q,""),j?(V(p.dynamicChildren,j,q,S,L,pl(h,D),M),v.NODE_ENV!=="production"&&eo(p,h)):X||be(p,h,q,null,S,L,pl(h,D),M,!1),W>0){if(W&16)I(q,fe,ue,S,D);else if(W&2&&fe.class!==ue.class&&o(q,"class",null,ue.class,D),W&4&&o(q,"style",fe.style,ue.style,D),W&8){const De=h.dynamicProps;for(let Ye=0;Ye<De.length;Ye++){const He=De[Ye],ft=fe[He],en=ue[He];(en!==ft||He==="value")&&o(q,He,ft,en,D,S)}}W&1&&p.children!==h.children&&u(q,h.children)}else!X&&j==null&&I(q,fe,ue,S,D);((Se=ue.onVnodeUpdated)||ne)&&Pt(()=>{Se&&pn(Se,S,h,p),ne&&Cr(h,p,S,"updated")},L)},V=(p,h,S,L,D,M,X)=>{for(let q=0;q<h.length;q++){const W=p[q],j=h[q],ne=W.el&&(W.type===Re||!Vr(W,j)||W.shapeFlag&70)?d(W.el):S;E(W,j,ne,null,L,D,M,X,!0)}},I=(p,h,S,L,D)=>{if(h!==S){if(h!==Ge)for(const M in h)!Us(M)&&!(M in S)&&o(p,M,h[M],null,D,L);for(const M in S){if(Us(M))continue;const X=S[M],q=h[M];X!==q&&M!=="value"&&o(p,M,q,X,D,L)}"value"in S&&o(p,"value",h.value,S.value,D)}},ce=(p,h,S,L,D,M,X,q,W)=>{const j=h.el=p?p.el:a(""),ne=h.anchor=p?p.anchor:a("");let{patchFlag:fe,dynamicChildren:ue,slotScopeIds:Se}=h;v.NODE_ENV!=="production"&&(Yn||fe&2048)&&(fe=0,W=!1,ue=null),Se&&(q=q?q.concat(Se):Se),p==null?(r(j,S,L),r(ne,S,L),K(h.children||[],S,ne,D,M,X,q,W)):fe>0&&fe&64&&ue&&p.dynamicChildren?(V(p.dynamicChildren,ue,S,D,M,X,q),v.NODE_ENV!=="production"?eo(p,h):(h.key!=null||D&&h===D.subTree)&&eo(p,h,!0)):be(p,h,S,ne,D,M,X,q,W)},Ze=(p,h,S,L,D,M,X,q,W)=>{h.slotScopeIds=q,p==null?h.shapeFlag&512?D.ctx.activate(h,S,L,X,W):w(h,S,L,D,M,X,W):$(p,h,W)},w=(p,h,S,L,D,M,X)=>{const q=p.component=Fg(p,L,D);if(v.NODE_ENV!=="production"&&q.type.__hmrId&&yv(q),v.NODE_ENV!=="production"&&(ci(p),Pn(q,"mount")),Ys(p)&&(q.ctx.renderer=Ao),v.NODE_ENV!=="production"&&Pn(q,"init"),zg(q,!1,X),v.NODE_ENV!=="production"&&In(q,"init"),q.asyncDep){if(D&&D.registerDep(q,Q,X),!p.el){const W=q.subTree=F(st);A(null,W,h,S)}}else Q(q,p,h,S,D,M,X);v.NODE_ENV!=="production"&&(ui(),In(q,"mount"))},$=(p,h,S)=>{const L=h.component=p.component;if(Ag(p,h,S))if(L.asyncDep&&!L.asyncResolved){v.NODE_ENV!=="production"&&ci(h),oe(L,h,S),v.NODE_ENV!=="production"&&ui();return}else L.next=h,vv(L.update),L.effect.dirty=!0,L.update();else h.el=p.el,L.vnode=h},Q=(p,h,S,L,D,M,X)=>{const q=()=>{if(p.isMounted){let{next:ne,bu:fe,u:ue,parent:Se,vnode:De}=p;{const ms=wd(p);if(ms){ne&&(ne.el=De.el,oe(p,ne,X)),ms.asyncDep.then(()=>{p.isUnmounted||q()});return}}let Ye=ne,He;v.NODE_ENV!=="production"&&ci(ne||p.vnode),Ar(p,!1),ne?(ne.el=De.el,oe(p,ne,X)):ne=De,fe&&Zs(fe),(He=ne.props&&ne.props.onVnodeBeforeUpdate)&&pn(He,Se,ne,De),Ar(p,!0),v.NODE_ENV!=="production"&&Pn(p,"render");const ft=vl(p);v.NODE_ENV!=="production"&&In(p,"render");const en=p.subTree;p.subTree=ft,v.NODE_ENV!=="production"&&Pn(p,"patch"),E(en,ft,d(en.el),ua(en),p,D,M),v.NODE_ENV!=="production"&&In(p,"patch"),ne.el=ft.el,Ye===null&&Dg(p,ft.el),ue&&Pt(ue,D),(He=ne.props&&ne.props.onVnodeUpdated)&&Pt(()=>pn(He,Se,ne,De),D),v.NODE_ENV!=="production"&&Mu(p),v.NODE_ENV!=="production"&&ui()}else{let ne;const{el:fe,props:ue}=h,{bm:Se,m:De,parent:Ye}=p,He=Js(h);if(Ar(p,!1),Se&&Zs(Se),!He&&(ne=ue&&ue.onVnodeBeforeMount)&&pn(ne,Ye,h),Ar(p,!0),fe&&Cp){const ft=()=>{v.NODE_ENV!=="production"&&Pn(p,"render"),p.subTree=vl(p),v.NODE_ENV!=="production"&&In(p,"render"),v.NODE_ENV!=="production"&&Pn(p,"hydrate"),Cp(fe,p.subTree,p,D,null),v.NODE_ENV!=="production"&&In(p,"hydrate")};He?h.type.__asyncLoader().then(()=>!p.isUnmounted&&ft()):ft()}else{v.NODE_ENV!=="production"&&Pn(p,"render");const ft=p.subTree=vl(p);v.NODE_ENV!=="production"&&In(p,"render"),v.NODE_ENV!=="production"&&Pn(p,"patch"),E(null,ft,S,L,p,D,M),v.NODE_ENV!=="production"&&In(p,"patch"),h.el=ft.el}if(De&&Pt(De,D),!He&&(ne=ue&&ue.onVnodeMounted)){const ft=h;Pt(()=>pn(ne,Ye,ft),D)}(h.shapeFlag&256||Ye&&Js(Ye.vnode)&&Ye.vnode.shapeFlag&256)&&p.a&&Pt(p.a,D),p.isMounted=!0,v.NODE_ENV!=="production"&&kv(p),h=S=L=null}},W=p.effect=new Da(q,nt,()=>di(j),p.scope),j=p.update=()=>{W.dirty&&W.run()};j.i=p,j.id=p.uid,Ar(p,!0),v.NODE_ENV!=="production"&&(W.onTrack=p.rtc?ne=>Zs(p.rtc,ne):void 0,W.onTrigger=p.rtg?ne=>Zs(p.rtg,ne):void 0),j()},oe=(p,h,S)=>{h.component=p;const L=p.vnode.props;p.vnode=h,p.next=null,ig(p,h.props,L,S),vg(p,h.children,S),kn(),Au(p),On()},be=(p,h,S,L,D,M,X,q,W=!1)=>{const j=p&&p.children,ne=p?p.shapeFlag:0,fe=h.children,{patchFlag:ue,shapeFlag:Se}=h;if(ue>0){if(ue&128){We(j,fe,S,L,D,M,X,q,W);return}else if(ue&256){ae(j,fe,S,L,D,M,X,q,W);return}}Se&8?(ne&16&&Io(j,D,M),fe!==j&&u(S,fe)):ne&16?Se&16?We(j,fe,S,L,D,M,X,q,W):Io(j,D,M,!0):(ne&8&&u(S,""),Se&16&&K(fe,S,L,D,M,X,q,W))},ae=(p,h,S,L,D,M,X,q,W)=>{p=p||ss,h=h||ss;const j=p.length,ne=h.length,fe=Math.min(j,ne);let ue;for(ue=0;ue<fe;ue++){const Se=h[ue]=W?er(h[ue]):Kt(h[ue]);E(p[ue],Se,S,null,D,M,X,q,W)}j>ne?Io(p,D,M,!0,!1,fe):K(h,S,L,D,M,X,q,W,fe)},We=(p,h,S,L,D,M,X,q,W)=>{let j=0;const ne=h.length;let fe=p.length-1,ue=ne-1;for(;j<=fe&&j<=ue;){const Se=p[j],De=h[j]=W?er(h[j]):Kt(h[j]);if(Vr(Se,De))E(Se,De,S,null,D,M,X,q,W);else break;j++}for(;j<=fe&&j<=ue;){const Se=p[fe],De=h[ue]=W?er(h[ue]):Kt(h[ue]);if(Vr(Se,De))E(Se,De,S,null,D,M,X,q,W);else break;fe--,ue--}if(j>fe){if(j<=ue){const Se=ue+1,De=Se<ne?h[Se].el:L;for(;j<=ue;)E(null,h[j]=W?er(h[j]):Kt(h[j]),S,De,D,M,X,q,W),j++}}else if(j>ue)for(;j<=fe;)Ke(p[j],D,M,!0),j++;else{const Se=j,De=j,Ye=new Map;for(j=De;j<=ue;j++){const Ct=h[j]=W?er(h[j]):Kt(h[j]);Ct.key!=null&&(v.NODE_ENV!=="production"&&Ye.has(Ct.key)&&U("Duplicate keys found during update:",JSON.stringify(Ct.key),"Make sure keys are unique."),Ye.set(Ct.key,j))}let He,ft=0;const en=ue-De+1;let ms=!1,$p=0;const Do=new Array(en);for(j=0;j<en;j++)Do[j]=0;for(j=Se;j<=fe;j++){const Ct=p[j];if(ft>=en){Ke(Ct,D,M,!0);continue}let _n;if(Ct.key!=null)_n=Ye.get(Ct.key);else for(He=De;He<=ue;He++)if(Do[He-De]===0&&Vr(Ct,h[He])){_n=He;break}_n===void 0?Ke(Ct,D,M,!0):(Do[_n-De]=j+1,_n>=$p?$p=_n:ms=!0,E(Ct,h[_n],S,null,D,M,X,q,W),ft++)}const Pp=ms?Og(Do):ss;for(He=Pp.length-1,j=en-1;j>=0;j--){const Ct=De+j,_n=h[Ct],Ip=Ct+1<ne?h[Ct+1].el:L;Do[j]===0?E(null,_n,S,Ip,D,M,X,q,W):ms&&(He<0||j!==Pp[He]?xt(_n,S,Ip,2):He--)}}},xt=(p,h,S,L,D=null)=>{const{el:M,type:X,transition:q,children:W,shapeFlag:j}=p;if(j&6){xt(p.component.subTree,h,S,L);return}if(j&128){p.suspense.move(h,S,L);return}if(j&64){X.move(p,h,S,Ao);return}if(X===Re){r(M,h,S);for(let fe=0;fe<W.length;fe++)xt(W[fe],h,S,L);r(p.anchor,h,S);return}if(X===no){J(p,h,S);return}if(L!==2&&j&1&&q)if(L===0)q.beforeEnter(M),r(M,h,S),Pt(()=>q.enter(M),D);else{const{leave:fe,delayLeave:ue,afterLeave:Se}=q,De=()=>r(M,h,S),Ye=()=>{fe(M,()=>{De(),Se&&Se()})};ue?ue(M,De,Ye):Ye()}else r(M,h,S)},Ke=(p,h,S,L=!1,D=!1)=>{const{type:M,props:X,ref:q,children:W,dynamicChildren:j,shapeFlag:ne,patchFlag:fe,dirs:ue,cacheIndex:Se}=p;if(fe===-2&&(D=!1),q!=null&&dl(q,null,S,p,!0),Se!=null&&(h.renderCache[Se]=void 0),ne&256){h.ctx.deactivate(p);return}const De=ne&1&&ue,Ye=!Js(p);let He;if(Ye&&(He=X&&X.onVnodeBeforeUnmount)&&pn(He,h,p),ne&6)lx(p.component,S,L);else{if(ne&128){p.suspense.unmount(S,L);return}De&&Cr(p,null,h,"beforeUnmount"),ne&64?p.type.remove(p,h,S,Ao,L):j&&!j.hasOnce&&(M!==Re||fe>0&&fe&64)?Io(j,h,S,!1,!0):(M===Re&&fe&384||!D&&ne&16)&&Io(W,h,S),L&&At(p)}(Ye&&(He=X&&X.onVnodeUnmounted)||De)&&Pt(()=>{He&&pn(He,h,p),De&&Cr(p,null,h,"unmounted")},S)},At=p=>{const{type:h,el:S,anchor:L,transition:D}=p;if(h===Re){v.NODE_ENV!=="production"&&p.patchFlag>0&&p.patchFlag&2048&&D&&!D.persisted?p.children.forEach(X=>{X.type===st?s(X.el):At(X)}):yr(S,L);return}if(h===no){P(p);return}const M=()=>{s(S),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(p.shapeFlag&1&&D&&!D.persisted){const{leave:X,delayLeave:q}=D,W=()=>X(S,M);q?q(p.el,M,W):W()}else M()},yr=(p,h)=>{let S;for(;p!==h;)S=f(p),s(p),p=S;s(h)},lx=(p,h,S)=>{v.NODE_ENV!=="production"&&p.type.__hmrId&&_v(p);const{bum:L,scope:D,update:M,subTree:X,um:q,m:W,a:j}=p;Ed(W),Ed(j),L&&Zs(L),D.stop(),M&&(M.active=!1,Ke(X,p,h,S)),q&&Pt(q,h),Pt(()=>{p.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve()),v.NODE_ENV!=="production"&&Nv(p)},Io=(p,h,S,L=!1,D=!1,M=0)=>{for(let X=M;X<p.length;X++)Ke(p[X],h,S,L,D)},ua=p=>{if(p.shapeFlag&6)return ua(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const h=f(p.anchor||p.el),S=h&&h[vd];return S?f(S):h};let ac=!1;const Sp=(p,h,S)=>{p==null?h._vnode&&Ke(h._vnode,null,null,!0):E(h._vnode||null,p,h,null,null,null,S),h._vnode=p,ac||(ac=!0,Au(),Du(),ac=!1)},Ao={p:E,um:Ke,m:xt,r:At,mt:w,mc:K,pc:be,pbc:V,n:ua,o:t};let Tp,Cp;return{render:Sp,hydrate:Tp,createApp:ng(Sp,Tp)}}function pl({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function Ar({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function kg(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function eo(t,e,n=!1){const r=t.children,s=e.children;if(de(r)&&de(s))for(let o=0;o<r.length;o++){const i=r[o];let a=s[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[o]=er(s[o]),a.el=i.el),!n&&a.patchFlag!==-2&&eo(i,a)),a.type===to&&(a.el=i.el),v.NODE_ENV!=="production"&&a.type===st&&!a.el&&(a.el=i.el)}}function Og(t){const e=t.slice(),n=[0];let r,s,o,i,a;const l=t.length;for(r=0;r<l;r++){const c=t[r];if(c!==0){if(s=n[n.length-1],t[s]<c){e[r]=s,n.push(r);continue}for(o=0,i=n.length-1;o<i;)a=o+i>>1,t[n[a]]<c?o=a+1:i=a;c<t[n[o]]&&(o>0&&(e[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=e[i];return n}function wd(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:wd(e)}function Ed(t){if(t)for(let e=0;e<t.length;e++)t[e].active=!1}const Ng=Symbol.for("v-scx"),Sg=()=>{{const t=Me(Ng);return t||v.NODE_ENV!=="production"&&U("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),t}};function bt(t,e){return hl(t,null,e)}const Ei={};function lt(t,e,n){return v.NODE_ENV!=="production"&&!me(e)&&U("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),hl(t,e,n)}function hl(t,e,{immediate:n,deep:r,flush:s,once:o,onTrack:i,onTrigger:a}=Ge){if(e&&o){const N=e;e=(...Oe)=>{N(...Oe),z()}}v.NODE_ENV!=="production"&&r!==void 0&&typeof r=="number"&&U('watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.'),v.NODE_ENV!=="production"&&!e&&(n!==void 0&&U('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),r!==void 0&&U('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&U('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const l=N=>{U("Invalid watch source: ",N,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=ot,u=N=>r===!0?N:Dr(N,r===!1?1:void 0);let d,f=!1,m=!1;if(Qe(t)?(d=()=>t.value,f=Tn(t)):Nn(t)?(d=()=>u(t),f=!0):de(t)?(m=!0,f=t.some(N=>Nn(N)||Tn(N)),d=()=>t.map(N=>{if(Qe(N))return N.value;if(Nn(N))return u(N);if(me(N))return Cn(N,c,2);v.NODE_ENV!=="production"&&l(N)})):me(t)?e?d=()=>Cn(t,c,2):d=()=>(_&&_(),Ut(t,c,3,[E])):(d=nt,v.NODE_ENV!=="production"&&l(t)),e&&r){const N=d;d=()=>Dr(N())}let _,E=N=>{_=J.onStop=()=>{Cn(N,c,4),_=J.onStop=void 0}},k;if(Ti)if(E=nt,e?n&&Ut(e,c,3,[d(),m?[]:void 0,E]):d(),s==="sync"){const N=Sg();k=N.__watcherHandles||(N.__watcherHandles=[])}else return nt;let A=m?new Array(t.length).fill(Ei):Ei;const B=()=>{if(!(!J.active||!J.dirty))if(e){const N=J.run();(r||f||(m?N.some((Oe,K)=>qn(Oe,A[K])):qn(N,A)))&&(_&&_(),Ut(e,c,3,[N,A===Ei?void 0:m&&A[0]===Ei?[]:A,E]),A=N)}else J.run()};B.allowRecurse=!!e;let T;s==="sync"?T=B:s==="post"?T=()=>Pt(B,c&&c.suspense):(B.pre=!0,c&&(B.id=c.uid),T=()=>di(B));const J=new Da(d,nt,T),P=eu(),z=()=>{J.stop(),P&&Sa(P.effects,J)};return v.NODE_ENV!=="production"&&(J.onTrack=i,J.onTrigger=a),e?n?B():A=J.run():s==="post"?Pt(J.run.bind(J),c&&c.suspense):J.run(),k&&k.push(z),z}function Tg(t,e,n){const r=this.proxy,s=Xe(t)?t.includes(".")?xd(r,t):()=>r[t]:t.bind(r,r);let o;me(e)?o=e:(o=e.handler,n=e);const i=oo(this),a=hl(s,o.bind(r),n);return i(),a}function xd(t,e){const n=e.split(".");return()=>{let r=t;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}function Dr(t,e=1/0,n){if(e<=0||!Be(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,Qe(t))Dr(t.value,e,n);else if(de(t))for(let r=0;r<t.length;r++)Dr(t[r],e,n);else if(zc(t)||wr(t))t.forEach(r=>{Dr(r,e,n)});else if(Wc(t)){for(const r in t)Dr(t[r],e,n);for(const r of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,r)&&Dr(t[r],e,n)}return t}const Cg=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Vt(e)}Modifiers`]||t[`${xn(e)}Modifiers`];function $g(t,e,...n){if(t.isUnmounted)return;const r=t.vnode.props||Ge;if(v.NODE_ENV!=="production"){const{emitsOptions:u,propsOptions:[d]}=t;if(u)if(!(e in u))(!d||!(xr(Vt(e))in d))&&U(`Component emitted event "${e}" but it is neither declared in the emits option nor as an "${xr(Vt(e))}" prop.`);else{const f=u[e];me(f)&&(f(...n)||U(`Invalid event arguments: event validation failed for event "${e}".`))}}let s=n;const o=e.startsWith("update:"),i=o&&Cg(r,e.slice(7));if(i&&(i.trim&&(s=n.map(u=>Xe(u)?u.trim():u)),i.number&&(s=n.map(ym))),v.NODE_ENV!=="production"&&Cv(t,e,s),v.NODE_ENV!=="production"){const u=e.toLowerCase();u!==e&&r[xr(u)]&&U(`Event "${u}" is emitted in component ${Ci(t,t.type)} but the handler is registered for "${e}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${xn(e)}" instead of "${e}".`)}let a,l=r[a=xr(e)]||r[a=xr(Vt(e))];!l&&o&&(l=r[a=xr(xn(e))]),l&&Ut(l,t,6,s);const c=r[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,Ut(c,t,6,s)}}function kd(t,e,n=!1){const r=e.emitsCache,s=r.get(t);if(s!==void 0)return s;const o=t.emits;let i={},a=!1;if(!me(t)){const l=c=>{const u=kd(c,e,!0);u&&(a=!0,tt(i,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!o&&!a?(Be(t)&&r.set(t,null),null):(de(o)?o.forEach(l=>i[l]=null):tt(i,o),Be(t)&&r.set(t,i),i)}function xi(t,e){return!t||!Ms(e)?!1:(e=e.slice(2).replace(/Once$/,""),Ie(t,e[0].toLowerCase()+e.slice(1))||Ie(t,xn(e))||Ie(t,e))}let ml=!1;function ki(){ml=!0}function vl(t){const{type:e,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:a,emit:l,render:c,renderCache:u,props:d,data:f,setupState:m,ctx:_,inheritAttrs:E}=t,k=mi(t);let A,B;v.NODE_ENV!=="production"&&(ml=!1);try{if(n.shapeFlag&4){const P=s||r,z=v.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy(P,{get(N,Oe,K){return U(`Property '${String(Oe)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(N,Oe,K)}}):P;A=Kt(c.call(z,P,u,v.NODE_ENV!=="production"?cn(d):d,m,f,_)),B=a}else{const P=e;v.NODE_ENV!=="production"&&a===d&&ki(),A=Kt(P.length>1?P(v.NODE_ENV!=="production"?cn(d):d,v.NODE_ENV!=="production"?{get attrs(){return ki(),cn(a)},slots:i,emit:l}:{attrs:a,slots:i,emit:l}):P(v.NODE_ENV!=="production"?cn(d):d,null)),B=e.props?a:Pg(a)}}catch(P){ro.length=0,Hs(P,t,1),A=F(st)}let T=A,J;if(v.NODE_ENV!=="production"&&A.patchFlag>0&&A.patchFlag&2048&&([T,J]=Od(A)),B&&E!==!1){const P=Object.keys(B),{shapeFlag:z}=T;if(P.length){if(z&7)o&&P.some(Wo)&&(B=Ig(B,o)),T=Wt(T,B,!1,!0);else if(v.NODE_ENV!=="production"&&!ml&&T.type!==st){const N=Object.keys(a),Oe=[],K=[];for(let R=0,V=N.length;R<V;R++){const I=N[R];Ms(I)?Wo(I)||Oe.push(I[2].toLowerCase()+I.slice(3)):K.push(I)}K.length&&U(`Extraneous non-props attributes (${K.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),Oe.length&&U(`Extraneous non-emits event listeners (${Oe.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(v.NODE_ENV!=="production"&&!Nd(T)&&U("Runtime directive used on component with non-element root node. The directives will not function as intended."),T=Wt(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&(v.NODE_ENV!=="production"&&!Nd(T)&&U("Component inside <Transition> renders non-element root node that cannot be animated."),T.transition=n.transition),v.NODE_ENV!=="production"&&J?J(T):A=T,mi(k),A}const Od=t=>{const e=t.children,n=t.dynamicChildren,r=gl(e,!1);if(r){if(v.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Od(r)}else return[t,void 0];const s=e.indexOf(r),o=n?n.indexOf(r):-1,i=a=>{e[s]=a,n&&(o>-1?n[o]=a:a.patchFlag>0&&(t.dynamicChildren=[...n,a]))};return[Kt(r),i]};function gl(t,e=!0){let n;for(let r=0;r<t.length;r++){const s=t[r];if(is(s)){if(s.type!==st||s.children==="v-if"){if(n)return;if(n=s,v.NODE_ENV!=="production"&&e&&n.patchFlag>0&&n.patchFlag&2048)return gl(n.children)}}else return}return n}const Pg=t=>{let e;for(const n in t)(n==="class"||n==="style"||Ms(n))&&((e||(e={}))[n]=t[n]);return e},Ig=(t,e)=>{const n={};for(const r in t)(!Wo(r)||!(r.slice(9)in e))&&(n[r]=t[r]);return n},Nd=t=>t.shapeFlag&7||t.type===st;function Ag(t,e,n){const{props:r,children:s,component:o}=t,{props:i,children:a,patchFlag:l}=e,c=o.emitsOptions;if(v.NODE_ENV!=="production"&&(s||a)&&Yn||e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Sd(r,i,c):!!i;if(l&8){const u=e.dynamicProps;for(let d=0;d<u.length;d++){const f=u[d];if(i[f]!==r[f]&&!xi(c,f))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Sd(r,i,c):!0:!!i;return!1}function Sd(t,e,n){const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!0;for(let s=0;s<r.length;s++){const o=r[s];if(e[o]!==t[o]&&!xi(n,o))return!0}return!1}function Dg({vnode:t,parent:e},n){for(;e;){const r=e.subTree;if(r.suspense&&r.suspense.activeBranch===t&&(r.el=t.el),r===t)(t=e.vnode).el=n,e=e.parent;else break}}const Vg=t=>t.__isSuspense;function Rg(t,e){e&&e.pendingBranch?de(t)?e.effects.push(...t):e.effects.push(t):Iu(t)}const Re=Symbol.for("v-fgt"),to=Symbol.for("v-txt"),st=Symbol.for("v-cmt"),no=Symbol.for("v-stc"),ro=[];let jt=null;function y(t=!1){ro.push(jt=t?null:[])}function jg(){ro.pop(),jt=ro[ro.length-1]||null}let so=1;function Td(t){so+=t,t<0&&jt&&(jt.hasOnce=!0)}function Cd(t){return t.dynamicChildren=so>0?jt||ss:null,jg(),so>0&&jt&&jt.push(t),t}function O(t,e,n,r,s,o){return Cd(x(t,e,n,r,s,o,!0))}function Ve(t,e,n,r,s){return Cd(F(t,e,n,r,s,!0))}function is(t){return t?t.__v_isVNode===!0:!1}function Vr(t,e){if(v.NODE_ENV!=="production"&&e.shapeFlag&6&&t.component){const n=fi.get(e.type);if(n&&n.has(t.component))return t.shapeFlag&=-257,e.shapeFlag&=-513,!1}return t.type===e.type&&t.key===e.key}const Lg=(...t)=>Pd(...t),$d=({key:t})=>t??null,Oi=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Xe(t)||Qe(t)||me(t)?{i:at,r:t,k:e,f:!!n}:t:null);function x(t,e=null,n=null,r=0,s=null,o=t===Re?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&$d(e),ref:e&&Oi(e),scopeId:hi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:at};return a?(yl(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=Xe(n)?8:16),v.NODE_ENV!=="production"&&l.key!==l.key&&U("VNode created with invalid key (NaN). VNode type:",l.type),so>0&&!i&&jt&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&jt.push(l),l}const F=v.NODE_ENV!=="production"?Lg:Pd;function Pd(t,e=null,n=null,r=0,s=null,o=!1){if((!t||t===Ku)&&(v.NODE_ENV!=="production"&&!t&&U(`Invalid vnode type when creating vnode: ${t}.`),t=st),is(t)){const a=Wt(t,e,!0);return n&&yl(a,n),so>0&&!o&&jt&&(a.shapeFlag&6?jt[jt.indexOf(t)]=a:jt.push(a)),a.patchFlag=-2,a}if(Ld(t)&&(t=t.__vccOpts),e){e=Mg(e);let{class:a,style:l}=e;a&&!Xe(a)&&(e.class=Yo(a)),Be(l)&&(ai(l)&&!de(l)&&(l=tt({},l)),e.style=Ia(l))}const i=Xe(t)?1:Vg(t)?128:gg(t)?64:Be(t)?4:me(t)?2:0;return v.NODE_ENV!=="production"&&i&4&&ai(t)&&(t=Ee(t),U("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
16
|
+
Component that was made reactive: `,t)),x(t,e,n,r,s,i,o,!0)}function Mg(t){return t?ai(t)||id(t)?tt({},t):t:null}function Wt(t,e,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:a,transition:l}=t,c=e?_l(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&$d(c),ref:e&&e.ref?n&&o?de(o)?o.concat(Oi(e)):[o,Oi(e)]:Oi(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:v.NODE_ENV!=="production"&&i===-1&&de(a)?a.map(Id):a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Re?i===-1?16:i|16:i,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Wt(t.ssContent),ssFallback:t.ssFallback&&Wt(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&r&&gi(u,l.clone(u)),u}function Id(t){const e=Wt(t);return de(t.children)&&(e.children=t.children.map(Id)),e}function je(t=" ",e=0){return F(to,null,t,e)}function Ug(t,e){const n=F(no,null,t);return n.staticCount=e,n}function ge(t="",e=!1){return e?(y(),Ve(st,null,t)):F(st,null,t)}function Kt(t){return t==null||typeof t=="boolean"?F(st):de(t)?F(Re,null,t.slice()):typeof t=="object"?er(t):F(to,null,String(t))}function er(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Wt(t)}function yl(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(de(e))n=16;else if(typeof e=="object")if(r&65){const s=e.default;s&&(s._c&&(s._d=!1),yl(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!id(e)?e._ctx=at:s===3&&at&&(at.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else me(e)?(e={default:e,_ctx:at},n=32):(e=String(e),r&64?(n=16,e=[je(e)]):n=8);t.children=e,t.shapeFlag|=n}function _l(...t){const e={};for(let n=0;n<t.length;n++){const r=t[n];for(const s in r)if(s==="class")e.class!==r.class&&(e.class=Yo([e.class,r.class]));else if(s==="style")e.style=Ia([e.style,r.style]);else if(Ms(s)){const o=e[s],i=r[s];i&&o!==i&&!(de(o)&&o.includes(i))&&(e[s]=o?[].concat(o,i):i)}else s!==""&&(e[s]=r[s])}return e}function pn(t,e,n,r=null){Ut(t,e,7,[n,r])}const Zg=rd();let Bg=0;function Fg(t,e,n){const r=t.type,s=(e?e.appContext:t.appContext)||Zg,o={uid:Bg++,vnode:t,type:r,parent:e,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new Xc(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ld(r,s),emitsOptions:kd(r,s),emit:null,emitted:null,propsDefaults:Ge,inheritAttrs:r.inheritAttrs,ctx:Ge,data:Ge,props:Ge,attrs:Ge,slots:Ge,refs:Ge,setupState:Ge,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return v.NODE_ENV!=="production"?o.ctx=qv(o):o.ctx={_:o},o.root=e?e.root:o,o.emit=$g.bind(null,o),t.ce&&t.ce(o),o}let ot=null;const Ni=()=>ot||at;let Si,bl;{const t=Pa(),e=(n,r)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(r),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};Si=e("__VUE_INSTANCE_SETTERS__",n=>ot=n),bl=e("__VUE_SSR_SETTERS__",n=>Ti=n)}const oo=t=>{const e=ot;return Si(t),t.scope.on(),()=>{t.scope.off(),Si(e)}},Ad=()=>{ot&&ot.scope.off(),Si(null)},Hg=En("slot,component");function wl(t,{isNativeTag:e}){(Hg(t)||e(t))&&U("Do not use built-in or reserved HTML elements as component id: "+t)}function Dd(t){return t.vnode.shapeFlag&4}let Ti=!1;function zg(t,e=!1,n=!1){e&&bl(e);const{props:r,children:s}=t.vnode,o=Dd(t);sg(t,r,o,e),mg(t,s,n);const i=o?qg(t,e):void 0;return e&&bl(!1),i}function qg(t,e){var n;const r=t.type;if(v.NODE_ENV!=="production"){if(r.name&&wl(r.name,t.appContext.config),r.components){const o=Object.keys(r.components);for(let i=0;i<o.length;i++)wl(o[i],t.appContext.config)}if(r.directives){const o=Object.keys(r.directives);for(let i=0;i<o.length;i++)Zu(o[i])}r.compilerOptions&&Wg()&&U('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Yu),v.NODE_ENV!=="production"&&Wv(t);const{setup:s}=r;if(s){const o=t.setupContext=s.length>1?Gg(t):null,i=oo(t);kn();const a=Cn(s,t,0,[v.NODE_ENV!=="production"?cn(t.props):t.props,o]);if(On(),i(),Ta(a)){if(a.then(Ad,Ad),e)return a.then(l=>{Vd(t,l,e)}).catch(l=>{Hs(l,t,0)});if(t.asyncDep=a,v.NODE_ENV!=="production"&&!t.suspense){const l=(n=r.name)!=null?n:"Anonymous";U(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else Vd(t,a,e)}else Rd(t,e)}function Vd(t,e,n){me(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Be(e)?(v.NODE_ENV!=="production"&&is(e)&&U("setup() should not return VNodes directly - return a render function instead."),v.NODE_ENV!=="production"&&(t.devtoolsRawSetupState=e),t.setupState=Nu(e),v.NODE_ENV!=="production"&&Kv(t)):v.NODE_ENV!=="production"&&e!==void 0&&U(`setup() should return an object. Received: ${e===null?"null":typeof e}`),Rd(t,n)}let El;const Wg=()=>!El;function Rd(t,e,n){const r=t.type;if(!t.render){if(!e&&El&&!r.render){const s=r.template||il(t).template;if(s){v.NODE_ENV!=="production"&&Pn(t,"compile");const{isCustomElement:o,compilerOptions:i}=t.appContext.config,{delimiters:a,compilerOptions:l}=r,c=tt(tt({isCustomElement:o,delimiters:a},i),l);r.render=El(s,c),v.NODE_ENV!=="production"&&In(t,"compile")}}t.render=r.render||nt}{const s=oo(t);kn();try{Jv(t)}finally{On(),s()}}v.NODE_ENV!=="production"&&!r.render&&t.render===nt&&!e&&(r.template?U('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):U("Component is missing template or render function: ",r))}const jd=v.NODE_ENV!=="production"?{get(t,e){return ki(),pt(t,"get",""),t[e]},set(){return U("setupContext.attrs is readonly."),!1},deleteProperty(){return U("setupContext.attrs is readonly."),!1}}:{get(t,e){return pt(t,"get",""),t[e]}};function Kg(t){return new Proxy(t.slots,{get(e,n){return pt(t,"get","$slots"),e[n]}})}function Gg(t){const e=n=>{if(v.NODE_ENV!=="production"&&(t.exposed&&U("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(de(n)?r="array":Qe(n)&&(r="ref")),r!=="object"&&U(`expose() should be passed a plain object, received ${r}.`)}t.exposed=n||{}};if(v.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(t.attrs,jd))},get slots(){return r||(r=Kg(t))},get emit(){return(s,...o)=>t.emit(s,...o)},expose:e})}else return{attrs:new Proxy(t.attrs,jd),slots:t.slots,emit:t.emit,expose:e}}function xl(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Nu(Gn(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in $r)return $r[n](t)},has(e,n){return n in e||n in $r}})):t.proxy}const Jg=/(?:^|[-_])(\w)/g,Yg=t=>t.replace(Jg,e=>e.toUpperCase()).replace(/[-_]/g,"");function kl(t,e=!0){return me(t)?t.displayName||t.name:t.name||e&&t.__name}function Ci(t,e,n=!1){let r=kl(e);if(!r&&e.__file){const s=e.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&t&&t.parent){const s=o=>{for(const i in o)if(o[i]===e)return i};r=s(t.components||t.parent.type.components)||s(t.appContext.components)}return r?Yg(r):n?"App":"Anonymous"}function Ld(t){return me(t)&&"__vccOpts"in t}const ee=(t,e)=>{const n=tv(t,e,Ti);if(v.NODE_ENV!=="production"){const r=Ni();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function qe(t,e,n){const r=arguments.length;return r===2?Be(e)&&!de(e)?is(e)?F(t,null,[e]):F(t,e):F(t,null,e):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&is(n)&&(n=[n]),F(t,e,n))}function Xg(){if(v.NODE_ENV==="production"||typeof window>"u")return;const t={style:"color:#3ba776"},e={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(d){return Be(d)?d.__isVue?["div",t,"VueInstance"]:Qe(d)?["div",{},["span",t,u(d)],"<",a(d.value),">"]:Nn(d)?["div",{},["span",t,Tn(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${Sn(d)?" (readonly)":""}`]:Sn(d)?["div",{},["span",t,Tn(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]:null:null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...o(d.$)]}};function o(d){const f=[];d.type.props&&d.props&&f.push(i("props",Ee(d.props))),d.setupState!==Ge&&f.push(i("setup",d.setupState)),d.data!==Ge&&f.push(i("data",Ee(d.data)));const m=l(d,"computed");m&&f.push(i("computed",m));const _=l(d,"inject");return _&&f.push(i("injected",_)),f.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),f}function i(d,f){return f=tt({},f),Object.keys(f).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(f).map(m=>["div",{},["span",r,m+": "],a(f[m],!1)])]]:["span",{}]}function a(d,f=!0){return typeof d=="number"?["span",e,d]:typeof d=="string"?["span",n,JSON.stringify(d)]:typeof d=="boolean"?["span",r,d]:Be(d)?["object",{object:f?Ee(d):d}]:["span",n,String(d)]}function l(d,f){const m=d.type;if(me(m))return;const _={};for(const E in d.ctx)c(m,E,f)&&(_[E]=d.ctx[E]);return _}function c(d,f,m){const _=d[m];if(de(_)&&_.includes(f)||Be(_)&&f in _||d.extends&&c(d.extends,f,m)||d.mixins&&d.mixins.some(E=>c(E,f,m)))return!0}function u(d){return Tn(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}const Md="3.4.38",tr=v.NODE_ENV!=="production"?U:nt;var An={};const Qg="http://www.w3.org/2000/svg",ey="http://www.w3.org/1998/Math/MathML",Dn=typeof document<"u"?document:null,Ud=Dn&&Dn.createElement("template"),ty={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,r)=>{const s=e==="svg"?Dn.createElementNS(Qg,t):e==="mathml"?Dn.createElementNS(ey,t):n?Dn.createElement(t,{is:n}):Dn.createElement(t);return t==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:t=>Dn.createTextNode(t),createComment:t=>Dn.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Dn.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,r,s,o){const i=n?n.previousSibling:e.lastChild;if(s&&(s===o||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{Ud.innerHTML=r==="svg"?`<svg>${t}</svg>`:r==="mathml"?`<math>${t}</math>`:t;const a=Ud.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[i?i.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},nr="transition",io="animation",ao=Symbol("_vtc"),lo=(t,{slots:e})=>qe(Av,ny(t),e);lo.displayName="Transition";const Zd={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};lo.props=tt({},Bu,Zd);const Rr=(t,e=[])=>{de(t)?t.forEach(n=>n(...e)):t&&t(...e)},Bd=t=>t?de(t)?t.some(e=>e.length>1):t.length>1:!1;function ny(t){const e={};for(const I in t)I in Zd||(e[I]=t[I]);if(t.css===!1)return e;const{name:n="v",type:r,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=i,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=t,_=ry(s),E=_&&_[0],k=_&&_[1],{onBeforeEnter:A,onEnter:B,onEnterCancelled:T,onLeave:J,onLeaveCancelled:P,onBeforeAppear:z=A,onAppear:N=B,onAppearCancelled:Oe=T}=e,K=(I,ce,Ze)=>{jr(I,ce?u:a),jr(I,ce?c:i),Ze&&Ze()},R=(I,ce)=>{I._isLeaving=!1,jr(I,d),jr(I,m),jr(I,f),ce&&ce()},V=I=>(ce,Ze)=>{const w=I?N:B,$=()=>K(ce,I,Ze);Rr(w,[ce,$]),Fd(()=>{jr(ce,I?l:o),rr(ce,I?u:a),Bd(w)||Hd(ce,r,E,$)})};return tt(e,{onBeforeEnter(I){Rr(A,[I]),rr(I,o),rr(I,i)},onBeforeAppear(I){Rr(z,[I]),rr(I,l),rr(I,c)},onEnter:V(!1),onAppear:V(!0),onLeave(I,ce){I._isLeaving=!0;const Ze=()=>R(I,ce);rr(I,d),rr(I,f),iy(),Fd(()=>{I._isLeaving&&(jr(I,d),rr(I,m),Bd(J)||Hd(I,r,k,Ze))}),Rr(J,[I,Ze])},onEnterCancelled(I){K(I,!1),Rr(T,[I])},onAppearCancelled(I){K(I,!0),Rr(Oe,[I])},onLeaveCancelled(I){R(I),Rr(P,[I])}})}function ry(t){if(t==null)return null;if(Be(t))return[Ol(t.enter),Ol(t.leave)];{const e=Ol(t);return[e,e]}}function Ol(t){const e=_m(t);return An.NODE_ENV!=="production"&&fv(e,"<transition> explicit duration"),e}function rr(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[ao]||(t[ao]=new Set)).add(e)}function jr(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.remove(r));const n=t[ao];n&&(n.delete(e),n.size||(t[ao]=void 0))}function Fd(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let sy=0;function Hd(t,e,n,r){const s=t._endId=++sy,o=()=>{s===t._endId&&r()};if(n)return setTimeout(o,n);const{type:i,timeout:a,propCount:l}=oy(t,e);if(!i)return r();const c=i+"end";let u=0;const d=()=>{t.removeEventListener(c,f),o()},f=m=>{m.target===t&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),t.addEventListener(c,f)}function oy(t,e){const n=window.getComputedStyle(t),r=_=>(n[_]||"").split(", "),s=r(`${nr}Delay`),o=r(`${nr}Duration`),i=zd(s,o),a=r(`${io}Delay`),l=r(`${io}Duration`),c=zd(a,l);let u=null,d=0,f=0;e===nr?i>0&&(u=nr,d=i,f=o.length):e===io?c>0&&(u=io,d=c,f=l.length):(d=Math.max(i,c),u=d>0?i>c?nr:io:null,f=u?u===nr?o.length:l.length:0);const m=u===nr&&/\b(transform|all)(,|$)/.test(r(`${nr}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:m}}function zd(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,r)=>qd(n)+qd(t[r])))}function qd(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function iy(){return document.body.offsetHeight}function ay(t,e,n){const r=t[ao];r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const Wd=Symbol("_vod"),ly=Symbol("_vsh"),cy=Symbol(An.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),uy=/(^|;)\s*display\s*:/;function dy(t,e,n){const r=t.style,s=Xe(n);let o=!1;if(n&&!s){if(e)if(Xe(e))for(const i of e.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&$i(r,a,"")}else for(const i in e)n[i]==null&&$i(r,i,"");for(const i in n)i==="display"&&(o=!0),$i(r,i,n[i])}else if(s){if(e!==n){const i=r[cy];i&&(n+=";"+i),r.cssText=n,o=uy.test(n)}}else e&&t.removeAttribute("style");Wd in t&&(t[Wd]=o?r.display:"",t[ly]&&(r.display="none"))}const fy=/[^\\];\s*$/,Kd=/\s*!important$/;function $i(t,e,n){if(de(n))n.forEach(r=>$i(t,e,r));else if(n==null&&(n=""),An.NODE_ENV!=="production"&&fy.test(n)&&tr(`Unexpected semicolon at the end of '${e}' style value: '${n}'`),e.startsWith("--"))t.setProperty(e,n);else{const r=py(t,e);Kd.test(n)?t.setProperty(xn(r),n.replace(Kd,""),"important"):t[r]=n}}const Gd=["Webkit","Moz","ms"],Nl={};function py(t,e){const n=Nl[e];if(n)return n;let r=Vt(e);if(r!=="filter"&&r in t)return Nl[e]=r;r=Er(r);for(let s=0;s<Gd.length;s++){const o=Gd[s]+r;if(o in t)return Nl[e]=o}return e}const Jd="http://www.w3.org/1999/xlink";function Yd(t,e,n,r,s,o=$m(e)){r&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(Jd,e.slice(6,e.length)):t.setAttributeNS(Jd,e,n):n==null||o&&!Gc(n)?t.removeAttribute(e):t.setAttribute(e,o?"":zn(n)?String(n):n)}function hy(t,e,n,r){if(e==="innerHTML"||e==="textContent"){if(n==null)return;t[e]=n;return}const s=t.tagName;if(e==="value"&&s!=="PROGRESS"&&!s.includes("-")){const i=s==="OPTION"?t.getAttribute("value")||"":t.value,a=n==null?"":String(n);(i!==a||!("_value"in t))&&(t.value=a),n==null&&t.removeAttribute(e),t._value=n;return}let o=!1;if(n===""||n==null){const i=typeof t[e];i==="boolean"?n=Gc(n):n==null&&i==="string"?(n="",o=!0):i==="number"&&(n=0,o=!0)}try{t[e]=n}catch(i){An.NODE_ENV!=="production"&&!o&&tr(`Failed setting prop "${e}" on <${s.toLowerCase()}>: value ${n} is invalid.`,i)}o&&t.removeAttribute(e)}function my(t,e,n,r){t.addEventListener(e,n,r)}function vy(t,e,n,r){t.removeEventListener(e,n,r)}const Xd=Symbol("_vei");function gy(t,e,n,r,s=null){const o=t[Xd]||(t[Xd]={}),i=o[e];if(r&&i)i.value=An.NODE_ENV!=="production"?ef(r,e):r;else{const[a,l]=yy(e);if(r){const c=o[e]=wy(An.NODE_ENV!=="production"?ef(r,e):r,s);my(t,a,c,l)}else i&&(vy(t,a,i,l),o[e]=void 0)}}const Qd=/(?:Once|Passive|Capture)$/;function yy(t){let e;if(Qd.test(t)){e={};let r;for(;r=t.match(Qd);)t=t.slice(0,t.length-r[0].length),e[r[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):xn(t.slice(2)),e]}let Sl=0;const _y=Promise.resolve(),by=()=>Sl||(_y.then(()=>Sl=0),Sl=Date.now());function wy(t,e){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ut(Ey(r,n.value),e,5,[r])};return n.value=t,n.attached=by(),n}function ef(t,e){return me(t)||de(t)?t:(tr(`Wrong type passed as event handler to ${e} - did you forget @ or : in front of your prop?
|
|
17
|
+
Expected function or array of functions, received type ${typeof t}.`),nt)}function Ey(t,e){if(de(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(r=>s=>!s._stopped&&r&&r(s))}else return e}const tf=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,xy=(t,e,n,r,s,o)=>{const i=s==="svg";e==="class"?ay(t,r,i):e==="style"?dy(t,n,r):Ms(e)?Wo(e)||gy(t,e,n,r,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):ky(t,e,r,i))?(hy(t,e,r),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Yd(t,e,r,i,o,e!=="value")):(e==="true-value"?t._trueValue=r:e==="false-value"&&(t._falseValue=r),Yd(t,e,r,i))};function ky(t,e,n,r){if(r)return!!(e==="innerHTML"||e==="textContent"||e in t&&tf(e)&&me(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return tf(e)&&Xe(n)?!1:e in t}const Oy=["ctrl","shift","alt","meta"],Ny={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>Oy.some(n=>t[`${n}Key`]&&!e.includes(n))},Sy=(t,e)=>{const n=t._withMods||(t._withMods={}),r=e.join(".");return n[r]||(n[r]=(s,...o)=>{for(let i=0;i<e.length;i++){const a=Ny[e[i]];if(a&&a(s,e))return}return t(s,...o)})},Ty=tt({patchProp:xy},ty);let nf;function Cy(){return nf||(nf=Eg(Ty))}const $y=(...t)=>{const e=Cy().createApp(...t);An.NODE_ENV!=="production"&&(Iy(e),Ay(e));const{mount:n}=e;return e.mount=r=>{const s=Dy(r);if(!s)return;const o=e._component;!me(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.innerHTML="";const i=n(s,!1,Py(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},e};function Py(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function Iy(t){Object.defineProperty(t.config,"isNativeTag",{value:e=>Sm(e)||Tm(e)||Cm(e),writable:!1})}function Ay(t){{const e=t.config.isCustomElement;Object.defineProperty(t.config,"isCustomElement",{get(){return e},set(){tr("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=t.config.compilerOptions,r='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(t.config,"compilerOptions",{get(){return tr(r),n},set(){tr(r)}})}}function Dy(t){if(Xe(t)){const e=document.querySelector(t);return An.NODE_ENV!=="production"&&!e&&tr(`Failed to mount app: mount target selector "${t}" returned null.`),e}return An.NODE_ENV!=="production"&&window.ShadowRoot&&t instanceof window.ShadowRoot&&t.mode==="closed"&&tr('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),t}var Vy={};function Ry(){Xg()}Vy.NODE_ENV!=="production"&&Ry();let Pi;const jy=new Uint8Array(16);function Ly(){if(!Pi&&(Pi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Pi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pi(jy)}const ht=[];for(let t=0;t<256;++t)ht.push((t+256).toString(16).slice(1));function My(t,e=0){return ht[t[e+0]]+ht[t[e+1]]+ht[t[e+2]]+ht[t[e+3]]+"-"+ht[t[e+4]]+ht[t[e+5]]+"-"+ht[t[e+6]]+ht[t[e+7]]+"-"+ht[t[e+8]]+ht[t[e+9]]+"-"+ht[t[e+10]]+ht[t[e+11]]+ht[t[e+12]]+ht[t[e+13]]+ht[t[e+14]]+ht[t[e+15]]}const rf={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Tl(t,e,n){if(rf.randomUUID&&!e&&!t)return rf.randomUUID();t=t||{};const r=t.random||(t.rng||Ly)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,My(r)}var Ue;(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})(Ue||(Ue={}));var Cl;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Cl||(Cl={}));const se=Ue.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),sr=t=>{switch(typeof t){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(t)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(t)?se.array:t===null?se.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?se.promise:typeof Map<"u"&&t instanceof Map?se.map:typeof Set<"u"&&t instanceof Set?se.set:typeof Date<"u"&&t instanceof Date?se.date:se.object;default:return se.unknown}},H=Ue.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"]),Uy=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Gt 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}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ue.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()}}Gt.create=t=>new Gt(t);const co=(t,e)=>{let n;switch(t.code){case H.invalid_type:t.received===se.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case H.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ue.jsonStringifyReplacer)}`;break;case H.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ue.joinValues(t.keys,", ")}`;break;case H.invalid_union:n="Invalid input";break;case H.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ue.joinValues(t.options)}`;break;case H.invalid_enum_value:n=`Invalid enum value. Expected ${Ue.joinValues(t.options)}, received '${t.received}'`;break;case H.invalid_arguments:n="Invalid function arguments";break;case H.invalid_return_type:n="Invalid function return type";break;case H.invalid_date:n="Invalid date";break;case H.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}"`:Ue.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case H.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 H.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 H.custom:n="Invalid input";break;case H.invalid_intersection_types:n="Intersection results could not be merged";break;case H.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case H.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ue.assertNever(t)}return{message:n}};let sf=co;function Zy(t){sf=t}function Ii(){return sf}const Ai=t=>{const{data:e,path:n,errorMaps:r,issueData:s}=t,o=[...n,...s.path||[]],i={...s,path:o};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:s.message||a}},By=[];function ie(t,e){const n=Ai({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ii(),co].filter(r=>!!r)});t.common.issues.push(n)}class wt{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 Ne;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)r.push({key:await s.key,value:await s.value});return wt.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 Ne;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 Ne=Object.freeze({status:"aborted"}),of=t=>({status:"dirty",value:t}),St=t=>({status:"valid",value:t}),$l=t=>t.status==="aborted",Pl=t=>t.status==="dirty",uo=t=>t.status==="valid",Di=t=>typeof Promise<"u"&&t instanceof Promise;var pe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(pe||(pe={}));class hn{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 af=(t,e)=>{if(uo(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 Gt(t.common.issues);return this._error=n,this._error}}};function Ce(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)=>i.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:r??a.defaultError}:{message:n??a.defaultError},description:s}}class Pe{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 sr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:sr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new wt,ctx:{common:e.parent.common,data:e.data,parsedType:sr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Di(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:sr(e)},o=this._parseSync({data:e,path:s.path,parent:s});return af(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:sr(e)},s=this._parse({data:e,path:r.path,parent:r}),o=await(Di(s)?s:Promise.resolve(s));return af(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:H.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 Xt({schema:this,typeName:_e.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Rn.create(this,this._def)}nullable(){return Zr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yt.create(this,this._def)}promise(){return us.create(this,this._def)}or(e){return mo.create([this,e],this._def)}and(e){return vo.create(this,e,this._def)}transform(e){return new Xt({...Ce(this._def),schema:this,typeName:_e.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new wo({...Ce(this._def),innerType:this,defaultValue:n,typeName:_e.ZodDefault})}brand(){return new cf({typeName:_e.ZodBranded,type:this,...Ce(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Ui({...Ce(this._def),innerType:this,catchValue:n,typeName:_e.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Eo.create(this,e)}readonly(){return Bi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Fy=/^c[^\s-]{8,}$/i,Hy=/^[a-z][a-z0-9]*$/,zy=/^[0-9A-HJKMNP-TV-Z]{26}$/,qy=/^[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,Wy=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ky="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Il;const Gy=/^(((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}))$/,Jy=/^(([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})))$/,Yy=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Xy(t,e){return!!((e==="v4"||!e)&&Gy.test(t)||(e==="v6"||!e)&&Jy.test(t))}class Jt extends Pe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==se.string){const o=this._getOrReturnCtx(e);return ie(o,{code:H.invalid_type,expected:se.string,received:o.parsedType}),Ne}const r=new wt;let s;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:H.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),ie(s,{code:H.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?ie(s,{code:H.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&ie(s,{code:H.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Wy.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"email",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Il||(Il=new RegExp(Ky,"u")),Il.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"emoji",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")qy.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"uuid",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")Fy.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"cuid",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")Hy.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"cuid2",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")zy.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"ulid",code:H.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),ie(s,{validation:"url",code:H.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),ie(s,{validation:"regex",code:H.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),ie(s,{code:H.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),ie(s,{code:H.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(s=this._getOrReturnCtx(e,s),ie(s,{code:H.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Yy(o).test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{code:H.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?Xy(e.data,o.version)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"ip",code:H.invalid_string,message:o.message}),r.dirty()):Ue.assertNever(o);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:H.invalid_string,...pe.errToObj(r)})}_addCheck(e){return new Jt({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...pe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...pe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...pe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...pe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...pe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...pe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...pe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...pe.errToObj(e)})}datetime(e){var n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!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,...pe.errToObj(e==null?void 0:e.message)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...pe.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...pe.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...pe.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...pe.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...pe.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...pe.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...pe.errToObj(n)})}nonempty(e){return this.min(1,pe.errToObj(e))}trim(){return new Jt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Jt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Jt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}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 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 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}}Jt.create=t=>{var e;return new Jt({checks:[],typeName:_e.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};function Qy(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)}class or extends Pe{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)!==se.number){const o=this._getOrReturnCtx(e);return ie(o,{code:H.invalid_type,expected:se.number,received:o.parsedType}),Ne}let r;const s=new wt;for(const o of this._def.checks)o.kind==="int"?Ue.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),ie(r,{code:H.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),ie(r,{code:H.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),ie(r,{code:H.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?Qy(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),ie(r,{code:H.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),ie(r,{code:H.not_finite,message:o.message}),s.dirty()):Ue.assertNever(o);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,pe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,pe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,pe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,pe.toString(n))}setLimit(e,n,r,s){return new or({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:pe.toString(s)}]})}_addCheck(e){return new or({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:pe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:pe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:pe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:pe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:pe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:pe.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:pe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:pe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:pe.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"&&Ue.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)}}or.create=t=>new or({checks:[],typeName:_e.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ce(t)});class ir extends Pe{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)!==se.bigint){const o=this._getOrReturnCtx(e);return ie(o,{code:H.invalid_type,expected:se.bigint,received:o.parsedType}),Ne}let r;const s=new wt;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),ie(r,{code:H.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),ie(r,{code:H.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),ie(r,{code:H.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Ue.assertNever(o);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,pe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,pe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,pe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,pe.toString(n))}setLimit(e,n,r,s){return new ir({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:pe.toString(s)}]})}_addCheck(e){return new ir({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:pe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:pe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:pe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:pe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:pe.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}}ir.create=t=>{var e;return new ir({checks:[],typeName:_e.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ce(t)})};class fo extends Pe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==se.boolean){const r=this._getOrReturnCtx(e);return ie(r,{code:H.invalid_type,expected:se.boolean,received:r.parsedType}),Ne}return St(e.data)}}fo.create=t=>new fo({typeName:_e.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ce(t)});class Lr extends Pe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==se.date){const o=this._getOrReturnCtx(e);return ie(o,{code:H.invalid_type,expected:se.date,received:o.parsedType}),Ne}if(isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return ie(o,{code:H.invalid_date}),Ne}const r=new wt;let s;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:H.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),ie(s,{code:H.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ue.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Lr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:pe.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:pe.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}}Lr.create=t=>new Lr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:_e.ZodDate,...Ce(t)});class Vi extends Pe{_parse(e){if(this._getType(e)!==se.symbol){const r=this._getOrReturnCtx(e);return ie(r,{code:H.invalid_type,expected:se.symbol,received:r.parsedType}),Ne}return St(e.data)}}Vi.create=t=>new Vi({typeName:_e.ZodSymbol,...Ce(t)});class po extends Pe{_parse(e){if(this._getType(e)!==se.undefined){const r=this._getOrReturnCtx(e);return ie(r,{code:H.invalid_type,expected:se.undefined,received:r.parsedType}),Ne}return St(e.data)}}po.create=t=>new po({typeName:_e.ZodUndefined,...Ce(t)});class ho extends Pe{_parse(e){if(this._getType(e)!==se.null){const r=this._getOrReturnCtx(e);return ie(r,{code:H.invalid_type,expected:se.null,received:r.parsedType}),Ne}return St(e.data)}}ho.create=t=>new ho({typeName:_e.ZodNull,...Ce(t)});class as extends Pe{constructor(){super(...arguments),this._any=!0}_parse(e){return St(e.data)}}as.create=t=>new as({typeName:_e.ZodAny,...Ce(t)});class Mr extends Pe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return St(e.data)}}Mr.create=t=>new Mr({typeName:_e.ZodUnknown,...Ce(t)});class Vn extends Pe{_parse(e){const n=this._getOrReturnCtx(e);return ie(n,{code:H.invalid_type,expected:se.never,received:n.parsedType}),Ne}}Vn.create=t=>new Vn({typeName:_e.ZodNever,...Ce(t)});class Ri extends Pe{_parse(e){if(this._getType(e)!==se.undefined){const r=this._getOrReturnCtx(e);return ie(r,{code:H.invalid_type,expected:se.void,received:r.parsedType}),Ne}return St(e.data)}}Ri.create=t=>new Ri({typeName:_e.ZodVoid,...Ce(t)});class Yt extends Pe{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==se.array)return ie(n,{code:H.invalid_type,expected:se.array,received:n.parsedType}),Ne;if(s.exactLength!==null){const i=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(i||a)&&(ie(n,{code:i?H.too_big:H.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&&(ie(n,{code:H.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&&(ie(n,{code:H.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 hn(n,i,n.path,a)))).then(i=>wt.mergeArray(r,i));const o=[...n.data].map((i,a)=>s.type._parseSync(new hn(n,i,n.path,a)));return wt.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new Yt({...this._def,minLength:{value:e,message:pe.toString(n)}})}max(e,n){return new Yt({...this._def,maxLength:{value:e,message:pe.toString(n)}})}length(e,n){return new Yt({...this._def,exactLength:{value:e,message:pe.toString(n)}})}nonempty(e){return this.min(1,e)}}Yt.create=(t,e)=>new Yt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:_e.ZodArray,...Ce(e)});function ls(t){if(t instanceof et){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Rn.create(ls(r))}return new et({...t._def,shape:()=>e})}else return t instanceof Yt?new Yt({...t._def,type:ls(t.element)}):t instanceof Rn?Rn.create(ls(t.unwrap())):t instanceof Zr?Zr.create(ls(t.unwrap())):t instanceof mn?mn.create(t.items.map(e=>ls(e))):t}class et extends Pe{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=Ue.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==se.object){const c=this._getOrReturnCtx(e);return ie(c,{code:H.invalid_type,expected:se.object,received:c.parsedType}),Ne}const{status:r,ctx:s}=this._processInputParams(e),{shape:o,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Vn&&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 hn(s,d,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof Vn){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&&(ie(s,{code:H.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 hn(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;c.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return c}).then(c=>wt.mergeObjectSync(r,c)):wt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return pe.errToObj,new et({...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=pe.errToObj(e).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new et({...this._def,unknownKeys:"strip"})}passthrough(){return new et({...this._def,unknownKeys:"passthrough"})}extend(e){return new et({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new et({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_e.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new et({...this._def,catchall:e})}pick(e){const n={};return Ue.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new et({...this._def,shape:()=>n})}omit(e){const n={};return Ue.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new et({...this._def,shape:()=>n})}deepPartial(){return ls(this)}partial(e){const n={};return Ue.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}),new et({...this._def,shape:()=>n})}required(e){const n={};return Ue.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 et({...this._def,shape:()=>n})}keyof(){return lf(Ue.objectKeys(this.shape))}}et.create=(t,e)=>new et({shape:()=>t,unknownKeys:"strip",catchall:Vn.create(),typeName:_e.ZodObject,...Ce(e)}),et.strictCreate=(t,e)=>new et({shape:()=>t,unknownKeys:"strict",catchall:Vn.create(),typeName:_e.ZodObject,...Ce(e)}),et.lazycreate=(t,e)=>new et({shape:t,unknownKeys:"strip",catchall:Vn.create(),typeName:_e.ZodObject,...Ce(e)});class mo extends Pe{_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 Gt(a.ctx.common.issues));return ie(n,{code:H.invalid_union,unionErrors:i}),Ne}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 Gt(l));return ie(n,{code:H.invalid_union,unionErrors:a}),Ne}}get options(){return this._def.options}}mo.create=(t,e)=>new mo({options:t,typeName:_e.ZodUnion,...Ce(e)});const ji=t=>t instanceof yo?ji(t.schema):t instanceof Xt?ji(t.innerType()):t instanceof _o?[t.value]:t instanceof ar?t.options:t instanceof bo?Object.keys(t.enum):t instanceof wo?ji(t._def.innerType):t instanceof po?[void 0]:t instanceof ho?[null]:null;class Li extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==se.object)return ie(n,{code:H.invalid_type,expected:se.object,received:n.parsedType}),Ne;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}):(ie(n,{code:H.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ne)}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=ji(o.shape[e]);if(!i)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 Li({typeName:_e.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...Ce(r)})}}function Al(t,e){const n=sr(t),r=sr(e);if(t===e)return{valid:!0,data:t};if(n===se.object&&r===se.object){const s=Ue.objectKeys(e),o=Ue.objectKeys(t).filter(a=>s.indexOf(a)!==-1),i={...t,...e};for(const a of o){const l=Al(t[a],e[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===se.array&&r===se.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=Al(i,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===se.date&&r===se.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class vo extends Pe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,i)=>{if($l(o)||$l(i))return Ne;const a=Al(o.value,i.value);return a.valid?((Pl(o)||Pl(i))&&n.dirty(),{status:n.value,value:a.data}):(ie(r,{code:H.invalid_intersection_types}),Ne)};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}))}}vo.create=(t,e,n)=>new vo({left:t,right:e,typeName:_e.ZodIntersection,...Ce(n)});class mn extends Pe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==se.array)return ie(r,{code:H.invalid_type,expected:se.array,received:r.parsedType}),Ne;if(r.data.length<this._def.items.length)return ie(r,{code:H.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ne;!this._def.rest&&r.data.length>this._def.items.length&&(ie(r,{code:H.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 hn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(o).then(i=>wt.mergeArray(n,i)):wt.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new mn({...this._def,rest:e})}}mn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new mn({items:t,typeName:_e.ZodTuple,rest:null,...Ce(e)})};class go extends Pe{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!==se.object)return ie(r,{code:H.invalid_type,expected:se.object,received:r.parsedType}),Ne;const s=[],o=this._def.keyType,i=this._def.valueType;for(const a in r.data)s.push({key:o._parse(new hn(r,a,r.path,a)),value:i._parse(new hn(r,r.data[a],r.path,a))});return r.common.async?wt.mergeObjectAsync(n,s):wt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof Pe?new go({keyType:e,valueType:n,typeName:_e.ZodRecord,...Ce(r)}):new go({keyType:Jt.create(),valueType:e,typeName:_e.ZodRecord,...Ce(n)})}}class Mi extends Pe{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!==se.map)return ie(r,{code:H.invalid_type,expected:se.map,received:r.parsedType}),Ne;const s=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:s._parse(new hn(r,a,r.path,[c,"key"])),value:o._parse(new hn(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 Ne;(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 Ne;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Mi.create=(t,e,n)=>new Mi({valueType:e,keyType:t,typeName:_e.ZodMap,...Ce(n)});class Ur extends Pe{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==se.set)return ie(r,{code:H.invalid_type,expected:se.set,received:r.parsedType}),Ne;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(ie(r,{code:H.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&&(ie(r,{code:H.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 Ne;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 hn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(e,n){return new Ur({...this._def,minSize:{value:e,message:pe.toString(n)}})}max(e,n){return new Ur({...this._def,maxSize:{value:e,message:pe.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Ur.create=(t,e)=>new Ur({valueType:t,minSize:null,maxSize:null,typeName:_e.ZodSet,...Ce(e)});class cs extends Pe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==se.function)return ie(n,{code:H.invalid_type,expected:se.function,received:n.parsedType}),Ne;function r(a,l){return Ai({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ii(),co].filter(c=>!!c),issueData:{code:H.invalid_arguments,argumentsError:l}})}function s(a,l){return Ai({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ii(),co].filter(c=>!!c),issueData:{code:H.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof us){const a=this;return St(async function(...l){const c=new Gt([]),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 St(function(...l){const c=a._def.args.safeParse(l,o);if(!c.success)throw new Gt([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(u,o);if(!d.success)throw new Gt([s(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new cs({...this._def,args:mn.create(e).rest(Mr.create())})}returns(e){return new cs({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new cs({args:e||mn.create([]).rest(Mr.create()),returns:n||Mr.create(),typeName:_e.ZodFunction,...Ce(r)})}}class yo extends Pe{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})}}yo.create=(t,e)=>new yo({getter:t,typeName:_e.ZodLazy,...Ce(e)});class _o extends Pe{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ie(n,{received:n.data,code:H.invalid_literal,expected:this._def.value}),Ne}return{status:"valid",value:e.data}}get value(){return this._def.value}}_o.create=(t,e)=>new _o({value:t,typeName:_e.ZodLiteral,...Ce(e)});function lf(t,e){return new ar({values:t,typeName:_e.ZodEnum,...Ce(e)})}class ar extends Pe{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return ie(n,{expected:Ue.joinValues(r),received:n.parsedType,code:H.invalid_type}),Ne}if(this._def.values.indexOf(e.data)===-1){const n=this._getOrReturnCtx(e),r=this._def.values;return ie(n,{received:n.data,code:H.invalid_enum_value,options:r}),Ne}return St(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){return ar.create(e)}exclude(e){return ar.create(this.options.filter(n=>!e.includes(n)))}}ar.create=lf;class bo extends Pe{_parse(e){const n=Ue.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==se.string&&r.parsedType!==se.number){const s=Ue.objectValues(n);return ie(r,{expected:Ue.joinValues(s),received:r.parsedType,code:H.invalid_type}),Ne}if(n.indexOf(e.data)===-1){const s=Ue.objectValues(n);return ie(r,{received:r.data,code:H.invalid_enum_value,options:s}),Ne}return St(e.data)}get enum(){return this._def.values}}bo.create=(t,e)=>new bo({values:t,typeName:_e.ZodNativeEnum,...Ce(e)});class us extends Pe{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==se.promise&&n.common.async===!1)return ie(n,{code:H.invalid_type,expected:se.promise,received:n.parsedType}),Ne;const r=n.parsedType===se.promise?n.data:Promise.resolve(n.data);return St(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}us.create=(t,e)=>new us({type:t,typeName:_e.ZodPromise,...Ce(e)});class Xt extends Pe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_e.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=>{ie(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);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(i).then(a=>this._def.schema._parseAsync({data:a,path:r.path,parent:r})):this._def.schema._parseSync({data:i,path:r.path,parent:r})}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"?Ne:(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"?Ne:(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(!uo(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=>uo(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:n.value,value:a})):i);Ue.assertNever(s)}}Xt.create=(t,e,n)=>new Xt({schema:t,typeName:_e.ZodEffects,effect:e,...Ce(n)}),Xt.createWithPreprocess=(t,e,n)=>new Xt({schema:e,effect:{type:"preprocess",transform:t},typeName:_e.ZodEffects,...Ce(n)});class Rn extends Pe{_parse(e){return this._getType(e)===se.undefined?St(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Rn.create=(t,e)=>new Rn({innerType:t,typeName:_e.ZodOptional,...Ce(e)});class Zr extends Pe{_parse(e){return this._getType(e)===se.null?St(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Zr.create=(t,e)=>new Zr({innerType:t,typeName:_e.ZodNullable,...Ce(e)});class wo extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}wo.create=(t,e)=>new wo({innerType:t,typeName:_e.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ce(e)});class Ui extends Pe{_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 Di(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Gt(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Gt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ui.create=(t,e)=>new Ui({innerType:t,typeName:_e.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ce(e)});class Zi extends Pe{_parse(e){if(this._getType(e)!==se.nan){const r=this._getOrReturnCtx(e);return ie(r,{code:H.invalid_type,expected:se.nan,received:r.parsedType}),Ne}return{status:"valid",value:e.data}}}Zi.create=t=>new Zi({typeName:_e.ZodNaN,...Ce(t)});const e_=Symbol("zod_brand");class cf extends Pe{_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}}class Eo extends Pe{_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"?Ne:o.status==="dirty"?(n.dirty(),of(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"?Ne: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 Eo({in:e,out:n,typeName:_e.ZodPipeline})}}class Bi extends Pe{_parse(e){const n=this._def.innerType._parse(e);return uo(n)&&(n.value=Object.freeze(n.value)),n}}Bi.create=(t,e)=>new Bi({innerType:t,typeName:_e.ZodReadonly,...Ce(e)});const uf=(t,e={},n)=>t?as.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})}}):as.create(),t_={object:et.lazycreate};var _e;(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"})(_e||(_e={}));const n_=(t,e={message:`Input not instance of ${t.name}`})=>uf(n=>n instanceof t,e),df=Jt.create,ff=or.create,r_=Zi.create,s_=ir.create,pf=fo.create,o_=Lr.create,i_=Vi.create,a_=po.create,l_=ho.create,c_=as.create,u_=Mr.create,d_=Vn.create,f_=Ri.create,p_=Yt.create,h_=et.create,m_=et.strictCreate,v_=mo.create,g_=Li.create,y_=vo.create,__=mn.create,b_=go.create,w_=Mi.create,E_=Ur.create,x_=cs.create,k_=yo.create,O_=_o.create,N_=ar.create,S_=bo.create,T_=us.create,hf=Xt.create,C_=Rn.create,$_=Zr.create,P_=Xt.createWithPreprocess,I_=Eo.create;var lr=Object.freeze({__proto__:null,defaultErrorMap:co,setErrorMap:Zy,getErrorMap:Ii,makeIssue:Ai,EMPTY_PATH:By,addIssueToContext:ie,ParseStatus:wt,INVALID:Ne,DIRTY:of,OK:St,isAborted:$l,isDirty:Pl,isValid:uo,isAsync:Di,get util(){return Ue},get objectUtil(){return Cl},ZodParsedType:se,getParsedType:sr,ZodType:Pe,ZodString:Jt,ZodNumber:or,ZodBigInt:ir,ZodBoolean:fo,ZodDate:Lr,ZodSymbol:Vi,ZodUndefined:po,ZodNull:ho,ZodAny:as,ZodUnknown:Mr,ZodNever:Vn,ZodVoid:Ri,ZodArray:Yt,ZodObject:et,ZodUnion:mo,ZodDiscriminatedUnion:Li,ZodIntersection:vo,ZodTuple:mn,ZodRecord:go,ZodMap:Mi,ZodSet:Ur,ZodFunction:cs,ZodLazy:yo,ZodLiteral:_o,ZodEnum:ar,ZodNativeEnum:bo,ZodPromise:us,ZodEffects:Xt,ZodTransformer:Xt,ZodOptional:Rn,ZodNullable:Zr,ZodDefault:wo,ZodCatch:Ui,ZodNaN:Zi,BRAND:e_,ZodBranded:cf,ZodPipeline:Eo,ZodReadonly:Bi,custom:uf,Schema:Pe,ZodSchema:Pe,late:t_,get ZodFirstPartyTypeKind(){return _e},coerce:{string:t=>Jt.create({...t,coerce:!0}),number:t=>or.create({...t,coerce:!0}),boolean:t=>fo.create({...t,coerce:!0}),bigint:t=>ir.create({...t,coerce:!0}),date:t=>Lr.create({...t,coerce:!0})},any:c_,array:p_,bigint:s_,boolean:pf,date:o_,discriminatedUnion:g_,effect:hf,enum:N_,function:x_,instanceof:n_,intersection:y_,lazy:k_,literal:O_,map:w_,nan:r_,nativeEnum:S_,never:d_,null:l_,nullable:$_,number:ff,object:h_,oboolean:()=>pf().optional(),onumber:()=>ff().optional(),optional:C_,ostring:()=>df().optional(),pipeline:I_,preprocess:P_,promise:T_,record:b_,set:E_,strictObject:m_,string:df,symbol:i_,transformer:hf,tuple:__,undefined:a_,union:v_,unknown:u_,void:f_,NEVER:Ne,ZodIssueCode:H,quotelessJson:Uy,ZodError:Gt}),cr=Symbol("storefront");function A_(t,e=100){let n=0;return async(...s)=>{clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}var D_=lr.object({source:lr.literal("moonbase-checkout"),event:lr.literal("close"),intent:lr.string().optional()}),V_=lr.object({source:lr.literal("moonbase-checkout"),event:lr.literal("completed")}),R_=lr.discriminatedUnion("event",[D_,V_]);function mf(t){if(typeof window>"u"){console.warn("Can not mount checkout server side");return}const e=document.createElement("iframe");e.id="moonbase-checkout",e.src=t,e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.right="0px",e.style.border="none",e.style.colorScheme="normal",e.style.backgroundColor="transparent",e.style.zIndex=Number.MAX_SAFE_INTEGER.toString(),e.setAttribute("background","transparent"),e.setAttribute("frameborder","0"),e.setAttribute("allowtransparency","true"),e.height="100%",e.width="100%",document.body.append(e),document.documentElement.style.overflow="hidden",window.onmessage=function(n){var r;try{const s=R_.parse(n.data);s.event==="close"&&(document.body.contains(e)&&(document.documentElement.style.removeProperty("overflow"),document.body.removeChild(e)),window.dispatchEvent(new CustomEvent("moonbase-checkout-closed",{detail:s}))),s.event==="completed"&&window.dispatchEvent(new CustomEvent("moonbase-checkout-completed",{detail:s}))}catch(s){((r=n.data)==null?void 0:r.source)==="moonbase-checkout"&&console.error("Could not parse event:",n.data,s)}}}var Fi=class gt{constructor(e,n,r){this.configuration=e,this.client=n,this.stateFactory=r,this.hasUtm=ee(()=>!!this.utm.value&&Object.values(this.utm.value).some(l=>!!l)),this.currentUser=C(null),this.loadedUser=C(!1),this.debouncedPushOrderContent=A_(l=>this.client.orders.pushContent(l,void 0,this.hasUtm.value?this.utm.value:void 0),500);var s;if(typeof window>"u"){this.currentOrder=C({id:Tl(),status:js.Open,currency:"",items:[],couponsApplied:[]}),this.storefront=r(gt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${gt.storefrontKey}_loaded`,!1),this.utm=r(`${gt.storefrontKey}_utm`,void 0);return}const o=new URLSearchParams(window.location.search);this.utm=r(`${gt.storefrontKey}_utm`,{referrer:((s=window.document.referrer)==null?void 0:s.replace(/https?:\/\//g,"").split("/")[0])||void 0,source:o.get("utm_source")||void 0,medium:o.get("utm_medium")||void 0,campaign:o.get("utm_campaign")||void 0,term:o.get("utm_term")||void 0,content:o.get("utm_content")||void 0}),window.addEventListener("storage",l=>this.handleStorageUpdate(l));const i=localStorage.getItem(gt.sessionKey);i?(this.currentOrder=C(JSON.parse(i)),this.refreshOrder()):this.currentOrder=C({id:Tl(),status:js.Open,currency:"",items:[],couponsApplied:[]});const a=localStorage.getItem(gt.storefrontKey);if(a?(this.storefront=r(gt.storefrontKey,JSON.parse(a)),this.loadedStorefront=r(`${gt.storefrontKey}_loaded`,!0)):(this.storefront=r(gt.storefrontKey,{suggestedCurrency:"",bundles:[],products:[]}),this.loadedStorefront=r(`${gt.storefrontKey}_loaded`,!1)),this.client.tokenStore.hasAccessToken&&(this.currentUser.value=this.client.tokenStore.user),this.updateStorefront(),this.updateUser(),window.location){const l=new URLSearchParams(window.location.search),c=l.get("mb_intent"),u=l.get("mb_endpoint");if(c==="checkout"&&l.get("mb_complete")&&u){const d=Object.fromEntries([...l.entries()].filter(([m])=>!m.startsWith("mb_"))),f=new URL(decodeURIComponent(u));for(const m of Object.keys(d))f.searchParams.append(m,d[m]);mf(f.toString()),window.history.replaceState(null,"",window.location.href.split("?")[0])}}window.addEventListener("moonbase-checkout-completed",()=>this.resetOrder())}get loadedStorefrontPromise(){return new Promise(e=>{lt(this.loadedStorefront,n=>{n&&e()},{immediate:!0})})}get loadedUserPromise(){return new Promise(e=>{lt(this.loadedUser,n=>{n&&e()},{immediate:!0})})}onCheckoutCompleted(e){window.addEventListener("moonbase-checkout-completed",()=>e())}onCheckoutClosed(e){window.addEventListener("moonbase-checkout-closed",n=>e(n.detail.intent))}install(e){e.provide(cr,this),console.log("Moonbase.sh storefront installed, learn more at https://moonbase.sh/docs")}async updateUser(){try{this.currentUser.value=await this.client.identity.get()}catch(e){e instanceof Ea||console.error("Could not load user",e)}finally{this.loadedUser.value=!0}}async updateStorefront(){const e=await this.client.storefront.get(this.hasUtm.value?this.utm.value:void 0);e&&(typeof window<"u"&&localStorage.setItem(gt.storefrontKey,JSON.stringify(e)),this.storefront.value=e,this.loadedStorefront.value=!0,this.currentOrder.value.currency||(this.currentOrder.value.currency=e.suggestedCurrency))}async pushOrderContent(){typeof window<"u"&&localStorage.setItem(gt.sessionKey,JSON.stringify(this.currentOrder.value)),this.debouncedPushOrderContent(this.currentOrder.value)}handleStorageUpdate(e){switch(e.key){case gt.sessionKey:this.currentOrder.value=JSON.parse(e.newValue);break;case gt.storefrontKey:this.storefront.value=JSON.parse(e.newValue);break}}async refreshOrder(){try{const e=await this.client.orders.get(this.currentOrder.value.id);e&&(e.status!==js.Open?this.resetOrder():(typeof window<"u"&&localStorage.setItem(gt.sessionKey,JSON.stringify(e)),this.currentOrder.value=e))}catch(e){e!=null&&this.resetOrder()}}resetOrder(){var e;this.currentOrder.value={id:Tl(),currency:((e=this.storefront.value)==null?void 0:e.suggestedCurrency)||"",status:js.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(gt.sessionKey)}};Fi.userKey="moonbase_user",Fi.sessionKey="moonbase_session",Fi.storefrontKey="moonbase_storefront";var j_=Fi;function vf(t,e){const n=e??Me(cr);if(!n)throw new Error("No storefront configured");return ee(()=>n.storefront.value.bundles.find(r=>r.id===t)||null)}function gf(t,e){const n=e??Me(cr);if(!n)throw new Error("No storefront configured");return ee(()=>n.storefront.value.products.find(r=>r.id===t)||null)}function Hi(t){const e=Me(cr);if(!e)throw new Error("No storefront configured");return{getLicenses:async n=>e.client.inventory.licenses.get(n),getLicenseActivations:async(n,r)=>e.client.inventory.licenses.getActivations(n,r),getProduct:async(n,r)=>e.client.inventory.products.get(n,r),getProducts:async n=>e.client.inventory.products.getOwned(n),getProductLicenses:async(n,r)=>e.client.inventory.products.getLicenses(n,r),getProductActivations:async(n,r)=>e.client.inventory.products.getActivations(n,r),revokeActivation:async n=>e.client.inventory.licenses.revokeActivation(n.licenseId,n.id),activateProduct:async(n,r)=>e.client.inventory.activation.activate(n,r),downloadProduct:async n=>{if(!n.path)throw new Error("Product is not downloadable");window.location.href=await e.client.inventory.products.getDownloadUrl(n.path)}}}function L_(t,e){const n=Me(cr),r=sv(t);if(!r)throw new Error("No request ID was given when calling `useActivationRequest`");if(!n)throw new Error("No storefront configured");const s=n.stateFactory(`activation-request-${r}`,null),o=n.stateFactory(`activation-request-${r}-error`,null),i=n.stateFactory(`activation-request-${r}-loading`,!0),a=n.stateFactory(`activation-request-${r}-fulfilling`,!1),l=n.stateFactory(`activation-request-${r}-completing`,!1),c=n.stateFactory(`activation-request-${r}-completion-timeout`,null),u=async()=>{await n.client.activationRequests.isCompleted(r)&&s.value?(s.value.status=on.Completed,l.value=!1):c.value=setTimeout(u,1500)};return r&&r.length>0?n.client.activationRequests.get(r).then(d=>{s.value=d,s.value.status===on.Fulfilled&&(l.value=!0,u()),i.value=!1}).catch(d=>{o.value=d,i.value=!1}):(o.value=new Error("Missing request id"),i.value=!1),Qa(()=>{c.value&&clearTimeout(c.value)}),lt(n.currentUser,async()=>{var d,f;if(!(!r||(f=(d=s.value)==null?void 0:d.licenseEligibility)!=null&&f.eligible)){i.value=!0;try{s.value=await n.client.activationRequests.get(r),s.value.status===on.Fulfilled&&(l.value=!0,u())}catch(m){o.value=m}i.value=!1}}),{activationRequest:s,loading:i,fulfilling:a,completing:l,error:o,isInstalled:ee(()=>{var d;return s&&((d=s.value)==null?void 0:d.status)===on.Completed}),fulfillLicense:async()=>{a.value=!0,s.value=await n.client.activationRequests.fulfillLicense(r),a.value=!1,l.value=!0,u()},fulfillTrial:async()=>{a.value=!0,s.value=await n.client.activationRequests.fulfillTrial(r),a.value=!1,l.value=!0,u()},cancel:async()=>{var d;((d=s.value)==null?void 0:d.status)!==on.Cancelled&&(s.value=await n.client.activationRequests.cancel(r))}}}function M_(t){const e=Me(cr);if(!e)throw new Error("No storefront configured");return{peek:async n=>{try{return await e.client.vouchers.peek(n)}catch(r){throw r instanceof rs?new Error("Voucher code invalid"):r}},redeem:async n=>{try{return await e.client.vouchers.redeem(n)}catch(r){throw r instanceof rs?new Error("Voucher code invalid"):r}}}}function Dl(t){const e=t??Me(cr);if(!e)throw new Error("No storefront configured");return{items:ee(()=>e.currentOrder.value.items.map(n=>{if(n.type==="Product"){const r=e.storefront.value.products.find(i=>i.id===n.productId),o=((r==null?void 0:r.variations)||[]).find(i=>i.id===n.variationId);return{...n,product:r,variation:o,price:o==null?void 0:o.price}}else{const r=e.storefront.value.bundles.find(i=>i.id===n.bundleId),o=((r==null?void 0:r.variations)||[]).find(i=>i.id===n.variationId);return{...n,bundle:r,variation:o,price:o==null?void 0:o.price}}})),currency:ee(()=>e.currentOrder.value.currency||e.storefront.value.suggestedCurrency),total:ee(()=>{const n=e.currentOrder.value.currency||e.storefront.value.suggestedCurrency;return{amount:e.currentOrder.value.items.reduce((s,o)=>{var i,a,l,c,u,d;let f;if(o.type==="Product"){const m=e.storefront.value.products.find(k=>k.id===o.productId),E=((m==null?void 0:m.variations)||[]).find(k=>k.id===o.variationId);f=(l=(a=E==null?void 0:E.price[n])!=null?a:(i=m==null?void 0:m.defaultVariation)==null?void 0:i.price[n])!=null?l:0}else{const m=e.storefront.value.bundles.find(k=>k.id===o.bundleId),E=((m==null?void 0:m.variations)||[]).find(k=>k.id===o.variationId);f=(d=(u=E==null?void 0:E.price[n])!=null?u:(c=m==null?void 0:m.defaultVariation)==null?void 0:c.price[n])!=null?d:0}return s+f*o.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=b(n),r??(r=n.defaultVariation),!r)throw new Error("Added item does not have a default variation, and none have been specified");const s=`${n.type==="bundle"?"b":"p"}/${n.id}/${r.id}`;let o=e.currentOrder.value.items.find(i=>i.id===s);o?o.quantity+=1:n.type==="bundle"?(o={id:s,type:"Bundle",bundleId:n.id,bundle:n,quantity:1,variation:r,variationId:r.id,price:r.price},e.currentOrder.value.items.push(o)):n.type==="product"&&(o={id:s,type:"Product",productId:n.id,product:n,quantity:1,variation:r,variationId:r.id,price:r.price},e.currentOrder.value.items.push(o)),e.pushOrderContent()},setQuantity:(n,r)=>{const s=e.currentOrder.value.items.find(o=>o.id===n.id);if(!s)throw new Error("Cart item not found");if(s.quantity=r,s.quantity<=0){const o=e.currentOrder.value.items.findIndex(i=>i.id===s.id);e.currentOrder.value.items.splice(o,1)}e.pushOrderContent()},removeFromCart:n=>{const r=e.currentOrder.value.items.findIndex(s=>s.id===n.id);e.currentOrder.value.items.splice(r,1),e.pushOrderContent()},checkout:async n=>{const r=new URL(n,document.baseURI).href,s=await e.client.orders.pushContent(e.currentOrder.value,{returnUrl:r});if(s.embeddedCheckoutUrl&&typeof window<"u"){const o=s.embeddedCheckoutUrl;return new Promise(i=>{mf(o.replace("acme-co.beta.moonbase.sh","localhost:3002")),window.addEventListener("moonbase-checkout-closed",a=>{i({next:a.detail.next})})})}else{if(s.checkoutUrl&&typeof window<"u")return window.location.href=s.checkoutUrl,{next:void 0};throw new Error("No checkout URL found")}}}}function It(t){const e=t??Me(cr);if(!e)throw new Error("No storefront configured");return{user:e.currentUser,loaded:e.loadedUser,loadedPromise:e.loadedUserPromise,signIn:async(n,r)=>{const s=await e.client.identity.signIn(n,r);return e.currentUser.value=s,e.updateStorefront(),s},signUp:async(n,r,s,o,i,a,l)=>{const c=await e.client.identity.signUp(n,r,s,o,i,a,l);return e.currentUser.value=c,e.updateStorefront(),c},signOut:async()=>{e.client.tokenStore.setUser(null),await e.updateStorefront(),e.currentUser.value=null},update:async(n,r,s,o)=>{const i=await e.client.identity.update(n,r,s,o);return e.currentUser.value&&(e.currentUser.value.name=n,o&&(e.currentUser.value.communicationPreferences=o)),i},setPassword:async(n,r)=>{await e.client.identity.setPassword(n,r)},forgotPassword:async n=>{await e.client.identity.forgotPassword(n)},resetPassword:async(n,r,s)=>{await e.client.identity.resetPassword(n,r,s)},confirmAccount:async(n,r)=>await e.client.identity.confirmAccount(n,r),confirmEmail:async(n,r)=>await e.client.identity.confirmEmail(n,r),confirmEmailChange:async(n,r)=>{await e.client.identity.confirmEmailChange(n,r),e.updateUser()}}}function U_(t,e){const n={endpoint:t};return new j_(n,new fm(n),(r,s)=>C(s))}var yf=!1;function zi(t,e,n){return Array.isArray(t)?(t.length=Math.max(t.length,e),t.splice(e,1,n),n):(t[e]=n,n)}function Vl(t,e){if(Array.isArray(t)){t.splice(e,1);return}delete t[e]}function Z_(){return _f().__VUE_DEVTOOLS_GLOBAL_HOOK__}function _f(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const B_=typeof Proxy=="function",F_="devtools-plugin:setup",H_="plugin:settings:set";let ds,Rl;function z_(){var t;return ds!==void 0||(typeof window<"u"&&window.performance?(ds=!0,Rl=window.performance):typeof globalThis<"u"&&(!((t=globalThis.perf_hooks)===null||t===void 0)&&t.performance)?(ds=!0,Rl=globalThis.perf_hooks.performance):ds=!1),ds}function q_(){return z_()?Rl.now():Date.now()}class W_{constructor(e,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=n;const r={};if(e.settings)for(const i in e.settings){const a=e.settings[i];r[i]=a.defaultValue}const s=`__vue-devtools-plugin-settings__${e.id}`;let o=Object.assign({},r);try{const i=localStorage.getItem(s),a=JSON.parse(i);Object.assign(o,a)}catch{}this.fallbacks={getSettings(){return o},setSettings(i){try{localStorage.setItem(s,JSON.stringify(i))}catch{}o=i},now(){return q_()}},n&&n.on(H_,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(c=>{this.targetQueue.push({method:a,args:l,resolve:c})})})}async setRealTarget(e){this.target=e;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function bf(t,e){const n=t,r=_f(),s=Z_(),o=B_&&n.enableEarlyProxy;if(s&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!o))s.emit(F_,t,e);else{const i=o?new W_(n,s):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:e,proxy:i}),i&&e(i.proxiedTarget)}}var Le={};let xo;const ko=t=>xo=t,wf=Le.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function Br(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var vn;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(vn||(vn={}));const Fr=typeof window<"u",Ef=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function K_(t,{autoBom:e=!1}={}){return e&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\uFEFF",t],{type:t.type}):t}function jl(t,e,n){const r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){Of(r.response,e,n)},r.onerror=function(){console.error("could not download file")},r.send()}function xf(t){const e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function qi(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}const Wi=typeof navigator=="object"?navigator:{userAgent:""},kf=/Macintosh/.test(Wi.userAgent)&&/AppleWebKit/.test(Wi.userAgent)&&!/Safari/.test(Wi.userAgent),Of=Fr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!kf?G_:"msSaveOrOpenBlob"in Wi?J_:Y_:()=>{};function G_(t,e="download",n){const r=document.createElement("a");r.download=e,r.rel="noopener",typeof t=="string"?(r.href=t,r.origin!==location.origin?xf(r.href)?jl(t,e,n):(r.target="_blank",qi(r)):qi(r)):(r.href=URL.createObjectURL(t),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){qi(r)},0))}function J_(t,e="download",n){if(typeof t=="string")if(xf(t))jl(t,e,n);else{const r=document.createElement("a");r.href=t,r.target="_blank",setTimeout(function(){qi(r)})}else navigator.msSaveOrOpenBlob(K_(t,n),e)}function Y_(t,e,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof t=="string")return jl(t,e,n);const s=t.type==="application/octet-stream",o=/constructor/i.test(String(Ef.HTMLElement))||"safari"in Ef,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||s&&o||kf)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let l=a.result;if(typeof l!="string")throw r=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=l:location.assign(l),r=null},a.readAsDataURL(t)}else{const a=URL.createObjectURL(t);r?r.location.assign(a):location.href=a,r=null,setTimeout(function(){URL.revokeObjectURL(a)},4e4)}}function dt(t,e){const n="🍍 "+t;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,e):e==="error"?console.error(n):e==="warn"?console.warn(n):console.log(n)}function Ll(t){return"_a"in t&&"install"in t}function Nf(){if(!("clipboard"in navigator))return dt("Your browser doesn't support the Clipboard API","error"),!0}function Sf(t){return t instanceof Error&&t.message.toLowerCase().includes("document is not focused")?(dt('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function X_(t){if(!Nf())try{await navigator.clipboard.writeText(JSON.stringify(t.state.value)),dt("Global state copied to clipboard.")}catch(e){if(Sf(e))return;dt("Failed to serialize the state. Check the console for more details.","error"),console.error(e)}}async function Q_(t){if(!Nf())try{Tf(t,JSON.parse(await navigator.clipboard.readText())),dt("Global state pasted from clipboard.")}catch(e){if(Sf(e))return;dt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(e)}}async function eb(t){try{Of(new Blob([JSON.stringify(t.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(e){dt("Failed to export the state as JSON. Check the console for more details.","error"),console.error(e)}}let jn;function tb(){jn||(jn=document.createElement("input"),jn.type="file",jn.accept=".json");function t(){return new Promise((e,n)=>{jn.onchange=async()=>{const r=jn.files;if(!r)return e(null);const s=r.item(0);return e(s?{text:await s.text(),file:s}:null)},jn.oncancel=()=>e(null),jn.onerror=n,jn.click()})}return t}async function nb(t){try{const n=await tb()();if(!n)return;const{text:r,file:s}=n;Tf(t,JSON.parse(r)),dt(`Global state imported from "${s.name}".`)}catch(e){dt("Failed to import the state from JSON. Check the console for more details.","error"),console.error(e)}}function Tf(t,e){for(const n in e){const r=t.state.value[n];r?Object.assign(r,e[n]):t.state.value[n]=e[n]}}function Qt(t){return{_custom:{display:t}}}const Cf="🍍 Pinia (root)",Ki="_root";function rb(t){return Ll(t)?{id:Ki,label:Cf}:{id:t.$id,label:t.$id}}function sb(t){if(Ll(t)){const n=Array.from(t._s.keys()),r=t._s;return{state:n.map(o=>({editable:!0,key:o,value:t.state.value[o]})),getters:n.filter(o=>r.get(o)._getters).map(o=>{const i=r.get(o);return{editable:!1,key:o,value:i._getters.reduce((a,l)=>(a[l]=i[l],a),{})}})}}const e={state:Object.keys(t.$state).map(n=>({editable:!0,key:n,value:t.$state[n]}))};return t._getters&&t._getters.length&&(e.getters=t._getters.map(n=>({editable:!1,key:n,value:t[n]}))),t._customProperties.size&&(e.customProperties=Array.from(t._customProperties).map(n=>({editable:!0,key:n,value:t[n]}))),e}function ob(t){return t?Array.isArray(t)?t.reduce((e,n)=>(e.keys.push(n.key),e.operations.push(n.type),e.oldValue[n.key]=n.oldValue,e.newValue[n.key]=n.newValue,e),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Qt(t.type),key:Qt(t.key),oldValue:t.oldValue,newValue:t.newValue}:{}}function ib(t){switch(t){case vn.direct:return"mutation";case vn.patchFunction:return"$patch";case vn.patchObject:return"$patch";default:return"unknown"}}let fs=!0;const Gi=[],Hr="pinia:mutations",Et="pinia",{assign:ab}=Object,Ji=t=>"🍍 "+t;function lb(t,e){bf({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Gi,app:t},n=>{typeof n.now!="function"&&dt("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:Hr,label:"Pinia 🍍",color:15064968}),n.addInspector({id:Et,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{X_(e)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Q_(e),n.sendInspectorTree(Et),n.sendInspectorState(Et)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{eb(e)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await nb(e),n.sendInspectorTree(Et),n.sendInspectorState(Et)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const s=e._s.get(r);s?typeof s.$reset!="function"?dt(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(s.$reset(),dt(`Store "${r}" reset.`)):dt(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((r,s)=>{const o=r.componentInstance&&r.componentInstance.proxy;if(o&&o._pStores){const i=r.componentInstance.proxy._pStores;Object.values(i).forEach(a=>{r.instanceData.state.push({type:Ji(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:Ee(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((l,c)=>(l[c]=a.$state[c],l),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:Ji(a.$id),key:"getters",editable:!1,value:a._getters.reduce((l,c)=>{try{l[c]=a[c]}catch(u){l[c]=u}return l},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===t&&r.inspectorId===Et){let s=[e];s=s.concat(Array.from(e._s.values())),r.rootNodes=(r.filter?s.filter(o=>"$id"in o?o.$id.toLowerCase().includes(r.filter.toLowerCase()):Cf.toLowerCase().includes(r.filter.toLowerCase())):s).map(rb)}}),globalThis.$pinia=e,n.on.getInspectorState(r=>{if(r.app===t&&r.inspectorId===Et){const s=r.nodeId===Ki?e:e._s.get(r.nodeId);if(!s)return;s&&(r.nodeId!==Ki&&(globalThis.$store=Ee(s)),r.state=sb(s))}}),n.on.editInspectorState((r,s)=>{if(r.app===t&&r.inspectorId===Et){const o=r.nodeId===Ki?e:e._s.get(r.nodeId);if(!o)return dt(`store "${r.nodeId}" not found`,"error");const{path:i}=r;Ll(o)?i.unshift("state"):(i.length!==1||!o._customProperties.has(i[0])||i[0]in o.$state)&&i.unshift("$state"),fs=!1,r.set(o,i,r.state.value),fs=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const s=r.type.replace(/^🍍\s*/,""),o=e._s.get(s);if(!o)return dt(`store "${s}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return dt(`Invalid path for store "${s}":
|
|
17
18
|
${i}
|
|
18
|
-
Only state can be modified.`);i[0]="$state",
|
|
19
|
+
Only state can be modified.`);i[0]="$state",fs=!1,r.set(o,i,r.state.value),fs=!0}})})}function cb(t,e){Gi.includes(Ji(e.$id))||Gi.push(Ji(e.$id)),bf({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Gi,app:t,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;e.$onAction(({after:i,onError:a,name:l,args:c})=>{const u=$f++;n.addTimelineEvent({layerId:Hr,event:{time:r(),title:"🛫 "+l,subtitle:"start",data:{store:Qt(e.$id),action:Qt(l),args:c},groupId:u}}),i(d=>{ur=void 0,n.addTimelineEvent({layerId:Hr,event:{time:r(),title:"🛬 "+l,subtitle:"end",data:{store:Qt(e.$id),action:Qt(l),args:c,result:d},groupId:u}})}),a(d=>{ur=void 0,n.addTimelineEvent({layerId:Hr,event:{time:r(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:Qt(e.$id),action:Qt(l),args:c,error:d},groupId:u}})})},!0),e._customProperties.forEach(i=>{lt(()=>b(e[i]),(a,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(Et),fs&&n.addTimelineEvent({layerId:Hr,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:l},groupId:ur}})},{deep:!0})}),e.$subscribe(({events:i,type:a},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(Et),!fs)return;const c={time:r(),title:ib(a),data:ab({store:Qt(e.$id)},ob(i)),groupId:ur};a===vn.patchFunction?c.subtitle="⤵️":a===vn.patchObject?c.subtitle="🧩":i&&!Array.isArray(i)&&(c.subtitle=i.type),i&&(c.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:Hr,event:c})},{detached:!0,flush:"sync"});const s=e._hotUpdate;e._hotUpdate=Gn(i=>{s(i),n.addTimelineEvent({layerId:Hr,event:{time:r(),title:"🔥 "+e.$id,subtitle:"HMR update",data:{store:Qt(e.$id),info:Qt("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(Et),n.sendInspectorState(Et)});const{$dispose:o}=e;e.$dispose=()=>{o(),n.notifyComponentUpdate(),n.sendInspectorTree(Et),n.sendInspectorState(Et),n.getSettings().logStoreChanges&&dt(`Disposed "${e.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(Et),n.sendInspectorState(Et),n.getSettings().logStoreChanges&&dt(`"${e.$id}" store installed 🆕`)})}let $f=0,ur;function Pf(t,e,n){const r=e.reduce((s,o)=>(s[o]=Ee(t)[o],s),{});for(const s in r)t[s]=function(){const o=$f,i=n?new Proxy(t,{get(...l){return ur=o,Reflect.get(...l)},set(...l){return ur=o,Reflect.set(...l)}}):t;ur=o;const a=r[s].apply(i,arguments);return ur=void 0,a}}function ub({app:t,store:e,options:n}){if(!e.$id.startsWith("__hot:")){if(e._isOptionsAPI=!!n.state,!e._p._testing){Pf(e,Object.keys(n.actions),e._isOptionsAPI);const r=e._hotUpdate;Ee(e)._hotUpdate=function(s){r.apply(this,arguments),Pf(e,Object.keys(s._hmrPayload.actions),!!e._isOptionsAPI)}}cb(t,e)}}function db(){const t=Qc(!0),e=t.run(()=>C({}));let n=[],r=[];const s=Gn({install(o){ko(s),s._a=o,o.provide(wf,s),o.config.globalProperties.$pinia=s,Le.NODE_ENV!=="production"&&Le.NODE_ENV!=="test"&&Fr&&lb(o,s),r.forEach(i=>n.push(i)),r=[]},use(o){return!this._a&&!yf?r.push(o):n.push(o),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return Le.NODE_ENV!=="production"&&Le.NODE_ENV!=="test"&&typeof Proxy<"u"&&s.use(ub),s}function If(t,e){for(const n in e){const r=e[n];if(!(n in t))continue;const s=t[n];Br(s)&&Br(r)&&!Qe(r)&&!Nn(r)?t[n]=If(s,r):t[n]=r}return t}const Af=()=>{};function Df(t,e,n,r=Af){t.push(e);const s=()=>{const o=t.indexOf(e);o>-1&&(t.splice(o,1),r())};return!n&&eu()&&Im(s),s}function ps(t,...e){t.slice().forEach(n=>{n(...e)})}const fb=t=>t(),Vf=Symbol(),Ml=Symbol();function Ul(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,r)=>t.set(r,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n],s=t[n];Br(s)&&Br(r)&&t.hasOwnProperty(n)&&!Qe(r)&&!Nn(r)?t[n]=Ul(s,r):t[n]=r}return t}const pb=Le.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function hb(t){return!Br(t)||!t.hasOwnProperty(pb)}const{assign:Bt}=Object;function Rf(t){return!!(Qe(t)&&t.effect)}function jf(t,e,n,r){const{state:s,actions:o,getters:i}=e,a=n.state.value[t];let l;function c(){!a&&(Le.NODE_ENV==="production"||!r)&&(n.state.value[t]=s?s():{});const u=Le.NODE_ENV!=="production"&&r?Su(C(s?s():{}).value):Su(n.state.value[t]);return Bt(u,o,Object.keys(i||{}).reduce((d,f)=>(Le.NODE_ENV!=="production"&&f in u&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${t}".`),d[f]=Gn(ee(()=>{ko(n);const m=n._s.get(t);return i[f].call(m,m)})),d),{}))}return l=Zl(t,c,e,n,r,!0),l}function Zl(t,e,n={},r,s,o){let i;const a=Bt({actions:{}},n);if(Le.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const l={deep:!0};Le.NODE_ENV!=="production"&&!yf&&(l.onTrigger=R=>{c?m=R:c==!1&&!N._hotUpdating&&(Array.isArray(m)?m.push(R):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let c,u,d=[],f=[],m;const _=r.state.value[t];!o&&!_&&(Le.NODE_ENV==="production"||!s)&&(r.state.value[t]={});const E=C({});let k;function A(R){let V;c=u=!1,Le.NODE_ENV!=="production"&&(m=[]),typeof R=="function"?(R(r.state.value[t]),V={type:vn.patchFunction,storeId:t,events:m}):(Ul(r.state.value[t],R),V={type:vn.patchObject,payload:R,storeId:t,events:m});const I=k=Symbol();qs().then(()=>{k===I&&(c=!0)}),u=!0,ps(d,V,r.state.value[t])}const B=o?function(){const{state:V}=n,I=V?V():{};this.$patch(ce=>{Bt(ce,I)})}:Le.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${t}" is built using the setup syntax and does not implement $reset().`)}:Af;function T(){i.stop(),d=[],f=[],r._s.delete(t)}const J=(R,V="")=>{if(Vf in R)return R[Ml]=V,R;const I=function(){ko(r);const ce=Array.from(arguments),Ze=[],w=[];function $(be){Ze.push(be)}function Q(be){w.push(be)}ps(f,{args:ce,name:I[Ml],store:N,after:$,onError:Q});let oe;try{oe=R.apply(this&&this.$id===t?this:N,ce)}catch(be){throw ps(w,be),be}return oe instanceof Promise?oe.then(be=>(ps(Ze,be),be)).catch(be=>(ps(w,be),Promise.reject(be))):(ps(Ze,oe),oe)};return I[Vf]=!0,I[Ml]=V,I},P=Gn({actions:{},getters:{},state:[],hotState:E}),z={_p:r,$id:t,$onAction:Df.bind(null,f),$patch:A,$reset:B,$subscribe(R,V={}){const I=Df(d,R,V.detached,()=>ce()),ce=i.run(()=>lt(()=>r.state.value[t],Ze=>{(V.flush==="sync"?u:c)&&R({storeId:t,type:vn.direct,events:m},Ze)},Bt({},l,V)));return I},$dispose:T},N=Bs(Le.NODE_ENV!=="production"||Le.NODE_ENV!=="production"&&Le.NODE_ENV!=="test"&&Fr?Bt({_hmrPayload:P,_customProperties:Gn(new Set)},z):z);r._s.set(t,N);const K=(r._a&&r._a.runWithContext||fb)(()=>r._e.run(()=>(i=Qc()).run(()=>e({action:J}))));for(const R in K){const V=K[R];if(Qe(V)&&!Rf(V)||Nn(V))Le.NODE_ENV!=="production"&&s?zi(E.value,R,Ba(K,R)):o||(_&&hb(V)&&(Qe(V)?V.value=_[R]:Ul(V,_[R])),r.state.value[t][R]=V),Le.NODE_ENV!=="production"&&P.state.push(R);else if(typeof V=="function"){const I=Le.NODE_ENV!=="production"&&s?V:J(V,R);K[R]=I,Le.NODE_ENV!=="production"&&(P.actions[R]=V),a.actions[R]=V}else Le.NODE_ENV!=="production"&&Rf(V)&&(P.getters[R]=o?n.getters[R]:V,Fr&&(K._getters||(K._getters=Gn([]))).push(R))}if(Bt(N,K),Bt(Ee(N),K),Object.defineProperty(N,"$state",{get:()=>Le.NODE_ENV!=="production"&&s?E.value:r.state.value[t],set:R=>{if(Le.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");A(V=>{Bt(V,R)})}}),Le.NODE_ENV!=="production"&&(N._hotUpdate=Gn(R=>{N._hotUpdating=!0,R._hmrPayload.state.forEach(V=>{if(V in N.$state){const I=R.$state[V],ce=N.$state[V];typeof I=="object"&&Br(I)&&Br(ce)?If(I,ce):R.$state[V]=ce}zi(N,V,Ba(R.$state,V))}),Object.keys(N.$state).forEach(V=>{V in R.$state||Vl(N,V)}),c=!1,u=!1,r.state.value[t]=Ba(R._hmrPayload,"hotState"),u=!0,qs().then(()=>{c=!0});for(const V in R._hmrPayload.actions){const I=R[V];zi(N,V,J(I,V))}for(const V in R._hmrPayload.getters){const I=R._hmrPayload.getters[V],ce=o?ee(()=>(ko(r),I.call(N,N))):I;zi(N,V,ce)}Object.keys(N._hmrPayload.getters).forEach(V=>{V in R._hmrPayload.getters||Vl(N,V)}),Object.keys(N._hmrPayload.actions).forEach(V=>{V in R._hmrPayload.actions||Vl(N,V)}),N._hmrPayload=R._hmrPayload,N._getters=R._getters,N._hotUpdating=!1})),Le.NODE_ENV!=="production"&&Le.NODE_ENV!=="test"&&Fr){const R={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(V=>{Object.defineProperty(N,V,Bt({value:N[V]},R))})}return r._p.forEach(R=>{if(Le.NODE_ENV!=="production"&&Le.NODE_ENV!=="test"&&Fr){const V=i.run(()=>R({store:N,app:r._a,pinia:r,options:a}));Object.keys(V||{}).forEach(I=>N._customProperties.add(I)),Bt(N,V)}else Bt(N,i.run(()=>R({store:N,app:r._a,pinia:r,options:a})))}),Le.NODE_ENV!=="production"&&N.$state&&typeof N.$state=="object"&&typeof N.$state.constructor=="function"&&!N.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
19
20
|
state: () => new MyClass()
|
|
20
|
-
Found in store "${
|
|
21
|
+
Found in store "${N.$id}".`),_&&o&&n.hydrate&&n.hydrate(N.$state,_),c=!0,u=!0,N}function mb(t,e,n){let r,s;const o=typeof e=="function";r=t,s=o?n:e;function i(a,l){const c=rg();if(a=(Le.NODE_ENV==="test"&&xo&&xo._testing?null:a)||(c?Me(wf,null):null),a&&ko(a),Le.NODE_ENV!=="production"&&!xo)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
21
22
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
22
|
-
This will fail in production.`);a=ko,a._s.has(r)||(s?ka(r,t,o,a):td(r,o,a),Pe.NODE_ENV!=="production"&&(i._pinia=a));const u=a._s.get(r);if(Pe.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=s?ka(d,t,o,a,!0):td(d,Tt({},o),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Pe.NODE_ENV!=="production"&&yr){const d=Is();if(d&&d.proxy&&!l){const f=d.proxy,m="_pStores"in f?f._pStores:f._pStores={};m[r]=u}}return u}return i.$id=r,i}var de=(e=>(e.SignIn="sign_in",e.SignUp="sign_up",e.ForgotPassword="forgot_password",e.ResetPassword="reset_password",e.ConfirmAccount="confirm_account",e.ConfirmEmail="confirm_email",e.ConfirmEmailChange="confirm_email_change",e.ViewAccount="view_account",e.ViewProducts="view_products",e.RedeemVoucher="redeem_voucher",e.DownloadProduct="download_product",e.ActivateProduct="activate_product",e.ViewCart="view_cart",e.AddToCart="add_to_cart",e.Checkout="checkout",e))(de||{});const Dg={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{enable:{signUp:!0}}},Ws=Symbol("options");var Se=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Cart="Cart",e.Activation="Activation",e.Download="Download",e))(Se||{});const Ae=Ig("ui",()=>{const e=T("None"),t=T(null),n=T(null),r=T(null);function o(c,u,d){n.value=d??null,t.value=u,e.value=c}function s(c,u,d){r.value=[c,u,d]}function i(){e.value="None",n.value=null,r.value=null}function a(){const c=r.value;i(),co(()=>{if(c){const[u,d,f]=c;n.value=f??null,t.value=d,e.value=u}})}function l(c){return n.value===null||!n.value[c]?null:n.value[c]}return{active:e,intent:t,parameters:n,next:r,show:o,reset:i,enqueue:s,dequeue:a,getParameter:l}}),Xt=e=>new Promise(t=>setTimeout(t,e)),Ag=["data-visible","data-location"],Vg={key:0,href:"https://moonbase.sh",target:"_blank",class:"moonbase:toolbar-action","data-action-width":"narrow"},Rg=[Jm('<svg viewBox="0 0 512 512" height="18px" width="18px"><g><path fill="currentColor" d="m493.17795,174.6135c6.257,75.3 -30.577,150.948 -100.579,190.758c-66.292,37.697 -145.001,33.405 -205.402,-4.415c0.409,-1.248 0.638,-2.577 0.638,-3.96c0,-7.026 -5.717,-12.743 -12.743,-12.743c-2.876,0 -5.524,0.969 -7.659,2.582c-18.813,-15.259 -35.159,-34.207 -47.856,-56.534c-54.663,-96.122 -21.054,-218.358 75.069,-273.021a201.218,201.218 0 0 1 33.302,-15.124c-32.428,3.667 -64.663,13.809 -94.827,30.962c-104.526,59.443 -149.511,183.241 -113.473,293.249c-3.376,3.057 -5.513,7.459 -5.513,12.362c0,9.207 7.491,16.698 16.698,16.698c0.136,0 0.267,-0.017 0.401,-0.02a252.205,252.205 0 0 0 8.683,16.691c67.869,119.344 219.635,161.073 338.98,93.204a250.416,250.416 0 0 0 32.893,-22.333c1.045,0.331 2.157,0.513 3.311,0.513c6.047,0 10.968,-4.921 10.968,-10.968c0,-0.605 -0.063,-1.196 -0.157,-1.775c69.545,-64.988 96.008,-165.054 67.266,-256.126m-446.526,25.112a5.071,5.071 0 0 1 -5.066,-5.066a5.072,5.072 0 0 1 5.066,-5.067a5.073,5.073 0 0 1 5.066,5.067a5.072,5.072 0 0 1 -5.066,5.066m-15.819,153.944c-8.238,0 -14.94,-6.702 -14.94,-14.94c0,-8.239 6.702,-14.941 14.94,-14.941c8.239,0 14.941,6.702 14.941,14.941c-0.001,8.238 -6.703,14.94 -14.941,14.94m144.258,-7.659c6.057,0 10.985,4.928 10.985,10.986c0,6.058 -4.928,10.985 -10.985,10.985c-6.058,0 -10.986,-4.928 -10.986,-10.985c0.001,-6.059 4.928,-10.986 10.986,-10.986m70.829,133.004c-5.079,0 -9.21,-4.132 -9.21,-9.21c0,-5.079 4.131,-9.21 9.21,-9.21c5.078,0 9.209,4.131 9.209,9.21c0,5.078 -4.13,9.21 -9.209,9.21m169.18,-37.289c-5.078,0 -9.209,-4.132 -9.209,-9.21s4.131,-9.209 9.209,-9.209s9.21,4.131 9.21,9.209s-4.132,9.21 -9.21,9.21"></path><path fill="currentColor" d="m144.78195,275.9675c46.746,82.201 151.278,110.943 233.48,64.197c59.864,-34.044 91.363,-98.736 86.013,-163.13a170.094,170.094 0 0 0 -5.515,-31.052c-23.045,0.567 -63.864,10.137 -104.194,61.671c-52.045,66.5 -186.285,49.153 -228.855,17.372c3.503,17.443 9.796,34.632 19.071,50.942m233.513,-65.677a8.663,8.663 0 1 1 -8.663,8.663a8.662,8.662 0 0 1 8.663,-8.663m-37.006,62.618c7.02,0 12.712,5.691 12.712,12.712s-5.692,12.712 -12.712,12.712c-7.021,0 -12.712,-5.691 -12.712,-12.712s5.691,-12.712 12.712,-12.712m-102.544,12.712a6.78,6.78 0 1 1 0,13.56a6.78,6.78 0 0 1 0,-13.56"></path><ellipse fill="currentColor" ry="7.3075" rx="7.3075" cy="152.05851" cx="251.33138"></ellipse><ellipse fill="currentColor" ry="5.35076" rx="5.35076" cy="210.31151" cx="204.89499"></ellipse><ellipse fill="currentColor" ry="12.09273" rx="12.09273" cy="200.15625" cx="302.28597"></ellipse></g></svg>',1)],jg=["disabled"],Lg=he({__name:"Toolbar",setup(e){const t=T(!1),n=Ae(),r=bt(),o=$e(Ws);return Re(()=>{Xt(100).then(()=>t.value=!0)}),(s,i)=>{var a,l,c,u,d;return _(),N("div",{class:"moonbase:toolbar","data-visible":t.value&&b(n).active===b(Se).None?"true":"false","data-location":b(o).toolbar.location},[(a=b(o))!=null&&a.toolbar.show.moonbase?(_(),N("a",Vg,Rg)):me("",!0),(l=b(o))!=null&&l.toolbar.show.cart?(_(),N("button",{key:1,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=f=>b(n).show(b(Se).Cart,b(de).AddToCart))}," Cart ")):me("",!0),(c=b(o))!=null&&c.toolbar.show.account&&!b(r).user.value?(_(),N("button",{key:2,class:"moonbase:toolbar-action",type:"button",disabled:!b(r).loaded,onClick:i[1]||(i[1]=f=>b(n).show(b(Se).Authentication,b(de).SignIn))}," Log in ",8,jg)):(u=b(o))!=null&&u.toolbar.show.account?(_(),N("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=f=>b(n).show(b(Se).Customer,b(de).ViewAccount))},K((d=b(r).user.value)==null?void 0:d.name),1)):me("",!0)],8,Ag)}}}),Mg=["hidden"],Ug=["for"],Fg=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],Bg=["id"],Hg=["id"],Zg=he({inheritAttrs:!1,__name:"MoonInput",props:{name:{},label:{},placeholder:{},type:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{},hidden:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(_(),N("div",{class:"moonbase:input",hidden:t.hidden||void 0},[O("label",{for:`mb-${t.name}`},K(t.label),9,Ug),O("input",ua({id:`mb-${t.name}`,type:t.type??"text",name:`mb-${t.name}`,placeholder:t.placeholder,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onInput:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.value)})}),null,16,Fg),t.error?(_(),N("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},K(t.error),9,Bg)):t.hint?(_(),N("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},K(t.hint),9,Hg)):me("",!0)],8,Mg))}}),Bn=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},gt=Bn(Zg,[["__scopeId","data-v-65d18d50"]]),qg={},nd=e=>(Uh("data-v-f9a322c4"),e=e(),Fh(),e),Wg={fill:"none",viewBox:"0 0 24 24"},zg=[nd(()=>O("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1)),nd(()=>O("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1))];function Kg(e,t){return _(),N("svg",Wg,zg)}const Pt=Bn(qg,[["render",Kg],["__scopeId","data-v-f9a322c4"]]),Gg=["disabled"],rd=Symbol("form-state"),Hn=he({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(e){const t=e,n=T(!1),r=T(!1),o=T(!1);dt(rd,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await Xt(2500),t.noReset||(r.value=!1)}catch{n.value=!1,o.value=!0,await Xt(2500),o.value=!1}}return(i,a)=>(_(),N("form",{disabled:n.value||r.value,onSubmit:jv(s,["prevent"])},[Wi(i.$slots,"default")],40,Gg))}}),Jg=["disabled","data-success","data-error","data-working"],Yg=["data-visible"],Zn=Bn(he({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=$e(rd),s=X(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(_(),N("button",{class:"moonbase:submit-button",type:"submit",disabled:b(r)||b(o)||b(n),"data-success":b(r)||void 0,"data-error":b(o)||void 0,"data-working":b(n)||void 0},[O("div",{"data-visible":b(n)||void 0,"aria-hidden":"true"},[b(n)?(_(),ke(Pt,{key:0})):me("",!0)],8,Yg),Te(" "+K(s.value),1)],8,Jg))}}),[["__scopeId","data-v-052f0f36"]]),Xg={class:"moonbase:checkbox"},Qg={class:"moonbase:checkbox-container"},ey=["id","name","value","disabled","aria-invalid","aria-describedby"],ty={class:"moonbase:checkbox-description"},ny=["for"],ry=["id"],oy=["id"],od=Bn(he({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(_(),N("div",Xg,[O("div",Qg,[O("input",ua({id:`mb-${t.name}`,type:"checkbox",name:`mb-${t.name}`,value:t.modelValue,disabled:t.disabled,"aria-invalid":!!t.error,"aria-describedby":t.error?`mb-${t.name}-error`:t.hint?`mb-${t.name}-hint`:void 0},t.$attrs,{onChecked:n[0]||(n[0]=r=>{var o;return t.$emit("update:modelValue",(o=r.target)==null?void 0:o.checked)})}),null,16,ey)]),O("div",ty,[O("label",{for:`mb-${t.name}`},K(t.label),9,ny),t.error?(_(),N("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},K(t.error),9,ry)):t.hint?(_(),N("p",{key:1,id:`mb-${t.name}-hint`},K(t.hint),9,oy)):me("",!0)])]))}}),[["__scopeId","data-v-20c4336e"]]),sy=["data-visible"],iy=he({__name:"SignUp",emits:["signedUp"],setup(e,{emit:t}){const n=t,r=Ae(),o=bt(),s=T(""),i=T(r.getParameter("email")??""),a=T(""),l=T(!1),c=T(null);async function u(){c.value=null;try{const d=await o.signUp(s.value,i.value,a.value,null,!0,!0,l.value);Xt(1500).then(()=>n("signedUp",d))}catch(d){throw c.value=d.message,d}}return(d,f)=>(_(),ke(Hn,{handler:u,class:"moonbase:sign-up"},{default:ye(()=>[B(gt,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=m=>s.value=m),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),B(gt,{modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),B(gt,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),B(od,{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=m=>l.value=m),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),B(Zn,{success:"Signed up",label:"Sign up",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!c.value||void 0},K(c.value),9,sy),O("button",{type:"button",onClick:f[4]||(f[4]=m=>b(r).show(b(Se).Authentication,b(de).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),ay={key:0,class:"moonbase:loader"},ly={key:1,class:"moonbase:error","data-visible":""},cy=O("p",null," Please create a new password for your account: ",-1),uy=["data-visible"],dy=he({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(e,{emit:t}){const n=t,r=Ae(),o=bt(),s=T(!0),i=T(null),a=T(""),l=T(null);Re(async()=>{try{const u=r.getParameter("email"),d=r.getParameter("code");if(!u||!d)throw new Error("Link is broken");i.value=await o.confirmAccount(u,d)}catch(u){u instanceof Pr?l.value="Could not find a user to confirm":l.value=u.message}s.value=!1});async function c(){var u,d;if(l.value=null,!!((u=i.value)!=null&&u.resetPasswordToken))try{const f=r.getParameter("email");await o.resetPassword(f,a.value,(d=i.value)==null?void 0:d.resetPasswordToken);const m=await o.signIn(f,a.value);Xt(1500).then(()=>n("confirmedAccount",m))}catch(f){throw l.value=f.message,f}}return(u,d)=>(_(),ke(Hn,{handler:c,class:"moonbase:confirm-account"},{default:ye(()=>[s.value?(_(),N("div",ay,[B(Pt)])):i.value?(_(),N(Ce,{key:2},[O("h3",null," Hi "+K(i.value.name)+", ",1),cy,B(gt,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),B(gt,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),B(Zn,{success:"Password saved",label:"Save password",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,uy)],64)):(_(),N("div",ly,K(l.value),1))]),_:1}))}}),fy=O("h3",null," Forgot your password? ",-1),py=O("p",null," Please enter your email for a reset link: ",-1),hy=["data-visible"],my=he({__name:"ForgotPassword",setup(e){const t=Ae(),n=bt(),r=T(t.getParameter("email")??""),o=T(null),s=T(!1);async function i(){o.value=null;try{await n.forgotPassword(r.value),Xt(1500).then(()=>{s.value=!0})}catch(a){throw a instanceof Pr?o.value="User not found":o.value=a.message,a}}return(a,l)=>(_(),ke(Hn,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:ye(()=>[fy,py,B(gt,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),B(Zn,{success:"Email sent",label:"Reset password",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K(o.value),9,hy)]),_:1}))}}),vy=O("p",null," Please create a new password for your account: ",-1),gy=["data-visible"],yy=he({__name:"ResetPassword",emits:["passwordReset"],setup(e,{emit:t}){const n=t,r=Ae(),o=bt(),s=X(()=>r.getParameter("email")),i=T(""),a=T(null);Re(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(a.value="Link broken, please try again")});async function l(){a.value=null;const c=r.getParameter("code");if(c)try{await o.resetPassword(s.value,i.value,c);const u=await o.signIn(s.value,i.value);Xt(1500).then(()=>n("passwordReset",u))}catch(u){throw a.value=u.message,u}}return(c,u)=>(_(),ke(Hn,{handler:l,class:"moonbase:reset-password"},{default:ye(()=>[O("h3",null," Hi "+K(s.value)+", ",1),vy,B(gt,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),B(gt,{modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),B(Zn,{success:"Password saved",label:"Save password",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!a.value||void 0},K(a.value),9,gy)]),_:1}))}}),_y={class:"moonbase:confirm-email-change"},by={key:0,class:"moonbase:loader"},wy={key:1,class:"moonbase:error","data-visible":""},Ey=O("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1),Oy=he({__name:"ConfirmEmailChange",setup(e){const t=Ae(),{user:n,confirmEmailChange:r}=bt(),o=T(!0),s=T(null);return Re(async()=>{try{const i=t.getParameter("email"),a=t.getParameter("code");if(!i||!a)throw new Error("Link is broken");await r(i,a)}catch(i){s.value=i.message}o.value=!1}),(i,a)=>{var l;return _(),N("div",_y,[o.value?(_(),N("div",by,[B(Pt)])):s.value?(_(),N("div",wy,K(s.value),1)):(_(),N(Ce,{key:2},[O("h3",null," Hi "+K((l=b(n))==null?void 0:l.name)+", ",1),Ey],64))])}}});class Ny{constructor(){Nr(this,"current",this.detect());Nr(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}let To=new Ny;function Ca(e,t,n,r){To.isServer||ft(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function sd(e,t,n,r){To.isServer||ft(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var xt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(xt||{});function Ta(){let e=T(0),t=T(!0);return sd(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function Je(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Je),r}var qn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(qn||{}),Wn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Wn||{});function Qe({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=ad(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return zs(i);if(t&1){const a=s.unmount??!0?0:1;return Je(a,{0(){return null},1(){return zs({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return zs(i)}function zs({props:e,attrs:t,slots:n,slot:r,name:o}){var c;const{as:s,...i}=Pa(e,["unmount","static"]);let a=(c=n.default)==null?void 0:c.call(n,r);const l={};if(r){let u=!1;const d=[];for(const[f,m]of Object.entries(r))typeof m=="boolean"&&(u=!0),m===!0&&d.push(f);u&&(l["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=id(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[u,...d]=a??[];if(!Sy(u)||d.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${o} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(i).concat(Object.keys(t)).map(y=>y.trim()).filter((y,E,S)=>S.indexOf(y)===E).sort((y,E)=>y.localeCompare(E)).map(y=>` - ${y}`).join(`
|
|
23
|
-
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(
|
|
23
|
+
This will fail in production.`);a=xo,a._s.has(r)||(o?Zl(r,e,s,a):jf(r,s,a),Le.NODE_ENV!=="production"&&(i._pinia=a));const u=a._s.get(r);if(Le.NODE_ENV!=="production"&&l){const d="__hot:"+r,f=o?Zl(d,e,s,a,!0):jf(d,Bt({},s),a,!0);l._hotUpdate(f),delete a.state.value[d],a._s.delete(d)}if(Le.NODE_ENV!=="production"&&Fr){const d=Ni();if(d&&d.proxy&&!l){const f=d.proxy,m="_pStores"in f?f._pStores:f._pStores={};m[r]=u}}return u}return i.$id=r,i}var he=(t=>(t.SignIn="sign_in",t.SignUp="sign_up",t.ForgotPassword="forgot_password",t.ResetPassword="reset_password",t.ConfirmAccount="confirm_account",t.ConfirmEmail="confirm_email",t.ConfirmEmailChange="confirm_email_change",t.ViewAccount="view_account",t.ViewProducts="view_products",t.RedeemVoucher="redeem_voucher",t.DownloadProduct="download_product",t.ActivateProduct="activate_product",t.ViewCart="view_cart",t.AddToCart="add_to_cart",t.Checkout="checkout",t))(he||{});const vb={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0,moonbase:!0}},auth:{enable:{signUp:!0}}},Yi=Symbol("options");var Ae=(t=>(t.None="None",t.Authentication="Authentication",t.Customer="Customer",t.Cart="Cart",t.Activation="Activation",t.Download="Download",t))(Ae||{});const Fe=mb("ui",()=>{const t=C("None"),e=C(null),n=C(null),r=C(null);function s(c,u,d){n.value=d??null,e.value=u,t.value=c}function o(c,u,d){r.value=[c,u,d]}function i(){t.value="None",n.value=null,r.value=null}function a(){const c=r.value;i(),qs(()=>{if(c){const[u,d,f]=c;n.value=f??null,e.value=d,t.value=u}})}function l(c){return n.value===null||!n.value[c]?null:n.value[c]}return{active:t,intent:e,parameters:n,next:r,show:s,reset:i,enqueue:o,dequeue:a,getParameter:l}}),gn=t=>new Promise(e=>setTimeout(e,t)),gb=["data-visible","data-location"],yb={key:0,href:"https://moonbase.sh",target:"_blank",class:"moonbase:toolbar-action","data-action-width":"narrow"},_b=[Ug('<svg viewBox="0 0 512 512" height="18px" width="18px"><g><path fill="currentColor" d="m493.17795,174.6135c6.257,75.3 -30.577,150.948 -100.579,190.758c-66.292,37.697 -145.001,33.405 -205.402,-4.415c0.409,-1.248 0.638,-2.577 0.638,-3.96c0,-7.026 -5.717,-12.743 -12.743,-12.743c-2.876,0 -5.524,0.969 -7.659,2.582c-18.813,-15.259 -35.159,-34.207 -47.856,-56.534c-54.663,-96.122 -21.054,-218.358 75.069,-273.021a201.218,201.218 0 0 1 33.302,-15.124c-32.428,3.667 -64.663,13.809 -94.827,30.962c-104.526,59.443 -149.511,183.241 -113.473,293.249c-3.376,3.057 -5.513,7.459 -5.513,12.362c0,9.207 7.491,16.698 16.698,16.698c0.136,0 0.267,-0.017 0.401,-0.02a252.205,252.205 0 0 0 8.683,16.691c67.869,119.344 219.635,161.073 338.98,93.204a250.416,250.416 0 0 0 32.893,-22.333c1.045,0.331 2.157,0.513 3.311,0.513c6.047,0 10.968,-4.921 10.968,-10.968c0,-0.605 -0.063,-1.196 -0.157,-1.775c69.545,-64.988 96.008,-165.054 67.266,-256.126m-446.526,25.112a5.071,5.071 0 0 1 -5.066,-5.066a5.072,5.072 0 0 1 5.066,-5.067a5.073,5.073 0 0 1 5.066,5.067a5.072,5.072 0 0 1 -5.066,5.066m-15.819,153.944c-8.238,0 -14.94,-6.702 -14.94,-14.94c0,-8.239 6.702,-14.941 14.94,-14.941c8.239,0 14.941,6.702 14.941,14.941c-0.001,8.238 -6.703,14.94 -14.941,14.94m144.258,-7.659c6.057,0 10.985,4.928 10.985,10.986c0,6.058 -4.928,10.985 -10.985,10.985c-6.058,0 -10.986,-4.928 -10.986,-10.985c0.001,-6.059 4.928,-10.986 10.986,-10.986m70.829,133.004c-5.079,0 -9.21,-4.132 -9.21,-9.21c0,-5.079 4.131,-9.21 9.21,-9.21c5.078,0 9.209,4.131 9.209,9.21c0,5.078 -4.13,9.21 -9.209,9.21m169.18,-37.289c-5.078,0 -9.209,-4.132 -9.209,-9.21s4.131,-9.209 9.209,-9.209s9.21,4.131 9.21,9.209s-4.132,9.21 -9.21,9.21"></path><path fill="currentColor" d="m144.78195,275.9675c46.746,82.201 151.278,110.943 233.48,64.197c59.864,-34.044 91.363,-98.736 86.013,-163.13a170.094,170.094 0 0 0 -5.515,-31.052c-23.045,0.567 -63.864,10.137 -104.194,61.671c-52.045,66.5 -186.285,49.153 -228.855,17.372c3.503,17.443 9.796,34.632 19.071,50.942m233.513,-65.677a8.663,8.663 0 1 1 -8.663,8.663a8.662,8.662 0 0 1 8.663,-8.663m-37.006,62.618c7.02,0 12.712,5.691 12.712,12.712s-5.692,12.712 -12.712,12.712c-7.021,0 -12.712,-5.691 -12.712,-12.712s5.691,-12.712 12.712,-12.712m-102.544,12.712a6.78,6.78 0 1 1 0,13.56a6.78,6.78 0 0 1 0,-13.56"></path><ellipse fill="currentColor" ry="7.3075" rx="7.3075" cy="152.05851" cx="251.33138"></ellipse><ellipse fill="currentColor" ry="5.35076" rx="5.35076" cy="210.31151" cx="204.89499"></ellipse><ellipse fill="currentColor" ry="12.09273" rx="12.09273" cy="200.15625" cx="302.28597"></ellipse></g></svg>',1)],bb=["disabled"],wb=ve({__name:"Toolbar",setup(t){const e=C(!1),n=Fe(),r=It(),s=Me(Yi);return ze(()=>{gn(100).then(()=>e.value=!0)}),(o,i)=>{var a,l,c,u,d;return y(),O("div",{class:"moonbase:toolbar","data-visible":e.value&&b(n).active===b(Ae).None?"true":"false","data-location":b(s).toolbar.location},[(a=b(s))!=null&&a.toolbar.show.moonbase?(y(),O("a",yb,_b)):ge("",!0),(l=b(s))!=null&&l.toolbar.show.cart?(y(),O("button",{key:1,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=f=>b(n).show(b(Ae).Cart,b(he).AddToCart))}," Cart ")):ge("",!0),(c=b(s))!=null&&c.toolbar.show.account&&!b(r).user.value?(y(),O("button",{key:2,class:"moonbase:toolbar-action",type:"button",disabled:!b(r).loaded,onClick:i[1]||(i[1]=f=>b(n).show(b(Ae).Authentication,b(he).SignIn))}," Log in ",8,bb)):(u=b(s))!=null&&u.toolbar.show.account?(y(),O("button",{key:3,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=f=>b(n).show(b(Ae).Customer,b(he).ViewAccount))},G((d=b(r).user.value)==null?void 0:d.name),1)):ge("",!0)],8,gb)}}}),Eb=["hidden"],xb=["for"],kb=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],Ob=["id"],Nb=["id"],Sb=ve({inheritAttrs:!1,__name:"MoonInput",props:{name:{},label:{},placeholder:{},type:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{},hidden:{type:Boolean}},emits:["update:modelValue"],setup(t){return(e,n)=>(y(),O("div",{class:"moonbase:input",hidden:e.hidden||void 0},[x("label",{for:`mb-${e.name}`},G(e.label),9,xb),x("input",_l({id:`mb-${e.name}`,type:e.type??"text",name:`mb-${e.name}`,placeholder:e.placeholder,value:e.modelValue,disabled:e.disabled,"aria-invalid":!!e.error,"aria-describedby":e.error?`mb-${e.name}-error`:e.hint?`mb-${e.name}-hint`:void 0},e.$attrs,{onInput:n[0]||(n[0]=r=>{var s;return e.$emit("update:modelValue",(s=r.target)==null?void 0:s.value)})}),null,16,kb),e.error?(y(),O("p",{key:0,id:`mb-${e.name}-error`,class:"moonbase:input-hint","data-type":"error"},G(e.error),9,Ob)):e.hint?(y(),O("p",{key:1,id:`mb-${e.name}-hint`,class:"moonbase:input-hint"},G(e.hint),9,Nb)):ge("",!0)],8,Eb))}}),dr=(t,e)=>{const n=t.__vccOpts||t;for(const[r,s]of e)n[r]=s;return n},Tt=dr(Sb,[["__scopeId","data-v-65d18d50"]]),Tb={},Lf=t=>($v("data-v-f9a322c4"),t=t(),Pv(),t),Cb={fill:"none",viewBox:"0 0 24 24"},$b=[Lf(()=>x("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1)),Lf(()=>x("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1))];function Pb(t,e){return y(),O("svg",Cb,$b)}const Ft=dr(Tb,[["render",Pb],["__scopeId","data-v-f9a322c4"]]),Ib=["disabled"],Mf=Symbol("form-state"),fr=ve({__name:"MoonForm",props:{handler:{type:Function},noReset:{type:Boolean}},setup(t){const e=t,n=C(!1),r=C(!1),s=C(!1);_t(Mf,{working:n,isSuccess:r,isError:s});async function o(){n.value=!0;try{await e.handler(),n.value=!1,r.value=!0,await gn(2500),e.noReset||(r.value=!1)}catch{n.value=!1,s.value=!0,await gn(2500),s.value=!1}}return(i,a)=>(y(),O("form",{disabled:n.value||r.value,onSubmit:Sy(o,["prevent"])},[tl(i.$slots,"default")],40,Ib))}}),Ab=["disabled","data-success","data-error","data-working"],Db=["data-visible"],pr=dr(ve({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(t){const e=t,{working:n,isSuccess:r,isError:s}=Me(Mf),o=ee(()=>r.value?e.success:s.value?e.error:e.label);return(i,a)=>(y(),O("button",{class:"moonbase:submit-button",type:"submit",disabled:b(r)||b(s)||b(n),"data-success":b(r)||void 0,"data-error":b(s)||void 0,"data-working":b(n)||void 0},[x("div",{"data-visible":b(n)||void 0,"aria-hidden":"true"},[b(n)?(y(),Ve(Ft,{key:0})):ge("",!0)],8,Db),je(" "+G(o.value),1)],8,Ab))}}),[["__scopeId","data-v-052f0f36"]]),Vb={class:"moonbase:checkbox"},Rb={class:"moonbase:checkbox-container"},jb=["id","name","value","disabled","aria-invalid","aria-describedby"],Lb={class:"moonbase:checkbox-description"},Mb=["for"],Ub=["id"],Zb=["id"],Uf=dr(ve({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){return(e,n)=>(y(),O("div",Vb,[x("div",Rb,[x("input",_l({id:`mb-${e.name}`,type:"checkbox",name:`mb-${e.name}`,value:e.modelValue,disabled:e.disabled,"aria-invalid":!!e.error,"aria-describedby":e.error?`mb-${e.name}-error`:e.hint?`mb-${e.name}-hint`:void 0},e.$attrs,{onChecked:n[0]||(n[0]=r=>{var s;return e.$emit("update:modelValue",(s=r.target)==null?void 0:s.checked)})}),null,16,jb)]),x("div",Lb,[x("label",{for:`mb-${e.name}`},G(e.label),9,Mb),e.error?(y(),O("p",{key:0,id:`mb-${e.name}-error`,"data-type":"error"},G(e.error),9,Ub)):e.hint?(y(),O("p",{key:1,id:`mb-${e.name}-hint`},G(e.hint),9,Zb)):ge("",!0)])]))}}),[["__scopeId","data-v-20c4336e"]]),Bb=["data-visible"],Fb=ve({__name:"SignUp",emits:["signedUp"],setup(t,{emit:e}){const n=e,r=Fe(),s=It(),o=C(""),i=C(r.getParameter("email")??""),a=C(""),l=C(!1),c=C(null);async function u(){c.value=null;try{const d=await s.signUp(o.value,i.value,a.value,null,!0,!0,l.value);gn(1500).then(()=>n("signedUp",d))}catch(d){throw c.value=d.message,d}}return(d,f)=>(y(),Ve(fr,{handler:u,class:"moonbase:sign-up"},{default:ke(()=>[F(Tt,{modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=m=>o.value=m),label:"Full name",name:"name",type:"text",placeholder:"Full name",autocomplete:"name",required:""},null,8,["modelValue"]),F(Tt,{modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),F(Tt,{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),F(Uf,{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=m=>l.value=m),label:"Receive updates and offers by email",name:"newsletter-opt-in"},null,8,["modelValue"]),F(pr,{success:"Signed up",label:"Sign up",error:"Error"}),x("span",{class:"moonbase:error","data-visible":!!c.value||void 0},G(c.value),9,Bb),x("button",{type:"button",onClick:f[4]||(f[4]=m=>b(r).show(b(Ae).Authentication,b(he).SignIn,{email:i.value}))}," I already have an account ")]),_:1}))}}),Hb={key:0,class:"moonbase:loader"},zb={key:1,class:"moonbase:error","data-visible":""},qb=x("p",null," Please create a new password for your account: ",-1),Wb=["data-visible"],Kb=ve({__name:"ConfirmAccount",emits:["confirmedAccount"],setup(t,{emit:e}){const n=e,r=Fe(),s=It(),o=C(!0),i=C(null),a=C(""),l=C(null);ze(async()=>{try{const u=r.getParameter("email"),d=r.getParameter("code");if(!u||!d)throw new Error("Link is broken");i.value=await s.confirmAccount(u,d)}catch(u){u instanceof rs?l.value="Could not find a user to confirm":l.value=u.message}o.value=!1});async function c(){var u,d;if(l.value=null,!!((u=i.value)!=null&&u.resetPasswordToken))try{const f=r.getParameter("email");await s.resetPassword(f,a.value,(d=i.value)==null?void 0:d.resetPasswordToken);const m=await s.signIn(f,a.value);gn(1500).then(()=>n("confirmedAccount",m))}catch(f){throw l.value=f.message,f}}return(u,d)=>(y(),Ve(fr,{handler:c,class:"moonbase:confirm-account"},{default:ke(()=>[o.value?(y(),O("div",Hb,[F(Ft)])):i.value?(y(),O(Re,{key:2},[x("h3",null," Hi "+G(i.value.name)+", ",1),qb,F(Tt,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),F(Tt,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),F(pr,{success:"Password saved",label:"Save password",error:"Error"}),x("span",{class:"moonbase:error","data-visible":!!l.value||void 0},G(l.value),9,Wb)],64)):(y(),O("div",zb,G(l.value),1))]),_:1}))}}),Gb=x("h3",null," Forgot your password? ",-1),Jb=x("p",null," Please enter your email for a reset link: ",-1),Yb=["data-visible"],Xb=ve({__name:"ForgotPassword",setup(t){const e=Fe(),n=It(),r=C(e.getParameter("email")??""),s=C(null),o=C(!1);async function i(){s.value=null;try{await n.forgotPassword(r.value),gn(1500).then(()=>{o.value=!0})}catch(a){throw a instanceof rs?s.value="User not found":s.value=a.message,a}}return(a,l)=>(y(),Ve(fr,{handler:i,class:"moonbase:sign-in","no-reset":""},{default:ke(()=>[Gb,Jb,F(Tt,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),F(pr,{success:"Email sent",label:"Reset password",error:"Error"}),x("span",{class:"moonbase:error","data-visible":!!s.value||void 0},G(s.value),9,Yb)]),_:1}))}}),Qb=x("p",null," Please create a new password for your account: ",-1),e1=["data-visible"],t1=ve({__name:"ResetPassword",emits:["passwordReset"],setup(t,{emit:e}){const n=e,r=Fe(),s=It(),o=ee(()=>r.getParameter("email")),i=C(""),a=C(null);ze(()=>{(!r.getParameter("email")||!r.getParameter("code"))&&(a.value="Link broken, please try again")});async function l(){a.value=null;const c=r.getParameter("code");if(c)try{await s.resetPassword(o.value,i.value,c);const u=await s.signIn(o.value,i.value);gn(1500).then(()=>n("passwordReset",u))}catch(u){throw a.value=u.message,u}}return(c,u)=>(y(),Ve(fr,{handler:l,class:"moonbase:reset-password"},{default:ke(()=>[x("h3",null," Hi "+G(o.value)+", ",1),Qb,F(Tt,{"model-value":b(r).getParameter("email"),hidden:"",label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["model-value"]),F(Tt,{modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"new-password",required:""},null,8,["modelValue"]),F(pr,{success:"Password saved",label:"Save password",error:"Error"}),x("span",{class:"moonbase:error","data-visible":!!a.value||void 0},G(a.value),9,e1)]),_:1}))}}),n1={class:"moonbase:confirm-email-change"},r1={key:0,class:"moonbase:loader"},s1={key:1,class:"moonbase:error","data-visible":""},o1=x("p",null," Thanks for confirming your new email. You can now sign in using this new address. ",-1),i1=ve({__name:"ConfirmEmailChange",setup(t){const e=Fe(),{user:n,confirmEmailChange:r}=It(),s=C(!0),o=C(null);return ze(async()=>{try{const i=e.getParameter("email"),a=e.getParameter("code");if(!i||!a)throw new Error("Link is broken");await r(i,a)}catch(i){o.value=i.message}s.value=!1}),(i,a)=>{var l;return y(),O("div",n1,[s.value?(y(),O("div",r1,[F(Ft)])):o.value?(y(),O("div",s1,G(o.value),1)):(y(),O(Re,{key:2},[x("h3",null," Hi "+G((l=b(n))==null?void 0:l.name)+", ",1),o1],64))])}}});class a1{constructor(){Gr(this,"current",this.detect());Gr(this,"currentId",0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}let Oo=new a1;function Bl(t,e,n,r){Oo.isServer||bt(s=>{t=t??window,t.addEventListener(e,n,r),s(()=>t.removeEventListener(e,n,r))})}function Zf(t,e,n,r){Oo.isServer||bt(s=>{t.value&&(window.addEventListener(e,n,r),s(()=>window.removeEventListener(e,n,r)))})}var Lt=(t=>(t[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t))(Lt||{});function Fl(){let t=C(0),e=C(!0);return Zf(e,"keydown",n=>{n.key==="Tab"&&(t.value=n.shiftKey?1:0)}),t}function it(t,e,...n){if(t in e){let s=e[t];return typeof s=="function"?s(...n):s}let r=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,it),r}var hr=(t=>(t[t.None=0]="None",t[t.RenderStrategy=1]="RenderStrategy",t[t.Static=2]="Static",t))(hr||{}),mr=(t=>(t[t.Unmount=0]="Unmount",t[t.Hidden=1]="Hidden",t))(mr||{});function ct({visible:t=!0,features:e=0,ourProps:n,theirProps:r,...s}){const o=Ff(r,n),i=Object.assign(s,{props:o});if(t||e&2&&o.static)return Xi(i);if(e&1){const a=o.unmount??!0?0:1;return it(a,{0(){return null},1(){return Xi({...s,props:{...o,hidden:!0,style:{display:"none"}}})}})}return Xi(i)}function Xi({props:t,attrs:e,slots:n,slot:r,name:s}){var c;const{as:o,...i}=Hl(t,["unmount","static"]);let a=(c=n.default)==null?void 0:c.call(n,r);const l={};if(r){let u=!1;const d=[];for(const[f,m]of Object.entries(r))typeof m=="boolean"&&(u=!0),m===!0&&d.push(f);u&&(l["data-moonbase-state"]=d.join(" "))}if(o==="template"){if(a=Bf(a??[]),Object.keys(i).length>0||Object.keys(e).length>0){const[u,...d]=a??[];if(!l1(u)||d.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${s} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(i).concat(Object.keys(e)).map(_=>_.trim()).filter((_,E,k)=>k.indexOf(_)===E).sort((_,E)=>_.localeCompare(E)).map(_=>` - ${_}`).join(`
|
|
24
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(_=>` - ${_}`).join(`
|
|
24
25
|
`)].join(`
|
|
25
|
-
`));const f=ad(u.props??{},i,l),m=Rt(u,f,!0);for(const y in f)y.startsWith("on")&&(m.props||(m.props={}),m.props[y]=f[y]);return m}return Array.isArray(a)&&a.length===1?a[0]:a}return Le(s,Object.assign({},i,l),{default:()=>a})}function id(e){return e.flatMap(t=>t.type===Ce?id(t.children):[t])}function ad(...e){if(e.length===0)return{};if(e.length===1)return e[0];const t={},n={};for(const r of e)for(const o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]??(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(const r in n)Object.assign(t,{[r](o,...s){const i=n[r];for(const a of i){if(o instanceof Event&&o.defaultPrevented)return;a(o,...s)}}});return t}function Pa(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Sy(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var zn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(zn||{});let Kn=he({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...o}=e,s={"aria-hidden":(r&2)===2?!0:o["aria-hidden"]??void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Qe({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function xy(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function G(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function Qt(e){if(To.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=G(e);if(t)return t.ownerDocument}return document}const Ks=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ue=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ue||{}),yn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(yn||{});function Gs(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ks)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var $a=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))($a||{});function ld(e,t=0){var n;return e===((n=Qt(e))==null?void 0:n.body)?!1:Je(t,{0(){return e.matches(Ks)},1(){let r=e;for(;r!==null;){if(r.matches(Ks))return!0;r=r.parentElement}return!1}})}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.moonbaseFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.moonbaseFocusVisible:e.detail===0&&(document.documentElement.dataset.moonbaseFocusVisible="")},!0));function br(e){e==null||e.focus({preventScroll:!0})}const ky=["textarea","input"].join(",");function Cy(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,ky))??!1}function jr(e,t=n=>n){return e.slice().sort((n,r)=>{const o=t(n),s=t(r);if(o===null||s===null)return 0;const i=o.compareDocumentPosition(s);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function it(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){const s=(Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)??document;let i=Array.isArray(e)?n?jr(e):e:Gs(e);o.length>0&&i.length>1&&(i=i.filter(m=>!o.includes(m))),r=r??s.activeElement;const a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,i.indexOf(r))-1;if(t&4)return Math.max(0,i.indexOf(r))+1;if(t&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{};let u=0;const d=i.length;let f;do{if(u>=d||u+d<=0)return 0;let m=l+u;if(t&16)m=(m+d)%d;else{if(m<0)return 3;if(m>=d)return 1}f=i[m],f==null||f.focus(c),u+=a}while(f!==s.activeElement);return t&6&&Cy(f)&&f.select(),2}let wr=[];xy(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||wr[0]===t.target)return;let n=t.target;n=n.closest(Ks),wr.unshift(n??t.target),wr=wr.filter(r=>r!=null&&r.isConnected),wr.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Js(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function cd(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());const t=new Set;for(const n of e.value){const r=G(n);r instanceof HTMLElement&&t.add(r)}return t}var ud=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(ud||{});const Po=Object.assign(he({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:T(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=T(null);r({el:o,$el:o});const s=X(()=>Qt(o)),i=T(!1);Re(()=>i.value=!0),mt(()=>i.value=!1),Py({ownerDocument:s},X(()=>i.value&&!!(e.features&16)));const a=$y({ownerDocument:s,container:o,initialFocus:X(()=>e.initialFocus)},X(()=>i.value&&!!(e.features&2)));Iy({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},X(()=>i.value&&!!(e.features&8)));const l=Ta();function c(m){const y=G(o);if(!y)return;(S=>S())(()=>{Je(l.value,{[xt.Forwards]:()=>{it(y,Ue.First,{skipElements:[m.relatedTarget]})},[xt.Backwards]:()=>{it(y,Ue.Last,{skipElements:[m.relatedTarget]})}})})}const u=T(!1);function d(m){m.key==="Tab"&&(u.value=!0,requestAnimationFrame(()=>{u.value=!1}))}function f(m){if(!i.value)return;const y=cd(e.containers);G(o)instanceof HTMLElement&&y.add(G(o));const E=m.relatedTarget;E instanceof HTMLElement&&E.dataset.moonbaseFocusGuard!=="true"&&(dd(y,E)||(u.value?it(G(o),Je(l.value,{[xt.Forwards]:()=>Ue.Next,[xt.Backwards]:()=>Ue.Previous})|Ue.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&br(m.target)))}return()=>{const m={},y={ref:o,onKeydown:d,onFocusout:f},{features:E,initialFocus:S,containers:A,...F}=e;return Le(Ce,[!!(E&4)&&Le(Kn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:c,features:zn.Focusable}),Qe({ourProps:y,theirProps:{...t,...F},slot:m,attrs:t,slots:n,name:"FocusTrap"}),!!(E&4)&&Le(Kn,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:c,features:zn.Focusable})])}}}),{features:ud});function Ty(e){const t=T(wr.slice());return Xe([e],([n],[r])=>{r===!0&&n===!1?Js(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=wr.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function Py({ownerDocument:e},t){const n=Ty(t);Re(()=>{ft(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&br(n())},{flush:"post"})}),mt(()=>{t.value&&br(n())})}function $y({ownerDocument:e,container:t,initialFocus:n},r){const o=T(null),s=T(!1);return Re(()=>s.value=!0),mt(()=>s.value=!1),Re(()=>{Xe([t,n,r],(i,a)=>{if(i.every((c,u)=>(a==null?void 0:a[u])===c)||!r.value)return;const l=G(t);l&&Js(()=>{var d,f;if(!s.value)return;const c=G(n),u=(d=e.value)==null?void 0:d.activeElement;if(c){if(c===u){o.value=u;return}}else if(l.contains(u)){o.value=u;return}c?br(c):it(l,Ue.First|Ue.NoScroll)===yn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.value=(f=e.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),o}function Iy({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;Ca((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=cd(n);G(t)instanceof HTMLElement&&a.add(G(t));const l=r.value;if(!l)return;const c=i.target;c&&c instanceof HTMLElement?dd(a,c)?(r.value=c,br(c)):(i.preventDefault(),i.stopPropagation(),br(l)):br(r.value)},!0)}function dd(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function Dy(e){let t=fh(e.getSnapshot());return mt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function $o(){const e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){const r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){const r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){const r={current:!0};return Js(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){const s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){const r=$o();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{const r=e.indexOf(n);if(r>=0)for(const o of e.splice(r,1))o()}},dispose(){for(const n of e.splice(0))n()}};return t}function Ay(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...s){let i=t[o].call(n,...s);i&&(n=i,r.forEach(a=>a()))}}}function Vy(){let e;return{before({doc:t}){const n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){const r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function fd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Ry(){return/Android/gi.test(window.navigator.userAgent)}function jy(){return fd()||Ry()}function Ly(){return fd()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){const i=$o();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}const o=window.scrollY??window.pageYOffset;let s=null;t.addEventListener(e,"click",i=>{if(i.target instanceof HTMLElement)try{const a=i.target.closest("a");if(!a)return;const{hash:l}=new URL(a.href),c=e.querySelector(l);c&&!r(c)&&(s=c)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(i.target instanceof HTMLElement)if(r(i.target)){let a=i.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;t.style(a,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(i.target instanceof HTMLElement){if(i.target.tagName==="INPUT")return;if(r(i.target)){let a=i.target;for(;a.parentElement&&a.dataset.moonbasePortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.moonbasePortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),t.add(()=>{const i=window.scrollY??window.pageYOffset;o!==i&&window.scrollTo(0,o),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function My(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Uy(e){const t={};for(const n of e)Object.assign(t,n(t));return t}const Er=Ay(()=>new Map,{PUSH(e,t){const n=this.get(e)??{doc:e,count:0,d:$o(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){const n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){const r={doc:e,d:t,meta:Uy(n)},o=[Ly(),Vy(),My()];o.forEach(({before:s})=>s==null?void 0:s(r)),o.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Er.subscribe(()=>{const e=Er.getSnapshot(),t=new Map;for(const[n]of e)t.set(n,n.documentElement.style.overflow);for(const n of e.values()){const r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Er.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Er.dispatch("TEARDOWN",n)}});function Fy(e,t,n){const r=Dy(Er),o=X(()=>{const s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return Xe([e,t],([s,i],[a],l)=>{if(!s||!i)return;Er.dispatch("PUSH",s,n);let c=!1;l(()=>{c||(Er.dispatch("POP",a??s,n),c=!0)})},{immediate:!0}),o}let By=0;function Hy(){return++By}function $t(){return Hy()}const Ia=new Map,Io=new Map;function pd(e,t=T(!0)){ft(n=>{if(!t.value)return;const r=G(e);if(!r)return;n(()=>{if(!r)return;const s=Io.get(r)??1;if(s===1?Io.delete(r):Io.set(r,s-1),s!==1)return;const i=Ia.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,Ia.delete(r))});const o=Io.get(r)??0;Io.set(r,o+1),o===0&&(Ia.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Do(e,t,n,r){To.isServer||ft(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const hd=30;function md(e,t,n=X(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const l=a(i);if(l===null||!l.getRootNode().contains(l))return;const c=function u(d){return typeof d=="function"?u(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(const u of c){if(u===null)continue;const d=u instanceof HTMLElement?u:G(u);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!ld(l,$a.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}const o=T(null);Do(n,"pointerdown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Do(n,"mousedown",i=>{var a,l;o.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Do(n,"click",i=>{jy()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Do(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.y=i.touches[0].clientY},!0),Do(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-s.x)>=hd||Math.abs(a.y-s.y)>=hd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),sd(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function vd({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=T(null),o=Qt(r);function s(){var a,l;const i=[];for(const c of e)c!==null&&(c instanceof HTMLElement?i.push(c):"value"in c&&c.value instanceof HTMLElement&&i.push(c.value));if(t!=null&&t.value)for(const c of t.value)i.push(c);for(const c of(o==null?void 0:o.querySelectorAll("html > *, body > *"))??[])c!==document.body&&c!==document.head&&c instanceof HTMLElement&&c.id!=="moonbase"&&(c.contains(G(r))||c.contains((l=(a=G(r))==null?void 0:a.getRootNode())==null?void 0:l.host)||i.some(u=>c.contains(u))||i.push(c));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Le(Kn,{features:zn.Hidden,ref:r})}}}let gd=Symbol("Context");var at=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(at||{});function Zy(){return Ys()!==null}function Ys(){return $e(gd,null)}function yd(e){dt(gd,e)}const _d=Symbol("ForcePortalRootContext");function qy(){return $e(_d,!1)}const bd=he({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return dt(_d,e.force),()=>{const{force:r,...o}=e;return Qe({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let wd=Symbol("StackContext");var Da=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Da||{});function Wy(){return $e(wd,()=>{})}function zy({type:e,enabled:t,element:n,onUpdate:r}){let o=Wy();function s(...i){r==null||r(...i),o(...i)}Re(()=>{Xe(t,(i,a)=>{i?s(0,e,n):a===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),mt(()=>{t.value&&s(1,e,n)}),dt(wd,s)}var et=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(et||{});let Ky=Symbol("DescriptionContext");function Gy({slot:e=T({}),name:t="Description",props:n={}}={}){let r=T([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return dt(Ky,{register:o,slot:e,name:t,props:n}),X(()=>r.value.length>0?r.value.join(" "):void 0)}function Ed(e){const t=Qt(e);if(!t){if(e===null)return null;throw new Error(`[Moonbase]: Cannot find ownerDocument for contextElement: ${e}`)}const n=t.getElementById("moonbase");if(n)return n;throw new Error("[Moonbase]: Cannot find existing root element")}const Jy=he({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=T(null);X(()=>Qt(r));const o=qy(),s=$e(Nd,null),i=T(o===!0||s==null?Ed(r.value):s.resolveTarget()),a=T(!1);Re(()=>{a.value=!0}),ft(()=>{o||s!=null&&(i.value=s.resolveTarget())});const l=$e(Aa,null);let c=!1;const u=Is();return Xe(r,()=>{if(c||!l)return;const d=G(r);d&&(mt(l.register(d),u),c=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return Le(Pm,{to:i.value},Qe({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let Aa=Symbol("PortalParentContext");function Od(){const e=$e(Aa,null),t=T([]);function n(s){return t.value.push(s),e&&e.register(s),()=>r(s)}function r(s){const i=t.value.indexOf(s);i!==-1&&t.value.splice(i,1),e&&e.unregister(s)}const o={register:n,unregister:r,portals:t};return[t,he({name:"PortalWrapper",setup(s,{slots:i}){return dt(Aa,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let Nd=Symbol("PortalGroupContext");const Yy=he({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=so({resolveTarget(){return e.target}});return dt(Nd,r),()=>{const{target:o,...s}=e;return Qe({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),Va=Symbol("DialogContext");function Xs(e){const t=$e(Va,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Xs),n}return t}const Qs="DC8F892D-2EBD-447C-A4C8-A03058436FF4",Sd=he({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:Qs},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${$t()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var ce;const s=T(!1);Re(()=>{s.value=!0});let i=!1;const a=X(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(i||(i=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),l=T(0),c=Ys(),u=X(()=>e.open===Qs&&c!==null?(c.value&at.Open)===at.Open:e.open),d=T(null),f=X(()=>Qt(d));if(o({el:d,$el:d}),!(e.open!==Qs||c!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof u.value!="boolean")throw new TypeError(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u.value===Qs?void 0:e.open}`);const y=X(()=>s.value&&u.value?0:1),E=X(()=>y.value===0),S=T(null),A={titleId:S,panelRef:T(null),dialogState:y,setTitleId(Ie){S.value!==Ie&&(S.value=Ie)},close(){t("close",!1)}},F=X(()=>l.value>1),C=$e(Va,null)!==null,[z,$]=Od(),{resolveContainers:Z,mainTreeNodeRef:x,MainTreeNode:fe}=vd({portals:z,defaultContainers:[X(()=>A.panelRef.value??d.value)]}),Y=X(()=>F.value?"parent":"leaf"),V=X(()=>c!==null?(c.value&at.Closing)===at.Closing:!1),P=X(()=>C||V.value?!1:E.value),j=X(()=>{var Ie;return Array.from(((Ie=f.value)==null?void 0:Ie.querySelectorAll("body > *"))??[]).find(je=>je.id==="moonbase"?!1:je.contains(G(x))&&je instanceof HTMLElement)??null});pd(j,P);const oe=X(()=>F.value?!0:E.value),w=X(()=>{var Ie;return Array.from(((Ie=f.value)==null?void 0:Ie.querySelectorAll("[data-moonbase-portal]"))??[]).find(je=>je.contains(G(x))&&je instanceof HTMLElement)??null});pd(w,oe),zy({type:"Dialog",enabled:X(()=>y.value===0),element:d,onUpdate:(Ie,je)=>{if(je==="Dialog")return Je(Ie,{[Da.Add]:()=>l.value+=1,[Da.Remove]:()=>l.value-=1})}});const I=Gy({name:"DialogDescription",slot:X(()=>({open:u.value}))});dt(Va,A);const ne=X(()=>!(!E.value||F.value));md(Z,(Ie,je)=>{Ie.preventDefault(),A.close(),co(()=>je==null?void 0:je.focus())},ne);const ae=X(()=>!(F.value||y.value!==0));Ca((ce=f.value)==null?void 0:ce.defaultView,"keydown",Ie=>{ae.value&&(Ie.defaultPrevented||Ie.key===et.Escape&&(Ie.preventDefault(),Ie.stopPropagation(),A.close()))});const re=X(()=>!(V.value||y.value!==0||C));return Fy(f,re,Ie=>({containers:[...Ie.containers??[],Z]})),ft(Ie=>{if(y.value!==0)return;const je=G(d);if(!je)return;const nt=new ResizeObserver(wt=>{for(const bn of wt){const Gn=bn.target.getBoundingClientRect();Gn.x===0&&Gn.y===0&&Gn.width===0&&Gn.height===0&&A.close()}});nt.observe(je),Ie(()=>nt.disconnect())}),()=>{const{id:Ie,open:je,initialFocus:nt,...wt}=e,bn={...n,ref:d,id:Ie,role:a.value,"aria-modal":y.value===0?!0:void 0,"aria-labelledby":S.value,"aria-describedby":I.value},Gn={open:y.value===0};return Le(bd,{force:!0},()=>[Le(Jy,()=>Le(Yy,{target:d.value},()=>Le(bd,{force:!1},()=>Le(Po,{initialFocus:nt,containers:Z,features:E.value?Je(Y.value,{parent:Po.features.RestoreFocus,leaf:Po.features.All&~Po.features.FocusLock}):Po.features.None},()=>Le($,{},()=>Qe({ourProps:bn,theirProps:{...wt,...n},slot:Gn,attrs:n,slots:r,visible:y.value===0,features:qn.RenderStrategy|qn.Static,name:"Dialog"})))))),Le(fe)])}}}),xd=he({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${$t()}`}},setup(e,{attrs:t,slots:n}){const r=Xs("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return Qe({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),kd=he({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${$t()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Xs("DialogPanel");r({el:o.panelRef,$el:o.panelRef});function s(i){i.stopPropagation()}return()=>{const{id:i,...a}=e,l={id:i,ref:o.panelRef,onClick:s};return Qe({ourProps:l,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),ei=he({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${$t()}`}},setup(e,{attrs:t,slots:n}){const r=Xs("DialogTitle");return Re(()=>{r.setTitleId(e.id),mt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return Qe({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function Cd(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Td(e,t){let n=T(Cd(e.value.type,e.value.as));return Re(()=>{n.value=Cd(e.value.type,e.value.as)}),ft(()=>{var r;n.value||G(t)&&G(t)instanceof HTMLButtonElement&&!((r=G(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}const Pd=Symbol("PopoverContext");function Ra(e){const t=$e(Pd,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${ja.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ra),n}return t}const Xy=Symbol("PopoverGroupContext");function $d(){return $e(Xy,null)}const Id=Symbol("PopoverPanelContext");function Qy(){return $e(Id,null)}let ja=he({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var z;const o=T(null);r({el:o,$el:o});const s=T(1),i=T(null),a=T(null),l=T(null),c=T(null),u=X(()=>Qt(o)),d=X(()=>{var P,j;if(!G(i)||!G(c))return!1;for(const oe of document.querySelectorAll("body > *"))if(Number(oe==null?void 0:oe.contains(G(i)))^Number(oe==null?void 0:oe.contains(G(c))))return!0;const $=Gs(),Z=$.indexOf(G(i)),x=(Z+$.length-1)%$.length,fe=(Z+1)%$.length,Y=$[x],V=$[fe];return!((P=G(c))!=null&&P.contains(Y))&&!((j=G(c))!=null&&j.contains(V))}),f={popoverState:s,buttonId:T(null),panelId:T(null),panel:c,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:l,togglePopover(){s.value=Je(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close($){f.closePopover();const Z=$?$ instanceof HTMLElement?$:$.value instanceof HTMLElement?G($):G(f.button):G(f.button);Z==null||Z.focus()}};dt(Pd,f),yd(X(()=>Je(s.value,{0:at.Open,1:at.Closed})));const m={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},y=$d(),E=y==null?void 0:y.registerPopover,[S,A]=Od(),F=vd({mainTreeNodeRef:y==null?void 0:y.mainTreeNodeRef,portals:S,defaultContainers:[i,c]});function C(){var $,Z,x;return(y==null?void 0:y.isFocusWithinPopoverGroup())??((($=u.value)==null?void 0:$.activeElement)&&(((Z=G(i))==null?void 0:Z.contains(u.value.activeElement))||((x=G(c))==null?void 0:x.contains(u.value.activeElement))))}return ft(()=>E==null?void 0:E(m)),Ca((z=u.value)==null?void 0:z.defaultView,"focus",$=>{var Z,x;$.target!==window&&$.target instanceof HTMLElement&&s.value===0&&(C()||i&&c&&(F.contains($.target)||(Z=G(f.beforePanelSentinel))!=null&&Z.contains($.target)||(x=G(f.afterPanelSentinel))!=null&&x.contains($.target)||f.closePopover()))},!0),md(F.resolveContainers,($,Z)=>{var x;f.closePopover(),ld(Z,$a.Loose)||($.preventDefault(),(x=G(i))==null||x.focus())},X(()=>s.value===0)),()=>{const $={open:s.value===0,close:f.close};return Le(Ce,[Le(A,{},()=>Qe({theirProps:{...e,...n},ourProps:{ref:o},slot:$,slots:t,attrs:n,name:"Popover"})),Le(F.MainTreeNode)])}}});const Dd=he({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${$t()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=Ra("PopoverButton"),s=X(()=>Qt(o.button));r({el:o.button,$el:o.button}),Re(()=>{o.buttonId.value=e.id}),mt(()=>{o.buttonId.value=null});const i=$d(),a=i==null?void 0:i.closeOthers,l=Qy(),c=X(()=>l===null?!1:l.value===o.panelId.value),u=T(null),d=`moonbase-focus-sentinel-${$t()}`;c.value||ft(()=>{o.button.value=G(u)});const f=Td(X(()=>({as:e.as,type:t.type})),u);function m(C){var z,$,Z,x,fe;if(c.value){if(o.popoverState.value===1)return;switch(C.key){case et.Space:case et.Enter:C.preventDefault(),($=(z=C.target).click)==null||$.call(z),o.closePopover(),(Z=G(o.button))==null||Z.focus();break}}else switch(C.key){case et.Space:case et.Enter:C.preventDefault(),C.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover();break;case et.Escape:if(o.popoverState.value!==0)return a==null?void 0:a(o.buttonId.value);if(!G(o.button)||(x=s.value)!=null&&x.activeElement&&!((fe=G(o.button))!=null&&fe.contains(s.value.activeElement)))return;C.preventDefault(),C.stopPropagation(),o.closePopover();break}}function y(C){c.value||C.key===et.Space&&C.preventDefault()}function E(C){var z,$;e.disabled||(c.value?(o.closePopover(),(z=G(o.button))==null||z.focus()):(C.preventDefault(),C.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),($=G(o.button))==null||$.focus()))}function S(C){C.preventDefault(),C.stopPropagation()}const A=Ta();function F(){const C=G(o.panel);if(!C)return;function z(){Je(A.value,{[xt.Forwards]:()=>it(C,Ue.First),[xt.Backwards]:()=>it(C,Ue.Last)})===yn.Error&&it(Gs().filter(Z=>Z.dataset.moonbaseFocusGuard!=="true"),Je(A.value,{[xt.Forwards]:Ue.Next,[xt.Backwards]:Ue.Previous}),{relativeTo:G(o.button)})}z()}return()=>{const C=o.popoverState.value===0,z={open:C},{id:$,...Z}=e,x=c.value?{ref:u,type:f.value,onKeydown:m,onClick:E}:{ref:u,id:$,type:f.value,"aria-expanded":o.popoverState.value===0,"aria-controls":G(o.panel)?o.panelId.value:void 0,disabled:e.disabled?!0:void 0,onKeydown:m,onKeyup:y,onClick:E,onMousedown:S};return Le(Ce,[Qe({ourProps:x,theirProps:{...t,...Z},slot:z,attrs:t,slots:n,name:"PopoverButton"}),C&&!c.value&&o.isPortalled.value&&Le(Kn,{id:d,features:zn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:F})])}}}),Ad=he({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},id:{type:String,default:()=>`moonbase-popover-panel-${$t()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=Ra("PopoverPanel"),i=X(()=>Qt(s.panel)),a=`moonbase-focus-sentinel-before-${$t()}`,l=`moonbase-focus-sentinel-after-${$t()}`;r({el:s.panel,$el:s.panel}),Re(()=>{s.panelId.value=e.id}),mt(()=>{s.panelId.value=null}),dt(Id,s.panelId),ft(()=>{var A,F;if(!o||s.popoverState.value!==0||!s.panel)return;const S=(A=i.value)==null?void 0:A.activeElement;(F=G(s.panel))!=null&&F.contains(S)||it(G(s.panel),Ue.First)});const c=Ys(),u=X(()=>c!==null?(c.value&at.Open)===at.Open:s.popoverState.value===0);function d(S){var A,F;switch(S.key){case et.Escape:if(s.popoverState.value!==0||!G(s.panel)||i.value&&!((A=G(s.panel))!=null&&A.contains(i.value.activeElement)))return;S.preventDefault(),S.stopPropagation(),s.closePopover(),(F=G(s.button))==null||F.focus();break}}function f(S){var F,C,z,$,Z;const A=S.relatedTarget;A&&G(s.panel)&&((F=G(s.panel))!=null&&F.contains(A)||(s.closePopover(),((z=(C=G(s.beforePanelSentinel))==null?void 0:C.contains)!=null&&z.call(C,A)||(Z=($=G(s.afterPanelSentinel))==null?void 0:$.contains)!=null&&Z.call($,A))&&A.focus({preventScroll:!0})))}const m=Ta();function y(){const S=G(s.panel);if(!S)return;function A(){Je(m.value,{[xt.Forwards]:()=>{var C;it(S,Ue.First)===yn.Error&&((C=G(s.afterPanelSentinel))==null||C.focus())},[xt.Backwards]:()=>{var F;(F=G(s.button))==null||F.focus({preventScroll:!0})}})}A()}function E(){const S=G(s.panel);if(!S)return;function A(){Je(m.value,{[xt.Forwards]:()=>{const F=G(s.button),C=G(s.panel);if(!F)return;const z=Gs(),$=z.indexOf(F),Z=z.slice(0,$+1),fe=[...z.slice($+1),...Z];for(const Y of fe.slice())if(Y.dataset.moonbaseFocusGuard==="true"||C!=null&&C.contains(Y)){const V=fe.indexOf(Y);V!==-1&&fe.splice(V,1)}it(fe,Ue.First,{sorted:!1})},[xt.Backwards]:()=>{var C;it(S,Ue.Previous)===yn.Error&&((C=G(s.button))==null||C.focus())}})}A()}return()=>{const S={open:s.popoverState.value===0,close:s.close},{id:A,focus:F,...C}=e,z={ref:s.panel,id:A,onKeydown:d,onFocusout:o&&s.popoverState.value===0?f:void 0,tabIndex:-1};return Qe({ourProps:z,theirProps:{...t,...C},attrs:t,slot:S,slots:{...n,default:(...$)=>{var Z;return[Le(Ce,[u.value&&s.isPortalled.value&&Le(Kn,{id:a,ref:s.beforePanelSentinel,features:zn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:y}),(Z=n.default)==null?void 0:Z.call(n,...$),u.value&&s.isPortalled.value&&Le(Kn,{id:l,ref:s.afterPanelSentinel,features:zn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:E})])]}},features:qn.RenderStrategy|qn.Static,visible:u.value,name:"PopoverPanel"})}}});let e_=he({props:{onFocus:{type:Function,required:!0}},setup(e){let t=T(!0);return()=>t.value?Le(Kn,{as:"button",type:"button",features:zn.Focusable,onFocus(n){n.preventDefault();let r,o=50;function s(){var i;if(o--<=0){r&&cancelAnimationFrame(r);return}if((i=e.onFocus)!=null&&i.call(e)){t.value=!1,cancelAnimationFrame(r);return}r=requestAnimationFrame(s)}r=requestAnimationFrame(s)}}):null}});const Vd=Symbol("TabsContext");function Ao(e){const t=$e(Vd,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ao),n}return t}const La=Symbol("TabsSSRContext"),t_=he({name:"TabGroup",emits:{change:e=>!0},props:{as:{type:[Object,String],default:"template"},selectedIndex:{type:[Number],default:null},defaultIndex:{type:[Number],default:0},vertical:{type:[Boolean],default:!1},manual:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:r}){const o=T(e.selectedIndex??e.defaultIndex),s=T([]),i=T([]),a=X(()=>e.selectedIndex!==null),l=X(()=>a.value?e.selectedIndex:o.value);function c(y){const E=jr(u.tabs.value,G),S=jr(u.panels.value,G),A=E.filter(F=>{var C;return!((C=G(F))!=null&&C.hasAttribute("disabled"))});if(y<0||y>E.length-1){const F=Je(o.value===null?0:Math.sign(y-o.value),{[-1]:()=>1,0:()=>Je(Math.sign(y),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),C=Je(F,{0:()=>E.indexOf(A[0]),1:()=>E.indexOf(A[A.length-1])});C!==-1&&(o.value=C),u.tabs.value=E,u.panels.value=S}else{const F=E.slice(0,y),z=[...E.slice(y),...F].find(Z=>A.includes(Z));if(!z)return;let $=E.indexOf(z)??u.selectedIndex.value;$===-1&&($=u.selectedIndex.value),o.value=$,u.tabs.value=E,u.panels.value=S}}let u={selectedIndex:X(()=>o.value??e.defaultIndex??null),orientation:X(()=>e.vertical?"vertical":"horizontal"),activation:X(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(y){l.value!==y&&r("change",y),a.value||c(y)},registerTab(y){if(s.value.includes(y))return;const E=s.value[o.value];if(s.value.push(y),s.value=jr(s.value,G),!a.value){const S=s.value.indexOf(E)??o.value;S!==-1&&(o.value=S)}},unregisterTab(y){const E=s.value.indexOf(y);E!==-1&&s.value.splice(E,1)},registerPanel(y){i.value.includes(y)||(i.value.push(y),i.value=jr(i.value,G))},unregisterPanel(y){const E=i.value.indexOf(y);E!==-1&&i.value.splice(E,1)}};dt(Vd,u);const d=T({tabs:[],panels:[]}),f=T(!1);Re(()=>{f.value=!0}),dt(La,X(()=>f.value?null:d.value));const m=X(()=>e.selectedIndex);return Re(()=>{Xe([m],()=>c(e.selectedIndex??e.defaultIndex),{immediate:!0})}),ft(()=>{if(!a.value||l.value==null||u.tabs.value.length<=0)return;const y=jr(u.tabs.value,G);y.some((S,A)=>G(u.tabs.value[A])!==G(S))&&u.setSelectedIndex(y.findIndex(S=>G(S)===G(u.tabs.value[l.value])))}),()=>{const y={selectedIndex:o.value};return Le(Ce,[s.value.length<=0&&Le(e_,{onFocus:()=>{for(const E of s.value){const S=G(E);if((S==null?void 0:S.tabIndex)===0)return S.focus(),!0}return!1}}),Qe({theirProps:{...n,...Pa(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:y,slots:t,attrs:n,name:"TabGroup"})])}}}),n_=he({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=Ao("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return Qe({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),Ma=he({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${$t()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Ao("Tab"),s=T(null);r({el:s,$el:s}),Re(()=>o.registerTab(s)),mt(()=>o.unregisterTab(s));const i=$e(La),a=X(()=>{if(i.value){const S=i.value.tabs.indexOf(e.id);return S===-1?i.value.tabs.push(e.id)-1:S}return-1}),l=X(()=>{const S=o.tabs.value.indexOf(s);return S===-1?a.value:S}),c=X(()=>l.value===o.selectedIndex.value);function u(S){var F;const A=S();if(A===yn.Success&&o.activation.value==="auto"){const C=(F=Qt(s))==null?void 0:F.activeElement,z=o.tabs.value.findIndex($=>G($)===C);z!==-1&&o.setSelectedIndex(z)}return A}function d(S){const A=o.tabs.value.map(C=>G(C)).filter(Boolean);if(S.key===et.Space||S.key===et.Enter){S.preventDefault(),S.stopPropagation(),o.setSelectedIndex(l.value);return}switch(S.key){case et.Home:case et.PageUp:return S.preventDefault(),S.stopPropagation(),u(()=>it(A,Ue.First));case et.End:case et.PageDown:return S.preventDefault(),S.stopPropagation(),u(()=>it(A,Ue.Last))}if(u(()=>Je(o.orientation.value,{vertical(){return S.key===et.ArrowUp?it(A,Ue.Previous|Ue.WrapAround):S.key===et.ArrowDown?it(A,Ue.Next|Ue.WrapAround):yn.Error},horizontal(){return S.key===et.ArrowLeft?it(A,Ue.Previous|Ue.WrapAround):S.key===et.ArrowRight?it(A,Ue.Next|Ue.WrapAround):yn.Error}}))===yn.Success)return S.preventDefault()}const f=T(!1);function m(){var S;f.value||(f.value=!0,!e.disabled&&((S=G(s))==null||S.focus({preventScroll:!0}),o.setSelectedIndex(l.value),Js(()=>{f.value=!1})))}function y(S){S.preventDefault()}const E=Td(X(()=>({as:e.as,type:t.type})),s);return()=>{var z;const S={selected:c.value,disabled:e.disabled??!1},{id:A,...F}=e,C={ref:s,onKeydown:d,onMousedown:y,onClick:m,id:A,role:"tab",type:E.value,"aria-controls":(z=G(o.panels.value[l.value]))==null?void 0:z.id,"aria-selected":c.value,tabIndex:c.value?0:-1,disabled:e.disabled?!0:void 0};return Qe({ourProps:C,theirProps:F,slot:S,attrs:t,slots:n,name:"Tab"})}}}),r_=he({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=Ao("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return Qe({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),Ua=he({name:"TabPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`moonbase-tabs-panel-${$t()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=Ao("TabPanel"),s=T(null);r({el:s,$el:s}),Re(()=>o.registerPanel(s)),mt(()=>o.unregisterPanel(s));const i=$e(La),a=X(()=>{if(i.value){const u=i.value.panels.indexOf(e.id);return u===-1?i.value.panels.push(e.id)-1:u}return-1}),l=X(()=>{const u=o.panels.value.indexOf(s);return u===-1?a.value:u}),c=X(()=>l.value===o.selectedIndex.value);return()=>{var E;const u={selected:c.value},{id:d,tabIndex:f,...m}=e,y={ref:s,id:d,role:"tabpanel","aria-labelledby":(E=G(o.tabs.value[l.value]))==null?void 0:E.id,tabIndex:c.value?f:-1};return!c.value&&e.unmount&&!e.static?Le(Kn,{as:"span","aria-hidden":!0,...y}):Qe({ourProps:y,theirProps:m,slot:u,attrs:t,slots:n,features:qn.Static|qn.RenderStrategy,visible:c.value,name:"TabPanel"})}}});function o_(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Fa(e,...t){e&&t.length>0&&!e.dataset.transition?e.dataset.transition=t.join(" "):e&&t.length>0&&(e.dataset.transition=[...e.dataset.transition.split(" "),...t].join(" "))}function ti(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var Ba=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(Ba||{});function s_(e,t){const n=$o();if(!e)return n.dispose;const{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(a=>{const[l=0]=a.split(",").filter(Boolean).map(c=>c.includes("ms")?Number.parseFloat(c):Number.parseFloat(c)*1e3).sort((c,u)=>u-c);return l});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function Rd(e,t,n,r,o,s){const i=$o(),a=s!==void 0?o_(s):()=>{};return ti(e,...o),Fa(e,...t,...n),i.nextFrame(()=>{ti(e,...n),Fa(e,...r),i.add(s_(e,l=>(ti(e,...r,...t),Fa(e,...o),a(l))))}),i.add(()=>ti(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function Or(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const Ha=Symbol("TransitionContext");function i_(){return $e(Ha,null)!==null}function a_(){const e=$e(Ha,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const Za=Symbol("NestingContext");function l_(){const e=$e(Za,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function ni(e){return"children"in e?ni(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function jd(e){const t=T([]),n=T(!1);Re(()=>n.value=!0),mt(()=>n.value=!1);function r(s,i=Wn.Hidden){const a=t.value.findIndex(({id:l})=>l===s);a!==-1&&(Je(i,{[Wn.Unmount](){t.value.splice(a,1)},[Wn.Hidden](){t.value[a].state="hidden"}}),!ni(t)&&n.value&&(e==null||e()))}function o(s){const i=t.value.find(({id:a})=>a===s);return i?i.state!=="visible"&&(i.state="visible"):t.value.push({id:s,state:"visible"}),()=>r(s,Wn.Unmount)}return{children:t,register:o,unregister:r}}const Ld=qn.RenderStrategy,Vo=he({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:"enter"},enterFrom:{type:[String],default:"enter-from"},enterTo:{type:[String],default:"enter-to"},entered:{type:[String],default:"entered"},leave:{type:[String],default:"leave"},leaveFrom:{type:[String],default:"leave-from"},leaveTo:{type:[String],default:"leave-to"}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){const s=T(0);function i(){s.value|=at.Opening,t("beforeEnter")}function a(){s.value&=~at.Opening,t("afterEnter")}function l(){s.value|=at.Closing,t("beforeLeave")}function c(){s.value&=~at.Closing,t("afterLeave")}if(!i_()&&Zy())return()=>Le(qa,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:c},r);const u=T(null),d=X(()=>e.unmount?Wn.Unmount:Wn.Hidden);o({el:u,$el:u});const{show:f,appear:m}=a_(),{register:y,unregister:E}=l_(),S=T(f.value?"visible":"hidden"),A={value:!0},F=$t(),C={value:!1},z=jd(()=>{!C.value&&S.value!=="hidden"&&(S.value="hidden",E(F),c())});Re(()=>{const oe=y(F);mt(oe)}),ft(()=>{if(d.value===Wn.Hidden&&F){if(f.value&&S.value!=="visible"){S.value="visible";return}Je(S.value,{hidden:()=>E(F),visible:()=>y(F)})}});const $=Or(e.enter),Z=Or(e.enterFrom),x=Or(e.enterTo),fe=Or(e.entered),Y=Or(e.leave),V=Or(e.leaveFrom),P=Or(e.leaveTo);Re(()=>{ft(()=>{if(S.value==="visible"){const oe=G(u);if(oe instanceof Comment&&oe.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function j(oe){const w=A.value&&!m.value,I=G(u);!I||!(I instanceof HTMLElement)||w||(C.value=!0,f.value&&i(),f.value||l(),oe(f.value?Rd(I,$,Z,x,fe,ne=>{C.value=!1,ne===Ba.Finished&&a()}):Rd(I,Y,V,P,fe,ne=>{C.value=!1,ne===Ba.Finished&&(ni(z)||(S.value="hidden",E(F),c()))})))}return Re(()=>{Xe([f],(oe,w,I)=>{j(I),A.value=!1},{immediate:!0})}),dt(Za,z),yd(X(()=>Je(S.value,{visible:at.Open,hidden:at.Closed})|s.value)),()=>{const{appear:oe,show:w,enter:I,enterFrom:ne,enterTo:ae,entered:re,leave:ce,leaveFrom:Ie,leaveTo:je,...nt}=e,wt={ref:u},bn={...nt,...m.value&&f.value&&To.isServer?{class:rs([n.class,nt.class,...$,...Z])}:{}};return Qe({theirProps:bn,ourProps:wt,slot:{},slots:r,attrs:n,features:Ld,visible:S.value==="visible",name:"TransitionChild"})}}}),c_=Vo,qa=he({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r}){const o=Ys(),s=X(()=>e.show===null&&o!==null?(o.value&at.Open)===at.Open:e.show);ft(()=>{if(![!0,!1].includes(s.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});const i=T(s.value?"visible":"hidden"),a=jd(()=>{i.value="hidden"}),l=T(!0),c={show:s,appear:X(()=>e.appear||!l.value)};return Re(()=>{ft(()=>{l.value=!1,s.value?i.value="visible":ni(a)||(i.value="hidden")})}),dt(Za,a),dt(Ha,c),()=>{const u=Pa(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return Qe({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[Le(c_,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...u},r.default)]},attrs:{},features:Ld,visible:i.value==="visible",name:"Transition"})}}}),u_={class:"moonbase:modal-container"},ri=he({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(_(),ke(b(qa),{as:"template",show:t.open},{default:ye(()=>[B(b(Sd),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:ye(()=>[O("div",u_,[B(b(Vo),{as:"template"},{default:ye(()=>[B(b(xd),{class:"moonbase:modal-overlay"})]),_:1}),B(b(Vo),{as:"template"},{default:ye(()=>[B(b(kd),{class:"moonbase:modal-content"},{default:ye(()=>[Wi(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),d_=["data-visible"],f_=he({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=Ae(),o=bt(),s=$e(Ws),i=T(r.getParameter("email")??""),a=T(""),l=T(null);async function c(){l.value=null;try{const u=await o.signIn(i.value,a.value);Xt(1500).then(()=>n("signedIn",u))}catch(u){throw u instanceof Pr?l.value="User not found":l.value=u.message,u}}return(u,d)=>(_(),ke(Hn,{handler:c,class:"moonbase:sign-in"},{default:ye(()=>{var f;return[B(gt,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),B(gt,{modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),B(Zn,{success:"Signed in",label:"Sign in",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!l.value||void 0},K(l.value),9,d_),(f=b(s))!=null&&f.auth.enable.signUp?(_(),N("button",{key:0,type:"button",onClick:d[2]||(d[2]=m=>b(r).show(b(Se).Authentication,b(de).SignUp,{email:i.value}))}," Create account ")):me("",!0),O("button",{type:"button",onClick:d[3]||(d[3]=m=>b(r).show(b(Se).Authentication,b(de).ForgotPassword,{email:i.value}))}," Forgot password ")]}),_:1}))}}),p_={class:"moonbase:authentication"},h_={key:0,class:"moonbase:loader"},m_=he({__name:"Authentication",props:{open:{type:Boolean}},emits:["authenticated"],setup(e,{emit:t}){const n=t,r=Ae(),{loaded:o,user:s}=bt();Xe(s,a=>{a&&r.intent===de.SignIn&&(n("authenticated",a),r.dequeue())});const i=X(()=>{switch(r.intent){case de.SignIn:return"Sign in";case de.SignUp:return"Sign up";case de.ConfirmAccount:return"Confirm account";case de.ConfirmEmailChange:return"Confirm email change";case de.ForgotPassword:return"Forgot password";case de.ResetPassword:return"Reset password"}throw new Error("Moonbase: Unknown intent")});return(a,l)=>(_(),ke(ri,{open:a.open,onClose:l[3]||(l[3]=c=>b(r).reset())},{default:ye(()=>[O("div",p_,[B(b(ei),{as:"h3"},{default:ye(()=>[Te(K(i.value),1)]),_:1}),b(o)?b(r).intent===b(de).SignIn?(_(),ke(f_,{key:1})):b(r).intent===b(de).SignUp?(_(),ke(iy,{key:2,onSignedUp:l[0]||(l[0]=c=>b(r).dequeue())})):b(r).intent===b(de).ConfirmAccount?(_(),ke(dy,{key:3,onConfirmedAccount:l[1]||(l[1]=c=>b(r).dequeue())})):b(r).intent===b(de).ConfirmEmailChange?(_(),ke(Oy,{key:4})):b(r).intent===b(de).ForgotPassword?(_(),ke(my,{key:5})):b(r).intent===b(de).ResetPassword?(_(),ke(yy,{key:6,onPasswordReset:l[2]||(l[2]=c=>b(r).dequeue())})):me("",!0):(_(),N("div",h_,[B(Pt)]))])]),_:1},8,["open"]))}});function _n(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const v_={class:"moonbase:product-cart-item"},g_=["src"],y_={key:1,class:"moonbase:image-placeholder"},__={class:"moonbase:product-cart-item-content"},b_={key:0,class:"moonbase:cart-item-discount"},w_={class:"font-semibold"},E_={key:0,class:"ml-0.5"},O_={key:2,class:"moonbase:product-cart-item-total"},N_={key:0,class:"moonbase:discount"},S_={key:1},x_=he({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return _(),N("div",v_,[(r=t.lineItem.product)!=null&&r.iconUrl?(_(),N("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,g_)):(_(),N("div",y_)),O("div",__,[O("h3",null,K((o=t.lineItem.product)==null?void 0:o.name),1),O("p",null,K((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(_(),N("p",b_,[Te(" Discount applied: "),O("span",w_,K(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(_(),N("span",E_," (-"+K(b(_n)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):me("",!0)])):me("",!0),O("p",null,K(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(_(),N("div",O_,[t.lineItem.variation.hasDiscount?(_(),N("span",N_,K(b(_n)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):me("",!0),t.lineItem.quantity!==1?(_(),N("span",S_,K(t.lineItem.quantity)+" x "+K(b(_n)(t.lineItem.variation.price[t.currency],t.currency)),1)):me("",!0),Te(" "+K(b(_n)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):me("",!0)])}}}),k_={class:"moonbase:bundle-cart-item"},C_=["src"],T_={key:1,class:"moonbase:image-placeholder"},P_={class:"moonbase:bundle-cart-item-content"},$_={key:0,class:"moonbase:cart-item-discount"},I_={class:"font-semibold"},D_={key:0,class:"ml-0.5"},A_={class:"moonbase:bundle-cart-item-summary"},V_=["data-open"],R_=[O("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)],j_={key:2,class:"moonbase:product-cart-item-total"},L_={key:0,class:"moonbase:discount"},M_={key:1},U_=["src"],F_={key:1,class:"moonbase:image-placeholder"},B_=["data-included"],H_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Z_=[O("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)],q_={key:0,class:"truncate italic"},W_={key:1,class:"truncate"},z_=he({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=T(!1),n=T(null);return Xe(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>{var s,i,a,l,c,u,d;return _(),N("div",null,[O("div",k_,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(_(),N("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,C_)):(_(),N("div",T_)),O("div",P_,[O("h3",null,K((i=r.lineItem.bundle)==null?void 0:i.name),1),O("p",null,K((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(_(),N("p",$_,[Te(" Discount applied: "),O("span",I_,K(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(_(),N("span",D_," (-"+K(b(_n)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):me("",!0)])):me("",!0),O("div",A_,[O("span",null,K(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(_(),N("button",{key:0,onClick:o[0]||(o[0]=f=>t.value=!t.value)},[O("span",null,[Te(" Including "+K((l=r.lineItem.bundle)==null?void 0:l.products.filter(f=>f.included).length)+" ",1),(c=r.lineItem.bundle)!=null&&c.products.some(f=>!f.included)?(_(),N(Ce,{key:0},[Te("of "+K((u=r.lineItem.bundle)==null?void 0:u.products.length),1)],64)):me("",!0),Te(" products ")]),(_(),N("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},R_,8,V_))])):me("",!0)])]),r.lineItem.variation?(_(),N("div",j_,[r.lineItem.variation.hasDiscount?(_(),N("span",L_,K(b(_n)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):me("",!0),r.lineItem.quantity!==1?(_(),N("span",M_,K(r.lineItem.quantity)+" x "+K(b(_n)(r.lineItem.variation.price[r.currency],r.currency)),1)):me("",!0),Te(" "+K(b(_n)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):me("",!0)]),O("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(_(!0),N(Ce,null,Gt(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(_(),N("div",{key:f.id},[f!=null&&f.iconUrl?(_(),N("img",{key:0,src:f.iconUrl,alt:""},null,8,U_)):(_(),N("div",F_)),O("div",null,[O("h3",{"data-included":f.included||void 0},[f.included?(_(),N("svg",H_,Z_)):me("",!0),Te(" "+K(f==null?void 0:f.name),1)],8,B_),f.included?f!=null&&f.tagline?(_(),N("p",W_,K(f.tagline),1)):me("",!0):(_(),N("p",q_," You already own this "))])]))),128))],512)])}}}),K_={class:"moonbase:cart-modal-container"},G_=he({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(_(),ke(b(qa),{as:"template",show:t.open},{default:ye(()=>[B(b(Sd),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:ye(()=>[O("div",K_,[B(b(Vo),{as:"template"},{default:ye(()=>[B(b(xd),{class:"moonbase:cart-modal-overlay"})]),_:1}),B(b(Vo),{as:"template"},{default:ye(()=>[B(b(kd),{class:"moonbase:cart-modal-content"},{default:ye(()=>[Wi(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),J_=["disabled","data-success","data-error","data-working","data-variant"],Y_=["data-visible"],Md=he({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(e){const t=e,n=T(!1),r=T(!1),o=T(!1),s=X(()=>r.value?t.success??t.label:o.value?t.error:t.label);async function i(){try{const a=t.handler();if(a instanceof Promise){if(n.value=!0,await a,n.value=!1,!t.success)return;r.value=!0,await Xt(2500),t.noReset||(r.value=!1)}}catch{n.value=!1,o.value=!0,await Xt(2500),o.value=!1}}return(a,l)=>(_(),N("button",{class:"moonbase:button",type:"button",disabled:r.value||o.value||n.value,"data-success":r.value&&a.success||void 0,"data-error":o.value||void 0,"data-working":n.value||void 0,"data-variant":a.variant,onClick:i},[O("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(_(),ke(Pt,{key:0})):me("",!0)],8,Y_),Te(" "+K(s.value),1)],8,J_))}}),X_={class:"moonbase:cart"},Q_={key:0,role:"list",class:"moonbase:cart-items"},eb={key:1,class:"moonbase:cart-empty"},tb={key:2,class:"moonbase:cart-total"},nb=O("label",null," Total ",-1),rb=O("p",null," Sales tax to be calculated at checkout ",-1),ob=he({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=Ae(),{items:n,total:r,currency:o,checkout:s}=ba();async function i(){if(!await s(`${window.location.pathname}?mb_intent=view_products`))throw new Error("Cancelled checkout")}return(a,l)=>(_(),ke(G_,{open:a.open,onClose:l[0]||(l[0]=c=>b(t).reset())},{default:ye(()=>[O("div",X_,[B(b(ei),{as:"h3"},{default:ye(()=>[Te(" Cart ")]),_:1}),b(n).length>0?(_(),N("ul",Q_,[(_(!0),N(Ce,null,Gt(b(n),c=>(_(),N("li",{key:c.id},[c.type==="Product"?(_(),ke(x_,{key:0,"line-item":c,currency:b(o)},null,8,["line-item","currency"])):c.type==="Bundle"?(_(),ke(z_,{key:1,"line-item":c,currency:b(o)},null,8,["line-item","currency"])):me("",!0)]))),128))])):(_(),N("div",eb," Your cart is empty! ")),b(n).length>0?(_(),N("div",tb,[nb,O("span",null,K(b(_n)(b(r).amount,b(r).currency)),1),rb])):me("",!0),b(n).length>0?(_(),ke(Md,{key:3,handler:i,label:"Checkout",error:"Cancelled"})):me("",!0)])]),_:1},8,["open"]))}}),sb={class:"moonbase:account"},ib={key:0,class:"moonbase:error"},ab={key:1,class:"moonbase:notification"},lb={key:0,class:"moonbase:error"},cb=he({__name:"Account",setup(e){var F,C,z;const t=Ae(),{user:n,update:r,setPassword:o,signOut:s}=bt(),i=T(((F=n.value)==null?void 0:F.name)??""),a=T(((C=n.value)==null?void 0:C.email)??""),l=T(((z=n.value)==null?void 0:z.communicationPreferences)??{newsletterOptIn:!1}),c=T(null),u=T(!1),d=T(""),f=T(""),m=T(null),y=T(!1);async function E(){c.value=null,u.value=!1;try{(await r(i.value,a.value,void 0,l.value)).needsEmailConfirmationToken&&(u.value=!0)}catch($){throw c.value=$,$}}async function S(){m.value=null;try{await o(d.value,f.value),d.value="",f.value=""}catch($){throw m.value=$,$}}async function A(){y.value=!0,await s(),t.reset()}return($,Z)=>(_(),N("div",sb,[B(Hn,{handler:E},{default:ye(()=>[B(gt,{modelValue:i.value,"onUpdate:modelValue":Z[0]||(Z[0]=x=>i.value=x),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),B(gt,{modelValue:a.value,"onUpdate:modelValue":Z[1]||(Z[1]=x=>a.value=x),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),B(od,{modelValue:l.value.newsletterOptIn,"onUpdate:modelValue":Z[2]||(Z[2]=x=>l.value.newsletterOptIn=x),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),B(Zn,{label:"Save",error:"Error",success:"Saved"}),c.value?(_(),N("p",ib,K(c.value.message),1)):u.value?(_(),N("p",ab," You need to confirm your new email address, please check your inbox ")):me("",!0)]),_:1}),B(Hn,{handler:S},{default:ye(()=>[B(gt,{modelValue:d.value,"onUpdate:modelValue":Z[3]||(Z[3]=x=>d.value=x),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),B(gt,{modelValue:f.value,"onUpdate:modelValue":Z[4]||(Z[4]=x=>f.value=x),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),B(Zn,{label:"Save",error:"Error",success:"Saved"}),m.value?(_(),N("p",lb,K(m.value.message),1)):me("",!0)]),_:1}),B(Md,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:A})]))}}),ub={},db={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},fb=[O("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2-60 5.7-112 35.88-112 98.4S70 336 136 336h56M192 400.1l64 63.9 64-63.9M256 224v224.03",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1)];function pb(e,t){return _(),N("svg",db,fb)}const Ud=Bn(ub,[["render",pb]]),hb={},mb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},vb=[O("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)];function gb(e,t){return _(),N("svg",mb,vb)}const Fd=Bn(hb,[["render",gb]]),yb={},_b={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},bb=[O("path",{d:"M443.66 405.05c-1.46-.79-2.85-1.54-4-2.2-6.47-3.83-13-10.52-11.85-17.83 2.42-15.94 2.89-23.47-.49-28.79a15.61 15.61 0 0 0-7.67-6.2v-.06c1.41-2.56 2.26-5.66 2.83-10.12 1.44-11-5-44-13.7-70.7-8.08-24.68-29.24-50-44.7-68.56l-3.61-4.34c-23.88-28.93-24.34-38.19-26.55-82.67-.32-6.47-.69-13.8-1.17-22C329.87 41.43 304 16 256 16c-25.2 0-44.62 7.15-57.72 21.26C187.79 48.55 182 64 182 80.78c0 29.52 2 53 2.15 54.29 1.4 35.7 1 41.22-8.31 57.55-2.23 3.93-8.38 10.87-14.89 18.21-8.48 9.57-18.09 20.41-23.36 29.22-3.77 6.31-5.88 12.63-8.11 19.33-3.4 10.21-7.26 21.78-18.15 36.57-12.57 17.07-15.52 29.61-11 47.45-4.94 6.45-4.83 14.37-4.75 20.23a25.84 25.84 0 0 1-.3 6.09c-2.29 7.59-12.42 9.4-22 10.18-1.58.12-3.1.21-4.55.29-7.26.39-13.53.74-17.13 6.3-3.47 5.36-1.12 13.8 2.14 25.48.72 2.58 1.46 5.25 2.19 8.06 1.83 7-.16 10.48-2.68 14.84-2.44 4.21-5.21 9-5.21 17.55 0 14.67 20 18 43.05 21.94 7.36 1.24 15 2.53 22.63 4.24a225.58 225.58 0 0 1 34.08 10.68c9.72 3.73 17.4 6.68 26.43 6.68 16.18 0 28.25-9.77 39.92-19.21l2.15-1.75c5.53-4.49 21.5-4 34.34-3.64 3.46.1 6.73.2 9.65.2h6.22c13.48-.08 31.94-.18 42.23 2.5 3.75 1 6.2 3.72 9.29 7.19 5.87 6.56 13.17 14.75 33.39 14.75 19.39 0 29.55-8.71 41.32-18.8 7.16-6.13 14.56-12.48 25.07-17.86 3.92-2 7.62-3.87 11.08-5.61 22.64-11.38 35.11-17.65 35.11-27.82 0-9.91-12.24-16.5-20.34-20.86zM211.11 88.38a13.91 13.91 0 0 1 12.47 9c1.95 5.55 1.81 10.42.21 12.94 0 0-.22-1-.36-1.44a14.85 14.85 0 0 0-6.44-8.59 11.35 11.35 0 0 0-8.94-1.47c-4.26 1.13-8.41 5-8.91 18.79-5.16-10.47-2.31-18 .92-23 2.31-3.73 7.47-6.33 11.05-6.23zm-17.5 375C192 479.24 175.2 479 170.09 478.59c-9.81-.82-21.66-4.69-33.13-8.43-4.52-1.47-9.19-3-13.73-4.34-13.2-3.89-30.12-6.74-43.72-9-3.22-.55-6.27-1.06-9.05-1.55s-4.61-1.27-5.2-2.3c-1-1.65.38-5.25 1.93-9.41C69.27 438 72.11 430.34 72 421c0-3.91-1.47-8.3-2.84-12.56-1.62-5-3.28-10.17-1.93-12.62 1.23-2.23 6.75-2.49 11.6-2.49h2.26c3.55 0 6.62.06 8.75-.53 6.51-1.81 14.86-6.92 17.81-13.88.9-2.17 1.37-6.94 2-14 .37-4.12.74-8.37 1.22-10.58a3.55 3.55 0 0 1 2.11-2.55c1.65-.77 6.78-1.91 18.63 4.08 11.18 5.65 22.88 25.84 34.2 45.37 3.56 6.14 6.92 11.94 10.3 17.36 14.04 22.54 18.83 31.6 17.5 44.8zm128.84-31.56a68.74 68.74 0 0 1-4.55 10.9.58.58 0 0 1-1.08-.42 56.61 56.61 0 0 0 2.11-18.43c-.25-4.73-.4-7.59-2.66-8.51s-4.26.83-9.45 5.54c-1.1 1-2.36 2.14-3.78 3.4-10.8 9.47-26.88 20.68-55.61 23.37-16.84 1.59-27.59-4.63-30.92-8.14a2.16 2.16 0 0 0-3.07-.08 2.23 2.23 0 0 0-.51 2.29c2.12 6.84 1.2 12.26-.49 16.19-.95 2.2-1.85 2.05-2-.34-.25-4.64-1-9.88-3-14.19-3.11-6.94-7-14.34-8.89-17.88v-.05c3.24-1.49 8.86-4.83 11.37-10.88s4.48-18-9.82-31.74c-6.28-6.05-22.1-17.16-36.06-27-10.9-7.65-22.17-15.56-23.65-17.51-4.49-5.89-6.37-9.3-6.94-19.65.07-2.3.13-4.59.19-6.89l.27-2.49a.58.58 0 0 1 1.15 0 63.07 63.07 0 0 0 2 9.72c1.08 3.73 2.4 7.58 3.62 9.18 3.19 4.22 7.56 7.39 11.67 8.49a5.48 5.48 0 0 0 5-.72c2.93-2.33 2.65-7.6 2.19-16.34-.47-9-1.11-21.34 1.85-34.55 5.62-25 10.91-32.51 17.61-42 .86-1.22 1.75-2.47 2.65-3.79 1.44-2.08 3-4.1 4.67-6.23 7.47-9.61 15.93-20.49 13.92-40.95-.51-5.19-.76-8.83-.86-11.39a1 1 0 0 1 1.88-.59l.49.77 1.21 2c4.86 8 13.64 22.57 25.1 22.57a13.62 13.62 0 0 0 2.36-.21c23.39-3.93 51.9-30.25 52.17-30.51 3.12-3 2.84-6.14 1.64-7.91a5.18 5.18 0 0 0-6.45-1.72c-3.29 1.4-7.14 3.15-11.22 5-13.82 6.27-37 16.75-42.25 14.34a23.11 23.11 0 0 1-6.32-5.13 1 1 0 0 1 1.14-1.65c5.59 2.29 9.55 1.45 14.2-.08l1-.34c9.37-3.09 14.2-4.77 30.76-12.08a97.55 97.55 0 0 1 16.26-5.93c4-1 6.42-1.63 7.71-4.34a6.65 6.65 0 0 0-.5-7.13c-1.53-1.87-4.07-2.57-7-1.9-3.22.75-4.7 3-6.41 4.49-2.4 2.05-5 4.16-17.19 8.65-27 10-34.58 10.61-45.21 3.43-9.84-6.69-15.15-13.23-15.15-16 0-2.13 5.45-5.7 8.71-7.84 1.33-.87 2.59-1.69 3.62-2.46 4.34-3.22 13-11.39 13.38-11.73 5.4-5.41 17.91-2.18 25 2.58a2.23 2.23 0 0 0 1.72.41 2.14 2.14 0 0 0 1.68-2.58c-4.2-17.46-.13-27.34 4-32.55a22.58 22.58 0 0 1 17.48-8.48c12.81 0 21.76 10 21.76 24.42 0 11-2.82 16.79-5.48 20.3a1.73 1.73 0 0 1-2.58.18 1.78 1.78 0 0 1-.24-2.2A24.61 24.61 0 0 0 290 114a16.58 16.58 0 0 0-16.84-16.67c-3.94 0-13.48 1.5-16.77 15.44a29.81 29.81 0 0 0-.34 11.07l.08.71c.9 7.38 15.3 12.51 27.23 15.51 11.36 2.85 13 6.22 8.84 19.63s3.11 26.23 5.7 29.57a78.3 78.3 0 0 1 8.31 12.47 93.8 93.8 0 0 1 6.62 16.48c2.17 6.79 4.05 12.65 10.63 21.22 11.07 14.4 17.66 48.64 15 78-.21 2.41-.53 4.29-.77 5.67-.43 2.53-.72 4.2.66 5.38s3.16.7 7.26-.63l3.43-1.09a109.33 109.33 0 0 1 12.58-2.8 2.15 2.15 0 0 0 1.59-1.16c3.43-6.91 3.85-15.22 4-22.47q0-1.31.06-2.79c.19-7.77.45-18.93-2.95-32a1 1 0 0 1 1.93-.64 93 93 0 0 1 6.66 25.55c2.55 22.58-1.9 32.09-1.94 32.17a1.61 1.61 0 0 0 .95 2.25 17.12 17.12 0 0 1 6.95 4.67c1.46 1.66.93 2.4-1.14 1.62a36.26 36.26 0 0 0-12.77-2.29c-10.4 0-18.09 4.95-21.51 9.19-3.19 3.94-3.7 7.67-3.83 11.27l-.06.05c-7.48-.75-12.94 1.21-17.47 6.21l-.08.09c-6.26 7.75-4 24.63-1.29 38.48 1.28 6.45 5.59 25.52 1.73 37.68zm96.1 10.07c-15.71 6.71-25.43 14.51-34 21.39-5.65 4.53-11 8.81-17.28 12.14-10.12 5.34-24.91 6.53-33.27-7.7-2.37-4-.71-9.86 1.58-17.95 3.05-10.75 7.23-25.46 3.71-44.65-.94-5.12-1.77-9.51-2.49-13.31C334 377 332.9 371.43 334 367c.63-2.45 3.43-3 5.87-3a20.83 20.83 0 0 1 2.63.19 29.51 29.51 0 0 0 7 12.1c5.7 5.86 13.63 8.83 23.56 8.85 2.1.17 25.94 1.55 36.54-22.4 1.46.18 3.65.7 4.3 2.3 1.28 3.19-.27 8.91-1.52 13.5-.9 3.31-1.68 6.16-1.63 8.37.31 16 11 22.78 25.83 32.16 1.79 1.13 3.66 2.31 5.55 3.54S445 425 445 426c-.52 4.79-20 13.16-26.45 15.91z",fill:"currentColor"},null,-1)];function wb(e,t){return _(),N("svg",_b,bb)}const Bd=Bn(yb,[["render",wb]]),Eb={},Ob={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Nb=[O("path",{d:"M349.13 136.86c-40.32 0-57.36 19.24-85.44 19.24-28.79 0-50.75-19.1-85.69-19.1-34.2 0-70.67 20.88-93.83 56.45-32.52 50.16-27 144.63 25.67 225.11 18.84 28.81 44 61.12 77 61.47h.6c28.68 0 37.2-18.78 76.67-19h.6c38.88 0 46.68 18.89 75.24 18.89h.6c33-.35 59.51-36.15 78.35-64.85 13.56-20.64 18.6-31 29-54.35-76.19-28.92-88.43-136.93-13.08-178.34-23-28.8-55.32-45.48-85.79-45.48z",fill:"currentColor"},null,-1),O("path",{d:"M340.25 32c-24 1.63-52 16.91-68.4 36.86-14.88 18.08-27.12 44.9-22.32 70.91h1.92c25.56 0 51.72-15.39 67-35.11 14.72-18.77 25.88-45.37 21.8-72.66z",fill:"currentColor"},null,-1)];function Sb(e,t){return _(),N("svg",Ob,Nb)}const Hd=Bn(Eb,[["render",Sb]]),xb={class:"moonbase:product-downloads"},kb=["data-last","onClick"],Cb={class:"moonbase:sr-only"},Tb={class:"moonbase:sr-only"},Pb=O("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[O("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1),$b=["onClick"],Ib=he({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Bt.Universal]:()=>Ud,[Bt.Windows]:()=>Fd,[Bt.Linux]:()=>Bd,[Bt.Mac]:()=>Hd},{downloadProduct:r}=Ms(),o=X(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(_(),N("span",xb,[(_(!0),N(Ce,null,Gt(o.value,(a,l,c)=>(_(),N(Ce,{key:l},[a.length===1?(_(),N("button",{key:0,type:"button",role:"button","data-last":c===Object.keys(o.value).length-1||void 0,onClick:u=>b(r)(a[0])},[O("span",Cb,K(l.toString()),1),(_(),ke(qi(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,kb)):(_(),ke(b(ja),{key:1,as:"div","data-last":c===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:ye(()=>[B(b(Dd),null,{default:ye(()=>[O("span",Tb,K(l.toString()),1),(_(),ke(qi(a[0].icon()),{"aria-hidden":"true"})),Pb]),_:2},1024),B(xo,{name:"moonbase:scale"},{default:ye(()=>[B(b(Ad),{class:"moonbase:product-downloads-list"},{default:ye(()=>[(_(!0),N(Ce,null,Gt(a,u=>(_(),N("button",{key:u.key,type:"button",role:"button",onClick:d=>b(r)(u)},K(u.name),9,$b))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),Db={class:"moonbase:product-activations"},Ab=O("th",{scope:"col"}," Device ",-1),Vb=O("th",{scope:"col"}," Activation Method ",-1),Rb=O("th",{scope:"col"}," Last Online ",-1),jb={key:0,scope:"col"},Lb=[O("span",{class:"sr-only"},"Actions",-1)],Mb={key:0},Ub={colspan:"3"},Fb=O("td",null,null,-1),Bb={key:1},Hb=[O("td",{colspan:"3"}," No activations found ",-1)],Zb={key:0},qb=["onClick"],Wb=he({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=Ms(),i=T(null);Re(async()=>{let c=await o(n.productId);for(i.value=c.items.map(u=>({...u,revoking:!1}));c.hasMore&&c.next;)c=await o(n.productId,c.next),i.value.push(...c.items.map(u=>({...u,revoking:!1})))});const a=X(()=>i.value&&i.value.some(c=>c.activationMethod===vi.Online));async function l(c){c.revoking=!0,await s(c),r("revoked",c),i.value&&i.value.splice(i.value.indexOf(c),1)}return(c,u)=>(_(),N("table",Db,[O("thead",null,[O("tr",null,[Ab,Vb,Rb,a.value?(_(),N("th",jb,Lb)):me("",!0)])]),O("tbody",null,[i.value?i.value.length===0?(_(),N("tr",Bb,Hb)):me("",!0):(_(),N("tr",Mb,[O("td",Ub,[B(Pt),Te(" Loading activations.. ")]),Fb])),(_(!0),N(Ce,null,Gt(i.value,d=>{var f;return _(),N("tr",{key:d.id},[O("td",null,K(d.name),1),O("td",null,K(d.activationMethod),1),O("td",null,K((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(_(),N("td",Zb,[O("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:m=>l(d)},[d.revoking?(_(),ke(Pt,{key:0})):me("",!0),Te(" Revoke ")],8,qb)])):me("",!0)])}),128))])]))}}),zb={class:"moonbase:products"},Kb=O("th",{scope:"col"}," Product ",-1),Gb=O("th",{scope:"col"}," Activations ",-1),Jb={key:0,scope:"col"},Yb={key:0},Xb=O("td",null,null,-1),Qb={key:1},e1=[O("td",{colspan:"3"}," No products found ",-1)],t1=["src"],n1={key:1,class:"moonbase:image-placeholder"},r1=O("span",{class:"moonbase:sr-only"},"View activations",-1),o1={key:0},s1={key:0},i1=he({__name:"Products",setup(e){const{getProducts:t}=Ms(),n=T(null);Re(async()=>{let o=await t();for(n.value=o.items;o.hasMore&&o.next;)o=await t(o.next),n.value.push(...o.items)});const r=X(()=>n.value&&n.value.some(o=>o.downloads));return(o,s)=>(_(),N("table",zb,[O("thead",null,[O("tr",null,[Kb,Gb,r.value?(_(),N("th",Jb," Downloads ")):me("",!0)])]),O("tbody",null,[n.value?n.value.length===0?(_(),N("tr",Qb,e1)):me("",!0):(_(),N("tr",Yb,[O("td",null,[B(Pt),Te(" Loading products.. ")]),Xb])),(_(!0),N(Ce,null,Gt(n.value||[],i=>(_(),N("tr",{key:i.id},[O("td",null,[O("div",null,[i.iconUrl?(_(),N("img",{key:0,src:i.iconUrl,alt:""},null,8,t1)):(_(),N("div",n1)),O("span",null,K(i.name),1)])]),B(b(ja),{as:"td"},{default:ye(()=>[B(b(Dd),{class:"moonbase:button","data-variant":"secondary"},{default:ye(()=>[r1,Te(" "+K(i.currentActivations)+" / "+K(i.maxActivations),1)]),_:2},1024),B(xo,{name:"moonbase:scale"},{default:ye(()=>[B(b(Ad),null,{default:ye(()=>[B(Wb,{"product-id":i.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024),r.value?(_(),N("td",o1,[i.currentVersion!=null?(_(),N("div",s1,[i.downloads?(_(),ke(Ib,{key:0,downloads:i.downloads},null,8,["downloads"])):me("",!0)])):me("",!0)])):me("",!0)]))),128))])]))}}),a1={class:"moonbase:redeem"},l1=["data-visible"],c1={key:1,class:"moonbase:redeem-voucher"},u1={key:0},d1={key:1},f1=O("span",null," Contains: ",-1),p1={class:"moonbase:redeem-voucher-products"},h1=["src"],m1={key:1,class:"moonbase:image-placeholder"},v1={key:0},g1={class:"moonbase:redeem-voucher-bundle"},y1=["src"],_1={key:1,class:"moonbase:image-placeholder"},b1={key:0},w1={class:"moonbase:redeem-voucher-bundle-products"},E1={class:"shrink-0"},O1=["src"],N1={key:1,class:"moonbase:image-placeholder"},S1=he({__name:"Redeem",setup(e){const{redeem:t}=ng(),n=T(!1),r=T(null),o=T(null),s=T("");async function i(){n.value=!0,o.value=null;try{r.value=await t(s.value)}catch(a){throw o.value=a,a}n.value=!1}return(a,l)=>(_(),N("div",a1,[B(xo,{mode:"out-in",name:"moonbase:slide-left"},{default:ye(()=>[r.value?(_(),N("div",c1,[O("h3",null,[Te(" You got: "),O("strong",null,K(r.value.name),1)]),r.value.description?(_(),N("h4",u1,K(r.value.description),1)):me("",!0),O("h4",null,[Te(" Code: "),O("strong",null,K(r.value.code),1)]),r.value.redeemsProducts.length>0?(_(),N("div",d1,[f1,O("div",p1,[(_(!0),N(Ce,null,Gt(r.value.redeemsProducts,({value:c,quantity:u})=>(_(),N("div",{key:c.id,class:"moonbase:redeem-voucher-product"},[O("div",null,[c.iconUrl?(_(),N("img",{key:0,src:c.iconUrl,alt:""},null,8,h1)):(_(),N("div",m1))]),O("div",null,[O("p",null,[Te(K(c.name)+" ",1),u!==1?(_(),N("span",v1,"x "+K(u),1)):me("",!0)]),O("p",null,K(c.tagline),1)])]))),128)),(_(!0),N(Ce,null,Gt(r.value.redeemsBundles,({value:c,quantity:u})=>(_(),N("div",{key:c.id},[O("div",g1,[O("div",null,[c.iconUrl?(_(),N("img",{key:0,src:c.iconUrl,alt:""},null,8,y1)):(_(),N("div",_1))]),O("div",null,[O("p",null,[Te(K(c.name)+" ",1),u!==1?(_(),N("span",b1,"x "+K(u),1)):me("",!0)]),O("p",null,K(c.tagline),1)])]),O("div",w1,[(_(!0),N(Ce,null,Gt(c.products,d=>(_(),N("div",{key:d.id,class:"moonbase:redeem-voucher-product"},[O("div",E1,[d.iconUrl?(_(),N("img",{key:0,src:d.iconUrl,alt:""},null,8,O1)):(_(),N("div",N1))]),O("div",null,[O("p",null,K(d.name),1),O("p",null,K(d.tagline),1)])]))),128))])]))),128))])])):me("",!0)])):(_(),ke(Hn,{key:0,handler:i},{default:ye(()=>{var c;return[B(gt,{modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=u=>s.value=u),label:"Voucher code",name:"code",required:""},null,8,["modelValue"]),B(Zn,{label:"Redeem",success:"Redeem",error:"Error"}),O("span",{class:"moonbase:error","data-visible":!!o.value||void 0},K((c=o.value)==null?void 0:c.message),9,l1)]}),_:1}))]),_:1})]))}}),x1={class:"moonbase:customer"},k1=he({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=Ae();function n(s){switch(s){case de.ViewAccount:return 0;case de.ViewProducts:return 1;case de.RedeemVoucher:return 2}return 0}const r=T(n(t.intent));Xe(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(_(),ke(ri,{open:s.open,onClose:i[0]||(i[0]=a=>b(t).reset())},{default:ye(()=>[O("div",x1,[B(b(t_),{"selected-index":r.value,onChange:o},{default:ye(()=>[B(b(n_),null,{default:ye(()=>[B(b(Ma),null,{default:ye(()=>[Te("Account")]),_:1}),B(b(Ma),null,{default:ye(()=>[Te(" Products ")]),_:1}),B(b(Ma),null,{default:ye(()=>[Te("Redeem")]),_:1})]),_:1}),B(b(r_),null,{default:ye(()=>[B(b(Ua),null,{default:ye(()=>[B(cb)]),_:1}),B(b(Ua),null,{default:ye(()=>[B(i1)]),_:1}),B(b(Ua),null,{default:ye(()=>[B(S1)]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),C1={class:"moonbase:auto-activate"},T1={key:0,class:"moonbase:loader"},P1={key:1,class:"moonbase:loader"},$1={key:2,class:"moonbase:loader"},I1={key:3},D1={key:0,class:"moonbase:auto-activate-product"},A1=["src"],V1={key:1,class:"moonbase:image-placeholder"},R1={key:1,class:"moonbase:loader"},j1=[O("h3",null," Uh oh ",-1),O("p",null," This activation request was cancelled, open your app to try again. ",-1)],L1={key:2,class:"moonbase:loader"},M1={key:3,class:"moonbase:loader"},U1=[O("h3",null," Done! ",-1),O("p",null," Your product is activated. ",-1)],F1={key:4,class:"moonbase:auto-activate-content"},B1={key:0},H1={key:1},Z1=O("p",null," You don't have enough free seats on your licenses to activate this device. Either free up a seat or purchase additional licenses. ",-1),q1={class:"moonbase:auto-activate-cta"},W1=["href"],z1={key:2,class:"moonbase:auto-activate-trial"},K1={class:"moonbase:auto-activate-cta"},G1=he({__name:"AutoActivate",setup(e){const t=Ae(),{user:n,loaded:r}=bt(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:l,error:c,fulfillLicense:u,fulfillTrial:d,cancel:f}=tg(o);Xe(s,E=>{var S;!a.value&&!l.value&&(E==null?void 0:E.status)===Ht.Requested&&((S=E==null?void 0:E.licenseEligibility)!=null&&S.eligible)&&u()});function m(){f(),t.show(Se.Customer,de.ViewProducts)}function y(){t.enqueue(Se.Activation,de.ActivateProduct,t.parameters??void 0),t.show(Se.Authentication,de.SignIn)}return(E,S)=>{var A,F,C,z;return _(),N("div",C1,[b(i)||!b(r)?(_(),N("div",T1,[B(Pt)])):b(c)?(_(),N("div",P1,K(b(c)),1)):b(s)?(_(),N("div",I1,[b(s).product?(_(),N("div",D1,[b(s).product.iconUrl?(_(),N("img",{key:0,src:b(s).product.iconUrl,alt:""},null,8,A1)):(_(),N("div",V1)),O("div",null,[O("h2",null,K(b(s).product.name),1),O("h3",null,K(b(s).product.tagline),1)])])):me("",!0),((A=b(s))==null?void 0:A.status)===b(Ht).Cancelled?(_(),N("div",R1,j1)):b(a)||b(l)?(_(),N("div",L1,[B(Pt),O("p",null,"Activating "+K(b(s).product.name)+"...",1)])):((F=b(s))==null?void 0:F.status)===b(Ht).Completed?(_(),N("div",M1,U1)):(_(),N("div",F1,[b(n)?(C=b(n).ownedProducts)!=null&&C.includes(b(s).product.id)?(_(),N("div",H1,[Z1,O("span",q1,[O("button",{role:"button",class:"moonbase:button",onClick:S[0]||(S[0]=$=>m())}," Licenses "),b(s).product&&b(s).product.website?(_(),N("a",{key:0,href:b(s).product.website,class:"moonbase:button"}," Purchase ",8,W1)):me("",!0)])])):me("",!0):(_(),N("div",B1,[Te(" Please sign in to use a license "),O("span",{class:"moonbase:auto-activate-cta"},[O("button",{role:"button",class:"moonbase:button",onClick:y}," Sign in ")])])),(z=b(s).trialEligibility)!=null&&z.eligible?(_(),N("div",z1,[Te(" You are eligible for a "+K(b(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),b(s).trialEligibility.existing?(_(),N(Ce,{key:0},[Te(" of which you have "+K(b(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):me("",!0),Te(". "),O("span",K1,[O("button",{role:"button",class:"moonbase:button",onClick:S[1]||(S[1]=$=>b(d)())}," Start trial ")])])):me("",!0)]))])):(_(),N("div",$1," Could not find activation request "))])}}}),J1={class:"moonbase:activation"},Y1=he({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=Ae();return(n,r)=>(_(),ke(ri,{open:n.open,onClose:r[0]||(r[0]=o=>b(t).reset())},{default:ye(()=>[O("div",J1,[B(b(ei),{as:"h3"},{default:ye(()=>[Te(" Activate product ")]),_:1}),n.open&&b(t).intent===b(de).ActivateProduct?(_(),ke(G1,{key:0})):me("",!0)])]),_:1},8,["open"]))}});function X1(e){const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(e<1)return`${e} B`;const n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);e=Number(e/1024**n);const r=t[n];return e>=10||e%1===0?`${e.toFixed(0)} ${r}`:`${e.toFixed(1)} ${r}`}const Q1={class:"moonbase:download-product"},ew={key:0,class:"moonbase:loader"},tw={key:1,class:"moonbase:loader"},nw={key:2,class:"moonbase:loader"},rw={key:3},ow={class:"moonbase:download-product-product"},sw=["src"],iw={key:1,class:"moonbase:image-placeholder"},aw={key:0},lw={key:0,class:"moonbase:download-product-content"},cw={key:1,class:"moonbase:download-product-content"},uw={key:2,class:"moonbase:download-product-content"},dw={key:0,role:"list"},fw={class:"moonbase:download-product-download-name"},pw=["onClick"],hw=O("span",{class:"moonbase:download-product-clicker"},null,-1),mw={class:"moonbase:download-product-download-description"},vw=O("span",null," |",-1),gw={key:1,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},yw=[O("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"},null,-1)],_w={key:1,class:"moonbase:loader"},bw=he({__name:"DownloadProduct",setup(e){const t=Ae(),{user:n,loaded:r}=bt(),{getProduct:o,downloadProduct:s}=Ms(),i={[Bt.Universal]:()=>Ud,[Bt.Windows]:()=>Fd,[Bt.Linux]:()=>Bd,[Bt.Mac]:()=>Hd},a=T(null),l=T([]),c=T(null),u=T(!0),d=X(()=>t.getParameter("key")),f=X(()=>{var E,S;return(S=(E=a.value)==null?void 0:E.downloads)==null?void 0:S.filter(A=>!d.value||A.key===d.value)});Re(async()=>{const E=t.getParameter("product_id"),S=t.getParameter("version");if(!E){c.value="Link is broken";return}try{a.value=await o(E,S||void 0)}catch(A){c.value=A.message}u.value=!1});function m(){t.enqueue(Se.Download,de.DownloadProduct,t.parameters??void 0),t.show(Se.Authentication,de.SignIn)}async function y(E){l.value.push(E.key),await s(E),l.value=l.value.filter(S=>S!==E.key)}return(E,S)=>{var A,F;return _(),N("div",Q1,[u.value||!b(r)?(_(),N("div",ew,[B(Pt)])):c.value?(_(),N("div",tw,K(c.value),1)):a.value?(_(),N("div",rw,[O("div",ow,[a.value.iconUrl?(_(),N("img",{key:0,src:a.value.iconUrl,alt:""},null,8,sw)):(_(),N("div",iw)),O("div",null,[O("h2",null,[Te(K(a.value.name)+" ",1),O("span",null,"v"+K(a.value.version||a.value.currentVersion),1),a.value.prerelease?(_(),N("span",aw," (pre-release)")):me("",!0)]),O("h3",null,K(a.value.tagline),1)])]),a.value.downloadsNeedsUser&&!b(n)?(_(),N("div",lw,[Te(" Please sign in to download product "),O("span",{class:"moonbase:download-product-cta"},[O("button",{role:"button",class:"moonbase:button",onClick:m}," Sign in ")])])):a.value.downloadsNeedsOwnership&&!((A=b(n).ownedProducts)!=null&&A.includes(a.value.id))?(_(),N("div",cw," This product requires ownership to download ")):(_(),N("div",uw,[(F=a.value)!=null&&F.downloads&&a.value.downloads.length>0?(_(),N("ul",dw,[(_(!0),N(Ce,null,Gt(f.value,C=>(_(),N("li",{key:C.key},[O("div",null,[O("p",fw,[O("button",{onClick:z=>y(C)},[hw,Te(" "+K(C.name),1)],8,pw)]),O("p",mw,[(_(),ke(qi(i[C.platform]()),{"aria-hidden":"true"})),Te(" "+K(C.platform)+" ",1),vw,Te(" "+K(b(X1)(C.size)),1)])]),O("div",null,[l.value.includes(C.key)?(_(),ke(Pt,{key:0})):(_(),N("svg",gw,yw))])]))),128))])):(_(),N("div",_w," No downloadable files found "))]))])):(_(),N("div",nw," Could not find product "))])}}}),ww={class:"moonbase:download"},Ew=he({__name:"Download",props:{open:{type:Boolean}},setup(e){const t=Ae();return(n,r)=>(_(),ke(ri,{open:n.open,onClose:r[0]||(r[0]=o=>b(t).reset())},{default:ye(()=>[O("div",ww,[B(b(ei),{as:"h3"},{default:ye(()=>[Te(" Download product ")]),_:1}),n.open&&b(t).intent===b(de).DownloadProduct?(_(),ke(bw,{key:0})):me("",!0)])]),_:1},8,["open"]))}}),Ow=he({__name:"App",setup(e){const t=$e(Ws),n=Ae();return(r,o)=>{var s;return _(),N(Ce,null,[(s=b(t))!=null&&s.toolbar.enabled?(_(),ke(Lg,{key:0})):me("",!0),B(ob,{open:b(n).active===b(Se).Cart},null,8,["open"]),B(m_,{open:b(n).active===b(Se).Authentication},null,8,["open"]),B(Y1,{open:b(n).active===b(Se).Activation},null,8,["open"]),B(Ew,{open:b(n).active===b(Se).Download},null,8,["open"]),B(k1,{open:b(n).active===b(Se).Customer},null,8,["open"])],64)}}});function oi(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Wa(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(oi(e)&&oi(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];oi(o)&&oi(e[r])?e[r]=Wa(e[r],o):o!==void 0&&(e[r]=o)}}return Wa(e,...t)}class Nw{constructor(){Nr(this,"initialized",!1);Nr(this,"pinia");Nr(this,"storefront");Nr(this,"options")}async setup(t,n){if(document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}const r=document.createElement("div");if(r.id="moonbase",r.classList.add("moonbase"),document.body.append(r),this.options=Wa(Dg,n),this.storefront=rg(t),this.pinia=Cg(),Uv(Ow).use(this.storefront).use(this.pinia).provide(Ws,this.options).mount("#moonbase"),this.initialized=!0,window&&window.location){const i=new URLSearchParams(window.location.search),a=i.get("mb_intent");if(a&&Object.values(de).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([u])=>u.startsWith("mb_")).map(([u,d])=>[u.substring(3),d]));if(a===de.Checkout&&l.complete)return;this[a](l);for(const u of Object.keys(l))i.delete(`mb_${u}`);const c=i.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(c?`?${c}`:""))}}const o=Ae(this.pinia),s=bt(this.storefront);this.storefront.onCheckoutClosed(i=>{i===de.ViewProducts&&(s.user?o.show(Se.Customer,de.ViewProducts):o.show(Se.Cart,de.ViewCart))})}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Authentication,de.SignIn,t)}sign_up(t){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!((r=this.options)!=null&&r.auth.enable.signUp))throw new Error("Sign ups are not enabled");Ae(this.pinia).show(Se.Authentication,de.SignUp,t)}forgot_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Authentication,de.ForgotPassword,t)}reset_password(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Authentication,de.ResetPassword,t)}confirm_account(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Authentication,de.ConfirmAccount,t)}confirm_email(){}confirm_email_change(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Ae(this.pinia);bt(this.storefront).user.value?n.show(Se.Authentication,de.ConfirmEmailChange,t):(n.show(Se.Authentication,de.SignIn),n.enqueue(Se.Authentication,de.ConfirmEmailChange,t))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=Ae(this.pinia);bt(this.storefront).user.value?t.show(Se.Customer,de.ViewAccount):(t.show(Se.Authentication,de.SignIn),t.enqueue(Se.Customer,de.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Cart,de.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Cart,de.ViewCart,t)}download_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Download,de.DownloadProduct,t)}activate_product(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.token))throw new Error("You need to provide a token when activating a product");Ae(this.pinia).show(Se.Activation,de.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Ae(this.pinia).show(Se.Cart,de.ViewCart)}async add_to_cart(t){var o,s,i,a;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(t!=null&&t.product_id)&&!(t!=null&&t.bundle_id))throw new Error("You need to provide a product or bundle ID when adding to cart");const n=ba(this.storefront);if(t!=null&&t.product_id){const l=Vu(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(o=l.value.variations)==null?void 0:o.find(c=>c.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const c=Vu(t.product_id,this.storefront);if(c.value)n.addToCart(c.value,(s=c.value.variations)==null?void 0:s.find(u=>u.id===t.variation_id));else throw new Error(`Product '${t.product_id}' not found`)}}if(t!=null&&t.bundle_id){const l=Au(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(i=l.value.variations)==null?void 0:i.find(c=>c.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const c=Au(t.bundle_id,this.storefront);if(c.value)n.addToCart(c.value,(a=c.value.variations)==null?void 0:a.find(u=>u.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}Ae(this.pinia).show(Se.Cart,de.AddToCart)}checkout(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(t!=null&&t.complete)return;ba(this.storefront).checkout(`${window.location.pathname}?mb_intent=view_products`)}}const Zd=new Nw;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=Zd),Et.MoonbaseIntent=de,Et.default=Zd,Object.defineProperties(Et,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
26
|
+
`));const f=Ff(u.props??{},i,l),m=Wt(u,f,!0);for(const _ in f)_.startsWith("on")&&(m.props||(m.props={}),m.props[_]=f[_]);return m}return Array.isArray(a)&&a.length===1?a[0]:a}return qe(o,Object.assign({},i,l),{default:()=>a})}function Bf(t){return t.flatMap(e=>e.type===Re?Bf(e.children):[e])}function Ff(...t){if(t.length===0)return{};if(t.length===1)return t[0];const e={},n={};for(const r of t)for(const s in r)s.startsWith("on")&&typeof r[s]=="function"?(n[s]??(n[s]=[]),n[s].push(r[s])):e[s]=r[s];if(e.disabled||e["aria-disabled"])return Object.assign(e,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(const r in n)Object.assign(e,{[r](s,...o){const i=n[r];for(const a of i){if(s instanceof Event&&s.defaultPrevented)return;a(s,...o)}}});return e}function Hl(t,e=[]){const n=Object.assign({},t);for(const r of e)r in n&&delete n[r];return n}function l1(t){return t==null?!1:typeof t.type=="string"||typeof t.type=="object"||typeof t.type=="function"}var vr=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(vr||{});let gr=ve({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(t,{slots:e,attrs:n}){return()=>{let{features:r,...s}=t,o={"aria-hidden":(r&2)===2?!0:s["aria-hidden"]??void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return ct({ourProps:o,theirProps:s,slot:{},attrs:n,slots:e,name:"Hidden"})}}});function c1(t){function e(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}function Y(t){if(t==null||t.value==null)return null;let e=t.value.$el??t.value;return e instanceof Node?e:null}function yn(t){if(Oo.isServer)return null;if(t instanceof Node)return t.ownerDocument;if(t!=null&&t.hasOwnProperty("value")){let e=Y(t);if(e)return e.ownerDocument}return document}const Qi=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(t=>`${t}:not([tabindex='-1'])`).join(",");var Je=(t=>(t[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t))(Je||{}),Ln=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(Ln||{});function ea(t=document.body){return t==null?[]:Array.from(t.querySelectorAll(Qi)).sort((e,n)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var zl=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(zl||{});function Hf(t,e=0){var n;return t===((n=yn(t))==null?void 0:n.body)?!1:it(e,{0(){return t.matches(Qi)},1(){let r=t;for(;r!==null;){if(r.matches(Qi))return!0;r=r.parentElement}return!1}})}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",t=>{t.metaKey||t.altKey||t.ctrlKey||(document.documentElement.dataset.moonbaseFocusVisible="")},!0),document.addEventListener("click",t=>{t.detail===1?delete document.documentElement.dataset.moonbaseFocusVisible:t.detail===0&&(document.documentElement.dataset.moonbaseFocusVisible="")},!0));function zr(t){t==null||t.focus({preventScroll:!0})}const u1=["textarea","input"].join(",");function d1(t){var e;return((e=t==null?void 0:t.matches)==null?void 0:e.call(t,u1))??!1}function hs(t,e=n=>n){return t.slice().sort((n,r)=>{const s=e(n),o=e(r);if(s===null||o===null)return 0;const i=s.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function mt(t,e,{sorted:n=!0,relativeTo:r=null,skipElements:s=[]}={}){const o=(Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t==null?void 0:t.ownerDocument)??document;let i=Array.isArray(t)?n?hs(t):t:ea(t);s.length>0&&i.length>1&&(i=i.filter(m=>!s.includes(m))),r=r??o.activeElement;const a=(()=>{if(e&5)return 1;if(e&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(e&1)return 0;if(e&2)return Math.max(0,i.indexOf(r))-1;if(e&4)return Math.max(0,i.indexOf(r))+1;if(e&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=e&32?{preventScroll:!0}:{};let u=0;const d=i.length;let f;do{if(u>=d||u+d<=0)return 0;let m=l+u;if(e&16)m=(m+d)%d;else{if(m<0)return 3;if(m>=d)return 1}f=i[m],f==null||f.focus(c),u+=a}while(f!==o.activeElement);return e&6&&d1(f)&&f.select(),2}let qr=[];c1(()=>{function t(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||qr[0]===e.target)return;let n=e.target;n=n.closest(Qi),qr.unshift(n??e.target),qr=qr.filter(r=>r!=null&&r.isConnected),qr.splice(10)}window.addEventListener("click",t,{capture:!0}),window.addEventListener("mousedown",t,{capture:!0}),window.addEventListener("focus",t,{capture:!0}),document.body.addEventListener("click",t,{capture:!0}),document.body.addEventListener("mousedown",t,{capture:!0}),document.body.addEventListener("focus",t,{capture:!0})});function ta(t){typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t).catch(e=>setTimeout(()=>{throw e}))}function zf(t){if(!t)return new Set;if(typeof t=="function")return new Set(t());const e=new Set;for(const n of t.value){const r=Y(n);r instanceof HTMLElement&&e.add(r)}return e}var qf=(t=>(t[t.None=1]="None",t[t.InitialFocus=2]="InitialFocus",t[t.TabLock=4]="TabLock",t[t.FocusLock=8]="FocusLock",t[t.RestoreFocus=16]="RestoreFocus",t[t.All=30]="All",t))(qf||{});const No=Object.assign(ve({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:C(new Set)}},inheritAttrs:!1,setup(t,{attrs:e,slots:n,expose:r}){const s=C(null);r({el:s,$el:s});const o=ee(()=>yn(s)),i=C(!1);ze(()=>i.value=!0),Ot(()=>i.value=!1),p1({ownerDocument:o},ee(()=>i.value&&!!(t.features&16)));const a=h1({ownerDocument:o,container:s,initialFocus:ee(()=>t.initialFocus)},ee(()=>i.value&&!!(t.features&2)));m1({ownerDocument:o,container:s,containers:t.containers,previousActiveElement:a},ee(()=>i.value&&!!(t.features&8)));const l=Fl();function c(m){const _=Y(s);if(!_)return;(k=>k())(()=>{it(l.value,{[Lt.Forwards]:()=>{mt(_,Je.First,{skipElements:[m.relatedTarget]})},[Lt.Backwards]:()=>{mt(_,Je.Last,{skipElements:[m.relatedTarget]})}})})}const u=C(!1);function d(m){m.key==="Tab"&&(u.value=!0,requestAnimationFrame(()=>{u.value=!1}))}function f(m){if(!i.value)return;const _=zf(t.containers);Y(s)instanceof HTMLElement&&_.add(Y(s));const E=m.relatedTarget;E instanceof HTMLElement&&E.dataset.moonbaseFocusGuard!=="true"&&(Wf(_,E)||(u.value?mt(Y(s),it(l.value,{[Lt.Forwards]:()=>Je.Next,[Lt.Backwards]:()=>Je.Previous})|Je.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&zr(m.target)))}return()=>{const m={},_={ref:s,onKeydown:d,onFocusout:f},{features:E,initialFocus:k,containers:A,...B}=t;return qe(Re,[!!(E&4)&&qe(gr,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:c,features:vr.Focusable}),ct({ourProps:_,theirProps:{...e,...B},slot:m,attrs:e,slots:n,name:"FocusTrap"}),!!(E&4)&&qe(gr,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:c,features:vr.Focusable})])}}}),{features:qf});function f1(t){const e=C(qr.slice());return lt([t],([n],[r])=>{r===!0&&n===!1?ta(()=>{e.value.splice(0)}):r===!1&&n===!0&&(e.value=qr.slice())},{flush:"post"}),()=>e.value.find(n=>n!=null&&n.isConnected)??null}function p1({ownerDocument:t},e){const n=f1(e);ze(()=>{bt(()=>{var r,s;e.value||((r=t.value)==null?void 0:r.activeElement)===((s=t.value)==null?void 0:s.body)&&zr(n())},{flush:"post"})}),Ot(()=>{e.value&&zr(n())})}function h1({ownerDocument:t,container:e,initialFocus:n},r){const s=C(null),o=C(!1);return ze(()=>o.value=!0),Ot(()=>o.value=!1),ze(()=>{lt([e,n,r],(i,a)=>{if(i.every((c,u)=>(a==null?void 0:a[u])===c)||!r.value)return;const l=Y(e);l&&ta(()=>{var d,f;if(!o.value)return;const c=Y(n),u=(d=t.value)==null?void 0:d.activeElement;if(c){if(c===u){s.value=u;return}}else if(l.contains(u)){s.value=u;return}c?zr(c):mt(l,Je.First|Je.NoScroll)===Ln.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),s.value=(f=t.value)==null?void 0:f.activeElement})},{immediate:!0,flush:"post"})}),s}function m1({ownerDocument:t,container:e,containers:n,previousActiveElement:r},s){var o;Bl((o=t.value)==null?void 0:o.defaultView,"focus",i=>{if(!s.value)return;const a=zf(n);Y(e)instanceof HTMLElement&&a.add(Y(e));const l=r.value;if(!l)return;const c=i.target;c&&c instanceof HTMLElement?Wf(a,c)?(r.value=c,zr(c)):(i.preventDefault(),i.stopPropagation(),zr(l)):zr(r.value)},!0)}function Wf(t,e){for(const n of t)if(n.contains(e))return!0;return!1}function v1(t){let e=nv(t.getSnapshot());return Ot(t.subscribe(()=>{e.value=t.getSnapshot()})),e}function So(){const t=[],e={addEventListener(n,r,s,o){return n.addEventListener(r,s,o),e.add(()=>n.removeEventListener(r,s,o))},requestAnimationFrame(...n){const r=requestAnimationFrame(...n);e.add(()=>cancelAnimationFrame(r))},nextFrame(...n){e.requestAnimationFrame(()=>{e.requestAnimationFrame(...n)})},setTimeout(...n){const r=setTimeout(...n);e.add(()=>clearTimeout(r))},microTask(...n){const r={current:!0};return ta(()=>{r.current&&n[0]()}),e.add(()=>{r.current=!1})},style(n,r,s){const o=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:s}),this.add(()=>{Object.assign(n.style,{[r]:o})})},group(n){const r=So();return n(r),this.add(()=>r.dispose())},add(n){return t.push(n),()=>{const r=t.indexOf(n);if(r>=0)for(const s of t.splice(r,1))s()}},dispose(){for(const n of t.splice(0))n()}};return e}function g1(t,e){let n=t(),r=new Set;return{getSnapshot(){return n},subscribe(s){return r.add(s),()=>r.delete(s)},dispatch(s,...o){let i=e[s].call(n,...o);i&&(n=i,r.forEach(a=>a()))}}}function y1(){let t;return{before({doc:e}){const n=e.documentElement,r=e.defaultView??window;t=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:e,d:n}){const r=e.documentElement,s=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,t-s);n.style(r,"paddingRight",`${o}px`)}}}function Kf(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function _1(){return/Android/gi.test(window.navigator.userAgent)}function b1(){return Kf()||_1()}function w1(){return Kf()?{before({doc:t,d:e,meta:n}){function r(s){return n.containers.flatMap(o=>o()).some(o=>o.contains(s))}e.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){const i=So();i.style(t.documentElement,"scrollBehavior","auto"),e.add(()=>e.microTask(()=>i.dispose()))}const s=window.scrollY??window.pageYOffset;let o=null;e.addEventListener(t,"click",i=>{if(i.target instanceof HTMLElement)try{const a=i.target.closest("a");if(!a)return;const{hash:l}=new URL(a.href),c=t.querySelector(l);c&&!r(c)&&(o=c)}catch{}},!0),e.addEventListener(t,"touchstart",i=>{if(i.target instanceof HTMLElement)if(r(i.target)){let a=i.target;for(;a.parentElement&&r(a.parentElement);)a=a.parentElement;e.style(a,"overscrollBehavior","contain")}else e.style(i.target,"touchAction","none")}),e.addEventListener(t,"touchmove",i=>{if(i.target instanceof HTMLElement){if(i.target.tagName==="INPUT")return;if(r(i.target)){let a=i.target;for(;a.parentElement&&a.dataset.moonbasePortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.moonbasePortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),e.add(()=>{const i=window.scrollY??window.pageYOffset;s!==i&&window.scrollTo(0,s),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})})}}:{}}function E1(){return{before({doc:t,d:e}){e.style(t.documentElement,"overflow","hidden")}}}function x1(t){const e={};for(const n of t)Object.assign(e,n(e));return e}const Wr=g1(()=>new Map,{PUSH(t,e){const n=this.get(t)??{doc:t,count:0,d:So(),meta:new Set};return n.count++,n.meta.add(e),this.set(t,n),this},POP(t,e){const n=this.get(t);return n&&(n.count--,n.meta.delete(e)),this},SCROLL_PREVENT({doc:t,d:e,meta:n}){const r={doc:t,d:e,meta:x1(n)},s=[w1(),y1(),E1()];s.forEach(({before:o})=>o==null?void 0:o(r)),s.forEach(({after:o})=>o==null?void 0:o(r))},SCROLL_ALLOW({d:t}){t.dispose()},TEARDOWN({doc:t}){this.delete(t)}});Wr.subscribe(()=>{const t=Wr.getSnapshot(),e=new Map;for(const[n]of t)e.set(n,n.documentElement.style.overflow);for(const n of t.values()){const r=e.get(n.doc)==="hidden",s=n.count!==0;(s&&!r||!s&&r)&&Wr.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Wr.dispatch("TEARDOWN",n)}});function k1(t,e,n){const r=v1(Wr),s=ee(()=>{const o=t.value?r.value.get(t.value):void 0;return o?o.count>0:!1});return lt([t,e],([o,i],[a],l)=>{if(!o||!i)return;Wr.dispatch("PUSH",o,n);let c=!1;l(()=>{c||(Wr.dispatch("POP",a??o,n),c=!0)})},{immediate:!0}),s}let O1=0;function N1(){return++O1}function Ht(){return N1()}const ql=new Map,To=new Map;function Gf(t,e=C(!0)){bt(n=>{if(!e.value)return;const r=Y(t);if(!r)return;n(()=>{if(!r)return;const o=To.get(r)??1;if(o===1?To.delete(r):To.set(r,o-1),o!==1)return;const i=ql.get(r);i&&(i["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",i["aria-hidden"]),r.inert=i.inert,ql.delete(r))});const s=To.get(r)??0;To.set(r,s+1),s===0&&(ql.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Co(t,e,n,r){Oo.isServer||bt(s=>{t.value&&(document.addEventListener(e,n,r),s(()=>document.removeEventListener(e,n,r)))})}const Jf=30;function Yf(t,e,n=ee(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const l=a(i);if(l===null||!l.getRootNode().contains(l))return;const c=function u(d){return typeof d=="function"?u(d()):Array.isArray(d)||d instanceof Set?d:[d]}(t);for(const u of c){if(u===null)continue;const d=u instanceof HTMLElement?u:Y(u);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!Hf(l,zl.Loose)&&l.tabIndex!==-1&&i.preventDefault(),e(i,l)}const s=C(null);Co(n,"pointerdown",i=>{var a,l;s.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Co(n,"mousedown",i=>{var a,l;s.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target},!0),Co(n,"click",i=>{b1()||s.value&&(r(i,()=>s.value),s.value=null)},!0);const o={x:0,y:0};Co(n,"touchstart",i=>{o.x=i.touches[0].clientX,o.y=i.touches[0].clientY},!0),Co(n,"touchend",i=>{const a={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(a.x-o.x)>=Jf||Math.abs(a.y-o.y)>=Jf))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),Zf(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Xf({defaultContainers:t=[],portals:e,mainTreeNodeRef:n}={}){const r=C(null),s=yn(r);function o(){var a,l;const i=[];for(const c of t)c!==null&&(c instanceof HTMLElement?i.push(c):"value"in c&&c.value instanceof HTMLElement&&i.push(c.value));if(e!=null&&e.value)for(const c of e.value)i.push(c);for(const c of(s==null?void 0:s.querySelectorAll("html > *, body > *"))??[])c!==document.body&&c!==document.head&&c instanceof HTMLElement&&c.id!=="moonbase"&&(c.contains(Y(r))||c.contains((l=(a=Y(r))==null?void 0:a.getRootNode())==null?void 0:l.host)||i.some(u=>c.contains(u))||i.push(c));return i}return{resolveContainers:o,contains(i){return o().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:qe(gr,{features:vr.Hidden,ref:r})}}}let Qf=Symbol("Context");var vt=(t=>(t[t.Open=1]="Open",t[t.Closed=2]="Closed",t[t.Closing=4]="Closing",t[t.Opening=8]="Opening",t))(vt||{});function S1(){return na()!==null}function na(){return Me(Qf,null)}function ep(t){_t(Qf,t)}const tp=Symbol("ForcePortalRootContext");function T1(){return Me(tp,!1)}const np=ve({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(t,{slots:e,attrs:n}){return _t(tp,t.force),()=>{const{force:r,...s}=t;return ct({theirProps:s,ourProps:{},slot:{},slots:e,attrs:n,name:"ForcePortalRoot"})}}});let rp=Symbol("StackContext");var Wl=(t=>(t[t.Add=0]="Add",t[t.Remove=1]="Remove",t))(Wl||{});function C1(){return Me(rp,()=>{})}function $1({type:t,enabled:e,element:n,onUpdate:r}){let s=C1();function o(...i){r==null||r(...i),s(...i)}ze(()=>{lt(e,(i,a)=>{i?o(0,t,n):a===!0&&o(1,t,n)},{immediate:!0,flush:"sync"})}),Ot(()=>{e.value&&o(1,t,n)}),_t(rp,o)}var ut=(t=>(t.Space=" ",t.Enter="Enter",t.Escape="Escape",t.Backspace="Backspace",t.Delete="Delete",t.ArrowLeft="ArrowLeft",t.ArrowUp="ArrowUp",t.ArrowRight="ArrowRight",t.ArrowDown="ArrowDown",t.Home="Home",t.End="End",t.PageUp="PageUp",t.PageDown="PageDown",t.Tab="Tab",t))(ut||{});let P1=Symbol("DescriptionContext");function I1({slot:t=C({}),name:e="Description",props:n={}}={}){let r=C([]);function s(o){return r.value.push(o),()=>{let i=r.value.indexOf(o);i!==-1&&r.value.splice(i,1)}}return _t(P1,{register:s,slot:t,name:e,props:n}),ee(()=>r.value.length>0?r.value.join(" "):void 0)}function sp(t){const e=yn(t);if(!e){if(t===null)return null;throw new Error(`[Moonbase]: Cannot find ownerDocument for contextElement: ${t}`)}const n=e.getElementById("moonbase");if(n)return n;throw new Error("[Moonbase]: Cannot find existing root element")}const A1=ve({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(t,{slots:e,attrs:n}){const r=C(null);ee(()=>yn(r));const s=T1(),o=Me(ip,null),i=C(s===!0||o==null?sp(r.value):o.resolveTarget()),a=C(!1);ze(()=>{a.value=!0}),bt(()=>{s||o!=null&&(i.value=o.resolveTarget())});const l=Me(Kl,null);let c=!1;const u=Ni();return lt(r,()=>{if(c||!l)return;const d=Y(r);d&&(Ot(l.register(d),u),c=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return qe(bg,{to:i.value},ct({ourProps:d,theirProps:t,slot:{},attrs:n,slots:e,name:"Portal"}))}}});let Kl=Symbol("PortalParentContext");function op(){const t=Me(Kl,null),e=C([]);function n(o){return e.value.push(o),t&&t.register(o),()=>r(o)}function r(o){const i=e.value.indexOf(o);i!==-1&&e.value.splice(i,1),t&&t.unregister(o)}const s={register:n,unregister:r,portals:e};return[e,ve({name:"PortalWrapper",setup(o,{slots:i}){return _t(Kl,s),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let ip=Symbol("PortalGroupContext");const D1=ve({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(t,{attrs:e,slots:n}){const r=Bs({resolveTarget(){return t.target}});return _t(ip,r),()=>{const{target:s,...o}=t;return ct({theirProps:o,ourProps:{},slot:{},attrs:e,slots:n,name:"PortalGroup"})}}}),Gl=Symbol("DialogContext");function ra(t){const e=Me(Gl,null);if(e===null){const n=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ra),n}return e}const sa="DC8F892D-2EBD-447C-A4C8-A03058436FF4",ap=ve({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:sa},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${Ht()}`},role:{type:String,default:"dialog"}},emits:{close:t=>!0},setup(t,{emit:e,attrs:n,slots:r,expose:s}){var be;const o=C(!1);ze(()=>{o.value=!0});let i=!1;const a=ee(()=>t.role==="dialog"||t.role==="alertdialog"?t.role:(i||(i=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),l=C(0),c=na(),u=ee(()=>t.open===sa&&c!==null?(c.value&vt.Open)===vt.Open:t.open),d=C(null),f=ee(()=>yn(d));if(s({el:d,$el:d}),!(t.open!==sa||c!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof u.value!="boolean")throw new TypeError(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${u.value===sa?void 0:t.open}`);const _=ee(()=>o.value&&u.value?0:1),E=ee(()=>_.value===0),k=C(null),A={titleId:k,panelRef:C(null),dialogState:_,setTitleId(ae){k.value!==ae&&(k.value=ae)},close(){e("close",!1)}},B=ee(()=>l.value>1),T=Me(Gl,null)!==null,[J,P]=op(),{resolveContainers:z,mainTreeNodeRef:N,MainTreeNode:Oe}=Xf({portals:J,defaultContainers:[ee(()=>A.panelRef.value??d.value)]}),K=ee(()=>B.value?"parent":"leaf"),R=ee(()=>c!==null?(c.value&vt.Closing)===vt.Closing:!1),V=ee(()=>T||R.value?!1:E.value),I=ee(()=>{var ae;return Array.from(((ae=f.value)==null?void 0:ae.querySelectorAll("body > *"))??[]).find(We=>We.id==="moonbase"?!1:We.contains(Y(N))&&We instanceof HTMLElement)??null});Gf(I,V);const ce=ee(()=>B.value?!0:E.value),Ze=ee(()=>{var ae;return Array.from(((ae=f.value)==null?void 0:ae.querySelectorAll("[data-moonbase-portal]"))??[]).find(We=>We.contains(Y(N))&&We instanceof HTMLElement)??null});Gf(Ze,ce),$1({type:"Dialog",enabled:ee(()=>_.value===0),element:d,onUpdate:(ae,We)=>{if(We==="Dialog")return it(ae,{[Wl.Add]:()=>l.value+=1,[Wl.Remove]:()=>l.value-=1})}});const w=I1({name:"DialogDescription",slot:ee(()=>({open:u.value}))});_t(Gl,A);const $=ee(()=>!(!E.value||B.value));Yf(z,(ae,We)=>{ae.preventDefault(),A.close(),qs(()=>We==null?void 0:We.focus())},$);const Q=ee(()=>!(B.value||_.value!==0));Bl((be=f.value)==null?void 0:be.defaultView,"keydown",ae=>{Q.value&&(ae.defaultPrevented||ae.key===ut.Escape&&(ae.preventDefault(),ae.stopPropagation(),A.close()))});const oe=ee(()=>!(R.value||_.value!==0||T));return k1(f,oe,ae=>({containers:[...ae.containers??[],z]})),bt(ae=>{if(_.value!==0)return;const We=Y(d);if(!We)return;const xt=new ResizeObserver(Ke=>{for(const At of Ke){const yr=At.target.getBoundingClientRect();yr.x===0&&yr.y===0&&yr.width===0&&yr.height===0&&A.close()}});xt.observe(We),ae(()=>xt.disconnect())}),()=>{const{id:ae,open:We,initialFocus:xt,...Ke}=t,At={...n,ref:d,id:ae,role:a.value,"aria-modal":_.value===0?!0:void 0,"aria-labelledby":k.value,"aria-describedby":w.value},yr={open:_.value===0};return qe(np,{force:!0},()=>[qe(A1,()=>qe(D1,{target:d.value},()=>qe(np,{force:!1},()=>qe(No,{initialFocus:xt,containers:z,features:E.value?it(K.value,{parent:No.features.RestoreFocus,leaf:No.features.All&~No.features.FocusLock}):No.features.None},()=>qe(P,{},()=>ct({ourProps:At,theirProps:{...Ke,...n},slot:yr,attrs:n,slots:r,visible:_.value===0,features:hr.RenderStrategy|hr.Static,name:"Dialog"})))))),qe(Oe)])}}}),lp=ve({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${Ht()}`}},setup(t,{attrs:e,slots:n}){const r=ra("DialogOverlay");function s(o){o.target===o.currentTarget&&(o.preventDefault(),o.stopPropagation(),r.close())}return()=>{const{id:o,...i}=t;return ct({ourProps:{id:o,"aria-hidden":!0,onClick:s},theirProps:i,slot:{open:r.dialogState.value===0},attrs:e,slots:n,name:"DialogOverlay"})}}}),cp=ve({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${Ht()}`}},setup(t,{attrs:e,slots:n,expose:r}){const s=ra("DialogPanel");r({el:s.panelRef,$el:s.panelRef});function o(i){i.stopPropagation()}return()=>{const{id:i,...a}=t,l={id:i,ref:s.panelRef,onClick:o};return ct({ourProps:l,theirProps:a,slot:{open:s.dialogState.value===0},attrs:e,slots:n,name:"DialogPanel"})}}}),oa=ve({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${Ht()}`}},setup(t,{attrs:e,slots:n}){const r=ra("DialogTitle");return ze(()=>{r.setTitleId(t.id),Ot(()=>r.setTitleId(null))}),()=>{const{id:s,...o}=t;return ct({ourProps:{id:s},theirProps:o,slot:{open:r.dialogState.value===0},attrs:e,slots:n,name:"DialogTitle"})}}});function up(t,e){if(t)return t;let n=e??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function dp(t,e){let n=C(up(t.value.type,t.value.as));return ze(()=>{n.value=up(t.value.type,t.value.as)}),bt(()=>{var r;n.value||Y(e)&&Y(e)instanceof HTMLButtonElement&&!((r=Y(e))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}const fp=Symbol("PopoverContext");function Jl(t){const e=Me(fp,null);if(e===null){const n=new Error(`<${t} /> is missing a parent <${Yl.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Jl),n}return e}const V1=Symbol("PopoverGroupContext");function pp(){return Me(V1,null)}const hp=Symbol("PopoverPanelContext");function R1(){return Me(hp,null)}let Yl=ve({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(t,{slots:e,attrs:n,expose:r}){var J;const s=C(null);r({el:s,$el:s});const o=C(1),i=C(null),a=C(null),l=C(null),c=C(null),u=ee(()=>yn(s)),d=ee(()=>{var V,I;if(!Y(i)||!Y(c))return!1;for(const ce of document.querySelectorAll("body > *"))if(Number(ce==null?void 0:ce.contains(Y(i)))^Number(ce==null?void 0:ce.contains(Y(c))))return!0;const P=ea(),z=P.indexOf(Y(i)),N=(z+P.length-1)%P.length,Oe=(z+1)%P.length,K=P[N],R=P[Oe];return!((V=Y(c))!=null&&V.contains(K))&&!((I=Y(c))!=null&&I.contains(R))}),f={popoverState:o,buttonId:C(null),panelId:C(null),panel:c,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:l,togglePopover(){o.value=it(o.value,{0:1,1:0})},closePopover(){o.value!==1&&(o.value=1)},close(P){f.closePopover();const z=P?P instanceof HTMLElement?P:P.value instanceof HTMLElement?Y(P):Y(f.button):Y(f.button);z==null||z.focus()}};_t(fp,f),ep(ee(()=>it(o.value,{0:vt.Open,1:vt.Closed})));const m={buttonId:f.buttonId,panelId:f.panelId,close(){f.closePopover()}},_=pp(),E=_==null?void 0:_.registerPopover,[k,A]=op(),B=Xf({mainTreeNodeRef:_==null?void 0:_.mainTreeNodeRef,portals:k,defaultContainers:[i,c]});function T(){var P,z,N;return(_==null?void 0:_.isFocusWithinPopoverGroup())??(((P=u.value)==null?void 0:P.activeElement)&&(((z=Y(i))==null?void 0:z.contains(u.value.activeElement))||((N=Y(c))==null?void 0:N.contains(u.value.activeElement))))}return bt(()=>E==null?void 0:E(m)),Bl((J=u.value)==null?void 0:J.defaultView,"focus",P=>{var z,N;P.target!==window&&P.target instanceof HTMLElement&&o.value===0&&(T()||i&&c&&(B.contains(P.target)||(z=Y(f.beforePanelSentinel))!=null&&z.contains(P.target)||(N=Y(f.afterPanelSentinel))!=null&&N.contains(P.target)||f.closePopover()))},!0),Yf(B.resolveContainers,(P,z)=>{var N;f.closePopover(),Hf(z,zl.Loose)||(P.preventDefault(),(N=Y(i))==null||N.focus())},ee(()=>o.value===0)),()=>{const P={open:o.value===0,close:f.close};return qe(Re,[qe(A,{},()=>ct({theirProps:{...t,...n},ourProps:{ref:s},slot:P,slots:e,attrs:n,name:"Popover"})),qe(B.MainTreeNode)])}}});const mp=ve({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${Ht()}`}},inheritAttrs:!1,setup(t,{attrs:e,slots:n,expose:r}){const s=Jl("PopoverButton"),o=ee(()=>yn(s.button));r({el:s.button,$el:s.button}),ze(()=>{s.buttonId.value=t.id}),Ot(()=>{s.buttonId.value=null});const i=pp(),a=i==null?void 0:i.closeOthers,l=R1(),c=ee(()=>l===null?!1:l.value===s.panelId.value),u=C(null),d=`moonbase-focus-sentinel-${Ht()}`;c.value||bt(()=>{s.button.value=Y(u)});const f=dp(ee(()=>({as:t.as,type:e.type})),u);function m(T){var J,P,z,N,Oe;if(c.value){if(s.popoverState.value===1)return;switch(T.key){case ut.Space:case ut.Enter:T.preventDefault(),(P=(J=T.target).click)==null||P.call(J),s.closePopover(),(z=Y(s.button))==null||z.focus();break}}else switch(T.key){case ut.Space:case ut.Enter:T.preventDefault(),T.stopPropagation(),s.popoverState.value===1&&(a==null||a(s.buttonId.value)),s.togglePopover();break;case ut.Escape:if(s.popoverState.value!==0)return a==null?void 0:a(s.buttonId.value);if(!Y(s.button)||(N=o.value)!=null&&N.activeElement&&!((Oe=Y(s.button))!=null&&Oe.contains(o.value.activeElement)))return;T.preventDefault(),T.stopPropagation(),s.closePopover();break}}function _(T){c.value||T.key===ut.Space&&T.preventDefault()}function E(T){var J,P;t.disabled||(c.value?(s.closePopover(),(J=Y(s.button))==null||J.focus()):(T.preventDefault(),T.stopPropagation(),s.popoverState.value===1&&(a==null||a(s.buttonId.value)),s.togglePopover(),(P=Y(s.button))==null||P.focus()))}function k(T){T.preventDefault(),T.stopPropagation()}const A=Fl();function B(){const T=Y(s.panel);if(!T)return;function J(){it(A.value,{[Lt.Forwards]:()=>mt(T,Je.First),[Lt.Backwards]:()=>mt(T,Je.Last)})===Ln.Error&&mt(ea().filter(z=>z.dataset.moonbaseFocusGuard!=="true"),it(A.value,{[Lt.Forwards]:Je.Next,[Lt.Backwards]:Je.Previous}),{relativeTo:Y(s.button)})}J()}return()=>{const T=s.popoverState.value===0,J={open:T},{id:P,...z}=t,N=c.value?{ref:u,type:f.value,onKeydown:m,onClick:E}:{ref:u,id:P,type:f.value,"aria-expanded":s.popoverState.value===0,"aria-controls":Y(s.panel)?s.panelId.value:void 0,disabled:t.disabled?!0:void 0,onKeydown:m,onKeyup:_,onClick:E,onMousedown:k};return qe(Re,[ct({ourProps:N,theirProps:{...e,...z},slot:J,attrs:e,slots:n,name:"PopoverButton"}),T&&!c.value&&s.isPortalled.value&&qe(gr,{id:d,features:vr.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:B})])}}}),vp=ve({name:"PopoverPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},focus:{type:Boolean,default:!1},id:{type:String,default:()=>`moonbase-popover-panel-${Ht()}`}},inheritAttrs:!1,setup(t,{attrs:e,slots:n,expose:r}){const{focus:s}=t,o=Jl("PopoverPanel"),i=ee(()=>yn(o.panel)),a=`moonbase-focus-sentinel-before-${Ht()}`,l=`moonbase-focus-sentinel-after-${Ht()}`;r({el:o.panel,$el:o.panel}),ze(()=>{o.panelId.value=t.id}),Ot(()=>{o.panelId.value=null}),_t(hp,o.panelId),bt(()=>{var A,B;if(!s||o.popoverState.value!==0||!o.panel)return;const k=(A=i.value)==null?void 0:A.activeElement;(B=Y(o.panel))!=null&&B.contains(k)||mt(Y(o.panel),Je.First)});const c=na(),u=ee(()=>c!==null?(c.value&vt.Open)===vt.Open:o.popoverState.value===0);function d(k){var A,B;switch(k.key){case ut.Escape:if(o.popoverState.value!==0||!Y(o.panel)||i.value&&!((A=Y(o.panel))!=null&&A.contains(i.value.activeElement)))return;k.preventDefault(),k.stopPropagation(),o.closePopover(),(B=Y(o.button))==null||B.focus();break}}function f(k){var B,T,J,P,z;const A=k.relatedTarget;A&&Y(o.panel)&&((B=Y(o.panel))!=null&&B.contains(A)||(o.closePopover(),((J=(T=Y(o.beforePanelSentinel))==null?void 0:T.contains)!=null&&J.call(T,A)||(z=(P=Y(o.afterPanelSentinel))==null?void 0:P.contains)!=null&&z.call(P,A))&&A.focus({preventScroll:!0})))}const m=Fl();function _(){const k=Y(o.panel);if(!k)return;function A(){it(m.value,{[Lt.Forwards]:()=>{var T;mt(k,Je.First)===Ln.Error&&((T=Y(o.afterPanelSentinel))==null||T.focus())},[Lt.Backwards]:()=>{var B;(B=Y(o.button))==null||B.focus({preventScroll:!0})}})}A()}function E(){const k=Y(o.panel);if(!k)return;function A(){it(m.value,{[Lt.Forwards]:()=>{const B=Y(o.button),T=Y(o.panel);if(!B)return;const J=ea(),P=J.indexOf(B),z=J.slice(0,P+1),Oe=[...J.slice(P+1),...z];for(const K of Oe.slice())if(K.dataset.moonbaseFocusGuard==="true"||T!=null&&T.contains(K)){const R=Oe.indexOf(K);R!==-1&&Oe.splice(R,1)}mt(Oe,Je.First,{sorted:!1})},[Lt.Backwards]:()=>{var T;mt(k,Je.Previous)===Ln.Error&&((T=Y(o.button))==null||T.focus())}})}A()}return()=>{const k={open:o.popoverState.value===0,close:o.close},{id:A,focus:B,...T}=t,J={ref:o.panel,id:A,onKeydown:d,onFocusout:s&&o.popoverState.value===0?f:void 0,tabIndex:-1};return ct({ourProps:J,theirProps:{...e,...T},attrs:e,slot:k,slots:{...n,default:(...P)=>{var z;return[qe(Re,[u.value&&o.isPortalled.value&&qe(gr,{id:a,ref:o.beforePanelSentinel,features:vr.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:_}),(z=n.default)==null?void 0:z.call(n,...P),u.value&&o.isPortalled.value&&qe(gr,{id:l,ref:o.afterPanelSentinel,features:vr.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:E})])]}},features:hr.RenderStrategy|hr.Static,visible:u.value,name:"PopoverPanel"})}}});let j1=ve({props:{onFocus:{type:Function,required:!0}},setup(t){let e=C(!0);return()=>e.value?qe(gr,{as:"button",type:"button",features:vr.Focusable,onFocus(n){n.preventDefault();let r,s=50;function o(){var i;if(s--<=0){r&&cancelAnimationFrame(r);return}if((i=t.onFocus)!=null&&i.call(t)){e.value=!1,cancelAnimationFrame(r);return}r=requestAnimationFrame(o)}r=requestAnimationFrame(o)}}):null}});const gp=Symbol("TabsContext");function $o(t){const e=Me(gp,null);if(e===null){const n=new Error(`<${t} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,$o),n}return e}const Xl=Symbol("TabsSSRContext"),L1=ve({name:"TabGroup",emits:{change:t=>!0},props:{as:{type:[Object,String],default:"template"},selectedIndex:{type:[Number],default:null},defaultIndex:{type:[Number],default:0},vertical:{type:[Boolean],default:!1},manual:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(t,{slots:e,attrs:n,emit:r}){const s=C(t.selectedIndex??t.defaultIndex),o=C([]),i=C([]),a=ee(()=>t.selectedIndex!==null),l=ee(()=>a.value?t.selectedIndex:s.value);function c(_){const E=hs(u.tabs.value,Y),k=hs(u.panels.value,Y),A=E.filter(B=>{var T;return!((T=Y(B))!=null&&T.hasAttribute("disabled"))});if(_<0||_>E.length-1){const B=it(s.value===null?0:Math.sign(_-s.value),{[-1]:()=>1,0:()=>it(Math.sign(_),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),T=it(B,{0:()=>E.indexOf(A[0]),1:()=>E.indexOf(A[A.length-1])});T!==-1&&(s.value=T),u.tabs.value=E,u.panels.value=k}else{const B=E.slice(0,_),J=[...E.slice(_),...B].find(z=>A.includes(z));if(!J)return;let P=E.indexOf(J)??u.selectedIndex.value;P===-1&&(P=u.selectedIndex.value),s.value=P,u.tabs.value=E,u.panels.value=k}}let u={selectedIndex:ee(()=>s.value??t.defaultIndex??null),orientation:ee(()=>t.vertical?"vertical":"horizontal"),activation:ee(()=>t.manual?"manual":"auto"),tabs:o,panels:i,setSelectedIndex(_){l.value!==_&&r("change",_),a.value||c(_)},registerTab(_){if(o.value.includes(_))return;const E=o.value[s.value];if(o.value.push(_),o.value=hs(o.value,Y),!a.value){const k=o.value.indexOf(E)??s.value;k!==-1&&(s.value=k)}},unregisterTab(_){const E=o.value.indexOf(_);E!==-1&&o.value.splice(E,1)},registerPanel(_){i.value.includes(_)||(i.value.push(_),i.value=hs(i.value,Y))},unregisterPanel(_){const E=i.value.indexOf(_);E!==-1&&i.value.splice(E,1)}};_t(gp,u);const d=C({tabs:[],panels:[]}),f=C(!1);ze(()=>{f.value=!0}),_t(Xl,ee(()=>f.value?null:d.value));const m=ee(()=>t.selectedIndex);return ze(()=>{lt([m],()=>c(t.selectedIndex??t.defaultIndex),{immediate:!0})}),bt(()=>{if(!a.value||l.value==null||u.tabs.value.length<=0)return;const _=hs(u.tabs.value,Y);_.some((k,A)=>Y(u.tabs.value[A])!==Y(k))&&u.setSelectedIndex(_.findIndex(k=>Y(k)===Y(u.tabs.value[l.value])))}),()=>{const _={selectedIndex:s.value};return qe(Re,[o.value.length<=0&&qe(j1,{onFocus:()=>{for(const E of o.value){const k=Y(E);if((k==null?void 0:k.tabIndex)===0)return k.focus(),!0}return!1}}),ct({theirProps:{...n,...Hl(t,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:_,slots:e,attrs:n,name:"TabGroup"})])}}}),M1=ve({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(t,{attrs:e,slots:n}){const r=$o("TabList");return()=>{const s={selectedIndex:r.selectedIndex.value},o={role:"tablist","aria-orientation":r.orientation.value};return ct({ourProps:o,theirProps:t,slot:s,attrs:e,slots:n,name:"TabList"})}}}),Ql=ve({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${Ht()}`}},setup(t,{attrs:e,slots:n,expose:r}){const s=$o("Tab"),o=C(null);r({el:o,$el:o}),ze(()=>s.registerTab(o)),Ot(()=>s.unregisterTab(o));const i=Me(Xl),a=ee(()=>{if(i.value){const k=i.value.tabs.indexOf(t.id);return k===-1?i.value.tabs.push(t.id)-1:k}return-1}),l=ee(()=>{const k=s.tabs.value.indexOf(o);return k===-1?a.value:k}),c=ee(()=>l.value===s.selectedIndex.value);function u(k){var B;const A=k();if(A===Ln.Success&&s.activation.value==="auto"){const T=(B=yn(o))==null?void 0:B.activeElement,J=s.tabs.value.findIndex(P=>Y(P)===T);J!==-1&&s.setSelectedIndex(J)}return A}function d(k){const A=s.tabs.value.map(T=>Y(T)).filter(Boolean);if(k.key===ut.Space||k.key===ut.Enter){k.preventDefault(),k.stopPropagation(),s.setSelectedIndex(l.value);return}switch(k.key){case ut.Home:case ut.PageUp:return k.preventDefault(),k.stopPropagation(),u(()=>mt(A,Je.First));case ut.End:case ut.PageDown:return k.preventDefault(),k.stopPropagation(),u(()=>mt(A,Je.Last))}if(u(()=>it(s.orientation.value,{vertical(){return k.key===ut.ArrowUp?mt(A,Je.Previous|Je.WrapAround):k.key===ut.ArrowDown?mt(A,Je.Next|Je.WrapAround):Ln.Error},horizontal(){return k.key===ut.ArrowLeft?mt(A,Je.Previous|Je.WrapAround):k.key===ut.ArrowRight?mt(A,Je.Next|Je.WrapAround):Ln.Error}}))===Ln.Success)return k.preventDefault()}const f=C(!1);function m(){var k;f.value||(f.value=!0,!t.disabled&&((k=Y(o))==null||k.focus({preventScroll:!0}),s.setSelectedIndex(l.value),ta(()=>{f.value=!1})))}function _(k){k.preventDefault()}const E=dp(ee(()=>({as:t.as,type:e.type})),o);return()=>{var J;const k={selected:c.value,disabled:t.disabled??!1},{id:A,...B}=t,T={ref:o,onKeydown:d,onMousedown:_,onClick:m,id:A,role:"tab",type:E.value,"aria-controls":(J=Y(s.panels.value[l.value]))==null?void 0:J.id,"aria-selected":c.value,tabIndex:c.value?0:-1,disabled:t.disabled?!0:void 0};return ct({ourProps:T,theirProps:B,slot:k,attrs:e,slots:n,name:"Tab"})}}}),U1=ve({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(t,{slots:e,attrs:n}){const r=$o("TabPanels");return()=>{const s={selectedIndex:r.selectedIndex.value};return ct({theirProps:t,ourProps:{},slot:s,attrs:n,slots:e,name:"TabPanels"})}}}),ec=ve({name:"TabPanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`moonbase-tabs-panel-${Ht()}`},tabIndex:{type:Number,default:0}},setup(t,{attrs:e,slots:n,expose:r}){const s=$o("TabPanel"),o=C(null);r({el:o,$el:o}),ze(()=>s.registerPanel(o)),Ot(()=>s.unregisterPanel(o));const i=Me(Xl),a=ee(()=>{if(i.value){const u=i.value.panels.indexOf(t.id);return u===-1?i.value.panels.push(t.id)-1:u}return-1}),l=ee(()=>{const u=s.panels.value.indexOf(o);return u===-1?a.value:u}),c=ee(()=>l.value===s.selectedIndex.value);return()=>{var E;const u={selected:c.value},{id:d,tabIndex:f,...m}=t,_={ref:o,id:d,role:"tabpanel","aria-labelledby":(E=Y(s.tabs.value[l.value]))==null?void 0:E.id,tabIndex:c.value?f:-1};return!c.value&&t.unmount&&!t.static?qe(gr,{as:"span","aria-hidden":!0,..._}):ct({ourProps:_,theirProps:m,slot:u,attrs:e,slots:n,features:hr.Static|hr.RenderStrategy,visible:c.value,name:"TabPanel"})}}});function Z1(t){let e={called:!1};return(...n)=>{if(!e.called)return e.called=!0,t(...n)}}function tc(t,...e){t&&e.length>0&&!t.dataset.transition?t.dataset.transition=e.join(" "):t&&e.length>0&&(t.dataset.transition=[...t.dataset.transition.split(" "),...e].join(" "))}function ia(t,...e){t&&e.length>0&&t.dataset.transition&&(t.dataset.transition=t.dataset.transition.split(" ").filter(n=>!e.includes(n)).join(" "))}var nc=(t=>(t.Finished="finished",t.Cancelled="cancelled",t))(nc||{});function B1(t,e){const n=So();if(!t)return n.dispose;const{transitionDuration:r,transitionDelay:s}=getComputedStyle(t),[o,i]=[r,s].map(a=>{const[l=0]=a.split(",").filter(Boolean).map(c=>c.includes("ms")?Number.parseFloat(c):Number.parseFloat(c)*1e3).sort((c,u)=>u-c);return l});return o!==0?n.setTimeout(()=>e("finished"),o+i):e("finished"),n.add(()=>e("cancelled")),n.dispose}function yp(t,e,n,r,s,o){const i=So(),a=o!==void 0?Z1(o):()=>{};return ia(t,...s),tc(t,...e,...n),i.nextFrame(()=>{ia(t,...n),tc(t,...r),i.add(B1(t,l=>(ia(t,...r,...e),tc(t,...s),a(l))))}),i.add(()=>ia(t,...e,...n,...r,...s)),i.add(()=>a("cancelled")),i.dispose}function Kr(t=""){return t.split(/\s+/).filter(e=>e.length>1)}const rc=Symbol("TransitionContext");function F1(){return Me(rc,null)!==null}function H1(){const t=Me(rc,null);if(t===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return t}const sc=Symbol("NestingContext");function z1(){const t=Me(sc,null);if(t===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return t}function aa(t){return"children"in t?aa(t.children):t.value.filter(({state:e})=>e==="visible").length>0}function _p(t){const e=C([]),n=C(!1);ze(()=>n.value=!0),Ot(()=>n.value=!1);function r(o,i=mr.Hidden){const a=e.value.findIndex(({id:l})=>l===o);a!==-1&&(it(i,{[mr.Unmount](){e.value.splice(a,1)},[mr.Hidden](){e.value[a].state="hidden"}}),!aa(e)&&n.value&&(t==null||t()))}function s(o){const i=e.value.find(({id:a})=>a===o);return i?i.state!=="visible"&&(i.state="visible"):e.value.push({id:o,state:"visible"}),()=>r(o,mr.Unmount)}return{children:e,register:s,unregister:r}}const bp=hr.RenderStrategy,Po=ve({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:"enter"},enterFrom:{type:[String],default:"enter-from"},enterTo:{type:[String],default:"enter-to"},entered:{type:[String],default:"entered"},leave:{type:[String],default:"leave"},leaveFrom:{type:[String],default:"leave-from"},leaveTo:{type:[String],default:"leave-to"}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(t,{emit:e,attrs:n,slots:r,expose:s}){const o=C(0);function i(){o.value|=vt.Opening,e("beforeEnter")}function a(){o.value&=~vt.Opening,e("afterEnter")}function l(){o.value|=vt.Closing,e("beforeLeave")}function c(){o.value&=~vt.Closing,e("afterLeave")}if(!F1()&&S1())return()=>qe(oc,{...t,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:c},r);const u=C(null),d=ee(()=>t.unmount?mr.Unmount:mr.Hidden);s({el:u,$el:u});const{show:f,appear:m}=H1(),{register:_,unregister:E}=z1(),k=C(f.value?"visible":"hidden"),A={value:!0},B=Ht(),T={value:!1},J=_p(()=>{!T.value&&k.value!=="hidden"&&(k.value="hidden",E(B),c())});ze(()=>{const ce=_(B);Ot(ce)}),bt(()=>{if(d.value===mr.Hidden&&B){if(f.value&&k.value!=="visible"){k.value="visible";return}it(k.value,{hidden:()=>E(B),visible:()=>_(B)})}});const P=Kr(t.enter),z=Kr(t.enterFrom),N=Kr(t.enterTo),Oe=Kr(t.entered),K=Kr(t.leave),R=Kr(t.leaveFrom),V=Kr(t.leaveTo);ze(()=>{bt(()=>{if(k.value==="visible"){const ce=Y(u);if(ce instanceof Comment&&ce.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function I(ce){const Ze=A.value&&!m.value,w=Y(u);!w||!(w instanceof HTMLElement)||Ze||(T.value=!0,f.value&&i(),f.value||l(),ce(f.value?yp(w,P,z,N,Oe,$=>{T.value=!1,$===nc.Finished&&a()}):yp(w,K,R,V,Oe,$=>{T.value=!1,$===nc.Finished&&(aa(J)||(k.value="hidden",E(B),c()))})))}return ze(()=>{lt([f],(ce,Ze,w)=>{I(w),A.value=!1},{immediate:!0})}),_t(sc,J),ep(ee(()=>it(k.value,{visible:vt.Open,hidden:vt.Closed})|o.value)),()=>{const{appear:ce,show:Ze,enter:w,enterFrom:$,enterTo:Q,entered:oe,leave:be,leaveFrom:ae,leaveTo:We,...xt}=t,Ke={ref:u},At={...xt,...m.value&&f.value&&Oo.isServer?{class:Yo([n.class,xt.class,...P,...z])}:{}};return ct({theirProps:At,ourProps:Ke,slot:{},slots:r,attrs:n,features:bp,visible:k.value==="visible",name:"TransitionChild"})}}}),q1=Po,oc=ve({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(t,{emit:e,attrs:n,slots:r}){const s=na(),o=ee(()=>t.show===null&&s!==null?(s.value&vt.Open)===vt.Open:t.show);bt(()=>{if(![!0,!1].includes(o.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});const i=C(o.value?"visible":"hidden"),a=_p(()=>{i.value="hidden"}),l=C(!0),c={show:o,appear:ee(()=>t.appear||!l.value)};return ze(()=>{bt(()=>{l.value=!1,o.value?i.value="visible":aa(a)||(i.value="hidden")})}),_t(sc,a),_t(rc,c),()=>{const u=Hl(t,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:t.unmount};return ct({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[qe(q1,{onBeforeEnter:()=>e("beforeEnter"),onAfterEnter:()=>e("afterEnter"),onBeforeLeave:()=>e("beforeLeave"),onAfterLeave:()=>e("afterLeave"),...n,...d,...u},r.default)]},attrs:{},features:bp,visible:i.value==="visible",name:"Transition"})}}}),W1={class:"moonbase:modal-container"},la=ve({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(t){return(e,n)=>(y(),Ve(b(oc),{as:"template",show:e.open},{default:ke(()=>[F(b(ap),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>e.$emit("close"))},{default:ke(()=>[x("div",W1,[F(b(Po),{as:"template"},{default:ke(()=>[F(b(lp),{class:"moonbase:modal-overlay"})]),_:1}),F(b(Po),{as:"template"},{default:ke(()=>[F(b(cp),{class:"moonbase:modal-content"},{default:ke(()=>[tl(e.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),K1=["data-visible"],G1=ve({__name:"SignIn",emits:["signedIn"],setup(t,{emit:e}){const n=e,r=Fe(),s=It(),o=Me(Yi),i=C(r.getParameter("email")??""),a=C(""),l=C(null);async function c(){l.value=null;try{const u=await s.signIn(i.value,a.value);gn(1500).then(()=>n("signedIn",u))}catch(u){throw u instanceof rs?l.value="User not found":l.value=u.message,u}}return(u,d)=>(y(),Ve(fr,{handler:c,class:"moonbase:sign-in"},{default:ke(()=>{var f;return[F(Tt,{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=m=>i.value=m),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),F(Tt,{modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=m=>a.value=m),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),F(pr,{success:"Signed in",label:"Sign in",error:"Error"}),x("span",{class:"moonbase:error","data-visible":!!l.value||void 0},G(l.value),9,K1),(f=b(o))!=null&&f.auth.enable.signUp?(y(),O("button",{key:0,type:"button",onClick:d[2]||(d[2]=m=>b(r).show(b(Ae).Authentication,b(he).SignUp,{email:i.value}))}," Create account ")):ge("",!0),x("button",{type:"button",onClick:d[3]||(d[3]=m=>b(r).show(b(Ae).Authentication,b(he).ForgotPassword,{email:i.value}))}," Forgot password ")]}),_:1}))}}),J1={class:"moonbase:authentication"},Y1={key:0,class:"moonbase:loader"},X1=ve({__name:"Authentication",props:{open:{type:Boolean}},emits:["authenticated"],setup(t,{emit:e}){const n=e,r=Fe(),{loaded:s,user:o}=It();lt(o,a=>{a&&r.intent===he.SignIn&&(n("authenticated",a),r.dequeue())});const i=ee(()=>{switch(r.intent){case he.SignIn:return"Sign in";case he.SignUp:return"Sign up";case he.ConfirmAccount:return"Confirm account";case he.ConfirmEmailChange:return"Confirm email change";case he.ForgotPassword:return"Forgot password";case he.ResetPassword:return"Reset password"}throw new Error("Moonbase: Unknown intent")});return(a,l)=>(y(),Ve(la,{open:a.open,onClose:l[3]||(l[3]=c=>b(r).reset())},{default:ke(()=>[x("div",J1,[F(b(oa),{as:"h3"},{default:ke(()=>[je(G(i.value),1)]),_:1}),b(s)?b(r).intent===b(he).SignIn?(y(),Ve(G1,{key:1})):b(r).intent===b(he).SignUp?(y(),Ve(Fb,{key:2,onSignedUp:l[0]||(l[0]=c=>b(r).dequeue())})):b(r).intent===b(he).ConfirmAccount?(y(),Ve(Kb,{key:3,onConfirmedAccount:l[1]||(l[1]=c=>b(r).dequeue())})):b(r).intent===b(he).ConfirmEmailChange?(y(),Ve(i1,{key:4})):b(r).intent===b(he).ForgotPassword?(y(),Ve(Xb,{key:5})):b(r).intent===b(he).ResetPassword?(y(),Ve(t1,{key:6,onPasswordReset:l[2]||(l[2]=c=>b(r).dequeue())})):ge("",!0):(y(),O("div",Y1,[F(Ft)]))])]),_:1},8,["open"]))}});function Mn(t,e){return new Intl.NumberFormat(void 0,{style:"currency",currency:e,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(t)}const Q1={class:"moonbase:product-cart-item"},ew=["src"],tw={key:1,class:"moonbase:image-placeholder"},nw={class:"moonbase:product-cart-item-content"},rw={key:0,class:"moonbase:cart-item-discount"},sw={class:"font-semibold"},ow={key:0,class:"ml-0.5"},iw={key:2,class:"moonbase:product-cart-item-total"},aw={key:0,class:"moonbase:discount"},lw={key:1},cw=ve({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(t){return(e,n)=>{var r,s,o;return y(),O("div",Q1,[(r=e.lineItem.product)!=null&&r.iconUrl?(y(),O("img",{key:0,src:e.lineItem.product.iconUrl,alt:""},null,8,ew)):(y(),O("div",tw)),x("div",nw,[x("h3",null,G((s=e.lineItem.product)==null?void 0:s.name),1),x("p",null,G((o=e.lineItem.product)==null?void 0:o.tagline),1),e.lineItem.appliedDiscount?(y(),O("p",rw,[je(" Discount applied: "),x("span",sw,G(e.lineItem.appliedDiscount.name),1),e.lineItem.appliedDiscount.total?(y(),O("span",ow," (-"+G(b(Mn)(e.lineItem.appliedDiscount.total[e.currency],e.currency))+") ",1)):ge("",!0)])):ge("",!0),x("p",null,G(e.lineItem.quantity)+" in cart",1)]),e.lineItem.variation?(y(),O("div",iw,[e.lineItem.variation.hasDiscount?(y(),O("span",aw,G(b(Mn)(e.lineItem.variation.originalPrice[e.currency],e.currency)),1)):ge("",!0),e.lineItem.quantity!==1?(y(),O("span",lw,G(e.lineItem.quantity)+" x "+G(b(Mn)(e.lineItem.variation.price[e.currency],e.currency)),1)):ge("",!0),je(" "+G(b(Mn)(e.lineItem.variation.price[e.currency]*e.lineItem.quantity,e.currency)),1)])):ge("",!0)])}}}),uw={class:"moonbase:bundle-cart-item"},dw=["src"],fw={key:1,class:"moonbase:image-placeholder"},pw={class:"moonbase:bundle-cart-item-content"},hw={key:0,class:"moonbase:cart-item-discount"},mw={class:"font-semibold"},vw={key:0,class:"ml-0.5"},gw={class:"moonbase:bundle-cart-item-summary"},yw=["data-open"],_w=[x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)],bw={key:2,class:"moonbase:product-cart-item-total"},ww={key:0,class:"moonbase:discount"},Ew={key:1},xw=["src"],kw={key:1,class:"moonbase:image-placeholder"},Ow=["data-included"],Nw={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Sw=[x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)],Tw={key:0,class:"truncate italic"},Cw={key:1,class:"truncate"},$w=ve({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(t){const e=C(!1),n=C(null);return lt(e,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,s)=>{var o,i,a,l,c,u,d;return y(),O("div",null,[x("div",uw,[(o=r.lineItem.bundle)!=null&&o.iconUrl?(y(),O("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,dw)):(y(),O("div",fw)),x("div",pw,[x("h3",null,G((i=r.lineItem.bundle)==null?void 0:i.name),1),x("p",null,G((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(y(),O("p",hw,[je(" Discount applied: "),x("span",mw,G(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(y(),O("span",vw," (-"+G(b(Mn)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):ge("",!0)])):ge("",!0),x("div",gw,[x("span",null,G(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(y(),O("button",{key:0,onClick:s[0]||(s[0]=f=>e.value=!e.value)},[x("span",null,[je(" Including "+G((l=r.lineItem.bundle)==null?void 0:l.products.filter(f=>f.included).length)+" ",1),(c=r.lineItem.bundle)!=null&&c.products.some(f=>!f.included)?(y(),O(Re,{key:0},[je("of "+G((u=r.lineItem.bundle)==null?void 0:u.products.length),1)],64)):ge("",!0),je(" products ")]),(y(),O("svg",{"data-open":e.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},_w,8,yw))])):ge("",!0)])]),r.lineItem.variation?(y(),O("div",bw,[r.lineItem.variation.hasDiscount?(y(),O("span",ww,G(b(Mn)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):ge("",!0),r.lineItem.quantity!==1?(y(),O("span",Ew,G(r.lineItem.quantity)+" x "+G(b(Mn)(r.lineItem.variation.price[r.currency],r.currency)),1)):ge("",!0),je(" "+G(b(Mn)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):ge("",!0)]),x("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(y(!0),O(Re,null,fn(((d=r.lineItem.bundle)==null?void 0:d.products)||[],f=>(y(),O("div",{key:f.id},[f!=null&&f.iconUrl?(y(),O("img",{key:0,src:f.iconUrl,alt:""},null,8,xw)):(y(),O("div",kw)),x("div",null,[x("h3",{"data-included":f.included||void 0},[f.included?(y(),O("svg",Nw,Sw)):ge("",!0),je(" "+G(f==null?void 0:f.name),1)],8,Ow),f.included?f!=null&&f.tagline?(y(),O("p",Cw,G(f.tagline),1)):ge("",!0):(y(),O("p",Tw," You already own this "))])]))),128))],512)])}}}),Pw={class:"moonbase:cart-modal-container"},Iw=ve({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(t){return(e,n)=>(y(),Ve(b(oc),{as:"template",show:e.open},{default:ke(()=>[F(b(ap),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>e.$emit("close"))},{default:ke(()=>[x("div",Pw,[F(b(Po),{as:"template"},{default:ke(()=>[F(b(lp),{class:"moonbase:cart-modal-overlay"})]),_:1}),F(b(Po),{as:"template"},{default:ke(()=>[F(b(cp),{class:"moonbase:cart-modal-content"},{default:ke(()=>[tl(e.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),Aw=["disabled","data-success","data-error","data-working","data-variant"],Dw=["data-visible"],wp=ve({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(t){const e=t,n=C(!1),r=C(!1),s=C(!1),o=ee(()=>r.value?e.success??e.label:s.value?e.error:e.label);async function i(){try{const a=e.handler();if(a instanceof Promise){if(n.value=!0,await a,n.value=!1,!e.success)return;r.value=!0,await gn(2500),e.noReset||(r.value=!1)}}catch{n.value=!1,s.value=!0,await gn(2500),s.value=!1}}return(a,l)=>(y(),O("button",{class:"moonbase:button",type:"button",disabled:r.value||s.value||n.value,"data-success":r.value&&a.success||void 0,"data-error":s.value||void 0,"data-working":n.value||void 0,"data-variant":a.variant,onClick:i},[x("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(y(),Ve(Ft,{key:0})):ge("",!0)],8,Dw),je(" "+G(o.value),1)],8,Aw))}}),Vw={class:"moonbase:cart"},Rw={key:0,role:"list",class:"moonbase:cart-items"},jw={key:1,class:"moonbase:cart-empty"},Lw={key:2,class:"moonbase:cart-total"},Mw=x("label",null," Total ",-1),Uw=x("p",null," Sales tax to be calculated at checkout ",-1),Zw=ve({__name:"Cart",props:{open:{type:Boolean}},setup(t){const e=Fe(),{items:n,total:r,currency:s,checkout:o}=Dl();async function i(){if(!await o(`${window.location.pathname}?mb_intent=view_products`))throw new Error("Cancelled checkout")}return(a,l)=>(y(),Ve(Iw,{open:a.open,onClose:l[0]||(l[0]=c=>b(e).reset())},{default:ke(()=>[x("div",Vw,[F(b(oa),{as:"h3"},{default:ke(()=>[je(" Cart ")]),_:1}),b(n).length>0?(y(),O("ul",Rw,[(y(!0),O(Re,null,fn(b(n),c=>(y(),O("li",{key:c.id},[c.type==="Product"?(y(),Ve(cw,{key:0,"line-item":c,currency:b(s)},null,8,["line-item","currency"])):c.type==="Bundle"?(y(),Ve($w,{key:1,"line-item":c,currency:b(s)},null,8,["line-item","currency"])):ge("",!0)]))),128))])):(y(),O("div",jw," Your cart is empty! ")),b(n).length>0?(y(),O("div",Lw,[Mw,x("span",null,G(b(Mn)(b(r).amount,b(r).currency)),1),Uw])):ge("",!0),b(n).length>0?(y(),Ve(wp,{key:3,handler:i,label:"Checkout",error:"Cancelled"})):ge("",!0)])]),_:1},8,["open"]))}}),Bw={class:"moonbase:account"},Fw={key:0,class:"moonbase:error"},Hw={key:1,class:"moonbase:notification"},zw={key:0,class:"moonbase:error"},qw=ve({__name:"Account",setup(t){var B,T,J;const e=Fe(),{user:n,update:r,setPassword:s,signOut:o}=It(),i=C(((B=n.value)==null?void 0:B.name)??""),a=C(((T=n.value)==null?void 0:T.email)??""),l=C(((J=n.value)==null?void 0:J.communicationPreferences)??{newsletterOptIn:!1}),c=C(null),u=C(!1),d=C(""),f=C(""),m=C(null),_=C(!1);async function E(){c.value=null,u.value=!1;try{(await r(i.value,a.value,void 0,l.value)).needsEmailConfirmationToken&&(u.value=!0)}catch(P){throw c.value=P,P}}async function k(){m.value=null;try{await s(d.value,f.value),d.value="",f.value=""}catch(P){throw m.value=P,P}}async function A(){_.value=!0,await o(),e.reset()}return(P,z)=>(y(),O("div",Bw,[F(fr,{handler:E},{default:ke(()=>[F(Tt,{modelValue:i.value,"onUpdate:modelValue":z[0]||(z[0]=N=>i.value=N),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),F(Tt,{modelValue:a.value,"onUpdate:modelValue":z[1]||(z[1]=N=>a.value=N),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),F(Uf,{modelValue:l.value.newsletterOptIn,"onUpdate:modelValue":z[2]||(z[2]=N=>l.value.newsletterOptIn=N),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),F(pr,{label:"Save",error:"Error",success:"Saved"}),c.value?(y(),O("p",Fw,G(c.value.message),1)):u.value?(y(),O("p",Hw," You need to confirm your new email address, please check your inbox ")):ge("",!0)]),_:1}),F(fr,{handler:k},{default:ke(()=>[F(Tt,{modelValue:d.value,"onUpdate:modelValue":z[3]||(z[3]=N=>d.value=N),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),F(Tt,{modelValue:f.value,"onUpdate:modelValue":z[4]||(z[4]=N=>f.value=N),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),F(pr,{label:"Save",error:"Error",success:"Saved"}),m.value?(y(),O("p",zw,G(m.value.message),1)):ge("",!0)]),_:1}),F(wp,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:A})]))}}),Ww={},Kw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Gw=[x("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2-60 5.7-112 35.88-112 98.4S70 336 136 336h56M192 400.1l64 63.9 64-63.9M256 224v224.03",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1)];function Jw(t,e){return y(),O("svg",Kw,Gw)}const Ep=dr(Ww,[["render",Jw]]),Yw={},Xw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Qw=[x("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)];function e0(t,e){return y(),O("svg",Xw,Qw)}const xp=dr(Yw,[["render",e0]]),t0={},n0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},r0=[x("path",{d:"M443.66 405.05c-1.46-.79-2.85-1.54-4-2.2-6.47-3.83-13-10.52-11.85-17.83 2.42-15.94 2.89-23.47-.49-28.79a15.61 15.61 0 0 0-7.67-6.2v-.06c1.41-2.56 2.26-5.66 2.83-10.12 1.44-11-5-44-13.7-70.7-8.08-24.68-29.24-50-44.7-68.56l-3.61-4.34c-23.88-28.93-24.34-38.19-26.55-82.67-.32-6.47-.69-13.8-1.17-22C329.87 41.43 304 16 256 16c-25.2 0-44.62 7.15-57.72 21.26C187.79 48.55 182 64 182 80.78c0 29.52 2 53 2.15 54.29 1.4 35.7 1 41.22-8.31 57.55-2.23 3.93-8.38 10.87-14.89 18.21-8.48 9.57-18.09 20.41-23.36 29.22-3.77 6.31-5.88 12.63-8.11 19.33-3.4 10.21-7.26 21.78-18.15 36.57-12.57 17.07-15.52 29.61-11 47.45-4.94 6.45-4.83 14.37-4.75 20.23a25.84 25.84 0 0 1-.3 6.09c-2.29 7.59-12.42 9.4-22 10.18-1.58.12-3.1.21-4.55.29-7.26.39-13.53.74-17.13 6.3-3.47 5.36-1.12 13.8 2.14 25.48.72 2.58 1.46 5.25 2.19 8.06 1.83 7-.16 10.48-2.68 14.84-2.44 4.21-5.21 9-5.21 17.55 0 14.67 20 18 43.05 21.94 7.36 1.24 15 2.53 22.63 4.24a225.58 225.58 0 0 1 34.08 10.68c9.72 3.73 17.4 6.68 26.43 6.68 16.18 0 28.25-9.77 39.92-19.21l2.15-1.75c5.53-4.49 21.5-4 34.34-3.64 3.46.1 6.73.2 9.65.2h6.22c13.48-.08 31.94-.18 42.23 2.5 3.75 1 6.2 3.72 9.29 7.19 5.87 6.56 13.17 14.75 33.39 14.75 19.39 0 29.55-8.71 41.32-18.8 7.16-6.13 14.56-12.48 25.07-17.86 3.92-2 7.62-3.87 11.08-5.61 22.64-11.38 35.11-17.65 35.11-27.82 0-9.91-12.24-16.5-20.34-20.86zM211.11 88.38a13.91 13.91 0 0 1 12.47 9c1.95 5.55 1.81 10.42.21 12.94 0 0-.22-1-.36-1.44a14.85 14.85 0 0 0-6.44-8.59 11.35 11.35 0 0 0-8.94-1.47c-4.26 1.13-8.41 5-8.91 18.79-5.16-10.47-2.31-18 .92-23 2.31-3.73 7.47-6.33 11.05-6.23zm-17.5 375C192 479.24 175.2 479 170.09 478.59c-9.81-.82-21.66-4.69-33.13-8.43-4.52-1.47-9.19-3-13.73-4.34-13.2-3.89-30.12-6.74-43.72-9-3.22-.55-6.27-1.06-9.05-1.55s-4.61-1.27-5.2-2.3c-1-1.65.38-5.25 1.93-9.41C69.27 438 72.11 430.34 72 421c0-3.91-1.47-8.3-2.84-12.56-1.62-5-3.28-10.17-1.93-12.62 1.23-2.23 6.75-2.49 11.6-2.49h2.26c3.55 0 6.62.06 8.75-.53 6.51-1.81 14.86-6.92 17.81-13.88.9-2.17 1.37-6.94 2-14 .37-4.12.74-8.37 1.22-10.58a3.55 3.55 0 0 1 2.11-2.55c1.65-.77 6.78-1.91 18.63 4.08 11.18 5.65 22.88 25.84 34.2 45.37 3.56 6.14 6.92 11.94 10.3 17.36 14.04 22.54 18.83 31.6 17.5 44.8zm128.84-31.56a68.74 68.74 0 0 1-4.55 10.9.58.58 0 0 1-1.08-.42 56.61 56.61 0 0 0 2.11-18.43c-.25-4.73-.4-7.59-2.66-8.51s-4.26.83-9.45 5.54c-1.1 1-2.36 2.14-3.78 3.4-10.8 9.47-26.88 20.68-55.61 23.37-16.84 1.59-27.59-4.63-30.92-8.14a2.16 2.16 0 0 0-3.07-.08 2.23 2.23 0 0 0-.51 2.29c2.12 6.84 1.2 12.26-.49 16.19-.95 2.2-1.85 2.05-2-.34-.25-4.64-1-9.88-3-14.19-3.11-6.94-7-14.34-8.89-17.88v-.05c3.24-1.49 8.86-4.83 11.37-10.88s4.48-18-9.82-31.74c-6.28-6.05-22.1-17.16-36.06-27-10.9-7.65-22.17-15.56-23.65-17.51-4.49-5.89-6.37-9.3-6.94-19.65.07-2.3.13-4.59.19-6.89l.27-2.49a.58.58 0 0 1 1.15 0 63.07 63.07 0 0 0 2 9.72c1.08 3.73 2.4 7.58 3.62 9.18 3.19 4.22 7.56 7.39 11.67 8.49a5.48 5.48 0 0 0 5-.72c2.93-2.33 2.65-7.6 2.19-16.34-.47-9-1.11-21.34 1.85-34.55 5.62-25 10.91-32.51 17.61-42 .86-1.22 1.75-2.47 2.65-3.79 1.44-2.08 3-4.1 4.67-6.23 7.47-9.61 15.93-20.49 13.92-40.95-.51-5.19-.76-8.83-.86-11.39a1 1 0 0 1 1.88-.59l.49.77 1.21 2c4.86 8 13.64 22.57 25.1 22.57a13.62 13.62 0 0 0 2.36-.21c23.39-3.93 51.9-30.25 52.17-30.51 3.12-3 2.84-6.14 1.64-7.91a5.18 5.18 0 0 0-6.45-1.72c-3.29 1.4-7.14 3.15-11.22 5-13.82 6.27-37 16.75-42.25 14.34a23.11 23.11 0 0 1-6.32-5.13 1 1 0 0 1 1.14-1.65c5.59 2.29 9.55 1.45 14.2-.08l1-.34c9.37-3.09 14.2-4.77 30.76-12.08a97.55 97.55 0 0 1 16.26-5.93c4-1 6.42-1.63 7.71-4.34a6.65 6.65 0 0 0-.5-7.13c-1.53-1.87-4.07-2.57-7-1.9-3.22.75-4.7 3-6.41 4.49-2.4 2.05-5 4.16-17.19 8.65-27 10-34.58 10.61-45.21 3.43-9.84-6.69-15.15-13.23-15.15-16 0-2.13 5.45-5.7 8.71-7.84 1.33-.87 2.59-1.69 3.62-2.46 4.34-3.22 13-11.39 13.38-11.73 5.4-5.41 17.91-2.18 25 2.58a2.23 2.23 0 0 0 1.72.41 2.14 2.14 0 0 0 1.68-2.58c-4.2-17.46-.13-27.34 4-32.55a22.58 22.58 0 0 1 17.48-8.48c12.81 0 21.76 10 21.76 24.42 0 11-2.82 16.79-5.48 20.3a1.73 1.73 0 0 1-2.58.18 1.78 1.78 0 0 1-.24-2.2A24.61 24.61 0 0 0 290 114a16.58 16.58 0 0 0-16.84-16.67c-3.94 0-13.48 1.5-16.77 15.44a29.81 29.81 0 0 0-.34 11.07l.08.71c.9 7.38 15.3 12.51 27.23 15.51 11.36 2.85 13 6.22 8.84 19.63s3.11 26.23 5.7 29.57a78.3 78.3 0 0 1 8.31 12.47 93.8 93.8 0 0 1 6.62 16.48c2.17 6.79 4.05 12.65 10.63 21.22 11.07 14.4 17.66 48.64 15 78-.21 2.41-.53 4.29-.77 5.67-.43 2.53-.72 4.2.66 5.38s3.16.7 7.26-.63l3.43-1.09a109.33 109.33 0 0 1 12.58-2.8 2.15 2.15 0 0 0 1.59-1.16c3.43-6.91 3.85-15.22 4-22.47q0-1.31.06-2.79c.19-7.77.45-18.93-2.95-32a1 1 0 0 1 1.93-.64 93 93 0 0 1 6.66 25.55c2.55 22.58-1.9 32.09-1.94 32.17a1.61 1.61 0 0 0 .95 2.25 17.12 17.12 0 0 1 6.95 4.67c1.46 1.66.93 2.4-1.14 1.62a36.26 36.26 0 0 0-12.77-2.29c-10.4 0-18.09 4.95-21.51 9.19-3.19 3.94-3.7 7.67-3.83 11.27l-.06.05c-7.48-.75-12.94 1.21-17.47 6.21l-.08.09c-6.26 7.75-4 24.63-1.29 38.48 1.28 6.45 5.59 25.52 1.73 37.68zm96.1 10.07c-15.71 6.71-25.43 14.51-34 21.39-5.65 4.53-11 8.81-17.28 12.14-10.12 5.34-24.91 6.53-33.27-7.7-2.37-4-.71-9.86 1.58-17.95 3.05-10.75 7.23-25.46 3.71-44.65-.94-5.12-1.77-9.51-2.49-13.31C334 377 332.9 371.43 334 367c.63-2.45 3.43-3 5.87-3a20.83 20.83 0 0 1 2.63.19 29.51 29.51 0 0 0 7 12.1c5.7 5.86 13.63 8.83 23.56 8.85 2.1.17 25.94 1.55 36.54-22.4 1.46.18 3.65.7 4.3 2.3 1.28 3.19-.27 8.91-1.52 13.5-.9 3.31-1.68 6.16-1.63 8.37.31 16 11 22.78 25.83 32.16 1.79 1.13 3.66 2.31 5.55 3.54S445 425 445 426c-.52 4.79-20 13.16-26.45 15.91z",fill:"currentColor"},null,-1)];function s0(t,e){return y(),O("svg",n0,r0)}const kp=dr(t0,[["render",s0]]),o0={},i0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},a0=[x("path",{d:"M349.13 136.86c-40.32 0-57.36 19.24-85.44 19.24-28.79 0-50.75-19.1-85.69-19.1-34.2 0-70.67 20.88-93.83 56.45-32.52 50.16-27 144.63 25.67 225.11 18.84 28.81 44 61.12 77 61.47h.6c28.68 0 37.2-18.78 76.67-19h.6c38.88 0 46.68 18.89 75.24 18.89h.6c33-.35 59.51-36.15 78.35-64.85 13.56-20.64 18.6-31 29-54.35-76.19-28.92-88.43-136.93-13.08-178.34-23-28.8-55.32-45.48-85.79-45.48z",fill:"currentColor"},null,-1),x("path",{d:"M340.25 32c-24 1.63-52 16.91-68.4 36.86-14.88 18.08-27.12 44.9-22.32 70.91h1.92c25.56 0 51.72-15.39 67-35.11 14.72-18.77 25.88-45.37 21.8-72.66z",fill:"currentColor"},null,-1)];function l0(t,e){return y(),O("svg",i0,a0)}const Op=dr(o0,[["render",l0]]),c0={class:"moonbase:product-downloads"},u0=["data-last","onClick"],d0={class:"moonbase:sr-only"},f0={class:"moonbase:sr-only"},p0=x("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1),h0=["onClick"],m0=ve({__name:"ProductDownloads",props:{downloads:{}},setup(t){const e=t,n={[sn.Universal]:()=>Ep,[sn.Windows]:()=>xp,[sn.Linux]:()=>kp,[sn.Mac]:()=>Op},{downloadProduct:r}=Hi(),s=ee(()=>e.downloads.reduce((o,i)=>({...o,[i.platform]:(o[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(o,i)=>(y(),O("span",c0,[(y(!0),O(Re,null,fn(s.value,(a,l,c)=>(y(),O(Re,{key:l},[a.length===1?(y(),O("button",{key:0,type:"button",role:"button","data-last":c===Object.keys(s.value).length-1||void 0,onClick:u=>b(r)(a[0])},[x("span",d0,G(l.toString()),1),(y(),Ve(el(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,u0)):(y(),Ve(b(Yl),{key:1,as:"div","data-last":c===Object.keys(s.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:ke(()=>[F(b(mp),null,{default:ke(()=>[x("span",f0,G(l.toString()),1),(y(),Ve(el(a[0].icon()),{"aria-hidden":"true"})),p0]),_:2},1024),F(lo,{name:"moonbase:scale"},{default:ke(()=>[F(b(vp),{class:"moonbase:product-downloads-list"},{default:ke(()=>[(y(!0),O(Re,null,fn(a,u=>(y(),O("button",{key:u.key,type:"button",role:"button",onClick:d=>b(r)(u)},G(u.name),9,h0))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),v0={class:"moonbase:product-activations"},g0=x("th",{scope:"col"}," Device ",-1),y0=x("th",{scope:"col"}," Activation Method ",-1),_0=x("th",{scope:"col"}," Last Online ",-1),b0={key:0,scope:"col"},w0=[x("span",{class:"sr-only"},"Actions",-1)],E0={key:0},x0={colspan:"3"},k0=x("td",null,null,-1),O0={key:1},N0=[x("td",{colspan:"3"}," No activations found ",-1)],S0={key:0},T0=["onClick"],C0=ve({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(t,{emit:e}){const n=t,r=e,{getProductActivations:s,revokeActivation:o}=Hi(),i=C(null);ze(async()=>{let c=await s(n.productId);for(i.value=c.items.map(u=>({...u,revoking:!1}));c.hasMore&&c.next;)c=await s(n.productId,c.next),i.value.push(...c.items.map(u=>({...u,revoking:!1})))});const a=ee(()=>i.value&&i.value.some(c=>c.activationMethod===Oa.Online));async function l(c){c.revoking=!0,await o(c),r("revoked",c),i.value&&i.value.splice(i.value.indexOf(c),1)}return(c,u)=>(y(),O("table",v0,[x("thead",null,[x("tr",null,[g0,y0,_0,a.value?(y(),O("th",b0,w0)):ge("",!0)])]),x("tbody",null,[i.value?i.value.length===0?(y(),O("tr",O0,N0)):ge("",!0):(y(),O("tr",E0,[x("td",x0,[F(Ft),je(" Loading activations.. ")]),k0])),(y(!0),O(Re,null,fn(i.value,d=>{var f;return y(),O("tr",{key:d.id},[x("td",null,G(d.name),1),x("td",null,G(d.activationMethod),1),x("td",null,G((f=d.lastValidatedAt)==null?void 0:f.toLocaleDateString()),1),a.value?(y(),O("td",S0,[x("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:m=>l(d)},[d.revoking?(y(),Ve(Ft,{key:0})):ge("",!0),je(" Revoke ")],8,T0)])):ge("",!0)])}),128))])]))}}),$0={class:"moonbase:products"},P0=x("th",{scope:"col"}," Product ",-1),I0=x("th",{scope:"col"}," Activations ",-1),A0={key:0,scope:"col"},D0={key:0},V0=x("td",null,null,-1),R0={key:1},j0=[x("td",{colspan:"3"}," No products found ",-1)],L0=["src"],M0={key:1,class:"moonbase:image-placeholder"},U0=x("span",{class:"moonbase:sr-only"},"View activations",-1),Z0={key:0},B0={key:0},F0=ve({__name:"Products",setup(t){const{getProducts:e}=Hi(),n=C(null);ze(async()=>{let s=await e();for(n.value=s.items;s.hasMore&&s.next;)s=await e(s.next),n.value.push(...s.items)});const r=ee(()=>n.value&&n.value.some(s=>s.downloads));return(s,o)=>(y(),O("table",$0,[x("thead",null,[x("tr",null,[P0,I0,r.value?(y(),O("th",A0," Downloads ")):ge("",!0)])]),x("tbody",null,[n.value?n.value.length===0?(y(),O("tr",R0,j0)):ge("",!0):(y(),O("tr",D0,[x("td",null,[F(Ft),je(" Loading products.. ")]),V0])),(y(!0),O(Re,null,fn(n.value||[],i=>(y(),O("tr",{key:i.id},[x("td",null,[x("div",null,[i.iconUrl?(y(),O("img",{key:0,src:i.iconUrl,alt:""},null,8,L0)):(y(),O("div",M0)),x("span",null,G(i.name),1)])]),F(b(Yl),{as:"td"},{default:ke(()=>[F(b(mp),{class:"moonbase:button","data-variant":"secondary"},{default:ke(()=>[U0,je(" "+G(i.currentActivations)+" / "+G(i.maxActivations),1)]),_:2},1024),F(lo,{name:"moonbase:scale"},{default:ke(()=>[F(b(vp),null,{default:ke(()=>[F(C0,{"product-id":i.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024),r.value?(y(),O("td",Z0,[i.currentVersion!=null?(y(),O("div",B0,[i.downloads?(y(),Ve(m0,{key:0,downloads:i.downloads},null,8,["downloads"])):ge("",!0)])):ge("",!0)])):ge("",!0)]))),128))])]))}}),H0={class:"moonbase:redeem"},z0=["data-visible"],q0={key:1,class:"moonbase:redeem-voucher"},W0={key:0},K0={key:1},G0=x("span",null," Contains: ",-1),J0={class:"moonbase:redeem-voucher-products"},Y0=["src"],X0={key:1,class:"moonbase:image-placeholder"},Q0={key:0},eE={class:"moonbase:redeem-voucher-bundle"},tE=["src"],nE={key:1,class:"moonbase:image-placeholder"},rE={key:0},sE={class:"moonbase:redeem-voucher-bundle-products"},oE={class:"shrink-0"},iE=["src"],aE={key:1,class:"moonbase:image-placeholder"},lE=ve({__name:"Redeem",setup(t){const{redeem:e}=M_(),n=C(!1),r=C(null),s=C(null),o=C("");async function i(){n.value=!0,s.value=null;try{r.value=await e(o.value)}catch(a){throw s.value=a,a}n.value=!1}return(a,l)=>(y(),O("div",H0,[F(lo,{mode:"out-in",name:"moonbase:slide-left"},{default:ke(()=>[r.value?(y(),O("div",q0,[x("h3",null,[je(" You got: "),x("strong",null,G(r.value.name),1)]),r.value.description?(y(),O("h4",W0,G(r.value.description),1)):ge("",!0),x("h4",null,[je(" Code: "),x("strong",null,G(r.value.code),1)]),r.value.redeemsProducts.length>0?(y(),O("div",K0,[G0,x("div",J0,[(y(!0),O(Re,null,fn(r.value.redeemsProducts,({value:c,quantity:u})=>(y(),O("div",{key:c.id,class:"moonbase:redeem-voucher-product"},[x("div",null,[c.iconUrl?(y(),O("img",{key:0,src:c.iconUrl,alt:""},null,8,Y0)):(y(),O("div",X0))]),x("div",null,[x("p",null,[je(G(c.name)+" ",1),u!==1?(y(),O("span",Q0,"x "+G(u),1)):ge("",!0)]),x("p",null,G(c.tagline),1)])]))),128)),(y(!0),O(Re,null,fn(r.value.redeemsBundles,({value:c,quantity:u})=>(y(),O("div",{key:c.id},[x("div",eE,[x("div",null,[c.iconUrl?(y(),O("img",{key:0,src:c.iconUrl,alt:""},null,8,tE)):(y(),O("div",nE))]),x("div",null,[x("p",null,[je(G(c.name)+" ",1),u!==1?(y(),O("span",rE,"x "+G(u),1)):ge("",!0)]),x("p",null,G(c.tagline),1)])]),x("div",sE,[(y(!0),O(Re,null,fn(c.products,d=>(y(),O("div",{key:d.id,class:"moonbase:redeem-voucher-product"},[x("div",oE,[d.iconUrl?(y(),O("img",{key:0,src:d.iconUrl,alt:""},null,8,iE)):(y(),O("div",aE))]),x("div",null,[x("p",null,G(d.name),1),x("p",null,G(d.tagline),1)])]))),128))])]))),128))])])):ge("",!0)])):(y(),Ve(fr,{key:0,handler:i},{default:ke(()=>{var c;return[F(Tt,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u),label:"Voucher code",name:"code",required:""},null,8,["modelValue"]),F(pr,{label:"Redeem",success:"Redeem",error:"Error"}),x("span",{class:"moonbase:error","data-visible":!!s.value||void 0},G((c=s.value)==null?void 0:c.message),9,z0)]}),_:1}))]),_:1})]))}}),cE={class:"moonbase:customer"},uE=ve({__name:"Customer",props:{open:{type:Boolean}},setup(t){const e=Fe();function n(o){switch(o){case he.ViewAccount:return 0;case he.ViewProducts:return 1;case he.RedeemVoucher:return 2}return 0}const r=C(n(e.intent));lt(()=>e.intent,o=>{r.value=n(o)});function s(o){r.value=o}return(o,i)=>(y(),Ve(la,{open:o.open,onClose:i[0]||(i[0]=a=>b(e).reset())},{default:ke(()=>[x("div",cE,[F(b(L1),{"selected-index":r.value,onChange:s},{default:ke(()=>[F(b(M1),null,{default:ke(()=>[F(b(Ql),null,{default:ke(()=>[je("Account")]),_:1}),F(b(Ql),null,{default:ke(()=>[je(" Products ")]),_:1}),F(b(Ql),null,{default:ke(()=>[je("Redeem")]),_:1})]),_:1}),F(b(U1),null,{default:ke(()=>[F(b(ec),null,{default:ke(()=>[F(qw)]),_:1}),F(b(ec),null,{default:ke(()=>[F(F0)]),_:1}),F(b(ec),null,{default:ke(()=>[F(lE)]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),dE={class:"moonbase:auto-activate"},fE={key:0,class:"moonbase:loader"},pE={key:1,class:"moonbase:loader"},hE={key:2,class:"moonbase:loader"},mE={key:3},vE={key:0,class:"moonbase:auto-activate-product"},gE=["src"],yE={key:1,class:"moonbase:image-placeholder"},_E={key:1,class:"moonbase:loader"},bE=[x("h3",null," Uh oh ",-1),x("p",null," This activation request was cancelled, open your app to try again. ",-1)],wE={key:2,class:"moonbase:loader"},EE={key:3,class:"moonbase:loader"},xE=[x("h3",null," Done! ",-1),x("p",null," Your product is activated. ",-1)],kE={key:4,class:"moonbase:auto-activate-content"},OE={key:0},NE={key:1},SE=x("p",null," You don't have enough free seats on your licenses to activate this device. Either free up a seat or purchase additional licenses. ",-1),TE={class:"moonbase:auto-activate-cta"},CE=["href"],$E={key:2,class:"moonbase:auto-activate-trial"},PE={class:"moonbase:auto-activate-cta"},IE=ve({__name:"AutoActivate",setup(t){const e=Fe(),{user:n,loaded:r}=It(),s=e.getParameter("token"),{activationRequest:o,loading:i,fulfilling:a,completing:l,error:c,fulfillLicense:u,fulfillTrial:d,cancel:f}=L_(s);lt(o,E=>{var k;!a.value&&!l.value&&(E==null?void 0:E.status)===on.Requested&&((k=E==null?void 0:E.licenseEligibility)!=null&&k.eligible)&&u()});function m(){f(),e.show(Ae.Customer,he.ViewProducts)}function _(){e.enqueue(Ae.Activation,he.ActivateProduct,e.parameters??void 0),e.show(Ae.Authentication,he.SignIn)}return(E,k)=>{var A,B,T,J;return y(),O("div",dE,[b(i)||!b(r)?(y(),O("div",fE,[F(Ft)])):b(c)?(y(),O("div",pE,G(b(c)),1)):b(o)?(y(),O("div",mE,[b(o).product?(y(),O("div",vE,[b(o).product.iconUrl?(y(),O("img",{key:0,src:b(o).product.iconUrl,alt:""},null,8,gE)):(y(),O("div",yE)),x("div",null,[x("h2",null,G(b(o).product.name),1),x("h3",null,G(b(o).product.tagline),1)])])):ge("",!0),((A=b(o))==null?void 0:A.status)===b(on).Cancelled?(y(),O("div",_E,bE)):b(a)||b(l)?(y(),O("div",wE,[F(Ft),x("p",null,"Activating "+G(b(o).product.name)+"...",1)])):((B=b(o))==null?void 0:B.status)===b(on).Completed?(y(),O("div",EE,xE)):(y(),O("div",kE,[b(n)?(T=b(n).ownedProducts)!=null&&T.includes(b(o).product.id)?(y(),O("div",NE,[SE,x("span",TE,[x("button",{role:"button",class:"moonbase:button",onClick:k[0]||(k[0]=P=>m())}," Licenses "),b(o).product&&b(o).product.website?(y(),O("a",{key:0,href:b(o).product.website,class:"moonbase:button"}," Purchase ",8,CE)):ge("",!0)])])):ge("",!0):(y(),O("div",OE,[je(" Please sign in to use a license "),x("span",{class:"moonbase:auto-activate-cta"},[x("button",{role:"button",class:"moonbase:button",onClick:_}," Sign in ")])])),(J=b(o).trialEligibility)!=null&&J.eligible?(y(),O("div",$E,[je(" You are eligible for a "+G(b(o).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),b(o).trialEligibility.existing?(y(),O(Re,{key:0},[je(" of which you have "+G(b(o).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):ge("",!0),je(". "),x("span",PE,[x("button",{role:"button",class:"moonbase:button",onClick:k[1]||(k[1]=P=>b(d)())}," Start trial ")])])):ge("",!0)]))])):(y(),O("div",hE," Could not find activation request "))])}}}),AE={class:"moonbase:activation"},DE=ve({__name:"Activation",props:{open:{type:Boolean}},setup(t){const e=Fe();return(n,r)=>(y(),Ve(la,{open:n.open,onClose:r[0]||(r[0]=s=>b(e).reset())},{default:ke(()=>[x("div",AE,[F(b(oa),{as:"h3"},{default:ke(()=>[je(" Activate product ")]),_:1}),n.open&&b(e).intent===b(he).ActivateProduct?(y(),Ve(IE,{key:0})):ge("",!0)])]),_:1},8,["open"]))}});function VE(t){const e=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t<1)return`${t} B`;const n=Math.min(Math.floor(Math.log(t)/Math.log(1024)),e.length-1);t=Number(t/1024**n);const r=e[n];return t>=10||t%1===0?`${t.toFixed(0)} ${r}`:`${t.toFixed(1)} ${r}`}const RE={class:"moonbase:download-product"},jE={key:0,class:"moonbase:loader"},LE={key:1,class:"moonbase:loader"},ME={key:2,class:"moonbase:loader"},UE={key:3},ZE={class:"moonbase:download-product-product"},BE=["src"],FE={key:1,class:"moonbase:image-placeholder"},HE={key:0},zE={key:0,class:"moonbase:download-product-content"},qE={key:1,class:"moonbase:download-product-content"},WE={key:2,class:"moonbase:download-product-content"},KE={key:0,role:"list"},GE={class:"moonbase:download-product-download-name"},JE=["onClick"],YE=x("span",{class:"moonbase:download-product-clicker"},null,-1),XE={class:"moonbase:download-product-download-description"},QE=x("span",null," |",-1),ex={key:1,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},tx=[x("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"},null,-1)],nx={key:1,class:"moonbase:loader"},rx=ve({__name:"DownloadProduct",setup(t){const e=Fe(),{user:n,loaded:r}=It(),{getProduct:s,downloadProduct:o}=Hi(),i={[sn.Universal]:()=>Ep,[sn.Windows]:()=>xp,[sn.Linux]:()=>kp,[sn.Mac]:()=>Op},a=C(null),l=C([]),c=C(null),u=C(!0),d=ee(()=>e.getParameter("key")),f=ee(()=>{var E,k;return(k=(E=a.value)==null?void 0:E.downloads)==null?void 0:k.filter(A=>!d.value||A.key===d.value)});ze(async()=>{const E=e.getParameter("product_id"),k=e.getParameter("version");if(!E){c.value="Link is broken";return}try{a.value=await s(E,k||void 0)}catch(A){c.value=A.message}u.value=!1});function m(){e.enqueue(Ae.Download,he.DownloadProduct,e.parameters??void 0),e.show(Ae.Authentication,he.SignIn)}async function _(E){l.value.push(E.key),await o(E),l.value=l.value.filter(k=>k!==E.key)}return(E,k)=>{var A,B;return y(),O("div",RE,[u.value||!b(r)?(y(),O("div",jE,[F(Ft)])):c.value?(y(),O("div",LE,G(c.value),1)):a.value?(y(),O("div",UE,[x("div",ZE,[a.value.iconUrl?(y(),O("img",{key:0,src:a.value.iconUrl,alt:""},null,8,BE)):(y(),O("div",FE)),x("div",null,[x("h2",null,[je(G(a.value.name)+" ",1),x("span",null,"v"+G(a.value.version||a.value.currentVersion),1),a.value.prerelease?(y(),O("span",HE," (pre-release)")):ge("",!0)]),x("h3",null,G(a.value.tagline),1)])]),a.value.downloadsNeedsUser&&!b(n)?(y(),O("div",zE,[je(" Please sign in to download product "),x("span",{class:"moonbase:download-product-cta"},[x("button",{role:"button",class:"moonbase:button",onClick:m}," Sign in ")])])):a.value.downloadsNeedsOwnership&&!((A=b(n).ownedProducts)!=null&&A.includes(a.value.id))?(y(),O("div",qE," This product requires ownership to download ")):(y(),O("div",WE,[(B=a.value)!=null&&B.downloads&&a.value.downloads.length>0?(y(),O("ul",KE,[(y(!0),O(Re,null,fn(f.value,T=>(y(),O("li",{key:T.key},[x("div",null,[x("p",GE,[x("button",{onClick:J=>_(T)},[YE,je(" "+G(T.name),1)],8,JE)]),x("p",XE,[(y(),Ve(el(i[T.platform]()),{"aria-hidden":"true"})),je(" "+G(T.platform)+" ",1),QE,je(" "+G(b(VE)(T.size)),1)])]),x("div",null,[l.value.includes(T.key)?(y(),Ve(Ft,{key:0})):(y(),O("svg",ex,tx))])]))),128))])):(y(),O("div",nx," No downloadable files found "))]))])):(y(),O("div",ME," Could not find product "))])}}}),sx={class:"moonbase:download"},ox=ve({__name:"Download",props:{open:{type:Boolean}},setup(t){const e=Fe();return(n,r)=>(y(),Ve(la,{open:n.open,onClose:r[0]||(r[0]=s=>b(e).reset())},{default:ke(()=>[x("div",sx,[F(b(oa),{as:"h3"},{default:ke(()=>[je(" Download product ")]),_:1}),n.open&&b(e).intent===b(he).DownloadProduct?(y(),Ve(rx,{key:0})):ge("",!0)])]),_:1},8,["open"]))}}),ix=ve({__name:"App",setup(t){const e=Me(Yi),n=Fe();return(r,s)=>{var o;return y(),O(Re,null,[(o=b(e))!=null&&o.toolbar.enabled?(y(),Ve(wb,{key:0})):ge("",!0),F(Zw,{open:b(n).active===b(Ae).Cart},null,8,["open"]),F(X1,{open:b(n).active===b(Ae).Authentication},null,8,["open"]),F(DE,{open:b(n).active===b(Ae).Activation},null,8,["open"]),F(ox,{open:b(n).active===b(Ae).Download},null,8,["open"]),F(uE,{open:b(n).active===b(Ae).Customer},null,8,["open"])],64)}}});function ca(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ic(t,...e){if(e.length===0)return t;const n=e.shift();if(!n)return t;if(ca(t)&&ca(n)){for(const r in t)if(n.hasOwnProperty(r)){const s=n[r];ca(s)&&ca(t[r])?t[r]=ic(t[r],s):s!==void 0&&(t[r]=s)}}return ic(t,...e)}class ax{constructor(){Gr(this,"initialized",!1);Gr(this,"pinia");Gr(this,"storefront");Gr(this,"options")}async setup(e,n){if(document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}const r=document.createElement("div");if(r.id="moonbase",r.classList.add("moonbase"),document.body.append(r),this.options=ic(vb,n),this.storefront=U_(e),this.pinia=db(),$y(ix).use(this.storefront).use(this.pinia).provide(Yi,this.options).mount("#moonbase"),this.initialized=!0,window&&window.location){const i=new URLSearchParams(window.location.search),a=i.get("mb_intent");if(a&&Object.values(he).includes(a)){const l=Object.fromEntries([...i.entries()].filter(([u])=>u.startsWith("mb_")).map(([u,d])=>[u.substring(3),d]));if(a===he.Checkout&&l.complete)return;this[a](l);for(const u of Object.keys(l))i.delete(`mb_${u}`);const c=i.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(c?`?${c}`:""))}}const s=Fe(this.pinia),o=It(this.storefront);this.storefront.onCheckoutClosed(i=>{i===he.ViewProducts&&(o.user?s.show(Ae.Customer,he.ViewProducts):s.show(Ae.Cart,he.ViewCart))})}sign_in(e){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Fe(this.pinia).show(Ae.Authentication,he.SignIn,e)}sign_up(e){var r;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!((r=this.options)!=null&&r.auth.enable.signUp))throw new Error("Sign ups are not enabled");Fe(this.pinia).show(Ae.Authentication,he.SignUp,e)}forgot_password(e){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Fe(this.pinia).show(Ae.Authentication,he.ForgotPassword,e)}reset_password(e){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Fe(this.pinia).show(Ae.Authentication,he.ResetPassword,e)}confirm_account(e){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Fe(this.pinia).show(Ae.Authentication,he.ConfirmAccount,e)}confirm_email(){}confirm_email_change(e){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const n=Fe(this.pinia);It(this.storefront).user.value?n.show(Ae.Authentication,he.ConfirmEmailChange,e):(n.show(Ae.Authentication,he.SignIn),n.enqueue(Ae.Authentication,he.ConfirmEmailChange,e))}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const e=Fe(this.pinia);It(this.storefront).user.value?e.show(Ae.Customer,he.ViewAccount):(e.show(Ae.Authentication,he.SignIn),e.enqueue(Ae.Customer,he.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Fe(this.pinia).show(Ae.Cart,he.ViewCart)}redeem_voucher(e){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Fe(this.pinia).show(Ae.Cart,he.ViewCart,e)}download_product(e){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Fe(this.pinia).show(Ae.Download,he.DownloadProduct,e)}activate_product(e){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(e!=null&&e.token))throw new Error("You need to provide a token when activating a product");Fe(this.pinia).show(Ae.Activation,he.ActivateProduct,e)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");Fe(this.pinia).show(Ae.Cart,he.ViewCart)}async add_to_cart(e){var s,o,i,a;if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(!(e!=null&&e.product_id)&&!(e!=null&&e.bundle_id))throw new Error("You need to provide a product or bundle ID when adding to cart");const n=Dl(this.storefront);if(e!=null&&e.product_id){const l=gf(e.product_id,this.storefront);if(l.value)n.addToCart(l.value,(s=l.value.variations)==null?void 0:s.find(c=>c.id===e.variation_id));else{await this.storefront.loadedStorefrontPromise;const c=gf(e.product_id,this.storefront);if(c.value)n.addToCart(c.value,(o=c.value.variations)==null?void 0:o.find(u=>u.id===e.variation_id));else throw new Error(`Product '${e.product_id}' not found`)}}if(e!=null&&e.bundle_id){const l=vf(e.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(i=l.value.variations)==null?void 0:i.find(c=>c.id===e.variation_id));else{await this.storefront.loadedStorefrontPromise;const c=vf(e.bundle_id,this.storefront);if(c.value)n.addToCart(c.value,(a=c.value.variations)==null?void 0:a.find(u=>u.id===e.variation_id));else throw new Error(`Bundle '${e.bundle_id}' not found`)}}Fe(this.pinia).show(Ae.Cart,he.AddToCart)}checkout(e){if(!this.initialized)throw new Error("Moonbase has not been set up yet");if(e!=null&&e.complete)return;Dl(this.storefront).checkout(`${window.location.pathname}?mb_intent=view_products`)}}const Np=new ax;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=Np),Dt.MoonbaseIntent=he,Dt.default=Np,Object.defineProperties(Dt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|