@ikas/storefront 0.2.0-alpha.7 → 0.2.0-alpha.8

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.
Files changed (56) hide show
  1. package/build/cjs/[slug]-256d483b.js +1 -0
  2. package/build/cjs/analytics.js +1 -1
  3. package/build/cjs/api.js +1 -1
  4. package/build/cjs/{base-6b93f997.js → base-3f6c0c18.js} +1 -1
  5. package/build/cjs/blog-category-list-301760cf.js +1 -0
  6. package/build/cjs/{cart-8b6a2951.js → cart-cdd60c45.js} +1 -1
  7. package/build/cjs/components.js +1 -1
  8. package/build/cjs/{en-e3cbabf6.js → en-39787a68.js} +0 -0
  9. package/build/cjs/{get-7400a559.js → get-9a974b32.js} +0 -0
  10. package/build/cjs/{i18n-0303b446.js → i18n-c9c8631c.js} +1 -1
  11. package/build/cjs/{index-7343404a.js → index-0102eb01.js} +1 -1
  12. package/build/cjs/{index-d04fee37.js → index-0e84ec4c.js} +1 -1
  13. package/build/cjs/{index-5b6bd214.js → index-346e3673.js} +1 -1
  14. package/build/cjs/{index-30376afa.js → index-557eda08.js} +1 -1
  15. package/build/cjs/{index-84548617.js → index-60458497.js} +1 -1
  16. package/build/cjs/{index-45530bb2.js → index-6b3fb1e9.js} +1 -1
  17. package/build/cjs/{index-af30c815.js → index-bb1c2b0f.js} +1 -1
  18. package/build/cjs/{index-2bed1aff.js → index-c5a4b4b2.js} +1 -1
  19. package/build/cjs/{index-c75f4868.js → index-dfb3bc66.js} +1 -1
  20. package/build/cjs/index.js +1 -1
  21. package/build/cjs/models.js +1 -1
  22. package/build/cjs/pages/index.d.ts +1 -1
  23. package/build/cjs/pages.js +1 -1
  24. package/build/cjs/store.js +1 -1
  25. package/build/cjs/{tr-c4424931.js → tr-b58ac020.js} +0 -0
  26. package/build/cjs/utils.js +1 -1
  27. package/build/esm/[slug]-a5af448c.js +1 -0
  28. package/build/esm/analytics.js +1 -1
  29. package/build/esm/api.js +1 -1
  30. package/build/esm/{base-5ced4c24.js → base-64b83211.js} +1 -1
  31. package/build/esm/{blog-category-list-00ac6ea3.js → blog-category-list-f9bde7de.js} +1 -1
  32. package/build/esm/{cart-38151cca.js → cart-a5410bc1.js} +1 -1
  33. package/build/esm/components.js +1 -1
  34. package/build/esm/{en-669af913.js → en-61fffa63.js} +0 -0
  35. package/build/esm/{get-17bc1d35.js → get-ade3f4d4.js} +0 -0
  36. package/build/esm/{i18n-2fdbe5db.js → i18n-faeafc92.js} +1 -1
  37. package/build/esm/{index-ea9fc314.js → index-2108fd47.js} +1 -1
  38. package/build/esm/{index-9ececcb5.js → index-3e13a5d9.js} +1 -1
  39. package/build/esm/{index-ac80179e.js → index-413970db.js} +1 -1
  40. package/build/esm/{index-a1d85224.js → index-42f5840b.js} +1 -1
  41. package/build/esm/{index-dbba4a4c.js → index-4adde2ba.js} +1 -1
  42. package/build/esm/{index-6eb9d822.js → index-63a08778.js} +1 -1
  43. package/build/esm/{index-a93921be.js → index-7a9b2ec6.js} +1 -1
  44. package/build/esm/{index-94c469ed.js → index-9157d480.js} +1 -1
  45. package/build/esm/{index-099b9743.js → index-dbaba7ab.js} +1 -1
  46. package/build/esm/index.js +1 -1
  47. package/build/esm/models.js +1 -1
  48. package/build/esm/pages/index.d.ts +1 -1
  49. package/build/esm/pages.js +1 -1
  50. package/build/esm/store.js +1 -1
  51. package/build/esm/{tr-69f8f304.js → tr-8305fadb.js} +0 -0
  52. package/build/esm/utils.js +1 -1
  53. package/package.json +1 -1
  54. package/build/cjs/[slug]-c3efec75.js +0 -1
  55. package/build/cjs/blog-category-list-617dc467.js +0 -1
  56. package/build/esm/[slug]-5be05d9d.js +0 -1
