@swell/apps-sdk 1.0.111 → 1.0.112
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 +1 -1
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -932,7 +932,7 @@
|
|
|
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=g5("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="${x.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:ki(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=r3.default.parse(i?.file_data)||void 0}catch(r){console.warn(r)}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 w5(e,this.getTemplateSchema.bind(this))}async getPageSections(e,t=!0){let i=await b4(e,r=>this.getSectionSchema(r));if(t)for(let r of i){let{schema:o}=r;o?.fields&&this.globals&&r.settings&&(r.settings=L4(this,r))}return i}async getPageSectionGroups(e){let t=await this.getThemeTemplateConfigByType("templates",e);if(t===null)return[];let r=wi(t).layout||"theme",o=await this.getThemeTemplateConfigByType("layouts",`${r}.liquid`);if(o===null)return[];let s=o.file_data.matchAll(/\bsections '(\w.*?)'|(\bcontent_for_layout\b)/gm),l=[];for(let h of s)if(h[1]){let u=h[1]||h[2],C=(await this.getSectionSchema(u))?.label||u,m=await this.getThemeTemplateConfigByType("sections",`${u}.json`);l.push({prop:p3(u),label:C,source:m?.file_path})}else h[2]&&l.push({prop:O3,label:"Template",source:t.file_path});return l}async getLayoutSectionGroups(e=!0){let t=await this.getThemeConfigsByPath("theme/sections/"),i=await y5(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=L4(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?L4(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>${S5(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,_.get)(t,l),u=(0,_.get)(h?.[e],s)||(0,_.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)}},B3=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}},G3=class extends B3{constructor(e="Page not found",t=404,i){super(e,t,i)}};function L4(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:q3(n,a.settings,i.blocks?.filter(s=>s.type===a.type))})),{...t,section:{...t.section,settings:q3(n,t.section.settings,r),blocks:o}}}function fi(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 q3(n,e,t){let i=(0,_.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,_.each)(i,(r,o)=>{let a=(t&&f5(t,o))??null;if(R(r)&&!(r instanceof T)){switch(a?.type){case"color_scheme_group":{(0,_.each)(r,(s,l)=>{if(R(s)&&typeof s.settings=="object"&&s.settings){let h=s.settings;(0,_.each)(h,(u,c)=>{(0,_.find)(a.fields,{id:c})?.type==="color"&&u&&(s.id=l,h[c]=new S(u))})}});return}case"color":i[o]=S.get(r);return;default:break}i[o]=q3(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 g5(n,e,t){let i=[];return(0,_.each)(e,(r,o)=>{if(R(r)&&!(r instanceof x)&&!(r instanceof T))i.push(...g5(n,r,t));else{let a=f5(t,o);a?.type===n&&i.push({setting:a,value:r})}}),i}function rt(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 f5(n,e){for(let t of n||[])for(let i of t.fields)if(i.id===e)return i;return null}function wi(n){try{return r3.default.parse(n?.file_data||"{}")}catch(e){return console.warn(e),{}}}function yi(n){return n.includes('\\"')?JSON.parse(`"${n}"`):n}function Si(n){return n.replace(/\{\{.*?\}\}/g,yi)}function ki(n){let e=n.match(/\{%-?\s*schema\s*-?%\}(.*)\{%-?\s*endschema\s*-?%\}/s);return e===null?n:e[0]}function at(n,e){let t={settings:[]};return Array.isArray(n)&&(n[0]?.name==="theme_info"&&n.shift(),n.forEach(i=>{t.settings?.push(bi(i,e))})),t}function st(n){return typeof n.current=="string"&&n.presets?.[n.current]?n.presets[n.current]:typeof n.current=="object"?n.current||{}:{}}function lt(n){return Object.entries(n.presets||{}).map(([e,t])=>({label:e,settings:t}))}function ct(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=>A4(i,e)),blocks:(n.blocks||[]).map(i=>Li(i,e)),presets:(n.presets||[]).map(i=>ot(i,e)),default:n.default?ot(n.default,e):void 0}}function ht(n,e="en"){return{label:Z(n.name,e),type:n.type,order:n.order,sections:n.sections}}function Li(n,e){return{type:n.type,label:Z(n.name,e),limit:n.limit,fields:(n.settings||[]).map(i=>A4(i,e))}}function ot(n,e){return{label:Z(n.name,e),settings:n.settings,blocks:n.blocks}}function bi(n,e){return{label:Z(n.name,e),fields:(n.settings||[]).map(i=>A4(i,e))}}function A4(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=>A4(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(R(n)){let t=n[e];if(t)return t;let i=e.slice(0,2);return n[i]}return n}function dt(n){let e=n.lastIndexOf("_"),t=n.substring(0,e),i=n.substring(e+1),r=Ai[t];if(r){let o=r.variants[i];return`${r.family}:${o}`}return null}var Ai={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 F4={};F5(F4,{DeferredShopifyResource:()=>o3,ShopifyArticle:()=>E3,ShopifyBlog:()=>T4,ShopifyCart:()=>b3,ShopifyCollection:()=>G,ShopifyCollections:()=>M4,ShopifyCustomer:()=>e3,ShopifyFont:()=>v3,ShopifyForm:()=>U3,ShopifyLink:()=>R3,ShopifyLocalization:()=>_3,ShopifyOrder:()=>h3,ShopifyPage:()=>R4,ShopifyPaginate:()=>A3,ShopifyPredictiveSearch:()=>E4,ShopifyProduct:()=>v,ShopifyRecommendations:()=>v4,ShopifyResource:()=>y,ShopifySearch:()=>D4,ShopifyVariant:()=>K,adaptShopifyFontData:()=>j4,adaptShopifyFormData:()=>Z4,adaptShopifyMenuData:()=>x4});function E3(n,e,t){return e instanceof y?e.clone():(t&&(e.category=t),new y({author:d(e,i=>i.author?.name||i.author?.email),content:d(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:d(e,i=>i.id),image:d(e,i=>i.image&&B(n,i.image)),metafields:null,published_at:d(e,i=>i.date_published||i.date_created),tags:d(e,i=>i.tags),template_suffix:null,title:d(e,i=>i.title),updated_at:d(e,i=>i.date_updated||i.date_created),url:d([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 T4(n,e){if(e instanceof y)return e.clone();let t=d(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:d(e,i=>i.blogs?._cloneWithCompatibilityResult(r=>({results:r?.results?.map(o=>E3(n,o,i))}))||[]),articles_count:d(e.blogs,i=>i?.count||0),handle:w(()=>e.slug),id:d(e,i=>i.id),metafields:null,next_article:null,previous_article:null,tags:t,template_suffix:null,title:d(e,i=>i.title),url:d(e,i=>`/blogs/${i.slug}`),featured_image:d(e,i=>i.image),content:d(e,i=>i.content),"comments_enabled?":!1,moderated:!1})}var ut=require("lodash-es");function V3(n,e){let t=e.type==="range",i=e.type==="boolean";return new y({active_values:t?void 0:e.active_options?.map(r=>C3(n,r,e)),false_value:i?C3(n,{value:""},e):void 0,inactive_values:t?void 0:e.inactive_options?.map(r=>C3(n,r,e)),label:e.label,max_value:t?C3(n,{value:e.range_max},e,"lte"):void 0,min_value:t?C3(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?C3(n,{value:e.options?.[0].value},e):void 0,type:e.id==="price"?"price_range":i?"boolean":"list",url_to_remove:_i(n,`filter_${e.id}`,!0),values:e.id!=="price"&&e.options?.map(r=>C3(n,r,e))})}function C3(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:Pi(n,r,e.value),url_to_remove:Mi(n,t.param_name,e.value),value:Ti(n,e,t,i)})}function Ti(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 _4(n){return Object.keys(n).reduce((e,t)=>{let i=n[t];return i!==""&&(e[t]=(0,ut.isObject)(i)&&!Array.isArray(i)?_4(i):i),e},{})}function _i(n,e,t=!1){let{queryParams:i}=n.swell,r=$({..._4(i),...t?{[`${e}[gte]`]:void 0,[`${e}[lte]`]:void 0}:void 0,[e]:void 0,page:void 0});return k5(n,r)}function Mi(n,e,t){let{queryParams:i}=n.swell,r=$({..._4(i),[e]:Array.isArray(i[e])?i[e].filter(o=>o!==t):void 0,page:void 0});return k5(n,r)}function Pi(n,e,t){let{queryParams:i}=n.swell,r=$({..._4(i),[e]:Array.isArray(i[e])?i[e].concat(t):typeof i[e]=="string"?[i[e],t]:t,page:void 0});return k5(n,r)}function k5(n,e){let{url:t}=n.swell;return`${t.pathname}${e?`?${e}`:""}`}function G(n,e){if(e instanceof y)return e.clone();let t=d(e,r=>r.products?._cloneWithCompatibilityResult(o=>({results:o?.results?.map(a=>v(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:d(e,r=>r.sort_options?.[0].value),description:d(e,r=>r.description),featured_image:d(e,r=>r.images?.[0]&&B(n,r.images[0])),filters:w(async()=>(await i())?.filter_options?.map(r=>V3(n,r))||[]),handle:w(()=>e.slug),id:d(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:d(e,r=>r.sort_options),tags:[],template_suffix:null,title:w(()=>e.name),url:d(e,r=>`/collections/${r.slug}`)})}function M4(n,e){return new L(n.swell,e._collection,e._query,async()=>{let t=(await e.results)?.map(i=>G(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 v3(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=>v3(n,t)),weight:e.weight})}var Ei={account_login:{params:()=>({password_needed:!0})}};function U3(n,e){if(e instanceof y)return e.clone();let t=Ei[e.id];return new y({...t?.params?.(e)||void 0,errors:e.errors&&new b5(e.errors),"posted_successfully?":e.success})}var L5=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}},b5=class n{errors;pointer=0;messages;translated_fields;constructor(e){return this.errors=Array.from(e).map(t=>new L5(t)),this.messages=new P4(this.errors,this.errors.map(t=>t.message)),this.translated_fields=new P4(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)}},P4=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 mt=require("lodash-es");function R3(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,mt.snakeCase)(t.name)}`,levels:t.levels,links:t.items?.map(r=>R3(n,t,r)),object:t.resource,title:t.name,type:vi(t.type),url:t.url})}function vi(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 E4(n,e){return e instanceof y?e.clone():new y({performed:d(e,t=>t.performed),resources:Ri(n,e),terms:w(()=>e.query),types:["product"]})}function Ri(n,e){return e instanceof y?e.clone():new y({products:d(e.products,t=>t?.results?.map(i=>{let r=v(n,i);return r.object_type="product",r}))})}function v4(n,e){return e instanceof y?e.clone():new y({products:d(e,t=>(t?.recommendations||[]).map(i=>v(n,i))),products_count:d(e,t=>t?.recommendations?.length||0),performed:!0})}function R4(n,e){return e instanceof y?e.clone():new y({content:d(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:d(e,t=>t.title||t.name),url:d(e,t=>`/pages/${t.slug}`),author:null})}function D4(n,e){if(e instanceof y)return e.clone();let t=d(e,i=>i.products?._cloneWithCompatibilityResult(r=>({results:r?.results?.map(o=>{let a=v(n,o);return a.object_type="product",a})}))||[]);return new y({default_sort_by:d(e,i=>i.sort_options?.[0].value),filters:w(async()=>(await(await t.resolve())?.filter_options)?.map(r=>V3(n,r))||[]),performed:d(e,i=>i.performed),results:t,results_count:w(async()=>(await t.resolve())?.count||0),sort_by:w(()=>e.sort),sort_options:d(e,i=>i.sort_options),terms:w(()=>e.query),types:["product"]})}function x4(n,e){let t={...e,handle:e.id.replace(/_/g,"-"),title:e.name};return{...t,links:e.items?.map(i=>R3(n,t,i))}}function j4(n,e){return v3(n,e)}function Z4(n,e){return U3(n,e)}function A5(n,e){let t=e.currencies.find(i=>i.code===e.currency);return{accepts_gift_cards:!0,address:{},brand:{},collections_count:w(async()=>{let{count:i}=await n.swell.storefront.categories.list({limit:1});return i}),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_locales:[],enabled_payment_types:[],id:e.id,locale:e.locale,metafields:{},metaobjects:{},money_format:`${t.symbol}{{amount}}`,money_with_currency_format:`${t.symbol}{{amount}} ${t.code}`,name:e.name,password_message:"",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,taxes_included:!1,products_count:w(async()=>{let{count:i}=await n.swell.storefront.products.list({limit:1});return i})}}var pt=require("liquidjs"),$3=class extends pt.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 Ct=require("liquidjs");var T5=class extends A{constructor(e){super(e,"categories","all",{},()=>({id:"all",slug:"all",name:"Products",products:new L(e,"products")}))}},K3=class extends Ct.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=G(this.#e,new T5(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=G(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=>G(this.#e,t)))),this.#i.values()}};var M3=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 K3(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 $3(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:P3(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]:P3(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 T&&(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?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?A5(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=g5("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="${x.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:ki(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=r3.default.parse(i?.file_data)||void 0}catch(r){console.warn(r)}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 w5(e,this.getTemplateSchema.bind(this))}async getPageSections(e,t=!0){let i=await b4(e,r=>this.getSectionSchema(r));if(t)for(let r of i){let{schema:o}=r;o?.fields&&this.globals&&r.settings&&(r.settings=L4(this,r))}return i}async getPageSectionGroups(e){let t=await this.getThemeTemplateConfigByType("templates",e);if(t===null)return[];let r=wi(t).layout||"theme",o=await this.getThemeTemplateConfigByType("layouts",`${r}.liquid`);if(o===null)return[];let s=o.file_data.matchAll(/\bsections '(\w.*?)'|(\bcontent_for_layout\b)/gm),l=[];for(let h of s)if(h[1]){let u=h[1]||h[2],C=(await this.getSectionSchema(u))?.label||u,m=await this.getThemeTemplateConfigByType("sections",`${u}.json`);l.push({prop:p3(u),label:C,source:m?.file_path})}else h[2]&&l.push({prop:O3,label:"Template",source:t.file_path});return l}async getLayoutSectionGroups(e=!0){let t=await this.getThemeConfigsByPath("theme/sections/"),i=await y5(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=L4(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?L4(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>${S5(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,_.get)(t,l),u=(0,_.get)(h?.[e],s)||(0,_.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)}},B3=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}},G3=class extends B3{constructor(e="Page not found",t=404,i){super(e,t,i)}};function L4(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:q3(n,a.settings,i.blocks?.filter(s=>s.type===a.type))})),{...t,section:{...t.section,settings:q3(n,t.section.settings,r),blocks:o}}}function fi(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 q3(n,e,t){let i=(0,_.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,_.each)(i,(r,o)=>{let a=(t&&f5(t,o))??null;if(R(r)&&!(r instanceof T)){switch(a?.type){case"color_scheme_group":{(0,_.each)(r,(s,l)=>{if(R(s)&&typeof s.settings=="object"&&s.settings){let h=s.settings;(0,_.each)(h,(u,c)=>{(0,_.find)(a.fields,{id:c})?.type==="color"&&u&&(s.id=l,h[c]=new S(u))})}});return}case"color":i[o]=S.get(r);return;default:break}i[o]=q3(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 g5(n,e,t){let i=[];return(0,_.each)(e,(r,o)=>{if(R(r)&&!(r instanceof x)&&!(r instanceof T))i.push(...g5(n,r,t));else{let a=f5(t,o);a?.type===n&&i.push({setting:a,value:r})}}),i}function rt(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 f5(n,e){for(let t of n||[])for(let i of t.fields)if(i.id===e)return i;return null}function wi(n){try{return r3.default.parse(n?.file_data||"{}")}catch(e){return console.warn(e),{}}}function yi(n){return n.includes('\\"')?JSON.parse(`"${n}"`):n}function Si(n){return n.replace(/\{\{.*?\}\}/g,yi)}function ki(n){let e=n.match(/\{%-?\s*schema\s*-?%\}(.*)\{%-?\s*endschema\s*-?%\}/s);return e===null?n:e[0]}function at(n,e){let t={settings:[]};return Array.isArray(n)&&(n[0]?.name==="theme_info"&&n.shift(),n.forEach(i=>{t.settings?.push(bi(i,e))})),t}function st(n){return typeof n.current=="string"&&n.presets?.[n.current]?n.presets[n.current]:typeof n.current=="object"?n.current||{}:{}}function lt(n){return Object.entries(n.presets||{}).map(([e,t])=>({label:e,settings:t}))}function ct(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=>A4(i,e)),blocks:(n.blocks||[]).map(i=>Li(i,e)),presets:(n.presets||[]).map(i=>ot(i,e)),default:n.default?ot(n.default,e):void 0}}function ht(n,e="en"){return{label:Z(n.name,e),type:n.type,order:n.order,sections:n.sections}}function Li(n,e){return{type:n.type,label:Z(n.name,e),limit:n.limit,fields:(n.settings||[]).map(i=>A4(i,e))}}function ot(n,e){return{label:Z(n.name,e),settings:n.settings,blocks:n.blocks}}function bi(n,e){return{label:Z(n.name,e),fields:(n.settings||[]).map(i=>A4(i,e))}}function A4(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=>A4(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(R(n)){let t=n[e];if(t)return t;let i=e.slice(0,2);return n[i]}return n}function dt(n){let e=n.lastIndexOf("_"),t=n.substring(0,e),i=n.substring(e+1),r=Ai[t];if(r){let o=r.variants[i];return`${r.family}:${o}`}return null}var Ai={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 F4={};F5(F4,{DeferredShopifyResource:()=>o3,ShopifyArticle:()=>E3,ShopifyBlog:()=>T4,ShopifyCart:()=>b3,ShopifyCollection:()=>G,ShopifyCollections:()=>M4,ShopifyCustomer:()=>e3,ShopifyFont:()=>v3,ShopifyForm:()=>U3,ShopifyLink:()=>R3,ShopifyLocalization:()=>_3,ShopifyOrder:()=>h3,ShopifyPage:()=>R4,ShopifyPaginate:()=>A3,ShopifyPredictiveSearch:()=>E4,ShopifyProduct:()=>v,ShopifyRecommendations:()=>v4,ShopifyResource:()=>y,ShopifySearch:()=>D4,ShopifyVariant:()=>K,adaptShopifyFontData:()=>j4,adaptShopifyFormData:()=>Z4,adaptShopifyMenuData:()=>x4});function E3(n,e,t){return e instanceof y?e.clone():(t&&(e.category=t),new y({author:d(e,i=>i.author?.name||i.author?.email),content:d(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:d(e,i=>i.id),image:d(e,i=>i.image&&B(n,i.image)),metafields:null,published_at:d(e,i=>i.date_published||i.date_created),tags:d(e,i=>i.tags),template_suffix:null,title:d(e,i=>i.title),updated_at:d(e,i=>i.date_updated||i.date_created),url:d([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 T4(n,e){if(e instanceof y)return e.clone();let t=d(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:d(e,i=>i.blogs?._cloneWithCompatibilityResult(r=>({results:r?.results?.map(o=>E3(n,o,i))}))||[]),articles_count:d(e.blogs,i=>i?.count||0),handle:w(()=>e.slug),id:d(e,i=>i.id),metafields:null,next_article:null,previous_article:null,tags:t,template_suffix:null,title:d(e,i=>i.title),url:d(e,i=>`/blogs/${i.slug}`),featured_image:d(e,i=>i.image),content:d(e,i=>i.content),"comments_enabled?":!1,moderated:!1})}var ut=require("lodash-es");function V3(n,e){let t=e.type==="range",i=e.type==="boolean";return new y({active_values:t?void 0:e.active_options?.map(r=>C3(n,r,e)),false_value:i?C3(n,{value:""},e):void 0,inactive_values:t?void 0:e.inactive_options?.map(r=>C3(n,r,e)),label:e.label,max_value:t?C3(n,{value:e.range_max},e,"lte"):void 0,min_value:t?C3(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?C3(n,{value:e.options?.[0].value},e):void 0,type:e.id==="price"?"price_range":i?"boolean":"list",url_to_remove:_i(n,`filter_${e.id}`,!0),values:e.id!=="price"&&e.options?.map(r=>C3(n,r,e))})}function C3(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:Pi(n,r,e.value),url_to_remove:Mi(n,t.param_name,e.value),value:Ti(n,e,t,i)})}function Ti(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 _4(n){return Object.keys(n).reduce((e,t)=>{let i=n[t];return i!==""&&(e[t]=(0,ut.isObject)(i)&&!Array.isArray(i)?_4(i):i),e},{})}function _i(n,e,t=!1){let{queryParams:i}=n.swell,r=$({..._4(i),...t?{[`${e}[gte]`]:void 0,[`${e}[lte]`]:void 0}:void 0,[e]:void 0,page:void 0});return k5(n,r)}function Mi(n,e,t){let{queryParams:i}=n.swell,r=$({..._4(i),[e]:Array.isArray(i[e])?i[e].filter(o=>o!==t):void 0,page:void 0});return k5(n,r)}function Pi(n,e,t){let{queryParams:i}=n.swell,r=$({..._4(i),[e]:Array.isArray(i[e])?i[e].concat(t):typeof i[e]=="string"?[i[e],t]:t,page:void 0});return k5(n,r)}function k5(n,e){let{url:t}=n.swell;return`${t.pathname}${e?`?${e}`:""}`}function G(n,e){if(e instanceof y)return e.clone();let t=d(e,r=>r.products?._cloneWithCompatibilityResult(o=>({results:o?.results?.map(a=>v(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:d(e,r=>r.sort_options?.[0].value),description:d(e,r=>r.description),featured_image:d(e,r=>r.images?.[0]&&B(n,r.images[0])),filters:w(async()=>(await i())?.filter_options?.map(r=>V3(n,r))||[]),handle:w(()=>e.slug),id:d(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:d(e,r=>r.sort_options),tags:[],template_suffix:null,title:w(()=>e.name),url:d(e,r=>`/collections/${r.slug}`)})}function M4(n,e){return new L(n.swell,e._collection,e._query,async()=>{let t=(await e.results)?.map(i=>G(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 v3(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=>v3(n,t)),weight:e.weight})}var Ei={account_login:{params:()=>({password_needed:!0})}};function U3(n,e){if(e instanceof y)return e.clone();let t=Ei[e.id];return new y({...t?.params?.(e)||void 0,errors:e.errors&&new b5(e.errors),"posted_successfully?":e.success})}var L5=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}},b5=class n{errors;pointer=0;messages;translated_fields;constructor(e){return this.errors=Array.from(e).map(t=>new L5(t)),this.messages=new P4(this.errors,this.errors.map(t=>t.message)),this.translated_fields=new P4(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)}},P4=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 mt=require("lodash-es");function R3(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,mt.snakeCase)(t.name)}`,levels:t.levels,links:t.items?.map(r=>R3(n,t,r)),object:t.resource,title:t.name,type:vi(t.type),url:t.url})}function vi(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 E4(n,e){return e instanceof y?e.clone():new y({performed:d(e,t=>t.performed),resources:Ri(n,e),terms:w(()=>e.query),types:["product"]})}function Ri(n,e){return e instanceof y?e.clone():new y({products:d(e.products,t=>t?.results?.map(i=>{let r=v(n,i);return r.object_type="product",r}))})}function v4(n,e){return e instanceof y?e.clone():new y({products:d(e,t=>(t?.recommendations||[]).map(i=>v(n,i))),products_count:d(e,t=>t?.recommendations?.length||0),performed:!0})}function R4(n,e){return e instanceof y?e.clone():new y({content:d(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:d(e,t=>t.title||t.name),url:d(e,t=>`/pages/${t.slug}`),author:null})}function D4(n,e){if(e instanceof y)return e.clone();let t=d(e,i=>i.products?._cloneWithCompatibilityResult(r=>({results:r?.results?.map(o=>{let a=v(n,o);return a.object_type="product",a})}))||[]);return new y({default_sort_by:d(e,i=>i.sort_options?.[0].value),filters:w(async()=>(await(await t.resolve())?.filter_options)?.map(r=>V3(n,r))||[]),performed:d(e,i=>i.performed),results:t,results_count:w(async()=>(await t.resolve())?.count||0),sort_by:w(()=>e.sort),sort_options:d(e,i=>i.sort_options),terms:w(()=>e.query),types:["product"]})}function x4(n,e){let t={...e,handle:e.id.replace(/_/g,"-"),title:e.name};return{...t,links:e.items?.map(i=>R3(n,t,i))}}function j4(n,e){return v3(n,e)}function Z4(n,e){return U3(n,e)}function A5(n,e){let t=e.currencies.find(i=>i.code===e.currency)??{code:"USD",symbol:"$",name:"US Dollar"};return{accepts_gift_cards:!0,address:{},brand:{},collections_count:w(async()=>{let{count:i}=await n.swell.storefront.categories.list({limit:1});return i}),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_locales:[],enabled_payment_types:[],id:e.id,locale:e.locale,metafields:{},metaobjects:{},money_format:`${t.symbol}{{amount}}`,money_with_currency_format:`${t.symbol}{{amount}} ${t.code}`,name:e.name,password_message:"",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,taxes_included:!1,products_count:w(async()=>{let{count:i}=await n.swell.storefront.products.list({limit:1});return i})}}var pt=require("liquidjs"),$3=class extends pt.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 Ct=require("liquidjs");var T5=class extends A{constructor(e){super(e,"categories","all",{},()=>({id:"all",slug:"all",name:"Products",products:new L(e,"products")}))}},K3=class extends Ct.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=G(this.#e,new T5(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=G(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=>G(this.#e,t)))),this.#i.values()}};var M3=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 K3(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 $3(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:P3(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]:P3(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 T&&(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?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?A5(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"};
|