@swell/apps-sdk 1.0.107 → 1.0.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +9 -9
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";var Rt=Object.create;var X3=Object.defineProperty;var Dt=Object.getOwnPropertyDescriptor;var xt=Object.getOwnPropertyNames;var jt=Object.getPrototypeOf,Zt=Object.prototype.hasOwnProperty;var v5=(n,e)=>{for(var t in e)X3(n,t,{get:e[t],enumerable:!0})},R5=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of xt(e))!Zt.call(n,r)&&r!==t&&X3(n,r,{get:()=>e[r],enumerable:!(i=Dt(e,r))||i.enumerable});return n};var r3=(n,e,t)=>(t=n!=null?Rt(jt(n)):{},R5(e||!n||!n.__esModule?X3(t,"default",{value:n,enumerable:!0}):t,n)),Ft=n=>R5(X3({},"__esModule",{value:!0}),n);var si={};v5(si,{DEFAULT_QUERY_PAGE_LIMIT:()=>O4,DeferredShopifyResource:()=>i3,FILE_DATA_INCLUDE_QUERY:()=>l4,GEO_DATA:()=>W4,LANG_TO_COUNTRY_CODES:()=>J4,LiquidSwell:()=>Z3,MAX_QUERY_PAGE_LIMIT:()=>V4,MockRecordResource:()=>_5,MockRecordSingleton:()=>M5,PageError:()=>I3,PageNotFound:()=>H3,SECTION_GROUP_CONTENT:()=>q3,ShopifyArticle:()=>_3,ShopifyBlog:()=>L4,ShopifyCart:()=>k3,ShopifyCollection:()=>B,ShopifyCollections:()=>A4,ShopifyCompatibility:()=>A3,ShopifyCustomer:()=>Q,ShopifyFont:()=>M3,ShopifyForm:()=>V3,ShopifyLink:()=>E3,ShopifyLocalization:()=>P3,ShopifyOrder:()=>l3,ShopifyPage:()=>E4,ShopifyPaginate:()=>L3,ShopifyPredictiveSearch:()=>_4,ShopifyProduct:()=>P,ShopifyRecommendations:()=>M4,ShopifyResource:()=>y,ShopifySearch:()=>P4,ShopifyVariant:()=>$,StorefrontResource:()=>_,Swell:()=>b5,SwellBackendAPI:()=>F4,SwellError:()=>J3,SwellStorefrontCollection:()=>L,SwellStorefrontPagination:()=>D3,SwellStorefrontRecord:()=>A,SwellStorefrontResource:()=>y3,SwellStorefrontSingleton:()=>W,SwellTheme:()=>s5,ThemeColor:()=>S,ThemeFont:()=>D,ThemeForm:()=>J,ThemeFormErrors:()=>r4,adaptShopifyFontData:()=>R4,adaptShopifyFormData:()=>D4,adaptShopifyMenuData:()=>v4,arrayToObject:()=>o5,deferMenuItemUrlAndResource:()=>h3,dehydrateSwellRefsInStorefrontResources:()=>pt,extractSettingsFromForm:()=>T3,findCircularReferences:()=>E6,findEditorSetting:()=>d5,findThemeSettingsByType:()=>l5,fontMap:()=>n4,forEachKeyDeep:()=>k5,getAllSections:()=>h5,getBlog:()=>$6,getBlogs:()=>O6,getCategories:()=>B6,getCategory:()=>At,getCategoryWithProducts:()=>q6,getContentEntry:()=>T5,getContentList:()=>Tt,getContentModel:()=>G6,getCountryCodeFromLocale:()=>M6,getEasyblocksBackend:()=>Et,getEasyblocksComponentDefinitions:()=>ni,getEasyblocksPagePropsWithConfigs:()=>ii,getEasyblocksPageTemplate:()=>Mt,getEasyblocksPropsFromThemeConfigs:()=>U6,getLayoutSectionGroups:()=>c5,getMenuItemStorefrontUrl:()=>c3,getMenuItemUrlAndResource:()=>q2,getMenuItemValueId:()=>B2,getPage:()=>V6,getPageSections:()=>S4,getProduct:()=>I6,getProducts:()=>A5,getProductsFiltered:()=>H6,getSectionGroupProp:()=>u3,getSectionSettingsFromProps:()=>ht,getThemeSettingsFromProps:()=>dt,isArray:()=>_6,isObject:()=>U,md5:()=>a3,removeCircularReferences:()=>P6,resolveAsyncResources:()=>I,resolveLookupCollection:()=>V2,resolveMenuItemUrlAndResource:()=>I2,resolveMenuItems:()=>n5,resolveMenuSettings:()=>i5,resolveSectionSettings:()=>y4,resolveThemeSettings:()=>B3,scopeCustomCSS:()=>u5,stringifyQueryParams:()=>O,systemFonts:()=>qt,toBase64:()=>S5});module.exports=Ft(si);var Lt=r3(require("swell-js"),1),bt=r3(require("qs"),1);var L5=require("keyv"),gt=require("cache-manager");var e4=class{namespace;store;constructor(e){this.store=e,this.namespace="dummy"}async has(e){return this.get(e)!==void 0}async get(e){return this.store.get(e)}async set(e,t){return this.store.put(e,t)}async delete(e){await this.store.delete(e)}async clear(){let e="",t=!1;for(;!t;){let i=await this.store.list({prefix:`${this.namespace}:`,cursor:e||void 0});e=i.cursor??"",t=i.list_complete,i.keys.length>0&&await Promise.all(i.keys.map(r=>this.store.delete(r.name)))}}};var mt=r3(require("qs"),1),Z4=require("lodash-es");var G4=require("lodash-es");var t4=require("liquidjs");var C3=class extends t4.Drop{i;length;name;test="test";index;index0;first;last;rindex;rindex0;constructor(e,t,i){super(),this.length=e,this.name=`${i}-${t}`,this.i=0,this.index=1,this.index0=0,this.first=!0,this.last=!1,this.rindex=e,this.rindex0=e-1}next(){this.i+=1,this.index+=1,this.index0+=1,this.first=!1,this.last=this.i===this.length-1,this.rindex-=1,this.rindex0-=1}valueOf(){return JSON.stringify(this)}};function o3(n){return n instanceof t4.Drop&&g3(n.valueOf)?n.valueOf():n}function D5(n){return typeof n=="string"}function B4(n){return typeof n=="number"}function g3(n){return typeof n=="function"}function Nt(n){return n==null}function f3(n){return Object.prototype.toString.call(n)==="[object Array]"}function R(n){switch(typeof n){case"object":case"function":return n!==null;default:return!1}}function It(n){return R(n)&&Symbol.iterator in n}function v(n){return R(n)&&typeof n.then=="function"}function x5(n,e){return!Ht(n,e)}function Ht(n,e){return e.opts.jsTruthy?!n:n===!1||n===void 0||n===null}function R3(n){return R(n)&&g3(n.equals)}function Bt(n){return n=o3(n),f3(n)?n:D5(n)&&n.length>0?[n]:It(n)?Array.from(n):R(n)?Object.entries(n).reduce((e,[t,i])=>(e.push({id:t,...i}),e),[]):[]}async function w3(n){if(n instanceof L)return await n._get(),[...n];if(n instanceof t4.Drop&&Symbol.iterator in n){let e=n[Symbol.iterator];if(typeof e=="function")return[...await e.call(n)]}return Array.isArray(n)?n:Bt(n)}function q4(n){return n=o3(n),D5(n)?n:Nt(n)?"":f3(n)?n.map(e=>q4(e)).join(""):String(n)}function N(n){if(Array.isArray(n))return n.reduce((e,t,i)=>{if(Array.isArray(t)){let[r,o]=t;e[r]=o}else i%2===0&&(e[t]=n[i+1]);return e},{});if(R(n)){let e={},t=Object.values(n);for(let i=0;i<t.length;i+=2)e[t[i]]=t[i+1];return e}return{}}async function i4(n,e=0){let t=n;t instanceof _&&(t=await t.resolve()),typeof t>"u"?t=null:await j5(t);let i=new WeakSet;return JSON.stringify(t,(r,o)=>{if(R(o)){if(i.has(o))return;i.add(o)}return o},e)}async function j5(n,e=new WeakSet){await Z5(n,async(t,i)=>{if(!R(i))return;let r=i[t];if(v(r))i[t]=await r,await j5(i[t],e);else if(R(r)){if(e.has(r))return!1;e.add(r)}})}async function Z5(n,e){if(R(n))for(let[t,i]of Object.entries(n))await e(t,n)!==!1&&R(i)&&await Z5(i,e)}var V4=100,O4=15,_=class{_getter;_getterHash;_result;_compatibilityProps={};constructor(e){return e&&this._setGetter(e),this._getProxy()}_getProxy(){return new Proxy(this,{get(e,t){let i=e;switch(t){case"toLiquid":case"next":return;case"then":return!1;case"toJSON":case"toObject":return()=>i.toObject();default:break}if(typeof i[t]=="function"||typeof t=="string"&&t.startsWith("_"))return i[t];if(typeof t=="symbol")return t===Symbol.toStringTag?v(i._result)?"[object Promise]":i._result!==void 0?"[object Object]":"undefined":i[t];if(i._result===void 0){if(i[t]!==void 0)return i[t];i._result=i._get().catch(r=>(console.log(r),i._getCollectionResultOrProp(i,t)))}return v(i._result)?i._result.then(()=>i._getCollectionResultOrProp(i,t)).catch(r=>(console.log(r),null)):i._getCollectionResultOrProp(i,t)},set(e,t,i){return e[t]=i,!0},ownKeys(e){if(typeof e._isEmpty=="function"&&e._isEmpty())return[];let t=Object.getOwnPropertyNames(e),i=Object.getOwnPropertySymbols(e);return[...t,...i]}})}_getCollectionResultOrProp(e,t){if(e._result&&Array.isArray(e._result.results)){let i=e._result.results.find(r=>r.slug===t||r.id===t)||(typeof t=="number"?e._result.results[t]:void 0);if(i)return i}return t in e._compatibilityProps?e._compatibilityProps[t]:e._result&&t in e._result?e._result[t]:e[t]}async _get(...e){if(this._getter){let t=this._getter.bind(this);return Promise.resolve().then(()=>t()).then(i=>(this._result=i,i&&Object.assign(this,i),i)).catch(i=>(console.log(i),null))}return this._result}_setGetter(e){this._getter=e,this._getterHash=a3(e.toString())}async _resolve(){return this._result===void 0?this._get():this._result}_isResultResolved(){return this._result!==void 0&&!v(this._result)}async resolve(e=!0,t=!1){let i={},r=await this._resolve();return r===null?null:(Object.assign(i,r),Object.assign(i,this._compatibilityProps),I(i,e,t))}toObject(){if(this._result===null)return null;let e={};return Object.assign(e,this._result),Object.assign(e,this._compatibilityProps),e}toJSON(){return this.toObject()}valueOf(){return this.resolve()}setCompatibilityProps(e){this._compatibilityProps=e}[Symbol.toPrimitive](e){return this._id}getCompatibilityProp(e){return this._compatibilityProps[e]}},y3=class extends _{_swell;_resource;_resourceName;_collection;_query={};_compatibilityInstance=null;constructor(e,t,i){return super(i),this._swell=e,this._collection=t,this._getProxy()}_getProxy(){return super._getProxy()}getResourceObject(){let{_swell:e,_collection:t}=this;if(this._resource=(e?.storefront)[t],e&&t.startsWith("content/")){let i=t.split("/")[1]?.replace(/\/$/,"").trim();this._resource={list:r=>e.storefront.content.list(i,r),get:(r,o)=>e.storefront.content.get(i,r,o)}}if(!this._resource?.get)throw new Error(`Swell storefront resource for collection '${t}' does not exist.`);return this._resource}},L=class n extends y3{length=0;results;count;page;pages;page_count;limit=O4;name;constructor(e,t,i={},r){return super(e,t,r),this._query=this._initQuery(i),r||this._setGetter(this._defaultGetter()),this._getProxy()}_getProxy(){return super._getProxy()}_initQuery(e){let t=e||{};return t.limit>V4||t.limit===null?t.limit=V4:t.limit||(t.limit=O4),this.limit=t.limit,t}_defaultGetter(){let e=this.getResourceObject();async function t(){return e.list(this._query)}return t}async _get(e={}){if(this._query={...this._query,...e},this._getter){let t=this._getter;this._result=this._swell.getCachedResource("storefront-list",[this._collection,this._query,this._swell.queryParams,this._getterHash],async()=>t.call(this)).then(i=>(this._result=i,i&&Object.assign(this,i,{length:i.results?.length||0}),i)).catch(i=>(console.log(i),null))}return this._result}[Symbol.iterator](){return this.iterator()}iterator(){return(this.results||[]).values()}_clone(e){let t=new n(this._swell,this._collection,this._query,this._getter);return this._isResultResolved()&&(t._result=(0,G4.cloneDeep)(this._result)),this._compatibilityProps&&t.setCompatibilityProps(this._compatibilityProps),e!==void 0&&(Object.assign(t,e),e._getter&&t._setGetter(e._getter)),t}_cloneWithCompatibilityResult(e){let t=this._getter,i=this._clone({_getter:async()=>{let r=await t?.call(i);if(r){let o=e(r);return{...r,...o||void 0}}return r}});if(this._isResultResolved()){let r=(0,G4.cloneDeep)(this._result);if(r){let o=e(r);Object.assign(i,r),o&&Object.assign(i,o)}}return i}},A=class extends y3{_id;constructor(e,t,i,r={},o){return super(e,t,o),this._id=i,this._query=r,o||this._setGetter(this._defaultGetter()),this._getProxy()}_getProxy(){return super._getProxy()}_defaultGetter(){let e=this.getResourceObject();async function t(){return e.get(this._id,this._query)}return t}async _get(e,t={}){this._id=e||this._id;let{currency:i,locale:r}=this._swell.getStorefrontLocalization();if(this._query={...this._query,...t,$currency:i,$locale:r},this._getter){let o=this._getter;this._result=this._swell.getCachedResource("storefront-record",[this._collection,this._id,this._query,this._swell.queryParams,this._getterHash],async()=>o.call(this)).then(a=>(this._result=a,a&&Object.assign(this,a),a)).catch(a=>(console.log(a),null))}return this._result}},W=class extends y3{constructor(e,t,i){return super(e,t,i),i||this._setGetter(this._defaultGetter()),this._getProxy()}_getProxy(){return super._getProxy()}_defaultGetter(){let{_collection:e,_swell:{storefrontContext:t}}=this,i=this.getResourceObject();async function r(){return t[e]!==void 0?t[e]:i.get()}return r}async _get(){if(this._getter){let e=this._getter;this._result=Promise.resolve().then(()=>e.call(this)).then(t=>(this._result=t,t&&Object.assign(this,t),t)).catch(t=>(console.log(t),null))}return this._result}},D3=class{_resource;count=0;page=0;page_count=0;limit=0;pages={};next;previous;constructor(e){this._resource=e,this.setPaginationProps()}setPaginationProps(){let{_resource:e}=this;if(this.count=e.count||0,this.page=e.page||0,this.page_count=e.page_count||0,this.limit=e.limit||0,this.pages={},e.pages)for(let[r,o]of Object.entries(e.pages))this.pages[r]={start:o.start,end:o.end,url:this.getPageUrl(Number(r))};let t=this.pages[this.page+1];this.next=t?{start:t.start,end:t.end,url:this.getPageUrl(this.page+1)}:void 0;let i=this.pages[this.page-1];this.previous=i?{start:i.start,end:i.end,url:this.getPageUrl(this.page-1)}:void 0}getPageUrl(e){let{url:t,queryParams:i}=this._resource._swell;return`${t.pathname}?${O({...i,page:e})}`}setCompatibilityProps(e){Object.assign(this,e)}};var v3=require("lodash-es");var j4=require("lodash-es");var n4=[{family:"monospace",label:"Monospace",fallback:"Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:600,ital:1}],system:!0},{family:"serif",label:"Serif",fallback:"Iowan Old Style, Apple Garamond, Baskerville, Times New Roman, Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:600,ital:1}],system:!0},{family:"sans-serif",label:"Sans-serif",fallback:"BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Helvetica Neue, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:600,ital:1}],system:!0},{family:"Abel",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Abril Fatface",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Alegreya",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Alegreya Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Amiri",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Anonymous Pro",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Arapey",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1}]},{family:"Archivo",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Archivo Narrow",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Arimo",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Armata",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Arvo",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Asap",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Assistant",fallback:"sans-serif",axes:["wght"],variants:[{wght:200},{wght:300},{wght:400},{wght:600},{wght:700},{wght:800}]},{family:"Asul",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"Bio Rhyme",fallback:"serif",axes:["wght"],variants:[{wght:200},{wght:300},{wght:400},{wght:700},{wght:800}]},{family:"Bitter",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700}]},{family:"Cabin",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Cardo",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700}]},{family:"Catamaran",fallback:"serif",axes:["wght"],variants:[{wght:100},{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"Chivo",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Cormorant",fallback:"serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Crimson Text",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"DM Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Domine",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"Dosis",fallback:"sans-serif",axes:["wght"],variants:[{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800}]},{family:"Eczar",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:600},{wght:700},{wght:800}]},{family:"Fira Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Fjalla One",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Glegoo",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"IBM Plex Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Inconsolata",fallback:"sans-serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"Inknut Antiqua",fallback:"serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"Inter",fallback:"sans-serif",axes:["wght"],variants:[{wght:100},{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"Josefin Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Josefin Slab",fallback:"serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Kalam",fallback:"sans-serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:700}]},{family:"Karla",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Kreon",fallback:"serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:700}]},{family:"Lato",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Libre Baskerville",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700}]},{family:"Libre Franklin",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Lobster",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Lobster Two",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Lora",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Maven Pro",fallback:"sans-serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:700},{wght:900}]},{family:"Megrim",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Merriweather Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1}]},{family:"Montserrat",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Mouse Memoirs",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Muli",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Neuton",fallback:"serif",axes:["wght","ital"],variants:[{wght:200},{wght:300},{wght:400},{wght:400,ital:1},{wght:700},{wght:800}]},{family:"News Cycle",fallback:"sans-serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"Newsreader",fallback:"serif",axes:["wght","ital"],variants:[{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1}]},{family:"Nobile",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Noticia Text",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Noto Serif",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Nunito",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Nunito Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Old Standard TT",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700}]},{family:"Open Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1}]},{family:"Open Sans Condensed",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:700}]},{family:"Oswald",fallback:"sans-serif",axes:["wght"],variants:[{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700}]},{family:"Ovo",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Oxygen",fallback:"sans-serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:700}]},{family:"PT Mono",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"PT Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"PT Sans Narrow",fallback:"sans-serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"PT Serif",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Pacifico",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Playball",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Playfair Display",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Poppins",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Prata",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Prompt",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Proza Libre",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1}]},{family:"Quantico",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Quattrocento",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"Quattrocento Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Questrial",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Quicksand",fallback:"sans-serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:500},{wght:700}]},{family:"Rajdhani",fallback:"sans-serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:500},{wght:600},{wght:700}]},{family:"Raleway",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Righteous",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Roboto",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Roboto Condensed",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Roboto Mono",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Roboto Slab",fallback:"serif",axes:["wght"],variants:[{wght:100},{wght:300},{wght:400},{wght:700}]},{family:"Rubik",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Shadows Into Light",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Slabo 13px",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Smooch",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Source Code Pro",fallback:"sans-serif",axes:["wght"],variants:[{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:900}]},{family:"Source Sans Pro",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Space Mono",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Syne",fallback:"sans-serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:600},{wght:700},{wght:800}]},{family:"Tenor Sans",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Tinos",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Titillium Web",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:900}]},{family:"Ubuntu",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Unica One",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Unna",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Varela",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Varela Round",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Vidaloka",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Volkhov",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Vollkorn",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Work Sans",fallback:"sans-serif",axes:["wght"],variants:[{wght:100},{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"BIZ UDPMincho",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"Dela Gothic One",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Hina Mincho",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Kaisei Decol",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:700}]},{family:"Kaisei Opti",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:700}]},{family:"Kaisei Tokumin",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:700},{wght:800}]},{family:"M PLUS 1",fallback:"sans-serif",axes:["wght"],variants:[{wght:100},{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"M PLUS Rounded 1c",fallback:"sans-serif",axes:["wght"],variants:[{wght:100},{wght:300},{wght:400},{wght:500},{wght:700},{wght:800},{wght:900}]},{family:"Mochiy Pop P One",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Murecho",fallback:"sans-serif",axes:["wght"],variants:[{wght:100},{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"Noto Sans Japanese",fallback:"sans-serif",axes:["wght"],variants:[{wght:100},{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"Noto Serif Japanese",fallback:"sans-serif",axes:["wght"],variants:[{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:900}]},{family:"Shippori Mincho",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:600},{wght:700},{wght:800}]},{family:"Zen Kaku Gothic New",fallback:"sans-serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:500},{wght:700},{wght:900}]},{family:"Zen Kurenaido",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Zen Maru Gothic",fallback:"sans-serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:500},{wght:700},{wght:900}]},{family:"Zen Old Mincho",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:600},{wght:700},{wght:900}]}],qt=n4.filter(n=>n.system).map(n=>n.family);var D=class n{id="";family="sans-serif";weight=400;style="normal";fallback_families="sans-serif";system=!0;variant={wght:400};variants=[];definition;constructor(e){let t,i,r,o;typeof e=="string"?{family:t,style:i,weight:r,variant:o}=n.stringToSetting(e):e&&({family:t,style:i,weight:r,variant:o}=n.resolveSetting(e)),t&&(this.id=typeof e=="string"?e:n.settingToString({family:t,weight:r,style:i,variant:o}),this.family=t,this.style=i||"normal",r&&(this.weight=r),o&&(this.variant=o),this.definition=n.findByFamily(t),this.definition&&(this.fallback_families=this.definition.fallback,this.system=this.definition.system||!1))}static get(e){return F5(e)?e:new n(e)}static clone(e){return F5(e)?new n(n.get(e).toString()):new n(e)}static findByFamily(e){return e?n4.find(t=>t.family.toLowerCase()===e.toLowerCase()):void 0}static stringToSetting(e){let[t,i]=e.split(":"),[r,o]=i?.toLowerCase().split("@")||[],a=r?.split(",")||[],s=o?.split(",")||[],l=Number.parseInt(s[a.indexOf("wght")],10);return{family:t,weight:l,style:a.includes("ital")?"italic":a.includes("slnt")?"oblique":"normal",variant:{wght:l,wdth:a.includes("wdth")?Number.parseInt(s[a.indexOf("wdth")],10):void 0,slnt:a.includes("slnt")?Number.parseInt(s[a.indexOf("slnt")],10):void 0,opsz:a.includes("opsz")?Number.parseInt(s[a.indexOf("opsz")],10):void 0,ital:a.includes("ital")?Number.parseInt(s[a.indexOf("ital")],10):void 0}}}static settingToString(e){let{family:t,variant:i}=n.resolveSetting(e);return`${t}:${n.variantToString(i)}`}static variantToString(e){let t=[],i=[];e.ital!==void 0&&(t.push("ital"),i.push(e.ital||0)),e.opsz!==void 0&&(t.push("opsz"),i.push(e.opsz||0)),e.slnt!==void 0&&(t.push("slnt"),i.push(e.slnt||0)),e.wdth!==void 0&&(t.push("wdth"),i.push(e.wdth||0)),t.push("wght"),i.push(e.wght);let r=t.join(","),o=i.join(",");return`${r}@${o}`}static resolveSetting(e){let{family:t,style:i,weight:r,variant:o}=e,a=n.findByFamily(t),s=typeof o?.wdth=="number"?o.wdth:void 0,l=typeof o?.ital=="number"?o.ital:i==="italic"?a?.variants.find(d=>d.ital&&d.ital>0)?.ital:void 0,h=typeof o?.opsz=="number"?o.opsz:void 0,u=typeof o?.slnt=="number"?o.slnt:i==="oblique"?a?.variants.find(d=>d.slnt&&d.slnt>0)?.slnt:void 0;return{family:t,weight:r||o?.wght,style:l!==void 0?"italic":u!==void 0?"oblique":"normal",variant:{wght:r||o?.wght,wdth:s,slnt:u,opsz:h,ital:l}}}static combinedGoogleFontUrl(e){let t=e.map(r=>n.get(r)),i=[];for(let r of t){let o=r.googleFamily();i.includes(o)||i.push(o)}return`https://fonts.googleapis.com/css2?family=${i.join("&family=")}&display=swap`}toString(){return this.id}googleFamily(){if(this.definition){let e=this.definition.axes.sort(),t=this.definition.variants.map(i=>e.map(r=>i[r]||0).join(",")).sort();return`${this.family}:${e.join(",")}@${t.join(";")}`}return""}url(){return`https://fonts.googleapis.com/css2?family=${this.googleFamily()}&display=swap`}face(e={}){return`
|
|
1
|
+
"use strict";var Rt=Object.create;var X3=Object.defineProperty;var Dt=Object.getOwnPropertyDescriptor;var xt=Object.getOwnPropertyNames;var jt=Object.getPrototypeOf,Zt=Object.prototype.hasOwnProperty;var v5=(n,e)=>{for(var t in e)X3(n,t,{get:e[t],enumerable:!0})},R5=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of xt(e))!Zt.call(n,r)&&r!==t&&X3(n,r,{get:()=>e[r],enumerable:!(i=Dt(e,r))||i.enumerable});return n};var o3=(n,e,t)=>(t=n!=null?Rt(jt(n)):{},R5(e||!n||!n.__esModule?X3(t,"default",{value:n,enumerable:!0}):t,n)),Ft=n=>R5(X3({},"__esModule",{value:!0}),n);var si={};v5(si,{DEFAULT_QUERY_PAGE_LIMIT:()=>O4,DeferredShopifyResource:()=>n3,FILE_DATA_INCLUDE_QUERY:()=>l4,GEO_DATA:()=>W4,LANG_TO_COUNTRY_CODES:()=>J4,LiquidSwell:()=>Z3,MAX_QUERY_PAGE_LIMIT:()=>V4,MockRecordResource:()=>_5,MockRecordSingleton:()=>M5,PageError:()=>I3,PageNotFound:()=>H3,SECTION_GROUP_CONTENT:()=>q3,ShopifyArticle:()=>_3,ShopifyBlog:()=>L4,ShopifyCart:()=>k3,ShopifyCollection:()=>B,ShopifyCollections:()=>A4,ShopifyCompatibility:()=>A3,ShopifyCustomer:()=>X,ShopifyFont:()=>M3,ShopifyForm:()=>V3,ShopifyLink:()=>E3,ShopifyLocalization:()=>P3,ShopifyOrder:()=>l3,ShopifyPage:()=>E4,ShopifyPaginate:()=>L3,ShopifyPredictiveSearch:()=>_4,ShopifyProduct:()=>P,ShopifyRecommendations:()=>M4,ShopifyResource:()=>y,ShopifySearch:()=>P4,ShopifyVariant:()=>$,StorefrontResource:()=>_,Swell:()=>b5,SwellBackendAPI:()=>F4,SwellError:()=>J3,SwellStorefrontCollection:()=>L,SwellStorefrontPagination:()=>D3,SwellStorefrontRecord:()=>A,SwellStorefrontResource:()=>y3,SwellStorefrontSingleton:()=>W,SwellTheme:()=>s5,ThemeColor:()=>S,ThemeFont:()=>D,ThemeForm:()=>Y,ThemeFormErrors:()=>r4,adaptShopifyFontData:()=>R4,adaptShopifyFormData:()=>D4,adaptShopifyMenuData:()=>v4,arrayToObject:()=>o5,deferMenuItemUrlAndResource:()=>h3,dehydrateSwellRefsInStorefrontResources:()=>pt,extractSettingsFromForm:()=>T3,findCircularReferences:()=>E6,findEditorSetting:()=>d5,findThemeSettingsByType:()=>l5,fontMap:()=>n4,forEachKeyDeep:()=>k5,getAllSections:()=>h5,getBlog:()=>$6,getBlogs:()=>O6,getCategories:()=>B6,getCategory:()=>At,getCategoryWithProducts:()=>q6,getContentEntry:()=>T5,getContentList:()=>Tt,getContentModel:()=>G6,getCountryCodeFromLocale:()=>M6,getEasyblocksBackend:()=>Et,getEasyblocksComponentDefinitions:()=>ni,getEasyblocksPagePropsWithConfigs:()=>ii,getEasyblocksPageTemplate:()=>Mt,getEasyblocksPropsFromThemeConfigs:()=>U6,getLayoutSectionGroups:()=>c5,getMenuItemStorefrontUrl:()=>c3,getMenuItemUrlAndResource:()=>q2,getMenuItemValueId:()=>B2,getPage:()=>V6,getPageSections:()=>S4,getProduct:()=>I6,getProducts:()=>A5,getProductsFiltered:()=>H6,getSectionGroupProp:()=>u3,getSectionSettingsFromProps:()=>ht,getThemeSettingsFromProps:()=>dt,isArray:()=>_6,isObject:()=>U,md5:()=>J,removeCircularReferences:()=>P6,resolveAsyncResources:()=>I,resolveLookupCollection:()=>V2,resolveMenuItemUrlAndResource:()=>I2,resolveMenuItems:()=>n5,resolveMenuSettings:()=>i5,resolveSectionSettings:()=>y4,resolveThemeSettings:()=>B3,scopeCustomCSS:()=>u5,stringifyQueryParams:()=>O,systemFonts:()=>qt,toBase64:()=>S5});module.exports=Ft(si);var Lt=o3(require("swell-js"),1),bt=o3(require("qs"),1);var L5=require("keyv"),gt=require("cache-manager");var e4=class{namespace;store;constructor(e){this.store=e,this.namespace="dummy"}async has(e){return this.get(e)!==void 0}async get(e){return this.store.get(e)}async set(e,t){return this.store.put(e,t)}async delete(e){await this.store.delete(e)}async clear(){let e="",t=!1;for(;!t;){let i=await this.store.list({prefix:`${this.namespace}:`,cursor:e||void 0});e=i.cursor??"",t=i.list_complete,i.keys.length>0&&await Promise.all(i.keys.map(r=>this.store.delete(r.name)))}}};var mt=o3(require("qs"),1),Z4=require("lodash-es");var G4=require("lodash-es");var t4=require("liquidjs");var C3=class extends t4.Drop{i;length;name;test="test";index;index0;first;last;rindex;rindex0;constructor(e,t,i){super(),this.length=e,this.name=`${i}-${t}`,this.i=0,this.index=1,this.index0=0,this.first=!0,this.last=!1,this.rindex=e,this.rindex0=e-1}next(){this.i+=1,this.index+=1,this.index0+=1,this.first=!1,this.last=this.i===this.length-1,this.rindex-=1,this.rindex0-=1}valueOf(){return JSON.stringify(this)}};function a3(n){return n instanceof t4.Drop&&g3(n.valueOf)?n.valueOf():n}function D5(n){return typeof n=="string"}function B4(n){return typeof n=="number"}function g3(n){return typeof n=="function"}function Nt(n){return n==null}function f3(n){return Object.prototype.toString.call(n)==="[object Array]"}function R(n){switch(typeof n){case"object":case"function":return n!==null;default:return!1}}function It(n){return R(n)&&Symbol.iterator in n}function v(n){return R(n)&&typeof n.then=="function"}function x5(n,e){return!Ht(n,e)}function Ht(n,e){return e.opts.jsTruthy?!n:n===!1||n===void 0||n===null}function R3(n){return R(n)&&g3(n.equals)}function Bt(n){return n=a3(n),f3(n)?n:D5(n)&&n.length>0?[n]:It(n)?Array.from(n):R(n)?Object.entries(n).reduce((e,[t,i])=>(e.push({id:t,...i}),e),[]):[]}async function w3(n){if(n instanceof L)return await n._get(),[...n];if(n instanceof t4.Drop&&Symbol.iterator in n){let e=n[Symbol.iterator];if(typeof e=="function")return[...await e.call(n)]}return Array.isArray(n)?n:Bt(n)}function q4(n){return n=a3(n),D5(n)?n:Nt(n)?"":f3(n)?n.map(e=>q4(e)).join(""):String(n)}function N(n){if(Array.isArray(n))return n.reduce((e,t,i)=>{if(Array.isArray(t)){let[r,o]=t;e[r]=o}else i%2===0&&(e[t]=n[i+1]);return e},{});if(R(n)){let e={},t=Object.values(n);for(let i=0;i<t.length;i+=2)e[t[i]]=t[i+1];return e}return{}}async function i4(n,e=0){let t=n;t instanceof _&&(t=await t.resolve()),typeof t>"u"?t=null:await j5(t);let i=new WeakSet;return JSON.stringify(t,(r,o)=>{if(R(o)){if(i.has(o))return;i.add(o)}return o},e)}async function j5(n,e=new WeakSet){await Z5(n,async(t,i)=>{if(!R(i))return;let r=i[t];if(v(r))i[t]=await r,await j5(i[t],e);else if(R(r)){if(e.has(r))return!1;e.add(r)}})}async function Z5(n,e){if(R(n))for(let[t,i]of Object.entries(n))await e(t,n)!==!1&&R(i)&&await Z5(i,e)}var V4=100,O4=15,_=class{_getter;_getterHash;_result;_compatibilityProps={};constructor(e){return e&&this._setGetter(e),this._getProxy()}_getProxy(){return new Proxy(this,{get(e,t){let i=e;switch(t){case"toLiquid":case"next":return;case"then":return!1;case"toJSON":case"toObject":return()=>i.toObject();default:break}if(typeof i[t]=="function"||typeof t=="string"&&t.startsWith("_"))return i[t];if(typeof t=="symbol")return t===Symbol.toStringTag?v(i._result)?"[object Promise]":i._result!==void 0?"[object Object]":"undefined":i[t];if(i._result===void 0){if(i[t]!==void 0)return i[t];i._result=i._get().catch(r=>(console.log(r),i._getCollectionResultOrProp(i,t)))}return v(i._result)?i._result.then(()=>i._getCollectionResultOrProp(i,t)).catch(r=>(console.log(r),null)):i._getCollectionResultOrProp(i,t)},set(e,t,i){return e[t]=i,!0},ownKeys(e){if(typeof e._isEmpty=="function"&&e._isEmpty())return[];let t=Object.getOwnPropertyNames(e),i=Object.getOwnPropertySymbols(e);return[...t,...i]}})}_getCollectionResultOrProp(e,t){if(e._result&&Array.isArray(e._result.results)){let i=e._result.results.find(r=>r.slug===t||r.id===t)||(typeof t=="number"?e._result.results[t]:void 0);if(i)return i}return t in e._compatibilityProps?e._compatibilityProps[t]:e._result&&t in e._result?e._result[t]:e[t]}async _get(...e){if(this._getter){let t=this._getter.bind(this);return Promise.resolve().then(()=>t()).then(i=>(this._result=i,i&&Object.assign(this,i),i)).catch(i=>(console.log(i),null))}return this._result}_setGetter(e){this._getter=e,this._getterHash=J(e.toString())}async _resolve(){return this._result===void 0?this._get():this._result}_isResultResolved(){return this._result!==void 0&&!v(this._result)}async resolve(e=!0,t=!1){let i={},r=await this._resolve();return r===null?null:(Object.assign(i,r),Object.assign(i,this._compatibilityProps),I(i,e,t))}toObject(){if(this._result===null)return null;let e={};return Object.assign(e,this._result),Object.assign(e,this._compatibilityProps),e}toJSON(){return this.toObject()}valueOf(){return this.resolve()}setCompatibilityProps(e){this._compatibilityProps=e}[Symbol.toPrimitive](e){return this._id}getCompatibilityProp(e){return this._compatibilityProps[e]}},y3=class extends _{_swell;_resource;_resourceName;_collection;_query={};_compatibilityInstance=null;constructor(e,t,i){return super(i),this._swell=e,this._collection=t,this._getProxy()}_getProxy(){return super._getProxy()}getResourceObject(){let{_swell:e,_collection:t}=this;if(this._resource=(e?.storefront)[t],e&&t.startsWith("content/")){let i=t.split("/")[1]?.replace(/\/$/,"").trim();this._resource={list:r=>e.storefront.content.list(i,r),get:(r,o)=>e.storefront.content.get(i,r,o)}}if(!this._resource?.get)throw new Error(`Swell storefront resource for collection '${t}' does not exist.`);return this._resource}},L=class n extends y3{length=0;results;count;page;pages;page_count;limit=O4;name;constructor(e,t,i={},r){return super(e,t,r),this._query=this._initQuery(i),r||this._setGetter(this._defaultGetter()),this._getProxy()}_getProxy(){return super._getProxy()}_initQuery(e){let t=e||{};return t.limit>V4||t.limit===null?t.limit=V4:t.limit||(t.limit=O4),this.limit=t.limit,t}_defaultGetter(){let e=this.getResourceObject();async function t(){return e.list(this._query)}return t}async _get(e={}){if(this._query={...this._query,...e},this._getter){let t=this._getter;this._result=this._swell.getCachedResource("storefront-list",[this._collection,this._query,this._swell.queryParams,this._getterHash],async()=>t.call(this)).then(i=>(this._result=i,i&&Object.assign(this,i,{length:i.results?.length||0}),i)).catch(i=>(console.log(i),null))}return this._result}[Symbol.iterator](){return this.iterator()}iterator(){return(this.results||[]).values()}_clone(e){let t=new n(this._swell,this._collection,this._query,this._getter);return this._isResultResolved()&&(t._result=(0,G4.cloneDeep)(this._result)),this._compatibilityProps&&t.setCompatibilityProps(this._compatibilityProps),e!==void 0&&(Object.assign(t,e),e._getter&&t._setGetter(e._getter)),t}_cloneWithCompatibilityResult(e){let t=this._getter,i=this._clone({_getter:async()=>{let r=await t?.call(i);if(r){let o=e(r);return{...r,...o||void 0}}return r}});if(this._isResultResolved()){let r=(0,G4.cloneDeep)(this._result);if(r){let o=e(r);Object.assign(i,r),o&&Object.assign(i,o)}}return i}},A=class extends y3{_id;constructor(e,t,i,r={},o){return super(e,t,o),this._id=i,this._query=r,o||this._setGetter(this._defaultGetter()),this._getProxy()}_getProxy(){return super._getProxy()}_defaultGetter(){let e=this.getResourceObject();async function t(){return e.get(this._id,this._query)}return t}async _get(e,t={}){this._id=e||this._id;let{currency:i,locale:r}=this._swell.getStorefrontLocalization();if(this._query={...this._query,...t,$currency:i,$locale:r},this._getter){let o=this._getter;this._result=this._swell.getCachedResource("storefront-record",[this._collection,this._id,this._query,this._swell.queryParams,this._getterHash],async()=>o.call(this)).then(a=>(this._result=a,a&&Object.assign(this,a),a)).catch(a=>(console.log(a),null))}return this._result}},W=class extends y3{constructor(e,t,i){return super(e,t,i),i||this._setGetter(this._defaultGetter()),this._getProxy()}_getProxy(){return super._getProxy()}_defaultGetter(){let{_collection:e,_swell:{storefrontContext:t}}=this,i=this.getResourceObject();async function r(){return t[e]!==void 0?t[e]:i.get()}return r}async _get(){if(this._getter){let e=this._getter;this._result=Promise.resolve().then(()=>e.call(this)).then(t=>(this._result=t,t&&Object.assign(this,t),t)).catch(t=>(console.log(t),null))}return this._result}},D3=class{_resource;count=0;page=0;page_count=0;limit=0;pages={};next;previous;constructor(e){this._resource=e,this.setPaginationProps()}setPaginationProps(){let{_resource:e}=this;if(this.count=e.count||0,this.page=e.page||0,this.page_count=e.page_count||0,this.limit=e.limit||0,this.pages={},e.pages)for(let[r,o]of Object.entries(e.pages))this.pages[r]={start:o.start,end:o.end,url:this.getPageUrl(Number(r))};let t=this.pages[this.page+1];this.next=t?{start:t.start,end:t.end,url:this.getPageUrl(this.page+1)}:void 0;let i=this.pages[this.page-1];this.previous=i?{start:i.start,end:i.end,url:this.getPageUrl(this.page-1)}:void 0}getPageUrl(e){let{url:t,queryParams:i}=this._resource._swell;return`${t.pathname}?${O({...i,page:e})}`}setCompatibilityProps(e){Object.assign(this,e)}};var v3=require("lodash-es");var j4=require("lodash-es");var n4=[{family:"monospace",label:"Monospace",fallback:"Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:600,ital:1}],system:!0},{family:"serif",label:"Serif",fallback:"Iowan Old Style, Apple Garamond, Baskerville, Times New Roman, Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:600,ital:1}],system:!0},{family:"sans-serif",label:"Sans-serif",fallback:"BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Helvetica Neue, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:600,ital:1}],system:!0},{family:"Abel",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Abril Fatface",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Alegreya",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Alegreya Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Amiri",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Anonymous Pro",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Arapey",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1}]},{family:"Archivo",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Archivo Narrow",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Arimo",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Armata",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Arvo",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Asap",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Assistant",fallback:"sans-serif",axes:["wght"],variants:[{wght:200},{wght:300},{wght:400},{wght:600},{wght:700},{wght:800}]},{family:"Asul",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"Bio Rhyme",fallback:"serif",axes:["wght"],variants:[{wght:200},{wght:300},{wght:400},{wght:700},{wght:800}]},{family:"Bitter",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700}]},{family:"Cabin",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Cardo",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700}]},{family:"Catamaran",fallback:"serif",axes:["wght"],variants:[{wght:100},{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"Chivo",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Cormorant",fallback:"serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Crimson Text",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"DM Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Domine",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"Dosis",fallback:"sans-serif",axes:["wght"],variants:[{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800}]},{family:"Eczar",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:600},{wght:700},{wght:800}]},{family:"Fira Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Fjalla One",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Glegoo",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"IBM Plex Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Inconsolata",fallback:"sans-serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"Inknut Antiqua",fallback:"serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"Inter",fallback:"sans-serif",axes:["wght"],variants:[{wght:100},{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"Josefin Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Josefin Slab",fallback:"serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Kalam",fallback:"sans-serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:700}]},{family:"Karla",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Kreon",fallback:"serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:700}]},{family:"Lato",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Libre Baskerville",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700}]},{family:"Libre Franklin",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Lobster",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Lobster Two",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Lora",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Maven Pro",fallback:"sans-serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:700},{wght:900}]},{family:"Megrim",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Merriweather Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1}]},{family:"Montserrat",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Mouse Memoirs",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Muli",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Neuton",fallback:"serif",axes:["wght","ital"],variants:[{wght:200},{wght:300},{wght:400},{wght:400,ital:1},{wght:700},{wght:800}]},{family:"News Cycle",fallback:"sans-serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"Newsreader",fallback:"serif",axes:["wght","ital"],variants:[{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1}]},{family:"Nobile",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Noticia Text",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Noto Serif",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Nunito",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Nunito Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Old Standard TT",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700}]},{family:"Open Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1}]},{family:"Open Sans Condensed",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:700}]},{family:"Oswald",fallback:"sans-serif",axes:["wght"],variants:[{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700}]},{family:"Ovo",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Oxygen",fallback:"sans-serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:700}]},{family:"PT Mono",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"PT Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"PT Sans Narrow",fallback:"sans-serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"PT Serif",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Pacifico",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Playball",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Playfair Display",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Poppins",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Prata",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Prompt",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Proza Libre",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1}]},{family:"Quantico",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Quattrocento",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"Quattrocento Sans",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Questrial",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Quicksand",fallback:"sans-serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:500},{wght:700}]},{family:"Rajdhani",fallback:"sans-serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:500},{wght:600},{wght:700}]},{family:"Raleway",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:800},{wght:800,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Righteous",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Roboto",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Roboto Condensed",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Roboto Mono",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:100},{wght:100,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Roboto Slab",fallback:"serif",axes:["wght"],variants:[{wght:100},{wght:300},{wght:400},{wght:700}]},{family:"Rubik",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Shadows Into Light",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Slabo 13px",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Smooch",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Source Code Pro",fallback:"sans-serif",axes:["wght"],variants:[{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:900}]},{family:"Source Sans Pro",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Space Mono",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Syne",fallback:"sans-serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:600},{wght:700},{wght:800}]},{family:"Tenor Sans",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Tinos",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Titillium Web",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:200},{wght:200,ital:1},{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:900}]},{family:"Ubuntu",fallback:"sans-serif",axes:["wght","ital"],variants:[{wght:300},{wght:300,ital:1},{wght:400},{wght:400,ital:1},{wght:500},{wght:500,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Unica One",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Unna",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Varela",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Varela Round",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Vidaloka",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Volkhov",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:700},{wght:700,ital:1}]},{family:"Vollkorn",fallback:"serif",axes:["wght","ital"],variants:[{wght:400},{wght:400,ital:1},{wght:600},{wght:600,ital:1},{wght:700},{wght:700,ital:1},{wght:900},{wght:900,ital:1}]},{family:"Work Sans",fallback:"sans-serif",axes:["wght"],variants:[{wght:100},{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"BIZ UDPMincho",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:700}]},{family:"Dela Gothic One",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Hina Mincho",fallback:"serif",axes:["wght"],variants:[{wght:400}]},{family:"Kaisei Decol",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:700}]},{family:"Kaisei Opti",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:700}]},{family:"Kaisei Tokumin",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:700},{wght:800}]},{family:"M PLUS 1",fallback:"sans-serif",axes:["wght"],variants:[{wght:100},{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"M PLUS Rounded 1c",fallback:"sans-serif",axes:["wght"],variants:[{wght:100},{wght:300},{wght:400},{wght:500},{wght:700},{wght:800},{wght:900}]},{family:"Mochiy Pop P One",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Murecho",fallback:"sans-serif",axes:["wght"],variants:[{wght:100},{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"Noto Sans Japanese",fallback:"sans-serif",axes:["wght"],variants:[{wght:100},{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:800},{wght:900}]},{family:"Noto Serif Japanese",fallback:"sans-serif",axes:["wght"],variants:[{wght:200},{wght:300},{wght:400},{wght:500},{wght:600},{wght:700},{wght:900}]},{family:"Shippori Mincho",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:600},{wght:700},{wght:800}]},{family:"Zen Kaku Gothic New",fallback:"sans-serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:500},{wght:700},{wght:900}]},{family:"Zen Kurenaido",fallback:"sans-serif",axes:["wght"],variants:[{wght:400}]},{family:"Zen Maru Gothic",fallback:"sans-serif",axes:["wght"],variants:[{wght:300},{wght:400},{wght:500},{wght:700},{wght:900}]},{family:"Zen Old Mincho",fallback:"serif",axes:["wght"],variants:[{wght:400},{wght:500},{wght:600},{wght:700},{wght:900}]}],qt=n4.filter(n=>n.system).map(n=>n.family);var D=class n{id="";family="sans-serif";weight=400;style="normal";fallback_families="sans-serif";system=!0;variant={wght:400};variants=[];definition;constructor(e){let t,i,r,o;typeof e=="string"?{family:t,style:i,weight:r,variant:o}=n.stringToSetting(e):e&&({family:t,style:i,weight:r,variant:o}=n.resolveSetting(e)),t&&(this.id=typeof e=="string"?e:n.settingToString({family:t,weight:r,style:i,variant:o}),this.family=t,this.style=i||"normal",r&&(this.weight=r),o&&(this.variant=o),this.definition=n.findByFamily(t),this.definition&&(this.fallback_families=this.definition.fallback,this.system=this.definition.system||!1))}static get(e){return F5(e)?e:new n(e)}static clone(e){return F5(e)?new n(n.get(e).toString()):new n(e)}static findByFamily(e){return e?n4.find(t=>t.family.toLowerCase()===e.toLowerCase()):void 0}static stringToSetting(e){let[t,i]=e.split(":"),[r,o]=i?.toLowerCase().split("@")||[],a=r?.split(",")||[],s=o?.split(",")||[],l=Number.parseInt(s[a.indexOf("wght")],10);return{family:t,weight:l,style:a.includes("ital")?"italic":a.includes("slnt")?"oblique":"normal",variant:{wght:l,wdth:a.includes("wdth")?Number.parseInt(s[a.indexOf("wdth")],10):void 0,slnt:a.includes("slnt")?Number.parseInt(s[a.indexOf("slnt")],10):void 0,opsz:a.includes("opsz")?Number.parseInt(s[a.indexOf("opsz")],10):void 0,ital:a.includes("ital")?Number.parseInt(s[a.indexOf("ital")],10):void 0}}}static settingToString(e){let{family:t,variant:i}=n.resolveSetting(e);return`${t}:${n.variantToString(i)}`}static variantToString(e){let t=[],i=[];e.ital!==void 0&&(t.push("ital"),i.push(e.ital||0)),e.opsz!==void 0&&(t.push("opsz"),i.push(e.opsz||0)),e.slnt!==void 0&&(t.push("slnt"),i.push(e.slnt||0)),e.wdth!==void 0&&(t.push("wdth"),i.push(e.wdth||0)),t.push("wght"),i.push(e.wght);let r=t.join(","),o=i.join(",");return`${r}@${o}`}static resolveSetting(e){let{family:t,style:i,weight:r,variant:o}=e,a=n.findByFamily(t),s=typeof o?.wdth=="number"?o.wdth:void 0,l=typeof o?.ital=="number"?o.ital:i==="italic"?a?.variants.find(d=>d.ital&&d.ital>0)?.ital:void 0,h=typeof o?.opsz=="number"?o.opsz:void 0,u=typeof o?.slnt=="number"?o.slnt:i==="oblique"?a?.variants.find(d=>d.slnt&&d.slnt>0)?.slnt:void 0;return{family:t,weight:r||o?.wght,style:l!==void 0?"italic":u!==void 0?"oblique":"normal",variant:{wght:r||o?.wght,wdth:s,slnt:u,opsz:h,ital:l}}}static combinedGoogleFontUrl(e){let t=e.map(r=>n.get(r)),i=[];for(let r of t){let o=r.googleFamily();i.includes(o)||i.push(o)}return`https://fonts.googleapis.com/css2?family=${i.join("&family=")}&display=swap`}toString(){return this.id}googleFamily(){if(this.definition){let e=this.definition.axes.sort(),t=this.definition.variants.map(i=>e.map(r=>i[r]||0).join(",")).sort();return`${this.family}:${e.join(",")}@${t.join(";")}`}return""}url(){return`https://fonts.googleapis.com/css2?family=${this.googleFamily()}&display=swap`}face(e={}){return`
|
|
2
2
|
@font-face {
|
|
3
3
|
font-family: '${this.family}';
|
|
4
4
|
font-style: ${this.style};
|
|
5
5
|
font-weight: ${this.weight};${e.font_display?`
|
|
6
6
|
font-display: ${e.font_display};`:""}
|
|
7
7
|
}
|
|
8
|
-
`.replace(/^ {3} */gm,"").trim()}modify(e,t){switch(e){case"style":{if(this.resolveValidProperty(e,t)){switch(this.style=t,t){case"oblique":this.variant.slnt=1;break;case"italic":this.variant.ital=1;break;default:this.variant.slnt=0,this.variant.ital=0;break}break}return null}case"weight":{let i;switch(t){case"normal":i=400;break;case"bold":i=700;break;case"lighter":{this.weight<=400?i=100:this.weight<=700?i=400:i=700;break}case"bolder":{this.weight<400?i=400:this.weight<700?i=700:i=900;break}default:{switch(t.slice(0,1)){case"+":i=this.weight+Number.parseInt(t.slice(1),10);break;case"-":i=this.weight-Number.parseInt(t.slice(1),10);break;default:i=Number.parseInt(t,10);break}break}}let r=this.resolveValidProperty(e,i);if(r){this.weight=i,this.variant.wght=r;break}return null}case"wght":case"wdth":case"slnt":case"opsz":case"ital":{let i=this.resolveValidProperty(e,t);if(i){this.variant[e]=i,e==="slnt"&&i>0?this.style="oblique":e==="ital"&&i>0?this.style="italic":(e==="slnt"||e==="ital")&&(this.style="normal");break}return null}default:throw new Error(`Invalid font property: ${e}`)}return this.id=n.settingToString({variant:this.variant,family:this.family,weight:this.weight,style:this.style}),this}resolveValidProperty(e,t){if(!this.definition)return null;if(e==="style")switch(t){case"italic":return this.definition.axes.includes("ital")?"italic":null;case"oblique":return this.definition.axes.includes("slnt")?"oblique":null;default:return null}let i=typeof t=="string"?Number.parseInt(t,10):t;switch(e){case"wght":case"weight":return this.definition.variants.find(r=>r.wght===i)||null;case"wdth":return this.definition.variants.find(r=>r.wdth===i)||null;case"slnt":return this.definition.variants.find(r=>r.slnt===i)||null;case"opsz":return this.definition.variants.find(r=>r.opsz===i)||null;case"ital":return this.definition.variants.find(r=>r.ital===i)||null;default:return null}}};function Gt(n){return typeof n=="object"&&n!==null}function F5(n){return Gt(n)&&typeof n.style=="string"&&typeof n.family=="string"&&typeof n.weight=="number"&&typeof n.modify=="function"&&typeof n.googleFamily=="function"}var J=class{id;success=!1;errors=null;constructor(e){this.id=e}setSuccess(e=!0){this.success=e}setParams(e){Object.assign(this,e)}setErrors(e){this.errors=new r4(e)}clearErrors(){this.errors=null}},r4=class{errors;constructor(e){this.errors=e||[]}*[Symbol.iterator](){yield*this.errors}some(e,t){return this.errors.some(i=>e(i?.code),t)}};var T=require("lodash-es");function $4(n,e){return new y({directory:e.path,name:e.name,suffix:e.alt_name},"name")}function H(n,e,t,i){return e instanceof y?e.clone():new y({alt:c(e,r=>r.alt||t?.name),aspect_ratio:1,"attached_to_variant?":!0,height:w(()=>e.height),id:c(e,r=>r.file?.id),media_type:"image",position:null,presentation:{focal_point:null},preview_image:w(()=>e.file),product_id:w(()=>t?.id),src:c(e,async r=>r.file&&Vt(r.file)),variants:null,width:w(()=>e.width)})}function Vt(n){return new y({url:n.url,width:n.width,height:n.height},"url")}function Y(n,e){return e instanceof y?e.clone():new y({alt:e.alt,id:e.id||e.file?.id,media_type:"image",position:null,preview_image:e.file})}function $(n,e,t,i=0){if(e instanceof y)return e.clone();let r=t||e.product||{};return new y({available:c(e,o=>o.stock_status==="in_stock"||!o.stock_status),barcode:null,compare_at_price:w(()=>e.orig_price),featured_image:c([r,e],(o,a)=>{let s=a.images?.[0]||o.images?.[0];return s&&Y(n,s)}),featured_media:c([r,e],(o,a)=>{let s=a.images?.[0]||o.images?.[0];return s&&Y(n,s)}),id:c(e,o=>o.id),image:c([r,e],(o,a)=>{let s=a.images?.[0]||o.images?.[0];return s&&Y(n,s)}),incoming:!1,inventory_management:null,inventory_policy:null,inventory_quantity:c(e,o=>{if(!o.stock_status)return 1/0;let a=o.stock_level||0;return a<0&&(a=0),a}),matched:!1,metafields:null,next_incoming_date:null,options:Ot(r,e),selected_option_values:c([r,e],(o,a)=>K4(o,a,n.swell.queryParams)),option1:U4(r,e,0),option2:U4(r,e,1),option3:U4(r,e,2),price:c([r,e],(o,a)=>$t(o,a,n.swell.queryParams)),product:c(r,o=>P(n,o,i+1)),quantity_price_breaks:null,"quantity_price_breaks_configured?":c(e,()=>e.prices?.length>0),quantity_rule:{min:1,max:null,increment:1},requires_selling_plan:!1,requires_shipping:c(r,()=>r.delivery?.contains("shipment")),selected:!1,selected_selling_plan_allocation:null,selling_plan_allocations:null,sku:c(e,o=>o.sku),store_availabilities:null,taxable:!0,title:w(()=>e.name),unit_price:w(()=>e.price),unit_price_measurement:null,url:w(()=>r.url),weight:c(e,o=>o.weight),weight_in_unit:w(()=>e.weight_unit),weight_unit:c(e,o=>o.weight_unit)})}function Ot(n,e){return c([n,e],(t,i)=>{let r=t.options?.reduce((o,a)=>{for(let s of a.values)o[s.id]||(o[s.id]=s.name);return o},{});return i.option_value_ids?.map(o=>r[o]).filter(Boolean)})}function U4(n,e,t){return c([n,e],(i,r)=>{let o=i.options?.reduce((a,s)=>{for(let l of s.values)a[l.id]||(a[l.id]=l.name);return a},{});return r.option_value_ids?.[t]&&o[r.option_value_ids[t]]})}function $t(n,e,t){let{option_values:i=""}=t,r=i.split(","),o=n.options?.reduce((s,l)=>{if(l.variant||!l.active||!l.values||l.values.length<=0||l.input_type!=="select")return s;for(let h of l.values)if(r.includes(h.id))return s+(h.price||0);return s+(l.values[0].price||0)},0),a=n.price;return e.price!==null&&e.price!==void 0&&(a=e.price),a+(o||0)}function P(n,e,t=0){return e instanceof y?e.clone():t>1?null:new y({available:c(e,i=>i.stock_status==="in_stock"||!i.stock_status),collections:[],compare_at_price:w(()=>e.orig_price),compare_at_price_max:null,compare_at_price_min:null,compare_at_price_varies:!1,content:w(()=>e.description),created_at:w(()=>e.date_created),description:c(e,i=>i.description),featured_image:c(e,i=>i.images?.[0]&&H(n,i.images[0],i)),featured_media:c(e,i=>i.images?.[0]&&Y(n,i.images[0])),first_available_variant:c(e,i=>o4(i,{})),"gift_card?":c(e,i=>i.type==="giftcard"),handle:w(()=>e.slug),has_only_default_variant:c(e,i=>!i.options?.length),id:c(e,i=>i.id),images:c(e,i=>i.images?.map(r=>r&&H(n,r,i))),media:c(e,i=>i.images?.map(r=>Y(n,r))),metafields:null,options:c(e,i=>i.options?.map(r=>r.active&&r.name).filter(Boolean)),selected_option_values:c(e,i=>zt(i,n.swell.queryParams)),options_by_name:c(e,i=>i.options?.reduce((r,o,a)=>(o.active&&(r[o.name?.toLowerCase()]={name:o.name,position:a+1,selected_value:null,variant_option:o.variant,values:o.values?.map(s=>N5({available:!0,id:s.id,name:s.name,product_url:null,selected:!1,swatch:null,variant:null,addPrice:s.price}))}),r),{})),options_with_values:c(e,i=>{let r=o4(i,n.swell.queryParams),o=r?.option_value_ids||[];return i.options?.map((a,s)=>({name:a.name,position:s+1,selected_value:null,variant_option:a.variant,values:a.values?.map(l=>N5({available:!0,id:l.id,name:l.name,product_url:null,selected:o.includes(l.id),swatch:null,variant:r,addPrice:l.price}))}))}),price:c(e,i=>Kt(i,n.swell.queryParams)),price_max:c(e,i=>i.variants?.results?.reduce((r,o)=>Math.max(r,o.price),0)),price_min:c(e,i=>i.variants?.results?.reduce((r,o)=>Math.min(r,o.price),1/0)),price_varies:c(e,i=>i.variants?.results?.some(r=>r.price!==i.price)),published_at:w(()=>e.date_created),"quantity_price_breaks_configured?":c(e,i=>i.prices?.length>0),quantity_rule:c(e,i=>{let r=i.stock_level||0;return r<0&&(r=0),{min:1,max:i.stock_status?r:null,increment:1}}),inventory_quantity:c(e,i=>{if(!i.stock_status)return 1/0;let r=i.stock_level||0;return r<0&&(r=0),r}),requires_selling_plan:!1,selected_or_first_available_selling_plan_allocation:null,selected_or_first_available_variant:c(e,i=>{let r=o4(i,n.swell.queryParams);return r?$(n,r,i,t+1):P(n,i,t+1)}),selected_selling_plan:null,selected_variant:null,selling_plan_groups:null,tags:c(e,i=>i.tags),template_suffix:null,title:w(()=>e.name),type:c(e,i=>i.type),url:c(e,i=>`/products/${i.slug}`),variants:c(e,i=>i.variants?.results?.map(o=>$(n,o,i,t+1)).reverse()),vendor:null})}function N5(n){return new y(n,"name")}function o4(n,e){let{variant:t,option_values:i}=e,r=Ut(n),o=null;if(t)o=r.find(a=>a.id===t);else if(i){let a=i.split(",");o=r.find(s=>s.option_value_ids.every(l=>a.includes(l)))}return o||r?.[0]||null}function Ut(n){return(n.variants?.results?.slice()?.reverse()||[]).filter(e=>e.stock_status==="in_stock"||!e.stock_status)}function Kt(n,e){let{option_values:t=""}=e,i=t.split(","),r=n.options?.reduce((o,a)=>{if(!a.active||!a.values||a.values.length<=0||a.input_type!=="select")return o;for(let s of a.values)if(i.includes(s.id))return o+(s.price||0);return o+(a.values[0].price||0)},0);return n.price+(r||0)}function zt(n,e){let t=o4(n,e);return K4(n,t,e)}function K4(n,e,t){let{option_values:i=""}=t,r=i.split(","),o=e?[...e.option_value_ids||[]]:[],a=[];for(let s of n.options||[])if(s.active&&s.values?.length>0&&s.input_type==="select"){let l="",h="";for(let u of s.values){if(o.includes(u.id)){l=u.id;break}r.includes(u.id)&&(h=u.id)}a.push(l||h||s.values[0].id)}return a}function S3(n,e,t,i={}){return new y({...e,discount_allocations:e.discounts?.map(r=>{let o=t.discounts?.find(s=>s.id===r.id),a=(o?.source_id===t.coupon_id?t.coupon?.name:t.promotions?.results?.find(s=>o?.source_id===s.id)?.name)||o?.source_id;return[{amount:r.amount,discount_application:o&&{target_selection:o.type==="order"?"all":["shipment","product"].includes(o.type)?"entitled":"explicit",target_type:o.type==="shipment"?"shipping_line":"line_item",title:a,total_allocated_amount:o.amount,type:o.type==="promo"?"automatic":o.type==="coupon"?"discount_code":"manual",value:o.rule?.value_type==="fixed"?o.rule?.value_fixed:o.rule?.value_percent,value_type:o.rule?.value_type==="fixed"?"fixed_amount":"percentage"}}]}),error_message:null,final_line_price:a4(e)?0:e.price_total-e.discount_total,final_price:a4(e)?0:e.price-e.discount_each,fulfillment_service:"manual",gift_card:e.delivery==="giftcard",grams:e.shipment_weight,id:e.id,image:c([e.product,e.variant],(r,o)=>r?.images?.[0]&&H(n,r.images?.[0],r,o)),item_components:e.bundle_items?.map(r=>S3(n,r,t,{...i,bundle:!0})),key:e.id,line_level_discount_allocations:[],line_level_total_discount:e.discount_total,message:null,options_with_values:e.options,original_line_price:a4(e)?0:e.price*e.quantity,original_price:a4(e)?0:e.price,product:c(e.product,()=>e.product&&P(n,e.product)),product_id:e.product_id,properties:e.metadata,quantity:e.quantity,requires_shipping:e.delivery==="shipment",selling_plan_allocation:Wt(e),sku:c(e.product,r=>r.sku),successfully_fulfilled_quantity:e.quantity_delivered,tax_lines:e.taxes?.map(r=>{let o=t.taxes?.find(a=>a.id===r.id);return{price:r.amount,rate:(o?.rate||0)/100,rate_percentage:o?.rate||0,title:r.name}}),taxable:e.tax_total>0,title:c([e.product,e.variant],(r,o)=>`${r?.name||e.product_id}${o?.name?` - ${o.name}`:""}`),url:c(e.product,r=>`/products/${r.slug}`),url_to_remove:null,variant:c([e.product,e.variant],()=>e.variant?$(n,e.variant,e.product):P(n,e.product)),vendor:null,discounts:null,line_price:e.price_total,price:e.price,total_discount:e.discount_total})}function s4(n,e="quantity"){return n?.reduce((t,i)=>t+i[e],0)||0}function a4(n){let e=n?.purchase_option;return e?.type!=="subscription"?!1:e.billing_schedule.trial_days>0}function Wt(n){let e=n?.purchase_option;if(e?.type!=="subscription")return null;let t=e.billing_schedule?.trial_days||0,i=t>0?` (Includes ${t} trial day${t===1?"":"s"})`:"",r=e.billing_schedule?.interval_count||1,o="day";switch(e.billing_schedule?.interval){case"weekly":o="wk";break;case"monthly":o="mo";break;case"yearly":o="yr";break;default:}let s=`${`${r>1?r:""}${o}`}${i}`;return{selling_plan:{name:e.plan_name,description:e.plan_description,plan_id:e.plan_id,billing_schedule:e.billing_schedule,planPriceText:s,planPrice:n.price}}}function k3(n,e){return e instanceof y?e.clone():new y({attributes:w(()=>e.metadata),cart_level_discount_applications:[],checkout_charge_amount:w(()=>e.grand_total),currency:c(e,t=>t.currency),discount_applications:[],duties_included:w(()=>e.item_tax_included),"empty?":c(e,t=>!t.items?.length),item_count:c(e,t=>s4(t.items)),items:c(e,t=>t.items?.map(i=>S3(n,i,t))),items_subtotal_price:w(()=>e.sub_total),note:w(()=>e.comments),original_total_price:c(e,t=>t.sub_total+t.item_discount),requires_shipping:w(()=>!!e.shipment_delivery),taxes_included:w(()=>!!e.item_tax_included),total_discount:w(()=>e.discount_total),total_price:w(()=>e.grand_total),total_weight:w(()=>e.item_shipment_weight)})}function s3(n,e,t){return e instanceof y?e.clone():new y({address1:c(e,i=>i.address1),address2:c(e,i=>i.address2),city:c(e,i=>i.city),company:c(e,i=>i.company),country:c(e,i=>Jt(n,i.country)),country_code:c(e,i=>i.country_code),first_name:c(e,i=>i.first_name||t?.first_name),id:c(e,i=>i.id),last_name:c(e,i=>i.last_name||t?.last_name),name:c(e,i=>i.name||t?.name),phone:c(e,i=>i.phone),province:c(e,i=>i.state),province_code:c(e,i=>String(i.state||"").substring(0,2)),street:c(e,i=>I5(i.address1,i.address2)),summary:c(e,i=>I5(i.name||t?.name,i.company,i.address1,i.address2,i.city,i.state,i.country)),url:c(e,i=>`/account/addresses/${i.id}`),zip:c(e,i=>i.zip)})}function I5(...n){return n.filter(Boolean).join(`
|
|
9
|
-
`)}function Jt(n,e){return new y({available_languages:[],continent:"",currency:"",iso_code:e,market:null,name:e,"popular?":!0,unit_system:"metric"},"iso_code")}function l3(n,e,t){if(e instanceof y)return e.clone();let i=t||e.account,r=c(e,o=>o.items?.map(a=>S3(n,a,o,{order:!0})));return new y({attributes:w(()=>e.metadata),billing_address:c(e,()=>s3(n,e.billing)),cancelled:w(()=>e.canceled),cancelled_at:w(()=>e.date_canceled),confirmation_number:w(()=>e.number),created_at:w(()=>e.date_created),customer:i&&w(()=>Q(n,i)),customer_order_url:c(e,o=>`/account/orders/${o.id}`),customer_url:c(e,o=>`/account/orders/${o.id}`),email:i&&c(i,o=>o.email),financial_status:c(e,o=>H5(o)),financial_status_label:c(e,o=>Yt(o)),fulfillment_status:c(e,o=>B5(o)),fulfillment_status_label:c(e,o=>Qt(o)),id:c(e,o=>o.id),item_count:c(e,o=>s4(o.items)),line_items:r,line_items_subtotal_price:w(()=>e.sub_total),name:w(()=>e.number),number:c(e,o=>o.number),note:w(()=>e.comments),phone:i&&c([e,i],(o,a)=>o.billing?.phone||o.shipping.phone||a.phone),shipping_address:c(e,()=>s3(n,e.shipping)),shipping_methods:w(()=>{let o=t1(e);return o&&[o]}),shipping_price:w(()=>e.shipment_total),subtotal_line_items:r,subtotal_price:w(()=>e.sub_total),tags:null,tax_price:w(()=>e.tax_total),total_discounts:w(()=>e.discount_total),total_net_amount:w(()=>e.grand_total),total_price:w(()=>e.grand_total),total_refunded_amount:w(()=>e.refund_total)})}function H5(n){return e1(n)?"refund_due":n.payment_total>0&&n.payment_total>n.refund_total&&n.payment_total<n.grand_total&&Xt(n)>0?"partially_paid":n.refund_total>0&&n.refund_total<n.payment_total?"partially_refunded":n.refund_total>0&&n.refund_total===n.payment_total?"refunded":n.payment_total>0&&n.payment_balance===0?"paid":n.authorized_payment_id&&!n.paid?"authorized":n.grand_total>0?"unpaid":"complete"}function B5(n){return n.canceled?"canceled":n.hold||n.status==="hold"?"on_hold":n.delivered?n.item_quantity_returned>0||n.return_total>0?n.item_quantity_returned===n.item_quantity?"returned":"rartially_returned":"fulfilled":n.item_quantity_delivered>0?"partially_fulfilled":n.item_quantity_deliverable>0?"unfulfilled":"complete"}function Yt(n){return q5(H5(n))}function Qt(n){return q5(B5(n))}function q5(n){let e=n.replace(/\_/g," ");return e.charAt(0).toUpperCase()+e.slice(1)}function Xt(n){return!n.canceled&&n.payment_balance<0?-n.payment_balance:0}function e1(n){if(n.canceled)return n.payment_total-n.refund_total;if(n.payment_balance>0)return n.payment_balance}function t1(n){return n.shipping?.service?new y({id:n.shipping.service,handle:`${n.shipping.service}-${n.shipping.price}`,original_price:n.shipment_price,price:n.shipment_total,tax_lines:[],title:n.shipping.service_name||n.shipping.service}):null}function Q(n,e){return e instanceof y?e.clone():new y({accepts_marketing:w(()=>e.email_optin),addresses:z4(n,e,"addresses",s3),addresses_count:c(e.addresses,t=>t.count||0),"b2b?":c(e,()=>e.type==="business"),company_available_locations:[],current_company:null,current_location:null,default_address:c(e,t=>s3(n,t.shipping||t.billing||{},t)),email:c(e,t=>t.email),first_name:c(e,t=>t.first_name),has_account:!0,"has_avatar?":!1,id:c(e,t=>t.id),last_name:c(e,t=>t.last_name),last_order:w(()=>i1(n,e)),name:c(e,t=>t.name),orders:z4(n,e,"orders",l3),orders_count:w(()=>e.order_count),phone:c(e,t=>t.phone||t.shipping?.phone||t.billing?.phone),tags:c(e,t=>t.tags||[t.group]),tax_exempt:w(()=>e.tax_exempt),total_spent:w(()=>e.order_value)})}async function i1(n,e){let t=await e.id,i=await n.swell.getCachedResource(`last-order-${t}`,[],async()=>(await n.swell.storefront.account.listOrders({limit:1}))?.results?.[0]);if(i)return l3(n,i,e)}var l4={url:"/:themes:configs/{id}/file/data",conditions:{file:{$or:[{$and:[{content_type:{$regex:"^(?!image)"}},{content_type:{$regex:"^(?!video)"}}]},{content_type:{$regex:"^image/svg"}}]},$or:[{file_path:{$regex:"^(?!theme/assets/)"}},{file_path:{$regex:".liquid.[a-zA-Z0-9]+$"}},{file_path:{$regex:".(css|js|svg)$"}}]}},W4={countries:[{id:"US",name:"United States",state_label:"State"},{id:"CA",name:"Canada",state_label:"Province"},{id:"AU",name:"Australia",state_label:"State/territory"},{id:"GB",name:"United Kingdom"},{id:"AF",name:"Afghanistan"},{id:"AX",name:"Aland Islands"},{id:"AL",name:"Albania"},{id:"DZ",name:"Algeria",state_label:"Province"},{id:"AD",name:"Andorra"},{id:"AO",name:"Angola"},{id:"AI",name:"Anguilla"},{id:"AG",name:"Antigua And Barbuda"},{id:"AR",name:"Argentina"},{id:"AM",name:"Armenia"},{id:"AW",name:"Aruba"},{id:"AT",name:"Austria"},{id:"AZ",name:"Azerbaijan"},{id:"BS",name:"Bahamas"},{id:"BH",name:"Bahrain"},{id:"BD",name:"Bangladesh"},{id:"BB",name:"Barbados"},{id:"BY",name:"Belarus"},{id:"BE",name:"Belgium"},{id:"BZ",name:"Belize"},{id:"BJ",name:"Benin"},{id:"BM",name:"Bermuda"},{id:"BT",name:"Bhutan"},{id:"BO",name:"Bolivia"},{id:"BA",name:"Bosnia And Herzegovina"},{id:"BW",name:"Botswana"},{id:"BV",name:"Bouvet Island"},{id:"BR",name:"Brazil",state_label:"State"},{id:"IO",name:"British Indian Ocean Territory"},{id:"BN",name:"Brunei"},{id:"BG",name:"Bulgaria"},{id:"BF",name:"Burkina Faso"},{id:"BU",name:"Burma"},{id:"BI",name:"Burundi"},{id:"KH",name:"Cambodia"},{id:"CM",name:"Cameroon"},{id:"CV",name:"Cape Verde"},{id:"KY",name:"Cayman Islands"},{id:"CF",name:"Central African Republic"},{id:"TD",name:"Chad"},{id:"CL",name:"Chile"},{id:"CN",name:"China"},{id:"CX",name:"Christmas Island"},{id:"CC",name:"Cocos (Keeling) Islands"},{id:"CO",name:"Colombia"},{id:"KM",name:"Comoros"},{id:"CG",name:"Congo"},{id:"CD",name:"Congo, The Democratic Republic Of The"},{id:"CK",name:"Cook Islands"},{id:"CR",name:"Costa Rica"},{id:"CI",name:"Cote D'Ivoire"},{id:"HR",name:"Croatia"},{id:"CU",name:"Cuba"},{id:"CY",name:"Cyprus"},{id:"CZ",name:"Czech Republic"},{id:"DK",name:"Denmark"},{id:"DJ",name:"Djibouti"},{id:"DM",name:"Dominica"},{id:"DO",name:"Dominican Republic"},{id:"EC",name:"Ecuador"},{id:"EG",name:"Egypt"},{id:"SV",name:"El Salvador"},{id:"GQ",name:"Equatorial Guinea"},{id:"ER",name:"Eritrea"},{id:"EE",name:"Estonia"},{id:"ET",name:"Ethiopia"},{id:"FK",name:"Falkland Islands (Malvinas)"},{id:"FO",name:"Faroe Islands"},{id:"FJ",name:"Fiji"},{id:"FI",name:"Finland"},{id:"FR",name:"France"},{id:"GF",name:"French Guiana"},{id:"PF",name:"French Polynesia"},{id:"TF",name:"French Southern Territories"},{id:"GA",name:"Gabon"},{id:"GM",name:"Gambia"},{id:"GE",name:"Georgia"},{id:"DE",name:"Germany"},{id:"GH",name:"Ghana"},{id:"GI",name:"Gibraltar"},{id:"GR",name:"Greece"},{id:"GL",name:"Greenland"},{id:"GD",name:"Grenada"},{id:"GP",name:"Guadeloupe"},{id:"GT",name:"Guatemala",state_label:"Department"},{id:"GG",name:"Guernsey"},{id:"GN",name:"Guinea"},{id:"GW",name:"Guinea Bissau"},{id:"GY",name:"Guyana"},{id:"HT",name:"Haiti"},{id:"HM",name:"Heard Island And Mcdonald Islands"},{id:"VA",name:"Holy See (Vatican City State)"},{id:"HN",name:"Honduras"},{id:"HK",name:"Hong Kong"},{id:"HU",name:"Hungary"},{id:"IS",name:"Iceland"},{id:"IN",name:"India",state_label:"State"},{id:"ID",name:"Indonesia"},{id:"IR",name:"Iran, Islamic Republic Of"},{id:"IQ",name:"Iraq"},{id:"IE",name:"Ireland"},{id:"IM",name:"Isle Of Man"},{id:"IL",name:"Israel"},{id:"IT",name:"Italy"},{id:"JM",name:"Jamaica"},{id:"JP",name:"Japan"},{id:"JE",name:"Jersey"},{id:"JO",name:"Jordan"},{id:"KZ",name:"Kazakhstan"},{id:"KE",name:"Kenya"},{id:"KI",name:"Kiribati"},{id:"KP",name:"Korea, North"},{id:"KR",name:"Korea, South"},{id:"KW",name:"Kuwait"},{id:"KG",name:"Kyrgyzstan"},{id:"LA",name:"Laos"},{id:"LV",name:"Latvia"},{id:"LB",name:"Lebanon"},{id:"LS",name:"Lesotho"},{id:"LR",name:"Liberia"},{id:"LY",name:"Libya"},{id:"LI",name:"Liechtenstein"},{id:"LT",name:"Lithuania"},{id:"LU",name:"Luxembourg"},{id:"MO",name:"Macao"},{id:"MK",name:"Macedonia"},{id:"MG",name:"Madagascar"},{id:"MW",name:"Malawi"},{id:"MY",name:"Malaysia",state_label:"State/territory"},{id:"MV",name:"Maldives"},{id:"ML",name:"Mali"},{id:"MT",name:"Malta"},{id:"MQ",name:"Martinique"},{id:"MR",name:"Mauritania"},{id:"MU",name:"Mauritius"},{id:"YT",name:"Mayotte"},{id:"MX",name:"Mexico",state_label:"State"},{id:"MD",name:"Moldova"},{id:"MC",name:"Monaco"},{id:"MN",name:"Mongolia"},{id:"ME",name:"Montenegro"},{id:"MS",name:"Montserrat"},{id:"MA",name:"Morocco"},{id:"MZ",name:"Mozambique"},{id:"MM",name:"Myanmar"},{id:"NA",name:"Namibia"},{id:"NR",name:"Nauru"},{id:"NP",name:"Nepal"},{id:"NL",name:"Netherlands"},{id:"AN",name:"Netherlands Antilles"},{id:"NC",name:"New Caledonia"},{id:"NZ",name:"New Zealand",state_label:"Region"},{id:"NI",name:"Nicaragua"},{id:"NE",name:"Niger"},{id:"NG",name:"Nigeria"},{id:"NU",name:"Niue"},{id:"NF",name:"Norfolk Island"},{id:"NO",name:"Norway"},{id:"OM",name:"Oman"},{id:"PK",name:"Pakistan"},{id:"PS",name:"Palestinian Territory, Occupied"},{id:"PA",name:"Panama"},{id:"PG",name:"Papua New Guinea"},{id:"PY",name:"Paraguay"},{id:"PE",name:"Peru"},{id:"PH",name:"Philippines",state_label:"Region"},{id:"PN",name:"Pitcairn"},{id:"PL",name:"Poland"},{id:"PT",name:"Portugal"},{id:"QA",name:"Qatar"},{id:"RE",name:"Reunion"},{id:"RO",name:"Romania"},{id:"RU",name:"Russia"},{id:"RW",name:"Rwanda"},{id:"BL",name:"Saint Barthelemy"},{id:"SH",name:"Saint Helena"},{id:"KN",name:"Saint Kitts And Nevis"},{id:"LC",name:"Saint Lucia"},{id:"MF",name:"Saint Martin"},{id:"PM",name:"Saint Pierre And Miquelon"},{id:"VC",name:"Saint Vincent"},{id:"WS",name:"Samoa"},{id:"SM",name:"San Marino"},{id:"ST",name:"Sao Tome And Principe"},{id:"SA",name:"Saudi Arabia"},{id:"SN",name:"Senegal"},{id:"RS",name:"Serbia"},{id:"SC",name:"Seychelles"},{id:"SL",name:"Sierra Leone"},{id:"SG",name:"Singapore"},{id:"SK",name:"Slovakia"},{id:"SI",name:"Slovenia"},{id:"SB",name:"Solomon Islands"},{id:"SO",name:"Somalia"},{id:"ZA",name:"South Africa"},{id:"GS",name:"South Georgia And The South Sandwich Islands"},{id:"ES",name:"Spain",state_label:"Province"},{id:"LK",name:"Sri Lanka"},{id:"SD",name:"Sudan"},{id:"SR",name:"Suriname"},{id:"SJ",name:"Svalbard And Jan Mayen"},{id:"SZ",name:"Swaziland"},{id:"SE",name:"Sweden"},{id:"CH",name:"Switzerland"},{id:"SY",name:"Syria"},{id:"TW",name:"Taiwan"},{id:"TJ",name:"Tajikistan"},{id:"TZ",name:"Tanzania"},{id:"TH",name:"Thailand"},{id:"TL",name:"Timor-Leste"},{id:"TG",name:"Togo"},{id:"TK",name:"Tokelau"},{id:"TO",name:"Tonga"},{id:"TT",name:"Trinidad and Tobago"},{id:"TN",name:"Tunisia"},{id:"TR",name:"Turkey"},{id:"TM",name:"Turkmenistan"},{id:"TC",name:"Turks And Caicos Islands"},{id:"TV",name:"Tuvalu"},{id:"UG",name:"Uganda"},{id:"UA",name:"Ukraine"},{id:"AE",name:"United Arab Emirates",state_label:"Emirate"},{id:"UM",name:"United States Minor Outlying Islands"},{id:"UY",name:"Uruguay"},{id:"UZ",name:"Uzbekistan"},{id:"VU",name:"Vanuatu"},{id:"VE",name:"Venezuela"},{id:"VN",name:"Vietnam"},{id:"VG",name:"Virgin Islands, British"},{id:"WF",name:"Wallis And Futuna"},{id:"EH",name:"Western Sahara"},{id:"YE",name:"Yemen"},{id:"ZM",name:"Zambia"},{id:"ZW",name:"Zimbabwe"}],states:[{country:"US",id:"AL",name:"Alabama"},{country:"US",id:"AK",name:"Alaska"},{country:"US",id:"AZ",name:"Arizona"},{country:"US",id:"AR",name:"Arkansas"},{country:"US",id:"CA",name:"California"},{country:"US",id:"CO",name:"Colorado"},{country:"US",id:"CT",name:"Connecticut"},{country:"US",id:"DE",name:"Delaware"},{country:"US",id:"DC",name:"District of Columbia"},{country:"US",id:"FL",name:"Florida"},{country:"US",id:"GA",name:"Georgia"},{country:"US",id:"HI",name:"Hawaii"},{country:"US",id:"ID",name:"Idaho"},{country:"US",id:"IL",name:"Illinois"},{country:"US",id:"IN",name:"Indiana"},{country:"US",id:"IA",name:"Iowa"},{country:"US",id:"KS",name:"Kansas"},{country:"US",id:"KY",name:"Kentucky"},{country:"US",id:"LA",name:"Louisiana"},{country:"US",id:"ME",name:"Maine"},{country:"US",id:"MD",name:"Maryland"},{country:"US",id:"MA",name:"Massachusetts"},{country:"US",id:"MI",name:"Michigan"},{country:"US",id:"MN",name:"Minnesota"},{country:"US",id:"MS",name:"Mississippi"},{country:"US",id:"MO",name:"Missouri"},{country:"US",id:"MT",name:"Montana"},{country:"US",id:"NE",name:"Nebraska"},{country:"US",id:"NV",name:"Nevada"},{country:"US",id:"NH",name:"New Hampshire"},{country:"US",id:"NJ",name:"New Jersey"},{country:"US",id:"NM",name:"New Mexico"},{country:"US",id:"NY",name:"New York"},{country:"US",id:"NC",name:"North Carolina"},{country:"US",id:"ND",name:"North Dakota"},{country:"US",id:"OH",name:"Ohio"},{country:"US",id:"OK",name:"Oklahoma"},{country:"US",id:"OR",name:"Oregon"},{country:"US",id:"PA",name:"Pennsylvania"},{country:"US",id:"RI",name:"Rhode Island"},{country:"US",id:"SC",name:"South Carolina"},{country:"US",id:"SD",name:"South Dakota"},{country:"US",id:"TN",name:"Tennessee"},{country:"US",id:"TX",name:"Texas"},{country:"US",id:"UT",name:"Utah"},{country:"US",id:"VT",name:"Vermont"},{country:"US",id:"VA",name:"Virginia"},{country:"US",id:"WA",name:"Washington"},{country:"US",id:"WV",name:"West Virginia"},{country:"US",id:"WI",name:"Wisconsin"},{country:"US",id:"WY",name:"Wyoming"},{country:"US",id:"AS",name:"American Samoa"},{country:"US",id:"AA",name:"Armed Forces Americas"},{country:"US",id:"AE",name:"Armed Forces Europe"},{country:"US",id:"AP",name:"Armed Forces Pacific"},{country:"US",id:"FM",name:"Federated States of Micronesia"},{country:"US",id:"GU",name:"Guam"},{country:"US",id:"MH",name:"Marshall Islands"},{country:"US",id:"MP",name:"Northern Mariana Islands"},{country:"US",id:"PW",name:"Palau"},{country:"US",id:"PR",name:"Puerto Rico"},{country:"US",id:"VI",name:"Virgin Islands"},{country:"CA",id:"AB",name:"Alberta"},{country:"CA",id:"BC",name:"British Columbia"},{country:"CA",id:"MB",name:"Manitoba"},{country:"CA",id:"NB",name:"New Brunswick"},{country:"CA",id:"NL",name:"Newfoundland"},{country:"CA",id:"NT",name:"Northwest Territories"},{country:"CA",id:"NS",name:"Nova Scotia"},{country:"CA",id:"NU",name:"Nunavut"},{country:"CA",id:"ON",name:"Ontario"},{country:"CA",id:"PE",name:"Prince Edward Island"},{country:"CA",id:"QC",name:"Quebec"},{country:"CA",id:"SK",name:"Saskatchewan"},{country:"CA",id:"YT",name:"Yukon"},{country:"AU",id:"ACT",name:"Australian Capital Territory"},{country:"AU",id:"NSW",name:"New South Wales"},{country:"AU",id:"NT",name:"Northern Territory"},{country:"AU",id:"QLD",name:"Queensland"},{country:"AU",id:"SA",name:"South Australia"},{country:"AU",id:"TAS",name:"Tasmania"},{country:"AU",id:"VIC",name:"Victoria"},{country:"AU",id:"WA",name:"Western Australia"},{country:"BR",id:"AC",name:"Acre"},{country:"BR",id:"AL",name:"Alagoas"},{country:"BR",id:"AP",name:"Amapa"},{country:"BR",id:"AM",name:"Amazonas"},{country:"BR",id:"BA",name:"Bahia"},{country:"BR",id:"CE",name:"Ceara"},{country:"BR",id:"BRDF",name:"Distrito Federal"},{country:"BR",id:"ES",name:"Espirito Santo"},{country:"BR",id:"GO",name:"Goias;"},{country:"BR",id:"MA",name:"Maranhao"},{country:"BR",id:"MT",name:"Mato Grosso"},{country:"BR",id:"MS",name:"Mato Grosso do Sul"},{country:"BR",id:"MG",name:"Minas Gerais"},{country:"BR",id:"PA",name:"Para;"},{country:"BR",id:"PB",name:"Paraiba"},{country:"BR",id:"PR",name:"Parana"},{country:"BR",id:"PE",name:"Pernambuco"},{country:"BR",id:"PI",name:"Piaui"},{country:"BR",id:"RJ",name:"Rio de Janeiro"},{country:"BR",id:"RN",name:"Rio Grande do Norte"},{country:"BR",id:"RS",name:"Rio Grande do Sul"},{country:"BR",id:"RO",name:"Rondonia"},{country:"BR",id:"RR",name:"Roraima"},{country:"BR",id:"SC",name:"Santa Catarina"},{country:"BR",id:"SP",name:"Sao Paulo"},{country:"BR",id:"SE",name:"Sergipe"},{country:"BR",id:"TO",name:"Tocantins"},{country:"GT",id:"Alta Verapaz",name:"Alta Verapaz"},{country:"GT",id:"Baja Verapaz",name:"Baja Verapaz"},{country:"GT",id:"Chimaltenango",name:"Chimaltenango"},{country:"GT",id:"Chiquimula",name:"Chiquimula"},{country:"GT",id:"El Progreso",name:"El Progreso"},{country:"GT",id:"Escuintla",name:"Escuintla"},{country:"GT",id:"Guatemala",name:"Guatemala"},{country:"GT",id:"Huehuetenango",name:"Huehuetenango"},{country:"GT",id:"Izabal",name:"Izabal"},{country:"GT",id:"Jalapa",name:"Jalapa"},{country:"GT",id:"Jutiapa",name:"Jutiapa"},{country:"GT",id:"Peten",name:"Peten"},{country:"GT",id:"Quetzaltenango",name:"Quetzaltenango"},{country:"GT",id:"Quiche",name:"Quiche"},{country:"GT",id:"Retalhuleu",name:"Retalhuleu"},{country:"GT",id:"Sacatepequez",name:"Sacatepequez"},{country:"GT",id:"San Marcos",name:"San Marcos"},{country:"GT",id:"Santa Rosa",name:"Santa Rosa"},{country:"GT",id:"Solola",name:"Solola"},{country:"GT",id:"Suchitepequez",name:"Suchitepequez"},{country:"GT",id:"Totonicapan",name:"Totonicapan"},{country:"GT",id:"Zacapa",name:"Zacapa"},{country:"IN",id:"AN",name:"Andaman and Nicobar"},{country:"IN",id:"AP",name:"Andhra Pradesh"},{country:"IN",id:"AR",name:"Arunachal Pradesh"},{country:"IN",id:"AS",name:"Assam"},{country:"IN",id:"BR",name:"Bihar"},{country:"IN",id:"CH",name:"Chandigarh"},{country:"IN",id:"CT",name:"Chattisgarh"},{country:"IN",id:"DN",name:"Dadra and Nagar Haveli"},{country:"IN",id:"DD",name:"Daman and Diu"},{country:"IN",id:"DL",name:"Delhi"},{country:"IN",id:"GA",name:"Goa"},{country:"IN",id:"GJ",name:"Gujarat"},{country:"IN",id:"HR",name:"Haryana"},{country:"IN",id:"HP",name:"Himachal Pradesh"},{country:"IN",id:"JK",name:"Jammu and Kashmir"},{country:"IN",id:"JH",name:"Jharkhand"},{country:"IN",id:"KA",name:"Karnataka"},{country:"IN",id:"KL",name:"Kerala"},{country:"IN",id:"LD",name:"Lakshadweep"},{country:"IN",id:"MP",name:"Madhya Pradesh"},{country:"IN",id:"MH",name:"Maharashtra"},{country:"IN",id:"MN",name:"Manipur"},{country:"IN",id:"ML",name:"Meghalaya"},{country:"IN",id:"MZ",name:"Mizoram"},{country:"IN",id:"NL",name:"Nagaland"},{country:"IN",id:"OR",name:"Orissa"},{country:"IN",id:"PY",name:"Puducherry"},{country:"IN",id:"PB",name:"Punjab"},{country:"IN",id:"RJ",name:"Rajasthan"},{country:"IN",id:"SK",name:"Sikkim"},{country:"IN",id:"TN",name:"Tamil Nadu"},{country:"IN",id:"TR",name:"Tripura"},{country:"IN",id:"UP",name:"Uttar Pradesh"},{country:"IN",id:"UT",name:"Uttarakhand"},{country:"IN",id:"WB",name:"West Bengal"},{country:"MY",id:"JHR",name:"Johor"},{country:"MY",id:"KDH",name:"Kedah"},{country:"MY",id:"KTN",name:"Kelantan"},{country:"MY",id:"KUL",name:"Kuala Lumpur"},{country:"MY",id:"LBN",name:"Labuan"},{country:"MY",id:"MLK",name:"Malacca"},{country:"MY",id:"NSN",name:"Negeri Sembilan"},{country:"MY",id:"PHG",name:"Pahang"},{country:"MY",id:"PNG",name:"Penang"},{country:"MY",id:"PRK",name:"Perak"},{country:"MY",id:"PLS",name:"Perlis"},{country:"MY",id:"PJY",name:"Putrajaya"},{country:"MY",id:"SBH",name:"Sabah"},{country:"MY",id:"SRW",name:"Sarawak"},{country:"MY",id:"SGR",name:"Selangor"},{country:"MY",id:"TRG",name:"Terengganu"},{country:"MX",id:"AG",name:"Aguascalientes"},{country:"MX",id:"BJ",name:"Baja California"},{country:"MX",id:"BS",name:"Baja California Sur"},{country:"MX",id:"CI",name:"Chihuahua"},{country:"MX",id:"CL",name:"Colima"},{country:"MX",id:"CP",name:"Campeche"},{country:"MX",id:"CU",name:"Coahuila"},{country:"MX",id:"CH",name:"Chiapas"},{country:"MX",id:"DF",name:"Distrito Federal"},{country:"MX",id:"DG",name:"Durango"},{country:"MX",id:"GR",name:"Guerrero"},{country:"MX",id:"GJ",name:"Guanajuato"},{country:"MX",id:"HG",name:"Hidalgo"},{country:"MX",id:"JA",name:"Jalisco"},{country:"MX",id:"MH",name:"Michoacan"},{country:"MX",id:"MR",name:"Morelos"},{country:"MX",id:"EM",name:"Mexico"},{country:"MX",id:"NA",name:"Nayarit"},{country:"MX",id:"NL",name:"Nuevo Leon"},{country:"MX",id:"OA",name:"Oaxaca"},{country:"MX",id:"PU",name:"Puebla"},{country:"MX",id:"QR",name:"Quintana Roo"},{country:"MX",id:"QA",name:"Queretaro"},{country:"MX",id:"SI",name:"Sinaloa"},{country:"MX",id:"SL",name:"San Luis Potosi"},{country:"MX",id:"SO",name:"Sonora"},{country:"MX",id:"TA",name:"Tabasco"},{country:"MX",id:"TL",name:"Tlaxcala"},{country:"MX",id:"TM",name:"Tamaulipas"},{country:"MX",id:"VZ",name:"Veracruz"},{country:"MX",id:"YC",name:"Yucatan"},{country:"MX",id:"ZT",name:"Zacatecas"},{country:"NZ",id:"AUK",name:"Auckland"},{country:"NZ",id:"BOP",name:"Bay of Plenty"},{country:"NZ",id:"CAN",name:"Canterbury"},{country:"NZ",id:"GIS",name:"Gisborne"},{country:"NZ",id:"HKB",name:"Hawke's Bay"},{country:"NZ",id:"MWT",name:"Manawatu-Wanganui"},{country:"NZ",id:"MBH",name:"Marlborough"},{country:"NZ",id:"NSN",name:"Nelson"},{country:"NZ",id:"NTL",name:"Northland"},{country:"NZ",id:"OTA",name:"Otago"},{country:"NZ",id:"STL",name:"Southland"},{country:"NZ",id:"TKI",name:"Taranaki"},{country:"NZ",id:"NZTAS",name:"Tasman"},{country:"NZ",id:"WKO",name:"Waikato"},{country:"NZ",id:"WGN",name:"Wellington"},{country:"NZ",id:"WTC",name:"West Coast"},{country:"ES",id:"A Coruna",name:"A Coruna"},{country:"ES",id:"Alava",name:"Alava"},{country:"ES",id:"Albacete",name:"Albacete"},{country:"ES",id:"Alicante",name:"Alicante"},{country:"ES",id:"Almeria",name:"Almeria"},{country:"ES",id:"Asturias",name:"Asturias"},{country:"ES",id:"Avila",name:"Avila"},{country:"ES",id:"Badajoz",name:"Badajoz"},{country:"ES",id:"Baleares",name:"Baleares"},{country:"ES",id:"Barcelona",name:"Barcelona"},{country:"ES",id:"Burgos",name:"Burgos"},{country:"ES",id:"Caceres",name:"Caceres"},{country:"ES",id:"Cadiz",name:"Cadiz"},{country:"ES",id:"Cantabria",name:"Cantabria"},{country:"ES",id:"Castellon",name:"Castellon"},{country:"ES",id:"Ceuta",name:"Ceuta"},{country:"ES",id:"Ciudad Real",name:"Ciudad Real"},{country:"ES",id:"Cordoba",name:"Cordoba"},{country:"ES",id:"Cuenca",name:"Cuenca"},{country:"ES",id:"Girona",name:"Girona"},{country:"ES",id:"Granada",name:"Granada"},{country:"ES",id:"Guadalajara",name:"Guadalajara"},{country:"ES",id:"Guipuzcoa",name:"Guipuzcoa"},{country:"ES",id:"Huelva",name:"Huelva"},{country:"ES",id:"Huesca",name:"Huesca"},{country:"ES",id:"Jaen",name:"Jaen"},{country:"ES",id:"La Rioja",name:"La Rioja"},{country:"ES",id:"Las Palmas",name:"Las Palmas"},{country:"ES",id:"Leon",name:"Leon"},{country:"ES",id:"Lleida",name:"Lleida"},{country:"ES",id:"Lugo",name:"Lugo"},{country:"ES",id:"Madrid",name:"Madrid"},{country:"ES",id:"Malaga",name:"Malaga"},{country:"ES",id:"Melilla",name:"Melilla"},{country:"ES",id:"Murcia",name:"Murcia"},{country:"ES",id:"Navarra",name:"Navarra"},{country:"ES",id:"Ourense",name:"Ourense"},{country:"ES",id:"Palencia",name:"Palencia"},{country:"ES",id:"Pontevedra",name:"Pontevedra"},{country:"ES",id:"Salamanca",name:"Salamanca"},{country:"ES",id:"Santa Cruz de Tenerife",name:"Santa Cruz de Tenerife"},{country:"ES",id:"Segovia",name:"Segovia"},{country:"ES",id:"Sevilla",name:"Sevilla"},{country:"ES",id:"Soria",name:"Soria"},{country:"ES",id:"Tarragona",name:"Tarragona"},{country:"ES",id:"Teruel",name:"Teruel"},{country:"ES",id:"Toledo",name:"Toledo"},{country:"ES",id:"Valencia",name:"Valencia"},{country:"ES",id:"Valladolid",name:"Valladolid"},{country:"ES",id:"Vizcaya",name:"Vizcaya"},{country:"ES",id:"Zamora",name:"Zamora"},{country:"ES",id:"Zaragoza",name:"Zaragoza"},{country:"AE",id:"Abu Dhabi",name:"Abu Dhabi"},{country:"AE",id:"Ajman",name:"Ajman"},{country:"AE",id:"Dubai",name:"Dubai"},{country:"AE",id:"Fujairah",name:"Fujairah"},{country:"AE",id:"Ras al-Khaimah",name:"Ras al-Khaimah"},{country:"AE",id:"Sharjah",name:"Sharjah"},{country:"AE",id:"Umm al-Quwain",name:"Umm al-Quwain"},{country:"DZ",id:"DZ-01",name:"Adrar"},{country:"DZ",id:"DZ-44",name:"A\xEFn Defla"},{country:"DZ",id:"DZ-46",name:"A\xEFn T\xE9mouchent"},{country:"DZ",id:"DZ-16",name:"Algiers"},{country:"DZ",id:"DZ-23",name:"Annaba"},{country:"DZ",id:"DZ-05",name:"Batna"},{country:"DZ",id:"DZ-08",name:"B\xE9char"},{country:"DZ",id:"DZ-06",name:"B\xE9ja\xEFa"},{country:"DZ",id:"DZ-53",name:"B\xE9ni Abb\xE8s"},{country:"DZ",id:"DZ-07",name:"Biskra"},{country:"DZ",id:"DZ-09",name:"Blida"},{country:"DZ",id:"DZ-52",name:"Bordj Baji Mokhtar"},{country:"DZ",id:"DZ-34",name:"Bordj Bou Arr\xE9ridj"},{country:"DZ",id:"DZ-10",name:"Bou\xEFra"},{country:"DZ",id:"DZ-35",name:"Boumerd\xE8s"},{country:"DZ",id:"DZ-02",name:"Chlef"},{country:"DZ",id:"DZ-25",name:"Constantine"},{country:"DZ",id:"DZ-56",name:"Djanet"},{country:"DZ",id:"DZ-17",name:"Djelfa"},{country:"DZ",id:"DZ-32",name:"El Bayadh"},{country:"DZ",id:"DZ-49",name:"El M'Ghair"},{country:"DZ",id:"DZ-50",name:"El Menia"},{country:"DZ",id:"DZ-39",name:"El Oued"},{country:"DZ",id:"DZ-36",name:"El Tarf"},{country:"DZ",id:"DZ-47",name:"Gharda\xEFa"},{country:"DZ",id:"DZ-24",name:"Guelma"},{country:"DZ",id:"DZ-33",name:"Illizi"},{country:"DZ",id:"DZ-58",name:"In Guezzam"},{country:"DZ",id:"DZ-57",name:"In Salah"},{country:"DZ",id:"DZ-18",name:"Jijel"},{country:"DZ",id:"DZ-40",name:"Khenchela"},{country:"DZ",id:"DZ-03",name:"Laghouat"},{country:"DZ",id:"DZ-28",name:"M'Sila"},{country:"DZ",id:"DZ-29",name:"Mascara"},{country:"DZ",id:"DZ-26",name:"M\xE9d\xE9a"},{country:"DZ",id:"DZ-43",name:"Mila"},{country:"DZ",id:"DZ-27",name:"Mostaganem"},{country:"DZ",id:"DZ-45",name:"Na\xE2ma"},{country:"DZ",id:"DZ-31",name:"Oran"},{country:"DZ",id:"DZ-30",name:"Ouargla"},{country:"DZ",id:"DZ-51",name:"Ouled Djellal"},{country:"DZ",id:"DZ-04",name:"Oum El Bouaghi"},{country:"DZ",id:"DZ-48",name:"Relizane"},{country:"DZ",id:"DZ-20",name:"Sa\xEFda"},{country:"DZ",id:"DZ-19",name:"S\xE9tif"},{country:"DZ",id:"DZ-22",name:"Sidi Bel Abb\xE8s"},{country:"DZ",id:"DZ-21",name:"Skikda"},{country:"DZ",id:"DZ-41",name:"Souk Ahras"},{country:"DZ",id:"DZ-11",name:"Tamanrasset"},{country:"DZ",id:"DZ-12",name:"T\xE9bessa"},{country:"DZ",id:"DZ-14",name:"Tiaret"},{country:"DZ",id:"DZ-54",name:"Timimoun"},{country:"DZ",id:"DZ-37",name:"Tindouf"},{country:"DZ",id:"DZ-42",name:"Tipaza"},{country:"DZ",id:"DZ-38",name:"Tissemsilt"},{country:"DZ",id:"DZ-15",name:"Tizi Ouzou"},{country:"DZ",id:"DZ-13",name:"Tlemcen"},{country:"DZ",id:"DZ-55",name:"Touggourt"},{country:"PH",id:"PH-00",name:"National Capital Region [NCR]"},{country:"PH",id:"PH-01",name:"Ilocos [I]"},{country:"PH",id:"PH-02",name:"Cagayan Valley [II]"},{country:"PH",id:"PH-03",name:"Central Luzon [III]"},{country:"PH",id:"PH-05",name:"Bicol [V]"},{country:"PH",id:"PH-06",name:"Western Visayas [VI]"},{country:"PH",id:"PH-07",name:"Central Visayas [VII]"},{country:"PH",id:"PH-08",name:"Eastern Visayas [VIII]"},{country:"PH",id:"PH-09",name:"Zamboanga Peninsula [IX]"},{country:"PH",id:"PH-10",name:"Northern Mindanao [X]"},{country:"PH",id:"PH-11",name:"Davao [XI]"},{country:"PH",id:"PH-12",name:"Soccsksargen [XII]"},{country:"PH",id:"PH-13",name:"Caraga [XIII]"},{country:"PH",id:"PH-14",name:"Autonomous Region in Muslim Mindanao [ARMM]"},{country:"PH",id:"PH-15",name:"Cordillera Administrative Region [CAR]"},{country:"PH",id:"PH-40",name:"Calabarzon [IV-A]"},{country:"PH",id:"PH-41",name:"Mimaropa [IV-B]"}],timezones:[{id:"Pacific/Kiritimati",name:"Line Islands Time"},{id:"Pacific/Enderbury",name:"Phoenix Islands Time"},{id:"Pacific/Tongatapu",name:"Tonga Time"},{id:"Pacific/Chatham",name:"Chatham Daylight Time"},{id:"Asia/Kamchatka",name:"Petropavlovsk-Kamchatski Time"},{id:"Pacific/Auckland",name:"New Zealand Daylight Time"},{id:"Pacific/Fiji",name:"Fiji Time"},{id:"Pacific/Norfolk",name:"Norfolk Time"},{id:"Pacific/Guadalcanal",name:"Solomon Islands Time"},{id:"Australia/Lord_Howe",name:"Lord Howe Summer Time"},{id:"Australia/Brisbane",name:"Australian Eastern Standard Time (Brisbane)"},{id:"Australia/Sydney",name:"Australian Eastern Standard Time (Sydney)"},{id:"Australia/Adelaide",name:"Australian Central Standard Time (Adelaide)"},{id:"Australia/Darwin",name:"Australian Central Standard Time (Darwin)"},{id:"Asia/Seoul",name:"Korea Standard Time"},{id:"Asia/Tokyo",name:"Japan Standard Time"},{id:"Asia/Hong_Kong",name:"Hong Kong Time"},{id:"Asia/Kuala_Lumpur",name:"Malaysia Time"},{id:"Asia/Manila",name:"Philippines Time"},{id:"Asia/Shanghai",name:"China Standard Time (Shanghai)"},{id:"Asia/Singapore",name:"Singapore Time"},{id:"Asia/Taipei",name:"China Standard Time (Taipei)"},{id:"Australia/Perth",name:"Australian Western Standard Time"},{id:"Asia/Bangkok",name:"Indochina Time (Bangkok)"},{id:"Asia/Jakarta",name:"West Indonesia Time"},{id:"Asia/Saigon",name:"Indochina Time (Saigon)"},{id:"Asia/Rangoon",name:"Myanmar Time"},{id:"Asia/Dacca",name:"Bangladesh Time"},{id:"Asia/Katmandu",name:"Nepal Time"},{id:"Asia/Calcutta",name:"India Standard Time (Calcutta)"},{id:"Asia/Colombo",name:"India Standard Time (Colombo)"},{id:"Asia/Karachi",name:"Pakistan Summer Time"},{id:"Asia/Tashkent",name:"Uzbekistan Time"},{id:"Asia/Yekaterinburg",name:"Yekaterinburg Time"},{id:"Asia/Kabul",name:"Afghanistan Time"},{id:"Asia/Baku",name:"Azerbaijan Time"},{id:"Asia/Dubai",name:"Gulf Standard Time"},{id:"Asia/Tbilisi",name:"Georgia Time"},{id:"Asia/Yerevan",name:"Armenia Time"},{id:"Asia/Tehran",name:"Iran Standard Time"},{id:"Africa/Nairobi",name:"Eastern African Time"},{id:"Asia/Baghdad",name:"Arabia Standard Time (Baghdad)"},{id:"Asia/Kuwait",name:"Arabia Standard Time (Kuwait)"},{id:"Asia/Riyadh",name:"Arabia Standard Time (Riyadh)"},{id:"Europe/Moscow",name:"Moscow Standard Time"},{id:"Africa/Cairo",name:"Eastern European Time (Cairo)"},{id:"Africa/Johannesburg",name:"South Africa Standard Time"},{id:"Asia/Beirut",name:"Eastern European Time (Beirut)"},{id:"Asia/Jerusalem",name:"Israel Standard Time"},{id:"Europe/Athens",name:"Eastern European Time (Athens)"},{id:"Europe/Bucharest",name:"Eastern European Time (Bucharest)"},{id:"Europe/Helsinki",name:"Eastern European Time (Helsinki)"},{id:"Europe/Istanbul",name:"Eastern European Time (Istanbul)"},{id:"Europe/Minsk",name:"Eastern European Time (Minsk)"},{id:"Europe/Amsterdam",name:"Central European Time (Amsterdam)"},{id:"Europe/Berlin",name:"Central European Time (Berlin)"},{id:"Europe/Brussels",name:"Central European Time (Brussels)"},{id:"Europe/Prague",name:"Central European Time (Prague)"},{id:"Europe/Rome",name:"Central European Time (Rome)"},{id:"Europe/Dublin",name:"Irish Summer Time"},{id:"Europe/Lisbon",name:"Western European Summer Time"},{id:"Europe/London",name:"British Summer Time"},{id:"GMT",name:"Greenwich Mean Time"},{id:"America/Scoresbysund",name:"East Greenland Time"},{id:"Atlantic/Azores",name:"Azores Time"},{id:"Atlantic/Cape_Verde",name:"Cape Verde Time"},{id:"Atlantic/South_Georgia",name:"South Georgia Standard Time"},{id:"America/Buenos_Aires",name:"Argentine Summer Time"},{id:"America/Sao_Paulo",name:"Brasilia Summer Time"},{id:"America/St_Johns",name:"Newfoundland Daylight Time"},{id:"America/Halifax",name:"Atlantic Daylight Time (Halifax)"},{id:"America/Puerto_Rico",name:"Atlantic Standard Time"},{id:"America/Santiago",name:"Chile Summer Time"},{id:"Atlantic/Bermuda",name:"Atlantic Daylight Time (Bermuda)"},{id:"America/Caracas",name:"Venezuela Time"},{id:"America/Bogota",name:"Colombia Time"},{id:"America/Indianapolis",name:"Eastern Daylight Time (Indianapolis)"},{id:"America/Lima",name:"Peru Time"},{id:"America/New_York",name:"Eastern Daylight Time (New York)"},{id:"America/Panama",name:"Eastern Standard Time (Panama)"},{id:"America/Chicago",name:"Central Daylight Time (Chicago)"},{id:"America/El_Salvador",name:"Central Standard Time (El Salvador)"},{id:"America/Mexico_City",name:"Central Standard Time (Mexico City)"},{id:"America/Denver",name:"Mountain Daylight Time"},{id:"America/Phoenix",name:"Mountain Standard Time"},{id:"America/Los_Angeles",name:"Pacific Daylight Time"},{id:"America/Tijuana",name:"Pacific Standard Time"},{id:"Pacific/Pitcairn",name:"Pitcairn Standard Time"},{id:"America/Anchorage",name:"Alaska Daylight Time"},{id:"Pacific/Gambier",name:"Gambier Time"},{id:"Pacific/Marquesas",name:"Marquesas Time"},{id:"Pacific/Honolulu",name:"Hawaii Standard Time"},{id:"America/Atka",name:"Hawaii-Aleutian Standard Time"},{id:"Pacific/Niue",name:"Niue Time"},{id:"Pacific/Pago_Pago",name:"Samoa Standard Time"}],locales:[{id:"af",name:"Afrikaans"},{id:"af-ZA",name:"Afrikaans (South Africa)"},{id:"az",name:"Azerbaijani"},{id:"az-AZ",name:"Azerbaijani (Azerbaijani)"},{id:"id",name:"Indonesian"},{id:"id-ID",name:"Indonesian (Indonesia)"},{id:"ms",name:"Malay"},{id:"ms-MY",name:"Malay (Malaysia)"},{id:"ca",name:"Catalan"},{id:"ca-ES",name:"Catalan (Spain)"},{id:"cs",name:"Czech"},{id:"cs-CZ",name:"Czech (Czech Republic)"},{id:"da",name:"Danish"},{id:"da-DK",name:"Danish (Denmark)"},{id:"de",name:"German"},{id:"de-DE",name:"German (Germany)"},{id:"de-CH",name:"German (Switzerland)"},{id:"de-AT",name:"German (Austria)"},{id:"et",name:"Estonian"},{id:"et-EE",name:"Estonian (Estonia)"},{id:"en",name:"English"},{id:"en-AU",name:"English (Australia)"},{id:"en-CA",name:"English (Canada)"},{id:"en-IE",name:"English (Ireland)"},{id:"en-NZ",name:"English (New Zealand)"},{id:"en-GB",name:"English (United Kingdom)"},{id:"en-US",name:"English (United States)"},{id:"es",name:"Spanish"},{id:"es-AR",name:"Spanish (Argentina)"},{id:"es-CL",name:"Spanish (Chile)"},{id:"es-CO",name:"Spanish (Colombia)"},{id:"es-CR",name:"Spanish (Costa Rica)"},{id:"es-ES",name:"Spanish (Spain)"},{id:"es-MX",name:"Spanish (Mexico)"},{id:"es-PA",name:"Spanish (Panama)"},{id:"es-PE",name:"Spanish (Peru)"},{id:"es-VE",name:"Spanish (Venezuela)"},{id:"fil",name:"Filipino"},{id:"fil-PH",name:"Filipino (Philippines)"},{id:"fr",name:"French"},{id:"fr-CA",name:"French (Canada)"},{id:"fr-FR",name:"French (France)"},{id:"fr-CH",name:"French (Switzerland)"},{id:"gl",name:"Galician"},{id:"gl-ES",name:"Galician (Spain)"},{id:"hr",name:"Croatian"},{id:"hr-HR",name:"Croatian (Croatia)"},{id:"it",name:"Italian"},{id:"it-IT",name:"Italian (Italy)"},{id:"it-CH",name:"Italian (Switzerland)"},{id:"sw",name:"Swahili"},{id:"sw-KE",name:"Swahili (Kenya)"},{id:"sw-KE",name:"Swahili (Tanzania)"},{id:"lv",name:"Latvian"},{id:"lv-LV",name:"Latvian (Latvia)"},{id:"lt",name:"Lithuanian"},{id:"lt-LT",name:"Lithuanian (Lithuania)"},{id:"hu",name:"Hungarian"},{id:"hu-HU",name:"Hungarian (Hungary)"},{id:"nl",name:"Dutch"},{id:"nl-NL",name:"Dutch (Netherlands)"},{id:"nb",name:"Norwegian Bokm\xE5l"},{id:"nb-NO",name:"Norwegian Bokm\xE5l (Norway)"},{id:"nn",name:"Norwegian Nynorsk"},{id:"nn-NO",name:"Norwegian Nynorsk (Norway)"},{id:"pl",name:"Polish"},{id:"pl-PL",name:"Polish (Poland)"},{id:"pt",name:"Portuguese"},{id:"pt-BR",name:"Portuguese (Brazil)"},{id:"pt-PT",name:"Portuguese (Portugal)"},{id:"ro",name:"Romanian"},{id:"ro-MD",name:"Romanian (Moldova)"},{id:"ro-RO",name:"Romanian (Romania)"},{id:"sq",name:"Albanian"},{id:"sq-AL",name:"Albanian (Albania)"},{id:"sk",name:"Slovak"},{id:"sk-SK",name:"Slovak (Slovakia)"},{id:"sl",name:"Slovenian"},{id:"sl-SI",name:"Slovenian (Slovenia)"},{id:"fi",name:"Finnish"},{id:"fi-FI",name:"Finnish (Finland)"},{id:"sv",name:"Swedish"},{id:"sv-FI",name:"Swedish (Finland)"},{id:"sv-SE",name:"Swedish (Sweden)"},{id:"vi",name:"Vietnamese"},{id:"vi-VN",name:"Vietnamese (Vietnam)"},{id:"tr",name:"Turkish"},{id:"tr-TR",name:"Turkish (Turkey)"},{id:"is",name:"Icelandic"},{id:"is-IS",name:"Icelandic (Iceland)"},{id:"el",name:"Greek"},{id:"el-CY",name:"Greek (Cyprus)"},{id:"el-GR",name:"Greek (Greece)"},{id:"sr",name:"Serbian"},{id:"sr-RS",name:"Serbian (Serbia)"},{id:"be",name:"Belarusian"},{id:"be-BY",name:"Belarusian (Belarus)"},{id:"bg",name:"\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438"},{id:"bg-BG",name:"Bulgarian (Bulgaria)"},{id:"mk",name:"Macedonian"},{id:"mk-MK",name:"Macedonian (Macedonia)"},{id:"ru",name:"Russian"},{id:"ru-MD",name:"Russian (Moldova)"},{id:"ru-RU",name:"Russian (Russia)"},{id:"ru-UA",name:"Russian (Ukraine)"},{id:"uk",name:"Ukrainian"},{id:"uk-UA",name:"Ukrainian (Ukraine)"},{id:"he",name:"Hebrew"},{id:"he-IL",name:"Hebrew (Israel)"},{id:"ar",name:"Arabic"},{id:"ar-DZ",name:"Arabic (Algeria)"},{id:"ar-KW",name:"Arabic (Kuwait)"},{id:"ar-MA",name:"Arabic (Morocco)"},{id:"ar-SA",name:"Arabic (Saudi Arabia)"},{id:"ar-EG",name:"Arabic (Egypt)"},{id:"hi",name:"Hindi"},{id:"hi-IN",name:"Hindi (India)"},{id:"th",name:"Thai"},{id:"th-TH",name:"Thai (Thailand)"},{id:"zh",name:"Chinese"},{id:"zh-CN",name:"Chinese (China)"},{id:"zh-HK",name:"Chinese (Hong Kong)"},{id:"zh-TW",name:"Chinese (Taiwan)"},{id:"ja",name:"Japanese"},{id:"ja-JP",name:"Japanese (Japan)"},{id:"ko",name:"Korean"},{id:"ko-KR",name:"Korean (South Korea)"},{id:"km",name:"Khmer"},{id:"km-KH",name:"Khmer (Cambodia)"}],currencies:[{id:"AFN",name:"Afghan Afghani"},{id:"ALL",name:"Albanian Lek"},{id:"DZD",name:"Algerian Dinar"},{id:"AOA",name:"Angolan Kwanza"},{id:"ARS",name:"Argentine Peso"},{id:"AMD",name:"Armenian Dram"},{id:"AWG",name:"Aruban Florin"},{id:"AUD",name:"Australian Dollar"},{id:"AZN",name:"Azerbaijani Manat"},{id:"AZM",name:"Azerbaijani Manat (1993-2006)"},{id:"BSD",name:"Bahamian Dollar"},{id:"BHD",name:"Bahraini Dinar"},{id:"BDT",name:"Bangladeshi Taka"},{id:"BBD",name:"Barbadian Dollar"},{id:"BYR",name:"Belarusian Ruble"},{id:"BZD",name:"Belize Dollar"},{id:"BMD",name:"Bermudan Dollar"},{id:"BTN",name:"Bhutanese Ngultrum"},{id:"BOB",name:"Bolivian Boliviano"},{id:"BAM",name:"Bosnia-Herzegovina Convertible Mark"},{id:"BWP",name:"Botswanan Pula"},{id:"BRL",name:"Brazilian Real"},{id:"GBP",name:"British Pound Sterling"},{id:"BND",name:"Brunei Dollar"},{id:"BGN",name:"Bulgarian Lev"},{id:"BUK",name:"Burmese Kyat"},{id:"BIF",name:"Burundian Franc"},{id:"XOF",name:"CFA Franc BCEAO"},{id:"XPF",name:"CFP Franc"},{id:"KHR",name:"Cambodian Riel"},{id:"CAD",name:"Canadian Dollar"},{id:"CVE",name:"Cape Verdean Escudo"},{id:"KYD",name:"Cayman Islands Dollar"},{id:"CLP",name:"Chilean Peso"},{id:"CNY",name:"Chinese Yuan Renminbi"},{id:"COP",name:"Colombian Peso"},{id:"KMF",name:"Comorian Franc"},{id:"CDF",name:"Congolese Franc"},{id:"CRC",name:"Costa Rican Col\xF3n"},{id:"HRK",name:"Croatian Kuna"},{id:"CUP",name:"Cuban Peso"},{id:"CZK",name:"Czech Republic Koruna"},{id:"DKK",name:"Danish Krone"},{id:"DJF",name:"Djiboutian Franc"},{id:"DOP",name:"Dominican Peso"},{id:"XCD",name:"East Caribbean Dollar"},{id:"EGP",name:"Egyptian Pound"},{id:"GQE",name:"Equatorial Guinean Ekwele"},{id:"ERN",name:"Eritrean Nakfa"},{id:"EEK",name:"Estonian Kroon"},{id:"ETB",name:"Ethiopian Birr"},{id:"EUR",name:"Euro"},{id:"FKP",name:"Falkland Islands Pound"},{id:"FJD",name:"Fijian Dollar"},{id:"GMD",name:"Gambian Dalasi"},{id:"GEK",name:"Georgian Kupon Larit"},{id:"GEL",name:"Georgian Lari"},{id:"GHS",name:"Ghanaian Cedi"},{id:"GIP",name:"Gibraltar Pound"},{id:"GTQ",name:"Guatemalan Quetzal"},{id:"GNF",name:"Guinean Franc"},{id:"GYD",name:"Guyanaese Dollar"},{id:"HTG",name:"Haitian Gourde"},{id:"HNL",name:"Honduran Lempira"},{id:"HKD",name:"Hong Kong Dollar"},{id:"HUF",name:"Hungarian Forint"},{id:"ISK",name:"Icelandic Kr\xF3na"},{id:"INR",name:"Indian Rupee"},{id:"IDR",name:"Indonesian Rupiah"},{id:"IRR",name:"Iranian Rial"},{id:"IQD",name:"Iraqi Dinar"},{id:"ILS",name:"Israeli New Sheqel"},{id:"JMD",name:"Jamaican Dollar"},{id:"JPY",name:"Japanese Yen"},{id:"JOD",name:"Jordanian Dinar"},{id:"KZT",name:"Kazakhstan Tenge"},{id:"KES",name:"Kenyan Shilling"},{id:"KWD",name:"Kuwaiti Dinar"},{id:"KGS",name:"Kyrgystani Som"},{id:"LAK",name:"Laotian Kip"},{id:"LVL",name:"Latvian Lats"},{id:"LBP",name:"Lebanese Pound"},{id:"LSL",name:"Lesotho Loti"},{id:"LRD",name:"Liberian Dollar"},{id:"LYD",name:"Libyan Dinar"},{id:"LTL",name:"Lithuanian Litas"},{id:"MOP",name:"Macanese Pataca"},{id:"MKD",name:"Macedonian Denar"},{id:"MGA",name:"Malagasy Ariary"},{id:"MWK",name:"Malawian Kwacha"},{id:"MYR",name:"Malaysian Ringgit"},{id:"MVR",name:"Maldivian Rufiyaa"},{id:"MRO",name:"Mauritanian Ouguiya"},{id:"MUR",name:"Mauritian Rupee"},{id:"MXN",name:"Mexican Peso"},{id:"MDL",name:"Moldovan Leu"},{id:"MNT",name:"Mongolian Tugrik"},{id:"MAD",name:"Moroccan Dirham"},{id:"MZN",name:"Mozambican Metical"},{id:"MMK",name:"Myanma Kyat"},{id:"NAD",name:"Namibian Dollar"},{id:"NPR",name:"Nepalese Rupee"},{id:"ANG",name:"Netherlands Antillean Guilder"},{id:"TWD",name:"New Taiwan Dollar"},{id:"NZD",name:"New Zealand Dollar"},{id:"NIC",name:"Nicaraguan Cordoba"},{id:"NGN",name:"Nigerian Naira"},{id:"KPW",name:"North Korean Won"},{id:"NOK",name:"Norwegian Krone"},{id:"ROL",name:"Old Romanian Leu"},{id:"TRL",name:"Old Turkish Lira"},{id:"OMR",name:"Omani Rial"},{id:"PKR",name:"Pakistani Rupee"},{id:"PAB",name:"Panamanian Balboa"},{id:"PGK",name:"Papua New Guinean Kina"},{id:"PYG",name:"Paraguayan Guarani"},{id:"PEN",name:"Peruvian Nuevo Sol"},{id:"PHP",name:"Philippine Peso"},{id:"PLN",name:"Polish Zloty"},{id:"QAR",name:"Qatari Rial"},{id:"RHD",name:"Rhodesian Dollar"},{id:"RON",name:"Romanian Leu"},{id:"RUB",name:"Russian Ruble"},{id:"RWF",name:"Rwandan Franc"},{id:"SHP",name:"Saint Helena Pound"},{id:"SVC",name:"Salvadoran Col\xF3n"},{id:"WST",name:"Samoan Tala"},{id:"SAR",name:"Saudi Riyal"},{id:"RSD",name:"Serbian Dinar"},{id:"SCR",name:"Seychellois Rupee"},{id:"SLL",name:"Sierra Leonean Leone"},{id:"SGD",name:"Singapore Dollar"},{id:"SKK",name:"Slovak Koruna"},{id:"SBD",name:"Solomon Islands Dollar"},{id:"SOS",name:"Somali Shilling"},{id:"ZAR",name:"South African Rand"},{id:"KRW",name:"South Korean Won"},{id:"LKR",name:"Sri Lanka Rupee"},{id:"SDG",name:"Sudanese Pound"},{id:"SRD",name:"Surinamese Dollar"},{id:"SZL",name:"Swazi Lilangeni"},{id:"SEK",name:"Swedish Krona"},{id:"CHF",name:"Swiss Franc"},{id:"SYP",name:"Syrian Pound"},{id:"STD",name:"S\xE3o Tom\xE9 and Pr\xEDncipe Dobra"},{id:"TJS",name:"Tajikistani Somoni"},{id:"TZS",name:"Tanzanian Shilling"},{id:"THB",name:"Thai Baht"},{id:"TOP",name:"Tongan Pa\u02BBanga"},{id:"TTD",name:"Trinidad and Tobago Dollar"},{id:"TND",name:"Tunisian Dinar"},{id:"TRY",name:"Turkish Lira"},{id:"TMM",name:"Turkmenistani Manat"},{id:"USD",name:"US Dollar"},{id:"UGX",name:"Ugandan Shilling"},{id:"UAH",name:"Ukrainian Hryvnia"},{id:"AED",name:"United Arab Emirates Dirham"},{id:"UYU",name:"Uruguayan Peso"},{id:"UZS",name:"Uzbekistan Som"},{id:"VUV",name:"Vanuatu Vatu"},{id:"VEB",name:"Venezuelan Bol\xEDvar"},{id:"VEF",name:"Venezuelan Bol\xEDvar Fuerte"},{id:"VND",name:"Vietnamese Dong"},{id:"CHE",name:"WIR Euro"},{id:"CHW",name:"WIR Franc"},{id:"YER",name:"Yemeni Rial"},{id:"ZMK",name:"Zambian Kwacha"},{id:"ZWD",name:"Zimbabwean Dollar"}],id:"geo"},J4={aa:"ET",ab:"GE",abr:"GH",ace:"ID",ach:"UG",ada:"GH",ady:"RU",ae:"IR",aeb:"TN",af:"ZA",agq:"CM",aho:"IN",ak:"GH",akk:"IQ",aln:"XK",alt:"RU",am:"ET",amo:"NG",aoz:"ID",apd:"TG",ar:"EG",arc:"IR","arc-Nbat":"JO","arc-Palm":"SY",arn:"CL",aro:"BO",arq:"DZ",ary:"MA",arz:"EG",as:"IN",asa:"TZ",ase:"US",ast:"ES",atj:"CA",av:"RU",awa:"IN",ay:"BO",az:"AZ","az-Arab":"IR",ba:"RU",bal:"PK",ban:"ID",bap:"NP",bar:"AT",bas:"CM",bax:"CM",bbc:"ID",bbj:"CM",bci:"CI",be:"BY",bej:"SD",bem:"ZM",bew:"ID",bez:"TZ",bfd:"CM",bfq:"IN",bft:"PK",bfy:"IN",bg:"BG",bgc:"IN",bgn:"PK",bgx:"TR",bhb:"IN",bhi:"IN",bhk:"PH",bho:"IN",bi:"VU",bik:"PH",bin:"NG",bjj:"IN",bjn:"ID",bjt:"SN",bkm:"CM",bku:"PH",blt:"VN",bm:"ML",bmq:"ML",bn:"BD",bo:"CN",bpy:"IN",bqi:"IR",bqv:"CI",br:"FR",bra:"IN",brh:"PK",brx:"IN",bs:"BA",bsq:"LR",bss:"CM",bto:"PH",btv:"PK",bua:"RU",buc:"YT",bug:"ID",bum:"CM",bvb:"GQ",byn:"ER",byv:"CM",bze:"ML",ca:"ES",cch:"NG",ccp:"BD",ce:"RU",ceb:"PH",cgg:"UG",ch:"GU",chk:"FM",chm:"RU",cho:"US",chp:"CA",chr:"US",cja:"KH",cjm:"VN",ckb:"IQ",co:"FR",cop:"EG",cps:"PH",cr:"CA",crh:"UA",crj:"CA",crk:"CA",crl:"CA",crm:"CA",crs:"SC",cs:"CZ",csb:"PL",csw:"CA",ctd:"MM",cu:"RU","cu-Glag":"BG",cv:"RU",cy:"GB",da:"DK",dak:"US",dar:"RU",dav:"KE",dcc:"IN",de:"DE",den:"CA",dgr:"CA",dje:"NE",dnj:"CI",doi:"IN",dsb:"DE",dtm:"ML",dtp:"MY",dty:"NP",dua:"CM",dv:"MV",dyo:"SN",dyu:"BF",dz:"BT",ebu:"KE",ee:"GH",efi:"NG",egl:"IT",egy:"EG",eky:"MM",el:"GR",en:"US","en-Shaw":"GB",es:"ES",esu:"US",et:"EE",ett:"IT",eu:"ES",ewo:"CM",ext:"ES",fa:"IR",fan:"GQ",ff:"SN","ff-Adlm":"GN",ffm:"ML",fi:"FI",fia:"SD",fil:"PH",fit:"SE",fj:"FJ",fo:"FO",fon:"BJ",fr:"FR",frc:"US",frp:"FR",frr:"DE",frs:"DE",fub:"CM",fud:"WF",fuf:"GN",fuq:"NE",fur:"IT",fuv:"NG",fvr:"SD",fy:"NL",ga:"IE",gaa:"GH",gag:"MD",gan:"CN",gay:"ID",gbm:"IN",gbz:"IR",gcr:"GF",gd:"GB",gez:"ET",ggn:"NP",gil:"KI",gjk:"PK",gju:"PK",gl:"ES",glk:"IR",gn:"PY",gom:"IN",gon:"IN",gor:"ID",gos:"NL",got:"UA",grc:"CY","grc-Linb":"GR",grt:"IN",gsw:"CH",gu:"IN",gub:"BR",guc:"CO",gur:"GH",guz:"KE",gv:"IM",gvr:"NP",gwi:"CA",ha:"NG",hak:"CN",haw:"US",haz:"AF",he:"IL",hi:"IN",hif:"FJ",hil:"PH",hlu:"TR",hmd:"CN",hnd:"PK",hne:"IN",hnj:"LA",hnn:"PH",hno:"PK",ho:"PG",hoc:"IN",hoj:"IN",hr:"HR",hsb:"DE",hsn:"CN",ht:"HT",hu:"HU",hy:"AM",hz:"NA",ia:"FR",iba:"MY",ibb:"NG",id:"ID",ife:"TG",ig:"NG",ii:"CN",ik:"US",ikt:"CA",ilo:"PH",in:"ID",inh:"RU",is:"IS",it:"IT",iu:"CA",iw:"IL",izh:"RU",ja:"JP",jam:"JM",jgo:"CM",ji:"UA",jmc:"TZ",jml:"NP",jut:"DK",jv:"ID",jw:"ID",ka:"GE",kaa:"UZ",kab:"DZ",kac:"MM",kaj:"NG",kam:"KE",kao:"ML",kbd:"RU",kby:"NE",kcg:"NG",kck:"ZW",kde:"TZ",kdh:"TG",kdt:"TH",kea:"CV",ken:"CM",kfo:"CI",kfr:"IN",kfy:"IN",kg:"CD",kge:"ID",kgp:"BR",kha:"IN",khb:"CN",khn:"IN",khq:"ML",kht:"IN",khw:"PK",ki:"KE",kiu:"TR",kj:"NA",kjg:"LA",kk:"KZ","kk-Arab":"CN",kkj:"CM",kl:"GL",kln:"KE",km:"KH",kmb:"AO",kn:"IN",knf:"SN",ko:"KR",koi:"RU",kok:"IN",kos:"FM",kpe:"LR",krc:"RU",kri:"SL",krj:"PH",krl:"RU",kru:"IN",ks:"IN",ksb:"TZ",ksf:"CM",ksh:"DE",ku:"TR","ku-Arab":"IQ",kum:"RU",kv:"RU",kvr:"ID",kvx:"PK",kw:"GB",kxm:"TH",kxp:"PK",ky:"KG","ky-Arab":"CN","ky-Latn":"TR",la:"VA",lab:"GR",lad:"IL",lag:"TZ",lah:"PK",laj:"UG",lb:"LU",lbe:"RU",lbw:"ID",lcp:"CN",lep:"IN",lez:"RU",lg:"UG",li:"NL",lif:"NP","lif-Limb":"IN",lij:"IT",lis:"CN",ljp:"ID",lki:"IR",lkt:"US",lmn:"IN",lmo:"IT",ln:"CD",lo:"LA",lol:"CD",loz:"ZM",lrc:"IR",lt:"LT",ltg:"LV",lu:"CD",lua:"CD",luo:"KE",luy:"KE",luz:"IR",lv:"LV",lwl:"TH",lzh:"CN",lzz:"TR",mad:"ID",maf:"CM",mag:"IN",mai:"IN",mak:"ID",man:"GM","man-Nkoo":"GN",mas:"KE",maz:"MX",mdf:"RU",mdh:"PH",mdr:"ID",men:"SL",mer:"KE",mfa:"TH",mfe:"MU",mg:"MG",mgh:"MZ",mgo:"CM",mgp:"NP",mgy:"TZ",mh:"MH",mi:"NZ",min:"ID",mis:"IQ",mk:"MK",ml:"IN",mls:"SD",mn:"MN","mn-Mong":"CN",mni:"IN",mnw:"MM",moe:"CA",moh:"CA",mos:"BF",mr:"IN",mrd:"NP",mrj:"RU",mro:"BD",ms:"MY",mt:"MT",mtr:"IN",mua:"CM",mus:"US",mvy:"PK",mwk:"ML",mwr:"IN",mwv:"ID",mxc:"ZW",my:"MM",myv:"RU",myx:"UG",myz:"IR",mzn:"IR",na:"NR",nan:"CN",nap:"IT",naq:"NA",nb:"NO",nch:"MX",nd:"ZW",ndc:"MZ",nds:"DE",ne:"NP",new:"NP",ng:"NA",ngl:"MZ",nhe:"MX",nhw:"MX",nij:"ID",niu:"NU",njo:"IN",nl:"NL",nmg:"CM",nn:"NO",nnh:"CM",no:"NO",nod:"TH",noe:"IN",non:"SE",nqo:"GN",nr:"ZA",nsk:"CA",nso:"ZA",nus:"SS",nv:"US",nxq:"CN",ny:"MW",nym:"TZ",nyn:"UG",nzi:"GH",oc:"FR",om:"ET",or:"IN",os:"GE",osa:"US",otk:"MN",pa:"IN","pa-Arab":"PK",pag:"PH",pal:"IR","pal-Phlp":"CN",pam:"PH",pap:"AW",pau:"PW",pcd:"FR",pcm:"NG",pdc:"US",pdt:"CA",peo:"IR",pfl:"DE",phn:"LB",pka:"IN",pko:"KE",pl:"PL",pms:"IT",pnt:"GR",pon:"FM",pra:"PK",prd:"IR",ps:"AF",pt:"BR",puu:"GA",qu:"PE",quc:"GT",qug:"EC",raj:"IN",rcf:"RE",rej:"ID",rgn:"IT",ria:"IN",rif:"MA",rjs:"NP",rkt:"BD",rm:"CH",rmf:"FI",rmo:"CH",rmt:"IR",rmu:"SE",rn:"BI",rng:"MZ",ro:"RO",rob:"ID",rof:"TZ",rtm:"FJ",ru:"RU",rue:"UA",rug:"SB",rw:"RW",rwk:"TZ",ryu:"JP",sa:"IN",saf:"GH",sah:"RU",saq:"KE",sas:"ID",sat:"IN",sav:"SN",saz:"IN",sbp:"TZ",sc:"IT",sck:"IN",scn:"IT",sco:"GB",scs:"CA",sd:"PK","sd-Deva":"IN","sd-Khoj":"IN","sd-Sind":"IN",sdc:"IT",sdh:"IR",se:"NO",sef:"CI",seh:"MZ",sei:"MX",ses:"ML",sg:"CF",sga:"IE",sgs:"LT",shi:"MA",shn:"MM",si:"LK",sid:"ET",sk:"SK",skr:"PK",sl:"SI",sli:"PL",sly:"ID",sm:"WS",sma:"SE",smj:"SE",smn:"FI",smp:"IL",sms:"FI",sn:"ZW",snk:"ML",so:"SO",sou:"TH",sq:"AL",sr:"RS",srb:"IN",srn:"SR",srr:"SN",srx:"IN",ss:"ZA",ssy:"ER",st:"ZA",stq:"DE",su:"ID",suk:"TZ",sus:"GN",sv:"SE",sw:"TZ",swb:"YT",swc:"CD",swg:"DE",swv:"IN",sxn:"ID",syl:"BD",syr:"IQ",szl:"PL",ta:"IN",taj:"NP",tbw:"PH",tcy:"IN",tdd:"CN",tdg:"NP",tdh:"NP",te:"IN",tem:"SL",teo:"UG",tet:"TL",tg:"TJ","tg-Arab":"PK",th:"TH",thl:"NP",thq:"NP",thr:"NP",ti:"ET",tig:"ER",tiv:"NG",tk:"TM",tkl:"TK",tkr:"AZ",tkt:"NP",tl:"PH",tly:"AZ",tmh:"NE",tn:"ZA",to:"TO",tog:"MW",tpi:"PG",tr:"TR",tru:"TR",trv:"TW",ts:"ZA",tsd:"GR",tsf:"NP",tsg:"PH",tsj:"BT",tt:"RU",ttj:"UG",tts:"TH",ttt:"AZ",tum:"MW",tvl:"TV",twq:"NE",txg:"CN",ty:"PF",tyv:"RU",tzm:"MA",udm:"RU",ug:"CN","ug-Cyrl":"KZ",uga:"SY",uk:"UA",uli:"FM",umb:"AO",und:"US",unr:"IN","unr-Deva":"NP",unx:"IN",ur:"PK",uz:"UZ","uz-Arab":"AF",vai:"LR",ve:"ZA",vec:"IT",vep:"RU",vi:"VN",vic:"SX",vls:"BE",vmf:"DE",vmw:"MZ",vot:"RU",vro:"EE",vun:"TZ",wa:"BE",wae:"CH",wal:"ET",war:"PH",wbp:"AU",wbq:"IN",wbr:"IN",wls:"WF",wni:"KM",wo:"SN",wtm:"IN",wuu:"CN",xav:"BR",xcr:"TR",xh:"ZA",xlc:"TR",xld:"TR",xmf:"GE",xmn:"CN",xmr:"SD",xna:"SA",xnr:"IN",xog:"UG",xpr:"IR",xsa:"YE",xsr:"NP",yao:"MZ",yap:"FM",yav:"CM",ybb:"CM",yo:"NG",yrl:"BR",yua:"MX",yue:"HK","yue-Hans":"CN",za:"CN",zag:"SD",zdj:"KM",zea:"NL",zgh:"MA",zh:"CN","zh-Bopo":"TW","zh-Hanb":"TW","zh-Hant":"TW",zlm:"TG",zmi:"MY",zu:"ZA",zza:"TR"};var N2=require("liquidjs");var d4=require("liquidjs");function Y4(n){return class extends d4.Tag{key;value;identifier;constructor(t,i,r){super(t,i,r),this.identifier=this.tokenizer.readIdentifier(),this.key=this.identifier.content,this.tokenizer.assert(this.key,"expected variable name"),this.tokenizer.skipBlank(),this.tokenizer.peek()==="="&&(this.tokenizer.advance(),this.value=new d4.Value(this.tokenizer.readFilteredValue(),this.liquid))}*render(t){this.value&&(t.bottom()[this.key]=yield this.value.value(t,this.liquid.options.lenientIf))}*arguments(){yield this.value}*localScope(){yield this.identifier}}}var X=require("liquidjs");function Q4(n){return class extends X.Tag{value;branches;elseTemplates;isBlock;constructor(t,i,r,o){super(t,i,r);let a=this.tokenizer.p,s=this.tokenizer.readValue()?.getText();this.isBlock=!!s?.startsWith("block."),this.tokenizer.p=a,this.value=new X.Value(this.tokenizer.readFilteredValue(),this.liquid),this.branches=[],this.elseTemplates=[];let l=[],h=0,u=o.parseStream(i).on("tag:when",d=>{if(h>0)return;l=[];let m=[];for(;!d.tokenizer.end();)m.push(d.tokenizer.readValueOrThrow()),d.tokenizer.skipBlank(),d.tokenizer.peek()===","?d.tokenizer.readTo(","):d.tokenizer.readTo("or");this.branches.push({values:m,templates:l})}).on("tag:else",()=>{h++,l=this.elseTemplates}).on("tag:endcase",()=>u.stop()).on("template",d=>{(l!==this.elseTemplates||h===1)&&l.push(d)}).on("end",()=>{throw new Error(`tag ${t.getText()} not closed`)});u.start()}*render(t,i){let r=this.liquid.renderer,o=(0,X.toValue)(yield this.value.value(t,t.opts.lenientIf)),a=!1,s="";for(let l of this.branches)for(let h of l.values){let u=yield(0,X.evalToken)(h,t,t.opts.lenientIf);if(o===u){let d=yield r.renderTemplates(l.templates,t);s+=this.isBlock&&n.isEditor?`<span class="swell-block">${d}</span>`:d,a=!0;break}}a||(s+=yield r.renderTemplates(this.elseTemplates,t)),s&&i.write(s)}*arguments(){yield this.value,yield*this.branches.flatMap(t=>t.values)}*children(){let t=this.branches.flatMap(i=>i.templates);return this.elseTemplates&&t.push(...this.elseTemplates),t}}}var h4=require("liquidjs");var G5=Object.freeze(["offset","limit","reversed"]);function X4(n){return class extends h4.ForTag{*render(t,i){let r=this.liquid.renderer,o=yield(0,h4.evalToken)(this.collection,t);if(o=yield w3(o),!o.length){yield r.renderTemplates(this.elseTemplates,t,i);return}let a="continue-"+this.variable+"-"+this.collection.getText();t.push({continue:t.getRegister(a)});let s=yield this.hash.render(t);t.pop(),o=(this.liquid.options.orderedFilterParameters?Object.keys(s).filter(u=>G5.includes(u)):G5.filter(u=>s[u]!==void 0)).reduce((u,d)=>{switch(d){case"offset":return r1(u,s.offset);case"limit":return o1(u,s.limit);case"reversed":return n1(u);default:return u}},o),t.setRegister(a,(s.offset||0)+o.length);let h={forloop:new C3(o.length,this.collection.getText(),this.variable)};t.push(h);for(let u of o){if(h[this.variable]=u,t.continueCalled=t.breakCalled=!1,yield r.renderTemplates(this.templates,t,i),t.breakCalled)break;h.forloop.next()}t.continueCalled=t.breakCalled=!1,t.pop()}}}function n1(n){return[...n].reverse()}function r1(n,e){return n.slice(e)}function o1(n,e){return n.slice(0,e)}var e3=require("liquidjs");var a1=Object.freeze(["new_comment","guest_login"]);function ee(n){return class extends e3.Tag{formType;formConfig;templates;hash;arg;constructor(t,i,r,o){super(t,i,r);let{tokenizer:a}=t;for(this.formType=a.readValue()?.content,this.formConfig=n.theme.getFormConfig(this.formType),a.advance(),this.arg=a.readValue(),this.templates=[],this.hash=new e3.Hash(this.tokenizer.remaining());i.length>0;){let s=i.shift();if(e3.TypeGuards.isTagToken(s)&&s.name==="endform")return;this.templates.push(o.parseToken(s,i))}if(!(!this.formConfig&&!a1.includes(this.formType)))throw new Error(`tag ${t.getText()} not closed`)}*render(t,i){if(!this.formConfig){i.write(`<!-- form '${this.formType}' not found in theme configuration -->`);return}let r=this.liquid.renderer,o=yield(0,e3.evalToken)(this.arg,t),a=yield this.hash.render(t),s=t.getAll(),l=" "+Object.entries(a).reduce((C,[f,F])=>(F!==!0&&C.push(`${f}="${String(F)}"`),C),[]).join(" "),u=n.theme.formData[this.formConfig.id]||new J(this.formConfig.id),d="";if(n.theme.shopifyCompatibility){Object.assign(u,n.theme.shopifyCompatibility.getFormData(u));let C=yield n.theme.shopifyCompatibility.getAdaptedFormClientHtml(this.formConfig.id,s,o);C&&(d=yield n.renderTemplateString(C));let f=yield n.theme.shopifyCompatibility.getAdaptedFormClientParams(this.formConfig.id,s,o);f&&u.setParams(f)}t.push({form:{...o||void 0,...u}});let m=yield r.renderTemplates(this.templates,t),p=Array.isArray(this.formConfig.params)?yield Promise.all(this.formConfig.params.map(async C=>{let f=await n.renderTemplateString(C.value,{value:o});return`<input type="hidden" name="${C.name}" value="${f}" />`})):[],g=a.return_to||n.theme.globals.request?.path;i.write(`
|
|
8
|
+
`.replace(/^ {3} */gm,"").trim()}modify(e,t){switch(e){case"style":{if(this.resolveValidProperty(e,t)){switch(this.style=t,t){case"oblique":this.variant.slnt=1;break;case"italic":this.variant.ital=1;break;default:this.variant.slnt=0,this.variant.ital=0;break}break}return null}case"weight":{let i;switch(t){case"normal":i=400;break;case"bold":i=700;break;case"lighter":{this.weight<=400?i=100:this.weight<=700?i=400:i=700;break}case"bolder":{this.weight<400?i=400:this.weight<700?i=700:i=900;break}default:{switch(t.slice(0,1)){case"+":i=this.weight+Number.parseInt(t.slice(1),10);break;case"-":i=this.weight-Number.parseInt(t.slice(1),10);break;default:i=Number.parseInt(t,10);break}break}}let r=this.resolveValidProperty(e,i);if(r){this.weight=i,this.variant.wght=r;break}return null}case"wght":case"wdth":case"slnt":case"opsz":case"ital":{let i=this.resolveValidProperty(e,t);if(i){this.variant[e]=i,e==="slnt"&&i>0?this.style="oblique":e==="ital"&&i>0?this.style="italic":(e==="slnt"||e==="ital")&&(this.style="normal");break}return null}default:throw new Error(`Invalid font property: ${e}`)}return this.id=n.settingToString({variant:this.variant,family:this.family,weight:this.weight,style:this.style}),this}resolveValidProperty(e,t){if(!this.definition)return null;if(e==="style")switch(t){case"italic":return this.definition.axes.includes("ital")?"italic":null;case"oblique":return this.definition.axes.includes("slnt")?"oblique":null;default:return null}let i=typeof t=="string"?Number.parseInt(t,10):t;switch(e){case"wght":case"weight":return this.definition.variants.find(r=>r.wght===i)||null;case"wdth":return this.definition.variants.find(r=>r.wdth===i)||null;case"slnt":return this.definition.variants.find(r=>r.slnt===i)||null;case"opsz":return this.definition.variants.find(r=>r.opsz===i)||null;case"ital":return this.definition.variants.find(r=>r.ital===i)||null;default:return null}}};function Gt(n){return typeof n=="object"&&n!==null}function F5(n){return Gt(n)&&typeof n.style=="string"&&typeof n.family=="string"&&typeof n.weight=="number"&&typeof n.modify=="function"&&typeof n.googleFamily=="function"}var Y=class{id;success=!1;errors=null;constructor(e){this.id=e}setSuccess(e=!0){this.success=e}setParams(e){Object.assign(this,e)}setErrors(e){this.errors=new r4(e)}clearErrors(){this.errors=null}},r4=class{errors;constructor(e){this.errors=e||[]}*[Symbol.iterator](){yield*this.errors}some(e,t){return this.errors.some(i=>e(i?.code),t)}};var T=require("lodash-es");function $4(n,e){return new y({directory:e.path,name:e.name,suffix:e.alt_name},"name")}function H(n,e,t,i){return e instanceof y?e.clone():new y({alt:c(e,r=>r.alt||t?.name),aspect_ratio:1,"attached_to_variant?":!0,height:w(()=>e.height),id:c(e,r=>r.file?.id),media_type:"image",position:null,presentation:{focal_point:null},preview_image:w(()=>e.file),product_id:w(()=>t?.id),src:c(e,async r=>r.file&&Vt(r.file)),variants:null,width:w(()=>e.width)})}function Vt(n){return new y({url:n.url,width:n.width,height:n.height},"url")}function Q(n,e){return e instanceof y?e.clone():new y({alt:e.alt,id:e.id||e.file?.id,media_type:"image",position:null,preview_image:e.file})}function $(n,e,t,i=0){if(e instanceof y)return e.clone();let r=t||e.product||{};return new y({available:c(e,o=>o.stock_status==="in_stock"||!o.stock_status),barcode:null,compare_at_price:w(()=>e.orig_price),featured_image:c([r,e],(o,a)=>{let s=a.images?.[0]||o.images?.[0];return s&&Q(n,s)}),featured_media:c([r,e],(o,a)=>{let s=a.images?.[0]||o.images?.[0];return s&&Q(n,s)}),id:c(e,o=>o.id),image:c([r,e],(o,a)=>{let s=a.images?.[0]||o.images?.[0];return s&&Q(n,s)}),incoming:!1,inventory_management:null,inventory_policy:null,inventory_quantity:c(e,o=>{if(!o.stock_status)return 1/0;let a=o.stock_level||0;return a<0&&(a=0),a}),matched:!1,metafields:null,next_incoming_date:null,options:Ot(r,e),selected_option_values:c([r,e],(o,a)=>K4(o,a,n.swell.queryParams)),option1:U4(r,e,0),option2:U4(r,e,1),option3:U4(r,e,2),price:c([r,e],(o,a)=>$t(o,a,n.swell.queryParams)),product:c(r,o=>P(n,o,i+1)),quantity_price_breaks:null,"quantity_price_breaks_configured?":c(e,()=>e.prices?.length>0),quantity_rule:{min:1,max:null,increment:1},requires_selling_plan:!1,requires_shipping:c(r,()=>r.delivery?.contains("shipment")),selected:!1,selected_selling_plan_allocation:null,selling_plan_allocations:null,sku:c(e,o=>o.sku),store_availabilities:null,taxable:!0,title:w(()=>e.name),unit_price:w(()=>e.price),unit_price_measurement:null,url:w(()=>r.url),weight:c(e,o=>o.weight),weight_in_unit:w(()=>e.weight_unit),weight_unit:c(e,o=>o.weight_unit)})}function Ot(n,e){return c([n,e],(t,i)=>{let r=t.options?.reduce((o,a)=>{for(let s of a.values)o[s.id]||(o[s.id]=s.name);return o},{});return i.option_value_ids?.map(o=>r[o]).filter(Boolean)})}function U4(n,e,t){return c([n,e],(i,r)=>{let o=i.options?.reduce((a,s)=>{for(let l of s.values)a[l.id]||(a[l.id]=l.name);return a},{});return r.option_value_ids?.[t]&&o[r.option_value_ids[t]]})}function $t(n,e,t){let{option_values:i=""}=t,r=i.split(","),o=n.options?.reduce((s,l)=>{if(l.variant||!l.active||!l.values||l.values.length<=0||l.input_type!=="select")return s;for(let h of l.values)if(r.includes(h.id))return s+(h.price||0);return s+(l.values[0].price||0)},0),a=n.price;return e.price!==null&&e.price!==void 0&&(a=e.price),a+(o||0)}function P(n,e,t=0){return e instanceof y?e.clone():t>1?null:new y({available:c(e,i=>i.stock_status==="in_stock"||!i.stock_status),collections:[],compare_at_price:w(()=>e.orig_price),compare_at_price_max:null,compare_at_price_min:null,compare_at_price_varies:!1,content:w(()=>e.description),created_at:w(()=>e.date_created),description:c(e,i=>i.description),featured_image:c(e,i=>i.images?.[0]&&H(n,i.images[0],i)),featured_media:c(e,i=>i.images?.[0]&&Q(n,i.images[0])),first_available_variant:c(e,i=>o4(i,{})),"gift_card?":c(e,i=>i.type==="giftcard"),handle:w(()=>e.slug),has_only_default_variant:c(e,i=>!i.options?.length),id:c(e,i=>i.id),images:c(e,i=>i.images?.map(r=>r&&H(n,r,i))),media:c(e,i=>i.images?.map(r=>Q(n,r))),metafields:null,options:c(e,i=>i.options?.map(r=>r.active&&r.name).filter(Boolean)),selected_option_values:c(e,i=>zt(i,n.swell.queryParams)),options_by_name:c(e,i=>i.options?.reduce((r,o,a)=>(o.active&&(r[o.name?.toLowerCase()]={name:o.name,position:a+1,selected_value:null,variant_option:o.variant,values:o.values?.map(s=>N5({available:!0,id:s.id,name:s.name,product_url:null,selected:!1,swatch:null,variant:null,addPrice:s.price}))}),r),{})),options_with_values:c(e,i=>{let r=o4(i,n.swell.queryParams),o=r?.option_value_ids||[];return i.options?.map((a,s)=>({name:a.name,position:s+1,selected_value:null,variant_option:a.variant,values:a.values?.map(l=>N5({available:!0,id:l.id,name:l.name,product_url:null,selected:o.includes(l.id),swatch:null,variant:r,addPrice:l.price}))}))}),price:c(e,i=>Kt(i,n.swell.queryParams)),price_max:c(e,i=>i.variants?.results?.reduce((r,o)=>Math.max(r,o.price),0)),price_min:c(e,i=>i.variants?.results?.reduce((r,o)=>Math.min(r,o.price),1/0)),price_varies:c(e,i=>i.variants?.results?.some(r=>r.price!==i.price)),published_at:w(()=>e.date_created),"quantity_price_breaks_configured?":c(e,i=>i.prices?.length>0),quantity_rule:c(e,i=>{let r=i.stock_level||0;return r<0&&(r=0),{min:1,max:i.stock_status?r:null,increment:1}}),inventory_quantity:c(e,i=>{if(!i.stock_status)return 1/0;let r=i.stock_level||0;return r<0&&(r=0),r}),requires_selling_plan:!1,selected_or_first_available_selling_plan_allocation:null,selected_or_first_available_variant:c(e,i=>{let r=o4(i,n.swell.queryParams);return r?$(n,r,i,t+1):P(n,i,t+1)}),selected_selling_plan:null,selected_variant:null,selling_plan_groups:null,tags:c(e,i=>i.tags),template_suffix:null,title:w(()=>e.name),type:c(e,i=>i.type),url:c(e,i=>`/products/${i.slug}`),variants:c(e,i=>i.variants?.results?.map(o=>$(n,o,i,t+1)).reverse()),vendor:null})}function N5(n){return new y(n,"name")}function o4(n,e){let{variant:t,option_values:i}=e,r=Ut(n),o=null;if(t)o=r.find(a=>a.id===t);else if(i){let a=i.split(",");o=r.find(s=>s.option_value_ids.every(l=>a.includes(l)))}return o||r?.[0]||null}function Ut(n){return(n.variants?.results?.slice()?.reverse()||[]).filter(e=>e.stock_status==="in_stock"||!e.stock_status)}function Kt(n,e){let{option_values:t=""}=e,i=t.split(","),r=n.options?.reduce((o,a)=>{if(!a.active||!a.values||a.values.length<=0||a.input_type!=="select")return o;for(let s of a.values)if(i.includes(s.id))return o+(s.price||0);return o+(a.values[0].price||0)},0);return n.price+(r||0)}function zt(n,e){let t=o4(n,e);return K4(n,t,e)}function K4(n,e,t){let{option_values:i=""}=t,r=i.split(","),o=e?[...e.option_value_ids||[]]:[],a=[];for(let s of n.options||[])if(s.active&&s.values?.length>0&&s.input_type==="select"){let l="",h="";for(let u of s.values){if(o.includes(u.id)){l=u.id;break}r.includes(u.id)&&(h=u.id)}a.push(l||h||s.values[0].id)}return a}function S3(n,e,t,i={}){return new y({...e,discount_allocations:e.discounts?.map(r=>{let o=t.discounts?.find(s=>s.id===r.id),a=(o?.source_id===t.coupon_id?t.coupon?.name:t.promotions?.results?.find(s=>o?.source_id===s.id)?.name)||o?.source_id;return[{amount:r.amount,discount_application:o&&{target_selection:o.type==="order"?"all":["shipment","product"].includes(o.type)?"entitled":"explicit",target_type:o.type==="shipment"?"shipping_line":"line_item",title:a,total_allocated_amount:o.amount,type:o.type==="promo"?"automatic":o.type==="coupon"?"discount_code":"manual",value:o.rule?.value_type==="fixed"?o.rule?.value_fixed:o.rule?.value_percent,value_type:o.rule?.value_type==="fixed"?"fixed_amount":"percentage"}}]}),error_message:null,final_line_price:a4(e)?0:e.price_total-e.discount_total,final_price:a4(e)?0:e.price-e.discount_each,fulfillment_service:"manual",gift_card:e.delivery==="giftcard",grams:e.shipment_weight,id:e.id,image:c([e.product,e.variant],(r,o)=>r?.images?.[0]&&H(n,r.images?.[0],r,o)),item_components:e.bundle_items?.map(r=>S3(n,r,t,{...i,bundle:!0})),key:e.id,line_level_discount_allocations:[],line_level_total_discount:e.discount_total,message:null,options_with_values:e.options,original_line_price:a4(e)?0:e.price*e.quantity,original_price:a4(e)?0:e.price,product:c(e.product,()=>e.product&&P(n,e.product)),product_id:e.product_id,properties:e.metadata,quantity:e.quantity,requires_shipping:e.delivery==="shipment",selling_plan_allocation:Wt(e),sku:c(e.product,r=>r.sku),successfully_fulfilled_quantity:e.quantity_delivered,tax_lines:e.taxes?.map(r=>{let o=t.taxes?.find(a=>a.id===r.id);return{price:r.amount,rate:(o?.rate||0)/100,rate_percentage:o?.rate||0,title:r.name}}),taxable:e.tax_total>0,title:c([e.product,e.variant],(r,o)=>`${r?.name||e.product_id}${o?.name?` - ${o.name}`:""}`),url:c(e.product,r=>`/products/${r.slug}`),url_to_remove:null,variant:c([e.product,e.variant],()=>e.variant?$(n,e.variant,e.product):P(n,e.product)),vendor:null,discounts:null,line_price:e.price_total,price:e.price,total_discount:e.discount_total})}function s4(n,e="quantity"){return n?.reduce((t,i)=>t+i[e],0)||0}function a4(n){let e=n?.purchase_option;return e?.type!=="subscription"?!1:e.billing_schedule.trial_days>0}function Wt(n){let e=n?.purchase_option;if(e?.type!=="subscription")return null;let t=e.billing_schedule?.trial_days||0,i=t>0?` (Includes ${t} trial day${t===1?"":"s"})`:"",r=e.billing_schedule?.interval_count||1,o="day";switch(e.billing_schedule?.interval){case"weekly":o="wk";break;case"monthly":o="mo";break;case"yearly":o="yr";break;default:}let s=`${`${r>1?r:""}${o}`}${i}`;return{selling_plan:{name:e.plan_name,description:e.plan_description,plan_id:e.plan_id,billing_schedule:e.billing_schedule,planPriceText:s,planPrice:n.price}}}function k3(n,e){return e instanceof y?e.clone():new y({attributes:w(()=>e.metadata),cart_level_discount_applications:[],checkout_charge_amount:w(()=>e.grand_total),currency:c(e,t=>t.currency),discount_applications:[],duties_included:w(()=>e.item_tax_included),"empty?":c(e,t=>!t.items?.length),item_count:c(e,t=>s4(t.items)),items:c(e,t=>t.items?.map(i=>S3(n,i,t))),items_subtotal_price:w(()=>e.sub_total),note:w(()=>e.comments),original_total_price:c(e,t=>t.sub_total+t.item_discount),requires_shipping:w(()=>!!e.shipment_delivery),taxes_included:w(()=>!!e.item_tax_included),total_discount:w(()=>e.discount_total),total_price:w(()=>e.grand_total),total_weight:w(()=>e.item_shipment_weight)})}function s3(n,e,t){return e instanceof y?e.clone():new y({address1:c(e,i=>i.address1),address2:c(e,i=>i.address2),city:c(e,i=>i.city),company:c(e,i=>i.company),country:c(e,i=>Jt(n,i.country)),country_code:c(e,i=>i.country_code),first_name:c(e,i=>i.first_name||t?.first_name),id:c(e,i=>i.id),last_name:c(e,i=>i.last_name||t?.last_name),name:c(e,i=>i.name||t?.name),phone:c(e,i=>i.phone),province:c(e,i=>i.state),province_code:c(e,i=>String(i.state||"").substring(0,2)),street:c(e,i=>I5(i.address1,i.address2)),summary:c(e,i=>I5(i.name||t?.name,i.company,i.address1,i.address2,i.city,i.state,i.country)),url:c(e,i=>`/account/addresses/${i.id}`),zip:c(e,i=>i.zip)})}function I5(...n){return n.filter(Boolean).join(`
|
|
9
|
+
`)}function Jt(n,e){return new y({available_languages:[],continent:"",currency:"",iso_code:e,market:null,name:e,"popular?":!0,unit_system:"metric"},"iso_code")}function l3(n,e,t){if(e instanceof y)return e.clone();let i=t||e.account,r=c(e,o=>o.items?.map(a=>S3(n,a,o,{order:!0})));return new y({attributes:w(()=>e.metadata),billing_address:c(e,()=>s3(n,e.billing)),cancelled:w(()=>e.canceled),cancelled_at:w(()=>e.date_canceled),confirmation_number:w(()=>e.number),created_at:w(()=>e.date_created),customer:i&&w(()=>X(n,i)),customer_order_url:c(e,o=>`/account/orders/${o.id}`),customer_url:c(e,o=>`/account/orders/${o.id}`),email:i&&c(i,o=>o.email),financial_status:c(e,o=>H5(o)),financial_status_label:c(e,o=>Yt(o)),fulfillment_status:c(e,o=>B5(o)),fulfillment_status_label:c(e,o=>Qt(o)),id:c(e,o=>o.id),item_count:c(e,o=>s4(o.items)),line_items:r,line_items_subtotal_price:w(()=>e.sub_total),name:w(()=>e.number),number:c(e,o=>o.number),note:w(()=>e.comments),phone:i&&c([e,i],(o,a)=>o.billing?.phone||o.shipping.phone||a.phone),shipping_address:c(e,()=>s3(n,e.shipping)),shipping_methods:w(()=>{let o=t1(e);return o&&[o]}),shipping_price:w(()=>e.shipment_total),subtotal_line_items:r,subtotal_price:w(()=>e.sub_total),tags:null,tax_price:w(()=>e.tax_total),total_discounts:w(()=>e.discount_total),total_net_amount:w(()=>e.grand_total),total_price:w(()=>e.grand_total),total_refunded_amount:w(()=>e.refund_total)})}function H5(n){return e1(n)?"refund_due":n.payment_total>0&&n.payment_total>n.refund_total&&n.payment_total<n.grand_total&&Xt(n)>0?"partially_paid":n.refund_total>0&&n.refund_total<n.payment_total?"partially_refunded":n.refund_total>0&&n.refund_total===n.payment_total?"refunded":n.payment_total>0&&n.payment_balance===0?"paid":n.authorized_payment_id&&!n.paid?"authorized":n.grand_total>0?"unpaid":"complete"}function B5(n){return n.canceled?"canceled":n.hold||n.status==="hold"?"on_hold":n.delivered?n.item_quantity_returned>0||n.return_total>0?n.item_quantity_returned===n.item_quantity?"returned":"rartially_returned":"fulfilled":n.item_quantity_delivered>0?"partially_fulfilled":n.item_quantity_deliverable>0?"unfulfilled":"complete"}function Yt(n){return q5(H5(n))}function Qt(n){return q5(B5(n))}function q5(n){let e=n.replace(/\_/g," ");return e.charAt(0).toUpperCase()+e.slice(1)}function Xt(n){return!n.canceled&&n.payment_balance<0?-n.payment_balance:0}function e1(n){if(n.canceled)return n.payment_total-n.refund_total;if(n.payment_balance>0)return n.payment_balance}function t1(n){return n.shipping?.service?new y({id:n.shipping.service,handle:`${n.shipping.service}-${n.shipping.price}`,original_price:n.shipment_price,price:n.shipment_total,tax_lines:[],title:n.shipping.service_name||n.shipping.service}):null}function X(n,e){return e instanceof y?e.clone():new y({accepts_marketing:w(()=>e.email_optin),addresses:z4(n,e,"addresses",s3),addresses_count:c(e.addresses,t=>t.count||0),"b2b?":c(e,()=>e.type==="business"),company_available_locations:[],current_company:null,current_location:null,default_address:c(e,t=>s3(n,t.shipping||t.billing||{},t)),email:c(e,t=>t.email),first_name:c(e,t=>t.first_name),has_account:!0,"has_avatar?":!1,id:c(e,t=>t.id),last_name:c(e,t=>t.last_name),last_order:w(()=>i1(n,e)),name:c(e,t=>t.name),orders:z4(n,e,"orders",l3),orders_count:w(()=>e.order_count),phone:c(e,t=>t.phone||t.shipping?.phone||t.billing?.phone),tags:c(e,t=>t.tags||[t.group]),tax_exempt:w(()=>e.tax_exempt),total_spent:w(()=>e.order_value)})}async function i1(n,e){let t=await e.id,i=await n.swell.getCachedResource(`last-order-${t}`,[],async()=>(await n.swell.storefront.account.listOrders({limit:1}))?.results?.[0]);if(i)return l3(n,i,e)}var l4={url:"/:themes:configs/{id}/file/data",conditions:{file:{$or:[{$and:[{content_type:{$regex:"^(?!image)"}},{content_type:{$regex:"^(?!video)"}}]},{content_type:{$regex:"^image/svg"}}]},$or:[{file_path:{$regex:"^(?!theme/assets/)"}},{file_path:{$regex:".liquid.[a-zA-Z0-9]+$"}},{file_path:{$regex:".(css|js|svg)$"}}]}},W4={countries:[{id:"US",name:"United States",state_label:"State"},{id:"CA",name:"Canada",state_label:"Province"},{id:"AU",name:"Australia",state_label:"State/territory"},{id:"GB",name:"United Kingdom"},{id:"AF",name:"Afghanistan"},{id:"AX",name:"Aland Islands"},{id:"AL",name:"Albania"},{id:"DZ",name:"Algeria",state_label:"Province"},{id:"AD",name:"Andorra"},{id:"AO",name:"Angola"},{id:"AI",name:"Anguilla"},{id:"AG",name:"Antigua And Barbuda"},{id:"AR",name:"Argentina"},{id:"AM",name:"Armenia"},{id:"AW",name:"Aruba"},{id:"AT",name:"Austria"},{id:"AZ",name:"Azerbaijan"},{id:"BS",name:"Bahamas"},{id:"BH",name:"Bahrain"},{id:"BD",name:"Bangladesh"},{id:"BB",name:"Barbados"},{id:"BY",name:"Belarus"},{id:"BE",name:"Belgium"},{id:"BZ",name:"Belize"},{id:"BJ",name:"Benin"},{id:"BM",name:"Bermuda"},{id:"BT",name:"Bhutan"},{id:"BO",name:"Bolivia"},{id:"BA",name:"Bosnia And Herzegovina"},{id:"BW",name:"Botswana"},{id:"BV",name:"Bouvet Island"},{id:"BR",name:"Brazil",state_label:"State"},{id:"IO",name:"British Indian Ocean Territory"},{id:"BN",name:"Brunei"},{id:"BG",name:"Bulgaria"},{id:"BF",name:"Burkina Faso"},{id:"BU",name:"Burma"},{id:"BI",name:"Burundi"},{id:"KH",name:"Cambodia"},{id:"CM",name:"Cameroon"},{id:"CV",name:"Cape Verde"},{id:"KY",name:"Cayman Islands"},{id:"CF",name:"Central African Republic"},{id:"TD",name:"Chad"},{id:"CL",name:"Chile"},{id:"CN",name:"China"},{id:"CX",name:"Christmas Island"},{id:"CC",name:"Cocos (Keeling) Islands"},{id:"CO",name:"Colombia"},{id:"KM",name:"Comoros"},{id:"CG",name:"Congo"},{id:"CD",name:"Congo, The Democratic Republic Of The"},{id:"CK",name:"Cook Islands"},{id:"CR",name:"Costa Rica"},{id:"CI",name:"Cote D'Ivoire"},{id:"HR",name:"Croatia"},{id:"CU",name:"Cuba"},{id:"CY",name:"Cyprus"},{id:"CZ",name:"Czech Republic"},{id:"DK",name:"Denmark"},{id:"DJ",name:"Djibouti"},{id:"DM",name:"Dominica"},{id:"DO",name:"Dominican Republic"},{id:"EC",name:"Ecuador"},{id:"EG",name:"Egypt"},{id:"SV",name:"El Salvador"},{id:"GQ",name:"Equatorial Guinea"},{id:"ER",name:"Eritrea"},{id:"EE",name:"Estonia"},{id:"ET",name:"Ethiopia"},{id:"FK",name:"Falkland Islands (Malvinas)"},{id:"FO",name:"Faroe Islands"},{id:"FJ",name:"Fiji"},{id:"FI",name:"Finland"},{id:"FR",name:"France"},{id:"GF",name:"French Guiana"},{id:"PF",name:"French Polynesia"},{id:"TF",name:"French Southern Territories"},{id:"GA",name:"Gabon"},{id:"GM",name:"Gambia"},{id:"GE",name:"Georgia"},{id:"DE",name:"Germany"},{id:"GH",name:"Ghana"},{id:"GI",name:"Gibraltar"},{id:"GR",name:"Greece"},{id:"GL",name:"Greenland"},{id:"GD",name:"Grenada"},{id:"GP",name:"Guadeloupe"},{id:"GT",name:"Guatemala",state_label:"Department"},{id:"GG",name:"Guernsey"},{id:"GN",name:"Guinea"},{id:"GW",name:"Guinea Bissau"},{id:"GY",name:"Guyana"},{id:"HT",name:"Haiti"},{id:"HM",name:"Heard Island And Mcdonald Islands"},{id:"VA",name:"Holy See (Vatican City State)"},{id:"HN",name:"Honduras"},{id:"HK",name:"Hong Kong"},{id:"HU",name:"Hungary"},{id:"IS",name:"Iceland"},{id:"IN",name:"India",state_label:"State"},{id:"ID",name:"Indonesia"},{id:"IR",name:"Iran, Islamic Republic Of"},{id:"IQ",name:"Iraq"},{id:"IE",name:"Ireland"},{id:"IM",name:"Isle Of Man"},{id:"IL",name:"Israel"},{id:"IT",name:"Italy"},{id:"JM",name:"Jamaica"},{id:"JP",name:"Japan"},{id:"JE",name:"Jersey"},{id:"JO",name:"Jordan"},{id:"KZ",name:"Kazakhstan"},{id:"KE",name:"Kenya"},{id:"KI",name:"Kiribati"},{id:"KP",name:"Korea, North"},{id:"KR",name:"Korea, South"},{id:"KW",name:"Kuwait"},{id:"KG",name:"Kyrgyzstan"},{id:"LA",name:"Laos"},{id:"LV",name:"Latvia"},{id:"LB",name:"Lebanon"},{id:"LS",name:"Lesotho"},{id:"LR",name:"Liberia"},{id:"LY",name:"Libya"},{id:"LI",name:"Liechtenstein"},{id:"LT",name:"Lithuania"},{id:"LU",name:"Luxembourg"},{id:"MO",name:"Macao"},{id:"MK",name:"Macedonia"},{id:"MG",name:"Madagascar"},{id:"MW",name:"Malawi"},{id:"MY",name:"Malaysia",state_label:"State/territory"},{id:"MV",name:"Maldives"},{id:"ML",name:"Mali"},{id:"MT",name:"Malta"},{id:"MQ",name:"Martinique"},{id:"MR",name:"Mauritania"},{id:"MU",name:"Mauritius"},{id:"YT",name:"Mayotte"},{id:"MX",name:"Mexico",state_label:"State"},{id:"MD",name:"Moldova"},{id:"MC",name:"Monaco"},{id:"MN",name:"Mongolia"},{id:"ME",name:"Montenegro"},{id:"MS",name:"Montserrat"},{id:"MA",name:"Morocco"},{id:"MZ",name:"Mozambique"},{id:"MM",name:"Myanmar"},{id:"NA",name:"Namibia"},{id:"NR",name:"Nauru"},{id:"NP",name:"Nepal"},{id:"NL",name:"Netherlands"},{id:"AN",name:"Netherlands Antilles"},{id:"NC",name:"New Caledonia"},{id:"NZ",name:"New Zealand",state_label:"Region"},{id:"NI",name:"Nicaragua"},{id:"NE",name:"Niger"},{id:"NG",name:"Nigeria"},{id:"NU",name:"Niue"},{id:"NF",name:"Norfolk Island"},{id:"NO",name:"Norway"},{id:"OM",name:"Oman"},{id:"PK",name:"Pakistan"},{id:"PS",name:"Palestinian Territory, Occupied"},{id:"PA",name:"Panama"},{id:"PG",name:"Papua New Guinea"},{id:"PY",name:"Paraguay"},{id:"PE",name:"Peru"},{id:"PH",name:"Philippines",state_label:"Region"},{id:"PN",name:"Pitcairn"},{id:"PL",name:"Poland"},{id:"PT",name:"Portugal"},{id:"QA",name:"Qatar"},{id:"RE",name:"Reunion"},{id:"RO",name:"Romania"},{id:"RU",name:"Russia"},{id:"RW",name:"Rwanda"},{id:"BL",name:"Saint Barthelemy"},{id:"SH",name:"Saint Helena"},{id:"KN",name:"Saint Kitts And Nevis"},{id:"LC",name:"Saint Lucia"},{id:"MF",name:"Saint Martin"},{id:"PM",name:"Saint Pierre And Miquelon"},{id:"VC",name:"Saint Vincent"},{id:"WS",name:"Samoa"},{id:"SM",name:"San Marino"},{id:"ST",name:"Sao Tome And Principe"},{id:"SA",name:"Saudi Arabia"},{id:"SN",name:"Senegal"},{id:"RS",name:"Serbia"},{id:"SC",name:"Seychelles"},{id:"SL",name:"Sierra Leone"},{id:"SG",name:"Singapore"},{id:"SK",name:"Slovakia"},{id:"SI",name:"Slovenia"},{id:"SB",name:"Solomon Islands"},{id:"SO",name:"Somalia"},{id:"ZA",name:"South Africa"},{id:"GS",name:"South Georgia And The South Sandwich Islands"},{id:"ES",name:"Spain",state_label:"Province"},{id:"LK",name:"Sri Lanka"},{id:"SD",name:"Sudan"},{id:"SR",name:"Suriname"},{id:"SJ",name:"Svalbard And Jan Mayen"},{id:"SZ",name:"Swaziland"},{id:"SE",name:"Sweden"},{id:"CH",name:"Switzerland"},{id:"SY",name:"Syria"},{id:"TW",name:"Taiwan"},{id:"TJ",name:"Tajikistan"},{id:"TZ",name:"Tanzania"},{id:"TH",name:"Thailand"},{id:"TL",name:"Timor-Leste"},{id:"TG",name:"Togo"},{id:"TK",name:"Tokelau"},{id:"TO",name:"Tonga"},{id:"TT",name:"Trinidad and Tobago"},{id:"TN",name:"Tunisia"},{id:"TR",name:"Turkey"},{id:"TM",name:"Turkmenistan"},{id:"TC",name:"Turks And Caicos Islands"},{id:"TV",name:"Tuvalu"},{id:"UG",name:"Uganda"},{id:"UA",name:"Ukraine"},{id:"AE",name:"United Arab Emirates",state_label:"Emirate"},{id:"UM",name:"United States Minor Outlying Islands"},{id:"UY",name:"Uruguay"},{id:"UZ",name:"Uzbekistan"},{id:"VU",name:"Vanuatu"},{id:"VE",name:"Venezuela"},{id:"VN",name:"Vietnam"},{id:"VG",name:"Virgin Islands, British"},{id:"WF",name:"Wallis And Futuna"},{id:"EH",name:"Western Sahara"},{id:"YE",name:"Yemen"},{id:"ZM",name:"Zambia"},{id:"ZW",name:"Zimbabwe"}],states:[{country:"US",id:"AL",name:"Alabama"},{country:"US",id:"AK",name:"Alaska"},{country:"US",id:"AZ",name:"Arizona"},{country:"US",id:"AR",name:"Arkansas"},{country:"US",id:"CA",name:"California"},{country:"US",id:"CO",name:"Colorado"},{country:"US",id:"CT",name:"Connecticut"},{country:"US",id:"DE",name:"Delaware"},{country:"US",id:"DC",name:"District of Columbia"},{country:"US",id:"FL",name:"Florida"},{country:"US",id:"GA",name:"Georgia"},{country:"US",id:"HI",name:"Hawaii"},{country:"US",id:"ID",name:"Idaho"},{country:"US",id:"IL",name:"Illinois"},{country:"US",id:"IN",name:"Indiana"},{country:"US",id:"IA",name:"Iowa"},{country:"US",id:"KS",name:"Kansas"},{country:"US",id:"KY",name:"Kentucky"},{country:"US",id:"LA",name:"Louisiana"},{country:"US",id:"ME",name:"Maine"},{country:"US",id:"MD",name:"Maryland"},{country:"US",id:"MA",name:"Massachusetts"},{country:"US",id:"MI",name:"Michigan"},{country:"US",id:"MN",name:"Minnesota"},{country:"US",id:"MS",name:"Mississippi"},{country:"US",id:"MO",name:"Missouri"},{country:"US",id:"MT",name:"Montana"},{country:"US",id:"NE",name:"Nebraska"},{country:"US",id:"NV",name:"Nevada"},{country:"US",id:"NH",name:"New Hampshire"},{country:"US",id:"NJ",name:"New Jersey"},{country:"US",id:"NM",name:"New Mexico"},{country:"US",id:"NY",name:"New York"},{country:"US",id:"NC",name:"North Carolina"},{country:"US",id:"ND",name:"North Dakota"},{country:"US",id:"OH",name:"Ohio"},{country:"US",id:"OK",name:"Oklahoma"},{country:"US",id:"OR",name:"Oregon"},{country:"US",id:"PA",name:"Pennsylvania"},{country:"US",id:"RI",name:"Rhode Island"},{country:"US",id:"SC",name:"South Carolina"},{country:"US",id:"SD",name:"South Dakota"},{country:"US",id:"TN",name:"Tennessee"},{country:"US",id:"TX",name:"Texas"},{country:"US",id:"UT",name:"Utah"},{country:"US",id:"VT",name:"Vermont"},{country:"US",id:"VA",name:"Virginia"},{country:"US",id:"WA",name:"Washington"},{country:"US",id:"WV",name:"West Virginia"},{country:"US",id:"WI",name:"Wisconsin"},{country:"US",id:"WY",name:"Wyoming"},{country:"US",id:"AS",name:"American Samoa"},{country:"US",id:"AA",name:"Armed Forces Americas"},{country:"US",id:"AE",name:"Armed Forces Europe"},{country:"US",id:"AP",name:"Armed Forces Pacific"},{country:"US",id:"FM",name:"Federated States of Micronesia"},{country:"US",id:"GU",name:"Guam"},{country:"US",id:"MH",name:"Marshall Islands"},{country:"US",id:"MP",name:"Northern Mariana Islands"},{country:"US",id:"PW",name:"Palau"},{country:"US",id:"PR",name:"Puerto Rico"},{country:"US",id:"VI",name:"Virgin Islands"},{country:"CA",id:"AB",name:"Alberta"},{country:"CA",id:"BC",name:"British Columbia"},{country:"CA",id:"MB",name:"Manitoba"},{country:"CA",id:"NB",name:"New Brunswick"},{country:"CA",id:"NL",name:"Newfoundland"},{country:"CA",id:"NT",name:"Northwest Territories"},{country:"CA",id:"NS",name:"Nova Scotia"},{country:"CA",id:"NU",name:"Nunavut"},{country:"CA",id:"ON",name:"Ontario"},{country:"CA",id:"PE",name:"Prince Edward Island"},{country:"CA",id:"QC",name:"Quebec"},{country:"CA",id:"SK",name:"Saskatchewan"},{country:"CA",id:"YT",name:"Yukon"},{country:"AU",id:"ACT",name:"Australian Capital Territory"},{country:"AU",id:"NSW",name:"New South Wales"},{country:"AU",id:"NT",name:"Northern Territory"},{country:"AU",id:"QLD",name:"Queensland"},{country:"AU",id:"SA",name:"South Australia"},{country:"AU",id:"TAS",name:"Tasmania"},{country:"AU",id:"VIC",name:"Victoria"},{country:"AU",id:"WA",name:"Western Australia"},{country:"BR",id:"AC",name:"Acre"},{country:"BR",id:"AL",name:"Alagoas"},{country:"BR",id:"AP",name:"Amapa"},{country:"BR",id:"AM",name:"Amazonas"},{country:"BR",id:"BA",name:"Bahia"},{country:"BR",id:"CE",name:"Ceara"},{country:"BR",id:"BRDF",name:"Distrito Federal"},{country:"BR",id:"ES",name:"Espirito Santo"},{country:"BR",id:"GO",name:"Goias;"},{country:"BR",id:"MA",name:"Maranhao"},{country:"BR",id:"MT",name:"Mato Grosso"},{country:"BR",id:"MS",name:"Mato Grosso do Sul"},{country:"BR",id:"MG",name:"Minas Gerais"},{country:"BR",id:"PA",name:"Para;"},{country:"BR",id:"PB",name:"Paraiba"},{country:"BR",id:"PR",name:"Parana"},{country:"BR",id:"PE",name:"Pernambuco"},{country:"BR",id:"PI",name:"Piaui"},{country:"BR",id:"RJ",name:"Rio de Janeiro"},{country:"BR",id:"RN",name:"Rio Grande do Norte"},{country:"BR",id:"RS",name:"Rio Grande do Sul"},{country:"BR",id:"RO",name:"Rondonia"},{country:"BR",id:"RR",name:"Roraima"},{country:"BR",id:"SC",name:"Santa Catarina"},{country:"BR",id:"SP",name:"Sao Paulo"},{country:"BR",id:"SE",name:"Sergipe"},{country:"BR",id:"TO",name:"Tocantins"},{country:"GT",id:"Alta Verapaz",name:"Alta Verapaz"},{country:"GT",id:"Baja Verapaz",name:"Baja Verapaz"},{country:"GT",id:"Chimaltenango",name:"Chimaltenango"},{country:"GT",id:"Chiquimula",name:"Chiquimula"},{country:"GT",id:"El Progreso",name:"El Progreso"},{country:"GT",id:"Escuintla",name:"Escuintla"},{country:"GT",id:"Guatemala",name:"Guatemala"},{country:"GT",id:"Huehuetenango",name:"Huehuetenango"},{country:"GT",id:"Izabal",name:"Izabal"},{country:"GT",id:"Jalapa",name:"Jalapa"},{country:"GT",id:"Jutiapa",name:"Jutiapa"},{country:"GT",id:"Peten",name:"Peten"},{country:"GT",id:"Quetzaltenango",name:"Quetzaltenango"},{country:"GT",id:"Quiche",name:"Quiche"},{country:"GT",id:"Retalhuleu",name:"Retalhuleu"},{country:"GT",id:"Sacatepequez",name:"Sacatepequez"},{country:"GT",id:"San Marcos",name:"San Marcos"},{country:"GT",id:"Santa Rosa",name:"Santa Rosa"},{country:"GT",id:"Solola",name:"Solola"},{country:"GT",id:"Suchitepequez",name:"Suchitepequez"},{country:"GT",id:"Totonicapan",name:"Totonicapan"},{country:"GT",id:"Zacapa",name:"Zacapa"},{country:"IN",id:"AN",name:"Andaman and Nicobar"},{country:"IN",id:"AP",name:"Andhra Pradesh"},{country:"IN",id:"AR",name:"Arunachal Pradesh"},{country:"IN",id:"AS",name:"Assam"},{country:"IN",id:"BR",name:"Bihar"},{country:"IN",id:"CH",name:"Chandigarh"},{country:"IN",id:"CT",name:"Chattisgarh"},{country:"IN",id:"DN",name:"Dadra and Nagar Haveli"},{country:"IN",id:"DD",name:"Daman and Diu"},{country:"IN",id:"DL",name:"Delhi"},{country:"IN",id:"GA",name:"Goa"},{country:"IN",id:"GJ",name:"Gujarat"},{country:"IN",id:"HR",name:"Haryana"},{country:"IN",id:"HP",name:"Himachal Pradesh"},{country:"IN",id:"JK",name:"Jammu and Kashmir"},{country:"IN",id:"JH",name:"Jharkhand"},{country:"IN",id:"KA",name:"Karnataka"},{country:"IN",id:"KL",name:"Kerala"},{country:"IN",id:"LD",name:"Lakshadweep"},{country:"IN",id:"MP",name:"Madhya Pradesh"},{country:"IN",id:"MH",name:"Maharashtra"},{country:"IN",id:"MN",name:"Manipur"},{country:"IN",id:"ML",name:"Meghalaya"},{country:"IN",id:"MZ",name:"Mizoram"},{country:"IN",id:"NL",name:"Nagaland"},{country:"IN",id:"OR",name:"Orissa"},{country:"IN",id:"PY",name:"Puducherry"},{country:"IN",id:"PB",name:"Punjab"},{country:"IN",id:"RJ",name:"Rajasthan"},{country:"IN",id:"SK",name:"Sikkim"},{country:"IN",id:"TN",name:"Tamil Nadu"},{country:"IN",id:"TR",name:"Tripura"},{country:"IN",id:"UP",name:"Uttar Pradesh"},{country:"IN",id:"UT",name:"Uttarakhand"},{country:"IN",id:"WB",name:"West Bengal"},{country:"MY",id:"JHR",name:"Johor"},{country:"MY",id:"KDH",name:"Kedah"},{country:"MY",id:"KTN",name:"Kelantan"},{country:"MY",id:"KUL",name:"Kuala Lumpur"},{country:"MY",id:"LBN",name:"Labuan"},{country:"MY",id:"MLK",name:"Malacca"},{country:"MY",id:"NSN",name:"Negeri Sembilan"},{country:"MY",id:"PHG",name:"Pahang"},{country:"MY",id:"PNG",name:"Penang"},{country:"MY",id:"PRK",name:"Perak"},{country:"MY",id:"PLS",name:"Perlis"},{country:"MY",id:"PJY",name:"Putrajaya"},{country:"MY",id:"SBH",name:"Sabah"},{country:"MY",id:"SRW",name:"Sarawak"},{country:"MY",id:"SGR",name:"Selangor"},{country:"MY",id:"TRG",name:"Terengganu"},{country:"MX",id:"AG",name:"Aguascalientes"},{country:"MX",id:"BJ",name:"Baja California"},{country:"MX",id:"BS",name:"Baja California Sur"},{country:"MX",id:"CI",name:"Chihuahua"},{country:"MX",id:"CL",name:"Colima"},{country:"MX",id:"CP",name:"Campeche"},{country:"MX",id:"CU",name:"Coahuila"},{country:"MX",id:"CH",name:"Chiapas"},{country:"MX",id:"DF",name:"Distrito Federal"},{country:"MX",id:"DG",name:"Durango"},{country:"MX",id:"GR",name:"Guerrero"},{country:"MX",id:"GJ",name:"Guanajuato"},{country:"MX",id:"HG",name:"Hidalgo"},{country:"MX",id:"JA",name:"Jalisco"},{country:"MX",id:"MH",name:"Michoacan"},{country:"MX",id:"MR",name:"Morelos"},{country:"MX",id:"EM",name:"Mexico"},{country:"MX",id:"NA",name:"Nayarit"},{country:"MX",id:"NL",name:"Nuevo Leon"},{country:"MX",id:"OA",name:"Oaxaca"},{country:"MX",id:"PU",name:"Puebla"},{country:"MX",id:"QR",name:"Quintana Roo"},{country:"MX",id:"QA",name:"Queretaro"},{country:"MX",id:"SI",name:"Sinaloa"},{country:"MX",id:"SL",name:"San Luis Potosi"},{country:"MX",id:"SO",name:"Sonora"},{country:"MX",id:"TA",name:"Tabasco"},{country:"MX",id:"TL",name:"Tlaxcala"},{country:"MX",id:"TM",name:"Tamaulipas"},{country:"MX",id:"VZ",name:"Veracruz"},{country:"MX",id:"YC",name:"Yucatan"},{country:"MX",id:"ZT",name:"Zacatecas"},{country:"NZ",id:"AUK",name:"Auckland"},{country:"NZ",id:"BOP",name:"Bay of Plenty"},{country:"NZ",id:"CAN",name:"Canterbury"},{country:"NZ",id:"GIS",name:"Gisborne"},{country:"NZ",id:"HKB",name:"Hawke's Bay"},{country:"NZ",id:"MWT",name:"Manawatu-Wanganui"},{country:"NZ",id:"MBH",name:"Marlborough"},{country:"NZ",id:"NSN",name:"Nelson"},{country:"NZ",id:"NTL",name:"Northland"},{country:"NZ",id:"OTA",name:"Otago"},{country:"NZ",id:"STL",name:"Southland"},{country:"NZ",id:"TKI",name:"Taranaki"},{country:"NZ",id:"NZTAS",name:"Tasman"},{country:"NZ",id:"WKO",name:"Waikato"},{country:"NZ",id:"WGN",name:"Wellington"},{country:"NZ",id:"WTC",name:"West Coast"},{country:"ES",id:"A Coruna",name:"A Coruna"},{country:"ES",id:"Alava",name:"Alava"},{country:"ES",id:"Albacete",name:"Albacete"},{country:"ES",id:"Alicante",name:"Alicante"},{country:"ES",id:"Almeria",name:"Almeria"},{country:"ES",id:"Asturias",name:"Asturias"},{country:"ES",id:"Avila",name:"Avila"},{country:"ES",id:"Badajoz",name:"Badajoz"},{country:"ES",id:"Baleares",name:"Baleares"},{country:"ES",id:"Barcelona",name:"Barcelona"},{country:"ES",id:"Burgos",name:"Burgos"},{country:"ES",id:"Caceres",name:"Caceres"},{country:"ES",id:"Cadiz",name:"Cadiz"},{country:"ES",id:"Cantabria",name:"Cantabria"},{country:"ES",id:"Castellon",name:"Castellon"},{country:"ES",id:"Ceuta",name:"Ceuta"},{country:"ES",id:"Ciudad Real",name:"Ciudad Real"},{country:"ES",id:"Cordoba",name:"Cordoba"},{country:"ES",id:"Cuenca",name:"Cuenca"},{country:"ES",id:"Girona",name:"Girona"},{country:"ES",id:"Granada",name:"Granada"},{country:"ES",id:"Guadalajara",name:"Guadalajara"},{country:"ES",id:"Guipuzcoa",name:"Guipuzcoa"},{country:"ES",id:"Huelva",name:"Huelva"},{country:"ES",id:"Huesca",name:"Huesca"},{country:"ES",id:"Jaen",name:"Jaen"},{country:"ES",id:"La Rioja",name:"La Rioja"},{country:"ES",id:"Las Palmas",name:"Las Palmas"},{country:"ES",id:"Leon",name:"Leon"},{country:"ES",id:"Lleida",name:"Lleida"},{country:"ES",id:"Lugo",name:"Lugo"},{country:"ES",id:"Madrid",name:"Madrid"},{country:"ES",id:"Malaga",name:"Malaga"},{country:"ES",id:"Melilla",name:"Melilla"},{country:"ES",id:"Murcia",name:"Murcia"},{country:"ES",id:"Navarra",name:"Navarra"},{country:"ES",id:"Ourense",name:"Ourense"},{country:"ES",id:"Palencia",name:"Palencia"},{country:"ES",id:"Pontevedra",name:"Pontevedra"},{country:"ES",id:"Salamanca",name:"Salamanca"},{country:"ES",id:"Santa Cruz de Tenerife",name:"Santa Cruz de Tenerife"},{country:"ES",id:"Segovia",name:"Segovia"},{country:"ES",id:"Sevilla",name:"Sevilla"},{country:"ES",id:"Soria",name:"Soria"},{country:"ES",id:"Tarragona",name:"Tarragona"},{country:"ES",id:"Teruel",name:"Teruel"},{country:"ES",id:"Toledo",name:"Toledo"},{country:"ES",id:"Valencia",name:"Valencia"},{country:"ES",id:"Valladolid",name:"Valladolid"},{country:"ES",id:"Vizcaya",name:"Vizcaya"},{country:"ES",id:"Zamora",name:"Zamora"},{country:"ES",id:"Zaragoza",name:"Zaragoza"},{country:"AE",id:"Abu Dhabi",name:"Abu Dhabi"},{country:"AE",id:"Ajman",name:"Ajman"},{country:"AE",id:"Dubai",name:"Dubai"},{country:"AE",id:"Fujairah",name:"Fujairah"},{country:"AE",id:"Ras al-Khaimah",name:"Ras al-Khaimah"},{country:"AE",id:"Sharjah",name:"Sharjah"},{country:"AE",id:"Umm al-Quwain",name:"Umm al-Quwain"},{country:"DZ",id:"DZ-01",name:"Adrar"},{country:"DZ",id:"DZ-44",name:"A\xEFn Defla"},{country:"DZ",id:"DZ-46",name:"A\xEFn T\xE9mouchent"},{country:"DZ",id:"DZ-16",name:"Algiers"},{country:"DZ",id:"DZ-23",name:"Annaba"},{country:"DZ",id:"DZ-05",name:"Batna"},{country:"DZ",id:"DZ-08",name:"B\xE9char"},{country:"DZ",id:"DZ-06",name:"B\xE9ja\xEFa"},{country:"DZ",id:"DZ-53",name:"B\xE9ni Abb\xE8s"},{country:"DZ",id:"DZ-07",name:"Biskra"},{country:"DZ",id:"DZ-09",name:"Blida"},{country:"DZ",id:"DZ-52",name:"Bordj Baji Mokhtar"},{country:"DZ",id:"DZ-34",name:"Bordj Bou Arr\xE9ridj"},{country:"DZ",id:"DZ-10",name:"Bou\xEFra"},{country:"DZ",id:"DZ-35",name:"Boumerd\xE8s"},{country:"DZ",id:"DZ-02",name:"Chlef"},{country:"DZ",id:"DZ-25",name:"Constantine"},{country:"DZ",id:"DZ-56",name:"Djanet"},{country:"DZ",id:"DZ-17",name:"Djelfa"},{country:"DZ",id:"DZ-32",name:"El Bayadh"},{country:"DZ",id:"DZ-49",name:"El M'Ghair"},{country:"DZ",id:"DZ-50",name:"El Menia"},{country:"DZ",id:"DZ-39",name:"El Oued"},{country:"DZ",id:"DZ-36",name:"El Tarf"},{country:"DZ",id:"DZ-47",name:"Gharda\xEFa"},{country:"DZ",id:"DZ-24",name:"Guelma"},{country:"DZ",id:"DZ-33",name:"Illizi"},{country:"DZ",id:"DZ-58",name:"In Guezzam"},{country:"DZ",id:"DZ-57",name:"In Salah"},{country:"DZ",id:"DZ-18",name:"Jijel"},{country:"DZ",id:"DZ-40",name:"Khenchela"},{country:"DZ",id:"DZ-03",name:"Laghouat"},{country:"DZ",id:"DZ-28",name:"M'Sila"},{country:"DZ",id:"DZ-29",name:"Mascara"},{country:"DZ",id:"DZ-26",name:"M\xE9d\xE9a"},{country:"DZ",id:"DZ-43",name:"Mila"},{country:"DZ",id:"DZ-27",name:"Mostaganem"},{country:"DZ",id:"DZ-45",name:"Na\xE2ma"},{country:"DZ",id:"DZ-31",name:"Oran"},{country:"DZ",id:"DZ-30",name:"Ouargla"},{country:"DZ",id:"DZ-51",name:"Ouled Djellal"},{country:"DZ",id:"DZ-04",name:"Oum El Bouaghi"},{country:"DZ",id:"DZ-48",name:"Relizane"},{country:"DZ",id:"DZ-20",name:"Sa\xEFda"},{country:"DZ",id:"DZ-19",name:"S\xE9tif"},{country:"DZ",id:"DZ-22",name:"Sidi Bel Abb\xE8s"},{country:"DZ",id:"DZ-21",name:"Skikda"},{country:"DZ",id:"DZ-41",name:"Souk Ahras"},{country:"DZ",id:"DZ-11",name:"Tamanrasset"},{country:"DZ",id:"DZ-12",name:"T\xE9bessa"},{country:"DZ",id:"DZ-14",name:"Tiaret"},{country:"DZ",id:"DZ-54",name:"Timimoun"},{country:"DZ",id:"DZ-37",name:"Tindouf"},{country:"DZ",id:"DZ-42",name:"Tipaza"},{country:"DZ",id:"DZ-38",name:"Tissemsilt"},{country:"DZ",id:"DZ-15",name:"Tizi Ouzou"},{country:"DZ",id:"DZ-13",name:"Tlemcen"},{country:"DZ",id:"DZ-55",name:"Touggourt"},{country:"PH",id:"PH-00",name:"National Capital Region [NCR]"},{country:"PH",id:"PH-01",name:"Ilocos [I]"},{country:"PH",id:"PH-02",name:"Cagayan Valley [II]"},{country:"PH",id:"PH-03",name:"Central Luzon [III]"},{country:"PH",id:"PH-05",name:"Bicol [V]"},{country:"PH",id:"PH-06",name:"Western Visayas [VI]"},{country:"PH",id:"PH-07",name:"Central Visayas [VII]"},{country:"PH",id:"PH-08",name:"Eastern Visayas [VIII]"},{country:"PH",id:"PH-09",name:"Zamboanga Peninsula [IX]"},{country:"PH",id:"PH-10",name:"Northern Mindanao [X]"},{country:"PH",id:"PH-11",name:"Davao [XI]"},{country:"PH",id:"PH-12",name:"Soccsksargen [XII]"},{country:"PH",id:"PH-13",name:"Caraga [XIII]"},{country:"PH",id:"PH-14",name:"Autonomous Region in Muslim Mindanao [ARMM]"},{country:"PH",id:"PH-15",name:"Cordillera Administrative Region [CAR]"},{country:"PH",id:"PH-40",name:"Calabarzon [IV-A]"},{country:"PH",id:"PH-41",name:"Mimaropa [IV-B]"}],timezones:[{id:"Pacific/Kiritimati",name:"Line Islands Time"},{id:"Pacific/Enderbury",name:"Phoenix Islands Time"},{id:"Pacific/Tongatapu",name:"Tonga Time"},{id:"Pacific/Chatham",name:"Chatham Daylight Time"},{id:"Asia/Kamchatka",name:"Petropavlovsk-Kamchatski Time"},{id:"Pacific/Auckland",name:"New Zealand Daylight Time"},{id:"Pacific/Fiji",name:"Fiji Time"},{id:"Pacific/Norfolk",name:"Norfolk Time"},{id:"Pacific/Guadalcanal",name:"Solomon Islands Time"},{id:"Australia/Lord_Howe",name:"Lord Howe Summer Time"},{id:"Australia/Brisbane",name:"Australian Eastern Standard Time (Brisbane)"},{id:"Australia/Sydney",name:"Australian Eastern Standard Time (Sydney)"},{id:"Australia/Adelaide",name:"Australian Central Standard Time (Adelaide)"},{id:"Australia/Darwin",name:"Australian Central Standard Time (Darwin)"},{id:"Asia/Seoul",name:"Korea Standard Time"},{id:"Asia/Tokyo",name:"Japan Standard Time"},{id:"Asia/Hong_Kong",name:"Hong Kong Time"},{id:"Asia/Kuala_Lumpur",name:"Malaysia Time"},{id:"Asia/Manila",name:"Philippines Time"},{id:"Asia/Shanghai",name:"China Standard Time (Shanghai)"},{id:"Asia/Singapore",name:"Singapore Time"},{id:"Asia/Taipei",name:"China Standard Time (Taipei)"},{id:"Australia/Perth",name:"Australian Western Standard Time"},{id:"Asia/Bangkok",name:"Indochina Time (Bangkok)"},{id:"Asia/Jakarta",name:"West Indonesia Time"},{id:"Asia/Saigon",name:"Indochina Time (Saigon)"},{id:"Asia/Rangoon",name:"Myanmar Time"},{id:"Asia/Dacca",name:"Bangladesh Time"},{id:"Asia/Katmandu",name:"Nepal Time"},{id:"Asia/Calcutta",name:"India Standard Time (Calcutta)"},{id:"Asia/Colombo",name:"India Standard Time (Colombo)"},{id:"Asia/Karachi",name:"Pakistan Summer Time"},{id:"Asia/Tashkent",name:"Uzbekistan Time"},{id:"Asia/Yekaterinburg",name:"Yekaterinburg Time"},{id:"Asia/Kabul",name:"Afghanistan Time"},{id:"Asia/Baku",name:"Azerbaijan Time"},{id:"Asia/Dubai",name:"Gulf Standard Time"},{id:"Asia/Tbilisi",name:"Georgia Time"},{id:"Asia/Yerevan",name:"Armenia Time"},{id:"Asia/Tehran",name:"Iran Standard Time"},{id:"Africa/Nairobi",name:"Eastern African Time"},{id:"Asia/Baghdad",name:"Arabia Standard Time (Baghdad)"},{id:"Asia/Kuwait",name:"Arabia Standard Time (Kuwait)"},{id:"Asia/Riyadh",name:"Arabia Standard Time (Riyadh)"},{id:"Europe/Moscow",name:"Moscow Standard Time"},{id:"Africa/Cairo",name:"Eastern European Time (Cairo)"},{id:"Africa/Johannesburg",name:"South Africa Standard Time"},{id:"Asia/Beirut",name:"Eastern European Time (Beirut)"},{id:"Asia/Jerusalem",name:"Israel Standard Time"},{id:"Europe/Athens",name:"Eastern European Time (Athens)"},{id:"Europe/Bucharest",name:"Eastern European Time (Bucharest)"},{id:"Europe/Helsinki",name:"Eastern European Time (Helsinki)"},{id:"Europe/Istanbul",name:"Eastern European Time (Istanbul)"},{id:"Europe/Minsk",name:"Eastern European Time (Minsk)"},{id:"Europe/Amsterdam",name:"Central European Time (Amsterdam)"},{id:"Europe/Berlin",name:"Central European Time (Berlin)"},{id:"Europe/Brussels",name:"Central European Time (Brussels)"},{id:"Europe/Prague",name:"Central European Time (Prague)"},{id:"Europe/Rome",name:"Central European Time (Rome)"},{id:"Europe/Dublin",name:"Irish Summer Time"},{id:"Europe/Lisbon",name:"Western European Summer Time"},{id:"Europe/London",name:"British Summer Time"},{id:"GMT",name:"Greenwich Mean Time"},{id:"America/Scoresbysund",name:"East Greenland Time"},{id:"Atlantic/Azores",name:"Azores Time"},{id:"Atlantic/Cape_Verde",name:"Cape Verde Time"},{id:"Atlantic/South_Georgia",name:"South Georgia Standard Time"},{id:"America/Buenos_Aires",name:"Argentine Summer Time"},{id:"America/Sao_Paulo",name:"Brasilia Summer Time"},{id:"America/St_Johns",name:"Newfoundland Daylight Time"},{id:"America/Halifax",name:"Atlantic Daylight Time (Halifax)"},{id:"America/Puerto_Rico",name:"Atlantic Standard Time"},{id:"America/Santiago",name:"Chile Summer Time"},{id:"Atlantic/Bermuda",name:"Atlantic Daylight Time (Bermuda)"},{id:"America/Caracas",name:"Venezuela Time"},{id:"America/Bogota",name:"Colombia Time"},{id:"America/Indianapolis",name:"Eastern Daylight Time (Indianapolis)"},{id:"America/Lima",name:"Peru Time"},{id:"America/New_York",name:"Eastern Daylight Time (New York)"},{id:"America/Panama",name:"Eastern Standard Time (Panama)"},{id:"America/Chicago",name:"Central Daylight Time (Chicago)"},{id:"America/El_Salvador",name:"Central Standard Time (El Salvador)"},{id:"America/Mexico_City",name:"Central Standard Time (Mexico City)"},{id:"America/Denver",name:"Mountain Daylight Time"},{id:"America/Phoenix",name:"Mountain Standard Time"},{id:"America/Los_Angeles",name:"Pacific Daylight Time"},{id:"America/Tijuana",name:"Pacific Standard Time"},{id:"Pacific/Pitcairn",name:"Pitcairn Standard Time"},{id:"America/Anchorage",name:"Alaska Daylight Time"},{id:"Pacific/Gambier",name:"Gambier Time"},{id:"Pacific/Marquesas",name:"Marquesas Time"},{id:"Pacific/Honolulu",name:"Hawaii Standard Time"},{id:"America/Atka",name:"Hawaii-Aleutian Standard Time"},{id:"Pacific/Niue",name:"Niue Time"},{id:"Pacific/Pago_Pago",name:"Samoa Standard Time"}],locales:[{id:"af",name:"Afrikaans"},{id:"af-ZA",name:"Afrikaans (South Africa)"},{id:"az",name:"Azerbaijani"},{id:"az-AZ",name:"Azerbaijani (Azerbaijani)"},{id:"id",name:"Indonesian"},{id:"id-ID",name:"Indonesian (Indonesia)"},{id:"ms",name:"Malay"},{id:"ms-MY",name:"Malay (Malaysia)"},{id:"ca",name:"Catalan"},{id:"ca-ES",name:"Catalan (Spain)"},{id:"cs",name:"Czech"},{id:"cs-CZ",name:"Czech (Czech Republic)"},{id:"da",name:"Danish"},{id:"da-DK",name:"Danish (Denmark)"},{id:"de",name:"German"},{id:"de-DE",name:"German (Germany)"},{id:"de-CH",name:"German (Switzerland)"},{id:"de-AT",name:"German (Austria)"},{id:"et",name:"Estonian"},{id:"et-EE",name:"Estonian (Estonia)"},{id:"en",name:"English"},{id:"en-AU",name:"English (Australia)"},{id:"en-CA",name:"English (Canada)"},{id:"en-IE",name:"English (Ireland)"},{id:"en-NZ",name:"English (New Zealand)"},{id:"en-GB",name:"English (United Kingdom)"},{id:"en-US",name:"English (United States)"},{id:"es",name:"Spanish"},{id:"es-AR",name:"Spanish (Argentina)"},{id:"es-CL",name:"Spanish (Chile)"},{id:"es-CO",name:"Spanish (Colombia)"},{id:"es-CR",name:"Spanish (Costa Rica)"},{id:"es-ES",name:"Spanish (Spain)"},{id:"es-MX",name:"Spanish (Mexico)"},{id:"es-PA",name:"Spanish (Panama)"},{id:"es-PE",name:"Spanish (Peru)"},{id:"es-VE",name:"Spanish (Venezuela)"},{id:"fil",name:"Filipino"},{id:"fil-PH",name:"Filipino (Philippines)"},{id:"fr",name:"French"},{id:"fr-CA",name:"French (Canada)"},{id:"fr-FR",name:"French (France)"},{id:"fr-CH",name:"French (Switzerland)"},{id:"gl",name:"Galician"},{id:"gl-ES",name:"Galician (Spain)"},{id:"hr",name:"Croatian"},{id:"hr-HR",name:"Croatian (Croatia)"},{id:"it",name:"Italian"},{id:"it-IT",name:"Italian (Italy)"},{id:"it-CH",name:"Italian (Switzerland)"},{id:"sw",name:"Swahili"},{id:"sw-KE",name:"Swahili (Kenya)"},{id:"sw-KE",name:"Swahili (Tanzania)"},{id:"lv",name:"Latvian"},{id:"lv-LV",name:"Latvian (Latvia)"},{id:"lt",name:"Lithuanian"},{id:"lt-LT",name:"Lithuanian (Lithuania)"},{id:"hu",name:"Hungarian"},{id:"hu-HU",name:"Hungarian (Hungary)"},{id:"nl",name:"Dutch"},{id:"nl-NL",name:"Dutch (Netherlands)"},{id:"nb",name:"Norwegian Bokm\xE5l"},{id:"nb-NO",name:"Norwegian Bokm\xE5l (Norway)"},{id:"nn",name:"Norwegian Nynorsk"},{id:"nn-NO",name:"Norwegian Nynorsk (Norway)"},{id:"pl",name:"Polish"},{id:"pl-PL",name:"Polish (Poland)"},{id:"pt",name:"Portuguese"},{id:"pt-BR",name:"Portuguese (Brazil)"},{id:"pt-PT",name:"Portuguese (Portugal)"},{id:"ro",name:"Romanian"},{id:"ro-MD",name:"Romanian (Moldova)"},{id:"ro-RO",name:"Romanian (Romania)"},{id:"sq",name:"Albanian"},{id:"sq-AL",name:"Albanian (Albania)"},{id:"sk",name:"Slovak"},{id:"sk-SK",name:"Slovak (Slovakia)"},{id:"sl",name:"Slovenian"},{id:"sl-SI",name:"Slovenian (Slovenia)"},{id:"fi",name:"Finnish"},{id:"fi-FI",name:"Finnish (Finland)"},{id:"sv",name:"Swedish"},{id:"sv-FI",name:"Swedish (Finland)"},{id:"sv-SE",name:"Swedish (Sweden)"},{id:"vi",name:"Vietnamese"},{id:"vi-VN",name:"Vietnamese (Vietnam)"},{id:"tr",name:"Turkish"},{id:"tr-TR",name:"Turkish (Turkey)"},{id:"is",name:"Icelandic"},{id:"is-IS",name:"Icelandic (Iceland)"},{id:"el",name:"Greek"},{id:"el-CY",name:"Greek (Cyprus)"},{id:"el-GR",name:"Greek (Greece)"},{id:"sr",name:"Serbian"},{id:"sr-RS",name:"Serbian (Serbia)"},{id:"be",name:"Belarusian"},{id:"be-BY",name:"Belarusian (Belarus)"},{id:"bg",name:"\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438"},{id:"bg-BG",name:"Bulgarian (Bulgaria)"},{id:"mk",name:"Macedonian"},{id:"mk-MK",name:"Macedonian (Macedonia)"},{id:"ru",name:"Russian"},{id:"ru-MD",name:"Russian (Moldova)"},{id:"ru-RU",name:"Russian (Russia)"},{id:"ru-UA",name:"Russian (Ukraine)"},{id:"uk",name:"Ukrainian"},{id:"uk-UA",name:"Ukrainian (Ukraine)"},{id:"he",name:"Hebrew"},{id:"he-IL",name:"Hebrew (Israel)"},{id:"ar",name:"Arabic"},{id:"ar-DZ",name:"Arabic (Algeria)"},{id:"ar-KW",name:"Arabic (Kuwait)"},{id:"ar-MA",name:"Arabic (Morocco)"},{id:"ar-SA",name:"Arabic (Saudi Arabia)"},{id:"ar-EG",name:"Arabic (Egypt)"},{id:"hi",name:"Hindi"},{id:"hi-IN",name:"Hindi (India)"},{id:"th",name:"Thai"},{id:"th-TH",name:"Thai (Thailand)"},{id:"zh",name:"Chinese"},{id:"zh-CN",name:"Chinese (China)"},{id:"zh-HK",name:"Chinese (Hong Kong)"},{id:"zh-TW",name:"Chinese (Taiwan)"},{id:"ja",name:"Japanese"},{id:"ja-JP",name:"Japanese (Japan)"},{id:"ko",name:"Korean"},{id:"ko-KR",name:"Korean (South Korea)"},{id:"km",name:"Khmer"},{id:"km-KH",name:"Khmer (Cambodia)"}],currencies:[{id:"AFN",name:"Afghan Afghani"},{id:"ALL",name:"Albanian Lek"},{id:"DZD",name:"Algerian Dinar"},{id:"AOA",name:"Angolan Kwanza"},{id:"ARS",name:"Argentine Peso"},{id:"AMD",name:"Armenian Dram"},{id:"AWG",name:"Aruban Florin"},{id:"AUD",name:"Australian Dollar"},{id:"AZN",name:"Azerbaijani Manat"},{id:"AZM",name:"Azerbaijani Manat (1993-2006)"},{id:"BSD",name:"Bahamian Dollar"},{id:"BHD",name:"Bahraini Dinar"},{id:"BDT",name:"Bangladeshi Taka"},{id:"BBD",name:"Barbadian Dollar"},{id:"BYR",name:"Belarusian Ruble"},{id:"BZD",name:"Belize Dollar"},{id:"BMD",name:"Bermudan Dollar"},{id:"BTN",name:"Bhutanese Ngultrum"},{id:"BOB",name:"Bolivian Boliviano"},{id:"BAM",name:"Bosnia-Herzegovina Convertible Mark"},{id:"BWP",name:"Botswanan Pula"},{id:"BRL",name:"Brazilian Real"},{id:"GBP",name:"British Pound Sterling"},{id:"BND",name:"Brunei Dollar"},{id:"BGN",name:"Bulgarian Lev"},{id:"BUK",name:"Burmese Kyat"},{id:"BIF",name:"Burundian Franc"},{id:"XOF",name:"CFA Franc BCEAO"},{id:"XPF",name:"CFP Franc"},{id:"KHR",name:"Cambodian Riel"},{id:"CAD",name:"Canadian Dollar"},{id:"CVE",name:"Cape Verdean Escudo"},{id:"KYD",name:"Cayman Islands Dollar"},{id:"CLP",name:"Chilean Peso"},{id:"CNY",name:"Chinese Yuan Renminbi"},{id:"COP",name:"Colombian Peso"},{id:"KMF",name:"Comorian Franc"},{id:"CDF",name:"Congolese Franc"},{id:"CRC",name:"Costa Rican Col\xF3n"},{id:"HRK",name:"Croatian Kuna"},{id:"CUP",name:"Cuban Peso"},{id:"CZK",name:"Czech Republic Koruna"},{id:"DKK",name:"Danish Krone"},{id:"DJF",name:"Djiboutian Franc"},{id:"DOP",name:"Dominican Peso"},{id:"XCD",name:"East Caribbean Dollar"},{id:"EGP",name:"Egyptian Pound"},{id:"GQE",name:"Equatorial Guinean Ekwele"},{id:"ERN",name:"Eritrean Nakfa"},{id:"EEK",name:"Estonian Kroon"},{id:"ETB",name:"Ethiopian Birr"},{id:"EUR",name:"Euro"},{id:"FKP",name:"Falkland Islands Pound"},{id:"FJD",name:"Fijian Dollar"},{id:"GMD",name:"Gambian Dalasi"},{id:"GEK",name:"Georgian Kupon Larit"},{id:"GEL",name:"Georgian Lari"},{id:"GHS",name:"Ghanaian Cedi"},{id:"GIP",name:"Gibraltar Pound"},{id:"GTQ",name:"Guatemalan Quetzal"},{id:"GNF",name:"Guinean Franc"},{id:"GYD",name:"Guyanaese Dollar"},{id:"HTG",name:"Haitian Gourde"},{id:"HNL",name:"Honduran Lempira"},{id:"HKD",name:"Hong Kong Dollar"},{id:"HUF",name:"Hungarian Forint"},{id:"ISK",name:"Icelandic Kr\xF3na"},{id:"INR",name:"Indian Rupee"},{id:"IDR",name:"Indonesian Rupiah"},{id:"IRR",name:"Iranian Rial"},{id:"IQD",name:"Iraqi Dinar"},{id:"ILS",name:"Israeli New Sheqel"},{id:"JMD",name:"Jamaican Dollar"},{id:"JPY",name:"Japanese Yen"},{id:"JOD",name:"Jordanian Dinar"},{id:"KZT",name:"Kazakhstan Tenge"},{id:"KES",name:"Kenyan Shilling"},{id:"KWD",name:"Kuwaiti Dinar"},{id:"KGS",name:"Kyrgystani Som"},{id:"LAK",name:"Laotian Kip"},{id:"LVL",name:"Latvian Lats"},{id:"LBP",name:"Lebanese Pound"},{id:"LSL",name:"Lesotho Loti"},{id:"LRD",name:"Liberian Dollar"},{id:"LYD",name:"Libyan Dinar"},{id:"LTL",name:"Lithuanian Litas"},{id:"MOP",name:"Macanese Pataca"},{id:"MKD",name:"Macedonian Denar"},{id:"MGA",name:"Malagasy Ariary"},{id:"MWK",name:"Malawian Kwacha"},{id:"MYR",name:"Malaysian Ringgit"},{id:"MVR",name:"Maldivian Rufiyaa"},{id:"MRO",name:"Mauritanian Ouguiya"},{id:"MUR",name:"Mauritian Rupee"},{id:"MXN",name:"Mexican Peso"},{id:"MDL",name:"Moldovan Leu"},{id:"MNT",name:"Mongolian Tugrik"},{id:"MAD",name:"Moroccan Dirham"},{id:"MZN",name:"Mozambican Metical"},{id:"MMK",name:"Myanma Kyat"},{id:"NAD",name:"Namibian Dollar"},{id:"NPR",name:"Nepalese Rupee"},{id:"ANG",name:"Netherlands Antillean Guilder"},{id:"TWD",name:"New Taiwan Dollar"},{id:"NZD",name:"New Zealand Dollar"},{id:"NIC",name:"Nicaraguan Cordoba"},{id:"NGN",name:"Nigerian Naira"},{id:"KPW",name:"North Korean Won"},{id:"NOK",name:"Norwegian Krone"},{id:"ROL",name:"Old Romanian Leu"},{id:"TRL",name:"Old Turkish Lira"},{id:"OMR",name:"Omani Rial"},{id:"PKR",name:"Pakistani Rupee"},{id:"PAB",name:"Panamanian Balboa"},{id:"PGK",name:"Papua New Guinean Kina"},{id:"PYG",name:"Paraguayan Guarani"},{id:"PEN",name:"Peruvian Nuevo Sol"},{id:"PHP",name:"Philippine Peso"},{id:"PLN",name:"Polish Zloty"},{id:"QAR",name:"Qatari Rial"},{id:"RHD",name:"Rhodesian Dollar"},{id:"RON",name:"Romanian Leu"},{id:"RUB",name:"Russian Ruble"},{id:"RWF",name:"Rwandan Franc"},{id:"SHP",name:"Saint Helena Pound"},{id:"SVC",name:"Salvadoran Col\xF3n"},{id:"WST",name:"Samoan Tala"},{id:"SAR",name:"Saudi Riyal"},{id:"RSD",name:"Serbian Dinar"},{id:"SCR",name:"Seychellois Rupee"},{id:"SLL",name:"Sierra Leonean Leone"},{id:"SGD",name:"Singapore Dollar"},{id:"SKK",name:"Slovak Koruna"},{id:"SBD",name:"Solomon Islands Dollar"},{id:"SOS",name:"Somali Shilling"},{id:"ZAR",name:"South African Rand"},{id:"KRW",name:"South Korean Won"},{id:"LKR",name:"Sri Lanka Rupee"},{id:"SDG",name:"Sudanese Pound"},{id:"SRD",name:"Surinamese Dollar"},{id:"SZL",name:"Swazi Lilangeni"},{id:"SEK",name:"Swedish Krona"},{id:"CHF",name:"Swiss Franc"},{id:"SYP",name:"Syrian Pound"},{id:"STD",name:"S\xE3o Tom\xE9 and Pr\xEDncipe Dobra"},{id:"TJS",name:"Tajikistani Somoni"},{id:"TZS",name:"Tanzanian Shilling"},{id:"THB",name:"Thai Baht"},{id:"TOP",name:"Tongan Pa\u02BBanga"},{id:"TTD",name:"Trinidad and Tobago Dollar"},{id:"TND",name:"Tunisian Dinar"},{id:"TRY",name:"Turkish Lira"},{id:"TMM",name:"Turkmenistani Manat"},{id:"USD",name:"US Dollar"},{id:"UGX",name:"Ugandan Shilling"},{id:"UAH",name:"Ukrainian Hryvnia"},{id:"AED",name:"United Arab Emirates Dirham"},{id:"UYU",name:"Uruguayan Peso"},{id:"UZS",name:"Uzbekistan Som"},{id:"VUV",name:"Vanuatu Vatu"},{id:"VEB",name:"Venezuelan Bol\xEDvar"},{id:"VEF",name:"Venezuelan Bol\xEDvar Fuerte"},{id:"VND",name:"Vietnamese Dong"},{id:"CHE",name:"WIR Euro"},{id:"CHW",name:"WIR Franc"},{id:"YER",name:"Yemeni Rial"},{id:"ZMK",name:"Zambian Kwacha"},{id:"ZWD",name:"Zimbabwean Dollar"}],id:"geo"},J4={aa:"ET",ab:"GE",abr:"GH",ace:"ID",ach:"UG",ada:"GH",ady:"RU",ae:"IR",aeb:"TN",af:"ZA",agq:"CM",aho:"IN",ak:"GH",akk:"IQ",aln:"XK",alt:"RU",am:"ET",amo:"NG",aoz:"ID",apd:"TG",ar:"EG",arc:"IR","arc-Nbat":"JO","arc-Palm":"SY",arn:"CL",aro:"BO",arq:"DZ",ary:"MA",arz:"EG",as:"IN",asa:"TZ",ase:"US",ast:"ES",atj:"CA",av:"RU",awa:"IN",ay:"BO",az:"AZ","az-Arab":"IR",ba:"RU",bal:"PK",ban:"ID",bap:"NP",bar:"AT",bas:"CM",bax:"CM",bbc:"ID",bbj:"CM",bci:"CI",be:"BY",bej:"SD",bem:"ZM",bew:"ID",bez:"TZ",bfd:"CM",bfq:"IN",bft:"PK",bfy:"IN",bg:"BG",bgc:"IN",bgn:"PK",bgx:"TR",bhb:"IN",bhi:"IN",bhk:"PH",bho:"IN",bi:"VU",bik:"PH",bin:"NG",bjj:"IN",bjn:"ID",bjt:"SN",bkm:"CM",bku:"PH",blt:"VN",bm:"ML",bmq:"ML",bn:"BD",bo:"CN",bpy:"IN",bqi:"IR",bqv:"CI",br:"FR",bra:"IN",brh:"PK",brx:"IN",bs:"BA",bsq:"LR",bss:"CM",bto:"PH",btv:"PK",bua:"RU",buc:"YT",bug:"ID",bum:"CM",bvb:"GQ",byn:"ER",byv:"CM",bze:"ML",ca:"ES",cch:"NG",ccp:"BD",ce:"RU",ceb:"PH",cgg:"UG",ch:"GU",chk:"FM",chm:"RU",cho:"US",chp:"CA",chr:"US",cja:"KH",cjm:"VN",ckb:"IQ",co:"FR",cop:"EG",cps:"PH",cr:"CA",crh:"UA",crj:"CA",crk:"CA",crl:"CA",crm:"CA",crs:"SC",cs:"CZ",csb:"PL",csw:"CA",ctd:"MM",cu:"RU","cu-Glag":"BG",cv:"RU",cy:"GB",da:"DK",dak:"US",dar:"RU",dav:"KE",dcc:"IN",de:"DE",den:"CA",dgr:"CA",dje:"NE",dnj:"CI",doi:"IN",dsb:"DE",dtm:"ML",dtp:"MY",dty:"NP",dua:"CM",dv:"MV",dyo:"SN",dyu:"BF",dz:"BT",ebu:"KE",ee:"GH",efi:"NG",egl:"IT",egy:"EG",eky:"MM",el:"GR",en:"US","en-Shaw":"GB",es:"ES",esu:"US",et:"EE",ett:"IT",eu:"ES",ewo:"CM",ext:"ES",fa:"IR",fan:"GQ",ff:"SN","ff-Adlm":"GN",ffm:"ML",fi:"FI",fia:"SD",fil:"PH",fit:"SE",fj:"FJ",fo:"FO",fon:"BJ",fr:"FR",frc:"US",frp:"FR",frr:"DE",frs:"DE",fub:"CM",fud:"WF",fuf:"GN",fuq:"NE",fur:"IT",fuv:"NG",fvr:"SD",fy:"NL",ga:"IE",gaa:"GH",gag:"MD",gan:"CN",gay:"ID",gbm:"IN",gbz:"IR",gcr:"GF",gd:"GB",gez:"ET",ggn:"NP",gil:"KI",gjk:"PK",gju:"PK",gl:"ES",glk:"IR",gn:"PY",gom:"IN",gon:"IN",gor:"ID",gos:"NL",got:"UA",grc:"CY","grc-Linb":"GR",grt:"IN",gsw:"CH",gu:"IN",gub:"BR",guc:"CO",gur:"GH",guz:"KE",gv:"IM",gvr:"NP",gwi:"CA",ha:"NG",hak:"CN",haw:"US",haz:"AF",he:"IL",hi:"IN",hif:"FJ",hil:"PH",hlu:"TR",hmd:"CN",hnd:"PK",hne:"IN",hnj:"LA",hnn:"PH",hno:"PK",ho:"PG",hoc:"IN",hoj:"IN",hr:"HR",hsb:"DE",hsn:"CN",ht:"HT",hu:"HU",hy:"AM",hz:"NA",ia:"FR",iba:"MY",ibb:"NG",id:"ID",ife:"TG",ig:"NG",ii:"CN",ik:"US",ikt:"CA",ilo:"PH",in:"ID",inh:"RU",is:"IS",it:"IT",iu:"CA",iw:"IL",izh:"RU",ja:"JP",jam:"JM",jgo:"CM",ji:"UA",jmc:"TZ",jml:"NP",jut:"DK",jv:"ID",jw:"ID",ka:"GE",kaa:"UZ",kab:"DZ",kac:"MM",kaj:"NG",kam:"KE",kao:"ML",kbd:"RU",kby:"NE",kcg:"NG",kck:"ZW",kde:"TZ",kdh:"TG",kdt:"TH",kea:"CV",ken:"CM",kfo:"CI",kfr:"IN",kfy:"IN",kg:"CD",kge:"ID",kgp:"BR",kha:"IN",khb:"CN",khn:"IN",khq:"ML",kht:"IN",khw:"PK",ki:"KE",kiu:"TR",kj:"NA",kjg:"LA",kk:"KZ","kk-Arab":"CN",kkj:"CM",kl:"GL",kln:"KE",km:"KH",kmb:"AO",kn:"IN",knf:"SN",ko:"KR",koi:"RU",kok:"IN",kos:"FM",kpe:"LR",krc:"RU",kri:"SL",krj:"PH",krl:"RU",kru:"IN",ks:"IN",ksb:"TZ",ksf:"CM",ksh:"DE",ku:"TR","ku-Arab":"IQ",kum:"RU",kv:"RU",kvr:"ID",kvx:"PK",kw:"GB",kxm:"TH",kxp:"PK",ky:"KG","ky-Arab":"CN","ky-Latn":"TR",la:"VA",lab:"GR",lad:"IL",lag:"TZ",lah:"PK",laj:"UG",lb:"LU",lbe:"RU",lbw:"ID",lcp:"CN",lep:"IN",lez:"RU",lg:"UG",li:"NL",lif:"NP","lif-Limb":"IN",lij:"IT",lis:"CN",ljp:"ID",lki:"IR",lkt:"US",lmn:"IN",lmo:"IT",ln:"CD",lo:"LA",lol:"CD",loz:"ZM",lrc:"IR",lt:"LT",ltg:"LV",lu:"CD",lua:"CD",luo:"KE",luy:"KE",luz:"IR",lv:"LV",lwl:"TH",lzh:"CN",lzz:"TR",mad:"ID",maf:"CM",mag:"IN",mai:"IN",mak:"ID",man:"GM","man-Nkoo":"GN",mas:"KE",maz:"MX",mdf:"RU",mdh:"PH",mdr:"ID",men:"SL",mer:"KE",mfa:"TH",mfe:"MU",mg:"MG",mgh:"MZ",mgo:"CM",mgp:"NP",mgy:"TZ",mh:"MH",mi:"NZ",min:"ID",mis:"IQ",mk:"MK",ml:"IN",mls:"SD",mn:"MN","mn-Mong":"CN",mni:"IN",mnw:"MM",moe:"CA",moh:"CA",mos:"BF",mr:"IN",mrd:"NP",mrj:"RU",mro:"BD",ms:"MY",mt:"MT",mtr:"IN",mua:"CM",mus:"US",mvy:"PK",mwk:"ML",mwr:"IN",mwv:"ID",mxc:"ZW",my:"MM",myv:"RU",myx:"UG",myz:"IR",mzn:"IR",na:"NR",nan:"CN",nap:"IT",naq:"NA",nb:"NO",nch:"MX",nd:"ZW",ndc:"MZ",nds:"DE",ne:"NP",new:"NP",ng:"NA",ngl:"MZ",nhe:"MX",nhw:"MX",nij:"ID",niu:"NU",njo:"IN",nl:"NL",nmg:"CM",nn:"NO",nnh:"CM",no:"NO",nod:"TH",noe:"IN",non:"SE",nqo:"GN",nr:"ZA",nsk:"CA",nso:"ZA",nus:"SS",nv:"US",nxq:"CN",ny:"MW",nym:"TZ",nyn:"UG",nzi:"GH",oc:"FR",om:"ET",or:"IN",os:"GE",osa:"US",otk:"MN",pa:"IN","pa-Arab":"PK",pag:"PH",pal:"IR","pal-Phlp":"CN",pam:"PH",pap:"AW",pau:"PW",pcd:"FR",pcm:"NG",pdc:"US",pdt:"CA",peo:"IR",pfl:"DE",phn:"LB",pka:"IN",pko:"KE",pl:"PL",pms:"IT",pnt:"GR",pon:"FM",pra:"PK",prd:"IR",ps:"AF",pt:"BR",puu:"GA",qu:"PE",quc:"GT",qug:"EC",raj:"IN",rcf:"RE",rej:"ID",rgn:"IT",ria:"IN",rif:"MA",rjs:"NP",rkt:"BD",rm:"CH",rmf:"FI",rmo:"CH",rmt:"IR",rmu:"SE",rn:"BI",rng:"MZ",ro:"RO",rob:"ID",rof:"TZ",rtm:"FJ",ru:"RU",rue:"UA",rug:"SB",rw:"RW",rwk:"TZ",ryu:"JP",sa:"IN",saf:"GH",sah:"RU",saq:"KE",sas:"ID",sat:"IN",sav:"SN",saz:"IN",sbp:"TZ",sc:"IT",sck:"IN",scn:"IT",sco:"GB",scs:"CA",sd:"PK","sd-Deva":"IN","sd-Khoj":"IN","sd-Sind":"IN",sdc:"IT",sdh:"IR",se:"NO",sef:"CI",seh:"MZ",sei:"MX",ses:"ML",sg:"CF",sga:"IE",sgs:"LT",shi:"MA",shn:"MM",si:"LK",sid:"ET",sk:"SK",skr:"PK",sl:"SI",sli:"PL",sly:"ID",sm:"WS",sma:"SE",smj:"SE",smn:"FI",smp:"IL",sms:"FI",sn:"ZW",snk:"ML",so:"SO",sou:"TH",sq:"AL",sr:"RS",srb:"IN",srn:"SR",srr:"SN",srx:"IN",ss:"ZA",ssy:"ER",st:"ZA",stq:"DE",su:"ID",suk:"TZ",sus:"GN",sv:"SE",sw:"TZ",swb:"YT",swc:"CD",swg:"DE",swv:"IN",sxn:"ID",syl:"BD",syr:"IQ",szl:"PL",ta:"IN",taj:"NP",tbw:"PH",tcy:"IN",tdd:"CN",tdg:"NP",tdh:"NP",te:"IN",tem:"SL",teo:"UG",tet:"TL",tg:"TJ","tg-Arab":"PK",th:"TH",thl:"NP",thq:"NP",thr:"NP",ti:"ET",tig:"ER",tiv:"NG",tk:"TM",tkl:"TK",tkr:"AZ",tkt:"NP",tl:"PH",tly:"AZ",tmh:"NE",tn:"ZA",to:"TO",tog:"MW",tpi:"PG",tr:"TR",tru:"TR",trv:"TW",ts:"ZA",tsd:"GR",tsf:"NP",tsg:"PH",tsj:"BT",tt:"RU",ttj:"UG",tts:"TH",ttt:"AZ",tum:"MW",tvl:"TV",twq:"NE",txg:"CN",ty:"PF",tyv:"RU",tzm:"MA",udm:"RU",ug:"CN","ug-Cyrl":"KZ",uga:"SY",uk:"UA",uli:"FM",umb:"AO",und:"US",unr:"IN","unr-Deva":"NP",unx:"IN",ur:"PK",uz:"UZ","uz-Arab":"AF",vai:"LR",ve:"ZA",vec:"IT",vep:"RU",vi:"VN",vic:"SX",vls:"BE",vmf:"DE",vmw:"MZ",vot:"RU",vro:"EE",vun:"TZ",wa:"BE",wae:"CH",wal:"ET",war:"PH",wbp:"AU",wbq:"IN",wbr:"IN",wls:"WF",wni:"KM",wo:"SN",wtm:"IN",wuu:"CN",xav:"BR",xcr:"TR",xh:"ZA",xlc:"TR",xld:"TR",xmf:"GE",xmn:"CN",xmr:"SD",xna:"SA",xnr:"IN",xog:"UG",xpr:"IR",xsa:"YE",xsr:"NP",yao:"MZ",yap:"FM",yav:"CM",ybb:"CM",yo:"NG",yrl:"BR",yua:"MX",yue:"HK","yue-Hans":"CN",za:"CN",zag:"SD",zdj:"KM",zea:"NL",zgh:"MA",zh:"CN","zh-Bopo":"TW","zh-Hanb":"TW","zh-Hant":"TW",zlm:"TG",zmi:"MY",zu:"ZA",zza:"TR"};var N2=require("liquidjs");var d4=require("liquidjs");function Y4(n){return class extends d4.Tag{key;value;identifier;constructor(t,i,r){super(t,i,r),this.identifier=this.tokenizer.readIdentifier(),this.key=this.identifier.content,this.tokenizer.assert(this.key,"expected variable name"),this.tokenizer.skipBlank(),this.tokenizer.peek()==="="&&(this.tokenizer.advance(),this.value=new d4.Value(this.tokenizer.readFilteredValue(),this.liquid))}*render(t){this.value&&(t.bottom()[this.key]=yield this.value.value(t,this.liquid.options.lenientIf))}*arguments(){yield this.value}*localScope(){yield this.identifier}}}var e3=require("liquidjs");function Q4(n){return class extends e3.Tag{value;branches;elseTemplates;isBlock;constructor(t,i,r,o){super(t,i,r);let a=this.tokenizer.p,s=this.tokenizer.readValue()?.getText();this.isBlock=!!s?.startsWith("block."),this.tokenizer.p=a,this.value=new e3.Value(this.tokenizer.readFilteredValue(),this.liquid),this.branches=[],this.elseTemplates=[];let l=[],h=0,u=o.parseStream(i).on("tag:when",d=>{if(h>0)return;l=[];let m=[];for(;!d.tokenizer.end();)m.push(d.tokenizer.readValueOrThrow()),d.tokenizer.skipBlank(),d.tokenizer.peek()===","?d.tokenizer.readTo(","):d.tokenizer.readTo("or");this.branches.push({values:m,templates:l})}).on("tag:else",()=>{h++,l=this.elseTemplates}).on("tag:endcase",()=>u.stop()).on("template",d=>{(l!==this.elseTemplates||h===1)&&l.push(d)}).on("end",()=>{throw new Error(`tag ${t.getText()} not closed`)});u.start()}*render(t,i){let r=this.liquid.renderer,o=(0,e3.toValue)(yield this.value.value(t,t.opts.lenientIf)),a=!1,s="";for(let l of this.branches)for(let h of l.values){let u=yield(0,e3.evalToken)(h,t,t.opts.lenientIf);if(o===u){let d=yield r.renderTemplates(l.templates,t);s+=this.isBlock&&n.isEditor?`<span class="swell-block">${d}</span>`:d,a=!0;break}}a||(s+=yield r.renderTemplates(this.elseTemplates,t)),s&&i.write(s)}*arguments(){yield this.value,yield*this.branches.flatMap(t=>t.values)}*children(){let t=this.branches.flatMap(i=>i.templates);return this.elseTemplates&&t.push(...this.elseTemplates),t}}}var h4=require("liquidjs");var G5=Object.freeze(["offset","limit","reversed"]);function X4(n){return class extends h4.ForTag{*render(t,i){let r=this.liquid.renderer,o=yield(0,h4.evalToken)(this.collection,t);if(o=yield w3(o),!o.length){yield r.renderTemplates(this.elseTemplates,t,i);return}let a="continue-"+this.variable+"-"+this.collection.getText();t.push({continue:t.getRegister(a)});let s=yield this.hash.render(t);t.pop(),o=(this.liquid.options.orderedFilterParameters?Object.keys(s).filter(u=>G5.includes(u)):G5.filter(u=>s[u]!==void 0)).reduce((u,d)=>{switch(d){case"offset":return r1(u,s.offset);case"limit":return o1(u,s.limit);case"reversed":return n1(u);default:return u}},o),t.setRegister(a,(s.offset||0)+o.length);let h={forloop:new C3(o.length,this.collection.getText(),this.variable)};t.push(h);for(let u of o){if(h[this.variable]=u,t.continueCalled=t.breakCalled=!1,yield r.renderTemplates(this.templates,t,i),t.breakCalled)break;h.forloop.next()}t.continueCalled=t.breakCalled=!1,t.pop()}}}function n1(n){return[...n].reverse()}function r1(n,e){return n.slice(e)}function o1(n,e){return n.slice(0,e)}var t3=require("liquidjs");var a1=Object.freeze(["new_comment","guest_login"]);function ee(n){return class extends t3.Tag{formType;formConfig;templates;hash;arg;constructor(t,i,r,o){super(t,i,r);let{tokenizer:a}=t;for(this.formType=a.readValue()?.content,this.formConfig=n.theme.getFormConfig(this.formType),a.advance(),this.arg=a.readValue(),this.templates=[],this.hash=new t3.Hash(this.tokenizer.remaining());i.length>0;){let s=i.shift();if(t3.TypeGuards.isTagToken(s)&&s.name==="endform")return;this.templates.push(o.parseToken(s,i))}if(!(!this.formConfig&&!a1.includes(this.formType)))throw new Error(`tag ${t.getText()} not closed`)}*render(t,i){if(!this.formConfig){i.write(`<!-- form '${this.formType}' not found in theme configuration -->`);return}let r=this.liquid.renderer,o=yield(0,t3.evalToken)(this.arg,t),a=yield this.hash.render(t),s=t.getAll(),l=" "+Object.entries(a).reduce((C,[f,F])=>(F!==!0&&C.push(`${f}="${String(F)}"`),C),[]).join(" "),u=n.theme.formData[this.formConfig.id]||new Y(this.formConfig.id),d="";if(n.theme.shopifyCompatibility){Object.assign(u,n.theme.shopifyCompatibility.getFormData(u));let C=yield n.theme.shopifyCompatibility.getAdaptedFormClientHtml(this.formConfig.id,s,o);C&&(d=yield n.renderTemplateString(C));let f=yield n.theme.shopifyCompatibility.getAdaptedFormClientParams(this.formConfig.id,s,o);f&&u.setParams(f)}t.push({form:{...o||void 0,...u}});let m=yield r.renderTemplates(this.templates,t),p=Array.isArray(this.formConfig.params)?yield Promise.all(this.formConfig.params.map(async C=>{let f=await n.renderTemplateString(C.value,{value:o});return`<input type="hidden" name="${C.name}" value="${f}" />`})):[],g=a.return_to||n.theme.globals.request?.path;i.write(`
|
|
10
10
|
<form action="${this.formConfig.url}" method="post" accept-charset="UTF-8" enctype="multipart/form-data"${l}>
|
|
11
11
|
<input type="hidden" name="form_type" value="${this.formConfig.id}" />
|
|
12
12
|
${p.join("")}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
${d}
|
|
15
15
|
${m}
|
|
16
16
|
</form>
|
|
17
|
-
`)}}}var x=require("liquidjs");function te(n){return class extends x.Tag{branches=[];elseTemplates;constructor(t,i,r,o){super(t,i,r);let a=[];o.parseStream(i).on("start",()=>this.branches.push({value:new x.Value(t.tokenizer.readFilteredValue(),this.liquid),templates:a=[]})).on("tag:elsif",s=>{(0,x.assert)(!this.elseTemplates,"unexpected elsif after else"),this.branches.push({value:new x.Value(s.tokenizer.readFilteredValue(),this.liquid),templates:a=[]})}).on("tag:else",s=>{s.args.length>0?this.branches.push({value:new x.Value(s.tokenizer.readFilteredValue(),this.liquid),templates:a=[]}):(a=[],this.elseTemplates=a)}).on("tag:endif",function(s){s1(s.args),this.stop()}).on("template",s=>a.push(s)).on("end",()=>{throw new Error(`tag ${t.getText()} not closed`)}).start()}*render(t,i){let r=this.liquid.renderer;for(let{value:o,templates:a}of this.branches){let s=yield o.value(t,t.opts.lenientIf);if((0,x.isTruthy)(s,t)){yield r.renderTemplates(a,t,i);return}}yield r.renderTemplates(this.elseTemplates||[],t,i)}*children(){let t=this.branches.flatMap(i=>i.templates);return this.elseTemplates&&t.push(...this.elseTemplates),t}arguments(){return this.branches.map(t=>t.value)}}}function s1(n,e=`unexpected ${JSON.stringify(n)}`){(0,x.assert)(!n,e)}var c4=require("liquidjs");function ie(n){return class extends c4.Tag{templates;constructor(t,i,r,o){for(super(t,i,r),this.templates=[];i.length>0;){let a=i.shift();if(c4.TypeGuards.isTagToken(a)&&a.name==="endjavascript")return;this.templates.push(o.parseToken(a,i))}throw new Error(`tag ${t.getText()} not closed`)}*render(t,i){let o=yield this.liquid.renderer.renderTemplates(this.templates,t);i.write(`<script type="text/javascript" data-swell>${o}</script>`)}}}var V5=require("liquidjs");function ne(n){return class extends V5.Tag{fileName;constructor(t,i,r,o){super(t,i,r);let{tokenizer:a}=t;this.fileName=a.readValue()?.content}*render(t){n.layoutName=this.fileName}}}var d3=require("liquidjs");function L3(n,e){let{page:t,count:i,pages:r,page_count:o,limit:a,next:s,previous:l}=e,h=r[t]||{};return new y({current_offset:h.start||0,current_page:t,items:i||0,next:s?re(t+1,s?.url):null,page_param:"page",page_size:a,pages:o,parts:Object.keys(r).map(([u])=>re(u,u!=e.page?`${n.swell.url.pathname}?${O({...n.swell.queryParams,page:u})}`:void 0)),previous:l?re(t-1,l?.url):null})}function re(n,e){return{is_link:!!e,title:String(n),url:e||null}}function oe(n){return class extends d3.Tag{collection;pageSize;templates;hash;constructor(t,i,r,o){super(t,i,r);let a=this.tokenizer.readValue(),s=this.tokenizer.readIdentifier();if(this.pageSize=this.tokenizer.readValue(),s.content!=="by"||!a)throw new Error(`illegal tag: ${t.getText()}`);this.templates=[],this.collection=a,this.hash=new d3.Hash(this.tokenizer.remaining());let l=o.parseStream(i).on("tag:endpaginate",()=>l.stop()).on("template",h=>{this.templates.push(h)}).on("end",()=>{throw new Error(`tag ${t.getText()} not closed`)});l.start()}*render(t,i){let r=this.liquid.renderer,o=yield(0,d3.evalToken)(this.collection,t),a=Number(yield(0,d3.evalToken)(this.pageSize,t)),s=yield this.hash.render(t);if(!Number.isNaN(a)&&o instanceof L&&o.limit!=a&&(yield o._get({limit:a,window:s.window_size||void 0})),o){let l=new D3(o);n.theme.shopifyCompatibility&&l.setCompatibilityProps(L3(n.theme.shopifyCompatibility,l)),t.push({paginate:l})}yield r.renderTemplates(this.templates,t,i)}}}var ae=require("lodash-es"),t3=require("liquidjs");function se(n){return class extends t3.RenderTag{*render(t,i){let{liquid:r,hash:o}=this,a=yield le(this.file,t,r);(0,t3.assert)(a,()=>`illegal file path "${a}"`);let s=yield n.getComponentPath(a).then(d=>n.getThemeConfig(d)),h=t.spawn().bottom();(0,ae.assign)(h,yield o.render(t));let u=yield t._get(["section"]);if(u&&(0,ae.assign)(h,{section:u}),this.with){let{value:d,alias:m}=this.with,p=m||a;h[p]=yield(0,t3.evalToken)(d,t)}if(this.for){let{value:d,alias:m}=this.for,p=yield(0,t3.evalToken)(d,t);p=yield w3(p),h.forloop=new C3(p.length,d.getText(),m);for(let g of p){h[m]=g;let C=yield n.renderTemplate(s,h);i.write(C),h.forloop.next()}}else{let d=yield n.renderTemplate(s,h);i.write(d)}}}}function*le(n,e,t){switch(typeof n){case"string":return n;case"object":{if(Array.isArray(n))return t.renderer.renderTemplates(n,e);break}default:break}return yield(0,t3.evalToken)(n,e)}var O5=require("liquidjs");function de(n){return class extends O5.Tag{fileName;constructor(t,i,r,o){super(t,i,r);let{tokenizer:a}=t;this.fileName=a.readValue()?.content}*render(t,i){let r=yield n.getSectionPath(this.fileName),o=yield n.getThemeConfig(r);if(!o){console.error(`Section not found: ${r}`);return}let a,s,l=yield n.theme.getTemplateSchema(o).then(h=>{if(!h)return console.error(`Section schema not found: ${r}`),"";a=h;let u=n.theme.resolveStaticSectionSettings(h);return s=u,n.renderTemplate(o,{section:{id:this.fileName,settings:{...u,blocks:void 0},blocks:u.blocks}})});if(l){let{shopify_compatibility:h}=n.theme.globals,u=a.tag||"div",d=`${h?"shopify":"swell"}-section-${s.id||this.fileName}`,m=h?"shopify-section":"swell-section";i.write(`<${u} id="${d}" class="${m} ${a.class||""}">${l}</${u}>`)}}}}var $5=require("liquidjs");function he(n){return class extends $5.Tag{fileName;constructor(t,i,r,o){super(t,i,r);let{tokenizer:a}=t;this.fileName=a.readValue()?.content}*render(t,i){let r=yield n.getSectionGroupPath(this.fileName),o=yield n.getThemeConfig(r);try{let a=JSON.parse(o.file_data),s=yield n.renderPageSections(a),{shopify_compatibility:l}=n.theme.globals;i.write(`<div id="swell-section-group__${this.fileName}">${s.map(h=>{let u=h.tag||"div",d=`${l?"shopify":"swell"}-section-sections--${o.hash}__${h.id}`,m=l?`shopify-section shopify-section-group-${this.fileName} section-${h.id}`:`swell-section swell-section-group-${this.fileName} section-${h.id}`;return`<${u} id="${d}" class="${m} ${h.class||""}">${h.output}</${u}>`}).join("")}</div>`)}catch{}}}}var u4=require("liquidjs");function ce(n){return class extends u4.Tag{templates;hash;constructor(t,i,r,o){for(super(t,i,r),this.hash=a3(t.input),this.templates=[];i.length>0;){let a=i.shift();if(u4.TypeGuards.isTagToken(a)&&a.name==="endstyle")return;this.templates.push(o.parseToken(a,i))}throw new Error(`tag ${t.getText()} not closed`)}*render(t,i){let o=yield this.liquid.renderer.renderTemplates(this.templates,t);i.write(`<style data-swell data-hash="${this.hash}">${o}</style>`)}}}var b3=require("liquidjs");function ue(n){return class extends b3.IncludeTag{*render(t,i){let{hash:r}=this,o=yield le(this.file,t,this.liquid);(0,b3.assert)(o,()=>`illegal file path "${o}"`);let a=t.saveRegister("blocks","blockMode");t.setRegister("blocks",{}),t.setRegister("blockMode",0);let s=yield r.render(t);this.withVar&&(s[o]=yield(0,b3.evalToken)(this.withVar,t)),t.push(t.opts.jekyllInclude?{include:s}:s);let l=yield n.getComponentPath(o).then(h=>n.getThemeConfig(h)).then(h=>n.renderTemplate(h,s));i.write(l),t.pop(),t.restoreRegister(a)}}}var U5=require("liquidjs");function me(n){return class extends U5.Tag{templates;constructor(t,i,r,o){super(t,i,r),this.templates=[],o.parseStream(i).on("template",a=>{this.templates.push(a)}).on("tag:endschema",function(){this.stop()}).on("end",()=>{throw new Error(`tag ${t.getText()} not closed`)}).start()}*render(t,i){let r=yield this.liquid.renderer.renderTemplates(this.templates,t);try{n.lastSchema=void 0,typeof r=="string"&&(n.lastSchema=JSON.parse(l1(r)))}catch{n.lastSchema=void 0}}}}function l1(n){return n.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g,(e,t)=>t?"":e)}var K5=require("liquidjs");function pe(n){return class extends K5.Tag{key;value;constructor(t,i,r,o){super(t,i,r);let a=t.args.split(",").map(h=>h.trim()),s=a.find(h=>h.startsWith("setting:")),l=a.find(h=>h.startsWith("value:"));this.key=s?s.split(":")[1].trim().replace(/['"]/g,""):a[0].split(".")[a[0].split(".").length-1],this.value=l?l.split(":")[1].trim():a[0]}*render(t,i){let r=yield this.liquid.evalValue(this.value,t);r.value&&(r=r.value),i.write(`<span data-swell-inline-editable="${this.key}">${r}</span>`)}}}var d1={assign:Y4,case:Q4,for:X4,form:ee,if:te,javascript:ie,layout:ne,paginate:oe,render:se,section:de,sections:he,style:ce,include:ue,schema:me,inline_editable:pe};function z5(n){Object.entries(d1).forEach(([e,t])=>n.registerTag(e,t(n)))}var R2=require("lodash-es");function Ce(n){return function(t){return n.getAssetUrl(t).then(i=>i||"")}}function ge(n){return(e,t)=>S.get(e).brightnessDifference(S.get(t))}function fe(n){return e=>S.get(e).brightness()}function we(n){return(e,t)=>S.get(e).contrast(S.get(t))}function ye(n){return(e,t)=>S.get(e).darken(t)}function Se(n){return(e,t)=>S.get(e).desaturate(t)}function ke(n){return(e,t)=>S.get(e).difference(S.get(t))}function Le(n){return(e,t)=>S.get(e).extract(t)}function be(n){return(e,t)=>S.get(e).lighten(t)}function Ae(n){return(e,t,i)=>S.get(e).mix(S.get(t),i)}function Te(n){return function(t,i,r){return S.get(t).modify(i,Number(r)||0)}}function _e(n){return(e,t)=>S.get(e).saturate(t)}function Me(n){return e=>S.get(e).hex()}function Ee(n){return e=>S.get(e).hsl()}function Pe(n){return(e,t)=>t!==void 0?S.get(e).rgba(t):S.get(e).rgb()}var j=r3(require("strftime"),1);function x3(n){return(e,...t)=>{let i=ve(e),{format:r}=h1(t);return c1(r,i)}}function ve(n){return n==="now"||n==="today"?new Date:n instanceof Date?n:typeof n=="string"?new Date(n):new Date}function h1(n){return typeof n[0]=="string"?{format:n[0]}:N(n)}function c1(n,e){if(u1(n))return m1(n,e);switch(n){case"abbreviated_date":return(0,j.default)("%b %d, %Y",e);case"basic":return(0,j.default)("%m/%d/%Y",e);case"date":return(0,j.default)("%B %d, %Y",e);case"date_at_time":return`${(0,j.default)("%B %d, %Y",e)} at ${(0,j.default)("%I:%M %P",e)}`;case"default":return(0,j.default)("%A, %B %d, %Y at %I:%M %P %z",e);case"on_date":return`on ${(0,j.default)("%b %d, %Y",e)}`;case"short":return(0,j.default)("%-d %b %H:%M",e);case"long":return(0,j.default)("%B %d, %Y %H:%M",e);default:return e.toLocaleString()}}function u1(n){return n.includes("%")}function m1(n,e){return(0,j.default)(n,e)}function Re(n){return async function(t){if(!t)return"";let i=await Promise.all(Array.from(t).map(r=>r?.message||"Unknown error"));return i.length===0?"":`
|
|
17
|
+
`)}}}var x=require("liquidjs");function te(n){return class extends x.Tag{branches=[];elseTemplates;constructor(t,i,r,o){super(t,i,r);let a=[];o.parseStream(i).on("start",()=>this.branches.push({value:new x.Value(t.tokenizer.readFilteredValue(),this.liquid),templates:a=[]})).on("tag:elsif",s=>{(0,x.assert)(!this.elseTemplates,"unexpected elsif after else"),this.branches.push({value:new x.Value(s.tokenizer.readFilteredValue(),this.liquid),templates:a=[]})}).on("tag:else",s=>{s.args.length>0?this.branches.push({value:new x.Value(s.tokenizer.readFilteredValue(),this.liquid),templates:a=[]}):(a=[],this.elseTemplates=a)}).on("tag:endif",function(s){s1(s.args),this.stop()}).on("template",s=>a.push(s)).on("end",()=>{throw new Error(`tag ${t.getText()} not closed`)}).start()}*render(t,i){let r=this.liquid.renderer;for(let{value:o,templates:a}of this.branches){let s=yield o.value(t,t.opts.lenientIf);if((0,x.isTruthy)(s,t)){yield r.renderTemplates(a,t,i);return}}yield r.renderTemplates(this.elseTemplates||[],t,i)}*children(){let t=this.branches.flatMap(i=>i.templates);return this.elseTemplates&&t.push(...this.elseTemplates),t}arguments(){return this.branches.map(t=>t.value)}}}function s1(n,e=`unexpected ${JSON.stringify(n)}`){(0,x.assert)(!n,e)}var c4=require("liquidjs");function ie(n){return class extends c4.Tag{templates;constructor(t,i,r,o){for(super(t,i,r),this.templates=[];i.length>0;){let a=i.shift();if(c4.TypeGuards.isTagToken(a)&&a.name==="endjavascript")return;this.templates.push(o.parseToken(a,i))}throw new Error(`tag ${t.getText()} not closed`)}*render(t,i){let o=yield this.liquid.renderer.renderTemplates(this.templates,t);i.write(`<script type="text/javascript" data-swell>${o}</script>`)}}}var V5=require("liquidjs");function ne(n){return class extends V5.Tag{fileName;constructor(t,i,r,o){super(t,i,r);let{tokenizer:a}=t;this.fileName=a.readValue()?.content}*render(t){n.layoutName=this.fileName}}}var d3=require("liquidjs");function L3(n,e){let{page:t,count:i,pages:r,page_count:o,limit:a,next:s,previous:l}=e,h=r[t]||{};return new y({current_offset:h.start||0,current_page:t,items:i||0,next:s?re(t+1,s?.url):null,page_param:"page",page_size:a,pages:o,parts:Object.keys(r).map(([u])=>re(u,u!=e.page?`${n.swell.url.pathname}?${O({...n.swell.queryParams,page:u})}`:void 0)),previous:l?re(t-1,l?.url):null})}function re(n,e){return{is_link:!!e,title:String(n),url:e||null}}function oe(n){return class extends d3.Tag{collection;pageSize;templates;hash;constructor(t,i,r,o){super(t,i,r);let a=this.tokenizer.readValue(),s=this.tokenizer.readIdentifier();if(this.pageSize=this.tokenizer.readValue(),s.content!=="by"||!a)throw new Error(`illegal tag: ${t.getText()}`);this.templates=[],this.collection=a,this.hash=new d3.Hash(this.tokenizer.remaining());let l=o.parseStream(i).on("tag:endpaginate",()=>l.stop()).on("template",h=>{this.templates.push(h)}).on("end",()=>{throw new Error(`tag ${t.getText()} not closed`)});l.start()}*render(t,i){let r=this.liquid.renderer,o=yield(0,d3.evalToken)(this.collection,t),a=Number(yield(0,d3.evalToken)(this.pageSize,t)),s=yield this.hash.render(t);if(!Number.isNaN(a)&&o instanceof L&&o.limit!=a&&(yield o._get({limit:a,window:s.window_size||void 0})),o){let l=new D3(o);n.theme.shopifyCompatibility&&l.setCompatibilityProps(L3(n.theme.shopifyCompatibility,l)),t.push({paginate:l})}yield r.renderTemplates(this.templates,t,i)}}}var ae=require("lodash-es"),i3=require("liquidjs");function se(n){return class extends i3.RenderTag{*render(t,i){let{liquid:r,hash:o}=this,a=yield le(this.file,t,r);(0,i3.assert)(a,()=>`illegal file path "${a}"`);let s=yield n.getComponentPath(a).then(d=>n.getThemeConfig(d)),h=t.spawn().bottom();(0,ae.assign)(h,yield o.render(t));let u=yield t._get(["section"]);if(u&&(0,ae.assign)(h,{section:u}),this.with){let{value:d,alias:m}=this.with,p=m||a;h[p]=yield(0,i3.evalToken)(d,t)}if(this.for){let{value:d,alias:m}=this.for,p=yield(0,i3.evalToken)(d,t);p=yield w3(p),h.forloop=new C3(p.length,d.getText(),m);for(let g of p){h[m]=g;let C=yield n.renderTemplate(s,h);i.write(C),h.forloop.next()}}else{let d=yield n.renderTemplate(s,h);i.write(d)}}}}function*le(n,e,t){switch(typeof n){case"string":return n;case"object":{if(Array.isArray(n))return t.renderer.renderTemplates(n,e);break}default:break}return yield(0,i3.evalToken)(n,e)}var O5=require("liquidjs");function de(n){return class extends O5.Tag{fileName;constructor(t,i,r,o){super(t,i,r);let{tokenizer:a}=t;this.fileName=a.readValue()?.content}*render(t,i){let r=yield n.getSectionPath(this.fileName),o=yield n.getThemeConfig(r);if(!o){console.error(`Section not found: ${r}`);return}let a,s,l=yield n.theme.getTemplateSchema(o).then(h=>{if(!h)return console.error(`Section schema not found: ${r}`),"";a=h;let u=n.theme.resolveStaticSectionSettings(h);return s=u,n.renderTemplate(o,{section:{id:this.fileName,settings:{...u,blocks:void 0},blocks:u.blocks}})});if(l){let{shopify_compatibility:h}=n.theme.globals,u=a.tag||"div",d=`${h?"shopify":"swell"}-section-${s.id||this.fileName}`,m=h?"shopify-section":"swell-section";i.write(`<${u} id="${d}" class="${m} ${a.class||""}">${l}</${u}>`)}}}}var $5=require("liquidjs");function he(n){return class extends $5.Tag{fileName;constructor(t,i,r,o){super(t,i,r);let{tokenizer:a}=t;this.fileName=a.readValue()?.content}*render(t,i){let r=yield n.getSectionGroupPath(this.fileName),o=yield n.getThemeConfig(r);try{let a=JSON.parse(o.file_data),s=yield n.renderPageSections(a),{shopify_compatibility:l}=n.theme.globals;i.write(`<div id="swell-section-group__${this.fileName}">${s.map(h=>{let u=h.tag||"div",d=`${l?"shopify":"swell"}-section-sections--${o.hash}__${h.id}`,m=l?`shopify-section shopify-section-group-${this.fileName} section-${h.id}`:`swell-section swell-section-group-${this.fileName} section-${h.id}`;return`<${u} id="${d}" class="${m} ${h.class||""}">${h.output}</${u}>`}).join("")}</div>`)}catch{}}}}var u4=require("liquidjs");function ce(n){return class extends u4.Tag{templates;hash;constructor(t,i,r,o){for(super(t,i,r),this.hash=J(t.input),this.templates=[];i.length>0;){let a=i.shift();if(u4.TypeGuards.isTagToken(a)&&a.name==="endstyle")return;this.templates.push(o.parseToken(a,i))}throw new Error(`tag ${t.getText()} not closed`)}*render(t,i){let o=yield this.liquid.renderer.renderTemplates(this.templates,t),s=t?.environments?.section?.id||"",l=this.hash;s&&(l=J(`${l}${s}`)),i.write(`<style data-swell data-hash="${l}">${o}</style>`)}}}var b3=require("liquidjs");function ue(n){return class extends b3.IncludeTag{*render(t,i){let{hash:r}=this,o=yield le(this.file,t,this.liquid);(0,b3.assert)(o,()=>`illegal file path "${o}"`);let a=t.saveRegister("blocks","blockMode");t.setRegister("blocks",{}),t.setRegister("blockMode",0);let s=yield r.render(t);this.withVar&&(s[o]=yield(0,b3.evalToken)(this.withVar,t)),t.push(t.opts.jekyllInclude?{include:s}:s);let l=yield n.getComponentPath(o).then(h=>n.getThemeConfig(h)).then(h=>n.renderTemplate(h,s));i.write(l),t.pop(),t.restoreRegister(a)}}}var U5=require("liquidjs");function me(n){return class extends U5.Tag{templates;constructor(t,i,r,o){super(t,i,r),this.templates=[],o.parseStream(i).on("template",a=>{this.templates.push(a)}).on("tag:endschema",function(){this.stop()}).on("end",()=>{throw new Error(`tag ${t.getText()} not closed`)}).start()}*render(t,i){let r=yield this.liquid.renderer.renderTemplates(this.templates,t);try{n.lastSchema=void 0,typeof r=="string"&&(n.lastSchema=JSON.parse(l1(r)))}catch{n.lastSchema=void 0}}}}function l1(n){return n.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g,(e,t)=>t?"":e)}var K5=require("liquidjs");function pe(n){return class extends K5.Tag{key;value;constructor(t,i,r,o){super(t,i,r);let a=t.args.split(",").map(h=>h.trim()),s=a.find(h=>h.startsWith("setting:")),l=a.find(h=>h.startsWith("value:"));this.key=s?s.split(":")[1].trim().replace(/['"]/g,""):a[0].split(".")[a[0].split(".").length-1],this.value=l?l.split(":")[1].trim():a[0]}*render(t,i){let r=yield this.liquid.evalValue(this.value,t);r.value&&(r=r.value),i.write(`<span data-swell-inline-editable="${this.key}">${r}</span>`)}}}var d1={assign:Y4,case:Q4,for:X4,form:ee,if:te,javascript:ie,layout:ne,paginate:oe,render:se,section:de,sections:he,style:ce,include:ue,schema:me,inline_editable:pe};function z5(n){Object.entries(d1).forEach(([e,t])=>n.registerTag(e,t(n)))}var R2=require("lodash-es");function Ce(n){return function(t){return n.getAssetUrl(t).then(i=>i||"")}}function ge(n){return(e,t)=>S.get(e).brightnessDifference(S.get(t))}function fe(n){return e=>S.get(e).brightness()}function we(n){return(e,t)=>S.get(e).contrast(S.get(t))}function ye(n){return(e,t)=>S.get(e).darken(t)}function Se(n){return(e,t)=>S.get(e).desaturate(t)}function ke(n){return(e,t)=>S.get(e).difference(S.get(t))}function Le(n){return(e,t)=>S.get(e).extract(t)}function be(n){return(e,t)=>S.get(e).lighten(t)}function Ae(n){return(e,t,i)=>S.get(e).mix(S.get(t),i)}function Te(n){return function(t,i,r){return S.get(t).modify(i,Number(r)||0)}}function _e(n){return(e,t)=>S.get(e).saturate(t)}function Me(n){return e=>S.get(e).hex()}function Ee(n){return e=>S.get(e).hsl()}function Pe(n){return(e,t)=>t!==void 0?S.get(e).rgba(t):S.get(e).rgb()}var j=o3(require("strftime"),1);function x3(n){return(e,...t)=>{let i=ve(e),{format:r}=h1(t);return c1(r,i)}}function ve(n){return n==="now"||n==="today"?new Date:n instanceof Date?n:typeof n=="string"?new Date(n):new Date}function h1(n){return typeof n[0]=="string"?{format:n[0]}:N(n)}function c1(n,e){if(u1(n))return m1(n,e);switch(n){case"abbreviated_date":return(0,j.default)("%b %d, %Y",e);case"basic":return(0,j.default)("%m/%d/%Y",e);case"date":return(0,j.default)("%B %d, %Y",e);case"date_at_time":return`${(0,j.default)("%B %d, %Y",e)} at ${(0,j.default)("%I:%M %P",e)}`;case"default":return(0,j.default)("%A, %B %d, %Y at %I:%M %P %z",e);case"on_date":return`on ${(0,j.default)("%b %d, %Y",e)}`;case"short":return(0,j.default)("%-d %b %H:%M",e);case"long":return(0,j.default)("%B %d, %Y %H:%M",e);default:return e.toLocaleString()}}function u1(n){return n.includes("%")}function m1(n,e){return(0,j.default)(n,e)}function Re(n){return async function(t){if(!t)return"";let i=await Promise.all(Array.from(t).map(r=>r?.message||"Unknown error"));return i.length===0?"":`
|
|
18
18
|
<div class="errors">
|
|
19
19
|
<ul>
|
|
20
20
|
${i.map(r=>`
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
`}}function De(n){return(e,t,i)=>!B4(e)||!B4(t)?e:i?Math.floor(e/t):e/t}function xe(n){return(e,...t)=>{if(!e)return null;let i=D.get(e),r=N(t);return i.face(r)}}function je(n){return(e,t,i)=>D.clone(e).modify(t,i)}function Ze(n){return e=>D.get(e).url()}var W5={bind(n){return async e=>{if(e){let t=e.country?.iso_code||e.country_code||(typeof e.country=="string"?e.country:null);if(e.name||e.address1||e.state||t){let i=[e.name,e.company,e.address1,e.address2,e.city,e.state,t,e.zip].filter(Boolean);if(i.length>0)return`
|
|
26
26
|
<p>${i.join("<br />")}</p>
|
|
27
|
-
`}}return"<p></p>"}},resolve:[["name","company","address1","address2","city","state","country_code","country","zip"]]};function Fe(n){return function(t,...i){t=String(t||"");let{width:r,height:o,widths:a,srcset:s,preload:l,alt:h,loading:u="lazy",...d}=N(i);r===void 0&&(r=J5(t,"width")),o===void 0&&(o=J5(t,"height")),a===void 0&&typeof r=="number"&&(a=C1(r)),s===void 0&&Array.isArray(a)&&a.length>0&&(s=g1(t,a)),u===null?u=void 0:l&&(u="eager");let m={src:t,width:r,height:o,srcset:s,alt:h,loading:u,...d};return`<img ${Object.entries(m).reduce((p,[g,C])=>(C!=null&&p.push(`${g}="${String(C)}"`),p),[]).join(" ")} />`}}function p1(n){switch(n){case"width":return/width=(\d+)/;case"height":return/height=(\d+)/;default:return new RegExp(`${n}=(\\d+)`)}}function J5(n,e){let t=p1(e),i=n.match(t);return i!==null?parseInt(i[1])/2:null}function C1(n){let e=[];for(;n>256;)n=Math.round(n*.8),e.push(n);return e}function g1(n,e){return e.map(t=>{let i=n;return i.includes("?")?i=i.replace(/width=\d+/,`width=${t}`).replace(/height=\d+/,""):i=`${i}?width=${t}`,`${i} ${t}w`}).join(", ")}var Y5={bind(n){return async(e,...t)=>{let r=await(e?.images?.[0]||e?.image||e?.preview_image||e),o=r?.url||r?.file?.url||(await r?.src)?.url||r,a=String(o);if(typeof a!="string")return"";let s=N(t),l=[s.width&&`width=${Number(s.width)*2}`,s.height&&`height=${Number(s.height)*2}`].filter(Boolean).join("&");return`${a}${l?`?${l}`:""}`}},resolve:[["images","image","preview_image"]]};function Ne(n){return async e=>(await n.theme.getThemeConfig(`theme/assets/${e}`))?.file_data||""}function Ie(n){return async function(t,i=0){return i4(t,i)}}function He(n){return async function(t,i=2){return`<pre>${await i4(t,i)}</pre>`}}var Q5=require("country-flag-icons"),m4=
|
|
27
|
+
`}}return"<p></p>"}},resolve:[["name","company","address1","address2","city","state","country_code","country","zip"]]};function Fe(n){return function(t,...i){t=String(t||"");let{width:r,height:o,widths:a,srcset:s,preload:l,alt:h,loading:u="lazy",...d}=N(i);r===void 0&&(r=J5(t,"width")),o===void 0&&(o=J5(t,"height")),a===void 0&&typeof r=="number"&&(a=C1(r)),s===void 0&&Array.isArray(a)&&a.length>0&&(s=g1(t,a)),u===null?u=void 0:l&&(u="eager");let m={src:t,width:r,height:o,srcset:s,alt:h,loading:u,...d};return`<img ${Object.entries(m).reduce((p,[g,C])=>(C!=null&&p.push(`${g}="${String(C)}"`),p),[]).join(" ")} />`}}function p1(n){switch(n){case"width":return/width=(\d+)/;case"height":return/height=(\d+)/;default:return new RegExp(`${n}=(\\d+)`)}}function J5(n,e){let t=p1(e),i=n.match(t);return i!==null?parseInt(i[1])/2:null}function C1(n){let e=[];for(;n>256;)n=Math.round(n*.8),e.push(n);return e}function g1(n,e){return e.map(t=>{let i=n;return i.includes("?")?i=i.replace(/width=\d+/,`width=${t}`).replace(/height=\d+/,""):i=`${i}?width=${t}`,`${i} ${t}w`}).join(", ")}var Y5={bind(n){return async(e,...t)=>{let r=await(e?.images?.[0]||e?.image||e?.preview_image||e),o=r?.url||r?.file?.url||(await r?.src)?.url||r,a=String(o);if(typeof a!="string")return"";let s=N(t),l=[s.width&&`width=${Number(s.width)*2}`,s.height&&`height=${Number(s.height)*2}`].filter(Boolean).join("&");return`${a}${l?`?${l}`:""}`}},resolve:[["images","image","preview_image"]]};function Ne(n){return async e=>(await n.theme.getThemeConfig(`theme/assets/${e}`))?.file_data||""}function Ie(n){return async function(t,i=0){return i4(t,i)}}function He(n){return async function(t,i=2){return`<pre>${await i4(t,i)}</pre>`}}var Q5=require("country-flag-icons"),m4=o3(require("country-flag-icons/string/1x1"),1);function f1(n){return n.includes("-")?n.split("-")[1].toUpperCase():n.toUpperCase()}function Be(n){return e=>{if(typeof e!="string")return m4.US;let t=f1(e);return(0,Q5.hasFlag)(t)?m4[t]:m4.US}}function qe(n){return e=>n.renderCurrency(Number(e||0))}function Ge(n){return e=>{let{currency:t}=n.theme.swell.getStorefrontLocalization();return`${n.renderCurrency(e)} ${t?.toUpperCase()}`}}function Ve(n){return e=>n.renderCurrency(e).replace(/[^0-9.,]/g,"")}function Oe(n){return e=>n.renderCurrency(e).split(".")[0].split(",")[0]}function $e(n){return function(t){return`<script src="${t}" type="text/javascript"></script>`}}function Ue(n){return function(t){return`<link href="${t}" rel="stylesheet" type="text/css" media="all" />`}}function Ke(n){let e=x3(n);return(t,...i)=>{let r=ve(t),o=e(t,...i);return`<time datetime="${r.toISOString()}">${o}</time>`}}function p4(n){return async function(t,i){let r=i&&N(i);return await n.renderTranslation(t,r)}}function ze(n){return function*(t,i,r){let o=[],a=yield w3(t);for(let s of a){let l=yield this.context._getFromScope(s,q4(i).replace(/\?$/,"").split("."),!1);w1(l,r,this.context)&&o.push(s)}return o}}function w1(n,e,t){return e===void 0?x5(n,t):R3(e)?e.equals(n):n===e}function We(n){return(e,t)=>S.get(e).rgba(t||1)}var X5={bind(n){return(e,t)=>e?.items?.find(r=>r.variant_id===t)?.quantity||0},resolve:[["items"]]};function Je(n){return e=>null}function Ye(n){return e=>null}var e2=`<svg viewBox="120 120 520 520" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
28
28
|
<rect width="760" height="760" fill="white"/>
|
|
29
29
|
<path d="M434.923 262.5C415.291 255.712 393.386 252.693 372.579 254.298V254.309C330.763 257.518 289.641 283.753 268.363 319.614C251.778 347.565 248.351 376.93 251.587 409.157C255.63 406.306 258.956 406.811 263.335 405.97C263.01 404.556 263.536 403.266 263.749 401.942C268.755 370.243 260.58 356.284 280.704 324.338C348.39 216.91 510.044 278.524 495.116 402.559L494.433 405.263L517.01 413.297C522.789 349.596 506.898 297.139 447.835 263.51C448.272 271.32 438.742 263.824 434.923 262.5Z" fill="#E5E5E5"/>
|
|
30
30
|
<path d="M515.711 490.283C521.176 481.295 517.402 445.871 517.649 432.193C505.89 421.533 491.98 415.538 472.685 414.744V404.578C464.868 405.454 459.583 401.437 451.911 405.095C450.097 405.959 449.963 409.83 445.304 408.248C442.292 438.746 447.342 474.394 445.55 505.42C449.526 516.876 468.911 515.889 472.741 504.388L473.413 504.264C490.267 501.998 504.949 507.967 515.711 490.283Z" fill="#E5E5E5"/>
|
|
@@ -926,13 +926,13 @@
|
|
|
926
926
|
</clipPath>
|
|
927
927
|
</defs>
|
|
928
928
|
</svg>
|
|
929
|
-
`;var W1={image:p2,"product-1":e2,"product-2":t2,"product-3":i2,"product-4":n2,"product-5":r2,"product-6":o2,"collection-1":a2,"collection-2":s2,"collection-3":l2,"collection-4":d2,"collection-5":h2,"collection-6":c2,"lifestyle-1":u2,"lifestyle-2":m2,"product-apparel-1":C2,"product-apparel-2":g2,"product-apparel-3":f2,"product-apparel-4":w2,"collection-apparel-1":y2,"collection-apparel-2":S2,"collection-apparel-3":k2,"collection-apparel-4":L2,"hero-apparel-1":b2,"hero-apparel-2":A2,"hero-apparel-3":T2,"blog-apparel-1":_2,"blog-apparel-2":M2,"blog-apparel-3":E2,"detailed-apparel-1":P2},v2=W1;function Qe(n){return e=>{let t=v2[e];return t?.src?`<img src="${t.src}" alt="${e}" class="placeholder-svg placeholder-svg--${e}" />`:t}}function Xe(n){return(e,t)=>(typeof e=="object"&&"value"in e&&(e=e.value),`<span data-swell-inline-editable="${t}">${e}</span>`)}var J1={asset_url:Ce,brightness_difference:ge,color_brightness:fe,color_contrast:we,color_darken:ye,color_desaturate:Se,color_difference:ke,color_extract:Le,color_lighten:be,color_mix:Ae,color_modify:Te,color_saturate:_e,color_to_hex:Me,color_to_hsl:Ee,color_to_rgb:Pe,date:x3,default_errors:Re,divided_by:De,font_face:xe,font_modify:je,font_url:Ze,format_address:W5,image_tag:Fe,image_url:Y5,inline_asset_content:Ne,json:Ie,json_pretty:He,locale_flag:Be,money:qe,money_with_currency:Ge,money_without_currency:Ve,money_without_trailing_zeros:Oe,script_tag:$e,stylesheet_tag:Ue,time_tag:Ke,translate:p4,t:p4,where:ze,hex_to_rgba:We,item_count_for_variant:X5,payment_button:Je,payment_terms:Ye,placeholder_svg_tag:Qe,inline_editable:Xe};function D2(n){(0,R2.each)(J1,(e,t)=>{if(typeof e=="function")n.registerFilter(t,e(n));else if(typeof e.bind=="function"){let{bind:i,resolve:r}=e;n.registerFilter(t,Y1(n,i,r))}})}function Y1(n,e,t=[]){let i=e(n);return Array.isArray(t)?async function(...r){let[o,...a]=await Promise.all(r.map((s,l)=>Array.isArray(t[l])||t[l]===!0?x2(s,t[l]):s));return i.call(this,o,...a)}:i}async function x2(n,e){if(!n)return n;let t=n;v(t)&&(t=await t);try{if(Array.isArray(e))for(let i of e){if(typeof i!="string")continue;let[r,...o]=i.split("."),a=t[r];R(a)&&(v(a)?t[r]=await a:g3(a.resolve)&&(t[r]=await a.resolve())),o.length>0&&(t[r]=await x2(t[r],[o.join(".")]))}}catch{}return t}var j2=require("liquidjs");var Z2={...j2.defaultOperators,"==":C4,"!=":(n,e)=>!C4(n,e),contains:(n,e)=>(n=o3(n),f3(n)?n.some(t=>C4(t,e)):g3(n?.indexOf)?n.indexOf(o3(e))>-1:!1)};function C4(n,e){return R3(n)?n.equals(e):R3(e)?e.equals(n):(n=o3(n),e=o3(e),f3(n)?f3(e)&&Q1(n,e):n==e)}function Q1(n,e){return n.length!==e.length?!1:!n.some((t,i)=>!C4(t,e[i]))}var j3=r3(require("color"),1),S=class n{color;colorValues;red;green;blue;constructor(e){try{this.color=F2(e)?typeof e.color.object=="function"?e.color:(0,j3.default)(e.colorValues):(0,j3.default)(e),this.colorValues=this.color.object(),this.red=Number(this.colorValues.r),this.green=Number(this.colorValues.g),this.blue=Number(this.colorValues.b)}catch{this.color=(0,j3.default)("#000000"),this.colorValues=this.color.object(),this.red=Number(this.colorValues.r),this.green=Number(this.colorValues.g),this.blue=Number(this.colorValues.b)}}static get(e){return e instanceof n?e:new n(e)}static clone(e){return F2(e)?new n(n.get(e).toString()):new n(e)}toString(){return this.color.string()}lighten(e){return this.color.lighten(e/100).hex().toLowerCase()}darken(e){return this.color.darken(e/100).hex().toLowerCase()}rgb(){return this.color.rgb().toString()}rgba(e){return this.color.alpha(e).rgb().toString()}hsl(){return this.color.hsl().round().toString()}hex(){return this.color.hex().toLowerCase()}saturate(e){return this.color.saturate(e/100).hex().toLowerCase()}desaturate(e){return this.color.desaturate(e/100).hex().toLowerCase()}modify(e,t){switch(e){case"red":case"green":case"blue":case"alpha":case"hue":case"lightness":break;case"saturation":return this.color.saturationl(t).hex();default:return this.toString()}let i=this.color[e](t);return e==="alpha"?i.string():i.hex()}extract(e){switch(e){case"red":case"green":case"blue":case"alpha":case"hue":case"lightness":break;case"saturation":return this.color.saturationl().toString();default:return this.toString()}return this.color[e]().toString()}mix(e,t){let i=this.color,r=e.color,[o,a,s]=i.rgb().array(),[l,h,u]=r.rgb().array(),d=j3.default.rgb([g4(o,l,t),g4(a,h,t),g4(s,u,t)]).alpha(g4(i.alpha(),r.alpha(),t));return i.alpha()!==1?d.string():d.hex()}contrast(e){return this.color.contrast(e.color).toFixed(1)}difference(e){let[t,i,r]=this.color.rgb().array(),[o,a,s]=e.color.rgb().array();return e5(t,o)+e5(i,a)+e5(r,s)}brightness(){return(this.red*299+this.green*587+this.blue*114)/1e3}brightnessDifference(e){return Math.max(this.brightness(),e.brightness())-Math.min(this.brightness(),e.brightness())}};function g4(n,e,t){return(n*t+e*(100-t))/100}function e5(n,e){return Math.max(n,e)-Math.min(n,e)}function F2(n){return typeof n=="object"&&n!==null&&Object.hasOwn(n,"color")&&Object.hasOwn(n,"colorValues")&&Object.hasOwn(n,"red")&&Object.hasOwn(n,"green")&&Object.hasOwn(n,"blue")}var Z3=class extends N2.Liquid{theme;getThemeConfig;getThemeTemplateConfigByType;getAssetUrl;renderTemplate;renderTemplateString;renderPageSections;renderTranslation;renderCurrency;isEditor;locale;currency;layoutName;extName;componentsDir;sectionsDir;lastSchema;constructor({theme:e,getThemeConfig:t,getThemeTemplateConfigByType:i,getAssetUrl:r,renderTemplate:o,renderTemplateString:a,renderPageSections:s,renderTranslation:l,renderCurrency:h,isEditor:u,locale:d,currency:m,layoutName:p,extName:g,componentsDir:C,sectionsDir:f}){t=t||e.getThemeConfig.bind(e),g=g||"liquid",super({cache:!1,relativeReference:!1,fs:X1(t,g),ownPropertyOnly:!1,operators:Z2}),this.theme=e,this.getThemeConfig=t,this.getThemeTemplateConfigByType=i||e.getThemeTemplateConfigByType.bind(e),this.getAssetUrl=r||e.getAssetUrl.bind(e),this.renderTemplate=o||e.renderTemplate.bind(e),this.renderTemplateString=a||e.renderTemplateString.bind(e),this.renderPageSections=s||e.renderPageSections.bind(e),this.renderTranslation=l||e.renderTranslation.bind(e),this.renderCurrency=h||e.renderCurrency.bind(e),this.isEditor=!!u,this.locale=d||"en-US",this.currency=m||"USD",this.layoutName=p||"theme",this.extName=g,this.componentsDir=C||"components",this.sectionsDir=f||"sections",this.lastSchema=void 0,z5(this),D2(this)}async parseAndRender(e,t){return super.parseAndRender(e,t)}async resolveFilePathByType(e,t){let i=await this.getThemeTemplateConfigByType(e,t);if(i?.file_path)return i.file_path}async getComponentPath(e){return await this.resolveFilePathByType("components",e)||f4(`${this.componentsDir}/${e}`,this.extName)}async getSectionPath(e){return await this.resolveFilePathByType("sections",e)||f4(`${this.sectionsDir}/${e}`,this.extName)}async getSectionGroupPath(e){return await this.resolveFilePathByType("sections",`${e}.json`)||f4(`${this.sectionsDir}/${e}`,"json")}};function f4(n,e){return`theme/${n}.${e}`}function X1(n,e){return{async readFile(t){let i=f4(t,e);return n(i).then(r=>r?.file_data||`<!-- theme template not found: ${i} -->`)},async exists(t){return!0},readFileSync(t){return""},existsSync(t){return!1},contains(t,i){return!0},resolve(t,i,r){return i},fallback(t){}}}var t5=require("lodash-es");async function i5(n,e,t){let r=(await Promise.all(e?.map(async o=>({...o,items:await n5(n,o.items,t)})))).map(o=>(n.shopifyCompatibility&&Object.assign(o,n.shopifyCompatibility.getMenuData(o)),o))||[];return o5([...r,...n.shopifyCompatibility?r.reduce((o,a)=>(a.handle&&o.push({...a,id:a.handle}),o),[]):[]])}async function n5(n,e,t){return e?.length>0?Promise.all(e.map(async r=>{let{url:o,resource:a}=await I2(n,r,{trailingSlash:t?.currentUrl?.endsWith("/")&&t.currentUrl!=="/"}),s=r.items&&await n5(n,r.items,t);return{...r,url:o,resource:a,levels:H2(s),current:t?.currentUrl===o,active:t?.currentUrl?.startsWith(o),...s?{items:s,child_current:e6(s),child_active:r5(s)}:void 0}})):[]}async function I2(n,e,t){if(!e)return{url:"#invalid-link-item"};if(typeof e=="object"&&e!==null){let{url:i,resource:r}=await q2(n,e),o=i.slice(-1)==="/";return t?.trailingSlash&&!o&&i.length>1&&(i=i+"/"),!t?.trailingSlash&&o&&i.length>1&&(i=i.slice(0,-1)),{url:i,resource:r}}else return{url:e}}function H2(n){return n?.reduce((e,t)=>Math.max(e,t.items?1+H2(t.items):0),0)||0}function e6(n){return n.some(e=>e.current||e.items&&r5(e.items))}function r5(n){return n.some(e=>e.active||e.items&&r5(e.items))}function B2(n){return(0,t5.get)(n,"id",(0,t5.get)(n,"slug",typeof n=="string"?n:""))||""}async function q2(n,e){let{type:t,value:i,url:r,model:o}=e;if(typeof t>"u"&&r)return{url:r};if(t==="url")return{url:typeof i=="string"?i:""};let a=B2(i);switch(t){case"home":return{url:c3(n,"index")};case"category":return a?await h3(n,"categories/category",a):{url:c3(n,"categories/index")};case"product":return a?await h3(n,"products/product",a):{url:c3(n,"products/index")};case"page":return await h3(n,"pages/page",a);case"blog":return await h3(n,"blogs/blog",a,async s=>new A(n.swell,"content/blog-categories",s.category_id).slug);case"blog_category":return await h3(n,"blogs/category",a);case"content_list":if(o){let s=o?.replace("content/","");return{url:c3(n,"content/index",s),resource:new L(n.swell,o)}}break;case"content":if(o){let s=o?.replace("content/","");return await h3(n,"content/content",a,s)}break;case"search":return{url:c3(n,"search")};default:break}return{url:`/${a}`}}function c3(n,e,t,i){let{props:r}=n,o=r?.pages?.find(a=>a.id===e)?.url;return o?.includes(":collection")&&i&&(o=o.replace(":collection",i)),o?.includes(":slug")&&(o=o.replace(":slug",t||"")),o||`/${t||""}`}async function h3(n,e,t,i){let{props:r}=n,o=r?.pages?.find(h=>h.id===e)?.collection,a=o?new A(n.swell,o,t):void 0,s=await a?.slug||t,l=typeof i=="string"?i:void 0;return a?.id&&typeof i=="function"&&(l=await i(a)),{url:c3(n,e,s,typeof l=="string"?l:void 0),resource:a}}var G2=r3(require("bluebird"),1);var{Promise:F3}=G2.default,t6=50,w4=class n{static cache;swell;manifest=null;configs={};configPaths=[];constructor(e){this.swell=e}async init(e){let{swellHeaders:t}=this.swell;if(e){this.setConfigs(e);return}t["theme-id"]&&(await this.fetchManifest(),this.manifest||(console.log("ThemeLoader.init - version manifest not found"),await this.loadTheme()))}async loadTheme(){let{swellHeaders:e}=this.swell;if(console.log("ThemeLoader.loadTheme",e["theme-version-hash"]),e["theme-version-hash"]){let t=await this.loadThemeFromManifest();if(t)return t}return this.loadThemeAllConfigs()}getCache(){return n.cache||(n.cache=new N3({kvStore:this.swell.workerEnv?.THEME})),n.cache}setConfigs(e){this.configs=Object.fromEntries(e),this.configPaths=Object.keys(this.configs),this.manifest=this.configPaths.reduce((t,i)=>(t[i]=this.configs[i]?.hash,t),{})}async preloadTheme(e,t){console.log(`ThemeLoader.preloadTheme${e?.hash?` - manifest: ${e.hash}`:""}${t?.length?` - configs: ${t.length}`:""}`),await F3.all([e&&this.cacheManifest(e),t&&F3.map(t,i=>this.cacheThemeConfig(i),{concurrency:10})])}async fetchThemeConfig(e){if(this.configs[e]!==void 0)return this.configs[e];let t=this.manifest?.[e];if(t){let i=await this.getCache().get(`config:${t}`);return i?(this.configs[e]=i,i):this.fetchThemeConfigsFromSourceByPath(e,t)}return null}async fetchThemeConfigsByPath(e,t){let i=this.configPaths.filter(o=>o.startsWith(e)&&(!t||o.endsWith(t)));return(await F3.map(i,o=>this.fetchThemeConfig(o),{concurrency:10})).filter(o=>o!==null)}async loadThemeAllConfigs(){let{swellHeaders:e}=this.swell,t=String(e["theme-config-version"]);if(!t)throw new Error("Theme version is required");return(await this.getCache().fetch(`configs-all:${this.swell.instanceId}:v@${t}2`,()=>this.fetchThemeConfigsFromSource()))?.results??[]}async loadThemeFromManifest(){let e=await this.fetchManifest();if(!e)return null;let t=[],i=new Map;if(await F3.map(Object.values(e),r=>this.getCache().get(`config:${r}`).then(o=>{o?(i.set(o.hash,o),this.configs[o.file_path]=o):t.push(r)}),{concurrency:10}),t.length>0){let o=(await this.fetchThemeConfigsFromSource(i.size===0?void 0:t))?.results??[];for(let a of o)i.set(a.hash,a),this.configs[a.file_path]=a;await F3.map(o,a=>this.cacheThemeConfig(a),{concurrency:10})}return Array.from(i.values())}async cacheManifest(e){e?.hash&&await this.getCache().set(`manifest:${e.hash}`,e.manifest)}async cacheThemeConfig(e){e?.hash&&await this.getCache().set(`config:${e.hash}`,e)}async fetchManifest(){let{swellHeaders:e}=this.swell,t=e["theme-version-hash"];console.log("ThemeLoader.fetchManifest",t);let i=await this.getCache().get(`manifest:${t}`);if(!i){let r=await this.swell.get("/:themes:versions/:last",{...this.themeVersionQueryFilter(),fields:"hash, manifest"});r&&(await this.cacheManifest(r),i=r.manifest)}return this.manifest=i,this.configPaths=Object.keys(i||{}),this.manifest}async fetchThemeConfigsFromSource(e=void 0){e=e||[];let{swellHeaders:t}=this.swell,i=String(t["theme-config-version"]),r=e.length===0||e.length>t6;return console.log(`Retrieving ${r?"all":"some"} theme configurations - version: ${i}`),await this.swell.get("/:themes:configs",{...this.themeVersionQueryFilter(),...r?{}:{hash:{$in:e}},limit:1e3,type:"theme",fields:"name, file, file_path, hash",include:{file_data:l4}})}async fetchThemeConfigsFromSourceByPath(e,t){console.log(`Retrieving theme config - ${e}`);let i=await this.swell.get("/:themes:configs/:last",{...this.themeVersionQueryFilter(),file_path:e,fields:"name, file, file_path, hash",include:{file_data:l4}});return i&&(t&&(i.hash=t),await this.cacheThemeConfig(i)),this.configs[e]=i,i}themeVersionQueryFilter(){let{swellHeaders:e}=this.swell,t=e["theme-id"];if(!t)throw new Error("Theme ID is required");return{parent_id:t,branch_id:e["theme-branch-id"]||null,preview:e["deployment-mode"]==="editor"||e["deployment-mode"]==="preview"?!0:{$ne:!0}}}};var s5=class{swell;props;globals;forms;resources;liquidSwell;themeLoader;themeConfigs=null;page;pageId;shopifyCompatibility=null;shopifyCompatibilityClass=A3;shopifyCompatibilityConfig=null;formData={};globalData={};constructor(e,t={}){let{forms:i,resources:r,globals:o,shopifyCompatibilityClass:a}=t;this.swell=e,this.props=this.getSwellAppThemeProps(e.config),this.shopifyCompatibilityConfig=e.shopifyCompatibilityConfig||null,this.globals=o||{},this.forms=i,this.resources=r,this.shopifyCompatibilityClass=a||A3,this.liquidSwell=new Z3({theme:this,getThemeConfig:this.getThemeConfig.bind(this),getAssetUrl:this.getAssetUrl.bind(this),getThemeTemplateConfigByType:this.getThemeTemplateConfigByType.bind(this),renderTemplate:this.renderTemplate.bind(this),renderTemplateString:this.renderTemplateString.bind(this),renderPageSections:this.renderPageSections.bind(this),renderTranslation:this.lang.bind(this),renderCurrency:this.renderCurrency.bind(this),isEditor:e.isEditor}),this.themeLoader=new w4(e)}getSwellAppThemeProps(e){return e?.storefront?.theme||{}}async initGlobals(e){this.pageId=e,await this.themeLoader.init(this.themeConfigs||void 0);let{store:t,session:i,menus:r,geo:o,configs:a}=await this.getSettingsAndConfigs(),{settings:s,request:l,page:h,cart:u,account:d,customer:m}=await this.resolvePageData(t,a,e);this.page=h;let p={...this.globalData,store:t,settings:s,session:i,request:l,menus:r,page:h,cart:u,account:d,customer:m,geo:o,configs:a,language:a?.language,canonical_url:`${t.url}${this.swell.url?.pathname||""}`,shopify_compatibility:!!s.shopify_compatibility};this.shopifyCompatibility&&this.shopifyCompatibility.initGlobals(p),this.setGlobals(p),this.shopifyCompatibility&&this.shopifyCompatibility.adaptQueryParams()}setGlobals(e){this.shopifyCompatibility&&this.shopifyCompatibility.adaptGlobals(e,this.globals),this.globals={...this.globals,...e},this.liquidSwell.options.globals={...this.globals}}async getSettingsAndConfigs(){let e=W4,[t,i]=await Promise.all([this.swell.getStorefrontSettings(),this.getThemeConfigsByPath("theme/config/",".json")]),r={theme:{},editor:{},language:{},presets:[],...Array.from(i.values()).reduce((s,l)=>{let h=String(l?.name||"").split(".")[0];if(h){let u;try{u=JSON.parse(l.file_data)}catch(d){console.error(`Error parsing ${h} config: ${d}`),u={}}s[h]=u}return s},{})},o=await this.swell.storefront.settings.session();if(r.translations&&(r.language=r.translations),Object.keys(r.language).length)r.language=this.resolveTranslationLocale(r.language);else{let{locale:s}=this.swell.getStorefrontLocalization();r.language=await this.getLocaleConfig(s)}await this.setCompatibilityConfigs(r);let a=await this.resolveMenuSettings();return{store:t?.store,session:o,menus:a,geo:e,configs:r}}async resolvePageData(e,t,i){let r=String(this.swell.swellHeaders["theme-config-version"]),o=await this.swell.getCachedResource(`theme-settings-resolved:v@${r}`,[],()=>(t.editor?.settings&&i6(t.theme,t.editor?.settings),B3(this,t.theme,t.editor?.settings)));if(!o)throw new Error("Failed to resolve theme settings");let{locale:a,currency:s}=this.swell.getStorefrontLocalization(),l={host:this.swell.url.host,origin:this.swell.url.origin,path:this.swell.url.pathname,query:this.swell.queryParams,locale:a||e.locale,currency:s||e.currency,is_editor:this.swell.isEditor,is_preview:this.swell.isPreview},h=this.props.pages?.find(g=>g.id===i),u={...h,current:Number(this.swell.queryParams.page)||1,url:this.swell.url.pathname,custom:!h,slug:void 0,description:void 0,$locale:void 0};if(i){let g=await this.getThemeTemplateConfigByType("templates",i),C;try{C=JSON.parse(g?.file_data||"")}catch{}if(C?.page){let{slug:f,label:F,description:p3,$locale:Q3}=C.page;u.slug=f,u.label=F||u.label,u.description=p3,u.$locale=Q3}}let[d,m]=await Promise.all([this.fetchSingletonResourceCached("cart",()=>this.fetchCart(),{}),this.fetchSingletonResourceCached("account",()=>this.fetchAccount(),null)]);if(!d)throw new Error("Failed to fetch cart");let p;return this.shopifyCompatibility&&(p=m),{settings:o,request:l,page:u,cart:d,account:m,customer:p}}async fetchSingletonResourceCached(e,t,i){let r=this.swell.storefront.session.getCookie();return r?this.swell.getCachedResource(`${e}-${r}`,[],()=>t()):i}async fetchCart(){let e=this.resources?.singletons?.cart,t=e?new e(this.swell):new W(this.swell,"cart");if(t._isEmpty=function(){return!this._result?.items?.length},await t.id,this.shopifyCompatibility){let i=k3(this.shopifyCompatibility,t);t.setCompatibilityProps(i)}return t}async fetchAccount(){let e=this.resources?.singletons?.account,t=e?new e(this.swell):new W(this.swell,"account");if(await t.id,!t?.id)return null;if(this.shopifyCompatibility){let i=Q(this.shopifyCompatibility,t);t.setCompatibilityProps(i)}return t}getFormConfig(e){let t=e;if(this.shopifyCompatibility){let i=this.shopifyCompatibility.getAdaptedFormType(e);i&&(t=i)}return this.forms?.find(i=>i.id===t)}setFormData(e,t){let i=this.formData[e]||new J(e);i instanceof J&&(t?.params&&i.setParams(t.params),t?.errors?(i.setSuccess(!1),i.setErrors(t.errors)):t?.success&&(t.withoutErrors&&!i.errors?i.setSuccess(!0):t.withoutErrors||(i.setSuccess(!0),i.clearErrors())),this.shopifyCompatibility&&Object.assign(i,this.shopifyCompatibility.getFormData(i))),this.formData[e]=i,this.setGlobals({forms:this.formData})}setFormSuccessWithoutErrors(e){this.setFormData(e,{success:!0,withoutErrors:!0})}clearFormData(e){e?delete this.formData[e]:this.formData={},this.setGlobals({forms:this.formData})}serializeFormData(){let e={};for(let t in this.formData){let i=this.formData[t];e[t]={success:i.success,errors:i.errors&&Array.from(i.errors)}}return Object.keys(e).length>0?e:null}setGlobalData(e={}){this.globalData={...this.globalData,...e},this.setGlobals(this.globalData)}serializeGlobalData(){return Object.keys(this.globalData).length>0?this.globalData:null}updateSettings(e,t){return this.shopifyCompatibility?this.shopifyCompatibility.adaptSettings(e,t):T3(e,t)}resolveTranslationLocale(e,t){if(!e)return{};if(t=t||this.swell.getStorefrontLocalization().locale,!t)return e;let i=t.split("-")[0];return(0,T.reduce)(e,(r,o,a)=>{if(U(o))if(a==="$locale")for(let s of Object.keys(o)){let l=o[s];U(l)&&Object.assign(r,this.resolveTranslationLocale(l,t))}else a[0]!=="$"&&(r[a]=this.resolveTranslationLocale(o,t));else if(typeof o=="string")if(o.startsWith("t:")){let s=o.slice(2),l=s.split("."),h=l.pop(),u=l.join("."),d=this.globals.language;r[a]=(0,T.get)(d,`${u}.$locale.${t}.${h}`)||(0,T.get)(d,`${u}.$locale.${i}.${h}`)||(0,T.get)(d,s)||o}else r[a]=(0,T.get)(e,`$locale.${t}.${a}`)||(0,T.get)(e,`$locale.${i}.${a}`)||o;return r},{})}async setCompatibilityConfigs(e){let t=()=>(this.shopifyCompatibility||(this.shopifyCompatibility=new this.shopifyCompatibilityClass(this)),this.shopifyCompatibility);if(!Object.keys(e.editor).length&&e.settings_schema){let i=await this.swell.storefront.settings.get("store");e.editor=t().getEditorConfig(e.settings_schema),e.editor=await t().renderSchemaTranslations(this,e.editor,i.locale||"en-US")}!Object.keys(e.theme).length&&e.settings_data&&(e.theme=t().getThemeConfig(e.settings_data)),!Object.keys(e.presets).length&&e.settings_data&&(e.presets=t().getPresetsConfig(e.settings_data)),e.theme.shopify_compatibility?t():this.shopifyCompatibility&&(e.theme.shopify_compatibility=!0)}setCompatibilityData(e){!e||!this.shopifyCompatibility||this.shopifyCompatibility.adaptPageData(e)}async getLocaleConfig(e="en",t=".json"){let i=await this.getThemeConfigsByPath("theme/locales/",t),r=i.get(`theme/locales/${e}${t}`)??null;if(!r){let o=e.split("-")[0];if(r=i.get(`theme/locales/${o}${t}`)??null,!r){let a=`.default${t}`;for(let s of i.values())if(s?.file_path?.endsWith(a)){r=s;break}}}if(r){r=await this.getThemeConfig(r.file_path);try{return JSON.parse(r?.file_data||"")}catch{}}return{}}resolveLookupSetting(e,t){if(t instanceof _)return t;let i=V2(e);if(i){if(e.multiple){if(t instanceof Array)return t.map(r=>this.resolveLookupResource(i,r))}else if(t!==""&&t!==null&&t!==void 0)return this.resolveLookupResource(i,t)}return null}resolveLookupResource(e,t){let i=this.resources?.records?.[e],r=i?new i(this.swell,t):new A(this.swell,e,t);return this.shopifyCompatibility&&this.shopifyCompatibility.adaptPageData({resource:r}),r}resolveMenuSettings(){return i5(this,this.swell.getStorefrontMenus(),{currentUrl:this.swell.url.pathname})}resolveMenuSetting(e){if(!e)return null;let t=this.globals.menus||{};return t[e]||t[e.replace(/-/g,"_")]||null}async lang(e,t,i){return await this.renderTranslation(e,t,i)}resolveFontSetting(e){if(this.shopifyCompatibility){let t=this.shopifyCompatibility.getFontFromShopifySetting(e),i=D.get(t||e);return Object.assign(i,this.shopifyCompatibility.getFontData(i)),i}return D.get(e)}resolveUrlSetting(e){let t=e;if(this.shopifyCompatibility){e?.startsWith("shopify://")&&(t=e.replace("shopify://","/"));let i=this.shopifyCompatibility.getAdaptedPageUrl(t);if(i)return i}return t}resolveImageSetting(e){let t=e;return this.shopifyCompatibility&&e?.startsWith("shopify://")&&(t=""),t}async getAllThemeConfigs(){if(!this.themeConfigs){let e=await this.themeLoader.loadTheme(),t=new Map;for(let i of e)t.set(i.file_path,i);this.themeConfigs=t}return this.themeConfigs}async preloadThemeConfigs(e,t){await this.themeLoader.preloadTheme(e,t)}getPageConfigPath(e){return this.shopifyCompatibility?`theme/${this.shopifyCompatibility.getThemeFilePath("templates",e)}.json`:`theme/templates/${e}.json`}async getThemeConfig(e){return this.themeConfigs?this.themeConfigs.get(e)??null:this.themeLoader.fetchThemeConfig(e)}async getThemeConfigsByPath(e,t){let i=await this.themeLoader.fetchThemeConfigsByPath(e,t),r=new Map;for(let o of i)r.set(o.file_path,o);return r}async getThemeTemplateConfig(e){if(e.endsWith(".json")||e.endsWith(".liquid"))return this.getThemeConfig(e);let t=await this.getThemeConfig(`${e}.json`);return t||this.getThemeConfig(`${e}.liquid`)}async getThemeTemplateConfigByType(e,t){let i=[`${e}/${t}`];this.shopifyCompatibility&&i.push(this.shopifyCompatibility.getThemeFilePath(e,t));for(let r of i){let o=await this.getThemeTemplateConfig(`theme/${r}`);if(o)return o}return null}async getAssetUrl(e){let i=(await this.getThemeConfig(`theme/assets/${e}`)||await this.getThemeConfig(`assets/${e}`))?.file;if(!i)return null;let r=i.url||null;return r&&(r.endsWith(e)?r:`${r}/${e}`)}async renderTemplate(e,t){let i=e?.file_data||null;if(e===null||i===null)return"";try{return await this.liquidSwell.parseAndRender(r6(i),t)}catch(r){return console.error(r),`<!-- template render error: ${r.message} -->`}}async renderTemplateString(e,t){try{return await this.liquidSwell.parseAndRender(e,t)}catch(i){return console.error(i),""}}async getSectionSchema(e){let t,i=await this.getThemeTemplateConfigByType("sections",e);if(i?.file_path?.endsWith(".json"))try{t=JSON.parse(i.file_data)||void 0}catch{return}else if(i?.file_path?.endsWith(".liquid")&&this.shopifyCompatibility){this.liquidSwell.lastSchema=void 0;let r=this.getSectionConfigWithSchemaTagOnly(i);if(!r)return;await this.renderTemplate(r);let o=this.liquidSwell.lastSchema;o&&(t=this.shopifyCompatibility.getSectionConfigSchema(o),t=await this.shopifyCompatibility.renderSchemaTranslations(this,t,this.globals.store?.locale))}return t&&(t.id=t.id||e,t.label=t.label||e,t.fields=t.fields||[]),t}getSectionConfigWithSchemaTagOnly(e){let t="{% schema %}",i="{% endschema %}",r=e.file_data.indexOf(t),o=e.file_data.indexOf(i),a=e.file_data.slice(r+t.length,o);return r===-1||o===-1?null:{...e,file_data:t+a+i}}async renderThemeTemplate(e,t){let i=await this.getThemeTemplateConfig(e),r=await this.renderTemplate(i,t);if(i?.file_path?.endsWith(".json"))try{return JSON.parse(r)}catch(o){throw console.log("Unable to render theme template",i.file_path,r),new I3(o)}return r}async renderLayoutTemplate(e,t){let i=await this.getThemeTemplateConfigByType("layouts",e);if(i){let r=await this.renderThemeTemplate(i.file_path,t);return typeof r=="string"?r:`<!-- invalid layout: ${e}--> {{ content_for_layout }}`}throw new Error(`Layout template not found: ${e}`)}async renderPageTemplate(e,t,i){let r=null;if(i&&(r=await this.getThemeTemplateConfigByType("templates",`${e}.${i}`)),r||(r=await this.getThemeTemplateConfigByType("templates",e)),r){let o=e.split("/").splice(1).join("/")||null,a={name:e,alt_name:i||null,path:o||null};this.shopifyCompatibility&&(a=$4(this.shopifyCompatibility,a)),this.setGlobals({template:a});let s=await this.renderThemeTemplate(r.file_path,t);return s&&typeof s!="string"&&(s.id=String(r.name)),s}throw new H3("Page template not found",404,`templates/${e}`)}async renderPage(e,t){e&&this.setGlobals(e);let i;if(this.page?.id?i=await this.renderPageTemplate(this.page.id,e,t):i=await this.renderPageTemplate("404",e),typeof i!="string"&&i?.page){if(i.page.published===!1)throw new H3;i.page=this.resolveTranslationLocale(i.page)}return i}async renderAllSections(e,t){let i=typeof e=="string"?e.split(/\s*,\s*/):e;return(await Promise.all(i.map(o=>this.renderSection(o,t)))).reduce((o,a,s)=>{let l=i[s];return this.shopifyCompatibility?o[l]=`
|
|
929
|
+
`;var W1={image:p2,"product-1":e2,"product-2":t2,"product-3":i2,"product-4":n2,"product-5":r2,"product-6":o2,"collection-1":a2,"collection-2":s2,"collection-3":l2,"collection-4":d2,"collection-5":h2,"collection-6":c2,"lifestyle-1":u2,"lifestyle-2":m2,"product-apparel-1":C2,"product-apparel-2":g2,"product-apparel-3":f2,"product-apparel-4":w2,"collection-apparel-1":y2,"collection-apparel-2":S2,"collection-apparel-3":k2,"collection-apparel-4":L2,"hero-apparel-1":b2,"hero-apparel-2":A2,"hero-apparel-3":T2,"blog-apparel-1":_2,"blog-apparel-2":M2,"blog-apparel-3":E2,"detailed-apparel-1":P2},v2=W1;function Qe(n){return e=>{let t=v2[e];return t?.src?`<img src="${t.src}" alt="${e}" class="placeholder-svg placeholder-svg--${e}" />`:t}}function Xe(n){return(e,t)=>(typeof e=="object"&&"value"in e&&(e=e.value),`<span data-swell-inline-editable="${t}">${e}</span>`)}var J1={asset_url:Ce,brightness_difference:ge,color_brightness:fe,color_contrast:we,color_darken:ye,color_desaturate:Se,color_difference:ke,color_extract:Le,color_lighten:be,color_mix:Ae,color_modify:Te,color_saturate:_e,color_to_hex:Me,color_to_hsl:Ee,color_to_rgb:Pe,date:x3,default_errors:Re,divided_by:De,font_face:xe,font_modify:je,font_url:Ze,format_address:W5,image_tag:Fe,image_url:Y5,inline_asset_content:Ne,json:Ie,json_pretty:He,locale_flag:Be,money:qe,money_with_currency:Ge,money_without_currency:Ve,money_without_trailing_zeros:Oe,script_tag:$e,stylesheet_tag:Ue,time_tag:Ke,translate:p4,t:p4,where:ze,hex_to_rgba:We,item_count_for_variant:X5,payment_button:Je,payment_terms:Ye,placeholder_svg_tag:Qe,inline_editable:Xe};function D2(n){(0,R2.each)(J1,(e,t)=>{if(typeof e=="function")n.registerFilter(t,e(n));else if(typeof e.bind=="function"){let{bind:i,resolve:r}=e;n.registerFilter(t,Y1(n,i,r))}})}function Y1(n,e,t=[]){let i=e(n);return Array.isArray(t)?async function(...r){let[o,...a]=await Promise.all(r.map((s,l)=>Array.isArray(t[l])||t[l]===!0?x2(s,t[l]):s));return i.call(this,o,...a)}:i}async function x2(n,e){if(!n)return n;let t=n;v(t)&&(t=await t);try{if(Array.isArray(e))for(let i of e){if(typeof i!="string")continue;let[r,...o]=i.split("."),a=t[r];R(a)&&(v(a)?t[r]=await a:g3(a.resolve)&&(t[r]=await a.resolve())),o.length>0&&(t[r]=await x2(t[r],[o.join(".")]))}}catch{}return t}var j2=require("liquidjs");var Z2={...j2.defaultOperators,"==":C4,"!=":(n,e)=>!C4(n,e),contains:(n,e)=>(n=a3(n),f3(n)?n.some(t=>C4(t,e)):g3(n?.indexOf)?n.indexOf(a3(e))>-1:!1)};function C4(n,e){return R3(n)?n.equals(e):R3(e)?e.equals(n):(n=a3(n),e=a3(e),f3(n)?f3(e)&&Q1(n,e):n==e)}function Q1(n,e){return n.length!==e.length?!1:!n.some((t,i)=>!C4(t,e[i]))}var j3=o3(require("color"),1),S=class n{color;colorValues;red;green;blue;constructor(e){try{this.color=F2(e)?typeof e.color.object=="function"?e.color:(0,j3.default)(e.colorValues):(0,j3.default)(e),this.colorValues=this.color.object(),this.red=Number(this.colorValues.r),this.green=Number(this.colorValues.g),this.blue=Number(this.colorValues.b)}catch{this.color=(0,j3.default)("#000000"),this.colorValues=this.color.object(),this.red=Number(this.colorValues.r),this.green=Number(this.colorValues.g),this.blue=Number(this.colorValues.b)}}static get(e){return e instanceof n?e:new n(e)}static clone(e){return F2(e)?new n(n.get(e).toString()):new n(e)}toString(){return this.color.string()}lighten(e){return this.color.lighten(e/100).hex().toLowerCase()}darken(e){return this.color.darken(e/100).hex().toLowerCase()}rgb(){return this.color.rgb().toString()}rgba(e){return this.color.alpha(e).rgb().toString()}hsl(){return this.color.hsl().round().toString()}hex(){return this.color.hex().toLowerCase()}saturate(e){return this.color.saturate(e/100).hex().toLowerCase()}desaturate(e){return this.color.desaturate(e/100).hex().toLowerCase()}modify(e,t){switch(e){case"red":case"green":case"blue":case"alpha":case"hue":case"lightness":break;case"saturation":return this.color.saturationl(t).hex();default:return this.toString()}let i=this.color[e](t);return e==="alpha"?i.string():i.hex()}extract(e){switch(e){case"red":case"green":case"blue":case"alpha":case"hue":case"lightness":break;case"saturation":return this.color.saturationl().toString();default:return this.toString()}return this.color[e]().toString()}mix(e,t){let i=this.color,r=e.color,[o,a,s]=i.rgb().array(),[l,h,u]=r.rgb().array(),d=j3.default.rgb([g4(o,l,t),g4(a,h,t),g4(s,u,t)]).alpha(g4(i.alpha(),r.alpha(),t));return i.alpha()!==1?d.string():d.hex()}contrast(e){return this.color.contrast(e.color).toFixed(1)}difference(e){let[t,i,r]=this.color.rgb().array(),[o,a,s]=e.color.rgb().array();return e5(t,o)+e5(i,a)+e5(r,s)}brightness(){return(this.red*299+this.green*587+this.blue*114)/1e3}brightnessDifference(e){return Math.max(this.brightness(),e.brightness())-Math.min(this.brightness(),e.brightness())}};function g4(n,e,t){return(n*t+e*(100-t))/100}function e5(n,e){return Math.max(n,e)-Math.min(n,e)}function F2(n){return typeof n=="object"&&n!==null&&Object.hasOwn(n,"color")&&Object.hasOwn(n,"colorValues")&&Object.hasOwn(n,"red")&&Object.hasOwn(n,"green")&&Object.hasOwn(n,"blue")}var Z3=class extends N2.Liquid{theme;getThemeConfig;getThemeTemplateConfigByType;getAssetUrl;renderTemplate;renderTemplateString;renderPageSections;renderTranslation;renderCurrency;isEditor;locale;currency;layoutName;extName;componentsDir;sectionsDir;lastSchema;constructor({theme:e,getThemeConfig:t,getThemeTemplateConfigByType:i,getAssetUrl:r,renderTemplate:o,renderTemplateString:a,renderPageSections:s,renderTranslation:l,renderCurrency:h,isEditor:u,locale:d,currency:m,layoutName:p,extName:g,componentsDir:C,sectionsDir:f}){t=t||e.getThemeConfig.bind(e),g=g||"liquid",super({cache:!1,relativeReference:!1,fs:X1(t,g),ownPropertyOnly:!1,operators:Z2}),this.theme=e,this.getThemeConfig=t,this.getThemeTemplateConfigByType=i||e.getThemeTemplateConfigByType.bind(e),this.getAssetUrl=r||e.getAssetUrl.bind(e),this.renderTemplate=o||e.renderTemplate.bind(e),this.renderTemplateString=a||e.renderTemplateString.bind(e),this.renderPageSections=s||e.renderPageSections.bind(e),this.renderTranslation=l||e.renderTranslation.bind(e),this.renderCurrency=h||e.renderCurrency.bind(e),this.isEditor=!!u,this.locale=d||"en-US",this.currency=m||"USD",this.layoutName=p||"theme",this.extName=g,this.componentsDir=C||"components",this.sectionsDir=f||"sections",this.lastSchema=void 0,z5(this),D2(this)}async parseAndRender(e,t){return super.parseAndRender(e,t)}async resolveFilePathByType(e,t){let i=await this.getThemeTemplateConfigByType(e,t);if(i?.file_path)return i.file_path}async getComponentPath(e){return await this.resolveFilePathByType("components",e)||f4(`${this.componentsDir}/${e}`,this.extName)}async getSectionPath(e){return await this.resolveFilePathByType("sections",e)||f4(`${this.sectionsDir}/${e}`,this.extName)}async getSectionGroupPath(e){return await this.resolveFilePathByType("sections",`${e}.json`)||f4(`${this.sectionsDir}/${e}`,"json")}};function f4(n,e){return`theme/${n}.${e}`}function X1(n,e){return{async readFile(t){let i=f4(t,e);return n(i).then(r=>r?.file_data||`<!-- theme template not found: ${i} -->`)},async exists(t){return!0},readFileSync(t){return""},existsSync(t){return!1},contains(t,i){return!0},resolve(t,i,r){return i},fallback(t){}}}var t5=require("lodash-es");async function i5(n,e,t){let r=(await Promise.all(e?.map(async o=>({...o,items:await n5(n,o.items,t)})))).map(o=>(n.shopifyCompatibility&&Object.assign(o,n.shopifyCompatibility.getMenuData(o)),o))||[];return o5([...r,...n.shopifyCompatibility?r.reduce((o,a)=>(a.handle&&o.push({...a,id:a.handle}),o),[]):[]])}async function n5(n,e,t){return e?.length>0?Promise.all(e.map(async r=>{let{url:o,resource:a}=await I2(n,r,{trailingSlash:t?.currentUrl?.endsWith("/")&&t.currentUrl!=="/"}),s=r.items&&await n5(n,r.items,t);return{...r,url:o,resource:a,levels:H2(s),current:t?.currentUrl===o,active:t?.currentUrl?.startsWith(o),...s?{items:s,child_current:e6(s),child_active:r5(s)}:void 0}})):[]}async function I2(n,e,t){if(!e)return{url:"#invalid-link-item"};if(typeof e=="object"&&e!==null){let{url:i,resource:r}=await q2(n,e),o=i.slice(-1)==="/";return t?.trailingSlash&&!o&&i.length>1&&(i=i+"/"),!t?.trailingSlash&&o&&i.length>1&&(i=i.slice(0,-1)),{url:i,resource:r}}else return{url:e}}function H2(n){return n?.reduce((e,t)=>Math.max(e,t.items?1+H2(t.items):0),0)||0}function e6(n){return n.some(e=>e.current||e.items&&r5(e.items))}function r5(n){return n.some(e=>e.active||e.items&&r5(e.items))}function B2(n){return(0,t5.get)(n,"id",(0,t5.get)(n,"slug",typeof n=="string"?n:""))||""}async function q2(n,e){let{type:t,value:i,url:r,model:o}=e;if(typeof t>"u"&&r)return{url:r};if(t==="url")return{url:typeof i=="string"?i:""};let a=B2(i);switch(t){case"home":return{url:c3(n,"index")};case"category":return a?await h3(n,"categories/category",a):{url:c3(n,"categories/index")};case"product":return a?await h3(n,"products/product",a):{url:c3(n,"products/index")};case"page":return await h3(n,"pages/page",a);case"blog":return await h3(n,"blogs/blog",a,async s=>new A(n.swell,"content/blog-categories",s.category_id).slug);case"blog_category":return await h3(n,"blogs/category",a);case"content_list":if(o){let s=o?.replace("content/","");return{url:c3(n,"content/index",s),resource:new L(n.swell,o)}}break;case"content":if(o){let s=o?.replace("content/","");return await h3(n,"content/content",a,s)}break;case"search":return{url:c3(n,"search")};default:break}return{url:`/${a}`}}function c3(n,e,t,i){let{props:r}=n,o=r?.pages?.find(a=>a.id===e)?.url;return o?.includes(":collection")&&i&&(o=o.replace(":collection",i)),o?.includes(":slug")&&(o=o.replace(":slug",t||"")),o||`/${t||""}`}async function h3(n,e,t,i){let{props:r}=n,o=r?.pages?.find(h=>h.id===e)?.collection,a=o?new A(n.swell,o,t):void 0,s=await a?.slug||t,l=typeof i=="string"?i:void 0;return a?.id&&typeof i=="function"&&(l=await i(a)),{url:c3(n,e,s,typeof l=="string"?l:void 0),resource:a}}var G2=o3(require("bluebird"),1);var{Promise:F3}=G2.default,t6=50,w4=class n{static cache;swell;manifest=null;configs={};configPaths=[];constructor(e){this.swell=e}async init(e){let{swellHeaders:t}=this.swell;if(e){this.setConfigs(e);return}t["theme-id"]&&(await this.fetchManifest(),this.manifest||(console.log("ThemeLoader.init - version manifest not found"),await this.loadTheme()))}async loadTheme(){let{swellHeaders:e}=this.swell;if(console.log("ThemeLoader.loadTheme",e["theme-version-hash"]),e["theme-version-hash"]){let t=await this.loadThemeFromManifest();if(t)return t}return this.loadThemeAllConfigs()}getCache(){return n.cache||(n.cache=new N3({kvStore:this.swell.workerEnv?.THEME})),n.cache}setConfigs(e){this.configs=Object.fromEntries(e),this.configPaths=Object.keys(this.configs),this.manifest=this.configPaths.reduce((t,i)=>(t[i]=this.configs[i]?.hash,t),{})}async preloadTheme(e,t){console.log(`ThemeLoader.preloadTheme${e?.hash?` - manifest: ${e.hash}`:""}${t?.length?` - configs: ${t.length}`:""}`),await F3.all([e&&this.cacheManifest(e),t&&F3.map(t,i=>this.cacheThemeConfig(i),{concurrency:10})])}async fetchThemeConfig(e){if(this.configs[e]!==void 0)return this.configs[e];let t=this.manifest?.[e];if(t){let i=await this.getCache().get(`config:${t}`);return i?(this.configs[e]=i,i):this.fetchThemeConfigsFromSourceByPath(e,t)}return null}async fetchThemeConfigsByPath(e,t){let i=this.configPaths.filter(o=>o.startsWith(e)&&(!t||o.endsWith(t)));return(await F3.map(i,o=>this.fetchThemeConfig(o),{concurrency:10})).filter(o=>o!==null)}async loadThemeAllConfigs(){let{swellHeaders:e}=this.swell,t=String(e["theme-config-version"]);if(!t)throw new Error("Theme version is required");return(await this.getCache().fetch(`configs-all:${this.swell.instanceId}:v@${t}2`,()=>this.fetchThemeConfigsFromSource()))?.results??[]}async loadThemeFromManifest(){let e=await this.fetchManifest();if(!e)return null;let t=[],i=new Map;if(await F3.map(Object.values(e),r=>this.getCache().get(`config:${r}`).then(o=>{o?(i.set(o.hash,o),this.configs[o.file_path]=o):t.push(r)}),{concurrency:10}),t.length>0){let o=(await this.fetchThemeConfigsFromSource(i.size===0?void 0:t))?.results??[];for(let a of o)i.set(a.hash,a),this.configs[a.file_path]=a;await F3.map(o,a=>this.cacheThemeConfig(a),{concurrency:10})}return Array.from(i.values())}async cacheManifest(e){e?.hash&&await this.getCache().set(`manifest:${e.hash}`,e.manifest)}async cacheThemeConfig(e){e?.hash&&await this.getCache().set(`config:${e.hash}`,e)}async fetchManifest(){let{swellHeaders:e}=this.swell,t=e["theme-version-hash"];console.log("ThemeLoader.fetchManifest",t);let i=await this.getCache().get(`manifest:${t}`);if(!i){let r=await this.swell.get("/:themes:versions/:last",{...this.themeVersionQueryFilter(),fields:"hash, manifest"});r&&(await this.cacheManifest(r),i=r.manifest)}return this.manifest=i,this.configPaths=Object.keys(i||{}),this.manifest}async fetchThemeConfigsFromSource(e=void 0){e=e||[];let{swellHeaders:t}=this.swell,i=String(t["theme-config-version"]),r=e.length===0||e.length>t6;return console.log(`Retrieving ${r?"all":"some"} theme configurations - version: ${i}`),await this.swell.get("/:themes:configs",{...this.themeVersionQueryFilter(),...r?{}:{hash:{$in:e}},limit:1e3,type:"theme",fields:"name, file, file_path, hash",include:{file_data:l4}})}async fetchThemeConfigsFromSourceByPath(e,t){console.log(`Retrieving theme config - ${e}`);let i=await this.swell.get("/:themes:configs/:last",{...this.themeVersionQueryFilter(),file_path:e,fields:"name, file, file_path, hash",include:{file_data:l4}});return i&&(t&&(i.hash=t),await this.cacheThemeConfig(i)),this.configs[e]=i,i}themeVersionQueryFilter(){let{swellHeaders:e}=this.swell,t=e["theme-id"];if(!t)throw new Error("Theme ID is required");return{parent_id:t,branch_id:e["theme-branch-id"]||null,preview:e["deployment-mode"]==="editor"||e["deployment-mode"]==="preview"?!0:{$ne:!0}}}};var s5=class{swell;props;globals;forms;resources;liquidSwell;themeLoader;themeConfigs=null;page;pageId;shopifyCompatibility=null;shopifyCompatibilityClass=A3;shopifyCompatibilityConfig=null;formData={};globalData={};constructor(e,t={}){let{forms:i,resources:r,globals:o,shopifyCompatibilityClass:a}=t;this.swell=e,this.props=this.getSwellAppThemeProps(e.config),this.shopifyCompatibilityConfig=e.shopifyCompatibilityConfig||null,this.globals=o||{},this.forms=i,this.resources=r,this.shopifyCompatibilityClass=a||A3,this.liquidSwell=new Z3({theme:this,getThemeConfig:this.getThemeConfig.bind(this),getAssetUrl:this.getAssetUrl.bind(this),getThemeTemplateConfigByType:this.getThemeTemplateConfigByType.bind(this),renderTemplate:this.renderTemplate.bind(this),renderTemplateString:this.renderTemplateString.bind(this),renderPageSections:this.renderPageSections.bind(this),renderTranslation:this.lang.bind(this),renderCurrency:this.renderCurrency.bind(this),isEditor:e.isEditor}),this.themeLoader=new w4(e)}getSwellAppThemeProps(e){return e?.storefront?.theme||{}}async initGlobals(e){this.pageId=e,await this.themeLoader.init(this.themeConfigs||void 0);let{store:t,session:i,menus:r,geo:o,configs:a}=await this.getSettingsAndConfigs(),{settings:s,request:l,page:h,cart:u,account:d,customer:m}=await this.resolvePageData(t,a,e);this.page=h;let p={...this.globalData,store:t,settings:s,session:i,request:l,menus:r,page:h,cart:u,account:d,customer:m,geo:o,configs:a,language:a?.language,canonical_url:`${t.url}${this.swell.url?.pathname||""}`,shopify_compatibility:!!s.shopify_compatibility};this.shopifyCompatibility&&this.shopifyCompatibility.initGlobals(p),this.setGlobals(p),this.shopifyCompatibility&&this.shopifyCompatibility.adaptQueryParams()}setGlobals(e){this.shopifyCompatibility&&this.shopifyCompatibility.adaptGlobals(e,this.globals),this.globals={...this.globals,...e},this.liquidSwell.options.globals={...this.globals}}async getSettingsAndConfigs(){let e=W4,[t,i]=await Promise.all([this.swell.getStorefrontSettings(),this.getThemeConfigsByPath("theme/config/",".json")]),r={theme:{},editor:{},language:{},presets:[],...Array.from(i.values()).reduce((s,l)=>{let h=String(l?.name||"").split(".")[0];if(h){let u;try{u=JSON.parse(l.file_data)}catch(d){console.error(`Error parsing ${h} config: ${d}`),u={}}s[h]=u}return s},{})},o=await this.swell.storefront.settings.session();if(r.translations&&(r.language=r.translations),Object.keys(r.language).length)r.language=this.resolveTranslationLocale(r.language);else{let{locale:s}=this.swell.getStorefrontLocalization();r.language=await this.getLocaleConfig(s)}await this.setCompatibilityConfigs(r);let a=await this.resolveMenuSettings();return{store:t?.store,session:o,menus:a,geo:e,configs:r}}async resolvePageData(e,t,i){let r=String(this.swell.swellHeaders["theme-config-version"]),o=await this.swell.getCachedResource(`theme-settings-resolved:v@${r}`,[],()=>(t.editor?.settings&&i6(t.theme,t.editor?.settings),B3(this,t.theme,t.editor?.settings)));if(!o)throw new Error("Failed to resolve theme settings");let{locale:a,currency:s}=this.swell.getStorefrontLocalization(),l={host:this.swell.url.host,origin:this.swell.url.origin,path:this.swell.url.pathname,query:this.swell.queryParams,locale:a||e.locale,currency:s||e.currency,is_editor:this.swell.isEditor,is_preview:this.swell.isPreview},h=this.props.pages?.find(g=>g.id===i),u={...h,current:Number(this.swell.queryParams.page)||1,url:this.swell.url.pathname,custom:!h,slug:void 0,description:void 0,$locale:void 0};if(i){let g=await this.getThemeTemplateConfigByType("templates",i),C;try{C=JSON.parse(g?.file_data||"")}catch{}if(C?.page){let{slug:f,label:F,description:p3,$locale:Q3}=C.page;u.slug=f,u.label=F||u.label,u.description=p3,u.$locale=Q3}}let[d,m]=await Promise.all([this.fetchSingletonResourceCached("cart",()=>this.fetchCart(),{}),this.fetchSingletonResourceCached("account",()=>this.fetchAccount(),null)]);if(!d)throw new Error("Failed to fetch cart");let p;return this.shopifyCompatibility&&(p=m),{settings:o,request:l,page:u,cart:d,account:m,customer:p}}async fetchSingletonResourceCached(e,t,i){let r=this.swell.storefront.session.getCookie();return r?this.swell.getCachedResource(`${e}-${r}`,[],()=>t()):i}async fetchCart(){let e=this.resources?.singletons?.cart,t=e?new e(this.swell):new W(this.swell,"cart");if(t._isEmpty=function(){return!this._result?.items?.length},await t.id,this.shopifyCompatibility){let i=k3(this.shopifyCompatibility,t);t.setCompatibilityProps(i)}return t}async fetchAccount(){let e=this.resources?.singletons?.account,t=e?new e(this.swell):new W(this.swell,"account");if(await t.id,!t?.id)return null;if(this.shopifyCompatibility){let i=X(this.shopifyCompatibility,t);t.setCompatibilityProps(i)}return t}getFormConfig(e){let t=e;if(this.shopifyCompatibility){let i=this.shopifyCompatibility.getAdaptedFormType(e);i&&(t=i)}return this.forms?.find(i=>i.id===t)}setFormData(e,t){let i=this.formData[e]||new Y(e);i instanceof Y&&(t?.params&&i.setParams(t.params),t?.errors?(i.setSuccess(!1),i.setErrors(t.errors)):t?.success&&(t.withoutErrors&&!i.errors?i.setSuccess(!0):t.withoutErrors||(i.setSuccess(!0),i.clearErrors())),this.shopifyCompatibility&&Object.assign(i,this.shopifyCompatibility.getFormData(i))),this.formData[e]=i,this.setGlobals({forms:this.formData})}setFormSuccessWithoutErrors(e){this.setFormData(e,{success:!0,withoutErrors:!0})}clearFormData(e){e?delete this.formData[e]:this.formData={},this.setGlobals({forms:this.formData})}serializeFormData(){let e={};for(let t in this.formData){let i=this.formData[t];e[t]={success:i.success,errors:i.errors&&Array.from(i.errors)}}return Object.keys(e).length>0?e:null}setGlobalData(e={}){this.globalData={...this.globalData,...e},this.setGlobals(this.globalData)}serializeGlobalData(){return Object.keys(this.globalData).length>0?this.globalData:null}updateSettings(e,t){return this.shopifyCompatibility?this.shopifyCompatibility.adaptSettings(e,t):T3(e,t)}resolveTranslationLocale(e,t){if(!e)return{};if(t=t||this.swell.getStorefrontLocalization().locale,!t)return e;let i=t.split("-")[0];return(0,T.reduce)(e,(r,o,a)=>{if(U(o))if(a==="$locale")for(let s of Object.keys(o)){let l=o[s];U(l)&&Object.assign(r,this.resolveTranslationLocale(l,t))}else a[0]!=="$"&&(r[a]=this.resolveTranslationLocale(o,t));else if(typeof o=="string")if(o.startsWith("t:")){let s=o.slice(2),l=s.split("."),h=l.pop(),u=l.join("."),d=this.globals.language;r[a]=(0,T.get)(d,`${u}.$locale.${t}.${h}`)||(0,T.get)(d,`${u}.$locale.${i}.${h}`)||(0,T.get)(d,s)||o}else r[a]=(0,T.get)(e,`$locale.${t}.${a}`)||(0,T.get)(e,`$locale.${i}.${a}`)||o;return r},{})}async setCompatibilityConfigs(e){let t=()=>(this.shopifyCompatibility||(this.shopifyCompatibility=new this.shopifyCompatibilityClass(this)),this.shopifyCompatibility);if(!Object.keys(e.editor).length&&e.settings_schema){let i=await this.swell.storefront.settings.get("store");e.editor=t().getEditorConfig(e.settings_schema),e.editor=await t().renderSchemaTranslations(this,e.editor,i.locale||"en-US")}!Object.keys(e.theme).length&&e.settings_data&&(e.theme=t().getThemeConfig(e.settings_data)),!Object.keys(e.presets).length&&e.settings_data&&(e.presets=t().getPresetsConfig(e.settings_data)),e.theme.shopify_compatibility?t():this.shopifyCompatibility&&(e.theme.shopify_compatibility=!0)}setCompatibilityData(e){!e||!this.shopifyCompatibility||this.shopifyCompatibility.adaptPageData(e)}async getLocaleConfig(e="en",t=".json"){let i=await this.getThemeConfigsByPath("theme/locales/",t),r=i.get(`theme/locales/${e}${t}`)??null;if(!r){let o=e.split("-")[0];if(r=i.get(`theme/locales/${o}${t}`)??null,!r){let a=`.default${t}`;for(let s of i.values())if(s?.file_path?.endsWith(a)){r=s;break}}}if(r){r=await this.getThemeConfig(r.file_path);try{return JSON.parse(r?.file_data||"")}catch{}}return{}}resolveLookupSetting(e,t){if(t instanceof _)return t;let i=V2(e);if(i){if(e.multiple){if(t instanceof Array)return t.map(r=>this.resolveLookupResource(i,r))}else if(t!==""&&t!==null&&t!==void 0)return this.resolveLookupResource(i,t)}return null}resolveLookupResource(e,t){let i=this.resources?.records?.[e],r=i?new i(this.swell,t):new A(this.swell,e,t);return this.shopifyCompatibility&&this.shopifyCompatibility.adaptPageData({resource:r}),r}resolveMenuSettings(){return i5(this,this.swell.getStorefrontMenus(),{currentUrl:this.swell.url.pathname})}resolveMenuSetting(e){if(!e)return null;let t=this.globals.menus||{};return t[e]||t[e.replace(/-/g,"_")]||null}async lang(e,t,i){return await this.renderTranslation(e,t,i)}resolveFontSetting(e){if(this.shopifyCompatibility){let t=this.shopifyCompatibility.getFontFromShopifySetting(e),i=D.get(t||e);return Object.assign(i,this.shopifyCompatibility.getFontData(i)),i}return D.get(e)}resolveUrlSetting(e){let t=e;if(this.shopifyCompatibility){e?.startsWith("shopify://")&&(t=e.replace("shopify://","/"));let i=this.shopifyCompatibility.getAdaptedPageUrl(t);if(i)return i}return t}resolveImageSetting(e){let t=e;return this.shopifyCompatibility&&e?.startsWith("shopify://")&&(t=""),t}async getAllThemeConfigs(){if(!this.themeConfigs){let e=await this.themeLoader.loadTheme(),t=new Map;for(let i of e)t.set(i.file_path,i);this.themeConfigs=t}return this.themeConfigs}async preloadThemeConfigs(e,t){await this.themeLoader.preloadTheme(e,t)}getPageConfigPath(e){return this.shopifyCompatibility?`theme/${this.shopifyCompatibility.getThemeFilePath("templates",e)}.json`:`theme/templates/${e}.json`}async getThemeConfig(e){return this.themeConfigs?this.themeConfigs.get(e)??null:this.themeLoader.fetchThemeConfig(e)}async getThemeConfigsByPath(e,t){let i=await this.themeLoader.fetchThemeConfigsByPath(e,t),r=new Map;for(let o of i)r.set(o.file_path,o);return r}async getThemeTemplateConfig(e){if(e.endsWith(".json")||e.endsWith(".liquid"))return this.getThemeConfig(e);let t=await this.getThemeConfig(`${e}.json`);return t||this.getThemeConfig(`${e}.liquid`)}async getThemeTemplateConfigByType(e,t){let i=[`${e}/${t}`];this.shopifyCompatibility&&i.push(this.shopifyCompatibility.getThemeFilePath(e,t));for(let r of i){let o=await this.getThemeTemplateConfig(`theme/${r}`);if(o)return o}return null}async getAssetUrl(e){let i=(await this.getThemeConfig(`theme/assets/${e}`)||await this.getThemeConfig(`assets/${e}`))?.file;if(!i)return null;let r=i.url||null;return r&&(r.endsWith(e)?r:`${r}/${e}`)}async renderTemplate(e,t){let i=e?.file_data||null;if(e===null||i===null)return"";try{return await this.liquidSwell.parseAndRender(r6(i),t)}catch(r){return console.error(r),`<!-- template render error: ${r.message} -->`}}async renderTemplateString(e,t){try{return await this.liquidSwell.parseAndRender(e,t)}catch(i){return console.error(i),""}}async getSectionSchema(e){let t,i=await this.getThemeTemplateConfigByType("sections",e);if(i?.file_path?.endsWith(".json"))try{t=JSON.parse(i.file_data)||void 0}catch{return}else if(i?.file_path?.endsWith(".liquid")&&this.shopifyCompatibility){this.liquidSwell.lastSchema=void 0;let r=this.getSectionConfigWithSchemaTagOnly(i);if(!r)return;await this.renderTemplate(r);let o=this.liquidSwell.lastSchema;o&&(t=this.shopifyCompatibility.getSectionConfigSchema(o),t=await this.shopifyCompatibility.renderSchemaTranslations(this,t,this.globals.store?.locale))}return t&&(t.id=t.id||e,t.label=t.label||e,t.fields=t.fields||[]),t}getSectionConfigWithSchemaTagOnly(e){let t="{% schema %}",i="{% endschema %}",r=e.file_data.indexOf(t),o=e.file_data.indexOf(i),a=e.file_data.slice(r+t.length,o);return r===-1||o===-1?null:{...e,file_data:t+a+i}}async renderThemeTemplate(e,t){let i=await this.getThemeTemplateConfig(e),r=await this.renderTemplate(i,t);if(i?.file_path?.endsWith(".json"))try{return JSON.parse(r)}catch(o){throw console.log("Unable to render theme template",i.file_path,r),new I3(o)}return r}async renderLayoutTemplate(e,t){let i=await this.getThemeTemplateConfigByType("layouts",e);if(i){let r=await this.renderThemeTemplate(i.file_path,t);return typeof r=="string"?r:`<!-- invalid layout: ${e}--> {{ content_for_layout }}`}throw new Error(`Layout template not found: ${e}`)}async renderPageTemplate(e,t,i){let r=null;if(i&&(r=await this.getThemeTemplateConfigByType("templates",`${e}.${i}`)),r||(r=await this.getThemeTemplateConfigByType("templates",e)),r){let o=e.split("/").splice(1).join("/")||null,a={name:e,alt_name:i||null,path:o||null};this.shopifyCompatibility&&(a=$4(this.shopifyCompatibility,a)),this.setGlobals({template:a});let s=await this.renderThemeTemplate(r.file_path,t);return s&&typeof s!="string"&&(s.id=String(r.name)),s}throw new H3("Page template not found",404,`templates/${e}`)}async renderPage(e,t){e&&this.setGlobals(e);let i;if(this.page?.id?i=await this.renderPageTemplate(this.page.id,e,t):i=await this.renderPageTemplate("404",e),typeof i!="string"&&i?.page){if(i.page.published===!1)throw new H3;i.page=this.resolveTranslationLocale(i.page)}return i}async renderAllSections(e,t){let i=typeof e=="string"?e.split(/\s*,\s*/):e;return(await Promise.all(i.map(o=>this.renderSection(o,t)))).reduce((o,a,s)=>{let l=i[s];return this.shopifyCompatibility?o[l]=`
|
|
930
930
|
<div id="shopify-section-${l}" class="shopify-section">${String(a)}</div>
|
|
931
931
|
`.trim():o[l]=`
|
|
932
932
|
<div id="swell-section-${l}" class="swell-section">${String(a)}</div>
|
|
933
933
|
`.trim(),o},{})}async renderSection(e,t){t&&this.setGlobals(t);let[i,r]=e.split(/__/).reverse(),o=(r||"").replaceAll("_","/"),a=await this.getThemeTemplateConfigByType(o?"templates":"sections",o||i);if(a){let s=await this.renderThemeTemplate(a.file_path,t);if(o&&s?.sections){let l=s?.sections,h={id:r,sections:{[i]:l[i]}},[u]=await this.renderPageSections(h,t);return u.output||""}return s}return""}async renderLayout(e){return this.liquidSwell.layoutName?this.renderLayoutTemplate(this.liquidSwell.layoutName,e):e?.content_for_layout||""}getContentForHeader(){let e=`
|
|
934
934
|
`;return e+=this.renderFontHeaderLinks(),this.shopifyCompatibility&&(e+=`
|
|
935
|
-
${this.shopifyCompatibility.getContentForHeader()}`),e}renderFontHeaderLinks(){let e=this.globals.settings,t=this.globals.configs?.editor?.settings||[];if(e&&t){let i=l5("font",e,t),r=[];for(let o=0;o<i.length;o++){let a=i[o].value?.id||i[o].value;if(this.shopifyCompatibility){let s=this.shopifyCompatibility.getFontFromShopifySetting(a);r.includes(s||a)||r.push(s||a)}else r.includes(a)||r.push(a)}if(i.length>0)return`<link href="${D.combinedGoogleFontUrl(r)}" rel="stylesheet">`}return""}async getTemplateSchema(e){let t,i=await this.getThemeConfig(e.file_path);if(i){if(i.file_path.endsWith(".liquid")){if(this.shopifyCompatibility){this.liquidSwell.lastSchema=void 0;let r={...i,file_data:o6(i.file_data)};await this.renderTemplate(r);let o=this.liquidSwell.lastSchema||{};if(o){let a=this.shopifyCompatibility.getSectionConfigSchema(o);t=await this.shopifyCompatibility.renderSchemaTranslations(this,a,this.globals.store?.locale)}}}else if(i.file_data)try{t=JSON.parse(i?.file_data)||void 0}catch{}return t}}resolveStaticSectionSettings(e,t){let i={},r=t||e?.default||{};if(e?.fields)for(let o of e.fields)o.id&&o.default!==void 0&&(i[o.id]=o.default);return Object.assign(i,r.settings,{blocks:r.blocks}),Array.isArray(i.blocks)&&(i.blocks=i.blocks.map(o=>{let a={},s=e?.blocks?.find(l=>l.type===o.type);if(s?.fields)for(let l of s.fields)l.id&&l.default!==void 0&&(a[l.id]=l.default);return{...o,settings:{...a,...o.settings||void 0}}})),i}async getAllSections(){let e=await this.getThemeConfigsByPath("theme/sections/");return h5(e,this.getTemplateSchema.bind(this))}async getPageSections(e,t=!0){let i=await S4(e,r=>this.getSectionSchema(r));if(t)for(let r of i){let{schema:o}=r;o?.fields&&this.globals&&r.settings&&(r.settings=y4(this,r))}return i}async getPageSectionGroups(e){let t=await this.getThemeTemplateConfigByType("templates",e);if(t===null)return[];let r=a5(t).layout||"theme",o=await this.getThemeTemplateConfigByType("layouts",`${r}.liquid`);if(o===null)return[];let a=await this.getThemeConfig("theme/locales/en.default.schema.json"),s=a5(a),h=o.file_data.matchAll(/\bsections '(\w.*?)'|(\bcontent_for_layout\b)/gm),u=[];for(let d of h)if(d[1]){let m=d[1],p=await this.getThemeTemplateConfigByType("sections",`${m}.json`),C=a5(p).name;typeof C=="string"&&C.startsWith("t:")&&(C=(0,T.get)(s,C.slice(2))),u.push({prop:u3(m),label:C||m,source:p?.file_path})}else d[2]&&u.push({prop:q3,label:"Template",source:t.file_path});return u}async getLayoutSectionGroups(e=!0){let t=await this.getThemeConfigsByPath("theme/sections/"),i=await c5(t,this.getTemplateSchema.bind(this));if(e)for(let r of i)for(let o of r.sectionConfigs){let{schema:a}=o;a?.fields&&this.globals&&o.settings&&(o.settings=y4(this,o))}return i}async renderPageSections(e,t){let i=await this.getPageSections(e,!0);return i=i.filter(r=>r.section.disabled!==!0),this.renderSectionConfigs(i,t)}async renderSectionConfigs(e,t){return Promise.all(e.map(async(i,r)=>{let{section:o,schema:a}=i,s=a?.fields&&this.globals?y4(this,i):{...i.settings},l=await this.getThemeTemplateConfigByType("sections",`${o.type}.liquid`),h="";return l&&(h=await this.renderTemplate(l,{...t,...s,index:r}),s?.section?.custom_css&&(h+=`<style>${u5(s?.section.custom_css,i.id)}</style>`)),{...i,output:h}}))}async renderTranslation(e,t,i){let r=this.globals.language,o=this.globals.request?.locale;return this.renderTranslationValue(o,r,e,t,i)}async renderTranslationValue(e,t,i,r,o){if(i===void 0)return o||"";let a=i?.split(".")||[],s=a.pop()||"",l=a.join("."),h=(0,T.get)(t,l),u=(0,T.get)(h?.[e],s)||(0,T.get)(h?.[e.split("-")[0]],s)||h?.[s];return r?.count!==void 0&&u?.one&&(u=r.count===1?u.one:u.other),typeof u!="string"||u===""?o||"":await this.renderTemplateString(u,r)||o||""}renderCurrency(e,t){return this.swell.storefront.currency.format(e,t)}},I3=class extends Error{title;status=500;description;constructor(e="Something went wrong",t=500,i){e=String(e),super(e+(i?`: ${i}`:"")),this.title=e,this.status=t,this.description=i}toString(){return this.message}},H3=class extends I3{constructor(e="Page not found",t=404,i){super(e,t,i)}};function y4(n,e){let{settings:t,schema:i}=e;if(!i||!t?.section?.settings)return t;let r=[{label:i.label,fields:i.fields}],o=t.section.blocks?.filter(a=>a.disabled!==!0);return o=o?.map(a=>({...a,settings:B3(n,a.settings,i.blocks?.filter(s=>s.type===a.type))})),{...t,section:{...t.section,settings:B3(n,t.section.settings,r),blocks:o}}}function i6(n,e){for(let t of e)for(let i of t.fields)i.id&&!Object.hasOwn(n,i.id)&&(n[i.id]=typeof i.default<"u"?i.default:"")}function B3(n,e,t){let i=(0,T.cloneDeep)(e);if(i.$locale){let{locale:r}=n.swell.getStorefrontLocalization(),o=i.$locale[r]||{};for(let[a,s]of Object.entries(o))s&&(i[a]=s)}return(0,T.each)(i,(r,o)=>{let a=(t&&d5(t,o))??null;if(U(r)&&!(r instanceof _)){switch(a?.type){case"color_scheme_group":{(0,T.each)(r,(s,l)=>{if(U(s)&&typeof s.settings=="object"&&s.settings){let h=s.settings;(0,T.each)(h,(u,d)=>{(0,T.find)(a.fields,{id:d})?.type==="color"&&u&&(s.id=l,h[d]=new S(u))})}});return}default:break}i[o]=B3(n,r,t)}else switch(a?.type){case"lookup":case"product_lookup":case"category_lookup":case"customer_lookup":i[o]=n.resolveLookupSetting(a,r);break;case"color":r&&(i[o]=new S(r));break;case"font":i[o]=n.resolveFontSetting(r);break;case"menu":i[o]=n.resolveMenuSetting(r);break;case"url":i[o]=n.resolveUrlSetting(r);break;case"image":i[o]=n.resolveImageSetting(r);break;default:break}}),i}function l5(n,e,t){let i=[];return(0,T.each)(e,(r,o)=>{if(U(r)&&!(r instanceof D)&&!(r instanceof _))i.push(...l5(n,r,t));else{let a=d5(t,o);a?.type===n&&i.push({setting:a,value:r})}}),i}function V2(n){if(n.collection)return n.collection;switch(n.type){case"product_lookup":return"products";case"category_lookup":return"categories";case"customer_lookup":return"accounts";default:break}}function d5(n,e){for(let t of n||[])for(let i of t.fields)if(i.id===e)return i;return null}function a5(n){try{return JSON.parse(n?.file_data||"{}")}catch{return{}}}function n6(n){return n.includes('\\"')?JSON.parse(`"${n}"`):n}function r6(n){return n.replace(/\{\{.*?\}\}/g,n6)}function o6(n){let e=n.match(/\{%-?\s*schema\s*-?%\}(.*)\{%-?\s*endschema\s*-?%\}/s);return e===null?n:e[0]}function $2(n,e){let t={settings:[]};return Array.isArray(n)&&(n[0]?.name==="theme_info"&&n.shift(),n.forEach(i=>{t.settings?.push(s6(i,e))})),t}function U2(n){return typeof n.current=="string"&&n.presets?.[n.current]?n.presets[n.current]:typeof n.current=="object"?n.current||{}:{}}function K2(n){return Object.entries(n.presets||{}).map(([e,t])=>({label:e,settings:t}))}function z2(n,e="en"){return{label:Z(n.name,e),type:n.type,tag:n.tag,class:n.class,limit:n.limit,enabled_on:n.enabled_on,disabled_on:n.disabled_on,fields:(n.settings||[]).map(i=>k4(i,e)),blocks:(n.blocks||[]).map(i=>a6(i,e)),presets:(n.presets||[]).map(i=>O2(i,e)),default:n.default?O2(n.default,e):void 0}}function a6(n,e){return{type:n.type,label:Z(n.name,e),limit:n.limit,fields:(n.settings||[]).map(i=>k4(i,e))}}function O2(n,e){return{label:Z(n.name,e),settings:n.settings,blocks:n.blocks}}function s6(n,e){return{label:Z(n.name,e),fields:(n.settings||[]).map(i=>k4(i,e))}}function k4(n,e){let t={};switch(n.type){case"text":t={type:"text"};break;case"textarea":t={type:"textarea"};break;case"paragraph":t={type:"paragraph",label:n.content?Z(n.content,e):void 0};break;case"select":t={type:"select",options:n.options?.map(i=>({label:Z(i.label,e),value:i.value}))};break;case"checkbox":t={type:"checkbox"};break;case"radio":t={type:"radio",options:n.options?.map(i=>({label:Z(i.label,e),value:i.value}))};break;case"number":t={type:"integer"};break;case"range":t={type:"number",min:n.min,max:n.max,increment:n.step,unit:n.unit};break;case"article":t={type:"lookup",collection:"content/blogs",titleField:"title"};break;case"blog":t={type:"lookup",collection:"content/blogs",titleField:"title"};break;case"collection":t={type:"category_lookup"};break;case"collection_list":t={type:"category_lookup",multiple:!0,limit:n.limit};break;case"color":case"color_background":t={type:"color"};break;case"color_scheme":t={type:"color_scheme"};break;case"color_scheme_group":t={type:"color_scheme_group",fields:(n.definition||[]).map(i=>k4(i,e)),role:n.role};break;case"font_picker":t={type:"font"};break;case"html":t={type:"basic_html"};break;case"image_picker":t={type:"image"};break;case"inline_richtext":t={type:"rich_text"};break;case"link_list":t={type:"menu"};break;case"liquid":t={type:"liquid"};break;case"page":t={type:"lookup",collection:"content/pages",titleField:"title"};break;case"product":t={type:"product_lookup"};break;case"product_list":t={type:"product_lookup",multiple:!0,limit:n.limit};break;case"richtext":t={type:"rich_html"};break;case"text_alignment":t={type:"select",options:[{value:"left",label:"Left"},{value:"center",label:"Center"},{value:"right",label:"Right"}]};break;case"url":t={type:"url"};break;case"video":t={type:"video"};break;case"video_url":t={type:"url"};break;case"header":t={type:"header",label:n.content?Z(n.content,e):void 0};break;default:break}return{...n,id:n.id,label:Z(n.label,e),default:typeof n.default<"u"?Z(n.default,e):void 0,description:n.info?Z(n.info,e):void 0,...t}}function Z(n,e){if(U(n)){let t=n[e];if(t)return t;let i=e.slice(0,2);return n[i]}return n}function W2(n){let e=n.lastIndexOf("_"),t=n.substring(0,e),i=n.substring(e+1),r=l6[t];if(r){let o=r.variants[i];return`${r.family}:${o}`}return null}var l6={abel:{family:"Abel",variants:{n4:"wght@400"}},abril_fatface:{family:"Abril Fatface",variants:{n4:"wght@400"}},alegreya:{family:"Alegreya",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},alegreya_sans:{family:"Alegreya Sans",variants:{n1:"wght@100",i1:"ital,wght@1,100",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},amiri:{family:"Amiri",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},anonymous_pro:{family:"Anonymous Pro",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},arapey:{family:"Arapey",variants:{n4:"wght@400",i4:"ital,wght@1,400"}},archivo:{family:"Archivo",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},archivo_narrow:{family:"Archivo Narrow",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},arimo:{family:"Arimo",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},armata:{family:"Armata",variants:{n4:"wght@400"}},arvo:{family:"Arvo",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},asap:{family:"Asap",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},assistant:{family:"Assistant",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",n6:"wght@600",n7:"wght@700",n8:"wght@800"}},asul:{family:"Asul",variants:{n4:"wght@400",n7:"wght@700"}},bio_rhyme:{family:"Bio Rhyme",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",n7:"wght@700",n8:"wght@800"}},bitter:{family:"Bitter",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700"}},cabin:{family:"Cabin",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},cardo:{family:"Cardo",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700"}},catamaran:{family:"Catamaran",variants:{n1:"wght@100",n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},chivo:{family:"Chivo",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900",i9:"ital,wght@1,900"}},cormorant:{family:"Cormorant",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},crimson_text:{family:"Crimson Text",variants:{n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},dm_sans:{family:"DM Sans",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700"}},domine:{family:"Domine",variants:{n4:"wght@400",n7:"wght@700"}},dosis:{family:"Dosis",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800"}},eczar:{family:"Eczar",variants:{n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800"}},fira_sans:{family:"Fira Sans",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},fjalla_one:{family:"Fjalla One",variants:{n4:"wght@400"}},glegoo:{family:"Glegoo",variants:{n4:"wght@400",n7:"wght@700"}},ibm_plex_sans:{family:"IBM Plex Sans",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},inconsolata:{family:"Inconsolata",variants:{n4:"wght@400",n7:"wght@700"}},inknut_antiqua:{family:"Inknut Antiqua",variants:{n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},inter:{family:"Inter",variants:{n1:"wght@100",n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},josefin_sans:{family:"Josefin Sans",variants:{n1:"wght@100",i1:"ital,wght@1,100",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},josefin_slab:{family:"Josefin Slab",variants:{n1:"wght@100",i1:"ital,wght@1,100",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},kalam:{family:"Kalam",variants:{n3:"wght@300",n4:"wght@400",n7:"wght@700"}},karla:{family:"Karla",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},kreon:{family:"Kreon",variants:{n3:"wght@300",n4:"wght@400",n7:"wght@700"}},lato:{family:"Lato",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},libre_baskerville:{family:"Libre Baskerville",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700"}},libre_franklin:{family:"Libre Franklin",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},lobster:{family:"Lobster",variants:{n4:"wght@400"}},lobster_two:{family:"Lobster Two",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},lora:{family:"Lora",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},maven_pro:{family:"Maven Pro",variants:{n4:"wght@400",n5:"wght@500",n7:"wght@700",n9:"wght@900"}},megrim:{family:"Megrim",variants:{n4:"wght@400"}},merriweather_sans:{family:"Merriweather Sans",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800"}},montserrat:{family:"Montserrat",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},mouse_memoirs:{family:"Mouse Memoirs",variants:{n4:"wght@400"}},muli:{family:"Muli",variants:{n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},neuton:{family:"Neuton",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",n8:"wght@800"}},news_cycle:{family:"News Cycle",variants:{n4:"wght@400",n7:"wght@700"}},newsreader:{family:"Newsreader",variants:{n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800"}},nobile:{family:"Nobile",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700"}},noticia_text:{family:"Noticia Text",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},noto_serif:{family:"Noto Serif",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},nunito:{family:"Nunito",variants:{n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},nunito_sans:{family:"Nunito Sans",variants:{n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},old_standard_tt:{family:"Old Standard TT",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700"}},open_sans:{family:"Open Sans",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800"}},open_sans_condensed:{family:"Open Sans Condensed",variants:{n3:"wght@300",i3:"ital,wght@1,300",n7:"wght@700"}},oswald:{family:"Oswald",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700"}},ovo:{family:"Ovo",variants:{n4:"wght@400"}},oxygen:{family:"Oxygen",variants:{n3:"wght@300",n4:"wght@400",n7:"wght@700"}},pt_mono:{family:"PT Mono",variants:{n4:"wght@400"}},pt_sans:{family:"PT Sans",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},pt_sans_narrow:{family:"PT Sans Narrow",variants:{n4:"wght@400",n7:"wght@700"}},pt_serif:{family:"PT Serif",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},pacifico:{family:"Pacifico",variants:{n4:"wght@400"}},playball:{family:"Playball",variants:{n4:"wght@400"}},playfair_display:{family:"Playfair Display",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900",i9:"ital,wght@1,900"}},poppins:{family:"Poppins",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},prata:{family:"Prata",variants:{n4:"wght@400"}},prompt:{family:"Prompt",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},proza_libre:{family:"Proza Libre",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800"}},quantico:{family:"Quantico",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},quattrocento:{family:"Quattrocento",variants:{n4:"wght@400",n7:"wght@700"}},quattrocento_sans:{family:"Quattrocento Sans",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},questrial:{family:"Questrial",variants:{n4:"wght@400"}},quicksand:{family:"Quicksand",variants:{n3:"wght@300",n4:"wght@400",n5:"wght@500",n7:"wght@700"}},rajdhani:{family:"Rajdhani",variants:{n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700"}},raleway:{family:"Raleway",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},righteous:{family:"Righteous",variants:{n4:"wght@400"}},roboto:{family:"Roboto",variants:{n1:"wght@100",i1:"ital,wght@1,100",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900",i9:"ital,wght@1,900"}},roboto_condensed:{family:"Roboto Condensed",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},roboto_mono:{family:"Roboto Mono",variants:{n1:"wght@100",i1:"ital,wght@1,100",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700"}},roboto_slab:{family:"Roboto Slab",variants:{n1:"wght@100",n3:"wght@300",n4:"wght@400",n7:"wght@700"}},rubik:{family:"Rubik",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900",i9:"ital,wght@1,900"}},shadows_into_light:{family:"Shadows Into Light",variants:{n4:"wght@400"}},slabo_13px:{family:"Slabo 13px",variants:{n4:"wght@400"}},smooch:{family:"Smooch",variants:{n4:"wght@400"}},source_code_pro:{family:"Source Code Pro",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n9:"wght@900"}},source_sans_pro:{family:"Source Sans Pro",variants:{n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900",i9:"ital,wght@1,900"}},space_mono:{family:"Space Mono",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},syne:{family:"Syne",variants:{n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800"}},tenor_sans:{family:"Tenor Sans",variants:{n4:"wght@400"}},tinos:{family:"Tinos",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},titillium_web:{family:"Titillium Web",variants:{n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900"}},ubuntu:{family:"Ubuntu",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700"}},unica_one:{family:"Unica One",variants:{n4:"wght@400"}},unna:{family:"Unna",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},varela:{family:"Varela",variants:{n4:"wght@400"}},varela_round:{family:"Varela Round",variants:{n4:"wght@400"}},vidaloka:{family:"Vidaloka",variants:{n4:"wght@400"}},volkhov:{family:"Volkhov",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},vollkorn:{family:"Vollkorn",variants:{n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900",i9:"ital,wght@1,900"}},work_sans:{family:"Work Sans",variants:{n1:"wght@100",n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},biz_udpmincho:{family:"BIZ UDPMincho",variants:{n4:"wght@400",n7:"wght@700"}},dela_gothic_one:{family:"Dela Gothic One",variants:{n4:"wght@400"}},hina_mincho:{family:"Hina Mincho",variants:{n4:"wght@400"}},kaisei_decol:{family:"Kaisei Decol",variants:{n4:"wght@400",n5:"wght@500",n7:"wght@700"}},kaisei_opti:{family:"Kaisei Opti",variants:{n4:"wght@400",n5:"wght@500",n7:"wght@700"}},kaisei_tokumin:{family:"Kaisei Tokumin",variants:{n4:"wght@400",n5:"wght@500",n7:"wght@700",n8:"wght@800"}},m_plus_1:{family:"M PLUS 1",variants:{n1:"wght@100",n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},m_plus_rounded_1c:{family:"M PLUS Rounded 1c",variants:{n1:"wght@100",n3:"wght@300",n4:"wght@400",n5:"wght@500",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},mochiy_pop_p_one:{family:"Mochiy Pop P One",variants:{n4:"wght@400"}},murecho:{family:"Murecho",variants:{n1:"wght@100",n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},noto_sans_japanese:{family:"Noto Sans Japanese",variants:{n1:"wght@100",n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},noto_serif_japanese:{family:"Noto Serif Japanese",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n9:"wght@900"}},shippori_mincho:{family:"Shippori Mincho",variants:{n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800"}},zen_kaku_gothic_new:{family:"Zen Kaku Gothic New",variants:{n3:"wght@300",n4:"wght@400",n5:"wght@500",n7:"wght@700",n9:"wght@900"}},zen_kurenaido:{family:"Zen Kurenaido",variants:{n4:"wght@400"}},zen_maru_gothic:{family:"Zen Maru Gothic",variants:{n3:"wght@300",n4:"wght@400",n5:"wght@500",n7:"wght@700",n9:"wght@900"}},zen_old_mincho:{family:"Zen Old Mincho",variants:{n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n9:"wght@900"}}};var x4={};v5(x4,{DeferredShopifyResource:()=>i3,ShopifyArticle:()=>_3,ShopifyBlog:()=>L4,ShopifyCart:()=>k3,ShopifyCollection:()=>B,ShopifyCollections:()=>A4,ShopifyCustomer:()=>Q,ShopifyFont:()=>M3,ShopifyForm:()=>V3,ShopifyLink:()=>E3,ShopifyLocalization:()=>P3,ShopifyOrder:()=>l3,ShopifyPage:()=>E4,ShopifyPaginate:()=>L3,ShopifyPredictiveSearch:()=>_4,ShopifyProduct:()=>P,ShopifyRecommendations:()=>M4,ShopifyResource:()=>y,ShopifySearch:()=>P4,ShopifyVariant:()=>$,adaptShopifyFontData:()=>R4,adaptShopifyFormData:()=>D4,adaptShopifyMenuData:()=>v4});function _3(n,e,t){return e instanceof y?e.clone():(t&&(e.category=t),new y({author:c(e,i=>i.author?.name||i.author?.email),content:c(e,i=>i.content),created_at:w(()=>e.date_created),excerpt:w(()=>e.summary),excerpt_or_content:w(()=>e.summary||e.content),handle:w(()=>e.slug),id:c(e,i=>i.id),image:c(e,i=>i.image&&H(n,i.image)),metafields:null,published_at:c(e,i=>i.date_published||i.date_created),tags:c(e,i=>i.tags),template_suffix:null,title:c(e,i=>i.title),updated_at:c(e,i=>i.date_updated||i.date_created),url:c([e,e.category],(i,r)=>r&&`/blogs/${r?.slug}/${i.slug}`),user:w(()=>e.author),comment_post_url:null,comments:null,comments_count:null,"comments_enabled?":!1,moderated:!1}))}function L4(n,e){if(e instanceof y)return e.clone();let t=c(e.blogs,i=>i?.results?.reduce((r,o)=>{for(let a of o.tags||[])r.includes(a)||r.push(a);return r},[]));return new y({all_tags:t,articles:c(e,i=>i.blogs?._cloneWithCompatibilityResult(r=>({results:r?.results?.map(o=>_3(n,o,i))}))||[]),articles_count:c(e.blogs,i=>i?.count||0),handle:w(()=>e.slug),id:c(e,i=>i.id),metafields:null,next_article:null,previous_article:null,tags:t,template_suffix:null,title:c(e,i=>i.title),url:c(e,i=>`/blogs/${i.slug}`),featured_image:c(e,i=>i.image),content:c(e,i=>i.content),"comments_enabled?":!1,moderated:!1})}var J2=require("lodash-es");function G3(n,e){let t=e.type==="range",i=e.type==="boolean";return new y({active_values:t?void 0:e.active_options?.map(r=>m3(n,r,e)),false_value:i?m3(n,{value:""},e):void 0,inactive_values:t?void 0:e.inactive_options?.map(r=>m3(n,r,e)),label:e.label,max_value:t?m3(n,{value:e.range_max},e,"lte"):void 0,min_value:t?m3(n,{value:e.range_min},e,"gte"):void 0,operator:t?"AND":"OR",param_name:e.param_name,presentation:"text",range_max:e.range_max,true_value:i?m3(n,{value:e.options?.[0].value},e):void 0,type:e.id==="price"?"price_range":i?"boolean":"list",url_to_remove:h6(n,`filter_${e.id}`,!0),values:e.id!=="price"&&e.options?.map(r=>m3(n,r,e))})}function m3(n,e,t,i){let r=i?`${t.param_name}[${i}]`:t.param_name;return new y({active:e.active,count:e.count,image:null,label:e.label,param_name:r,swatch:null,url_to_add:u6(n,r,e.value),url_to_remove:c6(n,t.param_name,e.value),value:d6(n,e,t,i)})}function d6(n,e,t,i){let{queryParams:r}=n.swell,o=i?r[t.param_name]?.[i]:r[t.param_name];return t.type==="range"?o!==void 0&&o!==""?o:null:e.value}function b4(n){return Object.keys(n).reduce((e,t)=>{let i=n[t];return i!==""&&(e[t]=(0,J2.isObject)(i)&&!Array.isArray(i)?b4(i):i),e},{})}function h6(n,e,t=!1){let{queryParams:i}=n.swell,r=O({...b4(i),...t?{[`${e}[gte]`]:void 0,[`${e}[lte]`]:void 0}:void 0,[e]:void 0,page:void 0});return m5(n,r)}function c6(n,e,t){let{queryParams:i}=n.swell,r=O({...b4(i),[e]:Array.isArray(i[e])?i[e].filter(o=>o!==t):void 0,page:void 0});return m5(n,r)}function u6(n,e,t){let{queryParams:i}=n.swell,r=O({...b4(i),[e]:Array.isArray(i[e])?i[e].concat(t):typeof i[e]=="string"?[i[e],t]:t,page:void 0});return m5(n,r)}function m5(n,e){let{url:t}=n.swell;return`${t.pathname}${e?`?${e}`:""}`}function B(n,e){if(e instanceof y)return e.clone();let t=c(e,r=>r.products?._cloneWithCompatibilityResult(o=>({results:o?.results?.map(a=>P(n,a))}))??null);async function i(){let r=await t.resolve();return r&&"_resolve"in r?r._resolve():r}return new y({all_products_count:w(async()=>(await i())?.count||0),all_tags:w(async()=>(await i())?.results?.reduce((r,o)=>(Array.isArray(o.tags)&&r.push(...o.tags),r),[])||[]),all_types:w(async()=>{let r=await i();if(!r?.results)return[];let o=r.results.reduce((a,s)=>(s.type&&a.add(s.type),a),new Set);return Array.from(o.values())}),all_vendors:[],current_type:null,current_vendor:null,default_sort_by:c(e,r=>r.sort_options?.[0].value),description:c(e,r=>r.description),featured_image:c(e,r=>r.images?.[0]&&H(n,r.images[0])),filters:w(async()=>(await i())?.filter_options?.map(r=>G3(n,r))||[]),handle:w(()=>e.slug),id:c(e,r=>r.id),image:null,metafields:null,next_product:null,previous_product:null,products:w(async()=>(await i())?.results),products_count:w(async()=>(await i())?.results?.length||0),published_at:null,sort_by:w(()=>e.sort),sort_options:c(e,r=>r.sort_options),tags:[],template_suffix:null,title:w(()=>e.name),url:c(e,r=>`/collections/${r.slug}`)})}function A4(n,e){return new L(n.swell,e._collection,e._query,async()=>{let t=(await e.results)?.map(i=>B(n,i));return{page:e.page??1,count:e.count??0,results:t,page_count:e.page_count??0,limit:e.limit,pages:e.pages??{}}})}function M3(n,e){return e instanceof y?e.clone():new y({baseline_ratio:null,fallback_families:e.fallback_families,family:e.family,style:e.style,"system?":e.system,variants:e.variants.map(t=>M3(n,t)),weight:e.weight})}var m6={account_login:{params:()=>({password_needed:!0})}};function V3(n,e){if(e instanceof y)return e.clone();let t=m6[e.id];return new y({...t?.params?.(e)||void 0,errors:e.errors&&new C5(e.errors),"posted_successfully?":e.success})}var p5=class{code;message;field_name;field_label;type;constructor(e){this.code=e.code,this.message=e.message,this.field_name=e.field_name,this.field_label=e.field_label,this.type=this.getShopifyErrorType(e)}getShopifyErrorType(e){return e.field_name==="email"?"email":e.field_name==="password"?"password":"form"}valueOf(){return this.type}toString(){return this.type}},C5=class n{errors;pointer=0;messages;translated_fields;constructor(e){return this.errors=Array.from(e).map(t=>new p5(t)),this.messages=new T4(this.errors,this.errors.map(t=>t.message)),this.translated_fields=new T4(this.errors,this.errors.map(t=>t.field_label)),new Proxy(this.errors,{get:(t,i)=>{let r=t;return i==="toJSON"?this.errors:i==="some"?this.some.bind(this):i==="messages"?this.messages:i==="translated_fields"?this.translated_fields:r[i]},getPrototypeOf(){return n.prototype}})}*[Symbol.iterator](){yield*this.errors}some(e,t){return this.errors.some(i=>e(i?.type),t)}},T4=class{values;constructor(e,t){return this.values=t,new Proxy(t,{get:(i,r)=>{let o=i;if(r==="toJSON")return t;let a=e?.findIndex?.(s=>s?.type===r);return a!==-1?t[a]:o[r]}})}};var Y2=require("lodash-es");function E3(n,e,t){let i=e.handle||e.id;return new y({active:t.active,child_active:t.child_active,child_current:t.child_current,current:t.current,handle:`${i}-${(0,Y2.snakeCase)(t.name)}`,levels:t.levels,links:t.items?.map(r=>E3(n,t,r)),object:t.resource,title:t.name,type:p6(t.type),url:t.url})}function p6(n){switch(n){case"home":return"frontpage_link";case"category":return"collection_link";case"product":return"product_link";case"search":return"search_link";default:return""}}function P3(n,e,t){let{currency:i,locale:r}=n.swell.getStorefrontLocalization(),o=e.currencies.find(s=>s.code===(i||t.currency))||e.currencies[0],a=e.locales.find(s=>s.code===(r||t.locale))||e.locales[0];return new y({available_countries:C6(e),available_languages:X2(e),country:o&&tt(o,e),language:a&&et(a,e),market:null})}function C6(n){return n.currencies.map(e=>tt(e,n))||[]}function X2(n){return n.locales.map(e=>et(e,n))||[]}function et(n,e){return{endonym_name:n.name,iso_code:n.code,name:n.name,primary:n.code===e.locale,root_url:e.url}}function tt(n,e){return{available_languages:X2(e),continent:null,currency:{iso_code:n.code,name:n.name,symbol:n.symbol},iso_code:n.code,market:null,name:g6(n.code),"popular?":!1,unit_system:"metric"}}function g6(n){return n in Q2?Q2[n]:null}var Q2=Object.freeze({USD:"United States",EUR:"Europe",GBP:"United Kingdom",JPY:"Japan",CAD:"Canada",AUD:"Australia",CHF:"Switzerland",CNY:"China",SEK:"Sweden",NZD:"New Zealand",NOK:"Norway",MXN:"Mexico",SGD:"Singapore",HKD:"Hong Kong",KRW:"South Korea",INR:"India",BRL:"Brazil",RUB:"Russia",ZAR:"South Africa",TRY:"Turkey",AED:"United Arab Emirates",THB:"Thailand",IDR:"Indonesia",SAR:"Saudi Arabia",PLN:"Poland",PHP:"Philippines",ILS:"Israel",MYR:"Malaysia",CZK:"Czech Republic",HUF:"Hungary",CLP:"Chile",DKK:"Denmark",RON:"Romania",ARS:"Argentina",COP:"Colombia",TWD:"Taiwan",BGN:"Bulgaria",EGP:"Egypt",PKR:"Pakistan",NGN:"Nigeria",VND:"Vietnam",IQD:"Iraq",MAD:"Morocco",KES:"Kenya",DZD:"Algeria",UAH:"Ukraine",XAF:"Cameroon",XOF:"C\xF4te d'Ivoire",GHS:"Ghana",BYN:"Belarus",LKR:"Sri Lanka",SDG:"Sudan",AFN:"Afghanistan",ALL:"Albania",AMD:"Armenia",AOA:"Angola",AWG:"Aruba",AZN:"Azerbaijan",BAM:"Bosnia and Herzegovina",BBD:"Barbados",BDT:"Bangladesh",BHD:"Bahrain",BIF:"Burundi",BMD:"Bermuda",BND:"Brunei",BOB:"Bolivia",BSD:"Bahamas",BTN:"Bhutan",BWP:"Botswana",BZD:"Belize",CDF:"Democratic Republic of the Congo",CLF:"Chile (Unidad de Fomento)",CRC:"Costa Rica",CVE:"Cape Verde",DJF:"Djibouti",DOP:"Dominican Republic",ERN:"Eritrea",ETB:"Ethiopia",FKP:"Falkland Islands",GEL:"Georgia",GIP:"Gibraltar",GMD:"Gambia",GNF:"Guinea",GTQ:"Guatemala",GYD:"Guyana",HNL:"Honduras",HRK:"Croatia",HTG:"Haiti",IRR:"Iran",ISK:"Iceland",JMD:"Jamaica",JOD:"Jordan",KGS:"Kyrgyzstan",KHR:"Cambodia",KMF:"Comoros",KPW:"North Korea",KWD:"Kuwait",KYD:"Cayman Islands",KZT:"Kazakhstan",LAK:"Laos",LBP:"Lebanon",LRD:"Liberia",LSL:"Lesotho",LYD:"Libya",MDL:"Moldova",MGA:"Madagascar",MKD:"North Macedonia",MMK:"Myanmar",MNT:"Mongolia",MOP:"Macau",MRO:"Mauritania",MUR:"Mauritius",MVR:"Maldives",MWK:"Malawi",NAD:"Namibia",NPR:"Nepal",OMR:"Oman",PAB:"Panama",PEN:"Peru",PGK:"Papua New Guinea",PYG:"Paraguay",QAR:"Qatar",RSD:"Serbia",RWF:"Rwanda",SBD:"Solomon Islands",SCR:"Seychelles",SHP:"Saint Helena",SLL:"Sierra Leone",SOS:"Somalia",SRD:"Suriname",STD:"S\xE3o Tom\xE9 and Pr\xEDncipe",SZL:"Eswatini",TJS:"Tajikistan",TMT:"Turkmenistan",TND:"Tunisia",TOP:"Tonga",TTD:"Trinidad and Tobago",TZS:"Tanzania",UGX:"Uganda",UYU:"Uruguay",UZS:"Uzbekistan",VEF:"Venezuela",VUV:"Vanuatu",WST:"Samoa",XCD:"Eastern Caribbean",YER:"Yemen",ZMW:"Zambia",ZWL:"Zimbabwe"});function _4(n,e){return e instanceof y?e.clone():new y({performed:c(e,t=>t.performed),resources:f6(n,e),terms:w(()=>e.query),types:["product"]})}function f6(n,e){return e instanceof y?e.clone():new y({products:c(e.products,t=>t?.results?.map(i=>{let r=P(n,i);return r.object_type="product",r}))})}function M4(n,e){return e instanceof y?e.clone():new y({products:c(e,t=>(t?.recommendations||[]).map(i=>P(n,i))),products_count:c(e,t=>t?.recommendations?.length||0),performed:!0})}function E4(n,e){return e instanceof y?e.clone():new y({content:c(e,t=>t.content),handle:w(()=>e.slug),metafields:null,published_at:w(async()=>await e.date_published||e.date_created),template_suffix:null,title:c(e,t=>t.title||t.name),url:c(e,t=>`/pages/${t.slug}`),author:null})}function P4(n,e){if(e instanceof y)return e.clone();let t=c(e,i=>i.products?._cloneWithCompatibilityResult(r=>({results:r?.results?.map(o=>{let a=P(n,o);return a.object_type="product",a})}))||[]);return new y({default_sort_by:c(e,i=>i.sort_options?.[0].value),filters:w(async()=>(await(await t.resolve())?.filter_options)?.map(r=>G3(n,r))||[]),performed:c(e,i=>i.performed),results:t,results_count:w(async()=>(await t.resolve())?.count||0),sort_by:w(()=>e.sort),sort_options:c(e,i=>i.sort_options),terms:w(()=>e.query),types:["product"]})}function v4(n,e){let t={...e,handle:e.id.replace(/_/g,"-"),title:e.name};return{...t,links:e.items?.map(i=>E3(n,t,i))}}function R4(n,e){return M3(n,e)}function D4(n,e){return V3(n,e)}function g5(n,e){let t=e.currencies.find(i=>i.code===e.currency);return new y({accepts_gift_cards:!0,address:{},brand:{},collections_count:0,currency:e.currency,customer_accounts_enabled:!0,customer_accounts_optional:!0,description:e.description,domain:e.url.replace(/^http[s]?:\/\//,""),email:e.support_email,enabled_currencies:e.currencies.map(i=>({iso_code:i.code,name:i.name,symbol:i.symbol})),enabled_payment_providers:[],id:e.id,metafields:null,metaobjects:null,money_format:t,money_with_currency_format:{...t,symbol:`${e.currency} ${t?.symbol||""}`},name:e.name,password_message:null,permanent_domain:`${e.id}.swell.store`,phone:e.support_phone,published_locales:e.locales.map(i=>({endonym_name:i.name,iso_code:i.code,name:i.name,primary:i.code===e.locale,root_url:e.url})),secure_url:e.url,types:[],url:e.url,vendors:[],policies:[],privacy_policy:null,refund_policy:null,shipping_policy:null,subscription_policy:null,terms_of_service:null,products_count:0})}var it=require("liquidjs"),O3=class extends it.Drop{#e;constructor(e){switch(super(),typeof e){case"object":{if(e===null){this.#e=new Map;break}this.#e=new Map(e instanceof Map?e:Object.entries(e));break}default:this.#e=new Map;break}}liquidMethodMissing(e){switch(typeof e){case"string":return this.#e.get(e);case"object":{if(e!==null&&"handle"in e){let{handle:t}=e;if(typeof t=="string")return this.#e.get(t)}break}default:break}}};var nt=require("liquidjs");var f5=class extends A{constructor(e){super(e,"categories","all",{},()=>({id:"all",slug:"all",name:"Products",products:new L(e,"products")}))}},$3=class extends nt.Drop{#e;#i;#t;#n;constructor(e){super(),this.#e=e,this.#t=Number.NaN,this.#n=new Map}liquidMethodMissing(e){switch(typeof e){case"string":{if(e==="all"){let t=this.#n.get(e);return t===void 0&&(t=B(this.#e,new f5(this.#e.swell))),t}return this.getCollection(e)}case"object":{if(e!==null){let t=e,i=t.handle||t.id||t._id;return this.getCollection(i)}break}default:break}}getCollection(e){let t=this.#n.get(e);return t===void 0&&(t=B(this.#e,new A(this.#e.swell,"categories",e))),t}get size(){return Number.isFinite(this.#t)?this.#t:this.#e.swell.storefront.get("/categories/:count").then(e=>{let t=Number(e??0);return this.#t=t,t})}[Symbol.iterator](){return this.iterator()}async iterator(){return this.#i||(this.#i=await this.#e.swell.storefront.categories.list().then(e=>e.results.map(t=>B(this.#e,t)))),this.#i.values()}};var A3=class{theme;swell;pageId;pageResourceMap;objectResourceMap;formResourceMap;queryParamsMap;shopifyCompatibilityConfig;editorLocaleConfig;constructor(e){this.theme=e,this.swell=e.swell,this.shopifyCompatibilityConfig=this.swell.shopifyCompatibilityConfig??void 0,this.pageResourceMap=this.getPageResourceMap(),this.objectResourceMap=this.getObjectResourceMap(),this.formResourceMap=this.getFormResourceMap(),this.queryParamsMap=this.getQueryParamsMap()}initGlobals(e){let{request:t,page:i}=e;this.pageId=this.getPageType(e.page?.id),e.page={...i||void 0},e.request={...t||void 0,design_mode:this.swell.isEditor,visual_section_preview:!1,page_type:i?.id},e.collections=new $3(this),e.current_page=this.swell.queryParams.page||1,e.routes=this.getPageRoutes()}adaptGlobals(e,t){if(e.page&&(this.pageId=this.getPageType(e.page.id)),e.request){let i=e.page||t.page;e.request={...e.request||void 0,design_mode:this.swell.isEditor,visual_section_preview:!1,page_type:i.id}}if(e.menus&&(e.linklists=new O3(e.menus)),e.geo){let i=this.getAllCountryOptionTags(e.geo);e.all_country_option_tags=i,e.country_option_tags=i}if(e.store){e.shop=this.getShopData(e.store);let i=e.request||t.request;e.localization=this.getLocalizationObject(e.store,i)}}adaptSettings(e,t){let{current:i,presets:r}=t;if(typeof i=="object"&&i)return{current:T3(e,i),presets:r};let o=r?.[i];if(!o)throw new Error(`Failed to build settings config: "${i}" preset is not defined`);return{current:i,presets:{...r,[i]:T3(e,o)}}}adaptPageData(e){let t=this.pageResourceMap.get(this.pageId||"");if(t)for(let[i,r]of Object.entries(e)){let o=`${i}.`,a=t.resources.find(({from:s})=>s===i||s.startsWith(o));a&&r instanceof _&&(e[a.to]=a.object(this,r))}this.adaptObjectData(e)}adaptObjectData(e){for(let t of Object.values(e)){let i=this.objectResourceMap.get(t?.constructor.name);if(i){let r=i.object(this,t);t instanceof _?t.setCompatibilityProps(r):Object.assign(t,r)}}}adaptQueryParams(){let e={};for(let[t,i]of Object.entries(this.swell.queryParams)){let r=this.queryParamsMap.find(({from:o})=>typeof o=="function"?o(t):o===t);if(r){let o=typeof r.to=="function"?r.to(t,i):{[r.to]:i};Object.assign(e,o)}else e[t]=i}this.swell.queryParams=e}getAdaptedFormType(e){return this.formResourceMap.find(i=>i.shopifyType===e)?.type}async getAdaptedFormClientParams(e,t,i){let r=this.formResourceMap.find(o=>o.type===e);if(r?.clientParams)return r.clientParams(t,i)}async getAdaptedFormClientHtml(e,t,i){let r=this.formResourceMap.find(a=>a.type===e),o=this.shopifyCompatibilityConfig?.forms?.find(a=>a.id===e);if(r&&o)return o.client_params?.reduce((a,s)=>`<input type="hidden" name="${s.name}" value="${s.value}" />`+a,"")}async getAdaptedFormServerParams(e,t){let i=this.formResourceMap.find(r=>r.type===e||r.shopifyType===e);if(typeof i?.serverParams=="function")return i.serverParams(t)}async getAdaptedFormServerResponse(e,t){let i=this.formResourceMap.find(r=>r.type===e||r.shopifyType===e);if(typeof i?.serverResponse=="function")return i.serverResponse(t)}getShopData(e){return e?g5(this,e):{}}getContentForHeader(){let{shop:e,store:t,request:i}=this.theme.globals,r={id:1,name:t.name,schema_name:e.name,schema_version:"1.0.0",theme_store_id:null,role:i.design_mode?"development":i.is_preview?"unpublished":"main"},o=[];return i.design_mode&&o.push("Shopify.designMode = true;"),i.is_preview&&o.push("Shopify.inspectMode = true;"),i.visual_section_preview&&o.push("Shopify.visualPreviewMode = true;"),`<script>var Shopify = Shopify || {};
|
|
935
|
+
${this.shopifyCompatibility.getContentForHeader()}`),e}renderFontHeaderLinks(){let e=this.globals.settings,t=this.globals.configs?.editor?.settings||[];if(e&&t){let i=l5("font",e,t),r=[];for(let o=0;o<i.length;o++){let a=i[o].value?.id||i[o].value;if(this.shopifyCompatibility){let s=this.shopifyCompatibility.getFontFromShopifySetting(a);r.includes(s||a)||r.push(s||a)}else r.includes(a)||r.push(a)}if(i.length>0)return`<link href="${D.combinedGoogleFontUrl(r)}" rel="stylesheet">`}return""}async getTemplateSchema(e){let t,i=await this.getThemeConfig(e.file_path);if(i){if(i.file_path.endsWith(".liquid")){if(this.shopifyCompatibility){this.liquidSwell.lastSchema=void 0;let r={...i,file_data:o6(i.file_data)};await this.renderTemplate(r);let o=this.liquidSwell.lastSchema||{};if(o){let a=this.shopifyCompatibility.getSectionConfigSchema(o);t=await this.shopifyCompatibility.renderSchemaTranslations(this,a,this.globals.store?.locale)}}}else if(i.file_data)try{t=JSON.parse(i?.file_data)||void 0}catch{}return t}}resolveStaticSectionSettings(e,t){let i={},r=t||e?.default||{};if(e?.fields)for(let o of e.fields)o.id&&o.default!==void 0&&(i[o.id]=o.default);return Object.assign(i,r.settings,{blocks:r.blocks}),Array.isArray(i.blocks)&&(i.blocks=i.blocks.map(o=>{let a={},s=e?.blocks?.find(l=>l.type===o.type);if(s?.fields)for(let l of s.fields)l.id&&l.default!==void 0&&(a[l.id]=l.default);return{...o,settings:{...a,...o.settings||void 0}}})),i}async getAllSections(){let e=await this.getThemeConfigsByPath("theme/sections/");return h5(e,this.getTemplateSchema.bind(this))}async getPageSections(e,t=!0){let i=await S4(e,r=>this.getSectionSchema(r));if(t)for(let r of i){let{schema:o}=r;o?.fields&&this.globals&&r.settings&&(r.settings=y4(this,r))}return i}async getPageSectionGroups(e){let t=await this.getThemeTemplateConfigByType("templates",e);if(t===null)return[];let r=a5(t).layout||"theme",o=await this.getThemeTemplateConfigByType("layouts",`${r}.liquid`);if(o===null)return[];let a=await this.getThemeConfig("theme/locales/en.default.schema.json"),s=a5(a),h=o.file_data.matchAll(/\bsections '(\w.*?)'|(\bcontent_for_layout\b)/gm),u=[];for(let d of h)if(d[1]){let m=d[1],p=await this.getThemeTemplateConfigByType("sections",`${m}.json`),C=a5(p).name;typeof C=="string"&&C.startsWith("t:")&&(C=(0,T.get)(s,C.slice(2))),u.push({prop:u3(m),label:C||m,source:p?.file_path})}else d[2]&&u.push({prop:q3,label:"Template",source:t.file_path});return u}async getLayoutSectionGroups(e=!0){let t=await this.getThemeConfigsByPath("theme/sections/"),i=await c5(t,this.getTemplateSchema.bind(this));if(e)for(let r of i)for(let o of r.sectionConfigs){let{schema:a}=o;a?.fields&&this.globals&&o.settings&&(o.settings=y4(this,o))}return i}async renderPageSections(e,t){let i=await this.getPageSections(e,!0);return i=i.filter(r=>r.section.disabled!==!0),this.renderSectionConfigs(i,t)}async renderSectionConfigs(e,t){return Promise.all(e.map(async(i,r)=>{let{section:o,schema:a}=i,s=a?.fields&&this.globals?y4(this,i):{...i.settings},l=await this.getThemeTemplateConfigByType("sections",`${o.type}.liquid`),h="";return l&&(h=await this.renderTemplate(l,{...t,...s,index:r}),s?.section?.custom_css&&(h+=`<style>${u5(s?.section.custom_css,i.id)}</style>`)),{...i,output:h}}))}async renderTranslation(e,t,i){let r=this.globals.language,o=this.globals.request?.locale;return this.renderTranslationValue(o,r,e,t,i)}async renderTranslationValue(e,t,i,r,o){if(i===void 0)return o||"";let a=i?.split(".")||[],s=a.pop()||"",l=a.join("."),h=(0,T.get)(t,l),u=(0,T.get)(h?.[e],s)||(0,T.get)(h?.[e.split("-")[0]],s)||h?.[s];return r?.count!==void 0&&u?.one&&(u=r.count===1?u.one:u.other),typeof u!="string"||u===""?o||"":await this.renderTemplateString(u,r)||o||""}renderCurrency(e,t){return this.swell.storefront.currency.format(e,t)}},I3=class extends Error{title;status=500;description;constructor(e="Something went wrong",t=500,i){e=String(e),super(e+(i?`: ${i}`:"")),this.title=e,this.status=t,this.description=i}toString(){return this.message}},H3=class extends I3{constructor(e="Page not found",t=404,i){super(e,t,i)}};function y4(n,e){let{settings:t,schema:i}=e;if(!i||!t?.section?.settings)return t;let r=[{label:i.label,fields:i.fields}],o=t.section.blocks?.filter(a=>a.disabled!==!0);return o=o?.map(a=>({...a,settings:B3(n,a.settings,i.blocks?.filter(s=>s.type===a.type))})),{...t,section:{...t.section,settings:B3(n,t.section.settings,r),blocks:o}}}function i6(n,e){for(let t of e)for(let i of t.fields)i.id&&!Object.hasOwn(n,i.id)&&(n[i.id]=typeof i.default<"u"?i.default:"")}function B3(n,e,t){let i=(0,T.cloneDeep)(e);if(i.$locale){let{locale:r}=n.swell.getStorefrontLocalization(),o=i.$locale[r]||{};for(let[a,s]of Object.entries(o))s&&(i[a]=s)}return(0,T.each)(i,(r,o)=>{let a=(t&&d5(t,o))??null;if(U(r)&&!(r instanceof _)){switch(a?.type){case"color_scheme_group":{(0,T.each)(r,(s,l)=>{if(U(s)&&typeof s.settings=="object"&&s.settings){let h=s.settings;(0,T.each)(h,(u,d)=>{(0,T.find)(a.fields,{id:d})?.type==="color"&&u&&(s.id=l,h[d]=new S(u))})}});return}default:break}i[o]=B3(n,r,t)}else switch(a?.type){case"lookup":case"product_lookup":case"category_lookup":case"customer_lookup":i[o]=n.resolveLookupSetting(a,r);break;case"color":r&&(i[o]=new S(r));break;case"font":i[o]=n.resolveFontSetting(r);break;case"menu":i[o]=n.resolveMenuSetting(r);break;case"url":i[o]=n.resolveUrlSetting(r);break;case"image":i[o]=n.resolveImageSetting(r);break;default:break}}),i}function l5(n,e,t){let i=[];return(0,T.each)(e,(r,o)=>{if(U(r)&&!(r instanceof D)&&!(r instanceof _))i.push(...l5(n,r,t));else{let a=d5(t,o);a?.type===n&&i.push({setting:a,value:r})}}),i}function V2(n){if(n.collection)return n.collection;switch(n.type){case"product_lookup":return"products";case"category_lookup":return"categories";case"customer_lookup":return"accounts";default:break}}function d5(n,e){for(let t of n||[])for(let i of t.fields)if(i.id===e)return i;return null}function a5(n){try{return JSON.parse(n?.file_data||"{}")}catch{return{}}}function n6(n){return n.includes('\\"')?JSON.parse(`"${n}"`):n}function r6(n){return n.replace(/\{\{.*?\}\}/g,n6)}function o6(n){let e=n.match(/\{%-?\s*schema\s*-?%\}(.*)\{%-?\s*endschema\s*-?%\}/s);return e===null?n:e[0]}function $2(n,e){let t={settings:[]};return Array.isArray(n)&&(n[0]?.name==="theme_info"&&n.shift(),n.forEach(i=>{t.settings?.push(s6(i,e))})),t}function U2(n){return typeof n.current=="string"&&n.presets?.[n.current]?n.presets[n.current]:typeof n.current=="object"?n.current||{}:{}}function K2(n){return Object.entries(n.presets||{}).map(([e,t])=>({label:e,settings:t}))}function z2(n,e="en"){return{label:Z(n.name,e),type:n.type,tag:n.tag,class:n.class,limit:n.limit,enabled_on:n.enabled_on,disabled_on:n.disabled_on,fields:(n.settings||[]).map(i=>k4(i,e)),blocks:(n.blocks||[]).map(i=>a6(i,e)),presets:(n.presets||[]).map(i=>O2(i,e)),default:n.default?O2(n.default,e):void 0}}function a6(n,e){return{type:n.type,label:Z(n.name,e),limit:n.limit,fields:(n.settings||[]).map(i=>k4(i,e))}}function O2(n,e){return{label:Z(n.name,e),settings:n.settings,blocks:n.blocks}}function s6(n,e){return{label:Z(n.name,e),fields:(n.settings||[]).map(i=>k4(i,e))}}function k4(n,e){let t={};switch(n.type){case"text":t={type:"text"};break;case"textarea":t={type:"textarea"};break;case"paragraph":t={type:"paragraph",label:n.content?Z(n.content,e):void 0};break;case"select":t={type:"select",options:n.options?.map(i=>({label:Z(i.label,e),value:i.value}))};break;case"checkbox":t={type:"checkbox"};break;case"radio":t={type:"radio",options:n.options?.map(i=>({label:Z(i.label,e),value:i.value}))};break;case"number":t={type:"integer"};break;case"range":t={type:"number",min:n.min,max:n.max,increment:n.step,unit:n.unit};break;case"article":t={type:"lookup",collection:"content/blogs",titleField:"title"};break;case"blog":t={type:"lookup",collection:"content/blogs",titleField:"title"};break;case"collection":t={type:"category_lookup"};break;case"collection_list":t={type:"category_lookup",multiple:!0,limit:n.limit};break;case"color":case"color_background":t={type:"color"};break;case"color_scheme":t={type:"color_scheme"};break;case"color_scheme_group":t={type:"color_scheme_group",fields:(n.definition||[]).map(i=>k4(i,e)),role:n.role};break;case"font_picker":t={type:"font"};break;case"html":t={type:"basic_html"};break;case"image_picker":t={type:"image"};break;case"inline_richtext":t={type:"rich_text"};break;case"link_list":t={type:"menu"};break;case"liquid":t={type:"liquid"};break;case"page":t={type:"lookup",collection:"content/pages",titleField:"title"};break;case"product":t={type:"product_lookup"};break;case"product_list":t={type:"product_lookup",multiple:!0,limit:n.limit};break;case"richtext":t={type:"rich_html"};break;case"text_alignment":t={type:"select",options:[{value:"left",label:"Left"},{value:"center",label:"Center"},{value:"right",label:"Right"}]};break;case"url":t={type:"url"};break;case"video":t={type:"video"};break;case"video_url":t={type:"url"};break;case"header":t={type:"header",label:n.content?Z(n.content,e):void 0};break;default:break}return{...n,id:n.id,label:Z(n.label,e),default:typeof n.default<"u"?Z(n.default,e):void 0,description:n.info?Z(n.info,e):void 0,...t}}function Z(n,e){if(U(n)){let t=n[e];if(t)return t;let i=e.slice(0,2);return n[i]}return n}function W2(n){let e=n.lastIndexOf("_"),t=n.substring(0,e),i=n.substring(e+1),r=l6[t];if(r){let o=r.variants[i];return`${r.family}:${o}`}return null}var l6={abel:{family:"Abel",variants:{n4:"wght@400"}},abril_fatface:{family:"Abril Fatface",variants:{n4:"wght@400"}},alegreya:{family:"Alegreya",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},alegreya_sans:{family:"Alegreya Sans",variants:{n1:"wght@100",i1:"ital,wght@1,100",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},amiri:{family:"Amiri",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},anonymous_pro:{family:"Anonymous Pro",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},arapey:{family:"Arapey",variants:{n4:"wght@400",i4:"ital,wght@1,400"}},archivo:{family:"Archivo",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},archivo_narrow:{family:"Archivo Narrow",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},arimo:{family:"Arimo",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},armata:{family:"Armata",variants:{n4:"wght@400"}},arvo:{family:"Arvo",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},asap:{family:"Asap",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},assistant:{family:"Assistant",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",n6:"wght@600",n7:"wght@700",n8:"wght@800"}},asul:{family:"Asul",variants:{n4:"wght@400",n7:"wght@700"}},bio_rhyme:{family:"Bio Rhyme",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",n7:"wght@700",n8:"wght@800"}},bitter:{family:"Bitter",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700"}},cabin:{family:"Cabin",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},cardo:{family:"Cardo",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700"}},catamaran:{family:"Catamaran",variants:{n1:"wght@100",n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},chivo:{family:"Chivo",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900",i9:"ital,wght@1,900"}},cormorant:{family:"Cormorant",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},crimson_text:{family:"Crimson Text",variants:{n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},dm_sans:{family:"DM Sans",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700"}},domine:{family:"Domine",variants:{n4:"wght@400",n7:"wght@700"}},dosis:{family:"Dosis",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800"}},eczar:{family:"Eczar",variants:{n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800"}},fira_sans:{family:"Fira Sans",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},fjalla_one:{family:"Fjalla One",variants:{n4:"wght@400"}},glegoo:{family:"Glegoo",variants:{n4:"wght@400",n7:"wght@700"}},ibm_plex_sans:{family:"IBM Plex Sans",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},inconsolata:{family:"Inconsolata",variants:{n4:"wght@400",n7:"wght@700"}},inknut_antiqua:{family:"Inknut Antiqua",variants:{n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},inter:{family:"Inter",variants:{n1:"wght@100",n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},josefin_sans:{family:"Josefin Sans",variants:{n1:"wght@100",i1:"ital,wght@1,100",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},josefin_slab:{family:"Josefin Slab",variants:{n1:"wght@100",i1:"ital,wght@1,100",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700"}},kalam:{family:"Kalam",variants:{n3:"wght@300",n4:"wght@400",n7:"wght@700"}},karla:{family:"Karla",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},kreon:{family:"Kreon",variants:{n3:"wght@300",n4:"wght@400",n7:"wght@700"}},lato:{family:"Lato",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},libre_baskerville:{family:"Libre Baskerville",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700"}},libre_franklin:{family:"Libre Franklin",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},lobster:{family:"Lobster",variants:{n4:"wght@400"}},lobster_two:{family:"Lobster Two",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},lora:{family:"Lora",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},maven_pro:{family:"Maven Pro",variants:{n4:"wght@400",n5:"wght@500",n7:"wght@700",n9:"wght@900"}},megrim:{family:"Megrim",variants:{n4:"wght@400"}},merriweather_sans:{family:"Merriweather Sans",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800"}},montserrat:{family:"Montserrat",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},mouse_memoirs:{family:"Mouse Memoirs",variants:{n4:"wght@400"}},muli:{family:"Muli",variants:{n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},neuton:{family:"Neuton",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",n8:"wght@800"}},news_cycle:{family:"News Cycle",variants:{n4:"wght@400",n7:"wght@700"}},newsreader:{family:"Newsreader",variants:{n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800"}},nobile:{family:"Nobile",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700"}},noticia_text:{family:"Noticia Text",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},noto_serif:{family:"Noto Serif",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},nunito:{family:"Nunito",variants:{n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},nunito_sans:{family:"Nunito Sans",variants:{n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},old_standard_tt:{family:"Old Standard TT",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700"}},open_sans:{family:"Open Sans",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800"}},open_sans_condensed:{family:"Open Sans Condensed",variants:{n3:"wght@300",i3:"ital,wght@1,300",n7:"wght@700"}},oswald:{family:"Oswald",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700"}},ovo:{family:"Ovo",variants:{n4:"wght@400"}},oxygen:{family:"Oxygen",variants:{n3:"wght@300",n4:"wght@400",n7:"wght@700"}},pt_mono:{family:"PT Mono",variants:{n4:"wght@400"}},pt_sans:{family:"PT Sans",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},pt_sans_narrow:{family:"PT Sans Narrow",variants:{n4:"wght@400",n7:"wght@700"}},pt_serif:{family:"PT Serif",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},pacifico:{family:"Pacifico",variants:{n4:"wght@400"}},playball:{family:"Playball",variants:{n4:"wght@400"}},playfair_display:{family:"Playfair Display",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900",i9:"ital,wght@1,900"}},poppins:{family:"Poppins",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},prata:{family:"Prata",variants:{n4:"wght@400"}},prompt:{family:"Prompt",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},proza_libre:{family:"Proza Libre",variants:{n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800"}},quantico:{family:"Quantico",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},quattrocento:{family:"Quattrocento",variants:{n4:"wght@400",n7:"wght@700"}},quattrocento_sans:{family:"Quattrocento Sans",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},questrial:{family:"Questrial",variants:{n4:"wght@400"}},quicksand:{family:"Quicksand",variants:{n3:"wght@300",n4:"wght@400",n5:"wght@500",n7:"wght@700"}},rajdhani:{family:"Rajdhani",variants:{n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700"}},raleway:{family:"Raleway",variants:{n1:"wght@100",i1:"ital,wght@1,100",n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n8:"wght@800",i8:"ital,wght@1,800",n9:"wght@900",i9:"ital,wght@1,900"}},righteous:{family:"Righteous",variants:{n4:"wght@400"}},roboto:{family:"Roboto",variants:{n1:"wght@100",i1:"ital,wght@1,100",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900",i9:"ital,wght@1,900"}},roboto_condensed:{family:"Roboto Condensed",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},roboto_mono:{family:"Roboto Mono",variants:{n1:"wght@100",i1:"ital,wght@1,100",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700"}},roboto_slab:{family:"Roboto Slab",variants:{n1:"wght@100",n3:"wght@300",n4:"wght@400",n7:"wght@700"}},rubik:{family:"Rubik",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900",i9:"ital,wght@1,900"}},shadows_into_light:{family:"Shadows Into Light",variants:{n4:"wght@400"}},slabo_13px:{family:"Slabo 13px",variants:{n4:"wght@400"}},smooch:{family:"Smooch",variants:{n4:"wght@400"}},source_code_pro:{family:"Source Code Pro",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n9:"wght@900"}},source_sans_pro:{family:"Source Sans Pro",variants:{n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900",i9:"ital,wght@1,900"}},space_mono:{family:"Space Mono",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},syne:{family:"Syne",variants:{n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800"}},tenor_sans:{family:"Tenor Sans",variants:{n4:"wght@400"}},tinos:{family:"Tinos",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},titillium_web:{family:"Titillium Web",variants:{n2:"wght@200",i2:"ital,wght@1,200",n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900"}},ubuntu:{family:"Ubuntu",variants:{n3:"wght@300",i3:"ital,wght@1,300",n4:"wght@400",i4:"ital,wght@1,400",n5:"wght@500",i5:"ital,wght@1,500",n7:"wght@700",i7:"ital,wght@1,700"}},unica_one:{family:"Unica One",variants:{n4:"wght@400"}},unna:{family:"Unna",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},varela:{family:"Varela",variants:{n4:"wght@400"}},varela_round:{family:"Varela Round",variants:{n4:"wght@400"}},vidaloka:{family:"Vidaloka",variants:{n4:"wght@400"}},volkhov:{family:"Volkhov",variants:{n4:"wght@400",i4:"ital,wght@1,400",n7:"wght@700",i7:"ital,wght@1,700"}},vollkorn:{family:"Vollkorn",variants:{n4:"wght@400",i4:"ital,wght@1,400",n6:"wght@600",i6:"ital,wght@1,600",n7:"wght@700",i7:"ital,wght@1,700",n9:"wght@900",i9:"ital,wght@1,900"}},work_sans:{family:"Work Sans",variants:{n1:"wght@100",n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},biz_udpmincho:{family:"BIZ UDPMincho",variants:{n4:"wght@400",n7:"wght@700"}},dela_gothic_one:{family:"Dela Gothic One",variants:{n4:"wght@400"}},hina_mincho:{family:"Hina Mincho",variants:{n4:"wght@400"}},kaisei_decol:{family:"Kaisei Decol",variants:{n4:"wght@400",n5:"wght@500",n7:"wght@700"}},kaisei_opti:{family:"Kaisei Opti",variants:{n4:"wght@400",n5:"wght@500",n7:"wght@700"}},kaisei_tokumin:{family:"Kaisei Tokumin",variants:{n4:"wght@400",n5:"wght@500",n7:"wght@700",n8:"wght@800"}},m_plus_1:{family:"M PLUS 1",variants:{n1:"wght@100",n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},m_plus_rounded_1c:{family:"M PLUS Rounded 1c",variants:{n1:"wght@100",n3:"wght@300",n4:"wght@400",n5:"wght@500",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},mochiy_pop_p_one:{family:"Mochiy Pop P One",variants:{n4:"wght@400"}},murecho:{family:"Murecho",variants:{n1:"wght@100",n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},noto_sans_japanese:{family:"Noto Sans Japanese",variants:{n1:"wght@100",n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800",n9:"wght@900"}},noto_serif_japanese:{family:"Noto Serif Japanese",variants:{n2:"wght@200",n3:"wght@300",n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n9:"wght@900"}},shippori_mincho:{family:"Shippori Mincho",variants:{n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n8:"wght@800"}},zen_kaku_gothic_new:{family:"Zen Kaku Gothic New",variants:{n3:"wght@300",n4:"wght@400",n5:"wght@500",n7:"wght@700",n9:"wght@900"}},zen_kurenaido:{family:"Zen Kurenaido",variants:{n4:"wght@400"}},zen_maru_gothic:{family:"Zen Maru Gothic",variants:{n3:"wght@300",n4:"wght@400",n5:"wght@500",n7:"wght@700",n9:"wght@900"}},zen_old_mincho:{family:"Zen Old Mincho",variants:{n4:"wght@400",n5:"wght@500",n6:"wght@600",n7:"wght@700",n9:"wght@900"}}};var x4={};v5(x4,{DeferredShopifyResource:()=>n3,ShopifyArticle:()=>_3,ShopifyBlog:()=>L4,ShopifyCart:()=>k3,ShopifyCollection:()=>B,ShopifyCollections:()=>A4,ShopifyCustomer:()=>X,ShopifyFont:()=>M3,ShopifyForm:()=>V3,ShopifyLink:()=>E3,ShopifyLocalization:()=>P3,ShopifyOrder:()=>l3,ShopifyPage:()=>E4,ShopifyPaginate:()=>L3,ShopifyPredictiveSearch:()=>_4,ShopifyProduct:()=>P,ShopifyRecommendations:()=>M4,ShopifyResource:()=>y,ShopifySearch:()=>P4,ShopifyVariant:()=>$,adaptShopifyFontData:()=>R4,adaptShopifyFormData:()=>D4,adaptShopifyMenuData:()=>v4});function _3(n,e,t){return e instanceof y?e.clone():(t&&(e.category=t),new y({author:c(e,i=>i.author?.name||i.author?.email),content:c(e,i=>i.content),created_at:w(()=>e.date_created),excerpt:w(()=>e.summary),excerpt_or_content:w(()=>e.summary||e.content),handle:w(()=>e.slug),id:c(e,i=>i.id),image:c(e,i=>i.image&&H(n,i.image)),metafields:null,published_at:c(e,i=>i.date_published||i.date_created),tags:c(e,i=>i.tags),template_suffix:null,title:c(e,i=>i.title),updated_at:c(e,i=>i.date_updated||i.date_created),url:c([e,e.category],(i,r)=>r&&`/blogs/${r?.slug}/${i.slug}`),user:w(()=>e.author),comment_post_url:null,comments:null,comments_count:null,"comments_enabled?":!1,moderated:!1}))}function L4(n,e){if(e instanceof y)return e.clone();let t=c(e.blogs,i=>i?.results?.reduce((r,o)=>{for(let a of o.tags||[])r.includes(a)||r.push(a);return r},[]));return new y({all_tags:t,articles:c(e,i=>i.blogs?._cloneWithCompatibilityResult(r=>({results:r?.results?.map(o=>_3(n,o,i))}))||[]),articles_count:c(e.blogs,i=>i?.count||0),handle:w(()=>e.slug),id:c(e,i=>i.id),metafields:null,next_article:null,previous_article:null,tags:t,template_suffix:null,title:c(e,i=>i.title),url:c(e,i=>`/blogs/${i.slug}`),featured_image:c(e,i=>i.image),content:c(e,i=>i.content),"comments_enabled?":!1,moderated:!1})}var J2=require("lodash-es");function G3(n,e){let t=e.type==="range",i=e.type==="boolean";return new y({active_values:t?void 0:e.active_options?.map(r=>m3(n,r,e)),false_value:i?m3(n,{value:""},e):void 0,inactive_values:t?void 0:e.inactive_options?.map(r=>m3(n,r,e)),label:e.label,max_value:t?m3(n,{value:e.range_max},e,"lte"):void 0,min_value:t?m3(n,{value:e.range_min},e,"gte"):void 0,operator:t?"AND":"OR",param_name:e.param_name,presentation:"text",range_max:e.range_max,true_value:i?m3(n,{value:e.options?.[0].value},e):void 0,type:e.id==="price"?"price_range":i?"boolean":"list",url_to_remove:h6(n,`filter_${e.id}`,!0),values:e.id!=="price"&&e.options?.map(r=>m3(n,r,e))})}function m3(n,e,t,i){let r=i?`${t.param_name}[${i}]`:t.param_name;return new y({active:e.active,count:e.count,image:null,label:e.label,param_name:r,swatch:null,url_to_add:u6(n,r,e.value),url_to_remove:c6(n,t.param_name,e.value),value:d6(n,e,t,i)})}function d6(n,e,t,i){let{queryParams:r}=n.swell,o=i?r[t.param_name]?.[i]:r[t.param_name];return t.type==="range"?o!==void 0&&o!==""?o:null:e.value}function b4(n){return Object.keys(n).reduce((e,t)=>{let i=n[t];return i!==""&&(e[t]=(0,J2.isObject)(i)&&!Array.isArray(i)?b4(i):i),e},{})}function h6(n,e,t=!1){let{queryParams:i}=n.swell,r=O({...b4(i),...t?{[`${e}[gte]`]:void 0,[`${e}[lte]`]:void 0}:void 0,[e]:void 0,page:void 0});return m5(n,r)}function c6(n,e,t){let{queryParams:i}=n.swell,r=O({...b4(i),[e]:Array.isArray(i[e])?i[e].filter(o=>o!==t):void 0,page:void 0});return m5(n,r)}function u6(n,e,t){let{queryParams:i}=n.swell,r=O({...b4(i),[e]:Array.isArray(i[e])?i[e].concat(t):typeof i[e]=="string"?[i[e],t]:t,page:void 0});return m5(n,r)}function m5(n,e){let{url:t}=n.swell;return`${t.pathname}${e?`?${e}`:""}`}function B(n,e){if(e instanceof y)return e.clone();let t=c(e,r=>r.products?._cloneWithCompatibilityResult(o=>({results:o?.results?.map(a=>P(n,a))}))??null);async function i(){let r=await t.resolve();return r&&"_resolve"in r?r._resolve():r}return new y({all_products_count:w(async()=>(await i())?.count||0),all_tags:w(async()=>(await i())?.results?.reduce((r,o)=>(Array.isArray(o.tags)&&r.push(...o.tags),r),[])||[]),all_types:w(async()=>{let r=await i();if(!r?.results)return[];let o=r.results.reduce((a,s)=>(s.type&&a.add(s.type),a),new Set);return Array.from(o.values())}),all_vendors:[],current_type:null,current_vendor:null,default_sort_by:c(e,r=>r.sort_options?.[0].value),description:c(e,r=>r.description),featured_image:c(e,r=>r.images?.[0]&&H(n,r.images[0])),filters:w(async()=>(await i())?.filter_options?.map(r=>G3(n,r))||[]),handle:w(()=>e.slug),id:c(e,r=>r.id),image:null,metafields:null,next_product:null,previous_product:null,products:w(async()=>(await i())?.results),products_count:w(async()=>(await i())?.results?.length||0),published_at:null,sort_by:w(()=>e.sort),sort_options:c(e,r=>r.sort_options),tags:[],template_suffix:null,title:w(()=>e.name),url:c(e,r=>`/collections/${r.slug}`)})}function A4(n,e){return new L(n.swell,e._collection,e._query,async()=>{let t=(await e.results)?.map(i=>B(n,i));return{page:e.page??1,count:e.count??0,results:t,page_count:e.page_count??0,limit:e.limit,pages:e.pages??{}}})}function M3(n,e){return e instanceof y?e.clone():new y({baseline_ratio:null,fallback_families:e.fallback_families,family:e.family,style:e.style,"system?":e.system,variants:e.variants.map(t=>M3(n,t)),weight:e.weight})}var m6={account_login:{params:()=>({password_needed:!0})}};function V3(n,e){if(e instanceof y)return e.clone();let t=m6[e.id];return new y({...t?.params?.(e)||void 0,errors:e.errors&&new C5(e.errors),"posted_successfully?":e.success})}var p5=class{code;message;field_name;field_label;type;constructor(e){this.code=e.code,this.message=e.message,this.field_name=e.field_name,this.field_label=e.field_label,this.type=this.getShopifyErrorType(e)}getShopifyErrorType(e){return e.field_name==="email"?"email":e.field_name==="password"?"password":"form"}valueOf(){return this.type}toString(){return this.type}},C5=class n{errors;pointer=0;messages;translated_fields;constructor(e){return this.errors=Array.from(e).map(t=>new p5(t)),this.messages=new T4(this.errors,this.errors.map(t=>t.message)),this.translated_fields=new T4(this.errors,this.errors.map(t=>t.field_label)),new Proxy(this.errors,{get:(t,i)=>{let r=t;return i==="toJSON"?this.errors:i==="some"?this.some.bind(this):i==="messages"?this.messages:i==="translated_fields"?this.translated_fields:r[i]},getPrototypeOf(){return n.prototype}})}*[Symbol.iterator](){yield*this.errors}some(e,t){return this.errors.some(i=>e(i?.type),t)}},T4=class{values;constructor(e,t){return this.values=t,new Proxy(t,{get:(i,r)=>{let o=i;if(r==="toJSON")return t;let a=e?.findIndex?.(s=>s?.type===r);return a!==-1?t[a]:o[r]}})}};var Y2=require("lodash-es");function E3(n,e,t){let i=e.handle||e.id;return new y({active:t.active,child_active:t.child_active,child_current:t.child_current,current:t.current,handle:`${i}-${(0,Y2.snakeCase)(t.name)}`,levels:t.levels,links:t.items?.map(r=>E3(n,t,r)),object:t.resource,title:t.name,type:p6(t.type),url:t.url})}function p6(n){switch(n){case"home":return"frontpage_link";case"category":return"collection_link";case"product":return"product_link";case"search":return"search_link";default:return""}}function P3(n,e,t){let{currency:i,locale:r}=n.swell.getStorefrontLocalization(),o=e.currencies.find(s=>s.code===(i||t.currency))||e.currencies[0],a=e.locales.find(s=>s.code===(r||t.locale))||e.locales[0];return new y({available_countries:C6(e),available_languages:X2(e),country:o&&tt(o,e),language:a&&et(a,e),market:null})}function C6(n){return n.currencies.map(e=>tt(e,n))||[]}function X2(n){return n.locales.map(e=>et(e,n))||[]}function et(n,e){return{endonym_name:n.name,iso_code:n.code,name:n.name,primary:n.code===e.locale,root_url:e.url}}function tt(n,e){return{available_languages:X2(e),continent:null,currency:{iso_code:n.code,name:n.name,symbol:n.symbol},iso_code:n.code,market:null,name:g6(n.code),"popular?":!1,unit_system:"metric"}}function g6(n){return n in Q2?Q2[n]:null}var Q2=Object.freeze({USD:"United States",EUR:"Europe",GBP:"United Kingdom",JPY:"Japan",CAD:"Canada",AUD:"Australia",CHF:"Switzerland",CNY:"China",SEK:"Sweden",NZD:"New Zealand",NOK:"Norway",MXN:"Mexico",SGD:"Singapore",HKD:"Hong Kong",KRW:"South Korea",INR:"India",BRL:"Brazil",RUB:"Russia",ZAR:"South Africa",TRY:"Turkey",AED:"United Arab Emirates",THB:"Thailand",IDR:"Indonesia",SAR:"Saudi Arabia",PLN:"Poland",PHP:"Philippines",ILS:"Israel",MYR:"Malaysia",CZK:"Czech Republic",HUF:"Hungary",CLP:"Chile",DKK:"Denmark",RON:"Romania",ARS:"Argentina",COP:"Colombia",TWD:"Taiwan",BGN:"Bulgaria",EGP:"Egypt",PKR:"Pakistan",NGN:"Nigeria",VND:"Vietnam",IQD:"Iraq",MAD:"Morocco",KES:"Kenya",DZD:"Algeria",UAH:"Ukraine",XAF:"Cameroon",XOF:"C\xF4te d'Ivoire",GHS:"Ghana",BYN:"Belarus",LKR:"Sri Lanka",SDG:"Sudan",AFN:"Afghanistan",ALL:"Albania",AMD:"Armenia",AOA:"Angola",AWG:"Aruba",AZN:"Azerbaijan",BAM:"Bosnia and Herzegovina",BBD:"Barbados",BDT:"Bangladesh",BHD:"Bahrain",BIF:"Burundi",BMD:"Bermuda",BND:"Brunei",BOB:"Bolivia",BSD:"Bahamas",BTN:"Bhutan",BWP:"Botswana",BZD:"Belize",CDF:"Democratic Republic of the Congo",CLF:"Chile (Unidad de Fomento)",CRC:"Costa Rica",CVE:"Cape Verde",DJF:"Djibouti",DOP:"Dominican Republic",ERN:"Eritrea",ETB:"Ethiopia",FKP:"Falkland Islands",GEL:"Georgia",GIP:"Gibraltar",GMD:"Gambia",GNF:"Guinea",GTQ:"Guatemala",GYD:"Guyana",HNL:"Honduras",HRK:"Croatia",HTG:"Haiti",IRR:"Iran",ISK:"Iceland",JMD:"Jamaica",JOD:"Jordan",KGS:"Kyrgyzstan",KHR:"Cambodia",KMF:"Comoros",KPW:"North Korea",KWD:"Kuwait",KYD:"Cayman Islands",KZT:"Kazakhstan",LAK:"Laos",LBP:"Lebanon",LRD:"Liberia",LSL:"Lesotho",LYD:"Libya",MDL:"Moldova",MGA:"Madagascar",MKD:"North Macedonia",MMK:"Myanmar",MNT:"Mongolia",MOP:"Macau",MRO:"Mauritania",MUR:"Mauritius",MVR:"Maldives",MWK:"Malawi",NAD:"Namibia",NPR:"Nepal",OMR:"Oman",PAB:"Panama",PEN:"Peru",PGK:"Papua New Guinea",PYG:"Paraguay",QAR:"Qatar",RSD:"Serbia",RWF:"Rwanda",SBD:"Solomon Islands",SCR:"Seychelles",SHP:"Saint Helena",SLL:"Sierra Leone",SOS:"Somalia",SRD:"Suriname",STD:"S\xE3o Tom\xE9 and Pr\xEDncipe",SZL:"Eswatini",TJS:"Tajikistan",TMT:"Turkmenistan",TND:"Tunisia",TOP:"Tonga",TTD:"Trinidad and Tobago",TZS:"Tanzania",UGX:"Uganda",UYU:"Uruguay",UZS:"Uzbekistan",VEF:"Venezuela",VUV:"Vanuatu",WST:"Samoa",XCD:"Eastern Caribbean",YER:"Yemen",ZMW:"Zambia",ZWL:"Zimbabwe"});function _4(n,e){return e instanceof y?e.clone():new y({performed:c(e,t=>t.performed),resources:f6(n,e),terms:w(()=>e.query),types:["product"]})}function f6(n,e){return e instanceof y?e.clone():new y({products:c(e.products,t=>t?.results?.map(i=>{let r=P(n,i);return r.object_type="product",r}))})}function M4(n,e){return e instanceof y?e.clone():new y({products:c(e,t=>(t?.recommendations||[]).map(i=>P(n,i))),products_count:c(e,t=>t?.recommendations?.length||0),performed:!0})}function E4(n,e){return e instanceof y?e.clone():new y({content:c(e,t=>t.content),handle:w(()=>e.slug),metafields:null,published_at:w(async()=>await e.date_published||e.date_created),template_suffix:null,title:c(e,t=>t.title||t.name),url:c(e,t=>`/pages/${t.slug}`),author:null})}function P4(n,e){if(e instanceof y)return e.clone();let t=c(e,i=>i.products?._cloneWithCompatibilityResult(r=>({results:r?.results?.map(o=>{let a=P(n,o);return a.object_type="product",a})}))||[]);return new y({default_sort_by:c(e,i=>i.sort_options?.[0].value),filters:w(async()=>(await(await t.resolve())?.filter_options)?.map(r=>G3(n,r))||[]),performed:c(e,i=>i.performed),results:t,results_count:w(async()=>(await t.resolve())?.count||0),sort_by:w(()=>e.sort),sort_options:c(e,i=>i.sort_options),terms:w(()=>e.query),types:["product"]})}function v4(n,e){let t={...e,handle:e.id.replace(/_/g,"-"),title:e.name};return{...t,links:e.items?.map(i=>E3(n,t,i))}}function R4(n,e){return M3(n,e)}function D4(n,e){return V3(n,e)}function g5(n,e){let t=e.currencies.find(i=>i.code===e.currency);return new y({accepts_gift_cards:!0,address:{},brand:{},collections_count:0,currency:e.currency,customer_accounts_enabled:!0,customer_accounts_optional:!0,description:e.description,domain:e.url.replace(/^http[s]?:\/\//,""),email:e.support_email,enabled_currencies:e.currencies.map(i=>({iso_code:i.code,name:i.name,symbol:i.symbol})),enabled_payment_providers:[],id:e.id,metafields:null,metaobjects:null,money_format:t,money_with_currency_format:{...t,symbol:`${e.currency} ${t?.symbol||""}`},name:e.name,password_message:null,permanent_domain:`${e.id}.swell.store`,phone:e.support_phone,published_locales:e.locales.map(i=>({endonym_name:i.name,iso_code:i.code,name:i.name,primary:i.code===e.locale,root_url:e.url})),secure_url:e.url,types:[],url:e.url,vendors:[],policies:[],privacy_policy:null,refund_policy:null,shipping_policy:null,subscription_policy:null,terms_of_service:null,products_count:0})}var it=require("liquidjs"),O3=class extends it.Drop{#e;constructor(e){switch(super(),typeof e){case"object":{if(e===null){this.#e=new Map;break}this.#e=new Map(e instanceof Map?e:Object.entries(e));break}default:this.#e=new Map;break}}liquidMethodMissing(e){switch(typeof e){case"string":return this.#e.get(e);case"object":{if(e!==null&&"handle"in e){let{handle:t}=e;if(typeof t=="string")return this.#e.get(t)}break}default:break}}};var nt=require("liquidjs");var f5=class extends A{constructor(e){super(e,"categories","all",{},()=>({id:"all",slug:"all",name:"Products",products:new L(e,"products")}))}},$3=class extends nt.Drop{#e;#i;#t;#n;constructor(e){super(),this.#e=e,this.#t=Number.NaN,this.#n=new Map}liquidMethodMissing(e){switch(typeof e){case"string":{if(e==="all"){let t=this.#n.get(e);return t===void 0&&(t=B(this.#e,new f5(this.#e.swell))),t}return this.getCollection(e)}case"object":{if(e!==null){let t=e,i=t.handle||t.id||t._id;return this.getCollection(i)}break}default:break}}getCollection(e){let t=this.#n.get(e);return t===void 0&&(t=B(this.#e,new A(this.#e.swell,"categories",e))),t}get size(){return Number.isFinite(this.#t)?this.#t:this.#e.swell.storefront.get("/categories/:count").then(e=>{let t=Number(e??0);return this.#t=t,t})}[Symbol.iterator](){return this.iterator()}async iterator(){return this.#i||(this.#i=await this.#e.swell.storefront.categories.list().then(e=>e.results.map(t=>B(this.#e,t)))),this.#i.values()}};var A3=class{theme;swell;pageId;pageResourceMap;objectResourceMap;formResourceMap;queryParamsMap;shopifyCompatibilityConfig;editorLocaleConfig;constructor(e){this.theme=e,this.swell=e.swell,this.shopifyCompatibilityConfig=this.swell.shopifyCompatibilityConfig??void 0,this.pageResourceMap=this.getPageResourceMap(),this.objectResourceMap=this.getObjectResourceMap(),this.formResourceMap=this.getFormResourceMap(),this.queryParamsMap=this.getQueryParamsMap()}initGlobals(e){let{request:t,page:i}=e;this.pageId=this.getPageType(e.page?.id),e.page={...i||void 0},e.request={...t||void 0,design_mode:this.swell.isEditor,visual_section_preview:!1,page_type:i?.id},e.collections=new $3(this),e.current_page=this.swell.queryParams.page||1,e.routes=this.getPageRoutes()}adaptGlobals(e,t){if(e.page&&(this.pageId=this.getPageType(e.page.id)),e.request){let i=e.page||t.page;e.request={...e.request||void 0,design_mode:this.swell.isEditor,visual_section_preview:!1,page_type:i.id}}if(e.menus&&(e.linklists=new O3(e.menus)),e.geo){let i=this.getAllCountryOptionTags(e.geo);e.all_country_option_tags=i,e.country_option_tags=i}if(e.store){e.shop=this.getShopData(e.store);let i=e.request||t.request;e.localization=this.getLocalizationObject(e.store,i)}}adaptSettings(e,t){let{current:i,presets:r}=t;if(typeof i=="object"&&i)return{current:T3(e,i),presets:r};let o=r?.[i];if(!o)throw new Error(`Failed to build settings config: "${i}" preset is not defined`);return{current:i,presets:{...r,[i]:T3(e,o)}}}adaptPageData(e){let t=this.pageResourceMap.get(this.pageId||"");if(t)for(let[i,r]of Object.entries(e)){let o=`${i}.`,a=t.resources.find(({from:s})=>s===i||s.startsWith(o));a&&r instanceof _&&(e[a.to]=a.object(this,r))}this.adaptObjectData(e)}adaptObjectData(e){for(let t of Object.values(e)){let i=this.objectResourceMap.get(t?.constructor.name);if(i){let r=i.object(this,t);t instanceof _?t.setCompatibilityProps(r):Object.assign(t,r)}}}adaptQueryParams(){let e={};for(let[t,i]of Object.entries(this.swell.queryParams)){let r=this.queryParamsMap.find(({from:o})=>typeof o=="function"?o(t):o===t);if(r){let o=typeof r.to=="function"?r.to(t,i):{[r.to]:i};Object.assign(e,o)}else e[t]=i}this.swell.queryParams=e}getAdaptedFormType(e){return this.formResourceMap.find(i=>i.shopifyType===e)?.type}async getAdaptedFormClientParams(e,t,i){let r=this.formResourceMap.find(o=>o.type===e);if(r?.clientParams)return r.clientParams(t,i)}async getAdaptedFormClientHtml(e,t,i){let r=this.formResourceMap.find(a=>a.type===e),o=this.shopifyCompatibilityConfig?.forms?.find(a=>a.id===e);if(r&&o)return o.client_params?.reduce((a,s)=>`<input type="hidden" name="${s.name}" value="${s.value}" />`+a,"")}async getAdaptedFormServerParams(e,t){let i=this.formResourceMap.find(r=>r.type===e||r.shopifyType===e);if(typeof i?.serverParams=="function")return i.serverParams(t)}async getAdaptedFormServerResponse(e,t){let i=this.formResourceMap.find(r=>r.type===e||r.shopifyType===e);if(typeof i?.serverResponse=="function")return i.serverResponse(t)}getShopData(e){return e?g5(this,e):{}}getContentForHeader(){let{shop:e,store:t,request:i}=this.theme.globals,r={id:1,name:t.name,schema_name:e.name,schema_version:"1.0.0",theme_store_id:null,role:i.design_mode?"development":i.is_preview?"unpublished":"main"},o=[];return i.design_mode&&o.push("Shopify.designMode = true;"),i.is_preview&&o.push("Shopify.inspectMode = true;"),i.visual_section_preview&&o.push("Shopify.visualPreviewMode = true;"),`<script>var Shopify = Shopify || {};
|
|
936
936
|
Shopify.shop = "${e.domain}";
|
|
937
937
|
Shopify.locale = "${t.locale}";
|
|
938
938
|
Shopify.currency = {"active":"${t.currency}","rate":"1.0"};
|
|
@@ -945,6 +945,6 @@ Shopify.routes = Shopify.routes || {};
|
|
|
945
945
|
Shopify.routes.root = "/";
|
|
946
946
|
${o.join(`
|
|
947
947
|
`)}</script>`}getMenuData(e){return v4(this,e)}getFontData(e){return R4(this,e)}getFormData(e){return D4(this,e)}getFontFromShopifySetting(e){return W2(e)}getThemeConfig(e){return U2(e)}getPresetsConfig(e){return K2(e)}getEditorConfig(e){let{locale:t}=this.swell.getStorefrontLocalization();return $2(e,t)}getSectionConfigSchema(e){let{locale:t}=this.swell.getStorefrontLocalization();return z2(e,t)}async getEditorLocaleConfig(e,t){if(this.editorLocaleConfig?.[t])return this.editorLocaleConfig[t];let i=await e.getLocaleConfig(t,".schema.json");return this.editorLocaleConfig={[t]:i},i}async renderSchemaTranslations(e,t,i="en"){if(!(0,j4.isObject)(t))return t;let r=await this.getEditorLocaleConfig(e,i);return this.renderSchemaTranslationValue(e,t,i,r)}async renderSchemaTranslationValue(e,t,i,r){switch(typeof t){case"string":{if(t.startsWith("t:")){let o=t.slice(2),a=o?.split("."),s=a.pop()||"",l=a.join(".");return(0,j4.get)(r,l)?.[s]??o}break}case"object":{if(Array.isArray(t)){let o=[];for(let a of t)o.push(await this.renderSchemaTranslationValue(e,a,i,r));return o}if(t!==null){let o={...t};for(let[a,s]of Object.entries(t))o[a]=await this.renderSchemaTranslationValue(e,s,i,r);return o}break}default:break}return t}getPageType(e){return this.shopifyCompatibilityConfig?.page_types?.[e]||e}getPageRouteUrl(e){return this.theme.props.pages?.find(t=>t.id===e)?.url||e}getPageRoutes(){let e={account_addresses_url:this.getPageRouteUrl("account/addresses"),account_login_url:this.getPageRouteUrl("account/login"),account_logout_url:this.getPageRouteUrl("account/logout"),account_recover_url:this.getPageRouteUrl("account/recover"),account_register_url:this.getPageRouteUrl("account/signup"),account_url:this.getPageRouteUrl("account/index"),all_products_collection_url:this.getPageRouteUrl("products/index"),cart_add_url:this.getPageRouteUrl("cart/add"),cart_change_url:this.getPageRouteUrl("cart/change"),cart_clear_url:this.getPageRouteUrl("cart/clear"),cart_update_url:this.getPageRouteUrl("cart/update"),cart_url:this.getPageRouteUrl("cart/index"),collections_url:this.getPageRouteUrl("categories/index"),predictive_search_url:this.getPageRouteUrl("search/suggest"),product_recommendations_url:this.getPageRouteUrl("products/index"),root_url:this.getPageRouteUrl("index"),search_url:this.getPageRouteUrl("search")};if(this.shopifyCompatibilityConfig?.page_routes)for(let[t,i]of Object.entries(this.shopifyCompatibilityConfig.page_routes))i&&typeof i=="object"&&i.page_id?e[t]=this.getPageRouteUrl(i.page_id):typeof i=="string"&&(e[t]=i);return e}getLocalizationObject(e,t){return P3(this,e,t)}getAdaptedPageUrl(e){if(!e)return;let t,i,r={},[o,a]=e.split("?"),s=o.split("."),l=s[1]?s.pop():null,[,h,u,d]=s.join(".").split("/");switch(l==="js"&&(i="json"),h){case"account":switch(u){case"order":t="account/order",r.id=d;break;case"register":t="account/login";break;default:break}break;case"blog":u&&(t="blogs/category",r.category=u),d&&(t="blogs/blog",r.slug=d);break;case"collections":u?u==="all"?t="products/index":(t="categories/category",r.slug=u):t="categories/index";break;case"gift_card":u&&(t="gift-card",r.code=u);break}if(t){let m=this.getPageRouteUrl(t);if(m)return m.replace(/:(\w+)/g,(g,C)=>r[C])+(l?`.${l}`:"")+(a?`?${a}`:"")}else if(i)return o.replace(new RegExp(`.${l}$`),`.${i}`)+(a?`?${a}`:"")}getThemeFilePath(e,t){switch(e){case"assets":return`assets/${t}`;case"components":return`snippets/${t}`;case"config":return`config/${t}`;case"layouts":return`layout/${t}`;case"templates":return`templates/${this.getPageType(t)}`;case"sections":return`sections/${t}`;default:throw new Error(`Theme file type not supported: ${e}`)}}getPageResourceMap(){return this.shopifyCompatibilityConfig?.page_resources?this.shopifyCompatibilityConfig.page_resources.reduce((e,t)=>e.set(t.page,{page:t.page,resources:t.resources.map(({from:i,to:r,object:o})=>{let a=x4[o];if(!a)throw new Error(`ShopifyObject for '${o}' not found.`);return{from:i,to:r,object:a}})}),new Map):new Map}getObjectResourceMap(){return this.shopifyCompatibilityConfig?.object_resources?this.shopifyCompatibilityConfig.object_resources.reduce((e,t)=>{let i=x4[t.object];if(!i)throw new Error(`ShopifyObject for '${t.object}' not found.`);return e.set(t.from,{from:t.from,object:i})},new Map):new Map}getFormResourceMap(){return this.shopifyCompatibilityConfig?.forms?this.shopifyCompatibilityConfig.forms.map(e=>({shopifyType:e.shopify_type,type:e.id})):[]}getQueryParamsMap(){return[{from:"sort_by",to:"sort"},{from(e){return e.startsWith("filter.v.")},to(e,t){let i=e.split("filter.v.")[1],r=t;return{[i]:r}}}]}getAllCountryOptionTags(e){return e?e.countries?.map(t=>{if(!t)return"";let i=(e.states||[]).filter(o=>o.country===t.id).map(o=>[o.id,o.name]),r=JSON.stringify(i).replace(/"/g,""");return`<option value="${t.id}" data-provinces="${r}">${t.name}</option>`}).filter(Boolean).join(`
|
|
948
|
-
`):""}isScriptFormActionUrl(e){if(!e)return!1;let t=this.shopifyCompatibilityConfig?.editor_configs?.script_actions_routes||{};for(let i of Object.values(t))if(e===i)return!0;return!1}isScriptUrl(e){if(!e)return!1;let t=this.shopifyCompatibilityConfig?.editor_configs?.script_routes||{};for(let i of Object.values(t))if(e.startsWith(i))return!0;return!1}needRedirectToPageStart(e){return e?(this.shopifyCompatibilityConfig?.editor_configs?.redirect_to_page_start_forms||[]).includes(e):!1}isCheckoutForm(e){return e?this.shopifyCompatibilityConfig?.editor_configs?.checkout_form===e:!1}};var y=class n{props;stringProp;linkProps;constructor(e,t,i){return this.props=e,this.stringProp=t,this.linkProps=i,new Proxy(e,{get(r,o){let a=r;switch(o){case"toJSON":return e;case"clone":return()=>new n((0,v3.cloneDeep)(e),(0,v3.cloneDeep)(t),(0,v3.cloneDeep)(i));case"toString":{if(t)return()=>e[t];break}default:break}return a[o]instanceof i3?a[o].resolve().then(s=>(a[o]=s,s),s=>(console.log(s),a[o]=null,null)):a[o]},getPrototypeOf(){return n.prototype}})}valueOf(){return this.stringProp?this.props[this.stringProp]:this}clone(){return new n({})}},i3=class{handler;result;constructor(e){this.result=void 0,this.handler=e}async resolve(){return this.result===void 0&&(this.result=Promise.resolve().then(()=>{let e=this.handler();return this.handler=v3.noop,e}).then(e=>(e=e!==void 0?e:null,this.result=e,e))),this.result}};function w(n){return new i3(n)}function w6(n){return R(n)&&(v(n)||typeof n._resolve=="function")}function rt(n){return R(n)&&typeof n._resolve=="function"}async function y6(n){return Array.isArray(n)?Promise.all(n.map(e=>rt(e)?e._resolve():e)):rt(n)?n._resolve():n}async function ot(n,e){return y6(n).then(t=>Array.isArray(n)&&Array.isArray(t)?e(...t.map(i=>i||{})):w6(t)?ot(t,e):e(t||{})).catch(t=>(console.log(t),null))}function c(n,e){return new i3(()=>ot(n,e))}function z4(n,e,t,i,r){return c(e,o=>o[t]?._cloneWithCompatibilityResult(a=>({results:a?.results?.map(s=>{let l=i(n,s);return r&&r(l,s),l})}))||[])}async function at(n,e){let t=[];for(let i of e)if(k6(i,e)){let r=await y5(n,i);r&&t.push({...r,id:String(i.name||"").split(".").pop()})}return t}async function w5(n,e,t=S6){let i=Array.isArray(e.order)?e.order:Object.keys(e.sections||{}),r=[];for(let o of i){let a=e.sections[o],s=await t(n,a.type);if(!s)continue;let l={...s,id:o},h=e.id?`page__${e.id}__${o}`:l.id,d=(Array.isArray(a.block_order)?a.block_order:Object.keys(a.blocks||{})).map(p=>a.blocks?.[p]).filter(Boolean),m={section:{id:h,...a,blocks:d}};r.push({id:h,settings:m,section:{id:h,...a},tag:l.tag||"div",class:l.class,schema:l})}return r}async function st(n,e){let t=e.filter(o=>L6(o,e)),i=async(o,a)=>{let s=e.find(h=>b6(h,e,a)),l=await y5(o,s);if(l)return{...l,id:String(s?.name||"").split(".").pop()}},r=[];for(let o of t){let a;try{a=JSON.parse(o.file_data),a?.name&&(a.label=a.name,delete a.name)}catch{}if(a?.type){let s=await w5(n,a,i);r.push({...a,id:String(o.name||"").split(".").pop(),sectionConfigs:s})}}return r}async function S6(n,e){let t=await n.getThemeTemplateConfigByType("sections",e);return y5(n,t)}async function y5(n,e){let t;if(e?.file_path?.endsWith(".liquid")){if(n.shopifyCompatibility){n.liquidSwell.lastSchema=void 0,await n.renderTemplate(e);let i=n.liquidSwell.lastSchema;i&&(t=n.shopifyCompatibility.getSectionConfigSchema(i))}}else if(e?.file_data)try{t=JSON.parse(e?.file_data)||void 0}catch{}return t}function k6(n,e){return n.file_path.startsWith("theme/sections/")?lt(n,e):!1}function L6(n,e){if(!n.file_path.startsWith("theme/sections/")||!n.file_path.endsWith(".json"))return!1;let t=n.file_path.replace(/\.json$/,".liquid");return!e.some(i=>i.file_path===t)}function b6(n,e,t){return!n.file_path.endsWith(`/${t}.json`)&&!n.file_path.endsWith(`/${t}.liquid`)?!1:lt(n,e)}function lt(n,e){if(n.file_path.endsWith(".liquid")){let t=n.file_path.replace(/\.liquid$/,".json");if(!e.find(r=>r.file_path===t))return!0}else if(n.file_path.endsWith(".json"))return!0;return!1}function U3(n){let e={description:n.description,defaultValue:n.default,isLabelHidden:!0,layout:"column",params:n},t;switch(n?.type){case"text":case"short_text":t={type:"swell_short_text"};break;case"paragraph":t={type:"swell_paragraph"};break;case"textarea":case"long_text":case"liquid":t={type:"swell_long_text"};break;case"basic_html":case"rich_text":case"rich_html":case"markdown":t={type:"swell_editor"};break;case"number":t={type:"swell_number"};break;case"select":t={type:"swell_select"};break;case"radio":t={type:"swell_radio"};break;case"checkbox":t={type:"swell_boolean"};break;case"color":t={type:"swell_color"};break;case"color_scheme":t={type:"swell_color_scheme"};break;case"color_scheme_group":t={type:"swell_color_scheme_group"};break;case"font":t={type:"swell_font"};break;case"header":t={type:"swell_header"};break;case"icon":t={type:"swell_menu"};break;case"menu":t={type:"swell_menu"};break;case"url":t={type:"swell_url"};break;case"lookup":case"generic_lookup":case"product_lookup":case"category_lookup":case"customer_lookup":t={type:"swell_lookup"};break;case"image":t={type:"swell_image",defaultValue:""};break;case"asset":case"document":case"video":t={type:"swell_file"};break;default:t={type:"swell_short_text"};break}return{...e,...t}}function q(n,e,t){if(t===void 0)return null;switch(n?.find(r=>r.id===e)?.type){default:return t}}function dt(n,e){return e?.reduce((t,i)=>{for(let r of i.fields||[])r?.id&&(t[r.id]=n[r.id]);return t},{})}function ht(n,e){if(e)return{settings:e.fields.reduce((t,i)=>(i?.id&&(t[i.id]=n[i.id]),t),{$locale:n.$locale}),id:e.id,blocks:n.Blocks?.filter(t=>!!t.props.compiled?._component).map(t=>{let i=t.props.compiled.props,r=t.props.compiled._component.split("__")[2],o=e.blocks?.find(a=>a.type===r);return{type:r,settings:o?.fields?.reduce((a,s)=>(s?.id&&(a[s.id]=i[s.id]),a),{$locale:i.$locale})||{}}})}}function K3(n){return n&&n.replace(/\./g,"\xB7")}function ct(n){return n&&n.replace(/·/g,".")}function a3(n){var e="0123456789abcdef";function t(b){var k,M="";for(k=0;k<=3;k++)M+=e.charAt(b>>k*8+4&15)+e.charAt(b>>k*8&15);return M}function i(b,k){var M=(b&65535)+(k&65535),E=(b>>16)+(k>>16)+(M>>16);return E<<16|M&65535}function r(b,k){return b<<k|b>>>32-k}function o(b,k,M,E,G,V){return i(r(i(i(k,b),i(E,V)),G),M)}function a(b,k,M,E,G,V,n3){return o(k&M|~k&E,b,k,G,V,n3)}function s(b,k,M,E,G,V,n3){return o(k&E|M&~E,b,k,G,V,n3)}function l(b,k,M,E,G,V,n3){return o(k^M^E,b,k,G,V,n3)}function h(b,k,M,E,G,V,n3){return o(M^(k|~E),b,k,G,V,n3)}function u(b){var k,M=(b.length+8>>6)+1,E=new Array(M*16);for(k=0;k<M*16;k++)E[k]=0;for(k=0;k<b.length;k++)E[k>>2]|=b.charCodeAt(k)<<k%4*8;return E[k>>2]|=128<<k%4*8,E[M*16-2]=b.length*8,E}var d,m=u(""+n),p=1732584193,g=-271733879,C=-1732584194,f=271733878,F,p3,Q3,P5;for(d=0;d<m.length;d+=16)F=p,p3=g,Q3=C,P5=f,p=a(p,g,C,f,m[d+0],7,-680876936),f=a(f,p,g,C,m[d+1],12,-389564586),C=a(C,f,p,g,m[d+2],17,606105819),g=a(g,C,f,p,m[d+3],22,-1044525330),p=a(p,g,C,f,m[d+4],7,-176418897),f=a(f,p,g,C,m[d+5],12,1200080426),C=a(C,f,p,g,m[d+6],17,-1473231341),g=a(g,C,f,p,m[d+7],22,-45705983),p=a(p,g,C,f,m[d+8],7,1770035416),f=a(f,p,g,C,m[d+9],12,-1958414417),C=a(C,f,p,g,m[d+10],17,-42063),g=a(g,C,f,p,m[d+11],22,-1990404162),p=a(p,g,C,f,m[d+12],7,1804603682),f=a(f,p,g,C,m[d+13],12,-40341101),C=a(C,f,p,g,m[d+14],17,-1502002290),g=a(g,C,f,p,m[d+15],22,1236535329),p=s(p,g,C,f,m[d+1],5,-165796510),f=s(f,p,g,C,m[d+6],9,-1069501632),C=s(C,f,p,g,m[d+11],14,643717713),g=s(g,C,f,p,m[d+0],20,-373897302),p=s(p,g,C,f,m[d+5],5,-701558691),f=s(f,p,g,C,m[d+10],9,38016083),C=s(C,f,p,g,m[d+15],14,-660478335),g=s(g,C,f,p,m[d+4],20,-405537848),p=s(p,g,C,f,m[d+9],5,568446438),f=s(f,p,g,C,m[d+14],9,-1019803690),C=s(C,f,p,g,m[d+3],14,-187363961),g=s(g,C,f,p,m[d+8],20,1163531501),p=s(p,g,C,f,m[d+13],5,-1444681467),f=s(f,p,g,C,m[d+2],9,-51403784),C=s(C,f,p,g,m[d+7],14,1735328473),g=s(g,C,f,p,m[d+12],20,-1926607734),p=l(p,g,C,f,m[d+5],4,-378558),f=l(f,p,g,C,m[d+8],11,-2022574463),C=l(C,f,p,g,m[d+11],16,1839030562),g=l(g,C,f,p,m[d+14],23,-35309556),p=l(p,g,C,f,m[d+1],4,-1530992060),f=l(f,p,g,C,m[d+4],11,1272893353),C=l(C,f,p,g,m[d+7],16,-155497632),g=l(g,C,f,p,m[d+10],23,-1094730640),p=l(p,g,C,f,m[d+13],4,681279174),f=l(f,p,g,C,m[d+0],11,-358537222),C=l(C,f,p,g,m[d+3],16,-722521979),g=l(g,C,f,p,m[d+6],23,76029189),p=l(p,g,C,f,m[d+9],4,-640364487),f=l(f,p,g,C,m[d+12],11,-421815835),C=l(C,f,p,g,m[d+15],16,530742520),g=l(g,C,f,p,m[d+2],23,-995338651),p=h(p,g,C,f,m[d+0],6,-198630844),f=h(f,p,g,C,m[d+7],10,1126891415),C=h(C,f,p,g,m[d+14],15,-1416354905),g=h(g,C,f,p,m[d+5],21,-57434055),p=h(p,g,C,f,m[d+12],6,1700485571),f=h(f,p,g,C,m[d+3],10,-1894986606),C=h(C,f,p,g,m[d+10],15,-1051523),g=h(g,C,f,p,m[d+1],21,-2054922799),p=h(p,g,C,f,m[d+8],6,1873313359),f=h(f,p,g,C,m[d+15],10,-30611744),C=h(C,f,p,g,m[d+6],15,-1560198380),g=h(g,C,f,p,m[d+13],21,1309151649),p=h(p,g,C,f,m[d+4],6,-145523070),f=h(f,p,g,C,m[d+11],10,-1120210379),C=h(C,f,p,g,m[d+2],15,718787259),g=h(g,C,f,p,m[d+9],21,-343485551),p=i(p,F),g=i(g,p3),C=i(C,Q3),f=i(f,P5);return t(p)+t(g)+t(C)+t(f)}function A6(n,e){if(!n.file_path.startsWith("theme/sections/"))return!1;if(n.file_path.endsWith(".liquid")){if(!e.get(n.file_path.replace(/\.liquid$/,".json")))return!0}else if(n.file_path.endsWith(".json"))return!0;return!1}async function h5(n,e){let t=[];for(let i of n.values())if(A6(i,n)){let r=await e(i);r&&t.push({...r,id:String(i.name||"").split(".").pop()??"",...r&&{presets:T6(r)}})}return t}function T6(n){return Array.isArray(n?.presets)?n.presets.map(e=>({label:e.label,settings:{...n.fields?.reduce((t,i)=>(i.id&&i.default!==void 0&&(t[i.id]=i.default),t),{}),...e.settings||void 0},blocks:e.blocks?.map(t=>{let i=n.blocks?.find(r=>r.type===t.type);return i?{...t,settings:{...i.fields.reduce((r,o)=>(o.id&&o.default!==void 0&&(r[o.id]=o.default),r),{}),...t.settings||void 0}}:t})})):[]}async function c5(n,e){let t=Array.from(n.values()),i=t.filter(a=>a.file_path.endsWith(".json")&&!n.has(a.file_path.replace(/\.json$/,".liquid"))),r=async a=>{let s=t.find(h=>{if(!h.file_path.endsWith(`/${a}.json`)&&!h.file_path.endsWith(`/${a}.liquid`))return!1;if(h.file_path.endsWith(".liquid")){if(!n.get(h.file_path.replace(/\.liquid$/,".json")))return!0}else if(h.file_path.endsWith(".json"))return!0;return!1});return s?{...await e(s),id:String(s.name||"").split(".").pop()}:void 0},o=[];for(let a of i){let s;try{s=JSON.parse(a.file_data),s?.name&&(s.label=s.name,delete s.name)}catch{}if(s?.type){let l=await S4(s,r);o.push({...s,id:String(a.name||"").split(".").pop(),sectionConfigs:l})}}return o}async function S4(n,e){let t=Array.isArray(n?.order)?n.order:Object.keys(n?.sections||{}),i=[];for(let r of t){let o=n.sections[r];if(!o)continue;let a=await e(o.type)||{id:o.type,label:o.type,tag:"div",class:"",fields:[],blocks:[]},s=n.id?`page__${n.id}__${r}`:a.id,h=(Array.isArray(o.block_order)?o.block_order:Object.keys(o.blocks||{})).map(d=>o.blocks?.[d]).filter(Boolean),u={section:{id:s,...o,blocks:h}};i.push({id:s,section:{id:s,...o},schema:a,settings:u,tag:a.tag||"div",class:a.class})}return i}function _6(n){return String(n)==="[object Array]"}function U(n){let e=typeof n;return n!==null&&(e==="object"||e==="function")}function S5(n){let e=new TextEncoder().encode(n),t="";for(let i=0;i<e.length;i+=3){let r=Array.from(e.slice(i,i+3));t+=btoa(String.fromCharCode(...r))}return t}function o5(n,e="id"){return(0,Z4.reduce)(n,(t,i)=>(t[String(i[e])]=i,t),{})}function M6(n){let e=n.toUpperCase().split(/-|_/),t=e.shift(),i=e.pop(),r="";return i&&(r=i),i||(r=J4[t.toLowerCase()]||""),r.toLowerCase()}function k5(n,e){if(!(typeof n!="object"||n===null))for(let[t,i]of Object.entries(n))e(t,n)!==!1&&typeof i=="object"&&i!==null&&k5(i,e)}function E6(n){let e=new Set;return k5(n,(t,i)=>{if(typeof i=="object"&&i!==null){if(e.has(i))return!1;e.add(i)}return!0}),Array.from(e)}function P6(n){if(!n)return n;let e=new WeakSet;return JSON.parse(JSON.stringify(n,(t,i)=>{if(typeof i=="object"&&i!==null){if(e.has(i))return JSON.parse(JSON.stringify(i));e.add(i)}return i}))}function pt(n){if(!(typeof n!="object"||n===null))for(let[e,t]of Object.entries(n))e==="_swell"&&"_swell"in n?n[e]=void 0:pt(t)}function ut(n){if(n!==void 0)return n instanceof L?"SwellStorefrontCollection":n instanceof A?"SwellStorefrontRecord":n instanceof y?"ShopifyResource":n instanceof _?"StorefrontResource":"promise"}async function I(n,e=!0,t=!1){let i=n,r=e;try{if(v(n)&&(r=!1,i=await n),n instanceof _&&(r=!1,i=await I(n.resolve(),e,t)),Array.isArray(i)){let o=await Promise.all(i.map(a=>I(a,e,t)));if(i=o,!o.some(a=>a!==void 0))return e?[]:void 0}else if(typeof i=="object"&&i!==null&&(!("_swell"in i)||!i._swell)){let o={};for(let[a,s]of Object.entries(i)){if(!e&&(v(s)||s instanceof _||s instanceof y)){o[a]={_type:ut(s),...t?{value:await I(s,r,t)}:void 0};continue}if(s instanceof _&&t){o[a]={_type:ut(s),value:await I(s,r,t)};continue}o[a]=await I(s,r,t)}return!e&&Object.keys(o).length===0?void 0:o}}catch(o){return console.error(o),n}return i}function O(n){return mt.default.stringify({...n,sections:void 0,section_id:void 0},{encodeValuesOnly:!0,arrayFormat:"repeat"})}function u5(n,e){return n=Array.isArray(n)?n.join(" "):n,n.split("}").map(r=>{let[o,a]=r.split("{");return!o||!a?"":`${o.split(",").map(l=>`#${e} ${l.trim()}`).join(", ")} {${a}}`}).join(" ")}function T3(n,e){return Object.entries(n).reduce((t,[i,r])=>(r?.value!==null&&r?.value!==void 0&&(t[ct(i)]=r?.value),t),(0,Z4.cloneDeep)(e))}var q3="ContentSections";function u3(n){return`SectionGroup_${n}`}var v6="THEME",R6=Object.freeze({ttl:1e3*60*60*24}),Ct="__NULL__",K=class{client;constructor(e){e=e||{},e.stores=e.stores||D6(e.kvStore),this.client=(0,gt.createCache)({...R6,...e})}async fetch(e,t){return this.client.wrap(e,t)}async fetchSWR(e,t){let i=await this.client.get(e),r=Promise.resolve().then(()=>t()).then(async a=>{let s=a==null,l=await I(a);return await this.client.set(e,s?Ct:l),a});return i!==null?i===Ct?null:i:await r}async get(e){return this.client.get(e)}async set(e,t,i){return this.client.set(e,t,i)}async flush(e){await this.client.del(e)}async flushAll(){await this.client.clear()}};function D6(n){let e=[];return n?e.push(new L5.Keyv({namespace:v6,store:new e4(n)})):e.push(new L5.Keyv),e}var x6=24*60*60*1e3,j6=30*1e3,z3=class extends K{constructor(e){super({ttl:e?.kvStore?x6:j6,...e})}};var ft=require("keyv");var Z6=5*1e3,W3=class extends K{constructor(e){super({stores:F6(),ttl:Z6,...e})}};function F6(){return[new ft.Keyv({serialize:void 0,deserialize:void 0})]}var N6=90*24*60*60*1e3,N3=class extends K{constructor(e){super({ttl:N6,...e})}};var wt="https://api.schema.io",yt=new Map,St=new Map,b5=class n{url;headers;swellHeaders;queryParams;workerEnv;config;shopifyCompatibilityConfig;backend;storefront;storefrontContext;instanceId="";isPreview=!1;isEditor=!1;sentResponse=!1;storefront_url;constructor(e){let{url:t,config:i,shopifyCompatibilityConfig:r,headers:o,swellHeaders:a,serverHeaders:s,queryParams:l,workerEnv:h,...u}=e;if(this.url=t instanceof URL?t:new URL(t||""),this.config=i,this.shopifyCompatibilityConfig=r,this.queryParams=n.formatQueryParams(l||this.url.searchParams),this.workerEnv=h,console.log(`KV cache: ${this.workerEnv?.THEME?"enabled":"disabled"}`),s){let{headers:d,swellHeaders:m}=n.formatHeaders(s);this.headers=d,this.swellHeaders=m,this.backend=new F4({storeId:m["store-id"],accessToken:m["access-token"],apiHost:m["api-host"]}),this.storefront=this.getStorefrontInstance({...e,headers:d,swellHeaders:m}),this.instanceId=["store-id","environment-id","deployment-mode","theme-id","theme-branch-id"].map(p=>m[p]||"0").join(":"),this.isEditor=u.isEditor??m["deployment-mode"]==="editor",this.isPreview=this.isEditor||m["deployment-mode"]==="preview"}else if(o&&a)Object.assign(this,u),this.headers=o,this.swellHeaders=a,this.storefront=this.getStorefrontInstance(e);else throw new Error("Swell client requires `serverHeaders` when initialized on the server-side, or `headers` and `swellHeaders` when initialized on the client-side.");this.storefrontContext=this.initStorefrontContext()}static formatHeaders(e){let t={},i={};e instanceof Headers?e.forEach((r,o)=>{t[o]=r}):e&&(t=e);for(let[r,o]of Object.entries(t))r.startsWith("swell-")&&o&&(i[r.replace("swell-","")]=o);return{headers:t,swellHeaders:i}}static formatQueryParams(e){let t={};return e instanceof URLSearchParams?t=bt.default.parse(e.toString()):e&&(t=e),t}async getCachedResource(e,t,i){let r=kt(e,[this.instanceId,t]);return this.getResourceCache().fetch(r,i)}async getAppSettings(){return await this.get("/:storefronts/{id}/configs/settings/values",{id:this.swellHeaders["storefront-id"]})||{}}async getStorefrontSettings(e=!1){try{let{settings:t,menus:i,payments:r,subscriptions:o,session:a}=await this.storefront.request("get","/settings/all",void 0,void 0,{force:e}),s=this.storefront.settings;s.localizedState={},s.set({value:t}),s.set({model:"menus",value:i}),s.set({model:"payments",value:r}),s.set({model:"subscriptions",value:o}),s.set({model:"session",value:a})}catch(t){t instanceof Error&&(t.message=`Swell: unable to load settings (${t.message})`),console.error(t)}return this.storefront.settings.get()}getStorefrontMenus(){let e=this.storefront.settings.getState("/settings/menus","menuState");return!e||v(e)?[]:e}getStorefrontLocalization(){let e=this.storefront.locale.selected(),t=this.storefront.currency.selected();return!e||v(e)?{locale:"en-US",currency:"USD"}:{locale:e,currency:t}}async get(...e){return this.backend?.get(...e)}async put(...e){return this.backend?.put(...e)}async post(...e){return this.backend?.post(...e)}async delete(...e){return this.backend?.delete(...e)}getStorefrontInstance(e){let{swellHeaders:t,getCookie:i,setCookie:r,storefrontSettingStates:o}=e;if(!t)throw new Error("Swell headers are required");let a=t["store-id"],s=t["public-key"];if(!a||!s)throw new Error('Missing required headers: "swell-store-id" and "swell-public-key"');let l=Lt.default.create(a,s,{url:t["admin-url"],vaultUrl:t["vault-url"],getCookie:i,setCookie:r&&((h,u,d)=>r(h,u,d,this)),headers:{"Swell-Store-id":a,"Swell-Storefront-Id":t["storefront-id"]}});return o&&Object.assign(l.settings,o),l.request=this.getCacheableStorefrontRequestHandler(l),l}initStorefrontContext(){let e={};if(this.swellHeaders?.["storefront-context"])try{e=JSON.parse(decodeURIComponent(this.swellHeaders["storefront-context"]))}catch{console.error("Failed to parse swell-storefront-context. Ignoring...")}return e}isStorefrontRequestCacheable(e,t,i){if(i?.force)return!1;if(e==="get")switch(t.split("/")[1]){case"products":case"categories":case"content":case"settings":return!0;default:return!1}return!1}getCacheableStorefrontRequestHandler(e){let t=e.request;return(i,r,o,a,s)=>{if(this.isStorefrontRequestCacheable(i,r,s))return this.getRequestCache().fetchSWR(kt("request",[this.instanceId,i,r,o,a,s]),()=>t(i,r,o,a,s));switch(i){case"delete":case"post":case"put":{let l=r.split("/")[1];delete this.storefrontContext[l];break}default:}return t(i,r,o,a,s)}}getResourceCache(){let e=yt.get(this.instanceId);return e||(e=new W3({kvStore:this.workerEnv?.THEME}),yt.set(this.instanceId,e)),e}getRequestCache(){let e=St.get(this.instanceId);return e||(e=new z3({kvStore:this.workerEnv?.THEME}),St.set(this.instanceId,e)),e}};function kt(n,e){let t=n;return Array.isArray(e)&&e.length>0&&(t+=`_${JSON.stringify(e)}`),t.length>512&&(t=`${t.slice(0,480)}${a3(t)}`),t}var F4=class{apiHost=wt;apiAuth="";constructor({storeId:e,accessToken:t,apiHost:i}){this.apiHost=i||wt,this.apiAuth=S5(`${e}:${t}`)}async makeRequest(e,t,i){let r={method:e,headers:{Authorization:`Basic ${this.apiAuth}`,"User-Agent":"swell-functions/1.0","Content-Type":"application/json"}},o="";if(i)try{e==="GET"?o=`?${this.stringifyQuery(i)}`:(r.body=JSON.stringify(i),r.headers["Content-Length"]=String(r.body.length))}catch{throw new Error(`Error serializing data: ${i}`)}let a=String(t).startsWith("/")?t.substring(1):t,s=`${this.apiHost}/${a}${o}`,l=await fetch(s,r),h=await l.text(),u;try{u=JSON.parse(h)}catch{u=String(h||"").trim()}if(l.status>299)throw new J3(u,{status:l.status,method:e,endpointUrl:a});if(e!=="GET"&&u?.errors)throw new J3(u.errors,{status:400,method:e,endpointUrl:a});return u}stringifyQuery(e,t){let i=[];for(let[r,o]of Object.entries(e)){let a=t?`${t}[${r}]`:r,l=o!==null&&typeof o=="object"?this.stringifyQuery(o,a):`${encodeURIComponent(a)}=${o===null?"":encodeURIComponent(o)}`;i.push(l)}return i.join("&")}async get(e,t){return this.makeRequest("GET",e,t)}async put(e,t){return this.makeRequest("PUT",e,t)}async post(e,t){return this.makeRequest("POST",e,t)}async delete(e,t){return this.makeRequest("DELETE",e,t)}},J3=class extends Error{status=200;constructor(e,t={}){let i;typeof e=="string"?i=e:i=JSON.stringify(e,null,2),t.method&&t.endpointUrl&&(i=`${t.method} /${t.endpointUrl}
|
|
948
|
+
`):""}isScriptFormActionUrl(e){if(!e)return!1;let t=this.shopifyCompatibilityConfig?.editor_configs?.script_actions_routes||{};for(let i of Object.values(t))if(e===i)return!0;return!1}isScriptUrl(e){if(!e)return!1;let t=this.shopifyCompatibilityConfig?.editor_configs?.script_routes||{};for(let i of Object.values(t))if(e.startsWith(i))return!0;return!1}needRedirectToPageStart(e){return e?(this.shopifyCompatibilityConfig?.editor_configs?.redirect_to_page_start_forms||[]).includes(e):!1}isCheckoutForm(e){return e?this.shopifyCompatibilityConfig?.editor_configs?.checkout_form===e:!1}};var y=class n{props;stringProp;linkProps;constructor(e,t,i){return this.props=e,this.stringProp=t,this.linkProps=i,new Proxy(e,{get(r,o){let a=r;switch(o){case"toJSON":return e;case"clone":return()=>new n((0,v3.cloneDeep)(e),(0,v3.cloneDeep)(t),(0,v3.cloneDeep)(i));case"toString":{if(t)return()=>e[t];break}default:break}return a[o]instanceof n3?a[o].resolve().then(s=>(a[o]=s,s),s=>(console.log(s),a[o]=null,null)):a[o]},getPrototypeOf(){return n.prototype}})}valueOf(){return this.stringProp?this.props[this.stringProp]:this}clone(){return new n({})}},n3=class{handler;result;constructor(e){this.result=void 0,this.handler=e}async resolve(){return this.result===void 0&&(this.result=Promise.resolve().then(()=>{let e=this.handler();return this.handler=v3.noop,e}).then(e=>(e=e!==void 0?e:null,this.result=e,e))),this.result}};function w(n){return new n3(n)}function w6(n){return R(n)&&(v(n)||typeof n._resolve=="function")}function rt(n){return R(n)&&typeof n._resolve=="function"}async function y6(n){return Array.isArray(n)?Promise.all(n.map(e=>rt(e)?e._resolve():e)):rt(n)?n._resolve():n}async function ot(n,e){return y6(n).then(t=>Array.isArray(n)&&Array.isArray(t)?e(...t.map(i=>i||{})):w6(t)?ot(t,e):e(t||{})).catch(t=>(console.log(t),null))}function c(n,e){return new n3(()=>ot(n,e))}function z4(n,e,t,i,r){return c(e,o=>o[t]?._cloneWithCompatibilityResult(a=>({results:a?.results?.map(s=>{let l=i(n,s);return r&&r(l,s),l})}))||[])}async function at(n,e){let t=[];for(let i of e)if(k6(i,e)){let r=await y5(n,i);r&&t.push({...r,id:String(i.name||"").split(".").pop()})}return t}async function w5(n,e,t=S6){let i=Array.isArray(e.order)?e.order:Object.keys(e.sections||{}),r=[];for(let o of i){let a=e.sections[o],s=await t(n,a.type);if(!s)continue;let l={...s,id:o},h=e.id?`page__${e.id}__${o}`:l.id,d=(Array.isArray(a.block_order)?a.block_order:Object.keys(a.blocks||{})).map(p=>a.blocks?.[p]).filter(Boolean),m={section:{id:h,...a,blocks:d}};r.push({id:h,settings:m,section:{id:h,...a},tag:l.tag||"div",class:l.class,schema:l})}return r}async function st(n,e){let t=e.filter(o=>L6(o,e)),i=async(o,a)=>{let s=e.find(h=>b6(h,e,a)),l=await y5(o,s);if(l)return{...l,id:String(s?.name||"").split(".").pop()}},r=[];for(let o of t){let a;try{a=JSON.parse(o.file_data),a?.name&&(a.label=a.name,delete a.name)}catch{}if(a?.type){let s=await w5(n,a,i);r.push({...a,id:String(o.name||"").split(".").pop(),sectionConfigs:s})}}return r}async function S6(n,e){let t=await n.getThemeTemplateConfigByType("sections",e);return y5(n,t)}async function y5(n,e){let t;if(e?.file_path?.endsWith(".liquid")){if(n.shopifyCompatibility){n.liquidSwell.lastSchema=void 0,await n.renderTemplate(e);let i=n.liquidSwell.lastSchema;i&&(t=n.shopifyCompatibility.getSectionConfigSchema(i))}}else if(e?.file_data)try{t=JSON.parse(e?.file_data)||void 0}catch{}return t}function k6(n,e){return n.file_path.startsWith("theme/sections/")?lt(n,e):!1}function L6(n,e){if(!n.file_path.startsWith("theme/sections/")||!n.file_path.endsWith(".json"))return!1;let t=n.file_path.replace(/\.json$/,".liquid");return!e.some(i=>i.file_path===t)}function b6(n,e,t){return!n.file_path.endsWith(`/${t}.json`)&&!n.file_path.endsWith(`/${t}.liquid`)?!1:lt(n,e)}function lt(n,e){if(n.file_path.endsWith(".liquid")){let t=n.file_path.replace(/\.liquid$/,".json");if(!e.find(r=>r.file_path===t))return!0}else if(n.file_path.endsWith(".json"))return!0;return!1}function U3(n){let e={description:n.description,defaultValue:n.default,isLabelHidden:!0,layout:"column",params:n},t;switch(n?.type){case"text":case"short_text":t={type:"swell_short_text"};break;case"paragraph":t={type:"swell_paragraph"};break;case"textarea":case"long_text":case"liquid":t={type:"swell_long_text"};break;case"basic_html":case"rich_text":case"rich_html":case"markdown":t={type:"swell_editor"};break;case"number":t={type:"swell_number"};break;case"select":t={type:"swell_select"};break;case"radio":t={type:"swell_radio"};break;case"checkbox":t={type:"swell_boolean"};break;case"color":t={type:"swell_color"};break;case"color_scheme":t={type:"swell_color_scheme"};break;case"color_scheme_group":t={type:"swell_color_scheme_group"};break;case"font":t={type:"swell_font"};break;case"header":t={type:"swell_header"};break;case"icon":t={type:"swell_menu"};break;case"menu":t={type:"swell_menu"};break;case"url":t={type:"swell_url"};break;case"lookup":case"generic_lookup":case"product_lookup":case"category_lookup":case"customer_lookup":t={type:"swell_lookup"};break;case"image":t={type:"swell_image",defaultValue:""};break;case"asset":case"document":case"video":t={type:"swell_file"};break;default:t={type:"swell_short_text"};break}return{...e,...t}}function q(n,e,t){if(t===void 0)return null;switch(n?.find(r=>r.id===e)?.type){default:return t}}function dt(n,e){return e?.reduce((t,i)=>{for(let r of i.fields||[])r?.id&&(t[r.id]=n[r.id]);return t},{})}function ht(n,e){if(e)return{settings:e.fields.reduce((t,i)=>(i?.id&&(t[i.id]=n[i.id]),t),{$locale:n.$locale}),id:e.id,blocks:n.Blocks?.filter(t=>!!t.props.compiled?._component).map(t=>{let i=t.props.compiled.props,r=t.props.compiled._component.split("__")[2],o=e.blocks?.find(a=>a.type===r);return{type:r,settings:o?.fields?.reduce((a,s)=>(s?.id&&(a[s.id]=i[s.id]),a),{$locale:i.$locale})||{}}})}}function K3(n){return n&&n.replace(/\./g,"\xB7")}function ct(n){return n&&n.replace(/·/g,".")}function J(n){var e="0123456789abcdef";function t(b){var k,M="";for(k=0;k<=3;k++)M+=e.charAt(b>>k*8+4&15)+e.charAt(b>>k*8&15);return M}function i(b,k){var M=(b&65535)+(k&65535),E=(b>>16)+(k>>16)+(M>>16);return E<<16|M&65535}function r(b,k){return b<<k|b>>>32-k}function o(b,k,M,E,G,V){return i(r(i(i(k,b),i(E,V)),G),M)}function a(b,k,M,E,G,V,r3){return o(k&M|~k&E,b,k,G,V,r3)}function s(b,k,M,E,G,V,r3){return o(k&E|M&~E,b,k,G,V,r3)}function l(b,k,M,E,G,V,r3){return o(k^M^E,b,k,G,V,r3)}function h(b,k,M,E,G,V,r3){return o(M^(k|~E),b,k,G,V,r3)}function u(b){var k,M=(b.length+8>>6)+1,E=new Array(M*16);for(k=0;k<M*16;k++)E[k]=0;for(k=0;k<b.length;k++)E[k>>2]|=b.charCodeAt(k)<<k%4*8;return E[k>>2]|=128<<k%4*8,E[M*16-2]=b.length*8,E}var d,m=u(""+n),p=1732584193,g=-271733879,C=-1732584194,f=271733878,F,p3,Q3,P5;for(d=0;d<m.length;d+=16)F=p,p3=g,Q3=C,P5=f,p=a(p,g,C,f,m[d+0],7,-680876936),f=a(f,p,g,C,m[d+1],12,-389564586),C=a(C,f,p,g,m[d+2],17,606105819),g=a(g,C,f,p,m[d+3],22,-1044525330),p=a(p,g,C,f,m[d+4],7,-176418897),f=a(f,p,g,C,m[d+5],12,1200080426),C=a(C,f,p,g,m[d+6],17,-1473231341),g=a(g,C,f,p,m[d+7],22,-45705983),p=a(p,g,C,f,m[d+8],7,1770035416),f=a(f,p,g,C,m[d+9],12,-1958414417),C=a(C,f,p,g,m[d+10],17,-42063),g=a(g,C,f,p,m[d+11],22,-1990404162),p=a(p,g,C,f,m[d+12],7,1804603682),f=a(f,p,g,C,m[d+13],12,-40341101),C=a(C,f,p,g,m[d+14],17,-1502002290),g=a(g,C,f,p,m[d+15],22,1236535329),p=s(p,g,C,f,m[d+1],5,-165796510),f=s(f,p,g,C,m[d+6],9,-1069501632),C=s(C,f,p,g,m[d+11],14,643717713),g=s(g,C,f,p,m[d+0],20,-373897302),p=s(p,g,C,f,m[d+5],5,-701558691),f=s(f,p,g,C,m[d+10],9,38016083),C=s(C,f,p,g,m[d+15],14,-660478335),g=s(g,C,f,p,m[d+4],20,-405537848),p=s(p,g,C,f,m[d+9],5,568446438),f=s(f,p,g,C,m[d+14],9,-1019803690),C=s(C,f,p,g,m[d+3],14,-187363961),g=s(g,C,f,p,m[d+8],20,1163531501),p=s(p,g,C,f,m[d+13],5,-1444681467),f=s(f,p,g,C,m[d+2],9,-51403784),C=s(C,f,p,g,m[d+7],14,1735328473),g=s(g,C,f,p,m[d+12],20,-1926607734),p=l(p,g,C,f,m[d+5],4,-378558),f=l(f,p,g,C,m[d+8],11,-2022574463),C=l(C,f,p,g,m[d+11],16,1839030562),g=l(g,C,f,p,m[d+14],23,-35309556),p=l(p,g,C,f,m[d+1],4,-1530992060),f=l(f,p,g,C,m[d+4],11,1272893353),C=l(C,f,p,g,m[d+7],16,-155497632),g=l(g,C,f,p,m[d+10],23,-1094730640),p=l(p,g,C,f,m[d+13],4,681279174),f=l(f,p,g,C,m[d+0],11,-358537222),C=l(C,f,p,g,m[d+3],16,-722521979),g=l(g,C,f,p,m[d+6],23,76029189),p=l(p,g,C,f,m[d+9],4,-640364487),f=l(f,p,g,C,m[d+12],11,-421815835),C=l(C,f,p,g,m[d+15],16,530742520),g=l(g,C,f,p,m[d+2],23,-995338651),p=h(p,g,C,f,m[d+0],6,-198630844),f=h(f,p,g,C,m[d+7],10,1126891415),C=h(C,f,p,g,m[d+14],15,-1416354905),g=h(g,C,f,p,m[d+5],21,-57434055),p=h(p,g,C,f,m[d+12],6,1700485571),f=h(f,p,g,C,m[d+3],10,-1894986606),C=h(C,f,p,g,m[d+10],15,-1051523),g=h(g,C,f,p,m[d+1],21,-2054922799),p=h(p,g,C,f,m[d+8],6,1873313359),f=h(f,p,g,C,m[d+15],10,-30611744),C=h(C,f,p,g,m[d+6],15,-1560198380),g=h(g,C,f,p,m[d+13],21,1309151649),p=h(p,g,C,f,m[d+4],6,-145523070),f=h(f,p,g,C,m[d+11],10,-1120210379),C=h(C,f,p,g,m[d+2],15,718787259),g=h(g,C,f,p,m[d+9],21,-343485551),p=i(p,F),g=i(g,p3),C=i(C,Q3),f=i(f,P5);return t(p)+t(g)+t(C)+t(f)}function A6(n,e){if(!n.file_path.startsWith("theme/sections/"))return!1;if(n.file_path.endsWith(".liquid")){if(!e.get(n.file_path.replace(/\.liquid$/,".json")))return!0}else if(n.file_path.endsWith(".json"))return!0;return!1}async function h5(n,e){let t=[];for(let i of n.values())if(A6(i,n)){let r=await e(i);r&&t.push({...r,id:String(i.name||"").split(".").pop()??"",...r&&{presets:T6(r)}})}return t}function T6(n){return Array.isArray(n?.presets)?n.presets.map(e=>({label:e.label,settings:{...n.fields?.reduce((t,i)=>(i.id&&i.default!==void 0&&(t[i.id]=i.default),t),{}),...e.settings||void 0},blocks:e.blocks?.map(t=>{let i=n.blocks?.find(r=>r.type===t.type);return i?{...t,settings:{...i.fields.reduce((r,o)=>(o.id&&o.default!==void 0&&(r[o.id]=o.default),r),{}),...t.settings||void 0}}:t})})):[]}async function c5(n,e){let t=Array.from(n.values()),i=t.filter(a=>a.file_path.endsWith(".json")&&!n.has(a.file_path.replace(/\.json$/,".liquid"))),r=async a=>{let s=t.find(h=>{if(!h.file_path.endsWith(`/${a}.json`)&&!h.file_path.endsWith(`/${a}.liquid`))return!1;if(h.file_path.endsWith(".liquid")){if(!n.get(h.file_path.replace(/\.liquid$/,".json")))return!0}else if(h.file_path.endsWith(".json"))return!0;return!1});return s?{...await e(s),id:String(s.name||"").split(".").pop()}:void 0},o=[];for(let a of i){let s;try{s=JSON.parse(a.file_data),s?.name&&(s.label=s.name,delete s.name)}catch{}if(s?.type){let l=await S4(s,r);o.push({...s,id:String(a.name||"").split(".").pop(),sectionConfigs:l})}}return o}async function S4(n,e){let t=Array.isArray(n?.order)?n.order:Object.keys(n?.sections||{}),i=[];for(let r of t){let o=n.sections[r];if(!o)continue;let a=await e(o.type)||{id:o.type,label:o.type,tag:"div",class:"",fields:[],blocks:[]},s=n.id?`page__${n.id}__${r}`:a.id,h=(Array.isArray(o.block_order)?o.block_order:Object.keys(o.blocks||{})).map(d=>o.blocks?.[d]).filter(Boolean),u={section:{id:s,...o,blocks:h}};i.push({id:s,section:{id:s,...o},schema:a,settings:u,tag:a.tag||"div",class:a.class})}return i}function _6(n){return String(n)==="[object Array]"}function U(n){let e=typeof n;return n!==null&&(e==="object"||e==="function")}function S5(n){let e=new TextEncoder().encode(n),t="";for(let i=0;i<e.length;i+=3){let r=Array.from(e.slice(i,i+3));t+=btoa(String.fromCharCode(...r))}return t}function o5(n,e="id"){return(0,Z4.reduce)(n,(t,i)=>(t[String(i[e])]=i,t),{})}function M6(n){let e=n.toUpperCase().split(/-|_/),t=e.shift(),i=e.pop(),r="";return i&&(r=i),i||(r=J4[t.toLowerCase()]||""),r.toLowerCase()}function k5(n,e){if(!(typeof n!="object"||n===null))for(let[t,i]of Object.entries(n))e(t,n)!==!1&&typeof i=="object"&&i!==null&&k5(i,e)}function E6(n){let e=new Set;return k5(n,(t,i)=>{if(typeof i=="object"&&i!==null){if(e.has(i))return!1;e.add(i)}return!0}),Array.from(e)}function P6(n){if(!n)return n;let e=new WeakSet;return JSON.parse(JSON.stringify(n,(t,i)=>{if(typeof i=="object"&&i!==null){if(e.has(i))return JSON.parse(JSON.stringify(i));e.add(i)}return i}))}function pt(n){if(!(typeof n!="object"||n===null))for(let[e,t]of Object.entries(n))e==="_swell"&&"_swell"in n?n[e]=void 0:pt(t)}function ut(n){if(n!==void 0)return n instanceof L?"SwellStorefrontCollection":n instanceof A?"SwellStorefrontRecord":n instanceof y?"ShopifyResource":n instanceof _?"StorefrontResource":"promise"}async function I(n,e=!0,t=!1){let i=n,r=e;try{if(v(n)&&(r=!1,i=await n),n instanceof _&&(r=!1,i=await I(n.resolve(),e,t)),Array.isArray(i)){let o=await Promise.all(i.map(a=>I(a,e,t)));if(i=o,!o.some(a=>a!==void 0))return e?[]:void 0}else if(typeof i=="object"&&i!==null&&(!("_swell"in i)||!i._swell)){let o={};for(let[a,s]of Object.entries(i)){if(!e&&(v(s)||s instanceof _||s instanceof y)){o[a]={_type:ut(s),...t?{value:await I(s,r,t)}:void 0};continue}if(s instanceof _&&t){o[a]={_type:ut(s),value:await I(s,r,t)};continue}o[a]=await I(s,r,t)}return!e&&Object.keys(o).length===0?void 0:o}}catch(o){return console.error(o),n}return i}function O(n){return mt.default.stringify({...n,sections:void 0,section_id:void 0},{encodeValuesOnly:!0,arrayFormat:"repeat"})}function u5(n,e){return n=Array.isArray(n)?n.join(" "):n,n.split("}").map(r=>{let[o,a]=r.split("{");return!o||!a?"":`${o.split(",").map(l=>`#${e} ${l.trim()}`).join(", ")} {${a}}`}).join(" ")}function T3(n,e){return Object.entries(n).reduce((t,[i,r])=>(r?.value!==null&&r?.value!==void 0&&(t[ct(i)]=r?.value),t),(0,Z4.cloneDeep)(e))}var q3="ContentSections";function u3(n){return`SectionGroup_${n}`}var v6="THEME",R6=Object.freeze({ttl:1e3*60*60*24}),Ct="__NULL__",K=class{client;constructor(e){e=e||{},e.stores=e.stores||D6(e.kvStore),this.client=(0,gt.createCache)({...R6,...e})}async fetch(e,t){return this.client.wrap(e,t)}async fetchSWR(e,t){let i=await this.client.get(e),r=Promise.resolve().then(()=>t()).then(async a=>{let s=a==null,l=await I(a);return await this.client.set(e,s?Ct:l),a});return i!==null?i===Ct?null:i:await r}async get(e){return this.client.get(e)}async set(e,t,i){return this.client.set(e,t,i)}async flush(e){await this.client.del(e)}async flushAll(){await this.client.clear()}};function D6(n){let e=[];return n?e.push(new L5.Keyv({namespace:v6,store:new e4(n)})):e.push(new L5.Keyv),e}var x6=24*60*60*1e3,j6=30*1e3,z3=class extends K{constructor(e){super({ttl:e?.kvStore?x6:j6,...e})}};var ft=require("keyv");var Z6=5*1e3,W3=class extends K{constructor(e){super({stores:F6(),ttl:Z6,...e})}};function F6(){return[new ft.Keyv({serialize:void 0,deserialize:void 0})]}var N6=90*24*60*60*1e3,N3=class extends K{constructor(e){super({ttl:N6,...e})}};var wt="https://api.schema.io",yt=new Map,St=new Map,b5=class n{url;headers;swellHeaders;queryParams;workerEnv;config;shopifyCompatibilityConfig;backend;storefront;storefrontContext;instanceId="";isPreview=!1;isEditor=!1;sentResponse=!1;storefront_url;constructor(e){let{url:t,config:i,shopifyCompatibilityConfig:r,headers:o,swellHeaders:a,serverHeaders:s,queryParams:l,workerEnv:h,...u}=e;if(this.url=t instanceof URL?t:new URL(t||""),this.config=i,this.shopifyCompatibilityConfig=r,this.queryParams=n.formatQueryParams(l||this.url.searchParams),this.workerEnv=h,console.log(`KV cache: ${this.workerEnv?.THEME?"enabled":"disabled"}`),s){let{headers:d,swellHeaders:m}=n.formatHeaders(s);this.headers=d,this.swellHeaders=m,this.backend=new F4({storeId:m["store-id"],accessToken:m["access-token"],apiHost:m["api-host"]}),this.storefront=this.getStorefrontInstance({...e,headers:d,swellHeaders:m}),this.instanceId=["store-id","environment-id","deployment-mode","theme-id","theme-branch-id"].map(p=>m[p]||"0").join(":"),this.isEditor=u.isEditor??m["deployment-mode"]==="editor",this.isPreview=this.isEditor||m["deployment-mode"]==="preview"}else if(o&&a)Object.assign(this,u),this.headers=o,this.swellHeaders=a,this.storefront=this.getStorefrontInstance(e);else throw new Error("Swell client requires `serverHeaders` when initialized on the server-side, or `headers` and `swellHeaders` when initialized on the client-side.");this.storefrontContext=this.initStorefrontContext()}static formatHeaders(e){let t={},i={};e instanceof Headers?e.forEach((r,o)=>{t[o]=r}):e&&(t=e);for(let[r,o]of Object.entries(t))r.startsWith("swell-")&&o&&(i[r.replace("swell-","")]=o);return{headers:t,swellHeaders:i}}static formatQueryParams(e){let t={};return e instanceof URLSearchParams?t=bt.default.parse(e.toString()):e&&(t=e),t}async getCachedResource(e,t,i){let r=kt(e,[this.instanceId,t]);return this.getResourceCache().fetch(r,i)}async getAppSettings(){return await this.get("/:storefronts/{id}/configs/settings/values",{id:this.swellHeaders["storefront-id"]})||{}}async getStorefrontSettings(e=!1){try{let{settings:t,menus:i,payments:r,subscriptions:o,session:a}=await this.storefront.request("get","/settings/all",void 0,void 0,{force:e}),s=this.storefront.settings;s.localizedState={},s.set({value:t}),s.set({model:"menus",value:i}),s.set({model:"payments",value:r}),s.set({model:"subscriptions",value:o}),s.set({model:"session",value:a})}catch(t){t instanceof Error&&(t.message=`Swell: unable to load settings (${t.message})`),console.error(t)}return this.storefront.settings.get()}getStorefrontMenus(){let e=this.storefront.settings.getState("/settings/menus","menuState");return!e||v(e)?[]:e}getStorefrontLocalization(){let e=this.storefront.locale.selected(),t=this.storefront.currency.selected();return!e||v(e)?{locale:"en-US",currency:"USD"}:{locale:e,currency:t}}async get(...e){return this.backend?.get(...e)}async put(...e){return this.backend?.put(...e)}async post(...e){return this.backend?.post(...e)}async delete(...e){return this.backend?.delete(...e)}getStorefrontInstance(e){let{swellHeaders:t,getCookie:i,setCookie:r,storefrontSettingStates:o}=e;if(!t)throw new Error("Swell headers are required");let a=t["store-id"],s=t["public-key"];if(!a||!s)throw new Error('Missing required headers: "swell-store-id" and "swell-public-key"');let l=Lt.default.create(a,s,{url:t["admin-url"],vaultUrl:t["vault-url"],getCookie:i,setCookie:r&&((h,u,d)=>r(h,u,d,this)),headers:{"Swell-Store-id":a,"Swell-Storefront-Id":t["storefront-id"]}});return o&&Object.assign(l.settings,o),l.request=this.getCacheableStorefrontRequestHandler(l),l}initStorefrontContext(){let e={};if(this.swellHeaders?.["storefront-context"])try{e=JSON.parse(decodeURIComponent(this.swellHeaders["storefront-context"]))}catch{console.error("Failed to parse swell-storefront-context. Ignoring...")}return e}isStorefrontRequestCacheable(e,t,i){if(i?.force)return!1;if(e==="get")switch(t.split("/")[1]){case"products":case"categories":case"content":case"settings":return!0;default:return!1}return!1}getCacheableStorefrontRequestHandler(e){let t=e.request;return(i,r,o,a,s)=>{if(this.isStorefrontRequestCacheable(i,r,s))return this.getRequestCache().fetchSWR(kt("request",[this.instanceId,i,r,o,a,s]),()=>t(i,r,o,a,s));switch(i){case"delete":case"post":case"put":{let l=r.split("/")[1];delete this.storefrontContext[l];break}default:}return t(i,r,o,a,s)}}getResourceCache(){let e=yt.get(this.instanceId);return e||(e=new W3({kvStore:this.workerEnv?.THEME}),yt.set(this.instanceId,e)),e}getRequestCache(){let e=St.get(this.instanceId);return e||(e=new z3({kvStore:this.workerEnv?.THEME}),St.set(this.instanceId,e)),e}};function kt(n,e){let t=n;return Array.isArray(e)&&e.length>0&&(t+=`_${JSON.stringify(e)}`),t.length>512&&(t=`${t.slice(0,480)}${J(t)}`),t}var F4=class{apiHost=wt;apiAuth="";constructor({storeId:e,accessToken:t,apiHost:i}){this.apiHost=i||wt,this.apiAuth=S5(`${e}:${t}`)}async makeRequest(e,t,i){let r={method:e,headers:{Authorization:`Basic ${this.apiAuth}`,"User-Agent":"swell-functions/1.0","Content-Type":"application/json"}},o="";if(i)try{e==="GET"?o=`?${this.stringifyQuery(i)}`:(r.body=JSON.stringify(i),r.headers["Content-Length"]=String(r.body.length))}catch{throw new Error(`Error serializing data: ${i}`)}let a=String(t).startsWith("/")?t.substring(1):t,s=`${this.apiHost}/${a}${o}`,l=await fetch(s,r),h=await l.text(),u;try{u=JSON.parse(h)}catch{u=String(h||"").trim()}if(l.status>299)throw new J3(u,{status:l.status,method:e,endpointUrl:a});if(e!=="GET"&&u?.errors)throw new J3(u.errors,{status:400,method:e,endpointUrl:a});return u}stringifyQuery(e,t){let i=[];for(let[r,o]of Object.entries(e)){let a=t?`${t}[${r}]`:r,l=o!==null&&typeof o=="object"?this.stringifyQuery(o,a):`${encodeURIComponent(a)}=${o===null?"":encodeURIComponent(o)}`;i.push(l)}return i.join("&")}async get(e,t){return this.makeRequest("GET",e,t)}async put(e,t){return this.makeRequest("PUT",e,t)}async post(e,t){return this.makeRequest("POST",e,t)}async delete(e,t){return this.makeRequest("DELETE",e,t)}},J3=class extends Error{status=200;constructor(e,t={}){let i;typeof e=="string"?i=e:i=JSON.stringify(e,null,2),t.method&&t.endpointUrl&&(i=`${t.method} /${t.endpointUrl}
|
|
949
949
|
${i}`),super(i),this.name="SwellError",this.status=t.status||500}};function A5(n,e){return new L(n,"products",e)}function I6(n,e,t){return new A(n,"products",e,t)}function H6(n,{search:e,filter:t,sort:i}){return new L(n,"products",{search:e,filter:t,sort:i})}function B6(n,e){return new L(n,"categories",e)}function At(n,e,t){return new A(n,"categories",e,t)}async function q6(n,e,t){let i=At(n,e,t),r=await i.id;return i.products=A5(n,{category:r}),i}function G6(n,e){return n.getCachedResource(`content-model-${e}`,[],()=>n.get("/:content/{name}",{name:e,public:!0,"storefront.enabled":!0}))}async function Tt(n,e,t){return new L(n,`content/${e}`,t)}async function T5(n,e,t,i){return new A(n,`content/${e}`,t,i)}async function V6(n,e,t){return T5(n,"pages",e,t)}async function O6(n,e){return Tt(n,"blogs",e)}async function $6(n,e,t){return T5(n,"blogs",e,t)}var z=require("lodash-es");var N4=!0;async function U6(n,e,t){let i=await Mt(n,t),r=await at(n,e),o=await w5(n,i),a=await st(n,e);return{pageTemplate:i,allSections:r,pageSections:o,layoutSectionGroups:a}}async function Mt(n,e){let t=null;if(t=await n.getThemeTemplateConfigByType("templates",e),t)return t.file_path.endsWith(".liquid")?t.file_data:JSON.parse(t.file_data)}function K6(n,e){return n.reduce((t,i)=>(i.enabled_on?I4(i.enabled_on,"groups",e)&&t.push(String(i.id)):i.disabled_on?I4(i.disabled_on,"groups",e)||t.push(String(i.id)):i.id===e&&t.push(String(i.id)),t),[])}function z6(n,e){return e.map(t=>({prop:u3(t.id),type:"component-collection",label:t.label,required:!0,noInline:N4,accepts:K6(n,t.type)}))}function I4(n,e,t){return!!(n.templates==="*"||n[e]?.includes(t))}function W6(n,e,t){return n.reduce((i,r)=>(r.enabled_on?I4(r.enabled_on,"templates",t)&&i.push(String(r.id)):r.disabled_on?I4(r.disabled_on,"templates",t)||i.push(String(r.id)):e.some(({type:o})=>o===r.id)||i.push(String(r.id)),i),[])}function J6(n){return(n?.configs?.editor?.settings??[]).reduce((e,t)=>{for(let i of t.fields||[])e.push({prop:K3(i.id),label:i.label,optional:!0,group:t.label,...U3(i)});return e},[])}function Y6(n){let e=[];for(let t of n){let i=Array.isArray(t.blocks)&&t.blocks.length>0;e.push({id:t.id,label:t.label,schema:[...(t.fields||[]).reduce((r,o)=>(o.id&&o.type&&r.push({prop:K3(o.id),label:o.label,optional:!0,...U3(o)}),r),[]),...i?[{prop:"Blocks",type:"component-collection",required:!0,noInline:N4,accepts:(t.blocks||[]).map(r=>`Block__${t.id}__${r.type}`),defaultValue:t.presets?.reduce((r,o,a)=>o.blocks?o.blocks.reduce((s,l)=>{let h=t.blocks?.find(({type:u})=>u===l.type);return h&&s.push({_id:`Block__${t.id}__${l.type}__preset_${a}`,_component:`Block__${t.id}__${l.type}`,...(0,z.reduce)(h.fields,(u,d)=>(d.id&&(u[d.id]=q(h.fields,d.id,d.default)),u),{})}),s},r):r,[]),placeholderAppearance:{height:50,label:"Add block",aspectRatio:1}}]:[],{prop:"custom_css",type:"swell_css",label:"Custom CSS",description:"Add custom CSS for this section",layout:"column",isLabelHidden:!0,params:{rows:5,placeholder:"Enter custom CSS..."}},{prop:"$locale",type:"swell_locale",isLabelHidden:!0}],styles:()=>({styled:{Root:{}}})}),i&&e.push(...(t.blocks||[]).map(r=>({id:`Block__${t.id}__${r.type}`,label:r.label,schema:(r.fields||[]).reduce((o,a)=>(a.id&&a.type&&o.push({prop:K3(a.id),label:a.label,optional:!0,...U3(a)}),o),[{prop:"$locale",type:"swell_locale",isLabelHidden:!0}]),styles:()=>({styled:{Root:{}}})})))}return e}function Q6(n){return n?.configs?.editor?.settings?.reduce((e,t)=>{for(let i of t.fields||[])i?.id&&(e[i.id]=q(t.fields,i.id,n?.configs?.theme?.[i.id]));return e},{})}function X6(n){return n.reduce((e,t)=>(e[u3(t.id)]=t.sectionConfigs.map(({section:i,settings:r,schema:o})=>({_id:`SectionGroup__${i.type}_${_t()}`,_component:`${i.type}`,...(0,z.reduce)(r?.section.settings,(a,s,l)=>(a[l]=q(o?.fields,l,s),a),{}),custom_css:r?.section.custom_css||"",...r?.section.blocks?{Blocks:r.section.blocks.map(a=>({_id:`Block__${i.type}__${a.type}_${_t()}`,_component:`Block__${i.type}__${a.type}`,...(0,z.reduce)(a.settings,(s,l,h)=>(s[h]=q(o?.blocks?.find(({type:u})=>u===a.type)?.fields,h,l),s),{})}))}:void 0})),e),{})}function ei(n){return(n||"").replaceAll("/","_")}function ti(n){let e=[];for(let t of n)t.presets&&e.push(...t.presets.map((i,r)=>({id:`${t.id}__preset_${r}`,entry:{_id:`${t.id}__preset_${r}`,_component:t.id,custom_css:i.settings?.custom_css||"",...(0,z.reduce)(t.fields,(o,a)=>(a.id&&(o[a.id]=q(t.fields,a.id,i.settings?.[a.id])),o),{}),Blocks:i.blocks?.reduce((o,a)=>{let s=t.blocks?.find(({type:l})=>l===a.type);return s&&o.push({_id:`Block__${t.id}__${a.type}__preset_${r}`,_component:`Block__${t.id}__${a.type}`,...(0,z.reduce)(s.fields,(l,h)=>(h.id&&(l[h.id]=q(s.fields,h.id,a.settings?.[h.id])),l),{})}),o},[])}}))),t.blocks&&e.push(...t.blocks.map(i=>({id:`Block__${t.id}__${i.type}`,entry:{_id:`Block__${t.id}__${i.type}`,_component:`Block__${t.id}__${i.type}`,...(0,z.reduce)(i.fields,(r,o)=>(o.id&&o.default!==void 0&&(r[o.id]=q(i.fields,o.id,o.default)),r),{})}})));return e.filter(t=>Object.keys(t.entry).some(i=>i!=="_id"&&i!=="_component"))}function ii(n,e,t,i,r){let o={id:"swell_global",label:"Theme settings",schema:[{prop:"swell_page",type:"component",required:!0,accepts:["swell_page"],isNonChangable:!0,noInline:N4},{prop:"$locale",type:"swell_locale",isLabelHidden:!0},...J6(n)],groups:(n?.configs?.editor?.settings??[]).map(u=>({key:u.label,label:u.label,collapsable:!0,collapsed:!0})),styles:()=>({styled:{Root:{}}})},a={id:"swell_page",label:"Page settings",schema:[{prop:q3,type:"component-collection",required:!0,noInline:N4,accepts:W6(e,i,r),placeholderAppearance:{height:250,label:"Add section",aspectRatio:1}},...z6(e,i)],allowSave:!0,styles:()=>({styled:{Root:{}}})},s=[o,a,...Y6(e)],l=o.schema.find(u=>u.prop==="color_schemes");if(l){let u=l.params,{fields:d=[]}=u;s.push({id:"swell_color_scheme_group",label:"Swell color scheme",schema:d.map(m=>({prop:K3(m.id),label:m.label,optional:!0,...U3({...m,type:m.id==="background_gradient"?"text":m.type})})),styles(){return{styled:{Root:{}}}}})}let h=[{id:"swell_global",entry:{_id:"swell_global",_component:"swell_global",...Q6(n),$locale:n?.configs?.theme?.$locale,swell_page:[{_id:"swell_page",_component:"swell_page",ContentSections:t.map(({section:u,settings:d,schema:m})=>({_id:ei(u.id),_component:`${u.type}`,custom_css:d?.section?.custom_css||"",disabled:d?.section?.disabled||!1,$locale:d?.section?.settings?.$locale,...(0,z.reduce)(m?.fields,(p,g)=>(g?.id&&(p[g.id]=q(m?.fields,g.id,d?.section?.settings?.[g.id])),p),{}),...u?.blocks?{Blocks:Object.entries(u.blocks).map(([p,g])=>({_id:`Block__${p}__${g.type}_${Math.random()}`,_component:`Block__${u.type}__${g.type}`,disabled:g.disabled||!1,...(0,z.reduce)(g.settings,(C,f,F)=>(C[F]=q(m?.blocks?.find(({type:p3})=>p3===g.type)?.fields,F,f),C),{})}))}:void 0})),...X6(i)}]}},{id:"swell_page",entry:{_id:"swell_page",_component:"swell_page"}},...ti(e)];return{easyblocksConfig:{components:s,templates:h,backend:Et(),hideCloseButton:!0,allowSave:!0,readOnly:!1,locales:[{code:"en-US",isDefault:!0}],types:{swell_css:{type:"inline",widget:{id:"SwellCSS"}},swell_locale:{type:"inline",widget:{id:"SwellLocale"}},swell_boolean:{type:"inline",widget:{id:"SwellBoolean"}},swell_color:{type:"inline",widget:{id:"SwellColor"}},swell_color_scheme:{type:"inline",widget:{id:"SwellColorScheme"}},swell_color_scheme_group:{type:"inline",widget:{id:"SwellColorSchemeGroup"}},swell_font:{type:"inline",widget:{id:"SwellFont"}},swell_header:{type:"inline",widget:{id:"SwellHeader"}},swell_icon:{type:"inline",widget:{id:"SwellIcon"}},swell_lookup:{type:"inline",widget:{id:"SwellLookup"}},swell_menu:{type:"inline",widget:{id:"SwellMenu"}},swell_url:{type:"inline",widget:{id:"SwellUrl"}},swell_number:{type:"inline",widget:{id:"SwellNumber"}},swell_select:{type:"inline",widget:{id:"SwellSelect"}},swell_radio:{type:"inline",widget:{id:"SwellRadio"}},swell_short_text:{type:"inline",widget:{id:"SwellText"}},swell_long_text:{type:"inline",widget:{id:"SwellTextarea"}},swell_paragraph:{type:"inline",widget:{id:"SwellParagraph"}},swell_editor:{type:"inline",widget:{id:"SwellEditor"}},swell_file:{type:"inline",widget:{id:"SwellFile"}},swell_image:{type:"inline",widget:{id:"SwellImage"}}},tokens:{colors:[],fonts:[]}}}}function ni(n,e,t){let i=n.reduce((a,s)=>(a[`${s.id}`]=t("pageSection",s),a),{}),r=e.reduce((a,s)=>(a[u3(s.id)]=t("layoutSectionGroup",s),a),{}),o=n.reduce((a,s)=>{if(s.blocks)for(let l of s.blocks){let h=`Block__${s.id}__${l.type}`;a[h]=t("block",{section:s,block:l})}return a},{});return{...i,...r,...o,swell_page:t("root"),swell_global:t("global")}}function Et(){return{documents:{get({id:e}){console.log("Easyblocks backend documents.get()",e);let t={id:e,version:1,entry:{_id:"page",_component:"swell_page"}};return Promise.resolve(t)},create(e){return console.log("Easyblocks backend documents.create()",e),Promise.resolve({})},update(e){return console.log("Easyblocks backend documents.update()",e),Promise.resolve({})}},templates:{get(e){return console.log("Easyblocks backend templates.get()",e),Promise.resolve({})},getAll(){return console.log("Easyblocks backend get templates.getAll()"),Promise.resolve([])},create(e){return console.log("Easyblocks backend get templates.create()",e),Promise.resolve({})},update(e){return console.log("Easyblocks backend get templates.update()",e),Promise.resolve({})},delete(e){return console.log("Easyblocks backend get templates.delete()",e),Promise.resolve()}}}}function _t(){return(Math.random()+1).toString(36).substring(7)}function H4(n,e){let i=n?.storefront?.options?.getCookie;return typeof i=="function"&&i(e)||""}var _5=class extends A{constructor(e,t,i={}){super(e,"",t,i,async function(){let r=await Pt(e,this._resourceName,t,i);return Y3(this._resourceName,r,e,"",t,i)})}},M5=class extends W{constructor(e,t,i={}){super(e,"",async function(){let r=await Pt(e,this._resourceName,t,i);return Y3(this._resourceName,r,e,"",t,i)})}};async function Pt(n,e,t,i){let r=new URLSearchParams({...t&&{slug:t},...i&&{query:JSON.stringify(i)}}),o=r.size>0?`?${r}`:"",a=H4(n,"swell-session"),s=H4(n,"swell-data")||{};return(await fetch(`${n.storefront_url}/resources/${e}.json/${o}`,{headers:{"X-Session":a,"Swell-Data":JSON.stringify(s)}})).json()}function Y3(n,e,t,i="",r,o){let a={};for(let[s,l]of Object.entries(e)){let h=i+`${i===""?"":"/"}${s}`,u;switch(l?._type){case"SwellStorefrontCollection":u=ai;break;case"SwellStorefrontRecord":u=oi;break;case"createStorefrontResource":u=ri;break;default:break}a[s]=u?u(n,t,h,r,o):l}return a}function ri(n,e,t,i,r){return new _(async function(){let o=await E5(e,n,t,i,r);return Y3(n,o,e,t,i,r)})}function oi(n,e,t,i,r){let o=vt(i,r);return new A(e,n,t,o,async function(){let a=await E5(e,n,t,i,r);return Y3(n,a,e,t,i,r)})}function ai(n,e,t,i,r){let o=vt(i,r);return new L(e,n,o,async function(){let a=await E5(e,n,t,i,r);return Y3(n,a,e,t,i,r)})}async function E5(n,e,t,i,r){let o=new URLSearchParams({path:t,...i&&{slug:i},...r&&{query:JSON.stringify(r)}}),a=o.size>0?`?${o}`:"",s=H4(n,"swell-session"),l=H4(n,"swell-data")||{};return(await fetch(`${n.storefront_url}/resources/${e}.json${a}`,{headers:{"X-Session":s,"Swell-Data":JSON.stringify(l)}})).json()}function vt(n,e){return{...n&&{slug:n},...e}}0&&(module.exports={DEFAULT_QUERY_PAGE_LIMIT,DeferredShopifyResource,FILE_DATA_INCLUDE_QUERY,GEO_DATA,LANG_TO_COUNTRY_CODES,LiquidSwell,MAX_QUERY_PAGE_LIMIT,MockRecordResource,MockRecordSingleton,PageError,PageNotFound,SECTION_GROUP_CONTENT,ShopifyArticle,ShopifyBlog,ShopifyCart,ShopifyCollection,ShopifyCollections,ShopifyCompatibility,ShopifyCustomer,ShopifyFont,ShopifyForm,ShopifyLink,ShopifyLocalization,ShopifyOrder,ShopifyPage,ShopifyPaginate,ShopifyPredictiveSearch,ShopifyProduct,ShopifyRecommendations,ShopifyResource,ShopifySearch,ShopifyVariant,StorefrontResource,Swell,SwellBackendAPI,SwellError,SwellStorefrontCollection,SwellStorefrontPagination,SwellStorefrontRecord,SwellStorefrontResource,SwellStorefrontSingleton,SwellTheme,ThemeColor,ThemeFont,ThemeForm,ThemeFormErrors,adaptShopifyFontData,adaptShopifyFormData,adaptShopifyMenuData,arrayToObject,deferMenuItemUrlAndResource,dehydrateSwellRefsInStorefrontResources,extractSettingsFromForm,findCircularReferences,findEditorSetting,findThemeSettingsByType,fontMap,forEachKeyDeep,getAllSections,getBlog,getBlogs,getCategories,getCategory,getCategoryWithProducts,getContentEntry,getContentList,getContentModel,getCountryCodeFromLocale,getEasyblocksBackend,getEasyblocksComponentDefinitions,getEasyblocksPagePropsWithConfigs,getEasyblocksPageTemplate,getEasyblocksPropsFromThemeConfigs,getLayoutSectionGroups,getMenuItemStorefrontUrl,getMenuItemUrlAndResource,getMenuItemValueId,getPage,getPageSections,getProduct,getProducts,getProductsFiltered,getSectionGroupProp,getSectionSettingsFromProps,getThemeSettingsFromProps,isArray,isObject,md5,removeCircularReferences,resolveAsyncResources,resolveLookupCollection,resolveMenuItemUrlAndResource,resolveMenuItems,resolveMenuSettings,resolveSectionSettings,resolveThemeSettings,scopeCustomCSS,stringifyQueryParams,systemFonts,toBase64});
|
|
950
950
|
//# sourceMappingURL=index.cjs.map
|