1!function(){var t=function(t){var e={exports:{}};return t.call(e.exports,e,e.exports),e.exports},e=(window,function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()),n=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},r=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=function(t){return t&&t.__esModule?t:{"default":t}},s=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n};(function(){this.ScriptLoader=function(){function t(){}return t.lazyLoad=function(t,e,n){var r;return r=document.querySelector("."+e),null!=r?n():(r=document.createElement("script"),r.async=!0,r.onload=n,r.src=t,r.className=e,void document.getElementsByTagName("head")[0].appendChild(r))},t}()}).call(this),function(){var t;this.AmazonPayments={metadataTag:function(){return document.getElementById("amazon-payments-metadata")},metadata:function(t){return AmazonPayments.metadataTag().getAttribute("data-amazon-payments-"+t)},withinFlow:function(){return null!=AmazonPayments.metadataTag()},sellerId:function(){return AmazonPayments.metadata("seller-id")},language:function(){return AmazonPayments.metadata("language")},authorize:function(){var t,e;return t=AmazonPayments.metadata("callback-url"),e={popup:!1,scope:"payments:widget payments:shipping_address"},amazon.Login.authorize(e,t)}},t=function(){function t(){}return t.prototype.assign=function(t){return this.flow=this[t]},t.prototype.execute=function(t){return this.flow.call(this,t)},t.prototype.checkout=function(t){return AmazonPayments.authorize()},t.prototype.cart=function(t){var e;return e=document.createElement("input"),e.type="hidden",e.name="goto_amazon_payments",e.value="amazon_payments",t.parentElement.appendChild(e),e.form.submit()},t}(),this.amazonPaymentsButtonHandler=new t,this.AmazonPaymentsPayButton=function(){var t,e;if(AmazonPayments.withinFlow())return e=AmazonPayments.metadata("widget-library-url"),t="amazon-payments-widget-library",ScriptLoader.lazyLoad(e,t,function(){var t,e,n,r,i;for(e=document.getElementsByClassName("amazon-payments-pay-button"),i=[],n=0,r=e.length;r>n;n++)t=e[n],"true"!==t.getAttribute("data-amazon-payments-pay-button")&&(OffAmazonPayments.Button(t.id,AmazonPayments.sellerId(),{type:"PwA",size:"small",language:AmazonPayments.language(),authorization:function(){return amazonPaymentsButtonHandler.execute(t)},onError:function(t){return"undefined"!=typeof console&&null!==console?console.error(t.getErrorCode()+": "+t.getErrorMessage()):void 0}}),t.setAttribute("data-amazon-payments-pay-button","true"),i.push($(t).find("img:not(.alt-payment-list__item__logo)").addClass("alt-payment-list-amazon-button-image")));return i})}}.call(this);var u=(t(function(t,e){"use strict";window.amazonPaymentsButtonHandler.assign("cart"),window.onAmazonLoginReady=function(){amazon.Login.setSandboxMode(JSON.parse(AmazonPayments.metadata("sandbox-mode"))),amazon.Login.setClientId(AmazonPayments.metadata("client-id")),amazon.Login.setRegion(AmazonPayments.metadata("region")),amazon.Login.setUseCookie(!0),AmazonPaymentsPayButton()}}),t(function(t,e){"use strict";function n(t){var e=document.createElement("input");e.setAttribute("type","hidden"),e.setAttribute("name","clear_cart"),e.setAttribute("value","true"),t.appendChild(e);var n=t.elements.quantity,r=t.elements.id,i=document.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("name","updates["+r.value+"]"),i.setAttribute("value",n?n.value:1),t.appendChild(i),t.setAttribute("action","/checkout"),window.ShopifyAnalytics.lib.track("Buy Now Button"),t.submit()}function r(){var t=document.getElementById("buy-now-button--checkout");if(t){for(var e=void 0,r=document.forms,i=0;i<r.length;i++)if(document.forms[i].action&&-1!==r[i].action.indexOf("cart/add")){e=r[i];break}
1e&&e.elements.id&&(t.style.display="inline-block",t.onclick=function(t){t.preventDefault?t.preventDefault():t.returnValue=!1,t.preventDefault(),n(e)})}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r,window.Shopify=window.Shopify||{},Shopify.StorefrontExpressButtons=Shopify.StorefrontExpressButtons||{},Shopify.StorefrontExpressButtons.ExpressCheckout={initialize:r}}),t(function(t,e){"use strict";function n(t){"loading"!==document.readyState?t():document.addEventListener?document.addEventListener("DOMContentLoaded",t):document.attachEvent("onreadystatechange",function(){"loading"!==document.readyState&&t()})}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n})),l=t(function(t,e){"use strict";function n(t){var e={city:t.locality,province_code:t.administrativeArea,zip:t.postalCode};t.countryCode?e.country_code=t.countryCode.toLowerCase():t.country&&(e.country=t.country.toLowerCase(),"usa"===e.country&&(e.country="united states")),t.givenName&&(e.first_name=t.givenName),t.familyName&&(e.last_name=t.familyName),t.phoneNumber&&(e.phone=t.phoneNumber);var n=t.addressLines;return n&&n.length&&(e.address1=n[0],n[1]&&(e.address2=n[1])),s(e)}function r(t,e){return{type:"final",label:e,amount:t.total_price}}function i(t){var e=[{type:"final",label:"Subtotal",amount:c(t)}];return t.shipping_line&&(e=e.concat([{type:"final",label:"Shipping",amount:t.shipping_line.price}])),t.total_tax&&(e=e.concat([{type:"final",label:"Estimated Tax",amount:t.total_tax}])),t.applied_discount&&(e=e.concat([{type:"final",label:"Discount",amount:-t.applied_discount.amount}])),e}function o(t){return a(t).map(l)}function a(t){return[].concat(t).sort(u)}function s(t){var e=t.country_code,n=t.country,r=t.zip,i={};return d.test(r)&&(("ca"===e||"canada"===n)&&(i.zip=r.trim()+" 0Z0"),"gb"===e&&(i.zip=r.trim()+" 0ZZ")),Object.assign({},t,i)}function u(t,e){var n=parseFloat(t.price),r=parseFloat(e.price);return r>n?-1:n>r?1:0}function l(t){return{identifier:t.id,label:t.title,detail:"",amount:t.price}}function c(t){return(t.line_items||[]).reduce(function(t,e){return t+e.quantity*e.price},0)}Object.defineProperty(e,"__esModule",{value:!0}),e.addressFromEvent=n,e.totalFromCheckout=r,e.lineItemsFromCheckout=i,e.transformedShippingRates=o,e.sortShippingRates=a;var d=/^[a-z0-9]{2,4}\s?$/i}),c=t(function(t,r){"use strict";function i(){var t=new Uint8Array(32);return window.crypto.getRandomValues(t),t.map(function(t){return t.toString(16)}).join("")}function o(t){return t.response&&422===t.response.status?ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS:ApplePaySession.STATUS_FAILURE}function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.checkout||t;return e.billing_address?ApplePaySession.STATUS_INVALID_BILLING_POSTAL_ADDRESS:e.shipping_address?ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS:ApplePaySession.STATUS_FAILURE}Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function t(e){var r=e.apiClient,o=e.sessionToken,a=e.merchantName,s=e.session,u=e.strategy;if(n(this,t),this.apiClient=r,this.strategy=u,this._sessionToken=o||i(),this._merchantName=a,this._session=s,!u)throw new Error("`strategy` must be supplied to ShopifyApplePaySession");this._session.oncancel=this._trackCallback("cancelled",this._onCancel).bind(this),this._session.onvalidatemerchant=this._trackCallback("merchant validated",this._onValidateMerchant.bind(this)),this._session.onshippingcontactselected=this._trackCallback("shipping contact selected",this._onShippingContactSelected).bind(this),this._session.onshippingmethodselected=this._trackCallback("shipping method selected",this._onShippingMethodSelected).bind(this),this._session.onpaymentauthorized=this._trackCallback("payment authorized",this._onPaymentAuthorized).bind(this),this._session.onpaymentmethodselected=this._trackCallback("payment method selected",this._onPaymentMethodSelected).bind(this)}return e(t,[{key:"begin",value:function(){this._session.begin()}},{key:"_onCancel",value:function(){return this.apiClient.stopPolling(),Promise.resolve()}},{key:"_onValidateMerchant",value:function(t){var e=this,n=t.validationURL,r={domain:window.location.hostname,id:this._sessionToken,validation_url:n};return this.strategy.build().then(function(t){return e.checkout=t}).then(function(){return e.apiClient.post("/apple_pay/sessions",r)}).then(function(t){var n=t.body;return e._session.completeMerchantValidation(n)})["catch"](function(){return e._session.abort()})}},{key:"_onShippingContactSelected",value:function(t){var e=this,n={partial_addresses:!0,shipping_address:l.addressFromEvent(t.shippingContact)};return this._updateCheckout(n).then(this._fetchShippingRates.bind(this)).then(this._setDefaultShippingRate.bind(this)).then(function(t){return e._session.completeShippingContactSelection(ApplePaySession.STATUS_SUCCESS,l.transformedShippingRates(e.availableShippingRates),l.totalFromCheckout(t,e._merchantName),l.lineItemsFromCheckout(t))})["catch"](function(t){return e._session.completeShippingContactSelection(o(t),[],l.totalFromCheckout(e.checkout,e._merchantName),l.lineItemsFromCheckout(e.checkout))})}},{key:"_onShippingMethodSelected",value:function(t){var e=this,n=t.shippingMethod,r={shipping_line:{handle:n.identifier}};return this._updateCheckout(r).then(function(t){return e._session.completeShippingMethodSelection(ApplePaySession.STATUS_SUCCESS,l.totalFromCheckout(t,e._merchantName),l.lineItemsFromCheckout(t))})["catch"](function(){return e._session.completeShippingMethodSelection(ApplePaySession.STATUS_FAILURE)})}},{key:"_onPaymentAuthorized",value:function(t){var e=t.payment,n=e.token.paymentData,r={email:e.billingContact.emailAddress||e.shippingContact.emailAddress,billing_address:l.addressFromEvent(e.billingContact),shipping_address:l.addressFromEvent(e.shippingContact)};if(this.checkout.requires_shipping!==!1&&!this.checkout.shipping_line)return this._session.completePayment(ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS);var o={unique_token:i(),amount:this.checkout.total_price,payment_token:{type:"apple_pay",payment_data:JSON.stringify(n)}};return this._updateCheckout(r).then(this._submitPayment.bind(this,o)).then(this._completePayment.bind(this))["catch"](this._handlePaymentError.bind(this))}},{key:"_onPaymentMethodSelected",value:function(){return this._session.completePaymentMethodSelection(l.totalFromCheckout(this.checkout,this._merchantName),l.lineItemsFromCheckout(this.checkout)),Promise.resolve()}},{key:"_fetchShippingRates",value:function(){var t=this;return this.checkout.requires_shipping===!1?(this.availableShippingRates=[],this.checkout):this.apiClient.get("/api/checkouts/"+this.checkout.token+"/shipping_rates").then(function(e){var n=e.shipping_rates;return t.availableShippingRates=l.sortShippingRates(n),t.checkout})}},{key:"_setDefaultShippingRate",value:function(){if(this.checkout.requires_shipping===!1||this.checkout.shipping_line)return this.checkout;var t=this.availableShippingRates||[],e=t[0];return e?this._updateCheckout({shipping_line:{handle:e.id}}):this.checkout}},{key:"_getCheckout",value:function(){var t=this;return this.apiClient.get("/api/checkouts/"+this.checkout.token).then(function(e){return t.checkout=e.checkout})}},{key:"_updateCheckout",value:function(t){var e=this;return this.apiClient.patch("/api/checkouts/"+this.checkout.token,{checkout:t}).then(function(t){return e.checkout=t.checkout})}},{key:"_submitPayment",value:function(t){return this.apiClient.post("/api/checkouts/"+this.checkout.token+"/payments",{payment:t})}},{key:"_completePayment",value:function(t){var e=this,n=t.payment&&t.payment.transaction;return n&&"success"!==n.status&&"pending"!==n.status?(this._session.completePayment(ApplePaySession.STATUS_FAILURE),t):this._getCheckout().then(function(n){var r=n.order;return e._session.completePayment(ApplePaySession.STATUS_SUCCESS),e._redirect(r.status_url),t})}},{key:"_handlePaymentError",value:function(t){var e=this;t&&t.response&&422===t.response.status?t.response.json().then(function(t){var e=t.errors;return a(e)}).then(function(t){return e._session.completePayment(t)})["catch"](function(){return e._session.completePayment(ApplePaySession.STATUS_FAILURE)}):this._session.completePayment(ApplePaySession.STATUS_FAILURE)}},{key:"_trackCallback",value:function(t,e){var n=this;return function(r){return e.call(n,r).then(function(){return n._track(t)})["catch"](function(t){throw t})}}},{key:"_track",value:function(t){window.ShopifyAnalytics&&ShopifyAnalytics.lib&&ShopifyAnalytics.lib.track&&ShopifyAnalytics.lib.track("Apple Pay slate - "+t,{checkoutToken:this.checkout.token})}},{key:"_redirect",value:function(t){window.location=t}}]),t}();r["default"]=s}),d=t(function(t,e){"use strict";
1Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(t){n(this,e);var r=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.response=t,r.stack=(new Error).stack,r.name=r.constructor.name,r}return r(e,t),e}(Error);e["default"]=o}),h=t(function(t,r){"use strict";function i(t){return t?JSON.parse(t):null}function a(t,e){var n=o({method:"GET"},e);return new Promise(function(e,r){var i=new XMLHttpRequest;i.open(n.method,t,!0),Object.keys(n.headers).forEach(function(t){i.setRequestHeader(t,n.headers[t])}),i.onload=function(){var t="response"in i?i.response:i.responseText;e(new u(t,i.status,i.getAllResponseHeaders()))},i.onerror=i.ontimeout=r,i.send(n.body)})}Object.defineProperty(r,"__esModule",{value:!0}),r["default"]=a;var s=function(){function t(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";n(this,t),this._headers={};var i=r.trim().split("\n");i.forEach(function(t){var n=t.trim().split(":"),r=n.shift().trim(),i=n.join(":").trim();e._headers[r]=i})}return e(t,[{key:"get",value:function(t){return this._headers[t]}}]),t}(),u=function(){function t(e,r,i){n(this,t),this.body=e,this.status=r,this.headers=new s(i),this.ok=r>=200&&300>r}return e(t,[{key:"text",value:function(){return Promise.resolve(this.body)}},{key:"json",value:function(){return this.text().then(i)}}]),t}()}),f=t(function(t,r){"use strict";function i(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{timeout:2e4},n=e.timeout,r=arguments[1];if(202!==r.status)return r;var i={method:"GET",headers:this.headers};return new Promise(function(e,o){t._pollExpiryTimeout=setTimeout(function(){clearTimeout(t._pollScheduleTimeout),o(new Error("API request polling timed out. Exceeded maximum timeout of "+n+"ms"))},n),function a(t){var n=this;202===t.status?!function(){var e=t.headers.get("Location"),r=1e3*(Number(t.headers.get("Retry-After"))||1);n._pollScheduleTimeout=setTimeout(function(){l["default"](e,i).then(a.bind(n))["catch"](o)},r)}():(clearTimeout(this._pollExpiryTimeout),e(t))}.call(t,r)})}function o(t){return 204===t.status||202===t.status?t:t.ok?t.json():Promise.reject(new u["default"](t))}function s(t){return btoa(t+":")}Object.defineProperty(r,"__esModule",{value:!0});var u=a(d),l=a(h),c=function(){function t(e){var r=e.accessToken,i=e.host;n(this,t),this.host=i,this.headers={"Content-Type":"application/json",Accept:"application/json",Authorization:"Basic "+s(r),"X-Shopify-Checkout-Version":"2016-09-06"}}return e(t,[{key:"get",value:function(t,e){return this.request("GET",t,null,e)}},{key:"post",value:function(t,e,n){return this.request("POST",t,e,n)}},{key:"patch",value:function(t,e,n){return this.request("PATCH",t,e,n)}},{key:"put",value:function(t,e,n){return this.request("PUT",t,e,n)}},{key:"stopPolling",value:function(){clearTimeout(this._pollExpiryTimeout),clearTimeout(this._pollScheduleTimeout)}},{key:"request",value:function(t,e,n,r){var a={method:t,headers:this.headers,body:n?JSON.stringify(n):null};return"/"===e[0]&&this.host&&(e="https://"+this.host+e),l["default"](e,a).then(i.bind(this,r)).then(o)}}]),t}();r["default"]=c}),p=t(function(t,e){"use strict";function n(t){var e=t.buttons,n=t.apiHost,o=t.requireActiveCard,a=s(t,["buttons","apiHost","requireActiveCard"]);if(!e||!e.length)return Promise.reject(new Error("No Apple Pay buttons provided"));var l=document.querySelector("meta[name=shopify-checkout-api-token]"),c=document.getElementById("apple-pay-shop-capabilities");if(!l)return Promise.reject(new Error("Missing public access token for Apple Pay"));if(!c)return Promise.reject(new Error("Missing shop capabilities for Apple Pay"));var h=JSON.parse(c.textContent),f=h.merchantId,p=s(h,["merchantId"]);return r(f,o).then(function(t){if(t){a.merchantName=p.merchantName;var r=l.getAttribute("content"),o=new d["default"]({accessToken:r,host:n});a.apiClient=o,a.strategy.setApiClient(o);for(var s=0;s<e.length;++s){var c=e[s];c.style.display=c.getAttribute("data-display-value")||"inline-block",c.addEventListener("click",i.bind(null,p,a))}u("shown")}return t})}function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!1;if(!window.ApplePaySession)return Promise.resolve(!1);var n=ApplePaySession.canMakePaymentsWithActiveCard(t).then(function(t){return u("canMakePaymentsWithActiveCard: "+t),t});return e?n:Promise.resolve(ApplePaySession.canMakePayments())}function i(t,e,n){n.preventDefault(),u("clicked"),e.session=new ApplePaySession(h,o(t)),new l["default"](e).begin()}function o(t){var e=t.merchantName,n=s(t,["merchantName"]);return n.total={type:"pending",label:e,amount:"1.00"},n}function u(t){window.ShopifyAnalytics&&ShopifyAnalytics.lib&&ShopifyAnalytics.lib.track&&ShopifyAnalytics.lib.track("Apple Pay button - "+t)}
1Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n;var l=a(c),d=a(f),h=1}),m=t(function(t,r){"use strict";function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{checkout:o({},t,{gateway_params:{type:"apple_pay_web"}})}}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.apiClient;n(this,t),this.setApiClient(r)}return e(t,[{key:"setApiClient",value:function(t){this.apiClient=t}},{key:"getCheckout",value:function(t){return this.apiClient.patch("/api/checkouts/"+t,i()).then(function(t){var e=t.checkout;return e})}},{key:"createCheckout",value:function(t){return this.apiClient.post("/api/checkouts",i(t)).then(function(t){var e=t.checkout;return e})}}]),t}();r["default"]=a}),g=t(function(t,o){"use strict";function s(){var t=document.querySelector('form[action^="/cart/add"]');if(!t)return{};var e=t.elements.quantity,n=e?e.value:1;return{line_items:[{variant_id:t.elements.id.value,quantity:n}]}}Object.defineProperty(o,"__esModule",{value:!0});var u=a(m),l=function(t){function o(){return n(this,o),i(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return r(o,t),e(o,[{key:"build",value:function(){return this.createCheckout(s())}}]),o}(u["default"]);o["default"]=l}),v=t(function(t,o){"use strict";function s(){return c["default"]("/cart",{method:"POST",body:u(),headers:{Accept:"application/json"},credentials:"same-origin"}).then(function(t){return t.json()})}function u(){var t=document.querySelector('form[action="/cart"]');return t?new FormData(t):null}Object.defineProperty(o,"__esModule",{value:!0});var l=a(m),c=a(h),d=function(t){function o(){return n(this,o),i(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return r(o,t),e(o,[{key:"build",value:function(){var t=this;return s().then(function(e){var n=e.token;return t.createCheckout({cart_token:n})})}}]),o}(l["default"]);o["default"]=d}),y=t(function(t,e){"use strict";function n(){if(window.ApplePaySession){var t=document.querySelectorAll('.additional-checkout-button--apple-pay[data-strategy="product"]');t&&t.length&&r["default"]({buttons:t,strategy:new i["default"],requireActiveCard:!0});var e=document.querySelectorAll('.additional-checkout-button--apple-pay[data-strategy="cart"]');e&&e.length&&r["default"]({buttons:e,strategy:new o["default"]})}}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n;var r=a(p),i=a(g),o=a(v)});t(function(t,e){"use strict";var n=a(u),r=a(y);Shopify.StorefrontExpressButtons.initialize=function(){r["default"](),AmazonPaymentsPayButton(),Shopify.StorefrontExpressButtons.ExpressCheckout.initialize()},n["default"](Shopify.StorefrontExpressButtons.initialize)})}();
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.