PageSourceSearch

https://www.bjornborg.com/us/libs-storyblok-cms-data-transformer-b…ataTransformerBlock-4fb537e5547f8597553a.js

js bjornborg.com collected 2026-09-24 21:21:56 UTC 6,935 bytes, 1 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[47],{61718:function(e,l,i){i.d(l,{Z:function(){return m}});var a=i(60781),t=(i(6031),i(92154)),u=i(56764),s=i(31855);const n=e=>{if(!e)return;if(e instanceof Date)return e;const l=e.match(/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2})$/);if(!l)return;const[,i,a,t,u,s]=l.map(Number);return new Date(Date.UTC(i,a-1,t,u,s,0,0))};var r=i(17365),o=i(21543),p=i(44421);const c={displayRuleAttribute:{displayRule:(e,l)=>{const i=(0,p.z6)(e.attributes);return Object.keys(i.selectedValues).some((e=>{var a;const t=((null===(a=l.product.customAttributes)||void 0===a?void 0:a[e])||{}).values||{},u=(Object.values(t)||[]).map((e=>e.internalName));return i.selectedValues[e].some((e=>u.includes(e)))}))}},displayRuleSite:{displayRule:e=>"us"===e.value},displayRuleUserAcceptsEmail:{displayRule:(e,l)=>{var i,a;return"true"===e.value===!(null===(i=l.auth.user)||void 0===i||null===(a=i.preferences)||void 0===a||!a.acceptsEmail)},compareRule:(e,l)=>{var i,a,t,u;return(null===(i=e.auth.user)||void 0===i||null===(a=i.preferences)||void 0===a?void 0:a.acceptsEmail)===(null===(t=l.auth.user)||void 0===t||null===(u=t.preferences)||void 0===u?void 0:u.acceptsEmail)}},displayRuleUserGender:{displayRule:(e,l)=>{var i;return("null"===e.value?void 0:e.value)===(null===(i=l.auth.user)||void 0===i?void 0:i.gender)},compareRule:(e,l)=>{var i,a;return(null===(i=e.auth.user)||void 0===i?void 0:i.gender)===(null===(a=l.auth.user)||void 0===a?void 0:a.gender)}},displayRuleUserLoggedIn:{displayRule:(e,l)=>"true"===e.value===!!l.auth.isAuthenticated,compareRule:(e,l)=>e.auth.isAuthenticated===l.auth.isAuthenticated},displayRuleOr:{displayRule:(e,l)=>!!e.rules&&e.rules.some((e=>{var i;return null===(i=c[e.component])||void 0===i?void 0:i.displayRule(e,l)}))},displayRuleLeftFreeShipping:{displayRule:(e,l)=>{var i,a,t,u;const n=null===(i=l.basket)||void 0===i||null===(a=i.totalDiscount)||void 0===a?void 0:a.discounts,o=null===(t=l.basket)||void 0===t?void 0:t.shippingMethodId,p=(0,s.pL)(n).has(o),c=l.application.shopConfig.freeShippingLimit||0,{finalPriceAsNumber:d,shippingPriceAsNumber:m}=(null===(u=l.basket)||void 0===u?void 0:u.totals)||{},v=(d||0)-(m||0),y=p?0:Math.max((0,r.M1)(c-v),0);return!!(e.min&&e.max&&e.max>=y&&e.min<=y)||(!!(e.max&&!e.min&&e.max>=y)||!!(e.min&&!e.max&&e.min<=y))},compareRule:(e,l)=>{var i,a,t,u,s,n,r,o;return(null===(i=e.basket)||void 0===i?void 0:i.shippingMethodId)===(null===(a=l.basket)||void 0===a?void 0:a.shippingMethodId)&&(null===(t=e.basket.totals)||void 0===t?void 0:t.finalPriceAsNumber)===(null===(u=l.basket.totals)||void 0===u?void 0:u.finalPriceAsNumber)&&(null===(s=e.basket)||void 0===s||null===(n=s.totalDiscount)||void 0===n?void 0:n.discounts)===(null===(r=l.basket)||void 0===r||null===(o=r.totalDiscount)||void 0===o?void 0:o.discounts)&&e.application.shopConfig.freeShippingLimit===l.application.shopConfig.freeShippingLimit}},displayRuleNot:{displayRule:(e,l)=>!!e.rules&&e.rules.every((e=>{var i;return!(null!==(i=c[e.component])&&void 0!==i&&i.displayRule(e,l))}))},displayRuleUserCampaignSite:{displayRule:(e,l)=>{var i;const a=Array.isArray(e.value)?e.value.map((e=>e.Label)):[];if(0===a.length)return!0;const t=null===(i=l.campaignSite)||void 0===i?void 0:i.campaignName;return a.includes(t||"")},compareRule:(e,l)=>{var i,a;return(null===(i=e.campaignSite)||void 0===i?void 0:i.campaignName)===(null===(a=l.campaignSite)||void 0===a?void 0:a.campaignName)}},displayRuleTime:{displayRule:(e,l,i)=>{const a=i||new Date,t=e.min?n(e.min):null,u=e.max?n(e.max):null;return t&&u?a>=t&&a<=u:t?a>=t:!!u&&a<=u},getNextTimeout:(e,l)=>{const i=l||new Date,a=e.min?n(e.min):null,t=e.max?n(e.max):null,u=[];return a&&i<a&&u.push(a.getTime()-i.getTime()),t&&i<t&&u.push(t.getTime()-i.getTime()),0===u.length?null:u}}},d=function(e,l,i,t){void 0===t&&(t=new Date);const u=[];for(const s of e){const{rules:e,content:n}=s;if((!e.length||e.every((e=>{var i;return!(null===(i=c[e.component])||void 0===i||!i.displayRule(e,l,t))})))&&(u.push.apply(u,(0,a.Z)(n)),i.onlyMatchWithFirst))break}return u};var m=function(e,l){void 0===l&&(l={onlyMatchWithFirst:!0});const i=e&&0!==e.length?e:[],s=(e=>{const l=e=>e.reduce(((e,i)=>"displayRuleOr"===i.component||"displayRuleNot"===i.component?i.rules?[].concat((0,a.Z)(e),(0,a.Z)(l(i.rules))):e:(e.push(i.component),e)),[]),i=e.reduce(((e,i)=>{const t=l(i.rules);return[].concat((0,a.Z)(e),(0,a.Z)(t))}),[]),t=(0,o.Z)(i).map((e=>{var l;return null===(l=c[e])||void 0===l?void 0:l.compareRule})).filter((e=>e));return t.length>0&&t})(i),n=(0,t.ix)((e=>e),((e,l)=>!s||s.every((i=>i(e,l))))),{0:r,1:p}=(0,u.useState)(new Date),{0:m,1:v}=(0,u.useState)(d(i,n,l,r));return(0,u.useEffect)((()=>{v(d(i,n,l,r));const e=i.flatMap((e=>e.rules.filter((e=>"displayRuleTime"===e.component)))),a=[];return e.forEach((e=>{var t,u;const s=null===(t=c.displayRuleTime)||void 0===t||null===(u=t.getNextTimeout)||void 0===u?void 0:u.call(t,e,r);
1Array.isArray(s)&&s.forEach((e=>{const t=setTimeout((()=>{const e=new Date;p(e),v(d(i,n,l,e))}),e);a.push(t)}))})),()=>{a.forEach((e=>clearTimeout(e)))}}),[JSON.stringify(e),JSON.stringify(n),r]),m}},49172:function(e,l,i){i.r(l);var a=i(25279),t=i(61718),u=i(29897),s=i(1620);l.default=e=>{let{content:l={},index:i,...n}=e;const r=l.content,o=(0,u.R)(r),p=(0,t.Z)(o);return p.length>0?(0,s.jsx)(a.Z,{modules:p,parentModuleIndex:i,...n}):null}},29897:function(e,l,i){i.d(l,{R:function(){return t}});const a=e=>{let l={};switch(e.component){case"checkoutDisplayRuleNot":case"gridDisplayRuleNot":case"menuDisplayRuleNot":case"pdpDisplayRuleNot":case"upsellDisplayRuleNot":l.component="displayRuleNot";break;case"checkoutDisplayRuleOr":case"gridDisplayRuleOr":case"menuDisplayRuleOr":case"pdpDisplayRuleOr":case"upsellDisplayRuleOr":l.component="displayRuleOr";break;case"checkoutDisplayRuleUserLoggedIn":case"menuDisplayRuleUserLoggedIn":case"pdpDisplayRuleUserLoggedIn":case"upsellDisplayRuleUserLoggedIn":l.component="displayRuleUserLoggedIn";break;case"checkoutDisplayRuleSite":case"gridDisplayRuleSite":case"menuDisplayRuleSite":case"pdpDisplayRuleSite":case"upsellDisplayRuleSite":l.component="displayRuleSite";break;case"checkoutDisplayRuleUserGender":case"upsellDisplayRuleUserGender":l.component="displayRuleUserGender";break;case"checkoutDisplayRuleLeftFreeShipping":case"upsellDisplayRuleLeftFreeShipping":l.component="displayRuleLeftFreeShipping";break;case"checkoutDisplayRuleUserCampaignSite":case"menuDisplayRuleUserCampaignSite":case"pdpDisplayRuleUserCampaignSite":l.component="displayRuleUserCampaignSite";break;case"pdpDisplayRuleAttribute":l.component="displayRuleAttribute";break;case"checkoutDisplayRuleTime":case"menuDisplayRuleTime":case"upsellDisplayRuleTime":l.component="displayRuleTime"}return l={...e,...l},e.rules&&(l.rules=e.rules.map(a)),l},t=e=>null==e?void 0:e.map((e=>(e.rules&&(e.rules=e.rules.map(a)),e)))}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.