1(this["webpackJsonpone-free-ui"]=this["webpackJsonpone-free-ui"]||[]).push([[69],{1153:function(e,t,a){"use strict";var n=a(381),r=a(623),i=a(396),c=a(109),o=a(8),l=a(1140),s=a(313),d=a(46),b=a(2),j=Object(n.a)((function(e){return{root:{backgroundColor:e.palette.background.main,color:e.palette.text.main,"& .titleText":{fontFamily:"PlusJakartaSans-Bold !important"}}}}));t.a=function(e){var t=Object(s.a)().t,a=j();return Object(b.jsx)(b.Fragment,{children:Object(b.jsx)("div",{className:Object(o.a)(a.root,"flex items-center w-full"),children:Object(b.jsxs)("div",{className:"w-full mt-12",children:[e.linkBack&&Object(b.jsxs)(c.a,{className:"font-bold flex items-center sm:mb-12",component:d.a,role:"button",to:e.linkBack,color:"inherit",children:[Object(b.jsx)(i.a,{className:"mr-4 text-20",children:"arrow_back"}),t(e.titleBack)]}),e.title&&Object(b.jsx)("div",{className:"headline",children:Object(b.jsxs)("div",{className:"flex items-center",children:[e.icon&&Object(b.jsx)(i.a,{className:"text-24 sm:text-32 mr-12",children:e.icon}),Object(b.jsx)(l.a.span,{initial:{scale:.6},animate:{scale:1,transition:{delay:.2}},className:"text-24 sm:text-32 uppercase titleText",children:t(e.title)})]})}),Object(b.jsxs)("div",{className:"my-10",children:[e.button&&!e.buttonHidden&&Object(b.jsx)(r.a,{component:d.a,to:e.link,className:"whitespace-no-wrap mr-20 ",variant:"contained",color:"primary",children:Object(b.jsx)("span",{children:t(e.button)})}),e.refresh&&Object(b.jsx)(r.a,{id:"refresh",className:"ml-2 m-0",variant:"outlined",color:"primary",onClick:e.handleRefresh,children:Object(b.jsx)(i.a,{className:"",children:"refresh"})}),e.isClearFilter&&Object(b.jsxs)(r.a,{id:"clearFilters",className:"ml-2 m-0",variant:"outlined",color:"primary",onClick:function(){var e=window.location.search.includes("tenantType")?"tenantType=".concat(window.location.search.split("tenantType=")[1].split("&")[0]):"";window.location.search=e},children:[Object(b.jsx)(i.a,{children:"filter_alt"})," Clear"]})]})]})})})}},1154:function(e,t,a){"use strict";var n=a(3),r=a(1132),i=a(10),c=a(52),o=a(16),l=a(2);var s=function(e){var t=Object(o.c)(c.f),a=Object(o.c)(c.c),n=Object(o.c)((function(e){return e.auth.user.data})).role;return Object(l.jsx)("div",{className:e.classes.header,children:e.header&&Object(l.jsx)(r.a,{theme:n===i.kd.contractor_company.name?a:t,children:e.header})})},d=a(9),b=a(19),j=a(108),u=a(1144),p=a(1147),f=a(8),h=a(0),m=a.n(h),O=a(233),x=a(59);var v=function(e){var t=Object(x.a)(),a=Object(o.c)(Object(c.e)(t.palette.primary.main)),n=e.classes;return Object(l.jsxs)(l.Fragment,{children:[e.header&&Object(l.jsx)(r.a,{theme:a,children:Object(l.jsx)("div",{className:Object(f.a)(n.sidebarHeader,e.variant),children:e.header})}),e.content&&Object(l.jsx)(O.a,{className:n.sidebarContent,enable:e.innerScroll,children:e.content})]})};function g(e,t){var a=Object(h.useState)(!1),n=Object(b.a)(a,2),r=n[0],i=n[1],c=e.classes;Object(h.useImperativeHandle)(t,(function(){return{toggleSidebar:o}}));var o=function(){i(!r)};return Object(l.jsxs)(l.Fragment,{children:[Object(l.jsx)(u.a,{lgUp:"permanent"===e.variant,children:Object(l.jsx)(p.a,{variant:"temporary",anchor:e.position,open:r,onOpen:function(e){},onClose:function(e){return o()},disableSwipeToOpen:!0,classes:{root:Object(f.a)(c.sidebarWrapper,e.variant),paper:Object(f.a)(c.sidebar,e.variant,"left"===e.position?c.leftSidebar:c.rightSidebar)},ModalProps:{keepMounted:!0},container:e.rootRef.current,BackdropProps:{classes:{root:c.backdrop}},style:{position:"absolute"},children:Object(l.jsx)(v,Object(d.a)({},e))})}),"permanent"===e.variant&&Object(l.jsx)(u.a,{mdDown:!0,children:Object(l.jsx)(j.a,{variant:"permanent",className:Object(f.a)(c.sidebarWrapper,e.variant),open:r,classes:{paper:Object(f.a)(c.sidebar,e.variant,"left"===e.position?c.leftSidebar:c.rightSidebar)},children:Object(l.jsx)(v,Object(d.a)({},e))})})]})}var k=Object(h.forwardRef)(g),w=a(381),y=200,N=Object(w.a)((function(e){var t;return{"@global":{"#fuse-main":{height:function(e){return e.innerScroll&&"100vh"}}},root:{display:"flex",flexDirection:"row",minWidth:0,minHeight:"100%",position:"relative",flex:"1 1 auto",height:"auto",backgroundColor:e.palette.background.main},innerScroll:{height:"100%"},topBg:Object(n.a)({position:"absolute",left:0,right:0,top:0,height:y,pointerEvents:"none",backgroundSize:"200px auto !important",backgroundRepeat:"no-repeat !important",backgroundPosition:"bottom 60px right 10px !important",backgroundColor:"".concat(e.palette.background.main," !important")},e.breakpoints.down("md"),{backgroundImage:"none !important"}),contentWrapper:(t={display:"flex",flexDirection:"column",padding:"0 3.2rem",flex:"1 1 100%",zIndex:2,maxWidth:"100%",minWidth:0,minHeight:0},Object(n.a)(t,e.breakpoints.down("sm"),{padding:"0 1.6rem"}),Object(n.a)(t,e.breakpoints.down("xs"),{padding:"0 0.5rem"}),t),header:{height:136,minHeight:136,maxHeight:136,display:"flex",color:e.palette.primary.contrastText},headerSidebarToggleButton:{color:e.palette.primary.contrastText},contentCard:{display:"flex",flex:"1 1 100%",flexDirection:"column",paddingTop:"20px",backgroundColor:e.palette.background.dark,boxSh
1adow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",minHeight:0,borderRadius:"8px 8px 0 0"},toolbar:{display:"flex",minHeight:64,alignItems:"center",borderBottom:"1px solid ".concat(e.palette.utility.main)},content:{color:e.palette.text.main,flex:"1 1 auto",height:"100%",overflow:"auto","-webkit-overflow-scrolling":"touch"},sidebarWrapper:{position:"absolute",backgroundColor:"transparent",zIndex:5,overflow:"hidden","&.permanent":Object(n.a)({},e.breakpoints.up("lg"),{zIndex:1,position:"relative"})},sidebar:{position:"absolute","&.permanent":Object(n.a)({},e.breakpoints.up("lg"),{backgroundColor:"transparent",position:"relative",border:"none",overflow:"hidden"}),width:240,height:"100%"},leftSidebar:{},rightSidebar:{},sidebarHeader:{height:y,minHeight:y,color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark,"&.permanent":Object(n.a)({},e.breakpoints.up("lg"),{backgroundColor:"transparent"})},sidebarContent:Object(n.a)({display:"flex",flex:"1 1 auto",flexDirection:"column",backgroundColor:e.palette.background.default,color:e.palette.text.primary},e.breakpoints.up("lg"),{overflow:"auto","-webkit-overflow-scrolling":"touch"}),backdrop:{position:"absolute"}}})),S=m.a.forwardRef((function(e,t){var a=Object(h.useRef)(null),n=Object(h.useRef)(null),r=Object(h.useRef)(null),i=N(e),c=e.rightSidebarHeader||e.rightSidebarContent,o=e.leftSidebarHeader||e.leftSidebarContent;return m.a.useImperativeHandle(t,(function(){return{rootRef:r,toggleLeftSidebar:function(){a.current.toggleSidebar()},toggleRightSidebar:function(){n.current.toggleSidebar()}}})),Object(l.jsxs)("div",{className:Object(f.a)(i.root,e.innerScroll&&i.innerScroll),ref:r,children:[Object(l.jsx)("div",{className:i.topBg}),Object(l.jsxs)("div",{className:"flex container w-full",children:[o&&Object(l.jsx)(k,{position:"left",header:e.leftSidebarHeader,content:e.leftSidebarContent,variant:e.leftSidebarVariant||"permanent",innerScroll:e.innerScroll,classes:i,ref:a,rootRef:r}),Object(l.jsxs)("div",{className:Object(f.a)(i.contentWrapper,o&&(void 0===e.leftSidebarVariant||"permanent"===e.leftSidebarVariant)&&"lg:ltr:pl-0 lg:rtl:pr-0",c&&(void 0===e.rightSidebarVariant||"permanent"===e.rightSidebarVariant)&&"lg:pr-0"),children:[Object(l.jsx)(s,{header:e.header,classes:i}),Object(l.jsxs)("div",{className:Object(f.a)(i.contentCard,e.innerScroll&&"inner-scroll"),children:[e.contentToolbar&&Object(l.jsx)("div",{className:i.toolbar,children:e.contentToolbar}),e.content&&Object(l.jsx)(O.a,{className:i.content,enable:e.innerScroll,scrollToTopOnRouteChange:e.innerScroll,children:e.content})]})]}),c&&Object(l.jsx)(k,{position:"right",header:e.rightSidebarHeader,content:e.rightSidebarContent,variant:e.rightSidebarVariant||"permanent",innerScroll:e.innerScroll,classes:i,ref:n,rootRef:r})]})]})}));S.defaultProps={};t.a=m.a.memo(S)},1165:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(623),r=a(396),i=a(313),c=a(2);function o(e){var t=Object(i.a)().t,a=e.content,o=e.link,l=e.icon,s=void 0===l?null:l,d=e.addStyle,b=void 0===d?null:d,j=e.variant,u=void 0===j?null:j,p=e.color,f=void 0===p?"":p,h=e.isNewBlank,m=void 0===h||h;return Object(c.jsxs)(n.a,{component:"a",color:f||"default",href:"".concat("").concat(o),target:m?"_blank":"",role:"button",variant:u||"text",className:b||"flex flex-col text-blue justify-center",children:[s&&Object(c.jsx)(r.a,{children:s})," ",t(a)]})}},1171:function(e,t,a){"use strict";var n=a(1098),r=a(1111),i=a(1133),c=a(395),o=a(109),l=a(623),s=a(1127),d=a(381),b=a(1184),j=a(1185),u=a(8),p=a(313),f=a(2),h=Object(d.a)((function(e){return{header:{backgroundColor:e.palette.background.primary,color:e.palette.secondary.contrastText},dialog:{height:"100vh"}}}));t.a=function(e){var t=Object(p.a)().t,a=h(),d=e.preview,m=e.handleClose,O=e.fileLink,x=e.fileName,v=e.showDownload,g=void 0===v||v,k=e.showCloseButton,w=void 0!==k&&k;return Object(f.jsxs)(n.a,{fullWidth:!0,maxWidth:"xl",open:d,onClose:m,children:[Object(f.jsx)(r.a,{className:"relative",children:Object(f.jsxs)(i.a,{className:Object(u.a)(a.header,"flex justify-between"),children:[Object(f.jsx)(c.a,{className:"mr-16",color:"action",onClick:m,children:Object(f.jsx)(b.a,{color:"action"})}),Object(f.jsx)(o.a,{variant:"h6",className:"hidden sm:flex ml-2 flex-1",children:t("Preview")}),O&&g&&Object(f.jsx)(l.a,{role:"button",color:"primary",variant:"contained",href:O||"",download:x||"",endIcon:Object(f.jsx)(j.a,{}),children:t("Download")}),w&&Object(f.jsx)(l.a,{color:"inherit",variant:"outlined",onClick:m,children:t("Close")})]})}),Object(f.jsx)(s.a,{}),O?Object(f.jsx)("object",{type:"application/pdf",className:a.dialog,width:"100%",data:O,children:Object(f.jsxs)("div",{className:"p-10",children:[Object(f.jsx)("p",{children:t("Unfortunately, your device's operating system or web browser does not support previewing this file.")}),Object(f.jsx)(l.a,{color:"inherit",variant:"outlined",children:Object(f.jsx)("a",{href:O,download:x||"",children:t("Click here to Download.")})})]})}):Object(f.jsx)("div",{className:"p-10",children:t("Loading")})]})}},1184:function(e,t,a){"use strict";var n=a(0),r=a(44);t.a=Object(r.a)(n.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},1185:function(e,t,a){"use strict";var n=a(0),r=a(44);t.a=Object(r.a)(n.createElement("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"GetApp")},1200:function(e,t,a){"use strict";var n=a(397),r=a(0),i=a.n(r),c=a(313),o=a(1165),l=a(2);function s(e){var t=Object(n.m)(e),a=Object(c.a)().t,r=e.fileLink,i=void 0===r?null:r;return Object(l.jsxs)(l.Fragment,{children:[i&&Object(l.jsx)("object",{type:"application/pdf",className:t.dialog,width:"100%",data:i,children:Object(l.jsxs)("div",{className:"p-10 flex justify-center item-center flex-col",children:[Object(l.jsx)("p",{children:a("Unfortunately, your device's operating system or web browser does not support previewing this file.")}),Object(l.jsx)(o.a,{variant:"contained",color:"default",link:i,content:a("Click here to Download.")})]})}),void 0===i&&Object(l.jsx)("div",{className:"p-10",children:a("Loading")})]})}t.a=i.a.memo(s)},1202:function(e,t,a){"use strict";
1var n=a(19),r=a(396),i=a(0),c=a(313),o=a(1171),l=a(1200),s=a(2);t.a=function(e){var t=Object(c.a)().t,a=e.file,d=e.fileName,b=void 0===d?"":d,j=Object(i.useState)(!1),u=Object(n.a)(j,2),p=u[0],f=u[1],h=function(){f(!0)};return Object(s.jsxs)(s.Fragment,{children:[Object(s.jsxs)("div",{className:"w-full min-w-320",children:[Object(s.jsxs)("div",{role:"button",tabIndex:0,className:"mt-6 p-24 pt-6 flex items-center",onClick:function(){h()},"aria-hidden":"true",children:[Object(s.jsx)(r.a,{className:"mr-16",color:"action",children:"pageview"}),Object(s.jsx)("button",{type:"button",className:"font-bold text-blue",children:t("Preview")})]}),Object(s.jsx)("div",{className:"border items-center",children:Object(s.jsx)(l.a,{fileLink:a.url})})]}),Object(s.jsx)(o.a,{preview:p,handleClose:function(){f(!1)},fileLink:a.url,fileName:b})]})}},1390:function(e,t,a){"use strict";a.r(t);var n=a(3),r=a(9),i=a(19),c=a(64),o=a(25),l=a(623),s=a(1154),d=a(1153),b=a(397),j=a(21),u=a(234),p=a(26),f=a(143),h=a(8),m=a(71),O=a(65),x=a.n(O),v=a(0),g=a(313),k=a(16),w=a(42),y=a(1202),N=a(414),S=a(2);t.default=Object(f.a)("freefiIdCard",u.a)((function(e){var t,a,u=Object(k.b)(),f=Object(g.a)().t,O=Object(w.useParams)().freefiIdCardId,C=Object(v.useRef)(null),I=Object(v.useState)(!1),R=Object(i.a)(I,2),T=R[0],H=R[1],D=Object(k.c)((function(e){return e.auth.user.role})),B=Object(v.useState)({url:null,file:null}),F=Object(i.a)(B,2),P=F[0],E=F[1],L=Object(v.useState)(),W=Object(i.a)(L,2),V=W[0],z=W[1],U=function(){u(Object(p.a)()),Object(j.bb)(D)&&u(Object(N.j)({userFreefiIdCardApplicationVo:a,freefiIdCardId:O}))};return Object(m.a)("isNotPastOrToday",(function(e,t){return!!(x()().diff(x()(t))<0)})),Object(S.jsx)(s.a,{classes:b.n,header:Object(S.jsx)(d.a,{title:f("Upload FREE.fi ID Card"),titleBack:"FREE.fi ID Cards List",linkBack:"/users/free-id-cards/"}),content:Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)(m.b,{onValidSubmit:function(e){var t={temporaryFreefiIdCard:P,expiryDate:V};a=Object(j.Ib)(t)},onValid:function(){H(!0)},onInvalid:function(){H(!1)},ref:C,children:[Object(S.jsxs)("div",{className:b.j,children:[Object(S.jsx)(c.d,{className:b.f,type:"file",name:"file",id:"tempCardFile",label:f("Temporary FREE.fi ID Card"),onChange:function(e){var t=e.target.files[0];t&&E(Object(r.a)(Object(r.a)({},P),{},{url:URL.createObjectURL(t),file:e.target.files[0]}))},onBlur:function(e){var t=e.target,a=t.name,r=t.value,i=t.id;""===r&&C.current.updateInputsWithError(Object(n.a)({},a,"".concat(i," ").concat(f("cannot be empty"))))},required:!0,fullWidth:!0,inputProps:{accept:"application/pdf"},InputLabelProps:{shrink:!0}}),Object(S.jsx)(c.d,{type:"date",className:b.f,id:"expiryDate",name:"expiryDate",label:f("Expiry Date"),value:V,onChange:function(e){return z(e.target.value)},required:!0,validations:{isNotPastOrToday:!0},validationErrors:{isNotPastOrToday:f("Expiry Date cannot be in the past or today")},InputLabelProps:{shrink:!0}})]}),Object(S.jsxs)("div",{children:[Object(S.jsx)(l.a,{type:"submit",id:"saveBtn",className:Object(h.a)(b.a,"mx-20"),variant:"contained",color:"primary",disabled:!T||!Object(j.bb)(D),onClick:function(){return Object(j.Db)(u,U)},children:f("Save")}),Object(S.jsx)(l.a,{id:"cancelBtn",className:b.a,variant:"contained",color:"default",onClick:function(){return o.a.push("/users/free-id-card/".concat(O))},children:f("Cancel")})]})]}),Object(S.jsx)("div",{className:"p-10",children:(null===P||void 0===P?void 0:P.url)&&Object(S.jsx)(y.a,{file:P,fileName:(null===(t=P.file)||void 0===t?void 0:t.name)||""})})]})})}))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.