@moonbase.sh/storefront 0.2.1
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/favicon.ico +0 -0
- package/dist/moonbase.js +14196 -0
- package/dist/moonbase.umd.cjs +25 -0
- package/package.json +46 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.moonbase .moonbase\\:toolbar{position:fixed;bottom:32px;border-radius:16px;background-color:#1a1a1a;color:#f9f9f9;display:flex;transition-duration:.1s;transition-property:all;transition-timing-function:ease-out;transform:translateY(8px);opacity:0}.moonbase .moonbase\\:toolbar[data-location=bottom-right]{right:32px}.moonbase .moonbase\\:toolbar[data-location=bottom-left]{left:32px}.moonbase .moonbase\\:toolbar[data-visible=true]{transform:translateY(0);opacity:1;transition-duration:.5s}.moonbase .moonbase\\:toolbar-action{padding:12px 16px;transition:background-color .25s ease-out;cursor:pointer;display:flex;align-items:center}.moonbase .moonbase\\:toolbar-action:nth-child(1){border-top-left-radius:16px;border-bottom-left-radius:16px}.moonbase .moonbase\\:toolbar-action:last-child{border-top-right-radius:16px;border-bottom-right-radius:16px}.moonbase .moonbase\\:toolbar-action:hover{background-color:#ffffff1a}.moonbase .moonbase\\:toolbar-action[data-action-width=narrow]{padding:12px}.moonbase .moonbase\\: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\\:input[data-v-a7fea82b] label[data-v-a7fea82b]{display:block;font-size:14px;font-weight:500;line-height:20px;color:#374151}.moonbase\\:input[data-v-a7fea82b] input[data-v-a7fea82b]{display:block;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;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\\:input[data-v-a7fea82b] input[data-v-a7fea82b][data-v-a7fea82b]: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-a7fea82b] .moonbase\\:input-hint[data-v-a7fea82b]{margin-top:8px;font-size:14px;line-height:20px}.moonbase\\:input[data-v-a7fea82b] .moonbase\\:input-hint[data-v-a7fea82b][data-type=error][data-v-a7fea82b]{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 .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\\: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\\: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>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: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);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: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:first-child{border-bottom-right-radius:0;border-bottom-left-radius:0;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-top-right-radius:0;border-top-left-radius:0;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\\: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 *: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-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\\:sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.moonbase a{color:inherit;text-decoration:inherit}.moonbase input,.moonbase button,.moonbase textarea,.moonbase select{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;letter-spacing:inherit;background:none;font-size:100%;line-height:1.15;margin:0;padding:0;color:inherit}.moonbase button,.moonbase select{text-transform:none}.moonbase button,.moonbase [role=button]{cursor:pointer}.moonbase button,.moonbase [type=button],.moonbase [type=reset],.moonbase [type=submit]{-webkit-appearance:button}.moonbase h1,.moonbase h2,.moonbase h3,.moonbase h4,.moonbase h5,.moonbase h6{font-size:inherit;font-weight:inherit}.moonbase b,.moonbase strong{font-weight:bolder}.moonbase svg,.moonbase svg *{color:inherit}.moonbase table{text-indent:0;border-color:inherit;border-collapse:collapse}.moonbase img,.moonbase svg,.moonbase video,.moonbase canvas,.moonbase audio,.moonbase iframe,.moonbase embed,.moonbase object{display:block;vertical-align:middle}.moonbase ol,.moonbase ul,.moonbase menu{list-style:none;margin:0;padding:0}.moonbase img,.moonbase video{max-width:100%;height:auto}.moonbase :disabled{cursor:default}.moonbase [hidden]{display:none}.moonbase ::-moz-focus-inner{border-style:none;padding:0}.moonbase :-moz-focusring{outline:none}.moonbase :-moz-ui-invalid{box-shadow:none}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
(function(bt,me){typeof exports=="object"&&typeof module<"u"?me(exports):typeof define=="function"&&define.amd?define(["exports"],me):(bt=typeof globalThis<"u"?globalThis:bt||self,me(bt.Moonbase={}))})(this,function(bt){"use strict";var s1=Object.defineProperty;var i1=(bt,me,mn)=>me in bt?s1(bt,me,{enumerable:!0,configurable:!0,writable:!0,value:mn}):bt[me]=mn;var Vr=(bt,me,mn)=>i1(bt,typeof me!="symbol"?me+"":me,mn);var me;(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})(me||(me={}));var mn;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(mn||(mn={}));const X=me.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),vn=e=>{switch(typeof e){case"undefined":return X.undefined;case"string":return X.string;case"number":return isNaN(e)?X.nan:X.number;case"boolean":return X.boolean;case"function":return X.function;case"bigint":return X.bigint;case"symbol":return X.symbol;case"object":return Array.isArray(e)?X.array:e===null?X.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?X.promise:typeof Map<"u"&&e instanceof Map?X.map:typeof Set<"u"&&e instanceof Set?X.set:typeof Date<"u"&&e instanceof Date?X.date:X.object;default:return X.unknown}},F=me.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"]),Ud=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class kt 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,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(i))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,me.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()}}kt.create=e=>new kt(e);const Rr=(e,t)=>{let n;switch(e.code){case F.invalid_type:e.received===X.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case F.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,me.jsonStringifyReplacer)}`;break;case F.unrecognized_keys:n=`Unrecognized key(s) in object: ${me.joinValues(e.keys,", ")}`;break;case F.invalid_union:n="Invalid input";break;case F.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${me.joinValues(e.options)}`;break;case F.invalid_enum_value:n=`Invalid enum value. Expected ${me.joinValues(e.options)}, received '${e.received}'`;break;case F.invalid_arguments:n="Invalid function arguments";break;case F.invalid_return_type:n="Invalid function return type";break;case F.invalid_date:n="Invalid date";break;case F.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}"`:me.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case F.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 F.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 F.custom:n="Invalid input";break;case F.invalid_intersection_types:n="Intersection results could not be merged";break;case F.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case F.not_finite:n="Number must be finite";break;default:n=t.defaultError,me.assertNever(e)}return{message:n}};let Za=Rr;function Fd(e){Za=e}function Vo(){return Za}const Ro=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};let a="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)a=l(i,{data:t,defaultError:a}).message;return{...o,path:s,message:o.message||a}},Bd=[];function ee(e,t){const n=Ro({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Vo(),Rr].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 ve;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n)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 ve;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const ve=Object.freeze({status:"aborted"}),qa=e=>({status:"dirty",value:e}),ht=e=>({status:"valid",value:e}),Xs=e=>e.status==="aborted",Qs=e=>e.status==="dirty",jr=e=>e.status==="valid",jo=e=>typeof Promise<"u"&&e instanceof Promise;var ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ce||(ce={}));class jt{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 Wa=(e,t)=>{if(jr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new kt(e.common.issues);return this._error=n,this._error}}};function ye(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 we{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 vn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:vn(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:vn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(jo(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:vn(t)},s=this._parseSync({data:t,path:o.path,parent:o});return Wa(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:vn(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(jo(o)?o:Promise.resolve(o));return Wa(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:F.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!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 $t({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Jt.create(this,this._def)}nullable(){return qn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return It.create(this,this._def)}promise(){return wr.create(this,this._def)}or(t){return Fr.create([this,t],this._def)}and(t){return Br.create(this,t,this._def)}transform(t){return new $t({...ye(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new zr({...ye(this._def),innerType:this,defaultValue:n,typeName:pe.ZodDefault})}brand(){return new Ka({typeName:pe.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ho({...ye(this._def),innerType:this,catchValue:n,typeName:pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Kr.create(this,t)}readonly(){return qo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Hd=/^c[^\s-]{8,}$/i,Zd=/^[a-z][a-z0-9]*$/,qd=/^[0-9A-HJKMNP-TV-Z]{26}$/,Wd=/^[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,zd=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Kd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ei;const Gd=/^(((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}))$/,Jd=/^(([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})))$/,Yd=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 Xd(e,t){return!!((t==="v4"||!t)&&Gd.test(e)||(t==="v6"||!t)&&Jd.test(e))}class Pt extends we{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==X.string){const s=this._getOrReturnCtx(t);return ee(s,{code:F.invalid_type,expected:X.string,received:s.parsedType}),ve}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),ee(o,{code:F.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:F.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?ee(o,{code:F.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&ee(o,{code:F.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")zd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"email",code:F.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")ei||(ei=new RegExp(Kd,"u")),ei.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"emoji",code:F.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")Wd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"uuid",code:F.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")Hd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid",code:F.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")Zd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"cuid2",code:F.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")qd.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ulid",code:F.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ee(o,{validation:"url",code:F.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"regex",code:F.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),ee(o,{code:F.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:F.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),ee(o,{code:F.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?Yd(s).test(t.data)||(o=this._getOrReturnCtx(t,o),ee(o,{code:F.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="ip"?Xd(t.data,s.version)||(o=this._getOrReturnCtx(t,o),ee(o,{validation:"ip",code:F.invalid_string,message:s.message}),r.dirty()):me.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:F.invalid_string,...ce.errToObj(r)})}_addCheck(t){return new Pt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ce.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,...ce.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ce.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ce.errToObj(n)})}nonempty(t){return this.min(1,ce.errToObj(t))}trim(){return new Pt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Pt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Pt({...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}}Pt.create=e=>{var t;return new Pt({checks:[],typeName:pe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function Qd(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 gn extends we{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)!==X.number){const s=this._getOrReturnCtx(t);return ee(s,{code:F.invalid_type,expected:X.number,received:s.parsedType}),ve}let r;const o=new ct;for(const s of this._def.checks)s.kind==="int"?me.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:F.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:F.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:F.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Qd(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),ee(r,{code:F.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:F.not_finite,message:s.message}),o.dirty()):me.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,o){return new gn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(o)}]})}_addCheck(t){return new gn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ce.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"&&me.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)}}gn.create=e=>new gn({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class yn extends we{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)!==X.bigint){const s=this._getOrReturnCtx(t);return ee(s,{code:F.invalid_type,expected:X.bigint,received:s.parsedType}),ve}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),ee(r,{code:F.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:F.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:F.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):me.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ce.toString(n))}setLimit(t,n,r,o){return new yn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ce.toString(o)}]})}_addCheck(t){return new yn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ce.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}}yn.create=e=>{var t;return new yn({checks:[],typeName:pe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class Lr extends we{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==X.boolean){const r=this._getOrReturnCtx(t);return ee(r,{code:F.invalid_type,expected:X.boolean,received:r.parsedType}),ve}return ht(t.data)}}Lr.create=e=>new Lr({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Bn extends we{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==X.date){const s=this._getOrReturnCtx(t);return ee(s,{code:F.invalid_type,expected:X.date,received:s.parsedType}),ve}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return ee(s,{code:F.invalid_date}),ve}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),ee(o,{code:F.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),ee(o,{code:F.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):me.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Bn({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ce.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}}Bn.create=e=>new Bn({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,...ye(e)});class Lo extends we{_parse(t){if(this._getType(t)!==X.symbol){const r=this._getOrReturnCtx(t);return ee(r,{code:F.invalid_type,expected:X.symbol,received:r.parsedType}),ve}return ht(t.data)}}Lo.create=e=>new Lo({typeName:pe.ZodSymbol,...ye(e)});class Mr extends we{_parse(t){if(this._getType(t)!==X.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:F.invalid_type,expected:X.undefined,received:r.parsedType}),ve}return ht(t.data)}}Mr.create=e=>new Mr({typeName:pe.ZodUndefined,...ye(e)});class Ur extends we{_parse(t){if(this._getType(t)!==X.null){const r=this._getOrReturnCtx(t);return ee(r,{code:F.invalid_type,expected:X.null,received:r.parsedType}),ve}return ht(t.data)}}Ur.create=e=>new Ur({typeName:pe.ZodNull,...ye(e)});class yr extends we{constructor(){super(...arguments),this._any=!0}_parse(t){return ht(t.data)}}yr.create=e=>new yr({typeName:pe.ZodAny,...ye(e)});class Hn extends we{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ht(t.data)}}Hn.create=e=>new Hn({typeName:pe.ZodUnknown,...ye(e)});class Gt extends we{_parse(t){const n=this._getOrReturnCtx(t);return ee(n,{code:F.invalid_type,expected:X.never,received:n.parsedType}),ve}}Gt.create=e=>new Gt({typeName:pe.ZodNever,...ye(e)});class Mo extends we{_parse(t){if(this._getType(t)!==X.undefined){const r=this._getOrReturnCtx(t);return ee(r,{code:F.invalid_type,expected:X.void,received:r.parsedType}),ve}return ht(t.data)}}Mo.create=e=>new Mo({typeName:pe.ZodVoid,...ye(e)});class It extends we{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==X.array)return ee(n,{code:F.invalid_type,expected:X.array,received:n.parsedType}),ve;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(ee(n,{code:i?F.too_big:F.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ee(n,{code:F.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ee(n,{code:F.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 jt(n,i,n.path,a)))).then(i=>ct.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new jt(n,i,n.path,a)));return ct.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new It({...this._def,minLength:{value:t,message:ce.toString(n)}})}max(t,n){return new It({...this._def,maxLength:{value:t,message:ce.toString(n)}})}length(t,n){return new It({...this._def,exactLength:{value:t,message:ce.toString(n)}})}nonempty(t){return this.min(1,t)}}It.create=(e,t)=>new It({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...ye(t)});function _r(e){if(e instanceof Fe){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Jt.create(_r(r))}return new Fe({...e._def,shape:()=>t})}else return e instanceof It?new It({...e._def,type:_r(e.element)}):e instanceof Jt?Jt.create(_r(e.unwrap())):e instanceof qn?qn.create(_r(e.unwrap())):e instanceof Lt?Lt.create(e.items.map(t=>_r(t))):e}class Fe extends we{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=me.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==X.object){const l=this._getOrReturnCtx(t);return ee(l,{code:F.invalid_type,expected:X.object,received:l.parsedType}),ve}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Gt&&this._def.unknownKeys==="strip"))for(const l in o.data)i.includes(l)||a.push(l);const c=[];for(const l of i){const u=s[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new jt(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Gt){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of a)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")a.length>0&&(ee(o,{code:F.unrecognized_keys,keys:a}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of a){const d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new jt(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key;l.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return l}).then(l=>ct.mergeObjectSync(r,l)):ct.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return ce.errToObj,new Fe({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const c=(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=ce.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new Fe({...this._def,unknownKeys:"strip"})}passthrough(){return new Fe({...this._def,unknownKeys:"passthrough"})}extend(t){return new Fe({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Fe({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Fe({...this._def,catchall:t})}pick(t){const n={};return me.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Fe({...this._def,shape:()=>n})}omit(t){const n={};return me.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Fe({...this._def,shape:()=>n})}deepPartial(){return _r(this)}partial(t){const n={};return me.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new Fe({...this._def,shape:()=>n})}required(t){const n={};return me.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Jt;)s=s._def.innerType;n[r]=s}}),new Fe({...this._def,shape:()=>n})}keyof(){return za(me.objectKeys(this.shape))}}Fe.create=(e,t)=>new Fe({shape:()=>e,unknownKeys:"strip",catchall:Gt.create(),typeName:pe.ZodObject,...ye(t)}),Fe.strictCreate=(e,t)=>new Fe({shape:()=>e,unknownKeys:"strict",catchall:Gt.create(),typeName:pe.ZodObject,...ye(t)}),Fe.lazycreate=(e,t)=>new Fe({shape:e,unknownKeys:"strip",catchall:Gt.create(),typeName:pe.ZodObject,...ye(t)});class Fr extends we{_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 kt(a.ctx.common.issues));return ee(n,{code:F.invalid_union,unionErrors:i}),ve}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(c=>new kt(c));return ee(n,{code:F.invalid_union,unionErrors:a}),ve}}get options(){return this._def.options}}Fr.create=(e,t)=>new Fr({options:e,typeName:pe.ZodUnion,...ye(t)});const Uo=e=>e instanceof Zr?Uo(e.schema):e instanceof $t?Uo(e.innerType()):e instanceof qr?[e.value]:e instanceof _n?e.options:e instanceof Wr?Object.keys(e.enum):e instanceof zr?Uo(e._def.innerType):e instanceof Mr?[void 0]:e instanceof Ur?[null]:null;class Fo extends we{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==X.object)return ee(n,{code:F.invalid_type,expected:X.object,received:n.parsedType}),ve;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ee(n,{code:F.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=Uo(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 Fo({typeName:pe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function ti(e,t){const n=vn(e),r=vn(t);if(e===t)return{valid:!0,data:e};if(n===X.object&&r===X.object){const o=me.objectKeys(t),s=me.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const c=ti(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(n===X.array&&r===X.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],c=ti(i,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return n===X.date&&r===X.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Br extends we{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(Xs(s)||Xs(i))return ve;const a=ti(s.value,i.value);return a.valid?((Qs(s)||Qs(i))&&n.dirty(),{status:n.value,value:a.data}):(ee(r,{code:F.invalid_intersection_types}),ve)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Br.create=(e,t,n)=>new Br({left:e,right:t,typeName:pe.ZodIntersection,...ye(n)});class Lt extends we{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==X.array)return ee(r,{code:F.invalid_type,expected:X.array,received:r.parsedType}),ve;if(r.data.length<this._def.items.length)return ee(r,{code:F.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&r.data.length>this._def.items.length&&(ee(r,{code:F.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new jt(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 Lt({...this._def,rest:t})}}Lt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Lt({items:e,typeName:pe.ZodTuple,rest:null,...ye(t)})};class Hr extends we{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!==X.object)return ee(r,{code:F.invalid_type,expected:X.object,received:r.parsedType}),ve;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new jt(r,a,r.path,a)),value:i._parse(new jt(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 we?new Hr({keyType:t,valueType:n,typeName:pe.ZodRecord,...ye(r)}):new Hr({keyType:Pt.create(),valueType:t,typeName:pe.ZodRecord,...ye(n)})}}class Bo extends we{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!==X.map)return ee(r,{code:F.invalid_type,expected:X.map,received:r.parsedType}),ve;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,c],l)=>({key:o._parse(new jt(r,a,r.path,[l,"key"])),value:s._parse(new jt(r,c,r.path,[l,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of i){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return ve;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of i){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return ve;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}}}}Bo.create=(e,t,n)=>new Bo({valueType:t,keyType:e,typeName:pe.ZodMap,...ye(n)});class Zn extends we{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==X.set)return ee(r,{code:F.invalid_type,expected:X.set,received:r.parsedType}),ve;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ee(r,{code:F.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ee(r,{code:F.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(c){const l=new Set;for(const u of c){if(u.status==="aborted")return ve;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const a=[...r.data.values()].map((c,l)=>s._parse(new jt(r,c,r.path,l)));return r.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,n){return new Zn({...this._def,minSize:{value:t,message:ce.toString(n)}})}max(t,n){return new Zn({...this._def,maxSize:{value:t,message:ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Zn.create=(e,t)=>new Zn({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,...ye(t)});class br extends we{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==X.function)return ee(n,{code:F.invalid_type,expected:X.function,received:n.parsedType}),ve;function r(a,c){return Ro({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Vo(),Rr].filter(l=>!!l),issueData:{code:F.invalid_arguments,argumentsError:c}})}function o(a,c){return Ro({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Vo(),Rr].filter(l=>!!l),issueData:{code:F.invalid_return_type,returnTypeError:c}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof wr){const a=this;return ht(async function(...c){const l=new kt([]),u=await a._def.args.parseAsync(c,s).catch(g=>{throw l.addIssue(r(c,g)),l}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(g=>{throw l.addIssue(o(d,g)),l})})}else{const a=this;return ht(function(...c){const l=a._def.args.safeParse(c,s);if(!l.success)throw new kt([r(c,l.error)]);const u=Reflect.apply(i,this,l.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new kt([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new br({...this._def,args:Lt.create(t).rest(Hn.create())})}returns(t){return new br({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new br({args:t||Lt.create([]).rest(Hn.create()),returns:n||Hn.create(),typeName:pe.ZodFunction,...ye(r)})}}class Zr extends we{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:pe.ZodLazy,...ye(t)});class qr extends we{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ee(n,{received:n.data,code:F.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}qr.create=(e,t)=>new qr({value:e,typeName:pe.ZodLiteral,...ye(t)});function za(e,t){return new _n({values:e,typeName:pe.ZodEnum,...ye(t)})}class _n extends we{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{expected:me.joinValues(r),received:n.parsedType,code:F.invalid_type}),ve}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{received:n.data,code:F.invalid_enum_value,options:r}),ve}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 _n.create(t)}exclude(t){return _n.create(this.options.filter(n=>!t.includes(n)))}}_n.create=za;class Wr extends we{_parse(t){const n=me.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==X.string&&r.parsedType!==X.number){const o=me.objectValues(n);return ee(r,{expected:me.joinValues(o),received:r.parsedType,code:F.invalid_type}),ve}if(n.indexOf(t.data)===-1){const o=me.objectValues(n);return ee(r,{received:r.data,code:F.invalid_enum_value,options:o}),ve}return ht(t.data)}get enum(){return this._def.values}}Wr.create=(e,t)=>new Wr({values:e,typeName:pe.ZodNativeEnum,...ye(t)});class wr extends we{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==X.promise&&n.common.async===!1)return ee(n,{code:F.invalid_type,expected:X.promise,received:n.parsedType}),ve;const r=n.parsedType===X.promise?n.data:Promise.resolve(n.data);return ht(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}wr.create=(e,t)=>new wr({type:e,typeName:pe.ZodPromise,...ye(t)});class $t extends we{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{ee(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);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 c=o.refinement(a,s);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?ve:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!jr(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>jr(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);me.assertNever(o)}}$t.create=(e,t,n)=>new $t({schema:e,typeName:pe.ZodEffects,effect:t,...ye(n)}),$t.createWithPreprocess=(e,t,n)=>new $t({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...ye(n)});class Jt extends we{_parse(t){return this._getType(t)===X.undefined?ht(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Jt.create=(e,t)=>new Jt({innerType:e,typeName:pe.ZodOptional,...ye(t)});class qn extends we{_parse(t){return this._getType(t)===X.null?ht(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}qn.create=(e,t)=>new qn({innerType:e,typeName:pe.ZodNullable,...ye(t)});class zr extends we{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===X.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}zr.create=(e,t)=>new zr({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class Ho extends we{_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 jo(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new kt(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new kt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ho.create=(e,t)=>new Ho({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class Zo extends we{_parse(t){if(this._getType(t)!==X.nan){const r=this._getOrReturnCtx(t);return ee(r,{code:F.invalid_type,expected:X.nan,received:r.parsedType}),ve}return{status:"valid",value:t.data}}}Zo.create=e=>new Zo({typeName:pe.ZodNaN,...ye(e)});const ef=Symbol("zod_brand");class Ka extends we{_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 Kr extends we{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ve:s.status==="dirty"?(n.dirty(),qa(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ve:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Kr({in:t,out:n,typeName:pe.ZodPipeline})}}class qo extends we{_parse(t){const n=this._def.innerType._parse(t);return jr(n)&&(n.value=Object.freeze(n.value)),n}}qo.create=(e,t)=>new qo({innerType:e,typeName:pe.ZodReadonly,...ye(t)});const Ga=(e,t={},n)=>e?yr.create().superRefine((r,o)=>{var s,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(i=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&i!==void 0?i:!0,l=typeof a=="string"?{message:a}:a;o.addIssue({code:"custom",...l,fatal:c})}}):yr.create(),tf={object:Fe.lazycreate};var pe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(pe||(pe={}));const nf=(e,t={message:`Input not instance of ${e.name}`})=>Ga(n=>n instanceof e,t),Ja=Pt.create,Ya=gn.create,rf=Zo.create,of=yn.create,Xa=Lr.create,sf=Bn.create,af=Lo.create,lf=Mr.create,cf=Ur.create,uf=yr.create,df=Hn.create,ff=Gt.create,pf=Mo.create,hf=It.create,mf=Fe.create,vf=Fe.strictCreate,gf=Fr.create,yf=Fo.create,_f=Br.create,bf=Lt.create,wf=Hr.create,Ef=Bo.create,Of=Zn.create,Nf=br.create,Sf=Zr.create,xf=qr.create,Tf=_n.create,Cf=Wr.create,kf=wr.create,Qa=$t.create,Pf=Jt.create,If=qn.create,$f=$t.createWithPreprocess,Df=Kr.create;var y=Object.freeze({__proto__:null,defaultErrorMap:Rr,setErrorMap:Fd,getErrorMap:Vo,makeIssue:Ro,EMPTY_PATH:Bd,addIssueToContext:ee,ParseStatus:ct,INVALID:ve,DIRTY:qa,OK:ht,isAborted:Xs,isDirty:Qs,isValid:jr,isAsync:jo,get util(){return me},get objectUtil(){return mn},ZodParsedType:X,getParsedType:vn,ZodType:we,ZodString:Pt,ZodNumber:gn,ZodBigInt:yn,ZodBoolean:Lr,ZodDate:Bn,ZodSymbol:Lo,ZodUndefined:Mr,ZodNull:Ur,ZodAny:yr,ZodUnknown:Hn,ZodNever:Gt,ZodVoid:Mo,ZodArray:It,ZodObject:Fe,ZodUnion:Fr,ZodDiscriminatedUnion:Fo,ZodIntersection:Br,ZodTuple:Lt,ZodRecord:Hr,ZodMap:Bo,ZodSet:Zn,ZodFunction:br,ZodLazy:Zr,ZodLiteral:qr,ZodEnum:_n,ZodNativeEnum:Wr,ZodPromise:wr,ZodEffects:$t,ZodTransformer:$t,ZodOptional:Jt,ZodNullable:qn,ZodDefault:zr,ZodCatch:Ho,ZodNaN:Zo,BRAND:ef,ZodBranded:Ka,ZodPipeline:Kr,ZodReadonly:qo,custom:Ga,Schema:we,ZodSchema:we,late:tf,get ZodFirstPartyTypeKind(){return pe},coerce:{string:e=>Pt.create({...e,coerce:!0}),number:e=>gn.create({...e,coerce:!0}),boolean:e=>Lr.create({...e,coerce:!0}),bigint:e=>yn.create({...e,coerce:!0}),date:e=>Bn.create({...e,coerce:!0})},any:uf,array:hf,bigint:of,boolean:Xa,date:sf,discriminatedUnion:yf,effect:Qa,enum:Tf,function:Nf,instanceof:nf,intersection:_f,lazy:Sf,literal:xf,map:Ef,nan:rf,nativeEnum:Cf,never:ff,null:cf,nullable:If,number:Ya,object:mf,oboolean:()=>Xa().optional(),onumber:()=>Ya().optional(),optional:Pf,ostring:()=>Ja().optional(),pipeline:Df,preprocess:$f,promise:kf,record:wf,set:Of,strictObject:vf,string:Ja,symbol:af,transformer:Qa,tuple:bf,undefined:lf,union:gf,unknown:df,void:pf,NEVER:ve,ZodIssueCode:F,quotelessJson:Ud,ZodError:kt}),Af=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ni={exports:{}};(function(e,t){var n=typeof self<"u"?self:Af,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 c(_){return _&&DataView.prototype.isPrototypeOf(_)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(_){return _&&l.indexOf(Object.prototype.toString.call(_))>-1};function d(_){if(typeof _!="string"&&(_=String(_)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(_))throw new TypeError("Invalid character in header field name");return _.toLowerCase()}function p(_){return typeof _!="string"&&(_=String(_)),_}function g(_){var k={next:function(){var te=_.shift();return{done:te===void 0,value:te}}};return a.iterable&&(k[Symbol.iterator]=function(){return k}),k}function m(_){this.map={},_ instanceof m?_.forEach(function(k,te){this.append(te,k)},this):Array.isArray(_)?_.forEach(function(k){this.append(k[0],k[1])},this):_&&Object.getOwnPropertyNames(_).forEach(function(k){this.append(k,_[k])},this)}m.prototype.append=function(_,k){_=d(_),k=p(k);var te=this.map[_];this.map[_]=te?te+", "+k:k},m.prototype.delete=function(_){delete this.map[d(_)]},m.prototype.get=function(_){return _=d(_),this.has(_)?this.map[_]:null},m.prototype.has=function(_){return this.map.hasOwnProperty(d(_))},m.prototype.set=function(_,k){this.map[d(_)]=p(k)},m.prototype.forEach=function(_,k){for(var te in this.map)this.map.hasOwnProperty(te)&&_.call(k,this.map[te],te,this)},m.prototype.keys=function(){var _=[];return this.forEach(function(k,te){_.push(te)}),g(_)},m.prototype.values=function(){var _=[];return this.forEach(function(k){_.push(k)}),g(_)},m.prototype.entries=function(){var _=[];return this.forEach(function(k,te){_.push([te,k])}),g(_)},a.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function b(_){if(_.bodyUsed)return Promise.reject(new TypeError("Already read"));_.bodyUsed=!0}function N(_){return new Promise(function(k,te){_.onload=function(){k(_.result)},_.onerror=function(){te(_.error)}})}function V(_){var k=new FileReader,te=N(k);return k.readAsArrayBuffer(_),te}function M(_){var k=new FileReader,te=N(k);return k.readAsText(_),te}function T(_){for(var k=new Uint8Array(_),te=new Array(k.length),ie=0;ie<k.length;ie++)te[ie]=String.fromCharCode(k[ie]);return te.join("")}function z(_){if(_.slice)return _.slice(0);var k=new Uint8Array(_.byteLength);return k.set(new Uint8Array(_)),k.buffer}function C(){return this.bodyUsed=!1,this._initBody=function(_){this._bodyInit=_,_?typeof _=="string"?this._bodyText=_:a.blob&&Blob.prototype.isPrototypeOf(_)?this._bodyBlob=_:a.formData&&FormData.prototype.isPrototypeOf(_)?this._bodyFormData=_:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(_)?this._bodyText=_.toString():a.arrayBuffer&&a.blob&&c(_)?(this._bodyArrayBuffer=z(_.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(_)||u(_))?this._bodyArrayBuffer=z(_):this._bodyText=_=Object.prototype.toString.call(_):this._bodyText="",this.headers.get("content-type")||(typeof _=="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(_)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var _=b(this);if(_)return _;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?b(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(V)}),this.text=function(){var _=b(this);if(_)return _;if(this._bodyBlob)return M(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(T(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(G)}),this.json=function(){return this.text().then(JSON.parse)},this}var H=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(_){var k=_.toUpperCase();return H.indexOf(k)>-1?k:_}function de(_,k){k=k||{};var te=k.body;if(_ instanceof de){if(_.bodyUsed)throw new TypeError("Already read");this.url=_.url,this.credentials=_.credentials,k.headers||(this.headers=new m(_.headers)),this.method=_.method,this.mode=_.mode,this.signal=_.signal,!te&&_._bodyInit!=null&&(te=_._bodyInit,_.bodyUsed=!0)}else this.url=String(_);if(this.credentials=k.credentials||this.credentials||"same-origin",(k.headers||!this.headers)&&(this.headers=new m(k.headers)),this.method=w(k.method||this.method||"GET"),this.mode=k.mode||this.mode||null,this.signal=k.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&te)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(te)}de.prototype.clone=function(){return new de(this,{body:this._bodyInit})};function G(_){var k=new FormData;return _.trim().split("&").forEach(function(te){if(te){var ie=te.split("="),ne=ie.shift().replace(/\+/g," "),le=ie.join("=").replace(/\+/g," ");k.append(decodeURIComponent(ne),decodeURIComponent(le))}}),k}function I(_){var k=new m,te=_.replace(/\r?\n[\t ]+/g," ");return te.split(/\r?\n/).forEach(function(ie){var ne=ie.split(":"),le=ne.shift().trim();if(le){var xe=ne.join(":").trim();k.append(le,xe)}}),k}C.call(de.prototype);function x(_,k){k||(k={}),this.type="default",this.status=k.status===void 0?200:k.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in k?k.statusText:"OK",this.headers=new m(k.headers),this.url=k.url||"",this._initBody(_)}C.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},x.error=function(){var _=new x(null,{status:0,statusText:""});return _.type="error",_};var D=[301,302,303,307,308];x.redirect=function(_,k){if(D.indexOf(k)===-1)throw new RangeError("Invalid status code");return new x(null,{status:k,headers:{location:_}})},i.DOMException=s.DOMException;try{new i.DOMException}catch{i.DOMException=function(k,te){this.message=k,this.name=te;var ie=Error(k);this.stack=ie.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function re(_,k){return new Promise(function(te,ie){var ne=new de(_,k);if(ne.signal&&ne.signal.aborted)return ie(new i.DOMException("Aborted","AbortError"));var le=new XMLHttpRequest;function xe(){le.abort()}le.onload=function(){var Ie={status:le.status,statusText:le.statusText,headers:I(le.getAllResponseHeaders()||"")};Ie.url="responseURL"in le?le.responseURL:Ie.headers.get("X-Request-URL");var tt="response"in le?le.response:le.responseText;te(new x(tt,Ie))},le.onerror=function(){ie(new TypeError("Network request failed"))},le.ontimeout=function(){ie(new TypeError("Network request failed"))},le.onabort=function(){ie(new i.DOMException("Aborted","AbortError"))},le.open(ne.method,ne.url,!0),ne.credentials==="include"?le.withCredentials=!0:ne.credentials==="omit"&&(le.withCredentials=!1),"responseType"in le&&a.blob&&(le.responseType="blob"),ne.headers.forEach(function(Ie,tt){le.setRequestHeader(tt,Ie)}),ne.signal&&(ne.signal.addEventListener("abort",xe),le.onreadystatechange=function(){le.readyState===4&&ne.signal.removeEventListener("abort",xe)}),le.send(typeof ne._bodyInit>"u"?null:ne._bodyInit)})}return re.polyfill=!0,s.fetch||(s.fetch=re,s.Headers=m,s.Request=de,s.Response=x),i.Headers=m,i.Request=de,i.Response=x,i.fetch=re,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})(ni,ni.exports);var Rf=ni.exports;const Wo=Vf(Rf);var bn=y.record(y.number()),jf=y.object({type:y.literal("PercentageOffDiscount"),name:y.string(),description:y.string().optional(),percentage:y.number(),total:bn}),Lf=y.object({type:y.literal("FlatAmountOffDiscount"),name:y.string(),description:y.string().optional(),total:bn}),Mf=y.discriminatedUnion("type",[jf,Lf]),Er=y.object({id:y.string(),name:y.string(),originalPrice:bn,price:bn,hasDiscount:y.boolean(),discount:Mf.optional()});function Gr(e){return y.object({items:y.array(e),hasMore:y.boolean(),next:y.string().nullable()})}function el(e){return y.object({value:e,quantity:y.number()})}var Or=(e=>(e.Universal="Universal",e.Windows="Windows",e.Linux="Linux",e.Mac="Mac",e))(Or||{}),tl=y.object({name:y.string(),key:y.string(),platform:y.nativeEnum(Or),size:y.number(),path:y.string().nullable()}),nl=y.object({id:y.string(),name:y.string(),tagline:y.string(),website:y.string().optional(),iconUrl:y.string().optional(),numberOfLicenses:y.number().optional(),numberOfTrials:y.number().optional(),currentActivations:y.number().optional(),maxActivations:y.number().optional(),currentVersion:y.string().nullable(),downloadsNeedsUser:y.boolean(),downloadsNeedsOwnership:y.boolean(),downloads:y.array(tl).optional()}),Jr=y.object({id:y.string(),name:y.string(),tagline:y.string(),iconUrl:y.string().nullable(),website:y.string().nullish(),owned:y.boolean(),currentVersion:y.string().optional(),downloads:tl.array().optional(),defaultVariation:Er.optional(),variations:Er.array().optional(),type:y.void().transform(()=>"product").pipe(y.literal("product"))}),ri=y.object({id:y.string(),name:y.string(),tagline:y.string(),iconUrl:y.string().nullable(),owned:y.boolean(),partial:y.boolean(),products:Jr.and(y.object({included:y.boolean().optional()})).array(),defaultVariation:Er.optional(),variations:Er.array().optional(),type:y.void().transform(()=>"bundle").pipe(y.literal("bundle"))}),Uf=y.object({suggestedCurrency:y.string(),products:Jr.array(),bundles:ri.array()}),Mt=(e=>(e.Requested="Requested",e.Fulfilled="Fulfilled",e.Completed="Completed",e.Cancelled="Cancelled",e))(Mt||{}),zo=y.object({id:y.string(),status:y.nativeEnum(Mt),product:Jr,trialEligibility:y.object({eligible:y.boolean(),existing:y.boolean(),requiresAccount:y.boolean(),numberOfDaysPerProduct:y.number(),numberOfDaysRemaining:y.number()}).optional(),licenseEligibility:y.object({eligible:y.boolean()}).optional()}),Ff=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/activations/${e}`);return zo.parse(t.data)}async isCompleted(e){const t=await this.api.fetch(`/api/customer/activations/${e}/completed`);return y.boolean().parse(t.data)}async fulfillLicense(e){const t=await this.api.authenticatedFetch(`/api/customer/activations/${e}/license`,"POST");return zo.parse(t.data)}async fulfillTrial(e){const t=await this.api.fetch(`/api/customer/activations/${e}/trial`,"POST");return zo.parse(t.data)}async cancel(e){const t=await this.api.fetch(`/api/customer/activations/${e}/cancel`,"POST");return zo.parse(t.data)}},Bf=class extends Error{constructor(){super(),this.name="NotAuthorizedError"}},oi=class extends Error{constructor(){super(),this.name="NotAuthenticatedError"}},rl=class extends Error{constructor(){super(),this.name="NotFoundError"}},Hf=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}},Zf=y.object({type:y.string(),title:y.string(),detail:y.string().optional(),status:y.number(),errors:y.record(y.string(),y.string().array()).optional()});function qf(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 si(e){if(e.status===404)throw new rl;if(e.status===401)throw new oi;if(e.status===403)throw new Bf;let t;try{const n=await e.json();t=Zf.parse(n)}catch{throw new Error("An unknown problem occurred")}throw new Hf(t.title,t.detail,t.status,t.errors?Object.fromEntries(Object.entries(t.errors).map(([n,r])=>[qf(n),r.join(", ")])):void 0)}var Wf=y.object({countryCode:y.string(),streetAddress1:y.string(),streetAddress2:y.string().nullable(),locality:y.string().nullable(),region:y.string().nullable(),postCode:y.string()}),zf=y.object({newsletterOptIn:y.boolean()}),ol=y.object({id:y.string(),email:y.string(),name:y.string(),tenantId:y.string(),address:Wf.optional(),communicationPreferences:zf,ownedProducts:y.string().array().optional()}),ii=ol.and(y.object({accessToken:y.string(),refreshToken:y.string()})),Kf=y.object({id:y.string(),name:y.string(),email:y.string(),resetPasswordToken:y.string().nullable()}),Gf=class{constructor(e,t){this.api=e,this.tokenStore=t}async get(){const e=await this.api.authenticatedFetch("/api/customer/meta/user");return ol.parse(e.data)}async signIn(e,t){const n=await Wo(`${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 si(n);const r=await n.json(),o=ii.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}),c=ii.parse(a.data);return this.tokenStore.setUser(c),c}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 Wo(`${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 si(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 Kf.parse(n.data)}async confirmEmail(e,t){await this.api.fetch(`/customer/identity/confirm-email?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}async confirmEmailChange(e,t){await this.api.authenticatedFetch(`/customer/identity/confirm-email-change?email=${encodeURIComponent(e)}&code=${encodeURIComponent(t.replaceAll(" ","+"))}`,"POST")}},Yr=(e=>(e.Open="Open",e.PaymentProcessing="PaymentProcessing",e.Completed="Completed",e.Failed="Failed",e))(Yr||{}),Jf=y.object({code:y.string(),name:y.string(),description:y.string()}),Yf=y.object({type:y.literal("PercentageOffDiscount"),name:y.string(),description:y.string().optional(),percentage:y.number(),total:bn.optional(),isExclusive:y.boolean()}),Xf=y.object({type:y.literal("FlatAmountOffDiscount"),name:y.string(),description:y.string().optional(),total:bn.optional(),isExclusive:y.boolean()}),sl=y.discriminatedUnion("type",[Yf,Xf]),Qf=y.object({id:y.string(),type:y.literal("Product"),productId:y.string(),quantity:y.number(),variationId:y.string(),price:bn.optional(),variation:Er.optional(),product:Jr.optional(),appliedDiscount:sl.optional()}),ep=y.object({id:y.string(),type:y.literal("Bundle"),bundleId:y.string(),quantity:y.number(),variationId:y.string(),price:bn.optional(),variation:Er.optional(),bundle:ri.optional(),appliedDiscount:sl.optional()}),tp=y.discriminatedUnion("type",[Qf,ep]),il=y.object({id:y.string(),status:y.literal("Open"),currency:y.string(),items:tp.array(),couponsApplied:Jf.array(),checkoutUrl:y.string().optional()}),np=y.discriminatedUnion("status",[il]),rp=class{constructor(e){this.api=e}async get(e){const t=await this.api.fetch(`/api/customer/orders/${e}`);return np.parse(t.data)}async pushContent(e,t,n){const r={...al(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 il.parse(o.data)}};function al(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 op=class{constructor(e){this.api=e}async get(e){const t=new URLSearchParams(al(e)),n=await this.api.fetch(`/api/customer/storefront?${t.toString()}`);return Uf.parse(n.data)}},sp=class{constructor(e,t){this.baseUrl=e,this.tokenStore=t}async authenticatedFetch(e,t,n,r){if(!this.tokenStore.hasAccessToken)throw new oi;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 Wo(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 si(s),{data:(Number(s.headers.get("Content-Length"))||0)>0?await s.json():null,headers:s.headers,status:s.status}}},ll=class Ao{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(Ao.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(Ao.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(Ao.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 Wo(`${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 Error(`Could not refresh access token, status code ${t.status}`)}const n=ii.parse(await t.json());return this.setUser(n)}handleStorageUpdate(t){switch(t.key){case Ao.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}}};ll.storageKey="moonbase_auth";var ip=ll,cl=y.object({id:y.string(),name:y.string(),description:y.string(),code:y.string(),redeemed:y.boolean(),redeemsProducts:el(Jr).array(),redeemsBundles:el(ri).array()}),ap=class{constructor(e){this.api=e}async peek(e){const t=await this.api.fetch(`/api/customer/vouchers?code=${encodeURIComponent(e)}`);return cl.parse(t.data)}async redeem(e){const t=await this.api.authenticatedFetch(`/api/customer/vouchers/redeem?code=${encodeURIComponent(e)}`,"POST");return cl.parse(t.data)}},ul=(e=>(e.Active="Active",e.Revoked="Revoked",e))(ul||{}),dl=(e=>(e.Active="Active",e.Revoked="Revoked",e))(dl||{}),ai=(e=>(e.Online="Online",e.Offline="Offline",e))(ai||{}),li=y.object({id:y.string(),status:y.nativeEnum(ul),product:nl,activeNumberOfActivations:y.number(),maxNumberOfActivations:y.number(),createdAt:y.coerce.date()}),fl=y.object({id:y.string(),licenseId:y.string(),name:y.string(),status:y.nativeEnum(dl),activationMethod:y.nativeEnum(ai),lastValidatedAt:y.coerce.date().nullable()}),lp=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:li.parse(n.data),url:y.string().parse(n.headers.get("location"))}}},cp=class{constructor(e){this.api=e}async get(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/licenses");return Gr(li).parse(t.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/licenses/${e}/activations`);return Gr(fl).parse(n.data)}async revokeActivation(e,t){await this.api.authenticatedFetch(`/api/customer/inventory/licenses/${e}/activations/${t}/revoke`,"POST")}},up=class{constructor(e){this.api=e}async getOwned(e){const t=await this.api.authenticatedFetch(e||"/api/customer/inventory/products");return Gr(nl).parse(t.data)}async getLicenses(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses`);return Gr(li).parse(n.data)}async getActivations(e,t){const n=await this.api.authenticatedFetch(t||`/api/customer/inventory/products/${e}/licenses/activations`);return Gr(fl).parse(n.data)}async getDownloadUrl(e){const t=new URL(e);t.searchParams.append("redirect","false");const n=await this.api.authenticatedFetch(t.pathname+t.search);return y.object({location:y.string()}).parse(n.data).location}},dp=class{constructor(e){this.licenses=new cp(e),this.products=new up(e),this.activation=new lp(e)}},fp=class{constructor(e){this.configuration=e,this.configuration.endpoint=this.configuration.endpoint.replace(/\/$/,""),this.tokenStore=new ip(e);const t=new sp(this.configuration.endpoint,this.tokenStore);this.storefront=new op(t),this.identity=new Gf(t,this.tokenStore),this.vouchers=new ap(t),this.orders=new rp(t),this.inventory=new dp(t),this.activationRequests=new Ff(t)}},pl={};/**
|
|
3
|
+
* @vue/shared v3.4.38
|
|
4
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5
|
+
* @license MIT
|
|
6
|
+
**//*! #__NO_SIDE_EFFECTS__ */function Yt(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const De=pl.NODE_ENV!=="production"?Object.freeze({}):{},Nr=pl.NODE_ENV!=="production"?Object.freeze([]):[],Ze=()=>{},pp=()=>!1,Xr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ko=e=>e.startsWith("onUpdate:"),Be=Object.assign,ci=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},hp=Object.prototype.hasOwnProperty,Oe=(e,t)=>hp.call(e,t),se=Array.isArray,Wn=e=>Go(e)==="[object Map]",hl=e=>Go(e)==="[object Set]",fe=e=>typeof e=="function",Re=e=>typeof e=="string",wn=e=>typeof e=="symbol",Te=e=>e!==null&&typeof e=="object",ui=e=>(Te(e)||fe(e))&&fe(e.then)&&fe(e.catch),ml=Object.prototype.toString,Go=e=>ml.call(e),di=e=>Go(e).slice(8,-1),vl=e=>Go(e)==="[object Object]",fi=e=>Re(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Qr=Yt(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),mp=Yt("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Jo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},vp=/-(\w)/g,wt=Jo(e=>e.replace(vp,(t,n)=>n?n.toUpperCase():"")),gp=/\B([A-Z])/g,Xt=Jo(e=>e.replace(gp,"-$1").toLowerCase()),zn=Jo(e=>e.charAt(0).toUpperCase()+e.slice(1)),Kn=Jo(e=>e?`on${zn(e)}`:""),En=(e,t)=>!Object.is(e,t),eo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Yo=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},yp=e=>{const t=parseFloat(e);return isNaN(t)?e:t},_p=e=>{const t=Re(e)?Number(e):NaN;return isNaN(t)?e:t};let gl;const pi=()=>gl||(gl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function hi(e){if(se(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Re(r)?Op(r):hi(r);if(o)for(const s in o)t[s]=o[s]}return t}else if(Re(e)||Te(e))return e}const bp=/;(?![^(]*\))/g,wp=/:([^]+)/,Ep=/\/\*[^]*?\*\//g;function Op(e){const t={};return e.replace(Ep,"").split(bp).forEach(n=>{if(n){const r=n.split(wp);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Xo(e){let t="";if(Re(e))t=e;else if(se(e))for(let n=0;n<e.length;n++){const r=Xo(e[n]);r&&(t+=r+" ")}else if(Te(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Np="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",Sp="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",xp="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",Tp=Yt(Np),Cp=Yt(Sp),kp=Yt(xp),Pp=Yt("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function yl(e){return!!e||e===""}const _l=e=>!!(e&&e.__v_isRef===!0),ue=e=>Re(e)?e:e==null?"":se(e)||Te(e)&&(e.toString===ml||!fe(e.toString))?_l(e)?ue(e.value):JSON.stringify(e,bl,2):String(e),bl=(e,t)=>_l(t)?bl(e,t.value):Wn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[mi(r,s)+" =>"]=o,n),{})}:hl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>mi(n))}:wn(t)?mi(t):Te(t)&&!se(t)&&!vl(t)?String(t):t,mi=(e,t="")=>{var n;return wn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var qe={};function Ut(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let Et;class wl{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Et,!t&&Et&&(this.index=(Et.scopes||(Et.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Et;try{return Et=this,t()}finally{Et=n}}else qe.NODE_ENV!=="production"&&Ut("cannot run an inactive effect scope.")}on(){Et=this}off(){Et=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 El(e){return new wl(e)}function Ip(e,t=Et){t&&t.active&&t.effects.push(e)}function Ol(){return Et}function $p(e){Et?Et.cleanups.push(e):qe.NODE_ENV!=="production"&&Ut("onScopeDispose() is called when there is no active effect scope to be associated with.")}let Gn;class vi{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,Ip(this,o)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,Qt();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(Dp(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),en()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=On,n=Gn;try{return On=!0,Gn=this,this._runnings++,Nl(this),this.fn()}finally{Sl(this),this._runnings--,Gn=n,On=t}}stop(){this.active&&(Nl(this),Sl(this),this.onStop&&this.onStop(),this.active=!1)}}function Dp(e){return e.value}function Nl(e){e._trackId++,e._depsLength=0}function Sl(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)xl(e.deps[t],e);e.deps.length=e._depsLength}}function xl(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let On=!0,gi=0;const Tl=[];function Qt(){Tl.push(On),On=!1}function en(){const e=Tl.pop();On=e===void 0?!0:e}function yi(){gi++}function _i(){for(gi--;!gi&&bi.length;)bi.shift()()}function Cl(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&&xl(o,e),e.deps[e._depsLength++]=t):e._depsLength++,qe.NODE_ENV!=="production"&&((r=e.onTrack)==null||r.call(e,Be({effect:e},n)))}}const bi=[];function kl(e,t,n){var r;yi();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))&&(qe.NODE_ENV!=="production"&&((r=o.onTrigger)==null||r.call(o,Be({effect:o},n))),o.trigger(),(!o._runnings||o.allowRecurse)&&o._dirtyLevel!==2&&(o._shouldSchedule=!1,o.scheduler&&bi.push(o.scheduler)))}_i()}const Pl=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Qo=new WeakMap,Jn=Symbol(qe.NODE_ENV!=="production"?"iterate":""),wi=Symbol(qe.NODE_ENV!=="production"?"Map key iterate":"");function rt(e,t,n){if(On&&Gn){let r=Qo.get(e);r||Qo.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=Pl(()=>r.delete(n))),Cl(Gn,o,qe.NODE_ENV!=="production"?{target:e,type:t,key:n}:void 0)}}function Ft(e,t,n,r,o,s){const i=Qo.get(e);if(!i)return;let a=[];if(t==="clear")a=[...i.values()];else if(n==="length"&&se(e)){const c=Number(r);i.forEach((l,u)=>{(u==="length"||!wn(u)&&u>=c)&&a.push(l)})}else switch(n!==void 0&&a.push(i.get(n)),t){case"add":se(e)?fi(n)&&a.push(i.get("length")):(a.push(i.get(Jn)),Wn(e)&&a.push(i.get(wi)));break;case"delete":se(e)||(a.push(i.get(Jn)),Wn(e)&&a.push(i.get(wi)));break;case"set":Wn(e)&&a.push(i.get(Jn));break}yi();for(const c of a)c&&kl(c,4,qe.NODE_ENV!=="production"?{target:e,type:t,key:n,newValue:r,oldValue:o,oldTarget:s}:void 0);_i()}function Ap(e,t){const n=Qo.get(e);return n&&n.get(t)}const Vp=Yt("__proto__,__v_isRef,__isVue"),Il=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(wn)),$l=Rp();function Rp(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=he(this);for(let s=0,i=this.length;s<i;s++)rt(r,"get",s+"");const o=r[t](...n);return o===-1||o===!1?r[t](...n.map(he)):o}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Qt(),yi();const r=he(this)[t].apply(this,n);return _i(),en(),r}}),e}function jp(e){wn(e)||(e=String(e));const t=he(this);return rt(t,"has",e),t.hasOwnProperty(e)}class Dl{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?Zl:Hl:s?Bl:Fl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=se(t);if(!o){if(i&&Oe($l,n))return Reflect.get($l,n,r);if(n==="hasOwnProperty")return jp}const a=Reflect.get(t,n,r);return(wn(n)?Il.has(n):Vp(n))||(o||rt(t,"get",n),s)?a:Ue(a)?i&&fi(n)?a:a.value:Te(a)?o?ql(a):to(a):a}}class Al extends Dl{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const c=nn(s);if(!rn(r)&&!nn(r)&&(s=he(s),r=he(r)),!se(t)&&Ue(s)&&!Ue(r))return c?!1:(s.value=r,!0)}const i=se(t)&&fi(n)?Number(n)<t.length:Oe(t,n),a=Reflect.set(t,n,r,o);return t===he(o)&&(i?En(r,s)&&Ft(t,"set",n,r,s):Ft(t,"add",n,r)),a}deleteProperty(t,n){const r=Oe(t,n),o=t[n],s=Reflect.deleteProperty(t,n);return s&&r&&Ft(t,"delete",n,void 0,o),s}has(t,n){const r=Reflect.has(t,n);return(!wn(n)||!Il.has(n))&&rt(t,"has",n),r}ownKeys(t){return rt(t,"iterate",se(t)?"length":Jn),Reflect.ownKeys(t)}}class Vl extends Dl{constructor(t=!1){super(!0,t)}set(t,n){return qe.NODE_ENV!=="production"&&Ut(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return qe.NODE_ENV!=="production"&&Ut(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Lp=new Al,Mp=new Vl,Up=new Al(!0),Fp=new Vl(!0),Ei=e=>e,es=e=>Reflect.getPrototypeOf(e);function ts(e,t,n=!1,r=!1){e=e.__v_raw;const o=he(e),s=he(t);n||(En(t,s)&&rt(o,"get",t),rt(o,"get",s));const{has:i}=es(o),a=r?Ei:n?Oi:no;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 ns(e,t=!1){const n=this.__v_raw,r=he(n),o=he(e);return t||(En(e,o)&&rt(r,"has",e),rt(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function rs(e,t=!1){return e=e.__v_raw,!t&&rt(he(e),"iterate",Jn),Reflect.get(e,"size",e)}function Rl(e,t=!1){!t&&!rn(e)&&!nn(e)&&(e=he(e));const n=he(this);return es(n).has.call(n,e)||(n.add(e),Ft(n,"add",e,e)),this}function jl(e,t,n=!1){!n&&!rn(t)&&!nn(t)&&(t=he(t));const r=he(this),{has:o,get:s}=es(r);let i=o.call(r,e);i?qe.NODE_ENV!=="production"&&Ul(r,o,e):(e=he(e),i=o.call(r,e));const a=s.call(r,e);return r.set(e,t),i?En(t,a)&&Ft(r,"set",e,t,a):Ft(r,"add",e,t),this}function Ll(e){const t=he(this),{has:n,get:r}=es(t);let o=n.call(t,e);o?qe.NODE_ENV!=="production"&&Ul(t,n,e):(e=he(e),o=n.call(t,e));const s=r?r.call(t,e):void 0,i=t.delete(e);return o&&Ft(t,"delete",e,void 0,s),i}function Ml(){const e=he(this),t=e.size!==0,n=qe.NODE_ENV!=="production"?Wn(e)?new Map(e):new Set(e):void 0,r=e.clear();return t&&Ft(e,"clear",void 0,void 0,n),r}function os(e,t){return function(r,o){const s=this,i=s.__v_raw,a=he(i),c=t?Ei:e?Oi:no;return!e&&rt(a,"iterate",Jn),i.forEach((l,u)=>r.call(o,c(l),c(u),s))}}function ss(e,t,n){return function(...r){const o=this.__v_raw,s=he(o),i=Wn(s),a=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,l=o[e](...r),u=n?Ei:t?Oi:no;return!t&&rt(s,"iterate",c?wi:Jn),{next(){const{value:d,done:p}=l.next();return p?{value:d,done:p}:{value:a?[u(d[0]),u(d[1])]:u(d),done:p}},[Symbol.iterator](){return this}}}}function Nn(e){return function(...t){if(qe.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";Ut(`${zn(e)} operation ${n}failed: target is readonly.`,he(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Bp(){const e={get(s){return ts(this,s)},get size(){return rs(this)},has:ns,add:Rl,set:jl,delete:Ll,clear:Ml,forEach:os(!1,!1)},t={get(s){return ts(this,s,!1,!0)},get size(){return rs(this)},has:ns,add(s){return Rl.call(this,s,!0)},set(s,i){return jl.call(this,s,i,!0)},delete:Ll,clear:Ml,forEach:os(!1,!0)},n={get(s){return ts(this,s,!0)},get size(){return rs(this,!0)},has(s){return ns.call(this,s,!0)},add:Nn("add"),set:Nn("set"),delete:Nn("delete"),clear:Nn("clear"),forEach:os(!0,!1)},r={get(s){return ts(this,s,!0,!0)},get size(){return rs(this,!0)},has(s){return ns.call(this,s,!0)},add:Nn("add"),set:Nn("set"),delete:Nn("delete"),clear:Nn("clear"),forEach:os(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=ss(s,!1,!1),n[s]=ss(s,!0,!1),t[s]=ss(s,!1,!0),r[s]=ss(s,!0,!0)}),[e,n,t,r]}const[Hp,Zp,qp,Wp]=Bp();function is(e,t){const n=t?e?Wp:qp:e?Zp:Hp;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Oe(n,o)&&o in r?n:r,o,s)}const zp={get:is(!1,!1)},Kp={get:is(!1,!0)},Gp={get:is(!0,!1)},Jp={get:is(!0,!0)};function Ul(e,t,n){const r=he(n);if(r!==n&&t.call(e,r)){const o=di(e);Ut(`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 Fl=new WeakMap,Bl=new WeakMap,Hl=new WeakMap,Zl=new WeakMap;function Yp(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Xp(e){return e.__v_skip||!Object.isExtensible(e)?0:Yp(di(e))}function to(e){return nn(e)?e:as(e,!1,Lp,zp,Fl)}function Qp(e){return as(e,!1,Up,Kp,Bl)}function ql(e){return as(e,!0,Mp,Gp,Hl)}function Bt(e){return as(e,!0,Fp,Jp,Zl)}function as(e,t,n,r,o){if(!Te(e))return qe.NODE_ENV!=="production"&&Ut(`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=Xp(e);if(i===0)return e;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function tn(e){return nn(e)?tn(e.__v_raw):!!(e&&e.__v_isReactive)}function nn(e){return!!(e&&e.__v_isReadonly)}function rn(e){return!!(e&&e.__v_isShallow)}function ls(e){return e?!!e.__v_raw:!1}function he(e){const t=e&&e.__v_raw;return t?he(t):e}function Sn(e){return Object.isExtensible(e)&&Yo(e,"__v_skip",!0),e}const no=e=>Te(e)?to(e):e,Oi=e=>Te(e)?ql(e):e,eh="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 Wl{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 vi(()=>t(this._value),()=>cs(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=he(this);return(!t._cacheable||t.effect.dirty)&&En(t._value,t._value=t.effect.run())&&cs(t,4),zl(t),t.effect._dirtyLevel>=2&&(qe.NODE_ENV!=="production"&&this._warnRecursive&&Ut(eh,`
|
|
7
|
+
|
|
8
|
+
getter: `,this.getter),cs(t,2)),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function th(e,t,n=!1){let r,o;const s=fe(e);s?(r=e,o=qe.NODE_ENV!=="production"?()=>{Ut("Write operation failed: computed value is readonly")}:Ze):(r=e.get,o=e.set);const i=new Wl(r,o,s||!o,n);return qe.NODE_ENV!=="production"&&t&&!n&&(i.effect.onTrack=t.onTrack,i.effect.onTrigger=t.onTrigger),i}function zl(e){var t;On&&Gn&&(e=he(e),Cl(Gn,(t=e.dep)!=null?t:e.dep=Pl(()=>e.dep=void 0,e instanceof Wl?e:void 0),qe.NODE_ENV!=="production"?{target:e,type:"get",key:"value"}:void 0))}function cs(e,t=4,n,r){e=he(e);const o=e.dep;o&&kl(o,t,qe.NODE_ENV!=="production"?{target:e,type:"set",key:"value",newValue:n,oldValue:r}:void 0)}function Ue(e){return!!(e&&e.__v_isRef===!0)}function B(e){return Kl(e,!1)}function nh(e){return Kl(e,!0)}function Kl(e,t){return Ue(e)?e:new rh(e,t)}class rh{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:he(t),this._value=n?t:no(t)}get value(){return zl(this),this._value}set value(t){const n=this.__v_isShallow||rn(t)||nn(t);if(t=n?t:he(t),En(t,this._rawValue)){const r=this._rawValue;this._rawValue=t,this._value=n?t:no(t),cs(this,4,t,r)}}}function O(e){return Ue(e)?e.value:e}function oh(e){return fe(e)?e():O(e)}const sh={get:(e,t,n)=>O(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Ue(o)&&!Ue(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Gl(e){return tn(e)?e:new Proxy(e,sh)}function Jl(e){qe.NODE_ENV!=="production"&&!ls(e)&&Ut("toRefs() expects a reactive object but received a plain one.");const t=se(e)?new Array(e.length):{};for(const n in e)t[n]=Yl(e,n);return t}class ih{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Ap(he(this._object),this._key)}}class ah{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Ni(e,t,n){return Ue(e)?e:fe(e)?new ah(e):Te(e)&&arguments.length>1?Yl(e,t,n):B(e)}function Yl(e,t,n){const r=e[t];return Ue(r)?r:new ih(e,t,n)}var v={};const Yn=[];function us(e){Yn.push(e)}function ds(){Yn.pop()}let Si=!1;function L(e,...t){if(Si)return;Si=!0,Qt();const n=Yn.length?Yn[Yn.length-1].component:null,r=n&&n.appContext.config.warnHandler,o=lh();if(r)on(r,n,11,[e+t.map(s=>{var i,a;return(a=(i=s.toString)==null?void 0:i.call(s))!=null?a:JSON.stringify(s)}).join(""),n&&n.proxy,o.map(({vnode:s})=>`at <${Ps(n,s.type)}>`).join(`
|
|
9
|
+
`),o]);else{const s=[`[Vue warn]: ${e}`,...t];o.length&&s.push(`
|
|
10
|
+
`,...ch(o)),console.warn(...s)}en(),Si=!1}function lh(){let e=Yn[Yn.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function ch(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
|
|
11
|
+
`],...uh(n))}),t}function uh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,o=` at <${Ps(e.component,e.type,r)}`,s=">"+n;return e.props?[o,...dh(e.props),s]:[o+s]}function dh(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...Xl(r,e[r]))}),n.length>3&&t.push(" ..."),t}function Xl(e,t,n){return Re(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Ue(t)?(t=Xl(e,he(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):fe(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=he(t),n?t:[`${e}=`,t])}function fh(e,t){v.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?L(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&L(`${t} is NaN - the duration expression might be incorrect.`))}const xi={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 on(e,t,n,r){try{return r?e(...r):e()}catch(o){ro(o,t,n)}}function St(e,t,n,r){if(fe(e)){const o=on(e,t,n,r);return o&&ui(o)&&o.catch(s=>{ro(s,t,n)}),o}if(se(e)){const o=[];for(let s=0;s<e.length;s++)o.push(St(e[s],t,n,r));return o}else v.NODE_ENV!=="production"&&L(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function ro(e,t,n,r=!0){const o=t?t.vnode:null;if(t){let s=t.parent;const i=t.proxy,a=v.NODE_ENV!=="production"?xi[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){const l=s.ec;if(l){for(let u=0;u<l.length;u++)if(l[u](e,i,a)===!1)return}s=s.parent}const c=t.appContext.config.errorHandler;if(c){Qt(),on(c,null,10,[e,i,a]),en();return}}ph(e,n,o,r)}function ph(e,t,n,r=!0){if(v.NODE_ENV!=="production"){const o=xi[t];if(n&&us(n),L(`Unhandled error${o?` during execution of ${o}`:""}`),n&&ds(),r)throw e;console.error(e)}else console.error(e)}let oo=!1,Ti=!1;const ut=[];let Ht=0;const Sr=[];let xn=null,Xn=0;const Ql=Promise.resolve();let Ci=null;const hh=100;function so(e){const t=Ci||Ql;return e?t.then(this?e.bind(this):e):t}function mh(e){let t=Ht+1,n=ut.length;for(;t<n;){const r=t+n>>>1,o=ut[r],s=io(o);s<e||s===e&&o.pre?t=r+1:n=r}return t}function fs(e){(!ut.length||!ut.includes(e,oo&&e.allowRecurse?Ht+1:Ht))&&(e.id==null?ut.push(e):ut.splice(mh(e.id),0,e),ec())}function ec(){!oo&&!Ti&&(Ti=!0,Ci=Ql.then(oc))}function vh(e){const t=ut.indexOf(e);t>Ht&&ut.splice(t,1)}function tc(e){se(e)?Sr.push(...e):(!xn||!xn.includes(e,e.allowRecurse?Xn+1:Xn))&&Sr.push(e),ec()}function nc(e,t,n=oo?Ht+1:0){for(v.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||v.NODE_ENV!=="production"&&ki(t,r))continue;ut.splice(n,1),n--,r()}}}function rc(e){if(Sr.length){const t=[...new Set(Sr)].sort((n,r)=>io(n)-io(r));if(Sr.length=0,xn){xn.push(...t);return}for(xn=t,v.NODE_ENV!=="production"&&(e=e||new Map),Xn=0;Xn<xn.length;Xn++){const n=xn[Xn];v.NODE_ENV!=="production"&&ki(e,n)||n.active!==!1&&n()}xn=null,Xn=0}}const io=e=>e.id==null?1/0:e.id,gh=(e,t)=>{const n=io(e)-io(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function oc(e){Ti=!1,oo=!0,v.NODE_ENV!=="production"&&(e=e||new Map),ut.sort(gh);const t=v.NODE_ENV!=="production"?n=>ki(e,n):Ze;try{for(Ht=0;Ht<ut.length;Ht++){const n=ut[Ht];if(n&&n.active!==!1){if(v.NODE_ENV!=="production"&&t(n))continue;on(n,n.i,n.i?15:14)}}}finally{Ht=0,ut.length=0,rc(e),oo=!1,Ci=null,(ut.length||Sr.length)&&oc(e)}}function ki(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>hh){const r=t.i,o=r&&sa(r.type);return ro(`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 Tn=!1;const ps=new Map;v.NODE_ENV!=="production"&&(pi().__VUE_HMR_RUNTIME__={createRecord:Pi(sc),rerender:Pi(bh),reload:Pi(wh)});const Qn=new Map;function yh(e){const t=e.type.__hmrId;let n=Qn.get(t);n||(sc(t,e.type),n=Qn.get(t)),n.instances.add(e)}function _h(e){Qn.get(e.type.__hmrId).instances.delete(e)}function sc(e,t){return Qn.has(e)?!1:(Qn.set(e,{initialDef:hs(t),instances:new Set}),!0)}function hs(e){return lu(e)?e.__vccOpts:e}function bh(e,t){const n=Qn.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(r=>{t&&(r.render=t,hs(r.type).render=t),r.renderCache=[],Tn=!0,r.effect.dirty=!0,r.update(),Tn=!1}))}function wh(e,t){const n=Qn.get(e);if(!n)return;t=hs(t),ic(n.initialDef,t);const r=[...n.instances];for(let o=0;o<r.length;o++){const s=r[o],i=hs(s.type);let a=ps.get(i);a||(i!==n.initialDef&&ic(i,t),ps.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,fs(()=>{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.")}tc(()=>{ps.clear()})}function ic(e,t){Be(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Pi(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 Zt,ao=[],Ii=!1;function lo(e,...t){Zt?Zt.emit(e,...t):Ii||ao.push({event:e,args:t})}function ac(e,t){var n,r;Zt=e,Zt?(Zt.enabled=!0,ao.forEach(({event:o,args:s})=>Zt.emit(o,...s)),ao=[]):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=>{ac(s,t)}),setTimeout(()=>{Zt||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ii=!0,ao=[])},3e3)):(Ii=!0,ao=[])}function Eh(e,t){lo("app:init",e,t,{Fragment:Pe,Text:mo,Comment:We,Static:vo})}function Oh(e){lo("app:unmount",e)}const Nh=$i("component:added"),lc=$i("component:updated"),Sh=$i("component:removed"),xh=e=>{Zt&&typeof Zt.cleanupBuffer=="function"&&!Zt.cleanupBuffer(e)&&Sh(e)};/*! #__NO_SIDE_EFFECTS__ */function $i(e){return t=>{lo(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const Th=cc("perf:start"),Ch=cc("perf:end");function cc(e){return(t,n,r)=>{lo(e,t.appContext.app,t.uid,t,n,r)}}function kh(e,t,n){lo("component:emit",e.appContext.app,e,t,n)}let Je=null,ms=null;function vs(e){const t=Je;return Je=e,ms=e&&e.type.__scopeId||null,t}function Ph(e){ms=e}function Ih(){ms=null}function Ee(e,t=Je,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&Xc(-1);const s=vs(t);let i;try{i=e(...o)}finally{vs(s),r._d&&Xc(1)}return v.NODE_ENV!=="production"&&lc(t),i};return r._n=!0,r._c=!0,r._d=!0,r}function uc(e){mp(e)&&L("Do not use built-in directive ids as custom directive id: "+e)}function er(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 c=a.dir[r];c&&(Qt(),St(c,n,8,[e.el,a,e,t]),en())}}const Cn=Symbol("_leaveCb"),gs=Symbol("_enterCb");function $h(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return je(()=>{e.isMounted=!0}),Vi(()=>{e.isUnmounting=!0}),e}const xt=[Function,Array],dc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:xt,onEnter:xt,onAfterEnter:xt,onEnterCancelled:xt,onBeforeLeave:xt,onLeave:xt,onAfterLeave:xt,onLeaveCancelled:xt,onBeforeAppear:xt,onAppear:xt,onAfterAppear:xt,onAppearCancelled:xt},fc=e=>{const t=e.subTree;return t.component?fc(t.component):t},Dh={name:"BaseTransition",props:dc,setup(e,{slots:t}){const n=Ts(),r=$h();return()=>{const o=t.default&&mc(t.default(),!0);if(!o||!o.length)return;let s=o[0];if(o.length>1){let p=!1;for(const g of o)if(g.type!==We){if(v.NODE_ENV!=="production"&&p){L("<transition> can only be used on a single element or component. Use <transition-group> for lists.");break}if(s=g,p=!0,v.NODE_ENV==="production")break}}const i=he(e),{mode:a}=i;if(v.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&L(`invalid <transition> mode: ${a}`),r.isLeaving)return Ai(s);const c=hc(s);if(!c)return Ai(s);let l=Di(c,i,r,n,p=>l=p);ys(c,l);const u=n.subTree,d=u&&hc(u);if(d&&d.type!==We&&!ir(c,d)&&fc(n).type!==We){const p=Di(d,i,r,n);if(ys(d,p),a==="out-in"&&c.type!==We)return r.isLeaving=!0,p.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Ai(s);a==="in-out"&&c.type!==We&&(p.delayLeave=(g,m,b)=>{const N=pc(r,d);N[String(d.key)]=d,g[Cn]=()=>{m(),g[Cn]=void 0,delete l.delayedLeave},l.delayedLeave=b})}return s}}};function pc(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 Di(e,t,n,r,o){const{appear:s,mode:i,persisted:a=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:g,onAfterLeave:m,onLeaveCancelled:b,onBeforeAppear:N,onAppear:V,onAfterAppear:M,onAppearCancelled:T}=t,z=String(e.key),C=pc(n,e),H=(G,I)=>{G&&St(G,r,9,I)},w=(G,I)=>{const x=I[1];H(G,I),se(G)?G.every(D=>D.length<=1)&&x():G.length<=1&&x()},de={mode:i,persisted:a,beforeEnter(G){let I=c;if(!n.isMounted)if(s)I=N||c;else return;G[Cn]&&G[Cn](!0);const x=C[z];x&&ir(e,x)&&x.el[Cn]&&x.el[Cn](),H(I,[G])},enter(G){let I=l,x=u,D=d;if(!n.isMounted)if(s)I=V||l,x=M||u,D=T||d;else return;let re=!1;const _=G[gs]=k=>{re||(re=!0,k?H(D,[G]):H(x,[G]),de.delayedLeave&&de.delayedLeave(),G[gs]=void 0)};I?w(I,[G,_]):_()},leave(G,I){const x=String(e.key);if(G[gs]&&G[gs](!0),n.isUnmounting)return I();H(p,[G]);let D=!1;const re=G[Cn]=_=>{D||(D=!0,I(),_?H(b,[G]):H(m,[G]),G[Cn]=void 0,C[x]===e&&delete C[x])};C[x]=e,g?w(g,[G,re]):re()},clone(G){const I=Di(G,t,n,r,o);return o&&o(I),I}};return de}function Ai(e){if(uo(e))return e=Dt(e),e.children=null,e}function hc(e){if(!uo(e))return e;if(v.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&&fe(n.default))return n.default()}}function ys(e,t){e.shapeFlag&6&&e.component?ys(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 mc(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===Pe?(i.patchFlag&128&&o++,r=r.concat(mc(i.children,t,a))):(t||i.type!==We)&&r.push(a!=null?Dt(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 _e(e,t){return fe(e)?Be({name:e.name},t,{setup:e}):e}const co=e=>!!e.type.__asyncLoader,uo=e=>e.type.__isKeepAlive;function Ah(e,t){vc(e,"a",t)}function Vh(e,t){vc(e,"da",t)}function vc(e,t,n=ze){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(_s(t,r,n),n){let o=n.parent;for(;o&&o.parent;)uo(o.parent.vnode)&&Rh(r,t,n,o),o=o.parent}}function Rh(e,t,n,r){const o=_s(t,e,r,!0);mt(()=>{ci(r[t],o)},n)}function _s(e,t,n=ze,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{Qt();const a=_o(n),c=St(t,n,e,i);return a(),en(),c});return r?o.unshift(s):o.push(s),s}else if(v.NODE_ENV!=="production"){const o=Kn(xi[e].replace(/ hook$/,""));L(`${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 sn=e=>(t,n=ze)=>{(!ks||e==="sp")&&_s(e,(...r)=>t(...r),n)},jh=sn("bm"),je=sn("m"),Lh=sn("bu"),Mh=sn("u"),Vi=sn("bum"),mt=sn("um"),Uh=sn("sp"),Fh=sn("rtg"),Bh=sn("rtc");function Hh(e,t=ze){_s("ec",e,t)}const Zh="components",gc=Symbol.for("v-ndc");function yc(e){return Re(e)?qh(Zh,e,!1)||e:e||gc}function qh(e,t,n=!0,r=!1){const o=Je||ze;if(o){const s=o.type;{const a=sa(s,!1);if(a&&(a===t||a===wt(t)||a===zn(wt(t))))return s}const i=_c(o[e]||s[e],t)||_c(o.appContext[e],t);return!i&&r?s:(v.NODE_ENV!=="production"&&n&&!i&&L(`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 v.NODE_ENV!=="production"&&L(`resolve${zn(e.slice(0,-1))} can only be used in render() or setup().`)}function _c(e,t){return e&&(e[t]||e[wt(t)]||e[zn(wt(t))])}function xr(e,t,n,r){let o;const s=n;if(se(e)||Re(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"){v.NODE_ENV!=="production"&&!Number.isInteger(e)&&L(`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(Te(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,c=i.length;a<c;a++){const l=i[a];o[a]=t(e[l],l,a,s)}}else o=[];return o}function Ri(e,t,n={},r,o){if(Je.isCE||Je.parent&&co(Je.parent)&&Je.parent.isCE)return Q("slot",n,r);let s=e[t];v.NODE_ENV!=="production"&&s&&s.length>1&&(L("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),S();const i=s&&bc(s(n)),a=He(Pe,{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 bc(e){return e.some(t=>Tr(t)?!(t.type===We||t.type===Pe&&!bc(t.children)):!0)?e:null}const ji=e=>e?ou(e)?oa(e):ji(e.parent):null,tr=Be(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>v.NODE_ENV!=="production"?Bt(e.props):e.props,$attrs:e=>v.NODE_ENV!=="production"?Bt(e.attrs):e.attrs,$slots:e=>v.NODE_ENV!=="production"?Bt(e.slots):e.slots,$refs:e=>v.NODE_ENV!=="production"?Bt(e.refs):e.refs,$parent:e=>ji(e.parent),$root:e=>ji(e.root),$emit:e=>e.emit,$options:e=>Fi(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,fs(e.update)}),$nextTick:e=>e.n||(e.n=so.bind(e.proxy)),$watch:e=>Cm.bind(e)}),Li=e=>e==="_"||e==="$",Mi=(e,t)=>e!==De&&!e.__isScriptSetup&&Oe(e,t),wc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:i,type:a,appContext:c}=e;if(v.NODE_ENV!=="production"&&t==="__isVue")return!0;let l;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(Mi(r,t))return i[t]=1,r[t];if(o!==De&&Oe(o,t))return i[t]=2,o[t];if((l=e.propsOptions[0])&&Oe(l,t))return i[t]=3,s[t];if(n!==De&&Oe(n,t))return i[t]=4,n[t];Ui&&(i[t]=0)}}const u=tr[t];let d,p;if(u)return t==="$attrs"?(rt(e.attrs,"get",""),v.NODE_ENV!=="production"&&Ss()):v.NODE_ENV!=="production"&&t==="$slots"&&rt(e,"get",t),u(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==De&&Oe(n,t))return i[t]=4,n[t];if(p=c.config.globalProperties,Oe(p,t))return p[t];v.NODE_ENV!=="production"&&Je&&(!Re(t)||t.indexOf("__v")!==0)&&(o!==De&&Li(t[0])&&Oe(o,t)?L(`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===Je&&L(`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 Mi(o,t)?(o[t]=n,!0):v.NODE_ENV!=="production"&&o.__isScriptSetup&&Oe(o,t)?(L(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):r!==De&&Oe(r,t)?(r[t]=n,!0):Oe(e.props,t)?(v.NODE_ENV!=="production"&&L(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(v.NODE_ENV!=="production"&&L(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(v.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!==De&&Oe(e,i)||Mi(t,i)||(a=s[0])&&Oe(a,i)||Oe(r,i)||Oe(tr,i)||Oe(o.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Oe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};v.NODE_ENV!=="production"&&(wc.ownKeys=e=>(L("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 Wh(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(tr).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>tr[n](e),set:Ze})}),t}function zh(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:Ze})})}function Kh(e){const{ctx:t,setupState:n}=e;Object.keys(he(n)).forEach(r=>{if(!n.__isScriptSetup){if(Li(r[0])){L(`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:Ze})}})}function Ec(e){return se(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Gh(){const e=Object.create(null);return(t,n)=>{e[n]?L(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let Ui=!0;function Jh(e){const t=Fi(e),n=e.proxy,r=e.ctx;Ui=!1,t.beforeCreate&&Oc(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:i,watch:a,provide:c,inject:l,created:u,beforeMount:d,mounted:p,beforeUpdate:g,updated:m,activated:b,deactivated:N,beforeDestroy:V,beforeUnmount:M,destroyed:T,unmounted:z,render:C,renderTracked:H,renderTriggered:w,errorCaptured:de,serverPrefetch:G,expose:I,inheritAttrs:x,components:D,directives:re,filters:_}=t,k=v.NODE_ENV!=="production"?Gh():null;if(v.NODE_ENV!=="production"){const[ie]=e.propsOptions;if(ie)for(const ne in ie)k("Props",ne)}if(l&&Yh(l,r,k),i)for(const ie in i){const ne=i[ie];fe(ne)?(v.NODE_ENV!=="production"?Object.defineProperty(r,ie,{value:ne.bind(n),configurable:!0,enumerable:!0,writable:!0}):r[ie]=ne.bind(n),v.NODE_ENV!=="production"&&k("Methods",ie)):v.NODE_ENV!=="production"&&L(`Method "${ie}" has type "${typeof ne}" in the component definition. Did you reference the function correctly?`)}if(o){v.NODE_ENV!=="production"&&!fe(o)&&L("The data option must be a function. Plain object usage is no longer supported.");const ie=o.call(n,n);if(v.NODE_ENV!=="production"&&ui(ie)&&L("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Te(ie))v.NODE_ENV!=="production"&&L("data() should return an object.");else if(e.data=to(ie),v.NODE_ENV!=="production")for(const ne in ie)k("Data",ne),Li(ne[0])||Object.defineProperty(r,ne,{configurable:!0,enumerable:!0,get:()=>ie[ne],set:Ze})}if(Ui=!0,s)for(const ie in s){const ne=s[ie],le=fe(ne)?ne.bind(n,n):fe(ne.get)?ne.get.bind(n,n):Ze;v.NODE_ENV!=="production"&&le===Ze&&L(`Computed property "${ie}" has no getter.`);const xe=!fe(ne)&&fe(ne.set)?ne.set.bind(n):v.NODE_ENV!=="production"?()=>{L(`Write operation failed: computed property "${ie}" is readonly.`)}:Ze,Ie=Y({get:le,set:xe});Object.defineProperty(r,ie,{enumerable:!0,configurable:!0,get:()=>Ie.value,set:tt=>Ie.value=tt}),v.NODE_ENV!=="production"&&k("Computed",ie)}if(a)for(const ie in a)Nc(a[ie],r,n,ie);if(c){const ie=fe(c)?c.call(n):c;Reflect.ownKeys(ie).forEach(ne=>{dt(ne,ie[ne])})}u&&Oc(u,e,"c");function te(ie,ne){se(ne)?ne.forEach(le=>ie(le.bind(n))):ne&&ie(ne.bind(n))}if(te(jh,d),te(je,p),te(Lh,g),te(Mh,m),te(Ah,b),te(Vh,N),te(Hh,de),te(Bh,H),te(Fh,w),te(Vi,M),te(mt,z),te(Uh,G),se(I))if(I.length){const ie=e.exposed||(e.exposed={});I.forEach(ne=>{Object.defineProperty(ie,ne,{get:()=>n[ne],set:le=>n[ne]=le})})}else e.exposed||(e.exposed={});C&&e.render===Ze&&(e.render=C),x!=null&&(e.inheritAttrs=x),D&&(e.components=D),re&&(e.directives=re)}function Yh(e,t,n=Ze){se(e)&&(e=Bi(e));for(const r in e){const o=e[r];let s;Te(o)?"default"in o?s=Ce(o.from||r,o.default,!0):s=Ce(o.from||r):s=Ce(o),Ue(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[r]=s,v.NODE_ENV!=="production"&&n("Inject",r)}}function Oc(e,t,n){St(se(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Nc(e,t,n,r){const o=r.includes(".")?zc(n,r):()=>n[r];if(Re(e)){const s=t[e];fe(s)?Ye(o,s):v.NODE_ENV!=="production"&&L(`Invalid watch handler specified by key "${e}"`,s)}else if(fe(e))Ye(o,e.bind(n));else if(Te(e))if(se(e))e.forEach(s=>Nc(s,t,n,r));else{const s=fe(e.handler)?e.handler.bind(n):t[e.handler];fe(s)?Ye(o,s,e):v.NODE_ENV!=="production"&&L(`Invalid watch handler specified by key "${e.handler}"`,s)}else v.NODE_ENV!=="production"&&L(`Invalid watch option: "${r}"`,e)}function Fi(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,a=s.get(t);let c;return a?c=a:!o.length&&!n&&!r?c=t:(c={},o.length&&o.forEach(l=>bs(c,l,i,!0)),bs(c,t,i)),Te(t)&&s.set(t,c),c}function bs(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&bs(e,s,n,!0),o&&o.forEach(i=>bs(e,i,n,!0));for(const i in t)if(r&&i==="expose")v.NODE_ENV!=="production"&&L('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Xh[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const Xh={data:Sc,props:xc,emits:xc,methods:fo,computed:fo,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:fo,directives:fo,watch:em,provide:Sc,inject:Qh};function Sc(e,t){return t?e?function(){return Be(fe(e)?e.call(this,this):e,fe(t)?t.call(this,this):t)}:t:e}function Qh(e,t){return fo(Bi(e),Bi(t))}function Bi(e){if(se(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 fo(e,t){return e?Be(Object.create(null),e,t):t}function xc(e,t){return e?se(e)&&se(t)?[...new Set([...e,...t])]:Be(Object.create(null),Ec(e),Ec(t??{})):t}function em(e,t){if(!e)return t;if(!t)return e;const n=Be(Object.create(null),e);for(const r in t)n[r]=vt(e[r],t[r]);return n}function Tc(){return{app:null,config:{isNativeTag:pp,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 tm=0;function nm(e,t){return function(r,o=null){fe(r)||(r=Be({},r)),o!=null&&!Te(o)&&(v.NODE_ENV!=="production"&&L("root props passed to app.mount() must be an object."),o=null);const s=Tc(),i=new WeakSet;let a=!1;const c=s.app={_uid:tm++,_component:r,_props:o,_container:null,_context:s,_instance:null,version:cu,get config(){return s.config},set config(l){v.NODE_ENV!=="production"&&L("app.config cannot be replaced. Modify individual options instead.")},use(l,...u){return i.has(l)?v.NODE_ENV!=="production"&&L("Plugin has already been applied to target app."):l&&fe(l.install)?(i.add(l),l.install(c,...u)):fe(l)?(i.add(l),l(c,...u)):v.NODE_ENV!=="production"&&L('A plugin must either be a function or an object with an "install" function.'),c},mixin(l){return s.mixins.includes(l)?v.NODE_ENV!=="production"&&L("Mixin has already been applied to target app"+(l.name?`: ${l.name}`:"")):s.mixins.push(l),c},component(l,u){return v.NODE_ENV!=="production"&&na(l,s.config),u?(v.NODE_ENV!=="production"&&s.components[l]&&L(`Component "${l}" has already been registered in target app.`),s.components[l]=u,c):s.components[l]},directive(l,u){return v.NODE_ENV!=="production"&&uc(l),u?(v.NODE_ENV!=="production"&&s.directives[l]&&L(`Directive "${l}" has already been registered in target app.`),s.directives[l]=u,c):s.directives[l]},mount(l,u,d){if(a)v.NODE_ENV!=="production"&&L("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"&&l.__vue_app__&&L("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 p=Q(r,o);return p.appContext=s,d===!0?d="svg":d===!1&&(d=void 0),v.NODE_ENV!=="production"&&(s.reload=()=>{e(Dt(p),l,d)}),u&&t?t(p,l):e(p,l,d),a=!0,c._container=l,l.__vue_app__=c,v.NODE_ENV!=="production"&&(c._instance=p.component,Eh(c,cu)),oa(p.component)}},unmount(){a?(e(null,c._container),v.NODE_ENV!=="production"&&(c._instance=null,Oh(c)),delete c._container.__vue_app__):v.NODE_ENV!=="production"&&L("Cannot unmount an app that is not mounted.")},provide(l,u){return v.NODE_ENV!=="production"&&l in s.provides&&L(`App already provides property with key "${String(l)}". It will be overwritten with the new value.`),s.provides[l]=u,c},runWithContext(l){const u=nr;nr=c;try{return l()}finally{nr=u}}};return c}}let nr=null;function dt(e,t){if(!ze)v.NODE_ENV!=="production"&&L("provide() can only be used inside setup().");else{let n=ze.provides;const r=ze.parent&&ze.parent.provides;r===n&&(n=ze.provides=Object.create(r)),n[e]=t}}function Ce(e,t,n=!1){const r=ze||Je;if(r||nr){const o=nr?nr._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&&fe(t)?t.call(r&&r.proxy):t;v.NODE_ENV!=="production"&&L(`injection "${String(e)}" not found.`)}else v.NODE_ENV!=="production"&&L("inject() can only be used inside setup() or functional components.")}function rm(){return!!(ze||Je||nr)}const Cc={},kc=()=>Object.create(Cc),Pc=e=>Object.getPrototypeOf(e)===Cc;function om(e,t,n,r=!1){const o={},s=kc();e.propsDefaults=Object.create(null),Ic(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);v.NODE_ENV!=="production"&&Ac(t||{},o,e),n?e.props=r?o:Qp(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function sm(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function im(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,a=he(o),[c]=e.propsOptions;let l=!1;if(!(v.NODE_ENV!=="production"&&sm(e))&&(r||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let p=u[d];if(Ns(e.emitsOptions,p))continue;const g=t[p];if(c)if(Oe(s,p))g!==s[p]&&(s[p]=g,l=!0);else{const m=wt(p);o[m]=Hi(c,a,m,g,e,!1)}else g!==s[p]&&(s[p]=g,l=!0)}}}else{Ic(e,t,o,s)&&(l=!0);let u;for(const d in a)(!t||!Oe(t,d)&&((u=Xt(d))===d||!Oe(t,u)))&&(c?n&&(n[d]!==void 0||n[u]!==void 0)&&(o[d]=Hi(c,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!Oe(t,d))&&(delete s[d],l=!0)}l&&Ft(e.attrs,"set",""),v.NODE_ENV!=="production"&&Ac(t||{},o,e)}function Ic(e,t,n,r){const[o,s]=e.propsOptions;let i=!1,a;if(t)for(let c in t){if(Qr(c))continue;const l=t[c];let u;o&&Oe(o,u=wt(c))?!s||!s.includes(u)?n[u]=l:(a||(a={}))[u]=l:Ns(e.emitsOptions,c)||(!(c in r)||l!==r[c])&&(r[c]=l,i=!0)}if(s){const c=he(n),l=a||De;for(let u=0;u<s.length;u++){const d=s[u];n[d]=Hi(o,c,d,l[d],e,!Oe(l,d))}}return i}function Hi(e,t,n,r,o,s){const i=e[n];if(i!=null){const a=Oe(i,"default");if(a&&r===void 0){const c=i.default;if(i.type!==Function&&!i.skipFactory&&fe(c)){const{propsDefaults:l}=o;if(n in l)r=l[n];else{const u=_o(o);r=l[n]=c.call(null,t),u()}}else r=c}i[0]&&(s&&!a?r=!1:i[1]&&(r===""||r===Xt(n))&&(r=!0))}return r}const am=new WeakMap;function $c(e,t,n=!1){const r=n?am:t.propsCache,o=r.get(e);if(o)return o;const s=e.props,i={},a=[];let c=!1;if(!fe(e)){const u=d=>{c=!0;const[p,g]=$c(d,t,!0);Be(i,p),g&&a.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!s&&!c)return Te(e)&&r.set(e,Nr),Nr;if(se(s))for(let u=0;u<s.length;u++){v.NODE_ENV!=="production"&&!Re(s[u])&&L("props must be strings when using array syntax.",s[u]);const d=wt(s[u]);Dc(d)&&(i[d]=De)}else if(s){v.NODE_ENV!=="production"&&!Te(s)&&L("invalid props options",s);for(const u in s){const d=wt(u);if(Dc(d)){const p=s[u],g=i[d]=se(p)||fe(p)?{type:p}:Be({},p),m=g.type;let b=!1,N=!0;if(se(m))for(let V=0;V<m.length;++V){const M=m[V],T=fe(M)&&M.name;if(T==="Boolean"){b=!0;break}else T==="String"&&(N=!1)}else b=fe(m)&&m.name==="Boolean";g[0]=b,g[1]=N,(b||Oe(g,"default"))&&a.push(d)}}}const l=[i,a];return Te(e)&&r.set(e,l),l}function Dc(e){return e[0]!=="$"&&!Qr(e)?!0:(v.NODE_ENV!=="production"&&L(`Invalid prop name: "${e}" is a reserved property.`),!1)}function lm(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Ac(e,t,n){const r=he(t),o=n.propsOptions[0];for(const s in o){let i=o[s];i!=null&&cm(s,r[s],i,v.NODE_ENV!=="production"?Bt(r):r,!Oe(e,s)&&!Oe(e,Xt(s)))}}function cm(e,t,n,r,o){const{type:s,required:i,validator:a,skipCheck:c}=n;if(i&&o){L('Missing required prop: "'+e+'"');return}if(!(t==null&&!i)){if(s!=null&&s!==!0&&!c){let l=!1;const u=se(s)?s:[s],d=[];for(let p=0;p<u.length&&!l;p++){const{valid:g,expectedType:m}=dm(t,u[p]);d.push(m||""),l=g}if(!l){L(fm(e,t,d));return}}a&&!a(t,r)&&L('Invalid prop: custom validator check failed for prop "'+e+'".')}}const um=Yt("String,Number,Boolean,Function,Symbol,BigInt");function dm(e,t){let n;const r=lm(t);if(um(r)){const o=typeof e;n=o===r.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else r==="Object"?n=Te(e):r==="Array"?n=se(e):r==="null"?n=e===null:n=e instanceof t;return{valid:n,expectedType:r}}function fm(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(zn).join(" | ")}`;const o=n[0],s=di(t),i=Vc(t,o),a=Vc(t,s);return n.length===1&&Rc(o)&&!pm(o,s)&&(r+=` with value ${i}`),r+=`, got ${s} `,Rc(s)&&(r+=`with value ${a}.`),r}function Vc(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Rc(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function pm(...e){return e.some(t=>t.toLowerCase()==="boolean")}const jc=e=>e[0]==="_"||e==="$stable",Zi=e=>se(e)?e.map(At):[At(e)],hm=(e,t,n)=>{if(t._n)return t;const r=Ee((...o)=>(v.NODE_ENV!=="production"&&ze&&(!n||n.root===ze.root)&&L(`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.`),Zi(t(...o))),n);return r._c=!1,r},Lc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(jc(o))continue;const s=e[o];if(fe(s))t[o]=hm(o,s,r);else if(s!=null){v.NODE_ENV!=="production"&&L(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const i=Zi(s);t[o]=()=>i}}},Mc=(e,t)=>{v.NODE_ENV!=="production"&&!uo(e.vnode)&&L("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=Zi(t);e.slots.default=()=>n},qi=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},mm=(e,t,n)=>{const r=e.slots=kc();if(e.vnode.shapeFlag&32){const o=t._;o?(qi(r,t,n),n&&Yo(r,"_",o,!0)):Lc(t,r)}else t&&Mc(e,t)},vm=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,i=De;if(r.shapeFlag&32){const a=t._;a?v.NODE_ENV!=="production"&&Tn?(qi(o,t,n),Ft(e,"set","$slots")):n&&a===1?s=!1:qi(o,t,n):(s=!t.$stable,Lc(t,o)),i=t}else t&&(Mc(e,t),i={default:1});if(s)for(const a in o)!jc(a)&&i[a]==null&&delete o[a]};function Wi(e,t,n,r,o=!1){if(se(e)){e.forEach((p,g)=>Wi(p,t&&(se(t)?t[g]:t),n,r,o));return}if(co(r)&&!o)return;const s=r.shapeFlag&4?oa(r.component):r.el,i=o?null:s,{i:a,r:c}=e;if(v.NODE_ENV!=="production"&&!a){L("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const l=t&&t.r,u=a.refs===De?a.refs={}:a.refs,d=a.setupState;if(l!=null&&l!==c&&(Re(l)?(u[l]=null,Oe(d,l)&&(d[l]=null)):Ue(l)&&(l.value=null)),fe(c))on(c,a,12,[i,u]);else{const p=Re(c),g=Ue(c);if(p||g){const m=()=>{if(e.f){const b=p?Oe(d,c)?d[c]:u[c]:c.value;o?se(b)&&ci(b,s):se(b)?b.includes(s)||b.push(s):p?(u[c]=[s],Oe(d,c)&&(d[c]=u[c])):(c.value=[s],e.k&&(u[e.k]=c.value))}else p?(u[c]=i,Oe(d,c)&&(d[c]=i)):g?(c.value=i,e.k&&(u[e.k]=i)):v.NODE_ENV!=="production"&&L("Invalid template ref type:",c,`(${typeof c})`)};i?(m.id=-1,yt(m,n)):m()}else v.NODE_ENV!=="production"&&L("Invalid template ref type:",c,`(${typeof c})`)}}const Uc=Symbol("_vte"),gm=e=>e.__isTeleport,rr=e=>e&&(e.disabled||e.disabled===""),Fc=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Bc=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,zi=(e,t)=>{const n=e&&e.to;if(Re(n))if(t){const r=t(n);return v.NODE_ENV!=="production"&&!r&&!rr(e)&&L(`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"&&L("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null;else return v.NODE_ENV!=="production"&&!n&&!rr(e)&&L(`Invalid Teleport target: ${n}`),n},ym={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,i,a,c,l){const{mc:u,pc:d,pbc:p,o:{insert:g,querySelector:m,createText:b,createComment:N}}=l,V=rr(t.props);let{shapeFlag:M,children:T,dynamicChildren:z}=t;if(v.NODE_ENV!=="production"&&Tn&&(c=!1,z=null),e==null){const C=t.el=v.NODE_ENV!=="production"?N("teleport start"):b(""),H=t.anchor=v.NODE_ENV!=="production"?N("teleport end"):b("");g(C,n,r),g(H,n,r);const w=t.target=zi(t.props,m),de=Zc(w,t,b,g);w?i==="svg"||Fc(w)?i="svg":(i==="mathml"||Bc(w))&&(i="mathml"):v.NODE_ENV!=="production"&&!V&&L("Invalid Teleport target on mount:",w,`(${typeof w})`);const G=(I,x)=>{M&16&&u(T,I,x,o,s,i,a,c)};V?G(n,H):w&&G(w,de)}else{t.el=e.el,t.targetStart=e.targetStart;const C=t.anchor=e.anchor,H=t.target=e.target,w=t.targetAnchor=e.targetAnchor,de=rr(e.props),G=de?n:H,I=de?C:w;if(i==="svg"||Fc(H)?i="svg":(i==="mathml"||Bc(H))&&(i="mathml"),z?(p(e.dynamicChildren,z,G,o,s,i,a),ho(e,t,!0)):c||d(e,t,G,I,o,s,i,a,!1),V)de?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ws(t,n,C,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const x=t.target=zi(t.props,m);x?ws(t,x,null,l,0):v.NODE_ENV!=="production"&&L("Invalid Teleport target on update:",H,`(${typeof H})`)}else de&&ws(t,H,w,l,1)}Hc(t)},remove(e,t,n,{um:r,o:{remove:o}},s){const{shapeFlag:i,children:a,anchor:c,targetStart:l,targetAnchor:u,target:d,props:p}=e;if(d&&(o(l),o(u)),s&&o(c),i&16){const g=s||!rr(p);for(let m=0;m<a.length;m++){const b=a[m];r(b,t,n,g,!!b.dynamicChildren)}}},move:ws,hydrate:_m};function ws(e,t,n,{o:{insert:r},m:o},s=2){s===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:c,children:l,props:u}=e,d=s===2;if(d&&r(i,t,n),(!d||rr(u))&&c&16)for(let p=0;p<l.length;p++)o(l[p],t,n,2);d&&r(a,t,n)}function _m(e,t,n,r,o,s,{o:{nextSibling:i,parentNode:a,querySelector:c,insert:l,createText:u}},d){const p=t.target=zi(t.props,c);if(p){const g=p._lpa||p.firstChild;if(t.shapeFlag&16)if(rr(t.props))t.anchor=d(i(e),t,a(e),n,r,o,s),t.targetStart=g,t.targetAnchor=g&&i(g);else{t.anchor=i(e);let m=g;for(;m;){if(m&&m.nodeType===8){if(m.data==="teleport start anchor")t.targetStart=m;else if(m.data==="teleport anchor"){t.targetAnchor=m,p._lpa=t.targetAnchor&&i(t.targetAnchor);break}}m=i(m)}t.targetAnchor||Zc(p,t,u,l),d(g&&i(g),t,p,n,r,o,s)}Hc(t)}return t.anchor&&i(t.anchor)}const bm=ym;function Hc(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 Zc(e,t,n,r){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[Uc]=s,e&&(r(o,e),r(s,e)),s}let po,kn;function an(e,t){e.appContext.config.performance&&Es()&&kn.mark(`vue-${t}-${e.uid}`),v.NODE_ENV!=="production"&&Th(e,t,Es()?kn.now():Date.now())}function ln(e,t){if(e.appContext.config.performance&&Es()){const n=`vue-${t}-${e.uid}`,r=n+":end";kn.mark(r),kn.measure(`<${Ps(e,e.type)}> ${t}`,n,r),kn.clearMarks(n),kn.clearMarks(r)}v.NODE_ENV!=="production"&&Ch(e,t,Es()?kn.now():Date.now())}function Es(){return po!==void 0||(typeof window<"u"&&window.performance?(po=!0,kn=window.performance):po=!1),po}function wm(){const e=[];if(v.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.
|
|
13
|
+
|
|
14
|
+
For more details, see https://link.vuejs.org/feature-flags.`)}}const yt=Rm;function Em(e){return Om(e)}function Om(e,t){wm();const n=pi();n.__VUE__=!0,v.NODE_ENV!=="production"&&ac(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:s,createElement:i,createText:a,createComment:c,setText:l,setElementText:u,parentNode:d,nextSibling:p,setScopeId:g=Ze,insertStaticContent:m}=e,b=(f,h,E,A=null,P=null,R=null,K=void 0,Z=null,q=v.NODE_ENV!=="production"&&Tn?!1:!!h.dynamicChildren)=>{if(f===h)return;f&&!ir(f,h)&&(A=Ys(f),_t(f,P,R,!0),f=null),h.patchFlag===-2&&(q=!1,h.dynamicChildren=null);const{type:$,ref:J,shapeFlag:ae}=h;switch($){case mo:N(f,h,E,A);break;case We:V(f,h,E,A);break;case vo:f==null?M(h,E,A,K):v.NODE_ENV!=="production"&&T(f,h,E,K);break;case Pe:re(f,h,E,A,P,R,K,Z,q);break;default:ae&1?H(f,h,E,A,P,R,K,Z,q):ae&6?_(f,h,E,A,P,R,K,Z,q):ae&64||ae&128?$.process(f,h,E,A,P,R,K,Z,q,$o):v.NODE_ENV!=="production"&&L("Invalid VNode type:",$,`(${typeof $})`)}J!=null&&P&&Wi(J,f&&f.ref,R,h||f,!h)},N=(f,h,E,A)=>{if(f==null)r(h.el=a(h.children),E,A);else{const P=h.el=f.el;h.children!==f.children&&l(P,h.children)}},V=(f,h,E,A)=>{f==null?r(h.el=c(h.children||""),E,A):h.el=f.el},M=(f,h,E,A)=>{[f.el,f.anchor]=m(f.children,h,E,A,f.el,f.anchor)},T=(f,h,E,A)=>{if(h.children!==f.children){const P=p(f.anchor);C(f),[h.el,h.anchor]=m(h.children,E,P,A)}else h.el=f.el,h.anchor=f.anchor},z=({el:f,anchor:h},E,A)=>{let P;for(;f&&f!==h;)P=p(f),r(f,E,A),f=P;r(h,E,A)},C=({el:f,anchor:h})=>{let E;for(;f&&f!==h;)E=p(f),o(f),f=E;o(h)},H=(f,h,E,A,P,R,K,Z,q)=>{h.type==="svg"?K="svg":h.type==="math"&&(K="mathml"),f==null?w(h,E,A,P,R,K,Z,q):I(f,h,P,R,K,Z,q)},w=(f,h,E,A,P,R,K,Z)=>{let q,$;const{props:J,shapeFlag:ae,transition:oe,dirs:ge}=f;if(q=f.el=i(f.type,R,J&&J.is,J),ae&8?u(q,f.children):ae&16&&G(f.children,q,null,A,P,Ki(f,R),K,Z),ge&&er(f,null,A,"created"),de(q,f,f.scopeId,K,A),J){for(const Ve in J)Ve!=="value"&&!Qr(Ve)&&s(q,Ve,null,J[Ve],R,A);"value"in J&&s(q,"value",null,J.value,R),($=J.onVnodeBeforeMount)&&qt($,A,f)}v.NODE_ENV!=="production"&&(Yo(q,"__vnode",f,!0),Yo(q,"__vueParentComponent",A,!0)),ge&&er(f,null,A,"beforeMount");const Ne=Nm(P,oe);Ne&&oe.beforeEnter(q),r(q,h,E),(($=J&&J.onVnodeMounted)||Ne||ge)&&yt(()=>{$&&qt($,A,f),Ne&&oe.enter(q),ge&&er(f,null,A,"mounted")},P)},de=(f,h,E,A,P)=>{if(E&&g(f,E),A)for(let R=0;R<A.length;R++)g(f,A[R]);if(P){let R=P.subTree;if(v.NODE_ENV!=="production"&&R.patchFlag>0&&R.patchFlag&2048&&(R=Xi(R.children)||R),h===R){const K=P.vnode;de(f,K,K.scopeId,K.slotScopeIds,P.parent)}}},G=(f,h,E,A,P,R,K,Z,q=0)=>{for(let $=q;$<f.length;$++){const J=f[$]=Z?Pn(f[$]):At(f[$]);b(null,J,h,E,A,P,R,K,Z)}},I=(f,h,E,A,P,R,K)=>{const Z=h.el=f.el;v.NODE_ENV!=="production"&&(Z.__vnode=h);let{patchFlag:q,dynamicChildren:$,dirs:J}=h;q|=f.patchFlag&16;const ae=f.props||De,oe=h.props||De;let ge;if(E&&or(E,!1),(ge=oe.onVnodeBeforeUpdate)&&qt(ge,E,h,f),J&&er(h,f,E,"beforeUpdate"),E&&or(E,!0),v.NODE_ENV!=="production"&&Tn&&(q=0,K=!1,$=null),(ae.innerHTML&&oe.innerHTML==null||ae.textContent&&oe.textContent==null)&&u(Z,""),$?(x(f.dynamicChildren,$,Z,E,A,Ki(h,P),R),v.NODE_ENV!=="production"&&ho(f,h)):K||le(f,h,Z,null,E,A,Ki(h,P),R,!1),q>0){if(q&16)D(Z,ae,oe,E,P);else if(q&2&&ae.class!==oe.class&&s(Z,"class",null,oe.class,P),q&4&&s(Z,"style",ae.style,oe.style,P),q&8){const Ne=h.dynamicProps;for(let Ve=0;Ve<Ne.length;Ve++){const ke=Ne[Ve],nt=ae[ke],Rt=oe[ke];(Rt!==nt||ke==="value")&&s(Z,ke,nt,Rt,P,E)}}q&1&&f.children!==h.children&&u(Z,h.children)}else!K&&$==null&&D(Z,ae,oe,E,P);((ge=oe.onVnodeUpdated)||J)&&yt(()=>{ge&&qt(ge,E,h,f),J&&er(h,f,E,"updated")},A)},x=(f,h,E,A,P,R,K)=>{for(let Z=0;Z<h.length;Z++){const q=f[Z],$=h[Z],J=q.el&&(q.type===Pe||!ir(q,$)||q.shapeFlag&70)?d(q.el):E;b(q,$,J,null,A,P,R,K,!0)}},D=(f,h,E,A,P)=>{if(h!==E){if(h!==De)for(const R in h)!Qr(R)&&!(R in E)&&s(f,R,h[R],null,P,A);for(const R in E){if(Qr(R))continue;const K=E[R],Z=h[R];K!==Z&&R!=="value"&&s(f,R,Z,K,P,A)}"value"in E&&s(f,"value",h.value,E.value,P)}},re=(f,h,E,A,P,R,K,Z,q)=>{const $=h.el=f?f.el:a(""),J=h.anchor=f?f.anchor:a("");let{patchFlag:ae,dynamicChildren:oe,slotScopeIds:ge}=h;v.NODE_ENV!=="production"&&(Tn||ae&2048)&&(ae=0,q=!1,oe=null),ge&&(Z=Z?Z.concat(ge):ge),f==null?(r($,E,A),r(J,E,A),G(h.children||[],E,J,P,R,K,Z,q)):ae>0&&ae&64&&oe&&f.dynamicChildren?(x(f.dynamicChildren,oe,E,P,R,K,Z),v.NODE_ENV!=="production"?ho(f,h):(h.key!=null||P&&h===P.subTree)&&ho(f,h,!0)):le(f,h,E,J,P,R,K,Z,q)},_=(f,h,E,A,P,R,K,Z,q)=>{h.slotScopeIds=Z,f==null?h.shapeFlag&512?P.ctx.activate(h,E,A,K,q):k(h,E,A,P,R,K,q):te(f,h,q)},k=(f,h,E,A,P,R,K)=>{const Z=f.component=Hm(f,A,P);if(v.NODE_ENV!=="production"&&Z.type.__hmrId&&yh(Z),v.NODE_ENV!=="production"&&(us(f),an(Z,"mount")),uo(f)&&(Z.ctx.renderer=$o),v.NODE_ENV!=="production"&&an(Z,"init"),qm(Z,!1,K),v.NODE_ENV!=="production"&&ln(Z,"init"),Z.asyncDep){if(P&&P.registerDep(Z,ie,K),!f.el){const q=Z.subTree=Q(We);V(null,q,h,E)}}else ie(Z,f,h,E,P,R,K);v.NODE_ENV!=="production"&&(ds(),ln(Z,"mount"))},te=(f,h,E)=>{const A=h.component=f.component;if(Dm(f,h,E))if(A.asyncDep&&!A.asyncResolved){v.NODE_ENV!=="production"&&us(h),ne(A,h,E),v.NODE_ENV!=="production"&&ds();return}else A.next=h,vh(A.update),A.effect.dirty=!0,A.update();else h.el=f.el,A.vnode=h},ie=(f,h,E,A,P,R,K)=>{const Z=()=>{if(f.isMounted){let{next:J,bu:ae,u:oe,parent:ge,vnode:Ne}=f;{const Ar=qc(f);if(Ar){J&&(J.el=Ne.el,ne(f,J,K)),Ar.asyncDep.then(()=>{f.isUnmounted||Z()});return}}let Ve=J,ke;v.NODE_ENV!=="production"&&us(J||f.vnode),or(f,!1),J?(J.el=Ne.el,ne(f,J,K)):J=Ne,ae&&eo(ae),(ke=J.props&&J.props.onVnodeBeforeUpdate)&&qt(ke,ge,J,Ne),or(f,!0),v.NODE_ENV!=="production"&&an(f,"render");const nt=Yi(f);v.NODE_ENV!=="production"&&ln(f,"render");const Rt=f.subTree;f.subTree=nt,v.NODE_ENV!=="production"&&an(f,"patch"),b(Rt,nt,d(Rt.el),Ys(Rt),f,P,R),v.NODE_ENV!=="production"&&ln(f,"patch"),J.el=nt.el,Ve===null&&Am(f,nt.el),oe&&yt(oe,P),(ke=J.props&&J.props.onVnodeUpdated)&&yt(()=>qt(ke,ge,J,Ne),P),v.NODE_ENV!=="production"&&lc(f),v.NODE_ENV!=="production"&&ds()}else{let J;const{el:ae,props:oe}=h,{bm:ge,m:Ne,parent:Ve}=f,ke=co(h);if(or(f,!1),ge&&eo(ge),!ke&&(J=oe&&oe.onVnodeBeforeMount)&&qt(J,Ve,h),or(f,!0),ae&&Rd){const nt=()=>{v.NODE_ENV!=="production"&&an(f,"render"),f.subTree=Yi(f),v.NODE_ENV!=="production"&&ln(f,"render"),v.NODE_ENV!=="production"&&an(f,"hydrate"),Rd(ae,f.subTree,f,P,null),v.NODE_ENV!=="production"&&ln(f,"hydrate")};ke?h.type.__asyncLoader().then(()=>!f.isUnmounted&&nt()):nt()}else{v.NODE_ENV!=="production"&&an(f,"render");const nt=f.subTree=Yi(f);v.NODE_ENV!=="production"&&ln(f,"render"),v.NODE_ENV!=="production"&&an(f,"patch"),b(null,nt,E,A,f,P,R),v.NODE_ENV!=="production"&&ln(f,"patch"),h.el=nt.el}if(Ne&&yt(Ne,P),!ke&&(J=oe&&oe.onVnodeMounted)){const nt=h;yt(()=>qt(J,Ve,nt),P)}(h.shapeFlag&256||Ve&&co(Ve.vnode)&&Ve.vnode.shapeFlag&256)&&f.a&&yt(f.a,P),f.isMounted=!0,v.NODE_ENV!=="production"&&Nh(f),h=E=A=null}},q=f.effect=new vi(Z,Ze,()=>fs($),f.scope),$=f.update=()=>{q.dirty&&q.run()};$.i=f,$.id=f.uid,or(f,!0),v.NODE_ENV!=="production"&&(q.onTrack=f.rtc?J=>eo(f.rtc,J):void 0,q.onTrigger=f.rtg?J=>eo(f.rtg,J):void 0),$()},ne=(f,h,E)=>{h.component=f;const A=f.vnode.props;f.vnode=h,f.next=null,im(f,h.props,A,E),vm(f,h.children,E),Qt(),nc(f),en()},le=(f,h,E,A,P,R,K,Z,q=!1)=>{const $=f&&f.children,J=f?f.shapeFlag:0,ae=h.children,{patchFlag:oe,shapeFlag:ge}=h;if(oe>0){if(oe&128){Ie($,ae,E,A,P,R,K,Z,q);return}else if(oe&256){xe($,ae,E,A,P,R,K,Z,q);return}}ge&8?(J&16&&Io($,P,R),ae!==$&&u(E,ae)):J&16?ge&16?Ie($,ae,E,A,P,R,K,Z,q):Io($,P,R,!0):(J&8&&u(E,""),ge&16&&G(ae,E,A,P,R,K,Z,q))},xe=(f,h,E,A,P,R,K,Z,q)=>{f=f||Nr,h=h||Nr;const $=f.length,J=h.length,ae=Math.min($,J);let oe;for(oe=0;oe<ae;oe++){const ge=h[oe]=q?Pn(h[oe]):At(h[oe]);b(f[oe],ge,E,null,P,R,K,Z,q)}$>J?Io(f,P,R,!0,!1,ae):G(h,E,A,P,R,K,Z,q,ae)},Ie=(f,h,E,A,P,R,K,Z,q)=>{let $=0;const J=h.length;let ae=f.length-1,oe=J-1;for(;$<=ae&&$<=oe;){const ge=f[$],Ne=h[$]=q?Pn(h[$]):At(h[$]);if(ir(ge,Ne))b(ge,Ne,E,null,P,R,K,Z,q);else break;$++}for(;$<=ae&&$<=oe;){const ge=f[ae],Ne=h[oe]=q?Pn(h[oe]):At(h[oe]);if(ir(ge,Ne))b(ge,Ne,E,null,P,R,K,Z,q);else break;ae--,oe--}if($>ae){if($<=oe){const ge=oe+1,Ne=ge<J?h[ge].el:A;for(;$<=oe;)b(null,h[$]=q?Pn(h[$]):At(h[$]),E,Ne,P,R,K,Z,q),$++}}else if($>oe)for(;$<=ae;)_t(f[$],P,R,!0),$++;else{const ge=$,Ne=$,Ve=new Map;for($=Ne;$<=oe;$++){const gt=h[$]=q?Pn(h[$]):At(h[$]);gt.key!=null&&(v.NODE_ENV!=="production"&&Ve.has(gt.key)&&L("Duplicate keys found during update:",JSON.stringify(gt.key),"Make sure keys are unique."),Ve.set(gt.key,$))}let ke,nt=0;const Rt=oe-Ne+1;let Ar=!1,jd=0;const Do=new Array(Rt);for($=0;$<Rt;$++)Do[$]=0;for($=ge;$<=ae;$++){const gt=f[$];if(nt>=Rt){_t(gt,P,R,!0);continue}let Kt;if(gt.key!=null)Kt=Ve.get(gt.key);else for(ke=Ne;ke<=oe;ke++)if(Do[ke-Ne]===0&&ir(gt,h[ke])){Kt=ke;break}Kt===void 0?_t(gt,P,R,!0):(Do[Kt-Ne]=$+1,Kt>=jd?jd=Kt:Ar=!0,b(gt,h[Kt],E,null,P,R,K,Z,q),nt++)}const Ld=Ar?Sm(Do):Nr;for(ke=Ld.length-1,$=Rt-1;$>=0;$--){const gt=Ne+$,Kt=h[gt],Md=gt+1<J?h[gt+1].el:A;Do[$]===0?b(null,Kt,E,Md,P,R,K,Z,q):Ar&&(ke<0||$!==Ld[ke]?tt(Kt,E,Md,2):ke--)}}},tt=(f,h,E,A,P=null)=>{const{el:R,type:K,transition:Z,children:q,shapeFlag:$}=f;if($&6){tt(f.component.subTree,h,E,A);return}if($&128){f.suspense.move(h,E,A);return}if($&64){K.move(f,h,E,$o);return}if(K===Pe){r(R,h,E);for(let ae=0;ae<q.length;ae++)tt(q[ae],h,E,A);r(f.anchor,h,E);return}if(K===vo){z(f,h,E);return}if(A!==2&&$&1&&Z)if(A===0)Z.beforeEnter(R),r(R,h,E),yt(()=>Z.enter(R),P);else{const{leave:ae,delayLeave:oe,afterLeave:ge}=Z,Ne=()=>r(R,h,E),Ve=()=>{ae(R,()=>{Ne(),ge&&ge()})};oe?oe(R,Ne,Ve):Ve()}else r(R,h,E)},_t=(f,h,E,A=!1,P=!1)=>{const{type:R,props:K,ref:Z,children:q,dynamicChildren:$,shapeFlag:J,patchFlag:ae,dirs:oe,cacheIndex:ge}=f;if(ae===-2&&(P=!1),Z!=null&&Wi(Z,null,E,f,!0),ge!=null&&(h.renderCache[ge]=void 0),J&256){h.ctx.deactivate(f);return}const Ne=J&1&&oe,Ve=!co(f);let ke;if(Ve&&(ke=K&&K.onVnodeBeforeUnmount)&&qt(ke,h,f),J&6)o1(f.component,E,A);else{if(J&128){f.suspense.unmount(E,A);return}Ne&&er(f,null,h,"beforeUnmount"),J&64?f.type.remove(f,h,E,$o,A):$&&!$.hasOnce&&(R!==Pe||ae>0&&ae&64)?Io($,h,E,!1,!0):(R===Pe&&ae&384||!P&&J&16)&&Io(q,h,E),A&&hn(f)}(Ve&&(ke=K&&K.onVnodeUnmounted)||Ne)&&yt(()=>{ke&&qt(ke,h,f),Ne&&er(f,null,h,"unmounted")},E)},hn=f=>{const{type:h,el:E,anchor:A,transition:P}=f;if(h===Pe){v.NODE_ENV!=="production"&&f.patchFlag>0&&f.patchFlag&2048&&P&&!P.persisted?f.children.forEach(K=>{K.type===We?o(K.el):hn(K)}):Fn(E,A);return}if(h===vo){C(f);return}const R=()=>{o(E),P&&!P.persisted&&P.afterLeave&&P.afterLeave()};if(f.shapeFlag&1&&P&&!P.persisted){const{leave:K,delayLeave:Z}=P,q=()=>K(E,R);Z?Z(f.el,R,q):q()}else R()},Fn=(f,h)=>{let E;for(;f!==h;)E=p(f),o(f),f=E;o(h)},o1=(f,h,E)=>{v.NODE_ENV!=="production"&&f.type.__hmrId&&_h(f);const{bum:A,scope:P,update:R,subTree:K,um:Z,m:q,a:$}=f;Wc(q),Wc($),A&&eo(A),P.stop(),R&&(R.active=!1,_t(K,f,h,E)),Z&&yt(Z,h),yt(()=>{f.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve()),v.NODE_ENV!=="production"&&xh(f)},Io=(f,h,E,A=!1,P=!1,R=0)=>{for(let K=R;K<f.length;K++)_t(f[K],h,E,A,P)},Ys=f=>{if(f.shapeFlag&6)return Ys(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const h=p(f.anchor||f.el),E=h&&h[Uc];return E?p(E):h};let Ha=!1;const Ad=(f,h,E)=>{f==null?h._vnode&&_t(h._vnode,null,null,!0):b(h._vnode||null,f,h,null,null,null,E),h._vnode=f,Ha||(Ha=!0,nc(),rc(),Ha=!1)},$o={p:b,um:_t,m:tt,r:hn,mt:k,mc:G,pc:le,pbc:x,n:Ys,o:e};let Vd,Rd;return{render:Ad,hydrate:Vd,createApp:nm(Ad,Vd)}}function Ki({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 or({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Nm(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ho(e,t,n=!1){const r=e.children,o=t.children;if(se(r)&&se(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]=Pn(o[s]),a.el=i.el),!n&&a.patchFlag!==-2&&ho(i,a)),a.type===mo&&(a.el=i.el),v.NODE_ENV!=="production"&&a.type===We&&!a.el&&(a.el=i.el)}}function Sm(e){const t=e.slice(),n=[0];let r,o,s,i,a;const c=e.length;for(r=0;r<c;r++){const l=e[r];if(l!==0){if(o=n[n.length-1],e[o]<l){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)a=s+i>>1,e[n[a]]<l?s=a+1:i=a;l<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 qc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:qc(t)}function Wc(e){if(e)for(let t=0;t<e.length;t++)e[t].active=!1}const xm=Symbol.for("v-scx"),Tm=()=>{{const e=Ce(xm);return e||v.NODE_ENV!=="production"&&L("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function ft(e,t){return Gi(e,null,t)}const Os={};function Ye(e,t,n){return v.NODE_ENV!=="production"&&!fe(t)&&L("`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."),Gi(e,t,n)}function Gi(e,t,{immediate:n,deep:r,flush:o,once:s,onTrack:i,onTrigger:a}=De){if(t&&s){const w=t;t=(...de)=>{w(...de),H()}}v.NODE_ENV!=="production"&&r!==void 0&&typeof r=="number"&&L('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"&&!t&&(n!==void 0&&L('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),r!==void 0&&L('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&L('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const c=w=>{L("Invalid watch source: ",w,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},l=ze,u=w=>r===!0?w:sr(w,r===!1?1:void 0);let d,p=!1,g=!1;if(Ue(e)?(d=()=>e.value,p=rn(e)):tn(e)?(d=()=>u(e),p=!0):se(e)?(g=!0,p=e.some(w=>tn(w)||rn(w)),d=()=>e.map(w=>{if(Ue(w))return w.value;if(tn(w))return u(w);if(fe(w))return on(w,l,2);v.NODE_ENV!=="production"&&c(w)})):fe(e)?t?d=()=>on(e,l,2):d=()=>(m&&m(),St(e,l,3,[b])):(d=Ze,v.NODE_ENV!=="production"&&c(e)),t&&r){const w=d;d=()=>sr(w())}let m,b=w=>{m=z.onStop=()=>{on(w,l,4),m=z.onStop=void 0}},N;if(ks)if(b=Ze,t?n&&St(t,l,3,[d(),g?[]:void 0,b]):d(),o==="sync"){const w=Tm();N=w.__watcherHandles||(w.__watcherHandles=[])}else return Ze;let V=g?new Array(e.length).fill(Os):Os;const M=()=>{if(!(!z.active||!z.dirty))if(t){const w=z.run();(r||p||(g?w.some((de,G)=>En(de,V[G])):En(w,V)))&&(m&&m(),St(t,l,3,[w,V===Os?void 0:g&&V[0]===Os?[]:V,b]),V=w)}else z.run()};M.allowRecurse=!!t;let T;o==="sync"?T=M:o==="post"?T=()=>yt(M,l&&l.suspense):(M.pre=!0,l&&(M.id=l.uid),T=()=>fs(M));const z=new vi(d,Ze,T),C=Ol(),H=()=>{z.stop(),C&&ci(C.effects,z)};return v.NODE_ENV!=="production"&&(z.onTrack=i,z.onTrigger=a),t?n?M():V=z.run():o==="post"?yt(z.run.bind(z),l&&l.suspense):z.run(),N&&N.push(H),H}function Cm(e,t,n){const r=this.proxy,o=Re(e)?e.includes(".")?zc(r,e):()=>r[e]:e.bind(r,r);let s;fe(t)?s=t:(s=t.handler,n=t);const i=_o(this),a=Gi(o,s.bind(r),n);return i(),a}function zc(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 sr(e,t=1/0,n){if(t<=0||!Te(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Ue(e))sr(e.value,t,n);else if(se(e))for(let r=0;r<e.length;r++)sr(e[r],t,n);else if(hl(e)||Wn(e))e.forEach(r=>{sr(r,t,n)});else if(vl(e)){for(const r in e)sr(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&sr(e[r],t,n)}return e}const km=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${wt(t)}Modifiers`]||e[`${Xt(t)}Modifiers`];function Pm(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||De;if(v.NODE_ENV!=="production"){const{emitsOptions:u,propsOptions:[d]}=e;if(u)if(!(t in u))(!d||!(Kn(wt(t))in d))&&L(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Kn(wt(t))}" prop.`);else{const p=u[t];fe(p)&&(p(...n)||L(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),i=s&&km(r,t.slice(7));if(i&&(i.trim&&(o=n.map(u=>Re(u)?u.trim():u)),i.number&&(o=n.map(yp))),v.NODE_ENV!=="production"&&kh(e,t,o),v.NODE_ENV!=="production"){const u=t.toLowerCase();u!==t&&r[Kn(u)]&&L(`Event "${u}" is emitted in component ${Ps(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 "${Xt(t)}" instead of "${t}".`)}let a,c=r[a=Kn(t)]||r[a=Kn(wt(t))];!c&&s&&(c=r[a=Kn(Xt(t))]),c&&St(c,e,6,o);const l=r[a+"Once"];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,St(l,e,6,o)}}function Kc(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(!fe(e)){const c=l=>{const u=Kc(l,t,!0);u&&(a=!0,Be(i,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!s&&!a?(Te(e)&&r.set(e,null),null):(se(s)?s.forEach(c=>i[c]=null):Be(i,s),Te(e)&&r.set(e,i),i)}function Ns(e,t){return!e||!Xr(t)?!1:(t=t.slice(2).replace(/Once$/,""),Oe(e,t[0].toLowerCase()+t.slice(1))||Oe(e,Xt(t))||Oe(e,t))}let Ji=!1;function Ss(){Ji=!0}function Yi(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[s],slots:i,attrs:a,emit:c,render:l,renderCache:u,props:d,data:p,setupState:g,ctx:m,inheritAttrs:b}=e,N=vs(e);let V,M;v.NODE_ENV!=="production"&&(Ji=!1);try{if(n.shapeFlag&4){const C=o||r,H=v.NODE_ENV!=="production"&&g.__isScriptSetup?new Proxy(C,{get(w,de,G){return L(`Property '${String(de)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(w,de,G)}}):C;V=At(l.call(H,C,u,v.NODE_ENV!=="production"?Bt(d):d,g,p,m)),M=a}else{const C=t;v.NODE_ENV!=="production"&&a===d&&Ss(),V=At(C.length>1?C(v.NODE_ENV!=="production"?Bt(d):d,v.NODE_ENV!=="production"?{get attrs(){return Ss(),Bt(a)},slots:i,emit:c}:{attrs:a,slots:i,emit:c}):C(v.NODE_ENV!=="production"?Bt(d):d,null)),M=t.props?a:Im(a)}}catch(C){go.length=0,ro(C,e,1),V=Q(We)}let T=V,z;if(v.NODE_ENV!=="production"&&V.patchFlag>0&&V.patchFlag&2048&&([T,z]=Gc(V)),M&&b!==!1){const C=Object.keys(M),{shapeFlag:H}=T;if(C.length){if(H&7)s&&C.some(Ko)&&(M=$m(M,s)),T=Dt(T,M,!1,!0);else if(v.NODE_ENV!=="production"&&!Ji&&T.type!==We){const w=Object.keys(a),de=[],G=[];for(let I=0,x=w.length;I<x;I++){const D=w[I];Xr(D)?Ko(D)||de.push(D[2].toLowerCase()+D.slice(3)):G.push(D)}G.length&&L(`Extraneous non-props attributes (${G.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),de.length&&L(`Extraneous non-emits event listeners (${de.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"&&!Jc(T)&&L("Runtime directive used on component with non-element root node. The directives will not function as intended."),T=Dt(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&(v.NODE_ENV!=="production"&&!Jc(T)&&L("Component inside <Transition> renders non-element root node that cannot be animated."),T.transition=n.transition),v.NODE_ENV!=="production"&&z?z(T):V=T,vs(N),V}const Gc=e=>{const t=e.children,n=e.dynamicChildren,r=Xi(t,!1);if(r){if(v.NODE_ENV!=="production"&&r.patchFlag>0&&r.patchFlag&2048)return Gc(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[At(r),i]};function Xi(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(Tr(o)){if(o.type!==We||o.children==="v-if"){if(n)return;if(n=o,v.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return Xi(n.children)}}else return}return n}const Im=e=>{let t;for(const n in e)(n==="class"||n==="style"||Xr(n))&&((t||(t={}))[n]=e[n]);return t},$m=(e,t)=>{const n={};for(const r in e)(!Ko(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n},Jc=e=>e.shapeFlag&7||e.type===We;function Dm(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:a,patchFlag:c}=t,l=s.emitsOptions;if(v.NODE_ENV!=="production"&&(o||a)&&Tn||t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Yc(r,i,l):!!i;if(c&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const p=u[d];if(i[p]!==r[p]&&!Ns(l,p))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Yc(r,i,l):!0:!!i;return!1}function Yc(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]&&!Ns(n,s))return!0}return!1}function Am({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 Vm=e=>e.__isSuspense;function Rm(e,t){t&&t.pendingBranch?se(e)?t.effects.push(...e):t.effects.push(e):tc(e)}const Pe=Symbol.for("v-fgt"),mo=Symbol.for("v-txt"),We=Symbol.for("v-cmt"),vo=Symbol.for("v-stc"),go=[];let Ot=null;function S(e=!1){go.push(Ot=e?null:[])}function jm(){go.pop(),Ot=go[go.length-1]||null}let yo=1;function Xc(e){yo+=e,e<0&&Ot&&(Ot.hasOnce=!0)}function Qc(e){return e.dynamicChildren=yo>0?Ot||Nr:null,jm(),yo>0&&Ot&&Ot.push(e),e}function j(e,t,n,r,o,s){return Qc(U(e,t,n,r,o,s,!0))}function He(e,t,n,r,o){return Qc(Q(e,t,n,r,o,!0))}function Tr(e){return e?e.__v_isVNode===!0:!1}function ir(e,t){if(v.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=ps.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 Lm=(...e)=>tu(...e),eu=({key:e})=>e??null,xs=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Re(e)||Ue(e)||fe(e)?{i:Je,r:e,k:t,f:!!n}:e:null);function U(e,t=null,n=null,r=0,o=null,s=e===Pe?0:1,i=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&eu(t),ref:t&&xs(t),scopeId:ms,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:Je};return a?(Qi(c,n),s&128&&e.normalize(c)):n&&(c.shapeFlag|=Re(n)?8:16),v.NODE_ENV!=="production"&&c.key!==c.key&&L("VNode created with invalid key (NaN). VNode type:",c.type),yo>0&&!i&&Ot&&(c.patchFlag>0||s&6)&&c.patchFlag!==32&&Ot.push(c),c}const Q=v.NODE_ENV!=="production"?Lm:tu;function tu(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===gc)&&(v.NODE_ENV!=="production"&&!e&&L(`Invalid vnode type when creating vnode: ${e}.`),e=We),Tr(e)){const a=Dt(e,t,!0);return n&&Qi(a,n),yo>0&&!s&&Ot&&(a.shapeFlag&6?Ot[Ot.indexOf(e)]=a:Ot.push(a)),a.patchFlag=-2,a}if(lu(e)&&(e=e.__vccOpts),t){t=Mm(t);let{class:a,style:c}=t;a&&!Re(a)&&(t.class=Xo(a)),Te(c)&&(ls(c)&&!se(c)&&(c=Be({},c)),t.style=hi(c))}const i=Re(e)?1:Vm(e)?128:gm(e)?64:Te(e)?4:fe(e)?2:0;return v.NODE_ENV!=="production"&&i&4&&ls(e)&&(e=he(e),L("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)),U(e,t,n,r,o,i,s,!0)}function Mm(e){return e?ls(e)||Pc(e)?Be({},e):e:null}function Dt(e,t,n=!1,r=!1){const{props:o,ref:s,patchFlag:i,children:a,transition:c}=e,l=t?ea(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&eu(l),ref:t&&t.ref?n&&s?se(s)?s.concat(xs(t)):[s,xs(t)]:xs(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:v.NODE_ENV!=="production"&&i===-1&&se(a)?a.map(nu):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Pe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Dt(e.ssContent),ssFallback:e.ssFallback&&Dt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&ys(u,c.clone(u)),u}function nu(e){const t=Dt(e);return se(e.children)&&(t.children=e.children.map(nu)),t}function Le(e=" ",t=0){return Q(mo,null,e,t)}function Um(e,t){const n=Q(vo,null,e);return n.staticCount=t,n}function be(e="",t=!1){return t?(S(),He(We,null,e)):Q(We,null,e)}function At(e){return e==null||typeof e=="boolean"?Q(We):se(e)?Q(Pe,null,e.slice()):typeof e=="object"?Pn(e):Q(mo,null,String(e))}function Pn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Dt(e)}function Qi(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(se(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Qi(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Pc(t)?t._ctx=Je:o===3&&Je&&(Je.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else fe(t)?(t={default:t,_ctx:Je},n=32):(t=String(t),r&64?(n=16,t=[Le(t)]):n=8);e.children=t,e.shapeFlag|=n}function ea(...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=Xo([t.class,r.class]));else if(o==="style")t.style=hi([t.style,r.style]);else if(Xr(o)){const s=t[o],i=r[o];i&&s!==i&&!(se(s)&&s.includes(i))&&(t[o]=s?[].concat(s,i):i)}else o!==""&&(t[o]=r[o])}return t}function qt(e,t,n,r=null){St(e,t,7,[n,r])}const Fm=Tc();let Bm=0;function Hm(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Fm,s={uid:Bm++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new wl(!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:$c(r,o),emitsOptions:Kc(r,o),emit:null,emitted:null,propsDefaults:De,inheritAttrs:r.inheritAttrs,ctx:De,data:De,props:De,attrs:De,slots:De,refs:De,setupState:De,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"?s.ctx=Wh(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=Pm.bind(null,s),e.ce&&e.ce(s),s}let ze=null;const Ts=()=>ze||Je;let Cs,ta;{const e=pi(),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)}};Cs=t("__VUE_INSTANCE_SETTERS__",n=>ze=n),ta=t("__VUE_SSR_SETTERS__",n=>ks=n)}const _o=e=>{const t=ze;return Cs(e),e.scope.on(),()=>{e.scope.off(),Cs(t)}},ru=()=>{ze&&ze.scope.off(),Cs(null)},Zm=Yt("slot,component");function na(e,{isNativeTag:t}){(Zm(e)||t(e))&&L("Do not use built-in or reserved HTML elements as component id: "+e)}function ou(e){return e.vnode.shapeFlag&4}let ks=!1;function qm(e,t=!1,n=!1){t&&ta(t);const{props:r,children:o}=e.vnode,s=ou(e);om(e,r,s,t),mm(e,o,n);const i=s?Wm(e,t):void 0;return t&&ta(!1),i}function Wm(e,t){var n;const r=e.type;if(v.NODE_ENV!=="production"){if(r.name&&na(r.name,e.appContext.config),r.components){const s=Object.keys(r.components);for(let i=0;i<s.length;i++)na(s[i],e.appContext.config)}if(r.directives){const s=Object.keys(r.directives);for(let i=0;i<s.length;i++)uc(s[i])}r.compilerOptions&&zm()&&L('"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,wc),v.NODE_ENV!=="production"&&zh(e);const{setup:o}=r;if(o){const s=e.setupContext=o.length>1?Gm(e):null,i=_o(e);Qt();const a=on(o,e,0,[v.NODE_ENV!=="production"?Bt(e.props):e.props,s]);if(en(),i(),ui(a)){if(a.then(ru,ru),t)return a.then(c=>{su(e,c,t)}).catch(c=>{ro(c,e,0)});if(e.asyncDep=a,v.NODE_ENV!=="production"&&!e.suspense){const c=(n=r.name)!=null?n:"Anonymous";L(`Component <${c}>: 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 su(e,a,t)}else iu(e,t)}function su(e,t,n){fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Te(t)?(v.NODE_ENV!=="production"&&Tr(t)&&L("setup() should not return VNodes directly - return a render function instead."),v.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=Gl(t),v.NODE_ENV!=="production"&&Kh(e)):v.NODE_ENV!=="production"&&t!==void 0&&L(`setup() should return an object. Received: ${t===null?"null":typeof t}`),iu(e,n)}let ra;const zm=()=>!ra;function iu(e,t,n){const r=e.type;if(!e.render){if(!t&&ra&&!r.render){const o=r.template||Fi(e).template;if(o){v.NODE_ENV!=="production"&&an(e,"compile");const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:c}=r,l=Be(Be({isCustomElement:s,delimiters:a},i),c);r.render=ra(o,l),v.NODE_ENV!=="production"&&ln(e,"compile")}}e.render=r.render||Ze}{const o=_o(e);Qt();try{Jh(e)}finally{en(),o()}}v.NODE_ENV!=="production"&&!r.render&&e.render===Ze&&!t&&(r.template?L('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".'):L("Component is missing template or render function: ",r))}const au=v.NODE_ENV!=="production"?{get(e,t){return Ss(),rt(e,"get",""),e[t]},set(){return L("setupContext.attrs is readonly."),!1},deleteProperty(){return L("setupContext.attrs is readonly."),!1}}:{get(e,t){return rt(e,"get",""),e[t]}};function Km(e){return new Proxy(e.slots,{get(t,n){return rt(e,"get","$slots"),t[n]}})}function Gm(e){const t=n=>{if(v.NODE_ENV!=="production"&&(e.exposed&&L("expose() should be called only once per setup()."),n!=null)){let r=typeof n;r==="object"&&(se(n)?r="array":Ue(n)&&(r="ref")),r!=="object"&&L(`expose() should be passed a plain object, received ${r}.`)}e.exposed=n||{}};if(v.NODE_ENV!=="production"){let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,au))},get slots(){return r||(r=Km(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,au),slots:e.slots,emit:e.emit,expose:t}}function oa(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Gl(Sn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in tr)return tr[n](e)},has(t,n){return n in t||n in tr}})):e.proxy}const Jm=/(?:^|[-_])(\w)/g,Ym=e=>e.replace(Jm,t=>t.toUpperCase()).replace(/[-_]/g,"");function sa(e,t=!0){return fe(e)?e.displayName||e.name:e.name||t&&e.__name}function Ps(e,t,n=!1){let r=sa(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?Ym(r):n?"App":"Anonymous"}function lu(e){return fe(e)&&"__vccOpts"in e}const Y=(e,t)=>{const n=th(e,t,ks);if(v.NODE_ENV!=="production"){const r=Ts();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function $e(e,t,n){const r=arguments.length;return r===2?Te(t)&&!se(t)?Tr(t)?Q(e,null,[t]):Q(e,t):Q(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Tr(n)&&(n=[n]),Q(e,t,n))}function Xm(){if(v.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 Te(d)?d.__isVue?["div",e,"VueInstance"]:Ue(d)?["div",{},["span",e,u(d)],"<",a(d.value),">"]:tn(d)?["div",{},["span",e,rn(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${nn(d)?" (readonly)":""}`]:nn(d)?["div",{},["span",e,rn(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 p=[];d.type.props&&d.props&&p.push(i("props",he(d.props))),d.setupState!==De&&p.push(i("setup",d.setupState)),d.data!==De&&p.push(i("data",he(d.data)));const g=c(d,"computed");g&&p.push(i("computed",g));const m=c(d,"inject");return m&&p.push(i("injected",m)),p.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),p}function i(d,p){return p=Be({},p),Object.keys(p).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(p).map(g=>["div",{},["span",r,g+": "],a(p[g],!1)])]]:["span",{}]}function a(d,p=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",n,JSON.stringify(d)]:typeof d=="boolean"?["span",r,d]:Te(d)?["object",{object:p?he(d):d}]:["span",n,String(d)]}function c(d,p){const g=d.type;if(fe(g))return;const m={};for(const b in d.ctx)l(g,b,p)&&(m[b]=d.ctx[b]);return m}function l(d,p,g){const m=d[g];if(se(m)&&m.includes(p)||Te(m)&&p in m||d.extends&&l(d.extends,p,g)||d.mixins&&d.mixins.some(b=>l(b,p,g)))return!0}function u(d){return rn(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const cu="3.4.38",In=v.NODE_ENV!=="production"?L:Ze;var cn={};const Qm="http://www.w3.org/2000/svg",ev="http://www.w3.org/1998/Math/MathML",un=typeof document<"u"?document:null,uu=un&&un.createElement("template"),tv={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"?un.createElementNS(Qm,e):t==="mathml"?un.createElementNS(ev,e):n?un.createElement(e,{is:n}):un.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>un.createTextNode(e),createComment:e=>un.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>un.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{uu.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const a=uu.content;if(r==="svg"||r==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},$n="transition",bo="animation",wo=Symbol("_vtc"),Is=(e,{slots:t})=>$e(Dh,nv(e),t);Is.displayName="Transition";const du={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};Is.props=Be({},dc,du);const ar=(e,t=[])=>{se(e)?e.forEach(n=>n(...t)):e&&e(...t)},fu=e=>e?se(e)?e.some(t=>t.length>1):e.length>1:!1;function nv(e){const t={};for(const D in e)D in du||(t[D]=e[D]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:l=i,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=e,m=rv(o),b=m&&m[0],N=m&&m[1],{onBeforeEnter:V,onEnter:M,onEnterCancelled:T,onLeave:z,onLeaveCancelled:C,onBeforeAppear:H=V,onAppear:w=M,onAppearCancelled:de=T}=t,G=(D,re,_)=>{lr(D,re?u:a),lr(D,re?l:i),_&&_()},I=(D,re)=>{D._isLeaving=!1,lr(D,d),lr(D,g),lr(D,p),re&&re()},x=D=>(re,_)=>{const k=D?w:M,te=()=>G(re,D,_);ar(k,[re,te]),pu(()=>{lr(re,D?c:s),Dn(re,D?u:a),fu(k)||hu(re,r,b,te)})};return Be(t,{onBeforeEnter(D){ar(V,[D]),Dn(D,s),Dn(D,i)},onBeforeAppear(D){ar(H,[D]),Dn(D,c),Dn(D,l)},onEnter:x(!1),onAppear:x(!0),onLeave(D,re){D._isLeaving=!0;const _=()=>I(D,re);Dn(D,d),Dn(D,p),iv(),pu(()=>{D._isLeaving&&(lr(D,d),Dn(D,g),fu(z)||hu(D,r,N,_))}),ar(z,[D,_])},onEnterCancelled(D){G(D,!1),ar(T,[D])},onAppearCancelled(D){G(D,!0),ar(de,[D])},onLeaveCancelled(D){I(D),ar(C,[D])}})}function rv(e){if(e==null)return null;if(Te(e))return[ia(e.enter),ia(e.leave)];{const t=ia(e);return[t,t]}}function ia(e){const t=_p(e);return cn.NODE_ENV!=="production"&&fh(t,"<transition> explicit duration"),t}function Dn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[wo]||(e[wo]=new Set)).add(t)}function lr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[wo];n&&(n.delete(t),n.size||(e[wo]=void 0))}function pu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ov=0;function hu(e,t,n,r){const o=e._endId=++ov,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:i,timeout:a,propCount:c}=sv(e,t);if(!i)return r();const l=i+"end";let u=0;const d=()=>{e.removeEventListener(l,p),s()},p=g=>{g.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},a+1),e.addEventListener(l,p)}function sv(e,t){const n=window.getComputedStyle(e),r=m=>(n[m]||"").split(", "),o=r(`${$n}Delay`),s=r(`${$n}Duration`),i=mu(o,s),a=r(`${bo}Delay`),c=r(`${bo}Duration`),l=mu(a,c);let u=null,d=0,p=0;t===$n?i>0&&(u=$n,d=i,p=s.length):t===bo?l>0&&(u=bo,d=l,p=c.length):(d=Math.max(i,l),u=d>0?i>l?$n:bo:null,p=u?u===$n?s.length:c.length:0);const g=u===$n&&/\b(transform|all)(,|$)/.test(r(`${$n}Property`).toString());return{type:u,timeout:d,propCount:p,hasTransform:g}}function mu(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>vu(n)+vu(e[r])))}function vu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function iv(){return document.body.offsetHeight}function av(e,t,n){const r=e[wo];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const gu=Symbol("_vod"),lv=Symbol("_vsh"),cv=Symbol(cn.NODE_ENV!=="production"?"CSS_VAR_TEXT":""),uv=/(^|;)\s*display\s*:/;function dv(e,t,n){const r=e.style,o=Re(n);let s=!1;if(n&&!o){if(t)if(Re(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&$s(r,a,"")}else for(const i in t)n[i]==null&&$s(r,i,"");for(const i in n)i==="display"&&(s=!0),$s(r,i,n[i])}else if(o){if(t!==n){const i=r[cv];i&&(n+=";"+i),r.cssText=n,s=uv.test(n)}}else t&&e.removeAttribute("style");gu in e&&(e[gu]=s?r.display:"",e[lv]&&(r.display="none"))}const fv=/[^\\];\s*$/,yu=/\s*!important$/;function $s(e,t,n){if(se(n))n.forEach(r=>$s(e,t,r));else if(n==null&&(n=""),cn.NODE_ENV!=="production"&&fv.test(n)&&In(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const r=pv(e,t);yu.test(n)?e.setProperty(Xt(r),n.replace(yu,""),"important"):e[r]=n}}const _u=["Webkit","Moz","ms"],aa={};function pv(e,t){const n=aa[t];if(n)return n;let r=wt(t);if(r!=="filter"&&r in e)return aa[t]=r;r=zn(r);for(let o=0;o<_u.length;o++){const s=_u[o]+r;if(s in e)return aa[t]=s}return t}const bu="http://www.w3.org/1999/xlink";function wu(e,t,n,r,o,s=Pp(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(bu,t.slice(6,t.length)):e.setAttributeNS(bu,t,n):n==null||s&&!yl(n)?e.removeAttribute(t):e.setAttribute(t,s?"":wn(n)?String(n):n)}function hv(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=yl(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch(i){cn.NODE_ENV!=="production"&&!s&&In(`Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${n} is invalid.`,i)}s&&e.removeAttribute(t)}function mv(e,t,n,r){e.addEventListener(t,n,r)}function vv(e,t,n,r){e.removeEventListener(t,n,r)}const Eu=Symbol("_vei");function gv(e,t,n,r,o=null){const s=e[Eu]||(e[Eu]={}),i=s[t];if(r&&i)i.value=cn.NODE_ENV!=="production"?Nu(r,t):r;else{const[a,c]=yv(t);if(r){const l=s[t]=wv(cn.NODE_ENV!=="production"?Nu(r,t):r,o);mv(e,a,l,c)}else i&&(vv(e,a,i,c),s[t]=void 0)}}const Ou=/(?:Once|Passive|Capture)$/;function yv(e){let t;if(Ou.test(e)){t={};let r;for(;r=e.match(Ou);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Xt(e.slice(2)),t]}let la=0;const _v=Promise.resolve(),bv=()=>la||(_v.then(()=>la=0),la=Date.now());function wv(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;St(Ev(r,n.value),t,5,[r])};return n.value=e,n.attached=bv(),n}function Nu(e,t){return fe(e)||se(e)?e:(In(`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}.`),Ze)}function Ev(e,t){if(se(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 Su=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ov=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?av(e,r,i):t==="style"?dv(e,n,r):Xr(t)?Ko(t)||gv(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Nv(e,t,r,i))?(hv(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&wu(e,t,r,i,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),wu(e,t,r,i))};function Nv(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Su(t)&&fe(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 Su(t)&&Re(n)?!1:t in e}const Sv=["ctrl","shift","alt","meta"],xv={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)=>Sv.some(n=>e[`${n}Key`]&&!t.includes(n))},Tv=(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=xv[t[i]];if(a&&a(o,t))return}return e(o,...s)})},Cv=Be({patchProp:Ov},tv);let xu;function kv(){return xu||(xu=Em(Cv))}const Pv=(...e)=>{const t=kv().createApp(...e);cn.NODE_ENV!=="production"&&($v(t),Dv(t));const{mount:n}=t;return t.mount=r=>{const o=Av(r);if(!o)return;const s=t._component;!fe(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.innerHTML="";const i=n(o,!1,Iv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function Iv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function $v(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>Tp(t)||Cp(t)||kp(t),writable:!1})}function Dv(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){In("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 In(r),n},set(){In(r)}})}}function Av(e){if(Re(e)){const t=document.querySelector(e);return cn.NODE_ENV!=="production"&&!t&&In(`Failed to mount app: mount target selector "${e}" returned null.`),t}return cn.NODE_ENV!=="production"&&window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&In('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}var Vv={};function Rv(){Xm()}Vv.NODE_ENV!=="production"&&Rv();let Ds;const jv=new Uint8Array(16);function Lv(){if(!Ds&&(Ds=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ds))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ds(jv)}const ot=[];for(let e=0;e<256;++e)ot.push((e+256).toString(16).slice(1));function Mv(e,t=0){return ot[e[t+0]]+ot[e[t+1]]+ot[e[t+2]]+ot[e[t+3]]+"-"+ot[e[t+4]]+ot[e[t+5]]+"-"+ot[e[t+6]]+ot[e[t+7]]+"-"+ot[e[t+8]]+ot[e[t+9]]+"-"+ot[e[t+10]]+ot[e[t+11]]+ot[e[t+12]]+ot[e[t+13]]+ot[e[t+14]]+ot[e[t+15]]}const Tu={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ca(e,t,n){if(Tu.randomUUID&&!t&&!e)return Tu.randomUUID();e=e||{};const r=e.random||(e.rng||Lv)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Mv(r)}var cr=Symbol("storefront");function Uv(e,t=100){let n=0;return async(...o)=>{clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}var As=class lt{constructor(t,n,r){this.configuration=t,this.client=n,this.stateFactory=r,this.hasUtm=Y(()=>!!this.utm.value&&Object.values(this.utm.value).some(c=>!!c)),this.currentUser=B(null),this.loadedUser=B(!1),this.debouncedPushOrderContent=Uv(c=>this.client.orders.pushContent(c,void 0,this.hasUtm.value?this.utm.value:void 0),500);var o;if(typeof window>"u"){this.currentOrder=B({id:ca(),status:Yr.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",c=>this.handleStorageUpdate(c));const i=localStorage.getItem(lt.sessionKey);i?(console.log("Found cached session:",i),this.currentOrder=B(JSON.parse(i)),this.refreshOrder()):(console.log("No cached session found"),this.currentOrder=B({id:ca(),status:Yr.Open,currency:"",items:[],couponsApplied:[]}));const a=localStorage.getItem(lt.storefrontKey);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.updateStorefront(),this.updateUser()}get loadedStorefrontPromise(){return new Promise(t=>{Ye(this.loadedStorefront,n=>{n&&t()},{immediate:!0})})}get loadedUserPromise(){return new Promise(t=>{Ye(this.loadedUser,n=>{n&&t()},{immediate:!0})})}install(t){t.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(t){t instanceof oi||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!==Yr.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:ca(),currency:((t=this.storefront.value)==null?void 0:t.suggestedCurrency)||"",status:Yr.Open,items:[],couponsApplied:[]},typeof window<"u"&&localStorage.removeItem(lt.sessionKey)}};As.userKey="moonbase_user",As.sessionKey="moonbase_session",As.storefrontKey="moonbase_storefront";var Fv=As;function Cu(e,t){const n=t??Ce(cr);if(!n)throw new Error("No storefront configured");return Y(()=>n.storefront.value.bundles.find(r=>r.id===e)||null)}function ku(e,t){const n=t??Ce(cr);if(!n)throw new Error("No storefront configured");return Y(()=>n.storefront.value.products.find(r=>r.id===e)||null)}function ua(e){const t=Ce(cr);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),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 Bv(e,t){const n=Ce(cr),r=oh(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),c=n.stateFactory(`activation-request-${r}-completing`,!1),l=n.stateFactory(`activation-request-${r}-completion-timeout`,null),u=async()=>{await n.client.activationRequests.isCompleted(r)&&o.value?(o.value.status=Mt.Completed,c.value=!1):l.value=setTimeout(u,1500)};return r&&r.length>0?n.client.activationRequests.get(r).then(d=>{o.value=d,o.value.status===Mt.Fulfilled&&(c.value=!0,u()),i.value=!1}).catch(d=>{s.value=d,i.value=!1}):(s.value=new Error("Missing request id"),i.value=!1),Vi(()=>{l.value&&clearTimeout(l.value)}),Ye(n.currentUser,async()=>{var d,p;if(!(!r||(p=(d=o.value)==null?void 0:d.licenseEligibility)!=null&&p.eligible)){i.value=!0;try{o.value=await n.client.activationRequests.get(r),o.value.status===Mt.Fulfilled&&(c.value=!0,u())}catch(g){s.value=g}i.value=!1}}),{activationRequest:o,loading:i,fulfilling:a,completing:c,error:s,isInstalled:Y(()=>{var d;return o&&((d=o.value)==null?void 0:d.status)===Mt.Completed}),fulfillLicense:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillLicense(r),a.value=!1,c.value=!0,u()},fulfillTrial:async()=>{a.value=!0,o.value=await n.client.activationRequests.fulfillTrial(r),a.value=!1,c.value=!0,u()},cancel:async()=>{var d;((d=o.value)==null?void 0:d.status)!==Mt.Cancelled&&(o.value=await n.client.activationRequests.cancel(r))}}}function da(e){const t=e??Ce(cr);if(!t)throw new Error("No storefront configured");return{items:Y(()=>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:Y(()=>t.currentOrder.value.currency||t.storefront.value.suggestedCurrency),total:Y(()=>{const n=t.currentOrder.value.currency||t.storefront.value.suggestedCurrency;return{amount:t.currentOrder.value.items.reduce((o,s)=>{var i,a,c,l,u,d;let p;if(s.type==="Product"){const g=t.storefront.value.products.find(N=>N.id===s.productId),b=((g==null?void 0:g.variations)||[]).find(N=>N.id===s.variationId);p=(c=(a=b==null?void 0:b.price[n])!=null?a:(i=g==null?void 0:g.defaultVariation)==null?void 0:i.price[n])!=null?c:0}else{const g=t.storefront.value.bundles.find(N=>N.id===s.bundleId),b=((g==null?void 0:g.variations)||[]).find(N=>N.id===s.variationId);p=(d=(u=b==null?void 0:b.price[n])!=null?u:(l=g==null?void 0:g.defaultVariation)==null?void 0:l.price[n])!=null?d:0}return o+p*s.quantity},0),currency:n}}),addToCart:(n,r)=>{if(n=O(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(t.currentOrder.value=o,o.checkoutUrl&&typeof window<"u")window.location.href=o.checkoutUrl;else throw new Error("No checkout URL found")}}}function Cr(e){const t=e??Ce(cr);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,c)=>{const l=await t.client.identity.signUp(n,r,o,s,i,a,c);return t.currentUser.value=l,t.updateStorefront(),l},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)}}function Hv(e,t){const n={endpoint:e};return new Fv(n,new fp(n),(r,o)=>B(o))}var Pu=!1;function Vs(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 fa(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Zv(){return Iu().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Iu(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const qv=typeof Proxy=="function",Wv="devtools-plugin:setup",zv="plugin:settings:set";let kr,pa;function Kv(){var e;return kr!==void 0||(typeof window<"u"&&window.performance?(kr=!0,pa=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(kr=!0,pa=globalThis.perf_hooks.performance):kr=!1),kr}function Gv(){return Kv()?pa.now():Date.now()}class Jv{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 Gv()}},n&&n.on(zv,(i,a)=>{i===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(i,a)=>this.target?this.target.on[a]:(...c)=>{this.onQueue.push({method:a,args:c})}}),this.proxiedTarget=new Proxy({},{get:(i,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...c)=>(this.targetQueue.push({method:a,args:c,resolve:()=>{}}),this.fallbacks[a](...c)):(...c)=>new Promise(l=>{this.targetQueue.push({method:a,args:c,resolve:l})})})}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 $u(e,t){const n=e,r=Iu(),o=Zv(),s=qv&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))o.emit(Wv,e,t);else{const i=s?new Jv(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}var Se={};let Eo;const Oo=e=>Eo=e,Du=Se.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ur(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Wt;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Wt||(Wt={}));const dr=typeof window<"u",Au=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 Yv(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 ha(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){ju(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Vu(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Rs(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 js=typeof navigator=="object"?navigator:{userAgent:""},Ru=/Macintosh/.test(js.userAgent)&&/AppleWebKit/.test(js.userAgent)&&!/Safari/.test(js.userAgent),ju=dr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Ru?Xv:"msSaveOrOpenBlob"in js?Qv:eg:()=>{};function Xv(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?Vu(r.href)?ha(e,t,n):(r.target="_blank",Rs(r)):Rs(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Rs(r)},0))}function Qv(e,t="download",n){if(typeof e=="string")if(Vu(e))ha(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){Rs(r)})}else navigator.msSaveOrOpenBlob(Yv(e,n),t)}function eg(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return ha(e,t,n);const o=e.type==="application/octet-stream",s=/constructor/i.test(String(Au.HTMLElement))||"safari"in Au,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||o&&s||Ru)&&typeof FileReader<"u"){const a=new FileReader;a.onloadend=function(){let c=a.result;if(typeof c!="string")throw r=null,new Error("Wrong reader.result type");c=i?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=c:location.assign(c),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 et(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 ma(e){return"_a"in e&&"install"in e}function Lu(){if(!("clipboard"in navigator))return et("Your browser doesn't support the Clipboard API","error"),!0}function Mu(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(et('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function tg(e){if(!Lu())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),et("Global state copied to clipboard.")}catch(t){if(Mu(t))return;et("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function ng(e){if(!Lu())try{Uu(e,JSON.parse(await navigator.clipboard.readText())),et("Global state pasted from clipboard.")}catch(t){if(Mu(t))return;et("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function rg(e){try{ju(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){et("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let dn;function og(){dn||(dn=document.createElement("input"),dn.type="file",dn.accept=".json");function e(){return new Promise((t,n)=>{dn.onchange=async()=>{const r=dn.files;if(!r)return t(null);const o=r.item(0);return t(o?{text:await o.text(),file:o}:null)},dn.oncancel=()=>t(null),dn.onerror=n,dn.click()})}return e}async function sg(e){try{const n=await og()();if(!n)return;const{text:r,file:o}=n;Uu(e,JSON.parse(r)),et(`Global state imported from "${o.name}".`)}catch(t){et("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Uu(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 Vt(e){return{_custom:{display:e}}}const Fu="🍍 Pinia (root)",Ls="_root";function ig(e){return ma(e)?{id:Ls,label:Fu}:{id:e.$id,label:e.$id}}function ag(e){if(ma(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,c)=>(a[c]=i[c],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 lg(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:Vt(e.type),key:Vt(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function cg(e){switch(e){case Wt.direct:return"mutation";case Wt.patchFunction:return"$patch";case Wt.patchObject:return"$patch";default:return"unknown"}}let Pr=!0;const Ms=[],fr="pinia:mutations",pt="pinia",{assign:ug}=Object,Us=e=>"🍍 "+e;function dg(e,t){$u({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ms,app:e},n=>{typeof n.now!="function"&&et("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:fr,label:"Pinia 🍍",color:15064968}),n.addInspector({id:pt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{tg(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await ng(t),n.sendInspectorTree(pt),n.sendInspectorState(pt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{rg(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await sg(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"?et(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(o.$reset(),et(`Store "${r}" reset.`)):et(`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:Us(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:he(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((c,l)=>(c[l]=a.$state[l],c),{})}),a._getters&&a._getters.length&&r.instanceData.state.push({type:Us(a.$id),key:"getters",editable:!1,value:a._getters.reduce((c,l)=>{try{c[l]=a[l]}catch(u){c[l]=u}return c},{})})})}}),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()):Fu.toLowerCase().includes(r.filter.toLowerCase())):o).map(ig)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===pt){const o=r.nodeId===Ls?t:t._s.get(r.nodeId);if(!o)return;o&&(r.nodeId!==Ls&&(globalThis.$store=he(o)),r.state=ag(o))}}),n.on.editInspectorState((r,o)=>{if(r.app===e&&r.inspectorId===pt){const s=r.nodeId===Ls?t:t._s.get(r.nodeId);if(!s)return et(`store "${r.nodeId}" not found`,"error");const{path:i}=r;ma(s)?i.unshift("state"):(i.length!==1||!s._customProperties.has(i[0])||i[0]in s.$state)&&i.unshift("$state"),Pr=!1,r.set(s,i,r.state.value),Pr=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const o=r.type.replace(/^🍍\s*/,""),s=t._s.get(o);if(!s)return et(`store "${o}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return et(`Invalid path for store "${o}":
|
|
17
|
+
${i}
|
|
18
|
+
Only state can be modified.`);i[0]="$state",Pr=!1,r.set(s,i,r.state.value),Pr=!0}})})}function fg(e,t){Ms.includes(Us(t.$id))||Ms.push(Us(t.$id)),$u({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ms,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:a,name:c,args:l})=>{const u=Bu++;n.addTimelineEvent({layerId:fr,event:{time:r(),title:"🛫 "+c,subtitle:"start",data:{store:Vt(t.$id),action:Vt(c),args:l},groupId:u}}),i(d=>{An=void 0,n.addTimelineEvent({layerId:fr,event:{time:r(),title:"🛬 "+c,subtitle:"end",data:{store:Vt(t.$id),action:Vt(c),args:l,result:d},groupId:u}})}),a(d=>{An=void 0,n.addTimelineEvent({layerId:fr,event:{time:r(),logType:"error",title:"💥 "+c,subtitle:"end",data:{store:Vt(t.$id),action:Vt(c),args:l,error:d},groupId:u}})})},!0),t._customProperties.forEach(i=>{Ye(()=>O(t[i]),(a,c)=>{n.notifyComponentUpdate(),n.sendInspectorState(pt),Pr&&n.addTimelineEvent({layerId:fr,event:{time:r(),title:"Change",subtitle:i,data:{newValue:a,oldValue:c},groupId:An}})},{deep:!0})}),t.$subscribe(({events:i,type:a},c)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(pt),!Pr)return;const l={time:r(),title:cg(a),data:ug({store:Vt(t.$id)},lg(i)),groupId:An};a===Wt.patchFunction?l.subtitle="⤵️":a===Wt.patchObject?l.subtitle="🧩":i&&!Array.isArray(i)&&(l.subtitle=i.type),i&&(l.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:fr,event:l})},{detached:!0,flush:"sync"});const o=t._hotUpdate;t._hotUpdate=Sn(i=>{o(i),n.addTimelineEvent({layerId:fr,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:Vt(t.$id),info:Vt("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt)});const{$dispose:s}=t;t.$dispose=()=>{s(),n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&et(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(pt),n.sendInspectorState(pt),n.getSettings().logStoreChanges&&et(`"${t.$id}" store installed 🆕`)})}let Bu=0,An;function Hu(e,t,n){const r=t.reduce((o,s)=>(o[s]=he(e)[s],o),{});for(const o in r)e[o]=function(){const s=Bu,i=n?new Proxy(e,{get(...c){return An=s,Reflect.get(...c)},set(...c){return An=s,Reflect.set(...c)}}):e;An=s;const a=r[o].apply(i,arguments);return An=void 0,a}}function pg({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Hu(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;he(t)._hotUpdate=function(o){r.apply(this,arguments),Hu(t,Object.keys(o._hmrPayload.actions),!!t._isOptionsAPI)}}fg(e,t)}}function hg(){const e=El(!0),t=e.run(()=>B({}));let n=[],r=[];const o=Sn({install(s){Oo(o),o._a=s,s.provide(Du,o),s.config.globalProperties.$pinia=o,Se.NODE_ENV!=="production"&&Se.NODE_ENV!=="test"&&dr&&dg(s,o),r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!Pu?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return Se.NODE_ENV!=="production"&&Se.NODE_ENV!=="test"&&typeof Proxy<"u"&&o.use(pg),o}function Zu(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const o=e[n];ur(o)&&ur(r)&&!Ue(r)&&!tn(r)?e[n]=Zu(o,r):e[n]=r}return e}const qu=()=>{};function Wu(e,t,n,r=qu){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&Ol()&&$p(o),o}function Ir(e,...t){e.slice().forEach(n=>{n(...t)})}const mg=e=>e(),zu=Symbol(),va=Symbol();function ga(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];ur(o)&&ur(r)&&e.hasOwnProperty(n)&&!Ue(r)&&!tn(r)?e[n]=ga(o,r):e[n]=r}return e}const vg=Se.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function gg(e){return!ur(e)||!e.hasOwnProperty(vg)}const{assign:Tt}=Object;function Ku(e){return!!(Ue(e)&&e.effect)}function Gu(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let c;function l(){!a&&(Se.NODE_ENV==="production"||!r)&&(n.state.value[e]=o?o():{});const u=Se.NODE_ENV!=="production"&&r?Jl(B(o?o():{}).value):Jl(n.state.value[e]);return Tt(u,s,Object.keys(i||{}).reduce((d,p)=>(Se.NODE_ENV!=="production"&&p in u&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`),d[p]=Sn(Y(()=>{Oo(n);const g=n._s.get(e);return i[p].call(g,g)})),d),{}))}return c=ya(e,l,t,n,r,!0),c}function ya(e,t,n={},r,o,s){let i;const a=Tt({actions:{}},n);if(Se.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const c={deep:!0};Se.NODE_ENV!=="production"&&!Pu&&(c.onTrigger=I=>{l?g=I:l==!1&&!w._hotUpdating&&(Array.isArray(g)?g.push(I):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let l,u,d=[],p=[],g;const m=r.state.value[e];!s&&!m&&(Se.NODE_ENV==="production"||!o)&&(r.state.value[e]={});const b=B({});let N;function V(I){let x;l=u=!1,Se.NODE_ENV!=="production"&&(g=[]),typeof I=="function"?(I(r.state.value[e]),x={type:Wt.patchFunction,storeId:e,events:g}):(ga(r.state.value[e],I),x={type:Wt.patchObject,payload:I,storeId:e,events:g});const D=N=Symbol();so().then(()=>{N===D&&(l=!0)}),u=!0,Ir(d,x,r.state.value[e])}const M=s?function(){const{state:x}=n,D=x?x():{};this.$patch(re=>{Tt(re,D)})}:Se.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:qu;function T(){i.stop(),d=[],p=[],r._s.delete(e)}const z=(I,x="")=>{if(zu in I)return I[va]=x,I;const D=function(){Oo(r);const re=Array.from(arguments),_=[],k=[];function te(le){_.push(le)}function ie(le){k.push(le)}Ir(p,{args:re,name:D[va],store:w,after:te,onError:ie});let ne;try{ne=I.apply(this&&this.$id===e?this:w,re)}catch(le){throw Ir(k,le),le}return ne instanceof Promise?ne.then(le=>(Ir(_,le),le)).catch(le=>(Ir(k,le),Promise.reject(le))):(Ir(_,ne),ne)};return D[zu]=!0,D[va]=x,D},C=Sn({actions:{},getters:{},state:[],hotState:b}),H={_p:r,$id:e,$onAction:Wu.bind(null,p),$patch:V,$reset:M,$subscribe(I,x={}){const D=Wu(d,I,x.detached,()=>re()),re=i.run(()=>Ye(()=>r.state.value[e],_=>{(x.flush==="sync"?u:l)&&I({storeId:e,type:Wt.direct,events:g},_)},Tt({},c,x)));return D},$dispose:T},w=to(Se.NODE_ENV!=="production"||Se.NODE_ENV!=="production"&&Se.NODE_ENV!=="test"&&dr?Tt({_hmrPayload:C,_customProperties:Sn(new Set)},H):H);r._s.set(e,w);const G=(r._a&&r._a.runWithContext||mg)(()=>r._e.run(()=>(i=El()).run(()=>t({action:z}))));for(const I in G){const x=G[I];if(Ue(x)&&!Ku(x)||tn(x))Se.NODE_ENV!=="production"&&o?Vs(b.value,I,Ni(G,I)):s||(m&&gg(x)&&(Ue(x)?x.value=m[I]:ga(x,m[I])),r.state.value[e][I]=x),Se.NODE_ENV!=="production"&&C.state.push(I);else if(typeof x=="function"){const D=Se.NODE_ENV!=="production"&&o?x:z(x,I);G[I]=D,Se.NODE_ENV!=="production"&&(C.actions[I]=x),a.actions[I]=x}else Se.NODE_ENV!=="production"&&Ku(x)&&(C.getters[I]=s?n.getters[I]:x,dr&&(G._getters||(G._getters=Sn([]))).push(I))}if(Tt(w,G),Tt(he(w),G),Object.defineProperty(w,"$state",{get:()=>Se.NODE_ENV!=="production"&&o?b.value:r.state.value[e],set:I=>{if(Se.NODE_ENV!=="production"&&o)throw new Error("cannot set hotState");V(x=>{Tt(x,I)})}}),Se.NODE_ENV!=="production"&&(w._hotUpdate=Sn(I=>{w._hotUpdating=!0,I._hmrPayload.state.forEach(x=>{if(x in w.$state){const D=I.$state[x],re=w.$state[x];typeof D=="object"&&ur(D)&&ur(re)?Zu(D,re):I.$state[x]=re}Vs(w,x,Ni(I.$state,x))}),Object.keys(w.$state).forEach(x=>{x in I.$state||fa(w,x)}),l=!1,u=!1,r.state.value[e]=Ni(I._hmrPayload,"hotState"),u=!0,so().then(()=>{l=!0});for(const x in I._hmrPayload.actions){const D=I[x];Vs(w,x,z(D,x))}for(const x in I._hmrPayload.getters){const D=I._hmrPayload.getters[x],re=s?Y(()=>(Oo(r),D.call(w,w))):D;Vs(w,x,re)}Object.keys(w._hmrPayload.getters).forEach(x=>{x in I._hmrPayload.getters||fa(w,x)}),Object.keys(w._hmrPayload.actions).forEach(x=>{x in I._hmrPayload.actions||fa(w,x)}),w._hmrPayload=I._hmrPayload,w._getters=I._getters,w._hotUpdating=!1})),Se.NODE_ENV!=="production"&&Se.NODE_ENV!=="test"&&dr){const I={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(x=>{Object.defineProperty(w,x,Tt({value:w[x]},I))})}return r._p.forEach(I=>{if(Se.NODE_ENV!=="production"&&Se.NODE_ENV!=="test"&&dr){const x=i.run(()=>I({store:w,app:r._a,pinia:r,options:a}));Object.keys(x||{}).forEach(D=>w._customProperties.add(D)),Tt(w,x)}else Tt(w,i.run(()=>I({store:w,app:r._a,pinia:r,options:a})))}),Se.NODE_ENV!=="production"&&w.$state&&typeof w.$state=="object"&&typeof w.$state.constructor=="function"&&!w.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
19
|
+
state: () => new MyClass()
|
|
20
|
+
Found in store "${w.$id}".`),m&&s&&n.hydrate&&n.hydrate(w.$state,m),l=!0,u=!0,w}function yg(e,t,n){let r,o;const s=typeof t=="function";r=e,o=s?n:t;function i(a,c){const l=rm();if(a=(Se.NODE_ENV==="test"&&Eo&&Eo._testing?null:a)||(l?Ce(Du,null):null),a&&Oo(a),Se.NODE_ENV!=="production"&&!Eo)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
|
+
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
22
|
+
This will fail in production.`);a=Eo,a._s.has(r)||(s?ya(r,t,o,a):Gu(r,o,a),Se.NODE_ENV!=="production"&&(i._pinia=a));const u=a._s.get(r);if(Se.NODE_ENV!=="production"&&c){const d="__hot:"+r,p=s?ya(d,t,o,a,!0):Gu(d,Tt({},o),a,!0);c._hotUpdate(p),delete a.state.value[d],a._s.delete(d)}if(Se.NODE_ENV!=="production"&&dr){const d=Ts();if(d&&d.proxy&&!c){const p=d.proxy,g="_pStores"in p?p._pStores:p._pStores={};g[r]=u}}return u}return i.$id=r,i}var Me=(e=>(e.SignIn="sign_in",e.SignUp="sign_up",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))(Me||{});const _g={toolbar:{enabled:!0,location:"bottom-right",show:{cart:!0,account:!0}}},_a=Symbol("options");var Ke=(e=>(e.None="None",e.Authentication="Authentication",e.Customer="Customer",e.Cart="Cart",e.Activation="Activation",e.Download="Download",e))(Ke||{});const st=yg("ui",()=>{const e=B("None"),t=B(null),n=B(null),r=B(null);function o(l,u,d){n.value=d??null,t.value=u,e.value=l}function s(l,u,d){r.value=[l,u,d]}function i(){e.value="None",n.value=null,r.value=null}function a(){const l=r.value;i(),so(()=>{if(l){const[u,d,p]=l;n.value=p??null,t.value=d,e.value=u}})}function c(l){return n.value===null||!n.value[l]?null:n.value[l]}return{active:e,intent:t,parameters:n,next:r,show:o,reset:i,enqueue:s,dequeue:a,getParameter:c}}),pr=e=>new Promise(t=>setTimeout(t,e)),bg=["data-visible","data-location"],wg=Um('<a href="https://moonbase.sh" target="_blank" class="moonbase:toolbar-action" data-action-width="narrow"><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></a>',1),Eg=["disabled"],Og=_e({__name:"Toolbar",setup(e){const t=B(!1),n=st(),r=Cr(),o=Ce(_a);return je(()=>{pr(100).then(()=>t.value=!0)}),(s,i)=>{var a,c,l,u;return S(),j("div",{class:"moonbase:toolbar","data-visible":t.value&&O(n).active===O(Ke).None?"true":"false","data-location":O(o).toolbar.location},[wg,(a=O(o))!=null&&a.toolbar.show.cart?(S(),j("button",{key:0,class:"moonbase:toolbar-action",type:"button",onClick:i[0]||(i[0]=d=>O(n).show(O(Ke).Cart,O(Me).AddToCart))}," Cart ")):be("",!0),(c=O(o))!=null&&c.toolbar.show.account&&!O(r).user.value?(S(),j("button",{key:1,class:"moonbase:toolbar-action",type:"button",disabled:!O(r).loaded,onClick:i[1]||(i[1]=d=>O(n).show(O(Ke).Authentication,O(Me).SignIn))}," Log in ",8,Eg)):(l=O(o))!=null&&l.toolbar.show.account?(S(),j("button",{key:2,class:"moonbase:toolbar-action",type:"button",onClick:i[2]||(i[2]=d=>O(n).show(O(Ke).Customer,O(Me).ViewAccount))},ue((u=O(r).user.value)==null?void 0:u.name),1)):be("",!0)],8,bg)}}});class Ng{constructor(){Vr(this,"current",this.detect());Vr(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 No=new Ng;function ba(e,t,n,r){No.isServer||ft(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}function Ju(e,t,n,r){No.isServer||ft(o=>{e.value&&(window.addEventListener(t,n,r),o(()=>window.removeEventListener(t,n,r)))})}var Nt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Nt||{});function wa(){let e=B(0),t=B(!0);return Ju(t,"keydown",n=>{n.key==="Tab"&&(e.value=n.shiftKey?1:0)}),e}function Ge(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,Ge),r}var Vn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Vn||{}),Rn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Rn||{});function Xe({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){const s=Xu(r,n),i=Object.assign(o,{props:s});if(e||t&2&&s.static)return Fs(i);if(t&1){const a=s.unmount??!0?0:1;return Ge(a,{0(){return null},1(){return Fs({...o,props:{...s,hidden:!0,style:{display:"none"}}})}})}return Fs(i)}function Fs({props:e,attrs:t,slots:n,slot:r,name:o}){var l;const{as:s,...i}=Ea(e,["unmount","static"]);let a=(l=n.default)==null?void 0:l.call(n,r);const c={};if(r){let u=!1;const d=[];for(const[p,g]of Object.entries(r))typeof g=="boolean"&&(u=!0),g===!0&&d.push(p);u&&(c["data-moonbase-state"]=d.join(" "))}if(s==="template"){if(a=Yu(a??[]),Object.keys(i).length>0||Object.keys(t).length>0){const[u,...d]=a??[];if(!Sg(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(m=>m.trim()).filter((m,b,N)=>N.indexOf(m)===b).sort((m,b)=>m.localeCompare(b)).map(m=>` - ${m}`).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(m=>` - ${m}`).join(`
|
|
24
|
+
`)].join(`
|
|
25
|
+
`));const p=Xu(u.props??{},i,c),g=Dt(u,p,!0);for(const m in p)m.startsWith("on")&&(g.props||(g.props={}),g.props[m]=p[m]);return g}return Array.isArray(a)&&a.length===1?a[0]:a}return $e(s,Object.assign({},i,c),{default:()=>a})}function Yu(e){return e.flatMap(t=>t.type===Pe?Yu(t.children):[t])}function Xu(...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 Ea(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Sg(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var jn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(jn||{});let Ln=_e({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 Xe({ourProps:s,theirProps:o,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function xg(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function W(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function zt(e){if(No.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=W(e);if(t)return t.ownerDocument}return document}const Bs=["[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 Ae=(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))(Ae||{}),fn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(fn||{});function Hs(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Bs)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Oa=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Oa||{});function Qu(e,t=0){var n;return e===((n=zt(e))==null?void 0:n.body)?!1:Ge(t,{0(){return e.matches(Bs)},1(){let r=e;for(;r!==null;){if(r.matches(Bs))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 hr(e){e==null||e.focus({preventScroll:!0})}const Tg=["textarea","input"].join(",");function Cg(e){var t;return((t=e==null?void 0:e.matches)==null?void 0:t.call(e,Tg))??!1}function $r(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?$r(e):e:Hs(e);o.length>0&&i.length>1&&(i=i.filter(g=>!o.includes(g))),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")})(),c=(()=>{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")})(),l=t&32?{preventScroll:!0}:{};let u=0;const d=i.length;let p;do{if(u>=d||u+d<=0)return 0;let g=c+u;if(t&16)g=(g+d)%d;else{if(g<0)return 3;if(g>=d)return 1}p=i[g],p==null||p.focus(l),u+=a}while(p!==s.activeElement);return t&6&&Cg(p)&&p.select(),2}let mr=[];xg(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||mr[0]===t.target)return;let n=t.target;n=n.closest(Bs),mr.unshift(n??t.target),mr=mr.filter(r=>r!=null&&r.isConnected),mr.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 Zs(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function ed(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=W(n);r instanceof HTMLElement&&t.add(r)}return t}var td=(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))(td||{});const So=Object.assign(_e({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:B(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=B(null);r({el:o,$el:o});const s=Y(()=>zt(o)),i=B(!1);je(()=>i.value=!0),mt(()=>i.value=!1),Pg({ownerDocument:s},Y(()=>i.value&&!!(e.features&16)));const a=Ig({ownerDocument:s,container:o,initialFocus:Y(()=>e.initialFocus)},Y(()=>i.value&&!!(e.features&2)));$g({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:a},Y(()=>i.value&&!!(e.features&8)));const c=wa();function l(g){const m=W(o);if(!m)return;(N=>N())(()=>{Ge(c.value,{[Nt.Forwards]:()=>{it(m,Ae.First,{skipElements:[g.relatedTarget]})},[Nt.Backwards]:()=>{it(m,Ae.Last,{skipElements:[g.relatedTarget]})}})})}const u=B(!1);function d(g){g.key==="Tab"&&(u.value=!0,requestAnimationFrame(()=>{u.value=!1}))}function p(g){if(!i.value)return;const m=ed(e.containers);W(o)instanceof HTMLElement&&m.add(W(o));const b=g.relatedTarget;b instanceof HTMLElement&&b.dataset.moonbaseFocusGuard!=="true"&&(nd(m,b)||(u.value?it(W(o),Ge(c.value,{[Nt.Forwards]:()=>Ae.Next,[Nt.Backwards]:()=>Ae.Previous})|Ae.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&hr(g.target)))}return()=>{const g={},m={ref:o,onKeydown:d,onFocusout:p},{features:b,initialFocus:N,containers:V,...M}=e;return $e(Pe,[!!(b&4)&&$e(Ln,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:l,features:jn.Focusable}),Xe({ourProps:m,theirProps:{...t,...M},slot:g,attrs:t,slots:n,name:"FocusTrap"}),!!(b&4)&&$e(Ln,{as:"button",type:"button","data-moonbase-focus-guard":!0,onFocus:l,features:jn.Focusable})])}}}),{features:td});function kg(e){const t=B(mr.slice());return Ye([e],([n],[r])=>{r===!0&&n===!1?Zs(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=mr.slice())},{flush:"post"}),()=>t.value.find(n=>n!=null&&n.isConnected)??null}function Pg({ownerDocument:e},t){const n=kg(t);je(()=>{ft(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&hr(n())},{flush:"post"})}),mt(()=>{t.value&&hr(n())})}function Ig({ownerDocument:e,container:t,initialFocus:n},r){const o=B(null),s=B(!1);return je(()=>s.value=!0),mt(()=>s.value=!1),je(()=>{Ye([t,n,r],(i,a)=>{if(i.every((l,u)=>(a==null?void 0:a[u])===l)||!r.value)return;const c=W(t);c&&Zs(()=>{var d,p;if(!s.value)return;const l=W(n),u=(d=e.value)==null?void 0:d.activeElement;if(l){if(l===u){o.value=u;return}}else if(c.contains(u)){o.value=u;return}l?hr(l):it(c,Ae.First|Ae.NoScroll)===fn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.value=(p=e.value)==null?void 0:p.activeElement})},{immediate:!0,flush:"post"})}),o}function $g({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;ba((s=e.value)==null?void 0:s.defaultView,"focus",i=>{if(!o.value)return;const a=ed(n);W(t)instanceof HTMLElement&&a.add(W(t));const c=r.value;if(!c)return;const l=i.target;l&&l instanceof HTMLElement?nd(a,l)?(r.value=l,hr(l)):(i.preventDefault(),i.stopPropagation(),hr(c)):hr(r.value)},!0)}function nd(e,t){for(const n of e)if(n.contains(t))return!0;return!1}function Dg(e){let t=nh(e.getSnapshot());return mt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function xo(){let e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){let r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Zs(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=xo();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Ag(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 Vg(){let e;return{before({doc:t}){let n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function rd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Rg(){return/Android/gi.test(window.navigator.userAgent)}function jg(){return rd()||Rg()}function Lg(){return rd()?{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=xo();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:c}=new URL(a.href),l=e.querySelector(c);l&&!r(l)&&(s=l)}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 Mg(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Ug(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let vr=Ag(()=>new Map,{PUSH(e,t){let n=this.get(e)??{doc:e,count:0,d:xo(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Ug(n)},o=[Lg(),Vg(),Mg()];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)}});vr.subscribe(()=>{let e=vr.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&vr.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&vr.dispatch("TEARDOWN",n)}});function Fg(e,t,n){let r=Dg(vr),o=Y(()=>{let s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return Ye([e,t],([s,i],[a],c)=>{if(!s||!i)return;vr.dispatch("PUSH",s,n);let l=!1;c(()=>{l||(vr.dispatch("POP",a??s,n),l=!0)})},{immediate:!0}),o}let Bg=0;function Hg(){return++Bg}function Ct(){return Hg()}let Na=new Map,To=new Map;function od(e,t=B(!0)){ft(n=>{if(!t.value)return;let r=W(e);if(!r)return;n(function(){if(!r)return;let i=To.get(r)??1;if(i===1?To.delete(r):To.set(r,i-1),i!==1)return;let a=Na.get(r);a&&(a["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",a["aria-hidden"]),r.inert=a.inert,Na.delete(r))});let o=To.get(r)??0;To.set(r,o+1),o===0&&(Na.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function Co(e,t,n,r){No.isServer||ft(o=>{e.value&&(document.addEventListener(t,n,r),o(()=>document.removeEventListener(t,n,r)))})}const sd=30;function id(e,t,n=Y(()=>!0)){function r(i,a){if(i.defaultPrevented)return;const c=a(i);if(c===null||!c.getRootNode().contains(c))return;const l=function u(d){return typeof d=="function"?u(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(const u of l){if(u===null)continue;const d=u instanceof HTMLElement?u:W(u);if(d!=null&&d.contains(c)||i.composed&&i.composedPath().includes(d))return}return!Qu(c,Oa.Loose)&&c.tabIndex!==-1&&i.preventDefault(),t(i,c)}const o=B(null);Co(n,"pointerdown",i=>{var a,c;o.value=((c=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:c[0])||i.target},!0),Co(n,"mousedown",i=>{var a,c;o.value=((c=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:c[0])||i.target},!0),Co(n,"click",i=>{jg()||o.value&&(r(i,()=>o.value),o.value=null)},!0);const s={x:0,y:0};Co(n,"touchstart",i=>{s.x=i.touches[0].clientX,s.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-s.x)>=sd||Math.abs(a.y-s.y)>=sd))return r(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),Ju(n,"blur",i=>r(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function ad({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){const r=B(null),o=zt(r);function s(){var a,c;const i=[];for(const l of e)l!==null&&(l instanceof HTMLElement?i.push(l):"value"in l&&l.value instanceof HTMLElement&&i.push(l.value));if(t!=null&&t.value)for(const l of t.value)i.push(l);for(const l of(o==null?void 0:o.querySelectorAll("html > *, body > *"))??[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="moonbase"&&(l.contains(W(r))||l.contains((c=(a=W(r))==null?void 0:a.getRootNode())==null?void 0:c.host)||i.some(u=>l.contains(u))||i.push(l));return i}return{resolveContainers:s,contains(i){return s().some(a=>a.contains(i))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:$e(Ln,{features:jn.Hidden,ref:r})}}}let ld=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 Zg(){return qs()!==null}function qs(){return Ce(ld,null)}function cd(e){dt(ld,e)}const ud=Symbol("ForcePortalRootContext");function qg(){return Ce(ud,!1)}const dd=_e({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return dt(ud,e.force),()=>{const{force:r,...o}=e;return Xe({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});let fd=Symbol("StackContext");var Sa=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Sa||{});function Wg(){return Ce(fd,()=>{})}function zg({type:e,enabled:t,element:n,onUpdate:r}){let o=Wg();function s(...i){r==null||r(...i),o(...i)}je(()=>{Ye(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(fd,s)}var Qe=(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))(Qe||{});let Kg=Symbol("DescriptionContext");function Gg({slot:e=B({}),name:t="Description",props:n={}}={}){let r=B([]);function o(s){return r.value.push(s),()=>{let i=r.value.indexOf(s);i!==-1&&r.value.splice(i,1)}}return dt(Kg,{register:o,slot:e,name:t,props:n}),Y(()=>r.value.length>0?r.value.join(" "):void 0)}function pd(e){const t=zt(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 Jg=_e({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=B(null);Y(()=>zt(r));const o=qg(),s=Ce(md,null),i=B(o===!0||s==null?pd(r.value):s.resolveTarget()),a=B(!1);je(()=>{a.value=!0}),ft(()=>{o||s!=null&&(i.value=s.resolveTarget())});const c=Ce(xa,null);let l=!1;const u=Ts();return Ye(r,()=>{if(l||!c)return;const d=W(r);d&&(mt(c.register(d),u),l=!0)}),()=>{if(!a.value||i.value===null)return null;const d={ref:r,"data-moonbase-portal":""};return $e(bm,{to:i.value},Xe({ourProps:d,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}});let xa=Symbol("PortalParentContext");function hd(){const e=Ce(xa,null),t=B([]);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,_e({name:"PortalWrapper",setup(s,{slots:i}){return dt(xa,o),()=>{var a;return(a=i.default)==null?void 0:a.call(i)}}})]}let md=Symbol("PortalGroupContext");const Yg=_e({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){const r=to({resolveTarget(){return e.target}});return dt(md,r),()=>{const{target:o,...s}=e;return Xe({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),Ta=Symbol("DialogContext");function Ws(e){const t=Ce(Ta,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ws),n}return t}const zs="DC8F892D-2EBD-447C-A4C8-A03058436FF4",vd=_e({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:zs},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`moonbase-dialog-${Ct()}`},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var le;const s=B(!1);je(()=>{s.value=!0});let i=!1;const a=Y(()=>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")),c=B(0),l=qs(),u=Y(()=>e.open===zs&&l!==null?(l.value&at.Open)===at.Open:e.open),d=B(null),p=Y(()=>zt(d));if(o({el:d,$el:d}),!(e.open!==zs||l!==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===zs?void 0:e.open}`);const m=Y(()=>s.value&&u.value?0:1),b=Y(()=>m.value===0),N=B(null),V={titleId:N,panelRef:B(null),dialogState:m,setTitleId(xe){N.value!==xe&&(N.value=xe)},close(){t("close",!1)}},M=Y(()=>c.value>1),T=Ce(Ta,null)!==null,[z,C]=hd(),{resolveContainers:H,mainTreeNodeRef:w,MainTreeNode:de}=ad({portals:z,defaultContainers:[Y(()=>V.panelRef.value??d.value)]}),G=Y(()=>M.value?"parent":"leaf"),I=Y(()=>l!==null?(l.value&at.Closing)===at.Closing:!1),x=Y(()=>T||I.value?!1:b.value),D=Y(()=>{var xe;return Array.from(((xe=p.value)==null?void 0:xe.querySelectorAll("body > *"))??[]).find(Ie=>Ie.id==="moonbase"?!1:Ie.contains(W(w))&&Ie instanceof HTMLElement)??null});od(D,x);const re=Y(()=>M.value?!0:b.value),_=Y(()=>{var xe;return Array.from(((xe=p.value)==null?void 0:xe.querySelectorAll("[data-moonbase-portal]"))??[]).find(Ie=>Ie.contains(W(w))&&Ie instanceof HTMLElement)??null});od(_,re),zg({type:"Dialog",enabled:Y(()=>m.value===0),element:d,onUpdate:(xe,Ie)=>{if(Ie==="Dialog")return Ge(xe,{[Sa.Add]:()=>c.value+=1,[Sa.Remove]:()=>c.value-=1})}});const k=Gg({name:"DialogDescription",slot:Y(()=>({open:u.value}))});dt(Ta,V);const te=Y(()=>!(!b.value||M.value));id(H,(xe,Ie)=>{xe.preventDefault(),V.close(),so(()=>Ie==null?void 0:Ie.focus())},te);const ie=Y(()=>!(M.value||m.value!==0));ba((le=p.value)==null?void 0:le.defaultView,"keydown",xe=>{ie.value&&(xe.defaultPrevented||xe.key===Qe.Escape&&(xe.preventDefault(),xe.stopPropagation(),V.close()))});const ne=Y(()=>!(I.value||m.value!==0||T));return Fg(p,ne,xe=>({containers:[...xe.containers??[],H]})),ft(xe=>{if(m.value!==0)return;const Ie=W(d);if(!Ie)return;const tt=new ResizeObserver(_t=>{for(const hn of _t){const Fn=hn.target.getBoundingClientRect();Fn.x===0&&Fn.y===0&&Fn.width===0&&Fn.height===0&&V.close()}});tt.observe(Ie),xe(()=>tt.disconnect())}),()=>{const{id:xe,open:Ie,initialFocus:tt,..._t}=e,hn={...n,ref:d,id:xe,role:a.value,"aria-modal":m.value===0?!0:void 0,"aria-labelledby":N.value,"aria-describedby":k.value},Fn={open:m.value===0};return $e(dd,{force:!0},()=>[$e(Jg,()=>$e(Yg,{target:d.value},()=>$e(dd,{force:!1},()=>$e(So,{initialFocus:tt,containers:H,features:b.value?Ge(G.value,{parent:So.features.RestoreFocus,leaf:So.features.All&~So.features.FocusLock}):So.features.None},()=>$e(C,{},()=>Xe({ourProps:hn,theirProps:{..._t,...n},slot:Fn,attrs:n,slots:r,visible:m.value===0,features:Vn.RenderStrategy|Vn.Static,name:"Dialog"})))))),$e(de)])}}}),gd=_e({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-overlay-${Ct()}`}},setup(e,{attrs:t,slots:n}){const r=Ws("DialogOverlay");function o(s){s.target===s.currentTarget&&(s.preventDefault(),s.stopPropagation(),r.close())}return()=>{const{id:s,...i}=e;return Xe({ourProps:{id:s,"aria-hidden":!0,onClick:o},theirProps:i,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}}),yd=_e({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`moonbase-dialog-panel-${Ct()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=Ws("DialogPanel");r({el:o.panelRef,$el:o.panelRef});function s(i){i.stopPropagation()}return()=>{const{id:i,...a}=e,c={id:i,ref:o.panelRef,onClick:s};return Xe({ourProps:c,theirProps:a,slot:{open:o.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),Ca=_e({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`moonbase-dialog-title-${Ct()}`}},setup(e,{attrs:t,slots:n}){const r=Ws("DialogTitle");return je(()=>{r.setTitleId(e.id),mt(()=>r.setTitleId(null))}),()=>{const{id:o,...s}=e;return Xe({ourProps:{id:o},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function _d(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function bd(e,t){let n=B(_d(e.value.type,e.value.as));return je(()=>{n.value=_d(e.value.type,e.value.as)}),ft(()=>{var r;n.value||W(t)&&W(t)instanceof HTMLButtonElement&&!((r=W(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}const wd=Symbol("PopoverContext");function ka(e){const t=Ce(wd,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <${Pa.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ka),n}return t}const Xg=Symbol("PopoverGroupContext");function Ed(){return Ce(Xg,null)}const Od=Symbol("PopoverPanelContext");function Qg(){return Ce(Od,null)}let Pa=_e({name:"Popover",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n,expose:r}){var z;const o=B(null);r({el:o,$el:o});const s=B(1),i=B(null),a=B(null),c=B(null),l=B(null),u=Y(()=>zt(o)),d=Y(()=>{var x,D;if(!W(i)||!W(l))return!1;for(const re of document.querySelectorAll("body > *"))if(Number(re==null?void 0:re.contains(W(i)))^Number(re==null?void 0:re.contains(W(l))))return!0;const C=Hs(),H=C.indexOf(W(i)),w=(H+C.length-1)%C.length,de=(H+1)%C.length,G=C[w],I=C[de];return!((x=W(l))!=null&&x.contains(G))&&!((D=W(l))!=null&&D.contains(I))}),p={popoverState:s,buttonId:B(null),panelId:B(null),panel:l,button:i,isPortalled:d,beforePanelSentinel:a,afterPanelSentinel:c,togglePopover(){s.value=Ge(s.value,{0:1,1:0})},closePopover(){s.value!==1&&(s.value=1)},close(C){p.closePopover();const H=C?C instanceof HTMLElement?C:C.value instanceof HTMLElement?W(C):W(p.button):W(p.button);H==null||H.focus()}};dt(wd,p),cd(Y(()=>Ge(s.value,{0:at.Open,1:at.Closed})));const g={buttonId:p.buttonId,panelId:p.panelId,close(){p.closePopover()}},m=Ed(),b=m==null?void 0:m.registerPopover,[N,V]=hd(),M=ad({mainTreeNodeRef:m==null?void 0:m.mainTreeNodeRef,portals:N,defaultContainers:[i,l]});function T(){var C,H,w;return(m==null?void 0:m.isFocusWithinPopoverGroup())??(((C=u.value)==null?void 0:C.activeElement)&&(((H=W(i))==null?void 0:H.contains(u.value.activeElement))||((w=W(l))==null?void 0:w.contains(u.value.activeElement))))}return ft(()=>b==null?void 0:b(g)),ba((z=u.value)==null?void 0:z.defaultView,"focus",C=>{var H,w;C.target!==window&&C.target instanceof HTMLElement&&s.value===0&&(T()||i&&l&&(M.contains(C.target)||(H=W(p.beforePanelSentinel))!=null&&H.contains(C.target)||(w=W(p.afterPanelSentinel))!=null&&w.contains(C.target)||p.closePopover()))},!0),id(M.resolveContainers,(C,H)=>{var w;p.closePopover(),Qu(H,Oa.Loose)||(C.preventDefault(),(w=W(i))==null||w.focus())},Y(()=>s.value===0)),()=>{const C={open:s.value===0,close:p.close};return $e(Pe,[$e(V,{},()=>Xe({theirProps:{...e,...n},ourProps:{ref:o},slot:C,slots:t,attrs:n,name:"Popover"})),$e(M.MainTreeNode)])}}});const Nd=_e({name:"PopoverButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-popover-button-${Ct()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const o=ka("PopoverButton"),s=Y(()=>zt(o.button));r({el:o.button,$el:o.button}),je(()=>{o.buttonId.value=e.id}),mt(()=>{o.buttonId.value=null});const i=Ed(),a=i==null?void 0:i.closeOthers,c=Qg(),l=Y(()=>c===null?!1:c.value===o.panelId.value),u=B(null),d=`moonbase-focus-sentinel-${Ct()}`;l.value||ft(()=>{o.button.value=W(u)});const p=bd(Y(()=>({as:e.as,type:t.type})),u);function g(T){var z,C,H,w,de;if(l.value){if(o.popoverState.value===1)return;switch(T.key){case Qe.Space:case Qe.Enter:T.preventDefault(),(C=(z=T.target).click)==null||C.call(z),o.closePopover(),(H=W(o.button))==null||H.focus();break}}else switch(T.key){case Qe.Space:case Qe.Enter:T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover();break;case Qe.Escape:if(o.popoverState.value!==0)return a==null?void 0:a(o.buttonId.value);if(!W(o.button)||(w=s.value)!=null&&w.activeElement&&!((de=W(o.button))!=null&&de.contains(s.value.activeElement)))return;T.preventDefault(),T.stopPropagation(),o.closePopover();break}}function m(T){l.value||T.key===Qe.Space&&T.preventDefault()}function b(T){var z,C;e.disabled||(l.value?(o.closePopover(),(z=W(o.button))==null||z.focus()):(T.preventDefault(),T.stopPropagation(),o.popoverState.value===1&&(a==null||a(o.buttonId.value)),o.togglePopover(),(C=W(o.button))==null||C.focus()))}function N(T){T.preventDefault(),T.stopPropagation()}const V=wa();function M(){const T=W(o.panel);if(!T)return;function z(){Ge(V.value,{[Nt.Forwards]:()=>it(T,Ae.First),[Nt.Backwards]:()=>it(T,Ae.Last)})===fn.Error&&it(Hs().filter(H=>H.dataset.moonbaseFocusGuard!=="true"),Ge(V.value,{[Nt.Forwards]:Ae.Next,[Nt.Backwards]:Ae.Previous}),{relativeTo:W(o.button)})}z()}return()=>{const T=o.popoverState.value===0,z={open:T},{id:C,...H}=e,w=l.value?{ref:u,type:p.value,onKeydown:g,onClick:b}:{ref:u,id:C,type:p.value,"aria-expanded":o.popoverState.value===0,"aria-controls":W(o.panel)?o.panelId.value:void 0,disabled:e.disabled?!0:void 0,onKeydown:g,onKeyup:m,onClick:b,onMousedown:N};return $e(Pe,[Xe({ourProps:w,theirProps:{...t,...H},slot:z,attrs:t,slots:n,name:"PopoverButton"}),T&&!l.value&&o.isPortalled.value&&$e(Ln,{id:d,features:jn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:M})])}}}),Sd=_e({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-${Ct()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){const{focus:o}=e,s=ka("PopoverPanel"),i=Y(()=>zt(s.panel)),a=`moonbase-focus-sentinel-before-${Ct()}`,c=`moonbase-focus-sentinel-after-${Ct()}`;r({el:s.panel,$el:s.panel}),je(()=>{s.panelId.value=e.id}),mt(()=>{s.panelId.value=null}),dt(Od,s.panelId),ft(()=>{var V,M;if(!o||s.popoverState.value!==0||!s.panel)return;const N=(V=i.value)==null?void 0:V.activeElement;(M=W(s.panel))!=null&&M.contains(N)||it(W(s.panel),Ae.First)});const l=qs(),u=Y(()=>l!==null?(l.value&at.Open)===at.Open:s.popoverState.value===0);function d(N){var V,M;switch(N.key){case Qe.Escape:if(s.popoverState.value!==0||!W(s.panel)||i.value&&!((V=W(s.panel))!=null&&V.contains(i.value.activeElement)))return;N.preventDefault(),N.stopPropagation(),s.closePopover(),(M=W(s.button))==null||M.focus();break}}function p(N){var M,T,z,C,H;const V=N.relatedTarget;V&&W(s.panel)&&((M=W(s.panel))!=null&&M.contains(V)||(s.closePopover(),((z=(T=W(s.beforePanelSentinel))==null?void 0:T.contains)!=null&&z.call(T,V)||(H=(C=W(s.afterPanelSentinel))==null?void 0:C.contains)!=null&&H.call(C,V))&&V.focus({preventScroll:!0})))}const g=wa();function m(){const N=W(s.panel);if(!N)return;function V(){Ge(g.value,{[Nt.Forwards]:()=>{var T;it(N,Ae.First)===fn.Error&&((T=W(s.afterPanelSentinel))==null||T.focus())},[Nt.Backwards]:()=>{var M;(M=W(s.button))==null||M.focus({preventScroll:!0})}})}V()}function b(){const N=W(s.panel);if(!N)return;function V(){Ge(g.value,{[Nt.Forwards]:()=>{const M=W(s.button),T=W(s.panel);if(!M)return;const z=Hs(),C=z.indexOf(M),H=z.slice(0,C+1),de=[...z.slice(C+1),...H];for(const G of de.slice())if(G.dataset.moonbaseFocusGuard==="true"||T!=null&&T.contains(G)){const I=de.indexOf(G);I!==-1&&de.splice(I,1)}it(de,Ae.First,{sorted:!1})},[Nt.Backwards]:()=>{var T;it(N,Ae.Previous)===fn.Error&&((T=W(s.button))==null||T.focus())}})}V()}return()=>{const N={open:s.popoverState.value===0,close:s.close},{id:V,focus:M,...T}=e,z={ref:s.panel,id:V,onKeydown:d,onFocusout:o&&s.popoverState.value===0?p:void 0,tabIndex:-1};return Xe({ourProps:z,theirProps:{...t,...T},attrs:t,slot:N,slots:{...n,default:(...C)=>{var H;return[$e(Pe,[u.value&&s.isPortalled.value&&$e(Ln,{id:a,ref:s.beforePanelSentinel,features:jn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:m}),(H=n.default)==null?void 0:H.call(n,...C),u.value&&s.isPortalled.value&&$e(Ln,{id:c,ref:s.afterPanelSentinel,features:jn.Focusable,"data-moonbase-focus-guard":!0,as:"button",type:"button",onFocus:b})])]}},features:Vn.RenderStrategy|Vn.Static,visible:u.value,name:"PopoverPanel"})}}});let ey=_e({props:{onFocus:{type:Function,required:!0}},setup(e){let t=B(!0);return()=>t.value?$e(Ln,{as:"button",type:"button",features:jn.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 xd=Symbol("TabsContext");function ko(e){const t=Ce(xd,null);if(t===null){const n=new Error(`<${e} /> is missing a parent <TabGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ko),n}return t}const Ia=Symbol("TabsSSRContext"),ty=_e({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=B(e.selectedIndex??e.defaultIndex),s=B([]),i=B([]),a=Y(()=>e.selectedIndex!==null),c=Y(()=>a.value?e.selectedIndex:o.value);function l(m){const b=$r(u.tabs.value,W),N=$r(u.panels.value,W),V=b.filter(M=>{var T;return!((T=W(M))!=null&&T.hasAttribute("disabled"))});if(m<0||m>b.length-1){const M=Ge(o.value===null?0:Math.sign(m-o.value),{[-1]:()=>1,0:()=>Ge(Math.sign(m),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0}),T=Ge(M,{0:()=>b.indexOf(V[0]),1:()=>b.indexOf(V[V.length-1])});T!==-1&&(o.value=T),u.tabs.value=b,u.panels.value=N}else{const M=b.slice(0,m),z=[...b.slice(m),...M].find(H=>V.includes(H));if(!z)return;let C=b.indexOf(z)??u.selectedIndex.value;C===-1&&(C=u.selectedIndex.value),o.value=C,u.tabs.value=b,u.panels.value=N}}let u={selectedIndex:Y(()=>o.value??e.defaultIndex??null),orientation:Y(()=>e.vertical?"vertical":"horizontal"),activation:Y(()=>e.manual?"manual":"auto"),tabs:s,panels:i,setSelectedIndex(m){c.value!==m&&r("change",m),a.value||l(m)},registerTab(m){if(s.value.includes(m))return;const b=s.value[o.value];if(s.value.push(m),s.value=$r(s.value,W),!a.value){const N=s.value.indexOf(b)??o.value;N!==-1&&(o.value=N)}},unregisterTab(m){const b=s.value.indexOf(m);b!==-1&&s.value.splice(b,1)},registerPanel(m){i.value.includes(m)||(i.value.push(m),i.value=$r(i.value,W))},unregisterPanel(m){const b=i.value.indexOf(m);b!==-1&&i.value.splice(b,1)}};dt(xd,u);const d=B({tabs:[],panels:[]}),p=B(!1);je(()=>{p.value=!0}),dt(Ia,Y(()=>p.value?null:d.value));const g=Y(()=>e.selectedIndex);return je(()=>{Ye([g],()=>l(e.selectedIndex??e.defaultIndex),{immediate:!0})}),ft(()=>{if(!a.value||c.value==null||u.tabs.value.length<=0)return;const m=$r(u.tabs.value,W);m.some((N,V)=>W(u.tabs.value[V])!==W(N))&&u.setSelectedIndex(m.findIndex(N=>W(N)===W(u.tabs.value[c.value])))}),()=>{const m={selectedIndex:o.value};return $e(Pe,[s.value.length<=0&&$e(ey,{onFocus:()=>{for(const b of s.value){const N=W(b);if((N==null?void 0:N.tabIndex)===0)return N.focus(),!0}return!1}}),Xe({theirProps:{...n,...Ea(e,["selectedIndex","defaultIndex","manual","vertical","onChange"])},ourProps:{},slot:m,slots:t,attrs:n,name:"TabGroup"})])}}}),ny=_e({name:"TabList",props:{as:{type:[Object,String],default:"div"}},setup(e,{attrs:t,slots:n}){const r=ko("TabList");return()=>{const o={selectedIndex:r.selectedIndex.value},s={role:"tablist","aria-orientation":r.orientation.value};return Xe({ourProps:s,theirProps:e,slot:o,attrs:t,slots:n,name:"TabList"})}}}),$a=_e({name:"Tab",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:()=>`moonbase-tabs-tab-${Ct()}`}},setup(e,{attrs:t,slots:n,expose:r}){const o=ko("Tab"),s=B(null);r({el:s,$el:s}),je(()=>o.registerTab(s)),mt(()=>o.unregisterTab(s));const i=Ce(Ia),a=Y(()=>{if(i.value){const N=i.value.tabs.indexOf(e.id);return N===-1?i.value.tabs.push(e.id)-1:N}return-1}),c=Y(()=>{const N=o.tabs.value.indexOf(s);return N===-1?a.value:N}),l=Y(()=>c.value===o.selectedIndex.value);function u(N){var M;const V=N();if(V===fn.Success&&o.activation.value==="auto"){const T=(M=zt(s))==null?void 0:M.activeElement,z=o.tabs.value.findIndex(C=>W(C)===T);z!==-1&&o.setSelectedIndex(z)}return V}function d(N){const V=o.tabs.value.map(T=>W(T)).filter(Boolean);if(N.key===Qe.Space||N.key===Qe.Enter){N.preventDefault(),N.stopPropagation(),o.setSelectedIndex(c.value);return}switch(N.key){case Qe.Home:case Qe.PageUp:return N.preventDefault(),N.stopPropagation(),u(()=>it(V,Ae.First));case Qe.End:case Qe.PageDown:return N.preventDefault(),N.stopPropagation(),u(()=>it(V,Ae.Last))}if(u(()=>Ge(o.orientation.value,{vertical(){return N.key===Qe.ArrowUp?it(V,Ae.Previous|Ae.WrapAround):N.key===Qe.ArrowDown?it(V,Ae.Next|Ae.WrapAround):fn.Error},horizontal(){return N.key===Qe.ArrowLeft?it(V,Ae.Previous|Ae.WrapAround):N.key===Qe.ArrowRight?it(V,Ae.Next|Ae.WrapAround):fn.Error}}))===fn.Success)return N.preventDefault()}const p=B(!1);function g(){var N;p.value||(p.value=!0,!e.disabled&&((N=W(s))==null||N.focus({preventScroll:!0}),o.setSelectedIndex(c.value),Zs(()=>{p.value=!1})))}function m(N){N.preventDefault()}const b=bd(Y(()=>({as:e.as,type:t.type})),s);return()=>{var z;const N={selected:l.value,disabled:e.disabled??!1},{id:V,...M}=e,T={ref:s,onKeydown:d,onMousedown:m,onClick:g,id:V,role:"tab",type:b.value,"aria-controls":(z=W(o.panels.value[c.value]))==null?void 0:z.id,"aria-selected":l.value,tabIndex:l.value?0:-1,disabled:e.disabled?!0:void 0};return Xe({ourProps:T,theirProps:M,slot:N,attrs:t,slots:n,name:"Tab"})}}}),ry=_e({name:"TabPanels",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){const r=ko("TabPanels");return()=>{const o={selectedIndex:r.selectedIndex.value};return Xe({theirProps:e,ourProps:{},slot:o,attrs:n,slots:t,name:"TabPanels"})}}}),Da=_e({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-${Ct()}`},tabIndex:{type:Number,default:0}},setup(e,{attrs:t,slots:n,expose:r}){const o=ko("TabPanel"),s=B(null);r({el:s,$el:s}),je(()=>o.registerPanel(s)),mt(()=>o.unregisterPanel(s));const i=Ce(Ia),a=Y(()=>{if(i.value){const u=i.value.panels.indexOf(e.id);return u===-1?i.value.panels.push(e.id)-1:u}return-1}),c=Y(()=>{const u=o.panels.value.indexOf(s);return u===-1?a.value:u}),l=Y(()=>c.value===o.selectedIndex.value);return()=>{var b;const u={selected:l.value},{id:d,tabIndex:p,...g}=e,m={ref:s,id:d,role:"tabpanel","aria-labelledby":(b=W(o.tabs.value[c.value]))==null?void 0:b.id,tabIndex:l.value?p:-1};return!l.value&&e.unmount&&!e.static?$e(Ln,{as:"span","aria-hidden":!0,...m}):Xe({ourProps:m,theirProps:g,slot:u,attrs:t,slots:n,features:Vn.Static|Vn.RenderStrategy,visible:l.value,name:"TabPanel"})}}});function oy(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Aa(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 Ks(e,...t){e&&t.length>0&&e.dataset.transition&&(e.dataset.transition=e.dataset.transition.split(" ").filter(n=>!t.includes(n)).join(" "))}var Va=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(Va||{});function sy(e,t){const n=xo();if(!e)return n.dispose;const{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[s,i]=[r,o].map(a=>{const[c=0]=a.split(",").filter(Boolean).map(l=>l.includes("ms")?Number.parseFloat(l):Number.parseFloat(l)*1e3).sort((l,u)=>u-l);return c});return s!==0?n.setTimeout(()=>t("finished"),s+i):t("finished"),n.add(()=>t("cancelled")),n.dispose}function Td(e,t,n,r,o,s){const i=xo(),a=s!==void 0?oy(s):()=>{};return Ks(e,...o),Aa(e,...t,...n),i.nextFrame(()=>{Ks(e,...n),Aa(e,...r),i.add(sy(e,c=>(Ks(e,...r,...t),Aa(e,...o),a(c))))}),i.add(()=>Ks(e,...t,...n,...r,...o)),i.add(()=>a("cancelled")),i.dispose}function gr(e=""){return e.split(/\s+/).filter(t=>t.length>1)}const Ra=Symbol("TransitionContext");function iy(){return Ce(Ra,null)!==null}function ay(){const e=Ce(Ra,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}const ja=Symbol("NestingContext");function ly(){const e=Ce(ja,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function Gs(e){return"children"in e?Gs(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function Cd(e){const t=B([]),n=B(!1);je(()=>n.value=!0),mt(()=>n.value=!1);function r(s,i=Rn.Hidden){const a=t.value.findIndex(({id:c})=>c===s);a!==-1&&(Ge(i,{[Rn.Unmount](){t.value.splice(a,1)},[Rn.Hidden](){t.value[a].state="hidden"}}),!Gs(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,Rn.Unmount)}return{children:t,register:o,unregister:r}}const kd=Vn.RenderStrategy,Po=_e({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=B(0);function i(){s.value|=at.Opening,t("beforeEnter")}function a(){s.value&=~at.Opening,t("afterEnter")}function c(){s.value|=at.Closing,t("beforeLeave")}function l(){s.value&=~at.Closing,t("afterLeave")}if(!iy()&&Zg())return()=>$e(La,{...e,onBeforeEnter:i,onAfterEnter:a,onBeforeLeave:c,onAfterLeave:l},r);const u=B(null),d=Y(()=>e.unmount?Rn.Unmount:Rn.Hidden);o({el:u,$el:u});const{show:p,appear:g}=ay(),{register:m,unregister:b}=ly(),N=B(p.value?"visible":"hidden"),V={value:!0},M=Ct(),T={value:!1},z=Cd(()=>{!T.value&&N.value!=="hidden"&&(N.value="hidden",b(M),l())});je(()=>{const re=m(M);mt(re)}),ft(()=>{if(d.value===Rn.Hidden&&M){if(p.value&&N.value!=="visible"){N.value="visible";return}Ge(N.value,{hidden:()=>b(M),visible:()=>m(M)})}});const C=gr(e.enter),H=gr(e.enterFrom),w=gr(e.enterTo),de=gr(e.entered),G=gr(e.leave),I=gr(e.leaveFrom),x=gr(e.leaveTo);je(()=>{ft(()=>{if(N.value==="visible"){const re=W(u);if(re instanceof Comment&&re.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function D(re){const _=V.value&&!g.value,k=W(u);!k||!(k instanceof HTMLElement)||_||(T.value=!0,p.value&&i(),p.value||c(),re(p.value?Td(k,C,H,w,de,te=>{T.value=!1,te===Va.Finished&&a()}):Td(k,G,I,x,de,te=>{T.value=!1,te===Va.Finished&&(Gs(z)||(N.value="hidden",b(M),l()))})))}return je(()=>{Ye([p],(re,_,k)=>{D(k),V.value=!1},{immediate:!0})}),dt(ja,z),cd(Y(()=>Ge(N.value,{visible:at.Open,hidden:at.Closed})|s.value)),()=>{const{appear:re,show:_,enter:k,enterFrom:te,enterTo:ie,entered:ne,leave:le,leaveFrom:xe,leaveTo:Ie,...tt}=e,_t={ref:u},hn={...tt,...g.value&&p.value&&No.isServer?{class:Xo([n.class,tt.class,...C,...H])}:{}};return Xe({theirProps:hn,ourProps:_t,slot:{},slots:r,attrs:n,features:kd,visible:N.value==="visible",name:"TransitionChild"})}}}),cy=Po,La=_e({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=qs(),s=Y(()=>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=B(s.value?"visible":"hidden"),a=Cd(()=>{i.value="hidden"}),c=B(!0),l={show:s,appear:Y(()=>e.appear||!c.value)};return je(()=>{ft(()=>{c.value=!1,s.value?i.value="visible":Gs(a)||(i.value="hidden")})}),dt(ja,a),dt(Ra,l),()=>{const u=Ea(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),d={unmount:e.unmount};return Xe({ourProps:{...d,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[$e(cy,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...d,...u},r.default)]},attrs:{},features:kd,visible:i.value==="visible",name:"Transition"})}}}),uy={class:"moonbase:modal-container"},Ma=_e({__name:"Modal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(S(),He(O(La),{as:"template",show:t.open},{default:Ee(()=>[Q(O(vd),{as:"div",class:"moonbase:modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:Ee(()=>[U("div",uy,[Q(O(Po),{as:"template"},{default:Ee(()=>[Q(O(gd),{class:"moonbase:modal-overlay"})]),_:1}),Q(O(Po),{as:"template"},{default:Ee(()=>[Q(O(yd),{class:"moonbase:modal-content"},{default:Ee(()=>[Ri(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),dy={class:"moonbase:input"},fy=["for"],py=["id","type","name","placeholder","value","disabled","aria-invalid","aria-describedby"],hy=["id"],my=["id"],vy=_e({inheritAttrs:!1,__name:"MoonInput",props:{name:{},label:{},placeholder:{},type:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{}},emits:["update:modelValue"],setup(e){return(t,n)=>(S(),j("div",dy,[U("label",{for:`mb_${t.name}`},ue(t.label),9,fy),U("input",ea({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,py),t.error?(S(),j("p",{key:0,id:`mb-${t.name}-error`,class:"moonbase:input-hint","data-type":"error"},ue(t.error),9,hy)):t.hint?(S(),j("p",{key:1,id:`mb-${t.name}-hint`,class:"moonbase:input-hint"},ue(t.hint),9,my)):be("",!0)]))}}),Mn=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Dr=Mn(vy,[["__scopeId","data-v-a7fea82b"]]),gy={},Pd=e=>(Ph("data-v-f9a322c4"),e=e(),Ih(),e),yy={fill:"none",viewBox:"0 0 24 24"},_y=[Pd(()=>U("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1)),Pd(()=>U("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 by(e,t){return S(),j("svg",yy,_y)}const Un=Mn(gy,[["render",by],["__scopeId","data-v-f9a322c4"]]),Id=Symbol("form-state"),Ua=_e({__name:"MoonForm",props:{handler:{type:Function}},setup(e){const t=e,n=B(!1),r=B(!1),o=B(!1);dt(Id,{working:n,isSuccess:r,isError:o});async function s(){n.value=!0;try{await t.handler(),n.value=!1,r.value=!0,await pr(2500),r.value=!1}catch{n.value=!1,o.value=!0,await pr(2500),o.value=!1}}return(i,a)=>(S(),j("form",{onSubmit:Tv(s,["prevent"])},[Ri(i.$slots,"default")],32))}}),wy=["disabled","data-success","data-error","data-working"],Ey=["data-visible"],Fa=Mn(_e({__name:"MoonSubmitButton",props:{label:{},success:{},error:{}},setup(e){const t=e,{working:n,isSuccess:r,isError:o}=Ce(Id),s=Y(()=>r.value?t.success:o.value?t.error:t.label);return(i,a)=>(S(),j("button",{class:"moonbase:submit-button",type:"submit",disabled:O(r)||O(o)||O(n),"data-success":O(r)||void 0,"data-error":O(o)||void 0,"data-working":O(n)||void 0},[U("div",{"data-visible":O(n)||void 0,"aria-hidden":"true"},[O(n)?(S(),He(Un,{key:0})):be("",!0)],8,Ey),Le(" "+ue(s.value),1)],8,wy))}}),[["__scopeId","data-v-052f0f36"]]),Oy=["data-visible"],Ny=_e({__name:"SignIn",emits:["signedIn"],setup(e,{emit:t}){const n=t,r=st(),o=Cr(),s=B(r.getParameter("email")??""),i=B(""),a=B(null);async function c(){a.value=null;try{const l=await o.signIn(s.value,i.value);pr(1500).then(()=>n("signedIn",l))}catch(l){throw l instanceof rl?a.value="User not found":a.value=l.message,l}}return(l,u)=>(S(),He(Ua,{handler:c,class:"moonbase:sign-in"},{default:Ee(()=>[Q(Dr,{modelValue:s.value,"onUpdate:modelValue":u[0]||(u[0]=d=>s.value=d),label:"Email address",name:"email",type:"email",placeholder:"Email address",autocomplete:"email",required:""},null,8,["modelValue"]),Q(Dr,{modelValue:i.value,"onUpdate:modelValue":u[1]||(u[1]=d=>i.value=d),label:"Password",name:"password",type:"password",placeholder:"Password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Q(Fa,{success:"Signed in",label:"Sign in",error:"Error"}),U("span",{class:"moonbase:error","data-visible":!!a.value||void 0},ue(a.value),9,Oy)]),_:1}))}}),Sy={class:"moonbase:authentication"},xy={key:0,class:"moonbase:loader"},Ty=_e({__name:"Authentication",props:{open:{type:Boolean}},emits:["authenticated"],setup(e,{emit:t}){const n=t,r=st(),{loaded:o,user:s}=Cr();Ye(s,a=>{a&&r.intent===Me.SignIn&&(n("authenticated",a),r.dequeue())});const i=Y(()=>{switch(r.intent){case Me.SignIn:return"Sign in";case Me.SignUp:return"Sign up"}throw new Error("Moonbase: Unknown intent")});return(a,c)=>(S(),He(Ma,{open:a.open,onClose:c[0]||(c[0]=l=>O(r).reset())},{default:Ee(()=>[U("div",Sy,[Q(O(Ca),{as:"h3"},{default:Ee(()=>[Le(ue(i.value),1)]),_:1}),O(o)?O(r).intent===O(Me).SignIn?(S(),He(Ny,{key:1})):be("",!0):(S(),j("div",xy,[Q(Un)]))])]),_:1},8,["open"]))}});function pn(e,t){return new Intl.NumberFormat(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",maximumFractionDigits:2,minimumFractionDigits:2}).format(e)}const Cy={class:"moonbase:product-cart-item"},ky=["src"],Py={key:1,class:"moonbase:image-placeholder"},Iy={class:"moonbase:product-cart-item-content"},$y={key:0,class:"moonbase:cart-item-discount"},Dy={class:"font-semibold"},Ay={key:0,class:"ml-0.5"},Vy={key:2,class:"moonbase:product-cart-item-total"},Ry={key:0,class:"moonbase:discount"},jy={key:1},Ly=_e({__name:"ProductCartItem",props:{lineItem:{},currency:{}},setup(e){return(t,n)=>{var r,o,s;return S(),j("div",Cy,[(r=t.lineItem.product)!=null&&r.iconUrl?(S(),j("img",{key:0,src:t.lineItem.product.iconUrl,alt:""},null,8,ky)):(S(),j("div",Py)),U("div",Iy,[U("h3",null,ue((o=t.lineItem.product)==null?void 0:o.name),1),U("p",null,ue((s=t.lineItem.product)==null?void 0:s.tagline),1),t.lineItem.appliedDiscount?(S(),j("p",$y,[Le(" Discount applied: "),U("span",Dy,ue(t.lineItem.appliedDiscount.name),1),t.lineItem.appliedDiscount.total?(S(),j("span",Ay," (-"+ue(O(pn)(t.lineItem.appliedDiscount.total[t.currency],t.currency))+") ",1)):be("",!0)])):be("",!0),U("p",null,ue(t.lineItem.quantity)+" in cart",1)]),t.lineItem.variation?(S(),j("div",Vy,[t.lineItem.variation.hasDiscount?(S(),j("span",Ry,ue(O(pn)(t.lineItem.variation.originalPrice[t.currency],t.currency)),1)):be("",!0),t.lineItem.quantity!==1?(S(),j("span",jy,ue(t.lineItem.quantity)+" x "+ue(O(pn)(t.lineItem.variation.price[t.currency],t.currency)),1)):be("",!0),Le(" "+ue(O(pn)(t.lineItem.variation.price[t.currency]*t.lineItem.quantity,t.currency)),1)])):be("",!0)])}}}),My={class:"moonbase:bundle-cart-item"},Uy=["src"],Fy={key:1,class:"moonbase:image-placeholder"},By={class:"moonbase:bundle-cart-item-content"},Hy={key:0,class:"moonbase:cart-item-discount"},Zy={class:"font-semibold"},qy={key:0,class:"ml-0.5"},Wy={class:"moonbase:bundle-cart-item-summary"},zy=["data-open"],Ky=[U("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)],Gy={key:2,class:"moonbase:product-cart-item-total"},Jy={key:0,class:"moonbase:discount"},Yy={key:1},Xy=["src"],Qy={key:1,class:"moonbase:image-placeholder"},e_=["data-included"],t_={key:0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},n_=[U("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"},null,-1)],r_={key:0,class:"truncate italic"},o_={key:1,class:"truncate"},s_=_e({__name:"BundleCartItem",props:{lineItem:{},currency:{}},setup(e){const t=B(!1),n=B(null);return Ye(t,r=>{n.value&&(n.value.style.height=r?`${n.value.scrollHeight}px`:"0px")}),(r,o)=>{var s,i,a,c,l,u,d;return S(),j("div",null,[U("div",My,[(s=r.lineItem.bundle)!=null&&s.iconUrl?(S(),j("img",{key:0,src:r.lineItem.bundle.iconUrl,alt:""},null,8,Uy)):(S(),j("div",Fy)),U("div",By,[U("h3",null,ue((i=r.lineItem.bundle)==null?void 0:i.name),1),U("p",null,ue((a=r.lineItem.bundle)==null?void 0:a.tagline),1),r.lineItem.appliedDiscount?(S(),j("p",Hy,[Le(" Discount applied: "),U("span",Zy,ue(r.lineItem.appliedDiscount.name),1),r.lineItem.appliedDiscount.total?(S(),j("span",qy," (-"+ue(O(pn)(r.lineItem.appliedDiscount.total[r.currency],r.currency))+") ",1)):be("",!0)])):be("",!0),U("div",Wy,[U("span",null,ue(r.lineItem.quantity)+" in cart",1),r.lineItem.bundle?(S(),j("button",{key:0,onClick:o[0]||(o[0]=p=>t.value=!t.value)},[U("span",null,[Le(" Including "+ue((c=r.lineItem.bundle)==null?void 0:c.products.filter(p=>p.included).length)+" ",1),(l=r.lineItem.bundle)!=null&&l.products.some(p=>!p.included)?(S(),j(Pe,{key:0},[Le("of "+ue((u=r.lineItem.bundle)==null?void 0:u.products.length),1)],64)):be("",!0),Le(" products ")]),(S(),j("svg",{"data-open":t.value||void 0,fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Ky,8,zy))])):be("",!0)])]),r.lineItem.variation?(S(),j("div",Gy,[r.lineItem.variation.hasDiscount?(S(),j("span",Jy,ue(O(pn)(r.lineItem.variation.originalPrice[r.currency],r.currency)),1)):be("",!0),r.lineItem.quantity!==1?(S(),j("span",Yy,ue(r.lineItem.quantity)+" x "+ue(O(pn)(r.lineItem.variation.price[r.currency],r.currency)),1)):be("",!0),Le(" "+ue(O(pn)(r.lineItem.variation.price[r.currency]*r.lineItem.quantity,r.currency)),1)])):be("",!0)]),U("div",{ref_key:"productListRef",ref:n,class:"moonbase:bundle-cart-item-product-list",style:{height:"0px"}},[(S(!0),j(Pe,null,xr(((d=r.lineItem.bundle)==null?void 0:d.products)||[],p=>(S(),j("div",{key:p.id},[p!=null&&p.iconUrl?(S(),j("img",{key:0,src:p.iconUrl,alt:""},null,8,Xy)):(S(),j("div",Qy)),U("div",null,[U("h3",{"data-included":p.included||void 0},[p.included?(S(),j("svg",t_,n_)):be("",!0),Le(" "+ue(p==null?void 0:p.name),1)],8,e_),p.included?p!=null&&p.tagline?(S(),j("p",o_,ue(p.tagline),1)):be("",!0):(S(),j("p",r_," You already own this "))])]))),128))],512)])}}}),i_={class:"moonbase:cart-modal-container"},a_=_e({__name:"CartModal",props:{open:{type:Boolean}},emits:["close"],setup(e){return(t,n)=>(S(),He(O(La),{as:"template",show:t.open},{default:Ee(()=>[Q(O(vd),{as:"div",class:"moonbase:cart-modal",onClose:n[0]||(n[0]=r=>t.$emit("close"))},{default:Ee(()=>[U("div",i_,[Q(O(Po),{as:"template"},{default:Ee(()=>[Q(O(gd),{class:"moonbase:cart-modal-overlay"})]),_:1}),Q(O(Po),{as:"template"},{default:Ee(()=>[Q(O(yd),{class:"moonbase:cart-modal-content"},{default:Ee(()=>[Ri(t.$slots,"default")]),_:3})]),_:3})])]),_:3})]),_:3},8,["show"]))}}),l_=["disabled","data-success","data-error","data-working","data-variant"],c_=["data-visible"],$d=_e({__name:"MoonButton",props:{handler:{type:Function},label:{},success:{},error:{},variant:{},noReset:{type:Boolean}},setup(e){const t=e,n=B(!1),r=B(!1),o=B(!1),s=Y(()=>r.value?t.success:o.value?t.error:t.label);async function i(){try{const a=t.handler();a instanceof Promise&&(n.value=!0,await a,n.value=!1,r.value=!0,await pr(2500),t.noReset||(r.value=!1))}catch{n.value=!1,o.value=!0,await pr(2500),o.value=!1}}return(a,c)=>(S(),j("button",{class:"moonbase:button",type:"button",disabled:r.value||o.value||n.value,"data-success":r.value||void 0,"data-error":o.value||void 0,"data-working":n.value||void 0,"data-variant":a.variant,onClick:i},[U("div",{"data-visible":n.value||void 0,"aria-hidden":"true"},[n.value?(S(),He(Un,{key:0})):be("",!0)],8,c_),Le(" "+ue(s.value),1)],8,l_))}}),u_={class:"moonbase:cart"},d_={key:0,role:"list",class:"moonbase:cart-items"},f_={key:1,class:"moonbase:cart-empty"},p_={key:2,class:"moonbase:cart-total"},h_=U("label",null," Total ",-1),m_=U("p",null," Sales tax to be calculated at checkout ",-1),v_=_e({__name:"Cart",props:{open:{type:Boolean}},setup(e){const t=st(),{items:n,total:r,currency:o,checkout:s}=da();async function i(){s(`${window.location.pathname}?mb_intent=view_products`),await pr(2500)}return(a,c)=>(S(),He(a_,{open:a.open,onClose:c[0]||(c[0]=l=>O(t).reset())},{default:Ee(()=>[U("div",u_,[Q(O(Ca),{as:"h3"},{default:Ee(()=>[Le(" Cart ")]),_:1}),O(n).length>0?(S(),j("ul",d_,[(S(!0),j(Pe,null,xr(O(n),l=>(S(),j("li",{key:l.id},[l.type==="Product"?(S(),He(Ly,{key:0,"line-item":l,currency:O(o)},null,8,["line-item","currency"])):l.type==="Bundle"?(S(),He(s_,{key:1,"line-item":l,currency:O(o)},null,8,["line-item","currency"])):be("",!0)]))),128))])):(S(),j("div",f_," Your cart is empty! ")),O(n).length>0?(S(),j("div",p_,[h_,U("span",null,ue(O(pn)(O(r).amount,O(r).currency)),1),m_])):be("",!0),O(n).length>0?(S(),He($d,{key:3,handler:i,"no-reset":!0,label:"Checkout",success:"Redirecting..",error:"Error"})):be("",!0)])]),_:1},8,["open"]))}}),g_={class:"moonbase:checkbox"},y_={class:"moonbase:checkbox-container"},__=["id","name","value","disabled","aria-invalid","aria-describedby"],b_={class:"moonbase:checkbox-description"},w_=["for"],E_=["id"],O_=["id"],N_=Mn(_e({inheritAttrs:!1,__name:"MoonCheckbox",props:{name:{},label:{},error:{},hint:{},disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e){return(t,n)=>(S(),j("div",g_,[U("div",y_,[U("input",ea({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,__)]),U("div",b_,[U("label",{for:`mb-${t.name}`},ue(t.label),9,w_),t.error?(S(),j("p",{key:0,id:`mb-${t.name}-error`,"data-type":"error"},ue(t.error),9,E_)):t.hint?(S(),j("p",{key:1,id:`mb-${t.name}-hint`},ue(t.hint),9,O_)):be("",!0)])]))}}),[["__scopeId","data-v-20c4336e"]]),S_={class:"moonbase:account"},x_={key:0,class:"moonbase:error"},T_={key:0,class:"moonbase:error"},C_=_e({__name:"Account",setup(e){var M,T,z;const t=st(),{user:n,update:r,setPassword:o,signOut:s}=Cr(),i=B(((M=n.value)==null?void 0:M.name)??""),a=B(((T=n.value)==null?void 0:T.email)??""),c=B(((z=n.value)==null?void 0:z.communicationPreferences)??{newsletterOptIn:!1}),l=B(null),u=B(!1),d=B(""),p=B(""),g=B(null),m=B(!1);async function b(){l.value=null;try{(await r(i.value,a.value,void 0,c.value)).needsEmailConfirmationToken&&(u.value=!0)}catch(C){throw l.value=C,C}}async function N(){g.value=null;try{await o(d.value,p.value),d.value="",p.value=""}catch(C){throw g.value=C,C}}async function V(){m.value=!0,await s(),t.reset()}return(C,H)=>(S(),j("div",S_,[Q(Ua,{handler:b},{default:Ee(()=>[Q(Dr,{modelValue:i.value,"onUpdate:modelValue":H[0]||(H[0]=w=>i.value=w),label:"Full name",name:"name",autocomplete:"name",required:""},null,8,["modelValue"]),Q(Dr,{modelValue:a.value,"onUpdate:modelValue":H[1]||(H[1]=w=>a.value=w),label:"Email address",name:"email",type:"email",autocomplete:"email",required:""},null,8,["modelValue"]),Q(N_,{modelValue:c.value.newsletterOptIn,"onUpdate:modelValue":H[2]||(H[2]=w=>c.value.newsletterOptIn=w),label:"Newsletter subscription",name:"newsletter-opt-in",hint:"Receive updates and offers by email"},null,8,["modelValue"]),Q(Fa,{label:"Save",error:"Error",success:"Saved"}),l.value?(S(),j("p",x_,ue(l.value.message),1)):be("",!0)]),_:1}),Q(Ua,{handler:N},{default:Ee(()=>[Q(Dr,{modelValue:d.value,"onUpdate:modelValue":H[3]||(H[3]=w=>d.value=w),label:"Current password",name:"old-password",type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"]),Q(Dr,{modelValue:p.value,"onUpdate:modelValue":H[4]||(H[4]=w=>p.value=w),label:"New password",name:"new-password",type:"password",autocomplete:"new-password",required:""},null,8,["modelValue"]),Q(Fa,{label:"Save",error:"Error",success:"Saved"}),g.value?(S(),j("p",T_,ue(g.value.message),1)):be("",!0)]),_:1}),Q($d,{label:"Log out",success:"Logged out",error:"Error",variant:"secondary",handler:V})]))}}),k_={},P_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},I_=[U("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 $_(e,t){return S(),j("svg",P_,I_)}const D_=Mn(k_,[["render",$_]]),A_={},V_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},R_=[U("path",{d:"M480 265H232v179l248 36V265zM216 265H32v150l184 26.7V265zM480 32L232 67.4V249h248V32zM216 69.7L32 96v153h184V69.7z",fill:"currentColor"},null,-1)];function j_(e,t){return S(),j("svg",V_,R_)}const L_=Mn(A_,[["render",j_]]),M_={},U_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},F_=[U("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 B_(e,t){return S(),j("svg",U_,F_)}const H_=Mn(M_,[["render",B_]]),Z_={},q_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},W_=[U("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),U("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 z_(e,t){return S(),j("svg",q_,W_)}const K_=Mn(Z_,[["render",z_]]),G_={class:"moonbase:product-downloads"},J_=["data-last","onClick"],Y_={class:"moonbase:sr-only"},X_={class:"moonbase:sr-only"},Q_=U("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[U("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})],-1),eb=["onClick"],tb=_e({__name:"ProductDownloads",props:{downloads:{}},setup(e){const t=e,n={[Or.Universal]:()=>D_,[Or.Windows]:()=>L_,[Or.Linux]:()=>H_,[Or.Mac]:()=>K_},{downloadProduct:r}=ua(),o=Y(()=>t.downloads.reduce((s,i)=>({...s,[i.platform]:(s[i.platform]||[]).concat({...i,icon:n[i.platform]})}),{}));return(s,i)=>(S(),j("span",G_,[(S(!0),j(Pe,null,xr(o.value,(a,c,l)=>(S(),j(Pe,{key:c},[a.length===1?(S(),j("button",{key:0,type:"button",role:"button","data-last":l===Object.keys(o.value).length-1||void 0,onClick:u=>O(r)(a[0])},[U("span",Y_,ue(c.toString()),1),(S(),He(yc(a[0].icon()),{class:"h-5 w-5 text-white","aria-hidden":"true"}))],8,J_)):(S(),He(O(Pa),{key:1,as:"div","data-last":l===Object.keys(o.value).length-1||void 0,class:"moonbase:product-downloads-group"},{default:Ee(()=>[Q(O(Nd),null,{default:Ee(()=>[U("span",X_,ue(c.toString()),1),(S(),He(yc(a[0].icon()),{"aria-hidden":"true"})),Q_]),_:2},1024),Q(Is,{name:"moonbase:scale"},{default:Ee(()=>[Q(O(Sd),{class:"moonbase:product-downloads-list"},{default:Ee(()=>[(S(!0),j(Pe,null,xr(a,u=>(S(),j("button",{key:u.key,type:"button",role:"button",onClick:d=>O(r)(u)},ue(u.name),9,eb))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["data-last"]))],64))),128))]))}}),nb={class:"moonbase:product-activations"},rb=U("th",{scope:"col"}," Device ",-1),ob=U("th",{scope:"col"}," Activation Method ",-1),sb=U("th",{scope:"col"}," Last Online ",-1),ib={key:0,scope:"col"},ab=[U("span",{class:"sr-only"},"Actions",-1)],lb={key:0},cb={colspan:"3"},ub=U("td",null,null,-1),db={key:1},fb=[U("td",{colspan:"3"}," No activations found ",-1)],pb={key:0},hb=["onClick"],mb=_e({__name:"ProductActivations",props:{productId:{}},emits:["revoked"],setup(e,{emit:t}){const n=e,r=t,{getProductActivations:o,revokeActivation:s}=ua(),i=B(null);je(async()=>{let l=await o(n.productId);for(i.value=l.items.map(u=>({...u,revoking:!1}));l.hasMore&&l.next;)l=await o(n.productId,l.next),i.value.push(...l.items.map(u=>({...u,revoking:!1})))});const a=Y(()=>i.value&&i.value.some(l=>l.activationMethod===ai.Online));async function c(l){l.revoking=!0,await s(l),r("revoked",l),i.value&&i.value.splice(i.value.indexOf(l),1)}return(l,u)=>(S(),j("table",nb,[U("thead",null,[U("tr",null,[rb,ob,sb,a.value?(S(),j("th",ib,ab)):be("",!0)])]),U("tbody",null,[i.value?i.value.length===0?(S(),j("tr",db,fb)):be("",!0):(S(),j("tr",lb,[U("td",cb,[Q(Un),Le(" Loading activations.. ")]),ub])),(S(!0),j(Pe,null,xr(i.value,d=>{var p;return S(),j("tr",{key:d.id},[U("td",null,ue(d.name),1),U("td",null,ue(d.activationMethod),1),U("td",null,ue((p=d.lastValidatedAt)==null?void 0:p.toLocaleDateString()),1),a.value?(S(),j("td",pb,[U("button",{class:"text-red-400 flex whitespace-nowrap items-center",onClick:g=>c(d)},[d.revoking?(S(),He(Un,{key:0})):be("",!0),Le(" Revoke ")],8,hb)])):be("",!0)])}),128))])]))}}),vb={class:"moonbase:products"},gb=U("th",{scope:"col"}," Product ",-1),yb=U("th",{scope:"col"}," Activations ",-1),_b={key:0,scope:"col"},bb={key:0},wb=U("td",null,null,-1),Eb={key:1},Ob=[U("td",{colspan:"3"}," No products found ",-1)],Nb=["src"],Sb={key:1,class:"moonbase:image-placeholder"},xb=U("span",{class:"moonbase:sr-only"},"View activations",-1),Tb={key:0},Cb={key:0},kb=_e({__name:"Products",setup(e){const{getProducts:t}=ua(),n=B(null);je(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=Y(()=>n.value&&n.value.some(o=>o.downloads));return(o,s)=>(S(),j("table",vb,[U("thead",null,[U("tr",null,[gb,yb,r.value?(S(),j("th",_b," Downloads ")):be("",!0)])]),U("tbody",null,[n.value?n.value.length===0?(S(),j("tr",Eb,Ob)):be("",!0):(S(),j("tr",bb,[U("td",null,[Q(Un),Le(" Loading products.. ")]),wb])),(S(!0),j(Pe,null,xr(n.value||[],i=>(S(),j("tr",{key:i.id},[U("td",null,[U("div",null,[i.iconUrl?(S(),j("img",{key:0,src:i.iconUrl,alt:""},null,8,Nb)):(S(),j("div",Sb)),U("span",null,ue(i.name),1)])]),Q(O(Pa),{as:"td"},{default:Ee(()=>[Q(O(Nd),{class:"moonbase:button","data-variant":"secondary"},{default:Ee(()=>[xb,Le(" "+ue(i.currentActivations)+" / "+ue(i.maxActivations),1)]),_:2},1024),Q(Is,{name:"moonbase:scale"},{default:Ee(()=>[Q(O(Sd),null,{default:Ee(()=>[Q(mb,{"product-id":i.id},null,8,["product-id"])]),_:2},1024)]),_:2},1024)]),_:2},1024),r.value?(S(),j("td",Tb,[i.currentVersion!=null?(S(),j("div",Cb,[i.downloads?(S(),He(tb,{key:0,downloads:i.downloads},null,8,["downloads"])):be("",!0)])):be("",!0)])):be("",!0)]))),128))])]))}}),Pb={class:"moonbase:customer"},Ib=_e({__name:"Customer",props:{open:{type:Boolean}},setup(e){const t=st();function n(s){switch(s){case Me.ViewAccount:return 0;case Me.ViewProducts:return 1;case Me.RedeemVoucher:return 2}return 0}const r=B(n(t.intent));Ye(()=>t.intent,s=>{r.value=n(s)});function o(s){r.value=s}return(s,i)=>(S(),He(Ma,{open:s.open,onClose:i[0]||(i[0]=a=>O(t).reset())},{default:Ee(()=>[U("div",Pb,[Q(O(ty),{"selected-index":r.value,onChange:o},{default:Ee(()=>[Q(O(ny),null,{default:Ee(()=>[Q(O($a),null,{default:Ee(()=>[Le("Account")]),_:1}),Q(O($a),null,{default:Ee(()=>[Le(" Products ")]),_:1}),Q(O($a),null,{default:Ee(()=>[Le("Redeem")]),_:1})]),_:1}),Q(O(ry),null,{default:Ee(()=>[Q(O(Da),null,{default:Ee(()=>[Q(C_)]),_:1}),Q(O(Da),null,{default:Ee(()=>[Q(kb)]),_:1}),Q(O(Da),null,{default:Ee(()=>[Le(" Redeem ")]),_:1})]),_:1})]),_:1},8,["selected-index"])])]),_:1},8,["open"]))}}),$b={class:"moonbase:auto-activate"},Db={key:0,class:"moonbase:loader"},Ab={key:1,class:"moonbase:loader"},Vb={key:2,class:"moonbase:loader"},Rb={key:3},jb={key:0,class:"moonbase:auto-activate-product"},Lb=["src"],Mb={key:1,class:"moonbase:image-placeholder"},Ub={key:1,class:"moonbase:loader"},Fb=[U("h3",null," Uh oh ",-1),U("p",null," This activation request was cancelled, open your app to try again. ",-1)],Bb={key:2,class:"moonbase:loader"},Hb={key:3,class:"moonbase:loader"},Zb=[U("h3",null," Done! ",-1),U("p",null," Your product is activated. ",-1)],qb={key:4,class:"moonbase:auto-activate-content"},Wb={key:0},zb={key:1},Kb=U("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),Gb={class:"moonbase:auto-activate-cta"},Jb=["href"],Yb={key:2,class:"moonbase:auto-activate-trial"},Xb={class:"moonbase:auto-activate-cta"},Qb=_e({__name:"AutoActivate",setup(e){const t=st(),{user:n,loaded:r}=Cr(),o=t.getParameter("token"),{activationRequest:s,loading:i,fulfilling:a,completing:c,error:l,fulfillLicense:u,fulfillTrial:d,cancel:p}=Bv(o);Ye(s,m=>{var b;!a.value&&!c.value&&(m==null?void 0:m.status)===Mt.Requested&&((b=m==null?void 0:m.licenseEligibility)!=null&&b.eligible)&&u()});function g(){p(),t.show(Ke.Customer,Me.ViewProducts)}return(m,b)=>{var N,V,M,T;return S(),j("div",$b,[O(i)||!O(r)?(S(),j("div",Db,[Q(Un)])):O(l)?(S(),j("div",Ab,ue(O(l)),1)):O(s)?(S(),j("div",Rb,[O(s).product?(S(),j("div",jb,[O(s).product.iconUrl?(S(),j("img",{key:0,src:O(s).product.iconUrl,alt:""},null,8,Lb)):(S(),j("div",Mb)),U("div",null,[U("h2",null,ue(O(s).product.name),1),U("h3",null,ue(O(s).product.tagline),1)])])):be("",!0),((N=O(s))==null?void 0:N.status)===O(Mt).Cancelled?(S(),j("div",Ub,Fb)):O(a)||O(c)?(S(),j("div",Bb,[Q(Un),U("p",null,"Activating "+ue(O(s).product.name)+"...",1)])):((V=O(s))==null?void 0:V.status)===O(Mt).Completed?(S(),j("div",Hb,Zb)):(S(),j("div",qb,[O(n)?(M=O(n).ownedProducts)!=null&&M.includes(O(s).product.id)?(S(),j("div",zb,[Kb,U("span",Gb,[U("button",{role:"button",class:"moonbase:button",onClick:b[0]||(b[0]=z=>g())}," Licenses "),O(s).product&&O(s).product.website?(S(),j("a",{key:0,href:O(s).product.website,class:"moonbase:button"}," Purchase ",8,Jb)):be("",!0)])])):be("",!0):(S(),j("div",Wb," Please sign in ")),(T=O(s).trialEligibility)!=null&&T.eligible?(S(),j("div",Yb,[Le(" You are eligible for a "+ue(O(s).trialEligibility.numberOfDaysPerProduct)+" day trial ",1),O(s).trialEligibility.existing?(S(),j(Pe,{key:0},[Le(" of which you have "+ue(O(s).trialEligibility.numberOfDaysRemaining)+" days remaining ",1)],64)):be("",!0),Le(". "),U("span",Xb,[U("button",{role:"button",class:"moonbase:button",onClick:b[1]||(b[1]=z=>O(d)())}," Start trial ")])])):be("",!0)]))])):(S(),j("div",Vb," Could not find activation request "))])}}}),e1={class:"moonbase:activation"},t1=_e({__name:"Activation",props:{open:{type:Boolean}},setup(e){const t=st();return(n,r)=>(S(),He(Ma,{open:n.open,onClose:r[0]||(r[0]=o=>O(t).reset())},{default:Ee(()=>[U("div",e1,[Q(O(Ca),{as:"h3"},{default:Ee(()=>[Le(" Activate product ")]),_:1}),n.open&&O(t).intent===O(Me).ActivateProduct?(S(),He(Qb,{key:0})):be("",!0)])]),_:1},8,["open"]))}}),n1=_e({__name:"App",setup(e){const t=Ce(_a),n=st();return(r,o)=>{var s;return S(),j(Pe,null,[(s=O(t))!=null&&s.toolbar.enabled?(S(),He(Og,{key:0})):be("",!0),Q(v_,{open:O(n).active===O(Ke).Cart},null,8,["open"]),Q(Ty,{open:O(n).active===O(Ke).Authentication},null,8,["open"]),Q(t1,{open:O(n).active===O(Ke).Activation},null,8,["open"]),Q(Ib,{open:O(n).active===O(Ke).Customer},null,8,["open"])],64)}}});function Js(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ba(e,...t){if(t.length===0)return e;const n=t.shift();if(!n)return e;if(Js(e)&&Js(n)){for(const r in e)if(n.hasOwnProperty(r)){const o=n[r];Js(o)&&Js(e[r])?e[r]=Ba(e[r],o):o!==void 0&&(e[r]=o)}}return Ba(e,...t)}class r1{constructor(){Vr(this,"initialized",!1);Vr(this,"pinia");Vr(this,"storefront")}async setup(t,n){if(document.getElementById("moonbase")){console.warn("Moonbase has already been initialized!");return}const r=document.createElement("div");r.id="moonbase",r.classList.add("moonbase"),document.body.append(r);const o=Ba(_g,n);if(this.storefront=Hv(t),this.pinia=hg(),Pv(n1).use(this.storefront).use(this.pinia).provide(_a,o).mount("#moonbase"),this.initialized=!0,window&&window.location){const s=new URLSearchParams(window.location.search),i=s.get("mb_intent");if(i&&Object.values(Me).includes(i)){const a=Object.fromEntries([...s.entries()].filter(([l])=>l.startsWith("mb_")).map(([l,u])=>[l.substring(3),u]));this[i](a);for(const l of Object.keys(a))s.delete(`mb_${l}`);const c=s.toString();window.history.replaceState(null,"",window.location.href.split("?")[0]+(c?`?${c}`:""))}}}sign_in(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");st(this.pinia).show(Ke.Authentication,Me.SignIn,t)}sign_up(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");st(this.pinia).show(Ke.Authentication,Me.SignUp,t)}confirm_account(){}confirm_email(){}confirm_email_change(){}view_account(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");const t=st(this.pinia);Cr(this.storefront).user.value?t.show(Ke.Customer,Me.ViewAccount):(t.show(Ke.Authentication,Me.SignIn),t.enqueue(Ke.Customer,Me.ViewAccount))}view_products(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");st(this.pinia).show(Ke.Cart,Me.ViewCart)}redeem_voucher(t){if(!this.initialized)throw new Error("Moonbase has not been set up yet");st(this.pinia).show(Ke.Cart,Me.ViewCart,t)}download_product(){}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");st(this.pinia).show(Ke.Activation,Me.ActivateProduct,t)}view_cart(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");st(this.pinia).show(Ke.Cart,Me.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=da(this.storefront);if(t!=null&&t.product_id){const c=ku(t.product_id,this.storefront);if(c.value)n.addToCart(c.value,(o=c.value.variations)==null?void 0:o.find(l=>l.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const l=ku(t.product_id,this.storefront);if(l.value)n.addToCart(l.value,(s=l.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 c=Cu(t.bundle_id,this.storefront);if(c.value)n.addToCart(c.value,(i=c.value.variations)==null?void 0:i.find(l=>l.id===t.variation_id));else{await this.storefront.loadedStorefrontPromise;const l=Cu(t.bundle_id,this.storefront);if(l.value)n.addToCart(l.value,(a=l.value.variations)==null?void 0:a.find(u=>u.id===t.variation_id));else throw new Error(`Bundle '${t.bundle_id}' not found`)}}st(this.pinia).show(Ke.Cart,Me.AddToCart)}checkout(){if(!this.initialized)throw new Error("Moonbase has not been set up yet");da(this.storefront).checkout(`${window.location.pathname}?mb_intent=view_products`)}}const Dd=new r1;globalThis&&(globalThis.Moonbase?console.warn("Multiple instances of Moonbase detected, only one will be initialized"):globalThis.Moonbase=Dd),bt.MoonbaseIntent=Me,bt.default=Dd,Object.defineProperties(bt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|