@@ -1 +1 @@
1
- import{_ as n,c as t,e}from"./get-17bc1d35.js";import{p as a,i,ah as r}from"./index-ea9fc314.js";import{x as d}from"./index-9ececcb5.js";var l,u,o=function(){function d(){}return d.listHTMLMetaData=function(d,u,o){return n(this,void 0,void 0,(function(){var n,s,p,c,g;return t(this,(function(t){switch(t.label){case 0:n=r(l||(l=e(["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "],["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{slug:d?{eq:d}:void 0,targetId:u?{eq:u}:void 0,targetType:o?{in:o}:void 0}})];case 2:return s=t.sent(),p=s.data,(c=s.errors)&&c.length?[2,[]]:[2,p.listHTMLMetaData.map((function(n){return new a(n)}))];case 3:return g=t.sent(),console.log(g),[2,[]];case 4:return[2]}}))}))},d}(),s=function(){function a(){}return a.list=function(a,l,o){return void 0===o&&(o=!1),n(this,void 0,void 0,(function(){var n,s,p,c,g;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),n=r(u||(u=e(["\n query ListProductOptionSet(\n $id: StringFilterInput!\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean!\n ) {\n listProductOptionSet(\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n id: $id\n ) {\n createdAt\n deleted\n id\n name\n options {\n createdAt\n dateSettings {\n max\n min\n }\n deleted\n fileSettings {\n allowedExtensions\n maxQuantity\n minQuantity\n }\n id\n isOptional\n name\n optionalText\n requiredOptionId\n requiredOptionValueIds\n order\n price\n selectSettings {\n maxSelect\n minSelect\n type\n values {\n createdAt\n deleted\n id\n order\n price\n updatedAt\n value\n thumbnailImageId\n colorCode\n }\n }\n textSettings {\n max\n min\n }\n type\n updatedAt\n }\n translations {\n locale\n options {\n id\n name\n optionalText\n values {\n id\n value\n }\n }\n }\n updatedAt\n }\n }\n "],["\n query ListProductOptionSet(\n $id: StringFilterInput!\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean!\n ) {\n listProductOptionSet(\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n id: $id\n ) {\n createdAt\n deleted\n id\n name\n options {\n createdAt\n dateSettings {\n max\n min\n }\n deleted\n fileSettings {\n allowedExtensions\n maxQuantity\n minQuantity\n }\n id\n isOptional\n name\n optionalText\n requiredOptionId\n requiredOptionValueIds\n order\n price\n selectSettings {\n maxSelect\n minSelect\n type\n values {\n createdAt\n deleted\n id\n order\n price\n updatedAt\n value\n thumbnailImageId\n colorCode\n }\n }\n textSettings {\n max\n min\n }\n type\n updatedAt\n }\n translations {\n locale\n options {\n id\n name\n optionalText\n values {\n id\n value\n }\n }\n }\n updatedAt\n }\n }\n "]))),[4,i.getClient().query({query:n,variables:{includeDeleted:o,updatedAt:{gt:l},id:{eq:a}}})];case 1:return s=t.sent(),p=s.data,(c=s.errors)&&c.length?(console.log(c),[2]):[2,{data:p.listProductOptionSet.map((function(n){return new d(n)}))}];case 2:return g=t.sent(),console.log(g),[3,3];case 3:return[2]}}))}))},a}();export{o as I,s as a};
1
+ import{_ as n,c as t,e}from"./get-ade3f4d4.js";import{p as a,i,ah as r}from"./index-2108fd47.js";import{x as d}from"./index-3e13a5d9.js";var l,u,o=function(){function d(){}return d.listHTMLMetaData=function(d,u,o){return n(this,void 0,void 0,(function(){var n,s,p,c,g;return t(this,(function(t){switch(t.label){case 0:n=r(l||(l=e(["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "],["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "]))),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{slug:d?{eq:d}:void 0,targetId:u?{eq:u}:void 0,targetType:o?{in:o}:void 0}})];case 2:return s=t.sent(),p=s.data,(c=s.errors)&&c.length?[2,[]]:[2,p.listHTMLMetaData.map((function(n){return new a(n)}))];case 3:return g=t.sent(),console.log(g),[2,[]];case 4:return[2]}}))}))},d}(),s=function(){function a(){}return a.list=function(a,l,o){return void 0===o&&(o=!1),n(this,void 0,void 0,(function(){var n,s,p,c,g;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),n=r(u||(u=e(["\n query ListProductOptionSet(\n $id: StringFilterInput!\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean!\n ) {\n listProductOptionSet(\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n id: $id\n ) {\n createdAt\n deleted\n id\n name\n options {\n createdAt\n dateSettings {\n max\n min\n }\n deleted\n fileSettings {\n allowedExtensions\n maxQuantity\n minQuantity\n }\n id\n isOptional\n name\n optionalText\n requiredOptionId\n requiredOptionValueIds\n order\n price\n selectSettings {\n maxSelect\n minSelect\n type\n values {\n createdAt\n deleted\n id\n order\n price\n updatedAt\n value\n thumbnailImageId\n colorCode\n }\n }\n textSettings {\n max\n min\n }\n type\n updatedAt\n }\n translations {\n locale\n options {\n id\n name\n optionalText\n values {\n id\n value\n }\n }\n }\n updatedAt\n }\n }\n "],["\n query ListProductOptionSet(\n $id: StringFilterInput!\n $updatedAt: DateFilterInput\n $includeDeleted: Boolean!\n ) {\n listProductOptionSet(\n updatedAt: $updatedAt\n includeDeleted: $includeDeleted\n id: $id\n ) {\n createdAt\n deleted\n id\n name\n options {\n createdAt\n dateSettings {\n max\n min\n }\n deleted\n fileSettings {\n allowedExtensions\n maxQuantity\n minQuantity\n }\n id\n isOptional\n name\n optionalText\n requiredOptionId\n requiredOptionValueIds\n order\n price\n selectSettings {\n maxSelect\n minSelect\n type\n values {\n createdAt\n deleted\n id\n order\n price\n updatedAt\n value\n thumbnailImageId\n colorCode\n }\n }\n textSettings {\n max\n min\n }\n type\n updatedAt\n }\n translations {\n locale\n options {\n id\n name\n optionalText\n values {\n id\n value\n }\n }\n }\n updatedAt\n }\n }\n "]))),[4,i.getClient().query({query:n,variables:{includeDeleted:o,updatedAt:{gt:l},id:{eq:a}}})];case 1:return s=t.sent(),p=s.data,(c=s.errors)&&c.length?(console.log(c),[2]):[2,{data:p.listProductOptionSet.map((function(n){return new d(n)}))}];case 2:return g=t.sent(),console.log(g),[3,3];case 3:return[2]}}))}))},a}();export{o as I,s as a};
@@ -1 +1 @@
1
- export{IkasStorefrontConfig}from"./storefront.js";export{f as IkasBlog,I as IkasBlogAPI,k as IkasBlogCategory,g as IkasBlogContent,j as IkasBlogMetaData,i as IkasBlogMetadataTargetType,l as IkasBlogTag,h as IkasBlogWriter,a as IkasBrandAPI,b as IkasCategoryAPI,c as IkasCityAPI,d as IkasDistrictAPI,w as IkasProductOption,t as IkasProductOptionDateSettings,v as IkasProductOptionFileSettings,s as IkasProductOptionSelectSettings,n as IkasProductOptionSelectType,r as IkasProductOptionSelectValue,o as IkasProductOptionSelectValueTranslations,x as IkasProductOptionSet,q as IkasProductOptionSetTranslations,u as IkasProductOptionTextSettings,p as IkasProductOptionTranslations,m as IkasProductOptionType,e as IkasStateAPI}from"./index-9ececcb5.js";export{I as IkasCartAPI}from"./index-a1d85224.js";export{ag as Analytics,V as IkasAmountTypeEnum,a0 as IkasApplicableProductFilterValue,j as IkasBrand,k as IkasCategory,m as IkasCategoryPath,H as IkasCheckout,I as IkasCheckoutAPI,J as IkasCheckoutCustomer,M as IkasCheckoutRecoveryEmailStatus,N as IkasCheckoutRecoveryStatus,L as IkasCheckoutStatus,g as IkasContactFormAPI,a as IkasCountryAPI,n as IkasCustomer,b as IkasCustomerAPI,Q as IkasCustomerAddress,o as IkasCustomerReview,c as IkasCustomerReviewAPI,af as IkasCustomerReviewList,C as IkasFavoriteProduct,f as IkasFavoriteProductAPI,l as IkasFilterCategory,p as IkasHTMLMetaData,q as IkasHTMLMetaDataTargetType,r as IkasImage,d as IkasMerchantAPI,R as IkasMerchantSettings,S as IkasOrder,U as IkasOrderCancelledReason,s as IkasOrderLineItem,Y as IkasOrderPackageFulfillStatus,X as IkasOrderPackageStatus,W as IkasOrderPaymentStatus,t as IkasOrderRefundSettings,Z as IkasOrderShippingMethod,T as IkasOrderStatus,E as IkasOrderTransaction,O as IkasPaymentMethod,u as IkasProduct,z as IkasProductAttribute,A as IkasProductAttributeType,B as IkasProductAttributeValue,h as IkasProductBackInStockReminderAPI,ae as IkasProductDetail,$ as IkasProductFilter,a4 as IkasProductFilterDisplayType,a2 as IkasProductFilterSettings,a5 as IkasProductFilterSortType,a3 as IkasProductFilterType,a1 as IkasProductFilterValue,y as IkasProductPrice,e as IkasProductSearchAPI,v as IkasProductType,x as IkasProductVariant,w as IkasProductVariantType,K as IkasShippingMethod,P as IkasShippingMethodEnum,aa as IkasThemePage,ac as IkasThemePageComponent,ab as IkasThemePageType,ad as IkasThemeSettings,F as IkasTransactionStatusEnum,G as IkasTransactionTypeEnum,a9 as IkasVariantSelectionType,a8 as IkasVariantType,D as IkasVariantValue,_ as OrderLineItemStatusEnum,a6 as RangeValue,i as apollo,a7 as parseRangeStr}from"./index-ea9fc314.js";export{I as IkasHTMLMetaDataAPI,a as IkasProductOptionSetAPI}from"./index-099b9743.js";export{I as IkasProductAttributeAPI,a as IkasVariantTypeAPI}from"./index-a93921be.js";export{I as IkasPage,a as IkasPageHead,b as Image}from"./index-94c469ed.js";export{I as IkasPageEditor}from"./index-dbba4a4c.js";export{j as IkasBlogCategoryListPropValue,i as IkasBlogCategoryPropValue,h as IkasBlogListPropValue,g as IkasBlogPropValue,b as IkasBrandListPropValue,a as IkasBrandPropValue,f as IkasCategoryListPropValue,e as IkasCategoryPropValue,I as IkasContactForm,d as IkasProductDetailPropValue,c as IkasProductListPropValue}from"./blog-category-list-00ac6ea3.js";export{t as AccountInfoForm,A as AddressForm,C as ContactForm,u as CustomerReviewForm,K as EmailRule,N as EqualsRule,F as ForgotPasswordForm,z as IkasAttributeDetail,B as IkasAttributeList,x as IkasBlogCategoryList,y as IkasBlogCategoryListType,v as IkasBlogList,w as IkasBlogListType,i as IkasBrandList,k as IkasBrandListSortType,j as IkasBrandListType,I as IkasCardAssociation,a as IkasCardType,l as IkasCategoryList,n as IkasCategoryListSortType,m as IkasCategoryListType,O as IkasComponentRenderer,f as IkasLinkPropValue,g as IkasLinkType,o as IkasNavigationLink,p as IkasProductList,r as IkasProductListSortType,q as IkasProductListType,b as IkasTheme,c as IkasThemeComponent,d as IkasThemeComponentProp,e as IkasThemeComponentPropType,h as IkasThemeCustomData,J as LessThanRule,L as LoginForm,G as MaxRule,M as MinRule,P as PhoneRule,s as RecoverPasswordForm,R as RegisterForm,H as RequiredRule,E as ValidationRule,V as Validator,D as ValidatorErrorType}from"./index-ac80179e.js";export{b as AccountPage,d as AddressesPage,q as BlogPage,t as BlogSlugPage,m as CartPage,c as CheckoutPage,_ as CustomPage,n as EditorPage,o as FavoriteProductsPage,j as ForgotPasswordPage,h as IndexPage,l as LoginPage,p as NotFoundPage,f as OrderDetailPage,e as OrdersPage,k as RecoverPasswordPage,r as RegisterPage,s as SearchPage,i as SlugPage,g as SlugPageGetStaticPath,a as SlugPageGetStaticProps}from"./[slug]-5be05d9d.js";export{I as IkasBaseStore}from"./base-5ced4c24.js";export{c as createTranslationInputData,f as formatMoney,u as useTranslation}from"./i18n-2fdbe5db.js";export{d as decodeBase64,f as findAllIndexes,b as formatDate,p as pascalCase,a as stringSorter,s as stringToSlug,t as tryForEach,v as validatePhoneNumber}from"./get-17bc1d35.js";export{a as AnalyticsBody,A as AnalyticsHead}from"./index-6eb9d822.js";import"mobx";import"react";import"mobx-react-lite";import"next/router";import"crypto";import"./cart-38151cca.js";import"next/head";import"next/image";import"next/link";import"next/dynamic";import"next/error";import"fs";import"next/config";import"path";
1
+ export{IkasStorefrontConfig}from"./storefront.js";export{f as IkasBlog,I as IkasBlogAPI,k as IkasBlogCategory,g as IkasBlogContent,j as IkasBlogMetaData,i as IkasBlogMetadataTargetType,l as IkasBlogTag,h as IkasBlogWriter,a as IkasBrandAPI,b as IkasCategoryAPI,c as IkasCityAPI,d as IkasDistrictAPI,w as IkasProductOption,t as IkasProductOptionDateSettings,v as IkasProductOptionFileSettings,s as IkasProductOptionSelectSettings,n as IkasProductOptionSelectType,r as IkasProductOptionSelectValue,o as IkasProductOptionSelectValueTranslations,x as IkasProductOptionSet,q as IkasProductOptionSetTranslations,u as IkasProductOptionTextSettings,p as IkasProductOptionTranslations,m as IkasProductOptionType,e as IkasStateAPI}from"./index-3e13a5d9.js";export{I as IkasCartAPI}from"./index-42f5840b.js";export{ag as Analytics,V as IkasAmountTypeEnum,a0 as IkasApplicableProductFilterValue,j as IkasBrand,k as IkasCategory,m as IkasCategoryPath,H as IkasCheckout,I as IkasCheckoutAPI,J as IkasCheckoutCustomer,M as IkasCheckoutRecoveryEmailStatus,N as IkasCheckoutRecoveryStatus,L as IkasCheckoutStatus,g as IkasContactFormAPI,a as IkasCountryAPI,n as IkasCustomer,b as IkasCustomerAPI,Q as IkasCustomerAddress,o as IkasCustomerReview,c as IkasCustomerReviewAPI,af as IkasCustomerReviewList,C as IkasFavoriteProduct,f as IkasFavoriteProductAPI,l as IkasFilterCategory,p as IkasHTMLMetaData,q as IkasHTMLMetaDataTargetType,r as IkasImage,d as IkasMerchantAPI,R as IkasMerchantSettings,S as IkasOrder,U as IkasOrderCancelledReason,s as IkasOrderLineItem,Y as IkasOrderPackageFulfillStatus,X as IkasOrderPackageStatus,W as IkasOrderPaymentStatus,t as IkasOrderRefundSettings,Z as IkasOrderShippingMethod,T as IkasOrderStatus,E as IkasOrderTransaction,O as IkasPaymentMethod,u as IkasProduct,z as IkasProductAttribute,A as IkasProductAttributeType,B as IkasProductAttributeValue,h as IkasProductBackInStockReminderAPI,ae as IkasProductDetail,$ as IkasProductFilter,a4 as IkasProductFilterDisplayType,a2 as IkasProductFilterSettings,a5 as IkasProductFilterSortType,a3 as IkasProductFilterType,a1 as IkasProductFilterValue,y as IkasProductPrice,e as IkasProductSearchAPI,v as IkasProductType,x as IkasProductVariant,w as IkasProductVariantType,K as IkasShippingMethod,P as IkasShippingMethodEnum,aa as IkasThemePage,ac as IkasThemePageComponent,ab as IkasThemePageType,ad as IkasThemeSettings,F as IkasTransactionStatusEnum,G as IkasTransactionTypeEnum,a9 as IkasVariantSelectionType,a8 as IkasVariantType,D as IkasVariantValue,_ as OrderLineItemStatusEnum,a6 as RangeValue,i as apollo,a7 as parseRangeStr}from"./index-2108fd47.js";export{I as IkasHTMLMetaDataAPI,a as IkasProductOptionSetAPI}from"./index-dbaba7ab.js";export{I as IkasProductAttributeAPI,a as IkasVariantTypeAPI}from"./index-7a9b2ec6.js";export{I as IkasPage,a as IkasPageHead,b as Image}from"./index-9157d480.js";export{I as IkasPageEditor}from"./index-4adde2ba.js";export{j as IkasBlogCategoryListPropValue,i as IkasBlogCategoryPropValue,h as IkasBlogListPropValue,g as IkasBlogPropValue,b as IkasBrandListPropValue,a as IkasBrandPropValue,f as IkasCategoryListPropValue,e as IkasCategoryPropValue,I as IkasContactForm,d as IkasProductDetailPropValue,c as IkasProductListPropValue}from"./blog-category-list-f9bde7de.js";export{t as AccountInfoForm,A as AddressForm,C as ContactForm,u as CustomerReviewForm,K as EmailRule,N as EqualsRule,F as ForgotPasswordForm,z as IkasAttributeDetail,B as IkasAttributeList,x as IkasBlogCategoryList,y as IkasBlogCategoryListType,v as IkasBlogList,w as IkasBlogListType,i as IkasBrandList,k as IkasBrandListSortType,j as IkasBrandListType,I as IkasCardAssociation,a as IkasCardType,l as IkasCategoryList,n as IkasCategoryListSortType,m as IkasCategoryListType,O as IkasComponentRenderer,f as IkasLinkPropValue,g as IkasLinkType,o as IkasNavigationLink,p as IkasProductList,r as IkasProductListSortType,q as IkasProductListType,b as IkasTheme,c as IkasThemeComponent,d as IkasThemeComponentProp,e as IkasThemeComponentPropType,h as IkasThemeCustomData,J as LessThanRule,L as LoginForm,G as MaxRule,M as MinRule,P as PhoneRule,s as RecoverPasswordForm,R as RegisterForm,H as RequiredRule,E as ValidationRule,V as Validator,D as ValidatorErrorType}from"./index-413970db.js";export{a as AccountPage,b as AddressesPage,o as BlogPage,p as BlogSlugPage,j as CartPage,c as CheckoutPage,_ as CustomPage,k as EditorPage,m as FavoriteProductsPage,f as ForgotPasswordPage,h as IndexPage,l as LoginPage,n as NotFoundPage,e as OrderDetailPage,d as OrdersPage,g as RecoverPasswordPage,r as RegisterPage,s as SearchPage,i as SlugPage}from"./[slug]-a5af448c.js";export{I as IkasBaseStore}from"./base-64b83211.js";export{c as createTranslationInputData,f as formatMoney,u as useTranslation}from"./i18n-faeafc92.js";export{d as decodeBase64,f as findAllIndexes,b as formatDate,p as pascalCase,a as stringSorter,s as stringToSlug,t as tryForEach,v as validatePhoneNumber}from"./get-ade3f4d4.js";export{a as AnalyticsBody,A as AnalyticsHead}from"./index-63a08778.js";import"mobx";import"react";import"mobx-react-lite";import"next/router";import"crypto";import"./cart-a5410bc1.js";import"next/head";import"next/image";import"next/link";import"next/dynamic";import"next/error";import"fs";import"next/config";import"path";
@@ -1 +1 @@
1
- export{f as IkasBlog,k as IkasBlogCategory,g as IkasBlogContent,j as IkasBlogMetaData,i as IkasBlogMetadataTargetType,l as IkasBlogTag,h as IkasBlogWriter,w as IkasProductOption,t as IkasProductOptionDateSettings,v as IkasProductOptionFileSettings,s as IkasProductOptionSelectSettings,n as IkasProductOptionSelectType,r as IkasProductOptionSelectValue,o as IkasProductOptionSelectValueTranslations,x as IkasProductOptionSet,q as IkasProductOptionSetTranslations,u as IkasProductOptionTextSettings,p as IkasProductOptionTranslations,m as IkasProductOptionType}from"./index-9ececcb5.js";export{V as IkasAmountTypeEnum,a0 as IkasApplicableProductFilterValue,j as IkasBrand,k as IkasCategory,m as IkasCategoryPath,H as IkasCheckout,J as IkasCheckoutCustomer,M as IkasCheckoutRecoveryEmailStatus,N as IkasCheckoutRecoveryStatus,L as IkasCheckoutStatus,n as IkasCustomer,Q as IkasCustomerAddress,o as IkasCustomerReview,af as IkasCustomerReviewList,C as IkasFavoriteProduct,l as IkasFilterCategory,p as IkasHTMLMetaData,q as IkasHTMLMetaDataTargetType,r as IkasImage,R as IkasMerchantSettings,S as IkasOrder,U as IkasOrderCancelledReason,s as IkasOrderLineItem,Y as IkasOrderPackageFulfillStatus,X as IkasOrderPackageStatus,W as IkasOrderPaymentStatus,t as IkasOrderRefundSettings,Z as IkasOrderShippingMethod,T as IkasOrderStatus,E as IkasOrderTransaction,O as IkasPaymentMethod,u as IkasProduct,z as IkasProductAttribute,A as IkasProductAttributeType,B as IkasProductAttributeValue,ae as IkasProductDetail,$ as IkasProductFilter,a4 as IkasProductFilterDisplayType,a2 as IkasProductFilterSettings,a5 as IkasProductFilterSortType,a3 as IkasProductFilterType,a1 as IkasProductFilterValue,y as IkasProductPrice,v as IkasProductType,x as IkasProductVariant,w as IkasProductVariantType,K as IkasShippingMethod,P as IkasShippingMethodEnum,aa as IkasThemePage,ac as IkasThemePageComponent,ab as IkasThemePageType,ad as IkasThemeSettings,F as IkasTransactionStatusEnum,G as IkasTransactionTypeEnum,a9 as IkasVariantSelectionType,a8 as IkasVariantType,D as IkasVariantValue,_ as OrderLineItemStatusEnum,a6 as RangeValue,a7 as parseRangeStr}from"./index-ea9fc314.js";export{t as AccountInfoForm,A as AddressForm,C as ContactForm,u as CustomerReviewForm,K as EmailRule,N as EqualsRule,F as ForgotPasswordForm,z as IkasAttributeDetail,B as IkasAttributeList,x as IkasBlogCategoryList,y as IkasBlogCategoryListType,v as IkasBlogList,w as IkasBlogListType,i as IkasBrandList,k as IkasBrandListSortType,j as IkasBrandListType,I as IkasCardAssociation,a as IkasCardType,l as IkasCategoryList,n as IkasCategoryListSortType,m as IkasCategoryListType,O as IkasComponentRenderer,f as IkasLinkPropValue,g as IkasLinkType,o as IkasNavigationLink,p as IkasProductList,r as IkasProductListSortType,q as IkasProductListType,b as IkasTheme,c as IkasThemeComponent,d as IkasThemeComponentProp,e as IkasThemeComponentPropType,h as IkasThemeCustomData,J as LessThanRule,L as LoginForm,G as MaxRule,M as MinRule,P as PhoneRule,s as RecoverPasswordForm,R as RegisterForm,H as RequiredRule,E as ValidationRule,V as Validator,D as ValidatorErrorType}from"./index-ac80179e.js";export{j as IkasBlogCategoryListPropValue,i as IkasBlogCategoryPropValue,h as IkasBlogListPropValue,g as IkasBlogPropValue,b as IkasBrandListPropValue,a as IkasBrandPropValue,f as IkasCategoryListPropValue,e as IkasCategoryPropValue,I as IkasContactForm,d as IkasProductDetailPropValue,c as IkasProductListPropValue}from"./blog-category-list-00ac6ea3.js";import"./get-17bc1d35.js";import"./storefront.js";import"mobx";
1
+ export{f as IkasBlog,k as IkasBlogCategory,g as IkasBlogContent,j as IkasBlogMetaData,i as IkasBlogMetadataTargetType,l as IkasBlogTag,h as IkasBlogWriter,w as IkasProductOption,t as IkasProductOptionDateSettings,v as IkasProductOptionFileSettings,s as IkasProductOptionSelectSettings,n as IkasProductOptionSelectType,r as IkasProductOptionSelectValue,o as IkasProductOptionSelectValueTranslations,x as IkasProductOptionSet,q as IkasProductOptionSetTranslations,u as IkasProductOptionTextSettings,p as IkasProductOptionTranslations,m as IkasProductOptionType}from"./index-3e13a5d9.js";export{V as IkasAmountTypeEnum,a0 as IkasApplicableProductFilterValue,j as IkasBrand,k as IkasCategory,m as IkasCategoryPath,H as IkasCheckout,J as IkasCheckoutCustomer,M as IkasCheckoutRecoveryEmailStatus,N as IkasCheckoutRecoveryStatus,L as IkasCheckoutStatus,n as IkasCustomer,Q as IkasCustomerAddress,o as IkasCustomerReview,af as IkasCustomerReviewList,C as IkasFavoriteProduct,l as IkasFilterCategory,p as IkasHTMLMetaData,q as IkasHTMLMetaDataTargetType,r as IkasImage,R as IkasMerchantSettings,S as IkasOrder,U as IkasOrderCancelledReason,s as IkasOrderLineItem,Y as IkasOrderPackageFulfillStatus,X as IkasOrderPackageStatus,W as IkasOrderPaymentStatus,t as IkasOrderRefundSettings,Z as IkasOrderShippingMethod,T as IkasOrderStatus,E as IkasOrderTransaction,O as IkasPaymentMethod,u as IkasProduct,z as IkasProductAttribute,A as IkasProductAttributeType,B as IkasProductAttributeValue,ae as IkasProductDetail,$ as IkasProductFilter,a4 as IkasProductFilterDisplayType,a2 as IkasProductFilterSettings,a5 as IkasProductFilterSortType,a3 as IkasProductFilterType,a1 as IkasProductFilterValue,y as IkasProductPrice,v as IkasProductType,x as IkasProductVariant,w as IkasProductVariantType,K as IkasShippingMethod,P as IkasShippingMethodEnum,aa as IkasThemePage,ac as IkasThemePageComponent,ab as IkasThemePageType,ad as IkasThemeSettings,F as IkasTransactionStatusEnum,G as IkasTransactionTypeEnum,a9 as IkasVariantSelectionType,a8 as IkasVariantType,D as IkasVariantValue,_ as OrderLineItemStatusEnum,a6 as RangeValue,a7 as parseRangeStr}from"./index-2108fd47.js";export{t as AccountInfoForm,A as AddressForm,C as ContactForm,u as CustomerReviewForm,K as EmailRule,N as EqualsRule,F as ForgotPasswordForm,z as IkasAttributeDetail,B as IkasAttributeList,x as IkasBlogCategoryList,y as IkasBlogCategoryListType,v as IkasBlogList,w as IkasBlogListType,i as IkasBrandList,k as IkasBrandListSortType,j as IkasBrandListType,I as IkasCardAssociation,a as IkasCardType,l as IkasCategoryList,n as IkasCategoryListSortType,m as IkasCategoryListType,O as IkasComponentRenderer,f as IkasLinkPropValue,g as IkasLinkType,o as IkasNavigationLink,p as IkasProductList,r as IkasProductListSortType,q as IkasProductListType,b as IkasTheme,c as IkasThemeComponent,d as IkasThemeComponentProp,e as IkasThemeComponentPropType,h as IkasThemeCustomData,J as LessThanRule,L as LoginForm,G as MaxRule,M as MinRule,P as PhoneRule,s as RecoverPasswordForm,R as RegisterForm,H as RequiredRule,E as ValidationRule,V as Validator,D as ValidatorErrorType}from"./index-413970db.js";export{j as IkasBlogCategoryListPropValue,i as IkasBlogCategoryPropValue,h as IkasBlogListPropValue,g as IkasBlogPropValue,b as IkasBrandListPropValue,a as IkasBrandPropValue,f as IkasCategoryListPropValue,e as IkasCategoryPropValue,I as IkasContactForm,d as IkasProductDetailPropValue,c as IkasProductListPropValue}from"./blog-category-list-f9bde7de.js";import"./get-ade3f4d4.js";import"./storefront.js";import"mobx";
@@ -1,5 +1,5 @@
1
1
  export * as IndexPage from "./home";
2
- export { default as SlugPage, getStaticPaths as SlugPageGetStaticPath, getStaticProps as SlugPageGetStaticProps, } from "./[slug]/index";
2
+ export * as SlugPage from "./[slug]/index";
3
3
  export * as CustomPage from "./pages/[slug]";
4
4
  export * as CheckoutPage from "./checkout";
5
5
  export * as AccountPage from "./account/index";
@@ -1 +1 @@
1
- export{b as AccountPage,d as AddressesPage,q as BlogPage,t as BlogSlugPage,m as CartPage,c as CheckoutPage,_ as CustomPage,n as EditorPage,o as FavoriteProductsPage,j as ForgotPasswordPage,h as IndexPage,l as LoginPage,p as NotFoundPage,f as OrderDetailPage,e as OrdersPage,k as RecoverPasswordPage,r as RegisterPage,s as SearchPage,i as SlugPage,g as SlugPageGetStaticPath,a as SlugPageGetStaticProps}from"./[slug]-5be05d9d.js";import"./get-17bc1d35.js";import"./storefront.js";import"react";import"mobx-react-lite";import"./index-94c469ed.js";import"mobx";import"next/router";import"./index-ea9fc314.js";import"crypto";import"./i18n-2fdbe5db.js";import"fs";import"path";import"next/config";import"./index-9ececcb5.js";import"./index-ac80179e.js";import"./cart-38151cca.js";import"./index-a1d85224.js";import"next/head";import"./index-099b9743.js";import"next/image";import"next/link";import"next/dynamic";import"next/error";
1
+ export{a as AccountPage,b as AddressesPage,o as BlogPage,p as BlogSlugPage,j as CartPage,c as CheckoutPage,_ as CustomPage,k as EditorPage,m as FavoriteProductsPage,f as ForgotPasswordPage,h as IndexPage,l as LoginPage,n as NotFoundPage,e as OrderDetailPage,d as OrdersPage,g as RecoverPasswordPage,r as RegisterPage,s as SearchPage,i as SlugPage}from"./[slug]-a5af448c.js";import"./get-ade3f4d4.js";import"./storefront.js";import"react";import"mobx-react-lite";import"./index-9157d480.js";import"mobx";import"next/router";import"./index-2108fd47.js";import"crypto";import"./i18n-faeafc92.js";import"fs";import"path";import"next/config";import"./index-3e13a5d9.js";import"./index-413970db.js";import"./cart-a5410bc1.js";import"./index-42f5840b.js";import"next/head";import"./index-dbaba7ab.js";import"next/image";import"next/link";import"next/dynamic";import"next/error";
@@ -1 +1 @@
1
- export{I as IkasBaseStore}from"./base-5ced4c24.js";import"./get-17bc1d35.js";import"./storefront.js";import"mobx";import"./index-ea9fc314.js";import"./cart-38151cca.js";import"./index-a1d85224.js";
1
+ export{I as IkasBaseStore}from"./base-64b83211.js";import"./get-ade3f4d4.js";import"./storefront.js";import"mobx";import"./index-2108fd47.js";import"./cart-a5410bc1.js";import"./index-42f5840b.js";
File without changes
@@ -1 +1 @@
1
- export{d as decodeBase64,f as findAllIndexes,b as formatDate,p as pascalCase,a as stringSorter,s as stringToSlug,t as tryForEach,v as validatePhoneNumber}from"./get-17bc1d35.js";export{c as createTranslationInputData,f as formatMoney,u as useTranslation}from"./i18n-2fdbe5db.js";import"./storefront.js";import"fs";import"path";import"next/config";
1
+ export{d as decodeBase64,f as findAllIndexes,b as formatDate,p as pascalCase,a as stringSorter,s as stringToSlug,t as tryForEach,v as validatePhoneNumber}from"./get-ade3f4d4.js";export{c as createTranslationInputData,f as formatMoney,u as useTranslation}from"./i18n-faeafc92.js";import"./storefront.js";import"fs";import"path";import"next/config";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.2.0-alpha.7",
3
+ "version": "0.2.0-alpha.8",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/esm/index.js",
6
6
  "author": "Umut Ozan Yıldırım",
@@ -1 +0,0 @@
1
- "use strict";var e=require("./get-7400a559.js"),t=require("react"),r=require("mobx-react-lite"),n=require("./index-45530bb2.js"),o=require("./index-af30c815.js"),s=require("./storefront.js"),i=require("next/router"),a=require("next/dynamic"),c=require("next/error"),u=require("fs"),l=require("next/config"),d=require("./index-2bed1aff.js");require("mobx");var g=require("./i18n-0303b446.js");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p,_=f(a),m=f(c),h=f(u),v=f(l),S=function(e){var t,r;void 0===e&&(e={}),this.id=e.id||"",this.name=e.name||"",this.priceListId=e.priceListId||"",this.stockLocations=(null===(t=e.stockLocations)||void 0===t?void 0:t.map((function(e){return new I(e)})))||[],this.paymentGateways=(null===(r=e.paymentGateways)||void 0===r?void 0:r.map((function(e){return new P(e)})))||[]},I=function(e){this.id=e.id||"",this.order=e.order||0},P=function(e){this.id=e.id||"",this.order=e.order||0},k=function(e){this.id=e.id||"",this.locale=e.locale||"",this.storefrontId=e.storefrontId||"",this.storefrontThemeId=e.storefrontThemeId||"",this.themeJson=e.themeJson?new d.IkasTheme(e.themeJson):new d.IkasTheme,this.privacyPolicy=e.privacyPolicy||null,this.returnPolicy=e.returnPolicy||null,this.termsOfService=e.termsOfService||null},C=function(){function t(){}return t.getStorefront=function(t){return e.__awaiter(this,void 0,void 0,(function(){var r,s,i,a,c;return e.__generator(this,(function(u){switch(u.label){case 0:r=o.src(p||(p=e.__makeTemplateObject(["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "],["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "]))),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,o.apollo.getClient().query({query:r,variables:{id:t}})];case 2:return s=u.sent(),i=s.data,(a=s.errors)&&a.length&&console.log(a),i?[2,new n.IkasStorefront(i.getStorefront)]:[3,4];case 3:return c=u.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},t}(),b=function(){function t(){}return t.readLocalTheme=function(){return new Promise((function(e,t){h.default.readFile("./src/theme.json",{flag:"a+"},(function(r,n){if(r)return t(r);var o=n.length?JSON.parse(n.toString()):{};e(new d.IkasTheme(o))}))}))},t.readSettingsFile=function(){return new Promise((function(e){var t=v.default().serverRuntimeConfig.SETTINGS;h.default.readFile(t,{flag:"a+"},(function(t,r){if(t)return console.error("SETTINGS FILE READ ERROR!!!"),console.error(t),e(null);var n=r.length?JSON.parse(r.toString()):{};e(n)}))}))},t.getSettings=function(r){var o=this;return new Promise((function(i){return e.__awaiter(o,void 0,void 0,(function(){var o,a,c,u,l,d,g,f,p,_,m,v,I,P;return e.__generator(this,(function(e){switch(e.label){case 0:return"local"===process.env.NEXT_PUBLIC_ENV?s.IkasStorefrontConfig.storefrontId?[4,C.getStorefront(s.IkasStorefrontConfig.storefrontId)]:(console.error("Missing storefrontId in the config.json file!"),[2,i(null)]):[3,3];case 1:return(o=e.sent())?(a=o,[4,t.readLocalTheme()]):[2,i(null)];case 2:return c=e.sent(),u=t.createColorScript(c.settings),i({storefront:a,themeLocalization:new k({themeJson:c}),salesChannel:new S({id:a.salesChannelId}),routing:a.routings.length?a.routings.find((function(e){return e.locale===r||e.id===r}))||a.routings[0]:new n.IkasStorefrontRouting({}),favicon:c.settings.favicon,stockPreference:c.settings.stockPreference,storefrontJSScripts:u?[u]:[],domain:"",productBackInStockSettings:{customerLoginRequired:!0},customerReviewSettings:{customerLoginRequired:!0,customerPurchaseRequired:!1}}),[3,5];case 3:return[4,t.readSettingsFile()];case 4:if(!(l=e.sent())||!l.localizationMap)return[2,i(null)];if(d=new n.IkasStorefront(l.storefront),g=new S(l.salesChannel),f=l.localizationMap,p=l.storefrontJSScripts||[],_=l.domain,m=l.productBackInStockSettings?{customerLoginRequired:l.productBackInStockSettings.customerLoginRequired}:null,v=l.customerReviewSettings?{customerLoginRequired:l.customerReviewSettings.customerLoginRequired,customerPurchaseRequired:l.customerReviewSettings.customerPurchaseRequired}:null,I=f[r],P=d.routings.find((function(e){return e.id===r||e.path===r})),!I||!P)return console.error("THEME LOCALIZATION PATH OR ROUTING MISSING!!!"),[2,i(null)];h.default.readFile(I,{flag:"a+"},(function(e,r){if(e)return console.error("THEME LOCALZIATION FILE READ ERROR!!!"),console.error(e),i(null);var n=r.length?JSON.parse(r.toString()):{},o=new k(n),s=o.themeJson.settings.favicon,a=o.themeJson.settings.stockPreference;if(o.themeJson.settings){var c=t.createColorScript(o.themeJson.settings);c&&p.push(c)}i({storefront:d,themeLocalization:o,salesChannel:g,routing:P,favicon:s,stockPreference:a,storefrontJSScripts:p,domain:_,productBackInStockSettings:m,customerReviewSettings:v})})),e.label=5;case 5:return[2]}}))}))}))},t.getPageData=function(r,i,a,c,u){var l,d;return e.__awaiter(this,void 0,void 0,(function(){var f,p,_,m,h,S,I,P,k,C,b,y,T,w,E,O,x,R,F,L,A,B,D,z,j,q;return e.__generator(this,(function(J){switch(J.label){case 0:return f="local"===process.env.NEXT_PUBLIC_ENV,p=!f&&u,_=v.default().serverRuntimeConfig,p?[3,7]:(m=r.locale)?[4,t.getSettings(m)]:[2,{props:{},notFound:!0}];case 1:return(h=J.sent())&&h.storefront.mainStorefrontThemeId&&h.storefront.salesChannelId?(S=h.storefront,I=h.themeLocalization,P=h.salesChannel,k=h.routing,C=h.favicon,b=h.stockPreference,y=h.storefrontJSScripts,T=h.domain,w=h.productBackInStockSettings,E=h.customerReviewSettings,s.IkasStorefrontConfig.storefrontId=S.id,s.IkasStorefrontConfig.storefrontRoutingId=k.id,s.IkasStorefrontConfig.storefrontThemeId=S.mainStorefrontThemeId,s.IkasStorefrontConfig.salesChannelId=S.salesChannelId,s.IkasStorefrontConfig.priceListId=k.priceListId||void 0,s.IkasStorefrontConfig.stockLocationIds=null===(l=P.stockLocations)||void 0===l?void 0:l.map((function(e){return e.id})),s.IkasStorefrontConfig.routings=S.routings,s.IkasStorefrontConfig.paymentGateways=P.paymentGateways||[],s.IkasStorefrontConfig.gtmId=S.gtmId||void 0,s.IkasStorefrontConfig.fbpId=S.fbpId||void 0,s.IkasStorefrontConfig.favicon=C||null,s.IkasStorefrontConfig.stockPreference=b||null,s.IkasStorefrontConfig.storefrontJSScripts=y||[],s.IkasStorefrontConfig.domain=T,s.IkasStorefrontConfig.productBackInStockSettings=w,s.IkasStorefrontConfig.customerReviewSettings=E,(O=new n.IkasPageDataProvider(I.themeJson,r.params,a)).possiblePageTypes=c,u?[3,3]:[4,O.getPageData()]):[2,{props:{},notFound:!0}];case 2:if(J.sent(),!O.page)return[2,{props:{},notFound:!0}];J.label=3;case 3:return x=u?O.theme.components.map((function(e){return e.id})):O.page.components.map((function(e){return e.componentId})),R=I.themeJson.components.filter((function(e){return u||x.includes(e.id)})),F=e.__spreadArrays(["common"],R.map((function(e){return e.dir}))),(a===o.IkasThemePageType.CHECKOUT||u)&&F.push("checkout-page"),L=_.nextI18nConf,A=k.locale,[4,new g.I18NFileReader(A,F,f?void 0:L.localePath).read()];case 4:return B=J.sent(),s.IkasStorefrontConfig.translations=B,D={},a!==o.IkasThemePageType.CHECKOUT?[3,6]:(z=null===(d=O.page)||void 0===d?void 0:d.components[0])?[4,o.IkasCheckoutAPI.listCheckoutSettings()]:[3,6];case 5:j=J.sent(),q={buttonBgColor:z.propValues.buttonBgColor,buttonTextColor:z.propValues.buttonTextColor,buttonDisabledBgColor:z.propValues.buttonDisabledBgColor,buttonDisabledTextColor:z.propValues.buttonDisabledTextColor,primaryTextColor:z.propValues.primaryTextColor,secondaryTextColor:z.propValues.secondaryTextColor,primaryBgColor:z.propValues.primaryBgColor,secondaryBgColor:z.propValues.secondaryBgColor,borderColor:z.propValues.borderColor,cardBgColor:z.propValues.cardBgColor,errorColor:z.propValues.errorColor,errorLightColor:z.propValues.errorLightColor,warningColor:z.propValues.warningColor,warningLightColor:z.propValues.warningLightColor,successColor:z.propValues.successColor,successLightColor:z.propValues.successLightColor},D.customizationProps=q,D.returnPolicy=I.returnPolicy,D.privacyPolicy=I.privacyPolicy,D.termsOfService=I.termsOfService,D.checkoutSettingsStr=(null==j?void 0:j.length)?JSON.stringify(j[0]):null,J.label=6;case 6:return i?[2,{props:e.__assign(e.__assign({},O.nextPageData.props),D)}]:[2,{props:e.__assign(e.__assign({},O.nextPageData.props),D),revalidate:60}];case 7:return[2,{props:{}}];case 8:return[2]}}))}))},t.getStaticProps=function(r,n,o,s){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,t.getPageData(r,!1,n,o,s)];case 1:return[2,e.sent()]}}))}))},t.getServerSideProps=function(r,n){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,t.getPageData(r,!0,n)];case 1:return[2,e.sent()]}}))}))},t.createColorScript=function(e){if(e.colors)return"<script>"+e.colors.map((function(e){return'document.documentElement.style.setProperty("'+e.key+'","'+e.color+'");'})).join("\r\n")+"<\/script> \n "},t}(),y=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),T=Object.freeze({__proto__:null,default:y,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.INDEX)];case 1:return[2,e.sent()]}}))}))}}),w=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r,{addOgpMetas:!0,reInitOnBrowser:!0}))})),E=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),O=Object.freeze({__proto__:null,default:E,getStaticPaths:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){var r,n;return e.__generator(this,(function(e){switch(e.label){case 0:return t.locales?[4,Promise.all(t.locales.map((function(e){return b.getSettings(e)})))]:[2,{paths:[],fallback:"blocking"}];case 1:return r=e.sent(),n=[],r.forEach((function(e){var t=e.themeLocalization,r=e.routing;t&&t.themeJson.pages.filter((function(e){return e.type===o.IkasThemePageType.CUSTOM})).forEach((function(e){e.slug&&!n.some((function(t){return t.params.slug===e.slug}))&&("local"===process.env.NEXT_PUBLIC_ENV?n.push({params:{slug:e.slug}}):n.push({params:{slug:e.slug},locale:r.path||r.id}))}))})),[2,{paths:n.map((function(e){return{params:e.params,locale:e.locale}})),fallback:"blocking"}]}}))}))},getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.CUSTOM)];case 1:return[2,e.sent()]}}))}))}}),x=r.observer((function(r){var a=r.merchantSettingsStr,c=r.checkoutSettingsStr,u=r.customizationProps,l=r.configJson,d=e.__rest(r,["merchantSettingsStr","checkoutSettingsStr","customizationProps","configJson"]),g=i.useRouter(),f=t.useState(),p=f[0],_=f[1];s.IkasStorefrontConfig.initWithJson(l);var m=s.IkasStorefrontConfig.store,h=t.useMemo((function(){return c?new o.IkasCheckoutSettings(JSON.parse(c)):new o.IkasCheckoutSettings}),[c]),v=t.useMemo((function(){return a?new o.IkasMerchantSettings(JSON.parse(a)):null}),[a]);t.useEffect((function(){document.documentElement.style.setProperty("--checkout-button-bg-color",(null==u?void 0:u.buttonBgColor)||"#272727"),document.documentElement.style.setProperty("--checkout-button-text-color",(null==u?void 0:u.buttonTextColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-button-disabled-bg-color",(null==u?void 0:u.buttonDisabledBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-button-disabled-text-color",(null==u?void 0:u.buttonDisabledTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-text-color",(null==u?void 0:u.primaryTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-secondary-text-color",(null==u?void 0:u.secondaryTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-bg-color",(null==u?void 0:u.primaryBgColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-secondary-bg-color",(null==u?void 0:u.secondaryBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-border-color",(null==u?void 0:u.borderColor)||"#E5E4E9"),document.documentElement.style.setProperty("--checkout-card-bg-color",(null==u?void 0:u.cardBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-error-color",(null==u?void 0:u.errorColor)||"#FB4E4E"),document.documentElement.style.setProperty("--checkout-error-light-color",(null==u?void 0:u.errorLightColor)||"#FCF3F4"),document.documentElement.style.setProperty("--checkout-warning-color",(null==u?void 0:u.warningColor)||"#FFBC1F"),document.documentElement.style.setProperty("--checkout-warning-light-color",(null==u?void 0:u.warningLightColor)||"#FFFAEE"),document.documentElement.style.setProperty("--checkout-success-color",(null==u?void 0:u.successColor)||"#2DCA73"),document.documentElement.style.setProperty("--checkout-success-light-color",(null==u?void 0:u.successLightColor)||"#F6FFED")}),[u]),t.useEffect((function(){m.checkLocalization(),S(),o.initIkasEvents()}),[]);var S=t.useCallback((function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,r,n;return e.__generator(this,(function(e){switch(e.label){case 0:return t=new URLSearchParams(window.location.search),(r=t.get("id"))?[4,o.IkasCheckoutAPI.getCheckoutById(r)]:[2,g.replace("/")];case 1:return(n=e.sent())?_(n):g.replace("/"),[2]}}))}))}),[]);return p?t.createElement(n.IkasCheckoutPage,e.__assign({checkout:p,merchantSettings:v,checkoutSettings:h,customizationProps:u},d)):t.createElement(n.FullscreenLoading,null)})),R=Object.freeze({__proto__:null,default:x,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.CHECKOUT)];case 1:return[2,e.sent()]}}))}))}}),F=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),L=Object.freeze({__proto__:null,default:F,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.ACCOUNT)];case 1:return[2,e.sent()]}}))}))}}),A=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),B=Object.freeze({__proto__:null,default:A,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.ADDRESSES)];case 1:return[2,e.sent()]}}))}))}}),D=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r,{addOgpMetas:!0}))})),z=Object.freeze({__proto__:null,default:D,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.ORDERS)];case 1:return[2,e.sent()]}}))}))}}),j=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),q=Object.freeze({__proto__:null,default:j,getServerSideProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getServerSideProps(t,o.IkasThemePageType.ORDER_DETAIL)];case 1:return[2,e.sent()]}}))}))}}),J=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),N=Object.freeze({__proto__:null,default:J,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.LOGIN)];case 1:return[2,e.sent()]}}))}))}}),V=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),M=Object.freeze({__proto__:null,default:V,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.REGISTER)];case 1:return[2,e.sent()]}}))}))}}),G=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),U=Object.freeze({__proto__:null,default:G,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.FORGOT_PASSWORD)];case 1:return[2,e.sent()]}}))}))}}),$=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),H=Object.freeze({__proto__:null,default:$,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.RECOVER_PASSWORD)];case 1:return[2,e.sent()]}}))}))}}),X=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),W=Object.freeze({__proto__:null,default:X,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.CART)];case 1:return[2,e.sent()]}}))}))}}),K=_.default((function(){return Promise.resolve().then((function(){return require("./components.js")})).then((function(e){return e.IkasPageEditor}))}),{ssr:!1}),Y=r.observer((function(e){var r=e.configJson,n=e.components;return r&&s.IkasStorefrontConfig.initWithJson(r),n&&(s.IkasStorefrontConfig.currentPageComponents=n),t.createElement(K,null)})),Z=Object.freeze({__proto__:null,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,void 0,void 0,!0)];case 1:return[2,e.sent()]}}))}))},default:Y}),Q=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),ee=Object.freeze({__proto__:null,default:Q,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.FAVORITE_PRODUCTS)];case 1:return[2,e.sent()]}}))}))}}),te=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r,{addOgpMetas:!0,reInitOnBrowser:!0}))})),re=Object.freeze({__proto__:null,default:te,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.SEARCH)];case 1:return[2,e.sent()]}}))}))}}),ne=Object.freeze({__proto__:null,default:function(r){return r.propValuesStr?t.createElement(n.IkasPage,e.__assign({},r)):t.createElement(m.default,{statusCode:404})},getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){var r;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.NOT_FOUND)];case 1:return(r=e.sent()).notFound?[2,{props:{},revalidate:60}]:[2,r]}}))}))}}),oe=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r,{addOgpMetas:!0}))})),se=Object.freeze({__proto__:null,default:oe,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.BLOG_INDEX)];case 1:return[2,e.sent()]}}))}))}}),ie=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r,{addOgpMetas:!0,reInitOnBrowser:!0}))})),ae=Object.freeze({__proto__:null,default:ie,getStaticPaths:function(){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,{paths:[],fallback:"blocking"}]}))}))},getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,void 0,[o.IkasThemePageType.BLOG,o.IkasThemePageType.BLOG_CATEGORY])];case 1:return[2,e.sent()]}}))}))}});exports._404=ne,exports._id_=q,exports._slug_=O,exports._slug_$1=ae,exports.addresses=B,exports.cart=W,exports.checkout=R,exports.editor=Z,exports.favoriteProducts=ee,exports.forgotPassword=U,exports.getStaticPaths=function(){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,{paths:[],fallback:"blocking"}]}))}))},exports.getStaticProps=function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,void 0,[o.IkasThemePageType.BRAND,o.IkasThemePageType.CATEGORY,o.IkasThemePageType.PRODUCT])];case 1:return[2,e.sent()]}}))}))},exports.home=T,exports.index=w,exports.index$1=L,exports.index$2=z,exports.index$3=se,exports.login=N,exports.recoverPassword=H,exports.register=M,exports.search=re;
@@ -1 +0,0 @@
1
- "use strict";var t=require("mobx"),i=require("./index-2bed1aff.js");require("./index-af30c815.js");var a=function(i){this.email=i.email||"",this.firstName=i.firstName||"",this.lastName=i.lastName||"",this.message=i.message||"",t.makeAutoObservable(this)},s=function(i){this.brandId=null,this.usePageData=null,this.brandId=i.brandId,this.usePageData=i.usePageData,t.makeAutoObservable(this)},e=function(a){this.initialSort=null,this.initialLimit=null,this.brandCount=null,this.brandIds=null,this.brandListType=a.brandListType||i.IkasBrandListType.ALL,this.initialSort=a.initialSort||i.IkasBrandListSortType.A_Z,this.initialLimit=a.initialLimit||20,this.brandCount=a.brandCount,this.brandIds=a.brandIds,t.makeAutoObservable(this)},l=function(a){this.initialSort=null,this.initialLimit=null,this.productCount=null,this.productIds=null,this.usePageFilter=null,this.category=null,this.id=a.id||"",this.productListType=a.productListType||i.IkasProductListType.ALL,this.initialSort=a.initialSort||i.IkasProductListSortType.LAST_ADDED,this.initialLimit=a.initialLimit||20,this.productCount=a.productCount,this.productIds=a.productIds,this.category=a.category,this.usePageFilter=a.usePageFilter,t.makeAutoObservable(this)},o=function(i){this.productId=null,this.variantId=null,this.usePageData=null,this.productId=i.productId,this.variantId=i.variantId,this.usePageData=i.usePageData,t.makeAutoObservable(this)},r=function(i){this.categoryId=null,this.usePageData=null,this.categoryId=i.categoryId,this.usePageData=i.usePageData,t.makeAutoObservable(this)},u=function(a){this.initialSort=null,this.initialLimit=null,this.categoryCount=null,this.categoryIds=null,this.categoryListType=a.categoryListType||i.IkasCategoryListType.ALL,this.initialSort=a.initialSort||i.IkasCategoryListSortType.A_Z,this.initialLimit=a.initialLimit||20,this.categoryCount=a.categoryCount||null,this.categoryIds=a.categoryIds||null,t.makeAutoObservable(this)},n=function(i){this.blogId=null,this.usePageData=null,this.blogId=i.blogId,this.usePageData=i.usePageData,t.makeAutoObservable(this)},h=function(a){this.initialLimit=null,this.blogIds=null,this.usePageFilter=null,this.blogListType=a.blogListType||i.IkasBlogListType.ALL,this.initialLimit=a.initialLimit||20,this.blogIds=a.blogIds,this.categoryId=a.categoryId||null,this.usePageFilter=a.usePageFilter||null,t.makeAutoObservable(this)},g=function(i){this.blogCategoryId=null,this.usePageData=null,this.blogCategoryId=i.blogCategoryId,this.usePageData=i.usePageData,t.makeAutoObservable(this)},d=function(a){this.initialLimit=null,this.blogCategoryIds=null,this.blogCategoryListType=a.blogCategoryListType||i.IkasBlogCategoryListType.ALL,this.initialLimit=a.initialLimit||20,this.blogCategoryIds=a.blogCategoryIds,t.makeAutoObservable(this)};exports.IkasBlogCategoryListPropValue=d,exports.IkasBlogCategoryPropValue=g,exports.IkasBlogListPropValue=h,exports.IkasBlogPropValue=n,exports.IkasBrandListPropValue=e,exports.IkasBrandPropValue=s,exports.IkasCategoryListPropValue=u,exports.IkasCategoryPropValue=r,exports.IkasContactForm=a,exports.IkasProductDetailPropValue=o,exports.IkasProductListPropValue=l;
@@ -1 +0,0 @@
1
- import{_ as t,c as e,e as n,i as r,j as o,l as i}from"./get-17bc1d35.js";import{createElement as s,useState as c,useMemo as u,useEffect as a,useCallback as l}from"react";import{observer as d}from"mobx-react-lite";import{e as f,g as p,d as g,I as m,F as h,f as v}from"./index-94c469ed.js";import{i as S,ah as b,ab as P,I as C,av as _,R as y,al as I}from"./index-ea9fc314.js";import{IkasStorefrontConfig as w}from"./storefront.js";import{useRouter as O}from"next/router";import E from"next/dynamic";import k from"next/error";import T from"fs";import R from"next/config";import{b as F}from"./index-ac80179e.js";import"mobx";import{I as L}from"./i18n-2fdbe5db.js";var B,A=function(t){var e,n;void 0===t&&(t={}),this.id=t.id||"",this.name=t.name||"",this.priceListId=t.priceListId||"",this.stockLocations=(null===(e=t.stockLocations)||void 0===e?void 0:e.map((function(t){return new z(t)})))||[],this.paymentGateways=(null===(n=t.paymentGateways)||void 0===n?void 0:n.map((function(t){return new D(t)})))||[]},z=function(t){this.id=t.id||"",this.order=t.order||0},D=function(t){this.id=t.id||"",this.order=t.order||0},j=function(t){this.id=t.id||"",this.locale=t.locale||"",this.storefrontId=t.storefrontId||"",this.storefrontThemeId=t.storefrontThemeId||"",this.themeJson=t.themeJson?new F(t.themeJson):new F,this.privacyPolicy=t.privacyPolicy||null,this.returnPolicy=t.returnPolicy||null,this.termsOfService=t.termsOfService||null},x=function(){function r(){}return r.getStorefront=function(r){return t(this,void 0,void 0,(function(){var t,o,i,s,c;return e(this,(function(e){switch(e.label){case 0:t=b(B||(B=n(["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "],["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,S.getClient().query({query:t,variables:{id:r}})];case 2:return o=e.sent(),i=o.data,(s=o.errors)&&s.length&&console.log(s),i?[2,new f(i.getStorefront)]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},r}(),J=function(){function n(){}return n.readLocalTheme=function(){return new Promise((function(t,e){T.readFile("./src/theme.json",{flag:"a+"},(function(n,r){if(n)return e(n);var o=r.length?JSON.parse(r.toString()):{};t(new F(o))}))}))},n.readSettingsFile=function(){return new Promise((function(t){var e=R().serverRuntimeConfig.SETTINGS;T.readFile(e,{flag:"a+"},(function(e,n){if(e)return console.error("SETTINGS FILE READ ERROR!!!"),console.error(e),t(null);var r=n.length?JSON.parse(n.toString()):{};t(r)}))}))},n.getSettings=function(r){var o=this;return new Promise((function(i){return t(o,void 0,void 0,(function(){var t,o,s,c,u,a,l,d,g,m,h,v,S,b;return e(this,(function(e){switch(e.label){case 0:return"local"===process.env.NEXT_PUBLIC_ENV?w.storefrontId?[4,x.getStorefront(w.storefrontId)]:(console.error("Missing storefrontId in the config.json file!"),[2,i(null)]):[3,3];case 1:return(t=e.sent())?(o=t,[4,n.readLocalTheme()]):[2,i(null)];case 2:return s=e.sent(),c=n.createColorScript(s.settings),i({storefront:o,themeLocalization:new j({themeJson:s}),salesChannel:new A({id:o.salesChannelId}),routing:o.routings.length?o.routings.find((function(t){return t.locale===r||t.id===r}))||o.routings[0]:new p({}),favicon:s.settings.favicon,stockPreference:s.settings.stockPreference,storefrontJSScripts:c?[c]:[],domain:"",productBackInStockSettings:{customerLoginRequired:!0},customerReviewSettings:{customerLoginRequired:!0,customerPurchaseRequired:!1}}),[3,5];case 3:return[4,n.readSettingsFile()];case 4:if(!(u=e.sent())||!u.localizationMap)return[2,i(null)];if(a=new f(u.storefront),l=new A(u.salesChannel),d=u.localizationMap,g=u.storefrontJSScripts||[],m=u.domain,h=u.productBackInStockSettings?{customerLoginRequired:u.productBackInStockSettings.customerLoginRequired}:null,v=u.customerReviewSettings?{customerLoginRequired:u.customerReviewSettings.customerLoginRequired,customerPurchaseRequired:u.customerReviewSettings.customerPurchaseRequired}:null,S=d[r],b=a.routings.find((function(t){return t.id===r||t.path===r})),!S||!b)return console.error("THEME LOCALIZATION PATH OR ROUTING MISSING!!!"),[2,i(null)];T.readFile(S,{flag:"a+"},(function(t,e){if(t)return console.error("THEME LOCALZIATION FILE READ ERROR!!!"),console.error(t),i(null);var r=e.length?JSON.parse(e.toString()):{},o=new j(r),s=o.themeJson.settings.favicon,c=o.themeJson.settings.stockPreference;if(o.themeJson.settings){var u=n.createColorScript(o.themeJson.settings);u&&g.push(u)}i({storefront:a,themeLocalization:o,salesChannel:l,routing:b,favicon:s,stockPreference:c,storefrontJSScripts:g,domain:m,productBackInStockSettings:h,customerReviewSettings:v})})),e.label=5;case 5:return[2]}}))}))}))},n.getPageData=function(i,s,c,u,a){var l,d;return t(this,void 0,void 0,(function(){var t,f,p,m,h,v,S,b,_,y,I,O,E,k,T,F,B,A,z,D,j,x,J,N,V,G;return e(this,(function(e){switch(e.label){case 0:return t="local"===process.env.NEXT_PUBLIC_ENV,f=!t&&a,p=R().serverRuntimeConfig,f?[3,7]:(m=i.locale)?[4,n.getSettings(m)]:[2,{props:{},notFound:!0}];case 1:return(h=e.sent())&&h.storefront.mainStorefrontThemeId&&h.storefront.salesChannelId?(v=h.storefront,S=h.themeLocalization,b=h.salesChannel,_=h.routing,y=h.favicon,I=h.stockPreference,O=h.storefrontJSScripts,E=h.domain,k=h.productBackInStockSettings,T=h.customerReviewSettings,w.storefrontId=v.id,w.storefrontRoutingId=_.id,w.storefrontThemeId=v.mainStorefrontThemeId,w.salesChannelId=v.salesChannelId,w.priceListId=_.priceListId||void 0,w.stockLocationIds=null===(l=b.stockLocations)||void 0===l?void 0:l.map((function(t){return t.id})),w.routings=v.routings,w.paymentGateways=b.paymentGateways||[],w.gtmId=v.gtmId||void 0,w.fbpId=v.fbpId||void 0,w.favicon=y||null,w.stockPreference=I||null,w.storefrontJSScripts=O||[],w.domain=E,w.productBackInStockSettings=k,w.customerReviewSettings=T,(F=new g(S.themeJson,i.params,c)).possiblePageTypes=u,a?[3,3]:[4,F.getPageData()]):[2,{props:{},notFound:!0}];case 2:if(e.sent(),!F.page)return[2,{props:{},notFound:!0}];e.label=3;case 3:return B=a?F.theme.components.map((function(t){return t.id})):F.page.components.map((function(t){return t.componentId})),A=S.themeJson.components.filter((function(t){return a||B.includes(t.id)})),z=o(["common"],A.map((function(t){return t.dir}))),(c===P.CHECKOUT||a)&&z.push("checkout-page"),D=p.nextI18nConf,j=_.locale,[4,new L(j,z,t?void 0:D.localePath).read()];case 4:return x=e.sent(),w.translations=x,J={},c!==P.CHECKOUT?[3,6]:(N=null===(d=F.page)||void 0===d?void 0:d.components[0])?[4,C.listCheckoutSettings()]:[3,6];case 5:V=e.sent(),G={buttonBgColor:N.propValues.buttonBgColor,buttonTextColor:N.propValues.buttonTextColor,buttonDisabledBgColor:N.propValues.buttonDisabledBgColor,buttonDisabledTextColor:N.propValues.buttonDisabledTextColor,primaryTextColor:N.propValues.primaryTextColor,secondaryTextColor:N.propValues.secondaryTextColor,primaryBgColor:N.propValues.primaryBgColor,secondaryBgColor:N.propValues.secondaryBgColor,borderColor:N.propValues.borderColor,cardBgColor:N.propValues.cardBgColor,errorColor:N.propValues.errorColor,errorLightColor:N.propValues.errorLightColor,warningColor:N.propValues.warningColor,warningLightColor:N.propValues.warningLightColor,successColor:N.propValues.successColor,successLightColor:N.propValues.successLightColor},J.customizationProps=G,J.returnPolicy=S.returnPolicy,J.privacyPolicy=S.privacyPolicy,J.termsOfService=S.termsOfService,J.checkoutSettingsStr=(null==V?void 0:V.length)?JSON.stringify(V[0]):null,e.label=6;case 6:return s?[2,{props:r(r({},F.nextPageData.props),J)}]:[2,{props:r(r({},F.nextPageData.props),J),revalidate:60}];case 7:return[2,{props:{}}];case 8:return[2]}}))}))},n.getStaticProps=function(r,o,i,s){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n.getPageData(r,!1,o,i,s)];case 1:return[2,t.sent()]}}))}))},n.getServerSideProps=function(r,o){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n.getPageData(r,!0,o)];case 1:return[2,t.sent()]}}))}))},n.createColorScript=function(t){if(t.colors)return"<script>"+t.colors.map((function(t){return'document.documentElement.style.setProperty("'+t.key+'","'+t.color+'");'})).join("\r\n")+"<\/script> \n "},n}(),N=d((function(t){return s(m,r({},t))})),V=Object.freeze({__proto__:null,default:N,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.INDEX)];case 1:return[2,t.sent()]}}))}))}}),G=d((function(t){return s(m,r({},t,{addOgpMetas:!0,reInitOnBrowser:!0}))})),M=function(){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){return[2,{paths:[],fallback:"blocking"}]}))}))},q=function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,void 0,[P.BRAND,P.CATEGORY,P.PRODUCT])];case 1:return[2,t.sent()]}}))}))},U=d((function(t){return s(m,r({},t))})),H=Object.freeze({__proto__:null,default:U,getStaticPaths:function(n){return t(void 0,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return n.locales?[4,Promise.all(n.locales.map((function(t){return J.getSettings(t)})))]:[2,{paths:[],fallback:"blocking"}];case 1:return t=e.sent(),r=[],t.forEach((function(t){var e=t.themeLocalization,n=t.routing;e&&e.themeJson.pages.filter((function(t){return t.type===P.CUSTOM})).forEach((function(t){t.slug&&!r.some((function(e){return e.params.slug===t.slug}))&&("local"===process.env.NEXT_PUBLIC_ENV?r.push({params:{slug:t.slug}}):r.push({params:{slug:t.slug},locale:n.path||n.id}))}))})),[2,{paths:r.map((function(t){return{params:t.params,locale:t.locale}})),fallback:"blocking"}]}}))}))},getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.CUSTOM)];case 1:return[2,t.sent()]}}))}))}}),X=d((function(n){var o=n.merchantSettingsStr,d=n.checkoutSettingsStr,f=n.customizationProps,p=n.configJson,g=i(n,["merchantSettingsStr","checkoutSettingsStr","customizationProps","configJson"]),m=O(),S=c(),b=S[0],P=S[1];w.initWithJson(p);var E=w.store,k=u((function(){return d?new _(JSON.parse(d)):new _}),[d]),T=u((function(){return o?new y(JSON.parse(o)):null}),[o]);a((function(){document.documentElement.style.setProperty("--checkout-button-bg-color",(null==f?void 0:f.buttonBgColor)||"#272727"),document.documentElement.style.setProperty("--checkout-button-text-color",(null==f?void 0:f.buttonTextColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-button-disabled-bg-color",(null==f?void 0:f.buttonDisabledBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-button-disabled-text-color",(null==f?void 0:f.buttonDisabledTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-text-color",(null==f?void 0:f.primaryTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-secondary-text-color",(null==f?void 0:f.secondaryTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-bg-color",(null==f?void 0:f.primaryBgColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-secondary-bg-color",(null==f?void 0:f.secondaryBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-border-color",(null==f?void 0:f.borderColor)||"#E5E4E9"),document.documentElement.style.setProperty("--checkout-card-bg-color",(null==f?void 0:f.cardBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-error-color",(null==f?void 0:f.errorColor)||"#FB4E4E"),document.documentElement.style.setProperty("--checkout-error-light-color",(null==f?void 0:f.errorLightColor)||"#FCF3F4"),document.documentElement.style.setProperty("--checkout-warning-color",(null==f?void 0:f.warningColor)||"#FFBC1F"),document.documentElement.style.setProperty("--checkout-warning-light-color",(null==f?void 0:f.warningLightColor)||"#FFFAEE"),document.documentElement.style.setProperty("--checkout-success-color",(null==f?void 0:f.successColor)||"#2DCA73"),document.documentElement.style.setProperty("--checkout-success-light-color",(null==f?void 0:f.successLightColor)||"#F6FFED")}),[f]),a((function(){E.checkLocalization(),R(),I()}),[]);var R=l((function(){return t(void 0,void 0,void 0,(function(){var t,n,r;return e(this,(function(e){switch(e.label){case 0:return t=new URLSearchParams(window.location.search),(n=t.get("id"))?[4,C.getCheckoutById(n)]:[2,m.replace("/")];case 1:return(r=e.sent())?P(r):m.replace("/"),[2]}}))}))}),[]);return b?s(v,r({checkout:b,merchantSettings:T,checkoutSettings:k,customizationProps:f},g)):s(h,null)})),W=Object.freeze({__proto__:null,default:X,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.CHECKOUT)];case 1:return[2,t.sent()]}}))}))}}),$=d((function(t){return s(m,r({},t))})),K=Object.freeze({__proto__:null,default:$,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.ACCOUNT)];case 1:return[2,t.sent()]}}))}))}}),Y=d((function(t){return s(m,r({},t))})),Z=Object.freeze({__proto__:null,default:Y,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.ADDRESSES)];case 1:return[2,t.sent()]}}))}))}}),Q=d((function(t){return s(m,r({},t,{addOgpMetas:!0}))})),tt=Object.freeze({__proto__:null,default:Q,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.ORDERS)];case 1:return[2,t.sent()]}}))}))}}),et=d((function(t){return s(m,r({},t))})),nt=Object.freeze({__proto__:null,default:et,getServerSideProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getServerSideProps(n,P.ORDER_DETAIL)];case 1:return[2,t.sent()]}}))}))}}),rt=d((function(t){return s(m,r({},t))})),ot=Object.freeze({__proto__:null,default:rt,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.LOGIN)];case 1:return[2,t.sent()]}}))}))}}),it=d((function(t){return s(m,r({},t))})),st=Object.freeze({__proto__:null,default:it,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.REGISTER)];case 1:return[2,t.sent()]}}))}))}}),ct=d((function(t){return s(m,r({},t))})),ut=Object.freeze({__proto__:null,default:ct,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.FORGOT_PASSWORD)];case 1:return[2,t.sent()]}}))}))}}),at=d((function(t){return s(m,r({},t))})),lt=Object.freeze({__proto__:null,default:at,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.RECOVER_PASSWORD)];case 1:return[2,t.sent()]}}))}))}}),dt=d((function(t){return s(m,r({},t))})),ft=Object.freeze({__proto__:null,default:dt,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.CART)];case 1:return[2,t.sent()]}}))}))}}),pt=E((function(){return import("./components.js").then((function(t){return t.IkasPageEditor}))}),{ssr:!1}),gt=d((function(t){var e=t.configJson,n=t.components;return e&&w.initWithJson(e),n&&(w.currentPageComponents=n),s(pt,null)})),mt=Object.freeze({__proto__:null,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,void 0,void 0,!0)];case 1:return[2,t.sent()]}}))}))},default:gt}),ht=d((function(t){return s(m,r({},t))})),vt=Object.freeze({__proto__:null,default:ht,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.FAVORITE_PRODUCTS)];case 1:return[2,t.sent()]}}))}))}}),St=d((function(t){return s(m,r({},t,{addOgpMetas:!0,reInitOnBrowser:!0}))})),bt=Object.freeze({__proto__:null,default:St,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.SEARCH)];case 1:return[2,t.sent()]}}))}))}}),Pt=Object.freeze({__proto__:null,default:function(t){return t.propValuesStr?s(m,r({},t)):s(k,{statusCode:404})},getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,J.getStaticProps(n,P.NOT_FOUND)];case 1:return(t=e.sent()).notFound?[2,{props:{},revalidate:60}]:[2,t]}}))}))}}),Ct=d((function(t){return s(m,r({},t,{addOgpMetas:!0}))})),_t=Object.freeze({__proto__:null,default:Ct,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,P.BLOG_INDEX)];case 1:return[2,t.sent()]}}))}))}}),yt=d((function(t){return s(m,r({},t,{addOgpMetas:!0,reInitOnBrowser:!0}))})),It=Object.freeze({__proto__:null,default:yt,getStaticPaths:function(){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){return[2,{paths:[],fallback:"blocking"}]}))}))},getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,void 0,[P.BLOG,P.BLOG_CATEGORY])];case 1:return[2,t.sent()]}}))}))}});export{H as _,q as a,K as b,W as c,Z as d,tt as e,nt as f,M as g,V as h,G as i,ut as j,lt as k,ot as l,ft as m,mt as n,vt as o,Pt as p,_t as q,st as r,bt as s,It as t};