PageSourceSearch

https://www.stevemadden.com/cdn/s/trekkie.storefront.f1ba865b3fecd812ad617f74ac079261075e9edb.min.js

js stevemadden.com collected 2026-09-24 08:36:13 UTC 139,246 bytes, 1 lines download raw bytes

1!function(){"use strict";var e={9414:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EcommerceIntegration=t.PSEUDO_PAGE_EVENTS=t.TEST_PRODUCT_ADDED_TO_CART_SERVER_CHANGELOG=t.CHECKOUT_ONE_PAGE_VIEW=t.CHECKOUT_PAYMENT_STEP_STARTED=t.CHECKOUT_SHIPPING_INFO_SUBMITTED=t.CHECKOUT_SHIPPING_STEP_STARTED=t.CHECKOUT_ADDRESS_INFO_SUBMITTED=t.CHECKOUT_CONTACT_INFO_SUBMITTED=t.CHECKOUT_CONTACT_STEP_STARTED=t.ANALYTICS_ADDED_PAYMENT=t.ANALYTICS_PERFORMED_SEARCH=t.ANALYTICS_STARTED_ORDER_ONCE_PER_CHECKOUT=t.ANALYTICS_STARTED_ORDER=t.ANALYTICS_COMPLETED_ORDER=t.ANALYTICS_ADDED_PRODUCT_NEXT=t.ANALYTICS_ADDED_PRODUCT=t.ANALYTICS_VIEWED_PRODUCT_CATEGORY=t.ANALYTICS_VIEWED_PRODUCT=t.ANALYTICS_PAGE_VIEW=t.ANALYTICS_GENERIC_EVENT=t.analyticsEvents=void 0;var i=n(6573),a=n(9974),s=n(357),c=n(8416),u=n(1482);t.analyticsEvents={viewedProduct:/^[ _]?viewed[ _]?product[ _]?$/i,viewedProductCategory:/^[ _]?viewed[ _]?product[ _]?category[ _]?$/i,viewedProductVariant:/^[ _]?viewed[ _]?product[ _]?variant[ _]?$/i,addedProduct:/^[ _]?added[ _]?product[ _]?$/i,addedProductNext:/^[ _]?added[ _]?product[ _]?next[ _]?$/i,addedProductPermalinkTest:/^[ _]?added[ _]?product[ _]?permalink[ _]?test[ _]?$/i,completedOrder:/^[ _]?completed[ _]?order[ _]?$/i,startedOrder:/^[ _]?started[ _]?order[ _]?$/i,startedOrderRemote:/^[ _]?started[ _]?order[ _]?remote[ _]?$/i,startedOrderOncePerCheckout:/^[ _]?started[ _]?order[ _]?once[ _]?per[ _]?checkout[ _]?$/i,startedOrderOncePerCheckoutRemote:/^[ _]?started[ _]?order[ _]?once[ _]?per[ _]?checkout[ _]?remote[ _]?$/i,performedSearch:/^[ _]?performed[ _]?search[ _]?$/i,addedPayment:/^[ _]?added[ _]?payment[ _]?$/i,addedPaymentRemote:/^[ _]?added[ _]?payment[ _]?remote[ _]?$/i,checkoutContactStepStarted:/^[ _]?checkout[ _]?[ _]?contact[ _]?step[ _]?started[ _]?$/i,checkoutContactInfoSubmitted:/^[ _]?checkout[ _]?[ _]?contact[ _]?info[ _]?submitted[ _]?$/i,checkoutContactInfoSubmittedRemote:/^[ _]?checkout[ _]?[ _]?contact[ _]?info[ _]?submitted[ _]?remote[ _]?$/i,checkoutAddressInfoSubmitted:/^[ _]?checkout[ _]?[ _]?address[ _]?info[ _]?submitted[ _]?$/i,checkoutAddressInfoSubmittedRemote:/^[ _]?checkout[ _]?[ _]?address[ _]?info[ _]?submitted[ _]?remote[ _]?$/i,checkoutShippingStepStarted:/^[ _]?checkout[ _]?[ _]?shipping[ _]?step[ _]?started[ _]?$/i,checkoutShippingInfoSubmitted:/^[ _]?checkout[ _]?[ _]?shipping[ _]?info[ _]?submitted[ _]?$/i,checkoutShippingInfoSubmittedRemote:/^[ _]?checkout[ _]?[ _]?shipping[ _]?info[ _]?submitted[ _]?remote[ _]?$/i,checkoutPaymentStepStarted:/^[ _]?checkout[ _]?[ _]?payment[ _]?step[ _]?started[ _]?$/i,checkoutOnePageView:/^[ _]?checkout[ _]?[ _]?one[ _]?page[ _]?view[ _]?$/i,testProductAddedToCartServerChangelog:/^test[ _]?product[ _]?added[ _]?to[ _]?cart[ _]?server[ _]?changelog$/i},t.ANALYTICS_GENERIC_EVENT="genericEvent",t.ANALYTICS_PAGE_VIEW="pageView",t.ANALYTICS_VIEWED_PRODUCT="viewedProduct",t.ANALYTICS_VIEWED_PRODUCT_CATEGORY="viewedProductCategory",t.ANALYTICS_ADDED_PRODUCT="addedProduct",t.ANALYTICS_ADDED_PRODUCT_NEXT="addedProductNext",t.ANALYTICS_COMPLETED_ORDER="completedOrder",t.ANALYTICS_STARTED_ORDER="startedOrder",t.ANALYTICS_STARTED_ORDER_ONCE_PER_CHECKOUT="startedOrderOncePerCheckout",t.ANALYTICS_PERFORMED_SEARCH="performedSearch",t.ANALYTICS_ADDED_PAYMENT="addedPayment",t.CHECKOUT_CONTACT_STEP_STARTED="checkoutContactStepStarted",t.CHECKOUT_CONTACT_INFO_SUBMITTED="checkoutContactInfoSubmitted",t.CHECKOUT_ADDRESS_INFO_SUBMITTED="checkoutAddressInfoSubmitted",t.CHECKOUT_SHIPPING_STEP_STARTED="checkoutShippingStepStarted",t.CHECKOUT_SHIPPING_INFO_SUBMITTED="checkoutShippingInfoSubmitted",t.CHECKOUT_PAYMENT_STEP_STARTED="checkoutPaymentStepStarted",t.CHECKOUT_ONE_PAGE_VIEW="checkoutOnePageView",t.TEST_PRODUCT_ADDED_TO_CART_SERVER_CHANGELOG="testProductAddedToCartServerChangelog",t.PSEUDO_PAGE_EVENTS=[t.CHECKOUT_CONTACT_STEP_STARTED,t.CHECKOUT_SHIPPING_STEP_STARTED,t.CHECKOUT_PAYMENT_STEP_STARTED,t.CHECKOUT_ONE_PAGE_VIEW];var l=function(e){function n(t,n,o){var r=e.call(this,t,n,o)||this;return r.wrapTrack(),r.setPixelStub(),r}return r(n,e),n.prototype.wrapTrack=function(){var e=this.track;this.track=function(n){var o=n.event,r=!1;for(var i in t.analyticsEvents){var a=t.analyticsEvents[i];if(this[i]&&a.test(o)){this[i].apply(this,[n]),r=!0;break}}r||e.apply(this,Array.prototype.slice.call(arguments))}},n.prototype.addMonorailBatchEvent=function(e){if(s.default.appName&&s.default.appName in u.appNameToEcommerceEventSchemaId){var t=this.getEcommercePixelIds();i.addBatchEvent({schemaId:e.schemaId?e.schemaId:u.appNameToEcommerceEventSchemaId[s.default.appName],payload:a.objectAssignFilterUndefined({shop_id:s.default.shopId,partner_name:this.getEcommerceMetricsTag(),event_name:e.eventName,unique_token:s.default.uniqToken,visit_token:s.default.visitToken,integration_id:this.getIntegrationId()},{pixel_id:t&&t.length>0?t[0]:void 0,event_properties:e.eventProperties,checkout_token:s.default.checkoutToken,event_id:e.eventId})})}},n}(c.Integration);t.EcommerceIntegration=l},8416:function(e,t,n){var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};
1Object.defineProperty(t,"__esModule",{value:!0}),t.Integration=void 0;var r=n(7179),i=n(8519),a=function(){function e(e,t,n){this.state=null,this.deferedEvents=new Set,this.options={},this.options=o(o({},e),t),this.ready=n}return e.prototype.initializeOrAwaitConsent=function(){var e,t;try{r.otelClient.counter({name:"trekkie_feature_usage",value:1,attributes:{feature:"integration_load",integration_name:null!==(e=null==this?void 0:this.name())&&void 0!==e?e:"unknown",integration_has_consent:null!==(t=null==this?void 0:this.hasConsent())&&void 0!==t?t:"unknown",source:"trekkie-"+i.inferSource()+"-browser"}})}catch(e){}null===this.state&&(this.hasConsent()?this.initialize(this.options):this.awaitConsent())},e.prototype.awaitConsent=function(){this.state="awaiting-consent",this.ready()},e.prototype.initialize=function(e){this.state="initialized",this.ready()},e.prototype.onConsentCollected=function(e){var t=this;this.hasConsent(e)&&("awaiting-consent"===this.state&&this.initialize(),"initialized"===this.state&&this.deferedEvents.size>0&&this.deferedEvents.forEach((function(e,n,r){var i=e[0],a=e[1];r.delete(n),t.callEvent(i,o(o({},a),{emittedAsync:!0}))})))},e.prototype.emitEventOrAwaitConsent=function(e,t){this.hasConsent()?this.callEvent(e,t):this.deferedEvents.add([e,t])},e.prototype.callEvent=function(e,t){switch(e){case"page":this.page(t);break;case"track":this.track(t)}},e.prototype.checkoutOnePageView=function(e){if(e.properties.hasOwnProperty("page")){var t=e.properties;this.page(t.page)}},e.flatten=function(e){var t=o({},e);return t.properties={},o(o({},t),e.properties)},e.isEqual=function(e,t){for(var n in e)if(e[n]!==t[n])return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0},e}();t.Integration=a},1482:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.extractSchemaIdFromEventName=t.buyWithPrimePresenceSchemaId=t.trekkieAssetContextSchemaId=t.customStorefrontAnalyticsSchemaId=t.storefrontAnalyticsSchemaIdValidation=t.storefrontAnalyticsSchemaIdV5=t.legacyStorefrontAnalyticsSchemaId=t.appNameToEcommerceEventSchemaId=t.appNameToPageViewSchemaId=void 0,t.appNameToPageViewSchemaId={admin:"trekkie_admin_page_view/1.0",appstore:"trekkie_appstore_page_view/1.2",blog:"trekkie_blog_page_view/1.2",brochure:"trekkie_brochure_page_view/1.3",checkout:"trekkie_checkout_page_view/1.2","collabs-merchants":"trekkie_collabs_merchants_page_view/1.0","compass-web":"trekkie_compass_web_page_view/1.2",creators:"trekkie_creators_page_view/2.0",delivery_app:"trekkie_delivery_app_page_view/1.0",docs:"trekkie_docs_page_view/1.2",development:"edge_test/1.0",exchange:"trekkie_exchange_page_view/1.2",experts:"trekkie_experts_page_view/1.0",handshake:"trekkie_handshake_page_view/1.0",fakestore:"trekkie_fakestore_page_view/1.0",identity:"trekkie_identity_page_view/1.2",linkpop:"trekkie_linkpop_page_view/2.0","marketing-misc":"trekkie_marketing_misc_page_view/1.2","oberlo-home":"trekkie_oberlo_home_page_view/1.3",opinions:"trekkie_opinions_page_view/1.2",partners:"trekkie_partners_page_view/1.2","shopify-ping-web":"trekkie_shopify_ping_web_page_view/1.0",portal:"trekkie_portal_page_view/1.0",storefront:"trekkie_storefront_page_view/1.2",testing:"edge_test/1.0",themestore:"trekkie_themestore_page_view/1.2","services-db":"trekkie_services_db_page_view/1.0"},t.appNameToEcommerceEventSchemaId={storefront:"trekkie_storefront_ecommerce_event_emit/4.0",checkout:"trekkie_checkout_ecommerce_event_emit/4.0",test:"edge_test_ecommerce_event_emit/1.0"},t.legacyStorefrontAnalyticsSchemaId="storefront_customer_tracking/4.30",t.storefrontAnalyticsSchemaIdV5="storefront_customer_tracking/5.11",t.storefrontAnalyticsSchemaIdValidation="storefront_customer_tracking_validation/1.0",t.customStorefrontAnalyticsSchemaId="custom_storefront_customer_tracking/1.8",t.trekkieAssetContextSchemaId="trekkie_asset_context/1.3",t.buyWithPrimePresenceSchemaId="storefront_buy_with_prime_presence/1.0",t.extractSchemaIdFromEventName=function(e){var t=e.toLowerCase();if(0===t.lastIndexOf("monorail://")&&t.length>11)return t.substr(11)}}
1,9965:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ConsentValuesV2=t.IntegrationTypes=t.ConsentPurposes=void 0;var o=n(2463);Object.defineProperty(t,"ConsentPurposes",{enumerable:!0,get:function(){return o.ConsentKeys}});var r,i=n(4842);Object.defineProperty(t,"IntegrationTypes",{enumerable:!0,get:function(){return i.IntegrationTypes}}),(r=t.ConsentValuesV2||(t.ConsentValuesV2={})).NO_VALUE="",r.ACCEPTED="1",r.DECLINED="0"},4842:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.IntegrationTypes=void 0,(n=t.IntegrationTypes||(t.IntegrationTypes={})).ECOMMERCE="EcommerceIntegration",n.INTEGRATION="Integration"},3988:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.S2S=t.RemoteEventStatus=t.SHOP_ANALYTICS_TOKEN_NAME=t.HEADLESS_API_CLIENT_ID=t.HYDROGEN_API_CLIENT_ID=t.CHECKOUT_SHIPPING_INFO_SUBMITTED_EVENT_NAME=t.CHECKOUT_ADDRESS_INFO_SUBMITTED_EVENT_NAME=t.CHECKOUT_CONTACT_INFO_SUBMITTED_EVENT_NAME=t.COLLECTION_PAGE_RENDERED_EVENT_NAME=t.CHECKOUT_STARTED_ONCE_PER_CHECKOUT_EVENT_NAME=t.CHECKOUT_COMPLETED_EVENT_NAME=t.CHECKOUT_STARTED_EVENT_NAME=t.SEARCH_SUBMITTED_EVENT_NAME=t.PAYMENT_INFO_SUBMITTED_EVENT_NAME=t.TEST_PRODUCT_ADDED_TO_CART_SERVER_CHANGELOG_EVENT_NAME=t.TEST_PRODUCT_ADDED_TO_CART_PERMALINK_EVENT_NAME=t.PRODUCT_ADDED_TO_CART_NEXT_EVENT_NAME=t.PRODUCT_ADDED_TO_CART_LEGACY_EVENT_NAME=t.PRODUCT_ADDED_TO_CART_EVENT_NAME=t.PRODUCT_PAGE_RENDERED_EVENT_NAME=t.PAGE_RENDERED_EVENT_NAME=void 0;var a,s=n(2463),c=n(9414),u=n(4252),l=n(4779),d=n(5533),f=n(6573),p=n(1482),_=n(1129),v=n(9974),h=n(8533),y=n(9965),m=n(357),g=n(3420),E=n(4779),T=n(7956),S=n(3811),A=n(6848),C=n(5263),k=n(7179),w=n(161);t.PAGE_RENDERED_EVENT_NAME="page_rendered",t.PRODUCT_PAGE_RENDERED_EVENT_NAME="product_page_rendered",t.PRODUCT_ADDED_TO_CART_EVENT_NAME="product_added_to_cart",t.PRODUCT_ADDED_TO_CART_LEGACY_EVENT_NAME="product_added_to_cart_legacy",t.PRODUCT_ADDED_TO_CART_NEXT_EVENT_NAME="product_added_to_cart_next",t.TEST_PRODUCT_ADDED_TO_CART_PERMALINK_EVENT_NAME="test_product_added_to_cart_permalink",t.TEST_PRODUCT_ADDED_TO_CART_SERVER_CHANGELOG_EVENT_NAME="test_product_added_to_cart_server_changelog",t.PAYMENT_INFO_SUBMITTED_EVENT_NAME="payment_info_submitted",t.SEARCH_SUBMITTED_EVENT_NAME="search_submitted",t.CHECKOUT_STARTED_EVENT_NAME="checkout_started",t.CHECKOUT_COMPLETED_EVENT_NAME="checkout_completed",t.CHECKOUT_STARTED_ONCE_PER_CHECKOUT_EVENT_NAME="checkout_started_once_per_checkout",t.COLLECTION_PAGE_RENDERED_EVENT_NAME="collection_page_rendered",t.CHECKOUT_CONTACT_INFO_SUBMITTED_EVENT_NAME="checkout_contact_info_submitted",t.CHECKOUT_ADDRESS_INFO_SUBMITTED_EVENT_NAME="checkout_address_info_submitted",t.CHECKOUT_SHIPPING_INFO_SUBMITTED_EVENT_NAME="checkout_shipping_info_submitted",t.HYDROGEN_API_CLIENT_ID=6167201,t.HEADLESS_API_CLIENT_ID=12875497473,t.SHOP_ANALYTICS_TOKEN_NAME="shop_analytics",function(e){e.BLOCK="block",e.FILTER="filter",e.ALLOW="allow"}(a=t.RemoteEventStatus||(t.RemoteEventStatus={}));var I=function(e){function n(t,o,r){var a=e.call(this,n.defaultOptions,i({},o),r)||this;return a.pageID=m.default.microSessionId,a.trackingIdentifierTelemetry=new w.TrackingIdentifierTelemetry,a}return r(n,e),n.prototype.onConsentCollected=function(t){var n=l.haveConsentForMarketingOrAnalytics(null==t?void 0:t.detail);this.trackingIdentifierTelemetry.markTrackingAllowedTransition(n),_.prefetchAttributesIfEligible(t),e.prototype.onConsentCollected.call(this,t)},n.prototype.name=function(){return"S2S"},n.prototype.type=function(){return y.IntegrationTypes.ECOMMERCE},n.prototype.hasConsent=function(e){var t=l.haveConsentForMarketingOrAnalytics(null==e?void 0:e.detail);return this.trackingIdentifierTelemetry.observeTrackingAllowed(t),t},n.prototype.emitEventOrAwaitConsent=function(t,n){var o;try{var r="event"in n?n.event:"Page View";if(Object.values(c.analyticsEvents).every((function(e){return!e.test(r)}))&&"Page View"!==r)return;k.otelClient.counter({name:"trekkie_feature_usage",value:1,attributes:{feature:"first_party_event_emission",event_name:r,user_can_be_tracked:s.userCanBeTracked(),integration_has_consent:this.hasConsent(),source:this.getSource()+"-browser",modules_supported:Boolean(null===(o=window.Shopify)||void 0===o?void 0:o.modules)}})}catch(e){}e.prototype.emitEventOrAwaitConsent.call(this,t,n)},n.prototype.fireEventForProductType=function(e,t,n,o){var r=t.properties,s=this.getRemoteEventStatus(r);if(s!==a.BLOCK){var c=s===a.FILTER?T.getRemoteEventName(e):e;this.produceToMonorail(i({eventName:c,eventObject:t,eventPayload:n},o))}},n.prototype.identify=function(e){throw new Error("identify is not supported")},n.prototype.page=function(e){var n,o,r,i=e.properties.pageType,s="searchresults"===i?"search":i,c={event_id:e.eventId,referrer:e.referrer,canonical_url:v.canonical(),page_type:s},u=t.PAGE_RENDERED_EVENT_NAME,l=null===(o=null===(n=window.ShopifyAnalytics)||void 0===n?void 0:n.meta)||void 0===o?void 0:o.product;if(l){var d={productId:null===(r=l.id)||void 0===r?void 0:r.toString(),remote:null==l?void 0:l.remote},f=this.getRemoteEventStatus(d);if(f===a.BLOCK)return;f===a.FILTER&&(u=T.getRemoteEventName(t.PAGE_RENDERED_EVENT_NAME))}this.produceToMonorail({eventName:u,eventObject:e,eventPayload:c})},n.prototype.track=function(e){},n.prototype.viewedProduct=function(e){var n=i(i({},e.properties),{quantity:1}),o={event_id:e.eventId,referrer:h.virtualDocument().referrer(),canonical_url:v.canonical(),products:this.formatProductJSON([n]),total_value:this.formatRevenue(n.price),currency:this.getCurrency(n.currency),page_type:"product"};this.fireEventForProductType(t.PRODUCT_PAGE_RENDERED_EVENT_NAME,e,o)},n.prototype.addedProductNext=function(e){var n=e.properties,o={event_id:e.eventId,products:this.formatProductJSON([n]),total_value:this.formatRevenue(n.price),currency:this.getCurrency(n.currency),cart_token:n.cartToken};this.fireEventForProductType(t.PRODUCT_ADDED_TO_CART_NEXT_EVENT_NAME,e,o)},n.prototype.addedProductPermalinkTest=function(e){var n=e.properties,o={event_id:e.eventId,products:this.formatProductJSON([n]),total_value:this.formatRevenue(n.price),currency:this.getCurrency(n.currency),cart_token:n.cartToken};this.produceToMonorail({eventName:t.TEST_PRODUCT_ADDED_TO_CART_PERMALINK_EVENT_NAME,eventObject:e,eventPayload:o})},n.prototype.testProductAddedToCartServerChangelog=function(e){var n=e.properties,o={event_id:e.eventId,products:this.formatProductJSON([n]),total_value:this.formatRevenue(n.price),currency:this.getCurrency(n.currency),cart_token:n.cartToken};this.produceToMonorail({eventName:t.TEST_PRODUCT_ADDED_TO_CART_SERVER_CHANGELOG_EVENT_NAME,eventObject:e,eventPayload:o})},n.prototype.addedProduct=function(e){var n=e.properties;if(this.getRemoteEventStatus(n)!==a.FILTER||!S.default.isEnabled(S.SERVER_EMITTED_ADD_TO_CART_NEW_REPORTIFY_MIGRATION)){var o={event_id:e.eventId,products:this.formatProductJSON([n]),total_value:this.formatRevenue(n.price),currency:this.getCurrency(n.currency),cart_token:n.cartToken},r=t.PRODUCT_ADDED_TO_CART_EVENT_NAME;S.default.isEnabled(S.SERVER_EMITTED_ADD_TO_CART_NEW_REPORTIFY_MIGRATION)&&(r=t.PRODUCT_ADDED_TO_CART_LEGACY_EVENT_NAME),this.fireEventForProductType(r,e,o)}},n.prototype.addedPayment=function(e,n){void 0===n&&(n=!1);var o=e.properties,r={event_id:e.eventId,total_value:this.formatRevenue(o.total),subtotal_value:this.formatRevenue(o.subtotalAfterMerchandiseDiscounts),currency:this.getCurrency(o.currency)};this.produceToMonorail({eventName:n?T.getRemoteEventName(t.PAYMENT_INFO_SUBMITTED_EVENT_NAME):t.PAYMENT_INFO_SUBMITTED_EVENT_NAME,eventObject:e,eventPayload:r})},n.prototype.addedPaymentRemote=function(e){this.addedPayment(e,!0)},n.prototype.checkoutContactInfoSubmitted=function(e,n){void 0===n&&(n=!1);var o=e.properties,r={event_id:e.eventId,email:o.email,phone:o.phone,subtotal_value:this.formatRevenue(o.subtotalAfterMerchandiseDiscounts)};this.produceToMonorail({eventName:n?T.getRemoteEventName(t.CHECKOUT_CONTACT_INFO_SUBMITTED_EVENT_NAME):t.CHECKOUT_CONTACT_INFO_SUBMITTED_EVENT_NAME,eventObject:e,eventPayload:r})},n.prototype.checkoutContactInfoSubmittedRemote=function(e){this.checkoutContactInfoSubmitted(e,!0)},n.prototype.checkoutAddressInfoSubmitted=function(e,n){void 0===n&&(n=!1);var o=e.properties,r={event_id:e.eventId,billing_address_city:o.city,billing_address_country:o.country,phone:o.phone,billing_address_regi
1on:o.province,subtotal_value:this.formatRevenue(o.subtotalAfterMerchandiseDiscounts)};this.produceToMonorail({eventName:n?T.getRemoteEventName(t.CHECKOUT_ADDRESS_INFO_SUBMITTED_EVENT_NAME):t.CHECKOUT_ADDRESS_INFO_SUBMITTED_EVENT_NAME,eventObject:e,eventPayload:r})},n.prototype.checkoutAddressInfoSubmittedRemote=function(e){this.checkoutAddressInfoSubmitted(e,!0)},n.prototype.checkoutShippingInfoSubmitted=function(e,n){void 0===n&&(n=!1);var o=e.properties,r={event_id:e.eventId,total_value:o.total,subtotal_value:this.formatRevenue(o.subtotalAfterMerchandiseDiscounts),currency:o.currency};this.produceToMonorail({eventName:n?T.getRemoteEventName(t.CHECKOUT_SHIPPING_INFO_SUBMITTED_EVENT_NAME):t.CHECKOUT_SHIPPING_INFO_SUBMITTED_EVENT_NAME,eventObject:e,eventPayload:r})},n.prototype.checkoutShippingInfoSubmittedRemote=function(e){this.checkoutShippingInfoSubmitted(e,!0)},n.prototype.performedSearch=function(e){var n=e.properties,o={event_id:e.eventId,referrer:h.virtualDocument().referrer(),canonical_url:v.canonical(),search_string:this.getSearchString(n.query),page_type:"search"};this.produceToMonorail({eventName:t.SEARCH_SUBMITTED_EVENT_NAME,eventObject:e,eventPayload:o})},n.prototype.startedOrder=function(e,n){void 0===n&&(n=!1);var o=e.properties,r={event_id:e.eventId,products:this.formatProductJSON(o.products),total_value:this.formatRevenue(o.total),subtotal_value:this.formatRevenue(o.subtotalAfterMerchandiseDiscounts),currency:this.getCurrency(o.currency)};this.produceToMonorail({eventName:n?T.getRemoteEventName(t.CHECKOUT_STARTED_EVENT_NAME):t.CHECKOUT_STARTED_EVENT_NAME,eventObject:e,eventPayload:r})},n.prototype.startedOrderRemote=function(e){this.startedOrder(e,!0)},n.prototype.startedOrderOncePerCheckout=function(e,n){void 0===n&&(n=!1);var o=e.properties,r={event_id:e.eventId,products:this.formatProductJSON(o.products),total_value:this.formatRevenue(o.total),subtotal_value:this.formatRevenue(o.subtotalAfterMerchandiseDiscounts),currency:this.getCurrency(o.currency)};this.produceToMonorail({eventName:n?T.getRemoteEventName(t.CHECKOUT_STARTED_ONCE_PER_CHECKOUT_EVENT_NAME):t.CHECKOUT_STARTED_ONCE_PER_CHECKOUT_EVENT_NAME,eventObject:e,eventPayload:r,eventSchemaId:p.storefrontAnalyticsSchemaIdValidation})},n.prototype.startedOrderOncePerCheckoutRemote=function(e){this.startedOrderOncePerCheckout(e,!0)},n.prototype.completedOrder=function(e){var n=e.properties,o={event_id:e.eventId,first_name:n.customerEventData.customer.firstName,last_name:n.customerEventData.customer.lastName,email:n.customerEventData.customer.emailAddress,phone:n.customerEventData.customer.phoneNumber,products:this.formatProductJSON(n.products),total_value:this.formatRevenue(n.total),subtotal_value:this.formatRevenue(n.subtotalAfterMerchandiseDiscounts),currency:this.getCurrency(n.currency),billing_address_city:n.customerEventData.address.city,billing_address_region:n.customerEventData.address.province,billing_address_country:n.customerEventData.address.country,billing_address_zipcode:n.customerEventData.address.zip};n.orderId&&(o.order_id=n.orderId.toString()),e.emitConversionEvent&&this.produceToMonorail({eventName:t.CHECKOUT_COMPLETED_EVENT_NAME,eventObject:e,eventPayload:o,source:this.getSource()+"-browser"})},n.prototype.viewedProductCategory=function(e){var n=e.properties,o={event_id:e.eventId,referrer:h.virtualDocument().referrer(),canonical_url:v.canonical(),collection_id:n.collectionId,collection_name:n.collectionName,currency:n.currency,page_type:"collection"};this.produceToMonorail({eventName:t.COLLECTION_PAGE_RENDERED_EVENT_NAME,eventObject:e,eventPayload:o})},n.prototype.formatProductJSON=function(e){var t=this,n=[];return e.forEach((function(e){n.push(JSON.stringify({variant_id:t.formatNumericID(e.variantId),product_id:t.formatNumericID(e.productId),product_gid:e.productGid,name:e.name,price:t.formatRevenue(e.price),sku:e.sku,brand:e.brand,variant:e.variant,category:e.category,available:e.available,quantity:Number(e.quantity||0)}))})),n},n.prototype.produceToMonorail=function(e){var t,n,o,r=e.eventName,i=e.eventObject,a=e.eventPayload,s=e.eventSchemaId,c=e.source,u=this.isCu
1stomStorefront(r);if((o=s||(u?p.customStorefrontAnalyticsSchemaId:p.storefrontAnalyticsSchemaIdV5))!==p.customStorefrontAnalyticsSchemaId||!S.default.isEnabled(S.F_UNIFIED_ANALYTICS_LIBRARIES_CUSTOM_SCT_CLIENT_SOURCE_MIGRATION))if(u){var l=this.eventWithMetadata(r,this.payloadWithCustomStorefrontMetadata(a),i,c,o);this.emitToCustomSchema(l,o)}else{var d=this.eventWithMetadata(r,a,i,c,o);if(o===p.storefrontAnalyticsSchemaIdV5){try{var f=null===(t=null===performance||void 0===performance?void 0:performance.getEntriesByType("navigation"))||void 0===t?void 0:t[0],_=null==f?void 0:f.serverTiming,v=null===(n=null==_?void 0:_.find((function(e){return"_s"===e.name})))||void 0===n?void 0:n.description,h=void 0;h=v||(_?"no_s_field|"+window.location.href+"|"+_.map((function(e){return e.name})).join(","):f?"no_server_timing":"no_navigation"),d.tracking_consent=h}catch(e){d.tracking_consent="error_while_reading"}this.emitToStoreFrontCustomerTracking(d,r)}else this.emitToCustomSchema(d,o)}},n.prototype.emitToCustomSchema=function(e,t){var n={schemaId:t,payload:e};f.produce([n])},n.prototype.emitToStoreFrontCustomerTracking=function(e,n){var o=this.buildLegacyStorefrontEvent(e);if(S.default.isEnabled(S.F_UNIFIED_ANALYTICS_LIBRARIES_SCT_V5_CLIENT_SOURCE_MIGRATION))f.produce([o]);else{var r=this.buildV5StorefrontPayload(e);if(n===t.PAGE_RENDERED_EVENT_NAME||n===T.getRemoteEventName(t.PAGE_RENDERED_EVENT_NAME)){var i=_.getAttributesSnapshot();void 0!==i&&(r.attributes=i,r.attributes_version=_.ATTRIBUTES_VERSION);try{var a=_.hasHighEntropyValues();a&&k.otelClient.counter({name:"trekkie_feature_usage",value:1,attributes:{feature:"page_view_attr",has_uahe:a,source:this.getSource()+"-browser"}})}catch(e){}}f.produce([o,{schemaId:p.storefrontAnalyticsSchemaIdV5,payload:r}])}},n.prototype.buildLegacyStorefrontEvent=function(e){var t=i({},e);return{schemaId:p.legacyStorefrontAnalyticsSchemaId,payload:i(i({},t),{emitted_to_v5:!0})}},n.prototype.buildV5StorefrontPayload=function(e){var t=["ccpa_enforced","gdpr_enforced","gdpr_enforced_as_string","is_persistent_cookie"];return Object.entries(e).filter((function(e){var n=e[0];return!t.includes(n)})).reduce((function(e,t){var n=t[0],o=t[1];return e[n]=o,e}),{})},n.prototype.eventWithMetadata=function(e,t,n,o,r){var a,s,c,f,_=n.s2sMetadata,v=o||this.getSource(),h=null===(a=n)||void 0===a?void 0:a.properties,y=E.analyticsProcessingAllowed(),T=E.marketingAllowed(),S=m.default.uniqToken,C=m.default.visitToken,k=this.trackingIdentifiersForSchema(r,y||T,S,C);return i(i({api_client_id:this.getApiClientId()},t),i(i(i(i(i(i(i(i(i({event_name:e,shop_id:m.default.shopId,facebook_capi_enabled:this.isCapiEnabled(),event_time:(new Date).getTime(),event_source_url:d.href(),unique_token:S},k),{page_id:this.pageID,source:v,ccpa_enforced:l.saleOfDataNotAllowed(),gdpr_enforced:l.notMarketingOrAnalyticsAllowed(),gdpr_enforced_as_string:l.notMarketingOrAnalyticsAllowed().toString(),navigation_type:null==_?void 0:_.navigationType,navigation_api:null==_?void 0:_.navigationApi,user_agent:null===(s=null===window||void 0===window?void 0:window.navigator)||void 0===s?void 0:s.userAgent,is_persistent_cookie:u.isPersistentCookie(),customer_id:this.getCustomerId(),checkout_token:m.default.checkoutToken,deprecated_visit_token:C,session_id:g.getSessionId(),asset_version_id:"f1ba865b3fecd812ad617f74ac079261075e9edb",shop_analytics_token:this.getShopAnalyticsToken()}),m.default.isMerchantRequest&&{is_merchant_request:m.default.isMerchantRequest}),"addApiSource"in n&&{add_to_cart_api_source:n.addApiSource}),"shopifyEmitted"in n&&{shopify_emitted:n.shopifyEmitted}),{analytics_allowed:y,marketing_allowed:T,sale_of_data_allowed:E.saleOfDataAllowed(),preferences_allowed:E.preferencesProcessingAllowed()}),r===p.storefrontAnalyticsSchemaIdV5&&!0===n.emittedAsync&&{emitted_async:!0}),m.default.eventMetadataId&&{event_metadata_id:m.default.eventMetadataId}),{request_id:A.getRequestId(e,v),rollout_ids:(null===(c=null==h?void 0:h.rolloutIds)||void 0===c?void 0:c.length)?h.rolloutIds:this.getRolloutIds(),rollout_treatment_ids:(null===(f=null==h?void 0:h.rolloutTreatmentIds)||void 0===f?void 0:f.length)?h.rolloutTreatmentIds:this.getRolloutTreatmentIds()}))},n.prototype.trackingIdentifiersForSchema=function(e,t,n,o){var r=e===p.customStorefrontAnalyticsSchemaId;if(e!==p.storefrontAnalyticsSchemaIdV5&&!r)return{};
1var a=S.default.isEnabled(S.F_BROWSER_ANALYTICS_S_AND_Y_TOKEN_VALIDATION_TELEMETRY),s=v.useConsentTrackingAPIForCookieReads(),c=this.trackingIdentifierTelemetry.collect(r||"checkout"===m.default.appName,t,a,a,n,o,s,S.default.isEnabled(S.F_DONT_EMIT_LEGACY_TRACKING_TOKENS));return i(i({},c),a?{ti_cae:s}:{})},n.prototype.payloadWithCustomStorefrontMetadata=function(e){var t,n=this.options;return i(i({},e),{hydrogenSubchannelId:String(null!==(t=n.cartSubchannelId)&&void 0!==t?t:""),api_client_id:n.cartApiClientId})},n.prototype.isCapiEnabled=function(){return this.options.facebookCapiEnabled},n.prototype.getSource=function(){return this.options.source},n.prototype.getCustomerId=function(){return this.options.customerId},n.prototype.getRolloutIds=function(){return this.options.rolloutIds},n.prototype.getRolloutTreatmentIds=function(){return this.options.rolloutTreatmentIds},n.prototype.getSearchString=function(e){return e||""},n.prototype.formatRevenue=function(e){return Number(e||0)},n.prototype.formatNumericID=function(e){return null==e||""===e?null:Number(e)},n.prototype.getCurrency=function(e){return e||"USD"},n.prototype.getIntegrationId=function(){return"S2S"},n.prototype.getEcommerceMetricsTag=function(){return"S2S"},n.prototype.getEcommercePixelIds=function(){return[]},n.prototype.getApiClientId=function(){return this.options.apiClientId},n.prototype.setPixelStub=function(){},n.prototype.isCustomStorefront=function(e){var n=this.options,o=[t.PAGE_RENDERED_EVENT_NAME,t.PAYMENT_INFO_SUBMITTED_EVENT_NAME,t.CHECKOUT_CONTACT_INFO_SUBMITTED_EVENT_NAME,t.CHECKOUT_ADDRESS_INFO_SUBMITTED_EVENT_NAME,t.CHECKOUT_SHIPPING_INFO_SUBMITTED_EVENT_NAME,t.CHECKOUT_STARTED_EVENT_NAME,t.CHECKOUT_STARTED_ONCE_PER_CHECKOUT_EVENT_NAME,t.CHECKOUT_COMPLETED_EVENT_NAME],r=[t.HYDROGEN_API_CLIENT_ID,t.HEADLESS_API_CLIENT_ID];return o.includes(e)&&r.includes(n.cartApiClientId)},n.prototype.getShopAnalyticsToken=function(){return u.read(t.SHOP_ANALYTICS_TOKEN_NAME)},n.prototype.getRemoteEventStatus=function(e){return C.getRemoteProductsEnabled()?!e||void 0===e.productId&&void 0===e.id?a.BLOCK:!0===T.isRemoteProduct(e)?a.FILTER:a.ALLOW:a.ALLOW},n.defaultOptions={facebookCapiEnabled:!1,agent:"shopify",source:"trekkie-unknown"},n}(c.EcommerceIntegration);t.S2S=I},2319:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Trekkie=void 0;var a=n(8416),s=n(1482),c=n(6573),u=n(4252),l=n(9965),d=n(357),f=n(9414),p=n(4779),_=n(7349),v=n(4845),h=n(7179),y=n(8519),m=function(e){function t(t,n,o){var r=e.call(this,{},{},o)||this;return r.defaultAttributes=d.default.attributes,r.eventRefineryClient=new _.EventRefineryClient({shopId:r.defaultAttributes.shopId}),r}return r(t,e),t.prototype.initialize=function(){u.cleanupOverScopedCookies(),e.prototype.initialize.call(this)},t.prototype.name=function(){return"Trekkie"},t.prototype.type=function(){return l.IntegrationTypes.INTEGRATION},t.prototype.hasConsent=function(e){return p.analyticsProcessingAllowed(e)},t.prototype.identify=function(e){},t.prototype.page=function(e){var t=s.appNameToPageViewSchemaId[d.default.appName];this.emit("page",e,t)},t.prototype.track=function(e){if(f.analyticsEvents.checkoutOnePageView.test(e.event)){var t=e.properties;this.page(t.page)}else{var n=s.extractSchemaIdFromEventName(e.event);this.emit("track",e,n)}},t.prototype.emit=function(e,t,n){d.default.incrementMicroSessionCount(),t=a.Integration.flatten(t);var o=i(i({},t),d.default.attributes);if(o.eventType=e,n){c.produce([{schemaId:n,payload:o}]);try{var r="trekkie-"+y.inferSource()+"-browser";h.otelClient.counter({name:"trekkie_feature_usage",value:1,attributes:{feature:"monorail_event_emission",request_type:e,source:r}}),h.otelClient.log({message:"monorail_event_emission",attributes:{schema_id:n,request_type:e,source:r}})}catch(e){}
1if(v.shouldSendToEventRefinery(n)){var s=v.transformMonorailToEventRefinery({schemaId:n,payload:o});if(s)try{this.eventRefineryClient.produce(s)}catch(e){}}}},t}(a.Integration);t.Trekkie=m},3811:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.F_BROWSER_ANALYTICS_S_AND_Y_TOKEN_VALIDATION_TELEMETRY=t.F_DONT_EMIT_LEGACY_TRACKING_TOKENS=t.F_CLIENT_TRACKING_TOKENS_VIA_CTA=t.F_UNIFIED_ANALYTICS_LIBRARIES_CUSTOM_SCT_CLIENT_SOURCE_MIGRATION=t.F_UNIFIED_ANALYTICS_LIBRARIES_SCT_V5_CLIENT_SOURCE_MIGRATION=t.SERVER_EMITTED_ADD_TO_CART_NEW_REPORTIFY_MIGRATION=void 0;var n=new(function(){function e(){this.betaFlagsProps=[]}return e.prototype.initialize=function(e){void 0===e&&(e=[]),this.betaFlagsProps=e},e.prototype.resetState=function(){this.betaFlagsProps=[]},Object.defineProperty(e.prototype,"betaFlags",{get:function(){return this.betaFlagsProps},enumerable:!1,configurable:!0}),e.prototype.isEnabled=function(e){return!!this.betaFlagsProps&&this.betaFlagsProps.includes(e)},e}());t.SERVER_EMITTED_ADD_TO_CART_NEW_REPORTIFY_MIGRATION="bdb960ec",t.F_UNIFIED_ANALYTICS_LIBRARIES_SCT_V5_CLIENT_SOURCE_MIGRATION="4c64608a",t.F_UNIFIED_ANALYTICS_LIBRARIES_CUSTOM_SCT_CLIENT_SOURCE_MIGRATION="7b21cf0b",t.F_CLIENT_TRACKING_TOKENS_VIA_CTA="8450a54b",t.F_DONT_EMIT_LEGACY_TRACKING_TOKENS="7ee89bf1",t.F_BROWSER_ANALYTICS_S_AND_Y_TOKEN_VALIDATION_TELEMETRY="764d78cb",t.default=n},1129:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=t.prefetchAttributesIfEligible=t.hasHighEntropyValues=t.getAttributesSnapshot=t.prefetchAttributes=t.ATTRIBUTES_VERSION=void 0;var o=n(3811),r=n(357),i=n(4779),a=n(1037);t.ATTRIBUTES_VERSION=2;var s,c,u=["platform","platformVersion","architecture","model","uaFullVersion","bitness","fullVersionList","wow64"],l=!1;function d(){if(!l&&(s=function(){try{var e=window.navigator,t=window.screen;return{tzo:(new Date).getTimezoneOffset(),mtp:e.maxTouchPoints,sw:t.width,sh:t.height,scd:t.colorDepth}}catch(e){return}}())){l=!0;var e=s;try{var t=window.navigator.userAgentData;t&&"function"==typeof t.getHighEntropyValues&&t.getHighEntropyValues(u).then((function(t){if(s===e)try{e.uahe=JSON.stringify(t),c=void 0}catch(e){}}
1)).catch((function(){}))}catch(e){}}}t.prefetchAttributes=d,t.getAttributesSnapshot=function(){if(d(),s){if(void 0===c)try{c=JSON.stringify(s)}catch(e){return}return c}},t.hasHighEntropyValues=function(){return Boolean(s&&"uahe"in s)},t.prefetchAttributesIfEligible=function(e){try{"storefront"===r.default.appName&&!o.default.isEnabled(o.F_UNIFIED_ANALYTICS_LIBRARIES_SCT_V5_CLIENT_SOURCE_MIGRATION)&&i.haveConsentForMarketingOrAnalytics(null==e?void 0:e.detail)&&d()}catch(e){a.reportError("prefetchAttributesFailed",e)}},t.resetState=function(){s=void 0,c=void 0,l=!1}},4252:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.canWriteCookie=t.writeForDomain=t.resetCookieImpl=t.determineCookieDomain=t.cleanupOverScopedCookies=t.clear=t.write=t.isPersistentCookie=t.read=t.allowed=t.disable=t.enabled=t.cleanupMyShopifyDotComCookie=t.cookieImpl=t.parseDocumentCookie=void 0;var o,r,i=n(8533),a=n(4779),s=n(2729),c=n(9974),u=n(5533),l="myshopify.com",d=[l],f=new Date(0);function p(e){for(var t={},n=0,o=e.split(/ *; */);n<o.length;n++){var r=o[n].split("=");try{t[decodeURIComponent(r[0])]=decodeURIComponent(r[1]||"")}catch(e){}}return t}function _(e,t){if(void 0===o&&g(e))if(function(){for(var e=0,t=d;e<t.length;e++)if(y(t[e]))return!0;return!1}())o=u.hostname();else{for(var n="",r=0,i=u.hostname().split(".").reverse();r<i.length;r++){var a=i[r];if(h(e,t,0,n=""===n?"."+a:"."+a+n),v(e,t))return void(o=n)}o=""}}function v(e,n){var o=t.cookieImpl.read(e);return!!o&&o===n}function h(e,n,o,r,i){void 0===i&&(i="Lax");var a={domain:r,path:"/",maxage:o,samesite:i};t.cookieImpl.write(e,n,a)}function y(e){var t=u.hostname().split(".").reverse(),n=e.split(".").reverse();return t[0]===n[0]&&t[1]===n[1]}function m(){return y(l)}function g(e){return t.cookieImpl.enabled()&&t.cookieImpl.allowed(e)}t.parseDocumentCookie=p,t.cookieImpl={parse:p,read:function(e){if(t.cookieImpl.enabled())return t.cookieImpl.parse(i.virtualDocument().cookie())[e]},write:function(e,n,o){if(void 0===o&&(o={}),g(e)){var r=encodeURIComponent(e)+"="+encodeURIComponent(n);o.maxage&&(o.maxage<0?o.expires=f:o.expires=new Date((new Date).getTime()+o.maxage)),o.path&&(r+="; path="+o.path),o.domain&&(r+="; domain="+o.domain),(o.maxage<0||o.expires)&&(r+="; expires="+o.expires.toUTCString()),o.samesite?r+="; SameSite="+o.samesite:r+="; SameSite=Lax",o.secure&&(r+="; secure");try{i.virtualDocument().setCookie(r)}catch(e){t.cookieImpl.disable()}}},enabled:function(e){if(void 0===e&&(e=!1),!e&&void 0!==r)return r;try{r=i.virtualDocument().cookieEnabled()&&void 0!==i.virtualDocument().cookie()}catch(e){r=!1}return r},disable:function(){r=!1},allowed:function(e){return![s.shortTermKey,s.longTermKey].includes(e)||a.haveConsentForMarketingOrAnalytics()},isPersistentCookie:function(){var e=t.cookieImpl.read("_shopify_m");return void 0===e||"persistent"===e}},t.cleanupMyShopifyDotComCookie=function(e){if(m()){var t=e+"=; path=/; max-age=0; expires=Thu, 01 Jan 1970 00:00:01 GMT; SameSite=Lax";i.virtualDocument().setCookie(t)}},t.enabled=function(){return t.cookieImpl.enabled()},t.disable=function(){t.cookieImpl.disable()},t.allowed=function(e){return t.cookieImpl.allowed(e)},t.read=function(e,n){var o=(void 0===n?{}:n).raw,r=void 0!==o&&o,i=c.useConsentTrackingAPIForCookieReads()&&(e===s.longTermKey||e===s.shortTermKey);if(r||!i)return t.cookieImpl.read(e);var u={generateFallback:!0,tag:"trekkie_cookie_read"};return e===s.longTermKey?a.uniqueToken(u):a.visitToken(u)},t.isPersistentCookie=function(){return t.cookieImpl.isPersistentCookie()},t.write=function(e,t,n,r){void 0===r&&(r="Lax"),_(e,t),h(e,t,n?31104e6:18e5,o,r)},t.clear=function(e){_(e,""),h(e,"",-1,o),h(e,"",-1,"")},t.cleanupOverScopedCookies=function(){if(m())for(var e=0,t=["_shopify_s","_shopify_sa_p","_shopify_sa_t","_shopify_y"];e<t.length;e++){var n=t[e]+"=; domain=."+l+"; path=/; max-age=0; expires=Thu, 01 Jan 1970 00:00:01 GMT; SameSite=Lax";i.virtualDocument().setCookie(n)}},t.determineCookieDomain=_,t.resetCookieImpl=function(){o=void 0,r=void 0},t.writeForDomain=h,t.canWriteCookie=g}
1,4779:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.visitToken=t.uniqueToken=t.anyRelevantConsentSignals=t.shouldShowBanner=t.saleOfDataAllowed=t.preferencesProcessingAllowed=t.marketingAllowed=t.analyticsProcessingAllowed=t.haveConsentForMarketingOrAnalytics=t.haveConsentForPurpose=t.notMarketingOrAnalyticsAllowed=t.saleOfDataNotAllowed=t.TrackingEvents=void 0;var o=n(2463),r=n(9965);function i(e){return e&&e.detail?e.detail.analyticsAllowed:o.analyticsProcessingAllowed()}function a(e){return e&&e.detail?e.detail.marketingAllowed:o.marketingAllowed()}function s(e){return e&&e.detail?e.detail.preferencesAllowed:o.preferencesProcessingAllowed()}function c(e){return e&&e.detail?e.detail.saleOfDataAllowed:o.saleOfDataAllowed()}t.TrackingEvents=o.TrackingEvents,t.saleOfDataNotAllowed=function(){return!c()},t.notMarketingOrAnalyticsAllowed=function(){return!(a()&&i())},t.haveConsentForPurpose=function(e){switch(e){case r.ConsentPurposes.ANALYTICS:return i();case r.ConsentPurposes.MARKETING:return a();case r.ConsentPurposes.SALE_OF_DATA:return c();case r.ConsentPurposes.PREFERENCES:return s();default:return!0}},t.haveConsentForMarketingOrAnalytics=function(e){return e?Boolean(e.analyticsAllowed||e.marketingAllowed):this.haveConsentForPurpose(r.ConsentPurposes.ANALYTICS)||this.haveConsentForPurpose(r.ConsentPurposes.MARKETING)},t.analyticsProcessingAllowed=i,t.marketingAllowed=a,t.preferencesProcessingAllowed=s,t.saleOfDataAllowed=c,t.uniqueToken=function(e){return o.uniqueToken(e)},t.visitToken=function(e){return o.visitToken(e)},t.shouldShowBanner=function(){return o.shouldShowBanner()},t.anyRelevantConsentSignals=function(){var e=o.currentVisitorConsent();return Boolean((null==e?void 0:e.marketing)||(null==e?void 0:e.analytics))}},357:function(e,t,n){var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var r=n(2729),i=n(4252),a=n(1037),s=new(function(){function e(){this.defaultAttributes={}}return e.prototype.initialize=function(e){var t=!1;e.isServerSideCookieWritingEnabled&&(t=!0),this.uniqueIdManager=new r.UniqueIdManager(t),this.defaultAttributes.appName=e.appName,this.defaultAttributes.uniqToken=this.uniqueIdManager.longTerm(),this.defaultAttributes.visitToken=this.uniqueIdManager.shortTerm(),this.defaultAttributes.microSessionId=r.buildToken(),this.defaultAttributes.microSessionCount=0,this.defaultAttributes.isPersistentCookie=i.isPersistentCookie(),e.defaultAttributes&&(this.defaultAttributes=o(o({},e.defaultAttributes),this.defaultAttributes),a.setMetricsOptions(e.defaultAttributes.shopId))},e.prototype.incrementMicroSessionCount=function(){this.defaultAttributes.microSessionCount++},e.prototype.refreshVisitorTokens=function(){this.defaultAttributes.uniqToken=this.uniqueIdManager.longTerm(),this.defaultAttributes.visitToken=this.uniqueIdManager.shortTerm()},e.prototype.resetState=function(){this.defaultAttributes={}},Object.defineProperty(e.prototype,"attributes",{get:function(){return this.defaultAttributes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"appName",{get:function(){return this.defaultAttributes.appName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"checkoutToken",{get:function(){return this.defaultAttributes.checkoutToken},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniqToken",{get:function(){return this.defaultAttributes.uniqToken},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visitToken",{get:function(){return this.uniqueIdManager.shortTerm()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shopId",{get:function(){return this.defaultAttributes.shopId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"microSessionId",{get:function(){return this.defaultAttributes.microSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"microSessionCount",{get:function(){return this.defaultAttributes.microSessionCount}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isMerchantRequest",{get:function(){return Boolean(this.defaultAttributes.isMerchantRequest)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"eventMetadataId",{get:function(){return this.defaultAttributes.eventMetadataId},enumerable:!1,configurable:!0}),e}());t.default=s},7349:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.EventRefineryClient=void 0;var o=n(4252),r=n(4779),i=n(2076),a="/.well-known/shopify/fec/produce",s=function(){function e(e){this.config=e}return e.prototype.produce=function(e){var t,n,o,r=this.buildPayload(e,null!==(t=e.shopId||this.config.shopId)&&void 0!==t?t:""),i=this.getEndpointUrl(),a={source:"EVENT_APP_STOREFRONT",payload:r,user:{domainScopedBrowserId:{value:null!==(n=this.getShopifyYCookie())&&void 0!==n?n:null}},client:{message:this.buildMessage(e.createdAt),browser:{href:this.getCurrentHref()}},session:{clientSessionToken:null!==(o=this.getShopifySCookie())&&void 0!==o?o:""},tags:this.convertAdditionalDataToTags(e.additionalData)};return this.sendRequest(i,JSON.stringify({events:[a]}))},e.prototype.buildMessage=function(e){var t=null!=e?e:new Date;return{createdAt:t.toISOString(),sentAt:t.toISOString(),id:i.createGlobalId()}},e.prototype.buildPayload=function(e,t){var n;return{"@type":"type.googleapis.com/shopify.event.BuyerEvent",actor:"ACTOR_BUYER",eventProducer:"EVENT_PRODUCER_RAW_SOURCE",shopId:i.createGlobalId(t),eventType:e.eventType,apiClient:{id:i.createGlobalId("580111")},buyer:{userIdentities:[{shopifyYCookie:{shopifyY:null!==(n=this.getShopifyYCookie())&&void 0!==n?n:""}}]},buyerConsents:this.getBuyerConsents()}},e.prototype.getShopifyYCookie=function(){return o.read("_shopify_y")},e.prototype.getShopifySCookie=function(){return o.read("_shopify_s")},e.prototype.getCurrentHref=function(){return"undefined"!=typeof window&&window.document?window.document.location.href:""},e.prototype.convertAdditionalDataToTags=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(i.createTagKeyValue(n,e[n]));return t},e.prototype.getBuyerConsents=function(){var e=[];return r.analyticsProcessingAllowed()&&e.push({consentType:"USER_CONSENT_TYPE_ANALYTICS"}),r.marketingAllowed()&&e.push({consentType:"USER_CONSENT_TYPE_MARKETING"}),r.preferencesProcessingAllowed()&&e.push({consentType:"USER_CONSENT_TYPE_PREFERENCES"}),r.saleOfDataAllowed()&&e.push({consentType:"USER_CONSENT_TYPE_SALE_OF_DATA"}),e},e.prototype.getEndpointUrl=function(){return"undefined"!=typeof window&&window.location?""+window.location.origin+a:a},e.prototype.sendRequest=function(e,t){if(this.isSendBeaconSupported())try{if(window.navigator.sendBeacon.bind(window.navigator)(e,t))return!0}catch(e){}var n=new XMLHttpRequest;try{return n.open("POST",e,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(t),!0}catch(e){return console.error("EventRefineryClient: Failed to send event",e),!1}},e.prototype.isSendBeaconSupported=function(){return"undefined"!=typeof window&&window.navigator&&"function"==typeof window.navigator.sendBeacon&&!this.isIos12()},e.prototype.isIos12=function(){return!("undefined"==typeof window||!window.navigator||-1===window.navigator.userAgent.lastIndexOf("iPhone; CPU iPhone OS 12_")&&-1===window.navigator.userAgent.lastIndexOf("iPad; CPU OS 12_"))},e}();t.EventRefineryClient=s},2076:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createTagKeyValue=t.convertValueToTagSingleValue=t.createGlobalId=void 0;var n=function(){return(new Date).getTime().toString()+Math.floor(1e6*Math.random()).toString().padStart(6,"0")};t.createGlobalId=function(e){return null==e?{lowid:n(),highid:n()}:{lowid:e.toString()}},t.convertValueToTagSingleValue=function(e){return null==e?null:"string"==typeof e?{string:e}:"boolean"==typeof e?{boolean:e}:"number"==typeof e?e%1==0?{int:e.toString()}:e!=e||e===1/0||e===-1/0?{double:e.toString()}:{double:e}:{string:JSON.stringify(e)}},t.createTagKeyValue=function(e,n){var o={key:e};return Array.isArray(n)?o.array={value:n.map((function(e){return t.convertValueToTagSingleValue(e)}))}:o.value=t.convertValueToTagSingleValue(n),o}}
1,4845:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getEventRefineryType=t.shouldSendToEventRefinery=t.transformMonorailToEventRefinery=void 0;var n={trekkie_storefront_remote_ad_rendered:"BUYER_EVENT_TYPE_AD_RENDERED",trekkie_storefront_remote_ad_impression:"BUYER_EVENT_TYPE_AD_IMPRESSION",trekkie_storefront_remote_ad_click:"BUYER_EVENT_TYPE_AD_CLICKED"};function o(e){var t=e.split("/")[0];return n[t]||null}t.transformMonorailToEventRefinery=function(e){var t=e.schemaId,n=e.payload,r=o(t);if(!r)return null;var i=n.shopId||n.publisher_shop_id;return{eventType:r,shopId:i?String(i):void 0,additionalData:{advertiser_shop_id:n.advertiser_shop_id,ad_response_id:n.ad_response_id,position:n.position,above_fold:n.above_fold,viewport_width:n.viewport_width,viewport_height:n.viewport_height,x_pos:n.x_pos,y_pos:n.y_pos,session_id:n.session_id,publisher_shop_id:n.publisher_shop_id,placement:n.placement,event_data:n.event_data,theme_id:n.theme_id,theme_store_id:n.theme_store_id,theme_published:n.theme_published,original_event_id:n.eventId,original_schema_id:t,monorail_metadata:n.s2sMetadata}}},t.shouldSendToEventRefinery=function(e){return null!==o(e)},t.getEventRefineryType=o},8006:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.setupEventIdService=void 0;var o=n(9671);t.setupEventIdService=function(){return o.setupEventIdService()}},5533:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isShopifyDotCom=t.search=t.protocol=t.port=t.pathname=t.origin=t.setHref=t.href=t.hostname=t.host=t.hash=void 0;var o=n(2164);function r(){return o.virtualWindow().location().hostname}t.hash=function(){return o.virtualWindow().location().hash},t.host=function(){return o.virtualWindow().location().host},t.hostname=r,t.href=function(){return o.virtualWindow().location().href},t.setHref=function(e){o.virtualWindow().location().href=e},t.origin=function(){var e=o.virtualWindow().location();return e.origin?e.origin:e.protocol+"//"+e.hostname+(e.port?":"+e.port:"")},t.pathname=function(){return o.virtualWindow().location().pathname},t.port=function(){return o.virtualWindow().location().port},t.protocol=function(){return o.virtualWindow().location().protocol},t.search=function(){return o.virtualWindow().location().search},t.isShopifyDotCom=function(e){return null!==(e=e||r()).match(/(^|\.)shopify\.com$/)}},5263:function(e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)};function o(){var e;return(null===(e=window.ShopifyAnalytics)||void 0===e?void 0:e.meta)||{}}function r(e,t){if(!t)return null;for(var n=0,o=t;n<o.length;n++){var r=o[n];if(String(r.id)===e)return r}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.getRemoteProductsEnabled=t.getProductFromMeta=t.getMeta=void 0,t.getMeta=o,t.getProductFromMeta=function(e){var t=function(e,t){if(e.products)return function(e,t){for(var n=0,o=t;n<o.length;n++){var i=o[n];if(i.variants){var a=r(e,i.variants);if(a)return{product:i,variant:a}}}return{product:null,variant:null}}(t,e.products);if(e.product){var n=e.product;return{product:n,variant:r(t,n.variants)}}return{product:null,variant:null}}(o(),e),i=t.product,a=t.variant;return i&&a?n({variantId:e,productId:i.id,productGid:i.gid,price:a.price/100,name:a.name},"remote"in i?{remote:i.remote}:{}):null},t.getRemoteProductsEnabled=function(){var e=o();return Boolean(e.remoteProductsEnabled)}},1037:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.sendToObserve=t.sendObserveXhr=t.shouldSendToObserve=t.reportError=t.logMetricToMonorail=t.setMetricsOptions=t.setGlobalSerializedAppConfig=t.errorsSchemaId=t.metricsSchemaId=void 0;var o,r,i=n(6573),a=n(5533),s=n(9974);t.metricsSchemaId="trekkie_metrics/2.0",t.errorsSchemaId="trekkie_errors/2.0",t.setGlobalSerializedAppConfig=function(e){o=e},t.setMetricsOptions=function(e){r=e},t.logMetricToMonorail=function(e,n){var o={metric_name:e};r&&(o.shop_id=r),n&&(o.metadata=n),i.produce([{schemaId:t.metricsSchemaId,payload:o}])},t.reportError=function(e,n,c){var u={name:n.name,line:n.lineNumber||n.line,script:n.fileName||n.sourceURL||n.script,stack:n.stackTrace||n.stack||n.description,message:n.message,url:a.href(),context:void 0!==e?e:null,app_config:o||null,notes:c};if(this.sendToObserve(u),!s.isUnstableBrowserVersion()){var l={error_name:"reportError_"+e};r&&(l.shop_id=r),i.produce([{schemaId:t.errorsSchemaId,payload:l}])}}
1,t.shouldSendToObserve=function(){return 100*Math.random()<2.5},t.sendObserveXhr=function(e,t,n,o,r,i,a,s,c){var u="production";try{var l=new XMLHttpRequest;l.open("POST","https://error-analytics-production.shopifysvc.com",!0),l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("Bugsnag-Api-Key","acd98d4f5c3b14bef3d8703f0ae1d8e8"),l.send(JSON.stringify({payload_version:5,notifier:{name:"Trekkie",version:e,url:"-"},events:[{exceptions:[{error_class:t,message:n,stacktrace:[o],type:"browserjs"}],context:r,app:{release_stage:u,version:e,id:"trekkie"},metaData:{app:{s2s_source:i},custom:{slice_name:"signals",slice_id:"S-27053f",observe_grouping_key:t+":"+n+":"+o.method},error_source:{shop_id:a},request:{shop_id:a,shop_url:window.location.href},device:{user_agent:window.navigator.userAgent,deploy_phase:u},"Additional Notes":{app_config:s,notes:c}},unhandled:!1}]}))}catch(e){}},t.sendToObserve=function(e){var t;if(this.shouldSendToObserve()){var n="f1ba865b3fecd812ad617f74ac079261075e9edb",o=null,r=null,i=null;if(e.app_config)try{var a=JSON.parse(e.app_config);a&&(o=a.Trekkie.appName,r=null===(t=a.S2S)||void 0===t?void 0:t.source,i=a.Trekkie.defaultAttributes.shopId)}catch(e){}var s=e.context?e.context:r,c={file:o?"checkout"===o?"trekkie.storefront."+n+".min.js":"trekkie."+o+"."+n+".min.js":"trekkie."+n+".min.js",line_number:"1",column_number:"1",method:e.context},u=e.name,l=e.message;if(e.stack){u=null!=u?u:e.stack.split("\n")[0];var d=e.stack.match(/([0-9]+):([0-9]+)/);if(d&&d.length>2&&(c.line_number=d[1],c.column_number=d[2],parseInt(c.line_number,10)>1e5))return}this.sendObserveXhr(n,u,l,c,s,r,i,e.app_config,e.notes)}}},6573:function(e,t,n){var o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,r++)o[r]=i[a];return o};Object.defineProperty(t,"__esModule",{value:!0}),t.produce=t.flushBatchEvents=t.getBatchEvents=t.addBatchEvent=t.setMonorailRegion=t.batchEndpoints=void 0;var r=n(9974);t.batchEndpoints={global:"https://monorail-edge.shopifysvc.com/unstable/produce_batch",staging:"https://monorail-edge-staging.shopifysvc.com/unstable/produce_batch",canada:"https://monorail-edge-ca.shopifycloud.com/unstable/produce_batch"};var i=t.batchEndpoints.global,a=new Array;function s(e){if(0===e.length)return!1;var t={events:e,metadata:{event_sent_at_ms:(new Date).getTime()}};return function(e,t){if(r.isSendBeaconSupported())try{if(window.navigator.sendBeacon.bind(window.navigator)(e,t))return!0}catch(e){}var n=new XMLHttpRequest;try{n.open("POST",e,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(t)}catch(e){console.log(e)}return!1}(i,JSON.stringify(t))}t.setMonorailRegion=function(e){var n=window.location.origin;"shop_domain"===e&&n?i=n+"/.well-known/shopify/monorail/unstable/produce_batch":e in t.batchEndpoints&&(i=t.batchEndpoints[e])},t.addBatchEvent=function(e){var t=(new Date).getTime(),n={schema_id:e.schemaId,payload:e.payload,metadata:{event_created_at_ms:t}};a.push(n)},t.getBatchEvents=function(){return a},t.flushBatchEvents=function(){var e=o(a);a.length=0,s(e)},t.produce=function(e){if(0===e.length)return!1;var t=(new Date).getTime();return s(e.map((function(e){return{schema_id:e.schemaId,payload:e.payload,metadata:{event_created_at_ms:t}}})))}},8628:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getNavigationTypeLegacy=t.getNavigationTypeExperimental=void 0;var o=n(1037);t.getNavigationTypeExperimental=function(){try{var e=(null===performance||void 0===performance?void 0:performance.getEntriesByType)&&(null===performance||void 0===performance?void 0:performance.getEntriesByType("navigation"));if(e&&e[0]){var t=performance.getEntriesByType("navigation")[0].type;return t&&t.toString()}}catch(e){o.reportError("PerformanceNavigationTiming_Error",e)}},t.getNavigationTypeLegacy=function(){var e,t;try{if("undefined"!=typeof PerformanceNavigation&&null!==(null===(e=null===performance||void 0===performance?void 0:performance.navigation)||void 0===e?void 0:e.type)&&void 0!==(null===(t=null===performance||void 0===performance?void 0:performance.navigation)||void 0===t?void 0:t.type)){var n=performance.navigation.type;switch(n){case PerformanceNavigation.TYPE_NAVIGATE:return"navigate";case PerformanceNavigation.TYPE_RELOAD:return"reload";case PerformanceNavigation.TYPE_BACK_FORWARD:return"back_forward";default:return"unknown: "+n}}}catch(e){o.reportError("Performance.Navigation_Error",e)}}}
1,4052:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.OTelClient=void 0;var o=n(6366);function r(e){return Object.entries(e).map((function(e){return{key:e[0],value:i(e[1])}}))}function i(e,t){return void 0===t&&(t=0),t>10?{stringValue:"[max depth exceeded]"}:null==e?{stringValue:String(e)}:"string"==typeof e?{stringValue:e}:"number"==typeof e?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:"boolean"==typeof e?{boolValue:e}:Array.isArray(e)?{arrayValue:{values:e.map((function(e){return i(e,t+1)}))}}:"object"==typeof e?{kvlistValue:{values:Object.entries(e).map((function(e){return{key:e[0],value:i(e[1],t+1)}}))}}:{stringValue:String(e)}}var a=function(){function e(e){this.pendingMetrics=[],this.pendingLogs=[],this.exporter=e,this.boundFlush=this.flush.bind(this),this.setupPageUnloadHandler()}return e.prototype.setupPageUnloadHandler=function(){window.addEventListener("pagehide",this.boundFlush)},e.prototype.scheduleFlush=function(){void 0===this.flushTimeoutId&&(this.flushTimeoutId=setTimeout(this.boundFlush,500))},e.prototype.counter=function(e){var t=e.name,n=e.value,o=e.unit,i=e.attributes;this.pendingMetrics.length>=1e3&&this.flush();var a=1e6*(new Date).getTime();this.pendingMetrics.push({name:t,unit:o||"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[{asDouble:n,startTimeUnixNano:a,timeUnixNano:a,attributes:r(null!=i?i:{})}]}}),this.scheduleFlush()},e.prototype.log=function(e){var t=e.message,n=e.severity,a=e.severityText,s=e.attributes;this.pendingLogs.length>=1e3&&this.flush();var c=1e6*(new Date).getTime();this.pendingLogs.push({timeUnixNano:c,observedTimeUnixNano:c,severityNumber:null!=n?n:o.SeverityNumber.INFO,severityText:a,body:i(t),attributes:r(null!=s?s:{})}),this.scheduleFlush()},e.prototype.flush=function(){void 0!==this.flushTimeoutId&&(clearTimeout(this.flushTimeoutId),this.flushTimeoutId=void 0);var e=!0,t=!0;if(this.pendingMetrics.length>0){var n=this.pendingMetrics;this.pendingMetrics=[],e=this.exporter.exportMetrics(n)}if(this.pendingLogs.length>0){var o=this.pendingLogs;this.pendingLogs=[],t=this.exporter.exportLogs(o)}return e&&t},e.prototype.destroy=function(){window.removeEventListener("pagehide",this.boundFlush),void 0!==this.flushTimeoutId&&(clearTimeout(this.flushTimeoutId),this.flushTimeoutId=void 0)},e}();t.OTelClient=a},8218:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.OTelExporter=void 0;var o=n(9974),r="trekkie-otel",i="1.0.0",a=function(){function e(e,t){this.baseUrl=e.replace(/\/v1\/(metrics|logs)\/?$/,""),this.serviceName=t}return e.prototype.exportMetrics=function(e){var t={resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:this.serviceName}}]},scopeMetrics:[{scope:{name:r,version:i,attributes:[]},metrics:e}]}]},n=new Blob([JSON.stringify(t)],{type:"application/json"});return!!o.isSendBeaconSupported()&&navigator.sendBeacon(this.baseUrl+"/v1/metrics",n)},e.prototype.exportLogs=function(e){var t={resourceLogs:[{resource:{attributes:[{key:"service.name",value:{stringValue:this.serviceName}}]},scopeLogs:[{scope:{name:r,version:i,attributes:[]},logRecords:e}]}]},n=new Blob([JSON.stringify(t)],{type:"application/json"});return!!o.isSendBeaconSupported()&&navigator.sendBeacon(this.baseUrl+"/v1/logs",n)},e}();t.OTelExporter=a},4689:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createOtelClient=void 0;var o=n(4052),r=n(8218);t.createOtelClient=function(){var e=new r.OTelExporter("https://otlp-http-production.shopifysvc.com","trekkie");return new o.OTelClient(e)}},7179:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SeverityNumber=t.OTelExporter=t.OTelClient=t.otelClient=void 0;var o=n(4689);t.otelClient=o.createOtelClient();var r=n(4052);Object.defineProperty(t,"OTelClient",{enumerable:!0,get:function(){return r.OTelClient}});var i=n(8218);Object.defineProperty(t,"OTelExporter",{enumerable:!0,get:function(){return i.OTelExporter}});var a=n(6366);Object.defineProperty(t,"SeverityNumber",{enumerable:!0,get:function(){return a.SeverityNumber}})},6366:function(e,t){var n;
1Object.defineProperty(t,"__esModule",{value:!0}),t.SeverityNumber=void 0,(n=t.SeverityNumber||(t.SeverityNumber={}))[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.TRACE=1]="TRACE",n[n.TRACE2=2]="TRACE2",n[n.TRACE3=3]="TRACE3",n[n.TRACE4=4]="TRACE4",n[n.DEBUG=5]="DEBUG",n[n.DEBUG2=6]="DEBUG2",n[n.DEBUG3=7]="DEBUG3",n[n.DEBUG4=8]="DEBUG4",n[n.INFO=9]="INFO",n[n.INFO2=10]="INFO2",n[n.INFO3=11]="INFO3",n[n.INFO4=12]="INFO4",n[n.WARN=13]="WARN",n[n.WARN2=14]="WARN2",n[n.WARN3=15]="WARN3",n[n.WARN4=16]="WARN4",n[n.ERROR=17]="ERROR",n[n.ERROR2=18]="ERROR2",n[n.ERROR3=19]="ERROR3",n[n.ERROR4=20]="ERROR4",n[n.FATAL=21]="FATAL",n[n.FATAL2=22]="FATAL2",n[n.FATAL3=23]="FATAL3",n[n.FATAL4=24]="FATAL4"},7956:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getRemoteEventName=t.isRemoteProduct=void 0;var o=n(5263);t.isRemoteProduct=function(e){var t;if(null==e||"object"!=typeof e)return!1;if("remote"in e&&"boolean"==typeof e.remote)return e.remote;if(null===(t=e)||void 0===t?void 0:t.variantId){var n=o.getProductFromMeta(e.variantId);if(n&&"remote"in n&&"boolean"==typeof n.remote)return n.remote}return!1},t.getRemoteEventName=function(e){return"remote_"+e}},6848:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getRequestId=void 0;var o=n(2729),r={page_rendered:"z",product_page_rendered:"x",collection_page_rendered:"c",search_submitted:"b"};function i(e,t){if(r[t])return"ri-"+function(e){for(var t=e.replace(/-/g,""),n=[],o=0;o<t.length;o+=2)n.push(parseInt(t.substr(o,2),16));var r=new Uint8Array(n),i="";r.forEach((function(e){return i+=String.fromCharCode(e)}));var a=btoa(i);return a.replace(/\+/g,"-").replace(/\//g,"_").replace(/[=]+$/,"")}(e)+"-"+r[t]}t.getRequestId=function(e,t){try{if(!r[e]||!t||"trekkie-storefront-renderer"!==t)return;var n=null===(u=null===(c=null===(s=null===performance||void 0===performance?void 0:performance.getEntriesByType("navigation")[0])||void 0===s?void 0:s.serverTiming)||void 0===c?void 0:c.find((function(e){return"requestID"===e.name})))||void 0===u?void 0:u.description;if(n){var a=function(e,t){try{var n=i(e,t);if(!n)return;return sessionStorage.getItem(n)}catch(e){return}}(n,e);return a?o.buildToken().toUpperCase():(function(e,t){try{if(!i(e,t))return;var n=(new Date).getTime();sessionStorage.setItem(i(e,t),n.toString())}catch(e){}}(n,e),n)}}catch(e){return}var s,c,u}},3420:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getSessionId=void 0;var o,r=n(2729);t.getSessionId=function(){return o||(o=function(){var e,t,n;try{n=(null===(e=window.Shopify)||void 0===e?void 0:e.evids)?null===(t=window.Shopify)||void 0===t?void 0:t.evids("session_started",{analyticsFramework:"trekkie"}):r.buildToken()}catch(e){n=r.buildToken()}return n}()),o}},8860:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.markShimQueueReady=t.processForShimQueue=void 0,t.processForShimQueue=function(e,t){window.__TREKKIE_SHIM_QUEUE&&"function"==typeof window.__TREKKIE_SHIM_QUEUE.push&&!0===window.__TREKKIE_SHIM_QUEUE.ready&&window.__TREKKIE_SHIM_QUEUE.push({from:"trekkie-"+e,method:e,args:Array.prototype.slice.call(t)})},t.markShimQueueReady=function(e){window.__TREKKIE_SHIM_QUEUE&&(window.__TREKKIE_SHIM_QUEUE.ready=e)}},4537:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.removeShopifyAnalyticsProxy=t.clearShopifyAnalyticsQueue=t.getShopifyAnalyticsQueueSize=t.flushShopifyAnalyticsLogs=t.createShopifyAnalyticsProxy=void 0;var o=n(6279);Object.defineProperty(t,"createShopifyAnalyticsProxy",{enumerable:!0,get:function(){return o.createShopifyAnalyticsProxy}}),Object.defineProperty(t,"flushShopifyAnalyticsLogs",{enumerable:!0,get:function(){return o.flushShopifyAnalyticsLogs}}),Object.defineProperty(t,"getShopifyAnalyticsQueueSize",{enumerable:!0,get:function(){return o.getShopifyAnalyticsQueueSize}}),Object.defineProperty(t,"clearShopifyAnalyticsQueue",{enumerable:!0,get:function(){return o.clearShopifyAnalyticsQueue}}),Object.defineProperty(t,"removeShopifyAnalyticsProxy",{enumerable:!0,get:function(){return o.removeShopifyAnalyticsProxy}})}
1,4336:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.LogQueue=void 0;var o=n(6366),r=["/s/trekkie.storefront","/wpm","/storefront/assets/shop_events_listener"],i=function(){function e(e){this.queue=new Map,this.flushedKeys=new Set,this.otelClient=e.otelClient,this.config={maxQueueSize:e.maxQueueSize||50,autoFlushInterval:e.autoFlushInterval||1e4,maxFlushedKeysSize:e.maxFlushedKeysSize||1e4,flushedKeysCleanupInterval:e.flushedKeysCleanupInterval||36e5},this.isDebugMode=e.isDebugMode,"undefined"!=typeof window&&(this.config.autoFlushInterval&&this.setupAutoFlush(),this.setupFlushedKeysCleanup())}return e.prototype.hashString=function(e){for(var t=5381,n=0;n<e.length;n++)t=33*t^e.charCodeAt(n);return t>>>0},e.prototype.createKey=function(e,t,n){return e+":"+t+":"+this.hashString(n)},e.prototype.add=function(e){if(!r.some((function(t){return e.stack.includes(t)}))){var t=this.createKey(e.operation,e.property,e.stack);this.flushedKeys.has(t)||(this.queue.set(t,e),this.config.maxQueueSize&&this.queue.size>=this.config.maxQueueSize&&this.flush())}},e.prototype.limitFlushedKeysSize=function(){if(this.flushedKeys.size>this.config.maxFlushedKeysSize)for(var e=this.flushedKeys.size-this.config.maxFlushedKeysSize,t=this.flushedKeys.values(),n=0;n<e;n++){var o=t.next().value;void 0!==o&&this.flushedKeys.delete(o)}},e.prototype.flush=function(){var e=this;if(0!==this.queue.size){var t=Array.from(this.queue.values());t.forEach((function(t){var n={operation:t.operation,property:t.property,stack:t.stack,page:t.page};void 0!==t.method_argument&&(n.method_argument=String(t.method_argument)),e.otelClient.log({message:"ShopifyAnalytics",severity:o.SeverityNumber.INFO,attributes:n})})),this.isDebugMode()&&console.log("[ShopifyAnalytics] Flushed logs to OTel client:",t),this.queue.forEach((function(t,n){e.flushedKeys.add(n)})),this.limitFlushedKeysSize(),this.queue.clear()}},e.prototype.setupAutoFlush=function(){var e=this;"undefined"!=typeof window&&this.config.autoFlushInterval&&(this.flushTimer=window.setInterval((function(){e.flush()}),this.config.autoFlushInterval))},e.prototype.setupFlushedKeysCleanup=function(){var e=this;"undefined"!=typeof window&&this.config.flushedKeysCleanupInterval&&(this.cleanupTimer=window.setInterval((function(){e.isDebugMode()&&console.log("[ShopifyAnalytics] Clearing flushedKeys ("+e.flushedKeys.size+" entries)"),e.flushedKeys.clear()}),this.config.flushedKeysCleanupInterval))},e.prototype.getQueueSize=function(){return this.queue.size},e.prototype.clear=function(){this.queue.clear()},e.prototype.destroy=function(){this.flushTimer&&clearInterval(this.flushTimer),this.cleanupTimer&&clearInterval(this.cleanupTimer),this.flush()},e}();t.LogQueue=i},6279:function(e,t,n){var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.removeShopifyAnalyticsProxy=t.clearShopifyAnalyticsQueue=t.getShopifyAnalyticsQueueSize=t.flushShopifyAnalyticsLogs=t.createShopifyAnalyticsProxy=void 0;var r,i,a,s,c=n(8564),u=n(7179),l=n(4336),d=n(288),f=!1;function p(e,t){if("object"!=typeof e||null===e)return e;if(e[s])return e;var n=new Map,i=new Proxy(e,{get:function(e,o){if(s&&o===s)return!0;var i=t?t+"."+String(o):String(o),a=e[o],c=String(o);if(("track"===c||"page"===c)&&"function"==typeof a){var u=n.get(c);if(u&&u.__wrapped===a)return u;var l=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o={operation:"GET",property:i,method_argument:t[0],stack:d.captureStackTrace(),page:d.normalizePath(window.location.pathname)};if(r.add(o),"function"==typeof a)return a.apply(e,t)};return l.__wrapped=a,n.set(c,l),l}var f=d.captureStackTrace(),_={operation:"GET",property:i,stack:f,page:d.normalizePath(window.location.pathname)};r.add(_);var v=Object.getOwnPropertyDescriptor(e,o);return v&&!v.configurable&&!v.writable||"object"!=typeof a||null===a?a:p(a,i)},set:function(e,n,i){var a=t?t+"."+String(n):String(n),s=d.captureStackTrace(),c=String(n),u=o(o({operation:"SET",property:a},("track"===c||"page"===c)&&{method_argument:i}),{stack:s,page:d.normalizePath(window.location.pathname)});r.add(u);var l=Object.getOwnPropertyDescriptor(e,n);if(l&&!l.writable&&!l.set){var f=e[n];return!!Object.is(f,i)}return e[n]=i,!0}});return i}function _(){"undefined"!=typeof window&&(i&&(window.removeEventListener("pagehide",i),window.removeEventListener("beforeunload",i),i=void 0),a&&(document.removeEventListener("visibilitychange",a),a=void 0))}t.createShopifyAnalyticsProxy=function(e){if("undefined"==typeof Proxy||"undefined"==typeof Symbol)return null;if(s||(s=Symbol("ShopifyAnalyticsProxy")),f=d.isDebugEnabled(),"undefined"!=typeof window&&window.ShopifyAnalytics&&window.ShopifyAnalytics[s])return f&&console.warn("[ShopifyAnalytics] Proxy already initialized. Skipping re-initialization."),null;if(!f&&!c.shouldRun(1))return null;if(r=new l.LogQueue({otelClient:u.otelClient,maxQueueSize:null==e?void 0:e.maxQueueSize,autoFlushInterval:null==e?void 0:e.autoFlushInterval,maxFlushedKeysSize:null==e?void 0:e.maxFlushedKeysSize,flushedKeysCleanupInterval:null==e?void 0:e.flushedKeysCleanupInterval,isDebugMode:function(){return f}}),"undefined"!=typeof window&&(_(),i=function(){r&&r.flush(),u.otelClient.flush()},a=function(){"hidden"===document.visibilityState&&(r&&r.flush(),u.otelClient.flush())},window.addEventListener("pagehide",i),window.addEventListener("beforeunload",i),document.addEventListener("visibilitychange",a)),"undefined"!=typeof window){window.ShopifyAnalytics=window.ShopifyAnalytics||{};var t=p(window.ShopifyAnalytics,"");return window.ShopifyAnalytics=t,t}return null},t.flushShopifyAnalyticsLogs=function(){r&&r.flush()},t.getShopifyAnalyticsQueueSize=function(){return r?r.getQueueSize():0},t.clearShopifyAnalyticsQueue=function(){r&&r.clear()},t.removeShopifyAnalyticsProxy=function(){if(r){var e=f;r.destroy(),_(),f=!1,e&&console.warn("[ShopifyAnalytics] Proxy cannot be fully removed once applied. Reload the page for clean state.")}}},288:function(e,t){function n(e){return e.replace(/^\/collections\/[^/:?]+(\/.*)?/,"/collection-
1page").replace(/^\/products\/[^/:?]+(\/.*)?/,"/product-page").replace(/^\/search\?q=[^/:]+/,"/search")}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizePath=t.captureStackTrace=t.isDebugEnabled=void 0,t.isDebugEnabled=function(){if("undefined"==typeof window)return!1;try{return"true"===window.localStorage.getItem("shopify_analytics_proxy_debug")}catch(e){return!1}},t.captureStackTrace=function(){var e=((new Error).stack||"").split("\n"),t=["captureStackTrace","createDeepProxy","Proxy.","Object.get","Object.set"],o=e.slice(1).find((function(e){return!t.some((function(t){return e.includes(t)}))}));if(!o)return"";var r=o.match(/(?:https?:\/\/[^/]+)(\/[^)\s]+)/);if(r)return n(r[1]);var i=o.replace(/https?:\/\/[^/]+/g,""),a=i.match(/(\/[^)\s]+)/);return a?n(a[1]):i.trim()},t.normalizePath=n},8564:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldRun=void 0,t.shouldRun=function(e){return!(e<=0)&&(e>=100||100*Math.random()<e)}},8519:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.inferSource=void 0,t.inferSource=function(){var e,t,n;return(null===(e=window.Shopify)||void 0===e?void 0:e.Checkout)?"checkout-classic":window.CardFields?"checkout-one":(null===(n=null===(t=window.Shopify)||void 0===t?void 0:t.analytics)||void 0===n?void 0:n.replayQueue)?"storefront-renderer":"unknown"}},2729:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hexTime=t.buildToken=t.UniqueIdManager=t.longTermKey=t.shortTermKey=void 0;var o=n(2463),r=n(2164),i=n(4252),a=n(1037),s=n(7179),c=n(9974);t.shortTermKey="_shopify_s",t.longTermKey="_shopify_y";var u="xxxx-4xxx-xxxx-xxxxxxxxxxxx",l=function(){function e(e){this.isCookieSetServerSideEventFired=!1,this.isServerSideCookieWritingEnabled=e}return e.prototype.fetchOrSet=function(e,n,r){if(!i.enabled())return s.otelClient.counter({name:"trekkie_feature_usage",value:1,attributes:{feature:"fetch_or_set_cookie",result:"cookies_disabled",cookie_key:n,is_new_token:!1,is_server_side:r,has_consent:!1,can_write_cookie:!1,token_generation_instrumented:!0}}),"00000000-0000-0000-4000-000000000000";var u=i.read(n),l=Boolean(u),f=!r;u||(u=d(),f=!0,r&&!this.isCookieSetServerSideEventFired&&(a.logMetricToMonorail("serverSideCookieNotSet_"+n),this.isCookieSetServerSideEventFired=!0)),f&&i.write(n,u,e);var p,_=i.read(n,{raw:!0});return(c.useConsentTrackingAPIForCookieReads()||void 0!==_)&&function(e){try{e===t.longTermKey?o.uniqueToken({generateFallback:!1,tag:"trekkie_dummy_v2"}):e===t.shortTermKey&&o.visitToken({generateFallback:!1,tag:"trekkie_dummy_v2"})}catch(e){}}(n),p=void 0===_?"write_blocked":f?!l&&r?"server_cookie_missing_client_fallback":"client_cookie_written":"server_cookie_reused",s.otelClient.counter({name:"trekkie_feature_usage",value:1,attributes:{feature:"fetch_or_set_cookie",result:p,cookie_key:n,is_new_token:!l,is_server_side:r,has_consent:i.allowed(n),can_write_cookie:i.canWriteCookie(n),token_generation_instrumented:!0}}),l&&c.useConsentTrackingAPIForCookieReads()?u:void 0===_?"00000000-0000-0000-5000-000000000000":_},e.prototype.shortTerm=function(){var e,n;return null!==(n=null===(e=window.ShopPay)||void 0===e?void 0:e.trackingVisit)&&void 0!==n?n:this.fetchOrSet(!1,t.shortTermKey,this.isServerSideCookieWritingEnabled)},e.prototype.longTerm=function(){var e,n;return null!==(n=null===(e=window.ShopPay)||void 0===e?void 0:e.trackingUnique)&&void 0!==n?n:this.fetchOrSet(!0,t.longTermKey,this.isServerSideCookieWritingEnabled)},e.prototype.resetIsCookieSetServerSideEventFired=function(){this.isCookieSetServerSideEventFired=!1},e}();function d(){var e="";try{var t=r.virtualWindow().crypto(),n=new Uint16Array(31);t.getRandomValues(n);var o=0;e=u.replace(/[x]/g,(function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=n[o]%16;return o++,("x"===e?i:3&i|8).toString(16)})).toUpperCase()}catch(t){e=u.replace(/[x]/g,(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=16*Math.random()|0;return("x"===e?o:3&o|8).toString(16)})).toUpperCase()}return f()+"-"+e}function f(){var e,t=0;e=(new Date).getTime()>>>0;try{t=performance.now()>>>0}catch(e){t=0}return Math.abs(e+t).toString(16).toLowerCase().padStart(8,"0")}t.UniqueIdManager=l,t.buildToken=d,t.hexTime=f},161:function(e,t,n){var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};
1Object.defineProperty(t,"__esModule",{value:!0}),t.TrackingIdentifierTelemetry=void 0;var r=n(8533),i=n(4252),a=n(4779),s=n(7179),c="00000000-0000-0000-5000-000000000000",u="00000000-0000-0000-0000-000000000000",l="00000000-0000-0000-4000-000000000000";function d(e){var t,n;try{return null===(n=null===(t=r.virtualDocument().querySelector('meta[name="'+e+'"]'))||void 0===t?void 0:t.getAttribute("content"))||void 0===n?void 0:n.trim()}catch(e){return}}function f(e){var t=d(e);if(t)try{var n=JSON.parse(t);return"string"==typeof n?n.trim():void 0}catch(e){return}}function p(e){if(e){var t=Number(e);return Number.isFinite(t)?t:void 0}}function _(e){return Boolean(e&&e!==u&&e!==l&&e!==c&&(/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{8}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)))}function v(e){return Boolean(_(e)||e===u||e===l||e===c)}function h(e,t){return v(e)?"OBSERVED":t?"ABSENT":"COOKIE_ISSUE"}function y(e,t){var n="y"===e?"shopify-y":"shopify-s";t&&(n="y"===e?"serialized-shopifyY":"serialized-shopifyS");var o=t?"c1":"sfr",i=function(e){var t=d("c1"===e?"serialized-isNewCookieStorageEnabled":"new-cookie-storage-activated");if(!t)return!1;var n=t.replace(/^"(.*)"$/,"$1").toLowerCase();return"true"===n||"t"===n}(o),a=d(n),s=t?f(n):a;if(!a)return{status:"missing",convention:o,gateActive:i};if(t&&void 0===s)return{status:"invalid_json",convention:o,gateActive:i};if(!s)return{status:"empty",convention:o,gateActive:i};var v=function(e,t){var n,o;if("c1"===e)return p(f(t+"Expiration"));try{return p(null===(o=null===(n=r.virtualDocument().querySelector('meta[name="'+t+'"]'))||void 0===n?void 0:n.getAttribute("data-expiration"))||void 0===o?void 0:o.trim())}catch(e){return}}(o,n);if(s===c)return{value:s,status:"disallowed",convention:o,gateActive:i,expiration:v};if(s===u)return{value:s,status:"placeholder",convention:o,gateActive:i,expiration:v};if(s===l)return{value:s,status:"disabled",convention:o,gateActive:i,expiration:v};if(void 0!==v&&(new Date).getTime()>v)return{value:s,status:"expired",convention:o,gateActive:i,expiration:v};var h="invalid";return _(s)&&(h=i?"valid":"valid_gate_off"),{value:s,status:h,convention:o,gateActive:i,expiration:v}}function m(e,t,n,o){if(o)return{value:n};if(!v(t))return{skipped:!0};try{var r={generateFallback:!1,tag:"trekkie_sct_validation"};return{value:"y"===e?a.uniqueToken(r):a.visitToken(r)}}catch(e){return{failed:!0}}}function g(e){try{return i.read("y"===e?"_shopify_y":"_shopify_s",{raw:!0})}catch(e){return}}function E(e){return null==e?void 0:e.toLowerCase()}function T(e,t,n){if(e.skipped)return"cookie_issue";if(e.failed)return"api_error";if(!e.value)return"api_missing";var o=E(e.value),r=o===E(t),i=o===E(n);return r&&i?"meta_and_cookie":r?"meta":i?"cookie":"neither"}function S(e){return e<1e3?"lt_1s":e<1e4?"1_10s":e<6e4?"10_60s":e<3e5?"1_5m":e<9e5?"5_15m":e<18e5?"15_30m":e<36e5?"30_60m":"gte_60m"}function A(e,t,n,o,r,i,a,d,f,p){try{s.otelClient.counter({name:"trekkie_tracking_identifier_validation",value:1,attributes:{identifier:e,surface:t?"checkout":"storefront",authoritative_api_read_enabled:f,legacy_response_tokens_disabled:p,tracking_allowed:n,metadata_status:o.status,cookie_status:h(r,f),api_status:(v=i.value,y=i.failed,m=i.skipped,void 0===y&&(y=!1),void 0===m&&(m=!1),m?"skipped_cookie_issue":y?"api_error":v?v===c?"disallowed":v===u?"placeholder":v===l?"disabled":_(v)?"valid":"invalid":"missing"),api_relationship:T(i,o.value,r),tracking_allowed_transition_observed:a,page_age:d,consent_api_version:"0.2.110"}})}catch(e){}var v,y,m}var C=function(){function e(){this.pageStartedAt=(new Date).getTime()}return e.prototype.observeTrackingAllowed=function(e){this.trackingAllowed=e},e.prototype.markTrackingAllowedTransition=function(e){void 0!==this.trackingAllowed&&this.trackingAllowed!==e&&(this.transitionAt=(new Date).getTime()),this.trackingAllowed=e},e.prototype.collect=function(e,t,n,r,i,a,s,c){if(void 0===c&&(c=!1),!n)return function(e){try{var t=e?f("serialized-shopifyY"):d("shopify-y"),n=e?f("serialized-shopifyS"):d("shopify-s");return o(o({},t?{unique_token_from_consent_api:t}:{}),n?{deprecated_visit_token_from_consent_api:n}:{})}catch(e){return{}}}(e);var u=g("y"),l=g("s"),p=m("y",u,i,s),_=m("s",l,a,s),v=o(o({},p.value?{unique_token_from_consent_api:p.value}:{}),_.value?{deprecated_visit_token_from_consent_api:_.value}:{});if(!r)return v;var E=y("y",e),T=y("s",e),C=function(e){return e?f("serialized-trackingTokenRenderId"):d("tracking-token-render-id")}(e),k=(new Date).getTime(),w=S(k-this.pageStartedAt),I=void 0!==this.transitionAt;return A("y",e,t,E,u,p,I,w,s,c),A("s",e,t,T,l,_,I,w,s,c),o(o(o(o(o(o(o(o(o(o(o({},v),{ti_cv:"0.2.110"}),E.value?{ti_y_m:E.value}:{}),T.value?{ti_s_m:T.value}:{}),u?{ti_y_c:u}:{}),l?{ti_s_c:l}:{}),{ti_y_cs:h(u,s),ti_s_cs:h(l,s),ti_y_ms:E.status,ti_s_ms:T.status}),C?{ti_rid:C}:{}),{ti_t:I}),void 0!==this.transitionAt?{ti_t_age:S(k-this.transitionAt)}:{}),{ti_pa:w})},e}();t.TrackingIdentifierTelemetry=C}
1,9974:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useConsentTrackingAPIForCookieReads=t.isSendBeaconSupported=t.isPseudoPageEvent=t.canonical=t.isUnstableBrowserVersion=t.UNSTABLE_BROWSER_VERSION_SET=t.objectAssignFilterUndefined=void 0;var o=n(2164),r=n(9414),i=n(8533),a=n(3811),s=/^https?:\/\//;t.objectAssignFilterUndefined=function(e,t){for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e},t.UNSTABLE_BROWSER_VERSION_SET=new Set(["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134"]),t.isUnstableBrowserVersion=function(){return t.UNSTABLE_BROWSER_VERSION_SET.has(o.virtualWindow().userAgent())},t.canonical=function(){for(var e=i.virtualDocument().getElementsByTagName("link"),t=0;t<e.length;t++){var n=e[t];if("canonical"===n.getAttribute("rel")){var o=n.getAttribute("href");if(!s.test(o))continue;if(o.replace(s,"").length<=5)continue;return o}}return""},t.isPseudoPageEvent=function(e){for(var t=0,n=r.PSEUDO_PAGE_EVENTS;t<n.length;t++){var o=n[t],i=r.analyticsEvents[o];if(i&&i.test(e))return!0}return!1},t.isSendBeaconSupported=function(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon&&!(-1!==navigator.userAgent.lastIndexOf("iPhone; CPU iPhone OS 12_")||-1!==navigator.userAgent.lastIndexOf("iPad; CPU OS 12_"))},t.useConsentTrackingAPIForCookieReads=function(){return a.default.isEnabled(a.F_CLIENT_TRACKING_TOKENS_VIA_CTA)}},8511:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WebPixelEventNameMap=void 0,t.WebPixelEventNameMap={"Page View":"page_viewed","Performed Search":"search_submitted","Viewed Product":"product_viewed","Started Order":"checkout_started","Viewed Product Category":"collection_viewed","Viewed Product Variant":"product_variant_viewed","Added Product":"product_added_to_cart","Added Payment":"payment_info_submitted","Completed Order":"checkout_completed","Checkout Contact Step Started":"checkout_contact_step_started","Checkout Contact Info Submitted":"checkout_contact_info_submitted","Checkout Address Info Submitted":"checkout_address_info_submitted","Checkout Shipping Step Started":"checkout_shipping_step_started","Checkout Shipping Info Submitted":"checkout_shipping_info_submitted","Checkout Payment Step Started":"checkout_payment_step_started"}},1074:function(e,t,n){var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.replayAnalyticsQueue=t.Tricorder=void 0;var r=n(8533),i=n(5533),a=n(6573),s=n(1037),c=n(8006),u=n(4779),l=n(2729),d=n(1482),f=n(8628),p=n(9974),_=n(1037),v=n(357),h=n(8511),y=n(3811),m=n(1129),g=n(8860),E=n(7179),T=n(4537),S=n(8519),A=function(){function e(e,t,n){var o,r,i;void 0===n&&(n=function(){}),this.integrations=[],this.allIntegrationsHaveLoaded=!1,this.handleConsentCollectedBinded=this.handleConsentCollected.bind(this),this.config=t,this.navigationInfo=this.getNavigationType(),this.configureMonorailRegion(this.config.Trekkie),c.setupEventIdService(),y.default.initialize(t.Trekkie.enabledBetaFlags),v.default.initialize(t.Trekkie),this.lockIntegrationsObject(),m.prefetchAttributesIfEligible(),s.logMetricToMonorail("navigation-"+(null===(o=this.navigationInfo)||void 0===o?void 0:o.navigationApi)+"-"+(null===(r=this.navigationInfo)||void 0===r?void 0:r.navigationType)),this.logAssetContext(t),this.addBuyWithPrimePresenceListener(t),this.initialize(e,t,n),"storefront"===(null===(i=t.Trekkie)||void 0===i?void 0:i.appName)&&T.createShopifyAnalyticsProxy({maxQueueSize:50,autoFlushInterval:1e4})}return e.prototype.configureMonorailRegion=function(e){var t="global";(null==e?void 0:e.monorailRegion)&&(t=null==e?void 0:e.monorailRegion),(null==e?void 0:e.development)&&(t="staging"),a.setMonorailRegion(t)},e.prototype.logAssetContext=function(e){var t,n,o,r,i;a.addBatchEvent({schemaId:d.trekkieAssetContextSchemaId,payload:{build_id:"f1ba865b3fecd812ad617f74ac079261075e9edb",page_url:window.location.href,app_name:null===(t=e.Trekkie)||void 0===t?void 0:t.appName,shop_id:null===(o=null===(n=e.Trekkie)||void 0===n?void 0:n.defaultAttributes)||void 0===o?void 0:o.shopId,monorail_region:(null===(r=e.Trekkie)||void 0===r?void 0:r.monorailRegion)||"not_set",source:null===(i=e.S2S)||void 0===i?void 0:i.source,visit_token:v.default.visitToken,surface:"trekkie-"+S.inferSource()+"-browser"}})},e.prototype.addBuyWithPrimePresenceListener=function(e){var t,n,r=null===(n=null===(t=e.Trekkie)||void 0===t?void 0:t.defaultAttributes)||void 0===n?void 0:n.shopI
1d;r&&window.addEventListener("message",(function(e){var t,n,i,s,c,u;try{if("https://order.buywithprime.amazon.com/"===e.origin){var l=null===(n=null===(t=window.ShopifyAnalytics)||void 0===t?void 0:t.meta)||void 0===n?void 0:n.product,f=(null===(i=null==l?void 0:l.variants)||void 0===i?void 0:i.length)>0?null===(s=null==l?void 0:l.variants[0])||void 0===s?void 0:s.id:void 0,p=(null===(u=null===(c=window.ShopifyAnalytics)||void 0===c?void 0:c.meta)||void 0===u?void 0:u.selectedVariantId)||f,v={schemaId:d.buyWithPrimePresenceSchemaId,payload:o(o(o({shop_id:r},e.data&&{event_message:e.data}),l&&{product_id:l.id}),p&&{product_variant_id:Number(p)})};a.produce([v])}}catch(e){_.reportError("buyWithPrimeError",e)}}))},e.prototype.getNavigationType=function(){try{var e="PerformanceNavigationTiming",t=f.getNavigationTypeExperimental();return t||(t=f.getNavigationTypeLegacy(),e="performance.navigation"),t?{navigationType:t,navigationApi:e}:{navigationType:"unknown",navigationApi:"unknown"}}catch(e){s.reportError("navigation_api_error",e)}return{navigationType:"error",navigationApi:"error"}},e.prototype.initialize=function(e,t,n){this.loadIntegrations(e,t,n)},e.prototype.getS2SEventId=function(e,t,n){var o,r,i,a;void 0===e&&(e=void 0),void 0===t&&(t={});var s={navigationApi:this.navigationInfo.navigationApi,navigationType:this.navigationInfo.navigationType},c="Added Product Next"===e?"Added Product":e,u=h.WebPixelEventNameMap[c];try{if("product_added_to_cart"===u&&(null===(o=window.Shopify)||void 0===o?void 0:o.evids)){var d=function(e){if(e.productId&&e.variantId)return e.productId.toString()+"-"+e.variantId.toString()}(t),f=null!==(r=C[e])&&void 0!==r?r:C.default;a=window.Shopify.evids(u,{analyticsFramework:f,cacheKey:d})}else a="checkout_completed"===u&&n?n:(null===(i=window.Shopify)||void 0===i?void 0:i.evids)&&u?window.Shopify.evids(u,{analyticsFramework:"trekkie"}):l.buildToken()}catch(e){a=l.buildToken()}return{s2sMetadata:s,eventId:"string"==typeof a&&a.length>0?a:l.buildToken()}},e.prototype.loadIntegrations=function(e,t,n){var o=this,r=this.waitFor(e.length,(function(){try{n()}catch(e){s.reportError("readyCallback",e)}o.allIntegrationsHaveLoaded=!0,o.flushMonorailEventsIfLoaded()}));e.forEach((function(e){var n=e[0],i=e[1];try{if(t[n]&&"object"==typeof t[n]){var a=new i({},t[n],r);a.initializeOrAwaitConsent(),o.integrations.push(a),"Trekkie"===a.name()&&(o.trekkie=a,window.ShopifyAnalytics=window.ShopifyAnalytics||{},window.ShopifyAnalytics.lib=window.ShopifyAnalytics.lib||{},window.ShopifyAnalytics.lib.trekkie=o.trekkie)}else r()}catch(e){r(),s.reportError("loadIntegration",e)}})),this.addConsentCollectedListener()},e.prototype.lockIntegrationsObject=function(){try{Object.defineProperty(this,"integrations",o(o({},Object.getOwnPropertyDescriptor(this,"integrations")),{value:this.integrations,configurable:!1,writable:!1}))}catch(e){s.reportError("lockIntegrationsObject",e)}},e.prototype.handleConsentCollected=function(e){v.default.refreshVisitorTokens(),this.integrations.forEach((function(t){t.onConsentCollected(e)})),a.flushBatchEvents()},e.prototype.addConsentCollectedListener=function(){document.addEventListener(u.TrackingEvents.CONSENT_COLLECTED,this.handleConsentCollectedBinded)},e.prototype.removeConsentCollectedListener=function(){document.removeEventListener(u.TrackingEvents.CONSENT_COLLECTED,this.handleConsentCollectedBinded)},e.prototype.identify=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t={});var o=this.getS2SEventId();e instanceof Object&&(t=e,e="");for(var r=0,i=this.integrations;r<i.length;r++){var a=i[r];try{var c={id:e,properties:t,eventId:o.eventId,s2sMetadata:o.s2sMetadata};a.identify(c)}catch(e){s.reportError("identify",e)}}this.flushMonorailEventsIfLoaded()},e.prototype.page=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t={});try{g.processForShimQueue("page",arguments)}catch(e){s.reportError("pageShimQueue",e)}var o=this.getS2SEventId("Page View");e instanceof Object&&(t=e,e="");for(var r=this.generatePageObject(e,t,o.eventId,o.s2sMetadata),i=0,a=this.integrations;i<a.length;i++){var c=a[i];try{c.emitEventOrAwaitConsent("page",r)}catch(e){s.reportError("page",e)}}return this.flushMonorailEventsIfLoaded(),o.eventId},e.prototype.track=function(e,t,n,o,r){void 0===e&&(e=""),void 0===t&&(t={});
1try{g.processForShimQueue("track",arguments)}catch(e){s.reportError("trackShimQueue",e)}var i="Checkout One Page View"===e?"Page View":e,a=this.getS2SEventId(i,t,n);e instanceof Object&&(t=e,e="");for(var c={event:e,properties:this.constructTrackArgs(e,t,a),eventId:a.eventId,s2sMetadata:a.s2sMetadata,emitConversionEvent:o,addApiSource:null==r?void 0:r.addApiSource,shopifyEmitted:null==r?void 0:r.shopifyEmitted},u=0,l=this.integrations;u<l.length;u++){var d=l[u];try{d.emitEventOrAwaitConsent("track",c)}catch(e){s.reportError("track",e)}}return this.flushMonorailEventsIfLoaded(),a.eventId},e.prototype.flushMonorailEventsIfLoaded=function(){this.allIntegrationsHaveLoaded&&a.flushBatchEvents()},e.prototype.ready=function(e){var t;try{e()}catch(e){["ga is not defined","Can't find variable: ga"].includes(null===(t=e)||void 0===t?void 0:t.message)?s.logMetricToMonorail("GoogleAnalyticsReferenceErrors"):s.reportError("ready",e)}},e.prototype.waitFor=function(e,t){return 0===e?(setTimeout(t,0),function(){}):function(){0==--e&&setTimeout(t,0)}},e.prototype.generatePageObject=function(e,t,n,o){var a=i.href(),s=a.indexOf("?");s=(a=-1===s?"":a.slice(s)).indexOf("#"),a="?"===(a=-1===s?a:a.slice(0,s))?"":a;var c="shopifyEmitted"in t?Boolean(t.shopifyEmitted):void 0;return{name:e,referrer:r.virtualDocument().referrer(),path:i.pathname(),search:a,title:r.virtualDocument().title(),url:this.url(),properties:t,eventId:n,s2sMetadata:o,shopifyEmitted:c}},e.prototype.url=function(){var e=p.canonical();if(e)return e.indexOf("?")>0?e:e+i.search();var t=i.href(),n=t.indexOf("#");return-1===n?t:t.slice(0,n)},e.prototype.constructTrackArgs=function(e,t,n){if(void 0===t&&(t={}),p.isPseudoPageEvent(e)){var r=t,i=r.name,a=r.path;if(i&&a){var s=this.generatePageObject(i,{path:a},n.eventId,n.s2sMetadata);return o(o({},t),{page:s})}}return t},e.prototype.destroy=function(){this.removeConsentCollectedListener(),E.otelClient.destroy(),T.removeShopifyAnalyticsProxy()},e}();t.Tricorder=A,t.replayAnalyticsQueue=function(e,t){g.markShimQueueReady(!0);for(var n=0,o=t;n<o.length;n++)(s=e[(a=o[n])[0]])===e.ready&&"function"==typeof s&&s.apply(e,a.slice(1));g.markShimQueueReady(!1);for(var r=0,i=t;r<i.length;r++){var a,s;(s=e[(a=i[r])[0]])&&s!==e.ready&&"function"==typeof s&&s.apply(e,a.slice(1))}g.markShimQueueReady(!0)};var C={"Added Product Next":"trekkie-next",default:"trekkie"}},8533:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.virtualDocument=void 0;var n=new(function(){function e(){}return e.prototype.cookieEnabled=function(){return window.navigator.cookieEnabled},e.prototype.cookie=function(){return document.cookie},e.prototype.setCookie=function(e){document.cookie=e},e.prototype.body=function(){return document.body},e.prototype.referrer=function(){return document.referrer},e.prototype.title=function(){return document.title},e.prototype.createElement=function(e){return document.createElement(e)},e.prototype.dispatchEvent=function(e){return document.dispatchEvent(e)},e.prototype.querySelector=function(e){return document.querySelector(e)},e.prototype.querySelectorAll=function(e){return document.querySelectorAll(e)},e.prototype.documentElement=function(){return document.documentElement},e.prototype.getElementsByTagName=function(e){return document.getElementsByTagName(e)},e.prototype.createCustomEvent=function(e,t){try{return new CustomEvent(e,t)}catch(o){var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}},e}());t.virtualDocument=function(){return n}},2164:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.virtualWindow=void 0;var n=new(function(){function e(e){this.nativeWindow=e}return e.prototype.location=function(){return this.nativeWindow.location},e.prototype.userAgent=function(){return this.nativeWindow.navigator.userAgent},e.prototype.crypto=function(){return this.nativeWindow.crypto||this.nativeWindow.msCrypto},e.prototype.top=function(){return this.nativeWindow.top?new e(this.nativeWindow.top):void 0},e.prototype.parent=function(){return this.nativeWindow.parent?new e(this.nativeWindow.parent):void 0},e.prototype.postMessage=function(e,t,n){this.nativeWindow.postMessage(e,t,n)},e.prototype.addEventListener=function(e,t,n){this.nativeWindow.addEventListener(e,t,n)},e.prototype.onload=function(){throw new Error("Do not use window.onload due to compatibility reasons. Use addEventListener instead of window.onload")},e}())(window);t.virtualWindow=function(){return n}},2463:function(e,t,n){n.r(t),n.d(t,{ConsentKeys:function(){return A},ConsentValues:function(){return T},DISALLOWED_TRACKING_TOKEN:function(){return he},DisplayConsentValues:function(){return E},OpenTelemetry:function(){return St},TrackingEvents:function(){return y},analyticsProcessingAllowed:function(){return $t},consentId:function(){return We},currentVisitorConsent:function(){return $e},dispatchLoadedEvent:function(){return W},encodeConsentV3:function(){return Zn},formatBytesAsCompressedUUID:function(){return d},formatBytesAsString:function(){return l},getCustomerPrivacyConfig:function(){return O},getRegion:function(){return Fe},getSignal:function(){return ie},getTrackingConsent:function(){return Ue},getTrackingConsentMetafield:function(){return qe},getTrackingConsentMetafields:function(){return Ye},handleTrackingTokens:function(){return Ce},initializeConsent:function(){return Ln},injectConsent:function(){return Q},instrumentClassicHydrogenVisitorState:function(){return Dn},instrumentHydrogenAnalyticsTokenState:function(){return Jn},instrumentTokenParity:function(){return yn},isConsentV3Populated:function(){return Xn},marketingAllowed:function(){return Yt},metaUniqueTokenNewlyMinted:function(){return ht},metaVisitTokenNewlyMinted:function(){return yt},openTelemetry:function(){return kt},persistTrackingTokens:function(){return Lt},preferencesProcessingAllowed:function(){return Wt},resetInjectedConsent:function(){return H},saleOfDataAllowed:function(){return zt},saleOfDataRegion:function(){return fe},setTrackingConsent:function(){return xe},shopifyConsentAPI:function(){return Qt},shouldShowBanner:function(){return de},uniqueToken:function(){return Kt},usableTrackingToken:function(){return me},userCanBeTracked:function(){return je},visitToken:function(){return Bt}});const o=()=>"undefined"==typeof window,r=()=>"undefined"!=typeof __CtaTestEnv__&&"true"===__CtaTestEnv__;class i{}i.warn=e=>{r()||console.warn(e)},i.error=e=>{r()||console.error(e)},i.info=e=>{r()||console.info(e)},i.debug=e=>{r()||console.debug(e)},i.trace=e=>{r()||console.trace(e)};const a=i;function s(e,t){if(null===e)return"null";if(Array.isArray(e))return`[${e.map((e=>s(e,!0))).join(",")}]`;if("object"==typeof e){let n=[];for(const t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&""!==e[t]&&n.push(`${t}:${s(e[t],!0)}`);const o=n.join(",");return t?`{${o}}`:o}return"string"==typeof e?JSON.stringify(e):`${e}`}function c(e,...t){if(0===t.length)return e;const n=t[0];return e[n]||(e[n]={}),c(e[n],...t.slice(1))}function u(e){try{return decodeURIComponent(e)}catch(e){return""}}function l(e){if(!e)return;const t=Math.max(...Object.keys(e).map((e=>parseInt(e,10))))+1;let n="";for(let o=0;o<t;o++)n+=e[o]?String.fromCharCode(e[o]):" ";return n}function d(e){if(!e)return;if(16!==Object.keys(e).length)return;let t="";for(let n=0;n<16;n++)t+=String.fromCharCode(e[n]);return btoa(t).replace(/\+/g,"-").replace(/\//g,"*").replace(/_/g,"*").replace(/[=]*$/,"")}function f(){if(!o())return window}
1function p(){var e,t;return!o()&&Boolean(null===(e=f())||void 0===e||null===(t=e.Shopify)||void 0===t?void 0:t.theme)}function _(){var e;return!o()&&Boolean(null===(e=f())||void 0===e?void 0:e.__CUSTOMER_ACCOUNT__)}function v(){try{return"undefined"!=typeof PerformanceServerTiming}catch{return!1}}class h extends TypeError{constructor(e){super(e),this.name="ConsentValidationError",Object.setPrototypeOf(this,h.prototype)}}const y={TRACKING_ACCEPTED:"trackingConsentAccepted",TRACKING_DECLINED:"trackingConsentDeclined",MARKETING_ACCEPTED:"firstPartyMarketingConsentAccepted",SALE_OF_DATA_ACCEPTED:"thirdPartyMarketingConsentAccepted",ANALYTICS_ACCEPTED:"analyticsConsentAccepted",PREFERENCES_ACCEPTED:"preferencesConsentAccepted",MARKETING_DECLINED:"firstPartyMarketingConsentDeclined",SALE_OF_DATA_DECLINED:"thirdPartyMarketingConsentDeclined",ANALYTICS_DECLINED:"analyticsConsentDeclined",PREFERENCES_DECLINED:"preferencesConsentDeclined",CONSENT_COLLECTED:"visitorConsentCollected",CONSENT_TRACKING_API_LOADED:"consentTrackingApiLoaded"},m="2.1",g="3",E={ACCEPTED:"yes",DECLINED:"no",NO_INTERACTION:"no_interaction",NO_VALUE:""},T={NO_VALUE:"",ACCEPTED:"1",DECLINED:"0"},S={PREFERENCES:"p",ANALYTICS:"a",MARKETING:"m",SALE_OF_DATA:"t"},A={MARKETING:"m",ANALYTICS:"a",PREFERENCES:"p",SALE_OF_DATA:"s"},C={MARKETING:"marketing",ANALYTICS:"analytics",PREFERENCES:"preferences",SALE_OF_DATA:"sale_of_data",EMAIL:"email"},k="_tracking_consent";function w(e,t=!1){const n=function(){try{return document.cookie}catch{return!1}}()?document.cookie.split("; "):[];for(let t=0;t<n.length;t++){const[o,r]=n[t].split("=");if(e===u(o))return u(r)}if(t&&"_tracking_consent"===e&&!window.localStorage.getItem("tracking_consent_fetched")){if(r())return;return console.debug("_tracking_consent missing"),function(e="/"){const t=new XMLHttpRequest;t.open("HEAD",e,!1),t.withCredentials=!0,t.send()}(),window.localStorage.setItem("tracking_consent_fetched","true"),w(e,!1)}}function I(e){return e===encodeURIComponent(u(e))}function b(e,t,n,o){if(!I(o))throw new TypeError("Cookie value is not correctly URI encoded.");if(!I(e))throw new TypeError("Cookie name is not correctly URI encoded.");let r=`${e}=${o}`;r+="; path=/",t&&(r+=`; domain=${t}`),r+=`; expires=${new Date((new Date).getTime()+n).toUTCString()}`,document.cookie=r}class N{constructor(){if(N.instance)return N.instance;N.instance=this}produce(e,t){if(!o())try{const n={schema_id:"customer_privacy_api_events/2.0",payload:{shop_domain:window.location.host,method_name:e,call_details:t||null}},o={accept:"*/*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","content-type":"application/json; charset=utf-8","x-monorail-edge-event-created-at-ms":String(Date.now()),"x-monorail-edge-event-sent-at-ms":String(Date.now())};if(!window.location.host.endsWith("spin.dev"))return fetch("https://monorail-edge.shopifysvc.com/v1/produce",{headers:o,body:JSON.stringify(n),method:"POST",mode:"cors",credentials:"omit"}).catch((()=>{}));console.log("Monorail event from consent API:",o,n)}catch(e){}}}function O(){var e,t;return o()?{}:(null===(e=window.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.config)||{}}N.instance=void 0;const P=/^https?:\/\/([^/]+)(\/api\/(?:unstable|2\d{3}-\d{2})\/graphql\.json(?=$|\?))?/;function R(e,t){if("fetch"!==e.initiatorType)return!1;const n=e.name.match(P);if(!n)return!1;const[,o,r]=n;return o===t||!!r&&!(null==o||!o.endsWith(`.${t}`))}const D="_cmp";function M(e=D){let t;if(t=V()&&L((()=>function(e=D){var t,n;if(o())return;const r=null===(t=performance)||void 0===t||null===(n=t.getEntriesByType)||void 0===n?void 0:n.call(t,"resource"),i=window.location.host;let a=x[e];for(let t=r.length-1;t>=0;t--){const n=r[t];if(!R(n,i))continue;const o=U(n,e);if(o){a=o;break}}return x[e]=a,a}(e)))||L((()=>function(e=D){var t,n;if(!j()&&!function(){try{const e=performance.getEntriesByType("navigation")[0].serverTiming;return!!e&&0!=e.length}catch{return!1}}()){const e=new N;let t="failed_to_fetch";try{t=navigator.userAgent}catch{}e.produce("navigationServerTiming",JSON.stringify({failed:!0,userAgent:t,apiSupported:v()})),j()||(c(f(),"Shopify","customerPrivacy").serverTimingSupportVerified=!0)}const o=null===(t=performance)||void 0===t||null===(n=t.getEntriesByType)||void 0===n?void 0:n.call(t,"navigation");if(!o)return;const r=o.map((t=>U(t,e))).find((e=>e));if(r&&e===D)try{sessionStorage.setItem("consentHeader",r)}catch{}return r}(e))),!t){if(e!==D)return;let t;try{t=sessionStorage.getItem("consentHeader")}catch{}return t||void 0}try{t=decodeURIComponent(t)}catch{}return t}function L(e){try{return e()}catch{return}}const x={};function U(e,t=D){var n,o;if(e)return null===(n=e.serverTiming)||void 0===n||null===(o=n.find((e=>e.name==t)))||void 0===o?void 0:o.description}function F(){var e,t;const n=f();return!0===(null==n||null===(e=n.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.backendConsentEnabled)||!0===O().asyncVisitorState}function V(){return!o()&&(F()||!p()&&!_()&&!function(){if(o())return!1;try{return null!==document.querySelector('meta[name="serialized-trackingConsent"]')}catch{return!1}}())}function j(){var e,t;const n=f();return null==n||null===(e=n.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.serverTimingSupportVerified}const K="_cs";let B;function G(){if(o())return B;{var e,t;const n=(null===(e=window.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.injectedConsent)||O().injectedConsent;return n?u(n):void 0}}function H(){var e;o()?B=void 0:null!==(e=window.Shopify)&&void 0!==e&&e.customerPrivacy&&(window.Shopify.customerPrivacy.injectedConsent=void 0)}function q(){var e;if(!o())return null===(e=window.Shopify)||void 0===e?void 0:e.customerPrivacy}function Y(){var e;return null===(e=q())||void 0===e?void 0:e.consentStatus}function $(e){const t=q();t&&(t.consentStatus=e)}function W(){z(y.CONSENT_TRACKING_API_LOADED)}function z(e,t){if(!o())try{document.dispatchEvent(new CustomEvent(e,{detail:t||{}}))}catch(t){console.error(`[Shopify Customer Privacy] Error in event listener for "${e}":`,t)}}function J(e){$("loaded");const t=e[S.MARKETING],n=e[S.SALE_OF_DATA],o=e[S.ANALYTICS],r=e[S.PREFERENCES];!0===t?z(y.MARKETING_ACCEPTED):!1===t&&z(y.MARKETING_DECLINED),!0===n?z(y.SALE_OF_DATA_ACCEPTED):!1===n&&z(y.SALE_OF_DATA_DECLINED),!0===o?z(y.ANALYTICS_ACCEPTED):!1===o&&z(y.ANALYTICS_DECLINED),!0===r?z(y.PREFERENCES_ACCEPTED):!1===r&&z(y.PREFERENCES_DECLINED);const i=function(e){return{marketingAllowed:e[S.MARKETING],saleOfDataAllowed:e[S.SALE_OF_DATA],analyticsAllowed:e[S.ANALYTICS],preferencesAllowed:e[S.PREFERENCES],firstPartyMarketingAllowed:e[S.MARKETING],thirdPartyMarketingAllowed:e[S.SALE_OF_DATA]}}(e);z(y.CONSENT_COLLECTED,i);const a=[o,r,t,n];a.every((e=>!0===e))&&z(y.TRACKING_ACCEPTED),a.every((e=>!1===e))&&z(y.TRACKING_DECLINED)}function Q(e){var t,n;!function(e){o()?B=e:c(window,"Shopify","customerPrivacy").injectedConsent=e}(e),o()||(null!==(t=window.Shopify)&&void 0!==t&&null!==(n=t.customerPrivacy)&&void 0!==n&&n.cachedConsent&&(window.Shopify.customerPrivacy.cachedConsent=void 0),J({[S.PREFERENCES]:se(),[S.ANALYTICS]:ce(),[S.MARKETING]:ue(),[S.SALE_OF_DATA]:le()}))}function X(){let e;if(e=o()?G():function(){var e,t;const n=null===(e=window.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.cachedConsent;return n?u(n):void 0}()||G()||new URLSearchParams(window.location.search).get(K)||w(k)||M(),void 0!==e)return function(e){if("%"==e.slice(0,1))try{e=decodeURIComponent(e)}catch{}const t=e.slice(0,1);return"{"==t?function(e){var t;let n;try{n=JSON.parse(e)}catch{return}if(n.v===m&&null!==(t=n.con)&&void 0!==t&&t.CMP)return n}(e):"3"==t?function(e){const t=e.slice(1).split("_"),[n,o,r,i,a]=t;let s,c;try{s=t[5]?JSON.parse(t.slice(5).join("_")):void 0}catch{}if(a){const e=a.replace(/\*/g,"/").replace(/-/g,"+"),t=atob(e);let n="";for(let e=0;e<t.length;e++){const o=t.charCodeAt(e).toString(16);n+=1===o.length?"0"+o:o}c=[8,13,18,23].reduce(((e,t)=>e.slice(0,t)+"-"+e.slice(t)),n)}function u(e){const t=n.split(".")[0];return t.includes(e.toLowerCase())?T.DECLINED:t.includes(e.toUpperCase())?T.ACCEPTED:T.NO_VALUE}function l(e){return n.includes(e.replace("t","s").toUpperCase())}return{v:g,con:{CMP:{[A.ANALYTICS]:u(A.ANALYTICS),[A.PREFERENCES]:u(A.PREFERENCES),[A.MARKETING]:u(A.MARKETING),[A.SALE_OF_DATA]:u(A.SALE_OF_DATA)}},region:o||"",cus:s,purposes:{[S.ANALYTICS]:l(S.ANALYTICS),[S.PREFERENCES]:l(S.PREFERENCES),[S.MARKETING]:l(S.MARKETING),[S.SALE_OF_DATA]:l(S.SALE_OF_DATA)},sale_of_data_region:"t"==i,display_banner:"t"==r,consent_id:c}}(e):void 0}(e)}function Z(){try{let e=X();if(!e)return;return e}catch{return}}function ee(){return{m:ie(A.MARKETING),a:ie(A.ANALYTICS),p:ie(A.PREFERENCES),s:ie(A.SALE_OF_DATA)}}function te(){return ee()[A.SALE_OF_DATA]}function ne(e=null){return null===e&&(e=Z()),void 0===e}function oe(e){switch(e){case T.ACCEPTED:return E.ACCEPTED;case T.DECLINED:return E.DECLINED;default:return E.NO_VALUE}}function re(e){switch(e){case A.ANALYTICS:return C.ANALYTICS;case A.MARKETING:return C.MARKETING;case A.PREFERENCES:return C.PREFERENCES;case A.SALE_OF_DATA:return C.SALE_OF_DATA}}function ie(e){const t=Z();if(!t)return T.NO_VALUE;const n=t.con.CMP;return n?n[e]:T.NO_VALUE}function ae(e){const t=Z();if(!t||!t.purposes)return!0;const n=t.purposes[e];return"boolean"!=typeof n||n}function se(){return ae(S.PREFERENCES)}function ce(){return ae(S.ANALYTICS)}function ue(){return ae(S.MARKETING)}function le(){return ae(S.SALE_OF_DATA)}function de(){const e=Z();return!!e&&"boolean"==typeof e.display_banner&&e.display_banner}function fe(){const e=Z();return e&&e.sale_of_data_region||!1}const pe="v0.2",_e=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$/,ve="00000000-0000-0000-0000-000000000000",he="00000000-0000-0000-5000-000000000000";function ye(e){return!!e&&_e.test(e.trim().toLowerCase())}function me(e,t){if("string"!=typeof e)return;if(!ye(e))return;const n=e.trim();if(n===ve)return;if(n===he)return;const o=null==t||"string"==typeof t&&""===t.trim()?NaN:Number(t);return Number.isFinite(o)&&Date.now()>o?void 0:n}const ge="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";function Ee(e){return ge.replace(/[xy]/g,(t=>{const n=e();return("x"===t?n:3&n|8).toString(16)}))}function Te(){const e="undefined"!=typeof crypto?crypto:void 0;if("function"==typeof(null==e?void 0:e.randomUUID))return e.randomUUID();if("function"==typeof(null==e?void 0:e.getRandomValues)){const t=e.getRandomValues(new Uint8Array(ge.length));let n=0;return Ee((()=>t[n++]%16))}return Ee((()=>
116*Math.random()|0))}const Se=31536e6,Ae=18e5;function Ce(e,t){if(!o())throw new Error("handleTrackingTokens is only supported in Node.js environments. ");if(!ce()&&!ue())return;const{shopifyY:n,shopifyS:r,shopifyYExpiry:i,shopifySExpiry:a}=e(),s=Date.now(),c=i<=s,u=a<=s;t({shopifyY:ye(n)&&!c?n:Te(),shopifyS:ye(r)&&!u?r:Te(),shopifyYExpiry:s+Se,shopifySExpiry:s+Ae})}function ke(e,t){const n=f();if(!n)return;const o=c(n,"Shopify","customerPrivacy","cachedToken");if(t){const n="_shopify_s"===e?Ae:Se;o[e]=t,o[e+"_expires_at"]=Date.now()+n}else delete o[e],delete o[e+"_expires_at"]}function we(e){return`${e.origin}${t=e.pathname,t.replace(/\/$/,"")}`;var t}function Ie(e){return e.startsWith("http://")||e.startsWith("https://")}const be="Shopify-Storefront-Consent-Management";function Ne(e){const t=e.granular_consent;return{query:`query { consentManagement { cookies(${s({visitorConsent:{marketing:t.marketing,analytics:t.analytics,preferences:t.preferences,saleOfData:t.sale_of_data,...t.metafields&&{metafields:t.metafields}},...t.email&&{visitorEmail:t.email},origReferrer:e.referrer,landingPage:e.landing_page})}) { trackingConsentCookie cookieDomain landingPageCookie origReferrerCookie shopifyUnique shopifyVisit } customerAccountUrl } }`,variables:{}}}let Oe;function Pe(e,t,n,o={}){const i=O().consentDomain||t.granular_consent.checkoutRootDomain||window.location.host,s=()=>function(e,t,n,o){const i=t.granular_consent;let s="",c={};if(i.customerAccountRequestInfo)s=i.customerAccountRequestInfo.url,c=i.customerAccountRequestInfo.headers;else{const t=O(),o=i.storefrontAccessToken||t.storefrontAccessToken||function(){if(!0!==O().isHeadless)try{const e=document.documentElement.querySelector("#shopify-features"),t="Could not find liquid access token";if(!e)return void a.warn(t);const n=e.textContent;if(!n)return void a.warn(t);let o;try{o=JSON.parse(n).accessToken}catch{return void a.warn(t)}return o||void a.warn(t)}catch{return void a.warn("Could not find liquid access token")}}();s=`${/^(localhost|127\.0\.0\.1)(:|$)/.test(e)?"http:":"https:"}//${e}/api/unstable/graphql.json`;const r=i.isExtensionToken?"Shopify-Storefront-Extension-Token":"x-shopify-storefront-access-token";c=o?{[r]:o}:{},n&&(c={...c,...n()})}const u={headers:{"content-type":"application/json",...!0===O().asyncConsent&&new URL(s).origin===window.location.origin&&{[be]:"1"},...c,...r()?{"x-test-payload":JSON.stringify(t)}:{}},body:JSON.stringify(Ne(t)),method:"POST"};let l;try{l=fetch(s,u)}catch(e){l=Promise.reject(e)}return l.then((e=>{try{null==o||o(e)}catch{}if(e.ok)return e.json();{const t=new Error("Server error");throw t.cause={status:e.status},t}}))}(i,t,o.getVisitorTokenHeaders,o.onResponse).then((e=>{var r,i;const a=null==e||null===(r=e.data)||void 0===r?void 0:r.consentManagement;if(!a){var s;const t=(null!==(s=null==e?void 0:e.errors)&&void 0!==s?s:[]).map((e=>null==e?void 0:e.message)).filter(Boolean).join("; ");throw new Error(t?`GraphQL error: ${t}`:"GraphQL response missing consentManagement")}const u=a.cookies.cookieDomain,l=a.cookies.trackingConsentCookie,d=a.cookies.shopifyUnique,f=a.cookies.shopifyVisit,p=null!==(i=a.customerAccountUrl)&&void 0!==i?i:"";var _,v,h;if(l&&(_=l,c(window,"Shopify","customerPrivacy").cachedConsent=_),ke("_shopify_y",d),ke("_shopify_s",f),t.granular_consent.headlessStorefront&&!F()){const e=31536e6,n=t.granular_consent,o=u||n.checkoutRootDomain||window.location.hostname,r=n.storefrontRootDomain||u||window.location.hostname;b(k,o,e,l),r!==o&&b(k,r,e,l)}return!1!==o.emitEvents&&(v=t,h={[S.PREFERENCES]:se(),[S.ANALYTICS]:ce(),[S.MARKETING]:ue(),[S.SALE_OF_DATA]:le()},void 0!==v.granular_consent&&J(h)),function(e,t){if(!e)return;const n=function(e){const t=new URL(e,window.location.origin),n=Ie(e)?we(t):we(t).replace(window.location.origin,""),o=document.querySelectorAll(`a[href^="${n}"]`),r=document.querySelectorAll(`a[href*="${window.location.hostname}/customer_authentication"]`),i=new Set,a=[];for(let e=0;e<o.length;e++)i.has(o[e])||(i.add(o[e]),a.push(o[e]));for(let e=0;e<r.length;e++)i.has(r[e])||(i.add(r[e]),a.push(r[e]));return a}(e);if(n.length)for(let o=0;o<n.length;o++){const r=n[o],i=r.getAttribute("href");if(!i)continue;const a=new URL(i,window.location.origin);a.searchParams.set("_cs",t);const s=Ie(e)?a.toString():a.toString().replace(window.location.origin,"");r.setAttribute("href",s)}}(p,l),void 0!==n&&n(null,e),e})).catch((e=>{var t;const o="Error while setting storefront API consent: "+e.message,r=null===(t=e.cause)||void 0===t?void 0:t.status,i={error:o};if(void 0!==r&&(i.statusCode=r),void 0===n)throw i;n(i)}));if(!0!==O().asyncConsent)return s();const u=Oe=Oe?Oe.then(s,s):s(),l=()=>{Oe===u&&(Oe=void 0)};return u.then(l,l),u}const Re=[C.MARKETING,C.ANALYTICS,C.PREFERENCES,C.SALE_OF_DATA],De=[...Re,C.EMAIL,"rootDomain","checkoutRootDomain","storefrontRootDomain","storefrontAccessToken","headlessStorefront","isExtensionToken","metafields","customerAccountRequestInfo"],Me=Re.map((e=>`"${e}"`)).join(", "),Le="https://shopify.dev/docs/api/customer-privacy";function xe(e,t){if(o())throw new Error("setTrackingConsent is not supported in Node.js environments. This function requires browser APIs (XHR, cookies, window) and can only be called client-side.");const n=new N;if(ce()&&n.produce("setTrackingConsent",pe),function(e){if("boolean"!=typeof e&&"object"!=typeof e)throw new h(`setTrackingConsent received an invali
1d argument of type "${typeof e}". Expected an object with consent keys. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${Le} for documentation.`);if("object"==typeof e){const t=Object.keys(e);if(0===t.length)throw new h(`The submitted consent object is empty. Expected at least one consent key: ${Me}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${Le} for documentation.`);for(const e of t)if(!De.includes(e))throw new h(`The submitted consent object contains an invalid key: "${e}". Valid keys are: ${Me}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${Le} for documentation.`)}}(e),void 0!==t&&"function"!=typeof t)throw new h(`setTrackingConsent received an invalid callback of type "${typeof t}". The second argument must be a function if provided. Example: setTrackingConsent({ analytics: true }, (error, result) => { ... }). See ${Le} for documentation.`);const r=function(e){if(!e)return null;try{return Ve()?document.referrer:""}catch{return""}}(e.analytics),i=function(e){if(!e)return null;if(!Ve())return"/";try{return window.location.pathname+window.location.search}catch{return"/"}}(e.analytics);return Pe(0,{granular_consent:e,...null!==r&&{referrer:r},...null!==i&&{landing_page:i}},t)}function Ue(){const e=new N;if(ce()&&e.produce("getTrackingConsent",pe),ne())return E.NO_VALUE;const t=ee();return t[A.MARKETING]===T.ACCEPTED&&t[A.ANALYTICS]===T.ACCEPTED?E.ACCEPTED:t[A.MARKETING]===T.DECLINED||t[A.ANALYTICS]===T.DECLINED?E.DECLINED:E.NO_INTERACTION}function Fe(){return function(){const e=Z();return ne(e)?"":e.region||""}()}function Ve(){try{if(""===document.referrer)return!0;const e=document.createElement("a");return e.href=document.referrer,window.location.hostname!=e.hostname}catch{return!0}}function je(){return!!ne()||ue()&&ce()}function Ke(){return fe()?"string"==typeof navigator.globalPrivacyControl?"1"!==navigator.globalPrivacyControl:"boolean"==typeof navigator.globalPrivacyControl?!navigator.globalPrivacyControl:null:null}function Be(){return de()&&Ue()===E.NO_INTERACTION}function Ge(){return!1===Ke()?E.DECLINED:(e=te(),ne()?E.NO_VALUE:e===T.NO_VALUE?E.NO_INTERACTION:oe(e));var e}function He(){return!0}function qe(e){return function(e){const t=Z();if(ne(t)||!t.cus)return;const n=t.cus[encodeURIComponent(e)];return n?decodeURIComponent(n):n}(e)}function Ye(){return function(){const e=Z();if(!ne(e)&&e.cus)return Object.entries(e.cus).map((([e,t])=>({key:decodeURIComponent(e),value:decodeURIComponent(t)})))}()}function $e(){const e={},t=ee();for(const n of Object.keys(t))e[re(n)]=oe(t[n]);return e}function We(){return function(){const e=Z();return e&&e.consent_id||""}()}const ze="shopify-y",Je="shopify-s",Qe="serialized-shopifyY",Xe="serialized-shopifyS",Ze="serialized-shopifyYIsNewlyMinted",et="serialized-shopifySIsNewlyMinted",tt="new-cookie-storage-activated",nt="serialized-isNewCookieStorageEnabled";function ot(e){if(!o())try{var t,n;return null===(t=document.querySelector(`meta[name="${e}"]`))||void 0===t||null===(n=t.getAttribute("content"))||void 0===n?void 0:n.trim()}catch{return}}function rt(e){const t=ot(e);if(t)try{const e=JSON.parse(t);return"string"==typeof e?e.trim():void 0}catch{return}}function it(e){if(!o())try{var t,n;const o=null===(t=document.querySelector(`meta[name="${e}"]`))||void 0===t||null===(n=t.getAttribute("data-expiration"))||void 0===n?void 0:n.trim();if(!o)return;const r=Number(o);return Number.isFinite(r)?r:void 0}catch{return}}function at(e){const t=rt(`${e}Expiration`);if(!t)return;const n=Number(t);return Number.isFinite(n)?n:void 0}function st(e){return void 0!==e&&Date.now()>e}function ct(e){const t=ot(e);if(!t)return!1;const n=t.replace(/^"(.*)"$/,"$1").toLowerCase();return"true"===n||"t"===n}function ut(){return ct(tt)}function lt(){return ct(nt)}function dt(e){return void 0===ot(e)?null:ct(e)}function ft(e,t){if(lt()){const e=me(rt(t));if(e&&!st(at(t)))return e}if(ut()){const t=me(ot(e));if(t&&!st(it(e)))return t}}function pt(){return ft(ze,Qe)}function _t(){return ft(Je,Xe)}function vt(e){if(lt())return function(e){const t=ot(e);
1if(t)try{const e=JSON.parse(t);return"boolean"==typeof e?e:void 0}catch{return}}(e)}function ht(){return vt(Ze)}function yt(){return vt(et)}const mt={value:void 0,placeholder:!1,disallowed:!1,source:void 0,duplicated:!1,bothConventions:!1};function gt(e,t){if(e)return e===ve?{value:void 0,placeholder:!0,disallowed:!1,source:t}:e===he?{value:void 0,placeholder:!1,disallowed:!0,source:t}:{value:ye(e)?e:void 0,placeholder:!1,disallowed:!1,source:t}}function Et(e){if(o())return 0;try{return document.querySelectorAll(`meta[name="${e}"]`).length}catch{return 0}}function Tt(e,t){var n,o;let r=null!==(n=null!==(o=gt(rt(t),"c1"))&&void 0!==o?o:gt(ot(e),"sfr"))&&void 0!==n?n:mt;return st("c1"===r.source?at(t):"sfr"===r.source?it(e):void 0)&&(r=mt),{...r,duplicated:Et(e)>1||Et(t)>1,bothConventions:!!ot(e)&&!!ot(t)}}class St{constructor(){if(this.endpoint="https://otlp-http-production.shopifysvc.com/v1/metrics",this.serviceName="consent-tracking-api",this.scopeName="consent-tracking-api-opentelemetry",St.instance)return St.instance;St.instance=this}increment(e,t={}){if(!o()&&e)try{const n=this.buildMetricBody(e,t);if(window.location.host.endsWith("spin.dev"))return void console.log("OpenTelemetry metric from consent API:",n);if("function"!=typeof fetch)return;return fetch(this.endpoint,{headers:{accept:"*/*","content-type":"application/json; charset=utf-8"},body:JSON.stringify(n),method:"POST",mode:"cors",credentials:"omit"}).catch((()=>{}))}catch(e){}}buildMetricBody(e,t){const n=1e6*Date.now();return{resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:this.serviceName}}]},scopeMetrics:[{scope:{name:this.scopeName,version:"1.0.0",attributes:[]},metrics:[{name:e,unit:"1",sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[{asDouble:1,startTimeUnixNano:n,timeUnixNano:n,attributes:At(t)}]}}]}]}]}}}function At(e){return Object.keys(e).reduce(((t,n)=>{const o=e[n];return null==o||t.push({key:n,value:Ct(o)}),t}),[])}function Ct(e){return"string"==typeof e?{stringValue:e}:"boolean"==typeof e?{boolValue:e}:isFinite(e)?Math.floor(e)===e?{intValue:e}:{doubleValue:e}:{stringValue:String(e)}}St.instance=void 0;const kt=new St,wt=.01,It="debug_token_source_instrumentation_force";function bt(e,t){try{const n=function(){try{return window.location.href.includes(It)}catch{return!1}}();if(!n&&Math.random()>=wt)return;const o={token:"_shopify_y"===e?"unique":"visit",source:t,forced:n,sample_rate:wt};n&&console.log("consent_tracking_api_tracking_token_read",o),kt.increment("consent_tracking_api_tracking_token_read",o)}catch{}}const Nt="query { consentManagement { cookies(visitorConsent:{}) { cookieDomain } } }",Ot="unstable",Pt="X-Shopify-UniqueToken",Rt="X-Shopify-VisitToken",Dt=.01;async function Mt(e){try{var t;if(n=Dt,!(Math.random()<n))return;let o=null;if(e)try{const t=await e.json();o=Array.isArray(null==t?void 0:t.errors)&&t.errors.length>0}catch{}!function(e,t,n){(new N).produce("persistOutcome",JSON.stringify({ok:e,status:t,graphqlErrors:n,sampleRate:Dt}))}(!(null==e||!e.ok),null!==(t=null==e?void 0:e.status)&&void 0!==t?t:null,o)}catch{}var n}function Lt(e,t){if(!o())try{const n=me(e),o=me(t);if(!n&&!o)return;const r=function(){const e=document.querySelector('[data-serialized-id="app-base-path"]');if(_()||e){var t;const n=document.querySelector('[data-serialized-id="preview-mode-data"]');if("/"!==JSON.parse((null==e?void 0:e.textContent)||"null")||!1!==(null===(t=JSON.parse((null==n?void 0:n.textContent)||"null"))||void 0===t?void 0:t.inPreviewMode))return;return new URL("/customer/api/unstable/graphql",window.location.origin).href}const{protocol:n,host:o}=function(){const e=O().consentDomain||window.location.host;return{protocol:/^(localhost|127\.0\.0\.1)(:|$)/.test(e)?"http:":"https:",host:e}}();return`${n}//${o}/api/${Ot}/graphql.json`}();if(!r)return;const i=new URLSearchParams,a={"content-type":"application/json"};n&&(i.set("_y",n),a[Pt]=n),o&&(i.set("_s",o),a[Rt]=o);const s=`${r}?${i.toString()}`;let c;try{c=fetch(s,{headers:a,body:JSON.stringify({query:Nt,variables:{}}),method:"POST",mode:"cors",credentials:"include"})}catch(e){c=Promise.reject(e)}c.then((e=>Mt(e)),(()=>Mt(void 0)))}catch{}}const xt={};function Ut(e){try{var t,n;const i=null===(t=performance)||void 0===t||null===(n=t.getEntriesByType)||void 0===n?void 0:n.call(t,"resource");if(!i)return;const a=window.location.host;for(let t=i.length-1;t>=0;t--){var o,r;const n=i[t];if(!R(n,a))continue;const s=null===(o=n.serverTiming)||void 0===o||null===(r=o.find((t=>t.name===e)))||void 0===r?void 0:r.description;if(s)return s}return}catch{return}}function Ft(e){try{var t,n,o,r;return null===(t=document.cookie)||void 0===t||null===(n=t.split(";"))||void 0===n||null===(o=n.find((t=>t.trim().startsWith(`${e}=`))))||void 0===o||null===(r=o.split("=")[1])||void 0===r?void 0:r.trim()}catch{return}}function Vt(e){if(V()){const t=function(e){const t=Ut(e);return t&&(xt[e]=t),t}(e);if(t)return{value:t,source:"resource"};const n=xt[e];if(n)return{value:n,source:"cache"}}const t=function(e){try{var t,n,o,r;return null===(t=performance)||void 0===t||null===(n=t.getEntriesByType("navigation")[0])||void 0===n||null===(o=n.serverTiming)||void 0===o||null===(r=o.find((t=>t.name==e)))||void 0===r?void 0:r.description}catch{return}}(e);return t?{value:t,source:"navigation"}:{value:void 0,source:null}}function jt(e,t,{generateFallback:n=!1,tag:r="unknown"}={}){if(n&&o())throw new Error("Token generateFallback is not supported in Node.js environments, just browsers.");if(!ce()&&!ue())return;const i=function(e){var t,n,o,r,i,a;const s=f();if(!s)return;const c=null===(t=s.Shopify)||void 0===t||null===(n=t.customerPrivacy)||void 0===n||null===(o=n.cachedToken)||void 0===o?void 0:o[e],u=null===(r=s.Shopify)||void 0===r||null===(i=r.customerPrivacy)||void 0===i||null===(a=i.cachedToken)||void 0===a?void 0:a[e+"_expires_at"];return!c||!u||u<(new Date).getTime()?void 0:me(c)}(e);if(i)return bt(e,"window_cache"),i;const a=f();if(function(e){if(!e)return!1;try{const t=Object(e);return Reflect.has(t,"trackingUnique")||Reflect.has(t,"trackingVisit")}catch{return!1}}(null==a?void 0:a.ShopPay)){const t=function(e){const t=f();if(!t||!t.ShopPay)return;const n={_shopify_y:"trackingUnique",_shopify_s:"trackingVisit"}[e];return n?me(t.ShopPay[n]):void 0}(e);return bt(e,"shop_pay"),t}const s=t();if(s)return bt(e,"meta"),s;const c=function(e){const t=e.replace("_shopify",""),n=Vt(t),o=Number(Vt(`${t}e`).value);if(!o||Date.now()/1e3<o){const t=me(n.value);return t&&bt(e,n.source?`server_timing_${n.source}`:"server_timing_unknown"),t}}(e);if(c)return c;const u=me(Ft(e));if(u)return bt(e,"cookie"),u;bt(e,"missing");try{if(!n)return;if(!0===O().asyncConsent&&"loaded"!==Y())return;!function(e,t=!1,n="unknown"){var o,r;kt.increment("consent_tracking_api_tracking_token_missing");const i=f();(new N).produce("trackingTokenMissing",JSON.stringify({token:e,hasTrekkie:!(null==i||!i.ShopifyAnalytics),hasTheme:!(null==i||null===(o=i.Shopify)||void 0===o||!o.theme),domain:null==i||null===(r=i.location)||void 0===r?void 0:r.hostname,fallbackRequested:t,tag:n}))}(e,n,r);const t=Kt()?void 0:Te(),o=Bt()?void 0:Te();
1return t&&ke("_shopify_y",t),o&&ke("_shopify_s",o),Lt(t,o),"_shopify_y"===e?t:o}catch{}}function Kt({generateFallback:e=!1,tag:t="unknown"}={}){return jt("_shopify_y",pt,{generateFallback:e,tag:t})}function Bt({generateFallback:e=!1,tag:t="unknown"}={}){return jt("_shopify_s",_t,{generateFallback:e,tag:t})}function Gt(e){return Ft("y"===e?"_shopify_y":"_shopify_s")}function Ht(e){return(...t)=>{try{return e(...t)}catch(e){throw e instanceof h||function(e,t,n){try{var o;!function(e){const t=new XMLHttpRequest;t.open("POST","https://error-analytics-production.shopifysvc.com",!0),t.setRequestHeader("Content-Type","application/json"),t.setRequestHeader("Bugsnag-Api-Key","95ba910bcec4542ef2a0b64cd7ca666c"),t.setRequestHeader("Bugsnag-Payload-Version","5");const n=function(e){var t;const n=function(e){return e?e.stackTrace||e.stack||e.description||e.name:void 0}(e.error);let o,r;if(null!==(t=e.error)&&void 0!==t&&t.name){var i,a;o=e.error.name,r=null!==(i=null===(a=e.error)||void 0===a?void 0:a.message)&&void 0!==i?i:""}else{const t=(n||"unknown error").split("\n")[0],i=t.indexOf(":");var s,c,u;i>0?(o=t.substring(0,i).trim(),r=t.substring(i+1).trim()):(o=t.trim()||"unknown error",r=(null===(s=e.error)||void 0===s?void 0:s.message)||(null===(c=e.error)||void 0===c?void 0:c.error)||(null===(u=e.error)||void 0===u?void 0:u.toString())||"No error message available")}return JSON.stringify({payloadVersion:5,notifier:{name:"ConsentTrackingAPI",version:"latest",url:"-"},events:[{exceptions:[{errorClass:o,message:r,stacktrace:[{file:"consent-tracking-api.js",lineNumber:"1",method:n}],type:"browserjs"}],context:e.context||"general",app:{id:"ConsentTrackingAPI",version:"latest"},metaData:{request:{shopId:e.shopId,shopUrl:window.location.href},device:{userAgent:window.navigator.userAgent},"Additional Notes":e.notes},unhandled:!1}]})}(e);t.send(n)}({error:e,context:null!=t?t:"",shopId:qt()||(null===(o=window.Shopify)||void 0===o?void 0:o.shop),notes:null!=n?n:""})}catch(e){}}(e),e}}}function qt(){try{var e;const t=null===(e=document.getElementById("shopify-features"))||void 0===e?void 0:e.textContent;return t?JSON.parse(t).shopId:null}catch(e){return null}}function Yt(){return ue()}function $t(){return ce()}function Wt(){return se()}function zt(){return le()}const Jt=({useBugsnagReporting:e})=>{te()!=T.DECLINED&&!1===Ke()&&xe({sale_of_data:!1},(()=>!1));const t={analyticsProcessingAllowed:ce,currentVisitorConsent:$e,doesMerchantSupportGranularConsent:He,firstPartyMarketingAllowed:Yt,getCCPAConsent:Ge,getRegion:Fe,getTrackingConsent:Ue,getTrackingConsentMetafield:qe,marketingAllowed:Yt,preferencesProcessingAllowed:se,saleOfDataAllowed:zt,saleOfDataRegion:fe,setTrackingConsent:xe,shouldShowBanner:de,shouldShowGDPRBanner:Be,thirdPartyMarketingAllowed:zt,userCanBeTracked:je,consentId:We,unstable:{},__internal:{uniqueToken:Kt,visitToken:Bt},__metadata__:{name:"@shopify/consent-tracking-api",version:pe,description:"Shopify Consent Tracking API"},config:O()};if(!e)return t;const n=t;for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];"function"==typeof t&&(n[e]=Ht(t))}return t};function Qt(e={useBugsnagReporting:!1}){return Jt(e)}const Xt=.01,Zt=.001;let en=!1;function tn(e,t){return!!e&&!!t}function nn(){try{return performance.now()}catch{return 0}}function on(){try{return window.__st.reqid}catch{return null}}function rn(){const e=function(){try{const e=on();if(!e)return null;const t=1e3*parseInt(e.split("-").slice(-1)[0],10);return Number.isFinite(t)?t:null}catch{return null}}();return e?(Date.now()-e)/1e3:null}function an(){try{const e=navigator.userAgent;return!e||""===e.trim()||!0===navigator.webdriver||/bot|crawl|curl|email|feed|fetch|googleother|headless|index|link|monitoring|robot|rss|scan|search|spider/i.test(e)}catch{return null}}const sn=/^https:\/\/shopify\.com\/\d+\/account\/?/i,cn=/^https:\/\/shopify\..*?\.shop\.dev\/\d+\/account\/?/i,un=/^https:\/\/account\..*/i;function ln(e){return function(){try{var e;const t=window.location.href;return sn.test(t)||cn.test(t)||un.test(t)||(null===(e=window)||void 0===e?void 0:e.__CUSTOMER_ACCOUNT__)||null!==document.querySelector('[data-serialized-id="app-base-path"]')}catch{return!1}}()?"accounts":e.source||null}function dn(e,t,n){var r,i;const a=n.value,s=t.value,c=me(s);return{hasCookie:!!e,cookieValid:e?!!me(e):null,hasServerTiming:!!c,serverTimingDisallowed:(null==s?void 0:s.trim())===he,serverTimingSource:t.source,hasMeta:!!a,metaDuplicated:n.duplicated,bothConventions:n.bothConventions,metaPlaceholder:n.placeholder,metaDisallowed:n.disallowed,metaSource:ln(n),cookieMatchesMeta:tn(e,a)?e===a:null,cookieMatchesServerTiming:tn(e,c)?e===c:null,metaMatchesServerTiming:tn(a,c)?a===c:null,cookieValue:e,metaValue:a,serverTimingValue:c,performanceNow:o()?0:nn(),htmlAgeSeconds:o()?null:rn(),requestId:on(),consentWasCollected:!(null===(r=window.Shopify)||void 0===r||null===(i=r.customerPrivacy)||void 0===i||!i.cachedConsent),isBot:an()}}function fn(e){return e.hasCookie||e.hasServerTiming||e.serverTimingDisallowed||null!==e.metaSource}function pn(e){return e.hasServerTiming||e.serverTimingDisallowed||null!==e.metaSource}function _n(){try{const e=new URLSearchParams(window.location.search);return e.has("_y")||e.has("_s")}
1catch{return!1}}function vn(){try{var e,t,n;return null!==(e=null===(t=performance)||void 0===t||null===(n=t.getEntriesByType("navigation")[0])||void 0===n?void 0:n.type)&&void 0!==e?e:null}catch{return null}}function hn(){try{var e,t;const o=dn(Gt("y"),Vt("_y"),Tt(ze,Qe)),r=dn(Gt("s"),Vt("_s"),Tt(Je,Xe));if(!fn(o)&&!fn(r))return;const i=pn(o)||pn(r),a=i?Xt:Zt;if(n=a,!(Math.random()<n))return;(new N).produce("trackingTokenParity",JSON.stringify({gateActive:ut()||lt(),gateSfr:dt(tt),gateC1:dt(nt),navigationType:vn(),urlTokenOverride:_n(),readyStateAtEmit:document.readyState,serverTimingSupported:v(),consentStored:!ne(),analyticsAllowed:ce(),controlSample:!i,sampleRate:a,hasTheme:null===(e=window)||void 0===e||null===(t=e.Shopify)||void 0===t?void 0:t.theme,href:window.location.href,y:o,s:r}))}catch{}var n}function yn(){var e;o()||en||(en=!0,e=hn,"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>e()),{once:!0}):e()))}const mn=.01,gn=3,En="shopifyCustomerPrivacyApiLoaded";let Tn,Sn=!1,An=!1;function Cn(e,t){var n,o;const r=null==e?void 0:e.split(",").find((e=>e.trim().split(";",1)[0]===`_${t}`)),i=null==r?void 0:r.match(/;\s*desc\s*=\s*(?:"([^"]*)"|([^;,\s]*))/i),a=null===(n=null!==(o=null==i?void 0:i[1])&&void 0!==o?o:null==i?void 0:i[2])||void 0===n?void 0:n.trim(),s=void 0!==r,c=!!me(a),u=a===he;return{present:s,available:c,disallowed:u,invalid:s&&!c&&!u}}function kn(e,t){var n,o;const r=Vt("y"===e?"_y":"_s"),i=null===(n=r.value)||void 0===n?void 0:n.trim(),a=!!me(i),s=i===he;return{available:!!me("y"===e?Kt():Bt()),serverTimingAvailable:a,serverTimingDisallowed:s,serverTimingInvalid:void 0!==i&&!a&&!s,serverTimingSource:r.source,responseHeader:null!==(o=null==t?void 0:t[e])&&void 0!==o?o:null}}function wn(e=null){return{y:kn("y",e),s:kn("s",e)}}function In(e){const t=null==e?void 0:e.statusCode;return"number"==typeof t?t:null}function bn(e){var t;const n=null===(t=Ut(e))||void 0===t?void 0:t.trim(),o=!!me(n),r=n===he;return{present:void 0!==n,available:o,disallowed:r,invalid:void 0!==n&&!o&&!r}}function Nn(){try{var e,t,n,o;return null!==(e=null===(t=performance)||void 0===t||null===(n=t.getEntriesByType)||void 0===n||null===(o=n.call(t,"resource"))||void 0===o?void 0:o.length)&&void 0!==e?e:null}catch{return null}}function On(e,t=null){try{(new N).produce("hydrogenVisitorState",JSON.stringify({...e,after:wn(t),isBot:an(),serverTimingSupported:v(),requestId:on(),htmlAgeSeconds:rn(),resourceScanEnabled:V(),resourceUngated:{y:bn("_y"),s:bn("_s"),cmpPresent:void 0!==Ut("_cmp")},navigationYPresent:Pn("_y"),navigationSPresent:Pn("_s"),navigationCmpPresent:Pn("_cmp"),resourceEntryCount:Nn(),schemaVersion:gn,sampleRate:mn}))}catch{}}function Pn(e){try{var t,n,o;const r=null===(t=performance)||void 0===t||null===(n=t.getEntriesByType)||void 0===n?void 0:n.call(t,"navigation")[0];return!(null==r||null===(o=r.serverTiming)||void 0===o||!o.some((t=>t.name===e)))}catch{return!1}}function Rn(){if(!An){An=!0;try{if(!0===O().asyncConsent)return;if(Math.random()>=mn)return;On({generation:"classic",flow:Pn("_server_tracking")?"classic_server_forwarded":Pn("_sfapi_proxy")?"classic_browser_fetch":"classic_no_fetch",requestOk:null,status:null,before:null})}catch{return}}}function Dn(){if(!o()&&!Sn)try{document.addEventListener(En,Rn),Sn=!0}catch{return}}function Mn(){const e=Kt(),t=Bt();return{...e?{"X-Shopify-UniqueToken":e}:{},...t?{"X-Shopify-VisitToken":t}:{}}}function Ln(){if(o())return;if(Tn)return Tn;const e=Y();if("loading"===e)return;if("loaded"===e)return;if(!ne())return void $("loaded");if(!0!==O().asyncConsent)return;$("loading");const t=function(){const e=function(){try{if(!function(){const e=O();if(!0!==e.asyncConsent||!F())return!1;try{const t=e.consentDomain||window.location.host,n=/^(localhost|127\.0\.0\.1)(:|$)/.test(t)?"http:":"https:";return new URL(`${n}//${t}`).origin===window.location.origin}catch{return!1}}())return;if(Math.random()>=mn)return;const e=wn();let t=null,n=!1;return{observeResponse(e){t=function(e){try{const t=e.headers.get("server-timing");return{y:Cn(t,"y"),s:Cn(t,"s")}}catch{return null}}(e)},report(o,r){if(!n){n=!0;try{On({generation:"new",flow:"cta_initialize",requestOk:o,status:In(r),before:e},t)}catch{}}}}}catch{return}}();return Pe(0,{granular_consent:{}},void 0,{emitEvents:!1,getVisitorTokenHeaders:F()?Mn:void 0,onResponse:t=>null==e?void 0:e.observeResponse(t)}).then((()=>{null==e||e.report(!0)}),(t=>{throw null==e||e.report(!1,t),t}))}().then((()=>{$("loaded")}));return Tn=t,t.then((()=>{Tn===t&&(Tn=void 0)}),(()=>{"loading"===Y()&&$(void 0),Tn===t&&(Tn=void 0)})),t}const xn=.01,Un="debug_server_timing_instrumentation_hydrogen_force";function Fn(){try{return window.location.href.includes(Un)}catch{return!1}}const Vn="shopifyCustomerPrivacyApiLoaded",jn=/^https:\/\/monorail-edge\.shopifysvc\.com\/(?:unstable|v1)\/produce_batch(?:$|\?)/,Kn=/^https?:\/\/[^/]+\/\.well-known\/shopify\/monorail\/(?:unstable|v1)\/produce_batch(?:$|\?)/;let Bn,Gn=!1,Hn=!1,qn=!1;function Yn(e){var t;const n=Gt(e),o=null===(t=M("y"===e?"_y":"_s"))||void 0===t?void 0:t.trim(),r
1=me(o),i=o===he;return{hasCookie:!!n,cookieValid:n?!!me(n):null,hasServerTiming:!!r,serverTimingDisallowed:i,serverTimingInvalid:void 0!==o&&!r&&!i,cookieMatchesServerTiming:n&&r?n===r:null,cookieValue:n,serverTimingValue:r}}function $n(e,t,n){if(!qn){qn=!0;try{var o,r;const i=f(),a=Fn(),s=JSON.stringify({generation:e,endpoint:t,analyticsFetchStart:n.startTime,analyticsFetchEnd:n.responseEnd,y:Yn("y"),s:Yn("s"),analyticsAllowed:ce(),consentStored:!ne(),serverTimingSupported:v(),isBot:an(),requestId:on(),htmlAgeSeconds:rn(),isHeadless:null!==(o=O().isHeadless)&&void 0!==o?o:null,hasTheme:!(null==i||null===(r=i.Shopify)||void 0===r||!r.theme),hasTrekkie:!(null==i||!i.ShopifyAnalytics),forced:a,sampleRate:xn});a&&console.log("hydrogenAnalyticsTokenState",s),(new N).produce("hydrogenAnalyticsTokenState",s)}catch{}}}function Wn(e){if(!Hn){Hn=!0;try{if("undefined"==typeof PerformanceObserver)return;Bn=new PerformanceObserver((t=>{try{for(const r of t.getEntries()){var n;const t=r;if("fetch"!==t.initiatorType)continue;const i=(o=t.name,jn.test(o)?"monorail_edge":Kn.test(o)?"shop_domain":null);if(i)return null===(n=Bn)||void 0===n||n.disconnect(),void $n(e,i,t)}}catch{return}var o})),Bn.observe({type:"resource",buffered:!0})}catch{return}}}function zn(){Wn("classic")}function Jn(){if(!o()&&!Gn){Gn=!0;try{if(!Fn()&&Math.random()>=xn)return;if(!0===O().asyncConsent)return void Wn("new");document.addEventListener(Vn,zn,{once:!0})}catch{return}}}const Qn="p";function Xn(e){try{return l(e.version)===Qn}catch{return!1}}function Zn(e){var t;if(!e)return;if("p"!==String.fromCharCode(null==e||null===(t=e.version)||void 0===t?void 0:t[0]))return;let n="",o="";const r=e.analyticsAllowed?"A":"a",i=e.preferencesAllowed?"P":"p",a=e.marketingAllowed?"M":"m",s=e.saleOfDataAllowed?"S":"s";function c(e){return!0===e?"t":!1===e?"f":""}0===e.analyticsConsent?n+=r:o+=r,0===e.marketingConsent?n+=a:o+=a,0===e.preferencesConsent?n+=i:o+=i,0===e.saleOfDataConsent?n+=s:o+=s;let u=`3${o}.${n}_${l(e.region)}_${c(e.shouldShowBanner)}_${c(e.saleOfDataRegion)}_${d(e.consentId)||""}_${0===Object.keys(e.metafields).length?"":JSON.stringify(e.metafields)}`;return u=u.replace(/_*$/,""),u}!function(){try{var e,t,n,r,i;if(o()||p())return;if("function"!=typeof(null===(e=performance)||void 0===e?void 0:e.setResourceTimingBufferSize))return;if((null!==(t=null===(n=(r=performance).getEntriesByType)||void 0===n||null===(i=n.call(r,"resource"))||void 0===i?void 0:i.length)&&void 0!==t?t:0)>=1e3)return;performance.setResourceTimingBufferSize(1e3)}catch{}}()},9671:function(e,t,n){n.r(t),n.d(t,{setupEventIdService:function(){return p}});const o="sh",r="shu",i=["page_viewed","collection_viewed","product_viewed","search_submitted","product_added_to_cart","product_added_to_cart_next","checkout_started","checkout_completed","payment_info_submitted","checkout_contact_step_started","checkout_contact_info_submitted","checkout_address_info_submitted","checkout_shipping_step_started","checkout_shipping_info_submitted","checkout_payment_step_started","session_started"],a="wpm",s="trekkie",c="trekkie-next",u="trekkie-parity";let l,d;function f(e){return`${e||o}-${function(){const e="xxxx-4xxx-xxxx-xxxxxxxxxxxx";let t="";try{const n=window.crypto,o=new Uint16Array(31);n.getRandomValues(o);let r=0;t=e.replace(/[x]/g,(e=>{const t=o[r];if("number"!=typeof t)throw new Error(`Event ID service: Invalid random number at index "${r}".`);const n=t%16;return r++,("x"===e?n:3&n|8).toString(16)})).toUpperCase()}catch{t=e.replace(/[x]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})).toUpperCase()}return`${function(){let e=0,t=0;e=(new Date).getTime()>>>0;try{t=performance.now()>>>0}catch{t=0}return Math.abs(e+t).toString(16).toLowerCase().padStart(8,"0")}()}-${t}`}()}`}function p(){window.Shopify=window.Shopify||{},!window.Shopify.evids&&(l={},d={[a]:{},[s]:{},[c]:{},[u]:{}},window.Shopify.evids=(...e)=>function(e,t){if(!function(e){return i.includes(e)}(e)||(null==t?void 0:t.analyticsFramework)!==s&&(null==t?void 0:t.analyticsFramework)!==a&&(null==t?void 0:t.analyticsFramework)!==c&&(null==t?void 0:t.analyticsFramework)!==u)return f(r);const n=function(e){return"string"==typeof e&&e?e:"default"}(t.cacheKey),o=function(e,t,n){const o=d[t],r=o[e]??(o[e]={}),i=r[n];return r[n]="number"==typeof i?i+1:0}(e,t.analyticsFramework,n);return function(e,t,n){const o=l[e]??(l[e]={}),r=o[n]??[];let i=r[t];
1return i||(i=f(),r.push(i)),o[n]=r,i}(e,o,n)}(...e))}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e,t=n(1074),o=n(1037),r=n(357),i="trekkie",a=[],s=n(2319);a.push(["Trekkie",s.Trekkie]);var c=n(3988);a.push(["S2S",c.S2S]);try{var u=null===(e=window[i])||void 0===e?void 0:e.config;if(u){o.setGlobalSerializedAppConfig(JSON.stringify(u));var l=window[i],d=window.trekkie=new t.Tricorder(a,u,(function(){window[i]=d,window._visit={tag:function(){},multitrackToken:function(){r.default.uniqToken}},d.user=function(){return{traits:function(){return{uniqToken:r.default.uniqToken}}}},t.replayAnalyticsQueue(d,l)}))}}catch(e){o.reportError("index_storefront",e)}}()}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.