import"./index-zWZxKBfo.js";import"./index-B4k_dH6V.js";import"./index-BU7FUSdu.js";import{c as commonjsGlobal}from"./_commonjsHelpers-BFTU3MAI.js";import"./index-D6JOtC1P.js";var lodash_isdate={exports:{}};var hasRequiredLodash_isdate;function requireLodash_isdate(){if(hasRequiredLodash_isdate)return lodash_isdate.exports;hasRequiredLodash_isdate=1;(function(t,e){var n="[object Date]";var o=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;var a=e&&!e.nodeType&&e;var r=a&&"object"=="object"&&t&&!t.nodeType&&t;var i=r&&r.exports===a;var s=i&&o.process;var u=function(){try{return s&&s.binding("util")}catch(t){}}();var c=u&&u.isDate;function d(t){return function(e){return t(e)}}var l=Object.prototype;var f=l.toString;function v(t){return g(t)&&f.call(t)==n}var p=c?d(c):v;function g(t){return!!t&&typeof t=="object"}t.exports=p})(lodash_isdate,lodash_isdate.exports);return lodash_isdate.exports}requireLodash_isdate();function isSpaceKey(t){return t.key===" "}function isEscapeKey(t){return t.key==="Escape"}var RequestState;(function(t){t[t["INIT"]=0]="INIT";t[t["RUNNING"]=1]="RUNNING";t[t["SUCCESS"]=2]="SUCCESS";t[t["ERROR"]=3]="ERROR"})(RequestState||(RequestState={}));var Language=function(){function t(t){this.key=t}return t}();var INTEGRATION_BASE_URL="https://www.baloise.ch";var INTEGRATION_BASE_PATH="/app-integration";var getIntegrationBaseUrl=function(){var t=getHost();if(t&&t.indexOf("www.baloise.ch")>=0){return"https://".concat(t)}return INTEGRATION_BASE_URL};var getIntegrationUrl=function(t,e,n,o){if(e===void 0){e="CH"}if(n===void 0){n=IntegrationType.FOOTER}if(o===void 0){o="v2"}var a=t.key;if(n===IntegrationType.ONETRUST){a="all"}else{if(e==="DE"){a="de"}}return"".concat(getIntegrationBaseUrl()).concat(INTEGRATION_BASE_PATH,"/").concat(o,"/").concat(e.toLowerCase(),"/").concat(n,"/").concat(a,".json")};var getHost=function(){var t;return((t=window===null||window===void 0?void 0:window.location)===null||t===void 0?void 0:t.host)||undefined};var IntegrationType;(function(t){t["FOOTER"]="footer";t["SOCIAL_MEDIA"]="socialmediachannels";t["ONETRUST"]="onetrust"})(IntegrationType||(IntegrationType={}));var loadFooterLinks=function(t,e){if(e===void 0){e="CH"}var n=getIntegrationUrl(t,e,IntegrationType.FOOTER);return fetch(n).then((function(t){return t.json()})).then((function(t){return t}))};var loadSocialMediaLinks=function(t,e){if(e===void 0){e="CH"}var n=getIntegrationUrl(t,e,IntegrationType.SOCIAL_MEDIA,"v1");return fetch(n).then((function(t){return t.json()})).then((function(t){return t}))};export{Language as L,loadSocialMediaLinks as a,isEscapeKey as b,isSpaceKey as i,loadFooterLinks as l};