@webjet/react 2.10.5 → 2.10.6
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.
- package/components/tab.js +1 -1
- package/package.json +1 -1
package/components/tab.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={6361:(e,t,r)=>{var o=r(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(580)),i=function(e){var t=e.condition,r=e.children;return!0===t?r:null};i.propTypes={condition:n.default.bool},i.defaultProps={condition:!1};var a=i;t.default=a},7350:(e,t,r)=>{var o=r(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(6361)).default;t.default=n},7288:(e,t,r)=>{var o=r(7880),n=r(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(8213)),a=o(r(353)),l=o(r(3838)),d=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(o,a,l):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(6689)),c=(o(r(580)),r(1638)),u=r(9941),s=["children","fadeBgColour","fadeHeight","contentHeight"];function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}var p=function(e){var t=e.children,r=e.fadeBgColour,o=e.fadeHeight,n=e.contentHeight,f=(0,l.default)(e,s),p=(0,d.useRef)(),g=(0,d.useState)(!1),v=(0,a.default)(g,2),h=v[0],b=v[1],m=(0,d.useState)((0,u.withScroll)(null==p?void 0:p.current)),y=(0,a.default)(m,2),x=y[0],w=y[1];return(0,d.useEffect)((function(){w((0,u.withScroll)(null==p?void 0:p.current)),b((0,u.hasScrollReachedBottom)(null==p?void 0:p.current))})),d.default.createElement(c.StyledOuterWrapper,(0,i.default)({contentHeight:n},f),d.default.createElement(c.StyledInnerWrapper,{onScroll:function(){b((0,u.hasScrollReachedBottom)(null==p?void 0:p.current))},ref:p,fadeBgColour:r},t),x&&!h&&d.default.createElement(c.StyledPanelWithScrollFade,{fadeBgColour:r,fadeHeight:o}))};p.defaultProps={fadeBgColour:"#F5F5F5",fadeHeight:"115px",contentHeight:"200px"};var g=p;t.default=g},1638:(e,t,r)=>{var o=r(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.StyledPanelWithScrollFade=t.StyledOuterWrapper=t.StyledInnerWrapper=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var d=i?Object.getOwnPropertyDescriptor(e,l):null;d&&(d.get||d.set)?Object.defineProperty(n,l,d):n[l]=e[l]}return n.default=e,r&&r.set(e,n),n}(r(7518)),i=r(9193);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}var l=n.default.div.withConfig({displayName:"PanelWithScrollFadestyle__StyledOuterWrapper",componentId:"sc-9upa4e-0"})(["position:relative;",""],(function(e){var t=e.contentHeight;return t&&(0,n.css)(["height:",";"],t)}));t.StyledOuterWrapper=l;var d=n.default.div.withConfig({displayName:"PanelWithScrollFadestyle__StyledInnerWrapper",componentId:"sc-9upa4e-1"})(["position:relative;overflow:auto;height:100%;",""],(function(e){var t=e.fadeBgColour;return t&&(0,n.css)(["background:",""],t)}));t.StyledInnerWrapper=d;var c=n.default.div.withConfig({displayName:"PanelWithScrollFadestyle__StyledPanelWithScrollFade",componentId:"sc-9upa4e-2"})(["position:absolute;bottom:0;width:calc(100% - 17px);"," pointer-events:none;@media ","{width:100%;}"],(function(e){var t=e.fadeBgColour,r=e.fadeHeight;return t&&r&&(0,n.css)(["background:linear-gradient(360deg,"," 0%,rgba(235,235,235,0) 100%);height:",";"],t,r)}),i.theme.media.mobileAndTablet);t.StyledPanelWithScrollFade=c},3689:(e,t,r)=>{var o=r(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(7288)).default;t.default=n},3206:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={dateFormatExtraShort:"d MMM",dateFormatShort:"E d MMM",dateFormat:"E d MMM yyyy",dateFormatLong:"E d MMMM yyyy",timeFormat:"h:mm a",dayLabelFormat:"E MMM dd yyyy",weekStartsOn:1,weekFormat:"E",scrollToViewOptions:{behavior:"smooth",block:"end",scrollMode:"if-needed"}}},5799:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={notification:{success:{color:"#149000",backgroundColor:"#EEF7EB"},error:{color:"#BE0000",backgroundColor:"#F2DEDE"},warning:{color:"#FF5C00",backgroundColor:"#F6EDE6"},info:{color:"#3D9AF2",backgroundColor:"#ECF5FE"},notice:{color:"#FEB42B",backgroundColor:"#FFF3CD"}},textLink:{color:"#0060BB",hoverColor:"#00509C"}}},9193:(e,t,r)=>{var o=r(7880);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"config",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"identifiers",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"mixins",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"theme",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"themeV2",{enumerable:!0,get:function(){return i.default}});var n=o(r(2594)),i=o(r(6932)),a=o(r(2098)),l=o(r(3206)),d=o(r(5799))},2098:(e,t,r)=>{var o=r(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(7518),i=o(r(2594)),a={globalStyles:(0,n.css)(["font-family:",";font-size:",";color:",";&,> *,> *:before,> *:after{box-sizing:border-box;}"],i.default.fontFamily.primary,i.default.fontSize,i.default.fontColor)};t.default=a},6932:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],o={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:r[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:r[5],hoverColor:r[6],hoverDarkColor:r[7],textHighlight:r[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:r[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:r[5],inputIcon:r[9],inputIconBackground:r[2],inputIconHoverBackground:r[5],inputCrossBtn:"#a8a8a8",btnStandard:r[2],btnStandardHover:r[5],btnAction:r[17],btnActionHover:"#259400",btnActive:r[13],btnActiveHover:r[19],btnSelection:r[16],btnSelectionHover:r[20],successBackground:r[22],successText:r[21],errorBackground:r[26],errorText:r[27],sliderPrimary:r[13],color:r,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:r[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=o},2594:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],o={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:r[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:r[5],hoverColor:r[6],hoverDarkColor:r[7],textHighlight:r[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:r[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:r[5],inputIcon:r[9],inputIconBackground:r[2],inputIconHoverBackground:r[5],inputCrossBtn:"#a8a8a8",btnStandard:r[2],btnStandardHover:r[5],btnAction:r[17],btnActionHover:"#259400",btnActive:r[13],btnActiveHover:r[19],btnSelection:r[16],btnSelectionHover:r[20],successBackground:r[22],successText:r[21],errorBackground:r[26],errorText:r[27],sliderPrimary:r[13],color:r,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:r[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=o},5059:(e,t,r)=>{var o=r(7880),n=r(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(8213)),a=o(r(353)),l=o(r(3838)),d=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=b(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(o,a,l):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(6689)),c=(o(r(580)),r(8727)),u=o(r(1755)),s=o(r(3689)),f=r(8903),p=o(r(7350)),g=o(r(5355)),v=r(9941),h=["children","enableTabHighlighter","tabGap","defaultTab","onChange","variant","size","maxHeight","enablePanelWithScrollFade","contentPadding"];function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(b=function(e){return e?r:t})(e)}var m=(0,d.forwardRef)((function(e,t){var r=e.children,o=e.enableTabHighlighter,n=e.tabGap,b=e.defaultTab,m=e.onChange,x=e.variant,w=e.size,S=e.maxHeight,C=e.enablePanelWithScrollFade,F=e.contentPadding,B=(0,l.default)(e,h);if(!r)return null;var T=void 0===r.length?[r]:r,E=b<T.length,O=(0,d.useState)(E?b:0),P=(0,a.default)(O,2),M=P[0],k=P[1],D=Array(T.length).fill().map((function(){return(0,d.useRef)()})),I=(0,d.useState)({tabWidth:0,offsetLeft:0}),_=(0,a.default)(I,2),j=_[0],W=_[1],H=(0,d.useRef)(),A=(0,d.useState)(!1),R=(0,a.default)(A,2),L=R[0],N=R[1];(0,d.useEffect)((function(){var e,t,r,o=null===(e=D[E?b:0].current)||void 0===e?void 0:e.offsetLeft,n=null===(t=D[E?b:0].current)||void 0===t?void 0:t.clientWidth;W({tabWidth:n,offsetLeft:o});var i=C?null===(r=H.current)||void 0===r?void 0:r.offsetParent:H.current;return(0,v.scrollTo)(i,{top:0,left:0}),y(null==H?void 0:H.current,N)}),[]);var z=function(e){if(e!==M){var t,r,o;m&&m(M,e);var n=null===(t=D[e].current)||void 0===t?void 0:t.offsetLeft,i=null===(r=D[e].current)||void 0===r?void 0:r.clientWidth,a=C?null===(o=H.current)||void 0===o?void 0:o.offsetParent:H.current;(0,v.scrollTo)(a,{top:0,left:0}),W({tabWidth:i,offsetLeft:n}),k(e)}},q=w&&(0,f.isSizeSm)(w)?"40px":"48px",G=S?"calc(".concat(S," - ").concat(q,")"):void 0,J=C?d.default.createElement(s.default,{contentHeight:G},d.default.createElement(c.StyledContent,{"data-testid":"tab-content",role:"tab-content",variant:x,padding:F,ref:H},T[M].props.children)):d.default.createElement(c.StyledContent,{"data-testid":"tab-content",role:"tab-content",contentHeight:G,variant:x,padding:F,ref:H},T[M].props.children);return d.default.createElement(c.StyledComponentWrapper,(0,i.default)({ref:t},B,{"data-testid":"tab-wrapper"}),d.default.createElement(c.StyledTabWrapper,{enableTabHighlighter:o,role:"tab-wrapper"},d.default.createElement(c.StyledTabInnerWrapper,{tabGap:n,role:"tab-inner-wrapper"},T.map((function(e,t){return e?d.default.createElement(g.default,{active:L&&t===M,options:{block:"nearest",inline:"center",behavior:"smooth",scrollMode:"always"},key:t},d.default.createElement(u.default,(0,i.default)({index:t,ref:D[t],activeTab:M,onSelect:z,variant:x,size:w},e.props))):null})),d.default.createElement(p.default,{condition:!!o},d.default.createElement(c.StyledHighlighter,{width:j.tabWidth,position:j.offsetLeft,"data-testid":"tab-underline"})))),J)})),y=function(e,t){if("IntersectionObserver"in window){var r=new window.IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting?t(!0):t(!1)}))}),{threshold:0});return e&&r.observe(e),function(){return r.disconnect()}}};m.defaultProps={defaultTab:0,variant:"standard",size:"lg",enablePanelWithScrollFade:!1,contentPadding:"16px",tabGap:2,enableTabHighlighter:!1};var x=m;t.default=x},8727:(e,t,r)=>{var o=r(7880),n=r(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.StyledTabWrapper=t.StyledTabInnerWrapper=t.StyledTab=t.StyledHighlighter=t.StyledContent=t.StyledComponentWrapper=t.CONFIG=void 0;var i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(o,a,l):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(7518)),a=r(9193),l=o(r(2511)),d=r(8903);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}var u={standard:{textColor:a.theme.color[10],activeTabTextColor:a.theme.color[10],boldTextColor:a.theme.color[10],inactiveBgColor:a.theme.color[3],hoverColor:(0,l.default)(.12,a.theme.color[3]),activeBgColor:a.theme.color[1],inactiveTabTextColor:a.theme.color[8],tabPadding:"14px 20px"},dark:{textColor:a.theme.color[11],activeTabTextColor:a.theme.color[11],boldTextColor:a.theme.color[11],inactiveBgColor:a.theme.color[8],hoverColor:(0,l.default)(.12,a.theme.color[8]),activeBgColor:a.theme.color[10],inactiveTabTextColor:a.theme.color[3],tabPadding:"14px 20px"},transparent:{textColor:a.theme.color[10],activeTabTextColor:a.theme.color[10],boldTextColor:a.theme.color[10],inactiveBgColor:"transparent",hoverColor:"transparent",activeBgColor:"transparent",inactiveTabTextColor:a.theme.color[8],tabPadding:"12px 16px"}};t.CONFIG=u;var s=i.default.div.withConfig({displayName:"Tabstyle__StyledComponentWrapper",componentId:"sc-1mp3u4j-0"})(["display:flex;flex-direction:column;position:relative;"]);t.StyledComponentWrapper=s;var f=i.default.div.withConfig({displayName:"Tabstyle__StyledTabWrapper",componentId:"sc-1mp3u4j-1"})(["position:relative;overflow:hidden;",""],(function(e){return e.enableTabHighlighter&&(0,i.css)(["border-bottom:1px solid #dfdfdf;"])}));t.StyledTabWrapper=f;var p=i.default.div.withConfig({displayName:"Tabstyle__StyledTabInnerWrapper",componentId:"sc-1mp3u4j-2"})(["display:flex;align-items:flex-start;max-width:100%;position:relative;gap:",";@media ","{overflow:scroll visible;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}}"],(function(e){return e.tabGap+"px"}),a.theme.media.mobile);t.StyledTabInnerWrapper=p;var g=i.default.span.withConfig({displayName:"Tabstyle__StyledTab",componentId:"sc-1mp3u4j-3"})(["text-align:center;white-space:nowrap;cursor:pointer;border-radius:2px 2px 0 0;font-family:'Roboto';font-weight:500;font-size:14px;line-height:20px;display:inline-block;"," "," ",""],(function(e){var t=e.size;return t&&(0,d.isSizeSm)(t)&&(0,i.css)(["padding:12px 20px;"])}),(function(e){var t=e.variant;return t&&(0,i.css)(["padding:",";color:",";background:",";@media (hover:hover){&:hover{background:",";}}"],u[t].tabPadding,u[t].inactiveTabTextColor,u[t].inactiveBgColor,u[t].hoverColor)}),(function(e){var t=e.isTabActive,r=e.variant;return t&&r&&(0,i.css)(["background:",";color:",";pointer-events:none;"],u[r].activeBgColor,u[r].activeTabTextColor)}));t.StyledTab=g;var v=i.default.div.withConfig({displayName:"Tabstyle__StyledContent",componentId:"sc-1mp3u4j-4"})(["display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto;max-width:100%;flex-grow:1;"," "," "," em{font-style:normal;font-weight:500;}strong em{font-size:14px;font-weight:700;}"],(function(e){var t=e.padding;return t&&(0,i.css)(["padding:",";"],t)}),(function(e){var t=e.contentHeight;return t&&(0,i.css)(["max-height:",";"],t)}),(function(e){var t=e.variant;return t&&(0,i.css)(["background-color:",";color:",";h3,h4,h5{color:",";}"],u[t].activeBgColor,u[t].textColor,u[t].boldTextColor)}));t.StyledContent=v;var h=i.default.span.withConfig({displayName:"Tabstyle__StyledHighlighter",componentId:"sc-1mp3u4j-5"})(["display:inline-block;position:absolute;bottom:0;height:2px;background:",";left:",";width:",";transition:width 500ms ease,left 500ms ease;"],a.theme.color[0],(function(e){return e.position+"px"}),(function(e){return e.width+"px"}));t.StyledHighlighter=h},1755:(e,t,r)=>{var o=r(7880),n=r(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(8213)),a=o(r(3838)),l=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(o,a,l):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(6689)),d=r(8727),c=(o(r(580)),["label","index","onSelect","activeTab"]);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}var s=(0,l.forwardRef)((function(e,t){var r=e.label,o=e.index,n=e.onSelect,u=e.activeTab,s=(0,a.default)(e,c);return l.default.createElement(d.StyledTab,(0,i.default)({},s,{isTabActive:u===o,onClick:function(){return n(o)},"data-testid":"tab",role:"tab",ref:t}),r)}));t.default=s},9941:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.escapeRegExp=t.detectOS=t.BREAKPOINTS=void 0,t.fetchDateInMilliseconds=function(){return(new Date).getTime()},t.getBoundingClientInfo=t.formatNumber=void 0,t.getDurationInMiliSeconds=function(e,t){return t-e},t.withScroll=t.setTwoDirectionStickyPanelById=t.setTwoDirectionStickyPanel=t.scrollTo=t.sanitiseInputText=t.removeHtmlTags=t.isValidIconName=t.isValidIconElement=t.isUserLoggedIn=t.isTouchDevice=t.isMobileTablet=t.isMobilePortrait=t.isMobile=t.isMatchMedia=t.hasScrollReachedBottom=t.getMonthName=t.getFormattedDate=void 0;var o=r(3322),n={MOBILE_PORTRAIT:567,MOBILE:767,TABLET:991,DESKTOP:1199};t.BREAKPOINTS=n;var i=function(e){return window.matchMedia(e).matches};t.isMatchMedia=i,t.isMobile=function(){return i("(max-width: ".concat(n.MOBILE,"px)"))},t.isMobileTablet=function(){return i("(max-width: ".concat(n.TABLET,"px)"))},t.isMobilePortrait=function(){return i("(max-width: ".concat(n.MOBILE_PORTRAIT,"px)"))},t.isTouchDevice=function(){return window.matchMedia("(pointer: coarse)").matches},t.detectOS=function(e){var t=e||navigator.userAgent,r=/(iPad).*OS\s([\d_]+)/.test(t);return{ios:!r&&/(iPhone\sOS)\s([\d_]+)/.test(t)||r,android:/(Android);?[\s/]+([\d.]+)?/.test(t)}},t.isUserLoggedIn=function(){var e,t=null===(e=(0,o.getCookieStorage)("customer-soft-id"))||void 0===e?void 0:e.split(".");if(t&&t.length>1){var r=window.atob(t[1]).toString("ascii");if(JSON.parse(r).firstName)return!0}return!1};var a=function(e){if(e){var t=window.innerHeight-e.offsetHeight,r=window.scrollY,o=window.innerHeight,n=e.offsetHeight;e.style.top="0px",window.addEventListener("resize",(function(){o=window.innerHeight,n=e.offsetHeight})),document.addEventListener("scroll",(function(){n=e.offsetHeight,t=window.innerHeight-e.offsetHeight;var i=parseInt(e.style.top.replace("px;",""));0===window.scrollY||n<=o?e.style.top="0px":window.scrollY<r?i<0?e.style.top=i+r-window.scrollY+"px":i>=0&&0!==i&&(e.style.top="0px"):i>t?e.style.top=i+r-window.scrollY+"px":i<t&&i!==t&&(e.style.top=t+"px"),r=window.scrollY}),{capture:!0,passive:!0})}};t.setTwoDirectionStickyPanel=a,t.setTwoDirectionStickyPanelById=function(e){a(document.getElementById(e))},t.hasScrollReachedBottom=function(e){if(!e)return!1;var t=e.scrollHeight,r=e.scrollTop,o=e.clientHeight,n=t-r;return n>=o-1&&n<=o+1},t.withScroll=function(e){if(!e)return!1;var t=e.scrollHeight,r=e.clientHeight;return!(t>=r-1&&t<=r+1)},t.escapeRegExp=function(e){return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):""},t.sanitiseInputText=function(e){return"string"==typeof e?e.replace(/[^a-zA-Z0-9\s,\\(\\)]/g,""):""},t.removeHtmlTags=function(e){return"string"==typeof e?String(e).replace(/(<([^>]+)>)/gi,""):e},t.isValidIconElement=function(e){var t;return"function"==typeof e&&"svg"===(null===(t=e())||void 0===t?void 0:t.type)},t.isValidIconName=function(e){return!!e&&"string"==typeof e},t.formatNumber=function(e,t){return e.toLocaleString("en-AU",{minimumFractionDigits:t,maximumFractionDigits:t})||0},t.scrollTo=function(e,t){"function"==typeof(null==e?void 0:e.scrollTo)&&e.scrollTo({behavior:"smooth",top:t.top,left:t.left})},t.getBoundingClientInfo=function(e){return{height:Math.round(e.getBoundingClientRect().height),top:Math.round(e.getBoundingClientRect().top),bottom:Math.round(e.getBoundingClientRect().bottom),left:Math.round(e.getBoundingClientRect().left),right:Math.round(e.getBoundingClientRect().right)}},t.getMonthName=function(e){return null==e?void 0:e.toLocaleDateString(void 0,{month:"long"})},t.getFormattedDate=function(e){return"".concat(e.getDate(),"/").concat(e.getMonth()+1,"/").concat(e.getFullYear())}},8903:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isSizeXs=t.isSizeSm=void 0,t.isSizeSm=function(e){return"sm"===e},t.isSizeXs=function(e){return"xs"===e}},3322:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setSessionStorageJson=t.setSessionStorage=t.setCookieStorage=t.getSessionStorageJson=t.getSessionStorage=t.getCookieStorage=void 0;var r=function(){var e="WJtestStorage";try{return!!window.sessionStorage&&(window.sessionStorage.setItem(e,1),window.sessionStorage.removeItem(e),!0)}catch(e){return!1}};t.getSessionStorage=function(e){if(e&&r())try{return window.sessionStorage.getItem(e)}catch(e){return}},t.setSessionStorage=function(e,t){if(e&&r())try{return window.sessionStorage.setItem(e,t)}catch(e){return}},t.getSessionStorageJson=function(e){if(e&&r())try{return JSON.parse(window.sessionStorage.getItem(e))}catch(e){return}},t.setSessionStorageJson=function(e,t){if(e&&r())try{return window.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){return}},t.getCookieStorage=function(e){for(var t=e+"=",r=document.cookie.split(";"),o=0;o<r.length;o++){for(var n=r[o];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return null},t.setCookieStorage=function(e,t,r){var o=window.location.hostname,n="localhost"===o?o:o.match(/(\.\w+){3}$/g);document.cookie="".concat(e,"=").concat(t,"; Domain=").concat(n,"; Path=/; Max-Age=").concat(r||86400)}},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},7880:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},353:e=>{e.exports=require("@babel/runtime/helpers/slicedToArray")},9293:e=>{e.exports=require("@babel/runtime/helpers/typeof")},2511:e=>{e.exports=require("polished/lib/color/darken")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")},5355:e=>{e.exports=require("react-scroll-into-view-if-needed")},7518:e=>{e.exports=require("styled-components")}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}var o={};(()=>{var e=o,t=r(7880);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Tab",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"TabPanel",{enumerable:!0,get:function(){return i.default}});var n=t(r(5059)),i=t(r(1755))})(),module.exports=o})();
|
|
1
|
+
(()=>{"use strict";var e={6361:(e,t,r)=>{var o=r(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(580)),i=function(e){var t=e.condition,r=e.children;return!0===t?r:null};i.propTypes={condition:n.default.bool},i.defaultProps={condition:!1};var a=i;t.default=a},7350:(e,t,r)=>{var o=r(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(6361)).default;t.default=n},7288:(e,t,r)=>{var o=r(7880),n=r(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(8213)),a=o(r(353)),l=o(r(3838)),d=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(o,a,l):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(6689)),c=(o(r(580)),r(1638)),u=r(9941),s=["children","fadeBgColour","fadeHeight","contentHeight"];function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}var p=function(e){var t=e.children,r=e.fadeBgColour,o=e.fadeHeight,n=e.contentHeight,f=(0,l.default)(e,s),p=(0,d.useRef)(),g=(0,d.useState)(!1),v=(0,a.default)(g,2),h=v[0],b=v[1],m=(0,d.useState)((0,u.withScroll)(null==p?void 0:p.current)),y=(0,a.default)(m,2),w=y[0],x=y[1];return(0,d.useEffect)((function(){x((0,u.withScroll)(null==p?void 0:p.current)),b((0,u.hasScrollReachedBottom)(null==p?void 0:p.current))})),d.default.createElement(c.StyledOuterWrapper,(0,i.default)({contentHeight:n},f),d.default.createElement(c.StyledInnerWrapper,{onScroll:function(){b((0,u.hasScrollReachedBottom)(null==p?void 0:p.current))},ref:p,fadeBgColour:r},t),w&&!h&&d.default.createElement(c.StyledPanelWithScrollFade,{fadeBgColour:r,fadeHeight:o}))};p.defaultProps={fadeBgColour:"#F5F5F5",fadeHeight:"115px",contentHeight:"200px"};var g=p;t.default=g},1638:(e,t,r)=>{var o=r(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.StyledPanelWithScrollFade=t.StyledOuterWrapper=t.StyledInnerWrapper=void 0;var n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var d=i?Object.getOwnPropertyDescriptor(e,l):null;d&&(d.get||d.set)?Object.defineProperty(n,l,d):n[l]=e[l]}return n.default=e,r&&r.set(e,n),n}(r(7518)),i=r(9193);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}var l=n.default.div.withConfig({displayName:"PanelWithScrollFadestyle__StyledOuterWrapper",componentId:"sc-9upa4e-0"})(["position:relative;",""],(function(e){var t=e.contentHeight;return t&&(0,n.css)(["height:",";"],t)}));t.StyledOuterWrapper=l;var d=n.default.div.withConfig({displayName:"PanelWithScrollFadestyle__StyledInnerWrapper",componentId:"sc-9upa4e-1"})(["position:relative;overflow:auto;height:100%;",""],(function(e){var t=e.fadeBgColour;return t&&(0,n.css)(["background:",""],t)}));t.StyledInnerWrapper=d;var c=n.default.div.withConfig({displayName:"PanelWithScrollFadestyle__StyledPanelWithScrollFade",componentId:"sc-9upa4e-2"})(["position:absolute;bottom:0;width:calc(100% - 17px);"," pointer-events:none;@media ","{width:100%;}"],(function(e){var t=e.fadeBgColour,r=e.fadeHeight;return t&&r&&(0,n.css)(["background:linear-gradient(360deg,"," 0%,rgba(235,235,235,0) 100%);height:",";"],t,r)}),i.theme.media.mobileAndTablet);t.StyledPanelWithScrollFade=c},3689:(e,t,r)=>{var o=r(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(7288)).default;t.default=n},3206:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={dateFormatExtraShort:"d MMM",dateFormatShort:"E d MMM",dateFormat:"E d MMM yyyy",dateFormatLong:"E d MMMM yyyy",timeFormat:"h:mm a",dayLabelFormat:"E MMM dd yyyy",weekStartsOn:1,weekFormat:"E",scrollToViewOptions:{behavior:"smooth",block:"end",scrollMode:"if-needed"}}},5799:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={notification:{success:{color:"#149000",backgroundColor:"#EEF7EB"},error:{color:"#BE0000",backgroundColor:"#F2DEDE"},warning:{color:"#FF5C00",backgroundColor:"#F6EDE6"},info:{color:"#3D9AF2",backgroundColor:"#ECF5FE"},notice:{color:"#FEB42B",backgroundColor:"#FFF3CD"}},textLink:{color:"#0060BB",hoverColor:"#00509C"}}},9193:(e,t,r)=>{var o=r(7880);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"config",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"identifiers",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"mixins",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"theme",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"themeV2",{enumerable:!0,get:function(){return i.default}});var n=o(r(2594)),i=o(r(6932)),a=o(r(2098)),l=o(r(3206)),d=o(r(5799))},2098:(e,t,r)=>{var o=r(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(7518),i=o(r(2594)),a={globalStyles:(0,n.css)(["font-family:",";font-size:",";color:",";&,> *,> *:before,> *:after{box-sizing:border-box;}"],i.default.fontFamily.primary,i.default.fontSize,i.default.fontColor)};t.default=a},6932:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],o={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:r[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:r[5],hoverColor:r[6],hoverDarkColor:r[7],textHighlight:r[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:r[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:r[5],inputIcon:r[9],inputIconBackground:r[2],inputIconHoverBackground:r[5],inputCrossBtn:"#a8a8a8",btnStandard:r[2],btnStandardHover:r[5],btnAction:r[17],btnActionHover:"#259400",btnActive:r[13],btnActiveHover:r[19],btnSelection:r[16],btnSelectionHover:r[20],successBackground:r[22],successText:r[21],errorBackground:r[26],errorText:r[27],sliderPrimary:r[13],color:r,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:r[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=o},2594:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],o={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:r[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:r[5],hoverColor:r[6],hoverDarkColor:r[7],textHighlight:r[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:r[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:r[5],inputIcon:r[9],inputIconBackground:r[2],inputIconHoverBackground:r[5],inputCrossBtn:"#a8a8a8",btnStandard:r[2],btnStandardHover:r[5],btnAction:r[17],btnActionHover:"#259400",btnActive:r[13],btnActiveHover:r[19],btnSelection:r[16],btnSelectionHover:r[20],successBackground:r[22],successText:r[21],errorBackground:r[26],errorText:r[27],sliderPrimary:r[13],color:r,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:r[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=o},5059:(e,t,r)=>{var o=r(7880),n=r(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(8213)),a=o(r(353)),l=o(r(3838)),d=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=b(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(o,a,l):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(6689)),c=(o(r(580)),r(8727)),u=o(r(1755)),s=o(r(3689)),f=r(8903),p=o(r(7350)),g=o(r(5355)),v=r(9941),h=["children","enableTabHighlighter","tabGap","defaultTab","onChange","variant","size","maxHeight","enablePanelWithScrollFade","contentPadding","disableScrollIntoViewIfNeeded"];function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(b=function(e){return e?r:t})(e)}var m=(0,d.forwardRef)((function(e,t){var r=e.children,o=e.enableTabHighlighter,n=e.tabGap,b=e.defaultTab,m=e.onChange,w=e.variant,x=e.size,S=e.maxHeight,C=e.enablePanelWithScrollFade,F=e.contentPadding,B=e.disableScrollIntoViewIfNeeded,T=(0,l.default)(e,h);if(!r)return null;var E=void 0===r.length?[r]:r,O=b<E.length,P=(0,d.useState)(O?b:0),M=(0,a.default)(P,2),k=M[0],D=M[1],I=Array(E.length).fill().map((function(){return(0,d.useRef)()})),_=(0,d.useState)({tabWidth:0,offsetLeft:0}),j=(0,a.default)(_,2),W=j[0],H=j[1],A=(0,d.useRef)(),R=(0,d.useState)(!1),N=(0,a.default)(R,2),L=N[0],z=N[1];(0,d.useEffect)((function(){var e,t,r,o=null===(e=I[O?b:0].current)||void 0===e?void 0:e.offsetLeft,n=null===(t=I[O?b:0].current)||void 0===t?void 0:t.clientWidth;H({tabWidth:n,offsetLeft:o});var i=C?null===(r=A.current)||void 0===r?void 0:r.offsetParent:A.current;return(0,v.scrollTo)(i,{top:0,left:0}),y(null==A?void 0:A.current,z)}),[]);var q=function(e){if(e!==k){var t,r,o;m&&m(k,e);var n=null===(t=I[e].current)||void 0===t?void 0:t.offsetLeft,i=null===(r=I[e].current)||void 0===r?void 0:r.clientWidth,a=C?null===(o=A.current)||void 0===o?void 0:o.offsetParent:A.current;(0,v.scrollTo)(a,{top:0,left:0}),H({tabWidth:i,offsetLeft:n}),D(e)}},G=x&&(0,f.isSizeSm)(x)?"40px":"48px",V=S?"calc(".concat(S," - ").concat(G,")"):void 0,J=C?d.default.createElement(s.default,{contentHeight:V},d.default.createElement(c.StyledContent,{"data-testid":"tab-content",role:"tab-content",variant:w,padding:F,ref:A},E[k].props.children)):d.default.createElement(c.StyledContent,{"data-testid":"tab-content",role:"tab-content",contentHeight:V,variant:w,padding:F,ref:A},E[k].props.children);return d.default.createElement(c.StyledComponentWrapper,(0,i.default)({ref:t},T,{"data-testid":"tab-wrapper"}),d.default.createElement(c.StyledTabWrapper,{enableTabHighlighter:o,role:"tab-wrapper"},d.default.createElement(c.StyledTabInnerWrapper,{tabGap:n,role:"tab-inner-wrapper"},E.map((function(e,t){if(!e)return null;var r=d.default.createElement(u.default,(0,i.default)({index:t,ref:I[t],activeTab:k,onSelect:q,variant:w,size:x},e.props));return B?r:d.default.createElement(g.default,{active:L&&t===k,options:{block:"nearest",inline:"center",behavior:"smooth",scrollMode:"always"},key:t},r)})),d.default.createElement(p.default,{condition:!!o},d.default.createElement(c.StyledHighlighter,{width:W.tabWidth,position:W.offsetLeft,"data-testid":"tab-underline"})))),J)})),y=function(e,t){if("IntersectionObserver"in window){var r=new window.IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting?t(!0):t(!1)}))}),{threshold:0});return e&&r.observe(e),function(){return r.disconnect()}}};m.defaultProps={defaultTab:0,variant:"standard",size:"lg",enablePanelWithScrollFade:!1,contentPadding:"16px",tabGap:2,enableTabHighlighter:!1,disableScrollIntoViewIfNeeded:!1};var w=m;t.default=w},8727:(e,t,r)=>{var o=r(7880),n=r(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.StyledTabWrapper=t.StyledTabInnerWrapper=t.StyledTab=t.StyledHighlighter=t.StyledContent=t.StyledComponentWrapper=t.CONFIG=void 0;var i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(o,a,l):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(7518)),a=r(9193),l=o(r(2511)),d=r(8903);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}var u={standard:{textColor:a.theme.color[10],activeTabTextColor:a.theme.color[10],boldTextColor:a.theme.color[10],inactiveBgColor:a.theme.color[3],hoverColor:(0,l.default)(.12,a.theme.color[3]),activeBgColor:a.theme.color[1],inactiveTabTextColor:a.theme.color[8],tabPadding:"14px 20px"},dark:{textColor:a.theme.color[11],activeTabTextColor:a.theme.color[11],boldTextColor:a.theme.color[11],inactiveBgColor:a.theme.color[8],hoverColor:(0,l.default)(.12,a.theme.color[8]),activeBgColor:a.theme.color[10],inactiveTabTextColor:a.theme.color[3],tabPadding:"14px 20px"},transparent:{textColor:a.theme.color[10],activeTabTextColor:a.theme.color[10],boldTextColor:a.theme.color[10],inactiveBgColor:"transparent",hoverColor:"transparent",activeBgColor:"transparent",inactiveTabTextColor:a.theme.color[8],tabPadding:"12px 16px"}};t.CONFIG=u;var s=i.default.div.withConfig({displayName:"Tabstyle__StyledComponentWrapper",componentId:"sc-1mp3u4j-0"})(["display:flex;flex-direction:column;position:relative;"]);t.StyledComponentWrapper=s;var f=i.default.div.withConfig({displayName:"Tabstyle__StyledTabWrapper",componentId:"sc-1mp3u4j-1"})(["position:relative;overflow:hidden;",""],(function(e){return e.enableTabHighlighter&&(0,i.css)(["border-bottom:1px solid #dfdfdf;"])}));t.StyledTabWrapper=f;var p=i.default.div.withConfig({displayName:"Tabstyle__StyledTabInnerWrapper",componentId:"sc-1mp3u4j-2"})(["display:flex;align-items:flex-start;max-width:100%;position:relative;gap:",";@media ","{overflow:scroll visible;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}}"],(function(e){return e.tabGap+"px"}),a.theme.media.mobile);t.StyledTabInnerWrapper=p;var g=i.default.span.withConfig({displayName:"Tabstyle__StyledTab",componentId:"sc-1mp3u4j-3"})(["text-align:center;white-space:nowrap;cursor:pointer;border-radius:2px 2px 0 0;font-family:'Roboto';font-weight:500;font-size:14px;line-height:20px;display:inline-block;"," "," ",""],(function(e){var t=e.size;return t&&(0,d.isSizeSm)(t)&&(0,i.css)(["padding:12px 20px;"])}),(function(e){var t=e.variant;return t&&(0,i.css)(["padding:",";color:",";background:",";@media (hover:hover){&:hover{background:",";}}"],u[t].tabPadding,u[t].inactiveTabTextColor,u[t].inactiveBgColor,u[t].hoverColor)}),(function(e){var t=e.isTabActive,r=e.variant;return t&&r&&(0,i.css)(["background:",";color:",";pointer-events:none;"],u[r].activeBgColor,u[r].activeTabTextColor)}));t.StyledTab=g;var v=i.default.div.withConfig({displayName:"Tabstyle__StyledContent",componentId:"sc-1mp3u4j-4"})(["display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto;max-width:100%;flex-grow:1;"," "," "," em{font-style:normal;font-weight:500;}strong em{font-size:14px;font-weight:700;}"],(function(e){var t=e.padding;return t&&(0,i.css)(["padding:",";"],t)}),(function(e){var t=e.contentHeight;return t&&(0,i.css)(["max-height:",";"],t)}),(function(e){var t=e.variant;return t&&(0,i.css)(["background-color:",";color:",";h3,h4,h5{color:",";}"],u[t].activeBgColor,u[t].textColor,u[t].boldTextColor)}));t.StyledContent=v;var h=i.default.span.withConfig({displayName:"Tabstyle__StyledHighlighter",componentId:"sc-1mp3u4j-5"})(["display:inline-block;position:absolute;bottom:0;height:2px;background:",";left:",";width:",";transition:width 500ms ease,left 500ms ease;"],a.theme.color[0],(function(e){return e.position+"px"}),(function(e){return e.width+"px"}));t.StyledHighlighter=h},1755:(e,t,r)=>{var o=r(7880),n=r(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(8213)),a=o(r(3838)),l=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(o,a,l):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(6689)),d=r(8727),c=(o(r(580)),["label","index","onSelect","activeTab"]);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}var s=(0,l.forwardRef)((function(e,t){var r=e.label,o=e.index,n=e.onSelect,u=e.activeTab,s=(0,a.default)(e,c);return l.default.createElement(d.StyledTab,(0,i.default)({},s,{isTabActive:u===o,onClick:function(){return n(o)},"data-testid":"tab",role:"tab",ref:t}),r)}));t.default=s},9941:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.escapeRegExp=t.detectOS=t.BREAKPOINTS=void 0,t.fetchDateInMilliseconds=function(){return(new Date).getTime()},t.getBoundingClientInfo=t.formatNumber=void 0,t.getDurationInMiliSeconds=function(e,t){return t-e},t.withScroll=t.setTwoDirectionStickyPanelById=t.setTwoDirectionStickyPanel=t.scrollTo=t.sanitiseInputText=t.removeHtmlTags=t.isValidIconName=t.isValidIconElement=t.isUserLoggedIn=t.isTouchDevice=t.isMobileTablet=t.isMobilePortrait=t.isMobile=t.isMatchMedia=t.hasScrollReachedBottom=t.getMonthName=t.getFormattedDate=void 0;var o=r(3322),n={MOBILE_PORTRAIT:567,MOBILE:767,TABLET:991,DESKTOP:1199};t.BREAKPOINTS=n;var i=function(e){return window.matchMedia(e).matches};t.isMatchMedia=i,t.isMobile=function(){return i("(max-width: ".concat(n.MOBILE,"px)"))},t.isMobileTablet=function(){return i("(max-width: ".concat(n.TABLET,"px)"))},t.isMobilePortrait=function(){return i("(max-width: ".concat(n.MOBILE_PORTRAIT,"px)"))},t.isTouchDevice=function(){return window.matchMedia("(pointer: coarse)").matches},t.detectOS=function(e){var t=e||navigator.userAgent,r=/(iPad).*OS\s([\d_]+)/.test(t);return{ios:!r&&/(iPhone\sOS)\s([\d_]+)/.test(t)||r,android:/(Android);?[\s/]+([\d.]+)?/.test(t)}},t.isUserLoggedIn=function(){var e,t=null===(e=(0,o.getCookieStorage)("customer-soft-id"))||void 0===e?void 0:e.split(".");if(t&&t.length>1){var r=window.atob(t[1]).toString("ascii");if(JSON.parse(r).firstName)return!0}return!1};var a=function(e){if(e){var t=window.innerHeight-e.offsetHeight,r=window.scrollY,o=window.innerHeight,n=e.offsetHeight;e.style.top="0px",window.addEventListener("resize",(function(){o=window.innerHeight,n=e.offsetHeight})),document.addEventListener("scroll",(function(){n=e.offsetHeight,t=window.innerHeight-e.offsetHeight;var i=parseInt(e.style.top.replace("px;",""));0===window.scrollY||n<=o?e.style.top="0px":window.scrollY<r?i<0?e.style.top=i+r-window.scrollY+"px":i>=0&&0!==i&&(e.style.top="0px"):i>t?e.style.top=i+r-window.scrollY+"px":i<t&&i!==t&&(e.style.top=t+"px"),r=window.scrollY}),{capture:!0,passive:!0})}};t.setTwoDirectionStickyPanel=a,t.setTwoDirectionStickyPanelById=function(e){a(document.getElementById(e))},t.hasScrollReachedBottom=function(e){if(!e)return!1;var t=e.scrollHeight,r=e.scrollTop,o=e.clientHeight,n=t-r;return n>=o-1&&n<=o+1},t.withScroll=function(e){if(!e)return!1;var t=e.scrollHeight,r=e.clientHeight;return!(t>=r-1&&t<=r+1)},t.escapeRegExp=function(e){return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):""},t.sanitiseInputText=function(e){return"string"==typeof e?e.replace(/[^a-zA-Z0-9\s,\\(\\)]/g,""):""},t.removeHtmlTags=function(e){return"string"==typeof e?String(e).replace(/(<([^>]+)>)/gi,""):e},t.isValidIconElement=function(e){var t;return"function"==typeof e&&"svg"===(null===(t=e())||void 0===t?void 0:t.type)},t.isValidIconName=function(e){return!!e&&"string"==typeof e},t.formatNumber=function(e,t){return e.toLocaleString("en-AU",{minimumFractionDigits:t,maximumFractionDigits:t})||0},t.scrollTo=function(e,t){"function"==typeof(null==e?void 0:e.scrollTo)&&e.scrollTo({behavior:"smooth",top:t.top,left:t.left})},t.getBoundingClientInfo=function(e){return{height:Math.round(e.getBoundingClientRect().height),top:Math.round(e.getBoundingClientRect().top),bottom:Math.round(e.getBoundingClientRect().bottom),left:Math.round(e.getBoundingClientRect().left),right:Math.round(e.getBoundingClientRect().right)}},t.getMonthName=function(e){return null==e?void 0:e.toLocaleDateString(void 0,{month:"long"})},t.getFormattedDate=function(e){return"".concat(e.getDate(),"/").concat(e.getMonth()+1,"/").concat(e.getFullYear())}},8903:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isSizeXs=t.isSizeSm=void 0,t.isSizeSm=function(e){return"sm"===e},t.isSizeXs=function(e){return"xs"===e}},3322:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setSessionStorageJson=t.setSessionStorage=t.setCookieStorage=t.getSessionStorageJson=t.getSessionStorage=t.getCookieStorage=void 0;var r=function(){var e="WJtestStorage";try{return!!window.sessionStorage&&(window.sessionStorage.setItem(e,1),window.sessionStorage.removeItem(e),!0)}catch(e){return!1}};t.getSessionStorage=function(e){if(e&&r())try{return window.sessionStorage.getItem(e)}catch(e){return}},t.setSessionStorage=function(e,t){if(e&&r())try{return window.sessionStorage.setItem(e,t)}catch(e){return}},t.getSessionStorageJson=function(e){if(e&&r())try{return JSON.parse(window.sessionStorage.getItem(e))}catch(e){return}},t.setSessionStorageJson=function(e,t){if(e&&r())try{return window.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){return}},t.getCookieStorage=function(e){for(var t=e+"=",r=document.cookie.split(";"),o=0;o<r.length;o++){for(var n=r[o];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return null},t.setCookieStorage=function(e,t,r){var o=window.location.hostname,n="localhost"===o?o:o.match(/(\.\w+){3}$/g);document.cookie="".concat(e,"=").concat(t,"; Domain=").concat(n,"; Path=/; Max-Age=").concat(r||86400)}},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},7880:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},353:e=>{e.exports=require("@babel/runtime/helpers/slicedToArray")},9293:e=>{e.exports=require("@babel/runtime/helpers/typeof")},2511:e=>{e.exports=require("polished/lib/color/darken")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")},5355:e=>{e.exports=require("react-scroll-into-view-if-needed")},7518:e=>{e.exports=require("styled-components")}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}var o={};(()=>{var e=o,t=r(7880);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Tab",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"TabPanel",{enumerable:!0,get:function(){return i.default}});var n=t(r(5059)),i=t(r(1755))})(),module.exports=o})();
|