const t={},o=function(o,e,n){let a=Promise.resolve();if(e&&e.length>0){let o=function(t){return Promise.all(t.map(t=>Promise.resolve(t).then(t=>({status:"fulfilled",value:t}),t=>({status:"rejected",reason:t}))))};document.getElementsByTagName("link");const n=document.querySelector("meta[property=csp-nonce]"),i=n?.nonce||n?.getAttribute("nonce");a=o(e.map(o=>{if((o=function(t){return"/"+t}(o))in t)return;t[o]=!0;const e=o.endsWith(".css"),n=e?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${n}`))return;const a=document.createElement("link");return a.rel=e?"stylesheet":"modulepreload",e||(a.as="script"),a.crossOrigin="",a.href=o,i&&a.setAttribute("nonce",i),document.head.appendChild(a),e?new Promise((t,e)=>{a.addEventListener("load",t),a.addEventListener("error",()=>e(new Error(`Unable to preload CSS for ${o}`)))}):void 0}))}function i(t){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=t,window.dispatchEvent(o),!o.defaultPrevented)throw t}return a.then(t=>{for(const o of t||[])"rejected"===o.status&&i(o.reason);return o().catch(i)})};function e(t){!function(t,o){if("function"==typeof window.requestIdleCallback){const e=window.requestIdleCallback(t,o);return()=>{"function"==typeof window.cancelIdleCallback&&window.cancelIdleCallback(e)}}const e=window.setTimeout(()=>t({didTimeout:!0,timeRemaining:()=>0}),0)}(()=>t())}function n(t,o){t.dispatchEvent(new CustomEvent(o,{bubbles:!1,composed:!0}))}function a(t=document){const o=t.querySelector("style[nonce], script[nonce]");return o?.nonce||void 0}function i(t,o=t.ownerDocument){const e=a(o);e&&(t.nonce=e)}function r(t=document){const o=a(t);if(!o)return"";return` nonce="${o.replace(/&/g,"&").replace(/"/g,""")}"`}class ShopifyElement extends HTMLElement{constructor({shadow:t}={shadow:!0}){super(),this.#t=null,this.disconnected=!1,this.#o=()=>{Object.entries(this.events).forEach(([t,o])=>{const[e,n]=t.split(" ");("this"===n?[this]:this.shadowRoot?.querySelectorAll(n))?.forEach(t=>{t.removeEventListener(e,o)})})},this.#e=()=>{this.#o(),Object.entries(this.events).forEach(([t,o])=>{const[e,n]=t.split(" ");("this"===n?[this]:this.shadowRoot?.querySelectorAll(n))?.forEach(t=>{t.addEventListener(e,o,{passive:e.includes("touch")})})})},this.events={},t&&(this.#n=this.attachShadow({mode:"open"}))}#n;#t;#a;render(t){if(this.disconnected)return;if(!this.#n)throw new Error("No shadow root found");let o=this.#n.getElementById("shopify-element-wrapper");o||(o=document.createElement("div"),o.id="shopify-element-wrapper",this.#n.appendChild(o)),o.innerHTML=t}get lifecycleSignal(){return this.#a.signal}connectedCallback(){this.disconnected=!1,this.#a=new AbortController,document.addEventListener("shopify-render",this.#e)}#o;#e;disconnectedCallback(){this.disconnected=!0,this.#a?.abort(),document.removeEventListener("shopify-render",this.#e)}get context(){return this.#t||(this.#t=s(this,"product")),this.#t}get catalog(){return c(this)}styles(...t){const o=document.createElement("style");i(o),o.textContent=t.join("\n"),this.#n?.appendChild(o)}adoptSheets(...t){this.#n&&(this.#n.adoptedStyleSheets=t)}appendSheets(...t){if(this.#n){const o=this.#n.adoptedStyleSheets,e=t.filter(t=>!o.includes(t));e.length&&(this.#n.adoptedStyleSheets=[...o,...e])}}}function s(t,o){const e="error"===o?null:o,n=`shopify-context[${e?`type=${e}`:"type"}], shopify-list-context[${e?`type=${e}`:"type"}]`;let a=t;for(;;){const t=a.matches(n)?a:a.closest(n);if(t)return t;const o=a.getRootNode();if(!(o instanceof ShadowRoot))return null;a=o.host}}function c(t){let o=t.closest("shopify-store[store-domain],shopify-catalog");if(o)return o;if(o=document.querySelector("shopify-store[store-domain],shopify-catalog"),!o)throw new Error('No <shopify-store store-domain="..."> found!');return o}const l=[];function u(t,o){"loading"===document.readyState?l.push({name:t,constructor:o}):h(t,o)}function d(){l.forEach(({name:t,constructor:o})=>h(t,o))}function h(t,o){customElements.get(`shopify-${t}`)||customElements.define(`shopify-${t}`,o)}function p(t){throw new Error("Unexpected value: "+t)}function g(t){return t?.replace(/-/g,"_").toUpperCase()||"EN"}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d();const f=m;function m(t,...o){const e=t.map(t=>t.replace(/\\n/g,"\n").replace(/\\t/g,"\t").replace(/\\r/g,"\r").replace(/\\\\/g,"\\"));let n=e[0];for(let a=0;a{const o=parseFloat(getComputedStyle(document.documentElement).fontSize);if(16===o)return t;if(t.includes("rem")){return t.replace(/(\b\d+(\.\d+)?|\.\d+)rem\b/g,t=>16*parseFloat(t)/o+"rem")}return t};let w;let k;function _(){return k??=b(":host{all:initial;font-family:inherit;contain:layout;font-synthesis:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:geometricPrecision;color:inherit;line-height:inherit;visibility:inherit;direction:inherit}*,*:before,*:after{box-sizing:border-box}")}let x;let S;function C(t){return"shop"===t?.toLowerCase()}function A({customer:t}){const o=C(t.socialLoginProvider?.handle),e=t.firstName?.charAt(0)??t.lastName?.charAt(0)??t.email?.charAt(0)??"",n=t.avatarUrl?f`profile-picture`:f`${e}`,a=!!t.avatarUrl;return o?f`
`:f`
${n}
`}const E=m`query GetStorefrontData( $handle: String! $includeMenu: Boolean! $includeShop: Boolean! $includeCustomer: Boolean! $country: CountryCode $language: LanguageCode $customerAccessToken: String! ) @inContext(country: $country, language: $language) { menu(handle: $handle) @include(if: $includeMenu) { id title items { id title url items { id title url items { id title url } } } } shop @include(if: $includeShop) { id socialLoginProviders { handle } customerAccountTranslations { key value } } customer(customerAccessToken: $customerAccessToken) @include(if: $includeCustomer) { id firstName lastName email displayName socialLoginProvider { handle } avatarUrl } }`;let L=null,P=null;function $(t){if(!t||"string"!=typeof t||0===t.trim().length)return null;const o=(P||(L=document.createElement("canvas"),L.width=1,L.height=1,P=L.getContext("2d",{willReadFrequently:!0})),P);if(!o)return null;o.clearRect(0,0,1,1),o.fillStyle="#000000",o.fillStyle=t,o.fillRect(0,0,1,1);const[e,n,a]=o.getImageData(0,0,1,1).data;return[e,n,a]}function M(t,o=.5){const e=function(t){const o=$(t);if(!o)return null;const[e,n,a]=o.map(t=>{const o=t/255;return o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)});return.2126*e+.7152*n+.0722*a}(t);return null===e?null:e{const o=(t=>I.map(({variableToContrast:o,contrastVariable:e})=>({variable:e,value:M(t.getPropertyValue(o))?"#ffffff":"#000000"})))(t);if(0===o.length)return null;return`\n:host {\n ${o.map(({variable:t,value:o})=>`${t}: ${o};`).join("\n ")}\n}\n`},N="shop-coin-flip-avatar-animation-played";function R(t){const o=document.getElementById(t);if(!o?.textContent)return null;try{return e=o.textContent,String(e).includes("__proto__")?JSON.parse(e,(t,o)=>{if("__proto__"!==t)return o}):JSON.parse(e)}catch{return null}var e}function q(){return D()?.shop??null}function D(){return R("shopify-customer-account-data")}function T(t,o){return t?.some(t=>t.handle===o)??!1}function O(t){const o=t?.find(t=>"account_menu.aria_labels.account"===t.key);return o?.value??"Account"}const j="customer_account_menu/1.1";let F=[],B=null,U=null;function Y(){try{return!0===window.Shopify?.customerPrivacy?.analyticsProcessingAllowed?.()}catch{return!1}}function V(t){const o=t.schemaId.startsWith("monorail://")?t.schemaId:`monorail://${t.schemaId}`;window.ShopifyAnalytics.lib.track(o,function(t){const o={};for(const[e,n]of Object.entries(t))o[e.split(/(?=[A-Z])/).join("_").toLowerCase()]=n;return o}(t.payload))}function Z(){return B||(B=o(()=>import("./account/monorail-impl-DROYJeoH.js"),[]).then(t=>(U=t,function(t){const o=F;if(F=[],!Y())return;for(const e of o)t.produceMonorailEvent(e)}(t),t)).catch(t=>(B=null,F=[],null))),B}function H(t){"function"!=typeof window.ShopifyAnalytics?.lib?.track?Y()&&(U?U.produceMonorailEvent(t):(F.push(t),Z())):V(t)}const G="shopify-account";let J=[],Q=null,W=null;function X(){return Q||(Q=o(()=>import("./account/observe-logger-impl-CvnPPqr9.js"),[]).then(t=>(W=t,function(){if(!W)return;const t=J;J=[];for(const o of t)switch(o.type){case"metric":W.produceMetric(o.eventName,o.attributes,o.serviceName);break;case"histogram":W.produceHistogram(o.eventName,o.value,o.unit,o.attributes,o.serviceName);break;case"log":W.produceLog(o.eventName,o.attributes,o.serviceName)}}(),t)).catch(t=>(Q=null,J=[],null))),Q}function K(t,o={}){!function(t,o={},e=G){W?W.produceMetric(t,o,e):(J.push({type:"metric",eventName:t,attributes:o,serviceName:e}),X())}(`ShopifyAccount_${t}`,o)}function tt(t,o={}){!function(t,o={},e=G){W?W.produceLog(t,o,e):(J.push({type:"log",eventName:t,attributes:o,serviceName:e}),X())}(`ShopifyAccount_${t}`,o)}function ot(t,o,e,n={}){!function(t,o,e,n={},a=G){W?W.produceHistogram(t,o,e,n,a):(J.push({type:"histogram",eventName:t,value:o,unit:e,attributes:n,serviceName:a}),X())}(`ShopifyAccount_${t}`,o,e,n)}const et=/\/(\w[\w-]*)(?:\?(.*))*$/;function nt(t){if(t)try{const o=Number(function(t){const o=`/${t}`,e=et.exec(o);if(e&&void 0!==e[1])return e[1];throw new Error(`Invalid gid: ${t}`)}(t));return Number.isNaN(o)?void 0:o}catch{return}}function at(){return!!window.Shopify?.designMode}function it(){return"main"===window.Shopify?.theme?.role}function rt(){return at()?"editor":window.Shopify?.previewMode?"preview":"live"}var st=Object.defineProperty,ct=(t,o,e,n)=>{for(var a,i=void 0,r=t.length-1;r>=0;r--)(a=t[r])&&(i=a(o,e,i)||i);return i&&st(o,e,i),i};class Account extends ShopifyElement{constructor(){super(...arguments),this.#i=null,this.#r=null,this.#s=null,this.#c=[],this.#l=!1,this.#u=!1,this.#d=!1,this.#h=!1,this.#p=!1,this.#g=new CSSStyleSheet,this.#f=!1,this.events={"click .account__close":t=>{t.stopPropagation(),this.close()},"click .account-button":()=>{this.showModal()},"click .account-button.legacy":t=>{at()?t.preventDefault():this.#m("login_clicked",{metricsAttributes:{provider:"legacy"},skipDefaults:!0})}}}#i;#r;#s;#c;#l;#u;#d;#h;#p;#v;#b;#y;#g;#w;#k;#_;#f;#x;#S;#m(t,o){const e=this.#y?.shopId;if(!e)return;const n=o?.skipDefaults?{}:{isLoggedIn:!!this.#i,provider:this.#i?.socialLoginProvider?.handle??null},a={shopId:e,sessionId:this.#y?.sessionId,customerId:nt(this.#i?.id),pageUrl:window.location.href,isThemePublished:it(),viewContext:rt()},i={...n,...o?.metricsAttributes},r={...n,...a,...o?.logAttributes},s={...n,...o?.metricsAttributes,...o?.logAttributes};H({schemaId:j,payload:{...a,action:t,actionMetadata:JSON.stringify(s)}}),K(t,i),tt(t,r)}#C(){if(!this.shadowRoot?.host)return;const t=window.getComputedStyle(this.shadowRoot?.host);this.#A(t);M(t.getPropertyValue("--shopify-account-color-background"))?this.classList.add("dark-bg"):this.classList.remove("dark-bg")}#A(t){const o=z(t);o&&this.shadowRoot&&this.#g.replaceSync(o)}#E(){return this.shadowRoot?.querySelector(".account-button--shop-customer")??null}#L(){if(!C(this.#i?.socialLoginProvider?.handle))return;new URLSearchParams(window.location.search).has("shop_sign_in")&&(sessionStorage.getItem(N)||requestAnimationFrame(()=>{const t=this.#E();t&&(this.#w||(this.#w=new IntersectionObserver(t=>{if(t[0].isIntersecting&&(this.#w?.disconnect(),!sessionStorage.getItem(N))){const t=this.#E();t&&this.#P(t)}},{threshold:.1}),this.#w.observe(t)))}))}#P(t){sessionStorage.setItem(N,"true"),t.classList.add("animated")}async connectedCallback(){super.connectedCallback();const t=performance.now();this.adoptSheets(_(),S??=b(':host{--shopify-account-font-heading: -apple-system, BlinkMacSystemFont, "avenir next", avenir, "segoe ui", "helvetica neue", Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif;--shopify-account-font-heading-weight: 500;--shopify-account-font-heading-transform: none;--shopify-account-font-body: -apple-system, BlinkMacSystemFont, "avenir next", avenir, "segoe ui", "helvetica neue", Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif;--shopify-account-font-body-weight: 400;--shopify-account-font-body-transform: none;--shopify-account-radius-base: 12px;--shopify-account-color-background: #ffffff;--shopify-account-color-text: #0a142f;--shopify-account-color-accent: #0a142f;--shopify-account-color-accent-text: #ffffff;--shopify-account-dialog-position-top: 20px;--shopify-account-signed-in-avatar-size: 28px}'),x??=b(y(":host{--shopify-account-radius-button-small: calc( var(--shopify-account-radius-base) * .66 );--shopify-account-radius-dialog: calc( var(--shopify-account-radius-base) * 1.75 );--shopify-account-radius-button: var(--shopify-account-radius-base);--shopify-account-radius-input: var(--shopify-account-radius-base);--shopify-account-color-border: color-mix( in srgb, var(--shopify-account-color-background) 85%, var(--shopify-account-color-text) 15% );--shopify-account-color-background-subdued: rgb( from var(--shopify-account-color-border) r g b / .4 );--shopify-account-color-text-subdued: rgb( from var(--shopify-account-color-text) r g b / .6 );--shopify-account-color-accent-hover: lch( from var(--shopify-account-color-accent) calc(l*.7) c h );--shopify-account-color-shadow: rgb( from var(--shopify-account-color-text) r g b / .05 );--shopify-account-color-control-background: color-mix( in srgb, var(--shopify-account-color-background) 90%, #ffffff 10% );--shopify-account-color-control-text: var(--shopify-account-color-text);--shopify-account-color-card-background: color-mix( in srgb, var(--shopify-account-color-background) 90%, #ffffff 10% );--shopify-account-color-card-text: var(--shopify-account-color-text);--shopify-account-signed-in-avatar-color-background: var( --shopify-account-color-accent );--shopify-account-signed-in-avatar-color-text: var( --shopify-account-color-accent-text )}:host(.dark-bg){--shopify-account-color-border: color-mix( in srgb, var(--shopify-account-color-background) 75%, var(--shopify-account-color-text) 25% );--shopify-account-color-shadow: rgb( from var(--shopify-account-color-text) r g b / .08 )}#shopify-element-wrapper{--color-backdrop: rgba(0, 0, 0, .2);--color-shadow: 0 2px 16px 0 rgba(0, 0, 0, .1), 0 4px 60px 0 rgba(0, 0, 0, .25);--color-white: #ffffff;--shop-brand-color: #5433eb;--radius-pill: 999px;--radius-circle: 50%;--app-width: 360px;--app-page-spacing: 20px;--padding-base: 16px;--minimum-touch-target: 44px;--spacing-xs: 4px;--spacing-sm: 8px;--spacing-md: 12px;--spacing-lg: 16px;--spacing-header-gap: 10px;--spacing-button: 14px;--font-size-xs: .875rem;--font-size-sm: 1rem;--font-size-md: 1.125rem;--font-size-lg: 1.5rem;--size-icon-sm: 20px;--size-icon-md: 24px;--size-close-background: 32px;--opacity-hover: .9;--opacity-hover-subdued: .8;--opacity-hover-subtle: .7;--opacity-disabled: .5;--opacity-focus-ring: .5;--shadow-focus-ring: 0 0 0 var(--spacing-xs) rgb( from var(--shopify-account-color-text) r g b / var(--opacity-focus-ring) );--shadow-focus-ring-accent: 0 0 0 var(--spacing-xs) rgb( from var(--shopify-account-color-accent) r g b / var(--opacity-focus-ring) );--shadow-control: drop-shadow( 0px 2px 8px rgb(from var(--shopify-account-color-text) r g b / .04) );--easing-default: ease-in-out;--easing-out-quad: cubic-bezier(.32, .72, 0, 1);--timing-short: .12s;--timing-default: .24s;--timing-long: .36s}")),w??=b(y('@layer transitions,base;:host{display:inline-block;vertical-align:middle;contain:layout}#shopify-element-wrapper{container-type:normal}.account-button{--hover-opacity: 0;--clamped-avatar-size: clamp( 24px, var(--shopify-account-signed-in-avatar-size), 32px );appearance:none;border:0px solid transparent;background-color:transparent;padding:0;margin:0;display:flex;justify-content:center;align-items:center;color:currentColor;text-decoration:none;cursor:pointer;min-width:var( --shopify-account-avatar-size, calc(var(--clamped-avatar-size) * 1.57) );min-height:var( --shopify-account-avatar-size, calc(var(--clamped-avatar-size) * 1.57) )}.account-button:hover{--hover-opacity: 1}.account-button[part=signed-out-avatar]{line-height:inherit;visibility:inherit;direction:inherit}.account-button__icon{width:15px;height:17px}.account-button__icon-path{stroke:currentColor;stroke-linejoin:round;stroke-width:1.5}.account-button__avatar{position:relative;width:var(--clamped-avatar-size);height:var(--clamped-avatar-size);border-radius:50%;background-color:var( --shopify-account-signed-in-avatar-color-background, var(--shopify-account-color-accent, #f6f6f6) );color:var( --shopify-account-signed-in-avatar-color-text, var(--shopify-account-color-accent-text, #1a1a1a) );display:flex;justify-content:center;align-items:center;box-shadow:inset 0 0 0 1px #00000014;transition:scale var(--timing-short) var(--easing-default),background-color var(--timing-short) var(--easing-default),color var(--timing-short) var(--easing-default)}.account-button__avatar:before{content:"";position:absolute;width:100%;height:100%;left:0;top:0;box-shadow:0 4px 4px rgba(from var(--shopify-account-signed-in-avatar-color-background) r g b / .12);border-radius:50%;pointer-events:none;opacity:var(--hover-opacity);transition:opacity var(--timing-default) var(--easing-default)}.account-button__avatar:hover{box-shadow:0 1px 3px #00000014;scale:1.05}.account-button--shop-customer{--shop-brand-color-dark: lch(from var(--shop-brand-color) calc(l/2) c h);--coin-thickness: calc(var(--clamped-avatar-size) * .12);--ring-width: 2px;transform-style:preserve-3d;transform-origin:50% 50% calc(var(--coin-thickness) / 2 * -1);backface-visibility:hidden;box-shadow:none;border:none}.account-button--shop-customer:after{content:"";position:absolute;z-index:-1;left:calc(var(--clamped-avatar-size) / 2);width:calc(var(--coin-thickness) - .5px);height:100%;background-color:var(--shop-brand-color);transform-origin:0% 0%;transform:rotateY(90deg) scaleX(.9) translate(5%);animation:coinInside 2s cubic-bezier(.4,0,.2,1);animation-play-state:paused}.account-button--shop-customer .account-button__coin-front:after{content:"";position:absolute;inset:0;border-radius:50%;box-shadow:inset 0 0 0 var(--ring-width) var(--shop-brand-color);pointer-events:none}.account-button__coin-front,.account-button__coin-back{position:absolute;width:100%;height:100%;border-radius:50%;display:flex;align-items:center;justify-content:center;backface-visibility:hidden;box-sizing:border-box;transform-style:preserve-3d}.account-button__coin-front:before,.account-button__coin-back:before{content:"";position:absolute;z-index:-1;width:100%;height:100%;border-radius:50%;background-color:var(--shop-brand-color);transform:translateZ(-.25px)}.account-button__coin-front{background-color:var( --shopify-account-signed-in-avatar-color-background, var(--shopify-account-color-accent) );transition:background-color var(--timing-short) var(--easing-default),color var(--timing-short) var(--easing-default)}.account-button__coin-front--has-image{background:transparent}.account-button__coin-back{background:radial-gradient(var(--shop-brand-color) 40%,var(--shop-brand-color-dark));transform:translateZ(calc(var(--coin-thickness) * -1)) rotateY(180deg)}.account-button__coin-back-logo{width:100%;height:100%}.account-button--shop-customer.animated{animation:coinFlip 2s cubic-bezier(.4,0,.2,1)}.account-button--shop-customer.animated:after{animation-play-state:running}@keyframes coinFlip{0%{transform:rotateY(0)}5%{transform:rotateY(0)}45%{transform:rotateY(180deg)}60%{transform:rotateY(180deg)}to{transform:rotateY(360deg)}}@keyframes coinInside{0%{opacity:0}10%{opacity:0}25%{opacity:1}40%{opacity:0}65%{opacity:0}80%{opacity:1}90%{opacity:0}to{opacity:0}}.account-button__avatar-initials{font-family:var(--shopify-account-font-body);font-size:calc(var(--clamped-avatar-size) / 2);text-transform:uppercase;font-weight:var(--shopify-account-font-body-weight);line-height:1;text-box:trim-both cap alphabetic}.account-button__avatar-image{width:100%;height:100%;object-fit:cover;border-radius:50%}.dialog{margin:0;padding:0;border:none;background-color:var(--shopify-account-color-background);color:var(--shopify-account-color-text);box-shadow:var(--color-shadow);max-width:100%;max-height:calc(100dvh - var(--app-page-spacing) * 2);overflow:hidden;font-family:var(--shopify-account-font-body);font-weight:var(--shopify-account-font-body-weight);text-transform:var(--shopify-account-font-body-transform);line-height:initial;direction:inherit;height:auto;overscroll-behavior:contain;contain:layout style}.dialog:not([open]){display:flex;flex-direction:column;visibility:hidden;pointer-events:none;content-visibility:hidden}.dialog::backdrop{transition:opacity var(--timing-default) var(--easing-default);opacity:0;background:transparent}.dialog[open]{animation:var(--dialog-drawer-opening-animation) var(--timing-default) var(--dialog-drawer-easing, var(--easing-default)) forwards;contain:content}.dialog[open]::backdrop{opacity:1}@starting-style{.dialog[open]::backdrop{opacity:0}}.dialog.closing{pointer-events:none;animation:var(--dialog-drawer-closing-animation) var(--timing-default) var(--dialog-drawer-easing, var(--easing-default)) forwards}.dialog.closing::backdrop{opacity:0}@media(min-width:751px){.dialog{--dialog-drawer-opening-animation: account-popover-slide-in;--dialog-drawer-closing-animation: account-popover-slide-out;--dialog-drawer-easing: var(--easing-out-quad);inset-block-start:var(--shopify-account-dialog-position-top);inset-inline-end:var(--app-page-spacing);inset-block-end:auto;inset-inline-start:auto;border-radius:var(--shopify-account-radius-dialog);width:var(--app-width);max-width:360px}}@media(max-width:750px){.dialog{--dialog-drawer-opening-animation: account-drawer-slide-in;--dialog-drawer-closing-animation: account-drawer-slide-out;inset:auto 0 0;border-top-left-radius:var(--shopify-account-radius-dialog);border-top-right-radius:var(--shopify-account-radius-dialog);width:100vw;max-height:100dvh;min-height:min(var(--dialog-min-height, 0px),100dvh)}.dialog::backdrop{background:var(--color-backdrop)}.dialog .account{max-height:100dvh}}.account{position:relative;display:flex;flex-direction:column;height:100%;max-height:calc(100dvh - var(--shopify-account-dialog-position-top) - var(--app-page-spacing));overflow:hidden;overflow-y:auto;contain:layout style}.account.loading{min-height:300px}.account.loading:before{content:"";position:absolute;inset-block-start:var(--spacing-lg);inset-inline-end:var(--spacing-lg);background-color:var(--shopify-account-color-background-subdued);width:var(--size-close-background);height:var(--size-close-background);border-radius:var(--shopify-account-radius-button-small)}.account.loading slot[name=shop-login]{visibility:hidden}@keyframes account-popover-slide-in{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes account-popover-slide-out{0%{transform:translate(0);opacity:1}to{transform:translateY(20px);opacity:0}}@keyframes account-drawer-slide-in{0%{transform:translateY(50%);opacity:0}50%{opacity:1}to{transform:translateY(0)}}@keyframes account-drawer-slide-out{0%{transform:translateY(0);opacity:1}75%{opacity:0}to{transform:translateY(50%);opacity:0}}@media(prefers-reduced-motion:reduce){.account-button--shop-customer.animated,.account-button--shop-customer:before,.dialog[open],.dialog.closing{animation:none}.account-button,.account-button__avatar,.account-button__coin-front,.dialog::backdrop{transition-duration:.01ms!important}}'))),this.appendSheets(this.#g);const{country:o,language:n}=function(t){const o=D();let e=null;try{e=c(t)}catch{}return{country:e?.getAttribute("country")||o?.visitor?.country,language:e?.getAttribute("language")||o?.visitor?.language}}(this);this.#v=n??void 0,this.#b=o??void 0;const a=this.#$(),i=!!this.menu,r=!a,s=!a;if(i||r||s){const t=this.#M({includeMenu:i,includeShop:r,includeCustomer:s});a||await t}ot("data_loaded_duration",performance.now()-t,"ms",{source:a?"serialized":"api"}),this.#I();ot("button_rendered_duration",performance.now()-t,"ms",{}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ot("first_paint_duration",performance.now()-t,"ms",{})})});const l=this.lifecycleSignal;e(async()=>{if(!l.aborted&&!this.#u){if(!this.#f&&(this.#x=this.#z(),await this.#x,l.aborted))return;await this.#N()}}),requestAnimationFrame(()=>this.#C());const u=performance.now()-t;var d;this.#m("component_loaded",{metricsAttributes:{hydratedFromSerialized:a,hasStoreComponent:!!document.querySelector("shopify-store"),hasShopLogin:(d=this.#s,!(!d||!d?.find(t=>C(t.handle)))),hasGoogleLogin:T(this.#s,"Google"),hasFacebookLogin:T(this.#s,"Facebook"),hasAppleLogin:T(this.#s,"Apple"),hasAvatar:!!this.#i?.avatarUrl,isThemePublished:it(),viewContext:rt()}}),ot("component_load_duration",u,"ms",{hydratedFromSerialized:a,isLoggedIn:!!this.#i}),requestAnimationFrame(()=>this.#L())}#$(){const t=D();if(!t)return!1;const o=q();return this.#i=t.customer,this.#u=t.shop?.legacyCustomerAccounts??!1,this.#d=t.shop?.b2bEnabled??!1,this.#h=t.shop?.marketingConsentSigninEnabled??!1,this.#p=t.shop?.marketingConsentPreselected??!1,this.#s=q()?.socialLoginProviders??null,this.#c=q()?.customerAccountTranslations??[]??[],this.#y={shopId:nt(o?.id),sessionId:t.visitor?.sessionId},!0}disconnectedCallback(){super.disconnectedCallback(),this.#k?.destroy(),this.#k=void 0,this.#_=void 0,this.#x=void 0,this.#S=void 0,this.#w?.disconnect(),this.#w=void 0}#N(){if(this.#k)return Promise.resolve(this.#k);if(!this.#_){const t=(async()=>{const{AccountDialogController:t}=await o(async()=>{const{AccountDialogController:t}=await import("./account/account-dialog-WF45V3jv.js");return{AccountDialogController:t}},[]);return this.#k??=new t({host:this,shadowRoot:this.shadowRoot,adoptSheets:this.appendSheets.bind(this),getCustomer:()=>this.#i,getStorefrontMenu:()=>this.#r,getSocialProviders:()=>this.#s,getB2bEnabled:()=>this.#d,getMarketingConsentEnabled:()=>this.#h,getMarketingConsentPreselected:()=>this.#p,getIsLoadingMenu:()=>this.#l,getTranslations:()=>this.#c,getSignInUrl:()=>this.signInUrl,getLanguage:()=>this.#v,getCountry:()=>this.#b,trackAction:(t,o)=>this.#m(t,o),requestClose:()=>this.close()}),this.#k})();t.catch(()=>{this.#_===t&&(this.#_=void 0)}),this.#_=t}return this.#_}async#z(){try{(await o(()=>import("./account/account-dialog-WF45V3jv.js"),[])).AccountDialogController&&(this.#f=!0)}catch{this.#f=!1}}showModal(){return this.#k?.isOpen?Promise.resolve(this):(this.#S??=this.#R().finally(()=>{this.#S=void 0}),this.#S)}async#R(){const t=await this.#N();return t.isOpen?this:(t.show(),t.isOpen?(this.#m("menu_opened"),n(this,"open"),this):(this.#m("dialog_open_failed",{metricsAttributes:{disconnected:this.disconnected,hasDialog:!!this.shadowRoot?.querySelector("dialog")}}),this))}close(){return this.#k?.isOpen&&(this.#m("menu_closed"),this.#k.close(),n(this,"close")),this}async#M(t){const{includeMenu:o,includeShop:e,includeCustomer:n}=t,a=e?"component_load_failed":o?"menu_items_fetch_failed":null;try{await customElements.whenDefined("shopify-store");const t=c(this),i=t.getAttribute("country")?.toUpperCase()||"US",r=g(t.getAttribute("language")),s=t.getAttribute("customer-access-token"),l=n&&!!s;o&&(this.#l=!0);const{data:u,errors:d}=await t.request({query:E,variables:{handle:this.menu||"",includeMenu:o,includeShop:e,includeCustomer:l,country:i,language:r,customerAccessToken:s||""}});if(this.#l=!1,d&&(!function(t){if(!t?.graphQLErrors)return;t.graphQLErrors.filter(t=>"ACCESS_DENIED"===t.extensions?.code).forEach(t=>{const o=t.extensions?.requiredAccess||"unknown scope";console.error(`[shopify-account] API access error: ${o}`)})}(d),a&&K(a,{errorType:"graphql"})),l&&(this.#i=u?.customer?{id:u.customer.id,email:u.customer.email||"",displayName:u.customer.displayName,firstName:u.customer.firstName||void 0,lastName:u.customer.lastName||void 0,avatarUrl:u.customer.avatarUrl||void 0,socialLoginProvider:u.customer.socialLoginProvider||void 0}:null),e&&u?.shop&&(this.#y={shopId:nt(u.shop.id)},this.#s=u.shop.socialLoginProviders??null,this.#c=u.shop.customerAccountTranslations??[]),o&&(u?.menu?.items?this.#r=u.menu.items:(console.error(`[shopify-account] Menu "${this.menu}" not found in Storefront API. Falling back to default menu items.`),this.#r=null),this.#k?.refresh(),!d)){K("menu_items_loaded",{hasItems:!!this.#r&&this.#r.length>0})}}catch(i){a&&K(a,{errorType:"fetch"}),o&&(this.#r=null,this.#l=!1,this.#k?.refresh()),n&&(this.#i=null)}}#q(){return this.#i?A({customer:this.#i}):f``}#D(){const t=this.shadowRoot?.querySelector(".wrapper");if(!t)return;const o=t.querySelector(".account-button");o&&(o.innerHTML=this.#q())}#T(){document.dispatchEvent(new CustomEvent("shopify-render",{composed:!0,bubbles:!0}))}#I(){const t=!!this.#i;if(t||sessionStorage.removeItem(N),this.#u)return this.render(f``),void this.#T();const o=this.shadowRoot?.querySelector(".wrapper");o?this.#D():(this.render(f`
`),this.#T())}}ct([v({type:String})],Account.prototype,"menu"),ct([v({type:String})],Account.prototype,"signInUrl"),h("account",Account),e(()=>{o(()=>import("./account/store-DT2mumoI.js"),[])});export{ShopifyElement as S,p as a,c as b,r as c,u as d,i as e,b as f,s as g,f as h,y as i,_ as j,h as k,ot as l,K as m,g as n,tt as o,at as p};