Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

commercelayer

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commercelayer - npm Package Compare versions

Comparing version 1.5.6 to 1.5.7

dist/commercelayer.dev.js

18

dist/commercelayer.min.js

@@ -1,3 +0,10 @@

!function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t,n){"use strict";var o=n(7),i=n(17),a=Object.prototype.toString;function r(e){return"[object Array]"===a.call(e)}function s(e){return null!==e&&"object"==typeof e}function c(e){return"[object Function]"===a.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:r,isArrayBuffer:function(e){return"[object ArrayBuffer]"===a.call(e)},isBuffer:i,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===a.call(e)},isFile:function(e){return"[object File]"===a.call(e)},isBlob:function(e){return"[object Blob]"===a.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function e(){var t={};function n(n,o){"object"==typeof t[o]&&"object"==typeof n?t[o]=e(t[o],n):t[o]=n}for(var o=0,i=arguments.length;o<i;o++)u(arguments[o],n);return t},extend:function(e,t,n){return u(t,function(t,i){e[i]=n&&"function"==typeof t?o(t,n):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,n){const o=n(5),i=n(35);e.exports={getOrderCookieName:function(){return`order_token_${o.clientId()}_${o.marketId()}_${o.countryCode()}`},getAccessTokenCookieName:function(){return`access_token_${o.clientId()}_${o.marketId()}`},getAccessTokenRetryLockCookieName:function(){return`${this.getAccessTokenCookieName()}_retry_lock`},getOrderToken:function(){return i.get(this.getOrderCookieName())},setOrderToken:function(e){return i.set(this.getOrderCookieName(),e,{expires:30})},deleteOrderToken:function(){return i.remove(this.getOrderCookieName())},getAccessTokenCookie:function(){return i.get(this.getAccessTokenCookieName())},setAccessTokenCookie:function(e,t){i.set(this.getAccessTokenCookieName(),e,t)},getAccessTokenRetryLockCookie:function(){return i.get(this.getAccessTokenRetryLockCookieName())},setAccessTokenRetryLockCookie:function(){i.set(this.getAccessTokenRetryLockCookieName(),"1",{expires:1/1440})},getElementFromTemplate:function(e){return"TEMPLATE"==e.tagName?document.importNode(e.content.firstElementChild,!0):document.importNode(e.firstElementChild,!0)},getInventoryFirstAvailableLevel:function(e){if(first_level=e.levels[0],0==first_level.quantity)for(k=1;k<e.levels.length;k++)if(level=e.levels[k],level.quantity>0){first_level=level;break}return first_level}}},function(e,t){e.exports={config:document.querySelector("#clayer-config"),main:document.querySelector("#clayer-main"),prices:Array.prototype.slice.call(document.querySelectorAll(".clayer-price"),0),variants:Array.prototype.slice.call(document.querySelectorAll(".clayer-variant"),0),variantSelect:document.querySelector(".clayer-variant-select"),availabilityMessageContainer:document.querySelector("#clayer-availability-message-container"),availabilityMessageAvailableTemplate:document.querySelector("#clayer-availability-message-available-template"),availabilityMessageUnavailableTemplate:document.querySelector("#clayer-availability-message-unavailable-template"),addToBag:document.querySelector(".clayer-add-to-bag"),shoppingBagContainer:document.querySelector("#clayer-shopping-bag-container"),shoppingBagItemsContainer:document.querySelector("#clayer-shopping-bag-items-container"),shoppingBagItemTemplate:document.querySelector("#clayer-shopping-bag-item-template"),shoppingBagItemsCount:document.querySelector("#clayer-shopping-bag-items-count"),shoppingBagSubtotal:document.querySelector("#clayer-shopping-bag-subtotal"),shoppingBagShipping:document.querySelector("#clayer-shopping-bag-shipping"),shoppingBagPayment:document.querySelector("#clayer-shopping-bag-payment"),shoppingBagDiscount:document.querySelector("#clayer-shopping-bag-discount"),shoppingBagTaxes:document.querySelector("#clayer-shopping-bag-taxes"),shoppingBagTotal:document.querySelector("#clayer-shopping-bag-total"),shoppingBagCheckout:document.querySelector("#clayer-shopping-bag-checkout"),shoppingBagClose:document.querySelector("#clayer-shopping-bag-close"),shoppingBagToggle:document.querySelector("#clayer-shopping-bag-toggle"),shoppingBagUnavailableMessage:document.querySelector(".clayer-shopping-bag-unavailable-message")}},function(e,t,n){e.exports=n(16)},function(e,t,n){"use strict";(function(t){var o=n(0),i=n(20),a={"Content-Type":"application/x-www-form-urlencoded"};function r(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,c={adapter:("undefined"!=typeof XMLHttpRequest?s=n(8):void 0!==t&&(s=n(8)),s),transformRequest:[function(e,t){return i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(e){c.headers[e]={}}),o.forEach(["post","put","patch"],function(e){c.headers[e]=o.merge(a)}),e.exports=c}).call(this,n(19))},function(e,t,n){const o=n(2);e.exports={baseUrl:function(){return o.config.dataset.baseUrl},clientId:function(){return o.config.dataset.clientId},marketId:function(){return o.config.dataset.marketId},countryCode:function(){return o.config.dataset.countryCode},languageCode:function(){return o.config.dataset.languageCode.split("-")[0]},cartUrl:function(){return o.config.dataset.cartUrl},returnUrl:function(){return o.config.dataset.returnUrl},privacyUrl:function(){return o.config.dataset.privacyUrl},termsUrl:function(){return o.config.dataset.termsUrl}}},function(e,t,n){const o=n(2),a=n(3),r=(n(12),n(13)),s=n(5),c=n(1),u=n(14);e.exports={getPrices:function(){$prices=o.prices,$prices.length>0&&(skuCodes=[],$prices.forEach(function(e){skuCodes.push(e.dataset.skuCode)}),skus=[],skusEndpoint="/api/skus?filter[codes]="+skuCodes.join(",")+"&include=prices&page[size]=25",skuAttributes=["id","code","prices.formatted_amount","prices.formatted_compare_at_amount","prices.amount_cents","prices.compare_at_amount_cents"],a.get(skusEndpoint).then(function(e){if(u.updatePrices(r(e.data).get(skuAttributes)),pageCount=e.data.meta.page_count,pageCount>1)for(p=2;p<=pageCount;p++)skusEndpointWithPage=skusEndpoint+"&page[number]="+p,a.get(skusEndpointWithPage).then(function(e){u.updatePrices(r(e.data).get(skuAttributes))})}))},getVariants:function(){u.disableElement(o.addToBag),$variants=o.variants,$variants.length>0&&(skuCodes=[],$variants.forEach(function(e){u.disableElement(e),skuCodes.push(e.dataset.skuCode)}),a.get("/api/skus?filter[codes]="+skuCodes.join(",")).then(function(t){for(skus=r(t.data).get(["id","code"]),i=0;i<skus.length;i++)variant=document.querySelector('.clayer-variant[data-sku-code="'+skus[i].code+'"]'),variant&&(variant.value=skus[i].id,u.enableElement(variant),0==i&&e.exports.selectVariant(variant))}))},getInventory:function(e,t){a.get("/api/skus/"+e+"?fields[skus]=inventory").then(function(n){sku=n.data.data,u.updateAvailabilityMessage(sku.attributes.inventory),sku.attributes.inventory.available?(u.updateAddToBagSKU(e,t),u.enableAddToBag()):u.disableAddToBag()})},selectVariant:function(t){switch(t.tagName){case"INPUT":switch(t.type){case"radio":t.click();break;case"hidden":e.exports.getInventory(t.value,t.dataset.skuName)}break;case"OPTION":$select=t.parentNode,$select.value=t.value,$select.dispatchEvent(new Event("change"))}},createOrder:function(){return a.post("/api/orders",{data:{type:"orders",attributes:{shipping_country_code_lock:s.countryCode(),language_code:s.languageCode(),cart_url:s.cartUrl(),return_url:s.returnUrl(),privacy_url:s.privacyUrl(),terms_url:s.termsUrl()}}},{headers:{"Content-Type":"application/vnd.api+json"}}).then(function(e){return c.setOrderToken(e.data.data.attributes.token),e.data.data})},refreshOrder:function(){c.getOrderToken()&&this.getOrder().then(function(e){e&&"placed"==e.attributes.status&&(c.deleteOrderToken(),u.clearShoppingBag())})},createLineItem:function(e,t,n,o){return a.post("/api/line_items",{data:{type:"line_items",attributes:{quantity:1,name:n,image_url:o,_update_quantity:1},relationships:{order:{data:{type:"orders",id:e}},item:{data:{type:"skus",id:t}}}}},{headers:{"Content-Type":"application/vnd.api+json"}}).then(function(e){return e.data})},deleteLineItem:function(e){return a.delete("/api/line_items/"+e).then(function(e){return!0})},updateLineItem:function(e,t){return a.patch("/api/line_items/"+e,{data:{type:"line_items",id:e,attributes:t}},{headers:{"Content-Type":"application/vnd.api+json"}}).then(function(e){return e.data})},updateLineItemQty:function(e,t){api=this,api.updateLineItem(e,{quantity:t}).then(function(e){api.getOrder()}).catch(function(e){if(e.response)switch(e.response.status){case 422:u.displayShoppingBagUnavailableMessage()}})},updateShoppingBagItems:function(e){if(api=this,$shoppingBagItemsContainer=o.shoppingBagItemsContainer,$shoppingBagItemsContainer&&(normalized_order=r(e).get(["id","formatted_subtotal_amount","formatted_discount_amount","formatted_shipping_amount","formatted_payment_method_amount","formatted_total_tax_amount","formatted_total_amount_with_taxes","line_items.id","line_items.item_type","line_items.image_url","line_items.name","line_items.quantity","line_items.formatted_unit_amount","line_items.formatted_total_amount"])[0],normalized_order.line_items))for($shoppingBagItemsContainer.innerHTML="",i=0;i<normalized_order.line_items.length;i++)if(line_item=normalized_order.line_items[i],"skus"==line_item.item_type&&($shoppingBagItemTemplate=o.shoppingBagItemTemplate,$shoppingBagItemTemplate)){for($shoppingBagItem=c.getElementFromTemplate($shoppingBagItemTemplate),$shoppingBagItemImage=$shoppingBagItem.querySelector(".clayer-shopping-bag-item-image"),$shoppingBagItemImage.src=line_item.image_url,$shoppingBagItemName=$shoppingBagItem.querySelector(".clayer-shopping-bag-item-name"),$shoppingBagItemName.innerHTML=line_item.name,$shoppingBagItemQtyContainer=$shoppingBagItem.querySelector(".clayer-shopping-bag-item-qty-container"),$qtySelect=document.createElement("select"),$qtySelect.dataset.lineItemId=line_item.id,qty=1;qty<=10;qty++)$option=document.createElement("option"),$option.value=qty,$option.text=qty,qty==line_item.quantity&&($option.selected=!0),$qtySelect.appendChild($option);$qtySelect.addEventListener("change",function(e){api.updateLineItemQty(this.dataset.lineItemId,this.value)}),$shoppingBagItemQtyContainer.appendChild($qtySelect),$shoppingBagItemUnitAmount=$shoppingBagItem.querySelector(".clayer-shopping-bag-item-unit-amount"),$shoppingBagItemUnitAmount.innerHTML=line_item.formatted_unit_amount,$shoppingBagItemTotalAmount=$shoppingBagItem.querySelector(".clayer-shopping-bag-item-total-amount"),$shoppingBagItemTotalAmount.innerHTML=line_item.formatted_total_amount,$shoppingBagItemRemove=$shoppingBagItem.querySelector(".clayer-shopping-bag-item-remove"),$shoppingBagItemRemove.dataset.lineItemId=line_item.id,$shoppingBagItemRemove.addEventListener("click",function(e){e.preventDefault(),api.deleteLineItem(this.dataset.lineItemId).then(function(e){api.getOrder()})}),$shoppingBagItemsContainer.appendChild($shoppingBagItem)}},getOrder:function(){return api=this,a.get("/api/orders?include=line_items&filter[token]="+c.getOrderToken()).then(function(e){if(e.data.data.length>0)return api.updateShoppingBagItems(e.data),u.hideShoppingBagUnavailableMessage(),u.updateShoppingBagSummary(e.data.data[0]),u.updateShoppingBagCheckout(e.data),0==e.data.data[0].attributes.skus_count&&u.clearShoppingBag(),e.data.data[0]})}}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),o=0;o<n.length;o++)n[o]=arguments[o];return e.apply(t,n)}}},function(e,t,n){"use strict";var o=n(0),i=n(21),a=n(23),r=n(24),s=n(25),c=n(9),u="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(26);e.exports=function(e){return new Promise(function(t,p){var l=e.data,d=e.headers;o.isFormData(l)&&delete d["Content-Type"];var f=new XMLHttpRequest,g="onreadystatechange",h=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in f||s(e.url)||(f=new window.XDomainRequest,g="onload",h=!0,f.onprogress=function(){},f.ontimeout=function(){}),e.auth){var m=e.auth.username||"",y=e.auth.password||"";d.Authorization="Basic "+u(m+":"+y)}if(f.open(e.method.toUpperCase(),a(e.url,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f[g]=function(){if(f&&(4===f.readyState||h)&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?r(f.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?f.response:f.responseText,status:1223===f.status?204:f.status,statusText:1223===f.status?"No Content":f.statusText,headers:n,config:e,request:f};i(t,p,o),f=null}},f.onerror=function(){p(c("Network Error",e,null,f)),f=null},f.ontimeout=function(){p(c("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",f)),f=null},o.isStandardBrowserEnv()){var v=n(27),b=(e.withCredentials||s(e.url))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;b&&(d[e.xsrfHeaderName]=b)}if("setRequestHeader"in f&&o.forEach(d,function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete d[t]:f.setRequestHeader(t,e)}),e.withCredentials&&(f.withCredentials=!0),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){f&&(f.abort(),p(e),f=null)}),void 0===l&&(l=null),f.send(l)})}},function(e,t,n){"use strict";var o=n(22);e.exports=function(e,t,n,i,a){var r=new Error(e);return o(r,t,n,i,a)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function o(e){this.message=e}o.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},o.prototype.__CANCEL__=!0,e.exports=o},function(e,t,n){const o=n(3),i=n(5),a=n(1);o.defaults.baseURL=i.baseUrl(),o.defaults.headers.common.Accept="application/vnd.api+json",o.interceptors.request.use(function(e){return e.headers.Authorization="Bearer "+a.getAccessTokenCookie(),e},function(e){return Promise.reject(e)}),o.interceptors.response.use(function(e){return e},function(e){return 401===e.response.status&&function(){if(navigator.cookieEnabled)return!0;document.cookie="cookietest=1";var e=-1!=document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}()&&null==a.getAccessTokenRetryLockCookie()?(a.setAccessTokenRetryLockCookie(),o.post("/oauth/token",{grant_type:"client_credentials",client_id:i.clientId(),scope:"market:"+i.marketId()}).then(function(e){return a.setAccessTokenCookie(e.data.access_token,e.data.expires_in),e.data.access_token}).then(function(t){return e.config.headers.Authorization="Bearer "+t,o.request(e.config)})):Promise.reject(e)})},function(e,t,n){var o,i,a;i=[],void 0===(a="function"==typeof(o=function(){function e(o,i){if(!(this instanceof e)){var a=new e(o);return i?a.get(i):a}if("string"==typeof o&&(o=JSON.parse(o)),!o||!o.data)throw new Error("Invalid json api normalizer input");var r,s,c,u;this.dataset=o,this.isCollection=t(o.data),this.haystack=(r=o.included,s=this.isCollection?o.data:[o.data],c=[],n(u=r||[],function(e){c.push(e.type+"@"+e.id)}),n(s,function(e){c.indexOf(e.type+"@"+e.id)<0&&u.push(e)}),u)}function t(e){return e instanceof Array}function n(e,n,o){if(t(e))for(var i=e.length,a=0;a<i;a++)n.call(o,e[a],a);else for(var r in e)e.hasOwnProperty(r)&&n.call(o,r,e[r])}function o(e,t,o){var i=[];return n(e,function(e,n){i.push(t.call(o,e,n))}),i}function i(i,s,c){var u={};return n(i,function(n,i){if(i)u[n]=function(e,n,i,s){var c=i.relationships&&i.relationships[e]&&i.relationships[e].data,u=c&&r(c,s);return t(u)?o(u,function(e){return a(n,e,s)}):u?a(n,u,s):void 0}(n,i,s,c);else{var p=s.relationships&&s.relationships[n]&&s.relationships[n].data;if(p){var l=r(p,c);u[n]=l?new e({data:l,included:c}):void 0}else u[n]=function(e,t){return["id","type"].indexOf(e)>=0?t[e]:t.attributes[e]}(n,s)}}),u}function a(t,n,o){return s.call(new e({data:n,included:o}),t)}function r(e,i){var a=[],r=t(e)?o(e,function(e){return e.type+"@"+e.id}):[e.type+"@"+e.id];return n(i,function(e){r.indexOf(e.type+"@"+e.id)>=0&&a.push(e)}),0===a.length?void 0:1!==a.length||t(e)?a:a[0]}function s(e){return this.isCollection?o(this.dataset.data,function(t){return i(e,t,this.haystack)},this):i(e,this.dataset.data,this.haystack)}return e.prototype.get=function(e){var i,a,r=s.call(this,(i=t(e)?e:[e],a={},n(i,function(e){var t=e.split(".");t.length>1?function e(t,n){for(var o in n)n.hasOwnProperty(o)&&("object"==typeof n[o]&&null!==n[o]?(void 0===t[o]&&(t[o]={}),e(t[o],n[o])):t[o]=n[o]);return t}(a,function(e){for(var t={},n=t,o=e.length,i=0;i<o;i++)n=n[e[i]]=n[e[i]]||(i+1===o?void 0:{});return t}(t)):a[e]=void 0}),a));return this.isCollection?t(e)?r:o(r,function(t){return t[e]}):t(e)?r:r[e]},e})?o.apply(t,i):o)||(e.exports=a)},function(e,t,n){const o=n(2),i=n(1),a=n(13);e.exports={enableElement:function(e){e&&e.classList.remove("disabled")},disableElement:function(e){e&&e.classList.add("disabled")},setElementHTML(e,t,n){el=e.querySelector(t),el&&(el.innerHTML=n)},displayElement:function(e){e&&(e.style.display="block")},hideElement:function(e){e&&(e.style.display="none")},updatePrices:function(e){for(k=0;k<e.length;k++)priceAmount=document.querySelector('[data-sku-code="'+e[k].code+'"] > .amount'),priceAmount&&(priceAmount.innerHTML=e[k].prices[0].formatted_amount),priceCompareAmount=document.querySelector('[data-sku-code="'+e[k].code+'"] > .compare-at-amount'),priceCompareAmount&&e[k].prices[0].compare_at_amount_cents>e[k].prices[0].amount_cents&&(priceCompareAmount.innerHTML=e[k].prices[0].formatted_compare_at_amount)},updateAddToBagSKU:function(e,t){$addToBag=o.addToBag,$addToBag&&($addToBag.dataset.skuId=e,$addToBag.dataset.skuName=t)},enableAddToBag:function(){$addToBag=o.addToBag,$addToBag&&this.enableElement($addToBag)},disableAddToBag:function(){$addToBag=o.addToBag,$addToBag&&this.disableElement($addToBag)},updateAvailabilityMessage:function(e){$container=o.availabilityMessageContainer,$container&&(first_level=i.getInventoryFirstAvailableLevel(e),first_level.quantity>0?(dlt=first_level.delivery_lead_times[0],qty=first_level.quantity,minDays=dlt.min.days,maxDays=dlt.max.days,shippingMethodName=dlt.shipping_method.name,shippingMethodPrice=dlt.shipping_method.formatted_price_amount,this.displayAvailableMessage(qty,minDays,maxDays,shippingMethodName,shippingMethodPrice)):this.displayUnavailableMessage())},updateShoppingBagSummary:function(e){$shoppingBagItemsCount=o.shoppingBagItemsCount,$shoppingBagItemsCount&&($shoppingBagItemsCount.innerHTML=e.attributes.skus_count),$shoppingBagTotal=o.shoppingBagTotal,$shoppingBagTotal&&($shoppingBagTotal.innerHTML=e.attributes.formatted_total_amount_with_taxes),$shoppingBagSubtotal=o.shoppingBagSubtotal,$shoppingBagSubtotal&&($shoppingBagSubtotal.innerHTML=e.attributes.formatted_subtotal_amount),$shoppingBagShipping=o.shoppingBagShipping,$shoppingBagShipping&&($shoppingBagShipping.innerHTML=e.attributes.formatted_shipping_amount),$shoppingBagPayment=o.shoppingBagPayment,$shoppingBagPayment&&($shoppingBagPayment.innerHTML=e.attributes.formatted_payment_method_amount),$shoppingBagTaxes=o.shoppingBagTaxes,$shoppingBagTaxes&&($shoppingBagTaxes.innerHTML=e.attributes.formatted_total_tax_amount),$shoppingBagDiscount=o.shoppingBagDiscount,$shoppingBagDiscount&&($shoppingBagDiscount.innerHTML=e.attributes.formatted_discount_amount)},updateShoppingBagCheckout:function(e){$shoppingBagCheckout=o.shoppingBagCheckout,$shoppingBagCheckout&&(normalized_order=a(e).get(["line_items.id","checkout_url"])[0],normalized_order.line_items?(this.enableElement($shoppingBagCheckout),$shoppingBagCheckout.href=normalized_order.checkout_url):($shoppingBagCheckout.href="",this.disableElement($shoppingBagCheckout)))},displayAvailableMessage:function(e,t,n,a,r){$container=o.availabilityMessageContainer,$container&&($tmp=o.availabilityMessageAvailableTemplate,$tmp&&($el=i.getElementFromTemplate($tmp),this.setElementHTML($el,".clayer-availability-message-available-qty",e),this.setElementHTML($el,".clayer-availability-message-available-min-days",t),this.setElementHTML($el,".clayer-availability-message-available-max-days",n),this.setElementHTML($el,".clayer-availability-message-available-shipping-method-name",a),this.setElementHTML($el,".clayer-availability-message-available-shipping-method-price",r),$container.innerHTML="",$container.appendChild($el)))},displayUnavailableMessage:function(){$container=o.availabilityMessageContainer,$container&&($tmp=o.availabilityMessageUnavailableTemplate,$tmp&&($el=i.getElementFromTemplate($tmp),$container.innerHTML="",$container.appendChild($el)))},toggleShoppingBag:function(){$shoppingBagContainer=o.shoppingBagContainer,$shoppingBagContainer&&$shoppingBagContainer.classList.toggle("open"),$main=o.main,$main&&$main.classList.toggle("open")},openShoppingBag:function(){$shoppingBagContainer=o.shoppingBagContainer,$shoppingBagContainer&&$shoppingBagContainer.classList.add("open"),$main=o.main,$main&&$main.classList.remove("open")},clearShoppingBag:function(){o.shoppingBagItemsContainer&&(o.shoppingBagItemsContainer.innerHTML="")},displayShoppingBagUnavailableMessage:function(){this.displayElement(o.shoppingBagUnavailableMessage)},hideShoppingBagUnavailableMessage:function(){this.hideElement(o.shoppingBagUnavailableMessage)}}},function(e,t,n){function o(){const o=n(6),i=n(36);n(1);t.init=function(){o.getPrices(),o.getVariants(),i.setVariantSelect(),i.setAddToShoppingBag(),i.setShoppingBagToggle(),o.refreshOrder()},window.commercelayer=e.exports,e.exports.init()}"loading"==document.readyState?document.addEventListener("readystatechange",function(e){"interactive"==document.readyState&&o()}):o()},function(e,t,n){"use strict";var o=n(0),i=n(7),a=n(18),r=n(4);function s(e){var t=new a(e),n=i(a.prototype.request,t);return o.extend(n,a.prototype,t),o.extend(n,t),n}var c=s(r);c.Axios=a,c.create=function(e){return s(o.merge(r,e))},c.Cancel=n(11),c.CancelToken=n(33),c.isCancel=n(10),c.all=function(e){return Promise.all(e)},c.spread=n(34),e.exports=c,e.exports.default=c},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(r,s,function(t){return e[t]}.bind(null,s));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t,n){"use strict";var r=n(10),s=n(23),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.call(null,e[s],s,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:s,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return a(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,s=arguments.length;r<s;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,function(t,s){e[s]=n&&"function"==typeof t?r(t,n):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t){e.exports={config:document.querySelector("#clayer-config"),main:document.querySelector("#clayer-main"),prices:Array.prototype.slice.call(document.querySelectorAll(".clayer-price"),0),variants:Array.prototype.slice.call(document.querySelectorAll(".clayer-variant"),0),variantSelect:document.querySelector(".clayer-variant-select"),availabilityMessageContainer:document.querySelector("#clayer-availability-message-container"),availabilityMessageAvailableTemplate:document.querySelector("#clayer-availability-message-available-template"),availabilityMessageUnavailableTemplate:document.querySelector("#clayer-availability-message-unavailable-template"),addToBag:document.querySelector(".clayer-add-to-bag"),shoppingBagContainer:document.querySelector("#clayer-shopping-bag-container"),shoppingBagItemsContainer:document.querySelector("#clayer-shopping-bag-items-container"),shoppingBagItemTemplate:document.querySelector("#clayer-shopping-bag-item-template"),shoppingBagItemsCount:document.querySelector("#clayer-shopping-bag-items-count"),shoppingBagSubtotal:document.querySelector("#clayer-shopping-bag-subtotal"),shoppingBagShipping:document.querySelector("#clayer-shopping-bag-shipping"),shoppingBagPayment:document.querySelector("#clayer-shopping-bag-payment"),shoppingBagDiscount:document.querySelector("#clayer-shopping-bag-discount"),shoppingBagTaxes:document.querySelector("#clayer-shopping-bag-taxes"),shoppingBagTotal:document.querySelector("#clayer-shopping-bag-total"),shoppingBagCheckout:document.querySelector("#clayer-shopping-bag-checkout"),shoppingBagClose:document.querySelector("#clayer-shopping-bag-close"),shoppingBagToggle:document.querySelector("#clayer-shopping-bag-toggle"),shoppingBagUnavailableMessage:document.querySelector(".clayer-shopping-bag-unavailable-message")}},function(e,t){e.exports={clayer:{default:!0,client_id:"351020e9c84f2076755083f08bfe8e47365a76395db1059c3219c37abff86534",market_id:"185",base_url:"https://static-commerce.commercelayer.io",base_path:null,country_code:"US",language_code:"en"},sdk:{debug:!0,trace:!1,raw_response:!1}}},function(e,t,n){const r=n(1);e.exports={baseUrl:function(){return r.config.dataset.baseUrl},clientId:function(){return r.config.dataset.clientId},marketId:function(){return r.config.dataset.marketId},countryCode:function(){return r.config.dataset.countryCode},languageCode:function(){return r.config.dataset.languageCode.split("-")[0]},cartUrl:function(){return r.config.dataset.cartUrl},returnUrl:function(){return r.config.dataset.returnUrl},privacyUrl:function(){return r.config.dataset.privacyUrl},termsUrl:function(){return r.config.dataset.termsUrl}}},function(e,t,n){const r=n(3),s=n(16);e.exports={getOrderCookieName:function(){return`order_token_${r.clientId()}_${r.marketId()}_${r.countryCode()}`},getAccessTokenCookieName:function(){return`access_token_${r.clientId()}_${r.marketId()}`},getAccessTokenRetryLockCookieName:function(){return`${this.getAccessTokenCookieName()}_retry_lock`},getOrderToken:function(){return s.get(this.getOrderCookieName())},setOrderToken:function(e){return s.set(this.getOrderCookieName(),e,{expires:30})},deleteOrderToken:function(){return s.remove(this.getOrderCookieName())},getAccessTokenCookie:function(){return s.get(this.getAccessTokenCookieName())},setAccessTokenCookie:function(e,t){s.set(this.getAccessTokenCookieName(),e,t)},getAccessTokenRetryLockCookie:function(){return s.get(this.getAccessTokenRetryLockCookieName())},setAccessTokenRetryLockCookie:function(){s.set(this.getAccessTokenRetryLockCookieName(),"1",{expires:1/1440})},getElementFromTemplate:function(e){return"TEMPLATE"==e.tagName?document.importNode(e.content.firstElementChild,!0):document.importNode(e.firstElementChild,!0)},getInventoryFirstAvailableLevel:function(e){if(first_level=e.levels[0],0==first_level.quantity)for(k=1;k<e.levels.length;k++)if(level=e.levels[k],level.quantity>0){first_level=level;break}return first_level}}},function(e,t,n){"use strict";(function(t){var r=n(0),s=n(26),i={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a,u={adapter:("undefined"!=typeof XMLHttpRequest?a=n(11):void 0!==t&&(a=n(11)),a),transformRequest:[function(e,t){return s(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(e){u.headers[e]={}}),r.forEach(["post","put","patch"],function(e){u.headers[e]=r.merge(i)}),e.exports=u}).call(this,n(25))},function(e,t,n){const r=n(2).sdk;e.exports={log:e=>{r.debug&&console.log(null==e?"":e)},extendMap:(e,t)=>(null!=t&&Object.keys(t).forEach(n=>{e[n]=t[n]}),e),mergeMaps:(e,t)=>({...e,...t}),cloneMap:e=>null==e?e:{...e}}},function(e,t,n){const r=n(1),s=n(3),o=n(4),a=n(8),u=n(9);e.exports={getPrices:function(){if($prices=r.prices,$prices.length>0){let e=[];$prices.forEach(function(t){e.push(t.dataset.skuCode)});let t=(new u.query.QueryFilter).filter("codes",e.join(",")).include("prices").page(null,25),n=["id","code","prices.formatted_amount","prices.formatted_compare_at_amount","prices.amount_cents","prices.compare_at_amount_cents"];u.listSkus(t.build()).then(e=>{a.updatePrices(e.get(n));let r=e.dataset.meta.page_count;if(r>1)for(p=2;p<=r;p++)t.pageNumber(p),u.listSkus(t).then(e=>a.updatePrices(e.get(n)))})}},getVariants:function(){if(a.disableElement(r.addToBag),$variants=r.variants,$variants.length>0){let t=[];$variants.forEach(function(e){a.disableElement(e),t.push(e.dataset.skuCode)});let n=(new u.query.QueryFilter).filter("codes",t.join(","));u.listSkus(n.build()).then(t=>{let n=t.get(["id","code"]);for(i=0;i<n.length;i++)variant=document.querySelector('.clayer-variant[data-sku-code="'+n[i].code+'"]'),variant&&(variant.value=n[i].id,a.enableElement(variant),0==i&&e.exports.selectVariant(variant))})}},getInventory:function(e,t){u.retrieveSku(e,{"fields[skus]":"inventory"}).then(n=>{let r=n.get("inventory");a.updateAvailabilityMessage(r),r.available?(a.updateAddToBagSKU(e,t),a.enableAddToBag()):a.disableAddToBag()})},selectVariant:function(t){switch(t.tagName){case"INPUT":switch(t.type){case"radio":t.click();break;case"hidden":e.exports.getInventory(t.value,t.dataset.skuName)}break;case"OPTION":$select=t.parentNode,$select.value=t.value,$select.dispatchEvent(new Event("change"))}},createOrder:function(){u.createOrder({type:"orders",shipping_country_code_lock:s.countryCode(),language_code:s.languageCode(),cart_url:s.cartUrl(),return_url:s.returnUrl(),privacy_url:s.privacyUrl(),terms_url:s.termsUrl()}).then(e=>(o.setOrderToken(e.get("token")),e))},refreshOrder:function(){o.getOrderToken()&&this.getOrder().then(function(e){e&&"placed"==e.get("status")&&(o.deleteOrderToken(),a.clearShoppingBag())})},createLineItem:function(e,t,n,r){return u.createLineItem({data:{type:"line_items",attributes:{quantity:1,name:n,image_url:r,_update_quantity:1},relationships:{order:{data:{type:"orders",id:e}},item:{data:{type:"skus",id:t}}}}})},deleteLineItem:function(e){return u.deleteLineItem(e).then(function(){return!0})},updateLineItem:function(e,t){return u.updateLineItem(e,{data:{type:"line_items",id:e,attributes:t}})},updateLineItemQty:function(e,t){api=this,api.updateLineItem(e,{quantity:t}).then(function(){api.getOrder()}).catch(function(e){if(e)switch(e.status){case 422:a.displayShoppingBagUnavailableMessage()}})},updateShoppingBagItems:function(e){if(api=this,$shoppingBagItemsContainer=r.shoppingBagItemsContainer,$shoppingBagItemsContainer&&(normalized_order=e.get(["id","formatted_subtotal_amount","formatted_discount_amount","formatted_shipping_amount","formatted_payment_method_amount","formatted_total_tax_amount","formatted_total_amount_with_taxes","line_items.id","line_items.item_type","line_items.image_url","line_items.name","line_items.quantity","line_items.formatted_unit_amount","line_items.formatted_total_amount"])[0],normalized_order.line_items))for($shoppingBagItemsContainer.innerHTML="",i=0;i<normalized_order.line_items.length;i++)if(line_item=normalized_order.line_items[i],"skus"==line_item.item_type&&($shoppingBagItemTemplate=r.shoppingBagItemTemplate,$shoppingBagItemTemplate)){for($shoppingBagItem=o.getElementFromTemplate($shoppingBagItemTemplate),$shoppingBagItemImage=$shoppingBagItem.querySelector(".clayer-shopping-bag-item-image"),$shoppingBagItemImage.src=line_item.image_url,$shoppingBagItemName=$shoppingBagItem.querySelector(".clayer-shopping-bag-item-name"),$shoppingBagItemName.innerHTML=line_item.name,$shoppingBagItemQtyContainer=$shoppingBagItem.querySelector(".clayer-shopping-bag-item-qty-container"),$qtySelect=document.createElement("select"),$qtySelect.dataset.lineItemId=line_item.id,qty=1;qty<=10;qty++)$option=document.createElement("option"),$option.value=qty,$option.text=qty,qty==line_item.quantity&&($option.selected=!0),$qtySelect.appendChild($option);$qtySelect.addEventListener("change",function(e){api.updateLineItemQty(this.dataset.lineItemId,this.value)}),$shoppingBagItemQtyContainer.appendChild($qtySelect),$shoppingBagItemUnitAmount=$shoppingBagItem.querySelector(".clayer-shopping-bag-item-unit-amount"),$shoppingBagItemUnitAmount.innerHTML=line_item.formatted_unit_amount,$shoppingBagItemTotalAmount=$shoppingBagItem.querySelector(".clayer-shopping-bag-item-total-amount"),$shoppingBagItemTotalAmount.innerHTML=line_item.formatted_total_amount,$shoppingBagItemRemove=$shoppingBagItem.querySelector(".clayer-shopping-bag-item-remove"),$shoppingBagItemRemove.dataset.lineItemId=line_item.id,$shoppingBagItemRemove.addEventListener("click",function(e){e.preventDefault(),api.deleteLineItem(this.dataset.lineItemId).then(function(e){api.getOrder()})}),$shoppingBagItemsContainer.appendChild($shoppingBagItem)}},getOrder:function(){api=this;let e=new u.query.QueryFilter;return e.include("line_items").filter("token",o.getOrderToken()),u.listOrders(e).then(function(e){if(e.get(["line_items"]).length>0)return api.updateShoppingBagItems(e),a.hideShoppingBagUnavailableMessage(),a.updateShoppingBagSummary(e.dataset.data[0]),a.updateShoppingBagCheckout(e),0==e.get("skus_count")&&a.clearShoppingBag(),e})}}},function(e,t,n){const r=n(1),s=n(4);n(17);e.exports={enableElement:function(e){e&&e.classList.remove("disabled")},disableElement:function(e){e&&e.classList.add("disabled")},setElementHTML(e,t,n){el=e.querySelector(t),el&&(el.innerHTML=n)},displayElement:function(e){e&&(e.style.display="block")},hideElement:function(e){e&&(e.style.display="none")},updatePrices:function(e){for(k=0;k<e.length;k++)priceAmount=document.querySelector('[data-sku-code="'+e[k].code+'"] > .amount'),priceAmount&&(priceAmount.innerHTML=e[k].prices[0].formatted_amount),priceCompareAmount=document.querySelector('[data-sku-code="'+e[k].code+'"] > .compare-at-amount'),priceCompareAmount&&e[k].prices[0].compare_at_amount_cents>e[k].prices[0].amount_cents&&(priceCompareAmount.innerHTML=e[k].prices[0].formatted_compare_at_amount)},updateAddToBagSKU:function(e,t){$addToBag=r.addToBag,$addToBag&&($addToBag.dataset.skuId=e,$addToBag.dataset.skuName=t)},enableAddToBag:function(){$addToBag=r.addToBag,$addToBag&&this.enableElement($addToBag)},disableAddToBag:function(){$addToBag=r.addToBag,$addToBag&&this.disableElement($addToBag)},updateAvailabilityMessage:function(e){$container=r.availabilityMessageContainer,$container&&(first_level=s.getInventoryFirstAvailableLevel(e),first_level.quantity>0?(dlt=first_level.delivery_lead_times[0],qty=first_level.quantity,minDays=dlt.min.days,maxDays=dlt.max.days,shippingMethodName=dlt.shipping_method.name,shippingMethodPrice=dlt.shipping_method.formatted_price_amount,this.displayAvailableMessage(qty,minDays,maxDays,shippingMethodName,shippingMethodPrice)):this.displayUnavailableMessage())},updateShoppingBagSummary:function(e){$shoppingBagItemsCount=r.shoppingBagItemsCount,$shoppingBagItemsCount&&($shoppingBagItemsCount.innerHTML=e.attributes.skus_count),$shoppingBagTotal=r.shoppingBagTotal,$shoppingBagTotal&&($shoppingBagTotal.innerHTML=e.attributes.formatted_total_amount_with_taxes),$shoppingBagSubtotal=r.shoppingBagSubtotal,$shoppingBagSubtotal&&($shoppingBagSubtotal.innerHTML=e.attributes.formatted_subtotal_amount),$shoppingBagShipping=r.shoppingBagShipping,$shoppingBagShipping&&($shoppingBagShipping.innerHTML=e.attributes.formatted_shipping_amount),$shoppingBagPayment=r.shoppingBagPayment,$shoppingBagPayment&&($shoppingBagPayment.innerHTML=e.attributes.formatted_payment_method_amount),$shoppingBagTaxes=r.shoppingBagTaxes,$shoppingBagTaxes&&($shoppingBagTaxes.innerHTML=e.attributes.formatted_total_tax_amount),$shoppingBagDiscount=r.shoppingBagDiscount,$shoppingBagDiscount&&($shoppingBagDiscount.innerHTML=e.attributes.formatted_discount_amount)},updateShoppingBagCheckout:function(e){$shoppingBagCheckout=r.shoppingBagCheckout,$shoppingBagCheckout&&(normalized_order=e.get(["line_items.id","checkout_url"])[0],normalized_order.line_items?(this.enableElement($shoppingBagCheckout),$shoppingBagCheckout.href=normalized_order.checkout_url):($shoppingBagCheckout.href="",this.disableElement($shoppingBagCheckout)))},displayAvailableMessage:function(e,t,n,i,o){$container=r.availabilityMessageContainer,$container&&($tmp=r.availabilityMessageAvailableTemplate,$tmp&&($el=s.getElementFromTemplate($tmp),this.setElementHTML($el,".clayer-availability-message-available-qty",e),this.setElementHTML($el,".clayer-availability-message-available-min-days",t),this.setElementHTML($el,".clayer-availability-message-available-max-days",n),this.setElementHTML($el,".clayer-availability-message-available-shipping-method-name",i),this.setElementHTML($el,".clayer-availability-message-available-shipping-method-price",o),$container.innerHTML="",$container.appendChild($el)))},displayUnavailableMessage:function(){$container=r.availabilityMessageContainer,$container&&($tmp=r.availabilityMessageUnavailableTemplate,$tmp&&($el=s.getElementFromTemplate($tmp),$container.innerHTML="",$container.appendChild($el)))},toggleShoppingBag:function(){$shoppingBagContainer=r.shoppingBagContainer,$shoppingBagContainer&&$shoppingBagContainer.classList.toggle("open"),$main=r.main,$main&&$main.classList.toggle("open")},openShoppingBag:function(){$shoppingBagContainer=r.shoppingBagContainer,$shoppingBagContainer&&$shoppingBagContainer.classList.add("open"),$main=r.main,$main&&$main.classList.remove("open")},clearShoppingBag:function(){r.shoppingBagItemsContainer&&(r.shoppingBagItemsContainer.innerHTML="")},displayShoppingBagUnavailableMessage:function(){this.displayElement(r.shoppingBagUnavailableMessage)},hideShoppingBagUnavailableMessage:function(){this.hideElement(r.shoppingBagUnavailableMessage)}}},function(e,t,n){e.exports=n(18),e.exports.model=n(43),e.exports.query=n(44)},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(0),s=n(27),i=n(29),o=n(30),a=n(31),u=n(12),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(32);e.exports=function(e){return new Promise(function(t,p){var l=e.data,d=e.headers;r.isFormData(l)&&delete d["Content-Type"];var h=new XMLHttpRequest,g="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||a(e.url)||(h=new window.XDomainRequest,g="onload",m=!0,h.onprogress=function(){},h.ontimeout=function(){}),e.auth){var f=e.auth.username||"",_=e.auth.password||"";d.Authorization="Basic "+c(f+":"+_)}if(h.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h[g]=function(){if(h&&(4===h.readyState||m)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?o(h.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:n,config:e,request:h};s(t,p,r),h=null}},h.onerror=function(){p(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){p(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var y=n(33),v=(e.withCredentials||a(e.url))&&e.xsrfCookieName?y.read(e.xsrfCookieName):void 0;v&&(d[e.xsrfHeaderName]=v)}if("setRequestHeader"in h&&r.forEach(d,function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete d[t]:h.setRequestHeader(t,e)}),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){h&&(h.abort(),p(e),h=null)}),void 0===l&&(l=null),h.send(l)})}},function(e,t,n){"use strict";var r=n(28);e.exports=function(e,t,n,s,i){var o=new Error(e);return r(o,t,n,s,i)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){function r(){const r=n(7),s=n(45),i=n(3),o=n(9);t.init=function(){o.initialize({client_id:i.clientId(),market_id:i.marketId(),base_url:i.baseUrl(),country_code:i.countryCode(),language_code:i.languageCode()}),o.settings.debug=!0,o.settings.console=!0,o.settings.trace=!0,r.getPrices(),r.getVariants(),s.setVariantSelect(),s.setAddToShoppingBag(),s.setShoppingBagToggle(),r.refreshOrder()},e.exports.init()}"loading"==document.readyState?document.addEventListener("readystatechange",function(e){"interactive"==document.readyState&&r()}):r()},function(e,t,n){var r,s;
/*!
* JavaScript Cookie v2.2.0
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/!function(i){if(void 0===(s="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=s),!0,e.exports=i(),!!0){var o=window.Cookies,a=window.Cookies=i();a.noConflict=function(){return window.Cookies=o,a}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}return function t(n){function r(t,s,i){var o;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"},r.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{o=JSON.stringify(s),/^[\{\[]/.test(o)&&(s=o)}catch(e){}s=n.write?n.write(s,t):encodeURIComponent(String(s)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var u="";for(var c in i)i[c]&&(u+="; "+c,!0!==i[c]&&(u+="="+i[c]));return document.cookie=t+"="+s+u}t||(o={});for(var p=document.cookie?document.cookie.split("; "):[],l=/(%[0-9A-Z]{2})+/g,d=0;d<p.length;d++){var h=p[d].split("="),g=h.slice(1).join("=");this.json||'"'!==g.charAt(0)||(g=g.slice(1,-1));try{var m=h[0].replace(l,decodeURIComponent);if(g=n.read?n.read(g,m):n(g,m)||g.replace(l,decodeURIComponent),this.json)try{g=JSON.parse(g)}catch(e){}if(t===m){o=g;break}t||(o[m]=g)}catch(e){}}return o}}return r.set=r,r.get=function(e){return r.call(r,e)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,n){r(t,"",e(n,{expires:-1}))},r.withConverter=t,r}(function(){})})},function(e,t,n){var r,s,i;s=[],void 0===(i="function"==typeof(r=function(){function e(r,s){if(!(this instanceof e)){var i=new e(r);return s?i.get(s):i}if("string"==typeof r&&(r=JSON.parse(r)),!r||!r.data)throw new Error("Invalid json api normalizer input");var o,a,u,c;this.dataset=r,this.isCollection=t(r.data),this.haystack=(o=r.included,a=this.isCollection?r.data:[r.data],u=[],n(c=o||[],function(e){u.push(e.type+"@"+e.id)}),n(a,function(e){u.indexOf(e.type+"@"+e.id)<0&&c.push(e)}),c)}function t(e){return e instanceof Array}function n(e,n,r){if(t(e))for(var s=e.length,i=0;i<s;i++)n.call(r,e[i],i);else for(var o in e)e.hasOwnProperty(o)&&n.call(r,o,e[o])}function r(e,t,r){var s=[];return n(e,function(e,n){s.push(t.call(r,e,n))}),s}function s(s,a,u){var c={};return n(s,function(n,s){if(s)c[n]=function(e,n,s,a){var u=s.relationships&&s.relationships[e]&&s.relationships[e].data,c=u&&o(u,a);return t(c)?r(c,function(e){return i(n,e,a)}):c?i(n,c,a):void 0}(n,s,a,u);else{var p=a.relationships&&a.relationships[n]&&a.relationships[n].data;if(p){var l=o(p,u);c[n]=l?new e({data:l,included:u}):void 0}else c[n]=function(e,t){return["id","type"].indexOf(e)>=0?t[e]:t.attributes[e]}(n,a)}}),c}function i(t,n,r){return a.call(new e({data:n,included:r}),t)}function o(e,s){var i=[],o=t(e)?r(e,function(e){return e.type+"@"+e.id}):[e.type+"@"+e.id];return n(s,function(e){o.indexOf(e.type+"@"+e.id)>=0&&i.push(e)}),0===i.length?void 0:1!==i.length||t(e)?i:i[0]}function a(e){return this.isCollection?r(this.dataset.data,function(t){return s(e,t,this.haystack)},this):s(e,this.dataset.data,this.haystack)}return e.prototype.get=function(e){var s,i,o=a.call(this,(s=t(e)?e:[e],i={},n(s,function(e){var t=e.split(".");t.length>1?function e(t,n){for(var r in n)n.hasOwnProperty(r)&&("object"==typeof n[r]&&null!==n[r]?(void 0===t[r]&&(t[r]={}),e(t[r],n[r])):t[r]=n[r]);return t}(i,function(e){for(var t={},n=t,r=e.length,s=0;s<r;s++)n=n[e[s]]=n[e[s]]||(s+1===r?void 0:{});return t}(t)):i[e]=void 0}),i));return this.isCollection?t(e)?o:r(o,function(t){return t[e]}):t(e)?o:o[e]},e})?r.apply(t,s):r)||(e.exports=i)},function(e,t,n){const r=n(19),s=n(2),i=n(6);e.exports=r.clapi,e.exports.initialize=(e=>{null!=e&&(e.default=!1),r.initialize(i.mergeMaps(s.clayer,e))}),e.exports.lastAccessToken=(()=>r.clapi.client.config.access_token),e.exports.settings=s.sdk},function(e,t,n){const r=n(20),s=n(6),i=n(41),o=n(2).sdk;var a=new class{listSkus(e){return u(r.newRequest("/api/skus").setParams(e))}retrieveSku(e){return u(r.newRequest(`/api/skus/${e}`))}listPrices(e){return u(r.newRequest("/api/prices").setParams(e))}retrievePrice(e){return u(r.newRequest(`/api/prices/${e}`))}listStockItems(e){return u(r.newRequest("/api/stock_items").setParams(e))}retrieveStockItem(e){return u(r.newRequest(`/api/stock_items/${e}`))}listDeliveryLeadTimes(e){return u(r.newRequest("/api/delivery_lead_times").setParams(e))}retrieveDeliveryLeadTime(e){return u(r.newRequest(`/api/delivery_lead_times/${e}`))}listShippingMethods(e){return u(r.newRequest("/api/shipping_methods").setParams(e))}retrieveShippingMethod(e){return u(r.newRequest(`/api/shipping_methods/${e}`))}listPaymentMethods(e){return u(r.newRequest("/api/payment_methods").setParams(e))}retrievePaymentMethod(e){return u(r.newRequest(`/api/payment_methods/${e}`))}listOrders(e){return u(r.newRequest("/api/orders").setParams(e))}retrieveOrder(e){return u(r.newRequest(`/api/orders/${e}`))}createOrder(e){return u(r.newRequest("/api/orders","post").setBody(e))}listLineItems(e){return u(r.newRequest("/api/line_items").setParams(e))}retrieveLineItem(e){return u(r.newRequest(`/api/line_items/${e}`))}createLineItem(e){return u(r.newRequest("/api/line_items","post").setBody(e))}updateLineItem(e,t){return u(r.newRequest(`/api/line_items/${e}`,"patch").setBody(t))}deleteLineItem(e){return u(r.newRequest(`/api/line_items/${e}`,"delete"))}createCustomer(e){return u(r.newRequest("/api/customers","post").setBody(e))}createCustomerSubscription(e){return u(r.newRequest("/api/customer_subscriptions","post").setBody(e))}};function u(e){if(s.log("calling "+e.path+" ..."),null==a.client)return Promise.reject(c(void 0,"api not initialized"));{let t=i.serialize(e.body);return e.setBody(t),a.client.call(e).then(e=>o.raw_response?e.data:i.deserialize(e.data)).catch(e=>{if(e.response.data&&e.response.data.errors){const t=e.response.data.errors[0];return Promise.reject(c(t.status,t.title,t.detail,t.code))}return Promise.reject(c(e.response.status,e.response.statusText))})}}function c(e,t,n,r){return{error:!0,status:e,description:t,message:n,code:r}}e.exports.clapi=a,e.exports.initialize=(e=>{s.log("api client initialized with config:"),s.log(e),a.client=r.newInstance(e)})},function(e,t,n){const r=n(21),s=n(6),i=n(2).sdk;e.exports={newInstance:function(e){return new this.ApiClient(e)},newRequest:function(e,t){return new this.ApiRequest(e,t)},ApiRequest:class{constructor(e="/",t="get"){this.path=e||"/",this.params={},this.method=t||"get",this.body=null,this.headers={}}setPath(e){return this.path=e,this}setParams(e){return this.params=e,this}setMethod(e){return this.method=e,this}setBody(e){return this.body=e,this}setHeaders(e){return this.headers=e,this}},ApiClient:class{constructor(e){!function(e){if(s.log("config verification..."),null==e)throw"missing config";if(null==e.base_url)throw"missing base_url";s.log("config ok.")}(e),this.config=e,this.auth_attempts=0,function(e){r.defaults.baseURL=e.base_url,r.defaults.headers.common.Accept="application/vnd.api+json",i.trace&&(r.interceptors.request.use(e=>(s.log(),s.log("REQUEST --\x3e"),s.log(e),e)),r.interceptors.response.use(e=>(s.log(),s.log("<-- RESPONSE"),s.log(e.data),e)))}(e)}authenticate(){return r.post("/oauth/token",{grant_type:"client_credentials",client_id:this.config.client_id,scope:"market:"+this.config.market_id}).then(e=>e.data.access_token)}call(e){const t=(null!=this.config.base_path?this.config.base_path:"")+e.path,n=e.params,i=e.method;let o=t;if(null!=n&&Object.keys(n).length>0){var a=Object.keys(n).map(e=>e+"="+n[e]).join("&");o=o.concat("?").concat(a)}let u={url:o,method:i||"get",timeout:this.config.timeout||1e3,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json"}};s.extendMap(u.headers,e.headers),null!=e.body&&(u.data=e.body);if(null==this.config.access_token){if(s.log("access_token null, authentication required"),this.auth_attempts++>1)throw"Reached maximum number of authentications attempts: 1";return this.authenticate().then(t=>(this.config.access_token=t,this.auth_attempts=0,s.log("authentication successful"),this.call(e)))}return s.log("executing api call ..."),u.headers.Authorization="Bearer "+this.config.access_token,r.request(u).then(e=>(s.log("api call successful"),e)).catch(t=>{s.log("error detected");const n=t.response.data.errors;return 401===t.response.status&&n&&"INVALID_TOKEN"==n[0].code?(s.log("invalid token, access denied"),this.config.access_token=null,this.call(e)):Promise.reject(t)})}}}},function(e,t,n){e.exports=n(22)},function(e,t,n){"use strict";var r=n(0),s=n(10),i=n(24),o=n(5);function a(e){var t=new i(e),n=s(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var u=a(o);u.Axios=i,u.create=function(e){return a(r.merge(o,e))},u.Cancel=n(14),u.CancelToken=n(39),u.isCancel=n(13),u.all=function(e){return Promise.all(e)},u.spread=n(40),e.exports=u,e.exports.default=u},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
/*!
* Determine if an object is a Buffer

@@ -8,9 +15,2 @@ *

*/
e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var o=n(4),i=n(0),a=n(28),r=n(29);function s(e){this.defaults=e,this.interceptors={request:new a,response:new a}}s.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(o,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[r,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){s.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){s.prototype[e]=function(t,n,o){return this.request(i.merge(o||{},{method:e,url:t,data:n}))}}),e.exports=s},function(e,t){var n,o,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{o="function"==typeof clearTimeout?clearTimeout:r}catch(e){o=r}}();var c,u=[],p=!1,l=-1;function d(){p&&c&&(p=!1,c.length?u=c.concat(u):l=-1,u.length&&f())}function f(){if(!p){var e=s(d);p=!0;for(var t=u.length;t;){for(c=u,u=[];++l<t;)c&&c[l].run();l=-1,t=u.length}c=null,p=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===r||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new g(e,t)),1!==u.length||p||s(f)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";var o=n(0);e.exports=function(e,t){o.forEach(e,function(n,o){o!==t&&o.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[o])})}},function(e,t,n){"use strict";var o=n(9);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(o("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,o,i){return e.config=t,n&&(e.code=n),e.request=o,e.response=i,e}},function(e,t,n){"use strict";var o=n(0);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(o.isURLSearchParams(t))a=t.toString();else{var r=[];o.forEach(t,function(e,t){null!=e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),r.push(i(t)+"="+i(e))}))}),a=r.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},function(e,t,n){"use strict";var o=n(0),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,r={};return e?(o.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=o.trim(e.substr(0,a)).toLowerCase(),n=o.trim(e.substr(a+1)),t){if(r[t]&&i.indexOf(t)>=0)return;r[t]="set-cookie"===t?(r[t]?r[t]:[]).concat([n]):r[t]?r[t]+", "+n:n}}),r):r}},function(e,t,n){"use strict";var o=n(0);e.exports=o.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var o=e;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=o.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,n,a=String(e),r="",s=0,c=o;a.charAt(0|s)||(c="=",s%1);r+=c.charAt(63&t>>8-s%1*8)){if((n=a.charCodeAt(s+=.75))>255)throw new i;t=t<<8|n}return r}},function(e,t,n){"use strict";var o=n(0);e.exports=o.isStandardBrowserEnv()?{write:function(e,t,n,i,a,r){var s=[];s.push(e+"="+encodeURIComponent(t)),o.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),o.isString(i)&&s.push("path="+i),o.isString(a)&&s.push("domain="+a),!0===r&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var o=n(0);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},function(e,t,n){"use strict";var o=n(0),i=n(30),a=n(10),r=n(4),s=n(31),c=n(32);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return u(e),e.baseURL&&!s(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||r.adapter)(e).then(function(t){return u(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(u(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var o=n(0);e.exports=function(e,t,n){return o.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var o=n(11);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){var o,i;
/*!
* JavaScript Cookie v2.2.0
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/!function(a){if(void 0===(i="function"==typeof(o=a)?o.call(t,n,t,e):o)||(e.exports=i),!0,e.exports=a(),!!0){var r=window.Cookies,s=window.Cookies=a();s.noConflict=function(){return window.Cookies=r,s}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var o in n)t[o]=n[o]}return t}return function t(n){function o(t,i,a){var r;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(a=e({path:"/"},o.defaults,a)).expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*a.expires),a.expires=s}a.expires=a.expires?a.expires.toUTCString():"";try{r=JSON.stringify(i),/^[\{\[]/.test(r)&&(i=r)}catch(e){}i=n.write?n.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var c="";for(var u in a)a[u]&&(c+="; "+u,!0!==a[u]&&(c+="="+a[u]));return document.cookie=t+"="+i+c}t||(r={});for(var p=document.cookie?document.cookie.split("; "):[],l=/(%[0-9A-Z]{2})+/g,d=0;d<p.length;d++){var f=p[d].split("="),g=f.slice(1).join("=");this.json||'"'!==g.charAt(0)||(g=g.slice(1,-1));try{var h=f[0].replace(l,decodeURIComponent);if(g=n.read?n.read(g,h):n(g,h)||g.replace(l,decodeURIComponent),this.json)try{g=JSON.parse(g)}catch(e){}if(t===h){r=g;break}t||(r[h]=g)}catch(e){}}return r}}return o.set=o,o.get=function(e){return o.call(o,e)},o.getJSON=function(){return o.apply({json:!0},[].slice.call(arguments))},o.defaults={},o.remove=function(t,n){o(t,"",e(n,{expires:-1}))},o.withConverter=t,o}(function(){})})},function(e,t,n){const o=n(2),i=(n(3),n(12),n(14)),a=n(6),r=n(1);e.exports={setVariantSelect:function(){$variantSelect=o.variantSelect,$variantSelect?$variantSelect.addEventListener("change",function(e){$selectedOption=$variantSelect.options[this.selectedIndex],a.getInventory($selectedOption.value,$selectedOption.dataset.skuName)}):($variants=o.variants,$variants.forEach(function(e){e.addEventListener("click",function(e){a.getInventory(this.value,this.dataset.skuName)})}))},setAddToShoppingBag:function(){$addToBag=o.addToBag,$addToBag&&$addToBag.addEventListener("click",function(e){e.preventDefault(),orderPromise=r.getOrderToken()?a.getOrder():a.createOrder(),orderPromise.then(function(e){a.createLineItem(e.id,$addToBag.dataset.skuId,$addToBag.dataset.skuName,$addToBag.dataset.skuImageUrl).then(function(e){a.getOrder(),i.openShoppingBag()}).catch(function(e){if(e.response)switch(e.response.status){case 422:i.displayUnavailableMessage()}})})})},setShoppingBagToggle:function(){$shoppingBagToggle=o.shoppingBagToggle,$shoppingBagToggle&&$shoppingBagToggle.addEventListener("click",function(e){e.preventDefault(),i.toggleShoppingBag()})}}}]);
e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var r=n(5),s=n(0),i=n(34),o=n(35);function a(e){this.defaults=e,this.interceptors={request:new i,response:new i}}a.prototype.request=function(e){"string"==typeof e&&(e=s.merge({url:arguments[0]},arguments[1])),(e=s.merge(r,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[o,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},s.forEach(["delete","get","head","options"],function(e){a.prototype[e]=function(t,n){return this.request(s.merge(n||{},{method:e,url:t}))}}),s.forEach(["post","put","patch"],function(e){a.prototype[e]=function(t,n,r){return this.request(s.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=a},function(e,t){var n,r,s=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var u,c=[],p=!1,l=-1;function d(){p&&u&&(p=!1,u.length?c=u.concat(c):l=-1,c.length&&h())}function h(){if(!p){var e=a(d);p=!0;for(var t=c.length;t;){for(u=c,c=[];++l<t;)u&&u[l].run();l=-1,t=c.length}u=null,p=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function m(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new g(e,t)),1!==c.length||p||a(h)},g.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.prependListener=m,s.prependOnceListener=m,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(12);e.exports=function(e,t,n){var s=n.config.validateStatus;n.status&&s&&!s(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,s){return e.config=t,n&&(e.code=n),e.request=r,e.response=s,e}},function(e,t,n){"use strict";var r=n(0);function s(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var o=[];r.forEach(t,function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),o.push(s(t)+"="+s(e))}))}),i=o.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},function(e,t,n){"use strict";var r=n(0),s=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,o={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(o[t]&&s.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}}),o):o}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function s(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=s(window.location.href),function(t){var n=r.isString(t)?s(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function s(){this.message="String contains an invalid character"}s.prototype=new Error,s.prototype.code=5,s.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,n,i=String(e),o="",a=0,u=r;i.charAt(0|a)||(u="=",a%1);o+=u.charAt(63&t>>8-a%1*8)){if((n=i.charCodeAt(a+=.75))>255)throw new s;t=t<<8|n}return o}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,s,i,o){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(s)&&a.push("path="+s),r.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(0);function s(){this.handlers=[]}s.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},s.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},s.prototype.forEach=function(e){r.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=s},function(e,t,n){"use strict";var r=n(0),s=n(36),i=n(13),o=n(5),a=n(37),u=n(38);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!a(e.url)&&(e.url=u(e.baseURL,e.url)),e.headers=e.headers||{},e.data=s(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return c(e),t.data=s(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=s(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(14);function s(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new r(e),t(n.reason))})}s.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},s.source=function(){var e;return{token:new s(function(t){e=t}),cancel:e}},e.exports=s},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){const r=n(42);e.exports.serialize=(e=>null==e?e:null==e.data?new s(e).serialize():e),e.exports.deserialize=(e=>r(e));class s{constructor(e={}){null!=e&&(this.data={},this.data.attributes={},Object.keys(e).forEach(t=>{let n=e[t];null!=n&&(["id","type"].includes(t)?this.data[t]=n:n.isApiResource&&n.isApiResource()?(null==this.data.relationships&&(this.data.relationships={}),this.data.relationships[t.startsWith("__")?t.substr("__".length):t]={data:{type:n.type,id:n.id}}):this.data.attributes[t]=n)}))}serialize(){return{data:this.data}}}},function(e,t,n){var r,s,i;s=[],void 0===(i="function"==typeof(r=function(){function e(r,s){if(!(this instanceof e)){var i=new e(r);return s?i.get(s):i}if("string"==typeof r&&(r=JSON.parse(r)),!r||!r.data)throw new Error("Invalid json api normalizer input");var o,a,u,c;this.dataset=r,this.isCollection=t(r.data),this.haystack=(o=r.included,a=this.isCollection?r.data:[r.data],u=[],n(c=o||[],function(e){u.push(e.type+"@"+e.id)}),n(a,function(e){u.indexOf(e.type+"@"+e.id)<0&&c.push(e)}),c)}function t(e){return e instanceof Array}function n(e,n,r){if(t(e))for(var s=e.length,i=0;i<s;i++)n.call(r,e[i],i);else for(var o in e)e.hasOwnProperty(o)&&n.call(r,o,e[o])}function r(e,t,r){var s=[];return n(e,function(e,n){s.push(t.call(r,e,n))}),s}function s(s,a,u){var c={};return n(s,function(n,s){if(s)c[n]=function(e,n,s,a){var u=s.relationships&&s.relationships[e]&&s.relationships[e].data,c=u&&o(u,a);return t(c)?r(c,function(e){return i(n,e,a)}):c?i(n,c,a):void 0}(n,s,a,u);else{var p=a.relationships&&a.relationships[n]&&a.relationships[n].data;if(p){var l=o(p,u);c[n]=l?new e({data:l,included:u}):void 0}else c[n]=function(e,t){return["id","type"].indexOf(e)>=0?t[e]:t.attributes[e]}(n,a)}}),c}function i(t,n,r){return a.call(new e({data:n,included:r}),t)}function o(e,s){var i=[],o=t(e)?r(e,function(e){return e.type+"@"+e.id}):[e.type+"@"+e.id];return n(s,function(e){o.indexOf(e.type+"@"+e.id)>=0&&i.push(e)}),0===i.length?void 0:1!==i.length||t(e)?i:i[0]}function a(e){return this.isCollection?r(this.dataset.data,function(t){return s(e,t,this.haystack)},this):s(e,this.dataset.data,this.haystack)}return e.prototype.get=function(e){var s,i,o=a.call(this,(s=t(e)?e:[e],i={},n(s,function(e){var t=e.split(".");t.length>1?function e(t,n){for(var r in n)n.hasOwnProperty(r)&&("object"==typeof n[r]&&null!==n[r]?(void 0===t[r]&&(t[r]={}),e(t[r],n[r])):t[r]=n[r]);return t}(i,function(e){for(var t={},n=t,r=e.length,s=0;s<r;s++)n=n[e[s]]=n[e[s]]||(s+1===r?void 0:{});return t}(t)):i[e]=void 0}),i));return this.isCollection?t(e)?o:r(o,function(t){return t[e]}):t(e)?o:o[e]},e})?r.apply(t,s):r)||(e.exports=i)},function(e,t){class n{constructor(e,t){this.id=e,this.type=t,this.reference=void 0,this.metadata=void 0,this.created_at=void 0,this.updated_at=void 0}isApiResource(){return!0}setResource(e,t){null!=t&&t.isApiResource&&t.isApiResource()&&(this["__".concat(e)]=t)}getResource(e){return this["__".concat(e)]}}e.exports={Address:class extends n{constructor(e,t={}){super(e,"addresses"),this.business=t.business,this.first_name=t.first_name,this.last_name=t.last_name,this.company=t.company,this.line_1=t.line_1,this.line_2=t.line_2,this.city=t.city,this.zip_code=t.zip_code,this.state_code=t.state_code,this.country_code=t.country_code,this.phone=t.phone,this.email=t.email,this.notes=t.notes,this.lat=t.lat,this.lng=filds.lng,this.billing_info=t.billing_info}set geocoder(e){super.setResource("geocoder",e)}get geocoder(){return super.getResource("geocoder")}},CreditCard:class extends n{constructor(e,t={}){super(e,"credit_cards"),this.first_name=t.first_name,this.last_name=t.last_name,this.number=t.number,this.month=t.month,this.year=t.year,this.verification_value=t.verification_value}set order(e){super.setResource("order",e)}get order(){return super.getResource("order")}},Customer:class extends n{constructor(e,t={}){super(e,"customers"),this.email=t.email}set customer_group(e){super.setResource("customer_group",e)}get customer_group(){return super.getResource("customer_group")}},CustomerAddress:class extends n{constructor(e,t={}){super(e,"customer_addresses"),this.name=t.name}set customer(e){super.setResource("customer",e)}get customer(){return super.getResource("customer")}set order(e){super.setResource("order",e)}get order(){return super.getResource("order")}},CustomerGroup:class extends n{constructor(e,t={}){super(e,"customer_groups")}set price_list(e){super.setResource("price_list",e)}get price_list(){return super.getResource("price_list")}},CustomerPasswordReset:class extends n{constructor(e,t={}){super(e,"customer_password_resets"),this.customer_email=t.customer_email}},CustomerPaymentSource:class extends n{constructor(e,t={}){super(e,"customer_payment_sources")}set customer(e){super.setResource("customer",e)}get customer(){return super.getResource("customer")}set payment_source(e){super.setResource("payment_source",e)}get payment_source(){return super.getResource("payment_source")}},DeliveryLeadTime:class extends n{constructor(e,t={}){super(e,"delivery_lead_times"),this.min_hours=t.min_hours,this.max_hours=t.max_hours}set stock_location(e){super.setResource("stock_location",e)}get stock_location(){return super.getResource("stock_location")}set shipping_method(e){super.setResource("shipping_method",e)}get shipping_method(){return super.getResource("shipping_method")}},Import:class extends n{constructor(e,t={}){super(e,"imports"),this.resource_type=t.resource_type,this.parent_resource_id=t.parent_resource_id,this.inputs=t.inputs,this.cleanup_records=t.cleanup_records}},InventoryModel:class extends n{constructor(e,t={}){super(e,"inventory_models"),this.name=t.name}},LineItem:class extends n{constructor(e,t={}){super(e,"line_items"),this.sku_code=t.sku_code,this.quantity=t.quantity,this.update_quantity=t._update_quantity,this.name=t.name,this.image_url=t.image_url,this.order=t.order,this.item=t.item}set update_quantity(e){this._update_quantity=e?"1":null}set order(e){super.setResource("order",e)}get order(){return super.getResource("order")}},LineItemOption:class extends n{constructor(e,t={}){super(e,"line_item_options"),this.name=t.name,this.quantity=t.quantity,this.options=t.options}set line_item(e){super.setResource("line_item",e)}get line_item(){return super.getResource("line_item")}set sku_option(e){super.setResource("sku_option",e)}get sku_option(){return super.getResource("sku_option")}},Market:class extends n{constructor(e,t={}){super(e,"markets"),this.name=t.name,this.facebook_pixel_id=t.facebook_pixel_id}set merchant(e){super.setResource("merchant",e)}get merchant(){return super.getResource("merchant")}set price_list(e){super.setResource("price_list",e)}get price_list(){return super.getResource("price_list")}set inventory_model(e){super.setResource("inventory_model",e)}get inventory_model(){return super.getResource("inventory_model")}},Merchant:class extends n{constructor(e,t={}){super(e,"merchants"),this.name=t.name}set address(e){super.setResource("address",e)}get address(){return super.getResource("address")}},Order:class extends n{constructor(e,t={}){super(e,"orders"),this.guest=t.guest,this.customer_email=t.customer_email,this.customer_password=t.customer_password,this.language_code=t.language_code,this.shipping_country_code_lock=t.shipping_country_code_lock,this.coupon_code=t.coupon_code,this.cart_url=t.cart_url,this.return_url=t.return_url,this.terms_url=t.terms_url,this.privacy_url=t.privacy_url}set market(e){super.setResource("market",e)}get market(){return super.getResource("market")}set customer(e){super.setResource("customer",e)}get customer(){return super.getResource("customer")}set shipping_address(e){super.setResource("shipping_address",e)}get shipping_address(){return super.getResource("shipping_address")}set billing_address(e){super.setResource("billing_address",e)}get billing_address(){return super.getResource("billing_address")}set payment_method(e){super.setResource("payment_method",e)}get payment_method(){return super.getResource("payment_method")}set payment_source(e){super.setResource("payment_source",e)}get payment_source(){return super.getResource("payment_source")}},Parcel:class extends n{constructor(e,t={}){super(e,"parcels"),this.weight=t.weight,this.unit_of_weight=t.unit_of_weight,this.eel_pfc=t.eel_pfc,this.contents_type=t.contents_type,this.contents_explanation=t.contents_explanation,this.customs_certify=t.customs_certify,this.customs_signer=t.customs_signer,this.non_delivery_option=t.non_delivery_option,this.restriction_type=t.restriction_type,this.restriction_comments=t.restriction_comments,this.customs_info_required=t.customs_info_required}set shipment(e){super.setResource("shipment",e)}get shipment(){return super.getResource("shipment")}},PaymentMethod:class extends n{constructor(e,t={}){super(e,"payment_methods"),this.payment_source_type=t.payment_source_type,this.price_amount_cents=t.price_amount_cents}set market(e){super.setResource("market",e)}get market(){return super.getResource("market")}set payment_gateway(e){super.setResource("payment_gateway",e)}get payment_gateway(){return super.getResource("payment_gateway")}},PaypalPayment:class extends n{constructor(e,t={}){super(e,"paypal_payments"),this.return_url=t.return_url,this.cancel_url=t.cancel_url,this.note_to_payer=t.note_to_payer}set order(e){super.setResource("order",e)}get order(){return super.getResource("order")}},Price:class extends n{constructor(e,t={}){super(e,"prices"),this.sku_code=t.sku_code,this.amount_cents=t.amount_cents,this.compare_at_amount_cents=t.compare_at_amount_cents}set price_list(e){super.setResource("price_list",e)}get price_list(){return super.getResource("price_list")}set sku(e){super.setResource("sku",e)}get sku(){return super.getResource("sku")}},PriceList:class extends n{constructor(e,t={}){super(e,"price_lists"),this.name=t.name,this.currency_code=t.currency_code,this.tax_included=t.tax_included}},Shipment:class extends n{constructor(e,t={}){super(e,"shipments")}},ShippingCategory:class extends n{constructor(e,t={}){super(e,"shipping_categories"),this.name=t.name}},ShippingMethod:class extends n{constructor(e,t={}){super(e,"shipping_methods"),this.name=t.name,this.price_amount_cents=t.price_amount_cents,this.free_over_amount_cents=t.free_over_amount_cents}set market(e){super.setResource("market",e)}get market(){return super.getResource("market")}set shipping_zone(e){super.setResource("shipping_zone",e)}get shipping_zone(){return super.getResource("shipping_zone")}set shipping_category(e){super.setResource("shipping_category",e)}get shipping_category(){return super.getResource("shipping_category")}},ShippingZone:class extends n{constructor(e,t={}){super(e,"shipping_zones"),this.name=t.name,this.country_code_regex=t.country_code_regex,this.not_country_code_regex=t.not_country_code_regex,this.state_code_regex=t.state_code_regex,this.not_state_code_regex=t.not_state_code_regex,this.zip_code_regex=t.zip_code_regex,this.not_zip_code_regex=t.not_zip_code_regex}},Sku:class extends n{constructor(e,t={}){super(e,"skus"),this.code=t.code,this.name=t.name,this.description=t.description,this.image_url=t.image_url,this.tag_names=t.tag_names,this.pieces_per_pack=t.pieces_per_pack,this.weight=t.weight,this.unit_of_weight=t.unit_of_weight}set shipping_category(e){super.setResource("shipping_category",e)}get shipping_category(){return super.getResource("shipping_category")}},SkuOption:class extends n{constructor(e,t={}){super(e,"sku_options"),this.name=t.name,this.price_amount_cents=t.price_amount_cents,this.delay_hours=t.delay_hours,this.sku_code_regex=t.sku_code_regex}set market(e){super.setResource("market",e)}get market(){return super.getResource("market")}},StockItem:class extends n{constructor(e,t={}){super(e,"stock_items"),this.sku_code=t.sku_code,this.quantity=t.quantity}set stock_location(e){super.setResource("stock_location",e)}get stock_location(){return super.getResource("stock_location")}set sku(e){super.setResource("sku",e)}get sku(){return super.getResource("sku")}},StockLevel:class extends n{constructor(e,t={}){super(e,"stock_levels"),this.priority=t.priority,this.on_hold=t.on_hold}set stock_location(e){super.setResource("stock_location",e)}get stock_location(){return super.getResource("stock_location")}set inventory_model(e){super.setResource("inventory_model",e)}get inventory_model(){return super.getResource("inventory_model")}},StockLocation:class extends n{constructor(e,t={}){super(e,"stock_locations"),this.name=t.name,this.label_format=t.label_format}set address(e){super.setResource("address",e)}get address(){return super.getResource("address")}},Webhook:class extends n{constructor(e,t={}){super(e,"webhooks"),this.topic=t.topic,this.callback_url=t.callback_url,this.include_resources=t.include_resources}},WireTransfer:class extends n{constructor(e,t={}){super(e,"wire_transfers")}set order(e){super.setResource("order",e)}get order(){return super.getResource("order")}}}},function(e,t){e.exports={QueryFilter:class{constructor(){this.clear()}clear(){this.sort_fields=[],this.sparse_fieldsets={},this.included_resources=[],this.filter_fields={},this.custom_params={},this.page_number=void 0,this.page_size=void 0}isQueryFilter(){return!0}sort(e,t){return this.sort_fields.push((t?"-":"").concat(e)),this}fields(e,...t){return null!=t&&(this.sparse_fieldsets[e]=t),this}include(...e){return null!=e&&this.included_resources.push(e),this}filter(e,t){return null!=e&&null!=t&&(this.filter_fields[e]=t),this}param(e,t){return null!=e&&null!=t&&(this.custom_params[e]=t),this}page(e,t){return this.page_number=e,this.page_size=t,this}build(e){let t={};return Object.keys(this.filter_fields).length>0&&Object.keys(this.filter_fields).forEach(e=>{t[`filter[${e}]`]=this.filter_fields[e]}),Object.keys(this.included_resources).length>0&&(t.include=this.included_resources.join(",")),Object.keys(this.sparse_fieldsets).length>0&&Object.keys(this.sparse_fieldsets).forEach(e=>{t[`fields[${e}]`]=this.sparse_fieldsets[e].join(",")}),Object.keys(this.sort_fields).length>0&&(t.sort=this.sort_fields.join(",")),Object.keys(this.custom_params).length>0&&Object.keys(this.custom_params).forEach(e=>{t[e]=this.custom_params[e]}),null!=this.page_number&&(t["page[number]"]=this.page_number),null!=this.page_size&&(t["page[size]"]=this.page_size),e?Object.keys(t).map(e=>e+"="+t[e]).join("&"):t}}}},function(e,t,n){const r=n(1),s=n(8),i=n(7),o=n(4);e.exports={setVariantSelect:function(){$variantSelect=r.variantSelect,$variantSelect?$variantSelect.addEventListener("change",function(e){$selectedOption=$variantSelect.options[this.selectedIndex],i.getInventory($selectedOption.value,$selectedOption.dataset.skuName)}):($variants=r.variants,$variants.forEach(function(e){e.addEventListener("click",function(e){i.getInventory(this.value,this.dataset.skuName)})}))},setAddToShoppingBag:function(){$addToBag=r.addToBag,$addToBag&&$addToBag.addEventListener("click",function(e){e.preventDefault(),orderPromise=o.getOrderToken()?i.getOrder():i.createOrder(),orderPromise.then(function(e){i.createLineItem(e.get("id")[0],$addToBag.dataset.skuId,$addToBag.dataset.skuName,$addToBag.dataset.skuImageUrl).then(function(e){i.getOrder(),s.openShoppingBag()}).catch(function(e){if(e.response)switch(e.response.status){case 422:s.displayUnavailableMessage()}})})})},setShoppingBagToggle:function(){$shoppingBagToggle=r.shoppingBagToggle,$shoppingBagToggle&&$shoppingBagToggle.addEventListener("click",function(e){e.preventDefault(),s.toggleShoppingBag()})}}}]);
{
"name": "commercelayer",
"version": "1.5.6",
"version": "1.5.7",
"description": "The Official Commerce Layer JS library",

@@ -5,0 +5,0 @@ "main": "./src/main.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc