UNPKG

moonrocks

Version:

Just another UI component library based on Styled System.

1 lines 54.9 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("styled-components"),require("react"),require("styled-system"),require("react-pose"),require("react-icons/fa"),require("react-router-dom"),require("formik"),require("cleave.js/react"),require("react-select"),require("yup")):"function"==typeof define&&define.amd?define(["exports","styled-components","react","styled-system","react-pose","react-icons/fa","react-router-dom","formik","cleave.js/react","react-select","yup"],t):t((e=e||self)["sr-components"]={},e.styled,e.React,e.styledSystem,e.posed,e.fa,e.reactRouterDom,e.formik,e.Cleave,e.Select,e.Yup)}(this,function(e,t,G,o,S,g,f,y,r,n,d){"use strict";var a="default"in t?t.default:t,P="default"in G?G.default:G,i="default"in S?S.default:S;function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(){return(I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function b(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(e){h(t,e,n[e])})}return t}function F(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function R(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}r=r&&r.hasOwnProperty("default")?r.default:r,n=n&&n.hasOwnProperty("default")?n.default:n;var l=[0,4,8,16,32,64,128,256,512],c=[12,14,16,18,24,30,36,48,64],s=["40em","64em","80em"],u={tablet:"@media screen and (min-width: ".concat(s[0],")"),desktop:"@media screen and (min-width: ".concat(s[1],")"),widescreen:"@media screen and (min-width: ".concat(s[2],")")},m=[18,24,30,36,48,60,72,96,128],p=[.1,.35,.5,.65,.8],v="#000",k="#101B2F",E="#344B66",x="#778F9B",w="#B8C1CB",C="#DDE2E8",z="#FAFAFA",O=["rgba(0, 0, 0, ".concat(p[0],")"),"rgba(0, 0, 0, ".concat(p[1],")"),"rgba(0, 0, 0, ".concat(p[2],")"),"rgba(0, 0, 0, ".concat(p[3],")"),"rgba(0, 0, 0, ".concat(p[4],")")],B=["rgba(255, 255, 255, ".concat(p[0],")"),"rgba(255, 255, 255, ".concat(p[1],")"),"rgba(255, 255, 255, ".concat(p[2],")"),"rgba(255, 255, 255, ".concat(p[3],")"),"rgba(255, 255, 255, ".concat(p[4],")")],A="#518AEE",N="#365C9F",T="#7CCD90",W="#3E7938",H="#F3B942",M="#A3792D",j="#EF815F",L="#A2442B",V={facebook:"#3B5998",facebookHover:"#22407F",twitter:"#38A1F3",twitterHover:"#1F88DA"},q='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',Y={main:'"Muli", '.concat(q),special:'"Quicksand", '.concat(q)},U={normal:l[1],special:l[3],round:"1000em"},X={normal:"".concat(l[0],"px ").concat(l[1],"px ").concat(l[2],"px ").concat(l[0],"px ").concat(O[0]),heavy:"".concat(l[0],"px ").concat(l[2],"px ").concat(l[3],"px ").concat(l[0],"px ").concat(O[0])},$={space:l,fontSizes:c,lineHeights:{normal:1.25,title:1.5,paragraph:1.75},breakpoints:s,media:u,widths:m,maxWidths:m,minWidths:m,heights:m,maxHeights:m,minHeights:m,colors:b({primary:A,primary100:"#C4D7F9",primary300:"#8AB0F3",primary500:A,primary700:N,primary900:"#1B2F51",success:T,success100:"#D6EFDD",success300:"#A3DCB1",success500:T,success700:W,success900:"#243E2B",warning:H,warning100:"#FBEAC6",warning300:"#F6CE7A",warning500:H,warning700:M,warning900:"#60432D",error:j,error100:"#FAD9CF",error300:"#F4A68F",error500:j,error700:L,error900:"#722E1F",gradients:{primary:"linear-gradient(to bottom right, ".concat(A,", #8A96FD)")},trueBlack:v,black:k,darkGray:E,mediumGray:x,lightGray:w,snow:C,white:z,trueWhite:"#FFF",blacks:O,whites:B,transparent:"transparent"},V),opacities:p,fonts:Y,fontWeights:{regular:400,bold:700,extraBold:800},letterSpacings:{normal:"normal",spaced:"1px",crazy:"4px"},borders:{},radii:U,shadows:X,animations:{fast:"200ms",brisk:"500ms",lazy:"1000ms"},zIndicies:{baseline:0,messages:100,header:200,tooltip:800,notifications:900,dialog:1e3},colorStyles:{primary:{color:A,"&:hover":{color:N}},success:{color:T,"&:hover":{color:W}},warning:{color:H,"&:hover":{color:M}},error:{color:j,"&:hover":{color:L}},white:{color:z,"&:hover":{color:w}},snow:{color:C,"&:hover":{color:w}},lightGray:{color:w,"&:hover":{color:x}},mediumGray:{color:x,"&:hover":{color:E}},darkGray:{color:E,"&:hover":{color:k}},black:{color:k,"&:hover":{color:v}}},textStyles:{h1:h({fontSize:c[6]},u.desktop,{fontSize:c[7]}),h1Static:{fontSize:c[7]},h2:h({fontSize:c[5]},u.desktop,{fontSize:c[6]}),h2Static:{fontSize:c[6]},h3:h({fontSize:c[4]},u.desktop,{fontSize:c[5]}),h3Static:{fontSize:c[5]},h4:h({fontSize:c[3]},u.desktop,{fontSize:c[4]}),h4Static:{fontSize:c[4]},h5:h({fontSize:c[2]},u.desktop,{fontSize:c[3]}),h5Static:{fontSize:c[3]},h6:h({fontSize:c[1]},u.desktop,{fontSize:c[2]}),h6Static:{fontSize:c[2]}},buttons:{primary:{color:z,backgroundColor:A,"&:hover":{backgroundColor:N}},secondary:{color:k,backgroundColor:C,"&:hover":{backgroundColor:w}},success:{color:z,backgroundColor:T,"&:hover":{backgroundColor:W}},warning:{color:z,backgroundColor:H,"&:hover":{backgroundColor:M}},error:{color:z,backgroundColor:j,"&:hover":{backgroundColor:L}},facebook:{color:z,backgroundColor:V.facebook,"&:hover":{backgroundColor:V.facebookHover}},twitter:{color:z,backgroundColor:V.twitter,"&:hover":{backgroundColor:V.twitterHover}}},cards:{paper:{color:k,backgroundColor:z,boxShadow:X.normal,borderRadius:U.normal},wizard:h({},u.desktop,{color:k,backgroundColor:z,boxShadow:X.heavy,borderRadius:U.normal}),note:{color:x,backgroundColor:z,borderRadius:U.normal}}},_=a("div")({boxSizing:"border-box",WebkitFontSmoothing:"antialiased",outline:0},o.space,o.width,o.fontFamily,o.fontWeight,o.fontSize,o.lineHeight,o.borderRadius,o.color,o.flex,o.order,o.alignSelf,o.display);_.defaultProps={as:"div",fontFamily:"main",fontSize:2,lineHeight:"normal",fontWeight:"regular",color:"black",display:"block"},_.displayName="Box";var Q=a(_)(function(){return{display:"inline-block",backgroundSize:"cover",backgroundPosition:"center center",backgroundRepeat:"no-repeat"}},o.borderRadius,o.backgroundImage,o.display,o.minWidth,o.minHeight,o.maxWidth,o.maxHeight);Q.defaultProps={as:"div",borderRadius:"round"},Q.displayName="Avatar";function J(e){var t=e.src,n=e.size,r=void 0===n?3:n,o=F(e,["src","size"]);return t&&""!==t||(t="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%2248px%22%20height%3D%2248px%22%20viewBox%3D%220%200%2048%2048%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%20%20%20%20%20%20%20%20%3Ctitle%3ENavigation%2FHeader%2F_Helpers%2FAvatar%3C%2Ftitle%3E%20%20%20%20%3Cdesc%3ECreated%20with%20Sketch.%3C%2Fdesc%3E%20%20%20%20%3Cdefs%3E%20%20%20%20%20%20%20%20%3Ccircle%20id%3D%22path-1%22%20cx%3D%2224%22%20cy%3D%2224%22%20r%3D%2224%22%3E%3C%2Fcircle%3E%20%20%20%20%3C%2Fdefs%3E%20%20%20%20%3Cg%20id%3D%22Navigation%2FHeader%2F_Helpers%2FAvatar%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%20%20%20%20%3Ccircle%20id%3D%22Avatar%22%20fill%3D%22%23DDE2E8%22%20fill-rule%3D%22nonzero%22%20cx%3D%2224%22%20cy%3D%2224%22%20r%3D%2224%22%3E%3C%2Fcircle%3E%20%20%20%20%20%20%20%20%3Cg%20id%3D%22Oval%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cmask%20id%3D%22mask-2%22%20fill%3D%22white%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20xlink%3Ahref%3D%22%23path-1%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fmask%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Cuse%20id%3D%22Mask%22%20fill%3D%22%23DDE2E8%22%20fill-rule%3D%22nonzero%22%20xlink%3Ahref%3D%22%23path-1%22%3E%3C%2Fuse%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Ccircle%20fill%3D%22%23B8C1CB%22%20mask%3D%22url%28%23mask-2%29%22%20cx%3D%2224%22%20cy%3D%2251%22%20r%3D%2224%22%3E%3C%2Fcircle%3E%20%20%20%20%20%20%20%20%20%20%20%20%3Ccircle%20fill%3D%22%23B8C1CB%22%20mask%3D%22url%28%23mask-2%29%22%20cx%3D%2224%22%20cy%3D%2218%22%20r%3D%2212%22%3E%3C%2Fcircle%3E%20%20%20%20%20%20%20%20%3C%2Fg%3E%20%20%20%20%3C%2Fg%3E%3C%2Fsvg%3E"),P.createElement(Q,I({},o,{minWidth:r,minHeight:r,maxWidth:r,maxHeight:r,backgroundImage:"url(".concat(t,")")}))}var K=a(_)(function(e){return{appearance:"none",border:0,display:"inline-block",textAlign:"center",fontFamily:o.themeGet("fonts.main")(e),fontWeight:o.themeGet("fontWeights.extraBold")(e),letterSpacing:o.themeGet("letterSpacings.spaced")(e),lineHeight:o.themeGet("lineHeights.normal")(e),textDecoration:"none",textTransform:"uppercase",userSelect:"none",transition:"background ".concat(o.themeGet("animations.fast")(e)," ease-in-out"),cursor:e.disabled?"default":"pointer",opacity:e.disabled?o.themeGet("opacities.1")(e):1,pointerEvents:e.disabled?"none":"initial",whiteSpace:"nowrap"}},o.borders,o.borderColor,o.borderRadius,o.buttonStyle,o.display);K.defaultProps={as:"button",variant:"primary",width:[1,"auto"],p:3,mb:[2,3],fontSize:[1,null,2],borderRadius:"normal"},K.displayName="Button";var Z=o.variant({key:"cards"}),ee=a(_)(o.borders,o.borderColor,o.borderRadius,o.boxShadow,o.backgroundImage,o.backgroundSize,o.backgroundPosition,o.backgroundRepeat,o.opacity,Z);ee.defaultProps=b({},_.defaultProps,{as:"div",variant:"paper"}),ee.displayName="Card";var te=a(_)({display:"flex"},o.flexWrap,o.flexDirection,o.alignItems,o.justifyContent,o.display);te.defaultProps={display:"flex"},te.displayName="Flex";var ne=a(_)(o.textAlign,o.letterSpacing);ne.defaultProps=b({},_.defaultProps);var re=a(ne)({});re.defaultProps=b({},ne.defaultProps,{as:"span",display:"inline"}),re.displayName="InlineText";var oe=a(ne)({});oe.defaultProps=b({},ne.defaultProps,{as:"p",mt:0,mb:3,display:"block",lineHeight:"paragraph"}),oe.displayName="Paragraph";var ae=a(ne)(function(e){return{userSelect:"none",fontFamily:o.themeGet("fonts.main")(e),fontWeight:o.themeGet("fontWeights.extraBold")(e),textTransform:"uppercase",letterSpacing:o.themeGet("letterSpacings.spaced")(e)}});ae.defaultProps=b({},ne.defaultProps,{as:"span",mt:0,mb:2,fontSize:[1,1,2],color:"darkGray",display:"inline-block"}),ae.displayName="CappedText";var ie=a(ne)(o.textStyle);ie.defaultProps=b({},ne.defaultProps,{display:"block",as:"h3",variant:"h3",mt:[1,null,2],mb:[2,null,3],lineHeight:"title",fontWeight:"bold"}),ie.displayName="Heading";var le=a(ne)(function(e){return{textDecoration:"none",cursor:"pointer",transition:"color ".concat(o.themeGet("animations.fast")(e)," ease-in-out")}},o.colorStyle);le.defaultProps=b({},ne.defaultProps,{as:f.Link,display:"inline",colors:"primary"}),le.displayName="InternalLink";function ce(e){var t=e.children,n=e.to,r=F(e,["children","to"]);return P.createElement(le,I({},r,{href:n,as:"a"},se),t)}var se={target:"_blank",rel:"noopener noreferrer"};ce.displayName="ExternalLink";function ue(e){var t=e.children,n=F(e,["children"]);return P.createElement(le,I({},n,{as:"span"}),t)}ue.displayName="InteractiveLink";var me=a(_)(function(e){return{position:"relative",cursor:e.hoverColor&&"pointer",transition:"color ".concat(o.themeGet("animations.fast")(e)," ease-in-out"),"&:hover":{color:e.hoverColor?o.themeGet("colors.".concat(e.hoverColor),e.hoverColor)(e):e.color}}},o.minWidth,o.minHeight,o.maxWidth,o.maxHeight);me.displayName="IconContainer";var de=P.forwardRef(function(e,t){var n=e.icon,r=e.size,o=void 0===r?0:r,a=e.color,i=e.hoverColor,l=F(e,["icon","size","color","hoverColor"]),c=n;return P.createElement(me,I({ref:t},l,{color:a,hoverColor:i,minWidth:o,minHeight:o,maxWidth:o,maxHeight:o}),P.createElement(c,{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%"}}))}),pe=i(a(_)(function(e){return{position:"fixed",zIndex:o.themeGet("zIndicies.dialog")(e),top:0,left:0,width:"100vw",height:"100vh",background:o.themeGet("colors.blacks.1")(e)}}))({enter:{opacity:1},exit:{opacity:0,delay:parseInt($.animations.fast)},transition:{duration:parseInt($.animations.fast),ease:"easeInOut"}}),fe=a(ee)(function(e){return{position:"fixed",zIndex:o.themeGet("zIndicies.dialog")(e),top:"50%",left:"50%",transform:"translate(-50%, -50%)"}});fe.defaultProps=b({},ee.defaultProps,{width:["100%","90%","75%"]}),fe.displayName="Dialog";var he=i(fe)({enter:{opacity:1,delay:parseInt($.animations.fast)},exit:{opacity:0},transition:{duration:parseInt($.animations.fast),ease:"easeInOut"}}),ge=a(te)(function(e){return{flexDirection:"column",padding:o.themeGet("space.".concat(3))(e),maxHeight:"100vh",overflowX:"hidden",overflowY:"auto"}}),ye=a(te)({justifyContent:"space-between"});ye.defaultProps=b({},te.defaultProps,{flexDirection:["column-reverse","row"],alignItems:["flex-start","center"]}),ye.displayName="DialogTop";var be=a(ie)({});be.defaultProps=b({},ie.defaultProps,{as:"span",textStyle:"h3",mb:0,mt:0}),be.displayName="Heading";var ve=a(_)({flexGrow:1});ve.defaultProps=b({},_.defaultProps,{mt:[2,3],mb:[3,4]}),ve.displayName="Content";var ke=a(te)({justifyContent:"space-between"});ke.defaultProps=b({},te.defaultProps,{flexDirection:["column","row"]}),ke.displayName="Buttons";var Ee=a(_)({}),xe=a(de)(function(e){return{cursor:"pointer","& > svg":{color:o.themeGet("colors.snow")(e),transition:"color ".concat(o.themeGet("animations.fast")(e)," ease-in-out")},"&:hover > svg":{color:o.themeGet("colors.mediumGray")(e)}}});xe.defaultProps=b({},de.defaultProps,{size:2,icon:g.FaTimes,mx:["auto",0],my:[3,0]}),xe.displayName="CloseButton";function we(e,t){e(),t&&"function"==typeof t&&t()}function Ce(e){var t=e.isOpen,n=e.close,r=e.onOpen,o=e.onClose,a=e.heading,i=e.buttons,l=e.hasBackground,c=void 0===l||l,s=e.display,u=e.children,m=F(e,["isOpen","close","onOpen","onClose","heading","buttons","hasBackground","display","children"]);t&&r&&"function"==typeof r&&r();var d=function(e,o,a){if(!e)return{};function t(e,r){return e&&Array.isArray(e)&&0<e.length?e.map(function(e,t){var n={key:"".concat(r,"-").concat(t),mb:[1,0],onClick:function(){e.props.onClick(),we(o,a)}};return P.cloneElement(e,b({},n,"left"===r?{mr:[0,3]}:{ml:[0,3]}))}):null}return{leftButtons:P.createElement(Ee,{mb:[2,0]},t(e.left,"left")),rightButtons:P.createElement(Ee,{mb:[-1,0]},t(e.right,"right"))}}(i,n,o),p=d.leftButtons,f=d.rightButtons;return P.createElement(S.PoseGroup,null,t&&c&&P.createElement(pe,{key:"background",display:s,onClick:function(){return we(n,o)}}),t&&P.createElement(he,I({},m,{display:s,key:"dialog"}),P.createElement(ge,null,P.createElement(ye,null,P.createElement(be,null,a),P.createElement(xe,{onClick:function(){return we(n,o)}})),P.createElement(ve,null,u),p&&f&&P.createElement(ke,null,p,f))))}var Ge=a(_)({height:"1px",border:0});Ge.defaultProps={as:"hr",backgroundColor:"snow"},Ge.displayName="Divider";function Se(e){var t=e.links,l=e.variant;return P.createElement(te,{flexDirection:"column"},t.map(function(e,t){var n=e.to,r=e.onClick,o=e.title,a={key:t,py:1,colors:function(e){return"light"===e?"mediumGray":"dark"===e?"white":"transparent"===e?"lightGray":null}(l)};if(!n&&r)return P.createElement(ue,I({onClick:r},a),o);if(!n||r)return null;var i=n.includes("http://")||n.includes("https://")?ce:le;return P.createElement(i,I({to:n},a),o)}))}function Pe(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)})}function Ie(e,t){return e?t.filter(function(e){return e.authRequired||!e.hasOwnProperty("unauthRequired")}):t.filter(function(e){return e.unauthRequired||!e.hasOwnProperty("authRequired")})}var Fe,De=a(_)({maxWidth:"100%",height:"auto"},o.height,o.borderRadius);De.defaultProps={as:"img"},De.displayName="Image";var Re=a(_)((h(Fe={width:"100%"},$.media.desktop,{width:960}),h(Fe,$.media.widescreen,{width:1200}),Fe));Re.defaultProps={as:"div",mx:"auto"},Re.displayName="Container";var ze=a(te)({});ze.defaultProps={as:"div",flexWrap:"wrap"},ze.displayName="Row";var Oe=a(_)({});Oe.defaultProps={as:"div",px:2},Oe.displayName="Column";function Be(e){return{position:"absolute",top:15,right:function(e){var t=e.withinInput,n=e.type,r=0;return!t||"select"!==n&&"multiselect"!==n||(r+=38),o.themeGet("space.3")(e)+r}(e)}}var Ae=a(te)(function(e){return b({width:"100%"},function(e){var t=e.variant,n=F(e,["variant"]);return"light"===t?{backgroundColor:o.themeGet("colors.white")(n)}:"dark"===t?{backgroundColor:o.themeGet("colors.black")(n)}:"transparent"===t?{backgroundColor:"transparent"}:null}(e))}),Ne=a(_)(function(e){return{transition:"opacity ".concat(o.themeGet("animations.fast")(e)," ease-in-out")}},o.opacity),Te=$.widths[1],We=$.space[2],He=a(_)(function(e){return e.withinInput?Be(e):{position:"relative"}});He.displayName="TooltipContainer";var Me=a(_)(function(e){return{width:"".concat(Te,"px"),height:"".concat(Te,"px"),textAlign:"center",lineHeight:"".concat(Te,"px"),borderRadius:o.themeGet("radii.round")(e),backgroundColor:e.showing?o.themeGet("colors.darkGray")(e):o.themeGet("colors.mediumGray")(e),color:o.themeGet("colors.white")(e),fontSize:o.themeGet("fontSizes.1")(e),fontWeight:o.themeGet("fontWeights.extraBold")(e),userSelect:"none",cursor:"pointer",transition:"background ".concat(o.themeGet("animations.fast")(e)," ease-in-out"),"&:hover":{backgroundColor:o.themeGet("colors.darkGray")(e)}}});Me.displayName="TooltipIcon";function je(e,t,n){var r;function o(n,t){return Object.keys(n).filter(function(e){return t?!a.includes(e):a.includes(e)}).reduce(function(e,t){return b({},e,h({},t,n[t]))},{})}"top"===e&&(r={top:"0%",left:"50%",transform:"translateX(-50%) translateY(-100%)",marginTop:-t}),"top-right"===e&&(r={top:"0%",left:"100%",transform:"translateY(-100%)",marginTop:-t,marginLeft:t,borderBottomLeftRadius:0}),"right"===e&&(r={top:"50%",left:"100%",transform:"translateY(-50%)",marginLeft:t}),"bottom-right"===e&&(r={top:"100%",left:"100%",transform:"none",marginTop:t,marginLeft:t,borderTopLeftRadius:0}),"bottom"===e&&(r={top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:t}),"bottom-left"===e&&(r={top:"100%",left:"0%",transform:"translateX(-100%)",marginTop:t,marginLeft:-t,borderTopRightRadius:0}),"left"===e&&(r={top:"50%",left:"0%",transform:"translateX(-100%) translateY(-50%)",marginLeft:-t}),"top-left"===e&&(r={top:"0%",left:"0%",transform:"translateX(-100%) translateY(-100%)",marginTop:-t,marginLeft:-t,borderBottomRightRadius:0});var a=["marginTop","marginRight","marginBottom","marginLeft"];return n?o(r):o(r,!0)}var Le={transition:{duration:parseInt($.animations.fast),ease:"easeInOut"}},Ve=a(i(_)(function(e){return function(e){return{enter:b({opacity:1},je(e,We,!0),Le),exit:b({opacity:0},Le)}}(e.position)}))(function(e){return b({position:"absolute",backgroundColor:o.themeGet("colors.blacks.4")(e),color:o.themeGet("colors.white")(e),textAlign:"center",borderRadius:o.themeGet("radii.normal")(e),padding:"".concat(o.themeGet("space.2")(e),"px ").concat(o.themeGet("space.3")(e),"px"),width:240,boxShadow:o.themeGet("shadows.normal")(e),userSelect:"none",zIndex:o.themeGet("zIndicies.tooltip")(e)},je(e.position,We))});Ve.defaultProps={position:"top"},Ve.displayName="Tooltip";function qe(e){var t=e.tooltip,n=e.position,r=e.withinInput,o=e.type,a=F(e,["tooltip","position","withinInput","type"]),i=D(G.useState(!1),2),l=i[0],c=i[1];return r&&(n="top-left"),P.createElement(He,I({withinInput:r,type:o},a),P.createElement(Me,{onClick:function(){return c(!l)},showing:l},"?"),P.createElement(S.PoseGroup,null,l&&P.createElement(Ve,{key:"tooltip",position:n},t)))}function Ye(e){return P.createElement(Xe,e,"*")}var Ue=function(e){var t=e.tooltip,n=e.type,r=0;return t&&(r+=o.themeGet("space.3")(e)+Te),"select"!==n&&"multiselect"!==n||(r+=38),o.themeGet("space.3")(e)+r},Xe=a(re)(function(e){return b({},function(e){return e.withinInput?{position:"absolute",top:"20px",right:Ue(e)}:{marginRight:o.themeGet("space.3")(e)}}(e),{height:"".concat(14,"px"),width:"".concat(14,"px"),lineHeight:"0.85",fontWeight:o.themeGet("fontWeights.extraBold")(e),color:o.themeGet("colors.error")(e),fontSize:o.themeGet("fontSizes.5")(e),userSelect:"none"})}),$e=a(_)(function(e){return b({},function(e){return{position:"absolute",top:"100%",left:0,marginTop:"paragraph"===e?-5:-1}}(e.type),{zIndex:o.themeGet("zIndicies.messages")(e),width:"100%",overflow:"hidden",borderBottomLeftRadius:o.themeGet("radii.normal")(e),borderBottomRightRadius:o.themeGet("radii.normal")(e)})});$e.displayName="MessagesContainer";var _e=a(_)(function(e){return{background:o.themeGet("colors.".concat(e.type,"100"))(e),color:o.themeGet("colors.".concat(e.type,"700"))(e),fontSize:o.themeGet("fontSizes.1")(e)}});_e.defaultProps={px:3,py:2},_e.displayName="Message";function Qe(e){return e&&0<e.length}function Je(e,t){var n=e.errors,r=e.warnings,o=1<arguments.length&&void 0!==t?t:nt,a=[];return Qe(n)&&n.map(function(e,t){a.push(P.createElement(o,{key:"error-".concat(t),i:t,type:"error"},e))}),Qe(r)&&r.map(function(e,t){a.push(P.createElement(o,{key:"warning-".concat(t),i:t,type:"warning"},e))}),a}function Ke(e){var t=e.messages,n=e.type;return P.createElement($e,{type:n},P.createElement(S.PoseGroup,null,Je(t)))}function Ze(e){var t=e.messages;return P.createElement(P.Fragment,null,Je(t,rt))}function et(e,t,n){var r=0;return e&&(r+=14+n),t&&(r+=Te+n),n+r}function tt(e){return{transition:"border ".concat(o.themeGet("animations.fast")(e)," ease-in-out"),borderRadius:function(e){return e.messages&&(Qe(e.messages.warnings)||Qe(e.messages.errors))?"".concat(o.themeGet("radii.normal")(e),"px ").concat(o.themeGet("radii.normal")(e),"px 0px 0px"):o.themeGet("radii.normal")(e)}(e),border:"1px solid ".concat(o.themeGet("colors.snow")(e)),"&:focus":{border:"1px solid ".concat(o.themeGet("colors.primary")(e))}}}var nt=i(_e)({enter:{y:0,opacity:1,delay:function(e){return 100*e.i}},exit:{y:-30,opacity:0}}),rt=a(re)(function(e){return{display:"block",marginTop:o.themeGet("space.2")(e),marginBottom:o.themeGet("space.2")(e),color:o.themeGet("colors.".concat(e.type))(e),fontSize:o.themeGet("fontSizes.1")(e)}}),ot=a(_)(function(e){return b({padding:o.themeGet("space.3")(e),paddingRight:et(e.required,e.tooltip,o.themeGet("space.3")(e)),width:"100%"},tt(e))});ot.defaultProps=b({},_.defaultProps,{as:"input",bg:"trueWhite"}),ot.displayName="Input";var at=a(ot)({resize:"vertical"},o.height);at.defaultProps=b({},_.defaultProps,ot.defaultProps,{as:"textarea",height:90,lineHeight:"title"}),at.displayName="Textarea";var it=a(_)({position:"relative"});it.defaultProps=b({},_.defaultProps,{mb:3}),it.displayName="InputContainer";var lt={selected:{scale:.8,opacity:1,transition:{duration:parseInt($.animations.fast)}},unselected:{scale:0,opacity:0}},ct=a(te)({cursor:"pointer",alignItems:"center"});ct.defaultProps={mb:2};function st(e){var t=e.mb,n=e.ml,r=e.partOfGroup,o=e.handleClick,a=F(e,["mb","ml","partOfGroup","handleClick"]);if(!a.label)return null;var i="string"==typeof a.label,l={onClick:o};return r||(l.pr=3),P.createElement(te,{alignItems:"center",mb:t,ml:n},i&&P.createElement(re,l,a.label),!i&&P.cloneElement(a.label,l),a.required&&P.createElement(Ye,a),a.tooltip&&P.createElement(qe,I({},a,{position:"top-left"})))}function ut(e){var t=e.initialValue,n=void 0!==t&&t,r=e.isRadio,o=e.value,a=e.currentOption,i=e.groupOnChange,l=e.onChange,c=e.onBlur,s=F(e,["initialValue","isRadio","value","currentOption","groupOnChange","onChange","onBlur"]),u=D(G.useState(n),2),m=u[0],d=u[1];function p(){if(c&&c(),!r||r&&!0!==m){var e=!m;d(e),!r&&l&&l(e),i&&o&&i(h({},o,e))}}r&&null!==a&&a!==o&&!1!==m&&d(!1);var f=r?P.createElement(Ut,{pose:m?"selected":"unselected"}):P.createElement(Yt,{pose:m?"selected":"unselected",icon:g.FaCheck,size:0,m:"2px",color:"primary"});return P.createElement(ct,null,P.createElement(qt,{isRadio:r,onClick:p},f),P.createElement(st,I({ml:3,partOfGroup:!!i,handleClick:p},s)))}function mt(e){function n(e){i&&i();var t=Object.keys(e)[0],n=e[t];if(o)!0===n&&(u(t),a&&a(t));else{var r=Array.isArray(s)?s:[];!0===n?r.push(t):r=r.filter(function(e){return e!==t}),u(r),a&&a(r)}}var o=e.isRadio,t=e.options,a=e.onChange,i=e.onBlur,r=e.initialValue,l=F(e,["isRadio","options","onChange","onBlur","initialValue"]),c=D(G.useState(r),2),s=c[0],u=c[1];return P.createElement(P.Fragment,null,P.createElement(st,I({mb:3},l)),t.map(function(e,t){return P.createElement(ut,I({key:t},e,{initialValue:r&&r.includes(e.value),isRadio:o,currentOption:s,groupOnChange:n}))}))}function dt(e){var t=e.onChange,n=F(e,["onChange"]);return P.createElement(ot,I({},n,{as:r,options:{numeral:!0,numeralThousandsGroupStyle:"thousand",numeralPositiveOnly:!0,prefix:"$",noImmediatePrefix:!0,rawValueTrimPrefix:!0},onChange:function(e){"function"==typeof t&&t(e.target.rawValue)}}))}function pt(e){var t=e.hasYear,n=F(e,["hasYear"]);return P.createElement(ot,I({},n,{as:r,options:{date:!0,delimiter:"-",datePattern:t?["m","d","Y"]:["m","d"]}}))}function ft(e){var t=e.onChange,n=F(e,["onChange"]);return P.createElement(ot,I({},n,{as:r,options:{numericOnly:!0,blocks:[0,3,0,3,4],delimiters:["(",")"," ","-"]},onChange:function(e){"function"==typeof t&&t(e.target.rawValue)}}))}function ht(e){return b({},e,{colors:b({},e.colors,{primary:$.colors.primary,primary75:$.colors.primary,primary50:$.colors.primary300,primary25:$.colors.primary100,danger:$.colors.error,dangerLight:$.colors.error100})})}function gt(e){var t=e.value,n=e.initialValue,r=F(e,["value","initialValue"]),o={};if(t||n){var a=a||n;if(Array.isArray(a)){var i=[];a.forEach(function(t){i.push(r.options.find(function(e){return e.value===t}))}),o.defaultValue=i}else o.defaultValue=r.options.find(function(e){return e.value===a})||""}return b({isClearable:!1,styles:Xt,theme:ht},o,r)}function yt(e){return P.createElement(n,gt(e))}function bt(e){return P.createElement(n,I({},gt(e),{isMulti:!0}))}function vt(e){var t=e.onChange,n=F(e,["onChange"]);return P.createElement(ot,I({},n,{as:r,options:{blocks:[3,2,4],delimiter:"-",numericOnly:!0},onChange:function(e){"function"==typeof t&&t(e.target.rawValue)}}))}function kt(e){var t=e.initialValue,n=void 0!==t&&t,r=e.on,o=e.off,a=e.onChange,i=e.onBlur,l=F(e,["initialValue","on","off","onChange","onBlur"]),c=D(G.useState(n),2),s=c[0],u=c[1];return P.createElement(te,{alignItems:"center"},o&&P.createElement(re,{mr:2},o),P.createElement(_t,{selected:s,onClick:function(){var e=!s;u(e),a&&a(e),i&&i()}},P.createElement(Qt,{selected:s})),r&&P.createElement(re,{ml:2},r),l.tooltip&&P.createElement(qe,I({},l,{ml:3,position:"top-left"})))}function Et(e){var t,n=e.type,r=e.onChange,o=F(e,["type","onChange"]),a=Object.assign({},o);return a.onChange=function(e){return function(t,n){return function(e){if(e)return e("currency"===n||"ssn"===n||"phone"===n?t:"select"===n?t.value:"multiselect"===n?t.map(function(e){return e.value}):t.target.value)}}(e,n)(r)},"text"===n||"email"===n||"password"===n?t=P.createElement(ot,I({},a,{type:n})):"paragraph"===n?t=P.createElement(at,a):"phone"===n?t=P.createElement(ft,a):"ssn"===n?t=P.createElement(vt,a):"currency"===n?t=P.createElement(dt,a):"date"===n?t=P.createElement(pt,a):"select"===n?t=P.createElement(yt,a):"multiselect"===n&&(t=P.createElement(bt,a)),P.createElement(it,null,t,o.required&&P.createElement(Ye,I({},o,{type:n,withinInput:!0})),o.tooltip&&P.createElement(qe,I({},o,{type:n,withinInput:!0})),o.messages&&P.createElement(Ke,I({},o,{type:n})))}function xt(e){var t,n=e.type,r=F(e,["type"]);return"checkbox"===n?t=P.createElement(ut,r):"checkboxes"===n?t=P.createElement(mt,r):"radios"===n?t=P.createElement(mt,I({},r,{isRadio:!0})):"switch"===n&&(t=P.createElement(kt,r)),P.createElement(it,null,t,r.messages&&P.createElement(Ze,r))}function wt(e){return P.createElement(Et,I({type:"text"},e))}function Ct(e){return P.createElement(Et,I({type:"email"},e))}function Gt(e){return P.createElement(Et,I({type:"password"},e))}function St(e){return P.createElement(xt,I({type:"checkbox"},e))}function Pt(e){return P.createElement(xt,I({type:"checkboxes"},e))}function It(e){return P.createElement(xt,I({type:"radios"},e))}function Ft(e){return P.createElement(xt,I({type:"switch"},e))}function Dt(e){return P.createElement(Et,I({type:"phone"},e))}function Rt(e){var t=e.hidden,n=F(e,["hidden"]);return t?P.createElement($t,null,"SSN: ",n.value):P.createElement(Et,I({type:"ssn"},n))}function zt(e){return P.createElement(Et,I({type:"currency"},e))}function Ot(e){return P.createElement(Et,I({type:"paragraph"},e))}function Bt(e){return P.createElement(Et,I({type:"select"},e))}function At(e){return P.createElement(Et,I({type:"multiselect"},e))}function Nt(e){return P.createElement(Et,I({type:"date"},e))}function Tt(e){var r={};return e.forEach(function(e){var t=e.name,n=e.initialValue;r[t]=n||""}),r}function Wt(e,t){var n=e.type,r=e.name,o=e.width,l=e.fields,a=e.button,i=F(e,["type","name","width","fields","button"]),c="array"===n&&l,s=t.errors,u=t.touched,m=t.setFieldValue,d=t.setFieldTouched,p=t.values;if(P.isValidElement(n))return P.cloneElement(n,b({},n.props,{key:Pe(),formikProps:t}));function f(e){return y.getIn(u,e)&&y.getIn(s,e)?{warnings:[],errors:[y.getIn(s,e)]}:null}function h(e,t,n){return P.createElement(function(e){return"text"===e?wt:"email"===e?Ct:"password"===e?Gt:"checkbox"===e?St:"checkboxes"===e?Pt:"radio"===e?It:"switch"===e?Ft:"phone"===e?Dt:"ssn"===e?Rt:"currency"===e?zt:"paragraph"===e?Ot:"select"===e?Bt:"multiselect"===e?At:"date"===e?Nt:null}(e),function(t,e){var n=e.validation;return b({},F(e,["validation"]),{name:t,value:y.getIn(p,t),required:n&&n.required,messages:f(t),onChange:function(e){return m(t,e)},onBlur:function(){return d(t,!0)}})}(t,n))}return P.createElement(Oe,{key:r,width:o},c&&P.createElement(y.FieldArray,{name:r,render:function(e){return function(t,i,n){var e=f(i),r=e&&(0<e.errors.length&&!Array.isArray(e.errors[0])||0<e.warnings.length&&!Array.isArray(e.warnings[0]));return P.createElement(P.Fragment,null,r&&P.createElement(Ze,{messages:e}),t.map(function(e,a){return P.createElement(Jt,{key:a,ml:-2,mr:1<t.length?4:-2},l.map(function(e){var t=e.width,n=e.type,r=e.name,o=F(e,["width","type","name"]);return P.createElement(Oe,{key:r,width:t},h(n,"".concat(i,"[").concat(a,"].").concat(r),o))}),1<t.length&&P.createElement(Kt,{icon:g.FaTrash,size:0,onClick:function(){return n.remove(a)}}))}),P.createElement(K,{type:"button",variant:"secondary",onClick:function(){return n.push(Tt(l))}},a))}(p[r],r,e)}}),!c&&h(n,r,i))}function Ht(e){function a(e,t){var n=e.type,r=e.validation,o=F(e,["type","validation"]),a=1<arguments.length&&void 0!==t?t:"",i=r||!1,l=i.required,c=i.min,s=i.max,u=i.reference,m=i.length;return"checkbox"===n||"switch"===n?(a=d.boolean(),l&&(a=a.oneOf([!0],"checkbox"===n?mn:dn))):("checkboxes"===n||"multiselect"===n?a=d.array():"array"!==n&&(a=d.string()),l&&(a=a.required(Zt)),c&&(a=a.min(c,tn(c))),s&&(a=a.max(s,nn(s))),u&&(a=a.oneOf([d.ref(u)],en)),m&&(a=a.min(m,rn(m))),"select"===n&&(a=a.oneOf(o.options.map(function(e){return e.value}),on)),"multiselect"===n&&(a=a.test("contains-valid-options",on,function(t){return t?o.options.map(function(e){return e.value}).filter(function(e){return-1<t.indexOf(e)}).length===t.length:null})),"email"===n&&(a=a.email(an)),"currency"===n&&(a=a.matches(/^[+-]?[0-9]{1,3}(?:,?[0-9]{3})*\.[0-9]{2}$/,{message:ln,excludeEmptyString:!l})),"date"===n&&(a=o.hasYear?a.matches(/^[0-9]{2}\-?[0-9]{2}\-?[0-9]{4}$/,{message:cn,excludeEmptyString:!l}):a.matches(/^[0-9]{2}\-?[0-9]{2}$/,{message:cn,excludeEmptyString:!l})),"ssn"===n&&(a=a.matches(/^[0-9]{3}\-?[0-9]{2}\-?[0-9]{4}$/,{message:sn,excludeEmptyString:!l})),"phone"===n&&(a=a.matches(/^\+?[0-9]{10}$/,{message:un,excludeEmptyString:!l}))),a}var i={};return e.forEach(function(e){e.page.forEach(function(e){var t=e.fields,n=e.name,r=F(e,["fields","name"]);if("array"===r.type&&t){var o={};t.forEach(function(e){o[e.name]=a(e)}),i[n]=a(r,d.array().of(d.object().shape(o)))}else"divider"!==r.type&&"heading"!==r.type&&(i[n]=a(r))})}),d.object().shape(i)}function Mt(e){var n,c=e.steps,t=e.onChange,r=e.currentPage,o=F(e,["steps","onChange","currentPage"]),a=D(G.useState(void 0!==r?r:(n=0,c.forEach(function(e,t){e.complete&&t+1<c.length&&(n=t+1)}),n)),2),s=a[0],u=a[1];return G.useEffect(function(){u(r)},[r]),G.useEffect(function(){t&&"function"==typeof t&&t(s)},[s]),P.createElement(te,I({},o,{flexDirection:["column",null,"row"]}),c.map(function(e,t){var n=e.complete,r=e.title,o=e.description,a=0===t||c[t-1].complete,i=t===s,l={color:i||n?"darkGray":"lightGray",pl:[3,null,0],py:[2,null,0],mr:3,mb:0,borderLeft:[function(e,t){var n="".concat($.space[1],"px solid");return e?"".concat(n," ").concat($.colors.primary700):t?"".concat(n," ").concat($.colors.primary):"".concat(n," ").concat($.colors.lightGray)}(i,n),null,0]};return P.createElement(te,{key:t,flexDirection:["row",null,"column"],justifyContent:"space-between",alignItems:["center",null,"flex-start"],onClick:a?function(){return u(t)}:null,style:{cursor:a?"pointer":"default"}},P.createElement(pn,{display:["none",null,"flex"],alignItems:"center",mb:3},P.createElement(fn,{selectable:a||n,justifyContent:"center",alignItems:"center"},n&&P.createElement(de,{icon:g.FaCheck,color:"success",size:0}),!n&&P.createElement(re,{color:"white",fontWeight:"extraBold"},t+1)),P.createElement(hn,null)),P.createElement(gn,I({},l,{display:["block",null,"none"]}),t+1,". ",r),P.createElement(gn,I({},l,{display:["none",null,"block"]}),r),P.createElement(oe,{display:["none",null,"block"],color:"mediumGray",lineHeight:"title",mt:2,mr:3,mb:0},o),n&&P.createElement(de,{display:["block",null,"none"],icon:g.FaCheck,color:"success"}))}))}function jt(e){function t(e){var t="submit"===e?{type:"submit",variant:"primary",mb:0}:{type:"button",variant:"secondary",mb:0};return s&&(u||m)?"previous"===e?(t.width=["100%","50%"],t.borderRadius=["normal","0px 0px 0px ".concat($.radii.normal,"px")],t.mb=[2,0]):"next"!==e&&"submit"!==e||(t.width=["100%","50%"],t.borderRadius=["normal","0px 0px ".concat($.radii.normal,"px 0px")]):(t.width="100%",t.borderRadius=["normal","0px 0px ".concat($.radii.normal,"px ").concat($.radii.normal,"px")]),t}var n=e.children,r=e.index,o=e.forms,a=e.currentPage,i=e.setCurrentPage,l=e.submitDisabled,c=e.submitButton,s=0<=a-1,u=a+1<o.length,m=a+1===o.length;return P.createElement(ee,{variant:"wizard",style:{display:a===r?"block":"none"}},P.createElement(_,{p:[0,null,3],pb:0},n),P.createElement(te,{mt:3,flexWrap:"wrap"},s&&P.createElement(K,I({},t("previous"),{disabled:!o[a-1],onClick:function(){return i(a-1)}}),"Previous"),u&&P.createElement(K,I({},t("next"),{disabled:!o[a],onClick:function(){return i(a+1)}}),"Next"),m&&P.createElement(K,I({},t("submit"),{disabled:l}),c)))}function Lt(e){var t=e.children,n=e.formikProps,r=F(e,["children","formikProps"]);return P.createElement(Oe,I({width:1},r),"function"==typeof t?t(n):t)}var Vt,qt=a(_)(function(e){return{width:o.themeGet("widths.1")(e),height:o.themeGet("heights.1")(e),backgroundColor:o.themeGet("colors.trueWhite")(e),border:"1px solid ".concat(o.themeGet("colors.snow")(e)),borderRadius:e.isRadio?o.themeGet("radii.round")(e):o.themeGet("radii.normal")(e)}}),Yt=i(de)(lt),Ut=i(a(_)(function(e){return{width:.5*o.themeGet("widths.1")(e),height:.5*o.themeGet("heights.1")(e),borderRadius:o.themeGet("radii.round")(e),margin:5,backgroundColor:o.themeGet("colors.primary")(e)}}))(lt),Xt={control:function(e,t){return b({},e,{marginBottom:$.space[3],boxShadow:"none",borderRadius:function(e){return e.messages&&(Qe(e.messages.warnings)||Qe(e.messages.errors))}(t.selectProps)?"".concat($.radii.normal,"px ").concat($.radii.normal,"px 0px 0px"):$.radii.normal,borderColor:$.colors.snow,borderWidth:t.selectProps.borderless?"0px":"1px","&:hover":{borderColor:$.colors.snow}})},indicatorSeparator:function(e,t){return b({},e,{width:t.selectProps.borderless?"0px":"1px"})},valueContainer:function(e,t){return b({},e,{padding:t.isMulti&&t.hasValue?$.space[3]-3:$.space[3],paddingRight:et(t.selectProps.required,t.selectProps.tooltip,$.space[3])})},singleValue:function(e){return b({},e,{color:$.colors.black})},input:function(e){return b({},e,{margin:0,paddingTop:0,paddingBottom:0})}},$t=a(re)(function(e){return{fontWeight:o.themeGet("fontWeights.bold")(e),userSelect:"none",display:"block",padding:"".concat(o.themeGet("space.3")(e),"px 0px")}}),_t=a(_)(function(e){return{position:"relative",width:2*o.themeGet("widths.1")(e)+12,height:o.themeGet("heights.1")(e)+6+2,background:e.selected?o.themeGet("colors.primary")(e):o.themeGet("colors.trueWhite")(e),border:e.selected?"1px solid ".concat(o.themeGet("colors.primary")(e)):"1px solid ".concat(o.themeGet("colors.snow")(e)),borderRadius:o.themeGet("radii.round")(e),cursor:"pointer",transition:"background ".concat(o.themeGet("animations.fast")(e)," ease-in-out, border ").concat(o.themeGet("animations.fast")(e)," ease-in-out")}}),Qt=a(_)(function(e){return{position:"absolute",top:0,left:e.selected?"50%":"0%",margin:3,width:o.themeGet("widths.1")(e),height:o.themeGet("heights.1")(e),background:e.selected?o.themeGet("colors.white")(e):o.themeGet("colors.lightGray")(e),borderRadius:o.themeGet("radii.round")(e),transition:"left ".concat(o.themeGet("animations.fast")(e)," ease-in-out, background ").concat(o.themeGet("animations.fast")(e)," ease-in-out")}}),Jt=a(ze)({position:"relative"}),Kt=a(de)(function(e){return{position:"absolute",right:-o.themeGet("space.4")(e),top:"".concat(o.themeGet("space.3")(e)+1,"px"),cursor:"pointer","& > svg":{color:o.themeGet("colors.lightGray")(e),transition:"color ".concat(o.themeGet("animations.fast")(e)," ease-in-out")},"&:hover > svg":{color:o.themeGet("colors.mediumGray")(e)}}}),Zt="This field is required",en="This should match the previous field",tn=function(e){return"Must be at least ".concat(e," characters")},nn=function(e){return"Must be shorter than ".concat(e," characters")},rn=function(e){return"Must have at least ".concat(e," items")},on="Must be a valid value",an="Must be a valid email address",ln="Must be a valid amount of money",cn="Must be a valid date",sn="Must be a valid social security number",un="Must be a valid phone number",mn="You must check this box",dn="You must switch this on",pn=a(te)({width:"100%"}),fn=a(te)(function(e){return{width:o.themeGet("widths.3")(e),height:o.themeGet("heights.3")(e),borderRadius:o.themeGet("radii.round")(e),backgroundColor:e.selectable?o.themeGet("colors.darkGray")(e):o.themeGet("colors.lightGray")(e)}}),hn=a(_)(function(e){return{height:o.themeGet("space.1")(e),margin:o.themeGet("space.2")(e),flex:1,background:o.themeGet("colors.snow")(e)}}),gn=a(ae)(function(e){return{transition:"color ".concat(o.themeGet("animations.fast")(e)," ease-in-out, border ").concat(o.themeGet("animations.fast")(e)," ease-in-out")}},o.borders),yn=a(_)({position:"relative",cursor:"pointer",width:24,height:20}),bn=a(_)(function(e){return b({position:"absolute"},function(e){var t,n,r,o=e.index,a=e.isOpen,i={};return 0===o&&(t=a?10:0),1!==o&&2!==o||(t=8),3===o&&(t=a?10:16),n=0!==o&&3!==o||!a?0:"50%",r=0!==o&&3!==o||!a?"100%":0,1===o&&a&&(i.transform="rotate(45deg)"),2===o&&a&&(i.transform="rotate(-45deg)"),i.top=t,i.left=n,i.width=r,i}(e),{height:4,display:"block",background:o.themeGet("colors.lightGray")(e),borderRadius:o.themeGet("radii.round")(e),transition:"all ".concat(o.themeGet("animations.fast")(e)," ease-in-out")})});bn.defaultProps=b({},_.defaultProps,{as:"span"}),bn.displayName="HamburgerPatty";function vn(e){var n=e.isOpen,t=e.onClick;return P.createElement(yn,{onClick:t,display:["block",null,"none"]},R(Array(4)).map(function(e,t){return P.createElement(bn,{key:t,isOpen:n,index:t})}))}function kn(e){var t=e.links,u=e.toggleMobileMenu,m=e.current,n=e.isMobile,r=e.isUserMenu,d=void 0!==r&&r,p=e.variant;return P.createElement(te,{flexDirection:d?"column":["column",null,"row"],alignItems:d?"flex-end":"center",display:n?["flex",null,"none"]:["none",null,"flex"]},t.map(function(e,t){var n=e.to,r=e.onClick,o=e.title,a=e.button,i=P.createElement(wn,{variant:n&&n===m?"current":p,mr:d?0:[0,null,2]},o),l={my:2,variant:"dark"===p?"secondary":"primary",key:t};if(!n&&r)return a?P.createElement(K,I({onClick:function(){u(!1),r()}},l),o):P.createElement(ue,{onClick:function(){u(!1),r()},key:t},i);if(!n||r)return null;var c=n.includes("http://")||n.includes("https://");if(a)return c?P.createElement(K,I({href:n,onClick:function(){return u(!1)},as:"a"},l,se),o):P.createElement(K,I({to:n,onClick:function(){return u(!1)},as:f.Link},l),o);var s=c?ce:le;return P.createElement(s,{to:n,onClick:function(){return u(!1)},key:t},i)}))}function En(e){var t=e.variant,n=F(e,["variant"]);return"light"===t?{backgroundColor:o.themeGet("colors.white")(n)}:"dark"===t?{backgroundColor:o.themeGet("colors.black")(n)}:"transparent"===t?{backgroundColor:"transparent"}:null}function xn(e,t){var n="".concat(t?$.space[3]:$.space[2],"px solid");return"info"===e?"".concat(n," ").concat($.colors.darkGray):"primary"===e?"".concat(n," ").concat($.colors.primary):"success"===e?"".concat(n," ").concat($.colors.success):"warning"===e?"".concat(n," ").concat($.colors.warning):"error"===e?"".concat(n," ").concat($.colors.error):void 0}var wn=a(ae)(function(e){return b({marginBottom:0,padding:o.themeGet("space.2")(e),transition:"color ".concat(o.themeGet("animations.fast")(e)," ease-in-out")},function(e){var t=e.variant,n=F(e,["variant"]);return"light"===t?{color:o.themeGet("colors.mediumGray")(n),"&:hover":{color:o.themeGet("colors.darkGray")(n)}}:"dark"===t?{color:o.themeGet("colors.mediumGray")(n),"&:hover":{color:o.themeGet("colors.snow")(n)}}:"transparent"===t?{color:o.themeGet("colors.lightGray")(n),"&:hover":{color:o.themeGet("colors.darkGray")(n)}}:"current"===t?{color:o.themeGet("colors.primary")(n)}:null}(e))}),Cn=a(te)(function(e){return b({position:e.position,top:0,left:0,width:"100%",zIndex:o.themeGet("zIndicies.header")(e)},En(e))},o.height),Gn=i(a(_)(function(e){return b({position:"absolute",padding:o.themeGet("space.2")(e),paddingLeft:o.themeGet("space.3")(e)},En(e))},o.top))({enter:{opacity:1,right:0},exit:{opacity:0,right:-100}}),Sn=a(ae)(function(e){return{transition:"color ".concat(o.themeGet("animations.fast")(e)," ease-in-out, border ").concat(o.themeGet("animations.fast")(e)," ease-in-out")}},o.borders),Pn=P.forwardRef(function(e,t){return P.createElement(Sn,I({},e,{ref:t}))}),In=a(_)({height:"2px"}),Fn=a(_)(function(e){return{height:"2px",transition:"width ".concat(o.themeGet("animations.fast")(e)," ease-in-out, margin ").concat(o.themeGet("animations.fast")(e)," ease-in-out")}}),Dn="".concat($.space[1],"px solid"),Rn=a(ee)({fontStyle:"italic"});Rn.defaultProps=b({},ee.defaultProps,{as:"div",variant:"note",padding:3,lineHeight:"title"}),Rn.displayName="Note";function zn(e){return"success"===e?{backgroundColor:$.colors.success300,color:$.colors.success700}:"warning"===e?{backgroundColor:$.colors.warning300,color:$.colors.warning700}:"error"===e?{backgroundColor:$.colors.error300,color:$.colors.error700}:"info"===e?{backgroundColor:$.colors.primary300,color:$.colors.primary700}:{backgroundColor:$.colors.lightGray,color:$.colors.darkGray}}var On=P.createContext(),Bn=On.Consumer,An=a(te)(function(e){return b({position:"fixed",zIndex:o.themeGet("zIndicies.notifications")(e)},function(e){return{"top-left":{top:0,left:0},top:{top:0,left:"50%",transform:"translate(-50%)"},"top-right":{top:0,right:0},"bottom-right":{bottom:0,right:0},bottom:{bottom:0,left:"50%",transform:"translate(-50%)"},"bottom-left":{bottom:0,left:0}}[e]}(e.position),{flexDirection:e.position.includes("bottom")?"column-reverse":"column",padding:o.themeGet("space.2")(e)})});An.defaultProps=b({},te.defaultProps,{width:["100%","300px"]});function Nn(e){return P.createElement(Hn,e,P.createElement(de,{icon:g.FaTimes,size:0,color:zn(e.type).color}))}var Tn=i(a(te)(function(e){return b({alignItems:"center",justifyContent:"space-between"},function(e){return"success"===e?{backgroundColor:$.colors.success100,color:$.colors.success700}:"warning"===e?{backgroundColor:$.colors.warning100,color:$.colors.warning700}:"error"===e?{backgroundColor:$.colors.error100,color:$.colors.error700}:"info"===e?{backgroundColor:$.colors.primary100,color:$.colors.primary700}:{backgroundColor:$.colors.snow,color:$.colors.darkGray}}(e.type),{borderRadius:o.themeGet("radii.normal")(e),width:"100%",userSelect:"none",padding:o.themeGet("space.2")(e),margin:e.position.includes("bottom")?"".concat(o.themeGet("space.1")(e),"px 0 0 0"):"0 0 ".concat(o.themeGet("space.1")(e),"px 0")})}))({enter:{opacity:1},exit:{opacity:0},transition:{duration:parseInt($.animations.fast),ease:"easeInOut"}}),Wn=a(re)({flex:1}),Hn=a(te)(function(e){return{backgroundColor:zn(e.type).backgroundColor,marginLeft:o.themeGet("space.2")(e),borderRadius:o.themeGet("radii.round")(e),width:o.themeGet("widths.1")(e),height:o.themeGet("heights.1")(e),cursor:"pointer",justifyContent:"center",alignItems:"center"}}),Mn=a(_)(function(e){return{width:o.themeGet("widths.2")(e),height:o.themeGet("heights.2")(e),lineHeight:"".concat(o.themeGet("heights.2")(e),"px"),textAlign:"center",backgroundColor:e.selected?o.themeGet("colors.primary")(e):o.themeGet("colors.transparent")(e),color:e.selected?o.themeGet("colors.white")(e):o.themeGet("colors.black")(e),borderRadius:o.themeGet("radii.normal")(e),marginRight:o.themeGet("space.1")(e),fontWeight:o.themeGet("fontWeights.bold")(e),userSelect:"none",cursor:e.selected?"default":"pointer","&:last-child":{marginRight:0}}});Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return t.ThemeProvider}}),e.Avatar=J,e.Box=_,e.Button=K,e.CappedText=ae,e.Card=ee,e.CheckboxInput=St,e.CheckboxInputs=Pt,e.Column=Oe,e.Container=Re,e.CurrencyInput=zt,e.DateInput=Nt,e.Dialog=Ce,e.Divider=Ge,e.EmailInput=Ct,e.ExternalLink=ce,e.Flex=te,e.Footer=function(e){var t=e.logo,n=e.address,r=e.madeIn,o=e.copyright,a=e.links,i=e.user,l=e.variant,c=void 0===l?"dark":l,s=F(e,["logo","address","madeIn","copyright","links","user","variant"]),u=D(G.useState(!1),2),m=u[0],d=u[1],p=!!i,f=a.map(function(e){return b({},e,{links:Ie(p,e.links)})});return P.createElement(Ae,I({},s,{variant:c,py:[3,null,5]}),P.createElement(Re,null,P.createElement(ze,{mx:[3,null,0]},P.createElement(Oe,{width:[1,null,1/3],mb:[4,null,0]},P.createElement(De,{src:t,height:48,mb:2}),n.map(function(e,t){return P.createElement(oe,{color:"mediumGray",mb:0,key:t},e)})),P.createElement(Oe,{width:[1,null,2/3]},P.createElement(te,{flexDirection:["column",null,"row"],justifyContent:"space-between"},0<f.length&&f.map(function(e,t){var n=e.title,r=e.links;return 0<r.length&&P.createElement(Ne,{key:t,mb:3,width:[1,null,"".concat(100/f.length,"%")],opacity:m&&m!==n?$.opacities[1]:1,onMouseEnter:function(){return d(n)},onMouseLeave:function(){return d(!1)}},P.createElement(ae,{color:"mediumGray"},n),P.createElement(Se,{variant:c,links:r}))}))),P.createElement(Oe,{width:1,mt:[3,null,5]},r&&P.createElement(oe,{mb:2,textAlign:["left",null,"center"],color:"dark"===c?"white":"mediumGray"},r),o&&P.createElement(oe,{mb:0,textAlign:["left",null,"center"],fontSize:1,color:"dark"===c?"mediumGray":"lightGray"},o)))))},e.Form=function(e){var t=e.submit,l=e.button,n=e.forms,r=e.showSteps,o=F(e,["submit","button","forms","showSteps"]),a=function(e){var a={};return e.forEach(function(e){e.page.forEach(function(e){var t=e.type,n=e.name,r=e.fields,o=e.initialValue;"array"===t?a[n]=o||[Tt(r)]:"checkbox"===t||"switch"===t?a[n]=o||!1:"divider"!==t&&"heading"!==t&&(a[n]=o||"")})}),a}(n),i=Ht(n),c=1===n.length,s=n.map(function(e){var t=Ht([e]);return!t||t.isValidSync(a)}),u=s.findIndex(function(e){return!1===e}),m=D(G.useState(-1!==u?u:n.length-1),2),d=m[0],p=m[1];return P.createElement(_,o,P.createElement(y.Formik,{onSubmit:t,initialValues:a,validationSchema:i},function(e){var o=e.isSubmitting,a=e.isValid,i=F(e,["isSubmitting","isValid"]);return P.createElement(y.Form,null,function(e,i,l,c){var s=[];e.forEach(function(e,n){var t=e.title,r=e.description,o=e.page,a=!0;o.forEach(function(e){var t=e.name;(i.hasOwnProperty(t)&&""!==i[t]||!c[n]&&!Object.keys(l).length)&&(a=!1)}),s.push({title:t,description:r,complete:a})}),Vt=s}(n,i.errors,i.touched,s),!c&&r&&P.createElement(Mt,{mb:4,steps:Vt,currentPage:d,onChange:function(e){return p(e)}}),n.map(function(e,t){var n=e.page,r=P.createElement(ze,{key:t,mt:c?3:2},n.map(function(e){return Wt(e,i)}));return c?r:P.createElement(jt,{key:"wizard-page-".concat(t),index:t,forms:Vt.map(function(e){return e.complete}),currentPage:d,setCurrentPage:p,submitDisabled:o||!a,submitButton:l},r)}),c&&P.createElement(ze,null,P.createElement(Oe,{width:1},P.createElement(K,{mt:3,type:"submit",disabled:o||!a},l))))}))},e.FormDescription=function(e){var t=e.title,n=e.description;return P.createElement(Lt,{mb:3},t&&P.createElement(ae,{color:"darkGray",style:{display:"block"}},t),n&&P.createElement(ie,{as:"span",textStyle:"h4",color:"mediumGray",fontWeight:"normal"},n))},e.FormDivider=function(){return P.createElemen