@webjet/react 3.13.9 → 3.13.11
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={9473:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(9825)),i=function(e){var t=e.condition,r=void 0!==t&&t,o=e.children;return!0===r?o:null};i.propTypes={condition:n.default.bool},t.default=i},3080:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(9473));t.default=n.default},8964:(e,t,r)=>{var o=r(3751),n=r(8063);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(6031)),a=o(r(7826)),l=o(r(2462)),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={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.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(2015)),c=(o(r(9825)),r(4883)),u=r(3465),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)}t.default=function(e){var t=e.children,r=e.fadeBgColour,o=void 0===r?"#F5F5F5":r,n=e.fadeHeight,f=void 0===n?"115px":n,p=e.contentHeight,g=void 0===p?"200px":p,v=(0,l.default)(e,s),h=(0,d.useRef)(),b=(0,d.useState)(!1),m=(0,a.default)(b,2),y=m[0],x=m[1],w=(0,d.useState)((0,u.withScroll)(null==h?void 0:h.current)),C=(0,a.default)(w,2),S=C[0],F=C[1];return(0,d.useEffect)((function(){F((0,u.withScroll)(null==h?void 0:h.current)),x((0,u.hasScrollReachedBottom)(null==h?void 0:h.current))})),d.default.createElement(c.StyledOuterWrapper,(0,i.default)({contentHeight:g},v),d.default.createElement(c.StyledInnerWrapper,{onScroll:function(){x((0,u.hasScrollReachedBottom)(null==h?void 0:h.current))},ref:h,fadeBgColour:o},t),S&&!y&&d.default.createElement(c.StyledPanelWithScrollFade,{fadeBgColour:o,fadeHeight:f}))}},4883:(e,t,r)=>{var o=r(8063);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={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.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(2770)),i=r(3290);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)}t.StyledOuterWrapper=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.StyledInnerWrapper=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.StyledPanelWithScrollFade=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)},3113:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(8964));t.default=n.default},509:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={greys:{white:"#FFFFFF",grey50:"#F5F5F5",grey100:"#EBEBEB",grey200:"#DFDFDF",grey300:"#CCCCCC",grey400:"#BFBFBF",grey500:"#999999",grey600:"#878787",grey700:"#646464",grey800:"#4D4D4D",grey900:"#333333",black:"#000000"}}},9090:(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"}}},5050:(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"},webjetRed:"#DC140A"}},3290:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"color",{enumerable:!0,get:function(){return c.default}}),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(1267)),i=o(r(492)),a=o(r(9098)),l=o(r(9090)),d=o(r(5050)),c=o(r(509))},9098:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2770),i=o(r(1267)),a=(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={globalStyles:a}},492:(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","#FEFAFA"],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},1267:(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","#FEFAFA"],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},5489:(e,t,r)=>{var o=r(3751),n=r(8063);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(6031)),a=o(r(7826)),l=o(r(2462)),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={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.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(2015)),c=(o(r(9825)),r(8478)),u=o(r(6939)),s=o(r(3113)),f=r(7427),p=o(r(3080)),g=o(r(9144)),v=r(3465),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=void 0!==o&&o,b=e.tabGap,m=void 0===b?2:b,x=e.defaultTab,w=void 0===x?0:x,C=e.onChange,S=e.variant,F=void 0===S?"standard":S,B=e.size,T=void 0===B?"lg":B,E=e.maxHeight,O=e.enablePanelWithScrollFade,P=void 0!==O&&O,D=e.contentPadding,_=void 0===D?"16px":D,M=e.disableScrollIntoViewIfNeeded,k=void 0!==M&&M,I=(0,l.default)(e,h);if(!r)return null;var j=void 0===r.length?[r]:r,W=w<j.length,A=(0,d.useState)(W?w:0),H=(0,a.default)(A,2),R=H[0],N=H[1],L=Array(j.length).fill().map((function(){return(0,d.useRef)()})),z=(0,d.useState)({tabWidth:0,offsetLeft:0}),q=(0,a.default)(z,2),G=q[0],J=q[1],V=(0,d.useRef)(),Y=(0,d.useState)(!1),K=(0,a.default)(Y,2),U=K[0],$=K[1];(0,d.useEffect)((function(){var e,t,r,o=null===(e=L[W?w:0].current)||void 0===e?void 0:e.offsetLeft,n=null===(t=L[W?w:0].current)||void 0===t?void 0:t.clientWidth;J({tabWidth:n,offsetLeft:o});var i=P?null===(r=V.current)||void 0===r?void 0:r.offsetParent:V.current;return(0,v.scrollTo)(i,{top:0,left:0}),y(null==V?void 0:V.current,$)}),[]);var X=function(e){if(e!==R){var t,r,o;C&&C(R,e);var n=null===(t=L[e].current)||void 0===t?void 0:t.offsetLeft,i=null===(r=L[e].current)||void 0===r?void 0:r.clientWidth,a=P?null===(o=V.current)||void 0===o?void 0:o.offsetParent:V.current;(0,v.scrollTo)(a,{top:0,left:0}),J({tabWidth:i,offsetLeft:n}),N(e)}},Z=T&&(0,f.isSizeSm)(T)?"40px":"48px",Q=E?"calc(".concat(E," - ").concat(Z,")"):void 0,ee=P?d.default.createElement(s.default,{contentHeight:Q},d.default.createElement(c.StyledContent,{"data-testid":"tab-content",role:"tab-content",variant:F,padding:_,ref:V},j[R].props.children)):d.default.createElement(c.StyledContent,{"data-testid":"tab-content",role:"tab-content",contentHeight:Q,variant:F,padding:_,ref:V},j[R].props.children);return d.default.createElement(c.StyledComponentWrapper,(0,i.default)({ref:t},I,{"data-testid":"tab-wrapper"}),d.default.createElement(c.StyledTabWrapper,{enableTabHighlighter:n,role:"tab-wrapper"},d.default.createElement(c.StyledTabInnerWrapper,{tabGap:m,role:"tab-inner-wrapper"},j.map((function(e,t){if(!e)return null;var r=d.default.createElement(u.default,(0,i.default)({key:t,index:t,ref:L[t],activeTab:R,onSelect:X,variant:F,size:T},e.props));return k?r:d.default.createElement(g.default,{active:U&&t===R,options:{block:"nearest",inline:"center",behavior:"smooth",scrollMode:"always"},key:t},r)})),d.default.createElement(p.default,{condition:!!n},d.default.createElement(c.StyledHighlighter,{width:G.tabWidth,position:G.offsetLeft,"data-testid":"tab-underline"})))),ee)})),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()}}};t.default=m},8478:(e,t,r)=>{var o=r(3751),n=r(8063);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={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.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(2770)),a=r(3290),l=o(r(9798)),d=r(7427);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=t.CONFIG={standard:{textColor:a.theme.color[10],hoverTabTextColor:a.theme.color[10],activeTabTextColor:a.theme.color[10],boldTextColor:a.theme.color[10],inactiveBgColor:a.theme.color[3],hoverBgColor:(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],hoverTabTextColor:a.theme.color[11],activeTabTextColor:a.theme.color[11],boldTextColor:a.theme.color[11],inactiveBgColor:a.theme.color[8],hoverBgColor:(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[8],hoverTabTextColor:a.theme.color[10],activeTabTextColor:a.theme.color[10],boldTextColor:a.theme.color[10],inactiveBgColor:"transparent",hoverBgColor:"transparent",activeBgColor:"transparent",inactiveTabTextColor:a.theme.color[8],tabPadding:"12px 16px"}};t.StyledComponentWrapper=i.default.div.withConfig({displayName:"Tabstyle__StyledComponentWrapper",componentId:"sc-1mp3u4j-0"})(["display:flex;flex-direction:column;position:relative;"]),t.StyledTabWrapper=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.StyledTabInnerWrapper=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.StyledTab=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:",";&:visited,&:focus,&:target{color:",";box-shadow:none;}@media (hover:hover){&:hover{background:",";color:",";text-decoration:none;}}"],u[t].tabPadding,u[t].inactiveTabTextColor,u[t].inactiveBgColor,u[t].inactiveTabTextColor,u[t].hoverBgColor,u[t].hoverTabTextColor)}),(function(e){var t=e.isTabActive,r=e.variant;return t&&r&&(0,i.css)(["background:",";color:",";pointer-events:none;&:visited,&:focus,&:target{color:",";}"],u[r].activeBgColor,u[r].activeTabTextColor,u[r].activeTabTextColor)})),t.StyledContent=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.StyledHighlighter=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"}))},6939:(e,t,r)=>{var o=r(3751),n=r(8063);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(6031)),a=o(r(2462)),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={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.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(2015)),d=r(8478),c=(o(r(9825)),["label","index","onSelect","onClick","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.onClick,s=e.activeTab,f=(0,a.default)(e,c);return l.default.createElement(d.StyledTab,(0,i.default)({},f,{isTabActive:s===o,onClick:function(){n(o),u&&u(o)},"data-testid":"tab",role:"tab",ref:t}),r)}));t.default=s},3465:(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.getDateWithoutTime=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(4513),n=t.BREAKPOINTS={MOBILE_PORTRAIT:567,MOBILE:767,TABLET:991,DESKTOP:1199},i=t.isMatchMedia=function(e){return window.matchMedia(e).matches},a=(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},t.setTwoDirectionStickyPanel=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.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){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";"function"==typeof(null==e?void 0:e.scrollTo)&&e.scrollTo({behavior:r,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())},t.getDateWithoutTime=function(e){return new Date(e.toDateString())}},7427:(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}},4513:(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)}},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},3751:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},7826:e=>{e.exports=require("@babel/runtime/helpers/slicedToArray")},8063:e=>{e.exports=require("@babel/runtime/helpers/typeof")},9798:e=>{e.exports=require("polished/lib/color/darken")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")},9144:e=>{e.exports=require("react-scroll-into-view-if-needed")},2770: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(3751);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(5489)),i=t(r(6939))})(),module.exports=o})();
|
|
1
|
+
(()=>{"use strict";var e={9473:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(9825)),i=function(e){var t=e.condition,r=void 0!==t&&t,o=e.children;return!0===r?o:null};i.propTypes={condition:n.default.bool},t.default=i},3080:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(9473));t.default=n.default},8964:(e,t,r)=>{var o=r(3751),n=r(8063);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(6031)),a=o(r(7826)),l=o(r(2462)),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={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.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(2015)),c=(o(r(9825)),r(4883)),u=r(3465),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)}t.default=function(e){var t=e.children,r=e.fadeBgColour,o=void 0===r?"#F5F5F5":r,n=e.fadeHeight,f=void 0===n?"115px":n,p=e.contentHeight,g=void 0===p?"200px":p,v=(0,l.default)(e,s),h=(0,d.useRef)(),b=(0,d.useState)(!1),m=(0,a.default)(b,2),y=m[0],x=m[1],w=(0,d.useState)((0,u.withScroll)(null==h?void 0:h.current)),C=(0,a.default)(w,2),S=C[0],F=C[1];return(0,d.useEffect)((function(){F((0,u.withScroll)(null==h?void 0:h.current)),x((0,u.hasScrollReachedBottom)(null==h?void 0:h.current))})),d.default.createElement(c.StyledOuterWrapper,(0,i.default)({contentHeight:g},v),d.default.createElement(c.StyledInnerWrapper,{onScroll:function(){x((0,u.hasScrollReachedBottom)(null==h?void 0:h.current))},ref:h,fadeBgColour:o},t),S&&!y&&d.default.createElement(c.StyledPanelWithScrollFade,{fadeBgColour:o,fadeHeight:f}))}},4883:(e,t,r)=>{var o=r(8063);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={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.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(2770)),i=r(3290);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)}t.StyledOuterWrapper=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.StyledInnerWrapper=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.StyledPanelWithScrollFade=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)},3113:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(8964));t.default=n.default},509:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={greys:{white:"#FFFFFF",grey50:"#F5F5F5",grey100:"#EBEBEB",grey200:"#DFDFDF",grey300:"#CCCCCC",grey400:"#BFBFBF",grey500:"#999999",grey600:"#878787",grey700:"#646464",grey800:"#4D4D4D",grey900:"#333333",black:"#000000"}}},9090:(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"}}},5050:(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"},webjetRed:"#DC140A"}},3290:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"color",{enumerable:!0,get:function(){return c.default}}),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(1267)),i=o(r(492)),a=o(r(9098)),l=o(r(9090)),d=o(r(5050)),c=o(r(509))},9098:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2770),i=o(r(1267)),a=(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={globalStyles:a}},492:(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","#FEFAFA"],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},1267:(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","#FEFAFA"],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},5489:(e,t,r)=>{var o=r(3751),n=r(8063);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(6031)),a=o(r(7826)),l=o(r(2462)),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={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.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(2015)),c=(o(r(9825)),r(8478)),u=o(r(6939)),s=o(r(3113)),f=r(7427),p=o(r(3080)),g=o(r(9144)),v=r(3465),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=void 0!==o&&o,b=e.tabGap,m=void 0===b?2:b,x=e.defaultTab,w=void 0===x?0:x,C=e.onChange,S=e.variant,F=void 0===S?"standard":S,B=e.size,T=void 0===B?"lg":B,E=e.maxHeight,O=e.enablePanelWithScrollFade,P=void 0!==O&&O,D=e.contentPadding,_=void 0===D?"16px":D,M=e.disableScrollIntoViewIfNeeded,k=void 0!==M&&M,I=(0,l.default)(e,h);if(!r)return null;var j=void 0===r.length?[r]:r,W=w<j.length,A=(0,d.useState)(W?w:0),H=(0,a.default)(A,2),R=H[0],N=H[1],L=Array(j.length).fill().map((function(){return(0,d.useRef)()})),z=(0,d.useState)({tabWidth:0,offsetLeft:0}),q=(0,a.default)(z,2),G=q[0],J=q[1],V=(0,d.useRef)(),Y=(0,d.useRef)(),K=(0,d.useState)(!1),U=(0,a.default)(K,2),$=U[0],X=U[1];(0,d.useEffect)((function(){var e,t,r,o=null===(e=L[W?w:0].current)||void 0===e?void 0:e.offsetLeft,n=null===(t=L[W?w:0].current)||void 0===t?void 0:t.clientWidth;J({tabWidth:n,offsetLeft:o});var i=P?null===(r=V.current)||void 0===r?void 0:r.offsetParent:V.current;return(0,v.scrollTo)(i,{top:0,left:0}),y(null==Y?void 0:Y.current,X)}),[]);var Z,Q=function(e){if(e!==R){var t,r,o;C&&C(R,e);var n=null===(t=L[e].current)||void 0===t?void 0:t.offsetLeft,i=null===(r=L[e].current)||void 0===r?void 0:r.clientWidth,a=P?null===(o=V.current)||void 0===o?void 0:o.offsetParent:V.current;(0,v.scrollTo)(a,{top:0,left:0}),J({tabWidth:i,offsetLeft:n}),N(e)}},ee=T&&(0,f.isSizeSm)(T)?"40px":"48px",te=E?"calc(".concat(E," - ").concat(ee,")"):void 0;return!!j[R].props.children&&(Z=P?d.default.createElement(s.default,{contentHeight:te},d.default.createElement(c.StyledContent,{"data-testid":"tab-content",role:"tab-content",variant:F,padding:_,ref:V},j[R].props.children)):d.default.createElement(c.StyledContent,{"data-testid":"tab-content",role:"tab-content",contentHeight:te,variant:F,padding:_,ref:V},j[R].props.children)),d.default.createElement(c.StyledComponentWrapper,(0,i.default)({ref:t},I,{"data-testid":"tab-wrapper"}),d.default.createElement(c.StyledTabWrapper,{enableTabHighlighter:n,role:"tab-wrapper",ref:Y},d.default.createElement(c.StyledTabInnerWrapper,{tabGap:m,role:"tab-inner-wrapper"},j.map((function(e,t){if(!e)return null;var r=d.default.createElement(u.default,(0,i.default)({key:t,index:t,ref:L[t],activeTab:R,onSelect:Q,variant:F,size:T},e.props));return k?r:d.default.createElement(g.default,{active:$&&t===R,options:{block:"nearest",inline:"center",behavior:"smooth",scrollMode:"always"},key:t},r)})),d.default.createElement(p.default,{condition:!!n},d.default.createElement(c.StyledHighlighter,{width:G.tabWidth,position:G.offsetLeft,"data-testid":"tab-underline"})))),Z)})),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()}}};t.default=m},8478:(e,t,r)=>{var o=r(3751),n=r(8063);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={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.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(2770)),a=r(3290),l=o(r(9798)),d=r(7427);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=t.CONFIG={standard:{textColor:a.theme.color[10],hoverTabTextColor:a.theme.color[10],activeTabTextColor:a.theme.color[10],boldTextColor:a.theme.color[10],inactiveBgColor:a.theme.color[3],hoverBgColor:(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],hoverTabTextColor:a.theme.color[11],activeTabTextColor:a.theme.color[11],boldTextColor:a.theme.color[11],inactiveBgColor:a.theme.color[8],hoverBgColor:(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[8],hoverTabTextColor:a.theme.color[10],activeTabTextColor:a.theme.color[10],boldTextColor:a.theme.color[10],inactiveBgColor:"transparent",hoverBgColor:"transparent",activeBgColor:"transparent",inactiveTabTextColor:a.theme.color[8],tabPadding:"12px 16px"}};t.StyledComponentWrapper=i.default.div.withConfig({displayName:"Tabstyle__StyledComponentWrapper",componentId:"sc-1mp3u4j-0"})(["display:flex;flex-direction:column;position:relative;"]),t.StyledTabWrapper=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.StyledTabInnerWrapper=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.StyledTab=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:",";&:visited,&:focus,&:target{color:",";box-shadow:none;}@media (hover:hover){&:hover{background:",";color:",";text-decoration:none;}}"],u[t].tabPadding,u[t].inactiveTabTextColor,u[t].inactiveBgColor,u[t].inactiveTabTextColor,u[t].hoverBgColor,u[t].hoverTabTextColor)}),(function(e){var t=e.isTabActive,r=e.variant;return t&&r&&(0,i.css)(["background:",";color:",";pointer-events:none;&:visited,&:focus,&:target{color:",";}"],u[r].activeBgColor,u[r].activeTabTextColor,u[r].activeTabTextColor)})),t.StyledContent=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.StyledHighlighter=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"}))},6939:(e,t,r)=>{var o=r(3751),n=r(8063);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(6031)),a=o(r(2462)),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={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.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(2015)),d=r(8478),c=(o(r(9825)),["label","index","onSelect","onClick","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.onClick,s=e.activeTab,f=(0,a.default)(e,c);return l.default.createElement(d.StyledTab,(0,i.default)({},f,{isTabActive:s===o,onClick:function(){n(o),u&&u(o)},"data-testid":"tab",role:"tab",ref:t}),r)}));t.default=s},3465:(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.getDateWithoutTime=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(4513),n=t.BREAKPOINTS={MOBILE_PORTRAIT:567,MOBILE:767,TABLET:991,DESKTOP:1199},i=t.isMatchMedia=function(e){return window.matchMedia(e).matches},a=(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},t.setTwoDirectionStickyPanel=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.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){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";"function"==typeof(null==e?void 0:e.scrollTo)&&e.scrollTo({behavior:r,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())},t.getDateWithoutTime=function(e){return new Date(e.toDateString())}},7427:(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}},4513:(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)}},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},3751:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},7826:e=>{e.exports=require("@babel/runtime/helpers/slicedToArray")},8063:e=>{e.exports=require("@babel/runtime/helpers/typeof")},9798:e=>{e.exports=require("polished/lib/color/darken")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")},9144:e=>{e.exports=require("react-scroll-into-view-if-needed")},2770: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(3751);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(5489)),i=t(r(6939))})(),module.exports=o})();
|