@heycater/qualification-funnel 1.3.1 → 1.3.3

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.
@@ -1652,4 +1652,4 @@
1652
1652
  display: none;
1653
1653
  }
1654
1654
 
1655
- `,fW="trustedshops_ratings",pW=3e5;let hW=null;const mW=YP;function gW(){var e,t;const n=null==(e=document.documentElement.lang)?void 0:e.toLowerCase();if(n&&mW.includes(n))return n;const r=null==(t=window.location.pathname.split("/")[1])?void 0:t.toLowerCase();return r&&mW.includes(r)?r:void 0}let vW=null;function yW(){const e=m.useMemo(()=>function(){const e="undefined"!=typeof window?window.__HEYCATER_CONFIG__:void 0;return{apiEndpoint:(null==e?void 0:e.graphqlEndpoint)||"https://api.heycater.com/graphql",googleMapsApiKey:(null==e?void 0:e.googleMapsApiKey)||"",locale:(null==e?void 0:e.locale)||gW()||"de",storageKey:"heycater-funnel",onBackground:"light",highlightColor:"primary",mode:(null==e?void 0:e.mode)||"embedded",onCancel:null==e?void 0:e.onCancel}}(),[]),[t,n]=m.useState(e.locale),[r,o]=m.useState(null);m.useEffect(()=>(vW=n,()=>{vW=null}),[]),m.useEffect(()=>{const e=new MutationObserver(e=>{var t;for(const r of e)if("lang"===r.attributeName){const e=null==(t=document.documentElement.lang)?void 0:t.toLowerCase();e&&mW.includes(e)&&n(e)}});return e.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]}),()=>e.disconnect()},[]),m.useEffect(()=>{var n;(n={graphqlEndpoint:e.apiEndpoint,googleMapsApiKey:e.googleMapsApiKey,locale:t})&&(aE={...rE,...n}),"undefined"!=typeof window&&window.__HEYCATER_CONFIG__&&(aE={...aE,...window.__HEYCATER_CONFIG__})},[t,e.apiEndpoint,e.googleMapsApiKey]),m.useEffect(()=>{(async()=>{if(hW&&Date.now()-hW.timestamp<pW)return hW.data;if("undefined"!=typeof window)try{const e=sessionStorage.getItem(fW);if(e){const t=JSON.parse(e);if(t.timestamp&&Date.now()-t.timestamp<pW)return hW=t,t.data}}catch{}const e=await fetch("https://integrations.etrusted.com/feeds/grades/v1/channels/chl-735bd2eb-de5a-4bf6-8510-55080217cff2/touchpoints/all/feed.json",{headers:{"Content-Type":"application/json"},method:"GET"}),t=(await e.json()).grades;if(t){const e={data:t,timestamp:Date.now()};if(hW=e,"undefined"!=typeof window)try{sessionStorage.setItem(fW,JSON.stringify(e))}catch{}}return t})().then(o).catch(console.error)},[]);const i=((e={})=>{const t=e.locale||"de",n=e.locales||YP;return YS.isInitialized||YS.use(vd).init({lng:t,supportedLngs:n,preload:YP,fallbackLng:AV,resources:NV,interpolation:{escapeValue:!1},initImmediate:!1,react:{useSuspense:!1}}),YS.language!==t&&YS.changeLanguage(t),YS})({locale:t}),a=m.useMemo(()=>{return t=e.apiEndpoint,new Xh({url:t,exchanges:[Yh,Qh({onError:lW}),uW,Gh],fetch:cW});var t},[e.apiEndpoint]);return x.jsx(rm,{value:a,children:x.jsx(Ed,{i18n:i,children:x.jsx(JS,{locale:t,children:x.jsx(Jf,{theme:sW,children:x.jsx(pa,{theme:sW,children:x.jsxs(Bi,{injectFirst:!0,children:[x.jsx(Zs,{}),x.jsx(dW,{}),x.jsx(xO,{initialized:!0,storageKey:e.storageKey,storage:"sessionStorage",children:x.jsx(WV,{onBackground:e.onBackground,highlightColor:e.highlightColor,ratings:r,mode:e.mode,onCancel:e.onCancel})})]})})})})})})}function bW(){document.querySelectorAll("[data-heycater-funnel]").forEach(e=>{W.render(x.jsx(yW,{}),e)})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",bW):bW(),window.HeycaterFunnel={mount:function(e){const t="string"==typeof e?document.querySelector(e):e;t&&W.render(x.jsx(yW,{}),t)},setLocale:function(e){vW&&vW(e)}};const wW=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})),xW=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))}();
1655
+ `,fW="trustedshops_ratings",pW=3e5;let hW=null;const mW=YP;function gW(){var e,t;const n=null==(e=document.documentElement.lang)?void 0:e.toLowerCase();if(n&&mW.includes(n))return n;const r=null==(t=window.location.pathname.split("/")[1])?void 0:t.toLowerCase();return r&&mW.includes(r)?r:void 0}let vW=null;function yW(){const e=m.useMemo(()=>function(){const e="undefined"!=typeof window?window.__HEYCATER_CONFIG__:void 0;return{apiEndpoint:(null==e?void 0:e.graphqlEndpoint)||"https://api.heycater.com/graphql",googleMapsApiKey:(null==e?void 0:e.googleMapsApiKey)||"",locale:(null==e?void 0:e.locale)||gW()||"de",storageKey:"heycater-funnel",onBackground:"light",highlightColor:"primary",mode:(null==e?void 0:e.mode)||"embedded",onCancel:null==e?void 0:e.onCancel}}(),[]),[t,n]=m.useState(e.locale),[r,o]=m.useState(null);m.useEffect(()=>(vW=n,()=>{vW=null}),[]),m.useEffect(()=>{const e=new MutationObserver(e=>{var t;for(const r of e)if("lang"===r.attributeName){const e=null==(t=document.documentElement.lang)?void 0:t.toLowerCase();e&&mW.includes(e)&&n(e)}});return e.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]}),()=>e.disconnect()},[]),m.useEffect(()=>{var n;(n={graphqlEndpoint:e.apiEndpoint,googleMapsApiKey:e.googleMapsApiKey,locale:t})&&(aE={...rE,...n}),"undefined"!=typeof window&&window.__HEYCATER_CONFIG__&&(aE={...aE,...window.__HEYCATER_CONFIG__})},[t,e.apiEndpoint,e.googleMapsApiKey]),m.useEffect(()=>{(async()=>{if(hW&&Date.now()-hW.timestamp<pW)return hW.data;if("undefined"!=typeof window)try{const e=sessionStorage.getItem(fW);if(e){const t=JSON.parse(e);if(t.timestamp&&Date.now()-t.timestamp<pW)return hW=t,t.data}}catch{}const e=await fetch("https://integrations.etrusted.com/feeds/grades/v1/channels/chl-735bd2eb-de5a-4bf6-8510-55080217cff2/touchpoints/all/feed.json",{headers:{"Content-Type":"application/json"},method:"GET"}),t=(await e.json()).grades;if(t){const e={data:t,timestamp:Date.now()};if(hW=e,"undefined"!=typeof window)try{sessionStorage.setItem(fW,JSON.stringify(e))}catch{}}return t})().then(o).catch(console.error)},[]);const i=((e={})=>{const t=e.locale||"de",n=e.locales||YP;return YS.isInitialized?Object.entries(NV).forEach(([e,t])=>{Object.entries(t).forEach(([t,n])=>{YS.hasResourceBundle(e,t)||YS.addResourceBundle(e,t,n)})}):YS.use(vd).init({lng:t,supportedLngs:n,preload:YP,fallbackLng:AV,resources:NV,interpolation:{escapeValue:!1},initImmediate:!1,react:{useSuspense:!1}}),YS.language!==t&&YS.changeLanguage(t),YS})({locale:t}),a=m.useMemo(()=>{return t=e.apiEndpoint,new Xh({url:t,exchanges:[Yh,Qh({onError:lW}),uW,Gh],fetch:cW});var t},[e.apiEndpoint]);return x.jsx(rm,{value:a,children:x.jsx(Ed,{i18n:i,children:x.jsx(JS,{locale:t,children:x.jsx(Jf,{theme:sW,children:x.jsx(pa,{theme:sW,children:x.jsxs(Bi,{injectFirst:!0,children:[x.jsx(Zs,{}),x.jsx(dW,{}),x.jsx(xO,{initialized:!0,storageKey:e.storageKey,storage:"sessionStorage",children:x.jsx(WV,{onBackground:e.onBackground,highlightColor:e.highlightColor,ratings:r,mode:e.mode,onCancel:e.onCancel})})]})})})})})})}function bW(){document.querySelectorAll("[data-heycater-funnel]").forEach(e=>{W.render(x.jsx(yW,{}),e)})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",bW):bW(),window.HeycaterFunnel={mount:function(e){const t="string"==typeof e?document.querySelector(e):e;t&&W.render(x.jsx(yW,{}),t)},setLocale:function(e){vW&&vW(e)}};const wW=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})),xW=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))}();