Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@front10/utils

Package Overview
Dependencies
Maintainers
5
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@front10/utils - npm Package Compare versions

Comparing version 0.12.0 to 0.22.8

2

dist/utils.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("@emotion/cache")),n=require("@emotion/core"),r=require("react"),o=t(r),i=t(require("stylis-rtl")),a=require("loglevel"),l=t(require("axios"));function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var s=function(){return"undefined"!=typeof window},d=function(){return(new Date).getTime()+"_"+Math.random().toString().replace(".","")},c=function(t){var e;void 0===t&&(t="");var n,r=0;if(0===(e=t||d()).length)return r;for(n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return r},u=function(t,e){for(var n=f({},e&&e.designTokens||{}),r=t.split("@theme:")[1].split("."),o=0;o<r.length;o++){var i=n[r[o]];if(!i)return null;n=i}return n},g=function(t,e){var n=e&&e.palette||{},r=!1,o=t.substring(9).trim();o.endsWith("!important")&&(r=!0,o=o.substring(0,o.length-11).trim());var i=n&&n[o]||null;return i&&r?i+"!important":i},p=function(t){var e="",n=null,r=t.options;r&&(r.direction&&(e=r.direction),r.theme&&(n=r.theme));var o=function(e,n){return e.includes(n)||t.className&&(!t.className||t.className.includes(n))?e:e+" "+n},i=function(t){return!!s()&&(window.FR||(window.FR={}),window.FR.__registeredDynamicGeneratedStyles||(window.FR.__registeredDynamicGeneratedStyles={}),!!window.FR.__registeredDynamicGeneratedStyles[t])},a=function(t){return!!s()&&(window.FR||(window.FR={}),window.FR.__registeredDynamicGeneratedStyles||(window.FR.__registeredDynamicGeneratedStyles={}),window.FR.__registeredDynamicGeneratedStyles[t]||(window.FR.__registeredDynamicGeneratedStyles[t]=1),!0)},l=function(t){if(s()&&"undefined"!=typeof document){var e=document.getElementById("frDynamicGeneratedStyles");if(e)e.innerHTML=e.innerHTML+" "+t;else{var n=t,r=document.body||document.getElementsByTagName("body")[0],o=document.createElement("style");o.type="text/css",o.id="frDynamicGeneratedStyles",o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n)),r.appendChild(o)}}},f={fontSize:"font-size",margin:"margin",marginRight:"margin-right",marginLeft:"margin-left",marginTop:"margin-top",marginBottom:"margin-bottom",marginHeight:"1",marginWidth:"1",padding:"padding",paddingRight:"padding-right",paddingLeft:"padding-left",paddingTop:"padding-top",paddingBottom:"padding-bottom",paddingHeight:"1",paddingWidth:"1",linearGradient:"linear-gradient",radialGradient:"radial-gradient",lineHeight:"line-height"},d=function(t,n,r,o){if(t.includes(n)||n.className&&(!n.className||n.className.includes(n)))return t;if(f[r]&&isNaN(o)&&"auto"!==o){var s="fr-"+c(""+r+o+e),d=function(t,e,n){var r=f[e];return"marginWidth"===e?"."+t+" { margin-left: "+n+"; margin-right: "+n+"; }":"marginHeight"===e?"."+t+" { margin-top: "+n+"; margin-bottom: "+n+"; }":"paddingWidth"===e?"."+t+" { padding-left: "+n+"; padding-right: "+n+"; }":"paddingHeight"===e?"."+t+" { padding-top: "+n+"; padding-bottom: "+n+"; }":"linearGradient"===e||"radialGradient"===e?"."+t+" { "+p(e,n)+" }":r?"."+t+" { "+r+": "+n+" }":(console.log("The property "+e+" has not value in the mapping"),"")}(s,r,o);return i(s)||(l(d),a(s)),t+" "+s}return t+" "+n},p=function(e,n){var r=t.options.direction;if(r||(r="ltr"),"linearGradient"===e){if("rtl"===r){var o=n;if(/right/.test(n)&&(o=o.replace(new RegExp("right","g"),"left")),/left/.test(n))o=o.replace(new RegExp("left","g"),"right");else{var i=/(-)*\d*\d[0-9]deg/g.exec(n),a=i[0].substring(0,i[0].length-3),l=-1*(parseInt(a)-180);o=o.replace(new RegExp(a,"g"),l)}return"background: -webkit-linear-gradient("+o+");"}return"background: -webkit-linear-gradient("+n+");"}if("rtl"===r){var f=n;return/right/.test(n)&&(f=f.replace(new RegExp("right","g"),"left")),/left/.test(n)&&(f=f.replace(new RegExp("left","g"),"right")),"background: radial-gradient("+f+");"}return"background: radial-gradient("+n+");"};return function(){var r=t.className,f="";r&&(f+=" "+r);var p,b,h,v,y,x,w,C,S,k,R,j,T,I,O,E,W,F,N,L,M,D,z,H,P,A,G,_,B,q,U,J,V,X,Q,$,Z,K,Y,tt,et,nt,rt,ot,it,at,lt,ft,st,dt,ct,ut,gt,pt,mt,bt,ht,vt,yt,xt,wt,Ct,St,kt,Rt,jt,Tt,It,Ot,Et,Wt=(p=t.marginRight,b=t.marginLeft,h=t.marginTop,v=t.marginBottom,y=t.marginHeight,x=t.marginWidth,C=t.paddingRight,S=t.paddingLeft,k=t.paddingTop,R=t.paddingBottom,j=t.paddingHeight,T=t.paddingWidth,I=t.padding,O=t.paddingSm,E=t.paddingMd,W=t.paddingLg,F=t.paddingXl,N=t.hover,L="",(w=t.margin)&&(L=d(L,"fr-m-"+w,"margin",w)),p&&(L=d(L,"fr-mr-"+p,"ltr"===e?"marginRight":"marginLeft",p)),b&&(L=d(L,"fr-ml-"+b,"ltr"===e?"marginLeft":"marginRight",b)),h&&(L=d(L,"fr-mt-"+h,"marginTop",h)),v&&(L=d(L,"fr-mb-"+v,"marginBottom",v)),y&&(L=d(L,"fr-my-"+y,"marginHeight",y)),x&&(L=d(L,"fr-mx-"+x,"marginWidth",x)),I&&(L=d(L,"fr-p-"+I,"padding",I)),C&&(L=d(L,"fr-pr-"+C,"ltr"===e?"paddingRight":"paddingLeft",C)),S&&(L=d(L,"fr-pl-"+S,"ltr"===e?"paddingLeft":"paddingRight",S)),k&&(L=d(L,"fr-pt-"+k,"paddingTop",k)),R&&(L=d(L,"fr-pb-"+R,"paddingBottom",R)),j&&(L=d(L,"fr-py-"+j,"paddingHeight",j)),T&&(L=d(L,"fr-px-"+T,"paddingWidth",T)),O&&(L=d(L,"fr-p-sm-"+O,"paddingSm",O)),E&&(L=d(L,"fr-p-md-"+E,"paddingMd",E)),W&&(L=d(L,"fr-p-lg-"+W,"paddingLg",W)),F&&(L=d(L,"fr-p-xl-"+F,"paddingXl",F)),N&&(L=o(L,"fr-component-hover-"+N)),L),Ft=function(){var e=t.bgColor,n=t.textColor,r="";return e&&(r=o(r,"fr-bg-"+e)),n&&(r=o(r,"fr-text-"+n)),r}(),Nt=function(){var e=t.borderColor,n=t.borderStyle,r=t.borderWidth,i=t.borderTop,a=t.borderRight,l=t.borderBottom,f=t.borderLeft,s=t.borderNone,d=t.shadow,c="";return t.border&&(c=o(c,"fr-border")),e&&(c=o(c,"fr-border-"+e)),n&&(c=o(c,"fr-border-style-"+n)),r&&(c=o(c,"fr-border-width-"+r)),i&&(c=o(c,"fr-border-top")),a&&(c=o(c,"fr-border-right")),l&&(c=o(c,"fr-border-bottom")),f&&(c=o(c,"fr-border-left")),s&&(c=o(c,"fr-border-0")),d&&(c=o(c,"fr-shadow-"+d)),c}(),Lt=(D=t.textTransform,z=t.textTruncate,H=t.fontItalic,P=t.fontWeight,A=t.textMonoSpace,G=t.fontName,_=t.fontSize,B=t.fontSizeSm,q=t.fontSizeMd,U=t.fontSizeLg,J=t.fontSizeXlg,V="",(M=t.textAlign)&&(V=o(V,"fr-text-"+M)),D&&(V=o(V,"fr-text-"+D)),z&&(V=o(V,"fr-text-truncate")),"string"==typeof G&&(V=o(V,"fr-font-name-"+G.toLocaleLowerCase().replace(/ /g,"-"))),H&&(V=o(V,"fr-font-italic")),P&&(V=o(V,"fr-font-weight-"+P)),A&&(V=o(V,"fr-text-monospace")),_&&(V=d(V,"fr-font-size-"+_+"-x","fontSize",_)),B&&(V=d(V,"fr-font-size-sm-"+B+"-x","fontSize",_)),q&&(V=d(V,"fr-font-size-md-"+q+"-x","fontSize",_)),U&&(V=d(V,"fr-font-size-lg-"+U+"-x","fontSize",_)),J&&(V=d(V,"fr-font-size-xlg-"+J+"-x","fontSize",_)),V),Mt=function(){var e=t.rounded,n=t.roundedRight,r=t.roundedLeft,i=t.roundedTop,a=t.roundedBottom,l=t.roundedCircle,f="";return e&&(f=o(f,"fr-rounded-"+e+"-x")),i&&(f=o(f,"fr-rounded-top-"+i+"-x")),n&&(f=o(f,"fr-rounded-right-"+n+"-x")),a&&(f=o(f,"fr-rounded-bottom-"+a+"-x")),r&&(f=o(f,"fr-rounded-left-"+r+"-x")),l&&(f=o(f,"fr-rounded-circle")),f}(),Dt=function(){var e=t.floatRight,n=t.floatNone,r="";return t.floatLeft&&(r=o(r,"fr-float-left")),e&&(r=o(r,"fr-float-right")),n&&(r=o(r,"")),r}(),zt=function(){var e=t.width,n="";return e&&(n="fr-w-"+e),n}(),Ht=function(){var e="";return t.focusable&&(e=t.focusClass||"fr-focus"),e}(),Pt=function(){var e=t.height,n="";return e&&(n="fr-h-"+e),n}(),At=function(){var e=t.display,n="";return e&&(n=o(n,"fr-d-"+e)),n}(),Gt=function(){var e=t.align,n="";return e&&(n="fr-align-"+e),n}(),_t=function(){var e=t.justifyContent,n="";return e&&(n=o(n,"fr-justify-content-"+e)),n}(),Bt=function(){var e=t.position,n=t.left,r=t.right,i=t.top,a=t.bottom,l="";return e&&(l=o(l,"fr-position-"+e)),n&&(l=o(l,"fr-left-"+n)),r&&(l=o(l,"fr-right-"+r)),i&&(l=o(l,"fr-top-"+i)),a&&(l=o(l,"fr-bottom-"+a)),l}(),qt=(Q="",(X=t.alignSelf)&&(Q=o(Q,"fr-align-self-"+X)),Q),Ut=(Z="",($=t.flexGrow)&&(Z=o(Z,"fr-flex-grow-"+$)),Z),Jt=(Y="",(K=t.zIndex)&&(Y=o(Y,"fr-z-index-"+K)),Y),Vt=(et="",(tt=t.flexDirection)&&(et=o(et,"fr-flex-"+tt)),et),Xt=(rt="",(nt=t.alignItems)&&(rt=o(rt,"fr-align-items-"+nt)),rt),Qt=function(){var e="";return t.rtlReverse&&(e=o(e,"fr-rtl-reverse")),e}(),$t=(it="",(ot=t.flexShrink)&&(it=o(it,"fr-flex-shrink-"+ot)),it),Zt=function(){if(t.rotate)return o("","fr-rotate")}(),Kt=(lt=t.flexXs,ft=t.flexSm,st=t.flexMd,dt=t.flexLg,ct="",(at=t.flex)&&(ct=o(ct,"fr-flex-"+at)),lt&&(ct=o(ct,"fr-flex-xs-"+lt)),ft&&(ct=o(ct,"fr-flex-sm-"+ft)),st&&(ct=o(ct,"fr-flex-md-"+st)),dt&&(ct=o(ct,"fr-flex-lg-"+dt)),ct),Yt=(gt="",(ut=t.linearGradient)&&(gt=d(gt,"fr-lineal-gradient-"+c(),"linearGradient",ut)),gt),te=(mt="",(pt=t.radialGradient)&&(mt=d(mt,"fr-radial-gradient-"+c(),"radialGradient",pt)),mt),ee=(ht="",(bt=t.cursor)&&(ht=o(ht,"fr-cursor-"+bt)),ht),ne=(yt="",(vt=t.roundedTopRight)&&(yt=o(yt,"fr-rounded-top-right-"+vt+"-x")),yt),re=(wt="",(xt=t.roundedTopLeft)&&(wt=o(wt,"fr-rounded-top-left-"+xt+"-x")),wt),oe=(St="",(Ct=t.roundedBottomRight)&&(St=o(St,"fr-rounded-bottom-right-"+Ct+"-x")),St),ie=(Rt="",(kt=t.roundedBottomLeft)&&(Rt=o(Rt,"fr-rounded-bottom-left-"+kt+"-x")),Rt),ae=(Tt="",(jt=t.iconColor)&&(Tt=o(Tt,"fr-i-"+jt)),Tt),le=(Ot="",(It=t.lineHeight)&&(Ot=d(Ot,"fr-line-height-"+It,"lineHeight",It)),Ot),fe=(Et=t.settingsPath)&&s()&&function(){if(s()){for(var t,e={},n=/\+/g,r=/([^&;=]+)=?([^&;]*)/g,o=function(t){return decodeURIComponent(t.replace(n," "))},i=window.location.hash.substring(1);t=r.exec(i);)e[o(t[1])]=o(t[2]);return e}return{}}().hasOwnProperty("debugMe")?"fr-s-path fr-s-path-"+Et:"",se=function(){var r="",o="";if(t["cmp-styles"]&&"object"==typeof t["cmp-styles"]&&t["cmp-styles"].constructor===Object){var f=JSON.parse(JSON.stringify(t["cmp-styles"]));Object.keys(f).map((function(t){var d=t.replace(/--space--/g," ").replace(/--point--/g,".").replace(/--hashtag--/g,"#");if(o="","string"==typeof f[t])if("@theme"===d)f[t].startsWith("@theme:")||(f[t]="@theme:"+f[t]),f[t]=u(f[t],n)||{};else if(f[t].startsWith("@theme:"))if(t.startsWith(":")&&s())console.warn('Cannot use cmp-styles={{"'+t+'":"'+f[t]+'"}} this is not allowed.');else{var p=u(f[t],n);p?o="{"+d+":"+p+"}":s()&&console.warn("Design token "+f[t]+" not found in theme.")}else if(f[t].startsWith("@palette:")){var b=g(f[t],n);b?o="{"+d+":"+b+"}":s()&&console.warn("Palette color "+f[t]+" not found in theme.")}else o=f[t]?"{"+d+":"+f[t]+"}":"";if(f[t]&&"object"==typeof f[t]&&f[t].constructor===Object&&(o="{"+Object.entries(f[t]).reduce((function(t,e){var r=e[0],o=e[1],i=t;if("@theme"===r){var a=o;o.startsWith("@theme:")||(a="@theme:"+a);var l=u(a,n)||{};Object.keys(l).map((function(t){i+=t+":"+l[t]+";"}))}else if("string"==typeof o&&o.startsWith("@theme:")){var f=u(o,n);f?i=""+t+r+":"+f+";":s()&&console.warn("Design token "+o+" not found in theme.")}else if("string"==typeof o&&o.startsWith("@palette:")){var d=g(o,n);d?i=""+t+r+":"+d+";":s()&&console.warn("Palette color "+o+" not found in theme.")}else o&&(i=""+t+r+":"+o+";");return i}),"")+"}"),o=o&&"{}"!==o?o:null){"rtl"===e&&(o=m(o));var h="fr-"+c(""+d+o),v="."+h;d.startsWith(":")?v+=""+d+o:d.startsWith(".")||d.startsWith("#")?v+=" "+d+o:d.startsWith("@media")?v=d+"{."+h+o+"}":v+=o,i(h)||(l(v),a(h)),r+=r.includes(h)?"":" "+h}}))}return r}();return Wt&&(f=f+" "+Wt),Ft&&(f=f+" "+Ft),Nt&&(f=f+" "+Nt),Lt&&(f=f+" "+Lt),Mt&&(f=f+" "+Mt),Dt&&(f=f+" "+Dt),zt&&(f=f+" "+zt),Ht&&(f=f+" "+Ht),Pt&&(f=f+" "+Pt),At&&(f=f+" "+At),Gt&&(f=f+" "+Gt),_t&&(f=f+" "+_t),Bt&&(f=f+" "+Bt),qt&&(f=f+" "+qt),Ut&&(f=f+" "+Ut),Jt&&(f=f+" "+Jt),Vt&&(f=f+" "+Vt),Xt&&(f=f+" "+Xt),Qt&&(f=f+" "+Qt),$t&&(f=f+" "+$t),Zt&&(f=f+" "+Zt),Kt&&(f=f+" "+Kt),Yt&&(f=f+" "+Yt),te&&(f=f+" "+te),ee&&(f=f+" "+ee),ne&&(f=f+" "+ne),re&&(f=f+" "+re),oe&&(f=f+" "+oe),ie&&(f=f+" "+ie),ae&&(f=f+" "+ae),le&&(f=f+" "+le),se&&(f=f+" "+se),fe&&(f=f+" "+fe),f}().trim()},m=function(t){return t.replace(/right/g,"l-e-f-t").replace(/left/g,"r-i-g-h-t").replace(/l-e-f-t/g,"left").replace(/r-i-g-h-t/g,"right")},b=o.createContext({translate:function(t,e){return e||t},direction:"ltr",localizationData:{},isIFrame:!1}),h=e({key:"rtl",stylisPlugins:[i]}),v=e({key:"ltr"});function y(t,e){void 0===e&&(e={direction:"ltr",theme:{}});var n=f({},function(t,e){var n=e&&e.designTokens||{};if(n){var r={};return Object.keys(t).map((function(e){return r[e]=t[e]&&"string"==typeof t[e]&&t[e].toLowerCase().trim().startsWith("@theme:")?u(t[e],{designTokens:n}):t[e],e})),r}return t}(t,e.theme),{options:e});return[p(n),Object.assign({},n.style,{filter:t.cssFilter})]}var x=function(){if("undefined"!=typeof window){for(var t,e={},n=/\+/g,r=/([^&;=]+)=?([^&;]*)/g,o=function(t){return decodeURIComponent(t.replace(n," "))},i=window.location.hash.substring(1);t=r.exec(i);)e[o(t[1])]=o(t[2]);return e}return{}},w=function(t){return void 0===t&&(t=!1),!("undefined"!=typeof window&&!function(t){var e=x();return!(!t&&!e.hasOwnProperty("simulateSSR"))}(t))},C=function(){return w()?0:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},S=function(t){return t&&"object"==typeof t&&!Array.isArray(t)},k=function t(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(!r.length)return e;var i=r.shift();return S(e)&&S(i)&&Object.keys(i).forEach((function(n){var r,o;S(i[n])?(e[n]||Object.assign(e,((r={})[n]={},r)),t(e[n],i[n])):Object.assign(e,((o={})[n]=i[n],o))})),t.apply(void 0,[e].concat(r))};function R(t,e){var n=new RegExp(Object.keys(e).map((function(t){return"\\{"+t+"\\}"})).join("|"),"g");return t.replace(n,(function(t){return e[t.substr(1,t.length-2)]}))}var j=function(t,e){for(var n=e.split("."),r=0;r<n.length;r+=1)if(!(t=t[n[r]])||-1===t)return;return t},T=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e},I=function(t,e){var n;return void 0===e&&(e=.5),!!/^#([A-Fa-f0-9]{3}){1,2}$/.test(t)&&(3===(n=t.substring(1).split("")).length&&(n=[n[0],n[0],n[1],n[1],n[2],n[2]]),"rgba("+((n="0x"+n.join(""))>>16&255)+","+(n>>8&255)+","+(255&n)+","+e+")")},O=function(t){var e;return!!/^#([A-Fa-f0-9]{3}){1,2}$/.test(t)&&(3===(e=t.substring(1).split("")).length&&(e=[e[0],e[0],e[1],e[1],e[2],e[2]]),{r:(e="0x"+e.join(""))>>16&255,g:e>>8&255,b:255&e})},E=function(t){var e=O(t);return!!e&&((299*e.r+587*e.g+114*e.b)/1e3>=128?"#000000":"#FFFFFF")},W=function(t,e,n){return t/e*n},F=function(t,e){var n,r,o=O(t),i={};return!!o&&(e<0?(i.r=o.r-parseInt(o.r/100*-e,10),i.g=o.g-parseInt(o.g/100*-e,10),i.b=o.b-parseInt(o.b/100*-e,10)):(i.r=parseInt(W(255-o.r,100,e),10)+o.r,i.g=parseInt(W(255-o.g,100,e),10)+o.g,i.b=parseInt(W(255-o.b,100,e),10)+o.b),n=i.g,r=i.b,"#"+T(i.r)+T(n)+T(r))},N=function(t,e,n){void 0===n&&(n=22);var r=100/Math.ceil(n/2),o=r*Math.floor(n/2),i=[];if(function(t){return!!O(t)}(t))for(var a=0;a<n;a+=1){var l=F(t,o-a*r),f=E(l);i.push({name:a>n/2?e+"-"+a:a===n/2?e:e+"-"+(a+1),color:l,textColor:f})}return i},L=function(t,e,n){var r=e.color,o=e.color,i=e.color,a=e.color,l=e.color,f=e.textColor,s=e.textColor,d=e.color,c=e.textColor;return t[n+2]?o=t[n+2].color:t[n-2]&&(o=t[n-2].color),t[n+1]?i=t[n+1].color:t[n-1]&&(i=t[n-1].color),t[n+2]?a=t[n+2].color:t[n-2]&&(a=t[n-2].color),t[n+4]?l=t[n+4].color:t[n-4]&&(l=t[n-4].color),t[n+4]?f=t[n+4].textColor:t[n-4]&&(f=t[n-4].textColor),t[n+2]?r=t[n+2].color:t[n-2]&&(r=t[n-2].color),t[n+2]?s=t[n+2].textColor:t[n-2]&&(s=t[n-2].textColor),t[n+3]?d=t[n+3].color:t[n-3]&&(d=t[n-3].color),t[n+3]?c=t[n+3].textColor:t[n-3]&&(c=t[n-3].textColor),"\n button.fr-btn-"+e.name+"{\n background-color:"+e.color+";\n border-color:"+e.color+";\n color:"+e.textColor+" !important;\n }\n button.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):active,\n button.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):focus,\n button.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):hover{\n background-color:"+r+";\n border-color:"+r+";\n color:"+s+"\n }\n button.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):active,\n button.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled).fr-active,\n button.fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled):active,\n button.fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled).fr-active,\n button.fr-show > .fr-btn-outline-"+e.name+".fr-dropdown-toggle{\n color: "+c+";\n background-color: "+d+";\n border-color: "+d+";\n }\n .fr-border-"+e.name+"{border-color: "+e.color+" !important;}\n .fr-bg-"+e.name+"{background-color: "+e.color+" !important;}\n .gradient.fr-bg-"+e.name+",fr-btn-outline-"+e.name+":hover,\n button.gradient.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled){\n background-image: linear-gradient(to bottom,"+e.color+","+o+");\n }\n button.gradient.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):focus,\n button.gradient.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):hover,\n button.gradient.fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled):focus,\n button.gradient.fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled):hover{\n background-image: linear-gradient(to bottom,"+e.color+","+i+");\n color: "+e.textColor+";\n }\n button.gradient.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):active,\n button.gradient.fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled):active{\n background-image: linear-gradient(to bottom,"+a+","+l+");\n color: "+f+";\n }\n .fr-text-"+e.name+"{color: "+e.color+" !important;}\n .fr-btn-outline-"+e.name+"{\n color: "+e.color+";\n border-color: "+e.color+";\n }\n .fr-btn-outline-"+e.name+":hover{\n color: "+e.textColor+";\n background-color: "+e.color+";\n border-color: "+e.color+";\n }\n .fr-btn-outline-"+e.name+".fr-disabled,\n .fr-btn-outline-"+e.name+":disabled{\n color: "+e.color+" !important;\n background-color: transparent !important;\n border-color: "+e.color+" !important;\n }\n .fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled):active:focus,\n .fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):active:focus,\n .fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled).fr-active:focus,\n .fr-show > .fr-btn-outline-"+e.name+".fr-dropdown-toggle:focus{\n box-shadow: 0 0 0 0.2rem "+I(e.color)+";\n }\n .fr-btn-"+e.name+":focus, .fr-btn-outline-"+e.name+":focus{\n box-shadow: 0 0 0 0.2rem "+I(e.color)+";\n }\n .fr-component-hover-"+e.name+":hover:not(.fr-row):not([class^=fr-col]):not(button)>*{\n color:"+e.textColor+" !important;\n }\n .fr-component-hover-"+e.name+":hover:not(button){\n background-color:"+e.color+" !important;\n border-color:"+r+" !important;\n }\n .fr-icon.fr-i-"+e.name+" path{\n fill: "+e.color+";\n }\n .fr-btn-"+e.name+" .fr-icon path{\n fill: "+e.textColor+";\n }\n"},M=function(t){return function(e,n,r){var o=t(e,n);return null==r||"object"!=typeof r?o:R(o,r)}};exports.Context=b,exports.ContextProvider=function(t){var e=t.translate,r=void 0===e?function(t,e){return e||t}:e,i=t.direction,a=void 0===i?"ltr":i,l=t.localizationData,f=void 0===l?{}:l,s=t.children,d=t.isIFrame,c=void 0!==d&&d,u=o.useMemo((function(){return{translate:r,direction:a.toLowerCase(),localizationData:f,isIFrame:c}}),[r,a,f,c]);return o.createElement(b.Provider,{value:u},o.createElement(n.CacheProvider,{key:a,value:"rtl"===a?h:v},o.createElement("div",{dir:a},s)))},exports.annotateAndLogError=function(t,e,n,r,o,i,s,d){void 0===o&&(o=null),void 0===i&&(i=null),void 0===s&&(s=null),void 0===d&&(d=!1);var c=Object.assign({},t);if(!d&&!c.middlemanCount){if(c.message=e+": "+t.message,c.rawMessage=""+t.message,c.stack=t.stack,c.tags||(c.tags=[]),c.date=(new Date).toUTCString(),c.tags.push(e),c.cmpConfig=n||!1,c.cmpMeta=i||!1,c.pageContext=function(t){return!!t&&{airlineIataCode:j(t,"airlineIataCode"),language:j(t,"language"),siteEdition:j(t,"siteEdition"),pageType:j(t,"pageType"),deviceCategory:j(t,"deviceCategory"),url:j(t,"url"),renderType:j(t,"renderType")}}(n&&n.pageContext?n.pageContext:s),c.middlemanCount||(c.middlemanCount=0),c.middlemanCount+=1,c.cmpConfig&&c.cmpConfig.envConfig&&(c.cmpConfig.envConfig=null,delete c.cmpConfig.envConfig),r)a.info(e+":",t),c.traceMode=!0;else{var u=o;!u&&n&&(u=j(n,"containerConfig.settings.integrationSettings")),function(t,e){return new Promise((function(n,r){if(e&&e.logsCollector&&e.logsCollector.active){var o=e.logsCollector,i={errMsg:t.message,errRawMsg:t.rawMessage,errOrigin:w()?"SSR":window.location.href,cmpMeta:t.cmpMeta,pageContext:t.pageContext};t.request&&t.config&&(i.reqInfo={},i.reqInfo.url=t.config.url,i.reqInfo.query=t.config.data,i.reqInfo.headers=t.config.headers),t.response&&t.response.data&&(i.resInfo={},i.resInfo.status=t.response.data.status,i.resInfo.timestamp=t.response.data.timestamp,i.resInfo.message=t.response.data.error),!w()&&"undefined"!=typeof navigator&&navigator.connection&&(i.connection={downlink:navigator.connection.downlink,effectiveType:navigator.connection.effectiveType,rtt:navigator.connection.rtt}),l({method:o.method,url:""+o.endPoint,headers:f({},o.headers),data:i}).then((function(t){n(t.data)})).catch((function(t){a.error(t),r(t)}))}}))}(c,u).catch((function(t){a.error(t)})),a.error(e+":",t)}return c}return t},exports.blur=function(t){t.current&&(t.current.getInput?t.current.getInput().blur():t.current.blur())},exports.clientHeight=function(){return w()?0:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},exports.clientWidth=C,exports.debounce=function(t,e,n){var r;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var l=function(){r=null,n||t.apply(void 0,i)},f=n&&!r;clearTimeout(r),r=setTimeout(l,e),f&&t.apply(void 0,i)}},exports.encodeUrlQueryData=function(t){return Object.keys(t).filter((function(e){return void 0!==t[e]})).map((function(e){return[e,t[e]].map(encodeURIComponent).join("=")})).join("&")},exports.evaluateObject=function(t,e){if(!t||!e)return t;for(var n=JSON.stringify(t),r=function(t){for(var e,n=[],r=/(@@|%%)[a-zA-Z.0-9_]*(@@|%%)/g;null!==(e=r.exec(t));)n.push(e[0].substr(2).slice(0,-2));return n}(n),o=0;o<r.length;o+=1){var i=r[o].split(".")[0],a=j(e,r[o]);"window"===i&&"undefined"!=typeof window&&(a=j(window,r[o])),a?(Array.isArray(a)&&(a=JSON.stringify(a)),n=n.replace(new RegExp("(@@|%%)"+r[o]+"(@@|%%)","g"),a)):n=n.replace(new RegExp('\\"(@@|%%)'+r[o]+'(@@|%%)\\"',"g"),null)}n=(n=n.replace(/"\[/g,"[")).replace(/\]"/g,"]");try{return JSON.parse(n)}catch(e){return t}},exports.focus=function(t){t.current&&(t.current.getInput?t.current.getInput().focus():t.current.focus())},exports.getCurrentOriginUrl=function(){return w()?"":window.location.origin||window.location.protocol+"//"+window.location.host},exports.getDataSource=function(t){return"function"==typeof t?t:"string"==typeof t?Function("settings",t):function(){return t}},exports.getHashParams=x,exports.getQueryParams=function(t){for(var e=t.split("&"),n={},r=0;r<e.length;r+=1){var o=e[r].split("="),i=decodeURIComponent(o[0]),a=decodeURIComponent(o[1]);if(void 0===n[i])n[i]=decodeURIComponent(a);else if("string"==typeof n[i]){var l=[n[i],decodeURIComponent(a)];n[i]=l}else n[i].push(decodeURIComponent(a))}return n},exports.getSanitizedError=function(t){return JSON.stringify(t,(e=new WeakSet,function(t,n){if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n)}return n}));var e},exports.getScrollParent=function t(e,n){return null===e||(e.scrollHeight>e.clientHeight&&("html"!==e.nodeName.toLowerCase()?n.push(e):n.push(window)),t(e.parentNode,n)),n},exports.getStyles=y,exports.getUuid=d,exports.getValue=j,exports.initTheme=function(t){var e=[],n={palette:{},designTokens:t.designTokens||{}},r=[];if(t.config&&t.config.outputFields&&(r=t.config.outputFields),r.includes("colors")&&(n.colors=t.colors),r.includes("typography")&&(n.typography=t.typography),t){if(t.typography&&e.push(function(t){var e="";return t.fonts&&"object"==typeof t.fonts&&Object.keys(t.fonts).map((function(n){return"object"==typeof t.fonts[n]&&(t.fonts[n].preset?e+="@import url('"+t.fonts[n].preset+"');":Array.isArray(t.fonts[n].src)&&(e+="@font-face {\n font-family: '"+(t.fonts[n].alias?t.fonts[n].alias:n)+"';\n "+(t.fonts[n].fontStyle?"font-style:"+t.fonts[n].fontStyle+";":"")+"\n "+(t.fonts[n].fontWeight?"font-weight:"+t.fonts[n].fontWeight+";":"")+"\n "+(t.fonts[n].fontDisplay?"font-display:"+t.fonts[n].fontDisplay+";":"")+"\n src:",t.fonts[n].local&&t.fonts[n].local.forEach((function(t){e+="local('"+t+"'),"})),t.fonts[n].src.forEach((function(r,o){e+="url('"+r.url+"') format('"+r.format+"')"+(o<t.fonts[n].src.length-1?",":"")})),e+="}"),e+=".fr-font-name-"+n.toLocaleLowerCase().replace(/ /g,"-")+"{font-family:"+(t.fonts[n].alias?t.fonts[n].alias:n)+", sans-serif}"),n})),e}(t.typography)),t.colors){e.push(["button.fr-btn:disabled{\n background-color:"+(t.components&&t.components.button&&t.components.button.disabled&&t.components.button.disabled.bgColor?t.components.button.disabled.bgColor:"#d4d4d4")+";\n border-color:"+(t.components&&t.components.button&&t.components.button.disabled&&t.components.button.disabled.bgColor?t.components.button.disabled.bgColor:"#d4d4d4")+";\n color:"+(t.components&&t.components.button&&t.components.button.disabled&&t.components.button.disabled.bgColor?t.components.button.disabled.bgColor:"#afafaf")+"\n }\n "]);for(var o=Object.keys(t.colors),i=0;i<o.length;i+=1){var a=o[i],l=t.colors[o[i]];"none"!==l&&function(){n.palette[""+a]=l;var r=N(l,a);if(t.config&&t.config.generatePalette)r.forEach((function(t,o){if(n.palette[""+t.name]=t.color,s()){var i=L(r,t,o);e.push(i.replace(/\n. |\r/g,""))}}));else if(s()){var o=L(r,{color:l,name:a,textColor:E(l)},11);e.push(o.replace(/\n. |\r/g,""))}}()}if(t.colors.primary){var f=I(t.colors.primary,.25);e.push(".fr-focus:focus, .fr-form-control:focus, .fr-focus\\:focus{box-shadow: 0 0 0 0.2rem "+f+";outline: 0;}")}}if(s()&&"undefined"!=typeof document){var d=document.getElementById("frTheming");if(d)d.innerHTML=e.join(" ");else{var c=""+e.join(" "),u=document.body||document.getElementsByTagName("body")[0],g=document.createElement("style");g.type="text/css",g.id="frTheming",g.styleSheet?g.styleSheet.cssText=c:g.appendChild(document.createTextNode(c)),u.appendChild(g)}}}return n},exports.isDebugModeActive=function(t){return!!t},exports.isDebugModeVisible=function(){return"undefined"!=typeof window&&!!x().hasOwnProperty("debugMe")},exports.isElementInViewport=function(t){var e=document.getElementById(t);if(e){var n=e.getBoundingClientRect();return n.height+n.top>=0&&n.top<window.innerHeight}return!1},exports.isEmpty=function(t){return 0===Object.entries(t).length&&t.constructor===Object},exports.isNil=function(t){return null==t},exports.isNilOrEmpty=function(t){return null==t||0===t.length||0===Object.keys(t).length},exports.isNotNil=function(t){return null!=t},exports.isPromise=function(t){return void 0!==t.then},exports.isSSR=w,exports.isViewportMobile=function(){return C()<=992},exports.loadImage=function(t,e,n,r,o,i){if(!t){var a=new Image;a.src=n,a.onload=function(){if(e){e.setAttribute("style","background-image: url('"+n+"');height: "+r+";width: "+o);var t=e.querySelector(".cmp-image-label");t&&t.setAttribute("class","cmp-image-label fr-d-none")}},a.onerror=function(){e.setAttribute("style","background-image: url('"+i+"');height: "+r+";width: "+o);var t=e.querySelector(".cmp-image-label");t&&t.setAttribute("class","cmp-image-label fr-d-block")}}return e},exports.mapObject=function(t,e){if(t){var n={};return Object.keys(t).forEach((function(r){n[r]=e(t[r])})),n}return t},exports.mergeDeep=k,exports.replaceAll=function(t,e,n){return t.replace(new RegExp(e,"g"),n)},exports.strFormat=R,exports.strSplitFormat=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.split(/{(\d+)}/g).map((function(t){return n[t]||t}))},exports.truncateNumber=function(t,e){var n=t.toString(),r=n.toString().indexOf(".");return-1!==r?n.slice(0,r+e+1):n},exports.useDirection=function(){return r.useContext(b).direction},exports.usePlural=function(){return t=r.useContext(b).translate,e=M(t),function(t){var n=t.count,r=t.key,o=t.variables,i=t.defaultValue,a=f({count:n},void 0===o?{}:o),l=r+"_"+n,s=e(l,void 0,a);return s!==l?s:e(r,i,a)};var t,e},exports.useStyles=function(t){return y(t,f({},r.useContext(b),{theme:{}}))},exports.useTranslation=function(){var t=r.useContext(b);return M(t.translate)},exports.withFlavors=function(t,e){var n=function(n){var r=t.flavors?f({},t.flavors[n.flavor]):{},i=k({},r),a=k(i,n),l=Object.assign({},e,a);return o.createElement(t,Object.assign({},l))};return n.propTypes=t.propTypes,n.defaultProps=t.defaultProps,n};
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=t(e),r=require("loglevel"),o=t(require("axios"));function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var a=function(){return"undefined"!=typeof window},l=function(){return(new Date).getTime()+"_"+Math.random().toString().replace(".","")},f=function(t){var e;void 0===t&&(t="");var n,r=0;if(0===(e=t||l()).length)return r;for(n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return r},s=function(t,e){for(var n=i({},e&&e.designTokens||{}),r=t.split("@theme:")[1].split("."),o=0;o<r.length;o++){var a=n[r[o]];if(!a)return null;n=a}return n},d=function(t,e){var n=e&&e.palette||{},r=!1,o=t.substring(9).trim();o.endsWith("!important")&&(r=!0,o=o.substring(0,o.length-11).trim());var i=n&&n[o]||null;return i&&r?i+"!important":i},c=function(t){var e="",n=null,r=t.options;r&&(r.direction&&(e=r.direction),r.theme&&(n=r.theme));var o=function(e,n){return e.includes(n)||t.className&&(!t.className||t.className.includes(n))?e:e+" "+n},i=function(t){return!!a()&&(window.FR||(window.FR={}),window.FR.__registeredDynamicGeneratedStyles||(window.FR.__registeredDynamicGeneratedStyles={}),!!window.FR.__registeredDynamicGeneratedStyles[t])},l=function(t){return!!a()&&(window.FR||(window.FR={}),window.FR.__registeredDynamicGeneratedStyles||(window.FR.__registeredDynamicGeneratedStyles={}),window.FR.__registeredDynamicGeneratedStyles[t]||(window.FR.__registeredDynamicGeneratedStyles[t]=1),!0)},c=function(t){if(a()&&"undefined"!=typeof document){var e=document.getElementById("frDynamicGeneratedStyles");if(e)e.innerHTML=e.innerHTML+" "+t;else{var n=t,r=document.body||document.getElementsByTagName("body")[0],o=document.createElement("style");o.type="text/css",o.id="frDynamicGeneratedStyles",o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n)),r.appendChild(o)}}},g={fontSize:"font-size",margin:"margin",marginRight:"margin-right",marginLeft:"margin-left",marginTop:"margin-top",marginBottom:"margin-bottom",marginHeight:"1",marginWidth:"1",padding:"padding",paddingRight:"padding-right",paddingLeft:"padding-left",paddingTop:"padding-top",paddingBottom:"padding-bottom",paddingHeight:"1",paddingWidth:"1",linearGradient:"linear-gradient",radialGradient:"radial-gradient",lineHeight:"line-height"},p=function(t,n,r,o){if(t.includes(n)||n.className&&(!n.className||n.className.includes(n)))return t;if(g[r]&&isNaN(o)&&"auto"!==o){var a="fr-"+f(""+r+o+e),s=function(t,e,n){var r=g[e];return"marginWidth"===e?"."+t+" { margin-left: "+n+"; margin-right: "+n+"; }":"marginHeight"===e?"."+t+" { margin-top: "+n+"; margin-bottom: "+n+"; }":"paddingWidth"===e?"."+t+" { padding-left: "+n+"; padding-right: "+n+"; }":"paddingHeight"===e?"."+t+" { padding-top: "+n+"; padding-bottom: "+n+"; }":"linearGradient"===e||"radialGradient"===e?"."+t+" { "+m(e,n)+" }":r?"."+t+" { "+r+": "+n+" }":(console.log("The property "+e+" has not value in the mapping"),"")}(a,r,o);return i(a)||(c(s),l(a)),t+" "+a}return t+" "+n},m=function(e,n){var r=t.options.direction;if(r||(r="ltr"),"linearGradient"===e){if("rtl"===r){var o=n;if(/right/.test(n)&&(o=o.replace(new RegExp("right","g"),"left")),/left/.test(n))o=o.replace(new RegExp("left","g"),"right");else{var i=/(-)*\d*\d[0-9]deg/g.exec(n),a=i[0].substring(0,i[0].length-3),l=-1*(parseInt(a)-180);o=o.replace(new RegExp(a,"g"),l)}return"background: -webkit-linear-gradient("+o+");"}return"background: -webkit-linear-gradient("+n+");"}if("rtl"===r){var f=n;return/right/.test(n)&&(f=f.replace(new RegExp("right","g"),"left")),/left/.test(n)&&(f=f.replace(new RegExp("left","g"),"right")),"background: radial-gradient("+f+");"}return"background: radial-gradient("+n+");"};return function(){var r=t.className,g="";r&&(g+=" "+r);var m,b,h,v,y,x,w,C,S,R,k,j,T,I,O,E,W,F,N,L,M,D,z,H,A,P,G,_,B,U,q,J,V,X,Q,$,Z,K,Y,tt,et,nt,rt,ot,it,at,lt,ft,st,dt,ct,ut,gt,pt,mt,bt,ht,vt,yt,xt,wt,Ct,St,Rt,kt,jt,Tt,It,Ot,Et,Wt=(m=t.marginRight,b=t.marginLeft,h=t.marginTop,v=t.marginBottom,y=t.marginHeight,x=t.marginWidth,C=t.paddingRight,S=t.paddingLeft,R=t.paddingTop,k=t.paddingBottom,j=t.paddingHeight,T=t.paddingWidth,I=t.padding,O=t.paddingSm,E=t.paddingMd,W=t.paddingLg,F=t.paddingXl,N=t.hover,L="",(w=t.margin)&&(L=p(L,"fr-m-"+w,"margin",w)),m&&(L=p(L,"fr-mr-"+m,"ltr"===e?"marginRight":"marginLeft",m)),b&&(L=p(L,"fr-ml-"+b,"ltr"===e?"marginLeft":"marginRight",b)),h&&(L=p(L,"fr-mt-"+h,"marginTop",h)),v&&(L=p(L,"fr-mb-"+v,"marginBottom",v)),y&&(L=p(L,"fr-my-"+y,"marginHeight",y)),x&&(L=p(L,"fr-mx-"+x,"marginWidth",x)),I&&(L=p(L,"fr-p-"+I,"padding",I)),C&&(L=p(L,"fr-pr-"+C,"ltr"===e?"paddingRight":"paddingLeft",C)),S&&(L=p(L,"fr-pl-"+S,"ltr"===e?"paddingLeft":"paddingRight",S)),R&&(L=p(L,"fr-pt-"+R,"paddingTop",R)),k&&(L=p(L,"fr-pb-"+k,"paddingBottom",k)),j&&(L=p(L,"fr-py-"+j,"paddingHeight",j)),T&&(L=p(L,"fr-px-"+T,"paddingWidth",T)),O&&(L=p(L,"fr-p-sm-"+O,"paddingSm",O)),E&&(L=p(L,"fr-p-md-"+E,"paddingMd",E)),W&&(L=p(L,"fr-p-lg-"+W,"paddingLg",W)),F&&(L=p(L,"fr-p-xl-"+F,"paddingXl",F)),N&&(L=o(L,"fr-component-hover-"+N)),L),Ft=function(){var e=t.bgColor,n=t.textColor,r="";return e&&(r=o(r,"fr-bg-"+e)),n&&(r=o(r,"fr-text-"+n)),r}(),Nt=function(){var e=t.borderColor,n=t.borderStyle,r=t.borderWidth,i=t.borderTop,a=t.borderRight,l=t.borderBottom,f=t.borderLeft,s=t.borderNone,d=t.shadow,c="";return t.border&&(c=o(c,"fr-border")),e&&(c=o(c,"fr-border-"+e)),n&&(c=o(c,"fr-border-style-"+n)),r&&(c=o(c,"fr-border-width-"+r)),i&&(c=o(c,"fr-border-top")),a&&(c=o(c,"fr-border-right")),l&&(c=o(c,"fr-border-bottom")),f&&(c=o(c,"fr-border-left")),s&&(c=o(c,"fr-border-0")),d&&(c=o(c,"fr-shadow-"+d)),c}(),Lt=(D=t.textTransform,z=t.textTruncate,H=t.fontItalic,A=t.fontWeight,P=t.textMonoSpace,G=t.fontName,_=t.fontSize,B=t.fontSizeSm,U=t.fontSizeMd,q=t.fontSizeLg,J=t.fontSizeXlg,V="",(M=t.textAlign)&&(V=o(V,"fr-text-"+M)),D&&(V=o(V,"fr-text-"+D)),z&&(V=o(V,"fr-text-truncate")),"string"==typeof G&&(V=o(V,"fr-font-name-"+G.toLocaleLowerCase().replace(/ /g,"-"))),H&&(V=o(V,"fr-font-italic")),A&&(V=o(V,"fr-font-weight-"+A)),P&&(V=o(V,"fr-text-monospace")),_&&(V=p(V,"fr-font-size-"+_+"-x","fontSize",_)),B&&(V=p(V,"fr-font-size-sm-"+B+"-x","fontSize",_)),U&&(V=p(V,"fr-font-size-md-"+U+"-x","fontSize",_)),q&&(V=p(V,"fr-font-size-lg-"+q+"-x","fontSize",_)),J&&(V=p(V,"fr-font-size-xlg-"+J+"-x","fontSize",_)),V),Mt=function(){var e=t.rounded,n=t.roundedRight,r=t.roundedLeft,i=t.roundedTop,a=t.roundedBottom,l=t.roundedCircle,f="";return e&&(f=o(f,"fr-rounded-"+e+"-x")),i&&(f=o(f,"fr-rounded-top-"+i+"-x")),n&&(f=o(f,"fr-rounded-right-"+n+"-x")),a&&(f=o(f,"fr-rounded-bottom-"+a+"-x")),r&&(f=o(f,"fr-rounded-left-"+r+"-x")),l&&(f=o(f,"fr-rounded-circle")),f}(),Dt=function(){var e=t.floatRight,n=t.floatNone,r="";return t.floatLeft&&(r=o(r,"fr-float-left")),e&&(r=o(r,"fr-float-right")),n&&(r=o(r,"")),r}(),zt=function(){var e=t.width,n="";return e&&(n="fr-w-"+e),n}(),Ht=function(){var e="";return t.focusable&&(e=t.focusClass||"fr-focus"),e}(),At=function(){var e=t.height,n="";return e&&(n="fr-h-"+e),n}(),Pt=function(){var e=t.display,n="";return e&&(n=o(n,"fr-d-"+e)),n}(),Gt=function(){var e=t.align,n="";return e&&(n="fr-align-"+e),n}(),_t=function(){var e=t.justifyContent,n="";return e&&(n=o(n,"fr-justify-content-"+e)),n}(),Bt=function(){var e=t.position,n=t.left,r=t.right,i=t.top,a=t.bottom,l="";return e&&(l=o(l,"fr-position-"+e)),n&&(l=o(l,"fr-left-"+n)),r&&(l=o(l,"fr-right-"+r)),i&&(l=o(l,"fr-top-"+i)),a&&(l=o(l,"fr-bottom-"+a)),l}(),Ut=(Q="",(X=t.alignSelf)&&(Q=o(Q,"fr-align-self-"+X)),Q),qt=(Z="",($=t.flexGrow)&&(Z=o(Z,"fr-flex-grow-"+$)),Z),Jt=(Y="",(K=t.zIndex)&&(Y=o(Y,"fr-z-index-"+K)),Y),Vt=(et="",(tt=t.flexDirection)&&(et=o(et,"fr-flex-"+tt)),et),Xt=(rt="",(nt=t.alignItems)&&(rt=o(rt,"fr-align-items-"+nt)),rt),Qt=function(){var e="";return t.rtlReverse&&(e=o(e,"fr-rtl-reverse")),e}(),$t=(it="",(ot=t.flexShrink)&&(it=o(it,"fr-flex-shrink-"+ot)),it),Zt=function(){if(t.rotate)return o("","fr-rotate")}(),Kt=(lt=t.flexXs,ft=t.flexSm,st=t.flexMd,dt=t.flexLg,ct="",(at=t.flex)&&(ct=o(ct,"fr-flex-"+at)),lt&&(ct=o(ct,"fr-flex-xs-"+lt)),ft&&(ct=o(ct,"fr-flex-sm-"+ft)),st&&(ct=o(ct,"fr-flex-md-"+st)),dt&&(ct=o(ct,"fr-flex-lg-"+dt)),ct),Yt=(gt="",(ut=t.linearGradient)&&(gt=p(gt,"fr-lineal-gradient-"+f(),"linearGradient",ut)),gt),te=(mt="",(pt=t.radialGradient)&&(mt=p(mt,"fr-radial-gradient-"+f(),"radialGradient",pt)),mt),ee=(ht="",(bt=t.cursor)&&(ht=o(ht,"fr-cursor-"+bt)),ht),ne=(yt="",(vt=t.roundedTopRight)&&(yt=o(yt,"fr-rounded-top-right-"+vt+"-x")),yt),re=(wt="",(xt=t.roundedTopLeft)&&(wt=o(wt,"fr-rounded-top-left-"+xt+"-x")),wt),oe=(St="",(Ct=t.roundedBottomRight)&&(St=o(St,"fr-rounded-bottom-right-"+Ct+"-x")),St),ie=(kt="",(Rt=t.roundedBottomLeft)&&(kt=o(kt,"fr-rounded-bottom-left-"+Rt+"-x")),kt),ae=(Tt="",(jt=t.iconColor)&&(Tt=o(Tt,"fr-i-"+jt)),Tt),le=(Ot="",(It=t.lineHeight)&&(Ot=p(Ot,"fr-line-height-"+It,"lineHeight",It)),Ot),fe=(Et=t.settingsPath)&&a()&&function(){if(a()){for(var t,e={},n=/\+/g,r=/([^&;=]+)=?([^&;]*)/g,o=function(t){return decodeURIComponent(t.replace(n," "))},i=window.location.hash.substring(1);t=r.exec(i);)e[o(t[1])]=o(t[2]);return e}return{}}().hasOwnProperty("debugMe")?"fr-s-path fr-s-path-"+Et:"",se=function(){var r="",o="";if(t["cmp-styles"]&&"object"==typeof t["cmp-styles"]&&t["cmp-styles"].constructor===Object){var g=JSON.parse(JSON.stringify(t["cmp-styles"]));Object.keys(g).map((function(t){var p=t.replace(/--space--/g," ").replace(/--point--/g,".").replace(/--hashtag--/g,"#");if(o="","string"==typeof g[t])if("@theme"===p)g[t].startsWith("@theme:")||(g[t]="@theme:"+g[t]),g[t]=s(g[t],n)||{};else if(g[t].startsWith("@theme:"))if(t.startsWith(":")&&a())console.warn('Cannot use cmp-styles={{"'+t+'":"'+g[t]+'"}} this is not allowed.');else{var m=s(g[t],n);m?o="{"+p+":"+m+"}":a()&&console.warn("Design token "+g[t]+" not found in theme.")}else if(g[t].startsWith("@palette:")){var b=d(g[t],n);b?o="{"+p+":"+b+"}":a()&&console.warn("Palette color "+g[t]+" not found in theme.")}else o=g[t]?"{"+p+":"+g[t]+"}":"";if(g[t]&&"object"==typeof g[t]&&g[t].constructor===Object&&(o="{"+Object.entries(g[t]).reduce((function(t,e){var r=e[0],o=e[1],i=t;if("@theme"===r){var l=o;o.startsWith("@theme:")||(l="@theme:"+l);var f=s(l,n)||{};Object.keys(f).map((function(t){i+=t+":"+f[t]+";"}))}else if("string"==typeof o&&o.startsWith("@theme:")){var c=s(o,n);c?i=""+t+r+":"+c+";":a()&&console.warn("Design token "+o+" not found in theme.")}else if("string"==typeof o&&o.startsWith("@palette:")){var u=d(o,n);u?i=""+t+r+":"+u+";":a()&&console.warn("Palette color "+o+" not found in theme.")}else o&&(i=""+t+r+":"+o+";");return i}),"")+"}"),o=o&&"{}"!==o?o:null){"rtl"===e&&(o=u(o));var h="fr-"+f(""+p+o),v="."+h;p.startsWith(":")?v+=""+p+o:p.startsWith(".")||p.startsWith("#")?v+=" "+p+o:p.startsWith("@media")?v=p+"{."+h+o+"}":v+=o,i(h)||(c(v),l(h)),r+=r.includes(h)?"":" "+h}}))}return r}();return Wt&&(g=g+" "+Wt),Ft&&(g=g+" "+Ft),Nt&&(g=g+" "+Nt),Lt&&(g=g+" "+Lt),Mt&&(g=g+" "+Mt),Dt&&(g=g+" "+Dt),zt&&(g=g+" "+zt),Ht&&(g=g+" "+Ht),At&&(g=g+" "+At),Pt&&(g=g+" "+Pt),Gt&&(g=g+" "+Gt),_t&&(g=g+" "+_t),Bt&&(g=g+" "+Bt),Ut&&(g=g+" "+Ut),qt&&(g=g+" "+qt),Jt&&(g=g+" "+Jt),Vt&&(g=g+" "+Vt),Xt&&(g=g+" "+Xt),Qt&&(g=g+" "+Qt),$t&&(g=g+" "+$t),Zt&&(g=g+" "+Zt),Kt&&(g=g+" "+Kt),Yt&&(g=g+" "+Yt),te&&(g=g+" "+te),ee&&(g=g+" "+ee),ne&&(g=g+" "+ne),re&&(g=g+" "+re),oe&&(g=g+" "+oe),ie&&(g=g+" "+ie),ae&&(g=g+" "+ae),le&&(g=g+" "+le),se&&(g=g+" "+se),fe&&(g=g+" "+fe),g}().trim()},u=function(t){return t.replace(/right/g,"l-e-f-t").replace(/left/g,"r-i-g-h-t").replace(/l-e-f-t/g,"left").replace(/r-i-g-h-t/g,"right")},g=n.createContext({translate:function(t,e){return e||t},direction:"ltr",localizationData:{},isIFrame:!1});function p(t,e){void 0===e&&(e={direction:"ltr",theme:{}});var n=i({},function(t,e){var n=e&&e.designTokens||{};if(n){var r={};return Object.keys(t).map((function(e){return r[e]=t[e]&&"string"==typeof t[e]&&t[e].toLowerCase().trim().startsWith("@theme:")?s(t[e],{designTokens:n}):t[e],e})),r}return t}(t,e.theme),{options:e});return[c(n),Object.assign({},n.style,{filter:t.cssFilter})]}var m=function(){if("undefined"!=typeof window){for(var t,e={},n=/\+/g,r=/([^&;=]+)=?([^&;]*)/g,o=function(t){return decodeURIComponent(t.replace(n," "))},i=window.location.hash.substring(1);t=r.exec(i);)e[o(t[1])]=o(t[2]);return e}return{}},b=function(t){return void 0===t&&(t=!1),!("undefined"!=typeof window&&!function(t){var e=m();return!(!t&&!e.hasOwnProperty("simulateSSR"))}(t))},h=function(){return b()?0:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},v=function(t){return t&&"object"==typeof t&&!Array.isArray(t)},y=function t(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(!r.length)return e;var i=r.shift();return v(e)&&v(i)&&Object.keys(i).forEach((function(n){var r,o;v(i[n])?(e[n]||Object.assign(e,((r={})[n]={},r)),t(e[n],i[n])):Object.assign(e,((o={})[n]=i[n],o))})),t.apply(void 0,[e].concat(r))};function x(t,e){var n=new RegExp(Object.keys(e).map((function(t){return"\\{"+t+"\\}"})).join("|"),"g");return t.replace(n,(function(t){return e[t.substr(1,t.length-2)]}))}var w=function(t,e){for(var n=e.split("."),r=0;r<n.length;r+=1)if(!(t=t[n[r]])||-1===t)return;return t},C=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e},S=function(t,e){var n;return void 0===e&&(e=.5),!!/^#([A-Fa-f0-9]{3}){1,2}$/.test(t)&&(3===(n=t.substring(1).split("")).length&&(n=[n[0],n[0],n[1],n[1],n[2],n[2]]),"rgba("+((n="0x"+n.join(""))>>16&255)+","+(n>>8&255)+","+(255&n)+","+e+")")},R=function(t){var e;return!!/^#([A-Fa-f0-9]{3}){1,2}$/.test(t)&&(3===(e=t.substring(1).split("")).length&&(e=[e[0],e[0],e[1],e[1],e[2],e[2]]),{r:(e="0x"+e.join(""))>>16&255,g:e>>8&255,b:255&e})},k=function(t){var e=R(t);return!!e&&((299*e.r+587*e.g+114*e.b)/1e3>=128?"#000000":"#FFFFFF")},j=function(t,e,n){return t/e*n},T=function(t,e){var n,r,o=R(t),i={};return!!o&&(e<0?(i.r=o.r-parseInt(o.r/100*-e,10),i.g=o.g-parseInt(o.g/100*-e,10),i.b=o.b-parseInt(o.b/100*-e,10)):(i.r=parseInt(j(255-o.r,100,e),10)+o.r,i.g=parseInt(j(255-o.g,100,e),10)+o.g,i.b=parseInt(j(255-o.b,100,e),10)+o.b),n=i.g,r=i.b,"#"+C(i.r)+C(n)+C(r))},I=function(t,e,n){void 0===n&&(n=22);var r=100/Math.ceil(n/2),o=r*Math.floor(n/2),i=[];if(function(t){return!!R(t)}(t))for(var a=0;a<n;a+=1){var l=T(t,o-a*r),f=k(l);i.push({name:a>n/2?e+"-"+a:a===n/2?e:e+"-"+(a+1),color:l,textColor:f})}return i},O=function(t,e,n){var r=e.color,o=e.color,i=e.color,a=e.color,l=e.color,f=e.textColor,s=e.textColor,d=e.color,c=e.textColor;return t[n+2]?o=t[n+2].color:t[n-2]&&(o=t[n-2].color),t[n+1]?i=t[n+1].color:t[n-1]&&(i=t[n-1].color),t[n+2]?a=t[n+2].color:t[n-2]&&(a=t[n-2].color),t[n+4]?l=t[n+4].color:t[n-4]&&(l=t[n-4].color),t[n+4]?f=t[n+4].textColor:t[n-4]&&(f=t[n-4].textColor),t[n+2]?r=t[n+2].color:t[n-2]&&(r=t[n-2].color),t[n+2]?s=t[n+2].textColor:t[n-2]&&(s=t[n-2].textColor),t[n+3]?d=t[n+3].color:t[n-3]&&(d=t[n-3].color),t[n+3]?c=t[n+3].textColor:t[n-3]&&(c=t[n-3].textColor),"\n button.fr-btn-"+e.name+"{\n background-color:"+e.color+";\n border-color:"+e.color+";\n color:"+e.textColor+" !important;\n }\n button.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):active,\n button.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):focus,\n button.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):hover{\n background-color:"+r+";\n border-color:"+r+";\n color:"+s+"\n }\n button.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):active,\n button.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled).fr-active,\n button.fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled):active,\n button.fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled).fr-active,\n button.fr-show > .fr-btn-outline-"+e.name+".fr-dropdown-toggle{\n color: "+c+";\n background-color: "+d+";\n border-color: "+d+";\n }\n .fr-border-"+e.name+"{border-color: "+e.color+" !important;}\n .fr-bg-"+e.name+"{background-color: "+e.color+" !important;}\n .gradient.fr-bg-"+e.name+",fr-btn-outline-"+e.name+":hover,\n button.gradient.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled){\n background-image: linear-gradient(to bottom,"+e.color+","+o+");\n }\n button.gradient.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):focus,\n button.gradient.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):hover,\n button.gradient.fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled):focus,\n button.gradient.fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled):hover{\n background-image: linear-gradient(to bottom,"+e.color+","+i+");\n color: "+e.textColor+";\n }\n button.gradient.fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):active,\n button.gradient.fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled):active{\n background-image: linear-gradient(to bottom,"+a+","+l+");\n color: "+f+";\n }\n .fr-text-"+e.name+"{color: "+e.color+" !important;}\n .fr-btn-outline-"+e.name+"{\n color: "+e.color+";\n border-color: "+e.color+";\n }\n .fr-btn-outline-"+e.name+":hover{\n color: "+e.textColor+";\n background-color: "+e.color+";\n border-color: "+e.color+";\n }\n .fr-btn-outline-"+e.name+".fr-disabled,\n .fr-btn-outline-"+e.name+":disabled{\n color: "+e.color+" !important;\n background-color: transparent !important;\n border-color: "+e.color+" !important;\n }\n .fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled):active:focus,\n .fr-btn-"+e.name+":not(:disabled):not(.fr-disabled):active:focus,\n .fr-btn-outline-"+e.name+":not(:disabled):not(.fr-disabled).fr-active:focus,\n .fr-show > .fr-btn-outline-"+e.name+".fr-dropdown-toggle:focus{\n box-shadow: 0 0 0 0.2rem "+S(e.color)+";\n }\n .fr-btn-"+e.name+":focus, .fr-btn-outline-"+e.name+":focus{\n box-shadow: 0 0 0 0.2rem "+S(e.color)+";\n }\n .fr-component-hover-"+e.name+":hover:not(.fr-row):not([class^=fr-col]):not(button)>*{\n color:"+e.textColor+" !important;\n }\n .fr-component-hover-"+e.name+":hover:not(button){\n background-color:"+e.color+" !important;\n border-color:"+r+" !important;\n }\n .fr-icon.fr-i-"+e.name+" path{\n fill: "+e.color+";\n }\n .fr-btn-"+e.name+" .fr-icon path{\n fill: "+e.textColor+";\n }\n"},E=function(t){return function(e,n,r){var o=t(e,n);return null==r||"object"!=typeof r?o:x(o,r)}};exports.Context=g,exports.ContextProvider=function(t){var e=t.translate,r=void 0===e?function(t,e){return e||t}:e,o=t.direction,i=void 0===o?"ltr":o,a=t.localizationData,l=void 0===a?{}:a,f=t.children,s=t.isIFrame,d=void 0!==s&&s,c=n.useMemo((function(){return{translate:r,direction:i.toLowerCase(),localizationData:l,isIFrame:d}}),[r,i,l,d]);return n.createElement(g.Provider,{value:c},n.createElement("div",{dir:i},f))},exports.annotateAndLogError=function(t,e,n,a,l,f,s,d){void 0===l&&(l=null),void 0===f&&(f=null),void 0===s&&(s=null),void 0===d&&(d=!1);var c=Object.assign({},t);if(!d&&!c.middlemanCount){if(c.message=e+": "+t.message,c.rawMessage=""+t.message,c.stack=t.stack,c.tags||(c.tags=[]),c.date=(new Date).toUTCString(),c.tags.push(e),c.cmpConfig=n||!1,c.cmpMeta=f||!1,c.pageContext=function(t){return!!t&&{airlineIataCode:w(t,"airlineIataCode"),language:w(t,"language"),siteEdition:w(t,"siteEdition"),pageType:w(t,"pageType"),deviceCategory:w(t,"deviceCategory"),url:w(t,"url"),renderType:w(t,"renderType")}}(n&&n.pageContext?n.pageContext:s),c.middlemanCount||(c.middlemanCount=0),c.middlemanCount+=1,c.cmpConfig&&c.cmpConfig.envConfig&&(c.cmpConfig.envConfig=null,delete c.cmpConfig.envConfig),a)r.info(e+":",t),c.traceMode=!0;else{var u=l;!u&&n&&(u=w(n,"containerConfig.settings.integrationSettings")),function(t,e){return new Promise((function(n,a){if(e&&e.logsCollector&&e.logsCollector.active){var l=e.logsCollector,f={errMsg:t.message,errRawMsg:t.rawMessage,errOrigin:b()?"SSR":window.location.href,cmpMeta:t.cmpMeta,pageContext:t.pageContext};t.request&&t.config&&(f.reqInfo={},f.reqInfo.url=t.config.url,f.reqInfo.query=t.config.data,f.reqInfo.headers=t.config.headers),t.response&&t.response.data&&(f.resInfo={},f.resInfo.status=t.response.data.status,f.resInfo.timestamp=t.response.data.timestamp,f.resInfo.message=t.response.data.error),!b()&&"undefined"!=typeof navigator&&navigator.connection&&(f.connection={downlink:navigator.connection.downlink,effectiveType:navigator.connection.effectiveType,rtt:navigator.connection.rtt}),o({method:l.method,url:""+l.endPoint,headers:i({},l.headers),data:f}).then((function(t){n(t.data)})).catch((function(t){r.error(t),a(t)}))}}))}(c,u).catch((function(t){r.error(t)})),r.error(e+":",t)}return c}return t},exports.blur=function(t){t.current&&(t.current.getInput?t.current.getInput().blur():t.current.blur())},exports.clientHeight=function(){return b()?0:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},exports.clientWidth=h,exports.debounce=function(t,e,n){var r;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var l=function(){r=null,n||t.apply(void 0,i)},f=n&&!r;clearTimeout(r),r=setTimeout(l,e),f&&t.apply(void 0,i)}},exports.encodeUrlQueryData=function(t){return Object.keys(t).filter((function(e){return void 0!==t[e]})).map((function(e){return[e,t[e]].map(encodeURIComponent).join("=")})).join("&")},exports.evaluateObject=function(t,e){if(!t||!e)return t;for(var n=JSON.stringify(t),r=function(t){for(var e,n=[],r=/(@@|%%)[a-zA-Z.0-9_]*(@@|%%)/g;null!==(e=r.exec(t));)n.push(e[0].substr(2).slice(0,-2));return n}(n),o=0;o<r.length;o+=1){var i=r[o].split(".")[0],a=w(e,r[o]);"window"===i&&"undefined"!=typeof window&&(a=w(window,r[o])),a?(Array.isArray(a)&&(a=JSON.stringify(a)),n=n.replace(new RegExp("(@@|%%)"+r[o]+"(@@|%%)","g"),a)):n=n.replace(new RegExp('\\"(@@|%%)'+r[o]+'(@@|%%)\\"',"g"),null)}n=(n=n.replace(/"\[/g,"[")).replace(/\]"/g,"]");try{return JSON.parse(n)}catch(e){return t}},exports.focus=function(t){t.current&&(t.current.getInput?t.current.getInput().focus():t.current.focus())},exports.getCurrentOriginUrl=function(){return b()?"":window.location.origin||window.location.protocol+"//"+window.location.host},exports.getDataSource=function(t){return"function"==typeof t?t:"string"==typeof t?Function("settings",t):function(){return t}},exports.getHashParams=m,exports.getQueryParams=function(t){for(var e=t.split("&"),n={},r=0;r<e.length;r+=1){var o=e[r].split("="),i=decodeURIComponent(o[0]),a=decodeURIComponent(o[1]);if(void 0===n[i])n[i]=decodeURIComponent(a);else if("string"==typeof n[i]){var l=[n[i],decodeURIComponent(a)];n[i]=l}else n[i].push(decodeURIComponent(a))}return n},exports.getSanitizedError=function(t){return JSON.stringify(t,(e=new WeakSet,function(t,n){if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n)}return n}));var e},exports.getScrollParent=function t(e,n){return null===e||(e.scrollHeight>e.clientHeight&&("html"!==e.nodeName.toLowerCase()?n.push(e):n.push(window)),t(e.parentNode,n)),n},exports.getStyles=p,exports.getUuid=l,exports.getValue=w,exports.initTheme=function(t){var e=[],n={palette:{},designTokens:t.designTokens||{}},r=[];if(t.config&&t.config.outputFields&&(r=t.config.outputFields),r.includes("colors")&&(n.colors=t.colors),r.includes("typography")&&(n.typography=t.typography),t){if(t.typography&&e.push(function(t){var e="";return t.fonts&&"object"==typeof t.fonts&&Object.keys(t.fonts).map((function(n){return"object"==typeof t.fonts[n]&&(t.fonts[n].preset?e+="@import url('"+t.fonts[n].preset+"');":Array.isArray(t.fonts[n].src)&&(e+="@font-face {\n font-family: '"+(t.fonts[n].alias?t.fonts[n].alias:n)+"';\n "+(t.fonts[n].fontStyle?"font-style:"+t.fonts[n].fontStyle+";":"")+"\n "+(t.fonts[n].fontWeight?"font-weight:"+t.fonts[n].fontWeight+";":"")+"\n "+(t.fonts[n].fontDisplay?"font-display:"+t.fonts[n].fontDisplay+";":"")+"\n src:",t.fonts[n].local&&t.fonts[n].local.forEach((function(t){e+="local('"+t+"'),"})),t.fonts[n].src.forEach((function(r,o){e+="url('"+r.url+"') format('"+r.format+"')"+(o<t.fonts[n].src.length-1?",":"")})),e+="}"),e+=".fr-font-name-"+n.toLocaleLowerCase().replace(/ /g,"-")+"{font-family:"+(t.fonts[n].alias?t.fonts[n].alias:n)+", sans-serif}"),n})),e}(t.typography)),t.colors){e.push(["button.fr-btn:disabled{\n background-color:"+(t.components&&t.components.button&&t.components.button.disabled&&t.components.button.disabled.bgColor?t.components.button.disabled.bgColor:"#d4d4d4")+";\n border-color:"+(t.components&&t.components.button&&t.components.button.disabled&&t.components.button.disabled.bgColor?t.components.button.disabled.bgColor:"#d4d4d4")+";\n color:"+(t.components&&t.components.button&&t.components.button.disabled&&t.components.button.disabled.bgColor?t.components.button.disabled.bgColor:"#afafaf")+"\n }\n "]);for(var o=Object.keys(t.colors),i=0;i<o.length;i+=1){var l=o[i],f=t.colors[o[i]];"none"!==f&&function(){n.palette[""+l]=f;var r=I(f,l);if(t.config&&t.config.generatePalette)r.forEach((function(t,o){if(n.palette[""+t.name]=t.color,a()){var i=O(r,t,o);e.push(i.replace(/\n. |\r/g,""))}}));else if(a()){var o=O(r,{color:f,name:l,textColor:k(f)},11);e.push(o.replace(/\n. |\r/g,""))}}()}if(t.colors.primary){var s=S(t.colors.primary,.25);e.push(".fr-focus:focus, .fr-form-control:focus, .fr-focus\\:focus{box-shadow: 0 0 0 0.2rem "+s+";outline: 0;}")}}if(a()&&"undefined"!=typeof document){var d=document.getElementById("frTheming");if(d)d.innerHTML=e.join(" ");else{var c=""+e.join(" "),u=document.body||document.getElementsByTagName("body")[0],g=document.createElement("style");g.type="text/css",g.id="frTheming",g.styleSheet?g.styleSheet.cssText=c:g.appendChild(document.createTextNode(c)),u.appendChild(g)}}}return n},exports.isDebugModeActive=function(t){return!!t},exports.isDebugModeVisible=function(){return"undefined"!=typeof window&&!!m().hasOwnProperty("debugMe")},exports.isElementInViewport=function(t){var e=document.getElementById(t);if(e){var n=e.getBoundingClientRect();return n.height+n.top>=0&&n.top<window.innerHeight}return!1},exports.isEmpty=function(t){return 0===Object.entries(t).length&&t.constructor===Object},exports.isNil=function(t){return null==t},exports.isNilOrEmpty=function(t){return null==t||0===t.length||0===Object.keys(t).length},exports.isNotNil=function(t){return null!=t},exports.isPromise=function(t){return void 0!==t.then},exports.isSSR=b,exports.isViewportMobile=function(){return h()<=992},exports.loadImage=function(t,e,n,r,o,i){if(!t){var a=new Image;a.src=n,a.onload=function(){if(e){e.setAttribute("style","background-image: url('"+n+"');height: "+r+";width: "+o);var t=e.querySelector(".cmp-image-label");t&&t.setAttribute("class","cmp-image-label fr-d-none")}},a.onerror=function(){e.setAttribute("style","background-image: url('"+i+"');height: "+r+";width: "+o);var t=e.querySelector(".cmp-image-label");t&&t.setAttribute("class","cmp-image-label fr-d-block")}}return e},exports.mapObject=function(t,e){if(t){var n={};return Object.keys(t).forEach((function(r){n[r]=e(t[r])})),n}return t},exports.mergeDeep=y,exports.replaceAll=function(t,e,n){return t.replace(new RegExp(e,"g"),n)},exports.strFormat=x,exports.strSplitFormat=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.split(/{(\d+)}/g).map((function(t){return n[t]||t}))},exports.truncateNumber=function(t,e){var n=t.toString(),r=n.toString().indexOf(".");return-1!==r?n.slice(0,r+e+1):n},exports.useDirection=function(){return e.useContext(g).direction},exports.usePlural=function(){return t=e.useContext(g).translate,n=E(t),function(t){var e=t.count,r=t.key,o=t.variables,a=t.defaultValue,l=i({count:e},void 0===o?{}:o),f=r+"_"+e,s=n(f,void 0,l);return s!==f?s:n(r,a,l)};var t,n},exports.useStyles=function(t){return p(t,i({},e.useContext(g),{theme:{}}))},exports.useTranslation=function(){var t=e.useContext(g);return E(t.translate)},exports.withFlavors=function(t,e){var r=function(r){var o=t.flavors?i({},t.flavors[r.flavor]):{},a=y({},o),l=y(a,r),f=Object.assign({},e,l);return n.createElement(t,Object.assign({},f))};return r.propTypes=t.propTypes,r.defaultProps=t.defaultProps,r};
//# sourceMappingURL=utils.cjs.production.min.js.map
{
"name": "@front10/utils",
"version": "0.12.0",
"version": "0.22.8",
"description": "Helpers for front10 components",

@@ -56,3 +56,3 @@ "author": "Yulier Camilo Garrido Garrido",

},
"gitHead": "d687ee592daaef93cd2c92ce315022699b5d7e96"
"gitHead": "00045e1e372e83db960541b7087b1416f13ef9aa"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc