@djb25/digit-ui-module-wt 1.0.0 → 1.0.1

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/dist/index.js CHANGED
@@ -1 +1 @@
1
- var e,t=require("@nudmcdgnpm/digit-ui-react-components"),l=require("react"),i=(e=l)&&"object"==typeof e&&"default"in e?e.default:e,o=require("react-i18next"),r=require("react-router-dom"),a=require("react-query"),u=require("react-hook-form"),c=require("@upyog/digit-ui-react-components");function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e}).apply(null,arguments)}function d(e,t){if(null==e)return{};var n={};for(var l in e)if({}.hasOwnProperty.call(e,l)){if(-1!==t.indexOf(l))continue;n[l]=e[l]}return n}const v=[{head:"ES_TITILE_OWNER_DETAILS",body:[{route:"service-type",component:"ServiceTypes",withoutLabel:!0,key:"serviceType",type:"component",nextStep:"info",hideInEmployee:!0,isMandatory:!0,texts:{submitBarLabel:"COMMON_SAVE_NEXT"}},{route:"info",component:"InfoPage",nextStep:"applicant-details",key:"infodetails"},{route:"applicant-details",component:"ApplicantDetails",withoutLabel:!0,key:"owner",type:"component",nextStep:"address-details",hideInEmployee:!0,isMandatory:!0,texts:{submitBarLabel:"COMMON_SAVE_NEXT",header:"ES_APPLICANT_DETAILS"},timeLine:[{currentStep:1,actions:"ES_APPLICANT_DETAILS"}]}]},{head:"ES_TITLE_ADDRESS_DETAILS",body:[{route:"address-details",component:"AddressDetails",withoutLabel:!0,key:"address",type:"component",isMandatory:!0,hideInEmployee:!0,nextStep:"request-details",texts:{submitBarLabel:"COMMON_SAVE_NEXT",header:"ES_ADDRESS_DETAILS"},timeLine:[{currentStep:2,actions:"ES_ADDRESS_DETAILS"}]}]},{head:"ES_REQUEST_DETAILS",body:[{route:"request-details",component:"RequestDetails",withoutLabel:!0,key:"requestDetails",type:"component",isMandatory:!0,hideInEmployee:!0,nextStep:null,texts:{submitBarLabel:"COMMON_SAVE_NEXT",header:"WT_REQUEST_DETAILS"},timeLine:[{currentStep:3,actions:"ES_REQUEST_DETAILS"}]}]},{head:"ES_TOILET_REQUEST_DETAILS",body:[{route:"toiletRequest-details",component:"ToiletRequestDetails",withoutLabel:!0,key:"toiletRequestDetails",type:"component",isMandatory:!0,hideInEmployee:!0,nextStep:null,texts:{submitBarLabel:"COMMON_SAVE_NEXT",header:"MT_REQUEST_DETAILS"},timeLine:[{currentStep:3,actions:"ES_TOILET_REQUEST_DETAILS"}]}]},{head:"ES_TREE_PRUNING_REQUEST_DETAILS",body:[{route:"treePruningRequest-details",component:"TreePruningRequestDetails",withoutLabel:!0,key:"treePruningRequestDetails",type:"component",isMandatory:!0,hideInEmployee:!0,nextStep:null,texts:{submitBarLabel:"COMMON_SAVE_NEXT",header:"TP_REQUEST_DETAILS"},timeLine:[{currentStep:3,actions:"ES_TREE_PRUNING_REQUEST_DETAILS"}]}]}],p=function(e){return void 0===e&&(e=""),function(e){return void 0===e&&(e=""),!(!e||null==e||null==e||""==e)}(e)?e:"NA"},f=e=>{if(!e)return"NA";const[t,n]=e.split(":").map(Number),l=t>=12?"PM":"AM";return(t%12||12)+":"+n.toString().padStart(2,"0")+" "+l},m=e=>{if(!e)return"NA";const[t,n,l]=e.split("-");return l+"-"+n+"-"+t},E=e=>{var n,o;let{isLoading:a,t:c,onSubmit:s,data:d,count:v,setShowToast:p,moduleCode:f}=e;const m=window.Digit.Utils.browser.isMobile(),{register:E,control:_,handleSubmit:g,setValue:h,getValues:S,reset:y,formState:b}=u.useForm({defaultValues:{offset:0,limit:!m&&10,sortBy:"commencementDate",sortOrder:"DESC"}});l.useEffect(()=>{E("offset",0),E("limit",10),E("sortBy","commencementDate"),E("sortOrder","DESC")},[E]);const T=Digit.UserService.getUser().info,C=e=>i.createElement("span",{className:"cell-text"},e),A=l.useMemo(()=>[{Header:c("WT_BOOKING_NO"),accessor:"bookingNo",disableSortBy:!0,Cell:e=>{let{row:t}=e;return i.createElement("div",null,i.createElement("span",{className:"link"},"CITIZEN"===T.type&&i.createElement(r.Link,{to:"/digit-ui/citizen/wt/bookingsearch/booking-details/"+t.original.bookingNo},t.original.bookingNo),"EMPLOYEE"===T.type&&i.createElement(r.Link,{to:"/digit-ui/employee/wt/bookingsearch/booking-details/"+t.original.bookingNo},t.original.bookingNo)))}},{Header:c("WT_APPLICANT_NAME"),Cell:e=>{var t,n,l;return C(""+(null==e||null===(t=e.row)||void 0===t||null===(n=t.original)||void 0===n||null===(l=n.applicantDetail)||void 0===l?void 0:l.name))},disableSortBy:!0},{Header:c("WT_MOBILE_NUMBER"),Cell:e=>{var t,n,l;return C(""+(null==e||null===(t=e.row)||void 0===t||null===(n=t.original)||void 0===n||null===(l=n.applicantDetail)||void 0===l?void 0:l.mobileNumber))},disableSortBy:!0},{Header:c("PT_COMMON_TABLE_COL_STATUS_LABEL"),Cell:e=>{let{row:t}=e;return C(""+c(null==t?void 0:t.original.bookingStatus))},disableSortBy:!0}],[]),D=[{i18nKey:"Booking Created",code:"BOOKING_CREATED",value:c("WT_BOOKING_CREATED")},{i18nKey:"Booking Approved",code:"APPROVED",value:c("WT_BOOKING_APPROVED")},{i18nKey:"Tanker Delivered",code:"TANKER_DELIVERED",value:c("WT_TANKER_DELIVERED")},{i18nKey:"Vendor Assigned",code:"ASSIGN_VENDOR",value:c("WT_ASSIGN_VENDOR")},{i18nKey:"Rejected",code:"REJECT",value:c("WT_BOOKING_REJECTED")}],N=[{i18nKey:"TP_BOOKING_CREATED",code:"BOOKING_CREATED",value:c("TP_BOOKING_CREATED")},{i18nKey:"TP_PENDING_FOR_APPROVAL",code:"PENDING_FOR_APPROVAL",value:c("TP_PENDING_FOR_APPROVAL")},{i18nKey:"TP_PAYMENT_PENDING",code:"PAYMENT_PENDING",value:c("TP_PAYMENT_PENDING")},{i18nKey:"TP_TEAM_ASSIGNMENT_FOR_VERIFICATION",code:"TEAM_ASSIGNMENT_FOR_VERIFICATION",value:c("TP_TEAM_ASSIGNMENT_FOR_VERIFICATION")},{i18nKey:"TP_TEAM_ASSIGNMENT_FOR_EXECUTION",code:"TEAM_ASSIGNMENT_FOR_EXECUTION",value:c("TP_TEAM_ASSIGNMENT_FOR_EXECUTION")},{i18nKey:"TP_TREE_PRUNING_SERVICE_COMPLETED",code:"TREE_PRUNING_SERVICE_COMPLETED",value:c("TP_TREE_PRUNING_SERVICE_COMPLETED")}],I=l.useCallback(e=>{0!==e.length&&(h("sortBy",e.id),h("sortOrder",e.desc?"DESC":"ASC"))},[]);function w(){h("offset",S("offset")-S("limit")),g(s)()}return i.createElement(i.Fragment,null,i.createElement("div",{style:{padding:"CITIZEN"===(null==T?void 0:T.type)?"0 24px 0 24px":""}},i.createElement(t.Header,null,c("WT_SEARCH_BOOKINGS")),"EMPLOYEE"===(null==T?void 0:T.type)&&i.createElement(t.Card,{className:"card-search-heading"},i.createElement("span",{style:{color:"#505A5F"}},c("PROVIDE_ATLEAST_ONE_PARAMETERS"))),"CITIZEN"===(null==T?void 0:T.type)&&i.createElement("span",{style:{color:"#505A5F",marginBottom:"10px"}},c("PROVIDE_ATLEAST_ONE_PARAMETERS")),i.createElement(t.SearchForm,{onSubmit:s,handleSubmit:g},i.createElement(t.SearchField,null,i.createElement("label",null,c("WT_BOOKING_NO")),i.createElement(t.TextInput,{name:"bookingNo",inputRef:E({})})),i.createElement(t.SearchField,null,i.createElement("label",null,c("PT_COMMON_TABLE_COL_STATUS_LABEL")),i.createElement(u.Controller,{control:_,name:"status",render:e=>i.createElement(t.Dropdown,{selected:e.value,select:e.onChange,onBlur:e.onBlur,option:"TP"===f?N:D,optionKey:"i18nKey",t:c,disable:!1})})),i.createElement(t.SearchField,null,i.createElement("label",null,c("WT_MOBILE_NUMBER")),i.createElement(t.MobileNumber,{name:"mobileNumber",inputRef:E({minLength:{value:10,message:c("CORE_COMMON_MOBILE_ERROR")},maxLength:{value:10,message:c("CORE_COMMON_MOBILE_ERROR")},pattern:{value:/[6789][0-9]{9}/,message:c("CORE_COMMON_MOBILE_ERROR")}}),type:"number",componentInFront:i.createElement("div",{className:"employee-card-input employee-card-input--front"},"+91"),maxlength:10}),i.createElement(t.CardLabelError,null,null==b||null===(n=b.errors)||void 0===n||null===(o=n.mobileNumber)||void 0===o?void 0:o.message)),i.createElement(t.SearchField,null,i.createElement("label",null,c("FROM_DATE")),i.createElement(u.Controller,{render:e=>i.createElement(t.DatePicker,{date:e.value,disabled:!1,onChange:e.onChange,max:(new Date).toISOString().split("T")[0]}),name:"fromDate",control:_})),i.createElement(t.SearchField,null,i.createElement("label",null,c("TO_DATE")),i.createElement(u.Controller,{render:e=>i.createElement(t.DatePicker,{date:e.value,disabled:!1,onChange:e.onChange}),name:"toDate",control:_})),i.createElement(t.SearchField,null),i.createElement(t.SearchField,{className:"submit"},i.createElement(t.SubmitBar,{label:c("ES_COMMON_SEARCH"),submit:!0}),i.createElement("p",{style:{marginTop:"10px"},onClick:()=>{y({bookingNo:"",communityHallCode:"",fromDate:"",toDate:"",mobileNumber:"",status:"",offset:0,limit:10,sortBy:"commencementDate",sortOrder:"DESC"}),p(null),w()}},c("ES_COMMON_CLEAR_ALL")))),!a&&null!=d&&d.display?i.createElement(t.Card,{style:{marginTop:20}},c(d.display).split("\\n").map((e,t)=>i.createElement("p",{key:t,style:{textAlign:"center"}},e))):a||""===d?""!==d||a&&i.createElement(t.Loader,null):i.createElement(t.Table,{t:c,data:d,totalRecords:v,columns:A,getCellProps:e=>({style:{minWidth:e.column.Header===c("WT_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}),onPageSizeChange:function(e){h("limit",Number(e.target.value)),g(s)()},currentPage:S("offset")/S("limit"),onNextPage:function(){h("offset",S("offset")+S("limit")),g(s)()},onPrevPage:w,pageSizeLimit:S("limit"),onSort:I,disableSort:!1,sortParams:[{id:S("sortBy"),desc:"DESC"===S("sortOrder")}]})))},g=e=>{let{moduleCode:n}=e;const{t:r}=o.useTranslation(),a=Digit.ULBService.getCurrentTenantId(),[u,c]=l.useState({}),[d,v]=l.useState(null);l.useEffect(()=>{if(d){const e=setTimeout(()=>{v(null)},1e3);return()=>clearTimeout(e)}},[d]);const p={enabled:!!(u&&Object.keys(u).length>0)};let f=[],m=0,_=!1,g=!1,h=!1,S=null;return"WT"===n?({isLoading:_,isSuccess:g,isError:h,error:S,data:{waterTankerBookingDetail:f=[],Count:m=0}={}}=Digit.Hooks.wt.useTankerSearchAPI({tenantId:a,filters:u},p)):"MT"===n?({isLoading:_,isSuccess:g,isError:h,error:S,data:{mobileToiletBookingDetails:f=[],Count:m=0}={}}=Digit.Hooks.wt.useMobileToiletSearchAPI({tenantId:a,filters:u},p)):"TP"===n&&({isLoading:_,isSuccess:g,isError:h,error:S,data:{treePruningBookingDetails:f=[],Count:m=0}={}}=Digit.Hooks.wt.useTreePruningSearchAPI({tenantId:a,filters:u},p)),i.createElement(i.Fragment,null,i.createElement(E,{t:r,isLoading:_,tenantId:a,setShowToast:v,onSubmit:function(e){const{fromDate:t,toDate:n}=e,l=s({},e,n?{toDate:n}:{},t?{fromDate:t}:{});let i=Object.keys(l).filter(e=>l[e]).reduce((e,t)=>s({},e,{[t]:"object"==typeof l[t]?l[t].code:l[t]}),{});!(Object.keys(i).length>0)||i.bookingNo||i.fromDate||i.status||i.toDate||i.mobileNumber?i.fromDate&&!i.toDate||!i.fromDate&&i.toDate?v({warning:!0,label:"ERR_PROVIDE_BOTH_FORM_TO_DATE"}):c(i):v({warning:!0,label:"ERR_PROVIDE_ONE_PARAMETERS"})},data:g&&!_?f.length>0?f:{display:"ES_COMMON_NO_DATA"}:"",count:m,moduleCode:n}),d&&i.createElement(t.Toast,{error:d.error,warning:d.warning,label:r(d.label),onClose:()=>v(null)}))},h=["path","url"],S=()=>{var e,n,l,o,a,u,c,v,p,f,m,E;const _=r.useRouteMatch(),{path:S}=_,y=(d(_,h),null===(e=Digit)||void 0===e||null===(n=e.ComponentRegistryService)||void 0===n?void 0:n.getComponent("WTCreate")),b=null===(l=Digit)||void 0===l||null===(o=l.ComponentRegistryService)||void 0===o?void 0:o.getComponent("WTApplicationDetails"),T=null===(a=Digit)||void 0===a||null===(u=a.ComponentRegistryService)||void 0===u?void 0:u.getComponent("MTApplicationDetails"),C=null===(c=Digit)||void 0===c||null===(v=c.ComponentRegistryService)||void 0===v?void 0:v.getComponent("TPApplicationDetails"),A=null===(p=Digit)||void 0===p||null===(f=p.ComponentRegistryService)||void 0===f?void 0:f.getComponent("WTMyApplications"),D=Digit.ComponentRegistryService.getComponent("WTEmpInbox"),N=Digit.ComponentRegistryService.getComponent("WTCitizenCard"),I=Digit.ComponentRegistryService.getComponent("MTCitizenCard"),w=null===(m=Digit)||void 0===m||null===(E=m.ComponentRegistryService)||void 0===E?void 0:E.getComponent("ApplicationDetails"),O=e=>({searchParams:{uuid:{code:"ASSIGNED_TO_ALL",name:"ES_INBOX_ASSIGNED_TO_ALL"},services:[e],applicationStatus:[],locality:[]}}),x=O("watertanker"),R=O("mobileToilet");return i.createElement("span",{style:{width:"100%"}},i.createElement(r.Switch,null,i.createElement(t.AppContainer,null,i.createElement(t.BackButton,null,"Back"),i.createElement(t.PrivateRoute,{path:S+"/inbox",component:()=>i.createElement(D,{useNewInboxAPI:!0,parentRoute:S,moduleCode:"WT",businessService:"watertanker",filterComponent:"WT_INBOX_FILTER",initialStates:x,isInbox:!0})}),i.createElement(t.PrivateRoute,{path:S+"/mt/inbox",component:()=>i.createElement(D,{useNewInboxAPI:!0,parentRoute:S,businessService:"mobileToilet",moduleCode:"MT",filterComponent:"WT_INBOX_FILTER",initialStates:R,isInbox:!0})}),i.createElement(t.PrivateRoute,{path:S+"/request-service",component:y}),i.createElement(t.PrivateRoute,{path:S+"/status",component:A}),i.createElement(t.PrivateRoute,{path:S+"/booking/waterTanker/:acknowledgementIds/:tenantId",component:b}),i.createElement(t.PrivateRoute,{path:S+"/booking/mobileToilet/:acknowledgementIds/:tenantId",component:T}),i.createElement(t.PrivateRoute,{path:S+"/booking/treePruning/:acknowledgementIds/:tenantId",component:C}),i.createElement(t.PrivateRoute,{path:S+"/booking-details/:id",component:()=>i.createElement(w,{parentRoute:S})}),i.createElement(t.PrivateRoute,{path:S+"/bookingsearch/booking-details/:id",component:()=>i.createElement(w,{parentRoute:S})}),i.createElement(t.PrivateRoute,{path:S+"/wt-Vendor",component:()=>Digit.UserService.hasAccess(["WT_VENDOR"])?i.createElement(N,{parentRoute:S}):i.createElement(r.Redirect,{to:{pathname:"/digit-ui/citizen/login",state:{from:S+"/wt-Vendor",role:"WT_VENDOR"}}})}),i.createElement(t.PrivateRoute,{path:S+"/mt-Vendor",component:()=>Digit.UserService.hasAccess(["MT_VENDOR"])?i.createElement(I,{parentRoute:S}):i.createElement(r.Redirect,{to:{pathname:"/digit-ui/citizen/login",state:{from:S+"/mt-Vendor",role:"MT_VENDOR"}}})}),i.createElement(t.PrivateRoute,{path:S+"/my-bookings",component:e=>i.createElement(g,s({},e,{parentRoute:S,moduleCode:"WT"}))}),i.createElement(t.PrivateRoute,{path:S+"/mt/my-bookings",component:e=>i.createElement(g,s({},e,{parentRoute:S,moduleCode:"MT"}))}))))},y=e=>{let{onSubmit:n,setExistingDataSet:a}=e;const{t:u}=o.useTranslation(),c=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),[d,v]=l.useState(null),[p,f]=l.useState(!1),{offset:m}=r.useParams();l.useEffect(()=>{p&&(n(),f(!1))},[p,n]);let E={limit:"3",sortOrder:"ASC",sortBy:"createdTime",offset:m&&!isNaN(parseInt(m))?m:"0",tenantId:c};l.useEffect(()=>{v(E)},[m]);const{isLoading:_,data:g}=Digit.Hooks.wt.useTankerSearchAPI({filters:d});if(_)return i.createElement(t.Loader,null);const h=(null==g?void 0:g.waterTankerBookingDetail)||[],S={padding:"10px",margin:"10px 0",border:"1px solid #ccc",transition:"background-color 0.3s ease, box-shadow 0.3s ease"},y={boxShadow:"1px 4px 4px 7px rgba(0, 0, 0, 0.5)"};return i.createElement(i.Fragment,null,i.createElement("div",null,h.length>0&&h.map((e,n)=>{var l;return i.createElement("div",{key:n},i.createElement(t.Card,{style:s({},S,{cursor:"pointer"}),onMouseEnter:e=>{e.currentTarget.style.backgroundColor=y.backgroundColor,e.currentTarget.style.boxShadow=y.boxShadow},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="",e.currentTarget.style.boxShadow=""},onClick:()=>{(e=>{var t,n,l,i,o,r,u,c,s,d,v,p,m,E,_,g,h,S;const y={address:{houseNo:null==e||null===(t=e.address)||void 0===t?void 0:t.houseNo,streetName:null==e||null===(n=e.address)||void 0===n?void 0:n.streetName,addressline1:null==e||null===(l=e.address)||void 0===l?void 0:l.addressLine1,addressline2:null==e||null===(i=e.address)||void 0===i?void 0:i.addressLine2,landmark:null==e||null===(o=e.address)||void 0===o?void 0:o.landmark,pincode:null==e||null===(r=e.address)||void 0===r?void 0:r.pincode,cityValue:{code:null==e||null===(u=e.address)||void 0===u?void 0:u.city,value:null==e||null===(c=e.address)||void 0===c?void 0:c.city,i18nKey:null==e||null===(s=e.address)||void 0===s?void 0:s.city,city:{name:null==e||null===(d=e.address)||void 0===d?void 0:d.city,code:null==e||null===(v=e.address)||void 0===v?void 0:v.cityCode}},locality:{code:null==e||null===(p=e.address)||void 0===p?void 0:p.localityCode,value:null==e||null===(m=e.address)||void 0===m?void 0:m.locality,i18nKey:null==e||null===(E=e.address)||void 0===E?void 0:E.locality}},owner:{applicantName:null==e||null===(_=e.applicantDetail)||void 0===_?void 0:_.name,mobileNumber:null==e||null===(g=e.applicantDetail)||void 0===g?void 0:g.mobileNumber,alternateNumber:null==e||null===(h=e.applicantDetail)||void 0===h?void 0:h.alternateNumber,emailId:null==e||null===(S=e.applicantDetail)||void 0===S?void 0:S.emailId},requestDetails:{deliveryDate:null==e?void 0:e.deliveryDate,deliveryTime:null==e?void 0:e.deliveryTime,waterQuantity:{code:null==e?void 0:e.waterQuantity,value:null==e?void 0:e.waterQuantity,i18nKey:null==e?void 0:e.waterQuantity},tankerType:{code:null==e?void 0:e.tankerType,value:null==e?void 0:e.tankerType,i18nKey:null==e?void 0:e.tankerType},description:null==e?void 0:e.description}};a(y),f(!0)})(e)}},i.createElement(t.KeyNote,{keyValue:u("BOOKING_NO"),note:null==e?void 0:e.bookingNo}),i.createElement(t.KeyNote,{keyValue:u("APPLICANT_NAME"),note:null==e||null===(l=e.applicantDetail)||void 0===l?void 0:l.name}),i.createElement(t.KeyNote,{keyValue:u("PT_COMMON_TABLE_COL_STATUS_LABEL"),note:u(""+(null==e?void 0:e.bookingStatus))})))}),0===h.length&&!_&&i.createElement("p",{style:{marginLeft:"16px",marginTop:"16px"}},u("NO_APPLICATION_FOUND_MSG"))))},b=i.memo(e=>{let{t:t}=e;return i.createElement("h1",{className:"heading-m"},t("MY_BOOKINGS"))}),T=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),C=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(T,null)),A=e=>{let{t:n,closeModal:o,onSubmit:r,setExistingDataSet:a}=e;const[u,c]=l.useState(!1),[s,d]=l.useState(!1),v=l.useCallback(()=>{s&&(r(),d(!1))},[s,r]);return l.useEffect(()=>{v()},[v]),i.createElement(i.Fragment,null,i.createElement(t.Modal,{headerBarMain:i.createElement(b,{t:n}),headerBarEnd:i.createElement(C,{onClick:o}),actionCancelLabel:u&&n("CS_COMMON_BACK"),actionCancelOnSubmit:()=>c(!1),hideSubmit:!0,formId:"modal-action"},i.createElement(t.Card,{style:{boxShadow:"none"}},u&&i.createElement(y,{onSubmit:r,setExistingDataSet:a}),i.createElement("div",{style:{display:"flex",justifyContent:"center",gap:"20px",flexDirection:"column",alignItems:"center"}},!u&&i.createElement(t.SubmitBar,{label:n("USE_EXISTING_DETAILS"),onSubmit:()=>{c(!0)}}),!u&&i.createElement(t.SubmitBar,{label:n("FILL_NEW_DETAILS"),onSubmit:()=>{d(!0)}})))))},D=e=>{let{jumpTo:n}=e;o.useTranslation();const l=r.useHistory();return i.createElement(t.LinkButton,{label:i.createElement(t.EditIcon,{style:{marginTop:"-30px",float:"right",position:"relative",bottom:"32px"}}),className:"check-page-link-button",onClick:function(){l.push(n)}})},N=e=>e.substr(0,1).toUpperCase()+e.substr(1),I=function(e,t,n){try{var l,i,o,r,a,u,c,s,d,v,p,E,_,g;return console.log("booking",e),console.log("tenantInfo",t),Promise.resolve({t:n,tenantId:null==t?void 0:t.code,name:n(null==t?void 0:t.i18nKey)+" "+(h=n("ULBGRADE_"+(null==t||null===(l=t.city)||void 0===l?void 0:l.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))),h.toLowerCase().split(" ").map(N).join(" ")),email:null==t?void 0:t.emailId,phoneNumber:null==t?void 0:t.contactNumber,applicationNumber:null==e?void 0:e.bookingNo,isTOCRequired:!1,heading:n("WT_ACKNOWLEDGEMENT"),details:[{title:n("WT_APPLICANT_DETAILS"),asSectionHeader:!0,values:[{title:n("WT_APPLICANT_NAME"),value:null==e||null===(i=e.applicantDetail)||void 0===i?void 0:i.name},{title:n("WT_MOBILE_NUMBER"),value:null==e||null===(o=e.applicantDetail)||void 0===o?void 0:o.mobileNumber},{title:n("WT_ALT_MOBILE_NUMBER"),value:null==e||null===(r=e.applicantDetail)||void 0===r?void 0:r.alternateNumber},{title:n("WT_EMAIL_ID"),value:null==e||null===(a=e.applicantDetail)||void 0===a?void 0:a.emailId}].filter(e=>e.value)},{title:n("WT_ADDRESS_DETAILS"),asSectionHeader:!0,values:[{title:n("WT_PINCODE"),value:null==e||null===(u=e.address)||void 0===u?void 0:u.pincode},{title:n("WT_CITY"),value:null==e||null===(c=e.address)||void 0===c?void 0:c.city},{title:n("WT_LOCALITY"),value:null==e||null===(s=e.address)||void 0===s?void 0:s.locality},{title:n("WT_STREET_NAME"),value:null==e||null===(d=e.address)||void 0===d?void 0:d.streetName},{title:n("WT_DOOR_NO"),value:null==e||null===(v=e.address)||void 0===v?void 0:v.doorNo},{title:n("WT_HOUSE_NO"),value:null==e||null===(p=e.address)||void 0===p?void 0:p.houseNo},{title:n("WT_ADDRESS_LINE1"),value:null==e||null===(E=e.address)||void 0===E?void 0:E.addressLine1},{title:n("WT_ADDRESS_LINE2"),value:null==e||null===(_=e.address)||void 0===_?void 0:_.addressLine2},{title:n("WT_LANDMARK"),value:null==e||null===(g=e.address)||void 0===g?void 0:g.landmark}].filter(e=>e.value)},{title:n("WT_REQUEST_DETAILS"),asSectionHeader:!0,values:[{title:n("WT_TANKER_TYPE"),value:null==e?void 0:e.tankerType},{title:n("WT_WATER_TYPE"),value:n(null==e?void 0:e.waterType)},{title:n("WT_TANKER_QUANTITY"),value:null==e?void 0:e.tankerQuantity},{title:n("WT_WATER_QUANTITY"),value:(null==e?void 0:e.waterQuantity)+" Ltr"},{title:n("WT_DELIVERY_DATE_TIME"),value:m(null==e?void 0:e.deliveryDate)+" ("+f(null==e?void 0:e.deliveryTime)+")"},{title:n("WT_DESCRIPTION"),value:null==e?void 0:e.description},{title:n("WT_IMMEDIATE"),value:n("Y"===(null==e?void 0:e.extraCharge)?"YES":"NO")}].filter(e=>e.value)}]})}catch(e){return Promise.reject(e)}var h},w=e=>{const{t:t}=o.useTranslation();return e.isSuccess?t("WT_SUBMIT_SUCCESSFULL"):e.isLoading?t("WT_APPLICATION_PENDING"):e.isSuccess?void 0:t("WT_APPLICATION_FAILED")},O={padding:"4px 0px",justifyContent:"space-between"},x=e=>{var n,l;return i.createElement(t.Banner,{message:w(e),applicationNumber:null===(n=e.data)||void 0===n||null===(l=n.waterTankerBookingDetail)||void 0===l?void 0:l.bookingNo,info:e.isSuccess?e.t("WT_BOOKING_NO"):"",successful:e.isSuccess,style:{width:"100%"}})},R=e=>{let{t:n,currentPage:l,columns:o,data:r,getCellProps:a,disableSort:u,onSort:c,onNextPage:s,onPrevPage:d,onPageSizeChange:v,isPaginationRequired:p,pageSizeLimit:f,sortParams:m,totalRecords:E}=e;return i.createElement(t.Table,{t:n,data:r,currentPage:l,columns:o,getCellProps:a,onNextPage:s,onPrevPage:d,pageSizeLimit:f,disableSort:u,isPaginationRequired:p,onPageSizeChange:v,onSort:c,sortParams:m,totalRecords:E})},L=e=>{let{businessService:n}=e;const{t:a}=o.useTranslation(),u=[],[c,s]=l.useState([]),{roles:d}=Digit.UserService.getUser().info;return l.useEffect(()=>{let e=u.filter(e=>e.businessService===n).filter(e=>{let{roles:t}=e;return t.some(e=>d.map(e=>{let{code:t}=e;return t}).includes(e))||!(null!=t&&t.length)});s(e)},[]),i.createElement(t.Card,{className:"employeeCard filter inboxLinks"},i.createElement("div",{className:"complaint-links-container"},i.createElement("div",{className:"header"},i.createElement("span",{className:"logo"},i.createElement(t.CHBIcon,null))," ",i.createElement("span",{className:"text"},a(n+"_REQUEST"))),i.createElement("div",{className:"body"},c.map((e,t)=>{let{link:n,text:l,hyperlink:o=!1,roles:u=[]}=e;return i.createElement("span",{className:"link",key:t},o?i.createElement("a",{href:n},l):i.createElement(r.Link,{to:n},a(l)))}))))},P={mobileNumber:t.MobileNumber},k=e=>{var n;let{onSearch:l,type:r,onClose:a,searchFields:c,searchParams:d,isInboxPage:v,clearSearch:p}=e;const{t:f}=o.useTranslation(),{handleSubmit:m,reset:E,watch:_,control:g,formState:h,setValue:S}=u.useForm({defaultValues:v?d:s({locality:null,city:null},d)}),y=_(),b=innerWidth<=640;function T(){const e=c.reduce((e,t)=>s({},e,{[null==t?void 0:t.name]:""}),{});if(E(e),v){const e=s({},d);e.delete=[],c.forEach(t=>{e.delete.push(null==t?void 0:t.name)}),l(s({},e))}else p()}const C=e=>i.createElement(t.LinkLabel,{style:s({display:"inline"},e?{margin:0}:{}),onClick:T},f("ES_COMMON_CLEAR_SEARCH"));return i.createElement("form",{onSubmit:m(e=>{e.mobileNumber||delete e.mobileNumber,e.delete=[],c.forEach(t=>{e[t.name]||e.delete.push(t.name)}),l(e),"mobile"===r&&a()})},i.createElement(i.Fragment,null,i.createElement("div",{className:"search-container",style:{width:"auto",marginLeft:v?"24px":"revert"}},i.createElement("div",{className:"search-complaint-container"},("mobile"===r||b)&&i.createElement("div",{className:"complaint-header"},i.createElement("h2",null,f("ES_COMMON_SEARCH_BY")),i.createElement("span",{onClick:a},i.createElement(t.CloseSvg,null))),i.createElement("div",{className:"complaint-input-container for-pt "+(v?"":"for-search"),style:{width:"100%",display:"grid"}},null==c||null===(n=c.filter(e=>!0))||void 0===n?void 0:n.map((e,n)=>{var l,o,r;return i.createElement("div",{key:e.name,className:"input-fields"},i.createElement("span",{className:"mobile-input"},i.createElement(t.Label,null,f(e.label)+" "+(e.isMendatory?"*":"")),i.createElement(u.Controller,e.type?{render:t=>i.createElement(null==P?void 0:P[e.type],{formValue:y,setValue:S,onChange:t.onChange,value:t.value}),name:e.name,control:g,defaultValue:""}:{render:e=>i.createElement(t.TextInput,{onChange:e.onChange,value:e.value}),name:e.name,control:g,defaultValue:""})),null!=h&&null!==(l=h.dirtyFields)&&void 0!==l&&l[e.name]?i.createElement("span",{style:{fontWeight:"700",color:"rgba(212, 53, 28)",paddingLeft:"8px",marginTop:"-20px",fontSize:"12px"},className:"inbox-search-form-error"},null==h||null===(o=h.errors)||void 0===o||null===(r=o[e.name])||void 0===r?void 0:r.message):null)}),v&&i.createElement("div",{style:{gridColumn:"2/3",textAlign:"right",paddingTop:"10px"},className:"input-fields"},i.createElement("div",null,C())),"desktop"===r&&!b&&i.createElement("div",{style:{maxWidth:"unset",marginLeft:"unset"},className:"search-submit-wrapper"},i.createElement(t.SubmitBar,{className:"submit-bar-search",label:f("ES_COMMON_SEARCH"),disabled:!!Object.keys(h.errors).length||(()=>{var e;let t=!0;return Object.keys(y).forEach(e=>{!["locality","city"].includes(e)&&y[e]&&(t=!1)}),null==c||!c.find(e=>"locality"===e.name)||null!=y&&null!==(e=y.locality)&&void 0!==e&&e.code||(t=!0),t})(),submit:!0}),!v&&i.createElement("div",null,C()))))),("mobile"===r||b)&&i.createElement(t.ActionBar,{className:"clear-search-container"},i.createElement("button",{className:"clear-search",style:{flex:1}},C(b)),i.createElement(t.SubmitBar,{disabled:!!Object.keys(h.errors).length,label:f("ES_COMMON_SEARCH"),style:{flex:1},submit:!0}))))},M=["tableConfig","filterComponent"],F=e=>{let{tableConfig:n,filterComponent:r}=e,a=d(e,M);const{data:u,useNewInboxAPI:c}=a,{t:s}=o.useTranslation(),[v,p]=l.useState(()=>{var e;return null===(e=Digit.ComponentRegistryService)||void 0===e?void 0:e.getComponent(r)}),[f,m]=l.useState(()=>{var e;return null===(e=Digit.ComponentRegistryService)||void 0===e?void 0:e.getComponent(a.EmptyResultInboxComp)}),[E,_]=l.useState(!1),g=i.useMemo(()=>a.isSearch?n.searchColumns(a):n.inboxColumns(a)||[],[]);let h;return a.isLoading?h=i.createElement(t.Loader,null):E?h=null:!u||0===(null==u?void 0:u.length)||c&&null!=u&&u[0].dataEmpty?h=f&&i.createElement(f,{data:u})||(0===(null==u?void 0:u.length)||c&&null!=u&&u[0].dataEmpty?i.createElement(t.Card,{style:{marginTop:20}},s("CS_MYAPPLICATIONS_NO_APPLICATION").split("\\n").map((e,t)=>i.createElement("p",{key:t,style:{textAlign:"center"}},e))):i.createElement(t.Loader,null)):(null==u?void 0:u.length)>0&&(h=i.createElement(R,{t:s,data:u,columns:g,getCellProps:e=>({style:{minWidth:e.column.Header===s("ES_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}),onPageSizeChange:a.onPageSizeChange,currentPage:a.currentPage,onNextPage:a.onNextPage,onPrevPage:a.onPrevPage,pageSizeLimit:a.pageSizeLimit,onSort:a.onSort,disableSort:a.disableSort,sortParams:a.sortParams,totalRecords:a.totalRecords})),i.createElement("div",{className:"inbox-container"},!a.isSearch&&i.createElement("div",{className:"filters-container"},i.createElement(L,{parentRoute:a.parentRoute,businessService:a.moduleCode}),i.createElement("div",null,i.createElement(v,{defaultSearchParams:a.defaultSearchParams,onFilterChange:a.onFilterChange,searchParams:a.searchParams,type:"desktop",useNewInboxAPI:c,statusMap:c?null==u?void 0:u[0].statusMap:null,moduleCode:a.moduleCode}))),i.createElement("div",{style:{flex:1}},i.createElement(k,{defaultSearchParams:a.defaultSearchParams,onSearch:e=>{a.onSearch(e),_(!1)},type:"desktop",searchFields:a.searchFields,isInboxPage:!(null!=a&&a.isSearch),searchParams:a.searchParams,clearSearch:()=>_(!0)}),i.createElement("div",{className:"result",style:{marginLeft:null!=a&&a.isSearch?"":"24px",flex:1}},h)))},B=e=>{const{t:n}=o.useTranslation(),[r,a]=l.useState(()=>{var t,l;return null!==(t=e.sortParams)&&void 0!==t&&null!==(l=t[0])&&void 0!==l&&l.desc?{code:"DESC",name:n("ES_INBOX_DATE_LATEST_FIRST")}:{code:"ASC",name:n("ES_INBOX_DATE_LATEST_LAST")}});function u(){}return i.createElement(i.Fragment,null,i.createElement("div",{className:"filter"},i.createElement("div",{className:"filter-card"},i.createElement("div",{className:"heading"},i.createElement("div",{className:"filter-label"},n("SORT_BY"),":"),i.createElement("div",{className:"clearAll",onClick:u},n("ES_COMMON_CLEAR_ALL")),"desktop"===e.type&&i.createElement("span",{className:"clear-search",onClick:u},n("ES_COMMON_CLEAR_ALL")),"mobile"===e.type&&i.createElement("span",{onClick:e.onClose},i.createElement(t.CloseSvg,null))),i.createElement("div",null,i.createElement(t.RadioButtons,{onSelect:function(t){e.onSort([{id:"createdTime",desc:"DESC"===t.code}]),e.onClose()},selectedOption:r,optionsKey:"name",options:[{code:"DESC",name:n("ES_INBOX_DATE_LATEST_FIRST")},{code:"ASC",name:n("ES_INBOX_DATE_LATEST_LAST")}]})))))},U=e=>{let{t:n,data:o,onFilterChange:r,onSearch:a,onSort:u,serviceRequestIdKey:c,isFstpOperator:s,isLoading:d,isSearch:v,searchParams:p,searchFields:f,sortParams:m,linkPrefix:E,filterComponent:_}=e;const[g,h]=l.useState(v?"SEARCH":""),[S,y]=l.useState(!!v),[b,T]=l.useState(m),[C]=l.useState(()=>{var e;return null===(e=Digit.ComponentRegistryService)||void 0===e?void 0:e.getComponent(_)});l.useEffect(()=>{g&&y(!0)},[g]);const A=()=>{y(!1),h(""),T(m)};if(d)return i.createElement(t.Loader,null);let D;return o&&0!==(null==o?void 0:o.length)?o&&(null==o?void 0:o.length)>0&&(D=i.createElement(t.DetailsCard,{data:o,serviceRequestIdKey:c,linkPrefix:E||"/digit-ui/employee/chb/"})):D=i.createElement(t.Card,{style:{marginTop:20}},n("CS_MYAPPLICATIONS_NO_APPLICATION").split("\\n").map((e,t)=>i.createElement("p",{key:t,style:{textAlign:"center"}},e))),i.createElement(i.Fragment,null,i.createElement("div",{className:"searchBox"},a&&i.createElement(t.SearchAction,{text:"SEARCH",handleActionClick:()=>{h("SEARCH"),y(!0)}}),!v&&r&&i.createElement(t.FilterAction,{text:"FILTER",handleActionClick:()=>{h("FILTER"),y(!0)}}),i.createElement(t.FilterAction,{text:"SORT",handleActionClick:()=>{h("SORT"),y(!0)}})),D,S&&i.createElement(t.PopUp,null,"FILTER"===g&&i.createElement("div",{className:"popup-module"},i.createElement(C,{onFilterChange:e=>{r(e),y(!1)},Close:A,type:"mobile",searchParams:p})),"SORT"===g&&i.createElement("div",{className:"popup-module"},i.createElement(B,{type:"mobile",sortParams:m,onClose:A,onSort:u})),"SEARCH"===g&&i.createElement("div",{className:"popup-module"},i.createElement(k,{type:"mobile",onClose:A,onSearch:a,isFstpOperator:s,searchParams:p,searchFields:f}))))},W=e=>{let{classNameForMobileView:n=""}=e;const{t:a}=o.useTranslation(),u=[],[c,s]=l.useState([]),{roles:d}=Digit.UserService.getUser().info;return l.useEffect(()=>{let e=[];u.forEach(t=>{var n;t.accessTo?(n=t.accessTo,d.filter(e=>n.includes(e.code)).length&&e.push(t)):e.push(t)}),s(e)},[]),i.createElement(t.Card,{className:"employeeCard filter"},i.createElement("div",{className:"complaint-links-container "+n},i.createElement("div",{className:"header"},i.createElement("span",{className:"logo"},i.createElement(t.ShippingTruck,null))," ",i.createElement("span",{className:"text"},a("ES_TITLE_WT_REGISTRATION"))),i.createElement("div",{className:"body"},c.map((e,t)=>{let{link:n,text:l}=e;return i.createElement("span",{className:"link",key:t},i.createElement(r.Link,{to:n},l))}))))},j=e=>{let{data:t,isLoading:n,isSearch:l,searchFields:r,onFilterChange:a,onSearch:u,onSort:c,parentRoute:s,searchParams:d,sortParams:v,linkPrefix:p,tableConfig:f,filterComponent:m}=e;const{t:E}=o.useTranslation();return i.createElement("div",{style:{padding:0}},i.createElement("div",{className:"inbox-container"},i.createElement("div",{className:"filters-container"},!l&&i.createElement(W,{classNameForMobileView:"linksWrapperForMobileInbox",linkPrefix:s,isMobile:!0}),i.createElement(U,{t:E,data:null==t?void 0:t.map(e=>{const t={};return(l?f.searchColumns():f.inboxColumns()).forEach(n=>{n.mobileCell&&(t[n.Header]=n.mobileCell(e))}),t}),onFilterChange:a,isLoading:n,isSearch:l,onSearch:u,onSort:c,searchParams:d,searchFields:r,linkPrefix:p,sortParams:v,serviceRequestIdKey:null==f?void 0:f.serviceRequestIdKey,filterComponent:m}))))},H=["isFetching","isLoading","searchResponseKey","data","searchFields"],z=e=>{var n,r,a,u,c;let{useNewInboxAPI:v,parentRoute:p,moduleCode:f,initialStates:m={},filterComponent:E,isInbox:_,rawWfHandler:g,rawSearchHandler:h,combineResponse:S,wfConfig:y,searchConfig:b,middlewaresWf:T,middlewareSearch:C,EmptyResultInboxComp:A}=e;const D=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),N=Digit.UserService.getUser().info,{t:I}=o.useTranslation(),[w,O]=l.useState(()=>_?{}:{enabled:!1}),[x,R]=l.useState(()=>{var e;return null===(e=Digit.ComponentRegistryService)||void 0===e?void 0:e.getComponent("WTInboxTableConfig")}),[L,P]=l.useState(m.pageOffset||0),[k,M]=l.useState(m.pageSize||10),[B,U]=l.useState(m.sortParams||[{id:"createdTime",desc:!0}]),[W,z]=l.useState(m.searchParams||{});let V=window.Digit.Utils.browser.isMobile(),G=V?{limit:100,offset:0,sortBy:null==B||null===(n=B[0])||void 0===n?void 0:n.id,sortOrder:null!=B&&null!==(r=B[0])&&void 0!==r&&r.desc?"DESC":"ASC"}:{limit:k,offset:L,sortBy:null==B||null===(a=B[0])||void 0===a?void 0:a.id,sortOrder:null!=B&&null!==(u=B[0])&&void 0!==u&&u.desc?"DESC":"ASC"};const K=v?Digit.Hooks.useNewInboxGeneral({tenantId:D,ModuleCode:f,filters:s({},W,G,{sortParams:B})}):Digit.Hooks.useInboxGeneral({tenantId:D,businessService:f,isInbox:_,filters:s({},W,G,{sortParams:B}),rawWfHandler:g,rawSearchHandler:h,combineResponse:S,wfConfig:y,searchConfig:s({},w,b),middlewaresWf:T,middlewareSearch:C}),{isLoading:q,data:Y,searchFields:X}=K,Z=d(K,H);l.useEffect(()=>{P(0)},[W]);const $=e=>{let t=e.delete,n=s({},W,e);t&&t.forEach(e=>delete n[e]),delete e.delete,z(s({},n)),O({enabled:!0})},Q=l.useCallback(e=>{0!==e.length&&U(e)},[]);var J,ee;if(null!==(null==Z||null===(c=Z.data)||void 0===c?void 0:c.length))return V?i.createElement(j,{data:Y,isLoading:q,isSearch:!_,searchFields:X,onFilterChange:$,onSearch:$,onSort:Q,parentRoute:p,searchParams:W,sortParams:B,linkPrefix:p+"/application-details/",tableConfig:null!=Z&&Z.tableConfig?null===(J=res)||void 0===J?void 0:J.tableConfig:x(I)[f],filterComponent:E,EmptyResultInboxComp:A,useNewInboxAPI:v}):i.createElement("div",{style:{padding:"CITIZEN"===(null==N?void 0:N.type)?"0 24px":""}},_&&i.createElement(t.Header,null,I("ES_COMMON_INBOX")),i.createElement(F,{moduleCode:f,data:Y,tableConfig:x(I)[f],isLoading:q,defaultSearchParams:m.searchParams,isSearch:!_,onFilterChange:$,searchFields:X,onSearch:$,onSort:Q,onNextPage:()=>{P(e=>e+k)},onPrevPage:()=>{P(e=>e-k)},currentPage:Math.floor(L/k),pageSizeLimit:k,disableSort:!1,onPageSizeChange:e=>{M(Number(e.target.value))},parentRoute:p,searchParams:W,sortParams:B,totalRecords:Number(null==Y||null===(ee=Y[0])||void 0===ee?void 0:ee.totalCount),filterComponent:E,EmptyResultInboxComp:A,useNewInboxAPI:v}))},V=e=>{var n,l,a,u;let{path:c}=e;o.useTranslation();const d=r.useLocation();sessionStorage.removeItem("revalidateddone"),window.Digit.Utils.browser.isMobile();const v={searchParams:{uuid:{code:"ASSIGNED_TO_ALL",name:"ES_INBOX_ASSIGNED_TO_ALL"},services:["watertanker"],applicationStatus:[],locality:[]}},p={searchParams:{uuid:{code:"ASSIGNED_TO_ALL",name:"ES_INBOX_ASSIGNED_TO_ALL"},services:["mobileToilet"],applicationStatus:[],locality:[]}},f={searchParams:{uuid:{code:"ASSIGNED_TO_ALL",name:"ES_INBOX_ASSIGNED_TO_ALL"},services:["treePruning"],applicationStatus:[],locality:[]}},m=null===(n=Digit)||void 0===n||null===(l=n.ComponentRegistryService)||void 0===l?void 0:l.getComponent("ApplicationDetails"),E=null===(a=Digit)||void 0===a||null===(u=a.ComponentRegistryService)||void 0===u?void 0:u.getComponent("WTCreate"),_=window.location.href.includes("info")||window.location.href.includes("wt/status");return i.createElement(r.Switch,null,i.createElement(t.AppContainer,null,i.createElement(i.Fragment,null,i.createElement("div",{className:"ground-container"},i.createElement("div",{style:_?{marginLeft:"12px",display:"flex",alignItems:"center"}:{marginLeft:"-4px",display:"flex",alignItems:"center"}},i.createElement(t.BackButton,{location:d})),i.createElement(t.PrivateRoute,{path:c+"/inbox",component:()=>i.createElement(z,{useNewInboxAPI:!0,parentRoute:c,businessService:"watertanker",moduleCode:"WT",filterComponent:"WT_INBOX_FILTER",initialStates:v,isInbox:!0})}),i.createElement(t.PrivateRoute,{path:c+"/mt/inbox",component:()=>i.createElement(z,{useNewInboxAPI:!0,parentRoute:c,moduleCode:"MT",businessService:"mobileToilet",filterComponent:"WT_INBOX_FILTER",initialStates:p,isInbox:!0})}),i.createElement(t.PrivateRoute,{path:c+"/tp/inbox",component:()=>i.createElement(z,{useNewInboxAPI:!0,parentRoute:c,moduleCode:"TP",businessService:"treePruning",filterComponent:"WT_INBOX_FILTER",initialStates:f,isInbox:!0})}),i.createElement(t.PrivateRoute,{path:c+"/request-service",component:E}),i.createElement(t.PrivateRoute,{path:c+"/mt/request-service",component:E}),i.createElement(t.PrivateRoute,{path:c+"/tp/request-service",component:E}),i.createElement(t.PrivateRoute,{path:c+"/booking-details/:id",component:()=>i.createElement(m,{parentRoute:c})}),i.createElement(t.PrivateRoute,{path:c+"/bookingsearch/booking-details/:id",component:()=>i.createElement(m,{parentRoute:c})}),i.createElement(t.PrivateRoute,{path:c+"/my-bookings",component:e=>i.createElement(g,s({},e,{parentRoute:c,moduleCode:"WT"}))}),i.createElement(t.PrivateRoute,{path:c+"/mt/my-bookings",component:e=>i.createElement(g,s({},e,{parentRoute:c,moduleCode:"MT"}))}),i.createElement(t.PrivateRoute,{path:c+"/tp/my-bookings",component:e=>i.createElement(g,s({},e,{parentRoute:c,moduleCode:"TP"}))})))))},G=e=>{var n,l;let{application:a,tenantId:u,buttonLabel:c}=e,s=null==a?void 0:a.bookingNo.split("-")[0];const{t:d}=o.useTranslation();return i.createElement(t.Card,null,i.createElement(t.KeyNote,{keyValue:d("BOOKING_NO"),note:null==a?void 0:a.bookingNo}),i.createElement(t.KeyNote,{keyValue:d("APPLICANT_NAME"),note:null==a||null===(n=a.applicantDetail)||void 0===n?void 0:n.name}),i.createElement(t.KeyNote,{keyValue:d("MOBILE_NUMBER"),note:d(""+(null==a||null===(l=a.applicantDetail)||void 0===l?void 0:l.mobileNumber))}),i.createElement(t.KeyNote,{keyValue:d("LOCALITY"),note:d(""+(null==a?void 0:a.localityCode))}),i.createElement(t.KeyNote,{keyValue:d("PT_COMMON_TABLE_COL_STATUS_LABEL"),note:d(""+(null==a?void 0:a.bookingStatus))}),i.createElement("div",null,"WT"===s&&i.createElement(r.Link,{to:"/digit-ui/citizen/wt/booking/waterTanker/"+(null==a?void 0:a.bookingNo)+"/"+u},i.createElement(t.SubmitBar,{label:c})),"MT"===s&&i.createElement(r.Link,{to:"/digit-ui/citizen/wt/booking/mobileToilet/"+(null==a?void 0:a.bookingNo)+"/"+u},i.createElement(t.SubmitBar,{label:c})),"TP"===s&&i.createElement(r.Link,{to:"/digit-ui/citizen/wt/booking/treePruning/"+(null==a?void 0:a.bookingNo)+"/"+u},i.createElement(t.SubmitBar,{label:c}))))};var K=Array.isArray,q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Y(e,t){return e(t={exports:{}},t.exports),t.exports}var X,Z="object"==typeof self&&self&&self.Object===Object&&self,$="object"==typeof q&&q&&q.Object===Object&&q||Z||Function("return this")(),Q=$.Symbol,J=Object.prototype,ee=J.hasOwnProperty,te=J.toString,ne=Q?Q.toStringTag:void 0,le=Object.prototype.toString,ie=Q?Q.toStringTag:void 0,oe=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ie&&ie in Object(e)?function(e){var t=ee.call(e,ne),n=e[ne];try{e[ne]=void 0;var l=!0}catch(e){}var i=te.call(e);return l&&(t?e[ne]=n:delete e[ne]),i}(e):function(e){return le.call(e)}(e)},re=function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==oe(e)},ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ue=/^\w*$/,ce=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},se=$["__core-js_shared__"],de=(X=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||""))?"Symbol(src)_1."+X:"",ve=Function.prototype.toString,pe=/^\[object .+?Constructor\]$/,fe=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ce(e)||(t=e,de&&de in t))&&(function(e){if(!ce(e))return!1;var t=oe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)?fe:pe).test(function(e){if(null!=e){try{return ve.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}(n)?n:void 0},Ee=me(Object,"create"),_e=Object.prototype.hasOwnProperty,ge=Object.prototype.hasOwnProperty;function he(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}he.prototype.clear=function(){this.__data__=Ee?Ee(null):{},this.size=0},he.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},he.prototype.get=function(e){var t=this.__data__;if(Ee){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return _e.call(t,e)?t[e]:void 0},he.prototype.has=function(e){var t=this.__data__;return Ee?void 0!==t[e]:ge.call(t,e)},he.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ee&&void 0===t?"__lodash_hash_undefined__":t,this};var Se=he,ye=function(e,t){for(var n=e.length;n--;)if((l=e[n][0])===(i=t)||l!=l&&i!=i)return n;var l,i;return-1},be=Array.prototype.splice;function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}Te.prototype.clear=function(){this.__data__=[],this.size=0},Te.prototype.delete=function(e){var t=this.__data__,n=ye(t,e);return!(n<0||(n==t.length-1?t.pop():be.call(t,n,1),--this.size,0))},Te.prototype.get=function(e){var t=this.__data__,n=ye(t,e);return n<0?void 0:t[n][1]},Te.prototype.has=function(e){return ye(this.__data__,e)>-1},Te.prototype.set=function(e,t){var n=this.__data__,l=ye(n,e);return l<0?(++this.size,n.push([e,t])):n[l][1]=t,this};var Ce=Te,Ae=me($,"Map"),De=function(e,t){var n,l,i=e.__data__;return("string"==(l=typeof(n=t))||"number"==l||"symbol"==l||"boolean"==l?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}Ne.prototype.clear=function(){this.size=0,this.__data__={hash:new Se,map:new(Ae||Ce),string:new Se}},Ne.prototype.delete=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t},Ne.prototype.get=function(e){return De(this,e).get(e)},Ne.prototype.has=function(e){return De(this,e).has(e)},Ne.prototype.set=function(e,t){var n=De(this,e),l=n.size;return n.set(e,t),this.size+=n.size==l?0:1,this};var Ie=Ne;function we(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var l=arguments,i=t?t.apply(this,l):l[0],o=n.cache;if(o.has(i))return o.get(i);var r=e.apply(this,l);return n.cache=o.set(i,r)||o,r};return n.cache=new(we.Cache||Ie),n}we.Cache=Ie;var Oe,xe,Re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Le=/\\(\\)?/g,Pe=(Oe=we(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Re,function(e,n,l,i){t.push(l?i.replace(Le,"$1"):n||e)}),t},function(e){return 500===xe.size&&xe.clear(),e}),xe=Oe.cache,Oe),ke=Q?Q.prototype:void 0,Me=ke?ke.toString:void 0,Fe=function(e){if("string"==typeof e||re(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},Be=function(e,t,n){var l=null==e?void 0:function(e,t){for(var n=0,l=(t=function(e,t){return K(e)?e:function(e,t){if(K(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!re(e))||ue.test(e)||!ae.test(e)||null!=t&&e in Object(t)}(e,t)?[e]:Pe(function(e){return null==e?"":function e(t){if("string"==typeof t)return t;if(K(t))return function(e,t){for(var n=-1,l=null==e?0:e.length,i=Array(l);++n<l;)i[n]=t(e[n],n,e);return i}(t,e)+"";if(re(t))return Me?Me.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}(e)}(e))}(t,e)).length;null!=e&&n<l;)e=e[Fe(t[n++])];return n&&n==l?e:void 0}(e,t);return void 0===l?n:l},Ue=Y(function(e,t){(function(){var n="Expected a function",l="__lodash_placeholder__",i=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],o="[object Arguments]",r="[object Array]",a="[object Boolean]",u="[object Date]",c="[object Error]",s="[object Function]",d="[object GeneratorFunction]",v="[object Map]",p="[object Number]",f="[object Object]",m="[object RegExp]",E="[object Set]",_="[object String]",g="[object Symbol]",h="[object WeakMap]",S="[object ArrayBuffer]",y="[object DataView]",b="[object Float32Array]",T="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",D="[object Int32Array]",N="[object Uint8Array]",I="[object Uint16Array]",w="[object Uint32Array]",O=/\b__p \+= '';/g,x=/\b(__p \+=) '' \+/g,R=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,P=/[&<>"']/g,k=RegExp(L.source),M=RegExp(P.source),F=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,U=/<%=([\s\S]+?)%>/g,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,j=/^\w*$/,H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,z=/[\\^$.*+?()[\]{}|]/g,V=RegExp(z.source),G=/^\s+/,K=/\s/,Y=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,X=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,$=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Q=/[()=,{}\[\]\/\s]/,J=/\\(\\)?/g,ee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ne=/^[-+]0x[0-9a-f]+$/i,le=/^0b[01]+$/i,ie=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,re=/^(?:0|[1-9]\d*)$/,ae=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,ce=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ve="["+de+"]",pe="["+se+"]",fe="\\d+",me="[a-z\\xdf-\\xf6\\xf8-\\xff]",Ee="[^\\ud800-\\udfff"+de+fe+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",ge="[^\\ud800-\\udfff]",he="(?:\\ud83c[\\udde6-\\uddff]){2}",Se="[\\ud800-\\udbff][\\udc00-\\udfff]",ye="[A-Z\\xc0-\\xd6\\xd8-\\xde]",be="(?:"+me+"|"+Ee+")",Te="(?:"+ye+"|"+Ee+")",Ce="(?:"+pe+"|"+_e+")?",Ae="[\\ufe0e\\ufe0f]?"+Ce+"(?:\\u200d(?:"+[ge,he,Se].join("|")+")[\\ufe0e\\ufe0f]?"+Ce+")*",De="(?:"+["[\\u2700-\\u27bf]",he,Se].join("|")+")"+Ae,Ne="(?:"+[ge+pe+"?",pe,he,Se,"[\\ud800-\\udfff]"].join("|")+")",Ie=RegExp("['’]","g"),we=RegExp(pe,"g"),Oe=RegExp(_e+"(?="+_e+")|"+Ne+Ae,"g"),xe=RegExp([ye+"?"+me+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ve,ye,"$"].join("|")+")",Te+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ve,ye+be,"$"].join("|")+")",ye+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ye+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fe,De].join("|"),"g"),Re=RegExp("[\\u200d\\ud800-\\udfff"+se+"\\ufe0e\\ufe0f]"),Le=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ke=-1,Me={};Me[b]=Me[T]=Me[C]=Me[A]=Me[D]=Me[N]=Me["[object Uint8ClampedArray]"]=Me[I]=Me[w]=!0,Me[o]=Me[r]=Me[S]=Me[a]=Me[y]=Me[u]=Me[c]=Me[s]=Me[v]=Me[p]=Me[f]=Me[m]=Me[E]=Me[_]=Me[h]=!1;var Fe={};Fe[o]=Fe[r]=Fe[S]=Fe[y]=Fe[a]=Fe[u]=Fe[b]=Fe[T]=Fe[C]=Fe[A]=Fe[D]=Fe[v]=Fe[p]=Fe[f]=Fe[m]=Fe[E]=Fe[_]=Fe[g]=Fe[N]=Fe["[object Uint8ClampedArray]"]=Fe[I]=Fe[w]=!0,Fe[c]=Fe[s]=Fe[h]=!1;var Be={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ue=parseFloat,We=parseInt,je="object"==typeof q&&q&&q.Object===Object&&q,He="object"==typeof self&&self&&self.Object===Object&&self,ze=je||He||Function("return this")(),Ve=t&&!t.nodeType&&t,Ge=Ve&&e&&!e.nodeType&&e,Ke=Ge&&Ge.exports===Ve,qe=Ke&&je.process,Ye=function(){try{return Ge&&Ge.require&&Ge.require("util").types||qe&&qe.binding&&qe.binding("util")}catch(e){}}(),Xe=Ye&&Ye.isArrayBuffer,Ze=Ye&&Ye.isDate,$e=Ye&&Ye.isMap,Qe=Ye&&Ye.isRegExp,Je=Ye&&Ye.isSet,et=Ye&&Ye.isTypedArray;function tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function nt(e,t,n,l){for(var i=-1,o=null==e?0:e.length;++i<o;){var r=e[i];t(l,r,n(r),e)}return l}function lt(e,t){for(var n=-1,l=null==e?0:e.length;++n<l&&!1!==t(e[n],n,e););return e}function it(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ot(e,t){for(var n=-1,l=null==e?0:e.length;++n<l;)if(!t(e[n],n,e))return!1;return!0}function rt(e,t){for(var n=-1,l=null==e?0:e.length,i=0,o=[];++n<l;){var r=e[n];t(r,n,e)&&(o[i++]=r)}return o}function at(e,t){return!(null==e||!e.length)&&_t(e,t,0)>-1}function ut(e,t,n){for(var l=-1,i=null==e?0:e.length;++l<i;)if(n(t,e[l]))return!0;return!1}function ct(e,t){for(var n=-1,l=null==e?0:e.length,i=Array(l);++n<l;)i[n]=t(e[n],n,e);return i}function st(e,t){for(var n=-1,l=t.length,i=e.length;++n<l;)e[i+n]=t[n];return e}function dt(e,t,n,l){var i=-1,o=null==e?0:e.length;for(l&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function vt(e,t,n,l){var i=null==e?0:e.length;for(l&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function pt(e,t){for(var n=-1,l=null==e?0:e.length;++n<l;)if(t(e[n],n,e))return!0;return!1}var ft=yt("length");function mt(e,t,n){var l;return n(e,function(e,n,i){if(t(e,n,i))return l=n,!1}),l}function Et(e,t,n,l){for(var i=e.length,o=n+(l?1:-1);l?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function _t(e,t,n){return t==t?function(e,t,n){for(var l=n-1,i=e.length;++l<i;)if(e[l]===t)return l;return-1}(e,t,n):Et(e,ht,n)}function gt(e,t,n,l){for(var i=n-1,o=e.length;++i<o;)if(l(e[i],t))return i;return-1}function ht(e){return e!=e}function St(e,t){var n=null==e?0:e.length;return n?Ct(e,t)/n:NaN}function yt(e){return function(t){return null==t?void 0:t[e]}}function bt(e){return function(t){return null==e?void 0:e[t]}}function Tt(e,t,n,l,i){return i(e,function(e,i,o){n=l?(l=!1,e):t(n,e,i,o)}),n}function Ct(e,t){for(var n,l=-1,i=e.length;++l<i;){var o=t(e[l]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function At(e,t){for(var n=-1,l=Array(e);++n<e;)l[n]=t(n);return l}function Dt(e){return e?e.slice(0,Vt(e)+1).replace(G,""):e}function Nt(e){return function(t){return e(t)}}function It(e,t){return ct(t,function(t){return e[t]})}function wt(e,t){return e.has(t)}function Ot(e,t){for(var n=-1,l=e.length;++n<l&&_t(t,e[n],0)>-1;);return n}function xt(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function Rt(e,t){for(var n=e.length,l=0;n--;)e[n]===t&&++l;return l}var Lt=bt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Pt=bt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function kt(e){return"\\"+Be[e]}function Mt(e){return Re.test(e)}function Ft(e){var t=-1,n=Array(e.size);return e.forEach(function(e,l){n[++t]=[l,e]}),n}function Bt(e,t){return function(n){return e(t(n))}}function Ut(e,t){for(var n=-1,i=e.length,o=0,r=[];++n<i;){var a=e[n];a!==t&&a!==l||(e[n]=l,r[o++]=n)}return r}function Wt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function jt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function Ht(e){return Mt(e)?function(e){for(var t=Oe.lastIndex=0;Oe.test(e);)++t;return t}(e):ft(e)}function zt(e){return Mt(e)?function(e){return e.match(Oe)||[]}(e):function(e){return e.split("")}(e)}function Vt(e){for(var t=e.length;t--&&K.test(e.charAt(t)););return t}var Gt=bt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Kt=function e(t){var K=(t=null==t?ze:Kt.defaults(ze.Object(),t,Kt.pick(ze,Pe))).Array,q=t.Date,se=t.Error,de=t.Function,ve=t.Math,pe=t.Object,fe=t.RegExp,me=t.String,Ee=t.TypeError,_e=K.prototype,ge=pe.prototype,he=t["__core-js_shared__"],Se=de.prototype.toString,ye=ge.hasOwnProperty,be=0,Te=function(){var e=/[^.]+$/.exec(he&&he.keys&&he.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ce=ge.toString,Ae=Se.call(pe),De=ze._,Ne=fe("^"+Se.call(ye).replace(z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Oe=Ke?t.Buffer:void 0,Re=t.Symbol,Be=t.Uint8Array,je=Oe?Oe.allocUnsafe:void 0,He=Bt(pe.getPrototypeOf,pe),Ve=pe.create,Ge=ge.propertyIsEnumerable,qe=_e.splice,Ye=Re?Re.isConcatSpreadable:void 0,ft=Re?Re.iterator:void 0,bt=Re?Re.toStringTag:void 0,qt=function(){try{var e=$i(pe,"defineProperty");return e({},"",{}),e}catch(e){}}(),Yt=t.clearTimeout!==ze.clearTimeout&&t.clearTimeout,Xt=q&&q.now!==ze.Date.now&&q.now,Zt=t.setTimeout!==ze.setTimeout&&t.setTimeout,$t=ve.ceil,Qt=ve.floor,Jt=pe.getOwnPropertySymbols,en=Oe?Oe.isBuffer:void 0,tn=t.isFinite,nn=_e.join,ln=Bt(pe.keys,pe),on=ve.max,rn=ve.min,an=q.now,un=t.parseInt,cn=ve.random,sn=_e.reverse,dn=$i(t,"DataView"),vn=$i(t,"Map"),pn=$i(t,"Promise"),fn=$i(t,"Set"),mn=$i(t,"WeakMap"),En=$i(pe,"create"),_n=mn&&new mn,gn={},hn=Ao(dn),Sn=Ao(vn),yn=Ao(pn),bn=Ao(fn),Tn=Ao(mn),Cn=Re?Re.prototype:void 0,An=Cn?Cn.valueOf:void 0,Dn=Cn?Cn.toString:void 0;function Nn(e){if(Hr(e)&&!xr(e)&&!(e instanceof xn)){if(e instanceof On)return e;if(ye.call(e,"__wrapped__"))return Do(e)}return new On(e)}var In=function(){function e(){}return function(t){if(!jr(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function wn(){}function On(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function xn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Rn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}function Ln(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}function kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Pn;++t<n;)this.add(e[t])}function Mn(e){var t=this.__data__=new Ln(e);this.size=t.size}function Fn(e,t){var n=xr(e),l=!n&&Or(e),i=!n&&!l&&kr(e),o=!n&&!l&&!i&&Zr(e),r=n||l||i||o,a=r?At(e.length,me):[],u=a.length;for(var c in e)!t&&!ye.call(e,c)||r&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||io(c,u))||a.push(c);return a}function Bn(e){var t=e.length;return t?e[Pl(0,t-1)]:void 0}function Un(e,t){return bo(mi(e),Yn(t,0,e.length))}function Wn(e){return bo(mi(e))}function jn(e,t,n){(void 0!==n&&!Nr(e[t],n)||void 0===n&&!(t in e))&&Kn(e,t,n)}function Hn(e,t,n){var l=e[t];ye.call(e,t)&&Nr(l,n)&&(void 0!==n||t in e)||Kn(e,t,n)}function zn(e,t){for(var n=e.length;n--;)if(Nr(e[n][0],t))return n;return-1}function Vn(e,t,n,l){return Jn(e,function(e,i,o){t(l,e,n(e),o)}),l}function Gn(e,t){return e&&Ei(t,ga(t),e)}function Kn(e,t,n){"__proto__"==t&&qt?qt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function qn(e,t){for(var n=-1,l=t.length,i=K(l),o=null==e;++n<l;)i[n]=o?void 0:pa(e,t[n]);return i}function Yn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Xn(e,t,n,l,i,r){var c,h=1&t,O=2&t,x=4&t;if(n&&(c=i?n(e,l,i,r):n(e)),void 0!==c)return c;if(!jr(e))return e;var R=xr(e);if(R){if(c=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ye.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!h)return mi(e,c)}else{var L=eo(e),P=L==s||L==d;if(kr(e))return ci(e,h);if(L==f||L==o||P&&!i){if(c=O||P?{}:no(e),!h)return O?function(e,t){return Ei(e,Ji(e),t)}(e,function(e,t){return e&&Ei(t,ha(t),e)}(c,e)):function(e,t){return Ei(e,Qi(e),t)}(e,Gn(c,e))}else{if(!Fe[L])return i?e:{};c=function(e,t,n){var l=e.constructor;switch(t){case S:return si(e);case a:case u:return new l(+e);case y:return function(e,t){var n=t?si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case b:case T:case C:case A:case D:case N:case"[object Uint8ClampedArray]":case I:case w:return di(e,n);case v:return new l;case p:case _:return new l(e);case m:return function(e){var t=new e.constructor(e.source,te.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new l;case g:return An?pe(An.call(e)):{}}}(e,L,h)}}r||(r=new Mn);var k=r.get(e);if(k)return k;r.set(e,c),qr(e)?e.forEach(function(l){c.add(Xn(l,t,n,l,e,r))}):zr(e)&&e.forEach(function(l,i){c.set(i,Xn(l,t,n,i,e,r))});var M=R?void 0:(x?O?Vi:zi:O?ha:ga)(e);return lt(M||e,function(l,i){M&&(l=e[i=l]),Hn(c,i,Xn(l,t,n,i,e,r))}),c}function Zn(e,t,n){var l=n.length;if(null==e)return!l;for(e=pe(e);l--;){var i=n[l],o=e[i];if(void 0===o&&!(i in e)||!(0,t[i])(o))return!1}return!0}function $n(e,t,l){if("function"!=typeof e)throw new Ee(n);return go(function(){e.apply(void 0,l)},t)}function Qn(e,t,n,l){var i=-1,o=at,r=!0,a=e.length,u=[],c=t.length;if(!a)return u;n&&(t=ct(t,Nt(n))),l?(o=ut,r=!1):t.length>=200&&(o=wt,r=!1,t=new kn(t));e:for(;++i<a;){var s=e[i],d=null==n?s:n(s);if(s=l||0!==s?s:0,r&&d==d){for(var v=c;v--;)if(t[v]===d)continue e;u.push(s)}else o(t,d,l)||u.push(s)}return u}Nn.templateSettings={escape:F,evaluate:B,interpolate:U,variable:"",imports:{_:Nn}},(Nn.prototype=wn.prototype).constructor=Nn,(On.prototype=In(wn.prototype)).constructor=On,(xn.prototype=In(wn.prototype)).constructor=xn,Rn.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},Rn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Rn.prototype.get=function(e){var t=this.__data__;if(En){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ye.call(t,e)?t[e]:void 0},Rn.prototype.has=function(e){var t=this.__data__;return En?void 0!==t[e]:ye.call(t,e)},Rn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=En&&void 0===t?"__lodash_hash_undefined__":t,this},Ln.prototype.clear=function(){this.__data__=[],this.size=0},Ln.prototype.delete=function(e){var t=this.__data__,n=zn(t,e);return!(n<0||(n==t.length-1?t.pop():qe.call(t,n,1),--this.size,0))},Ln.prototype.get=function(e){var t=this.__data__,n=zn(t,e);return n<0?void 0:t[n][1]},Ln.prototype.has=function(e){return zn(this.__data__,e)>-1},Ln.prototype.set=function(e,t){var n=this.__data__,l=zn(n,e);return l<0?(++this.size,n.push([e,t])):n[l][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Rn,map:new(vn||Ln),string:new Rn}},Pn.prototype.delete=function(e){var t=Xi(this,e).delete(e);return this.size-=t?1:0,t},Pn.prototype.get=function(e){return Xi(this,e).get(e)},Pn.prototype.has=function(e){return Xi(this,e).has(e)},Pn.prototype.set=function(e,t){var n=Xi(this,e),l=n.size;return n.set(e,t),this.size+=n.size==l?0:1,this},kn.prototype.add=kn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},kn.prototype.has=function(e){return this.__data__.has(e)},Mn.prototype.clear=function(){this.__data__=new Ln,this.size=0},Mn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Mn.prototype.get=function(e){return this.__data__.get(e)},Mn.prototype.has=function(e){return this.__data__.has(e)},Mn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ln){var l=n.__data__;if(!vn||l.length<199)return l.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pn(l)}return n.set(e,t),this.size=n.size,this};var Jn=hi(al),el=hi(ul,!0);function tl(e,t){var n=!0;return Jn(e,function(e,l,i){return n=!!t(e,l,i)}),n}function nl(e,t,n){for(var l=-1,i=e.length;++l<i;){var o=e[l],r=t(o);if(null!=r&&(void 0===a?r==r&&!Xr(r):n(r,a)))var a=r,u=o}return u}function ll(e,t){var n=[];return Jn(e,function(e,l,i){t(e,l,i)&&n.push(e)}),n}function il(e,t,n,l,i){var o=-1,r=e.length;for(n||(n=lo),i||(i=[]);++o<r;){var a=e[o];t>0&&n(a)?t>1?il(a,t-1,n,l,i):st(i,a):l||(i[i.length]=a)}return i}var ol=Si(),rl=Si(!0);function al(e,t){return e&&ol(e,t,ga)}function ul(e,t){return e&&rl(e,t,ga)}function cl(e,t){return rt(t,function(t){return Br(e[t])})}function sl(e,t){for(var n=0,l=(t=oi(t,e)).length;null!=e&&n<l;)e=e[Co(t[n++])];return n&&n==l?e:void 0}function dl(e,t,n){var l=t(e);return xr(e)?l:st(l,n(e))}function vl(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":bt&&bt in pe(e)?function(e){var t=ye.call(e,bt),n=e[bt];try{e[bt]=void 0;var l=!0}catch(e){}var i=Ce.call(e);return l&&(t?e[bt]=n:delete e[bt]),i}(e):function(e){return Ce.call(e)}(e)}function pl(e,t){return e>t}function fl(e,t){return null!=e&&ye.call(e,t)}function ml(e,t){return null!=e&&t in pe(e)}function El(e,t,n){for(var l=n?ut:at,i=e[0].length,o=e.length,r=o,a=K(o),u=Infinity,c=[];r--;){var s=e[r];r&&t&&(s=ct(s,Nt(t))),u=rn(s.length,u),a[r]=!n&&(t||i>=120&&s.length>=120)?new kn(r&&s):void 0}s=e[0];var d=-1,v=a[0];e:for(;++d<i&&c.length<u;){var p=s[d],f=t?t(p):p;if(p=n||0!==p?p:0,!(v?wt(v,f):l(c,f,n))){for(r=o;--r;){var m=a[r];if(!(m?wt(m,f):l(e[r],f,n)))continue e}v&&v.push(f),c.push(p)}}return c}function _l(e,t,n){var l=null==(e=fo(e,t=oi(t,e)))?e:e[Co(Fo(t))];return null==l?void 0:tt(l,e,n)}function gl(e){return Hr(e)&&vl(e)==o}function hl(e,t,n,l,i){return e===t||(null==e||null==t||!Hr(e)&&!Hr(t)?e!=e&&t!=t:function(e,t,n,l,i,s){var d=xr(e),h=xr(t),b=d?r:eo(e),T=h?r:eo(t),C=(b=b==o?f:b)==f,A=(T=T==o?f:T)==f,D=b==T;if(D&&kr(e)){if(!kr(t))return!1;d=!0,C=!1}if(D&&!C)return s||(s=new Mn),d||Zr(e)?ji(e,t,n,l,i,s):function(e,t,n,l,i,o,r){switch(n){case y:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!o(new Be(e),new Be(t)));case a:case u:case p:return Nr(+e,+t);case c:return e.name==t.name&&e.message==t.message;case m:case _:return e==t+"";case v:var s=Ft;case E:if(s||(s=Wt),e.size!=t.size&&!(1&l))return!1;var d=r.get(e);if(d)return d==t;l|=2,r.set(e,t);var f=ji(s(e),s(t),l,i,o,r);return r.delete(e),f;case g:if(An)return An.call(e)==An.call(t)}return!1}(e,t,b,n,l,i,s);if(!(1&n)){var N=C&&ye.call(e,"__wrapped__"),I=A&&ye.call(t,"__wrapped__");if(N||I){var w=N?e.value():e,O=I?t.value():t;return s||(s=new Mn),i(w,O,n,l,s)}}return!!D&&(s||(s=new Mn),function(e,t,n,l,i,o){var r=1&n,a=zi(e),u=a.length;if(u!=zi(t).length&&!r)return!1;for(var c=u;c--;){var s=a[c];if(!(r?s in t:ye.call(t,s)))return!1}var d=o.get(e),v=o.get(t);if(d&&v)return d==t&&v==e;var p=!0;o.set(e,t),o.set(t,e);for(var f=r;++c<u;){var m=e[s=a[c]],E=t[s];if(l)var _=r?l(E,m,s,t,e,o):l(m,E,s,e,t,o);if(!(void 0===_?m===E||i(m,E,n,l,o):_)){p=!1;break}f||(f="constructor"==s)}if(p&&!f){var g=e.constructor,h=t.constructor;g==h||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof h&&h instanceof h||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,l,i,s))}(e,t,n,l,hl,i))}function Sl(e,t,n,l){var i=n.length,o=i,r=!l;if(null==e)return!o;for(e=pe(e);i--;){var a=n[i];if(r&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var u=(a=n[i])[0],c=e[u],s=a[1];if(r&&a[2]){if(void 0===c&&!(u in e))return!1}else{var d=new Mn;if(l)var v=l(c,s,u,e,t,d);if(!(void 0===v?hl(s,c,3,l,d):v))return!1}}return!0}function yl(e){return!(!jr(e)||(t=e,Te&&Te in t))&&(Br(e)?Ne:ie).test(Ao(e));var t}function bl(e){return"function"==typeof e?e:null==e?Va:"object"==typeof e?xr(e)?Nl(e[0],e[1]):Dl(e):Ja(e)}function Tl(e){if(!co(e))return ln(e);var t=[];for(var n in pe(e))ye.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Cl(e,t){return e<t}function Al(e,t){var n=-1,l=Lr(e)?K(e.length):[];return Jn(e,function(e,i,o){l[++n]=t(e,i,o)}),l}function Dl(e){var t=Zi(e);return 1==t.length&&t[0][2]?vo(t[0][0],t[0][1]):function(n){return n===e||Sl(n,e,t)}}function Nl(e,t){return ro(e)&&so(t)?vo(Co(e),t):function(n){var l=pa(n,e);return void 0===l&&l===t?fa(n,e):hl(t,l,3)}}function Il(e,t,n,l,i){e!==t&&ol(t,function(o,r){if(i||(i=new Mn),jr(o))!function(e,t,n,l,i,o,r){var a=Eo(e,n),u=Eo(t,n),c=r.get(u);if(c)jn(e,n,c);else{var s=o?o(a,u,n+"",e,t,r):void 0,d=void 0===s;if(d){var v=xr(u),p=!v&&kr(u),f=!v&&!p&&Zr(u);s=u,v||p||f?xr(a)?s=a:Pr(a)?s=mi(a):p?(d=!1,s=ci(u,!0)):f?(d=!1,s=di(u,!0)):s=[]:Gr(u)||Or(u)?(s=a,Or(a)?s=ia(a):jr(a)&&!Br(a)||(s=no(u))):d=!1}d&&(r.set(u,s),i(s,u,l,o,r),r.delete(u)),jn(e,n,s)}}(e,t,r,n,Il,l,i);else{var a=l?l(Eo(e,r),o,r+"",e,t,i):void 0;void 0===a&&(a=o),jn(e,r,a)}},ha)}function wl(e,t){var n=e.length;if(n)return io(t+=t<0?n:0,n)?e[t]:void 0}function Ol(e,t,n){t=t.length?ct(t,function(e){return xr(e)?function(t){return sl(t,1===e.length?e[0]:e)}:e}):[Va];var l=-1;return t=ct(t,Nt(Yi())),function(e,t){var l=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var l=-1,i=e.criteria,o=t.criteria,r=i.length,a=n.length;++l<r;){var u=vi(i[l],o[l]);if(u)return l>=a?u:u*("desc"==n[l]?-1:1)}return e.index-t.index}(e,t,n)});l--;)e[l]=e[l].value;return e}(Al(e,function(e,n,i){return{criteria:ct(t,function(t){return t(e)}),index:++l,value:e}}))}function xl(e,t,n){for(var l=-1,i=t.length,o={};++l<i;){var r=t[l],a=sl(e,r);n(a,r)&&Ul(o,oi(r,e),a)}return o}function Rl(e,t,n,l){var i=l?gt:_t,o=-1,r=t.length,a=e;for(e===t&&(t=mi(t)),n&&(a=ct(e,Nt(n)));++o<r;)for(var u=0,c=t[o],s=n?n(c):c;(u=i(a,s,u,l))>-1;)a!==e&&qe.call(a,u,1),qe.call(e,u,1);return e}function Ll(e,t){for(var n=e?t.length:0,l=n-1;n--;){var i=t[n];if(n==l||i!==o){var o=i;io(i)?qe.call(e,i,1):$l(e,i)}}return e}function Pl(e,t){return e+Qt(cn()*(t-e+1))}function kl(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function Ml(e,t){return ho(po(e,t,Va),e+"")}function Fl(e){return Bn(Na(e))}function Bl(e,t){var n=Na(e);return bo(n,Yn(t,0,n.length))}function Ul(e,t,n,l){if(!jr(e))return e;for(var i=-1,o=(t=oi(t,e)).length,r=o-1,a=e;null!=a&&++i<o;){var u=Co(t[i]),c=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(i!=r){var s=a[u];void 0===(c=l?l(s,u,a):void 0)&&(c=jr(s)?s:io(t[i+1])?[]:{})}Hn(a,u,c),a=a[u]}return e}var Wl=_n?function(e,t){return _n.set(e,t),e}:Va,jl=qt?function(e,t){return qt(e,"toString",{configurable:!0,enumerable:!1,value:ja(t),writable:!0})}:Va;function Hl(e){return bo(Na(e))}function zl(e,t,n){var l=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=K(i);++l<i;)o[l]=e[l+t];return o}function Vl(e,t){var n;return Jn(e,function(e,l,i){return!(n=t(e,l,i))}),!!n}function Gl(e,t,n){var l=0,i=null==e?l:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;l<i;){var o=l+i>>>1,r=e[o];null!==r&&!Xr(r)&&(n?r<=t:r<t)?l=o+1:i=o}return i}return Kl(e,t,Va,n)}function Kl(e,t,n,l){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var r=(t=n(t))!=t,a=null===t,u=Xr(t),c=void 0===t;i<o;){var s=Qt((i+o)/2),d=n(e[s]),v=void 0!==d,p=null===d,f=d==d,m=Xr(d);if(r)var E=l||f;else E=c?f&&(l||v):a?f&&v&&(l||!p):u?f&&v&&!p&&(l||!m):!p&&!m&&(l?d<=t:d<t);E?i=s+1:o=s}return rn(o,4294967294)}function ql(e,t){for(var n=-1,l=e.length,i=0,o=[];++n<l;){var r=e[n],a=t?t(r):r;if(!n||!Nr(a,u)){var u=a;o[i++]=0===r?0:r}}return o}function Yl(e){return"number"==typeof e?e:Xr(e)?NaN:+e}function Xl(e){if("string"==typeof e)return e;if(xr(e))return ct(e,Xl)+"";if(Xr(e))return Dn?Dn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Zl(e,t,n){var l=-1,i=at,o=e.length,r=!0,a=[],u=a;if(n)r=!1,i=ut;else if(o>=200){var c=t?null:ki(e);if(c)return Wt(c);r=!1,i=wt,u=new kn}else u=t?[]:a;e:for(;++l<o;){var s=e[l],d=t?t(s):s;if(s=n||0!==s?s:0,r&&d==d){for(var v=u.length;v--;)if(u[v]===d)continue e;t&&u.push(d),a.push(s)}else i(u,d,n)||(u!==a&&u.push(d),a.push(s))}return a}function $l(e,t){var n=-1,l=(t=oi(t,e)).length;if(!l)return!0;for(var i=null==e||"object"!=typeof e&&"function"!=typeof e;++n<l;){var o=t[n];if("string"==typeof o){if("__proto__"===o&&!ye.call(e,"__proto__"))return!1;if("constructor"===o&&n+1<l&&"string"==typeof t[n+1]&&"prototype"===t[n+1]){if(i&&0===n)continue;return!1}}}var r=fo(e,t);return null==r||delete r[Co(Fo(t))]}function Ql(e,t,n,l){return Ul(e,t,n(sl(e,t)),l)}function Jl(e,t,n,l){for(var i=e.length,o=l?i:-1;(l?o--:++o<i)&&t(e[o],o,e););return n?zl(e,l?0:o,l?o+1:i):zl(e,l?o+1:0,l?i:o)}function ei(e,t){var n=e;return n instanceof xn&&(n=n.value()),dt(t,function(e,t){return t.func.apply(t.thisArg,st([e],t.args))},n)}function ti(e,t,n){var l=e.length;if(l<2)return l?Zl(e[0]):[];for(var i=-1,o=K(l);++i<l;)for(var r=e[i],a=-1;++a<l;)a!=i&&(o[i]=Qn(o[i]||r,e[a],t,n));return Zl(il(o,1),t,n)}function ni(e,t,n){for(var l=-1,i=e.length,o=t.length,r={};++l<i;)n(r,e[l],l<o?t[l]:void 0);return r}function li(e){return Pr(e)?e:[]}function ii(e){return"function"==typeof e?e:Va}function oi(e,t){return xr(e)?e:ro(e,t)?[e]:To(oa(e))}var ri=Ml;function ai(e,t,n){var l=e.length;return n=void 0===n?l:n,!t&&n>=l?e:zl(e,t,n)}var ui=Yt||function(e){return ze.clearTimeout(e)};function ci(e,t){if(t)return e.slice();var n=e.length,l=je?je(n):new e.constructor(n);return e.copy(l),l}function si(e){var t=new e.constructor(e.byteLength);return new Be(t).set(new Be(e)),t}function di(e,t){var n=t?si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function vi(e,t){if(e!==t){var n=void 0!==e,l=null===e,i=e==e,o=Xr(e),r=void 0!==t,a=null===t,u=t==t,c=Xr(t);if(!a&&!c&&!o&&e>t||o&&r&&u&&!a&&!c||l&&r&&u||!n&&u||!i)return 1;if(!l&&!o&&!c&&e<t||c&&n&&i&&!l&&!o||a&&n&&i||!r&&i||!u)return-1}return 0}function pi(e,t,n,l){for(var i=-1,o=e.length,r=n.length,a=-1,u=t.length,c=on(o-r,0),s=K(u+c),d=!l;++a<u;)s[a]=t[a];for(;++i<r;)(d||i<o)&&(s[n[i]]=e[i]);for(;c--;)s[a++]=e[i++];return s}function fi(e,t,n,l){for(var i=-1,o=e.length,r=-1,a=n.length,u=-1,c=t.length,s=on(o-a,0),d=K(s+c),v=!l;++i<s;)d[i]=e[i];for(var p=i;++u<c;)d[p+u]=t[u];for(;++r<a;)(v||i<o)&&(d[p+n[r]]=e[i++]);return d}function mi(e,t){var n=-1,l=e.length;for(t||(t=K(l));++n<l;)t[n]=e[n];return t}function Ei(e,t,n,l){var i=!n;n||(n={});for(var o=-1,r=t.length;++o<r;){var a=t[o],u=l?l(n[a],e[a],a,n,e):void 0;void 0===u&&(u=e[a]),i?Kn(n,a,u):Hn(n,a,u)}return n}function _i(e,t){return function(n,l){var i=xr(n)?nt:Vn,o=t?t():{};return i(n,e,Yi(l,2),o)}}function gi(e){return Ml(function(t,n){var l=-1,i=n.length,o=i>1?n[i-1]:void 0,r=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,r&&oo(n[0],n[1],r)&&(o=i<3?void 0:o,i=1),t=pe(t);++l<i;){var a=n[l];a&&e(t,a,l,o)}return t})}function hi(e,t){return function(n,l){if(null==n)return n;if(!Lr(n))return e(n,l);for(var i=n.length,o=t?i:-1,r=pe(n);(t?o--:++o<i)&&!1!==l(r[o],o,r););return n}}function Si(e){return function(t,n,l){for(var i=-1,o=pe(t),r=l(t),a=r.length;a--;){var u=r[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function yi(e){return function(t){var n=Mt(t=oa(t))?zt(t):void 0,l=n?n[0]:t.charAt(0),i=n?ai(n,1).join(""):t.slice(1);return l[e]()+i}}function bi(e){return function(t){return dt(Ba(Oa(t).replace(Ie,"")),e,"")}}function Ti(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=In(e.prototype),l=e.apply(n,t);return jr(l)?l:n}}function Ci(e){return function(t,n,l){var i=pe(t);if(!Lr(t)){var o=Yi(n,3);t=ga(t),n=function(e){return o(i[e],e,i)}}var r=e(t,n,l);return r>-1?i[o?t[r]:r]:void 0}}function Ai(e){return Hi(function(t){var l=t.length,i=l,o=On.prototype.thru;for(e&&t.reverse();i--;){var r=t[i];if("function"!=typeof r)throw new Ee(n);if(o&&!a&&"wrapper"==Ki(r))var a=new On([],!0)}for(i=a?i:l;++i<l;){var u=Ki(r=t[i]),c="wrapper"==u?Gi(r):void 0;a=c&&ao(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?a[Ki(c[0])].apply(a,c[3]):1==r.length&&ao(r)?a[u]():a.thru(r)}return function(){var e=arguments,n=e[0];if(a&&1==e.length&&xr(n))return a.plant(n).value();for(var i=0,o=l?t[i].apply(this,e):n;++i<l;)o=t[i].call(this,o);return o}})}function Di(e,t,n,l,i,o,r,a,u,c){var s=128&t,d=1&t,v=2&t,p=24&t,f=512&t,m=v?void 0:Ti(e);return function E(){for(var _=arguments.length,g=K(_),h=_;h--;)g[h]=arguments[h];if(p)var S=qi(E),y=Rt(g,S);if(l&&(g=pi(g,l,i,p)),o&&(g=fi(g,o,r,p)),_-=y,p&&_<c){var b=Ut(g,S);return Li(e,t,Di,E.placeholder,n,g,b,a,u,c-_)}var T=d?n:this,C=v?T[e]:e;return _=g.length,a?g=mo(g,a):f&&_>1&&g.reverse(),s&&u<_&&(g.length=u),this&&this!==ze&&this instanceof E&&(C=m||Ti(C)),C.apply(T,g)}}function Ni(e,t){return function(n,l){return function(e,t,n,l){return al(e,function(e,i,o){t(l,n(e),i,o)}),l}(n,e,t(l),{})}}function Ii(e,t){return function(n,l){var i;if(void 0===n&&void 0===l)return t;if(void 0!==n&&(i=n),void 0!==l){if(void 0===i)return l;"string"==typeof n||"string"==typeof l?(n=Xl(n),l=Xl(l)):(n=Yl(n),l=Yl(l)),i=e(n,l)}return i}}function wi(e){return Hi(function(t){return t=ct(t,Nt(Yi())),Ml(function(n){var l=this;return e(t,function(e){return tt(e,l,n)})})})}function Oi(e,t){var n=(t=void 0===t?" ":Xl(t)).length;if(n<2)return n?kl(t,e):t;var l=kl(t,$t(e/Ht(t)));return Mt(t)?ai(zt(l),0,e).join(""):l.slice(0,e)}function xi(e){return function(t,n,l){return l&&"number"!=typeof l&&oo(t,n,l)&&(n=l=void 0),t=ea(t),void 0===n?(n=t,t=0):n=ea(n),function(e,t,n,l){for(var i=-1,o=on($t((t-e)/(n||1)),0),r=K(o);o--;)r[l?o:++i]=e,e+=n;return r}(t,n,l=void 0===l?t<n?1:-1:ea(l),e)}}function Ri(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=la(t),n=la(n)),e(t,n)}}function Li(e,t,n,l,i,o,r,a,u,c){var s=8&t;t|=s?32:64,4&(t&=~(s?64:32))||(t&=-4);var d=[e,t,i,s?o:void 0,s?r:void 0,s?void 0:o,s?void 0:r,a,u,c],v=n.apply(void 0,d);return ao(e)&&_o(v,d),v.placeholder=l,So(v,e,t)}function Pi(e){var t=ve[e];return function(e,n){if(e=la(e),(n=null==n?0:rn(ta(n),292))&&tn(e)){var l=(oa(e)+"e").split("e");return+((l=(oa(t(l[0]+"e"+(+l[1]+n)))+"e").split("e"))[0]+"e"+(+l[1]-n))}return t(e)}}var ki=fn&&1/Wt(new fn([,-0]))[1]==1/0?function(e){return new fn(e)}:Xa;function Mi(e){return function(t){var n=eo(t);return n==v?Ft(t):n==E?jt(t):function(e,t){return ct(t,function(t){return[t,e[t]]})}(t,e(t))}}function Fi(e,t,i,o,r,a,u,c){var s=2&t;if(!s&&"function"!=typeof e)throw new Ee(n);var d=o?o.length:0;if(d||(t&=-97,o=r=void 0),u=void 0===u?u:on(ta(u),0),c=void 0===c?c:ta(c),d-=r?r.length:0,64&t){var v=o,p=r;o=r=void 0}var f=s?void 0:Gi(e),m=[e,t,i,o,r,v,p,a,u,c];if(f&&function(e,t){var n=e[1],i=t[1],o=n|i;if(!(o<131||128==i&&8==n||128==i&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n))return e;1&i&&(e[2]=t[2],o|=1&n?0:4);var r=t[3];if(r){var a=e[3];e[3]=a?pi(a,r,t[4]):r,e[4]=a?Ut(e[3],l):t[4]}(r=t[5])&&(e[5]=(a=e[5])?fi(a,r,t[6]):r,e[6]=a?Ut(e[5],l):t[6]),(r=t[7])&&(e[7]=r),128&i&&(e[8]=null==e[8]?t[8]:rn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(m,f),e=m[0],t=m[1],i=m[2],o=m[3],r=m[4],!(c=m[9]=void 0===m[9]?s?0:e.length:on(m[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||16==t?function(e,t,n){var l=Ti(e);return function i(){for(var o=arguments.length,r=K(o),a=o,u=qi(i);a--;)r[a]=arguments[a];var c=o<3&&r[0]!==u&&r[o-1]!==u?[]:Ut(r,u);if((o-=c.length)<n)return Li(e,t,Di,i.placeholder,void 0,r,c,void 0,void 0,n-o);var s=this&&this!==ze&&this instanceof i?l:e;return tt(s,this,r)}}(e,t,c):32!=t&&33!=t||r.length?Di.apply(void 0,m):function(e,t,n,l){var i=1&t,o=Ti(e);return function t(){for(var r=-1,a=arguments.length,u=-1,c=l.length,s=K(c+a),d=this&&this!==ze&&this instanceof t?o:e;++u<c;)s[u]=l[u];for(;a--;)s[u++]=arguments[++r];return tt(d,i?n:this,s)}}(e,t,i,o);else var E=function(e,t,n){var l=1&t,i=Ti(e);return function t(){var o=this&&this!==ze&&this instanceof t?i:e;return o.apply(l?n:this,arguments)}}(e,t,i);return So((f?Wl:_o)(E,m),e,t)}function Bi(e,t,n,l){return void 0===e||Nr(e,ge[n])&&!ye.call(l,n)?t:e}function Ui(e,t,n,l,i,o){return jr(e)&&jr(t)&&(o.set(t,e),Il(e,t,void 0,Ui,o),o.delete(t)),e}function Wi(e){return Gr(e)?void 0:e}function ji(e,t,n,l,i,o){var r=1&n,a=e.length,u=t.length;if(a!=u&&!(r&&u>a))return!1;var c=o.get(e),s=o.get(t);if(c&&s)return c==t&&s==e;var d=-1,v=!0,p=2&n?new kn:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var f=e[d],m=t[d];if(l)var E=r?l(m,f,d,t,e,o):l(f,m,d,e,t,o);if(void 0!==E){if(E)continue;v=!1;break}if(p){if(!pt(t,function(e,t){if(!wt(p,t)&&(f===e||i(f,e,n,l,o)))return p.push(t)})){v=!1;break}}else if(f!==m&&!i(f,m,n,l,o)){v=!1;break}}return o.delete(e),o.delete(t),v}function Hi(e){return ho(po(e,void 0,Ro),e+"")}function zi(e){return dl(e,ga,Qi)}function Vi(e){return dl(e,ha,Ji)}var Gi=_n?function(e){return _n.get(e)}:Xa;function Ki(e){for(var t=e.name+"",n=gn[t],l=ye.call(gn,t)?n.length:0;l--;){var i=n[l],o=i.func;if(null==o||o==e)return i.name}return t}function qi(e){return(ye.call(Nn,"placeholder")?Nn:e).placeholder}function Yi(){var e=Nn.iteratee||Ga;return e=e===Ga?bl:e,arguments.length?e(arguments[0],arguments[1]):e}function Xi(e,t){var n,l,i=e.__data__;return("string"==(l=typeof(n=t))||"number"==l||"symbol"==l||"boolean"==l?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Zi(e){for(var t=ga(e),n=t.length;n--;){var l=t[n],i=e[l];t[n]=[l,i,so(i)]}return t}function $i(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return yl(n)?n:void 0}var Qi=Jt?function(e){return null==e?[]:(e=pe(e),rt(Jt(e),function(t){return Ge.call(e,t)}))}:nu,Ji=Jt?function(e){for(var t=[];e;)st(t,Qi(e)),e=He(e);return t}:nu,eo=vl;function to(e,t,n){for(var l=-1,i=(t=oi(t,e)).length,o=!1;++l<i;){var r=Co(t[l]);if(!(o=null!=e&&n(e,r)))break;e=e[r]}return o||++l!=i?o:!!(i=null==e?0:e.length)&&Wr(i)&&io(r,i)&&(xr(e)||Or(e))}function no(e){return"function"!=typeof e.constructor||co(e)?{}:In(He(e))}function lo(e){return xr(e)||Or(e)||!!(Ye&&e&&e[Ye])}function io(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&re.test(e))&&e>-1&&e%1==0&&e<t}function oo(e,t,n){if(!jr(n))return!1;var l=typeof t;return!!("number"==l?Lr(n)&&io(t,n.length):"string"==l&&t in n)&&Nr(n[t],e)}function ro(e,t){if(xr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Xr(e))||j.test(e)||!W.test(e)||null!=t&&e in pe(t)}function ao(e){var t=Ki(e),n=Nn[t];if("function"!=typeof n||!(t in xn.prototype))return!1;if(e===n)return!0;var l=Gi(n);return!!l&&e===l[0]}(dn&&eo(new dn(new ArrayBuffer(1)))!=y||vn&&eo(new vn)!=v||pn&&"[object Promise]"!=eo(pn.resolve())||fn&&eo(new fn)!=E||mn&&eo(new mn)!=h)&&(eo=function(e){var t=vl(e),n=t==f?e.constructor:void 0,l=n?Ao(n):"";if(l)switch(l){case hn:return y;case Sn:return v;case yn:return"[object Promise]";case bn:return E;case Tn:return h}return t});var uo=he?Br:lu;function co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ge)}function so(e){return e==e&&!jr(e)}function vo(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in pe(n))}}function po(e,t,n){return t=on(void 0===t?e.length-1:t,0),function(){for(var l=arguments,i=-1,o=on(l.length-t,0),r=K(o);++i<o;)r[i]=l[t+i];i=-1;for(var a=K(t+1);++i<t;)a[i]=l[i];return a[t]=n(r),tt(e,this,a)}}function fo(e,t){return t.length<2?e:sl(e,zl(t,0,-1))}function mo(e,t){for(var n=e.length,l=rn(t.length,n),i=mi(e);l--;){var o=t[l];e[l]=io(o,n)?i[o]:void 0}return e}function Eo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var _o=yo(Wl),go=Zt||function(e,t){return ze.setTimeout(e,t)},ho=yo(jl);function So(e,t,n){var l=t+"";return ho(e,function(e,t){var n=t.length;if(!n)return e;var l=n-1;return t[l]=(n>1?"& ":"")+t[l],t=t.join(n>2?", ":" "),e.replace(Y,"{\n/* [wrapped with "+t+"] */\n")}(l,function(e,t){return lt(i,function(n){var l="_."+n[0];t&n[1]&&!at(e,l)&&e.push(l)}),e.sort()}(function(e){var t=e.match(X);return t?t[1].split(Z):[]}(l),n)))}function yo(e){var t=0,n=0;return function(){var l=an(),i=16-(l-n);if(n=l,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function bo(e,t){var n=-1,l=e.length,i=l-1;for(t=void 0===t?l:t;++n<t;){var o=Pl(n,i),r=e[o];e[o]=e[n],e[n]=r}return e.length=t,e}var To=function(e){var t=yr(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(H,function(e,n,l,i){t.push(l?i.replace(J,"$1"):n||e)}),t},function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}();function Co(e){if("string"==typeof e||Xr(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ao(e){if(null!=e){try{return Se.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Do(e){if(e instanceof xn)return e.clone();var t=new On(e.__wrapped__,e.__chain__);return t.__actions__=mi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var No=Ml(function(e,t){return Pr(e)?Qn(e,il(t,1,Pr,!0)):[]}),Io=Ml(function(e,t){var n=Fo(t);return Pr(n)&&(n=void 0),Pr(e)?Qn(e,il(t,1,Pr,!0),Yi(n,2)):[]}),wo=Ml(function(e,t){var n=Fo(t);return Pr(n)&&(n=void 0),Pr(e)?Qn(e,il(t,1,Pr,!0),void 0,n):[]});function Oo(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=null==n?0:ta(n);return i<0&&(i=on(l+i,0)),Et(e,Yi(t,3),i)}function xo(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=l-1;return void 0!==n&&(i=ta(n),i=n<0?on(l+i,0):rn(i,l-1)),Et(e,Yi(t,3),i,!0)}function Ro(e){return null!=e&&e.length?il(e,1):[]}function Lo(e){return e&&e.length?e[0]:void 0}var Po=Ml(function(e){var t=ct(e,li);return t.length&&t[0]===e[0]?El(t):[]}),ko=Ml(function(e){var t=Fo(e),n=ct(e,li);return t===Fo(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?El(n,Yi(t,2)):[]}),Mo=Ml(function(e){var t=Fo(e),n=ct(e,li);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?El(n,void 0,t):[]});function Fo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Bo=Ml(Uo);function Uo(e,t){return e&&e.length&&t&&t.length?Rl(e,t):e}var Wo=Hi(function(e,t){var n=null==e?0:e.length,l=qn(e,t);return Ll(e,ct(t,function(e){return io(e,n)?+e:e}).sort(vi)),l});function jo(e){return null==e?e:sn.call(e)}var Ho=Ml(function(e){return Zl(il(e,1,Pr,!0))}),zo=Ml(function(e){var t=Fo(e);return Pr(t)&&(t=void 0),Zl(il(e,1,Pr,!0),Yi(t,2))}),Vo=Ml(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,Zl(il(e,1,Pr,!0),void 0,t)});function Go(e){if(!e||!e.length)return[];var t=0;return e=rt(e,function(e){if(Pr(e))return t=on(e.length,t),!0}),At(t,function(t){return ct(e,yt(t))})}function Ko(e,t){if(!e||!e.length)return[];var n=Go(e);return null==t?n:ct(n,function(e){return tt(t,void 0,e)})}var qo=Ml(function(e,t){return Pr(e)?Qn(e,t):[]}),Yo=Ml(function(e){return ti(rt(e,Pr))}),Xo=Ml(function(e){var t=Fo(e);return Pr(t)&&(t=void 0),ti(rt(e,Pr),Yi(t,2))}),Zo=Ml(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,ti(rt(e,Pr),void 0,t)}),$o=Ml(Go),Qo=Ml(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ko(e,n)});function Jo(e){var t=Nn(e);return t.__chain__=!0,t}function er(e,t){return t(e)}var tr=Hi(function(e){var t=e.length,n=t?e[0]:0,l=this.__wrapped__,i=function(t){return qn(t,e)};return!(t>1||this.__actions__.length)&&l instanceof xn&&io(n)?((l=l.slice(n,+n+(t?1:0))).__actions__.push({func:er,args:[i],thisArg:void 0}),new On(l,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(i)}),nr=_i(function(e,t,n){ye.call(e,n)?++e[n]:Kn(e,n,1)}),lr=Ci(Oo),ir=Ci(xo);function or(e,t){return(xr(e)?lt:Jn)(e,Yi(t,3))}function rr(e,t){return(xr(e)?it:el)(e,Yi(t,3))}var ar=_i(function(e,t,n){ye.call(e,n)?e[n].push(t):Kn(e,n,[t])}),ur=Ml(function(e,t,n){var l=-1,i="function"==typeof t,o=Lr(e)?K(e.length):[];return Jn(e,function(e){o[++l]=i?tt(t,e,n):_l(e,t,n)}),o}),cr=_i(function(e,t,n){Kn(e,n,t)});function sr(e,t){return(xr(e)?ct:Al)(e,Yi(t,3))}var dr=_i(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),vr=Ml(function(e,t){if(null==e)return[];var n=t.length;return n>1&&oo(e,t[0],t[1])?t=[]:n>2&&oo(t[0],t[1],t[2])&&(t=[t[0]]),Ol(e,il(t,1),[])}),pr=Xt||function(){return ze.Date.now()};function fr(e,t,n){return t=n?void 0:t,Fi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function mr(e,t){var l;if("function"!=typeof t)throw new Ee(n);return e=ta(e),function(){return--e>0&&(l=t.apply(this,arguments)),e<=1&&(t=void 0),l}}var Er=Ml(function(e,t,n){var l=1;if(n.length){var i=Ut(n,qi(Er));l|=32}return Fi(e,l,t,n,i)}),_r=Ml(function(e,t,n){var l=3;if(n.length){var i=Ut(n,qi(_r));l|=32}return Fi(t,l,e,n,i)});function gr(e,t,l){var i,o,r,a,u,c,s=0,d=!1,v=!1,p=!0;if("function"!=typeof e)throw new Ee(n);function f(t){var n=i,l=o;return i=o=void 0,s=t,a=e.apply(l,n)}function m(e){return s=e,u=go(_,t),d?f(e):a}function E(e){var n=e-c;return void 0===c||n>=t||n<0||v&&e-s>=r}function _(){var e=pr();if(E(e))return g(e);u=go(_,function(e){var n=t-(e-c);return v?rn(n,r-(e-s)):n}(e))}function g(e){return u=void 0,p&&i?f(e):(i=o=void 0,a)}function h(){var e=pr(),n=E(e);if(i=arguments,o=this,c=e,n){if(void 0===u)return m(c);if(v)return ui(u),u=go(_,t),f(c)}return void 0===u&&(u=go(_,t)),a}return t=la(t)||0,jr(l)&&(d=!!l.leading,r=(v="maxWait"in l)?on(la(l.maxWait)||0,t):r,p="trailing"in l?!!l.trailing:p),h.cancel=function(){void 0!==u&&ui(u),s=0,i=c=o=u=void 0},h.flush=function(){return void 0===u?a:g(pr())},h}var hr=Ml(function(e,t){return $n(e,1,t)}),Sr=Ml(function(e,t,n){return $n(e,la(t)||0,n)});function yr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ee(n);var l=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=l.cache;if(o.has(i))return o.get(i);var r=e.apply(this,n);return l.cache=o.set(i,r)||o,r};return l.cache=new(yr.Cache||Pn),l}function br(e){if("function"!=typeof e)throw new Ee(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}yr.Cache=Pn;var Tr=ri(function(e,t){var n=(t=1==t.length&&xr(t[0])?ct(t[0],Nt(Yi())):ct(il(t,1),Nt(Yi()))).length;return Ml(function(l){for(var i=-1,o=rn(l.length,n);++i<o;)l[i]=t[i].call(this,l[i]);return tt(e,this,l)})}),Cr=Ml(function(e,t){return Fi(e,32,void 0,t,Ut(t,qi(Cr)))}),Ar=Ml(function(e,t){return Fi(e,64,void 0,t,Ut(t,qi(Ar)))}),Dr=Hi(function(e,t){return Fi(e,256,void 0,void 0,void 0,t)});function Nr(e,t){return e===t||e!=e&&t!=t}var Ir=Ri(pl),wr=Ri(function(e,t){return e>=t}),Or=gl(function(){return arguments}())?gl:function(e){return Hr(e)&&ye.call(e,"callee")&&!Ge.call(e,"callee")},xr=K.isArray,Rr=Xe?Nt(Xe):function(e){return Hr(e)&&vl(e)==S};function Lr(e){return null!=e&&Wr(e.length)&&!Br(e)}function Pr(e){return Hr(e)&&Lr(e)}var kr=en||lu,Mr=Ze?Nt(Ze):function(e){return Hr(e)&&vl(e)==u};function Fr(e){if(!Hr(e))return!1;var t=vl(e);return t==c||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Gr(e)}function Br(e){if(!jr(e))return!1;var t=vl(e);return t==s||t==d||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ur(e){return"number"==typeof e&&e==ta(e)}function Wr(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function jr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Hr(e){return null!=e&&"object"==typeof e}var zr=$e?Nt($e):function(e){return Hr(e)&&eo(e)==v};function Vr(e){return"number"==typeof e||Hr(e)&&vl(e)==p}function Gr(e){if(!Hr(e)||vl(e)!=f)return!1;var t=He(e);if(null===t)return!0;var n=ye.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Se.call(n)==Ae}var Kr=Qe?Nt(Qe):function(e){return Hr(e)&&vl(e)==m},qr=Je?Nt(Je):function(e){return Hr(e)&&eo(e)==E};function Yr(e){return"string"==typeof e||!xr(e)&&Hr(e)&&vl(e)==_}function Xr(e){return"symbol"==typeof e||Hr(e)&&vl(e)==g}var Zr=et?Nt(et):function(e){return Hr(e)&&Wr(e.length)&&!!Me[vl(e)]},$r=Ri(Cl),Qr=Ri(function(e,t){return e<=t});function Jr(e){if(!e)return[];if(Lr(e))return Yr(e)?zt(e):mi(e);if(ft&&e[ft])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[ft]());var t=eo(e);return(t==v?Ft:t==E?Wt:Na)(e)}function ea(e){return e?(e=la(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ta(e){var t=ea(e),n=t%1;return t==t?n?t-n:t:0}function na(e){return e?Yn(ta(e),0,4294967295):0}function la(e){if("number"==typeof e)return e;if(Xr(e))return NaN;if(jr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=jr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Dt(e);var n=le.test(e);return n||oe.test(e)?We(e.slice(2),n?2:8):ne.test(e)?NaN:+e}function ia(e){return Ei(e,ha(e))}function oa(e){return null==e?"":Xl(e)}var ra=gi(function(e,t){if(co(t)||Lr(t))Ei(t,ga(t),e);else for(var n in t)ye.call(t,n)&&Hn(e,n,t[n])}),aa=gi(function(e,t){Ei(t,ha(t),e)}),ua=gi(function(e,t,n,l){Ei(t,ha(t),e,l)}),ca=gi(function(e,t,n,l){Ei(t,ga(t),e,l)}),sa=Hi(qn),da=Ml(function(e,t){e=pe(e);var n=-1,l=t.length,i=l>2?t[2]:void 0;for(i&&oo(t[0],t[1],i)&&(l=1);++n<l;)for(var o=t[n],r=ha(o),a=-1,u=r.length;++a<u;){var c=r[a],s=e[c];(void 0===s||Nr(s,ge[c])&&!ye.call(e,c))&&(e[c]=o[c])}return e}),va=Ml(function(e){return e.push(void 0,Ui),tt(ya,void 0,e)});function pa(e,t,n){var l=null==e?void 0:sl(e,t);return void 0===l?n:l}function fa(e,t){return null!=e&&to(e,t,ml)}var ma=Ni(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),e[t]=n},ja(Va)),Ea=Ni(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),ye.call(e,t)?e[t].push(n):e[t]=[n]},Yi),_a=Ml(_l);function ga(e){return Lr(e)?Fn(e):Tl(e)}function ha(e){return Lr(e)?Fn(e,!0):function(e){if(!jr(e))return function(e){var t=[];if(null!=e)for(var n in pe(e))t.push(n);return t}(e);var t=co(e),n=[];for(var l in e)("constructor"!=l||!t&&ye.call(e,l))&&n.push(l);return n}(e)}var Sa=gi(function(e,t,n){Il(e,t,n)}),ya=gi(function(e,t,n,l){Il(e,t,n,l)}),ba=Hi(function(e,t){var n={};if(null==e)return n;var l=!1;t=ct(t,function(t){return t=oi(t,e),l||(l=t.length>1),t}),Ei(e,Vi(e),n),l&&(n=Xn(n,7,Wi));for(var i=t.length;i--;)$l(n,t[i]);return n}),Ta=Hi(function(e,t){return null==e?{}:function(e,t){return xl(e,t,function(t,n){return fa(e,n)})}(e,t)});function Ca(e,t){if(null==e)return{};var n=ct(Vi(e),function(e){return[e]});return t=Yi(t),xl(e,n,function(e,n){return t(e,n[0])})}var Aa=Mi(ga),Da=Mi(ha);function Na(e){return null==e?[]:It(e,ga(e))}var Ia=bi(function(e,t,n){return t=t.toLowerCase(),e+(n?wa(t):t)});function wa(e){return Fa(oa(e).toLowerCase())}function Oa(e){return(e=oa(e))&&e.replace(ae,Lt).replace(we,"")}var xa=bi(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ra=bi(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),La=yi("toLowerCase"),Pa=bi(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),ka=bi(function(e,t,n){return e+(n?" ":"")+Fa(t)}),Ma=bi(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Fa=yi("toUpperCase");function Ba(e,t,n){return e=oa(e),void 0===(t=n?void 0:t)?function(e){return Le.test(e)}(e)?function(e){return e.match(xe)||[]}(e):function(e){return e.match($)||[]}(e):e.match(t)||[]}var Ua=Ml(function(e,t){try{return tt(e,void 0,t)}catch(e){return Fr(e)?e:new se(e)}}),Wa=Hi(function(e,t){return lt(t,function(t){t=Co(t),Kn(e,t,Er(e[t],e))}),e});function ja(e){return function(){return e}}var Ha=Ai(),za=Ai(!0);function Va(e){return e}function Ga(e){return bl("function"==typeof e?e:Xn(e,1))}var Ka=Ml(function(e,t){return function(n){return _l(n,e,t)}}),qa=Ml(function(e,t){return function(n){return _l(e,n,t)}});function Ya(e,t,n){var l=ga(t),i=cl(t,l);null!=n||jr(t)&&(i.length||!l.length)||(n=t,t=e,e=this,i=cl(t,ga(t)));var o=!(jr(n)&&"chain"in n&&!n.chain),r=Br(e);return lt(i,function(n){var l=t[n];e[n]=l,r&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=mi(this.__actions__);return i.push({func:l,args:arguments,thisArg:e}),n.__chain__=t,n}return l.apply(e,st([this.value()],arguments))})}),e}function Xa(){}var Za=wi(ct),$a=wi(ot),Qa=wi(pt);function Ja(e){return ro(e)?yt(Co(e)):function(e){return function(t){return sl(t,e)}}(e)}var eu=xi(),tu=xi(!0);function nu(){return[]}function lu(){return!1}var iu,ou=Ii(function(e,t){return e+t},0),ru=Pi("ceil"),au=Ii(function(e,t){return e/t},1),uu=Pi("floor"),cu=Ii(function(e,t){return e*t},1),su=Pi("round"),du=Ii(function(e,t){return e-t},0);return Nn.after=function(e,t){if("function"!=typeof t)throw new Ee(n);return e=ta(e),function(){if(--e<1)return t.apply(this,arguments)}},Nn.ary=fr,Nn.assign=ra,Nn.assignIn=aa,Nn.assignInWith=ua,Nn.assignWith=ca,Nn.at=sa,Nn.before=mr,Nn.bind=Er,Nn.bindAll=Wa,Nn.bindKey=_r,Nn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return xr(e)?e:[e]},Nn.chain=Jo,Nn.chunk=function(e,t,n){t=(n?oo(e,t,n):void 0===t)?1:on(ta(t),0);var l=null==e?0:e.length;if(!l||t<1)return[];for(var i=0,o=0,r=K($t(l/t));i<l;)r[o++]=zl(e,i,i+=t);return r},Nn.compact=function(e){for(var t=-1,n=null==e?0:e.length,l=0,i=[];++t<n;){var o=e[t];o&&(i[l++]=o)}return i},Nn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=K(e-1),n=arguments[0],l=e;l--;)t[l-1]=arguments[l];return st(xr(n)?mi(n):[n],il(t,1))},Nn.cond=function(e){var t=null==e?0:e.length,l=Yi();return e=t?ct(e,function(e){if("function"!=typeof e[1])throw new Ee(n);return[l(e[0]),e[1]]}):[],Ml(function(n){for(var l=-1;++l<t;){var i=e[l];if(tt(i[0],this,n))return tt(i[1],this,n)}})},Nn.conforms=function(e){return function(e){var t=ga(e);return function(n){return Zn(n,e,t)}}(Xn(e,1))},Nn.constant=ja,Nn.countBy=nr,Nn.create=function(e,t){var n=In(e);return null==t?n:Gn(n,t)},Nn.curry=function e(t,n,l){var i=Fi(t,8,void 0,void 0,void 0,void 0,void 0,n=l?void 0:n);return i.placeholder=e.placeholder,i},Nn.curryRight=function e(t,n,l){var i=Fi(t,16,void 0,void 0,void 0,void 0,void 0,n=l?void 0:n);return i.placeholder=e.placeholder,i},Nn.debounce=gr,Nn.defaults=da,Nn.defaultsDeep=va,Nn.defer=hr,Nn.delay=Sr,Nn.difference=No,Nn.differenceBy=Io,Nn.differenceWith=wo,Nn.drop=function(e,t,n){var l=null==e?0:e.length;return l?zl(e,(t=n||void 0===t?1:ta(t))<0?0:t,l):[]},Nn.dropRight=function(e,t,n){var l=null==e?0:e.length;return l?zl(e,0,(t=l-(t=n||void 0===t?1:ta(t)))<0?0:t):[]},Nn.dropRightWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3),!0,!0):[]},Nn.dropWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3),!0):[]},Nn.fill=function(e,t,n,l){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&oo(e,t,n)&&(n=0,l=i),function(e,t,n,l){var i=e.length;for((n=ta(n))<0&&(n=-n>i?0:i+n),(l=void 0===l||l>i?i:ta(l))<0&&(l+=i),l=n>l?0:na(l);n<l;)e[n++]=t;return e}(e,t,n,l)):[]},Nn.filter=function(e,t){return(xr(e)?rt:ll)(e,Yi(t,3))},Nn.flatMap=function(e,t){return il(sr(e,t),1)},Nn.flatMapDeep=function(e,t){return il(sr(e,t),1/0)},Nn.flatMapDepth=function(e,t,n){return n=void 0===n?1:ta(n),il(sr(e,t),n)},Nn.flatten=Ro,Nn.flattenDeep=function(e){return null!=e&&e.length?il(e,1/0):[]},Nn.flattenDepth=function(e,t){return null!=e&&e.length?il(e,t=void 0===t?1:ta(t)):[]},Nn.flip=function(e){return Fi(e,512)},Nn.flow=Ha,Nn.flowRight=za,Nn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,l={};++t<n;){var i=e[t];l[i[0]]=i[1]}return l},Nn.functions=function(e){return null==e?[]:cl(e,ga(e))},Nn.functionsIn=function(e){return null==e?[]:cl(e,ha(e))},Nn.groupBy=ar,Nn.initial=function(e){return null!=e&&e.length?zl(e,0,-1):[]},Nn.intersection=Po,Nn.intersectionBy=ko,Nn.intersectionWith=Mo,Nn.invert=ma,Nn.invertBy=Ea,Nn.invokeMap=ur,Nn.iteratee=Ga,Nn.keyBy=cr,Nn.keys=ga,Nn.keysIn=ha,Nn.map=sr,Nn.mapKeys=function(e,t){var n={};return t=Yi(t,3),al(e,function(e,l,i){Kn(n,t(e,l,i),e)}),n},Nn.mapValues=function(e,t){var n={};return t=Yi(t,3),al(e,function(e,l,i){Kn(n,l,t(e,l,i))}),n},Nn.matches=function(e){return Dl(Xn(e,1))},Nn.matchesProperty=function(e,t){return Nl(e,Xn(t,1))},Nn.memoize=yr,Nn.merge=Sa,Nn.mergeWith=ya,Nn.method=Ka,Nn.methodOf=qa,Nn.mixin=Ya,Nn.negate=br,Nn.nthArg=function(e){return e=ta(e),Ml(function(t){return wl(t,e)})},Nn.omit=ba,Nn.omitBy=function(e,t){return Ca(e,br(Yi(t)))},Nn.once=function(e){return mr(2,e)},Nn.orderBy=function(e,t,n,l){return null==e?[]:(xr(t)||(t=null==t?[]:[t]),xr(n=l?void 0:n)||(n=null==n?[]:[n]),Ol(e,t,n))},Nn.over=Za,Nn.overArgs=Tr,Nn.overEvery=$a,Nn.overSome=Qa,Nn.partial=Cr,Nn.partialRight=Ar,Nn.partition=dr,Nn.pick=Ta,Nn.pickBy=Ca,Nn.property=Ja,Nn.propertyOf=function(e){return function(t){return null==e?void 0:sl(e,t)}},Nn.pull=Bo,Nn.pullAll=Uo,Nn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Rl(e,t,Yi(n,2)):e},Nn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Rl(e,t,void 0,n):e},Nn.pullAt=Wo,Nn.range=eu,Nn.rangeRight=tu,Nn.rearg=Dr,Nn.reject=function(e,t){return(xr(e)?rt:ll)(e,br(Yi(t,3)))},Nn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var l=-1,i=[],o=e.length;for(t=Yi(t,3);++l<o;){var r=e[l];t(r,l,e)&&(n.push(r),i.push(l))}return Ll(e,i),n},Nn.rest=function(e,t){if("function"!=typeof e)throw new Ee(n);return Ml(e,t=void 0===t?t:ta(t))},Nn.reverse=jo,Nn.sampleSize=function(e,t,n){return t=(n?oo(e,t,n):void 0===t)?1:ta(t),(xr(e)?Un:Bl)(e,t)},Nn.set=function(e,t,n){return null==e?e:Ul(e,t,n)},Nn.setWith=function(e,t,n,l){return l="function"==typeof l?l:void 0,null==e?e:Ul(e,t,n,l)},Nn.shuffle=function(e){return(xr(e)?Wn:Hl)(e)},Nn.slice=function(e,t,n){var l=null==e?0:e.length;return l?(n&&"number"!=typeof n&&oo(e,t,n)?(t=0,n=l):(t=null==t?0:ta(t),n=void 0===n?l:ta(n)),zl(e,t,n)):[]},Nn.sortBy=vr,Nn.sortedUniq=function(e){return e&&e.length?ql(e):[]},Nn.sortedUniqBy=function(e,t){return e&&e.length?ql(e,Yi(t,2)):[]},Nn.split=function(e,t,n){return n&&"number"!=typeof n&&oo(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=oa(e))&&("string"==typeof t||null!=t&&!Kr(t))&&!(t=Xl(t))&&Mt(e)?ai(zt(e),0,n):e.split(t,n):[]},Nn.spread=function(e,t){if("function"!=typeof e)throw new Ee(n);return t=null==t?0:on(ta(t),0),Ml(function(n){var l=n[t],i=ai(n,0,t);return l&&st(i,l),tt(e,this,i)})},Nn.tail=function(e){var t=null==e?0:e.length;return t?zl(e,1,t):[]},Nn.take=function(e,t,n){return e&&e.length?zl(e,0,(t=n||void 0===t?1:ta(t))<0?0:t):[]},Nn.takeRight=function(e,t,n){var l=null==e?0:e.length;return l?zl(e,(t=l-(t=n||void 0===t?1:ta(t)))<0?0:t,l):[]},Nn.takeRightWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3),!1,!0):[]},Nn.takeWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3)):[]},Nn.tap=function(e,t){return t(e),e},Nn.throttle=function(e,t,l){var i=!0,o=!0;if("function"!=typeof e)throw new Ee(n);return jr(l)&&(i="leading"in l?!!l.leading:i,o="trailing"in l?!!l.trailing:o),gr(e,t,{leading:i,maxWait:t,trailing:o})},Nn.thru=er,Nn.toArray=Jr,Nn.toPairs=Aa,Nn.toPairsIn=Da,Nn.toPath=function(e){return xr(e)?ct(e,Co):Xr(e)?[e]:mi(To(oa(e)))},Nn.toPlainObject=ia,Nn.transform=function(e,t,n){var l=xr(e),i=l||kr(e)||Zr(e);if(t=Yi(t,4),null==n){var o=e&&e.constructor;n=i?l?new o:[]:jr(e)&&Br(o)?In(He(e)):{}}return(i?lt:al)(e,function(e,l,i){return t(n,e,l,i)}),n},Nn.unary=function(e){return fr(e,1)},Nn.union=Ho,Nn.unionBy=zo,Nn.unionWith=Vo,Nn.uniq=function(e){return e&&e.length?Zl(e):[]},Nn.uniqBy=function(e,t){return e&&e.length?Zl(e,Yi(t,2)):[]},Nn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Zl(e,void 0,t):[]},Nn.unset=function(e,t){return null==e||$l(e,t)},Nn.unzip=Go,Nn.unzipWith=Ko,Nn.update=function(e,t,n){return null==e?e:Ql(e,t,ii(n))},Nn.updateWith=function(e,t,n,l){return l="function"==typeof l?l:void 0,null==e?e:Ql(e,t,ii(n),l)},Nn.values=Na,Nn.valuesIn=function(e){return null==e?[]:It(e,ha(e))},Nn.without=qo,Nn.words=Ba,Nn.wrap=function(e,t){return Cr(ii(t),e)},Nn.xor=Yo,Nn.xorBy=Xo,Nn.xorWith=Zo,Nn.zip=$o,Nn.zipObject=function(e,t){return ni(e||[],t||[],Hn)},Nn.zipObjectDeep=function(e,t){return ni(e||[],t||[],Ul)},Nn.zipWith=Qo,Nn.entries=Aa,Nn.entriesIn=Da,Nn.extend=aa,Nn.extendWith=ua,Ya(Nn,Nn),Nn.add=ou,Nn.attempt=Ua,Nn.camelCase=Ia,Nn.capitalize=wa,Nn.ceil=ru,Nn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=la(n))==n?n:0),void 0!==t&&(t=(t=la(t))==t?t:0),Yn(la(e),t,n)},Nn.clone=function(e){return Xn(e,4)},Nn.cloneDeep=function(e){return Xn(e,5)},Nn.cloneDeepWith=function(e,t){return Xn(e,5,t="function"==typeof t?t:void 0)},Nn.cloneWith=function(e,t){return Xn(e,4,t="function"==typeof t?t:void 0)},Nn.conformsTo=function(e,t){return null==t||Zn(e,t,ga(t))},Nn.deburr=Oa,Nn.defaultTo=function(e,t){return null==e||e!=e?t:e},Nn.divide=au,Nn.endsWith=function(e,t,n){e=oa(e),t=Xl(t);var l=e.length,i=n=void 0===n?l:Yn(ta(n),0,l);return(n-=t.length)>=0&&e.slice(n,i)==t},Nn.eq=Nr,Nn.escape=function(e){return(e=oa(e))&&M.test(e)?e.replace(P,Pt):e},Nn.escapeRegExp=function(e){return(e=oa(e))&&V.test(e)?e.replace(z,"\\$&"):e},Nn.every=function(e,t,n){var l=xr(e)?ot:tl;return n&&oo(e,t,n)&&(t=void 0),l(e,Yi(t,3))},Nn.find=lr,Nn.findIndex=Oo,Nn.findKey=function(e,t){return mt(e,Yi(t,3),al)},Nn.findLast=ir,Nn.findLastIndex=xo,Nn.findLastKey=function(e,t){return mt(e,Yi(t,3),ul)},Nn.floor=uu,Nn.forEach=or,Nn.forEachRight=rr,Nn.forIn=function(e,t){return null==e?e:ol(e,Yi(t,3),ha)},Nn.forInRight=function(e,t){return null==e?e:rl(e,Yi(t,3),ha)},Nn.forOwn=function(e,t){return e&&al(e,Yi(t,3))},Nn.forOwnRight=function(e,t){return e&&ul(e,Yi(t,3))},Nn.get=pa,Nn.gt=Ir,Nn.gte=wr,Nn.has=function(e,t){return null!=e&&to(e,t,fl)},Nn.hasIn=fa,Nn.head=Lo,Nn.identity=Va,Nn.includes=function(e,t,n,l){e=Lr(e)?e:Na(e),n=n&&!l?ta(n):0;var i=e.length;return n<0&&(n=on(i+n,0)),Yr(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&_t(e,t,n)>-1},Nn.indexOf=function(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=null==n?0:ta(n);return i<0&&(i=on(l+i,0)),_t(e,t,i)},Nn.inRange=function(e,t,n){return t=ea(t),void 0===n?(n=t,t=0):n=ea(n),function(e,t,n){return e>=rn(t,n)&&e<on(t,n)}(e=la(e),t,n)},Nn.invoke=_a,Nn.isArguments=Or,Nn.isArray=xr,Nn.isArrayBuffer=Rr,Nn.isArrayLike=Lr,Nn.isArrayLikeObject=Pr,Nn.isBoolean=function(e){return!0===e||!1===e||Hr(e)&&vl(e)==a},Nn.isBuffer=kr,Nn.isDate=Mr,Nn.isElement=function(e){return Hr(e)&&1===e.nodeType&&!Gr(e)},Nn.isEmpty=function(e){if(null==e)return!0;if(Lr(e)&&(xr(e)||"string"==typeof e||"function"==typeof e.splice||kr(e)||Zr(e)||Or(e)))return!e.length;var t=eo(e);if(t==v||t==E)return!e.size;if(co(e))return!Tl(e).length;for(var n in e)if(ye.call(e,n))return!1;return!0},Nn.isEqual=function(e,t){return hl(e,t)},Nn.isEqualWith=function(e,t,n){var l=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===l?hl(e,t,void 0,n):!!l},Nn.isError=Fr,Nn.isFinite=function(e){return"number"==typeof e&&tn(e)},Nn.isFunction=Br,Nn.isInteger=Ur,Nn.isLength=Wr,Nn.isMap=zr,Nn.isMatch=function(e,t){return e===t||Sl(e,t,Zi(t))},Nn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,Sl(e,t,Zi(t),n)},Nn.isNaN=function(e){return Vr(e)&&e!=+e},Nn.isNative=function(e){if(uo(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yl(e)},Nn.isNil=function(e){return null==e},Nn.isNull=function(e){return null===e},Nn.isNumber=Vr,Nn.isObject=jr,Nn.isObjectLike=Hr,Nn.isPlainObject=Gr,Nn.isRegExp=Kr,Nn.isSafeInteger=function(e){return Ur(e)&&e>=-9007199254740991&&e<=9007199254740991},Nn.isSet=qr,Nn.isString=Yr,Nn.isSymbol=Xr,Nn.isTypedArray=Zr,Nn.isUndefined=function(e){return void 0===e},Nn.isWeakMap=function(e){return Hr(e)&&eo(e)==h},Nn.isWeakSet=function(e){return Hr(e)&&"[object WeakSet]"==vl(e)},Nn.join=function(e,t){return null==e?"":nn.call(e,t)},Nn.kebabCase=xa,Nn.last=Fo,Nn.lastIndexOf=function(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=l;return void 0!==n&&(i=(i=ta(n))<0?on(l+i,0):rn(i,l-1)),t==t?function(e,t,n){for(var l=n+1;l--;)if(e[l]===t)return l;return l}(e,t,i):Et(e,ht,i,!0)},Nn.lowerCase=Ra,Nn.lowerFirst=La,Nn.lt=$r,Nn.lte=Qr,Nn.max=function(e){return e&&e.length?nl(e,Va,pl):void 0},Nn.maxBy=function(e,t){return e&&e.length?nl(e,Yi(t,2),pl):void 0},Nn.mean=function(e){return St(e,Va)},Nn.meanBy=function(e,t){return St(e,Yi(t,2))},Nn.min=function(e){return e&&e.length?nl(e,Va,Cl):void 0},Nn.minBy=function(e,t){return e&&e.length?nl(e,Yi(t,2),Cl):void 0},Nn.stubArray=nu,Nn.stubFalse=lu,Nn.stubObject=function(){return{}},Nn.stubString=function(){return""},Nn.stubTrue=function(){return!0},Nn.multiply=cu,Nn.nth=function(e,t){return e&&e.length?wl(e,ta(t)):void 0},Nn.noConflict=function(){return ze._===this&&(ze._=De),this},Nn.noop=Xa,Nn.now=pr,Nn.pad=function(e,t,n){e=oa(e);var l=(t=ta(t))?Ht(e):0;if(!t||l>=t)return e;var i=(t-l)/2;return Oi(Qt(i),n)+e+Oi($t(i),n)},Nn.padEnd=function(e,t,n){e=oa(e);var l=(t=ta(t))?Ht(e):0;return t&&l<t?e+Oi(t-l,n):e},Nn.padStart=function(e,t,n){e=oa(e);var l=(t=ta(t))?Ht(e):0;return t&&l<t?Oi(t-l,n)+e:e},Nn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),un(oa(e).replace(G,""),t||0)},Nn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&oo(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=ea(e),void 0===t?(t=e,e=0):t=ea(t)),e>t){var l=e;e=t,t=l}if(n||e%1||t%1){var i=cn();return rn(e+i*(t-e+Ue("1e-"+((i+"").length-1))),t)}return Pl(e,t)},Nn.reduce=function(e,t,n){var l=xr(e)?dt:Tt,i=arguments.length<3;return l(e,Yi(t,4),n,i,Jn)},Nn.reduceRight=function(e,t,n){var l=xr(e)?vt:Tt,i=arguments.length<3;return l(e,Yi(t,4),n,i,el)},Nn.repeat=function(e,t,n){return t=(n?oo(e,t,n):void 0===t)?1:ta(t),kl(oa(e),t)},Nn.replace=function(){var e=arguments,t=oa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Nn.result=function(e,t,n){var l=-1,i=(t=oi(t,e)).length;for(i||(i=1,e=void 0);++l<i;){var o=null==e?void 0:e[Co(t[l])];void 0===o&&(l=i,o=n),e=Br(o)?o.call(e):o}return e},Nn.round=su,Nn.runInContext=e,Nn.sample=function(e){return(xr(e)?Bn:Fl)(e)},Nn.size=function(e){if(null==e)return 0;if(Lr(e))return Yr(e)?Ht(e):e.length;var t=eo(e);return t==v||t==E?e.size:Tl(e).length},Nn.snakeCase=Pa,Nn.some=function(e,t,n){var l=xr(e)?pt:Vl;return n&&oo(e,t,n)&&(t=void 0),l(e,Yi(t,3))},Nn.sortedIndex=function(e,t){return Gl(e,t)},Nn.sortedIndexBy=function(e,t,n){return Kl(e,t,Yi(n,2))},Nn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var l=Gl(e,t);if(l<n&&Nr(e[l],t))return l}return-1},Nn.sortedLastIndex=function(e,t){return Gl(e,t,!0)},Nn.sortedLastIndexBy=function(e,t,n){return Kl(e,t,Yi(n,2),!0)},Nn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Gl(e,t,!0)-1;if(Nr(e[n],t))return n}return-1},Nn.startCase=ka,Nn.startsWith=function(e,t,n){return e=oa(e),n=null==n?0:Yn(ta(n),0,e.length),t=Xl(t),e.slice(n,n+t.length)==t},Nn.subtract=du,Nn.sum=function(e){return e&&e.length?Ct(e,Va):0},Nn.sumBy=function(e,t){return e&&e.length?Ct(e,Yi(t,2)):0},Nn.template=function(e,t,n){var l=Nn.templateSettings;n&&oo(e,t,n)&&(t=void 0),e=oa(e),t=ua({},t,l,Bi);var i,o,r=ua({},t.imports,l.imports,Bi),a=ga(r),u=It(r,a),c=0,s=t.interpolate||ue,d="__p += '",v=fe((t.escape||ue).source+"|"+s.source+"|"+(s===U?ee:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),p="//# sourceURL="+(ye.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ke+"]")+"\n";e.replace(v,function(t,n,l,r,a,u){return l||(l=r),d+=e.slice(c,u).replace(ce,kt),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),a&&(o=!0,d+="';\n"+a+";\n__p += '"),l&&(d+="' +\n((__t = ("+l+")) == null ? '' : __t) +\n'"),c=u+t.length,t}),d+="';\n";var f=ye.call(t,"variable")&&t.variable;if(f){if(Q.test(f))throw new se("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(O,""):d).replace(x,"$1").replace(R,"$1;"),d="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Ua(function(){return de(a,p+"return "+d).apply(void 0,u)});if(m.source=d,Fr(m))throw m;return m},Nn.times=function(e,t){if((e=ta(e))<1||e>9007199254740991)return[];var n=4294967295,l=rn(e,4294967295);e-=4294967295;for(var i=At(l,t=Yi(t));++n<e;)t(n);return i},Nn.toFinite=ea,Nn.toInteger=ta,Nn.toLength=na,Nn.toLower=function(e){return oa(e).toLowerCase()},Nn.toNumber=la,Nn.toSafeInteger=function(e){return e?Yn(ta(e),-9007199254740991,9007199254740991):0===e?e:0},Nn.toString=oa,Nn.toUpper=function(e){return oa(e).toUpperCase()},Nn.trim=function(e,t,n){if((e=oa(e))&&(n||void 0===t))return Dt(e);if(!e||!(t=Xl(t)))return e;var l=zt(e),i=zt(t);return ai(l,Ot(l,i),xt(l,i)+1).join("")},Nn.trimEnd=function(e,t,n){if((e=oa(e))&&(n||void 0===t))return e.slice(0,Vt(e)+1);if(!e||!(t=Xl(t)))return e;var l=zt(e);return ai(l,0,xt(l,zt(t))+1).join("")},Nn.trimStart=function(e,t,n){if((e=oa(e))&&(n||void 0===t))return e.replace(G,"");if(!e||!(t=Xl(t)))return e;var l=zt(e);return ai(l,Ot(l,zt(t))).join("")},Nn.truncate=function(e,t){var n=30,l="...";if(jr(t)){var i="separator"in t?t.separator:i;n="length"in t?ta(t.length):n,l="omission"in t?Xl(t.omission):l}var o=(e=oa(e)).length;if(Mt(e)){var r=zt(e);o=r.length}if(n>=o)return e;var a=n-Ht(l);if(a<1)return l;var u=r?ai(r,0,a).join(""):e.slice(0,a);if(void 0===i)return u+l;if(r&&(a+=u.length-a),Kr(i)){if(e.slice(a).search(i)){var c,s=u;for(i.global||(i=fe(i.source,oa(te.exec(i))+"g")),i.lastIndex=0;c=i.exec(s);)var d=c.index;u=u.slice(0,void 0===d?a:d)}}else if(e.indexOf(Xl(i),a)!=a){var v=u.lastIndexOf(i);v>-1&&(u=u.slice(0,v))}return u+l},Nn.unescape=function(e){return(e=oa(e))&&k.test(e)?e.replace(L,Gt):e},Nn.uniqueId=function(e){var t=++be;return oa(e)+t},Nn.upperCase=Ma,Nn.upperFirst=Fa,Nn.each=or,Nn.eachRight=rr,Nn.first=Lo,Ya(Nn,(iu={},al(Nn,function(e,t){ye.call(Nn.prototype,t)||(iu[t]=e)}),iu),{chain:!1}),Nn.VERSION="4.17.23",lt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Nn[e].placeholder=Nn}),lt(["drop","take"],function(e,t){xn.prototype[e]=function(n){n=void 0===n?1:on(ta(n),0);var l=this.__filtered__&&!t?new xn(this):this.clone();return l.__filtered__?l.__takeCount__=rn(n,l.__takeCount__):l.__views__.push({size:rn(n,4294967295),type:e+(l.__dir__<0?"Right":"")}),l},xn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),lt(["filter","map","takeWhile"],function(e,t){var n=t+1,l=1==n||3==n;xn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Yi(e,3),type:n}),t.__filtered__=t.__filtered__||l,t}}),lt(["head","last"],function(e,t){var n="take"+(t?"Right":"");xn.prototype[e]=function(){return this[n](1).value()[0]}}),lt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");xn.prototype[e]=function(){return this.__filtered__?new xn(this):this[n](1)}}),xn.prototype.compact=function(){return this.filter(Va)},xn.prototype.find=function(e){return this.filter(e).head()},xn.prototype.findLast=function(e){return this.reverse().find(e)},xn.prototype.invokeMap=Ml(function(e,t){return"function"==typeof e?new xn(this):this.map(function(n){return _l(n,e,t)})}),xn.prototype.reject=function(e){return this.filter(br(Yi(e)))},xn.prototype.slice=function(e,t){e=ta(e);var n=this;return n.__filtered__&&(e>0||t<0)?new xn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ta(t))<0?n.dropRight(-t):n.take(t-e)),n)},xn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},xn.prototype.toArray=function(){return this.take(4294967295)},al(xn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),l=/^(?:head|last)$/.test(t),i=Nn[l?"take"+("last"==t?"Right":""):t],o=l||/^find/.test(t);i&&(Nn.prototype[t]=function(){var t=this.__wrapped__,r=l?[1]:arguments,a=t instanceof xn,u=r[0],c=a||xr(t),s=function(e){var t=i.apply(Nn,st([e],r));return l&&d?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(a=c=!1);var d=this.__chain__,v=!!this.__actions__.length,p=o&&!d,f=a&&!v;if(!o&&c){t=f?t:new xn(this);var m=e.apply(t,r);return m.__actions__.push({func:er,args:[s],thisArg:void 0}),new On(m,d)}return p&&f?e.apply(this,r):(m=this.thru(s),p?l?m.value()[0]:m.value():m)})}),lt(["pop","push","shift","sort","splice","unshift"],function(e){var t=_e[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",l=/^(?:pop|shift)$/.test(e);Nn.prototype[e]=function(){var e=arguments;if(l&&!this.__chain__){var i=this.value();return t.apply(xr(i)?i:[],e)}return this[n](function(n){return t.apply(xr(n)?n:[],e)})}}),al(xn.prototype,function(e,t){var n=Nn[t];if(n){var l=n.name+"";ye.call(gn,l)||(gn[l]=[]),gn[l].push({name:t,func:n})}}),gn[Di(void 0,2).name]=[{name:"wrapper",func:void 0}],xn.prototype.clone=function(){var e=new xn(this.__wrapped__);return e.__actions__=mi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=mi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=mi(this.__views__),e},xn.prototype.reverse=function(){if(this.__filtered__){var e=new xn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},xn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=xr(e),l=t<0,i=n?e.length:0,o=function(e,t,n){for(var l=-1,i=n.length;++l<i;){var o=n[l],r=o.size;switch(o.type){case"drop":e+=r;break;case"dropRight":t-=r;break;case"take":t=rn(t,e+r);break;case"takeRight":e=on(e,t-r)}}return{start:e,end:t}}(0,i,this.__views__),r=o.start,a=o.end,u=a-r,c=l?a:r-1,s=this.__iteratees__,d=s.length,v=0,p=rn(u,this.__takeCount__);if(!n||!l&&i==u&&p==u)return ei(e,this.__actions__);var f=[];e:for(;u--&&v<p;){for(var m=-1,E=e[c+=t];++m<d;){var _=s[m],g=_.type,h=(0,_.iteratee)(E);if(2==g)E=h;else if(!h){if(1==g)continue e;break e}}f[v++]=E}return f},Nn.prototype.at=tr,Nn.prototype.chain=function(){return Jo(this)},Nn.prototype.commit=function(){return new On(this.value(),this.__chain__)},Nn.prototype.next=function(){void 0===this.__values__&&(this.__values__=Jr(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Nn.prototype.plant=function(e){for(var t,n=this;n instanceof wn;){var l=Do(n);l.__index__=0,l.__values__=void 0,t?i.__wrapped__=l:t=l;var i=l;n=n.__wrapped__}return i.__wrapped__=e,t},Nn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof xn){var t=e;return this.__actions__.length&&(t=new xn(this)),(t=t.reverse()).__actions__.push({func:er,args:[jo],thisArg:void 0}),new On(t,this.__chain__)}return this.thru(jo)},Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return ei(this.__wrapped__,this.__actions__)},Nn.prototype.first=Nn.prototype.head,ft&&(Nn.prototype[ft]=function(){return this}),Nn}();Ge?((Ge.exports=Kt)._=Kt,Ve._=Kt):ze._=Kt}).call(q)});const We=e=>{var n,l,r;let{data:a,OpenImage:u}=e;const{t:c}=o.useTranslation();return i.createElement("div",null,a.date&&i.createElement("p",null,a.date),i.createElement("p",null,a.name),a.mobileNumber&&i.createElement(t.TelePhone,{mobile:a.mobileNumber}),a.source&&i.createElement("p",null,c("ES_APPLICATION_DETAILS_APPLICATION_CHANNEL_"+a.source.toUpperCase())),null!=a&&a.wfComment?i.createElement("div",null,null==a||null===(n=a.wfComment)||void 0===n?void 0:n.map(e=>i.createElement("div",{className:"TLComments"},i.createElement("h3",null,c("WF_COMMON_COMMENTS")),i.createElement("p",{style:{overflowX:"scroll"}},e)))):null,(null==a||null===(l=a.thumbnailsToShow)||void 0===l||null===(r=l.thumbs)||void 0===r?void 0:r.length)>0?i.createElement("div",{className:"TLComments"},i.createElement("h3",null,c("CS_COMMON_ATTACHMENTS")),i.createElement(t.DisplayPhotos,{srcs:null==a?void 0:a.thumbnailsToShow.thumbs,onClick:()=>{u(null==a?void 0:a.thumbnailsToShow)}})):null)},je=e=>{var n,a,u,c,s,d;let v=null==e||null===(n=e.application)||void 0===n?void 0:n.bookingNo.split("-")[0];const{t:p}=o.useTranslation(),f="WT"==v?"watertanker":"MT"===v?"mobileToilet":"TP"===v?"treePruning":"unknown",m="WT"===v?"request-service.water_tanker":"MT"===v?"request-service.mobile_toilet":"TP"===v?"request-service.tree_pruning":"request-service.unknown",{isLoading:E,data:_}=Digit.Hooks.useWorkflowDetails({tenantId:null===(a=e.application)||void 0===a?void 0:a.tenantId,id:null===(u=e.application)||void 0===u?void 0:u.bookingNo,moduleCode:f});function g(e){var t;window.open(null==e||null===(t=e.fullImage)||void 0===t?void 0:t[0],"_blank")}const h=t=>{if("OPEN"===t.state){var n,l;const o={date:null==t||null===(n=t.auditDetails)||void 0===n?void 0:n.lastModified,source:(null===(l=e.application)||void 0===l?void 0:l.channel)||""};return i.createElement(We,{data:o})}if(t.state){var o,r,a,u,c;const e={date:null==t||null===(o=t.auditDetails)||void 0===o?void 0:o.lastModified,name:null==t||null===(r=t.assignes)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.name,mobileNumber:null==t||null===(u=t.assignes)||void 0===u||null===(c=u[0])||void 0===c?void 0:c.mobileNumber,comment:p(null==t?void 0:t.comment),wfComment:t.wfComment,thumbnailsToShow:null==t?void 0:t.thumbnailsToShow};return i.createElement(We,{data:e,OpenImage:g})}{var s,d;const n={date:Digit.DateUtils.ConvertTimestampToDate(null===(s=e.application)||void 0===s?void 0:s.auditDetails.lastModified),name:null==t||null===(d=t.assigner)||void 0===d?void 0:d.name,comment:p(null==t?void 0:t.comment)};return i.createElement(We,{data:n})}};return E?i.createElement(t.Loader,null):i.createElement(i.Fragment,null,!E&&i.createElement(l.Fragment,null,(null==_||null===(c=_.timeline)||void 0===c?void 0:c.length)>0&&i.createElement(t.CardSectionHeader,{style:{marginBottom:"16px",marginTop:"32px"}},p("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")),null!=_&&_.timeline&&1===(null==_||null===(s=_.timeline)||void 0===s?void 0:s.length)?i.createElement(t.CheckPoint,{isCompleted:!0,label:p((null==_||null===(d=_.timeline[0])||void 0===d?void 0:d.state)&&""+_.timeline[0].state||"NA"),customChild:h(null==_?void 0:_.timeline[0])}):i.createElement(t.ConnectingCheckPoints,null,(null==_?void 0:_.timeline)&&(null==_?void 0:_.timeline.map((e,n)=>{var l;return i.createElement(i.Fragment,{key:n},i.createElement(t.CheckPoint,{keyValue:n,isCompleted:0===n,label:p(""+(null==_||null===(l=_.processInstances[n].state)||void 0===l?void 0:l.state)),customChild:h(e)}))})))),_&&(n=>{var l,o;let a=n[0];switch(null==a?void 0:a.action){case"PAY":return"citizen"===(null==e?void 0:e.userType)?i.createElement("div",{style:{marginTop:"1em",bottom:"0px",width:"100%",marginBottom:"1.2em"}},i.createElement(r.Link,{to:{pathname:"/digit-ui/citizen/payment/my-bills/"+m+"/"+(null==e||null===(l=e.application)||void 0===l?void 0:l.bookingNo),state:{tenantId:e.application.tenantId,bookingNo:null==e||null===(o=e.application)||void 0===o?void 0:o.bookingNo}}},i.createElement(t.SubmitBar,{label:p("CS_APPLICATION_DETAILS_MAKE_PAYMENT")}))):null;default:return null}})(null==_?void 0:_.nextActions))},He=["tenantId","payments"],ze=e=>i.createElement("span",{className:"cell-text"},e),Ve=e=>i.createElement("span",{className:"sla-cell"},e),Ge=["searchParams","onFilterChange","defaultSearchParams","statusMap","moduleCode"],Ke=e=>{var n;let{searchParams:r,onFilterChange:u,defaultSearchParams:c}=e,v=d(e,Ge);const{t:p}=o.useTranslation(),[f,m]=(a.useQueryClient(),l.useState(()=>s({},r,{services:[]}))),E=e=>{let t=e.delete,n=s({},f,e);t&&t.forEach(e=>delete n[e]),delete e.delete,m(s({},n))},_=()=>{m(s({},c,{services:[]})),u(s({},c))},g=Digit.ULBService.getCurrentTenantId();return i.createElement(i.Fragment,null,i.createElement("div",{className:"filter"},i.createElement("div",{className:"filter-card"},i.createElement("div",{className:"heading",style:{alignItems:"center"}},i.createElement("div",{className:"filter-label",style:{display:"flex",alignItems:"center"}},i.createElement("span",null,i.createElement("svg",{width:"17",height:"17",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{d:"M0.66666 2.48016C3.35999 5.9335 8.33333 12.3335 8.33333 12.3335V20.3335C8.33333 21.0668 8.93333 21.6668 9.66666 21.6668H12.3333C13.0667 21.6668 13.6667 21.0668 13.6667 20.3335V12.3335C13.6667 12.3335 18.6267 5.9335 21.32 2.48016C22 1.60016 21.3733 0.333496 20.2667 0.333496H1.71999C0.613327 0.333496 -0.01334 1.60016 0.66666 2.48016Z",fill:"#505A5F"}))),i.createElement("span",{style:{marginLeft:"8px",fontWeight:"normal"}},p("ES_COMMON_FILTER_BY"),":")),i.createElement("div",{className:"clearAll",onClick:_},p("ES_COMMON_CLEAR_ALL")),"desktop"===v.type&&i.createElement("span",{className:"clear-search",onClick:_,style:{border:"1px solid #e0e0e0",padding:"6px"}},i.createElement("svg",{width:"17",height:"17",viewBox:"0 0 16 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{d:"M8 5V8L12 4L8 0V3C3.58 3 0 6.58 0 11C0 12.57 0.46 14.03 1.24 15.26L2.7 13.8C2.25 12.97 2 12.01 2 11C2 7.69 4.69 5 8 5ZM14.76 6.74L13.3 8.2C13.74 9.04 14 9.99 14 11C14 14.31 11.31 17 8 17V14L4 18L8 22V19C12.42 19 16 15.42 16 11C16 9.43 15.54 7.97 14.76 6.74Z",fill:"#505A5F"}))),"mobile"===v.type&&i.createElement("span",{onClick:v.onClose},i.createElement(t.CloseSvg,null))),i.createElement("div",null,i.createElement("div",null,i.createElement("div",{className:"filter-label",style:{fontWeight:"normal"}},p("ES_INBOX_LOCALITY"),":"),i.createElement(t.Localities,{selectLocality:e=>{E({locality:[...(null==f?void 0:f.locality)||[],e]})},tenantId:g,boundaryType:"revenue"}),i.createElement("div",{className:"tag-container"},null==f||null===(n=f.locality)||void 0===n?void 0:n.map((e,n)=>i.createElement(t.RemoveableTag,{key:n,text:p(e.i18nkey),onClick:()=>{E({locality:null==f?void 0:f.locality.filter(t=>t.code!==e.code)})}})))),i.createElement("div",null,i.createElement(t.SubmitBar,{onSubmit:()=>{u(0===f.services.length?s({},f,{services:c.services}):f)},label:p("ES_COMMON_APPLY")}))))))};function qe(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));const Ye=e=>i.createElement("h1",{className:"heading-m"},e.label),Xe=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Ze=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Xe,null)),$e=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p,moduleCode:f}=e;const{data:m,isLoading:E}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),{isLoading:_,data:g}=Digit.Hooks.pt.useMDMS(a,p,"FINANCIAL_YEARLS",{},{details:{tenantId:Digit.ULBService.getStateId(),moduleDetails:[{moduleName:"egf-master",masterDetails:[{name:"FinancialYear",filter:"[?(@.module == 'PT')]"}]}]}}),[h,S]=l.useState({}),[y,b]=l.useState({}),[T,C]=l.useState([]),[A,D]=l.useState(null),[N,I]=l.useState(null),[w,O]=l.useState(null),[x,R]=l.useState(null),[L,P]=l.useState([]),[k,M]=l.useState(null),[F,B]=l.useState(!1);function U(e){I(e.target.files[0])}return l.useEffect(()=>{var e;g&&g["egf-master"]&&P(null===(e=g["egf-master"])||void 0===e?void 0:e.FinancialYear)},[g]),l.useEffect(()=>{var e;C(null==m||null===(e=m.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[m]),l.useEffect(()=>{!function(){try{R(null);const e=function(){if(N){const e=function(){if(N.size>=5242880)R(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("PT",N,Digit.ULBService.getStateId())).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?O(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):R(o("CS_FILE_UPLOAD_ERROR"))})},function(){R(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[N]),l.useEffect(()=>{r&&S(null!=r&&r.showFinancialYearsModal?(e=>{let{t:t,action:n,financialYears:l,selectedFinancialYear:o,setSelectedFinancialYear:r}=e;return{label:{heading:"WF_"+n.action+"_APPLICATION",submit:"WF_PT.CREATE_"+n.action,cancel:"ES_PT_COMMON_CANCEL"},form:[{body:[{label:t("ES_PT_FINANCIAL_YEARS"),isMandatory:!0,type:"radio",populators:i.createElement(c.RadioButtons,{options:l,optionsKey:"name",onSelect:r,selectedOption:o})}]}]}})({t:o,action:r,financialYears:L,selectedFinancialYear:k,setSelectedFinancialYear:M}):(e=>{var t;let{t:n,action:l,approvers:o,selectedApprover:r,setSelectedApprover:a,selectFile:u,uploadedFile:s,setUploadedFile:d,assigneeLabel:v,businessService:p}=e;return{label:{heading:"WF_"+(null==l?void 0:l.action)+"_APPLICATION",submit:"WF_"+p+"_"+(null==l?void 0:l.action),cancel:"ES_PT_COMMON_CANCEL"},form:[{body:[{label:l.isTerminateState||"SENDBACKTOCITIZEN"===(null==l?void 0:l.action)?null:n(v||"WF_ROLE_"+(null===(t=l.assigneeRoles)||void 0===t?void 0:t[0])),type:"dropdown",populators:l.isTerminateState||"SENDBACKTOCITIZEN"===(null==l?void 0:l.action)?null:i.createElement(c.Dropdown,{option:o,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:a,selected:r})},{label:n("ES_PT_ACTION_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:n("ES_PT_ATTACH_FILE")+(l.docUploadRequired?" *":""),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:u,onDelete:()=>{d(null)},showHint:!0,hintText:n("PT_ATTACH_RESTRICTIONS_SIZE"),message:s?"1 "+n("ES_PT_ACTION_FILEUPLOADED"):n("ES_PT_ACTION_NO_FILEUPLOADED")})}]}]}})({t:o,action:r,approvers:T,selectedApprover:A,setSelectedApprover:D,selectFile:U,uploadedFile:w,setUploadedFile:O,businessService:p}))},[r,T,L,k,w]),r&&h.form?i.createElement(c.Modal,{headerBarMain:i.createElement(Ye,{label:o(h.label.heading)}),headerBarEnd:i.createElement(Ze,{onClick:u}),actionCancelLabel:o(h.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(h.label.submit),actionSaveOnSubmit:()=>{},isDisabled:r.showFinancialYearsModal?!k:E||(null==r?void 0:r.docUploadRequired)&&!w,formId:"modal-action"},_?i.createElement(c.Loader,null):i.createElement(c.FormComposer,{config:h.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){if("INACTIVE_PROPERTY"==(null==r?void 0:r.action)){let t={action:"OPEN",comment:null==e?void 0:e.comments,businessService:"PT.CREATE",moduleName:"PT"};v.creationReason="STATUS",d({customFunctionToExecute:null==r?void 0:r.customFunctionToExecute,Property:s({},v,{workflow:t})})}else if(null!=r&&r.showFinancialYearsModal)d({customFunctionToExecute:null==r?void 0:r.customFunctionToExecute,Assessment:{financialYear:null==k?void 0:k.name,propertyId:null==v?void 0:v.propertyId,tenantId:a,source:null==v?void 0:v.source,channel:null==v?void 0:v.channel,assessmentDate:Date.now()}});else{let t={action:null==r?void 0:r.action,comment:null==e?void 0:e.comments,businessService:p,moduleName:f};t.assignes=null!=r&&r.isTerminateState||!A?[]:[A],w&&(t.documents=[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==N?void 0:N.name,fileStoreId:w}]),d({Property:s({},v,{workflow:t})})}},defaultValues:y,formId:"modal-action"})):i.createElement(c.Loader,null)},Qe=e=>i.createElement("h1",{className:"heading-m"},e.label),Je=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),et=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Je,null)),tt=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p}=e;const{data:f}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),{isLoading:m,data:E}=Digit.Hooks.pt.useMDMS(a,p,"FINANCIAL_YEARLS",{},{details:{tenantId:Digit.ULBService.getStateId(),moduleDetails:[{moduleName:"egf-master",masterDetails:[{name:"FinancialYear",filter:"[?(@.module == 'TL')]"}]}]}}),[_,g]=l.useState({}),[h,S]=l.useState({}),[y,b]=l.useState([]),[T,C]=l.useState({}),[A,D]=l.useState(null),[N,I]=l.useState(null),[w,O]=l.useState(null),[x,R]=l.useState([]),[L,P]=l.useState(null);function k(e){D(e.target.files[0])}return l.useEffect(()=>{var e;E&&E["egf-master"]&&R(null===(e=E["egf-master"])||void 0===e?void 0:e.FinancialYear)},[E]),l.useEffect(()=>{var e;b(null==f||null===(e=f.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[f]),l.useEffect(()=>{!function(){try{O(null);const e=function(){if(A){const e=function(){if(A.size>=5242880)O(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("PT",A,Digit.ULBService.getStateId())).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?I(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):O(o("CS_FILE_UPLOAD_ERROR"))})},function(){O(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[A]),l.useEffect(()=>{r&&g((e=>{let{t:t,action:n,approvers:l,selectedApprover:o,setSelectedApprover:r,selectFile:a,uploadedFile:u,setUploadedFile:s,businessService:d}=e,v=!0;return"SENDBACKTOCITIZEN"!=(null==n?void 0:n.action)&&"APPROVE"!=(null==n?void 0:n.action)||(v=!1),n.isTerminateState&&(v=!1),{label:{heading:"WF_"+(null==n?void 0:n.action)+"_APPLICATION",submit:"WF_"+(null==d?void 0:d.toUpperCase())+"_"+(null==n?void 0:n.action),cancel:"WF_EMPLOYEE_NEWTL_CANCEL"},form:[{body:[{label:v?t("WF_ASSIGNEE_NAME_LABEL"):null,placeholder:v?t("WF_ASSIGNEE_NAME_PLACEHOLDER"):null,type:"dropdown",populators:v?i.createElement(c.Dropdown,{option:l,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:r,selected:o}):null},{label:t("WF_COMMON_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:t("TL_APPROVAL_CHECKLIST_BUTTON_UP_FILE"),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:a,onDelete:()=>{s(null)},message:u?"1 "+t("ES_PT_ACTION_FILEUPLOADED"):t("CS_ACTION_NO_FILEUPLOADED")})}]}]}})({t:o,action:r,approvers:y,selectedApprover:T,setSelectedApprover:C,selectFile:k,uploadedFile:N,setUploadedFile:I,businessService:p}))},[r,y,x,L,N]),r&&_.form?i.createElement(c.Modal,{headerBarMain:i.createElement(Qe,{label:o(_.label.heading)}),headerBarEnd:i.createElement(et,{onClick:u}),actionCancelLabel:o(_.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(_.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action"},m?i.createElement(c.Loader,null):i.createElement(c.FormComposer,{config:_.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){v=s({},v,{action:null==r?void 0:r.action,comment:null==e?void 0:e.comments,assignee:null!=T&&T.uuid?[null==T?void 0:T.uuid]:null,wfDocuments:N?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==A?void 0:A.name,fileStoreId:N}]:null}),d({Licenses:[v]})},defaultValues:h,formId:"modal-action"})):i.createElement(c.Loader,null)},nt=e=>i.createElement("h1",{style:{marginLeft:"22px"},className:"heading-m BPAheading-m"},e.label),lt=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),it=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(lt,null)),ot=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p}=e;const{data:f,isLoading:m}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),[E,_]=l.useState({}),[g,h]=l.useState({}),[S,y]=l.useState([]),[b,T]=l.useState({}),[C,A]=l.useState(null),[D,N]=l.useState(null),[I,w]=l.useState(null),O=!!Digit.Utils.browser.isMobile();function x(e){A(e.target.files[0])}return l.useEffect(()=>{var e;y(null==f||null===(e=f.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[f]),l.useEffect(()=>{!function(){try{w(null);const e=function(){if(C){const e=/(.*?)(jpg|jpeg|png|image|pdf)$/i,t=function(){if(C.size>=5242880)w(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const t=function(){if(null!=C&&C.type&&!e.test(null==C?void 0:C.type))w(o("NOT_SUPPORTED_FILE_TYPE"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("OBPS",C,Digit.ULBService.getStateId()||(null==a?void 0:a.split(".")[0]))).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?N(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):w(o("CS_FILE_UPLOAD_ERROR"))})},function(){w(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[C]),l.useEffect(()=>{r&&_((e=>{let{t:t,action:n,approvers:l,selectedApprover:o,setSelectedApprover:r,selectFile:a,uploadedFile:u,setUploadedFile:s,businessService:d,error:v}=e,p=!0;return"SENDBACKTOCITIZEN"==(null==n?void 0:n.action)&&(p=!1),n.isTerminateState&&(p=!1),{label:{heading:"WF_"+(null==n?void 0:n.action)+"_APPLICATION",submit:"WF_"+(null==d?void 0:d.toUpperCase())+"_"+(null==n?void 0:n.action),cancel:"WF_EMPLOYEE_BPAREG_CANCEL"},form:[{body:[{label:p?t("WF_ASSIGNEE_NAME_LABEL"):null,placeholder:p?t("WF_ASSIGNEE_NAME_PLACEHOLDER"):null,type:"dropdown",populators:p?i.createElement(c.Dropdown,{option:l,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:r,selected:o}):null},{label:t("WF_COMMON_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:t("BPA_APPROVAL_CHECKLIST_BUTTON_UP_FILE"),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:a,onDelete:()=>{s(null)},message:u?"1 "+t("ES_PT_ACTION_FILEUPLOADED"):t("CS_ACTION_NO_FILEUPLOADED"),accept:"image/*, .pdf, .png, .jpeg, .jpg",iserror:v})}]}]}})({t:o,action:r,approvers:S,selectedApprover:b,setSelectedApprover:T,selectFile:x,uploadedFile:D,setUploadedFile:N,businessService:p,error:I}))},[r,S,D,I]),r&&E.form?i.createElement(c.Modal,{headerBarMain:i.createElement(nt,{label:o(E.label.heading)}),headerBarEnd:i.createElement(it,{onClick:u}),actionCancelLabel:o(E.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(E.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action",isOBPSFlow:!0,popupStyles:O?{width:"720px"}:{},style:O?{height:"45px",width:"44%"}:{height:"45px",width:"107px",paddingLeft:"0px",paddingRight:"0px"},popupModuleMianStyles:O?{paddingLeft:"5px"}:{}},m?i.createElement(c.Loader,null):i.createElement(c.FormComposer,{config:E.form,cardStyle:{marginLeft:"0px",marginRight:"0px",marginTop:"-25px"},className:"BPAemployeeCard",noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){v=s({},v,{action:null==r?void 0:r.action,comment:null==e?void 0:e.comments,assignee:null!=b&&b.uuid?[null==b?void 0:b.uuid]:null,wfDocuments:D?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]:null}),d({Licenses:[v]},!1,{isStakeholder:!0,bpa:!1})},defaultValues:g,formId:"modal-action"})):i.createElement(c.Loader,null)},rt=e=>i.createElement("h1",{style:{marginLeft:"22px"},className:"heading-m BPAheading-m"},e.label),at=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),ut=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(at,null)),ct=e=>{var t,n,o,r,u,d,v,p,f,m,E,_;let{t:g,action:h,tenantId:S,closeModal:y,submitAction:b,applicationDetails:T,applicationData:C,businessService:A,workflowDetails:D}=e;Digit.Hooks.obps.useObpsAPI(null!==(t=C)&&void 0!==t&&null!==(n=t.landInfo)&&void 0!==n&&null!==(o=n.address)&&void 0!==o&&o.city?null===(r=C)||void 0===r||null===(u=r.landInfo)||void 0===u||null===(d=u.address)||void 0===d?void 0:d.city:S,!1);const{data:N,isLoading:I}=Digit.Hooks.useEmployeeSearch(S,{roles:null==D||null===(v=D.data)||void 0===v||null===(p=v.initialActionState)||void 0===p||null===(f=p.nextActions)||void 0===f||null===(m=f.filter(e=>(null==e?void 0:e.action)==(null==h?void 0:h.action)))||void 0===m||null===(E=m[0])||void 0===E||null===(_=E.assigneeRoles)||void 0===_?void 0:_.map(e=>({code:e})),isActive:!0},{enabled:!(null!=h&&h.isTerminateState)}),[w,O]=(a.useQueryClient(),l.useState({})),[x,R]=l.useState({}),[L,P]=l.useState([]),[k,M]=l.useState({}),[F,B]=l.useState(null),[U,W]=l.useState(null),[j,H]=l.useState(null),[z,V]=l.useState(null),G=!!Digit.Utils.browser.isMobile();function K(e){B(e.target.files[0])}l.useEffect(()=>{var e;P(null==N||null===(e=N.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[N]),l.useEffect(()=>{!function(){try{H(null);const e=function(){if(F){const e=/(.*?)(jpg|jpeg|png|image|pdf)$/i,t=function(){if(F.size>=5242880)H(g("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const t=function(){if(null!=F&&F.type&&!e.test(null==F?void 0:F.type))H(g("NOT_SUPPORTED_FILE_TYPE"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("OBPS",F,Digit.ULBService.getStateId()||(null==S?void 0:S.split(".")[0]))).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?W(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):H(g("CS_FILE_UPLOAD_ERROR"))})},function(){H(g("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[F]);const q=e=>{let t=[];return e&&e.map((e,n)=>{t.push({documentType:(e.documentType+"_"+e.documentType.split("_")[1]).replaceAll("_","."),fileStoreId:e.fileStoreId,fileStore:e.fileStoreId,fileName:"",dropDownValues:{value:(e.documentType+"_"+e.documentType.split("_")[1]).replaceAll("_",".")}})}),t},Y=e=>{let t=[];var n;for(n=0;n<(null==e?void 0:e.questionLength);n++){var l;t.push({remarks:e["Remarks_"+n],question:null==e?void 0:e.questionList[n].question,value:null==e||null===(l=e["question_"+n])||void 0===l?void 0:l.code})}return t},X=e=>{var t,n;let l=[],i=[];var o,r;return(null==e||null===(t=e.additionalDetails)||void 0===t||null===(n=t.fieldinspection_pending)||void 0===n?void 0:n.length)>0&&(i=null==e||null===(o=e.additionalDetails)||void 0===o?void 0:o.fieldinspection_pending),"FIELDINSPECTION_INPROGRESS"==e.status?(l=JSON.parse(sessionStorage.getItem("INSPECTION_DATA")),(null===(r=l)||void 0===r?void 0:r.length)>0&&l.map((e,t)=>{i.push({docs:q(e.Documents),date:e.InspectionDate,questions:Y(e),time:null==e?void 0:e.InspectionTime})}),i=i.filter(e=>e.docs&&e.docs.length>0)):sessionStorage.removeItem("INSPECTION_DATA"),[...i]},Z=e=>{let t=JSON.parse(sessionStorage.getItem("BPA_DOCUMENTS")),n=[];return t.map(e=>{var t,l,i,o,r,a;(null==e||null===(t=e.uploadedDocuments)||void 0===t||null===(l=t[0])||void 0===l||null===(i=l.values)||void 0===i?void 0:i.length)>0&&(n=[...n,...null==e||null===(o=e.uploadedDocuments)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.values]),(null==e||null===(a=e.newUploadedDocs)||void 0===a?void 0:a.length)>0&&(n=[...n,...null==e?void 0:e.newUploadedDocs])}),n},$=()=>{var e;const t=Digit.SessionStorage.get("OBPS_APPROVAL_CHECKS"),n=Digit.SessionStorage.get("OBPS_NEW_APPROVALS");let l=null==t?void 0:t.reduce((e,t)=>null!=t&&t.checked?e.push(null==t?void 0:t.label)&&e:e,[]);return l=null===(e=l)||void 0===e?void 0:e.concat(null!==n?n.filter(e=>""!==e.label).map(e=>null==e?void 0:e.label):[]),l};return l.useEffect(()=>{h&&O((e=>{var t;let{t:n,action:l,approvers:o,selectedApprover:r,setSelectedApprover:a,selectFile:u,uploadedFile:s,setUploadedFile:d,assigneeLabel:v,businessService:p,error:f}=e,m=!1;return"REVOCATE"!=(null==l?void 0:l.action)&&"REJECT"!=(null==l?void 0:l.action)&&"SKIP_PAYMENT"!=l.action&&"SEND_BACK_TO_CITIZEN"!=(null==l?void 0:l.action)&&"APPROVE"!=(null==l?void 0:l.action)||(m=!0),{label:{heading:"WF_"+(null==l?void 0:l.action)+"_APPLICATION",submit:"WF_"+p+"_"+(null==l?void 0:l.action),cancel:"BPA_CITIZEN_CANCEL_BUTTON"},form:[{body:[{label:l.isTerminateState||m?null:n(v||"WF_ROLE_"+(null===(t=l.assigneeRoles)||void 0===t?void 0:t[0])),type:"dropdown",populators:l.isTerminateState||m?null:i.createElement(c.Dropdown,{option:o,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:a,selected:r})},{label:n("WF_COMMON_COMMENTS"),type:"textarea",isMandatory:!0,populators:{name:"comments"}},{label:""+n("WF_APPROVAL_UPLOAD_HEAD"),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:u,onDelete:()=>{d(null)},message:s?"1 "+n("ES_PT_ACTION_FILEUPLOADED"):n("CS_ACTION_NO_FILEUPLOADED"),accept:"image/*, .pdf, .png, .jpeg, .jpg",iserror:f})}]}]}})({t:g,action:h,approvers:L,selectedApprover:k,setSelectedApprover:M,selectFile:K,uploadedFile:U,setUploadedFile:W,businessService:A,assigneeLabel:"WF_ASSIGNEE_NAME_LABEL",error:j}))},[h,L,z,U,j]),h&&w.form?i.createElement(c.Modal,{headerBarMain:i.createElement(rt,{label:g(w.label.heading)}),headerBarEnd:i.createElement(ut,{onClick:y}),actionCancelLabel:g(w.label.cancel),actionCancelOnSubmit:y,actionSaveLabel:g(w.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action",isOBPSFlow:!0,popupStyles:G?{width:"720px"}:{},style:G?{minHeight:"45px",height:"auto",width:"44%"}:{minHeight:"45px",height:"auto",width:"107px",paddingLeft:"0px",paddingRight:"0px"},popupModuleMianStyles:G?{paddingLeft:"5px"}:{}},I?i.createElement(c.Loader,null):i.createElement(c.FormComposer,{config:w.form,cardStyle:{marginLeft:"0px",marginRight:"0px",marginTop:"-25px"},className:"BPAemployeeCard",noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){try{var t,n,l,i,o,r;C=s({},C,{documents:Z(),additionalDetails:s({},null===(t=C)||void 0===t?void 0:t.additionalDetails,{fieldinspection_pending:X(C),pendingapproval:$()}),workflow:{action:null==h?void 0:h.action,comment:(null==e||null===(n=e.comments)||void 0===n?void 0:n.length)>0?null==e?void 0:e.comments:null,comments:(null==e||null===(l=e.comments)||void 0===l?void 0:l.length)>0?null==e?void 0:e.comments:null,assignee:null!=k&&k.uuid?[null==k?void 0:k.uuid]:null,assignes:null!=k&&k.uuid?[null==k?void 0:k.uuid]:null,varificationDocuments:U?[{documentType:(null==h?void 0:h.action)+" DOC",fileName:null==F?void 0:F.name,fileStoreId:U}]:null},action:null==h?void 0:h.action,comment:null==e?void 0:e.comments,assignee:null!=k&&k.uuid?[null==k?void 0:k.uuid]:null,wfDocuments:U?[{documentType:(null==h?void 0:h.action)+" DOC",fileName:null==F?void 0:F.name,fileStoreId:U}]:null});const a=null==T||null===(i=T.nocData)||void 0===i?void 0:i.map(e=>{const t=Digit.SessionStorage.get(null==e?void 0:e.nocType)||[];return{Noc:s({},e,{documents:[...null!=e&&e.documents?null==e?void 0:e.documents:[],...t||[]]})}});let u={sourceRefId:null==a||null===(o=a[0])||void 0===o||null===(r=o.Noc)||void 0===r?void 0:r.sourceRefId};return Promise.resolve(Digit.NOCSearch.all(S,u)).then(function(e){var t;let n=!0,l=!0;null==e||null===(t=e.Noc)||void 0===t||t.map(e=>{var t,i,o,r,a;"APPROVED"!==(null==e||null===(t=e.applicationStatus)||void 0===t?void 0:t.toUpperCase())&&"AUTO_APPROVED"!==(null==e||null===(i=e.applicationStatus)||void 0===i?void 0:i.toUpperCase())&&"REJECTED"!==(null==e||null===(o=e.applicationStatus)||void 0===o?void 0:o.toUpperCase())&&"AUTO_REJECTED"!==(null==e||null===(r=e.applicationStatus)||void 0===r?void 0:r.toUpperCase())&&"VOIDED"!==(null==e||null===(a=e.applicationStatus)||void 0===a?void 0:a.toUpperCase())||1!=n&&1!=l||("AIRPORT_AUTHORITY"===(null==e?void 0:e.nocType)?n=!1:"FIRE_NOC"===(null==e?void 0:e.nocType)&&(l=!1))});let i=[];a&&a.map(e=>{var t,o,r,a,u,c,s,d,v,p,f,m;("APPROVED"!=(null==e||null===(t=e.Noc)||void 0===t||null===(o=t.applicationStatus)||void 0===o?void 0:o.toUpperCase())&&"AUTO_APPROVED"!=(null==e||null===(r=e.Noc)||void 0===r||null===(a=r.applicationStatus)||void 0===a?void 0:a.toUpperCase())&&"REJECTED"!=(null==e||null===(u=e.Noc)||void 0===u||null===(c=u.applicationStatus)||void 0===c?void 0:c.toUpperCase())&&"AUTO_REJECTED"!=(null==e||null===(s=e.Noc)||void 0===s||null===(d=s.applicationStatus)||void 0===d?void 0:d.toUpperCase())&&"VOIDED"!=(null==e||null===(v=e.Noc)||void 0===v||null===(p=v.applicationStatus)||void 0===p?void 0:p.toUpperCase())&&"AIRPORT_AUTHORITY"===(null==e||null===(f=e.Noc)||void 0===f?void 0:f.nocType)&&n||"FIRE_NOC"===(null==e||null===(m=e.Noc)||void 0===m?void 0:m.nocType)&&l)&&i.push(e)}),b({BPA:C},(null==i?void 0:i.length)>0&&i,{isStakeholder:!1,bpa:!0})})}catch(e){return Promise.reject(e)}},defaultValues:x,formId:"modal-action"})):i.createElement(c.Loader,null)},st=e=>i.createElement("h1",{style:{marginLeft:"22px"},className:"heading-m BPAheading-m"},e.label),dt=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),vt=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(dt,null)),pt=e=>{var t,n;let{t:o,action:u,tenantId:d,closeModal:v,submitAction:p,applicationData:f,businessService:m}=e;const{data:E,isLoading:_}=Digit.Hooks.useEmployeeSearch(d,{roles:null==u||null===(t=u.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=u&&u.isTerminateState)}),[g,h]=(a.useQueryClient(),l.useState({})),[S,y]=l.useState({}),[b,T]=l.useState([]),[C,A]=l.useState({}),[D,N]=l.useState(null),[I,w]=l.useState(null),[O,x]=l.useState(null),R=!!Digit.Utils.browser.isMobile();function L(e){N(e.target.files[0])}return r.useHistory(),l.useEffect(()=>{var e;T(null==E||null===(e=E.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[E]),l.useEffect(()=>{!function(){try{x(null);const e=function(){if(D){const e=/(.*?)(jpg|jpeg|png|image|pdf)$/i,t=function(){if(D.size>=5242880)x(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const t=function(){if(null!=D&&D.type&&!e.test(null==D?void 0:D.type))x(o("NOT_SUPPORTED_FILE_TYPE"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("NOC",D,Digit.ULBService.getStateId()||(null==d?void 0:d.split(".")[0]))).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?w(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):x(o("CS_FILE_UPLOAD_ERROR"))})},function(){x(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[D]),l.useEffect(()=>{u&&h((e=>{var t;let{t:n,action:l,approvers:o,selectedApprover:r,setSelectedApprover:a,selectFile:u,uploadedFile:s,setUploadedFile:d,assigneeLabel:v,businessService:p,error:f}=e,m=!1;"REVOCATE"!=(null==l?void 0:l.action)&&"REJECT"!=(null==l?void 0:l.action)||(m=!0);let E=!1;return"APPROVE"!=(null==l?void 0:l.action)&&"REJECT"!=(null==l?void 0:l.action)&&"AUTO_APPROVE"!=l.action&&"AUTO_REJECT"!=l.action||(E=!0),{label:{heading:"WF_"+(null==l?void 0:l.action)+"_APPLICATION",submit:"WF_"+p+"_"+(null==l?void 0:l.action),cancel:"CORE_LOGOUTPOPUP_CANCEL"},form:[{body:[{label:l.isTerminateState||E?null:n(v||"WF_ROLE_"+(null===(t=l.assigneeRoles)||void 0===t?void 0:t[0])),type:"dropdown",populators:l.isTerminateState||E?null:i.createElement(c.Dropdown,{option:o,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:a,selected:r})},{label:n("WF_COMMON_COMMENTS"),type:"textarea",isMandatory:m,populators:{name:"comments"}},{label:""+n("WF_APPROVAL_UPLOAD_HEAD"),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:u,onDelete:()=>{d(null)},showHint:!0,message:s?"1 "+n("ES_PT_ACTION_FILEUPLOADED"):n("CS_ACTION_NO_FILEUPLOADED"),accept:"image/*, .pdf, .png, .jpeg, .jpg",iserror:f})}]}]}})({t:o,action:u,approvers:b,selectedApprover:C,setSelectedApprover:A,selectFile:L,uploadedFile:I,setUploadedFile:w,businessService:m,assigneeLabel:"WF_ASSIGNEE_NAME_LABEL",error:O}))},[u,b,I,O]),u&&g.form?i.createElement(c.Modal,{headerBarMain:i.createElement(st,{label:o(g.label.heading)}),headerBarEnd:i.createElement(vt,{onClick:v}),actionCancelLabel:o(g.label.cancel),actionCancelOnSubmit:v,actionSaveLabel:o(g.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action",isOBPSFlow:!0,popupStyles:R?{width:"720px"}:{},style:R?{height:"45px",width:"44%"}:{height:"45px",width:"107px",paddingLeft:"0px",paddingRight:"0px"},popupModuleMianStyles:R?{paddingLeft:"5px"}:{}},_?i.createElement(c.Loader,null):i.createElement(c.FormComposer,{config:g.form,cardStyle:{marginLeft:"0px",marginRight:"0px",marginTop:"-25px"},className:"BPAemployeeCard",noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){var t,n,l;let i=JSON.parse(sessionStorage.getItem("NewNOCDocs")),o=(null===(t=f)||void 0===t||null===(n=t.documents)||void 0===n?void 0:n.length)>0?[...null===(l=f)||void 0===l?void 0:l.documents]:[];i.map((e,t)=>{o.push(e)}),f=s({},f,{workflow:{action:null==u?void 0:u.action,comment:null!=e&&e.comments?null==e?void 0:e.comments:null,assignee:null!=C&&C.uuid?[null==C?void 0:C.uuid]:null,documents:I?[{documentType:(null==u?void 0:u.action)+" DOC",fileName:null==D?void 0:D.name,fileStoreId:I}]:null},documents:o}),p({Noc:f},!1,{isNoc:!0})},defaultValues:S,formId:"modal-action"})):i.createElement(c.Loader,null)};var ft=function(e,t){return e===t||e!=e&&t!=t},mt=function(e,t){for(var n=e.length;n--;)if(ft(e[n][0],t))return n;return-1},Et=Array.prototype.splice;function _t(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}_t.prototype.clear=function(){this.__data__=[],this.size=0},_t.prototype.delete=function(e){var t=this.__data__,n=mt(t,e);return!(n<0||(n==t.length-1?t.pop():Et.call(t,n,1),--this.size,0))},_t.prototype.get=function(e){var t=this.__data__,n=mt(t,e);return n<0?void 0:t[n][1]},_t.prototype.has=function(e){return mt(this.__data__,e)>-1},_t.prototype.set=function(e,t){var n=this.__data__,l=mt(n,e);return l<0?(++this.size,n.push([e,t])):n[l][1]=t,this};var gt=_t,ht="object"==typeof q&&q&&q.Object===Object&&q,St="object"==typeof self&&self&&self.Object===Object&&self,yt=ht||St||Function("return this")(),bt=yt.Symbol,Tt=Object.prototype,Ct=Tt.hasOwnProperty,At=Tt.toString,Dt=bt?bt.toStringTag:void 0,Nt=Object.prototype.toString,It=bt?bt.toStringTag:void 0,wt=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":It&&It in Object(e)?function(e){var t=Ct.call(e,Dt),n=e[Dt];try{e[Dt]=void 0;var l=!0}catch(e){}var i=At.call(e);return l&&(t?e[Dt]=n:delete e[Dt]),i}(e):function(e){return Nt.call(e)}(e)},Ot=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},xt=function(e){if(!Ot(e))return!1;var t=wt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Rt=yt["__core-js_shared__"],Lt=function(){var e=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Pt=Function.prototype.toString,kt=function(e){if(null!=e){try{return Pt.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Mt=/^\[object .+?Constructor\]$/,Ft=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bt=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ot(e)||(t=e,Lt&&Lt in t))&&(xt(e)?Ft:Mt).test(kt(e));var t}(n)?n:void 0},Ut=Bt(yt,"Map"),Wt=Bt(Object,"create"),jt=Object.prototype.hasOwnProperty,Ht=Object.prototype.hasOwnProperty;function zt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}zt.prototype.clear=function(){this.__data__=Wt?Wt(null):{},this.size=0},zt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zt.prototype.get=function(e){var t=this.__data__;if(Wt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return jt.call(t,e)?t[e]:void 0},zt.prototype.has=function(e){var t=this.__data__;return Wt?void 0!==t[e]:Ht.call(t,e)},zt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Wt&&void 0===t?"__lodash_hash_undefined__":t,this};var Vt=zt,Gt=function(e,t){var n,l,i=e.__data__;return("string"==(l=typeof(n=t))||"number"==l||"symbol"==l||"boolean"==l?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function Kt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}Kt.prototype.clear=function(){this.size=0,this.__data__={hash:new Vt,map:new(Ut||gt),string:new Vt}},Kt.prototype.delete=function(e){var t=Gt(this,e).delete(e);return this.size-=t?1:0,t},Kt.prototype.get=function(e){return Gt(this,e).get(e)},Kt.prototype.has=function(e){return Gt(this,e).has(e)},Kt.prototype.set=function(e,t){var n=Gt(this,e),l=n.size;return n.set(e,t),this.size+=n.size==l?0:1,this};var qt=Kt;function Yt(e){var t=this.__data__=new gt(e);this.size=t.size}Yt.prototype.clear=function(){this.__data__=new gt,this.size=0},Yt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yt.prototype.get=function(e){return this.__data__.get(e)},Yt.prototype.has=function(e){return this.__data__.has(e)},Yt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof gt){var l=n.__data__;if(!Ut||l.length<199)return l.push([e,t]),this.size=++n.size,this;n=this.__data__=new qt(l)}return n.set(e,t),this.size=n.size,this};var Xt=Yt,Zt=function(){try{var e=Bt(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),$t=function(e,t,n){"__proto__"==t&&Zt?Zt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Qt=Object.prototype.hasOwnProperty,Jt=function(e,t,n){var l=e[t];Qt.call(e,t)&&ft(l,n)&&(void 0!==n||t in e)||$t(e,t,n)},en=function(e,t,n,l){var i=!n;n||(n={});for(var o=-1,r=t.length;++o<r;){var a=t[o],u=l?l(n[a],e[a],a,n,e):void 0;void 0===u&&(u=e[a]),i?$t(n,a,u):Jt(n,a,u)}return n},tn=function(e){return null!=e&&"object"==typeof e},nn=function(e){return tn(e)&&"[object Arguments]"==wt(e)},ln=Object.prototype,on=ln.hasOwnProperty,rn=ln.propertyIsEnumerable,an=nn(function(){return arguments}())?nn:function(e){return tn(e)&&on.call(e,"callee")&&!rn.call(e,"callee")},un=Array.isArray,cn=function(){return!1},sn=Y(function(e,t){var n=t&&!t.nodeType&&t,l=n&&e&&!e.nodeType&&e,i=l&&l.exports===n?yt.Buffer:void 0;e.exports=(i?i.isBuffer:void 0)||cn}),dn=/^(?:0|[1-9]\d*)$/,vn=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&dn.test(e))&&e>-1&&e%1==0&&e<t},pn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},fn={};fn["[object Float32Array]"]=fn["[object Float64Array]"]=fn["[object Int8Array]"]=fn["[object Int16Array]"]=fn["[object Int32Array]"]=fn["[object Uint8Array]"]=fn["[object Uint8ClampedArray]"]=fn["[object Uint16Array]"]=fn["[object Uint32Array]"]=!0,fn["[object Arguments]"]=fn["[object Array]"]=fn["[object ArrayBuffer]"]=fn["[object Boolean]"]=fn["[object DataView]"]=fn["[object Date]"]=fn["[object Error]"]=fn["[object Function]"]=fn["[object Map]"]=fn["[object Number]"]=fn["[object Object]"]=fn["[object RegExp]"]=fn["[object Set]"]=fn["[object String]"]=fn["[object WeakMap]"]=!1;var mn=function(e){return function(t){return e(t)}},En=Y(function(e,t){var n=t&&!t.nodeType&&t,l=n&&e&&!e.nodeType&&e,i=l&&l.exports===n&&ht.process,o=function(){try{return l&&l.require&&l.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o}),_n=En&&En.isTypedArray,gn=_n?mn(_n):function(e){return tn(e)&&pn(e.length)&&!!fn[wt(e)]},hn=Object.prototype.hasOwnProperty,Sn=function(e,t){var n=un(e),l=!n&&an(e),i=!n&&!l&&sn(e),o=!n&&!l&&!i&&gn(e),r=n||l||i||o,a=r?function(e,t){for(var n=-1,l=Array(e);++n<e;)l[n]=t(n);return l}(e.length,String):[],u=a.length;for(var c in e)!t&&!hn.call(e,c)||r&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vn(c,u))||a.push(c);return a},yn=Object.prototype,bn=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yn)},Tn=function(e,t){return function(n){return e(t(n))}},Cn=Tn(Object.keys,Object),An=Object.prototype.hasOwnProperty,Dn=function(e){return null!=e&&pn(e.length)&&!xt(e)},Nn=function(e){return Dn(e)?Sn(e):function(e){if(!bn(e))return Cn(e);var t=[];for(var n in Object(e))An.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)},In=Object.prototype.hasOwnProperty,wn=function(e){return Dn(e)?Sn(e,!0):function(e){if(!Ot(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=bn(e),n=[];for(var l in e)("constructor"!=l||!t&&In.call(e,l))&&n.push(l);return n}(e)},On=Y(function(e,t){var n=t&&!t.nodeType&&t,l=n&&e&&!e.nodeType&&e,i=l&&l.exports===n?yt.Buffer:void 0,o=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,l=o?o(n):new e.constructor(n);return e.copy(l),l}}),xn=function(){return[]},Rn=Object.prototype.propertyIsEnumerable,Ln=Object.getOwnPropertySymbols,Pn=Ln?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var l=-1,i=null==t?0:t.length,o=0,r=[];++l<i;){var a=t[l];Rn.call(e,a)&&(r[o++]=a)}return r}(Ln(e)))}:xn,kn=function(e,t){for(var n=-1,l=t.length,i=e.length;++n<l;)e[i+n]=t[n];return e},Mn=Tn(Object.getPrototypeOf,Object),Fn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)kn(t,Pn(e)),e=Mn(e);return t}:xn,Bn=function(e,t,n){var l=t(e);return un(e)?l:kn(l,n(e))},Un=function(e){return Bn(e,Nn,Pn)},Wn=function(e){return Bn(e,wn,Fn)},jn=Bt(yt,"DataView"),Hn=Bt(yt,"Promise"),zn=Bt(yt,"Set"),Vn=Bt(yt,"WeakMap"),Gn=kt(jn),Kn=kt(Ut),qn=kt(Hn),Yn=kt(zn),Xn=kt(Vn),Zn=wt;(jn&&"[object DataView]"!=Zn(new jn(new ArrayBuffer(1)))||Ut&&"[object Map]"!=Zn(new Ut)||Hn&&"[object Promise]"!=Zn(Hn.resolve())||zn&&"[object Set]"!=Zn(new zn)||Vn&&"[object WeakMap]"!=Zn(new Vn))&&(Zn=function(e){var t=wt(e),n="[object Object]"==t?e.constructor:void 0,l=n?kt(n):"";if(l)switch(l){case Gn:return"[object DataView]";case Kn:return"[object Map]";case qn:return"[object Promise]";case Yn:return"[object Set]";case Xn:return"[object WeakMap]"}return t});var $n=Zn,Qn=Object.prototype.hasOwnProperty,Jn=yt.Uint8Array,el=function(e){var t=new e.constructor(e.byteLength);return new Jn(t).set(new Jn(e)),t},tl=/\w*$/,nl=bt?bt.prototype:void 0,ll=nl?nl.valueOf:void 0,il=Object.create,ol=function(){function e(){}return function(t){if(!Ot(t))return{};if(il)return il(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),rl=En&&En.isMap,al=rl?mn(rl):function(e){return tn(e)&&"[object Map]"==$n(e)},ul=En&&En.isSet,cl=ul?mn(ul):function(e){return tn(e)&&"[object Set]"==$n(e)},sl={};sl["[object Arguments]"]=sl["[object Array]"]=sl["[object ArrayBuffer]"]=sl["[object DataView]"]=sl["[object Boolean]"]=sl["[object Date]"]=sl["[object Float32Array]"]=sl["[object Float64Array]"]=sl["[object Int8Array]"]=sl["[object Int16Array]"]=sl["[object Int32Array]"]=sl["[object Map]"]=sl["[object Number]"]=sl["[object Object]"]=sl["[object RegExp]"]=sl["[object Set]"]=sl["[object String]"]=sl["[object Symbol]"]=sl["[object Uint8Array]"]=sl["[object Uint8ClampedArray]"]=sl["[object Uint16Array]"]=sl["[object Uint32Array]"]=!0,sl["[object Error]"]=sl["[object Function]"]=sl["[object WeakMap]"]=!1;var dl=function e(t,n,l,i,o,r){var a,u=1&n,c=2&n,s=4&n;if(l&&(a=o?l(t,i,o,r):l(t)),void 0!==a)return a;if(!Ot(t))return t;var d=un(t);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Qn.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!u)return function(e,t){var n=-1,l=e.length;for(t||(t=Array(l));++n<l;)t[n]=e[n];return t}(t,a)}else{var v=$n(t),p="[object Function]"==v||"[object GeneratorFunction]"==v;if(sn(t))return On(t,u);if("[object Object]"==v||"[object Arguments]"==v||p&&!o){if(a=c||p?{}:function(e){return"function"!=typeof e.constructor||bn(e)?{}:ol(Mn(e))}(t),!u)return c?function(e,t){return en(e,Fn(e),t)}(t,function(e,t){return e&&en(t,wn(t),e)}(a,t)):function(e,t){return en(e,Pn(e),t)}(t,function(e,t){return e&&en(t,Nn(t),e)}(a,t))}else{if(!sl[v])return o?t:{};a=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return el(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return function(e,t){var n=t?el(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?el(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,tl.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Set]":return new l;case"[object Symbol]":return ll?Object(ll.call(e)):{}}}(t,v,u)}}r||(r=new Xt);var f=r.get(t);if(f)return f;r.set(t,a),cl(t)?t.forEach(function(i){a.add(e(i,n,l,i,t,r))}):al(t)&&t.forEach(function(i,o){a.set(o,e(i,n,l,o,t,r))});var m=d?void 0:(s?c?Wn:Un:c?wn:Nn)(t);return function(e,t){for(var n=-1,l=null==e?0:e.length;++n<l&&!1!==t(e[n],n););}(m||t,function(i,o){m&&(i=t[o=i]),Jt(a,o,e(i,n,l,o,t,r))}),a},vl=function(e){return dl(e,5)};const pl=e=>i.createElement("h1",{className:"heading-m"},e.label),fl=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),ml=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(fl,null)),El=function(e,t){void 0===t&&(t="dayend");try{const n=e.match(/(\d{4})-(\d{1,2})-(\d{1,2})/),l=new Date(Date.UTC(n[1],n[2]-1,n[3]));return l.setMinutes(l.getMinutes()+l.getTimezoneOffset()),"dayend"===t&&(l.setHours(l.getHours()+24),l.setSeconds(l.getSeconds()-1)),l.getTime()}catch(t){return e}},_l=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p}=e;const{data:f,isLoading:m}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),[E,_]=l.useState({}),[g,h]=l.useState({}),[S,y]=l.useState([]),[b,T]=l.useState({}),[C,A]=l.useState(null),[D,N]=l.useState(null),[I,w]=l.useState(null),O=window.Digit.Utils.browser.isMobile(),x=window.location.href.includes("/employee");function R(e){A(e.target.files[0])}return l.useEffect(()=>{var e;y(null==f||null===(e=f.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[f]),l.useEffect(()=>{!function(){try{w(null);const e=function(){if(C){const e=/(.*?)(jpg|jpeg|png|image|pdf)$/i,t=function(){if(C.size>=5242880)w(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const t=function(){if(null!=C&&C.type&&!e.test(null==C?void 0:C.type))w(o("NOT_SUPPORTED_FILE_TYPE"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("WS",C,Digit.ULBService.getCurrentTenantId())).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?N(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):w(o("CS_FILE_UPLOAD_ERROR"))})},function(e){console.error("Modal -> err ",e),w(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[C]),l.useEffect(()=>{var e,t,n,l;"DisconnectWSConnection"==(null===(e=v)||void 0===e||null===(t=e.processInstance)||void 0===t?void 0:t.businessService)||"DisconnectSWConnection"==(null===(n=v)||void 0===n||null===(l=n.processInstance)||void 0===l?void 0:l.businessService)?r&&_((e=>{var t;let{t:n,action:l,approvers:o,selectedApprover:r,setSelectedApprover:a,selectFile:u,uploadedFile:d,setUploadedFile:v,businessService:p,error:f}=e,m=!0,E=!1;return(null!=l&&null!==(t=l.action)&&void 0!==t&&t.includes("SEND_BACK")||"APPROVE_FOR_DISCONNECTION"==(null==l?void 0:l.action)||"RESUBMIT_APPLICATION"==(null==l?void 0:l.action))&&(m=!1),l.isTerminateState&&(m=!1),"EXECUTE_DISCONNECTION"!=(null==l?void 0:l.action)&&"DISCONNECTION_EXECUTED"!=(null==l?void 0:l.action)||(E=!0),{label:{heading:"WF_"+(null==l?void 0:l.action)+"_APPLICATION",submit:"WF_"+(null==p?void 0:p.toUpperCase())+"_"+(null==l?void 0:l.action),cancel:"CS_COMMON_CANCEL"},form:[{body:[{label:m?n("WF_ASSIGNEE_NAME_LABEL"):null,placeholder:m?n("WF_ASSIGNEE_NAME_PLACEHOLDER"):null,type:"dropdown",populators:m?i.createElement(c.Dropdown,{option:o,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:a,selected:r}):null},E&&{label:n("ES_FSM_ACTION_SERVICE_DATE"),isMandatory:!!E,type:"custom",populators:E?{name:"date",validation:{required:!0},defaultValue:Digit.Utils.date.getDate(),component:(e,t)=>i.createElement(c.DatePicker,s({onChange:e.onChange,date:e.value},t))}:null},{label:n("WF_COMMON_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:n("WS_APPROVAL_CHECKLIST_BUTTON_UP_FILE"),populators:i.createElement(c.UploadFile,{id:"workflow-doc",accept:".jpg,.pdf,.png,.jpeg",onUpload:u,onDelete:()=>{v(null)},message:d?"1 "+n("ES_PT_ACTION_FILEUPLOADED"):n("CS_ACTION_NO_FILEUPLOADED"),error:f,iserror:f,showHintBelow:!0,hintText:"WS_HINT_TEXT_LABEL"})}]}]}})({t:o,action:r,approvers:S,selectedApprover:b,setSelectedApprover:T,selectFile:R,uploadedFile:D,setUploadedFile:N,businessService:p,error:I})):r&&_((e=>{var t;let{t:n,action:l,approvers:o,selectedApprover:r,setSelectedApprover:a,selectFile:u,uploadedFile:s,setUploadedFile:d,businessService:v,error:p}=e,f=!0;return(null!=l&&null!==(t=l.action)&&void 0!==t&&t.includes("SEND_BACK")||"APPROVE_FOR_CONNECTION"==(null==l?void 0:l.action))&&(f=!1),l.isTerminateState&&(f=!1),{label:{heading:"WF_"+(null==l?void 0:l.action)+"_APPLICATION",submit:"WF_"+(null==v?void 0:v.toUpperCase())+"_"+(null==l?void 0:l.action),cancel:"CS_COMMON_CANCEL"},form:[{body:[{label:f?n("WF_ASSIGNEE_NAME_LABEL"):null,placeholder:f?n("WF_ASSIGNEE_NAME_PLACEHOLDER"):null,type:"dropdown",populators:f?i.createElement(c.Dropdown,{option:o,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:a,selected:r}):null},{label:n("WF_COMMON_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:n("WS_APPROVAL_CHECKLIST_BUTTON_UP_FILE"),populators:i.createElement(c.UploadFile,{id:"workflow-doc",accept:".jpg,.pdf,.png,.jpeg",onUpload:u,onDelete:()=>{d(null)},message:s?"1 "+n("ES_PT_ACTION_FILEUPLOADED"):n("CS_ACTION_NO_FILEUPLOADED"),error:p,iserror:p,showHintBelow:!0,hintText:"WS_HINT_TEXT_LABEL"})}]}]}})({t:o,action:r,approvers:S,selectedApprover:b,setSelectedApprover:T,selectFile:R,uploadedFile:D,setUploadedFile:N,businessService:p,error:I}))},[r,S,D,I]),r&&E.form?i.createElement(c.Modal,{headerBarMain:i.createElement(pl,{label:o(E.label.heading)}),headerBarEnd:i.createElement(ml,{onClick:u}),actionCancelLabel:o(E.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(E.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action",style:O&&x?{width:"100%",height:"auto"}:{}},m?i.createElement(c.Loader,null):i.createElement(c.FormComposer,{config:E.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){var t,n,l,i,o,u,c,p,f,m;if(null!==(t=v)&&void 0!==t&&t.isBillAmend){var E,_,g,h,S,y,T,A,N;const t=s({},null===(E=v)||void 0===E||null===(_=E.billAmendmentDetails)||void 0===_?void 0:_.additionalDetails,{comments:null!=e&&e.comments?e.comments:null}),n=s({},null===(g=v)||void 0===g?void 0:g.billAmendmentDetails,{workflow:{businessId:null===(h=v)||void 0===h||null===(S=h.billAmendmentDetails)||void 0===S?void 0:S.amendmentId,action:null==r?void 0:r.action,tenantId:a,businessService:null!==(y=v)&&void 0!==y&&null!==(T=y.applicationType)&&void 0!==T&&T.includes("WATER")?"WS.AMENDMENT":"SW.AMENDMENT",moduleName:null!==(A=v)&&void 0!==A&&null!==(N=A.applicationType)&&void 0!==N&&N.includes("WATER")?"WS":"SW",assignes:null!=b&&b.uuid?[{uuid:null==b?void 0:b.uuid}]:[],comment:(null==e?void 0:e.comments)||"",documents:D?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]:[]},additionalDetails:t,comment:(null==e?void 0:e.comments)||"",wfDocuments:D?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]:null,processInstance:{action:null==r?void 0:r.action,assignes:null!=b&&b.uuid?[{uuid:null==b?void 0:b.uuid}]:[],comment:(null==e?void 0:e.comments)||"",documents:D?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]:[]}});d({AmendmentUpdate:n})}else{if(v=s({},v,{action:null==r?void 0:r.action,comment:(null==e?void 0:e.comments)||"",assignee:null!=b&&b.uuid?[null==b?void 0:b.uuid]:[],assignes:null!=b&&b.uuid?[{uuid:null==b?void 0:b.uuid}]:[],wfDocuments:D?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]:null,processInstance:s({},null===(n=v)||void 0===n?void 0:n.processInstance,{action:null==r?void 0:r.action,assignes:null!=b&&b.uuid?[{uuid:null==b?void 0:b.uuid}]:[],comment:(null==e?void 0:e.comments)||"",documents:D?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]:[]})}),null!=e&&e.date&&null!==(l=v)&&void 0!==l&&null!==(i=l.applicationType)&&void 0!==i&&i.includes("DISCONNECT")){const t=vl(null==e?void 0:e.date);v.disconnectionExecutionDate=El(t)}else if(null!=e&&e.date){const t=vl(null==e?void 0:e.date);v.connectionExecutionDate=El(t)}var I;if("DisconnectWSConnection"==(null===(o=v)||void 0===o||null===(u=o.processInstance)||void 0===u?void 0:u.businessService)||"DisconnectSWConnection"==(null===(c=v)||void 0===c||null===(p=c.processInstance)||void 0===p?void 0:p.businessService)||window.location.href.includes("disconnection"))"WATER"==(null===(I=v)||void 0===I?void 0:I.serviceType)?d({WaterConnection:v,disconnectRequest:!0}):d({SewerageConnection:v,disconnectRequest:!0});else if("SEWERAGE_RECONNECTION"==(null===(f=v)||void 0===f?void 0:f.applicationType))d({SewerageConnection:v,disconnectRequest:!1,reconnectRequest:!0});else if("WATER_RECONNECTION"==(null===(m=v)||void 0===m?void 0:m.applicationType))d({WaterConnection:v,disconnectRequest:!1,reconnectRequest:!0});else{var w,O,x,R,L,P,k,M,F,B,U,W,j;const e=sessionStorage.getItem("Digit.ADHOC_ADD_REBATE_DATA"),t=e?JSON.parse(e):"";null!=t&&null!==(w=t.value)&&void 0!==w&&w.adhocPenalty&&(v.additionalDetails.adhocPenalty=parseInt(null==t||null===(O=t.value)||void 0===O?void 0:O.adhocPenalty)||""),null!=t&&null!==(x=t.value)&&void 0!==x&&x.adhocPenaltyComment&&(v.additionalDetails.adhocPenaltyComment=(null==t||null===(R=t.value)||void 0===R?void 0:R.adhocPenaltyComment)||""),null!=t&&null!==(L=t.value)&&void 0!==L&&L.adhocPenaltyReason&&(v.additionalDetails.adhocPenaltyReason=(null==t||null===(P=t.value)||void 0===P?void 0:P.adhocPenaltyReason)||""),null!=t&&null!==(k=t.value)&&void 0!==k&&k.adhocRebate&&(v.additionalDetails.adhocRebate=parseInt(null==t||null===(M=t.value)||void 0===M?void 0:M.adhocRebate)||""),null!=t&&null!==(F=t.value)&&void 0!==F&&F.adhocRebateComment&&(v.additionalDetails.adhocRebateComment=(null==t||null===(B=t.value)||void 0===B?void 0:B.adhocRebateComment)||""),null!=t&&null!==(U=t.value)&&void 0!==U&&U.adhocRebateReason&&(v.additionalDetails.adhocRebateReason=(null==t||null===(W=t.value)||void 0===W?void 0:W.adhocRebateReason)||""),"WATER"==(null===(j=v)||void 0===j?void 0:j.serviceType)?d({WaterConnection:v,disconnectRequest:!1,reconnectRequest:!1}):d({SewerageConnection:v,disconnectRequest:!1,reconnectRequest:!1})}}},defaultValues:g,formId:"modal-action"})):i.createElement(c.Loader,null)},gl=e=>i.createElement("h1",{className:"heading-m"},e.label),hl=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Sl=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(hl,null)),yl=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p,moduleCode:f}=e;console.log("applicationData",v);const{data:m}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),[E,_]=l.useState({}),[g,h]=l.useState({}),[S,y]=l.useState([]),[b,T]=l.useState(null),[C,A]=l.useState(null),[D,N]=l.useState(null),[I,w]=l.useState(null),[O,x]=l.useState(!1);function R(e){A(e.target.files[0])}return l.useEffect(()=>{var e;y(null==m||null===(e=m.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[m]),l.useEffect(()=>{!function(){try{w(null);const e=function(){if(C){const e=function(){if(C.size>=5242880)w(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("PTR",C,Digit.ULBService.getStateId())).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?N(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):w(o("CS_FILE_UPLOAD_ERROR"))})},function(){w(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[C]),l.useEffect(()=>{r&&_((e=>{let{t:t,action:n,selectFile:l,uploadedFile:o,setUploadedFile:r,businessService:a}=e;return{label:{heading:"WF_"+(null==n?void 0:n.action)+"_APPLICATION",submit:"WF_"+a+"_"+(null==n?void 0:n.action),cancel:"ES_PTR_COMMON_CANCEL"},form:[{body:[{label:t("ES_PTR_ACTION_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:t("ES_PTR_ATTACH_FILE")+(n.docUploadRequired?" *":""),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:l,onDelete:()=>{r(null)},showHint:!0,hintText:t("PTR_ATTACH_RESTRICTIONS_SIZE"),message:o?"1 "+t("ES_PTR_ACTION_FILEUPLOADED"):t("ES_PTR_ACTION_NO_FILEUPLOADED")})}]}]}})({t:o,action:r,approvers:S,selectedApprover:b,setSelectedApprover:T,selectFile:R,uploadedFile:D,setUploadedFile:N,businessService:p}))},[r,S,D]),r&&E.form?i.createElement(c.Modal,{headerBarMain:i.createElement(gl,{label:o(E.label.heading)}),headerBarEnd:i.createElement(Sl,{onClick:u}),actionCancelLabel:o(E.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(E.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action"},i.createElement(c.FormComposer,{config:E.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){let t={action:null==r?void 0:r.action,comments:null==e?void 0:e.comments,businessService:p,moduleName:f};D&&(t.documents=[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,filestoreId:D}]),d({PetRegistrationApplications:[s({},v,{workflow:t})]})},defaultValues:g,formId:"modal-action"})):i.createElement(c.Loader,null)},bl=e=>i.createElement("h1",{className:"heading-m"},e.label),Tl=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Cl=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Tl,null)),Al=e=>{var t,n,o;let{t:a,action:u,tenantId:d,closeModal:v,submitAction:p,applicationData:f,businessService:m,moduleCode:E}=e;const{data:_}=Digit.Hooks.useEmployeeSearch(d,{roles:null==u||null===(t=u.roles)||void 0===t||null===(n=t[0])||void 0===n||null===(o=n.map)||void 0===o?void 0:o.call(n,e=>({code:e})),isActive:!0},{enabled:!(null!=u&&u.isTerminateState)}),g=r.useHistory(),[h,S]=l.useState({}),[y,b]=l.useState({}),[T,C]=l.useState([]),[A,D]=l.useState(null),[N,I]=l.useState(null);return l.useEffect(()=>{var e;C(null==_||null===(e=_.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[_]),l.useEffect(()=>{"INITIATED"===(null==u?void 0:u.state)?g.push("/digit-ui/employee/asset/assetservice/edit/"+(null==f?void 0:f.applicationNo)):S((e=>{let{t:t,action:n,businessService:l}=e;return{label:{heading:"WF_"+(null==n?void 0:n.action)+"_APPLICATION",submit:"WF_"+l+"_"+(null==n?void 0:n.action),cancel:"ES_AST_COMMON_CANCEL"},form:[{body:[{label:t("AST_ACTION_COMMENTS"),type:"textarea",populators:{name:"comments"}}]}]}})({t:a,action:u,approvers:T,selectedApprover:A,setSelectedApprover:D,uploadedFile:N,setUploadedFile:I,businessService:m}))},[u,T,N]),u&&h.form?i.createElement(c.Modal,{headerBarMain:i.createElement(bl,{label:a(h.label.heading)}),headerBarEnd:i.createElement(Cl,{onClick:v}),actionCancelLabel:a(h.label.cancel),actionCancelOnSubmit:v,actionSaveLabel:a(h.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action"},i.createElement(c.FormComposer,{config:h.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){let t={action:null==u?void 0:u.action,comment:null==e?void 0:e.comments,businessService:m,moduleName:E};N&&(t.documents=[]),p({Asset:s({},f,{workflow:t})})},defaultValues:y,formId:"modal-action"})):i.createElement(c.Loader,null)},Dl=e=>i.createElement("h1",{className:"heading-m"},e.label),Nl=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Il=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Nl,null)),wl=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p,moduleCode:f}=e;const{data:m}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),[E,_]=l.useState({}),[g,h]=l.useState({}),[S,y]=l.useState([]),[b,T]=l.useState(null),[C,A]=l.useState(null),[D,N]=l.useState(null),[I,w]=l.useState(null),[O,x]=l.useState(!1);function R(e){A(e.target.files[0])}return l.useEffect(()=>{var e;y(null==m||null===(e=m.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[m]),l.useEffect(()=>{!function(){try{w(null);const e=function(){if(C){const e=function(){if(C.size>=5242880)w(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("CHB",C,a)).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?N(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):w(o("CS_FILE_UPLOAD_ERROR"))})},function(){w(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[C]),l.useEffect(()=>{r&&_((e=>{let{t:t,action:n,selectFile:l,uploadedFile:o,setUploadedFile:r}=e;return{label:{heading:"CHB_"+(null==n?void 0:n.action),submit:"CHB_"+(null==n?void 0:n.action),cancel:"CS_COMMON_BACK"},form:[{body:[{label:t("ES_CHB_ACTION_COMMENTS")+" *",type:"textarea",populators:{name:"comments",validation:{required:!0}}},{label:t("ES_CHB_ATTACH_FILE")+(n.docUploadRequired?" *":""),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:l,onDelete:()=>{r(null)},message:o?"1 "+t("CS_ACTION_FILEUPLOADED"):t("CS_ACTION_NO_FILEUPLOADED")})}]}]}})({t:o,action:r,approvers:S,selectedApprover:b,setSelectedApprover:T,selectFile:R,uploadedFile:D,setUploadedFile:N,businessService:p}))},[r,S,D]),r&&E.form?i.createElement(c.Modal,{headerBarMain:i.createElement(Dl,{label:o(E.label.heading)}),headerBarEnd:i.createElement(Il,{onClick:u}),actionCancelLabel:o(E.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(E.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action"},i.createElement(c.FormComposer,{config:E.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){let t={action:null==r?void 0:r.action,comment:null==e?void 0:e.comments,businessService:p,moduleName:f};D&&(t.documents=[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]),d({hallsBookingApplication:s({},v,{workflow:t})})},defaultValues:g,formId:"modal-action"})):i.createElement(c.Loader,null)},Ol=e=>i.createElement("h1",{className:"heading-m"},e.label),xl=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Rl=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(xl,null)),Ll=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p,moduleCode:f}=e;console.log("snjdskbjdfbjskfjkbs",r);const{data:m}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),[E,_]=l.useState({}),[g,h]=l.useState({}),[S,y]=l.useState([]),[b,T]=l.useState(null),[C,A]=l.useState(null),[D,N]=l.useState(null),[I,w]=l.useState(null),[O,x]=l.useState(null),[R,L]=l.useState(!1);function P(e){N(e.target.files[0])}return l.useEffect(()=>{var e;y(null==m||null===(e=m.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[m]),l.useEffect(()=>{!function(){try{x(null);const e=function(){if(D){const e=function(){if(D.size>=5242880)x(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("PTR",D,Digit.ULBService.getStateId())).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?w(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):x(o("CS_FILE_UPLOAD_ERROR"))})},function(){x(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[D]),l.useEffect(()=>{r&&_((e=>{let{t:t,action:n,selectFile:l,uploadedFile:o,setUploadedFile:r,businessService:a}=e;console.log("action",n);const u=(new Date).toISOString().split("T")[0];return console.log("todayedsta ::",u),{label:{heading:"WF_"+(null==n?void 0:n.action)+"_APPLICATION",submit:"WF_"+a+"_"+(null==n?void 0:n.action),cancel:"ES_PTR_COMMON_CANCEL"},form:[{body:["COMPLETIONPENDING"===(null==n?void 0:n.state)?{label:t("EW_PICKUP_DATE"),type:"date",isMandatory:!0,populators:{name:"date",min:(new Date).toISOString().split("T")[0],max:new Date(Date.now()+6048e5).toISOString().split("T")[0]}}:"null","REQUESTCOMPLETED"===(null==n?void 0:n.state)?{label:t("ES_EW_ACTION_TRANSACTION_ID"),type:"text",isMandatory:!0,populators:{name:"transactionId"}}:"null","REQUESTCOMPLETED"===(null==n?void 0:n.state)?{label:t("ES_EW_ACTION_FINALAMOUNT"),type:"text",isMandatory:!0,populators:{name:"finalAmount"}}:"null",{label:t("ES_EW_ACTION_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:t("ES_EW_PHOTO")+(n.docUploadRequired?" *":""),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:l,onDelete:()=>{r(null)},showHint:!0,hintText:t("EW_ATTACH_RESTRICTIONS_SIZE"),message:o?"1 "+t("ES_EW_ACTION_FILEUPLOADED"):t("ES_EW_ACTION_NO_FILEUPLOADED")})}]}]}})({t:o,action:r,approvers:S,selectedApprover:b,setSelectedApprover:T,selectFile:P,uploadedFile:I,setUploadedFile:w,businessService:p}))},[r,S,I]),console.log("conggg",E),r&&E.form?i.createElement(c.Modal,{headerBarMain:i.createElement(Ol,{label:o(E.label.heading)}),headerBarEnd:i.createElement(Rl,{onClick:u}),actionCancelLabel:o(E.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(E.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action"},i.createElement(c.FormComposer,{config:E.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){let t={action:null==r?void 0:r.action,comments:null==e?void 0:e.comments,businessService:p,moduleName:f};console.log("applicationData",e),I&&(t.documents=[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==D?void 0:D.name,filestoreId:I},{}]),v.pickUpDate=null==e?void 0:e.date,v.transactionId=null==e?void 0:e.transactionId,v.finalAmount=null==e?void 0:e.finalAmount,d({EwasteApplication:[s({},v,{workflow:t})]})},defaultValues:g,formId:"modal-action"})):i.createElement(c.Loader,null)};var Pl=Y(function(e,t){(function(){var l=function(e){return e instanceof l?e:this instanceof l?void(this.EXIFwrapped=e):new l(e)};e.exports&&(t=e.exports=l),t.EXIF=l;var i=l.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},o=l.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},r=l.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},a=l.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},u=l.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function c(e){return!!e.exifdata}function s(e){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,l=e.byteLength;n<l;){if(255!=t.getUint8(n))return!1;if(225==t.getUint8(n+1))return E(t,n+4,t.getUint16(n+2));n+=2+t.getUint16(n+2)}}var d={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};function v(e,t,n){for(var l,i,o,r,a=new DataView(e),u={},c=t;c<t+n;)28===a.getUint8(c)&&2===a.getUint8(c+1)&&(r=a.getUint8(c+2))in d&&(o=a.getInt16(c+3),i=d[r],l=m(a,c+5,o),u.hasOwnProperty(i)?u[i]instanceof Array?u[i].push(l):u[i]=[u[i],l]:u[i]=l),c++;return u}function p(e,t,n,l,i){var o,r,a=e.getUint16(n,!i),u={};for(r=0;r<a;r++)u[l[e.getUint16(o=n+12*r+2,!i)]]=f(e,o,t,0,i);return u}function f(e,t,n,l,i){var o,r,a,u,c,s,d=e.getUint16(t+2,!i),v=e.getUint32(t+4,!i),p=e.getUint32(t+8,!i)+n;switch(d){case 1:case 7:if(1==v)return e.getUint8(t+8,!i);for(o=v>4?p:t+8,r=[],u=0;u<v;u++)r[u]=e.getUint8(o+u);return r;case 2:return m(e,o=v>4?p:t+8,v-1);case 3:if(1==v)return e.getUint16(t+8,!i);for(o=v>2?p:t+8,r=[],u=0;u<v;u++)r[u]=e.getUint16(o+2*u,!i);return r;case 4:if(1==v)return e.getUint32(t+8,!i);for(r=[],u=0;u<v;u++)r[u]=e.getUint32(p+4*u,!i);return r;case 5:if(1==v)return c=e.getUint32(p,!i),s=e.getUint32(p+4,!i),(a=new Number(c/s)).numerator=c,a.denominator=s,a;for(r=[],u=0;u<v;u++)c=e.getUint32(p+8*u,!i),s=e.getUint32(p+4+8*u,!i),r[u]=new Number(c/s),r[u].numerator=c,r[u].denominator=s;return r;case 9:if(1==v)return e.getInt32(t+8,!i);for(r=[],u=0;u<v;u++)r[u]=e.getInt32(p+4*u,!i);return r;case 10:if(1==v)return e.getInt32(p,!i)/e.getInt32(p+4,!i);for(r=[],u=0;u<v;u++)r[u]=e.getInt32(p+8*u,!i)/e.getInt32(p+4+8*u,!i);return r}}function m(e,t,l){var i="";for(n=t;n<t+l;n++)i+=String.fromCharCode(e.getUint8(n));return i}function E(e,t){if("Exif"!=m(e,t,4))return!1;var n,l,c,s,d,v=t+6;if(18761==e.getUint16(v))n=!1;else{if(19789!=e.getUint16(v))return!1;n=!0}if(42!=e.getUint16(v+2,!n))return!1;var f=e.getUint32(v+4,!n);if(f<8)return!1;if((l=p(e,v,v+f,o,n)).ExifIFDPointer)for(c in s=p(e,v,v+l.ExifIFDPointer,i,n)){switch(c){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":s[c]=u[c][s[c]];break;case"ExifVersion":case"FlashpixVersion":s[c]=String.fromCharCode(s[c][0],s[c][1],s[c][2],s[c][3]);break;case"ComponentsConfiguration":s[c]=u.Components[s[c][0]]+u.Components[s[c][1]]+u.Components[s[c][2]]+u.Components[s[c][3]]}l[c]=s[c]}if(l.GPSInfoIFDPointer)for(c in d=p(e,v,v+l.GPSInfoIFDPointer,r,n)){switch(c){case"GPSVersionID":d[c]=d[c][0]+"."+d[c][1]+"."+d[c][2]+"."+d[c][3]}l[c]=d[c]}return l.thumbnail=function(e,t,n,l){var i=function(e,t,n){var l=e.getUint16(t,!n);return e.getUint32(t+2+12*l,!n)}(e,t+n,l);if(!i)return{};if(i>e.byteLength)return{};var o=p(e,t,t+i,a,l);if(o.Compression)switch(o.Compression){case 6:o.JpegIFOffset&&o.JpegIFByteCount&&(o.blob=new Blob([new Uint8Array(e.buffer,t+o.JpegIFOffset,o.JpegIFByteCount)],{type:"image/jpeg"}));break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",o.Compression)}else 2==o.PhotometricInterpretation&&console.log("Thumbnail image format is RGB, which is not implemented.");return o}(e,v,f,n),l}function _(e){var t={};if(1==e.nodeType){if(e.attributes.length>0){t["@attributes"]={};for(var n=0;n<e.attributes.length;n++){var l=e.attributes.item(n);t["@attributes"][l.nodeName]=l.nodeValue}}}else if(3==e.nodeType)return e.nodeValue;if(e.hasChildNodes())for(var i=0;i<e.childNodes.length;i++){var o=e.childNodes.item(i),r=o.nodeName;if(null==t[r])t[r]=_(o);else{if(null==t[r].push){var a=t[r];t[r]=[],t[r].push(a)}t[r].push(_(o))}}return t}function g(e){try{var t={};if(e.children.length>0)for(var n=0;n<e.children.length;n++){var l=e.children.item(n),i=l.attributes;for(var o in i){var r=i[o],a=r.nodeName;void 0!==a&&(t[a]=r.nodeValue)}var u=l.nodeName;if(void 0===t[u])t[u]=_(l);else{if(void 0===t[u].push){var c=t[u];t[u]=[],t[u].push(c)}t[u].push(_(l))}}else t=e.textContent;return t}catch(e){console.log(e.message)}}l.enableXmp=function(){l.isXmpEnabled=!0},l.disableXmp=function(){l.isXmpEnabled=!1},l.getData=function(e,t){return!((self.Image&&e instanceof self.Image||self.HTMLImageElement&&e instanceof self.HTMLImageElement)&&!e.complete||(c(e)?t&&t.call(e):function(e,t){function n(n){var i=s(n);e.exifdata=i||{};var o=function(e){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,l=e.byteLength,i=function(e,t){return 56===e.getUint8(t)&&66===e.getUint8(t+1)&&73===e.getUint8(t+2)&&77===e.getUint8(t+3)&&4===e.getUint8(t+4)&&4===e.getUint8(t+5)};n<l;){if(i(t,n)){var o=t.getUint8(n+7);return o%2!=0&&(o+=1),0===o&&(o=4),v(e,n+8+o,t.getUint16(n+6+o))}n++}}(n);if(e.iptcdata=o||{},l.isXmpEnabled){var r=function(e){if("DOMParser"in self){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,l=e.byteLength,i=new DOMParser;n<l-4;){if("http"==m(t,n,4)){var o=n-1,r=t.getUint16(n-2)-1,a=m(t,o,r),u=a.indexOf("xmpmeta>")+8,c=(a=a.substring(a.indexOf("<x:xmpmeta"),u)).indexOf("x:xmpmeta")+10;return a=a.slice(0,c)+'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+a.slice(c),g(i.parseFromString(a,"text/xml"))}n++}}}(n);e.xmpdata=r||{}}t&&t.call(e)}if(e.src)if(/^data\:/i.test(e.src))n(function(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/im)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var n=atob(e),l=n.length,i=new ArrayBuffer(l),o=new Uint8Array(i),r=0;r<l;r++)o[r]=n.charCodeAt(r);return i}(e.src));else if(/^blob\:/i.test(e.src))(o=new FileReader).onload=function(e){n(e.target.result)},function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(e){200!=this.status&&0!==this.status||o.readAsArrayBuffer(this.response)},n.send()}(e.src);else{var i=new XMLHttpRequest;i.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";n(i.response),i=null},i.open("GET",e.src,!0),i.responseType="arraybuffer",i.send(null)}else if(self.FileReader&&(e instanceof self.Blob||e instanceof self.File)){var o;(o=new FileReader).onload=function(e){n(e.target.result)},o.readAsArrayBuffer(e)}}(e,t),0))},l.getTag=function(e,t){if(c(e))return e.exifdata[t]},l.getIptcTag=function(e,t){if(c(e))return e.iptcdata[t]},l.getAllTags=function(e){if(!c(e))return{};var t,n=e.exifdata,l={};for(t in n)n.hasOwnProperty(t)&&(l[t]=n[t]);return l},l.getAllIptcTags=function(e){if(!c(e))return{};var t,n=e.iptcdata,l={};for(t in n)n.hasOwnProperty(t)&&(l[t]=n[t]);return l},l.pretty=function(e){if(!c(e))return"";var t,n=e.exifdata,l="";for(t in n)n.hasOwnProperty(t)&&(l+="object"==typeof n[t]?n[t]instanceof Number?t+" : "+n[t]+" ["+n[t].numerator+"/"+n[t].denominator+"]\r\n":t+" : ["+n[t].length+" values]\r\n":t+" : "+n[t]+"\r\n");return l},l.readFromBinaryFile=function(e){return s(e)}}).call(q)});const kl=e=>i.createElement("h1",{className:"heading-m"},e.label),Ml=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Fl=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Ml,null)),Bl=e=>{var t,n;let{t:o,action:a,tenantId:u,closeModal:d,submitAction:v,applicationData:p,businessService:f,moduleCode:m,vending_Zone:E,UserVendingZone:_,UserVendingZoneCode:g}=e;r.useHistory();const h=Digit.UserService.getUser().info,S=null==h?void 0:h.roles,{data:y}=Digit.Hooks.useEmployeeSearch(u,{roles:null==a||null===(t=a.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:null==a?void 0:a.isTerminateState}),[b,T]=l.useState({}),[C,A]=l.useState({}),[D,N]=l.useState([]),[I,w]=l.useState(null),[O,x]=l.useState(null),[R,L]=l.useState(null),[P,k]=l.useState(null),[M,F]=l.useState(!1),[B,U]=l.useState(),[W,j]=l.useState(),[H,z]=l.useState("");function V(e){F(!0),x(e.target.files[0])}function G(e){return e[0]+e[1]/60+e[2]/3600}return l.useEffect(()=>{var e;N(null==y||null===(e=y.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[y]),l.useEffect(()=>{!function(){try{k(null);const e=function(){if(O){(function(e){return new Promise(t=>{Pl.getData(e,function(){const e=Pl.getTag(this,"GPSLatitude"),n=Pl.getTag(this,"GPSLongitude");if(e&&n){const l=G(e),i=G(n);t({latitude:l,longitude:i})}else t({latitude:null,longitude:null})})})})(O).then(e=>{let{latitude:t,longitude:n}=e;t&&n?function(e,t){try{Promise.resolve(qe(function(){return Promise.resolve(fetch(((e,t)=>"https://nominatim.openstreetmap.org/reverse?format=json&lat="+e+"&lon="+t+"&zoom=18&addressdetails=1")(e,t))).then(function(e){if(!e.ok)throw new Error("Failed to fetch address");return Promise.resolve(e.json()).then(function(e){if(e&&e.address){var t,n,l,i,o,r,a,u;const c=[null===(t=e.address)||void 0===t?void 0:t.amenity,null===(n=e.address)||void 0===n?void 0:n.road,null===(l=e.address)||void 0===l?void 0:l.neighbourhood,null===(i=e.address)||void 0===i?void 0:i.suburb,null===(o=e.address)||void 0===o?void 0:o.city,null===(r=e.address)||void 0===r?void 0:r.state,null===(a=e.address)||void 0===a?void 0:a.postcode,null===(u=e.address)||void 0===u?void 0:u.country].filter(Boolean).join(", ");U(c)}})})},function(e){console.error("Error fetching address:",e)}))}catch(e){return Promise.reject(e)}}(t,n):console.log("No geolocation data found in the image.")});const e=function(){if(O.size>=5242880)k(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=function(e,t){try{var n=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("StreetVending",O,u)).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?L(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):k(o("CS_FILE_UPLOAD_ERROR"))})},function(){k(o("CS_FILE_UPLOAD_ERROR"))})}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,n)}(0,function(e,t){if(F(!1),e)throw t;return t});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[O]),l.useEffect(()=>{T((e=>{let{t:t,action:n,selectFile:o,uploadedFile:r,setUploadedFile:a,approvers:u,selectedApprover:s,setSelectedApprover:d,isUploading:v,geoLocationData:p,vending_Zone:f,vendingZones:m,setvendingZones:E,UserVendingZone:_,selectApprover:g}=e;const h=()=>i.createElement("div",{className:"loading-spinner"});return{label:{heading:"WF_"+(null==n?void 0:n.action)+"_APPLICATION",submit:"SV_"+(null==n?void 0:n.action),cancel:"SV_COMMON_CANCEL"},form:[{body:["APPROVE"===(null==n?void 0:n.action)||"REJECT"===(null==n?void 0:n.action)||"SENDBACKTOCITIZEN"===(null==n?void 0:n.action)?"":{label:t("SV_ASSIGNEE"),type:"dropdown",populators:i.createElement(c.Dropdown,{option:u,t:t,optionKey:"name",select:d,selected:s})},(g||[]).some(e=>"TVCEMPLOYEE"===e.code||"SVCEMP"===e.code)&&{label:t("SV_CONFIRM_VENDING_ZONE"),type:"dropdown",populators:i.createElement(c.Dropdown,{option:f,t:t,optionKey:"i18nKey",select:E,selected:(e=>e?{i18nKey:e,code:e,value:e}:null)(_)||m})},{label:t("SV_ACTION_COMMENTS"),isMandatory:!0,type:"textarea",populators:{name:"comments",validation:{required:!0}}},{label:t("SV_ATTATCH_FILE")+(n.docUploadRequired?" *":""),populators:i.createElement(l.Fragment,null,i.createElement(c.UploadFile,{id:"workflow-doc-sv",onUpload:o,onDelete:()=>{a(null)},message:v?i.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},i.createElement(h,null),i.createElement("span",null,"Uploading...")):r?"1 "+t("SV_FILE_UPLOADED"):t("SV_NO_FILE")}),(g||[]).some(e=>"INSPECTIONOFFICER"===e.code)&&p&&i.createElement("div",null,i.createElement("strong",null," Location: ",p," ")))}]}]}})({t:o,action:a,approvers:D,selectedApprover:I,setSelectedApprover:w,selectFile:V,uploadedFile:R,setUploadedFile:L,businessService:f,isUploading:M,geoLocationData:B,vending_Zone:E,vendingZones:W,setvendingZones:j,UserVendingZone:_,selectApprover:S}))},[a,D,R]),a&&b.form?i.createElement(c.Modal,{headerBarMain:i.createElement(kl,{label:o(b.label.heading)}),headerBarEnd:i.createElement(Fl,{onClick:d}),actionCancelLabel:o(b.label.cancel),actionCancelOnSubmit:d,actionSaveLabel:o(b.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action",isDisabled:(null==a?void 0:a.docUploadRequired)&&!R&&!H||!H},i.createElement(c.FormComposer,{config:b.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){var t;let n={action:null==a?void 0:a.action,comments:null==e?void 0:e.comments,businessService:f,moduleName:m,assignes:"SENDBACKTOCITIZEN"===(null==a?void 0:a.action)?[null==p||null===(t=p.auditDetails)||void 0===t?void 0:t.createdBy]:null!=I&&I.uuid?[null==I?void 0:I.uuid]:null};R&&(n.documents=[{documentType:(null==a?void 0:a.action)+" DOC",fileName:null==O?void 0:O.name,fileStoreId:R}]),v({streetVendingDetail:s({},p,{vendingZone:(null==W?void 0:W.code)||g,workflow:n})})},defaultValues:C,formId:"modal-action",onFormValueChange:(e,t)=>{z(null==t?void 0:t.comments)}})):i.createElement(c.Loader,null)},Ul=e=>i.createElement("h1",{className:"heading-m"},e.label),Wl=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),jl=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Wl,null)),Hl=e=>{var n,o,a,u;let{t:c,action:d,tenantId:v,closeModal:p,submitAction:f,applicationData:m,businessService:E,moduleCode:_}=e;const{data:g}=Digit.Hooks.useEmployeeSearch(v,{roles:null==d||null===(n=d.assigneeRoles)||void 0===n||null===(o=n.map)||void 0===o?void 0:o.call(n,e=>({code:e})),isActive:!0},{enabled:!(null!=d&&d.isTerminateState)}),{data:h}=Digit.Hooks.fsm.useVendorSearch({tenantId:v,config:{enabled:"PENDING_FOR_VEHICLE_DRIVER_ASSIGN"===(null==d?void 0:d.state)}});let S=[];null==h||null===(a=h.vendor)||void 0===a||a.map(e=>{var t,n;(null==e||null===(t=e.additionalDetails)||void 0===t?void 0:t.serviceType)===(null==m?void 0:m.bookingNo.split("-")[0])&&S.push({code:null==e?void 0:e.name,name:null==e?void 0:e.name,i18nKey:null==e?void 0:e.name,vendorId:null==e?void 0:e.id,uuid:null==e||null===(n=e.owner)||void 0===n?void 0:n.uuid})});const{data:y}=Digit.Hooks.fsm.useVehiclesSearch({tenantId:v,config:{enabled:"DELIVERY_PENDING"===(null==d?void 0:d.state)}});let b=[];null==y||null===(u=y.vehicle)||void 0===u||u.map(e=>{var t;b.push({code:null==e?void 0:e.registrationNumber,name:null==e?void 0:e.registrationNumber,i18nKey:null==e?void 0:e.registrationNumber,tankerCapacity:null==e?void 0:e.tankCapacity,vehicleId:null==e?void 0:e.id,uuid:null==e||null===(t=e.owner)||void 0===t?void 0:t.uuid})});const[T,C]=l.useState({}),[A,D]=l.useState({}),[N,I]=l.useState([]),[w,O]=l.useState(null),[x,R]=l.useState(null),[L,P]=l.useState(null),[k,M]=l.useState(null),[F,B]=l.useState(null),[U,W]=l.useState(""),j=r.useHistory();function H(e){O(e.target.files[0])}return l.useEffect(()=>{var e;I(null==g||null===(e=g.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[g]),l.useEffect(()=>{!function(){try{P(null);const e=function(){if(w){const e=function(){if(w.size>=5242880)P(c("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("WT",w,v)).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?R(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):P(c("CS_FILE_UPLOAD_ERROR"))})},function(){P(c("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[w]),l.useEffect(()=>{if(d){if("PAY"===d.action){var e;const t=null===(e=m.bookingNo)||void 0===e?void 0:e.split("-")[0];let n="";switch(t){case"WT":n="request-service.water_tanker";break;case"MT":n="request-service.mobile_toilet";break;case"TP":n="request-service.tree_pruning";break;default:return void console.error("Unknown booking prefix:",t)}return j.push("/digit-ui/employee/payment/collect/"+n+"/"+m.bookingNo)}C((e=>{let{t:n,action:l,selectFile:o,uploadedFile:r,setUploadedFile:a,selectedVendor:u,setSelectedVendor:c,vendorDescription:s,vehicleDescription:d,selectVehicle:v,setSelectVehicle:p}=e;return{label:{heading:"RS_"+(null==l?void 0:l.action),submit:"RS_"+(null==l?void 0:l.action),cancel:"CS_COMMON_BACK"},form:[{body:["PENDING_FOR_VEHICLE_DRIVER_ASSIGN"===(null==l?void 0:l.state)?{label:n("RS_ASSIGN"),type:"dropdown",isMandatory:!0,populators:i.createElement(t.Dropdown,{option:s,t:n,optionKey:"i18nKey",select:c,selected:u})}:"null","DELIVERY_PENDING"===(null==l?void 0:l.state)?{label:n("RS_REGISTRATION_NUMBER"),isMandatory:!0,type:"dropdown",populators:i.createElement(t.Dropdown,{option:d,t:n,optionKey:"i18nKey",select:p,selected:v})}:"null",{label:n("ES_RS_ACTION_COMMENTS")+" *",type:"textarea",populators:{name:"comments",validation:{required:!0}}},{label:n("ES_RS_ATTACH_FILE")+(l.docUploadRequired?" *":""),populators:i.createElement(t.UploadFile,{id:"workflow-doc",onUpload:o,onDelete:()=>{a(null)},message:r?"1 "+n("CS_ACTION_FILEUPLOADED"):n("CS_ACTION_NO_FILEUPLOADED")})}]}]}})({t:c,action:d,selectFile:H,uploadedFile:x,setUploadedFile:R,selectedVendor:k,setSelectedVendor:M,vendorDescription:h?S:void 0,vehicleDescription:y?b:void 0,selectVehicle:F,setSelectVehicle:B}))}},[d,N,x,h,F,y]),d&&T.form?i.createElement(t.Modal,{headerBarMain:i.createElement(Ul,{label:c(T.label.heading)}),headerBarEnd:i.createElement(jl,{onClick:p}),actionCancelLabel:c(T.label.cancel),actionCancelOnSubmit:p,actionSaveLabel:c(T.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action",isDisabled:(null==d?void 0:d.docUploadRequired)&&!x&&!U||"PENDING_FOR_VEHICLE_DRIVER_ASSIGN"===(null==d?void 0:d.state)&&!k&&!U||"DELIVERY_PENDING"===(null==d?void 0:d.state)&&!F&&!U||!U},i.createElement(t.FormComposer,{config:T.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){let t,n={action:null==d?void 0:d.action,comments:null==e?void 0:e.comments,businessService:E,moduleName:_};x&&(n.documents=[{documentType:(null==d?void 0:d.action)+" DOC",fileName:null==w?void 0:w.name,fileStoreId:x}]),"PENDING_FOR_VEHICLE_DRIVER_ASSIGN"===(null==d?void 0:d.state)&&(n.assignes=[null==k?void 0:k.uuid],m.vendorId=null==k?void 0:k.vendorId),"DELIVERY_PENDING"===(null==d?void 0:d.state)&&(m.vehicleId=null==F?void 0:F.vehicleId),t="watertanker"===E?{waterTankerBookingDetail:s({},m,{workflow:n})}:"treePruning"===E?{treePruningBookingDetail:s({},m,{workflow:n})}:{mobileToiletBookingDetail:s({},m,{workflow:n})},f(t)},defaultValues:A,formId:"modal-action",onFormValueChange:(e,t)=>{W(null==t?void 0:t.comments)}})):i.createElement(t.Loader,null)},zl=e=>null!=e&&e.businessService.includes("PT")?i.createElement($e,e):null!=e&&e.businessService.includes("ptr")?i.createElement(yl,e):null!=e&&e.businessService.includes("NewTL")||null!=e&&e.businessService.includes("TL")||null!=e&&e.businessService.includes("EDITRENEWAL")||null!=e&&e.businessService.includes("DIRECTRENEWAL")?i.createElement(tt,e):null!=e&&e.moduleCode.includes("BPAREG")?i.createElement(ot,e):null!=e&&e.moduleCode.includes("BPA")?i.createElement(ct,e):null!=e&&e.moduleCode.includes("NOC")?i.createElement(pt,e):null!=e&&e.moduleCode.includes("WS")?i.createElement(_l,e):null!=e&&e.businessService.includes("asset-create")?i.createElement(Al,e):null!=e&&e.businessService.includes("ewst")?i.createElement(Ll,e):null!=e&&e.businessService.includes("booking-refund")?i.createElement(wl,e):null!=e&&e.businessService.includes("street-vending")?i.createElement(Bl,e):null!=e&&e.businessService.includes("watertanker")||null!=e&&e.businessService.includes("mobileToilet")||null!=e&&e.businessService.includes("treePruning")?i.createElement(Hl,e):void 0;function Vl(e){let{documents:t,svgStyles:n={},isSendBackFlow:l=!1,isHrLine:r=!1,titleStyles:a}=e;const{t:u}=o.useTranslation(),s=window.location.href.includes("stakeholder");return i.createElement("div",{style:{marginTop:"19px"}},!s&&(null==t?void 0:t.map((e,n)=>{var o;return i.createElement(i.Fragment,{key:n},null!=e&&e.title?i.createElement(c.CardSubHeader,{style:a||{marginTop:"32px",marginBottom:"8px",color:"#505A5F",fontSize:"24px"}},u(null==e?void 0:e.title)):null,i.createElement("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start"}},null!=e&&e.values&&(null==e?void 0:e.values.length)>0?null==e||null===(o=e.values)||void 0===o?void 0:o.map((e,t)=>{var n;return i.createElement("a",{target:"_",href:null==e?void 0:e.url,style:{minWidth:"80px",marginRight:"10px",maxWidth:"100px",height:"auto",minWidth:"100px"},key:t},i.createElement("div",{style:{display:"flex",justifyContent:"center"}},i.createElement(c.PDFSvg,null)),i.createElement("p",{style:{marginTop:"8px",fontWeight:"bold",textAlign:"center",color:"#505A5F"}},u(null==e?void 0:e.title)),l?null!=e&&null!==(n=e.documentType)&&void 0!==n&&n.includes("NOC")?i.createElement("p",{style:{textAlign:"center"}},u(null==e?void 0:e.documentType.split(".")[1])):i.createElement("p",{style:{textAlign:"center"}},u(null==e?void 0:e.documentType)):"")}):!window.location.href.includes("citizen")&&i.createElement("div",null,i.createElement("p",null,u("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))),r&&(null==t?void 0:t.length)!=n+1?i.createElement("hr",{style:{color:"#D6D5D4",backgroundColor:"#D6D5D4",height:"2px",marginTop:"20px",marginBottom:"20px"}}):null)})),s&&(null==t?void 0:t.map((e,t)=>{var l;return i.createElement(i.Fragment,{key:t},null!=e&&e.title?i.createElement(c.CardSubHeader,{style:{marginTop:"32px",marginBottom:"8px",color:"#505A5F",fontSize:"24px"}},u(null==e?void 0:e.title)):null,i.createElement("div",null,null!=e&&e.values&&(null==e?void 0:e.values.length)>0?null==e||null===(l=e.values)||void 0===l?void 0:l.map((e,t)=>i.createElement("a",{target:"_",href:null==e?void 0:e.url,style:{minWidth:null!=n&&n.minWidth?null==n?void 0:n.minWidth:"160px",marginRight:"20px"},key:t},i.createElement("div",{style:{maxWidth:"940px",padding:"8px",borderRadius:"4px",border:"1px solid #D6D5D4",background:"#FAFAFA"}},i.createElement("p",{style:{marginTop:"8px",fontWeight:"bold",marginBottom:"10px"}},u(null==e?void 0:e.title)),null!=e&&e.docInfo?i.createElement("div",{style:{fontSize:"12px",color:"#505A5F",fontWeight:400,lineHeight:"15px",marginBottom:"10px"}},""+u(null==e?void 0:e.docInfo)):null,i.createElement(c.PDFSvg,null),i.createElement("p",{style:{marginTop:"8px",fontSize:"16px",lineHeight:"19px",color:"#505A5F",fontWeight:"400",textAlign:"center",color:"#505A5F"}},""+u(null==e?void 0:e.title))))):!window.location.href.includes("citizen")&&i.createElement("div",null,i.createElement("p",null,u("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))))})))}Y(function(e,t){(function(){var n="Expected a function",l="__lodash_placeholder__",i=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],o="[object Arguments]",r="[object Array]",a="[object Boolean]",u="[object Date]",c="[object Error]",s="[object Function]",d="[object GeneratorFunction]",v="[object Map]",p="[object Number]",f="[object Object]",m="[object RegExp]",E="[object Set]",_="[object String]",g="[object Symbol]",h="[object WeakMap]",S="[object ArrayBuffer]",y="[object DataView]",b="[object Float32Array]",T="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",D="[object Int32Array]",N="[object Uint8Array]",I="[object Uint16Array]",w="[object Uint32Array]",O=/\b__p \+= '';/g,x=/\b(__p \+=) '' \+/g,R=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,P=/[&<>"']/g,k=RegExp(L.source),M=RegExp(P.source),F=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,U=/<%=([\s\S]+?)%>/g,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,j=/^\w*$/,H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,z=/[\\^$.*+?()[\]{}|]/g,V=RegExp(z.source),G=/^\s+/,K=/\s/,Y=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,X=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,$=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Q=/[()=,{}\[\]\/\s]/,J=/\\(\\)?/g,ee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ne=/^[-+]0x[0-9a-f]+$/i,le=/^0b[01]+$/i,ie=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,re=/^(?:0|[1-9]\d*)$/,ae=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,ce=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ve="["+de+"]",pe="["+se+"]",fe="\\d+",me="[a-z\\xdf-\\xf6\\xf8-\\xff]",Ee="[^\\ud800-\\udfff"+de+fe+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",ge="[^\\ud800-\\udfff]",he="(?:\\ud83c[\\udde6-\\uddff]){2}",Se="[\\ud800-\\udbff][\\udc00-\\udfff]",ye="[A-Z\\xc0-\\xd6\\xd8-\\xde]",be="(?:"+me+"|"+Ee+")",Te="(?:"+ye+"|"+Ee+")",Ce="(?:"+pe+"|"+_e+")?",Ae="[\\ufe0e\\ufe0f]?"+Ce+"(?:\\u200d(?:"+[ge,he,Se].join("|")+")[\\ufe0e\\ufe0f]?"+Ce+")*",De="(?:"+["[\\u2700-\\u27bf]",he,Se].join("|")+")"+Ae,Ne="(?:"+[ge+pe+"?",pe,he,Se,"[\\ud800-\\udfff]"].join("|")+")",Ie=RegExp("['’]","g"),we=RegExp(pe,"g"),Oe=RegExp(_e+"(?="+_e+")|"+Ne+Ae,"g"),xe=RegExp([ye+"?"+me+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ve,ye,"$"].join("|")+")",Te+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ve,ye+be,"$"].join("|")+")",ye+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ye+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fe,De].join("|"),"g"),Re=RegExp("[\\u200d\\ud800-\\udfff"+se+"\\ufe0e\\ufe0f]"),Le=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ke=-1,Me={};Me[b]=Me[T]=Me[C]=Me[A]=Me[D]=Me[N]=Me["[object Uint8ClampedArray]"]=Me[I]=Me[w]=!0,Me[o]=Me[r]=Me[S]=Me[a]=Me[y]=Me[u]=Me[c]=Me[s]=Me[v]=Me[p]=Me[f]=Me[m]=Me[E]=Me[_]=Me[h]=!1;var Fe={};Fe[o]=Fe[r]=Fe[S]=Fe[y]=Fe[a]=Fe[u]=Fe[b]=Fe[T]=Fe[C]=Fe[A]=Fe[D]=Fe[v]=Fe[p]=Fe[f]=Fe[m]=Fe[E]=Fe[_]=Fe[g]=Fe[N]=Fe["[object Uint8ClampedArray]"]=Fe[I]=Fe[w]=!0,Fe[c]=Fe[s]=Fe[h]=!1;var Be={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ue=parseFloat,We=parseInt,je="object"==typeof q&&q&&q.Object===Object&&q,He="object"==typeof self&&self&&self.Object===Object&&self,ze=je||He||Function("return this")(),Ve=t&&!t.nodeType&&t,Ge=Ve&&e&&!e.nodeType&&e,Ke=Ge&&Ge.exports===Ve,qe=Ke&&je.process,Ye=function(){try{return Ge&&Ge.require&&Ge.require("util").types||qe&&qe.binding&&qe.binding("util")}catch(e){}}(),Xe=Ye&&Ye.isArrayBuffer,Ze=Ye&&Ye.isDate,$e=Ye&&Ye.isMap,Qe=Ye&&Ye.isRegExp,Je=Ye&&Ye.isSet,et=Ye&&Ye.isTypedArray;function tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function nt(e,t,n,l){for(var i=-1,o=null==e?0:e.length;++i<o;){var r=e[i];t(l,r,n(r),e)}return l}function lt(e,t){for(var n=-1,l=null==e?0:e.length;++n<l&&!1!==t(e[n],n,e););return e}function it(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ot(e,t){for(var n=-1,l=null==e?0:e.length;++n<l;)if(!t(e[n],n,e))return!1;return!0}function rt(e,t){for(var n=-1,l=null==e?0:e.length,i=0,o=[];++n<l;){var r=e[n];t(r,n,e)&&(o[i++]=r)}return o}function at(e,t){return!(null==e||!e.length)&&_t(e,t,0)>-1}function ut(e,t,n){for(var l=-1,i=null==e?0:e.length;++l<i;)if(n(t,e[l]))return!0;return!1}function ct(e,t){for(var n=-1,l=null==e?0:e.length,i=Array(l);++n<l;)i[n]=t(e[n],n,e);return i}function st(e,t){for(var n=-1,l=t.length,i=e.length;++n<l;)e[i+n]=t[n];return e}function dt(e,t,n,l){var i=-1,o=null==e?0:e.length;for(l&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function vt(e,t,n,l){var i=null==e?0:e.length;for(l&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function pt(e,t){for(var n=-1,l=null==e?0:e.length;++n<l;)if(t(e[n],n,e))return!0;return!1}var ft=yt("length");function mt(e,t,n){var l;return n(e,function(e,n,i){if(t(e,n,i))return l=n,!1}),l}function Et(e,t,n,l){for(var i=e.length,o=n+(l?1:-1);l?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function _t(e,t,n){return t==t?function(e,t,n){for(var l=n-1,i=e.length;++l<i;)if(e[l]===t)return l;return-1}(e,t,n):Et(e,ht,n)}function gt(e,t,n,l){for(var i=n-1,o=e.length;++i<o;)if(l(e[i],t))return i;return-1}function ht(e){return e!=e}function St(e,t){var n=null==e?0:e.length;return n?Ct(e,t)/n:NaN}function yt(e){return function(t){return null==t?void 0:t[e]}}function bt(e){return function(t){return null==e?void 0:e[t]}}function Tt(e,t,n,l,i){return i(e,function(e,i,o){n=l?(l=!1,e):t(n,e,i,o)}),n}function Ct(e,t){for(var n,l=-1,i=e.length;++l<i;){var o=t(e[l]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function At(e,t){for(var n=-1,l=Array(e);++n<e;)l[n]=t(n);return l}function Dt(e){return e?e.slice(0,Vt(e)+1).replace(G,""):e}function Nt(e){return function(t){return e(t)}}function It(e,t){return ct(t,function(t){return e[t]})}function wt(e,t){return e.has(t)}function Ot(e,t){for(var n=-1,l=e.length;++n<l&&_t(t,e[n],0)>-1;);return n}function xt(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function Rt(e,t){for(var n=e.length,l=0;n--;)e[n]===t&&++l;return l}var Lt=bt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Pt=bt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function kt(e){return"\\"+Be[e]}function Mt(e){return Re.test(e)}function Ft(e){var t=-1,n=Array(e.size);return e.forEach(function(e,l){n[++t]=[l,e]}),n}function Bt(e,t){return function(n){return e(t(n))}}function Ut(e,t){for(var n=-1,i=e.length,o=0,r=[];++n<i;){var a=e[n];a!==t&&a!==l||(e[n]=l,r[o++]=n)}return r}function Wt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function jt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function Ht(e){return Mt(e)?function(e){for(var t=Oe.lastIndex=0;Oe.test(e);)++t;return t}(e):ft(e)}function zt(e){return Mt(e)?function(e){return e.match(Oe)||[]}(e):function(e){return e.split("")}(e)}function Vt(e){for(var t=e.length;t--&&K.test(e.charAt(t)););return t}var Gt=bt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Kt=function e(t){var K=(t=null==t?ze:Kt.defaults(ze.Object(),t,Kt.pick(ze,Pe))).Array,q=t.Date,se=t.Error,de=t.Function,ve=t.Math,pe=t.Object,fe=t.RegExp,me=t.String,Ee=t.TypeError,_e=K.prototype,ge=pe.prototype,he=t["__core-js_shared__"],Se=de.prototype.toString,ye=ge.hasOwnProperty,be=0,Te=function(){var e=/[^.]+$/.exec(he&&he.keys&&he.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ce=ge.toString,Ae=Se.call(pe),De=ze._,Ne=fe("^"+Se.call(ye).replace(z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Oe=Ke?t.Buffer:void 0,Re=t.Symbol,Be=t.Uint8Array,je=Oe?Oe.allocUnsafe:void 0,He=Bt(pe.getPrototypeOf,pe),Ve=pe.create,Ge=ge.propertyIsEnumerable,qe=_e.splice,Ye=Re?Re.isConcatSpreadable:void 0,ft=Re?Re.iterator:void 0,bt=Re?Re.toStringTag:void 0,qt=function(){try{var e=$i(pe,"defineProperty");return e({},"",{}),e}catch(e){}}(),Yt=t.clearTimeout!==ze.clearTimeout&&t.clearTimeout,Xt=q&&q.now!==ze.Date.now&&q.now,Zt=t.setTimeout!==ze.setTimeout&&t.setTimeout,$t=ve.ceil,Qt=ve.floor,Jt=pe.getOwnPropertySymbols,en=Oe?Oe.isBuffer:void 0,tn=t.isFinite,nn=_e.join,ln=Bt(pe.keys,pe),on=ve.max,rn=ve.min,an=q.now,un=t.parseInt,cn=ve.random,sn=_e.reverse,dn=$i(t,"DataView"),vn=$i(t,"Map"),pn=$i(t,"Promise"),fn=$i(t,"Set"),mn=$i(t,"WeakMap"),En=$i(pe,"create"),_n=mn&&new mn,gn={},hn=Ao(dn),Sn=Ao(vn),yn=Ao(pn),bn=Ao(fn),Tn=Ao(mn),Cn=Re?Re.prototype:void 0,An=Cn?Cn.valueOf:void 0,Dn=Cn?Cn.toString:void 0;function Nn(e){if(Hr(e)&&!xr(e)&&!(e instanceof xn)){if(e instanceof On)return e;if(ye.call(e,"__wrapped__"))return Do(e)}return new On(e)}var In=function(){function e(){}return function(t){if(!jr(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function wn(){}function On(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function xn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Rn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}function Ln(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}function kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Pn;++t<n;)this.add(e[t])}function Mn(e){var t=this.__data__=new Ln(e);this.size=t.size}function Fn(e,t){var n=xr(e),l=!n&&Or(e),i=!n&&!l&&kr(e),o=!n&&!l&&!i&&Zr(e),r=n||l||i||o,a=r?At(e.length,me):[],u=a.length;for(var c in e)!t&&!ye.call(e,c)||r&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||io(c,u))||a.push(c);return a}function Bn(e){var t=e.length;return t?e[Pl(0,t-1)]:void 0}function Un(e,t){return bo(mi(e),Yn(t,0,e.length))}function Wn(e){return bo(mi(e))}function jn(e,t,n){(void 0!==n&&!Nr(e[t],n)||void 0===n&&!(t in e))&&Kn(e,t,n)}function Hn(e,t,n){var l=e[t];ye.call(e,t)&&Nr(l,n)&&(void 0!==n||t in e)||Kn(e,t,n)}function zn(e,t){for(var n=e.length;n--;)if(Nr(e[n][0],t))return n;return-1}function Vn(e,t,n,l){return Jn(e,function(e,i,o){t(l,e,n(e),o)}),l}function Gn(e,t){return e&&Ei(t,ga(t),e)}function Kn(e,t,n){"__proto__"==t&&qt?qt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function qn(e,t){for(var n=-1,l=t.length,i=K(l),o=null==e;++n<l;)i[n]=o?void 0:pa(e,t[n]);return i}function Yn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Xn(e,t,n,l,i,r){var c,h=1&t,O=2&t,x=4&t;if(n&&(c=i?n(e,l,i,r):n(e)),void 0!==c)return c;if(!jr(e))return e;var R=xr(e);if(R){if(c=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ye.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!h)return mi(e,c)}else{var L=eo(e),P=L==s||L==d;if(kr(e))return ci(e,h);if(L==f||L==o||P&&!i){if(c=O||P?{}:no(e),!h)return O?function(e,t){return Ei(e,Ji(e),t)}(e,function(e,t){return e&&Ei(t,ha(t),e)}(c,e)):function(e,t){return Ei(e,Qi(e),t)}(e,Gn(c,e))}else{if(!Fe[L])return i?e:{};c=function(e,t,n){var l=e.constructor;switch(t){case S:return si(e);case a:case u:return new l(+e);case y:return function(e,t){var n=t?si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case b:case T:case C:case A:case D:case N:case"[object Uint8ClampedArray]":case I:case w:return di(e,n);case v:return new l;case p:case _:return new l(e);case m:return function(e){var t=new e.constructor(e.source,te.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new l;case g:return An?pe(An.call(e)):{}}}(e,L,h)}}r||(r=new Mn);var k=r.get(e);if(k)return k;r.set(e,c),qr(e)?e.forEach(function(l){c.add(Xn(l,t,n,l,e,r))}):zr(e)&&e.forEach(function(l,i){c.set(i,Xn(l,t,n,i,e,r))});var M=R?void 0:(x?O?Vi:zi:O?ha:ga)(e);return lt(M||e,function(l,i){M&&(l=e[i=l]),Hn(c,i,Xn(l,t,n,i,e,r))}),c}function Zn(e,t,n){var l=n.length;if(null==e)return!l;for(e=pe(e);l--;){var i=n[l],o=e[i];if(void 0===o&&!(i in e)||!(0,t[i])(o))return!1}return!0}function $n(e,t,l){if("function"!=typeof e)throw new Ee(n);return go(function(){e.apply(void 0,l)},t)}function Qn(e,t,n,l){var i=-1,o=at,r=!0,a=e.length,u=[],c=t.length;if(!a)return u;n&&(t=ct(t,Nt(n))),l?(o=ut,r=!1):t.length>=200&&(o=wt,r=!1,t=new kn(t));e:for(;++i<a;){var s=e[i],d=null==n?s:n(s);if(s=l||0!==s?s:0,r&&d==d){for(var v=c;v--;)if(t[v]===d)continue e;u.push(s)}else o(t,d,l)||u.push(s)}return u}Nn.templateSettings={escape:F,evaluate:B,interpolate:U,variable:"",imports:{_:Nn}},(Nn.prototype=wn.prototype).constructor=Nn,(On.prototype=In(wn.prototype)).constructor=On,(xn.prototype=In(wn.prototype)).constructor=xn,Rn.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},Rn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Rn.prototype.get=function(e){var t=this.__data__;if(En){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ye.call(t,e)?t[e]:void 0},Rn.prototype.has=function(e){var t=this.__data__;return En?void 0!==t[e]:ye.call(t,e)},Rn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=En&&void 0===t?"__lodash_hash_undefined__":t,this},Ln.prototype.clear=function(){this.__data__=[],this.size=0},Ln.prototype.delete=function(e){var t=this.__data__,n=zn(t,e);return!(n<0||(n==t.length-1?t.pop():qe.call(t,n,1),--this.size,0))},Ln.prototype.get=function(e){var t=this.__data__,n=zn(t,e);return n<0?void 0:t[n][1]},Ln.prototype.has=function(e){return zn(this.__data__,e)>-1},Ln.prototype.set=function(e,t){var n=this.__data__,l=zn(n,e);return l<0?(++this.size,n.push([e,t])):n[l][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Rn,map:new(vn||Ln),string:new Rn}},Pn.prototype.delete=function(e){var t=Xi(this,e).delete(e);return this.size-=t?1:0,t},Pn.prototype.get=function(e){return Xi(this,e).get(e)},Pn.prototype.has=function(e){return Xi(this,e).has(e)},Pn.prototype.set=function(e,t){var n=Xi(this,e),l=n.size;return n.set(e,t),this.size+=n.size==l?0:1,this},kn.prototype.add=kn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},kn.prototype.has=function(e){return this.__data__.has(e)},Mn.prototype.clear=function(){this.__data__=new Ln,this.size=0},Mn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Mn.prototype.get=function(e){return this.__data__.get(e)},Mn.prototype.has=function(e){return this.__data__.has(e)},Mn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ln){var l=n.__data__;if(!vn||l.length<199)return l.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pn(l)}return n.set(e,t),this.size=n.size,this};var Jn=hi(al),el=hi(ul,!0);function tl(e,t){var n=!0;return Jn(e,function(e,l,i){return n=!!t(e,l,i)}),n}function nl(e,t,n){for(var l=-1,i=e.length;++l<i;){var o=e[l],r=t(o);if(null!=r&&(void 0===a?r==r&&!Xr(r):n(r,a)))var a=r,u=o}return u}function ll(e,t){var n=[];return Jn(e,function(e,l,i){t(e,l,i)&&n.push(e)}),n}function il(e,t,n,l,i){var o=-1,r=e.length;for(n||(n=lo),i||(i=[]);++o<r;){var a=e[o];t>0&&n(a)?t>1?il(a,t-1,n,l,i):st(i,a):l||(i[i.length]=a)}return i}var ol=Si(),rl=Si(!0);function al(e,t){return e&&ol(e,t,ga)}function ul(e,t){return e&&rl(e,t,ga)}function cl(e,t){return rt(t,function(t){return Br(e[t])})}function sl(e,t){for(var n=0,l=(t=oi(t,e)).length;null!=e&&n<l;)e=e[Co(t[n++])];return n&&n==l?e:void 0}function dl(e,t,n){var l=t(e);return xr(e)?l:st(l,n(e))}function vl(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":bt&&bt in pe(e)?function(e){var t=ye.call(e,bt),n=e[bt];try{e[bt]=void 0;var l=!0}catch(e){}var i=Ce.call(e);return l&&(t?e[bt]=n:delete e[bt]),i}(e):function(e){return Ce.call(e)}(e)}function pl(e,t){return e>t}function fl(e,t){return null!=e&&ye.call(e,t)}function ml(e,t){return null!=e&&t in pe(e)}function El(e,t,n){for(var l=n?ut:at,i=e[0].length,o=e.length,r=o,a=K(o),u=Infinity,c=[];r--;){var s=e[r];r&&t&&(s=ct(s,Nt(t))),u=rn(s.length,u),a[r]=!n&&(t||i>=120&&s.length>=120)?new kn(r&&s):void 0}s=e[0];var d=-1,v=a[0];e:for(;++d<i&&c.length<u;){var p=s[d],f=t?t(p):p;if(p=n||0!==p?p:0,!(v?wt(v,f):l(c,f,n))){for(r=o;--r;){var m=a[r];if(!(m?wt(m,f):l(e[r],f,n)))continue e}v&&v.push(f),c.push(p)}}return c}function _l(e,t,n){var l=null==(e=fo(e,t=oi(t,e)))?e:e[Co(Fo(t))];return null==l?void 0:tt(l,e,n)}function gl(e){return Hr(e)&&vl(e)==o}function hl(e,t,n,l,i){return e===t||(null==e||null==t||!Hr(e)&&!Hr(t)?e!=e&&t!=t:function(e,t,n,l,i,s){var d=xr(e),h=xr(t),b=d?r:eo(e),T=h?r:eo(t),C=(b=b==o?f:b)==f,A=(T=T==o?f:T)==f,D=b==T;if(D&&kr(e)){if(!kr(t))return!1;d=!0,C=!1}if(D&&!C)return s||(s=new Mn),d||Zr(e)?ji(e,t,n,l,i,s):function(e,t,n,l,i,o,r){switch(n){case y:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!o(new Be(e),new Be(t)));case a:case u:case p:return Nr(+e,+t);case c:return e.name==t.name&&e.message==t.message;case m:case _:return e==t+"";case v:var s=Ft;case E:if(s||(s=Wt),e.size!=t.size&&!(1&l))return!1;var d=r.get(e);if(d)return d==t;l|=2,r.set(e,t);var f=ji(s(e),s(t),l,i,o,r);return r.delete(e),f;case g:if(An)return An.call(e)==An.call(t)}return!1}(e,t,b,n,l,i,s);if(!(1&n)){var N=C&&ye.call(e,"__wrapped__"),I=A&&ye.call(t,"__wrapped__");if(N||I){var w=N?e.value():e,O=I?t.value():t;return s||(s=new Mn),i(w,O,n,l,s)}}return!!D&&(s||(s=new Mn),function(e,t,n,l,i,o){var r=1&n,a=zi(e),u=a.length;if(u!=zi(t).length&&!r)return!1;for(var c=u;c--;){var s=a[c];if(!(r?s in t:ye.call(t,s)))return!1}var d=o.get(e),v=o.get(t);if(d&&v)return d==t&&v==e;var p=!0;o.set(e,t),o.set(t,e);for(var f=r;++c<u;){var m=e[s=a[c]],E=t[s];if(l)var _=r?l(E,m,s,t,e,o):l(m,E,s,e,t,o);if(!(void 0===_?m===E||i(m,E,n,l,o):_)){p=!1;break}f||(f="constructor"==s)}if(p&&!f){var g=e.constructor,h=t.constructor;g==h||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof h&&h instanceof h||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,l,i,s))}(e,t,n,l,hl,i))}function Sl(e,t,n,l){var i=n.length,o=i,r=!l;if(null==e)return!o;for(e=pe(e);i--;){var a=n[i];if(r&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var u=(a=n[i])[0],c=e[u],s=a[1];if(r&&a[2]){if(void 0===c&&!(u in e))return!1}else{var d=new Mn;if(l)var v=l(c,s,u,e,t,d);if(!(void 0===v?hl(s,c,3,l,d):v))return!1}}return!0}function yl(e){return!(!jr(e)||(t=e,Te&&Te in t))&&(Br(e)?Ne:ie).test(Ao(e));var t}function bl(e){return"function"==typeof e?e:null==e?Va:"object"==typeof e?xr(e)?Nl(e[0],e[1]):Dl(e):Ja(e)}function Tl(e){if(!co(e))return ln(e);var t=[];for(var n in pe(e))ye.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Cl(e,t){return e<t}function Al(e,t){var n=-1,l=Lr(e)?K(e.length):[];return Jn(e,function(e,i,o){l[++n]=t(e,i,o)}),l}function Dl(e){var t=Zi(e);return 1==t.length&&t[0][2]?vo(t[0][0],t[0][1]):function(n){return n===e||Sl(n,e,t)}}function Nl(e,t){return ro(e)&&so(t)?vo(Co(e),t):function(n){var l=pa(n,e);return void 0===l&&l===t?fa(n,e):hl(t,l,3)}}function Il(e,t,n,l,i){e!==t&&ol(t,function(o,r){if(i||(i=new Mn),jr(o))!function(e,t,n,l,i,o,r){var a=Eo(e,n),u=Eo(t,n),c=r.get(u);if(c)jn(e,n,c);else{var s=o?o(a,u,n+"",e,t,r):void 0,d=void 0===s;if(d){var v=xr(u),p=!v&&kr(u),f=!v&&!p&&Zr(u);s=u,v||p||f?xr(a)?s=a:Pr(a)?s=mi(a):p?(d=!1,s=ci(u,!0)):f?(d=!1,s=di(u,!0)):s=[]:Gr(u)||Or(u)?(s=a,Or(a)?s=ia(a):jr(a)&&!Br(a)||(s=no(u))):d=!1}d&&(r.set(u,s),i(s,u,l,o,r),r.delete(u)),jn(e,n,s)}}(e,t,r,n,Il,l,i);else{var a=l?l(Eo(e,r),o,r+"",e,t,i):void 0;void 0===a&&(a=o),jn(e,r,a)}},ha)}function wl(e,t){var n=e.length;if(n)return io(t+=t<0?n:0,n)?e[t]:void 0}function Ol(e,t,n){t=t.length?ct(t,function(e){return xr(e)?function(t){return sl(t,1===e.length?e[0]:e)}:e}):[Va];var l=-1;return t=ct(t,Nt(Yi())),function(e,t){var l=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var l=-1,i=e.criteria,o=t.criteria,r=i.length,a=n.length;++l<r;){var u=vi(i[l],o[l]);if(u)return l>=a?u:u*("desc"==n[l]?-1:1)}return e.index-t.index}(e,t,n)});l--;)e[l]=e[l].value;return e}(Al(e,function(e,n,i){return{criteria:ct(t,function(t){return t(e)}),index:++l,value:e}}))}function xl(e,t,n){for(var l=-1,i=t.length,o={};++l<i;){var r=t[l],a=sl(e,r);n(a,r)&&Ul(o,oi(r,e),a)}return o}function Rl(e,t,n,l){var i=l?gt:_t,o=-1,r=t.length,a=e;for(e===t&&(t=mi(t)),n&&(a=ct(e,Nt(n)));++o<r;)for(var u=0,c=t[o],s=n?n(c):c;(u=i(a,s,u,l))>-1;)a!==e&&qe.call(a,u,1),qe.call(e,u,1);return e}function Ll(e,t){for(var n=e?t.length:0,l=n-1;n--;){var i=t[n];if(n==l||i!==o){var o=i;io(i)?qe.call(e,i,1):$l(e,i)}}return e}function Pl(e,t){return e+Qt(cn()*(t-e+1))}function kl(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function Ml(e,t){return ho(po(e,t,Va),e+"")}function Fl(e){return Bn(Na(e))}function Bl(e,t){var n=Na(e);return bo(n,Yn(t,0,n.length))}function Ul(e,t,n,l){if(!jr(e))return e;for(var i=-1,o=(t=oi(t,e)).length,r=o-1,a=e;null!=a&&++i<o;){var u=Co(t[i]),c=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(i!=r){var s=a[u];void 0===(c=l?l(s,u,a):void 0)&&(c=jr(s)?s:io(t[i+1])?[]:{})}Hn(a,u,c),a=a[u]}return e}var Wl=_n?function(e,t){return _n.set(e,t),e}:Va,jl=qt?function(e,t){return qt(e,"toString",{configurable:!0,enumerable:!1,value:ja(t),writable:!0})}:Va;function Hl(e){return bo(Na(e))}function zl(e,t,n){var l=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=K(i);++l<i;)o[l]=e[l+t];return o}function Vl(e,t){var n;return Jn(e,function(e,l,i){return!(n=t(e,l,i))}),!!n}function Gl(e,t,n){var l=0,i=null==e?l:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;l<i;){var o=l+i>>>1,r=e[o];null!==r&&!Xr(r)&&(n?r<=t:r<t)?l=o+1:i=o}return i}return Kl(e,t,Va,n)}function Kl(e,t,n,l){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var r=(t=n(t))!=t,a=null===t,u=Xr(t),c=void 0===t;i<o;){var s=Qt((i+o)/2),d=n(e[s]),v=void 0!==d,p=null===d,f=d==d,m=Xr(d);if(r)var E=l||f;else E=c?f&&(l||v):a?f&&v&&(l||!p):u?f&&v&&!p&&(l||!m):!p&&!m&&(l?d<=t:d<t);E?i=s+1:o=s}return rn(o,4294967294)}function ql(e,t){for(var n=-1,l=e.length,i=0,o=[];++n<l;){var r=e[n],a=t?t(r):r;if(!n||!Nr(a,u)){var u=a;o[i++]=0===r?0:r}}return o}function Yl(e){return"number"==typeof e?e:Xr(e)?NaN:+e}function Xl(e){if("string"==typeof e)return e;if(xr(e))return ct(e,Xl)+"";if(Xr(e))return Dn?Dn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Zl(e,t,n){var l=-1,i=at,o=e.length,r=!0,a=[],u=a;if(n)r=!1,i=ut;else if(o>=200){var c=t?null:ki(e);if(c)return Wt(c);r=!1,i=wt,u=new kn}else u=t?[]:a;e:for(;++l<o;){var s=e[l],d=t?t(s):s;if(s=n||0!==s?s:0,r&&d==d){for(var v=u.length;v--;)if(u[v]===d)continue e;t&&u.push(d),a.push(s)}else i(u,d,n)||(u!==a&&u.push(d),a.push(s))}return a}function $l(e,t){return null==(e=fo(e,t=oi(t,e)))||delete e[Co(Fo(t))]}function Ql(e,t,n,l){return Ul(e,t,n(sl(e,t)),l)}function Jl(e,t,n,l){for(var i=e.length,o=l?i:-1;(l?o--:++o<i)&&t(e[o],o,e););return n?zl(e,l?0:o,l?o+1:i):zl(e,l?o+1:0,l?i:o)}function ei(e,t){var n=e;return n instanceof xn&&(n=n.value()),dt(t,function(e,t){return t.func.apply(t.thisArg,st([e],t.args))},n)}function ti(e,t,n){var l=e.length;if(l<2)return l?Zl(e[0]):[];for(var i=-1,o=K(l);++i<l;)for(var r=e[i],a=-1;++a<l;)a!=i&&(o[i]=Qn(o[i]||r,e[a],t,n));return Zl(il(o,1),t,n)}function ni(e,t,n){for(var l=-1,i=e.length,o=t.length,r={};++l<i;)n(r,e[l],l<o?t[l]:void 0);return r}function li(e){return Pr(e)?e:[]}function ii(e){return"function"==typeof e?e:Va}function oi(e,t){return xr(e)?e:ro(e,t)?[e]:To(oa(e))}var ri=Ml;function ai(e,t,n){var l=e.length;return n=void 0===n?l:n,!t&&n>=l?e:zl(e,t,n)}var ui=Yt||function(e){return ze.clearTimeout(e)};function ci(e,t){if(t)return e.slice();var n=e.length,l=je?je(n):new e.constructor(n);return e.copy(l),l}function si(e){var t=new e.constructor(e.byteLength);return new Be(t).set(new Be(e)),t}function di(e,t){var n=t?si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function vi(e,t){if(e!==t){var n=void 0!==e,l=null===e,i=e==e,o=Xr(e),r=void 0!==t,a=null===t,u=t==t,c=Xr(t);if(!a&&!c&&!o&&e>t||o&&r&&u&&!a&&!c||l&&r&&u||!n&&u||!i)return 1;if(!l&&!o&&!c&&e<t||c&&n&&i&&!l&&!o||a&&n&&i||!r&&i||!u)return-1}return 0}function pi(e,t,n,l){for(var i=-1,o=e.length,r=n.length,a=-1,u=t.length,c=on(o-r,0),s=K(u+c),d=!l;++a<u;)s[a]=t[a];for(;++i<r;)(d||i<o)&&(s[n[i]]=e[i]);for(;c--;)s[a++]=e[i++];return s}function fi(e,t,n,l){for(var i=-1,o=e.length,r=-1,a=n.length,u=-1,c=t.length,s=on(o-a,0),d=K(s+c),v=!l;++i<s;)d[i]=e[i];for(var p=i;++u<c;)d[p+u]=t[u];for(;++r<a;)(v||i<o)&&(d[p+n[r]]=e[i++]);return d}function mi(e,t){var n=-1,l=e.length;for(t||(t=K(l));++n<l;)t[n]=e[n];return t}function Ei(e,t,n,l){var i=!n;n||(n={});for(var o=-1,r=t.length;++o<r;){var a=t[o],u=l?l(n[a],e[a],a,n,e):void 0;void 0===u&&(u=e[a]),i?Kn(n,a,u):Hn(n,a,u)}return n}function _i(e,t){return function(n,l){var i=xr(n)?nt:Vn,o=t?t():{};return i(n,e,Yi(l,2),o)}}function gi(e){return Ml(function(t,n){var l=-1,i=n.length,o=i>1?n[i-1]:void 0,r=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,r&&oo(n[0],n[1],r)&&(o=i<3?void 0:o,i=1),t=pe(t);++l<i;){var a=n[l];a&&e(t,a,l,o)}return t})}function hi(e,t){return function(n,l){if(null==n)return n;if(!Lr(n))return e(n,l);for(var i=n.length,o=t?i:-1,r=pe(n);(t?o--:++o<i)&&!1!==l(r[o],o,r););return n}}function Si(e){return function(t,n,l){for(var i=-1,o=pe(t),r=l(t),a=r.length;a--;){var u=r[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function yi(e){return function(t){var n=Mt(t=oa(t))?zt(t):void 0,l=n?n[0]:t.charAt(0),i=n?ai(n,1).join(""):t.slice(1);return l[e]()+i}}function bi(e){return function(t){return dt(Ba(Oa(t).replace(Ie,"")),e,"")}}function Ti(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=In(e.prototype),l=e.apply(n,t);return jr(l)?l:n}}function Ci(e){return function(t,n,l){var i=pe(t);if(!Lr(t)){var o=Yi(n,3);t=ga(t),n=function(e){return o(i[e],e,i)}}var r=e(t,n,l);return r>-1?i[o?t[r]:r]:void 0}}function Ai(e){return Hi(function(t){var l=t.length,i=l,o=On.prototype.thru;for(e&&t.reverse();i--;){var r=t[i];if("function"!=typeof r)throw new Ee(n);if(o&&!a&&"wrapper"==Ki(r))var a=new On([],!0)}for(i=a?i:l;++i<l;){var u=Ki(r=t[i]),c="wrapper"==u?Gi(r):void 0;a=c&&ao(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?a[Ki(c[0])].apply(a,c[3]):1==r.length&&ao(r)?a[u]():a.thru(r)}return function(){var e=arguments,n=e[0];if(a&&1==e.length&&xr(n))return a.plant(n).value();for(var i=0,o=l?t[i].apply(this,e):n;++i<l;)o=t[i].call(this,o);return o}})}function Di(e,t,n,l,i,o,r,a,u,c){var s=128&t,d=1&t,v=2&t,p=24&t,f=512&t,m=v?void 0:Ti(e);return function E(){for(var _=arguments.length,g=K(_),h=_;h--;)g[h]=arguments[h];if(p)var S=qi(E),y=Rt(g,S);if(l&&(g=pi(g,l,i,p)),o&&(g=fi(g,o,r,p)),_-=y,p&&_<c){var b=Ut(g,S);return Li(e,t,Di,E.placeholder,n,g,b,a,u,c-_)}var T=d?n:this,C=v?T[e]:e;return _=g.length,a?g=mo(g,a):f&&_>1&&g.reverse(),s&&u<_&&(g.length=u),this&&this!==ze&&this instanceof E&&(C=m||Ti(C)),C.apply(T,g)}}function Ni(e,t){return function(n,l){return function(e,t,n,l){return al(e,function(e,i,o){t(l,n(e),i,o)}),l}(n,e,t(l),{})}}function Ii(e,t){return function(n,l){var i;if(void 0===n&&void 0===l)return t;if(void 0!==n&&(i=n),void 0!==l){if(void 0===i)return l;"string"==typeof n||"string"==typeof l?(n=Xl(n),l=Xl(l)):(n=Yl(n),l=Yl(l)),i=e(n,l)}return i}}function wi(e){return Hi(function(t){return t=ct(t,Nt(Yi())),Ml(function(n){var l=this;return e(t,function(e){return tt(e,l,n)})})})}function Oi(e,t){var n=(t=void 0===t?" ":Xl(t)).length;if(n<2)return n?kl(t,e):t;var l=kl(t,$t(e/Ht(t)));return Mt(t)?ai(zt(l),0,e).join(""):l.slice(0,e)}function xi(e){return function(t,n,l){return l&&"number"!=typeof l&&oo(t,n,l)&&(n=l=void 0),t=ea(t),void 0===n?(n=t,t=0):n=ea(n),function(e,t,n,l){for(var i=-1,o=on($t((t-e)/(n||1)),0),r=K(o);o--;)r[l?o:++i]=e,e+=n;return r}(t,n,l=void 0===l?t<n?1:-1:ea(l),e)}}function Ri(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=la(t),n=la(n)),e(t,n)}}function Li(e,t,n,l,i,o,r,a,u,c){var s=8&t;t|=s?32:64,4&(t&=~(s?64:32))||(t&=-4);var d=[e,t,i,s?o:void 0,s?r:void 0,s?void 0:o,s?void 0:r,a,u,c],v=n.apply(void 0,d);return ao(e)&&_o(v,d),v.placeholder=l,So(v,e,t)}function Pi(e){var t=ve[e];return function(e,n){if(e=la(e),(n=null==n?0:rn(ta(n),292))&&tn(e)){var l=(oa(e)+"e").split("e");return+((l=(oa(t(l[0]+"e"+(+l[1]+n)))+"e").split("e"))[0]+"e"+(+l[1]-n))}return t(e)}}var ki=fn&&1/Wt(new fn([,-0]))[1]==1/0?function(e){return new fn(e)}:Xa;function Mi(e){return function(t){var n=eo(t);return n==v?Ft(t):n==E?jt(t):function(e,t){return ct(t,function(t){return[t,e[t]]})}(t,e(t))}}function Fi(e,t,i,o,r,a,u,c){var s=2&t;if(!s&&"function"!=typeof e)throw new Ee(n);var d=o?o.length:0;if(d||(t&=-97,o=r=void 0),u=void 0===u?u:on(ta(u),0),c=void 0===c?c:ta(c),d-=r?r.length:0,64&t){var v=o,p=r;o=r=void 0}var f=s?void 0:Gi(e),m=[e,t,i,o,r,v,p,a,u,c];if(f&&function(e,t){var n=e[1],i=t[1],o=n|i;if(!(o<131||128==i&&8==n||128==i&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n))return e;1&i&&(e[2]=t[2],o|=1&n?0:4);var r=t[3];if(r){var a=e[3];e[3]=a?pi(a,r,t[4]):r,e[4]=a?Ut(e[3],l):t[4]}(r=t[5])&&(e[5]=(a=e[5])?fi(a,r,t[6]):r,e[6]=a?Ut(e[5],l):t[6]),(r=t[7])&&(e[7]=r),128&i&&(e[8]=null==e[8]?t[8]:rn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(m,f),e=m[0],t=m[1],i=m[2],o=m[3],r=m[4],!(c=m[9]=void 0===m[9]?s?0:e.length:on(m[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||16==t?function(e,t,n){var l=Ti(e);return function i(){for(var o=arguments.length,r=K(o),a=o,u=qi(i);a--;)r[a]=arguments[a];var c=o<3&&r[0]!==u&&r[o-1]!==u?[]:Ut(r,u);if((o-=c.length)<n)return Li(e,t,Di,i.placeholder,void 0,r,c,void 0,void 0,n-o);var s=this&&this!==ze&&this instanceof i?l:e;return tt(s,this,r)}}(e,t,c):32!=t&&33!=t||r.length?Di.apply(void 0,m):function(e,t,n,l){var i=1&t,o=Ti(e);return function t(){for(var r=-1,a=arguments.length,u=-1,c=l.length,s=K(c+a),d=this&&this!==ze&&this instanceof t?o:e;++u<c;)s[u]=l[u];for(;a--;)s[u++]=arguments[++r];return tt(d,i?n:this,s)}}(e,t,i,o);else var E=function(e,t,n){var l=1&t,i=Ti(e);return function t(){var o=this&&this!==ze&&this instanceof t?i:e;return o.apply(l?n:this,arguments)}}(e,t,i);return So((f?Wl:_o)(E,m),e,t)}function Bi(e,t,n,l){return void 0===e||Nr(e,ge[n])&&!ye.call(l,n)?t:e}function Ui(e,t,n,l,i,o){return jr(e)&&jr(t)&&(o.set(t,e),Il(e,t,void 0,Ui,o),o.delete(t)),e}function Wi(e){return Gr(e)?void 0:e}function ji(e,t,n,l,i,o){var r=1&n,a=e.length,u=t.length;if(a!=u&&!(r&&u>a))return!1;var c=o.get(e),s=o.get(t);if(c&&s)return c==t&&s==e;var d=-1,v=!0,p=2&n?new kn:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var f=e[d],m=t[d];if(l)var E=r?l(m,f,d,t,e,o):l(f,m,d,e,t,o);if(void 0!==E){if(E)continue;v=!1;break}if(p){if(!pt(t,function(e,t){if(!wt(p,t)&&(f===e||i(f,e,n,l,o)))return p.push(t)})){v=!1;break}}else if(f!==m&&!i(f,m,n,l,o)){v=!1;break}}return o.delete(e),o.delete(t),v}function Hi(e){return ho(po(e,void 0,Ro),e+"")}function zi(e){return dl(e,ga,Qi)}function Vi(e){return dl(e,ha,Ji)}var Gi=_n?function(e){return _n.get(e)}:Xa;function Ki(e){for(var t=e.name+"",n=gn[t],l=ye.call(gn,t)?n.length:0;l--;){var i=n[l],o=i.func;if(null==o||o==e)return i.name}return t}function qi(e){return(ye.call(Nn,"placeholder")?Nn:e).placeholder}function Yi(){var e=Nn.iteratee||Ga;return e=e===Ga?bl:e,arguments.length?e(arguments[0],arguments[1]):e}function Xi(e,t){var n,l,i=e.__data__;return("string"==(l=typeof(n=t))||"number"==l||"symbol"==l||"boolean"==l?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Zi(e){for(var t=ga(e),n=t.length;n--;){var l=t[n],i=e[l];t[n]=[l,i,so(i)]}return t}function $i(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return yl(n)?n:void 0}var Qi=Jt?function(e){return null==e?[]:(e=pe(e),rt(Jt(e),function(t){return Ge.call(e,t)}))}:nu,Ji=Jt?function(e){for(var t=[];e;)st(t,Qi(e)),e=He(e);return t}:nu,eo=vl;function to(e,t,n){for(var l=-1,i=(t=oi(t,e)).length,o=!1;++l<i;){var r=Co(t[l]);if(!(o=null!=e&&n(e,r)))break;e=e[r]}return o||++l!=i?o:!!(i=null==e?0:e.length)&&Wr(i)&&io(r,i)&&(xr(e)||Or(e))}function no(e){return"function"!=typeof e.constructor||co(e)?{}:In(He(e))}function lo(e){return xr(e)||Or(e)||!!(Ye&&e&&e[Ye])}function io(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&re.test(e))&&e>-1&&e%1==0&&e<t}function oo(e,t,n){if(!jr(n))return!1;var l=typeof t;return!!("number"==l?Lr(n)&&io(t,n.length):"string"==l&&t in n)&&Nr(n[t],e)}function ro(e,t){if(xr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Xr(e))||j.test(e)||!W.test(e)||null!=t&&e in pe(t)}function ao(e){var t=Ki(e),n=Nn[t];if("function"!=typeof n||!(t in xn.prototype))return!1;if(e===n)return!0;var l=Gi(n);return!!l&&e===l[0]}(dn&&eo(new dn(new ArrayBuffer(1)))!=y||vn&&eo(new vn)!=v||pn&&"[object Promise]"!=eo(pn.resolve())||fn&&eo(new fn)!=E||mn&&eo(new mn)!=h)&&(eo=function(e){var t=vl(e),n=t==f?e.constructor:void 0,l=n?Ao(n):"";if(l)switch(l){case hn:return y;case Sn:return v;case yn:return"[object Promise]";case bn:return E;case Tn:return h}return t});var uo=he?Br:lu;function co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ge)}function so(e){return e==e&&!jr(e)}function vo(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in pe(n))}}function po(e,t,n){return t=on(void 0===t?e.length-1:t,0),function(){for(var l=arguments,i=-1,o=on(l.length-t,0),r=K(o);++i<o;)r[i]=l[t+i];i=-1;for(var a=K(t+1);++i<t;)a[i]=l[i];return a[t]=n(r),tt(e,this,a)}}function fo(e,t){return t.length<2?e:sl(e,zl(t,0,-1))}function mo(e,t){for(var n=e.length,l=rn(t.length,n),i=mi(e);l--;){var o=t[l];e[l]=io(o,n)?i[o]:void 0}return e}function Eo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var _o=yo(Wl),go=Zt||function(e,t){return ze.setTimeout(e,t)},ho=yo(jl);function So(e,t,n){var l=t+"";return ho(e,function(e,t){var n=t.length;if(!n)return e;var l=n-1;return t[l]=(n>1?"& ":"")+t[l],t=t.join(n>2?", ":" "),e.replace(Y,"{\n/* [wrapped with "+t+"] */\n")}(l,function(e,t){return lt(i,function(n){var l="_."+n[0];t&n[1]&&!at(e,l)&&e.push(l)}),e.sort()}(function(e){var t=e.match(X);return t?t[1].split(Z):[]}(l),n)))}function yo(e){var t=0,n=0;return function(){var l=an(),i=16-(l-n);if(n=l,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function bo(e,t){var n=-1,l=e.length,i=l-1;for(t=void 0===t?l:t;++n<t;){var o=Pl(n,i),r=e[o];e[o]=e[n],e[n]=r}return e.length=t,e}var To=function(e){var t=yr(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(H,function(e,n,l,i){t.push(l?i.replace(J,"$1"):n||e)}),t},function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}();function Co(e){if("string"==typeof e||Xr(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ao(e){if(null!=e){try{return Se.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Do(e){if(e instanceof xn)return e.clone();var t=new On(e.__wrapped__,e.__chain__);return t.__actions__=mi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var No=Ml(function(e,t){return Pr(e)?Qn(e,il(t,1,Pr,!0)):[]}),Io=Ml(function(e,t){var n=Fo(t);return Pr(n)&&(n=void 0),Pr(e)?Qn(e,il(t,1,Pr,!0),Yi(n,2)):[]}),wo=Ml(function(e,t){var n=Fo(t);return Pr(n)&&(n=void 0),Pr(e)?Qn(e,il(t,1,Pr,!0),void 0,n):[]});function Oo(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=null==n?0:ta(n);return i<0&&(i=on(l+i,0)),Et(e,Yi(t,3),i)}function xo(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=l-1;return void 0!==n&&(i=ta(n),i=n<0?on(l+i,0):rn(i,l-1)),Et(e,Yi(t,3),i,!0)}function Ro(e){return null!=e&&e.length?il(e,1):[]}function Lo(e){return e&&e.length?e[0]:void 0}var Po=Ml(function(e){var t=ct(e,li);return t.length&&t[0]===e[0]?El(t):[]}),ko=Ml(function(e){var t=Fo(e),n=ct(e,li);return t===Fo(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?El(n,Yi(t,2)):[]}),Mo=Ml(function(e){var t=Fo(e),n=ct(e,li);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?El(n,void 0,t):[]});function Fo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Bo=Ml(Uo);function Uo(e,t){return e&&e.length&&t&&t.length?Rl(e,t):e}var Wo=Hi(function(e,t){var n=null==e?0:e.length,l=qn(e,t);return Ll(e,ct(t,function(e){return io(e,n)?+e:e}).sort(vi)),l});function jo(e){return null==e?e:sn.call(e)}var Ho=Ml(function(e){return Zl(il(e,1,Pr,!0))}),zo=Ml(function(e){var t=Fo(e);return Pr(t)&&(t=void 0),Zl(il(e,1,Pr,!0),Yi(t,2))}),Vo=Ml(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,Zl(il(e,1,Pr,!0),void 0,t)});function Go(e){if(!e||!e.length)return[];var t=0;return e=rt(e,function(e){if(Pr(e))return t=on(e.length,t),!0}),At(t,function(t){return ct(e,yt(t))})}function Ko(e,t){if(!e||!e.length)return[];var n=Go(e);return null==t?n:ct(n,function(e){return tt(t,void 0,e)})}var qo=Ml(function(e,t){return Pr(e)?Qn(e,t):[]}),Yo=Ml(function(e){return ti(rt(e,Pr))}),Xo=Ml(function(e){var t=Fo(e);return Pr(t)&&(t=void 0),ti(rt(e,Pr),Yi(t,2))}),Zo=Ml(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,ti(rt(e,Pr),void 0,t)}),$o=Ml(Go),Qo=Ml(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ko(e,n)});function Jo(e){var t=Nn(e);return t.__chain__=!0,t}function er(e,t){return t(e)}var tr=Hi(function(e){var t=e.length,n=t?e[0]:0,l=this.__wrapped__,i=function(t){return qn(t,e)};return!(t>1||this.__actions__.length)&&l instanceof xn&&io(n)?((l=l.slice(n,+n+(t?1:0))).__actions__.push({func:er,args:[i],thisArg:void 0}),new On(l,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(i)}),nr=_i(function(e,t,n){ye.call(e,n)?++e[n]:Kn(e,n,1)}),lr=Ci(Oo),ir=Ci(xo);function or(e,t){return(xr(e)?lt:Jn)(e,Yi(t,3))}function rr(e,t){return(xr(e)?it:el)(e,Yi(t,3))}var ar=_i(function(e,t,n){ye.call(e,n)?e[n].push(t):Kn(e,n,[t])}),ur=Ml(function(e,t,n){var l=-1,i="function"==typeof t,o=Lr(e)?K(e.length):[];return Jn(e,function(e){o[++l]=i?tt(t,e,n):_l(e,t,n)}),o}),cr=_i(function(e,t,n){Kn(e,n,t)});function sr(e,t){return(xr(e)?ct:Al)(e,Yi(t,3))}var dr=_i(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),vr=Ml(function(e,t){if(null==e)return[];var n=t.length;return n>1&&oo(e,t[0],t[1])?t=[]:n>2&&oo(t[0],t[1],t[2])&&(t=[t[0]]),Ol(e,il(t,1),[])}),pr=Xt||function(){return ze.Date.now()};function fr(e,t,n){return t=n?void 0:t,Fi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function mr(e,t){var l;if("function"!=typeof t)throw new Ee(n);return e=ta(e),function(){return--e>0&&(l=t.apply(this,arguments)),e<=1&&(t=void 0),l}}var Er=Ml(function(e,t,n){var l=1;if(n.length){var i=Ut(n,qi(Er));l|=32}return Fi(e,l,t,n,i)}),_r=Ml(function(e,t,n){var l=3;if(n.length){var i=Ut(n,qi(_r));l|=32}return Fi(t,l,e,n,i)});function gr(e,t,l){var i,o,r,a,u,c,s=0,d=!1,v=!1,p=!0;if("function"!=typeof e)throw new Ee(n);function f(t){var n=i,l=o;return i=o=void 0,s=t,a=e.apply(l,n)}function m(e){return s=e,u=go(_,t),d?f(e):a}function E(e){var n=e-c;return void 0===c||n>=t||n<0||v&&e-s>=r}function _(){var e=pr();if(E(e))return g(e);u=go(_,function(e){var n=t-(e-c);return v?rn(n,r-(e-s)):n}(e))}function g(e){return u=void 0,p&&i?f(e):(i=o=void 0,a)}function h(){var e=pr(),n=E(e);if(i=arguments,o=this,c=e,n){if(void 0===u)return m(c);if(v)return ui(u),u=go(_,t),f(c)}return void 0===u&&(u=go(_,t)),a}return t=la(t)||0,jr(l)&&(d=!!l.leading,r=(v="maxWait"in l)?on(la(l.maxWait)||0,t):r,p="trailing"in l?!!l.trailing:p),h.cancel=function(){void 0!==u&&ui(u),s=0,i=c=o=u=void 0},h.flush=function(){return void 0===u?a:g(pr())},h}var hr=Ml(function(e,t){return $n(e,1,t)}),Sr=Ml(function(e,t,n){return $n(e,la(t)||0,n)});function yr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ee(n);var l=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=l.cache;if(o.has(i))return o.get(i);var r=e.apply(this,n);return l.cache=o.set(i,r)||o,r};return l.cache=new(yr.Cache||Pn),l}function br(e){if("function"!=typeof e)throw new Ee(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}yr.Cache=Pn;var Tr=ri(function(e,t){var n=(t=1==t.length&&xr(t[0])?ct(t[0],Nt(Yi())):ct(il(t,1),Nt(Yi()))).length;return Ml(function(l){for(var i=-1,o=rn(l.length,n);++i<o;)l[i]=t[i].call(this,l[i]);return tt(e,this,l)})}),Cr=Ml(function(e,t){return Fi(e,32,void 0,t,Ut(t,qi(Cr)))}),Ar=Ml(function(e,t){return Fi(e,64,void 0,t,Ut(t,qi(Ar)))}),Dr=Hi(function(e,t){return Fi(e,256,void 0,void 0,void 0,t)});function Nr(e,t){return e===t||e!=e&&t!=t}var Ir=Ri(pl),wr=Ri(function(e,t){return e>=t}),Or=gl(function(){return arguments}())?gl:function(e){return Hr(e)&&ye.call(e,"callee")&&!Ge.call(e,"callee")},xr=K.isArray,Rr=Xe?Nt(Xe):function(e){return Hr(e)&&vl(e)==S};function Lr(e){return null!=e&&Wr(e.length)&&!Br(e)}function Pr(e){return Hr(e)&&Lr(e)}var kr=en||lu,Mr=Ze?Nt(Ze):function(e){return Hr(e)&&vl(e)==u};function Fr(e){if(!Hr(e))return!1;var t=vl(e);return t==c||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Gr(e)}function Br(e){if(!jr(e))return!1;var t=vl(e);return t==s||t==d||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ur(e){return"number"==typeof e&&e==ta(e)}function Wr(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function jr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Hr(e){return null!=e&&"object"==typeof e}var zr=$e?Nt($e):function(e){return Hr(e)&&eo(e)==v};function Vr(e){return"number"==typeof e||Hr(e)&&vl(e)==p}function Gr(e){if(!Hr(e)||vl(e)!=f)return!1;var t=He(e);if(null===t)return!0;var n=ye.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Se.call(n)==Ae}var Kr=Qe?Nt(Qe):function(e){return Hr(e)&&vl(e)==m},qr=Je?Nt(Je):function(e){return Hr(e)&&eo(e)==E};function Yr(e){return"string"==typeof e||!xr(e)&&Hr(e)&&vl(e)==_}function Xr(e){return"symbol"==typeof e||Hr(e)&&vl(e)==g}var Zr=et?Nt(et):function(e){return Hr(e)&&Wr(e.length)&&!!Me[vl(e)]},$r=Ri(Cl),Qr=Ri(function(e,t){return e<=t});function Jr(e){if(!e)return[];if(Lr(e))return Yr(e)?zt(e):mi(e);if(ft&&e[ft])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[ft]());var t=eo(e);return(t==v?Ft:t==E?Wt:Na)(e)}function ea(e){return e?(e=la(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ta(e){var t=ea(e),n=t%1;return t==t?n?t-n:t:0}function na(e){return e?Yn(ta(e),0,4294967295):0}function la(e){if("number"==typeof e)return e;if(Xr(e))return NaN;if(jr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=jr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Dt(e);var n=le.test(e);return n||oe.test(e)?We(e.slice(2),n?2:8):ne.test(e)?NaN:+e}function ia(e){return Ei(e,ha(e))}function oa(e){return null==e?"":Xl(e)}var ra=gi(function(e,t){if(co(t)||Lr(t))Ei(t,ga(t),e);else for(var n in t)ye.call(t,n)&&Hn(e,n,t[n])}),aa=gi(function(e,t){Ei(t,ha(t),e)}),ua=gi(function(e,t,n,l){Ei(t,ha(t),e,l)}),ca=gi(function(e,t,n,l){Ei(t,ga(t),e,l)}),sa=Hi(qn),da=Ml(function(e,t){e=pe(e);var n=-1,l=t.length,i=l>2?t[2]:void 0;for(i&&oo(t[0],t[1],i)&&(l=1);++n<l;)for(var o=t[n],r=ha(o),a=-1,u=r.length;++a<u;){var c=r[a],s=e[c];(void 0===s||Nr(s,ge[c])&&!ye.call(e,c))&&(e[c]=o[c])}return e}),va=Ml(function(e){return e.push(void 0,Ui),tt(ya,void 0,e)});function pa(e,t,n){var l=null==e?void 0:sl(e,t);return void 0===l?n:l}function fa(e,t){return null!=e&&to(e,t,ml)}var ma=Ni(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),e[t]=n},ja(Va)),Ea=Ni(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),ye.call(e,t)?e[t].push(n):e[t]=[n]},Yi),_a=Ml(_l);function ga(e){return Lr(e)?Fn(e):Tl(e)}function ha(e){return Lr(e)?Fn(e,!0):function(e){if(!jr(e))return function(e){var t=[];if(null!=e)for(var n in pe(e))t.push(n);return t}(e);var t=co(e),n=[];for(var l in e)("constructor"!=l||!t&&ye.call(e,l))&&n.push(l);return n}(e)}var Sa=gi(function(e,t,n){Il(e,t,n)}),ya=gi(function(e,t,n,l){Il(e,t,n,l)}),ba=Hi(function(e,t){var n={};if(null==e)return n;var l=!1;t=ct(t,function(t){return t=oi(t,e),l||(l=t.length>1),t}),Ei(e,Vi(e),n),l&&(n=Xn(n,7,Wi));for(var i=t.length;i--;)$l(n,t[i]);return n}),Ta=Hi(function(e,t){return null==e?{}:function(e,t){return xl(e,t,function(t,n){return fa(e,n)})}(e,t)});function Ca(e,t){if(null==e)return{};var n=ct(Vi(e),function(e){return[e]});return t=Yi(t),xl(e,n,function(e,n){return t(e,n[0])})}var Aa=Mi(ga),Da=Mi(ha);function Na(e){return null==e?[]:It(e,ga(e))}var Ia=bi(function(e,t,n){return t=t.toLowerCase(),e+(n?wa(t):t)});function wa(e){return Fa(oa(e).toLowerCase())}function Oa(e){return(e=oa(e))&&e.replace(ae,Lt).replace(we,"")}var xa=bi(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ra=bi(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),La=yi("toLowerCase"),Pa=bi(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),ka=bi(function(e,t,n){return e+(n?" ":"")+Fa(t)}),Ma=bi(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Fa=yi("toUpperCase");function Ba(e,t,n){return e=oa(e),void 0===(t=n?void 0:t)?function(e){return Le.test(e)}(e)?function(e){return e.match(xe)||[]}(e):function(e){return e.match($)||[]}(e):e.match(t)||[]}var Ua=Ml(function(e,t){try{return tt(e,void 0,t)}catch(e){return Fr(e)?e:new se(e)}}),Wa=Hi(function(e,t){return lt(t,function(t){t=Co(t),Kn(e,t,Er(e[t],e))}),e});function ja(e){return function(){return e}}var Ha=Ai(),za=Ai(!0);function Va(e){return e}function Ga(e){return bl("function"==typeof e?e:Xn(e,1))}var Ka=Ml(function(e,t){return function(n){return _l(n,e,t)}}),qa=Ml(function(e,t){return function(n){return _l(e,n,t)}});function Ya(e,t,n){var l=ga(t),i=cl(t,l);null!=n||jr(t)&&(i.length||!l.length)||(n=t,t=e,e=this,i=cl(t,ga(t)));var o=!(jr(n)&&"chain"in n&&!n.chain),r=Br(e);return lt(i,function(n){var l=t[n];e[n]=l,r&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=mi(this.__actions__);return i.push({func:l,args:arguments,thisArg:e}),n.__chain__=t,n}return l.apply(e,st([this.value()],arguments))})}),e}function Xa(){}var Za=wi(ct),$a=wi(ot),Qa=wi(pt);function Ja(e){return ro(e)?yt(Co(e)):function(e){return function(t){return sl(t,e)}}(e)}var eu=xi(),tu=xi(!0);function nu(){return[]}function lu(){return!1}var iu,ou=Ii(function(e,t){return e+t},0),ru=Pi("ceil"),au=Ii(function(e,t){return e/t},1),uu=Pi("floor"),cu=Ii(function(e,t){return e*t},1),su=Pi("round"),du=Ii(function(e,t){return e-t},0);return Nn.after=function(e,t){if("function"!=typeof t)throw new Ee(n);return e=ta(e),function(){if(--e<1)return t.apply(this,arguments)}},Nn.ary=fr,Nn.assign=ra,Nn.assignIn=aa,Nn.assignInWith=ua,Nn.assignWith=ca,Nn.at=sa,Nn.before=mr,Nn.bind=Er,Nn.bindAll=Wa,Nn.bindKey=_r,Nn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return xr(e)?e:[e]},Nn.chain=Jo,Nn.chunk=function(e,t,n){t=(n?oo(e,t,n):void 0===t)?1:on(ta(t),0);var l=null==e?0:e.length;if(!l||t<1)return[];for(var i=0,o=0,r=K($t(l/t));i<l;)r[o++]=zl(e,i,i+=t);return r},Nn.compact=function(e){for(var t=-1,n=null==e?0:e.length,l=0,i=[];++t<n;){var o=e[t];o&&(i[l++]=o)}return i},Nn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=K(e-1),n=arguments[0],l=e;l--;)t[l-1]=arguments[l];return st(xr(n)?mi(n):[n],il(t,1))},Nn.cond=function(e){var t=null==e?0:e.length,l=Yi();return e=t?ct(e,function(e){if("function"!=typeof e[1])throw new Ee(n);return[l(e[0]),e[1]]}):[],Ml(function(n){for(var l=-1;++l<t;){var i=e[l];if(tt(i[0],this,n))return tt(i[1],this,n)}})},Nn.conforms=function(e){return function(e){var t=ga(e);return function(n){return Zn(n,e,t)}}(Xn(e,1))},Nn.constant=ja,Nn.countBy=nr,Nn.create=function(e,t){var n=In(e);return null==t?n:Gn(n,t)},Nn.curry=function e(t,n,l){var i=Fi(t,8,void 0,void 0,void 0,void 0,void 0,n=l?void 0:n);return i.placeholder=e.placeholder,i},Nn.curryRight=function e(t,n,l){var i=Fi(t,16,void 0,void 0,void 0,void 0,void 0,n=l?void 0:n);return i.placeholder=e.placeholder,i},Nn.debounce=gr,Nn.defaults=da,Nn.defaultsDeep=va,Nn.defer=hr,Nn.delay=Sr,Nn.difference=No,Nn.differenceBy=Io,Nn.differenceWith=wo,Nn.drop=function(e,t,n){var l=null==e?0:e.length;return l?zl(e,(t=n||void 0===t?1:ta(t))<0?0:t,l):[]},Nn.dropRight=function(e,t,n){var l=null==e?0:e.length;return l?zl(e,0,(t=l-(t=n||void 0===t?1:ta(t)))<0?0:t):[]},Nn.dropRightWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3),!0,!0):[]},Nn.dropWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3),!0):[]},Nn.fill=function(e,t,n,l){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&oo(e,t,n)&&(n=0,l=i),function(e,t,n,l){var i=e.length;for((n=ta(n))<0&&(n=-n>i?0:i+n),(l=void 0===l||l>i?i:ta(l))<0&&(l+=i),l=n>l?0:na(l);n<l;)e[n++]=t;return e}(e,t,n,l)):[]},Nn.filter=function(e,t){return(xr(e)?rt:ll)(e,Yi(t,3))},Nn.flatMap=function(e,t){return il(sr(e,t),1)},Nn.flatMapDeep=function(e,t){return il(sr(e,t),1/0)},Nn.flatMapDepth=function(e,t,n){return n=void 0===n?1:ta(n),il(sr(e,t),n)},Nn.flatten=Ro,Nn.flattenDeep=function(e){return null!=e&&e.length?il(e,1/0):[]},Nn.flattenDepth=function(e,t){return null!=e&&e.length?il(e,t=void 0===t?1:ta(t)):[]},Nn.flip=function(e){return Fi(e,512)},Nn.flow=Ha,Nn.flowRight=za,Nn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,l={};++t<n;){var i=e[t];l[i[0]]=i[1]}return l},Nn.functions=function(e){return null==e?[]:cl(e,ga(e))},Nn.functionsIn=function(e){return null==e?[]:cl(e,ha(e))},Nn.groupBy=ar,Nn.initial=function(e){return null!=e&&e.length?zl(e,0,-1):[]},Nn.intersection=Po,Nn.intersectionBy=ko,Nn.intersectionWith=Mo,Nn.invert=ma,Nn.invertBy=Ea,Nn.invokeMap=ur,Nn.iteratee=Ga,Nn.keyBy=cr,Nn.keys=ga,Nn.keysIn=ha,Nn.map=sr,Nn.mapKeys=function(e,t){var n={};return t=Yi(t,3),al(e,function(e,l,i){Kn(n,t(e,l,i),e)}),n},Nn.mapValues=function(e,t){var n={};return t=Yi(t,3),al(e,function(e,l,i){Kn(n,l,t(e,l,i))}),n},Nn.matches=function(e){return Dl(Xn(e,1))},Nn.matchesProperty=function(e,t){return Nl(e,Xn(t,1))},Nn.memoize=yr,Nn.merge=Sa,Nn.mergeWith=ya,Nn.method=Ka,Nn.methodOf=qa,Nn.mixin=Ya,Nn.negate=br,Nn.nthArg=function(e){return e=ta(e),Ml(function(t){return wl(t,e)})},Nn.omit=ba,Nn.omitBy=function(e,t){return Ca(e,br(Yi(t)))},Nn.once=function(e){return mr(2,e)},Nn.orderBy=function(e,t,n,l){return null==e?[]:(xr(t)||(t=null==t?[]:[t]),xr(n=l?void 0:n)||(n=null==n?[]:[n]),Ol(e,t,n))},Nn.over=Za,Nn.overArgs=Tr,Nn.overEvery=$a,Nn.overSome=Qa,Nn.partial=Cr,Nn.partialRight=Ar,Nn.partition=dr,Nn.pick=Ta,Nn.pickBy=Ca,Nn.property=Ja,Nn.propertyOf=function(e){return function(t){return null==e?void 0:sl(e,t)}},Nn.pull=Bo,Nn.pullAll=Uo,Nn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Rl(e,t,Yi(n,2)):e},Nn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Rl(e,t,void 0,n):e},Nn.pullAt=Wo,Nn.range=eu,Nn.rangeRight=tu,Nn.rearg=Dr,Nn.reject=function(e,t){return(xr(e)?rt:ll)(e,br(Yi(t,3)))},Nn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var l=-1,i=[],o=e.length;for(t=Yi(t,3);++l<o;){var r=e[l];t(r,l,e)&&(n.push(r),i.push(l))}return Ll(e,i),n},Nn.rest=function(e,t){if("function"!=typeof e)throw new Ee(n);return Ml(e,t=void 0===t?t:ta(t))},Nn.reverse=jo,Nn.sampleSize=function(e,t,n){return t=(n?oo(e,t,n):void 0===t)?1:ta(t),(xr(e)?Un:Bl)(e,t)},Nn.set=function(e,t,n){return null==e?e:Ul(e,t,n)},Nn.setWith=function(e,t,n,l){return l="function"==typeof l?l:void 0,null==e?e:Ul(e,t,n,l)},Nn.shuffle=function(e){return(xr(e)?Wn:Hl)(e)},Nn.slice=function(e,t,n){var l=null==e?0:e.length;return l?(n&&"number"!=typeof n&&oo(e,t,n)?(t=0,n=l):(t=null==t?0:ta(t),n=void 0===n?l:ta(n)),zl(e,t,n)):[]},Nn.sortBy=vr,Nn.sortedUniq=function(e){return e&&e.length?ql(e):[]},Nn.sortedUniqBy=function(e,t){return e&&e.length?ql(e,Yi(t,2)):[]},Nn.split=function(e,t,n){return n&&"number"!=typeof n&&oo(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=oa(e))&&("string"==typeof t||null!=t&&!Kr(t))&&!(t=Xl(t))&&Mt(e)?ai(zt(e),0,n):e.split(t,n):[]},Nn.spread=function(e,t){if("function"!=typeof e)throw new Ee(n);return t=null==t?0:on(ta(t),0),Ml(function(n){var l=n[t],i=ai(n,0,t);return l&&st(i,l),tt(e,this,i)})},Nn.tail=function(e){var t=null==e?0:e.length;return t?zl(e,1,t):[]},Nn.take=function(e,t,n){return e&&e.length?zl(e,0,(t=n||void 0===t?1:ta(t))<0?0:t):[]},Nn.takeRight=function(e,t,n){var l=null==e?0:e.length;return l?zl(e,(t=l-(t=n||void 0===t?1:ta(t)))<0?0:t,l):[]},Nn.takeRightWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3),!1,!0):[]},Nn.takeWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3)):[]},Nn.tap=function(e,t){return t(e),e},Nn.throttle=function(e,t,l){var i=!0,o=!0;if("function"!=typeof e)throw new Ee(n);return jr(l)&&(i="leading"in l?!!l.leading:i,o="trailing"in l?!!l.trailing:o),gr(e,t,{leading:i,maxWait:t,trailing:o})},Nn.thru=er,Nn.toArray=Jr,Nn.toPairs=Aa,Nn.toPairsIn=Da,Nn.toPath=function(e){return xr(e)?ct(e,Co):Xr(e)?[e]:mi(To(oa(e)))},Nn.toPlainObject=ia,Nn.transform=function(e,t,n){var l=xr(e),i=l||kr(e)||Zr(e);if(t=Yi(t,4),null==n){var o=e&&e.constructor;n=i?l?new o:[]:jr(e)&&Br(o)?In(He(e)):{}}return(i?lt:al)(e,function(e,l,i){return t(n,e,l,i)}),n},Nn.unary=function(e){return fr(e,1)},Nn.union=Ho,Nn.unionBy=zo,Nn.unionWith=Vo,Nn.uniq=function(e){return e&&e.length?Zl(e):[]},Nn.uniqBy=function(e,t){return e&&e.length?Zl(e,Yi(t,2)):[]},Nn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Zl(e,void 0,t):[]},Nn.unset=function(e,t){return null==e||$l(e,t)},Nn.unzip=Go,Nn.unzipWith=Ko,Nn.update=function(e,t,n){return null==e?e:Ql(e,t,ii(n))},Nn.updateWith=function(e,t,n,l){return l="function"==typeof l?l:void 0,null==e?e:Ql(e,t,ii(n),l)},Nn.values=Na,Nn.valuesIn=function(e){return null==e?[]:It(e,ha(e))},Nn.without=qo,Nn.words=Ba,Nn.wrap=function(e,t){return Cr(ii(t),e)},Nn.xor=Yo,Nn.xorBy=Xo,Nn.xorWith=Zo,Nn.zip=$o,Nn.zipObject=function(e,t){return ni(e||[],t||[],Hn)},Nn.zipObjectDeep=function(e,t){return ni(e||[],t||[],Ul)},Nn.zipWith=Qo,Nn.entries=Aa,Nn.entriesIn=Da,Nn.extend=aa,Nn.extendWith=ua,Ya(Nn,Nn),Nn.add=ou,Nn.attempt=Ua,Nn.camelCase=Ia,Nn.capitalize=wa,Nn.ceil=ru,Nn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=la(n))==n?n:0),void 0!==t&&(t=(t=la(t))==t?t:0),Yn(la(e),t,n)},Nn.clone=function(e){return Xn(e,4)},Nn.cloneDeep=function(e){return Xn(e,5)},Nn.cloneDeepWith=function(e,t){return Xn(e,5,t="function"==typeof t?t:void 0)},Nn.cloneWith=function(e,t){return Xn(e,4,t="function"==typeof t?t:void 0)},Nn.conformsTo=function(e,t){return null==t||Zn(e,t,ga(t))},Nn.deburr=Oa,Nn.defaultTo=function(e,t){return null==e||e!=e?t:e},Nn.divide=au,Nn.endsWith=function(e,t,n){e=oa(e),t=Xl(t);var l=e.length,i=n=void 0===n?l:Yn(ta(n),0,l);return(n-=t.length)>=0&&e.slice(n,i)==t},Nn.eq=Nr,Nn.escape=function(e){return(e=oa(e))&&M.test(e)?e.replace(P,Pt):e},Nn.escapeRegExp=function(e){return(e=oa(e))&&V.test(e)?e.replace(z,"\\$&"):e},Nn.every=function(e,t,n){var l=xr(e)?ot:tl;return n&&oo(e,t,n)&&(t=void 0),l(e,Yi(t,3))},Nn.find=lr,Nn.findIndex=Oo,Nn.findKey=function(e,t){return mt(e,Yi(t,3),al)},Nn.findLast=ir,Nn.findLastIndex=xo,Nn.findLastKey=function(e,t){return mt(e,Yi(t,3),ul)},Nn.floor=uu,Nn.forEach=or,Nn.forEachRight=rr,Nn.forIn=function(e,t){return null==e?e:ol(e,Yi(t,3),ha)},Nn.forInRight=function(e,t){return null==e?e:rl(e,Yi(t,3),ha)},Nn.forOwn=function(e,t){return e&&al(e,Yi(t,3))},Nn.forOwnRight=function(e,t){return e&&ul(e,Yi(t,3))},Nn.get=pa,Nn.gt=Ir,Nn.gte=wr,Nn.has=function(e,t){return null!=e&&to(e,t,fl)},Nn.hasIn=fa,Nn.head=Lo,Nn.identity=Va,Nn.includes=function(e,t,n,l){e=Lr(e)?e:Na(e),n=n&&!l?ta(n):0;var i=e.length;return n<0&&(n=on(i+n,0)),Yr(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&_t(e,t,n)>-1},Nn.indexOf=function(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=null==n?0:ta(n);return i<0&&(i=on(l+i,0)),_t(e,t,i)},Nn.inRange=function(e,t,n){return t=ea(t),void 0===n?(n=t,t=0):n=ea(n),function(e,t,n){return e>=rn(t,n)&&e<on(t,n)}(e=la(e),t,n)},Nn.invoke=_a,Nn.isArguments=Or,Nn.isArray=xr,Nn.isArrayBuffer=Rr,Nn.isArrayLike=Lr,Nn.isArrayLikeObject=Pr,Nn.isBoolean=function(e){return!0===e||!1===e||Hr(e)&&vl(e)==a},Nn.isBuffer=kr,Nn.isDate=Mr,Nn.isElement=function(e){return Hr(e)&&1===e.nodeType&&!Gr(e)},Nn.isEmpty=function(e){if(null==e)return!0;if(Lr(e)&&(xr(e)||"string"==typeof e||"function"==typeof e.splice||kr(e)||Zr(e)||Or(e)))return!e.length;var t=eo(e);if(t==v||t==E)return!e.size;if(co(e))return!Tl(e).length;for(var n in e)if(ye.call(e,n))return!1;return!0},Nn.isEqual=function(e,t){return hl(e,t)},Nn.isEqualWith=function(e,t,n){var l=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===l?hl(e,t,void 0,n):!!l},Nn.isError=Fr,Nn.isFinite=function(e){return"number"==typeof e&&tn(e)},Nn.isFunction=Br,Nn.isInteger=Ur,Nn.isLength=Wr,Nn.isMap=zr,Nn.isMatch=function(e,t){return e===t||Sl(e,t,Zi(t))},Nn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,Sl(e,t,Zi(t),n)},Nn.isNaN=function(e){return Vr(e)&&e!=+e},Nn.isNative=function(e){if(uo(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yl(e)},Nn.isNil=function(e){return null==e},Nn.isNull=function(e){return null===e},Nn.isNumber=Vr,Nn.isObject=jr,Nn.isObjectLike=Hr,Nn.isPlainObject=Gr,Nn.isRegExp=Kr,Nn.isSafeInteger=function(e){return Ur(e)&&e>=-9007199254740991&&e<=9007199254740991},Nn.isSet=qr,Nn.isString=Yr,Nn.isSymbol=Xr,Nn.isTypedArray=Zr,Nn.isUndefined=function(e){return void 0===e},Nn.isWeakMap=function(e){return Hr(e)&&eo(e)==h},Nn.isWeakSet=function(e){return Hr(e)&&"[object WeakSet]"==vl(e)},Nn.join=function(e,t){return null==e?"":nn.call(e,t)},Nn.kebabCase=xa,Nn.last=Fo,Nn.lastIndexOf=function(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=l;return void 0!==n&&(i=(i=ta(n))<0?on(l+i,0):rn(i,l-1)),t==t?function(e,t,n){for(var l=n+1;l--;)if(e[l]===t)return l;return l}(e,t,i):Et(e,ht,i,!0)},Nn.lowerCase=Ra,Nn.lowerFirst=La,Nn.lt=$r,Nn.lte=Qr,Nn.max=function(e){return e&&e.length?nl(e,Va,pl):void 0},Nn.maxBy=function(e,t){return e&&e.length?nl(e,Yi(t,2),pl):void 0},Nn.mean=function(e){return St(e,Va)},Nn.meanBy=function(e,t){return St(e,Yi(t,2))},Nn.min=function(e){return e&&e.length?nl(e,Va,Cl):void 0},Nn.minBy=function(e,t){return e&&e.length?nl(e,Yi(t,2),Cl):void 0},Nn.stubArray=nu,Nn.stubFalse=lu,Nn.stubObject=function(){return{}},Nn.stubString=function(){return""},Nn.stubTrue=function(){return!0},Nn.multiply=cu,Nn.nth=function(e,t){return e&&e.length?wl(e,ta(t)):void 0},Nn.noConflict=function(){return ze._===this&&(ze._=De),this},Nn.noop=Xa,Nn.now=pr,Nn.pad=function(e,t,n){e=oa(e);var l=(t=ta(t))?Ht(e):0;if(!t||l>=t)return e;var i=(t-l)/2;return Oi(Qt(i),n)+e+Oi($t(i),n)},Nn.padEnd=function(e,t,n){e=oa(e);var l=(t=ta(t))?Ht(e):0;return t&&l<t?e+Oi(t-l,n):e},Nn.padStart=function(e,t,n){e=oa(e);var l=(t=ta(t))?Ht(e):0;return t&&l<t?Oi(t-l,n)+e:e},Nn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),un(oa(e).replace(G,""),t||0)},Nn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&oo(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=ea(e),void 0===t?(t=e,e=0):t=ea(t)),e>t){var l=e;e=t,t=l}if(n||e%1||t%1){var i=cn();return rn(e+i*(t-e+Ue("1e-"+((i+"").length-1))),t)}return Pl(e,t)},Nn.reduce=function(e,t,n){var l=xr(e)?dt:Tt,i=arguments.length<3;return l(e,Yi(t,4),n,i,Jn)},Nn.reduceRight=function(e,t,n){var l=xr(e)?vt:Tt,i=arguments.length<3;return l(e,Yi(t,4),n,i,el)},Nn.repeat=function(e,t,n){return t=(n?oo(e,t,n):void 0===t)?1:ta(t),kl(oa(e),t)},Nn.replace=function(){var e=arguments,t=oa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Nn.result=function(e,t,n){var l=-1,i=(t=oi(t,e)).length;for(i||(i=1,e=void 0);++l<i;){var o=null==e?void 0:e[Co(t[l])];void 0===o&&(l=i,o=n),e=Br(o)?o.call(e):o}return e},Nn.round=su,Nn.runInContext=e,Nn.sample=function(e){return(xr(e)?Bn:Fl)(e)},Nn.size=function(e){if(null==e)return 0;if(Lr(e))return Yr(e)?Ht(e):e.length;var t=eo(e);return t==v||t==E?e.size:Tl(e).length},Nn.snakeCase=Pa,Nn.some=function(e,t,n){var l=xr(e)?pt:Vl;return n&&oo(e,t,n)&&(t=void 0),l(e,Yi(t,3))},Nn.sortedIndex=function(e,t){return Gl(e,t)},Nn.sortedIndexBy=function(e,t,n){return Kl(e,t,Yi(n,2))},Nn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var l=Gl(e,t);if(l<n&&Nr(e[l],t))return l}return-1},Nn.sortedLastIndex=function(e,t){return Gl(e,t,!0)},Nn.sortedLastIndexBy=function(e,t,n){return Kl(e,t,Yi(n,2),!0)},Nn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Gl(e,t,!0)-1;if(Nr(e[n],t))return n}return-1},Nn.startCase=ka,Nn.startsWith=function(e,t,n){return e=oa(e),n=null==n?0:Yn(ta(n),0,e.length),t=Xl(t),e.slice(n,n+t.length)==t},Nn.subtract=du,Nn.sum=function(e){return e&&e.length?Ct(e,Va):0},Nn.sumBy=function(e,t){return e&&e.length?Ct(e,Yi(t,2)):0},Nn.template=function(e,t,n){var l=Nn.templateSettings;n&&oo(e,t,n)&&(t=void 0),e=oa(e),t=ua({},t,l,Bi);var i,o,r=ua({},t.imports,l.imports,Bi),a=ga(r),u=It(r,a),c=0,s=t.interpolate||ue,d="__p += '",v=fe((t.escape||ue).source+"|"+s.source+"|"+(s===U?ee:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),p="//# sourceURL="+(ye.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ke+"]")+"\n";e.replace(v,function(t,n,l,r,a,u){return l||(l=r),d+=e.slice(c,u).replace(ce,kt),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),a&&(o=!0,d+="';\n"+a+";\n__p += '"),l&&(d+="' +\n((__t = ("+l+")) == null ? '' : __t) +\n'"),c=u+t.length,t}),d+="';\n";var f=ye.call(t,"variable")&&t.variable;if(f){if(Q.test(f))throw new se("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(O,""):d).replace(x,"$1").replace(R,"$1;"),d="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Ua(function(){return de(a,p+"return "+d).apply(void 0,u)});if(m.source=d,Fr(m))throw m;return m},Nn.times=function(e,t){if((e=ta(e))<1||e>9007199254740991)return[];var n=4294967295,l=rn(e,4294967295);e-=4294967295;for(var i=At(l,t=Yi(t));++n<e;)t(n);return i},Nn.toFinite=ea,Nn.toInteger=ta,Nn.toLength=na,Nn.toLower=function(e){return oa(e).toLowerCase()},Nn.toNumber=la,Nn.toSafeInteger=function(e){return e?Yn(ta(e),-9007199254740991,9007199254740991):0===e?e:0},Nn.toString=oa,Nn.toUpper=function(e){return oa(e).toUpperCase()},Nn.trim=function(e,t,n){if((e=oa(e))&&(n||void 0===t))return Dt(e);if(!e||!(t=Xl(t)))return e;var l=zt(e),i=zt(t);return ai(l,Ot(l,i),xt(l,i)+1).join("")},Nn.trimEnd=function(e,t,n){if((e=oa(e))&&(n||void 0===t))return e.slice(0,Vt(e)+1);if(!e||!(t=Xl(t)))return e;var l=zt(e);return ai(l,0,xt(l,zt(t))+1).join("")},Nn.trimStart=function(e,t,n){if((e=oa(e))&&(n||void 0===t))return e.replace(G,"");if(!e||!(t=Xl(t)))return e;var l=zt(e);return ai(l,Ot(l,zt(t))).join("")},Nn.truncate=function(e,t){var n=30,l="...";if(jr(t)){var i="separator"in t?t.separator:i;n="length"in t?ta(t.length):n,l="omission"in t?Xl(t.omission):l}var o=(e=oa(e)).length;if(Mt(e)){var r=zt(e);o=r.length}if(n>=o)return e;var a=n-Ht(l);if(a<1)return l;var u=r?ai(r,0,a).join(""):e.slice(0,a);if(void 0===i)return u+l;if(r&&(a+=u.length-a),Kr(i)){if(e.slice(a).search(i)){var c,s=u;for(i.global||(i=fe(i.source,oa(te.exec(i))+"g")),i.lastIndex=0;c=i.exec(s);)var d=c.index;u=u.slice(0,void 0===d?a:d)}}else if(e.indexOf(Xl(i),a)!=a){var v=u.lastIndexOf(i);v>-1&&(u=u.slice(0,v))}return u+l},Nn.unescape=function(e){return(e=oa(e))&&k.test(e)?e.replace(L,Gt):e},Nn.uniqueId=function(e){var t=++be;return oa(e)+t},Nn.upperCase=Ma,Nn.upperFirst=Fa,Nn.each=or,Nn.eachRight=rr,Nn.first=Lo,Ya(Nn,(iu={},al(Nn,function(e,t){ye.call(Nn.prototype,t)||(iu[t]=e)}),iu),{chain:!1}),Nn.VERSION="4.17.21",lt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Nn[e].placeholder=Nn}),lt(["drop","take"],function(e,t){xn.prototype[e]=function(n){n=void 0===n?1:on(ta(n),0);var l=this.__filtered__&&!t?new xn(this):this.clone();return l.__filtered__?l.__takeCount__=rn(n,l.__takeCount__):l.__views__.push({size:rn(n,4294967295),type:e+(l.__dir__<0?"Right":"")}),l},xn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),lt(["filter","map","takeWhile"],function(e,t){var n=t+1,l=1==n||3==n;xn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Yi(e,3),type:n}),t.__filtered__=t.__filtered__||l,t}}),lt(["head","last"],function(e,t){var n="take"+(t?"Right":"");xn.prototype[e]=function(){return this[n](1).value()[0]}}),lt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");xn.prototype[e]=function(){return this.__filtered__?new xn(this):this[n](1)}}),xn.prototype.compact=function(){return this.filter(Va)},xn.prototype.find=function(e){return this.filter(e).head()},xn.prototype.findLast=function(e){return this.reverse().find(e)},xn.prototype.invokeMap=Ml(function(e,t){return"function"==typeof e?new xn(this):this.map(function(n){return _l(n,e,t)})}),xn.prototype.reject=function(e){return this.filter(br(Yi(e)))},xn.prototype.slice=function(e,t){e=ta(e);var n=this;return n.__filtered__&&(e>0||t<0)?new xn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ta(t))<0?n.dropRight(-t):n.take(t-e)),n)},xn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},xn.prototype.toArray=function(){return this.take(4294967295)},al(xn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),l=/^(?:head|last)$/.test(t),i=Nn[l?"take"+("last"==t?"Right":""):t],o=l||/^find/.test(t);i&&(Nn.prototype[t]=function(){var t=this.__wrapped__,r=l?[1]:arguments,a=t instanceof xn,u=r[0],c=a||xr(t),s=function(e){var t=i.apply(Nn,st([e],r));return l&&d?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(a=c=!1);var d=this.__chain__,v=!!this.__actions__.length,p=o&&!d,f=a&&!v;if(!o&&c){t=f?t:new xn(this);var m=e.apply(t,r);return m.__actions__.push({func:er,args:[s],thisArg:void 0}),new On(m,d)}return p&&f?e.apply(this,r):(m=this.thru(s),p?l?m.value()[0]:m.value():m)})}),lt(["pop","push","shift","sort","splice","unshift"],function(e){var t=_e[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",l=/^(?:pop|shift)$/.test(e);Nn.prototype[e]=function(){var e=arguments;if(l&&!this.__chain__){var i=this.value();return t.apply(xr(i)?i:[],e)}return this[n](function(n){return t.apply(xr(n)?n:[],e)})}}),al(xn.prototype,function(e,t){var n=Nn[t];if(n){var l=n.name+"";ye.call(gn,l)||(gn[l]=[]),gn[l].push({name:t,func:n})}}),gn[Di(void 0,2).name]=[{name:"wrapper",func:void 0}],xn.prototype.clone=function(){var e=new xn(this.__wrapped__);return e.__actions__=mi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=mi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=mi(this.__views__),e},xn.prototype.reverse=function(){if(this.__filtered__){var e=new xn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},xn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=xr(e),l=t<0,i=n?e.length:0,o=function(e,t,n){for(var l=-1,i=n.length;++l<i;){var o=n[l],r=o.size;switch(o.type){case"drop":e+=r;break;case"dropRight":t-=r;break;case"take":t=rn(t,e+r);break;case"takeRight":e=on(e,t-r)}}return{start:e,end:t}}(0,i,this.__views__),r=o.start,a=o.end,u=a-r,c=l?a:r-1,s=this.__iteratees__,d=s.length,v=0,p=rn(u,this.__takeCount__);if(!n||!l&&i==u&&p==u)return ei(e,this.__actions__);var f=[];e:for(;u--&&v<p;){for(var m=-1,E=e[c+=t];++m<d;){var _=s[m],g=_.type,h=(0,_.iteratee)(E);if(2==g)E=h;else if(!h){if(1==g)continue e;break e}}f[v++]=E}return f},Nn.prototype.at=tr,Nn.prototype.chain=function(){return Jo(this)},Nn.prototype.commit=function(){return new On(this.value(),this.__chain__)},Nn.prototype.next=function(){void 0===this.__values__&&(this.__values__=Jr(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Nn.prototype.plant=function(e){for(var t,n=this;n instanceof wn;){var l=Do(n);l.__index__=0,l.__values__=void 0,t?i.__wrapped__=l:t=l;var i=l;n=n.__wrapped__}return i.__wrapped__=e,t},Nn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof xn){var t=e;return this.__actions__.length&&(t=new xn(this)),(t=t.reverse()).__actions__.push({func:er,args:[jo],thisArg:void 0}),new On(t,this.__chain__)}return this.thru(jo)},Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return ei(this.__wrapped__,this.__actions__)},Nn.prototype.first=Nn.prototype.head,ft&&(Nn.prototype[ft]=function(){return this}),Nn}();Ge?((Ge.exports=Kt)._=Kt,Ve._=Kt):ze._=Kt}).call(q)});const Gl=e=>{var t,n;let{t:o,formData:r,applicationData:a,docs:u,bpaActionsDetails:c}=e;const s=(null==a?void 0:a.status)||"",d=(null==c||null===(t=c.data)||void 0===t?void 0:t.nextActions)||[],v=Digit.ULBService.getStateId(),[p,f]=l.useState((null==r||null===(n=r.documents)||void 0===n?void 0:n.documents)||[]),[m,E]=l.useState(null),[_,g]=l.useState([]),[h,S]=l.useState(!0),[y,b]=l.useState(!1),[T,C]=l.useState(!1),{isLoading:A,data:D}=Digit.Hooks.obps.useMDMS(v,"BPA",["DocTypeMapping"]),{isLoading:N,data:I}=Digit.Hooks.obps.useMDMS(v,"common-masters",["DocumentType"]);return l.useEffect(()=>{var e,t,n,l;let i=[];var o,r;null!=D&&null!==(e=D.BPA)&&void 0!==e&&e.DocTypeMapping&&(i=null==D||null===(o=D.BPA)||void 0===o||null===(r=o.DocTypeMapping)||void 0===r?void 0:r.filter(e=>{var t,n;return e.WFState==(null==a?void 0:a.status)?null==a?void 0:a.status:e.RiskType==(null==a?void 0:a.riskType)&&e.ServiceType==(null==a||null===(t=a.additionalDetails)||void 0===t?void 0:t.serviceType)&&e.applicationType==(null==a||null===(n=a.additionalDetails)||void 0===n?void 0:n.applicationType)}));let c=[];null===(t=i)||void 0===t||null===(n=t[0])||void 0===n||null===(l=n.docTypes)||void 0===l||l.forEach(e=>{var t,n,l,i;let o=e.code;e.dropdownData=[],e.uploadedDocuments=[],null==I||null===(t=I["common-masters"])||void 0===t||null===(n=t.DocumentType)||void 0===n||n.forEach(t=>{let n=t.code.slice(0,o.length);o===n&&(e.hasDropdown=!0,t.i18nKey=t.code,e.dropdownData.push(t))}),e.uploadedDocuments[0]={},e.uploadedDocuments[0].values=[],null==u||null===(l=u[0])||void 0===l||null===(i=l.values)||void 0===i||i.map(t=>{var n,l;o===(null==t||null===(n=t.documentType)||void 0===n?void 0:n.split(".")[0])+"."+(null==t||null===(l=t.documentType)||void 0===l?void 0:l.split(".")[1])&&e.uploadedDocuments[0].values.push(t)}),c.push(e)}),sessionStorage.setItem("BPA_DOCUMENTS",JSON.stringify(c)),g(c)},[!A,!N]),l.useEffect(()=>{let e=0;_.map(t=>{let n=!1;p.map(e=>{t.required&&t.code==e.documentType.split(".")[0]+"."+e.documentType.split(".")[1]&&(n=!0)}),!n&&t.required&&(e+=1)}),S("0"!=e&&0!=e||!(p.length>0))},[p,y]),l.useEffect(()=>{C("DOC_VERIFICATION_INPROGRESS"===s&&(null==d?void 0:d.length)>0)},[a,c]),i.createElement("div",null,null==_?void 0:_.map((e,t)=>i.createElement("div",null,i.createElement(Kl,{key:t,index:t,document:e,t:o,error:m,setError:E,setDocuments:f,documents:p,setCheckRequiredFields:b,applicationStatus:s,actions:d,bpaTaxDocuments:_,checkEnablingDocs:T}))))};function Kl(e){var t,n;let{t:o,document:r,setDocuments:a,documents:u,index:d,bpaTaxDocuments:v,checkEnablingDocs:p}=e;const f=null==u?void 0:u.filter(e=>{var t;return null==e||null===(t=e.documentType)||void 0===t?void 0:t.includes(null==r?void 0:r.code)})[0],m=Digit.ULBService.getStateId(),[E,_]=l.useState(f?s({},f,{active:!0,code:null==f?void 0:f.documentType,i18nKey:null==f?void 0:f.documentType}):1===(null==r||null===(t=r.dropdownData)||void 0===t?void 0:t.length)?null==r?void 0:r.dropdownData[0]:{}),[g,h]=l.useState(null),[S,y]=l.useState(()=>(null==f?void 0:f.fileStoreId)||null),[b,T]=l.useState([]);return l.useEffect(()=>{null!=E&&E.code&&a(e=>{var t;const n=null==e?void 0:e.filter(e=>(null==e?void 0:e.documentType)!==(null==E?void 0:E.code));return 0===(null==S?void 0:S.length)||null===S?n:[...null==n?void 0:n.filter(e=>(null==e?void 0:e.fileStoreId)!==S),{documentType:null==E?void 0:E.code,fileStoreId:S,documentUid:S,fileName:(null==g?void 0:g.name)||"",id:u?null===(t=u.find(e=>e.documentType===(null==E?void 0:E.code)))||void 0===t?void 0:t.id:void 0}]})},[S,E]),l.useEffect(()=>{try{b.length>0&&(sessionStorage.removeItem("BPA_DOCUMENTS"),r.newUploadedDocs=[],b.map(e=>{var t,n,l;null!=E&&E.code&&r.newUploadedDocs.push({documentType:null==E?void 0:E.code,fileStoreId:null==e||null===(t=e.fileStoreId)||void 0===t?void 0:t.fileStoreId,documentUid:null==e||null===(n=e.fileStoreId)||void 0===n?void 0:n.fileStoreId,tenantId:null==e||null===(l=e.fileStoreId)||void 0===l?void 0:l.tenantId})}),v[d]=r,sessionStorage.setItem("BPA_DOCUMENTS",JSON.stringify(v)))}catch(e){Promise.reject(e)}},[b,E]),l.useEffect(()=>{},[g]),i.createElement("div",{style:{marginBottom:"24px",maxWidth:"950px",minWidth:"280px",background:"#FAFAFA",borderRadius:"4px",border:"1px solid #D6D5D4",padding:"8px"}},i.createElement(c.CardSubHeader,{style:{marginBottom:"8px",paddingBottom:"9px",color:"#0B0C0C",fontSize:"16px",lineHeight:"19px"}},""+o(null==r?void 0:r.code)),(null==r||null===(n=r.uploadedDocuments)||void 0===n?void 0:n.length)&&i.createElement(Vl,{documents:null==r?void 0:r.uploadedDocuments,svgStyles:{width:"100px",height:"100px",viewBox:"0 0 25 25",minWidth:"100px"}}),p?i.createElement("div",{style:{marginTop:"20px"}},i.createElement(c.LabelFieldPair,{style:{width:"100%"}},i.createElement(c.CardLabel,{style:{marginTop:"-10px",width:"100%"}},null!=r&&r.required?o(null==r?void 0:r.code)+"* ":""+o(null==r?void 0:r.code)),i.createElement(c.Dropdown,{className:"form-field",t:o,isMandatory:!1,option:null==r?void 0:r.dropdownData,selected:E,optionKey:"i18nKey",select:e=>_(e),style:{width:"100%"}})),i.createElement(c.LabelFieldPair,{style:{width:"100%"}},i.createElement(c.CardLabel,{className:"card-label-smaller",style:{width:"100%"}}),i.createElement("div",{className:"field",style:{width:"100%"}},i.createElement(c.MultiUploadWrapper,{module:"BPA",tenantId:m,getFormState:e=>((e,t)=>{let n=Object.fromEntries(t),l=Object.values(n);var i;0!==Object.keys(n).length&&T(l),(i=l[l.length-1])&&h(i.file)})(0,e),t:o,allowedFileTypesRegex:/(.*?)(jpg|jpeg|png|image|pdf)$/i,allowedMaxSizeInMB:5,acceptFiles:"image/*, .pdf, .png, .jpeg, .jpg"})))):null)}function ql(e){let{fiReport:t,isCitizen:n=!1}=e;const{t:l}=o.useTranslation();return i.createElement(i.Fragment,null,i.createElement("div",{style:{marginTop:"10px"}},i.createElement(n?c.CardHeader:c.CardSectionHeader,{style:{fontSize:"24px"}},""+l("BPA_FI_REPORT")),t.map((e,n)=>{var o,r,a,u,s,d;return i.createElement("div",{style:{background:"#FAFAFA",border:"1px solid #D6D5D4",padding:"8px",borderRadius:"4px",maxWidth:"950px",minWidth:"280px",marginBottom:"24px"}},i.createElement(c.StatusTable,null,i.createElement(c.CardSectionHeader,{style:{fontSize:"20px"}},1==(null==t?void 0:t.length)?""+l("BPA_FI_REPORT"):l("BPA_FI_REPORT")+" - "+(n+1)),i.createElement(c.Row,{className:"border-none",label:""+l("BPA_FI_DATE_LABEL"),text:null!=e&&e.date?e.date.includes("-")?(null===(o=e.date)||void 0===o?void 0:o.split("-")[2])+"/"+(null===(r=e.date)||void 0===r?void 0:r.split("-")[1])+"/"+(null===(a=e.date)||void 0===a?void 0:a.split("-")[0]):null==e?void 0:e.date:"NA"}),i.createElement(c.Row,{className:"border-none",label:""+l("BPA_FI_TIME_LABEL"),text:null!=e&&e.time?null==e?void 0:e.time:"NA"}),(null==e||null===(u=e.questions)||void 0===u?void 0:u.length)&&(null==e||null===(s=e.questions)||void 0===s?void 0:s.map(e=>i.createElement("div",{style:{background:"white",border:"1px solid #D6D5D4",padding:"8px",borderRadius:"4px",marginTop:"10px"}},i.createElement(c.Row,{className:"border-none",label:""+l(""+e.question),text:null!=e&&e.value?null==e?void 0:e.value:"NA"}),i.createElement(c.Row,{className:"border-none",label:""+l("BPA_ENTER_REMARKS"),text:e.remarks?e.remarks:"NA"})))),i.createElement(Vl,{documents:(d=null==e?void 0:e.docs,[{title:"BPA_DOCUMENT_DETAILS_LABEL",values:null==d?void 0:d.map(e=>{var t;return{title:null==e||null===(t=e.documentType)||void 0===t?void 0:t.replaceAll(".","_"),documentType:null==e?void 0:e.documentType,documentUid:null==e?void 0:e.documentUid,fileStoreId:null==e?void 0:e.fileStoreId,id:null==e?void 0:e.id,url:null==e?void 0:e.url}})}]),svgStyles:{width:"100px",height:"100px",viewBox:"0 0 25 25",minWidth:"100px"}})))})))}function Yl(e){let{t:t,document:n,setNocDocuments:o,setError:r,nocDocuments:a}=e;const u=null==a?void 0:a.filter(e=>{var t;return null==e||null===(t=e.documentType)||void 0===t?void 0:t.includes(null==n?void 0:n.code)})[0],s=Digit.ULBService.getStateId(),[d,v]=l.useState(),[p,f]=l.useState(null),[m,E]=l.useState(()=>(null==u?void 0:u.fileStoreId)||null);return l.useEffect(()=>{var e,t;null!=n&&null!==(e=n.dropdownData)&&void 0!==e&&null!==(t=e[0])&&void 0!==t&&t.code&&o(e=>{var t;const l=null==e?void 0:e.filter(e=>{var t,l;return(null==e?void 0:e.documentType)!==(null==n||null===(t=n.dropdownData)||void 0===t||null===(l=t[0])||void 0===l?void 0:l.code)});return 0===(null==m?void 0:m.length)||null===m?l:[...null==l?void 0:l.filter(e=>(null==e?void 0:e.fileStoreId)!==m),{documentType:null==n||null===(t=n.dropdownData)||void 0===t?void 0:t[0].code,fileStoreId:m,documentUid:m,fileName:(null==p?void 0:p.name)||""}]})},[m]),l.useEffect(()=>{!function(){try{r(null);const e=function(){if(p){const e=/(.*?)(jpg|jpeg|png|image|pdf)$/i,n=function(){if(p.size>=5242880)r(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const n=function(){if(null!=p&&p.type&&!e.test(null==p?void 0:p.type))r(t("NOT_SUPPORTED_FILE_TYPE"));else{const e=qe(function(){return E(null),Promise.resolve(Digit.UploadServices.Filestorage("PT",p,Digit.ULBService.getStateId())).then(function(e){var n,l,i,o;(null==e||null===(n=e.data)||void 0===n||null===(l=n.files)||void 0===l?void 0:l.length)>0?E(null==e||null===(i=e.data)||void 0===i||null===(o=i.files[0])||void 0===o?void 0:o.fileStoreId):r(t("CS_FILE_UPLOAD_ERROR"))})},function(){r(t("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(n&&n.then)return n.then(function(){})}}();if(n&&n.then)return n.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[p]),i.createElement("div",{style:{}},i.createElement(c.LabelFieldPair,{style:{width:"98%",marginRight:"10px"}},i.createElement(c.CardLabel,{style:{width:"100%"}},null!=n&&n.required?t("TL_BUTTON_UPLOAD FILE")+"*":""+t("TL_BUTTON_UPLOAD FILE")),i.createElement("div",{className:"field",style:{width:"100%"}},i.createElement(c.MultiUploadWrapper,{module:"NOC",tenantId:s,getFormState:e=>(e=>{let t=Object.fromEntries(e),n=Object.values(t);var l;(l=n[n.length-1])&&f(l.file)})(e),t:t,allowedFileTypesRegex:/(.*?)(jpg|jpeg|png|image|pdf)$/i,allowedMaxSizeInMB:5,acceptFiles:"image/*, .pdf, .png, .jpeg, .jpg"}))))}const Xl=e=>{var t;let{t:n,noc:o,docs:r,isNoc:a,applicationData:u,NOCdata:s,bpaActionsDetails:d}=e;Digit.ULBService.getStateId();const v=Digit.ULBService.getStateId(),p=(null==u?void 0:u.status)||"",f=(null==d||null===(t=d.data)||void 0===t?void 0:t.nextActions)||[],{data:m}=Digit.Hooks.obps.useMDMS(v,"NOC",["DocumentTypeMapping"],{enabled:a}),{data:E}=Digit.Hooks.obps.useMDMS(v,"BPA",["DocTypeMapping"],{enabled:!a}),{data:_}=Digit.Hooks.obps.useMDMS(v,"common-masters",["DocumentType"]),[g,h]=l.useState([]),[S,y]=l.useState([]),[b,T]=l.useState(!1),[C,A]=Digit.Hooks.useSessionStorage(null==o?void 0:o.nocType,[]),[D,N]=l.useState(null),I=window.location.href.includes("/employee/");return l.useEffect(()=>{var e;h(null==_||null===(e=_["common-masters"])||void 0===e?void 0:e.DocumentType)},[_]),l.useEffect(()=>{var e,t,n;let l,i=[];var r,c,s,d;l=a?null==m||null===(r=m.NOC)||void 0===r||null===(c=r.DocumentTypeMapping)||void 0===c?void 0:c.filter(e=>(null==e?void 0:e.applicationType)===(null==o?void 0:o.applicationType)&&(null==e?void 0:e.nocType)===(null==o?void 0:o.nocType)):null==E||null===(s=E.BPA)||void 0===s||null===(d=s.DocTypeMapping)||void 0===d?void 0:d.filter(e=>{var t,n;return e.WFState==(null==u?void 0:u.status)&&e.RiskType==(null==u?void 0:u.riskType)&&e.ServiceType==(null==u||null===(t=u.additionalDetails)||void 0===t?void 0:t.serviceType)&&e.applicationType==(null==u||null===(n=u.additionalDetails)||void 0===n?void 0:n.applicationType)}),null!==(e=l)&&void 0!==e&&null!==(t=e[0])&&void 0!==t&&null!==(n=t.docTypes)&&void 0!==n&&n[0]&&(l[0].docTypes[0].nocType=l[0].nocType,l[0].docTypes[0].additionalDetails={submissionDetails:null==o?void 0:o.additionalDetails,applicationStatus:null==o?void 0:o.applicationStatus,appNumberLink:null==o?void 0:o.applicationNo,nocNo:null==o?void 0:o.nocNo},i.push(l[0].docTypes[0]));let v=[];i&&i.length>0&&(i.map(e=>{let t=e.documentType;e.dropdownData=[],null==g||g.forEach(n=>{let l=n.code.slice(0,null==t?void 0:t.length);t===l&&(e.hasDropdown=!0,e.dropdownData.push(n))}),v.push(e)}),y(v))},[m,g]),l.useEffect(()=>{T("NOC_VERIFICATION_INPROGRESS"===p&&(null==f?void 0:f.length)>0)},[u,d]),i.createElement("div",{style:{border:"1px solid #D6D5D4",padding:"16px 0px 16px 8px",background:"#FAFAFA",borderRadius:"5px",marginBottom:"24px",maxWidth:"950px"}},i.createElement(c.StatusTable,null,i.createElement(c.Row,{label:I?""+n("BPA_"+(null==o?void 0:o.nocType)+"_HEADER"):n("BPA_"+(null==o?void 0:o.nocType)+"_HEADER"),labelStyle:{fontSize:"20px",width:"150%"}}),s&&s.map((e,t)=>{if(null!=e&&e.value)return i.createElement(c.Row,"STATUS"==(null==e?void 0:e.field)?{className:"border-none",label:I?""+n(null==e?void 0:e.title):n(null==e?void 0:e.title),text:n(null!=e&&e.value?null==e?void 0:e.value:"CS_NA"),textStyle:"APPROVED"==(null==e?void 0:e.value)||"AUTO_APPROVED"==(null==e?void 0:e.value)?{color:"#00703C"}:{color:"#D4351C"}}:{className:"border-none",label:I?""+n(null==e?void 0:e.title):n(null==e?void 0:e.title),text:n(null!=e&&e.value?null==e?void 0:e.value:"CS_NA")})})),i.createElement(Vl,{documents:r,svgStyles:{width:"80px",height:"100px",viewBox:"0 0 25 25",minWidth:"80px"}}),b&&(null==S?void 0:S.map((e,t)=>i.createElement(Yl,{key:t,document:e,t:n,error:D,setError:N,setNocDocuments:A,nocDocuments:C,checkEnablingDocs:b}))))},Zl=e=>{let{permissions:t,t:n}=e;const[o,r,a]=Digit.Hooks.useSessionStorage("OBPS_APPROVAL_CHECKS",null==t?void 0:t.map(e=>({label:e,checked:!1}))),[u,d,v]=Digit.Hooks.useSessionStorage("OBPS_NEW_APPROVALS",[]);l.useEffect(()=>()=>{Digit.SessionStorage.del("OBPS_NEW_APPROVALS"),Digit.SessionStorage.del("OBPS_APPROVAL_CHECKS")},[]);const p=window.Digit.Utils.browser.isMobile();return i.createElement("div",null,i.createElement(c.CardSubHeader,{style:{marginBottom:"16px",fontSize:"24px"}},n("BPA_PERMIT_CONDITIONS")),null==o?void 0:o.map((e,t)=>i.createElement(c.CheckBox,{key:t,styles:{margin:"20px 0 40px",maxWidth:p?"100%":"70%"},label:null==e?void 0:e.label,checked:null==e?void 0:e.checked,onChange:e=>((e,t,n)=>{const l=e.target.checked;r(()=>null==o?void 0:o.map((e,t)=>n===t?s({},e,{checked:l}):e))})(e,0,t),isLabelFirst:!0,index:t})),null==u?void 0:u.map((e,t)=>i.createElement("div",null,i.createElement(c.TextInput,{key:t,value:null==e?void 0:e.label,onChange:e=>((e,t)=>{d(()=>null==u?void 0:u.map((n,l)=>{var i;return t===l?{label:null==e||null===(i=e.target)||void 0===i?void 0:i.value}:n}))})(e,t),textInputStyle:{maxWidth:p?"96%":"830px",width:p?"96%":"830px"},style:p?{paddingRight:"10%"}:{},placeholder:n("BPA_ENTER_PERMIT_CONDITIONS_LABEL")}),i.createElement(c.LinkButton,{label:i.createElement("div",null,i.createElement("span",null,i.createElement(c.Close,{style:{float:"right",position:"relative",bottom:"32px",marginTop:"-22px",marginRight:p?"5%":"35%"}}))),style:{},onClick:e=>(e=>{const t=[...u];t.splice(e,1),d([...t])})(t)}))),i.createElement(c.LinkButton,{style:{color:"#a82227",maxWidth:p?"fit-content":"10%",marginRight:"3%"},label:n("BPA_ADD_MORE"),onClick:()=>{d([...u,{label:""}])}}))};function $l(e){let{documents:t,svgStyles:n={},isSendBackFlow:r=!1}=e;const{t:a}=o.useTranslation(),[u,s]=l.useState(()=>[]),[d,v]=(Digit.ULBService.getCurrentTenantId(),l.useState({}));l.useEffect(()=>{var e;let n=[];null==t||t.forEach((e,t,l)=>{n=[...n,...e.values?e.values:[]]}),s(null===(e=n)||void 0===e?void 0:e.map(e=>null==e?void 0:e.fileStoreId))},[t]),l.useEffect(()=>{var e;null!=u&&u.length&&"BillAmend"===(null==t||null===(e=t[0])||void 0===e?void 0:e.BS)?Digit.UploadServices.Filefetch(u,Digit.ULBService.getCurrentTenantId()).then(e=>{v(null==e?void 0:e.data)}):null!=u&&u.length&&Digit.UploadServices.Filefetch(u,Digit.ULBService.getStateId()).then(e=>{v(null==e?void 0:e.data)})},[u]);const p=window.location.href.includes("employee/tl")||window.location.href.includes("/obps")||window.location.href.includes("employee/ws"),f=window.location.href.includes("stakeholder");return i.createElement("div",{style:{marginTop:"19px"}},!f&&(null==t?void 0:t.map((e,t)=>{var n;return i.createElement(i.Fragment,{key:t},null!=e&&e.title?i.createElement(c.CardSubHeader,{style:p?{marginTop:"32px",marginBottom:"18px",color:"#0B0C0C, 100%",fontSize:"24px",lineHeight:"30px"}:{marginTop:"32px",marginBottom:"8px",color:"#505A5F",fontSize:"24px"}},a(null==e?void 0:e.title)):null,i.createElement("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start"}},null!=e&&e.values&&(null==e?void 0:e.values.length)>0?null==e||null===(n=e.values)||void 0===n?void 0:n.map((e,t)=>{var n,l;return i.createElement("a",{target:"_",href:null===(n=d[e.fileStoreId])||void 0===n?void 0:n.split(",")[0],style:{minWidth:"80px",marginRight:"10px",maxWidth:"100px",height:"auto"},key:t},i.createElement("div",{style:{display:"flex",justifyContent:"center"}},i.createElement(c.PDFSvg,null)),i.createElement("p",{style:p?{marginTop:"8px",fontWeight:"bold",fontSize:"16px",lineHeight:"19px",color:"#505A5F",textAlign:"center"}:{marginTop:"8px",fontWeight:"bold"}},a(null==e?void 0:e.title)),r?null!=e&&null!==(l=e.documentType)&&void 0!==l&&l.includes("NOC")?i.createElement("p",{style:{textAlign:"center"}},a(null==e?void 0:e.documentType.split(".")[1])):i.createElement("p",{style:{textAlign:"center"}},a(null==e?void 0:e.documentType)):"")}):!window.location.href.includes("citizen")&&i.createElement("div",null,i.createElement("p",null,a("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))))})),f&&(null==t?void 0:t.map((e,t)=>{var l;return i.createElement(i.Fragment,{key:t},null!=e&&e.title?i.createElement(c.CardSubHeader,{style:{marginTop:"32px",marginBottom:"8px",color:"#505A5F",fontSize:"24px"}},a(null==e?void 0:e.title)):null,i.createElement("div",null,null!=e&&e.values&&(null==e?void 0:e.values.length)>0?null==e||null===(l=e.values)||void 0===l?void 0:l.map((e,t)=>{var l;return i.createElement("a",{target:"_",href:null===(l=d[e.fileStoreId])||void 0===l?void 0:l.split(",")[0],style:{minWidth:null!=n&&n.minWidth?null==n?void 0:n.minWidth:"160px",marginRight:"20px"},key:t},i.createElement("div",{style:{maxWidth:"940px",padding:"8px",borderRadius:"4px",border:"1px solid #D6D5D4",background:"#FAFAFA"}},i.createElement("p",{style:{marginTop:"8px",fontWeight:"bold",marginBottom:"10px"}},a(null==e?void 0:e.title)),null!=e&&e.docInfo?i.createElement("div",{style:{fontSize:"12px",color:"#505A5F",fontWeight:400,lineHeight:"15px",marginBottom:"10px"}},""+a(null==e?void 0:e.docInfo)):null,i.createElement(c.PDFSvg,null),i.createElement("p",{style:{marginTop:"8px",fontSize:"16px",lineHeight:"19px",color:"#505A5F",fontWeight:"400"}},""+a(null==e?void 0:e.title))))}):!window.location.href.includes("citizen")&&i.createElement("div",null,i.createElement("p",null,a("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))))})))}function Ql(e){let{taxHeadEstimatesCalculation:t}=e;const{taxHeadEstimates:n}=t,{t:l}=o.useTranslation();return i.createElement("div",{style:{marginTop:"40px"}},i.createElement(c.StatusTable,null,i.createElement(c.Row,{label:l("ES_PT_TITLE_TAX_HEADS"),text:l("ES_PT_TITLE_AMOUNT"),className:"border-none",textStyle:{fontWeight:"bold"}}),i.createElement(c.BreakLine,{style:{margin:"16px 0",width:"40%"}}),null==n?void 0:n.map((e,t)=>i.createElement(c.Row,{key:l(e.taxHeadCode),label:l(e.taxHeadCode),text:"₹ "+e.estimateAmount||"N/A",last:t===(null==n?void 0:n.length)-1,className:"border-none",textStyle:{color:"#505A5F"},labelStyle:{color:"#505A5F"}})),i.createElement(c.BreakLine,{style:{margin:"16px 0",width:"40%"}}),i.createElement(c.Row,{label:l("ES_PT_TITLE_TOTAL_DUE_AMOUNT"),text:"₹ "+(null==t?void 0:t.totalAmount)||"N/A",className:"border-none",textStyle:{fontSize:"24px",fontWeight:"bold"}})))}function Jl(e){let{floors:t}=e;const{t:n}=o.useTranslation();return i.createElement(i.Fragment,null,t.map(e=>{var t;return i.createElement("div",{key:n(null==e?void 0:e.title),style:{marginTop:"19px"}},i.createElement(c.CardSubHeader,{style:{marginBottom:"8px",color:"#505A5F",fontSize:"24px"}},n(null==e?void 0:e.title)),null==e||null===(t=e.values)||void 0===t?void 0:t.map((e,t)=>{var l;return i.createElement(i.Fragment,{key:t},i.createElement(c.CardSectionHeader,{style:{marginBottom:"16px",color:"#505A5F",fontSize:"16px",marginTop:0!==t?"16px":"revert"}},n(e.title)),i.createElement(c.StatusTable,{style:{position:"relative",padding:"8px"}},i.createElement("div",{style:{border:"1px solid #D6D5D4",padding:"16px",marginTop:"8px",borderRadius:"4px",background:"#FAFAFA",maxWidth:"100%"}},null==e||null===(l=e.values)||void 0===l?void 0:l.map((e,t)=>{var l;return i.createElement(c.Row,!0===e.map&&"N/A"!==e.value?{key:n(e.title),label:n(e.title),text:i.createElement("img",{src:n(e.value),alt:""})}:{key:n(e.title),label:n(e.title),text:n(e.value)||"N/A",last:t===(null==e||null===(l=e.values)||void 0===l?void 0:l.length)-1,caption:e.caption,className:"border-none"})}))))}))}))}function ei(e){let{owners:t}=e,n={};n=window.location.href.includes("/employee/pt/")?t.slice().reverse():t;const{t:l}=o.useTranslation(),r=(null==t?void 0:t.length)||1;let a={marginTop:"19px"},u={position:"relative",padding:"8px"},d={justifyContent:"space-between",fontSize:"16px",lineHeight:"19px",color:"#0B0C0C"};return Number(r)>1?a={marginTop:"19px",background:"#FAFAFA",border:"1px solid #D6D5D4",borderRadius:"4px",padding:"8px",lineHeight:"19px",maxWidth:"600px",minWidth:"280px"}:Number(r)>1||(a={marginTop:"19px",lineHeight:"19px",maxWidth:"600px",minWidth:"280px"},u={position:"relative",marginTop:"19px"}),window.location.href.includes("obps")&&(a=s({},a,{maxWidth:"950px"}),a=s({},a,{maxWidth:"950px"}),d={}),t.sort((e,t)=>{var n,l;return(null==e||null===(n=e.additionalDetails)||void 0===n?void 0:n.ownerSequence)-(null==t||null===(l=t.additionalDetails)||void 0===l?void 0:l.ownerSequence)}),i.createElement(i.Fragment,null,i.createElement("div",{className:"owner-details"},n.map((e,t)=>{var n;return i.createElement("div",{key:l(null==e?void 0:e.title),style:a,className:"owner-details-child"},i.createElement(c.CardSubHeader,{style:Number(r)>1?{marginBottom:"8px",paddingBottom:"9px",color:"#0B0C0C",fontSize:"16px",lineHeight:"19px"}:{marginBottom:"8px",color:"#505A5F",fontSize:"24px"}},Number(r)>1?l(null==e?void 0:e.title)+" "+(t+1):l(null==e?void 0:e.title)),i.createElement(i.Fragment,{key:t},i.createElement(c.StatusTable,{style:u},i.createElement("div",{style:{maxWidth:"640px",top:0,left:0,bottom:0,right:0,width:"auto"}}),null==e||null===(n=e.values)||void 0===n?void 0:n.map((e,t)=>{var n;return!0===e.map&&"N/A"!==e.value?i.createElement(c.Row,{key:l(e.title),label:l(e.title),text:i.createElement("img",{src:l(e.value),alt:"",privacy:null==e?void 0:e.privacy})}):i.createElement("span",null,i.createElement(c.Row,{key:l(e.title),label:""+l(e.title),text:l(e.value)||"N/A",last:t===(null==e||null===(n=e.values)||void 0===n?void 0:n.length)-1,caption:e.caption,className:"border-none",textStyle:e.textStyle,privacy:null==e?void 0:e.privacy,rowContainerStyle:d}))}))))})))}const ti=e=>{var t,n,r;let{scrutinyDetails:a,paymentsList:u=[]}=e;const{t:s}=o.useTranslation(),d=e=>null!=e&&e.value&&null!=e&&e.isTransLate?i.createElement("span",{style:{color:"#00703C"}},s(null==e?void 0:e.value)):null!=e&&e.value&&null!=e&&e.isTransLate?s(null==e?void 0:e.value):null!=e&&e.value?null==e?void 0:e.value:void s("NA");return i.createElement(l.Fragment,null,!(null!=a&&a.isChecklist)&&i.createElement("div",{style:{background:"#FAFAFA",border:"1px solid #D6D5D4",padding:"8px",borderRadius:"4px",maxWidth:"950px"}},i.createElement(c.StatusTable,null,i.createElement("div",null,null==a||null===(t=a.values)||void 0===t?void 0:t.map((e,t)=>null!=e&&e.isUnit?i.createElement(c.Row,{className:"border-none",textStyle:"Paid"===(null==e?void 0:e.value)?{color:"darkgreen"}:"Unpaid"===(null==e?void 0:e.value)?{color:"red"}:{},key:""+e.title,label:""+s(""+e.title),text:null!=e&&e.value?d(e)+" "+s(null==e?void 0:e.isUnit):s("NA"),labelStyle:null!=e&&e.isHeader?{fontSize:"20px"}:{}}):null==e||!e.isHeader||null!=e&&e.isUnit?null==e||!e.isSubTitle||null!=e&&e.isUnit?i.createElement(c.Row,{className:"border-none",textStyle:"Paid"===(null==e?void 0:e.value)?{color:"darkgreen",wordBreak:"break-all"}:"Unpaid"===(null==e?void 0:e.value)?{color:"red",wordBreak:"break-all"}:{wordBreak:"break-all"},key:""+e.title,label:""+s(""+e.title),text:d(e),labelStyle:null!=e&&e.isHeader?{fontSize:"20px"}:{}}):i.createElement(c.CardSubHeader,{style:{fontSize:"20px",paddingBottom:"10px",margin:"0px"}},s(null==e?void 0:e.title)):i.createElement(c.CardSubHeader,{style:{fontSize:"20px",paddingBottom:"10px"}},s(null==e?void 0:e.title))),null==a||null===(n=a.permit)||void 0===n?void 0:n.map((e,t)=>i.createElement(c.CardLabel,{style:{fontWeight:"400"}},null==e?void 0:e.title))),i.createElement("div",null,null==a||null===(r=a.scruntinyDetails)||void 0===r?void 0:r.map((e,t)=>i.createElement(l.Fragment,null,i.createElement(c.Row,{className:"border-none",label:""+s(null==e?void 0:e.title),labelStyle:{width:"150%"}}),i.createElement("a",{href:null==e?void 0:e.value}," ",i.createElement(c.PDFSvg,null)," "),i.createElement("p",{style:{margin:"8px 0px",fontWeight:"bold",fontSize:"16px",lineHeight:"19px",color:"#505A5F"}},s(null==e?void 0:e.text))))))))},ni=e=>{var t,n,r,a,u,s,d,v,p;let{edcrDetails:f,applicationData:m}=e;const{t:E}=o.useTranslation(),_=window.Digit.Utils.browser.isMobile(),g=[{name:"BPA_TABLE_COL_FLOOR",id:"Floor"},{name:"BPA_TABLE_COL_LEVEL",id:"Level"},{name:"BPA_TABLE_COL_OCCUPANCY",id:"Occupancy"},{name:"BPA_TABLE_COL_BUILDUPAREA",id:"BuildupArea"},{name:"BPA_TABLE_COL_FLOORAREA",id:"FloorArea"},{name:"BPA_TABLE_COL_CARPETAREA",id:"CarpetArea"}],h=e=>{const t=e;return(e,n,l)=>e[t]},S=l.useMemo(()=>g.map(e=>({Header:E(""+e.name),accessor:h(e.id),id:e.id})));function y(e){var t;let n=[];return null==e||null===(t=e.building)||void 0===t||t.floors.map(e=>{var t,l,i,o,r,a,u,c;n.push({Floor:(null==e?void 0:e.floorName)||E("BPA_FLOOR_NAME_"+e.number),Level:(null==e?void 0:e.number)||(null==e?void 0:e.floorNo),Occupancy:E(""+("BPA-PAP"===(null==m?void 0:m.businessService)?"Residential":null===(t=e.occupancies)||void 0===t||null===(l=t[0])||void 0===l?void 0:l.type))||"NA",BuildupArea:(null==e||null===(i=e.occupancies)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.builtUpArea)||(null==e?void 0:e.builtUpArea),FloorArea:(null==e||null===(r=e.occupancies)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.floorArea)||(null==e?void 0:e.builtUpArea),CarpetArea:(null==e||null===(u=e.occupancies)||void 0===u||null===(c=u[0])||void 0===c?void 0:c.carpetArea)||0,key:(null==e?void 0:e.floorName)||E("BPA_FLOOR_NAME_"+e.number)})}),n}function b(e){var t;let n=null==m||null===(t=m.landInfo)||void 0===t?void 0:t.unit,l="";if((null==n?void 0:n.length)>0){var i,o;let t=null===(i=n[e])||void 0===i||null===(o=i.usageCategory)||void 0===o?void 0:o.split(",");null!=t&&t.length&&(l=t.map(e=>e?""+E("BPA_SUBOCCUPANCYTYPE_"+function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),""==t)return e;for(;e.includes(t);)e=e.replace(t,n);return e}(null==e?void 0:e.toUpperCase(),"-","_")):"NA").join(", "))}return l||"NA"}return i.createElement(l.Fragment,null,i.createElement("div",{style:{background:"#FAFAFA",border:"1px solid #D6D5D4",padding:"8px",borderRadius:"4px",maxWidth:"950px",minWidth:"280px"}},i.createElement(c.StatusTable,null,null==f||null===(t=f.values)||void 0===t?void 0:t.map((e,t)=>null!=e&&e.isHeader?i.createElement(c.CardSubHeader,{style:{fontSize:"20px",paddingBottom:"10px"}},E(null==e?void 0:e.title)):i.createElement(c.Row,{className:"border-none",labelStyle:{width:"100%",fontSize:"20px"},key:""+e.title,label:""+E(""+e.title),text:null!=e&&e.value?null==e?void 0:e.value:""}))),null==f||null===(n=f.subOccupancyTableDetails)||void 0===n||null===(r=n[0])||void 0===r||null===(a=r.value)||void 0===a||null===(u=a.planDetail)||void 0===u?void 0:u.blocks.map((e,t)=>{var n,l,o,r,a;return i.createElement("div",{key:t,style:(null==f||null===(n=f.subOccupancyTableDetails)||void 0===n||null===(l=n[0])||void 0===l||null===(o=l.value)||void 0===o||null===(r=o.planDetail)||void 0===r||null===(a=r.blocks)||void 0===a?void 0:a.length)>0?{marginBottom:"30px",background:"#FAFAFA",border:"1px solid #D6D5D4",padding:"8px",borderRadius:"4px",maxWidth:"950px",minWidth:"280px"}:{marginBottom:"30px"}},i.createElement(c.CardSubHeader,{style:{marginBottom:"8px",paddingBottom:"9px",color:"#0B0C0C",fontSize:"18px",lineHeight:"19px"}},E("BPA_BLOCK_SUBHEADER")," ",t+1),i.createElement(c.StatusTable,null,i.createElement(c.Row,{className:"border-none",textStyle:{wordBreak:"break-word"},label:""+E("BPA_SUB_OCCUPANCY_LABEL"),text:b(t)})),i.createElement("div",{style:window.location.href.includes("citizen")||_?{overflow:"scroll"}:{maxWidth:"950px",maxHeight:"280px"}},i.createElement(c.Table,{className:"customTable table-fixed-first-column table-border-style",t:E,disableSort:!1,autoSort:!0,manualPagination:!1,isPaginationRequired:!1,initSortId:"S N ",data:y(e),columns:S,getCellProps:e=>({style:{}})})))}),null==f||null===(s=f.subOccupancyTableDetails)||void 0===s||null===(d=s[0])||void 0===d||null===(v=d.value)||void 0===v||null===(p=v.drawingDetail)||void 0===p?void 0:p.blocks.map((e,t)=>{var n,l,o,r,a;return i.createElement("div",{key:t,style:(null==f||null===(n=f.subOccupancyTableDetails)||void 0===n||null===(l=n[0])||void 0===l||null===(o=l.value)||void 0===o||null===(r=o.drawingDetail)||void 0===r||null===(a=r.blocks)||void 0===a?void 0:a.length)>0?{marginBottom:"30px",background:"#FAFAFA",border:"1px solid #D6D5D4",padding:"8px",borderRadius:"4px",maxWidth:"950px",minWidth:"280px"}:{marginBottom:"30px"}},i.createElement(c.CardSubHeader,{style:{marginBottom:"8px",paddingBottom:"9px",color:"#0B0C0C",fontSize:"18px",lineHeight:"19px"}},E("BPA_BLOCK_SUBHEADER")," ",t+1),i.createElement(c.StatusTable,null,i.createElement(c.Row,{className:"border-none",textStyle:{wordBreak:"break-word"},label:""+E("BPA_SUB_OCCUPANCY_LABEL"),text:b(t)})),i.createElement("div",{style:window.location.href.includes("citizen")||_?{overflow:"scroll"}:{maxWidth:"950px",maxHeight:"280px"}},i.createElement(c.Table,{className:"customTable table-fixed-first-column table-border-style",t:E,disableSort:!1,autoSort:!0,manualPagination:!1,isPaginationRequired:!1,initSortId:"S N ",data:y(e),columns:S,getCellProps:e=>({style:{}})})))})))},li=e=>{let{headComment:t,otherComment:n}=e;return i.createElement("div",{className:"checkpoint-comments-wrap"},i.createElement("h4",null,t),i.createElement("p",null,n))},ii=e=>{var t,n,l;let{data:r,OpenImage:a,privacy:u={}}=e;const{t:s}=o.useTranslation();return i.createElement("div",null,r.date&&i.createElement("p",null,r.date),i.createElement("p",null,r.name),r.mobileNumber&&i.createElement("span",{style:{display:"inline-flex",width:"fit-content",marginLeft:"10px"}},i.createElement(c.TelePhone,{mobile:r.mobileNumber,privacy:u}),i.createElement("p",null,"    ")),r.source&&i.createElement("p",null,s("ES_APPLICATION_DETAILS_APPLICATION_CHANNEL_"+r.source.toUpperCase())),r.comment&&i.createElement(li,{otherComment:null==r?void 0:r.otherComment,headComment:null==r?void 0:r.comment}),null!=r&&r.wfComment?i.createElement("div",null,null==r||null===(t=r.wfComment)||void 0===t?void 0:t.map(e=>i.createElement("div",{className:"TLComments"},i.createElement("h3",null,s("WF_COMMON_COMMENTS")),i.createElement("p",{style:{overflowX:"scroll"}},e)))):null,(null==r||null===(n=r.thumbnailsToShow)||void 0===n||null===(l=n.thumbs)||void 0===l?void 0:l.length)>0?i.createElement("div",{className:"TLComments"},i.createElement("h3",null,s("CS_COMMON_ATTACHMENTS")),i.createElement(c.DisplayPhotos,{srcs:null==r?void 0:r.thumbnailsToShow.thumbs,onClick:(e,t)=>{a(e,t,null==r?void 0:r.thumbnailsToShow)}})):null)};function oi(e){let{units:t}=e;const{t:n}=o.useTranslation();return i.createElement(i.Fragment,null,t.map((e,t)=>{var l;return i.createElement("div",{key:n(null==e?void 0:e.title),style:{marginTop:"19px",background:"#FAFAFA",border:"1px solid #D6D5D4",borderRadius:"4px",padding:"8px",lineHeight:"19px",maxWidth:"600px",minWidth:"280px"}},i.createElement(c.CardSubHeader,{style:{marginBottom:"8px",paddingBottom:"9px",color:"#0B0C0C",fontSize:"16px",lineHeight:"19px"}},n(null==e?void 0:e.title)+" "+(t+1)),i.createElement(i.Fragment,{key:t},i.createElement(c.StatusTable,{style:{position:"relative",marginTop:"19px"}},i.createElement("div",{style:{position:"absolute",maxWidth:"640px",top:0,left:0,bottom:0,right:0,width:"auto"}}),null==e||null===(l=e.values)||void 0===l?void 0:l.map((e,t)=>{var l;return i.createElement(c.Row,!0===e.map&&"N/A"!==e.value?{key:n(e.title),label:n(e.title),text:i.createElement("img",{src:n(e.value),alt:""})}:{key:n(e.title),label:n(e.title)+":",text:n(e.value)||"N/A",last:t===(null==e||null===(l=e.values)||void 0===l?void 0:l.length)-1,caption:e.caption,className:"border-none",rowContainerStyle:{justifyContent:"space-between",fontSize:"16px",lineHeight:"19px",color:"#0B0C0C"}})}))))}))}function ri(e){let{units:t}=e;const{t:n}=o.useTranslation();return i.createElement(i.Fragment,null,t.map((e,t)=>{var l;return i.createElement("div",{key:n(null==e?void 0:e.title),style:{marginTop:"19px",background:"#FAFAFA",border:"1px solid #D6D5D4",borderRadius:"4px",padding:"8px",lineHeight:"19px",maxWidth:"600px",minWidth:"280px"}},i.createElement(c.CardSubHeader,{style:{marginBottom:"9px",paddingBottom:"9px",color:"#0B0C0C",fontSize:"16px",lineHeight:"19px"}},n(null==e?void 0:e.title)+" "+(t+1)),i.createElement(i.Fragment,{key:t},i.createElement(c.StatusTable,{style:{position:"relative",marginTop:"19px"}},i.createElement("div",{style:{position:"absolute",maxWidth:"640px",top:0,left:0,bottom:0,right:0,width:"auto"}}),null==e||null===(l=e.values)||void 0===l?void 0:l.map((e,t)=>{var l;return i.createElement(c.Row,!0===e.map&&"N/A"!==e.value?{key:n(e.title),label:n(e.title),text:i.createElement("img",{src:n(e.value),alt:""})}:{key:n(e.title),label:n(e.title)+":",text:n(e.value)||"NA",last:t===(null==e||null===(l=e.values)||void 0===l?void 0:l.length)-1,caption:e.caption,className:"border-none",rowContainerStyle:{justifyContent:"space-between",fontSize:"16px",lineHeight:"19px",color:"#0B0C0C"}})}))))}))}const ai=e=>{var t,n,r,a;let{wsAdditionalDetails:u}=e;const{t:s}=o.useTranslation();let d=(v=location.search)?(/^[?#]/.test(v)?v.slice(1):v).split("&").reduce((e,t)=>{let[n,l]=t.split("=");return e[n]=l?decodeURIComponent(l.replace(/\+/g," ")):"",e},{}):{};var v;const p=null==d?void 0:d.mode;var{connectionDetails:f,plumberDetails:m,roadCuttingDetails:E,activationDetails:_}=(null==u?void 0:u.additionalDetails)||{connectionDetails:[],plumberDetails:[]};return i.createElement(l.Fragment,null,i.createElement("div",{style:{lineHeight:"19px",maxWidth:"950px",minWidth:"280px"}},(null==u||null===(t=u.additionalDetails)||void 0===t?void 0:t.connectionDetails)&&i.createElement(c.StatusTable,null,i.createElement(c.CardSubHeader,{style:{fontSize:"24px",marginBottom:"16px",marginTop:"32px"}},s("WS_COMMON_CONNECTION_DETAIL")),i.createElement("div",null,i.createElement("div",{className:"connection-details-new-value-wrapper"},null==f?void 0:f.map((e,t)=>i.createElement("div",null,i.createElement(c.Row,{className:"border-none",key:""+e.title,label:""+s(""+e.title),text:null!=e&&e.oldValue?null==e?void 0:e.oldValue:null!=e&&e.value?null==e?void 0:e.value:""})))))),(null==u||null===(n=u.additionalDetails)||void 0===n?void 0:n.plumberDetails)&&"MODIFY"!=p&&i.createElement(c.StatusTable,null,i.createElement(c.CardSubHeader,{style:{fontSize:"24px",marginBottom:"16px",marginTop:"32px"}},s("WS_COMMON_PLUMBER_DETAILS")),i.createElement("div",null,i.createElement("div",{className:"plumber-details-new-value-wrapper"},null==m?void 0:m.map((e,t)=>i.createElement(c.Row,{className:"border-none",key:""+e.title,label:""+s(""+e.title),text:null!=e&&e.oldValue?null==e?void 0:e.oldValue:null!=e&&e.value?null==e?void 0:e.value:"",privacy:e.privacy}))))),(null==u||null===(r=u.additionalDetails)||void 0===r?void 0:r.roadCuttingDetails)&&"MODIFY"!=p&&i.createElement(c.StatusTable,null,i.createElement(c.CardSubHeader,{style:{fontSize:"24px",marginBottom:"16px",marginTop:"32px"}},s("WS_ROAD_CUTTING_DETAILS")),i.createElement("div",null,i.createElement("div",{className:"plumber-details-new-value-wrapper"},null==E?void 0:E.map(e=>{var t;return i.createElement("div",{style:(null==E?void 0:E.length)>1?{border:"1px solid #D6D5D4",background:"#FAFAFA",borderRadius:"4px",padding:"10px 10px 0px 10px",margin:"5px 0px"}:{}},null==e||null===(t=e.values)||void 0===t?void 0:t.map(e=>i.createElement(c.Row,{className:"border-none",key:""+e.title,label:""+s(""+e.title),text:null!=e&&e.oldValue?null==e?void 0:e.oldValue:null!=e&&e.value?null==e?void 0:e.value:""})))})))),(null==u||null===(a=u.additionalDetails)||void 0===a?void 0:a.activationDetails)&&i.createElement(c.StatusTable,null,i.createElement(c.CardSubHeader,{style:{fontSize:"24px",marginBottom:"16px",marginTop:"32px"}},s("WS_ACTIVATION_DETAILS")),i.createElement("div",null,i.createElement("div",{className:"plumber-details-new-value-wrapper"},null==_?void 0:_.map((e,t)=>i.createElement(c.Row,{className:"border-none",key:""+e.title,label:""+s(""+e.title),text:null!=e&&e.oldValue?null==e?void 0:e.oldValue:null!=e&&e.value?null==e?void 0:e.value:""})))))))},ui=[{title:"PT_PENDING_DUES_FROM_EARLIER",value:"Pending dues from earlier"},{title:"PT_MISCALCULATION_OF_EARLIER_ASSESSMENT",value:"Miscalculation of earlier Assessment"},{title:"PT_ONE_TIME_PENALITY",value:"One time penality"},{title:"PT_OTHERS",value:"Others"}],ci=[{title:"PT_ADVANCED_PAID_BY_CITIZEN_EARLIER",value:"Advanced Paid By Citizen Earlier"},{title:"PT_REBATE_PROVIDED_BY_COMMISSIONER_EO",value:"Rebate provided by commissioner/EO"},{title:"PT_ADDITIONAL_AMOUNT_CHARGED_FROM_THE_CITIZEN",value:"Additional amount charged from the citizen"},{title:"PT_OTHERS",value:"Others"}],si=e=>{var t,n,r,a;let{wsAdditionalDetails:u}=e;const{t:d}=o.useTranslation(),[v,p,f]=Digit.Hooks.useSessionStorage("ADHOC_ADD_REBATE_DATA",{}),[m,E,g]=Digit.Hooks.useSessionStorage("ADHOC_BILL_ADD_REBATE_DATA",{}),h=!(null==u||null===(t=u.additionalDetails)||void 0===t||!t.isPaid),[S,y]=l.useState(!1),[b,T]=l.useState(v||{}),[C,A]=l.useState(null),[D,N]=l.useState(u.additionalDetails.data?u.additionalDetails.data:{}),[I,w]=l.useState(u.additionalDetails.values?u.additionalDetails.values:[]),O=Digit.ULBService.getStateId();Digit.Hooks.ws.useMDMS(O,"BillingService",["TaxHeadMaster"]),l.useEffect(()=>{var e,t,n;const l=s({},null==u||null===(e=u.additionalDetails)||void 0===e||null===(t=e.appDetails)||void 0===t?void 0:t.additionalDetails);if((null==v||null===(n=v.billDetails)||void 0===n?void 0:n.length)>0){var o,r,a,c,d,f,m;const e=[{title:"WS_APPLICATION_FEE_HEADER",value:i.createElement("span",null,"₹",null==v||null===(o=v.billDetails)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.fee)},{title:"WS_SERVICE_FEE_HEADER",value:i.createElement("span",null,"₹",null==v||null===(a=v.billDetails)||void 0===a||null===(c=a[0])||void 0===c?void 0:c.charge)},{title:"WS_TAX_HEADER",value:i.createElement("span",null,"₹",null==v||null===(d=v.billDetails)||void 0===d||null===(f=d[0])||void 0===f?void 0:f.taxAmount)}];w(e),N(null==v||null===(m=v.billDetails)||void 0===m?void 0:m[0])}else p(l),T(l)},[]);let x={};const R=e=>i.createElement("h1",{className:"heading-m"},e.label),L=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),P=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(L,null)),k=function(e,t,n){void 0===t&&(t=!1);let l=s({},b);if("adhocPenalty"!=e&&"adhocRebate"!=e||!n.target.value)t?(l[e+"_data"]=n,l[e]=n.title,"PT_OTHERS"==n.title&&"adhocPenaltyReason"==e&&(l.adhocPenaltyComment=""),"PT_OTHERS"==n.title&&"adhocRebateReason"==e&&(l.adhocRebateComment="")):l[e]=n.target.value;else{var i,o;const t=0==(null==n||null===(i=n.target)||void 0===i?void 0:i.value)?1:Math.sign(null==n||null===(o=n.target)||void 0===o?void 0:o.value)||-1;l[e]=1==t?n.target.value:""}T(l)};return i.createElement(l.Fragment,null,i.createElement("div",{style:{lineHeight:"19px",maxWidth:"950px",minWidth:"280px"}},I&&i.createElement(c.StatusTable,null,i.createElement("div",null,null==I?void 0:I.map((e,t)=>i.createElement(c.Row,{className:"border-none",key:""+e.title,label:""+d(""+e.title),text:null!=e&&e.value?null==e?void 0:e.value:""}))),i.createElement("hr",{style:{border:"1px solid #D6D5D4",color:"#D6D5D4",margin:"16px 0px"}}),i.createElement("div",null,i.createElement(c.Row,{className:"border-none",key:"WS_COMMON_TOTAL_AMT",label:""+d("WS_COMMON_TOTAL_AMT"),text:i.createElement("span",null,"₹",(null==D?void 0:D.totalAmount)||0),textStyle:{fontSize:"24px",fontWeight:"700"}}),i.createElement(c.Row,{className:"border-none",key:"CS_INBOX_STATUS_FILTER",label:""+d("CS_INBOX_STATUS_FILTER"),text:d(h?"WS_COMMON_PAID_LABEL":"WS_COMMON_NOT_PAID"),textStyle:h?{color:"#00703C"}:{color:"#D4351C"}}))),null!=u&&null!==(n=u.additionalDetails)&&void 0!==n&&n.isAdhocRebate?i.createElement("div",{onClick:e=>{y(!0)}},i.createElement("span",{style:{cursor:"pointer",color:"#a82227"}},d("WS_PAYMENT_ADD_REBATE_PENALTY"))):null,S&&i.createElement(c.Modal,{headerBarMain:i.createElement(R,{label:d("PT_ADD_REBATE_PENALITY")}),headerBarEnd:i.createElement(P,{onClick:()=>{T(v),y(!1)}}),actionCancelLabel:d("PT_CANCEL"),actionCancelOnSubmit:()=>{T(v),y(!1)},actionSaveLabel:d("PT_ADD"),actionSaveOnSubmit:e=>(e=>{const t=null!=b&&b.adhocPenalty?Number(null==b?void 0:b.adhocPenalty):0,n=null!=b&&b.adhocRebate?Number(null==b?void 0:b.adhocRebate):0;var l,i;if(t||n)if(n>(null==u||null===(l=u.additionalDetails)||void 0===l||null===(i=l.data)||void 0===i?void 0:i.totalAmount))A({isError:!1,isWarning:!0,key:"error",message:d("ERR_WS_REBATE_GREATER_THAN_AMOUNT")});else{var o,r,a,c,v,f,m,g,h,S;const e=null==u||null===(o=u.additionalDetails)||void 0===o||null===(r=o.appDetails)||void 0===r?void 0:r.applicationNo,t=null==u||null===(a=u.additionalDetails)||void 0===a||null===(c=a.appDetails)||void 0===c?void 0:c.tenantId,n=s({},null==u||null===(v=u.additionalDetails)||void 0===v||null===(f=v.appDetails)||void 0===f?void 0:f.additionalDetails,b);u.additionalDetails.appDetails.additionalDetails=n;const l={CalculationCriteria:"WATER"==(null==u||null===(m=u.additionalDetails)||void 0===m||null===(g=m.appDetails)||void 0===g?void 0:g.service)?[{applicationNo:e,tenantId:t,waterConnection:u.additionalDetails.appDetails}]:[{applicationNo:e,tenantId:t,sewerageConnection:u.additionalDetails.appDetails}],isconnectionCalculation:!1};let i="WATER"==(null==u||null===(h=u.additionalDetails)||void 0===h||null===(S=h.appDetails)||void 0===S?void 0:S.service)?"WS":"SW";Digit.WSService.wsCalculationEstimate(l,i).then((e,t)=>{var n,l,i,o,r,a,u,c,s,d,v,f,m,g,h;(null==e||null===(n=e.Calculation)||void 0===n||null===(l=n[0])||void 0===l||null===(i=l.taxHeadEstimates)||void 0===i?void 0:i.length)>0&&(null==e||null===(m=e.Calculation)||void 0===m||null===(g=m[0])||void 0===g||null===(h=g.taxHeadEstimates)||void 0===h||h.forEach(e=>e.amount=e.estimateAmount)),e.Calculation[0].billSlabData=_.groupBy(null==e||null===(o=e.Calculation)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.taxHeadEstimates,"category");const S=[{title:"WS_APPLICATION_FEE_HEADER",value:null===(a=e.Calculation)||void 0===a||null===(u=a[0])||void 0===u?void 0:u.fee},{title:"WS_SERVICE_FEE_HEADER",value:null===(c=e.Calculation)||void 0===c||null===(s=c[0])||void 0===s?void 0:s.charge},{title:"WS_TAX_HEADER",value:null===(d=e.Calculation)||void 0===d||null===(v=d[0])||void 0===v?void 0:v.taxAmount}];E(vl(e.Calculation[0])),N(null==e||null===(f=e.Calculation)||void 0===f?void 0:f[0]),w(S),b.billDetails=null==e?void 0:e.Calculation,p(b),y(!1)}).catch(e=>{var t,n,l,i,o,r;A({isError:!0,isWarning:!1,key:"error",message:null!=e&&null!==(t=e.response)&&void 0!==t&&null!==(n=t.data)&&void 0!==n&&null!==(l=n.Errors[0])&&void 0!==l&&l.message?d(""+(null==e||null===(i=e.response)||void 0===i||null===(o=i.data)||void 0===o||null===(r=o.Errors[0])||void 0===r?void 0:r.code)):d("PT_COMMON_ADD_REBATE_PENALITY")})})}else A({isError:!1,isWarning:!0,key:"warning",message:d("ERR_WS_ENTER_ATLEAST_ONE_FIELD")})})(),hideSubmit:!1,popupStyles:{overflowY:"auto"}},i.createElement("div",null,i.createElement(c.Card,{style:{padding:"10px 10px 1px 10px",margin:"0px 0px 15px 0px"}},i.createElement(c.CardSectionHeader,{style:{fontSize:"16px",fontWeight:"700",lineHeight:"18px",padding:"0px",margin:"0px 0px 10px 0px"}},d("PT_AD_PENALTY")),i.createElement(c.CardLabel,null,d("PT_TX_HEADS")),i.createElement("div",{className:"field"},i.createElement(c.Dropdown,{isMandatory:!0,option:ui,optionKey:"title",select:e=>k("adhocPenaltyReason",!0,e),selected:(null==b?void 0:b.adhocPenaltyReason_data)||"",isPropertyAssess:!0,name:"adhocPenaltyReason_data",t:d})),"PT_OTHERS"===(null==b||null===(r=b.adhocPenaltyReason_data)||void 0===r?void 0:r.title)&&i.createElement("div",{className:"field"},i.createElement(c.CardLabel,null,d("PT_REASON")),i.createElement("div",{className:"field"},i.createElement(c.TextInput,s({style:{background:"#FAFAFA"},t:d,type:"text",isMandatory:!1,name:"adhocPenaltyComment",value:(null==b?void 0:b.adhocPenaltyComment)||"",onChange:e=>k("adhocPenaltyComment",!1,e)},x={isRequired:!0,pattern:"^[a-zA-Z ]*$",type:"text",title:d("TL_NAME_ERROR_MESSAGE")})))),i.createElement(c.CardLabel,null,d("PT_HEAD_AMT")),i.createElement("div",{className:"field"},i.createElement(c.TextInput,s({style:{background:"#FAFAFA"},t:d,type:"number",isMandatory:!1,name:"adhocPenalty",value:(null==b?void 0:b.adhocPenalty)||"",onChange:e=>k("adhocPenalty",!1,e)},x={isRequired:!0,pattern:"^[1-9]+[0-9]*$",title:d("ERR_DEFAULT_INPUT_FIELD_MSG")})))),i.createElement(c.Card,{style:{padding:"10px 10px 1px 10px",margin:"0px 0px 15px 0px"}},i.createElement(c.CardSectionHeader,{style:{fontSize:"16px",fontWeight:"700",lineHeight:"18px",padding:"0px",margin:"0px 0px 10px 0px"}},d("PT_AD_REBATE")),i.createElement(c.CardLabel,null,d("PT_TX_HEADS")),i.createElement("div",{className:"field"},i.createElement(c.Dropdown,{isMandatory:!0,option:ci,optionKey:"title",select:e=>k("adhocRebateReason",!0,e),selected:(null==b?void 0:b.adhocRebateReason_data)||"",name:"adhocRebateReason_data",isPropertyAssess:!0,t:d})),"PT_OTHERS"===(null==b||null===(a=b.adhocRebateReason_data)||void 0===a?void 0:a.title)&&i.createElement("div",{className:"field"},i.createElement(c.CardLabel,null,d("PT_REASON")),i.createElement(c.TextInput,s({style:{background:"#FAFAFA"},t:d,type:"text",isMandatory:!1,name:"adhocRebateComment",value:(null==b?void 0:b.adhocRebateComment)||"",onChange:e=>k("adhocRebateComment",!1,e)},x={isRequired:!0,pattern:"^[a-zA-Z ]*$",type:"text",title:d("TL_NAME_ERROR_MESSAGE")}))),i.createElement(c.CardLabel,null,d("PT_HEAD_AMT")),i.createElement("div",{className:"field"},i.createElement(c.TextInput,s({style:{background:"#FAFAFA"},t:d,type:"number",isMandatory:!1,name:"adhocRebate",value:(null==b?void 0:b.adhocRebate)||"",onChange:e=>k("adhocRebate",!1,e)},x={isRequired:!0,pattern:"^[1-9]+[0-9]*$",title:d("ERR_DEFAULT_INPUT_FIELD_MSG")})))))," "),C&&i.createElement(c.Toast,{style:{zIndex:"10000"},warning:null==C?void 0:C.isWarning,error:null==C||!C.isWarning,label:d(null==C?void 0:C.message),onClose:()=>{A(!1)},isDleteBtn:!0})))},di=e=>{let{style:t}=e;return i.createElement("span",null,i.createElement("svg",{style:s({},t),display:"inline",width:"22",height:"16",viewBox:"0 0 22 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{d:"M11 0.5C6 0.5 1.73 3.61 0 8C1.73 12.39 6 15.5 11 15.5C16 15.5 20.27 12.39 22 8C20.27 3.61 16 0.5 11 0.5ZM11 13C8.24 13 6 10.76 6 8C6 5.24 8.24 3 11 3C13.76 3 16 5.24 16 8C16 10.76 13.76 13 11 13ZM11 5C9.34 5 8 6.34 8 8C8 9.66 9.34 11 11 11C12.66 11 14 9.66 14 8C14 6.34 12.66 5 11 5Z",fill:"#a82227"})))},vi=e=>{let{t:t,userType:n=!1,infoBannerLabel:l="",infoClickLable:o="",infoClickInfoLabel:r="",infoClickInfoLabel1:a=""}=e;n=n||Digit.SessionStorage.get("userType");const u=window.Digit.Utils.browser.isMobile();return i.createElement(i.Fragment,null,i.createElement("div",{style:u?{}:{width:"80%"}},i.createElement("div",{className:"info-banner-wrap",style:{color:"#3498DB",margin:"0px"}},i.createElement("div",null,i.createElement(c.InfoBannerIcon,null),i.createElement("h2",{style:{color:"#3498DB"}},t(l))),t(o)+" ",i.createElement(di,{style:{display:"inline",marginBottom:"5px"}})," "+t(r),i.createElement("div",null," "+t(a)))))},pi=e=>{var t,n,r,a,u,s,d;let{wsAdditionalDetails:v}=e;const{t:p}=o.useTranslation(),[f,m]=l.useState(!1),[E,_]=l.useState({}),g=e=>i.createElement("h1",{className:"heading-m"},e.label),h=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),S=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(h,null));return i.createElement(l.Fragment,null,i.createElement("div",{style:{lineHeight:"19px",maxWidth:"950px",minWidth:"280px"}},null!=v&&null!==(t=v.additionalDetails)&&void 0!==t&&t.isViewBreakup?i.createElement("div",{onClick:e=>(()=>{var e;let t=v.additionalDetails.data||{};const n=sessionStorage.getItem("Digit.ADHOC_BILL_ADD_REBATE_DATA"),l=n?JSON.parse(n):{};null!=l&&null!==(e=l.value)&&void 0!==e&&e.totalAmount&&(t=null==l?void 0:l.value),_(t),m(!0)})(),style:{marginTop:"12px"}},i.createElement("span",{style:{cursor:"pointer",color:"#a82227"}},p("WS_PAYMENT_VIEW_BREAKUP"))):null,f&&i.createElement(c.Modal,{headerBarMain:i.createElement(g,{label:p("WS_CALCULATION_BREAKUP")}),headerBarEnd:i.createElement(S,{onClick:()=>{m(!1)}}),hideSubmit:!0,popupStyles:{overflowY:"auto"},headerBarMainStyle:{marginBottom:"0px"},popupModuleMianStyles:{paddingTop:"0px"}},i.createElement(c.StatusTable,{style:{padding:"10px",paddingTop:"0px"}},i.createElement(c.CardSectionHeader,{style:{margin:"10px 0px"}},p("WS_APPLICATION_FEE_HEADER")),null==E||null===(n=E.billSlabData)||void 0===n||null===(r=n.FEE)||void 0===r?void 0:r.map(e=>i.createElement(c.Row,{className:"border-none",rowContainerStyle:{margin:"0px"},labelStyle:{width:"50%"},key:""+(null==e?void 0:e.taxHeadCode),label:""+p(""+(null==e?void 0:e.taxHeadCode)),text:i.createElement("span",null,"₹",Number(null==e?void 0:e.amount)||0),textStyle:{textAlign:"right"}})),i.createElement("hr",{style:{color:"#cccccc",backgroundColor:"#cccccc",marginBottom:"10px"}}),i.createElement(c.Row,{className:"border-none",rowContainerStyle:{margin:"0px"},labelStyle:{width:"50%"},key:"PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT1",label:""+p("PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT"),text:i.createElement("span",null,"₹",Number(null==E?void 0:E.fee)||0),textStyle:{textAlign:"right",fontWeight:"700",fontSize:"24px"}}),i.createElement(c.CardSectionHeader,{style:{margin:"10px 0px"}},p("WS_SERVICE_FEE_HEADER")),null==E||null===(a=E.billSlabData)||void 0===a||null===(u=a.CHARGES)||void 0===u?void 0:u.map(e=>i.createElement(c.Row,{className:"border-none",rowContainerStyle:{margin:"0px"},labelStyle:{width:"50%"},key:""+(null==e?void 0:e.taxHeadCode),label:""+p(""+(null==e?void 0:e.taxHeadCode)),text:i.createElement("span",null,"₹",Number(null==e?void 0:e.amount)||0),textStyle:{textAlign:"right"}})),i.createElement("hr",{style:{color:"#cccccc",backgroundColor:"#cccccc",marginBottom:"10px"}}),i.createElement(c.Row,{className:"border-none",rowContainerStyle:{margin:"0px"},labelStyle:{width:"50%"},key:"PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT2",label:""+p("PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT"),text:i.createElement("span",null,"₹",Number(null==E?void 0:E.charge)||0),textStyle:{textAlign:"right",fontWeight:"700",fontSize:"24px"}}),null==E||null===(s=E.billSlabData)||void 0===s||null===(d=s.TAX)||void 0===d?void 0:d.map(e=>i.createElement(c.Row,{className:"border-none",rowContainerStyle:{margin:"0px"},labelStyle:{width:"50%"},key:""+(null==e?void 0:e.taxHeadCode),label:""+p(""+(null==e?void 0:e.taxHeadCode)),text:i.createElement("span",null,"₹",Number(null==e?void 0:e.amount)||0),textStyle:{textAlign:"right"}})),i.createElement("hr",{style:{color:"#cccccc",backgroundColor:"#cccccc",marginBottom:"10px"}}),i.createElement(c.Row,{className:"border-none",rowContainerStyle:{margin:"0px"},labelStyle:{width:"50%"},key:"PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT3",label:""+p("PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT"),text:i.createElement("span",null,"₹",Number(null==E?void 0:E.totalAmount)||0),textStyle:{textAlign:"right",fontWeight:"700",fontSize:"24px"}})))))},fi={root:{width:"100%",marginTop:"2px",overflowX:"auto",boxShadow:"none"},table:{minWidth:700,backgroundColor:"rgba(250, 250, 250, var(--bg-opacity))"},cell:{maxWidth:"7em",minWidth:"1em",border:"1px solid #e8e7e6",padding:"4px 5px",fontSize:"0.8em",textAlign:"left",lineHeight:"1.5em"},cellHeader:{overflow:"hidden",textOverflow:"ellipsis"},cellLeft:{},cellRight:{}},mi=e=>{let{className:t="table",headers:n=[],values:l=[],arrears:r=0}=e;const{t:a}=o.useTranslation();return i.createElement(i.Fragment,null,i.createElement("div",{style:fi.root},i.createElement("table",{className:"table-fixed-column-common-pay",style:fi.table},i.createElement("thead",null,i.createElement("tr",null,i.createElement("th",{style:s({},fi.cell,fi.cellLeft,fi.cellHeader)},a("CS_BILL_PERIOD")),n.map((e,t)=>i.createElement("th",{style:s({},fi.cell,n.length==t+1?fi.cellRight:{},fi.cellHeader),key:t},a(e))))),i.createElement("tbody",null,Object.values(l).map((e,t)=>i.createElement("tr",{key:t},i.createElement("td",{style:s({},fi.cell,fi.cellLeft),component:"th",scope:"row"},Object.keys(l)[t]),n.map((t,l)=>i.createElement("td",{style:s({},fi.cell,{textAlign:"left"},n.length==l+1?fi.cellRight:{},{whiteSpace:"pre"}),key:l,numeric:!0},l>1&&"₹",e[t]&&e[t].value||"0")))),i.createElement("tr",null,i.createElement("td",{style:s({},fi.cell,fi.cellLeft)}),n.map((e,t)=>t==n.length-1?i.createElement("td",{style:s({},fi.cell,fi.cellRight,{textAlign:"left",fontWeight:"700",whiteSpace:"pre"}),key:t,numeric:!0},r):t==n.length-2?i.createElement("td",{style:s({},fi.cell,{textAlign:"left"}),key:t,numeric:!0},a("COMMON_ARREARS_TOTAL")):i.createElement("td",{style:fi.cell,key:t,numeric:!0})))))))},Ei={buttonStyle:{display:"flex",justifyContent:"flex-end",color:"#a82227"},headerStyle:{marginTop:"10px",fontSize:"16px",fontWeight:"700",lineHeight:"24px",color:" rgba(11, 12, 12, var(--text-opacity))"}},_i=e=>{var t,n,r;let{bill:a={}}=e;const{t:u}=o.useTranslation();let c={},s=(null==a||null===(t=a.billDetails)||void 0===t?void 0:t.sort((e,t)=>t.fromPeriod-e.fromPeriod))||[];s=[...s];const d=(null===(n=s)||void 0===n?void 0:n.reduce((e,t,n)=>0===n?e:e+t.amount,0))||0;let v="₹ "+((null==d||null===(r=d.toFixed)||void 0===r?void 0:r.call(d,0))||Number(0).toFixed(0));s.shift(),s.map(e=>{let t=function(e){var t,n,l;void 0===e&&(e={});let i={};const{billAccountDetails:o=[]}=e;return o.map(e=>{i[e.taxHeadCode]={value:e.amount,order:e.order}}),i.CS_BILL_NO={value:(null===(t=e)||void 0===t?void 0:t.billNumber)||"NA",order:-2},i.CS_BILL_DUEDATE={value:(null===(n=e)||void 0===n?void 0:n.expiryDate)&&new Date(null===(l=e)||void 0===l?void 0:l.expiryDate).toLocaleDateString()||"NA",order:-1},i.TL_COMMON_TOTAL_AMT={value:e.amount,order:10},i}(e);c[((e,t)=>{const n=new Date(e),l=new Date(t);return l.getYear()-n.getYear()!=0?"FY"+(n.getYear()+1900)+"-"+(l.getYear()-100):n.toLocaleDateString()+"-"+l.toLocaleDateString()})(e.fromPeriod,e.toPeriod)]=t});let p={};!c||Object.keys(c).map((e,t)=>{Object.keys(c[e]).map(t=>{p[t]=c[e]&&c[e][t]&&c[e][t].order||0})});let f=[];f=Object.keys(p),f.sort((e,t)=>p[e]-p[t]);const[m,E]=l.useState(!1);return 0==d||d<0?i.createElement("span",null):i.createElement(i.Fragment,null,i.createElement("div",{style:Ei.headerStyle},u("CS_ARREARS_DETAILS")),m&&i.createElement(mi,{headers:[...f],values:c,arrears:v}),!m&&i.createElement("div",{style:Ei.buttonStyle},i.createElement("button",{type:"button",onClick:()=>{E(!0)}},u("CS_SHOW_CARD"))),m&&i.createElement("div",{style:Ei.buttonStyle},i.createElement("button",{type:"button",onClick:()=>{E(!1)}},u("CS_HIDE_CARD"))))},gi=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),hi=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(gi,null)),Si=e=>{let{t:n,closeModal:l}=e;console.log(" ----- Renew POP coming "),Digit.Hooks.sv.useCreateDemand();const o=r.useHistory();return i.createElement(i.Fragment,null,i.createElement(t.Modal,{headerBarMain:i.createElement(e=>i.createElement("h1",{className:"heading-m"},e.label),{label:"SV_WANT_TO_EDIT"}),headerBarEnd:i.createElement(hi,{onClick:l}),actionCancelLabel:n("CS_COMMON_BACK"),actionCancelOnSubmit:l,hideSubmit:!0,formId:"modal-action"},i.createElement(t.Card,{style:{boxShadow:"none"}},i.createElement("div",{style:{display:"flex",justifyContent:"center",gap:"20px",flexDirection:"column",alignItems:"center"}},i.createElement(t.SubmitBar,{label:n("SV_YES_PROCEED_WITH_APPLICATION"),onSubmit:()=>{o.push("renew-application/info")}}),i.createElement(t.SubmitBar,{label:n("SV_NO_PROCEED_PAYEMNT"),onSubmit:()=>{console.log(" testing coming compilter"),o.push("renew-application/check/makePayment")}})))))};function yi(e){var t,n,a,u,s,d,v,p,f,m,E,g,h,S,y;let{applicationDetails:b,workflowDetails:T,isDataLoading:C,applicationData:A,timelineStatusPrefix:D,showTimeLine:N=!0,statusAttribute:I="status",paymentsList:w,oldValue:O,isInfoLabel:x=!1}=e;const{t:R}=o.useTranslation(),L=(r.useHistory(),r.useLocation()),[P,k]=l.useState(!1),[M,F]=l.useState(null);new URLSearchParams(L.search);let{id:B}=r.useParams();const U=null==b||null===(t=b.applicationData)||void 0===t?void 0:t.owners;function W(e,t,n){var l;window.open(null==n||null===(l=n.fullImage)||void 0===l?void 0:l[0],"_blank")}console.log("ownersSequences:- ",U);const[j,H]=l.useState({}),[z,V]=l.useState({loading:!1,loaded:!1,canLoad:!1});"ACTIVE"!=(null==A?void 0:A.status)||z.loading||z.loaded||z.canLoad||V({loading:!1,loaded:!1,canLoad:!0}),null==z||!z.canLoad||z.loading||z.loaded||(V({loading:!0,loaded:!1,canLoad:!0}),function(e,t,n,l){try{Promise.resolve(Digit.PTService.assessmentSearch({tenantId:e,filters:{propertyIds:t}})).then(function(i){function o(){n(r),l({loading:!1,loaded:!0,canLoad:!0})}let r={};const a=function(n){if((null==i||null===(n=i.Assessments)||void 0===n?void 0:n.length)>0)return Promise.resolve(Digit.PaymentService.fetchBill(e,{businessService:"PT",consumerCode:t})).then(function(e){r=e})}();return a&&a.then?a.then(o):o()})}catch(e){return Promise.reject(e)}}((null==A?void 0:A.tenantId)||tenantId,null==A?void 0:A.propertyId,H,V));const G=e=>{if(null==e||null==e||""==e)return"NA";const t=new Date(e);let n=t.getMonth()+1,l=t.getDate();return n=(n>9?"":"0")+n,l=(l>9?"":"0")+l,l+"/"+n+"/"+t.getFullYear()},K=function(e,t,n){if(void 0===t&&(t=0),"OPEN"===e.state||"INITIATED"===e.status&&!window.location.href.includes("/obps/")){var l;const e={date:G(null==A||null===(l=A.auditDetails)||void 0===l?void 0:l.createdTime),source:(null==A?void 0:A.channel)||""};return i.createElement(ii,{data:e})}if(window.location.href.includes("/obps/")||window.location.href.includes("/noc/")||window.location.href.includes("/ws/")){var o,r,a,u,c,s,d,v,p,f,m,E,g,h,S,y,T,C;const l={uuid:null==e||null===(o=e.assignes)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.uuid,fieldName:"mobileNumber",model:"User",showValue:!1,loadData:{serviceName:"/egov-workflow-v2/egov-wf/process/_search",requestBody:{},requestParam:{tenantId:null==b?void 0:b.tenantId,businessIds:null==b?void 0:b.applicationNo,history:!0},jsonPath:"ProcessInstances[0].assignes[0].mobileNumber",isArray:!1,d:e=>{let n="";return n="+91 "+_.get(e,"ProcessInstances["+t+"].assignes[0].mobileNumber"),n}}},D=n&&n[t-1]&&(null==n?void 0:n[t-1]),N={date:null==e||null===(a=e.auditDetails)||void 0===a?void 0:a.lastModified,name:null==e||null===(u=e.assignes)||void 0===u||null===(c=u[0])||void 0===c?void 0:c.name,mobileNumber:(null==A||null===(s=A.processInstance)||void 0===s||null===(d=s.assignes)||void 0===d||null===(v=d[0])||void 0===v?void 0:v.uuid)===(null==e||null===(p=e.assignes)||void 0===p||null===(f=p[0])||void 0===f?void 0:f.uuid)&&null!=A&&null!==(m=A.processInstance)&&void 0!==m&&null!==(E=m.assignes)&&void 0!==E&&null!==(g=E[0])&&void 0!==g&&g.mobileNumber?null==A||null===(h=A.processInstance)||void 0===h||null===(S=h.assignes)||void 0===S||null===(y=S[0])||void 0===y?void 0:y.mobileNumber:null==e||null===(T=e.assignes)||void 0===T||null===(C=T[0])||void 0===C?void 0:C.mobileNumber,comment:R(e&&(null==e?void 0:e.comment)),wfComment:D?D&&D.wfComment:[],thumbnailsToShow:null==e?void 0:e.thumbnailsToShow};return i.createElement(ii,{data:N,OpenImage:W,privacy:l})}{var D,N,I,w,O;const t={date:G(null==A||null===(D=A.auditDetails)||void 0===D?void 0:D.lastModifiedTime),name:null==e||null===(N=e.assignes)||void 0===N||null===(I=N[0])||void 0===I?void 0:I.name,wfComment:null==e?void 0:e.wfComment,mobileNumber:null==e||null===(w=e.assignes)||void 0===w||null===(O=w[0])||void 0===O?void 0:O.mobileNumber,thumbnailsToShow:null==e?void 0:e.thumbnailsToShow};return i.createElement(ii,{data:t,OpenImage:W})}},q=(e,t)=>e?t?e:R(e):R("NA"),Y=window.location.href.includes("employee/tl")||window.location.href.includes("employee/obps")||window.location.href.includes("employee/noc"),X=window.location.href.includes("employee/noc"),Z=window.location.href.includes("employee/obps"),$=(window.location.href.includes("employee/ws"),()=>window.location.href.includes("employee/obps")||window.location.href.includes("employee/noc")||Y?{justifyContent:"space-between",fontSize:"16px",lineHeight:"19px",color:"#0B0C0C"}:{}),Q=e=>{if(null!=e&&e.isTimeValue&&null!=e&&e.value){const t=e.value,[n,l]=t.split(":").map(e=>parseInt(e,10));if(!isNaN(n)&&!isNaN(l)){const e=n>=12?"PM":"AM";return(n%12||12)+":"+String(l).padStart(2,"0")+" "+e}return e.value}return null!=e&&e.skip?e.value:null!=e&&e.isUnit?null!=e&&e.value?q(null==e?void 0:e.value,null==e?void 0:e.isNotTranslated)+" "+R(null==e?void 0:e.isUnit):R("N/A"):null!=e&&e.value?q(null==e?void 0:e.value,null==e?void 0:e.isNotTranslated):R("N/A")},[J,ee]=l.useState(!1);return i.createElement(c.Card,{style:{position:"relative"},className:"employeeCard-override"},x?i.createElement(vi,{t:R,userType:!1,infoBannerLabel:"CS_FILE_APPLICATION_INFO_LABEL",infoClickLable:"WS_CLICK_ON_LABEL",infoClickInfoLabel:window.location.href.includes("disconnection")||window.location.href.includes("application")?"WS_DISCONNECTION_CLICK_ON_INFO_LABEL":"WS_CLICK_ON_INFO_LABEL",infoClickInfoLabel1:window.location.href.includes("disconnection")||window.location.href.includes("application")?"WS_DISCONNECTION_CLICK_ON_INFO1_LABEL":""}):null,null==b||null===(n=b.applicationDetails)||void 0===n?void 0:n.map((e,t)=>{var n,l,o,a,u,s,d,v,p,f,m,E,_,g,h,S,y,C,A,D,N,I,x,L,P,M,U,W,H,z,V,G,K,q,J,ee,te,ne,le;return i.createElement(i.Fragment,{key:t},i.createElement("div",{style:window.location.href.includes("employee/obps")||window.location.href.includes("employee/noc")||window.location.href.includes("employee/ws")?{lineHeight:"19px",maxWidth:"950px",minWidth:"280px"}:Y?{lineHeight:"19px",maxWidth:"600px",minWidth:"280px"}:{}},0!==t||e.asSectionHeader?i.createElement(i.Fragment,null,i.createElement(c.CardSectionHeader,{style:0==t&&Y?{marginBottom:"16px",fontSize:"24px"}:{marginBottom:"16px",marginTop:"32px",fontSize:"24px"}},X?""+R(e.title):R(e.title),null!=e&&e.Component?i.createElement(e.Component,null):null)):i.createElement(c.CardSubHeader,{style:{marginBottom:"16px",fontSize:"24px"}},R(e.title)),(null==e?void 0:e.isTable)&&i.createElement("table",{style:{tableLayout:"fixed",width:"100%",borderCollapse:"collapse",borderCollapse:"collapse",border:"1px solid black"}},i.createElement("tr",{style:{textAlign:"left"}},null==e?void 0:e.headers.map(e=>i.createElement("th",{style:{padding:"10px",paddingLeft:"5px",border:"1px solid black"}},R(e)))),null==e?void 0:e.tableRows.map((t,n)=>i.createElement("tr",null,t.map((t,l)=>Array.isArray(t)&&t.length>1&&!0===e.isMaintenance?i.createElement("td",{style:{paddingTop:"20px",textAlign:"left",border:"1px solid black",verticalAlign:"middle"},key:l},i.createElement("div",{style:{display:"flex",flexWrap:"nowrap",gap:"5px"}},t.map((e,t)=>i.createElement("a",{key:t,onClick:()=>{Digit.UploadServices.Filefetch([e.fileStoreId],Digit.ULBService.getStateId()).then(e=>{var t,n,l;console.log("Response of file:",e);const i=null==e||null===(t=e.data)||void 0===t||null===(n=t.fileStoreIds)||void 0===n||null===(l=n[0])||void 0===l?void 0:l.url;if(i){const e=i.split(",")[0];e?window.open(e,"_blank"):console.error("No valid URL found to open!")}else console.error("URL is missing in the response!")}).catch(e=>{console.error("Error fetching file:",e)})},rel:"noopener noreferrer",style:{marginRight:"5px",display:"inline-block",cursor:"pointer"}},i.createElement(c.PDFSvg,{style:{width:"25px",height:"25px"}}))))):i.createElement("td",{key:l,style:{paddingTop:"20px",textAlign:"left",border:"1px solid black",verticalAlign:"middle"}},console.log("Comming Maintainaince data row:- ",t.data),t&&!0===t.editButton?i.createElement("span",{style:{display:"inline-flex",gap:"10px",alignItems:"center"}},i.createElement(r.Link,{to:{pathname:"/digit-ui/employee/asset/assetservice/maintenance-edit/"+B,state:{data:t.data}}},i.createElement("button",null," ",i.createElement(c.EditIcon,null)," ")),i.createElement("div",{key:n,onClick:()=>(F(t.data),void k(!0)),style:{cursor:"pointer"}},i.createElement(c.ViewsIcon,null))):R(t)))))),i.createElement(c.StatusTable,{style:window.location.href.includes("employee/obps")||window.location.href.includes("employee/noc")||Y?{position:"relative",marginTop:"19px"}:{}},(null==e?void 0:e.title)&&!(null!=e&&e.title.includes("NOC"))&&(null==e||null===(n=e.values)||void 0===n?void 0:n.map((t,n)=>{var l,o,a;return!0===t.map&&"N/A"!==t.value?i.createElement(c.Row,{labelStyle:{wordBreak:"break-all"},textStyle:{wordBreak:"break-all"},key:R(t.title),label:R(t.title),text:i.createElement("img",{src:R(t.value),alt:"",privacy:null==t?void 0:t.privacy})}):1==(null==t?void 0:t.isLink)?i.createElement(c.Row,{key:R(t.title),label:window.location.href.includes("tl")||window.location.href.includes("ws")?i.createElement("div",{style:{width:"200%"}},i.createElement(r.Link,{to:null==t?void 0:t.to},i.createElement("span",{className:"link",style:{color:"#a82227"}},R(null==t?void 0:t.title)))):X||Z?""+R(t.title):R(t.title),text:i.createElement("div",null,i.createElement(r.Link,{to:null==t?void 0:t.to},i.createElement("span",{className:"link",style:{color:"#a82227"}},null==t?void 0:t.value))),last:n===(null==e||null===(a=e.values)||void 0===a?void 0:a.length)-1,caption:t.caption,className:"border-none",rowContainerStyle:$(),labelStyle:{wordBreak:"break-all"},textStyle:{wordBreak:"break-all"}}):i.createElement("div",null,window.location.href.includes("modify")?i.createElement(c.Row,{className:"border-none",key:""+t.title,label:""+R(""+t.title),privacy:null==t?void 0:t.privacy,text:null!=t&&t.oldValue?null==t?void 0:t.oldValue:null!=t&&t.value?null==t?void 0:t.value:"",labelStyle:{wordBreak:"break-all"},textStyle:{wordBreak:"break-all"}}):i.createElement(c.Row,{key:R(t.title),label:R(t.title),text:Q(t),last:n===(null==e||null===(l=e.values)||void 0===l?void 0:l.length)-1,caption:t.caption,className:"border-none",privacy:null==t?void 0:t.privacy,rowContainerStyle:$(),labelStyle:{wordBreak:"break-all",fontWeight:t.isBold?"bold":"normal",fontStyle:t.isBold?"italic":"normal"},textStyle:{wordBreak:"break-all",fontWeight:t.isBold?"bold":"normal",fontStyle:t.isBold?"italic":"normal"}}),"PT_TOTAL_DUES"===t.title?i.createElement(_i,{bill:null===(o=j.Bill)||void 0===o?void 0:o[0]}):"")})))),(null==e?void 0:e.belowComponent)&&i.createElement(e.belowComponent,null),(null==e||null===(l=e.additionalDetails)||void 0===l?void 0:l.inspectionReport)&&i.createElement(ti,{scrutinyDetails:null==e?void 0:e.additionalDetails,paymentsList:w}),(null==b||null===(o=b.applicationData)||void 0===o||null===(a=o.additionalDetails)||void 0===a||null===(u=a.fieldinspection_pending)||void 0===u?void 0:u.length)>0&&(null==e||null===(s=e.additionalDetails)||void 0===s?void 0:s.fiReport)&&i.createElement(ql,{fiReport:null==b||null===(d=b.applicationData)||void 0===d||null===(v=d.additionalDetails)||void 0===v?void 0:v.fieldinspection_pending}),(null==e||null===(p=e.additionalDetails)||void 0===p?void 0:p.floors)&&i.createElement(Jl,{floors:null==e||null===(f=e.additionalDetails)||void 0===f?void 0:f.floors}),(null==e||null===(m=e.additionalDetails)||void 0===m?void 0:m.owners)&&i.createElement(ei,{owners:null==e||null===(E=e.additionalDetails)||void 0===E?void 0:E.owners}),(null==e||null===(_=e.additionalDetails)||void 0===_?void 0:_.units)&&i.createElement(ri,{units:null==e||null===(g=e.additionalDetails)||void 0===g?void 0:g.units}),(null==e||null===(h=e.additionalDetails)||void 0===h?void 0:h.accessories)&&i.createElement(oi,{units:null==e||null===(S=e.additionalDetails)||void 0===S?void 0:S.accessories}),(null==e||null===(y=e.additionalDetails)||void 0===y?void 0:y.permissions)&&(null==T||null===(C=T.data)||void 0===C||null===(A=C.nextActions)||void 0===A?void 0:A.length)>0&&i.createElement(Zl,{applicationData:null==b?void 0:b.applicationData,t:R,permissions:null==e||null===(D=e.additionalDetails)||void 0===D?void 0:D.permissions}),(null==e||null===(N=e.additionalDetails)||void 0===N?void 0:N.obpsDocuments)&&i.createElement(Gl,{t:R,applicationData:null==b?void 0:b.applicationData,docs:e.additionalDetails.obpsDocuments,bpaActionsDetails:T}),(null==e||null===(I=e.additionalDetails)||void 0===I?void 0:I.noc)&&i.createElement(Xl,{t:R,isNoc:!0,NOCdata:e.values,applicationData:null==b?void 0:b.applicationData,docs:e.additionalDetails.noc,noc:null===(x=e.additionalDetails)||void 0===x?void 0:x.data,bpaActionsDetails:T}),(null==e||null===(L=e.additionalDetails)||void 0===L?void 0:L.scruntinyDetails)&&i.createElement(ti,{scrutinyDetails:null==e?void 0:e.additionalDetails}),(null==e||null===(P=e.additionalDetails)||void 0===P?void 0:P.buildingExtractionDetails)&&i.createElement(ti,{scrutinyDetails:null==e?void 0:e.additionalDetails}),(null==e||null===(M=e.additionalDetails)||void 0===M?void 0:M.subOccupancyTableDetails)&&i.createElement(ni,{edcrDetails:null==e?void 0:e.additionalDetails,applicationData:null==b?void 0:b.applicationData}),(null==e||null===(U=e.additionalDetails)||void 0===U?void 0:U.documentsWithUrl)&&i.createElement(Vl,{documents:null==e||null===(W=e.additionalDetails)||void 0===W?void 0:W.documentsWithUrl}),(null==e||null===(H=e.additionalDetails)||void 0===H?void 0:H.documents)&&i.createElement($l,{documents:null==e||null===(z=e.additionalDetails)||void 0===z?void 0:z.documents}),(null==e||null===(V=e.additionalDetails)||void 0===V?void 0:V.taxHeadEstimatesCalculation)&&i.createElement(Ql,{taxHeadEstimatesCalculation:null==e||null===(G=e.additionalDetails)||void 0===G?void 0:G.taxHeadEstimatesCalculation}),(null==e?void 0:e.isWaterConnectionDetails)&&i.createElement(ai,{wsAdditionalDetails:e,oldValue:O}),(null==e||null===(K=e.additionalDetails)||void 0===K?void 0:K.redirectUrl)&&i.createElement("div",{style:{fontSize:"16px",lineHeight:"24px",fontWeight:"400",padding:"10px 0px"}},i.createElement(r.Link,{to:null==e||null===(q=e.additionalDetails)||void 0===q||null===(J=q.redirectUrl)||void 0===J?void 0:J.url},i.createElement("span",{className:"link",style:{color:"#a82227"}},null==e||null===(ee=e.additionalDetails)||void 0===ee||null===(te=ee.redirectUrl)||void 0===te?void 0:te.title))),(null==e||null===(ne=e.additionalDetails)||void 0===ne?void 0:ne.estimationDetails)&&i.createElement(si,{wsAdditionalDetails:e,workflowDetails:T}),(null==e||null===(le=e.additionalDetails)||void 0===le?void 0:le.estimationDetails)&&i.createElement(pi,{wsAdditionalDetails:e,workflowDetails:T}))}),N&&(null==T||null===(a=T.data)||void 0===a||null===(u=a.timeline)||void 0===u?void 0:u.length)>0&&i.createElement(i.Fragment,null,i.createElement(c.BreakLine,null),((null==T?void 0:T.isLoading)||C)&&i.createElement(c.Loader,null),!(null!=T&&T.isLoading)&&!C&&i.createElement(l.Fragment,null,i.createElement("div",{id:"timeline"},i.createElement(c.CardSectionHeader,{style:{marginBottom:"16px",marginTop:"32px"}},R("ES_APPLICATION_DETAILS_APPLICATION_TIMELINE")),null!=T&&null!==(s=T.data)&&void 0!==s&&s.timeline&&1===(null==T||null===(d=T.data)||void 0===d||null===(v=d.timeline)||void 0===v?void 0:v.length)?i.createElement(c.CheckPoint,{isCompleted:!0,label:R(""+D+(null==T||null===(p=T.data)||void 0===p||null===(f=p.timeline[0])||void 0===f?void 0:f.state)),customChild:K(null==T||null===(m=T.data)||void 0===m?void 0:m.timeline[0],null==T||null===(E=T.data)||void 0===E?void 0:E.timeline)}):i.createElement(c.ConnectingCheckPoints,null,(null==T||null===(g=T.data)||void 0===g?void 0:g.timeline)&&(null==T||null===(h=T.data)||void 0===h?void 0:h.timeline.slice(0,J?null==T?void 0:T.data.timeline.length:2).map((e,t,n)=>{var l;let o="";var r,a,u,s,d,v;return window.location.href.includes("/obps/")&&(o=null!=T&&null!==(r=T.data)&&void 0!==r&&null!==(a=r.timeline[t-1])&&void 0!==a&&null!==(u=a.state)&&void 0!==u&&u.includes("BACK_FROM")||null!=T&&null!==(s=T.data)&&void 0!==s&&null!==(d=s.timeline[t-1])&&void 0!==d&&null!==(v=d.state)&&void 0!==v&&v.includes("SEND_TO_CITIZEN")?"_NOT_DONE":"SEND_TO_ARCHITECT"===(null==e?void 0:e.performedAction)?"_BY_ARCHITECT_DONE":0==t?"":"_DONE"),i.createElement(i.Fragment,{key:t},i.createElement(c.CheckPoint,{keyValue:t,isCompleted:0===t,info:e.comment,label:R(""+D+("REOPEN"===(null==e?void 0:e.performedAction)?null==e?void 0:e.performedAction:null==e?void 0:e[I])+o),customChild:K(e,t,null==T||null===(l=T.data)||void 0===l?void 0:l.timeline)}))}))),(null==T||null===(S=T.data)||void 0===S||null===(y=S.timeline)||void 0===y?void 0:y.length)>2&&i.createElement(c.LinkButton,{label:R(J?"COLLAPSE":"VIEW_TIMELINE"),onClick:()=>{ee(e=>!e)}})))),i.createElement("div",null,P&&i.createElement(Si,{t:R,closeModal:()=>setRnewButton(!1),actionCancelOnSubmit:()=>setRnewButton(!1),application:application})))}function bi(e){var t,n,l,o,r,a,u,s,d,v,p,f,m,E,_,g,h,S;let{t:y,showToast:b,closeToast:T,businessService:C}=e;if(null!=C&&C.includes("NewTL")||null!=C&&C.includes("TL")||null!=C&&C.includes("EDITRENEWAL")){var A;let e="";switch(null==b||null===(A=b.action)||void 0===A?void 0:A.action){case"SENDBACK":e="error"===(null==b?void 0:b.key)?null==b||null===(t=b.error)||void 0===t?void 0:t.message:y("TL_SENDBACK_CHECKLIST_MESSAGE_HEAD");break;case"FORWARD":e="error"===(null==b?void 0:b.key)?null==b||null===(n=b.error)||void 0===n?void 0:n.message:y("TL_FORWARD_SUCCESS_MESSAGE_MAIN");break;case"APPROVE":e="error"===(null==b?void 0:b.key)?null==b||null===(l=b.error)||void 0===l?void 0:l.message:y("TL_APPROVAL_CHECKLIST_MESSAGE_HEAD");break;case"SENDBACKTOCITIZEN":e="error"===(null==b?void 0:b.key)?null==b||null===(o=b.error)||void 0===o?void 0:o.message:y("TL_SENDBACK_TOCITIZEN_CHECKLIST_MESSAGE_HEAD");break;case"REJECT":e="error"===(null==b?void 0:b.key)?null==b||null===(r=b.error)||void 0===r?void 0:r.message:y("TL_APPROVAL_REJ_MESSAGE_HEAD");break;case"RESUBMIT":e="error"===(null==b?void 0:b.key)?null==b||null===(a=b.error)||void 0===a?void 0:a.message:y("TL_APPLICATION_RESUBMIT_SUCCESS_MESSAGE_MAIN");break;case"CANCEL":e="error"===(null==b?void 0:b.key)?null==b||null===(u=b.error)||void 0===u?void 0:u.message:y("TL_TL_CANCELLED_MESSAGE_HEAD");break;default:e="error"===(null==b?void 0:b.key)?null==b||null===(s=b.error)||void 0===s?void 0:s.message:y("ES_"+C+"_"+(null==b||null===(d=b.action)||void 0===d?void 0:d.action)+"_UPDATE_SUCCESS")}return i.createElement(i.Fragment,null,b&&i.createElement(c.Toast,{error:"error"===b.key,label:e,onClose:T}))}if(null!=C&&C.includes("BPA")||null!=C&&C.includes("BPA_LOW")||null!=C&&C.includes("BPA_OC")){var D;const e=function(e){var t;void 0===e&&(e=[]);let n=e[0];return n=2==(null===(t=e)||void 0===t?void 0:t.length)&&null!=C&&C.includes("BPA_OC")?y(e[1]):y(e[0]),n};let t="";switch(null==b||null===(D=b.action)||void 0===D?void 0:D.action){case"REVOCATE":t="error"===(null==b?void 0:b.key)?null==b||null===(v=b.error)||void 0===v?void 0:v.message:e(["BPA_APPROVAL_REVOCATED_MESSAGE_HEAD","BPA_APPROVAL_OC_REVOCATED_MESSAGE_HEAD"]);break;case"VERIFY_AND_FORWARD":t="error"===(null==b?void 0:b.key)?null==b||null===(p=b.error)||void 0===p?void 0:p.message:e(["BPA_FORWARD_SUCCESS_MESSAGE_MAIN"]);break;case"SEND_BACK_TO_CITIZEN":t="error"===(null==b?void 0:b.key)?null==b||null===(f=b.error)||void 0===f?void 0:f.message:e(["BPA_SENDBACK_SUCCESS_MESSAGE_MAIN"]);break;case"APPROVE":t="error"===(null==b?void 0:b.key)?null==b||null===(m=b.error)||void 0===m?void 0:m.message:e(["BPA_APPROVAL_CHECKLIST_MESSAGE_HEAD"]);break;case"REJECT":t="error"===(null==b?void 0:b.key)?null==b||null===(E=b.error)||void 0===E?void 0:E.message:e(["BPA_APPROVAL_REJECTED_MESSAGE_HEAD","BPA_OC_APPROVAL_REJECTED_MESSAGE_HEAD"]);break;case"FORWARD":t="error"===(null==b?void 0:b.key)?null==b||null===(_=b.error)||void 0===_?void 0:_.message:e(["BPA_FORWARD_SUCCESS_MESSAGE_MAIN"]);break;case"SEND_BACK_FOR_DOCUMENT_VERIFICATION":case"SEND_BACK_FOR_FIELD_INSPECTION":t="error"===(null==b?void 0:b.key)?null==b||null===(g=b.error)||void 0===g?void 0:g.message:e(["BPA_SENDBACK_SUCCESS_MESSAGE_MAIN"]);break;default:t="error"===(null==b?void 0:b.key)?null==b||null===(h=b.error)||void 0===h?void 0:h.message:y("ES_"+C+"_"+(null==b||null===(S=b.action)||void 0===S?void 0:S.action)+"_UPDATE_SUCCESS")}return i.createElement(i.Fragment,null,b&&i.createElement(c.Toast,{error:"error"===b.key,label:t,onClose:T}))}{var N,I;const e="error"===(null==b?void 0:b.key)?null==b||null===(N=b.error)||void 0===N?void 0:N.message:"ES_"+C+"_"+(null==b||null===(I=b.action)||void 0===I?void 0:I.action)+"_UPDATE_SUCCESS";return i.createElement(i.Fragment,null,b&&i.createElement(c.Toast,{error:"error"===b.key,label:y(e),onClose:T}))}}function Ti(e){var t,n,r,a,u,d,v,p,f,m,E,_,g,h,S,y,b,T,C;let{workflowDetails:A,displayMenu:D,onActionSelect:N,setDisplayMenu:I,businessService:w,forcedActionPrefix:O,ActionBarStyle:x={},MenuStyle:R={},isAction:L,applicationDetails:P}=e;const{t:k}=o.useTranslation();let M=Digit.UserService.getUser();const F=l.useRef();if(window.location.href.includes("/obps")||window.location.href.includes("/noc")){const e=sessionStorage.getItem("Digit.citizen.userRequestObject"),t=e?JSON.parse(e):{};M=null==t?void 0:t.value}const B=null===(t=M)||void 0===t||null===(n=t.info)||void 0===n||null===(r=n.roles)||void 0===r?void 0:r.map(e=>e.code);let U=!1,W=!1,j=(null==A||null===(a=A.data)||void 0===a||null===(u=a.actionState)||void 0===u||null===(d=u.nextActions)||void 0===d?void 0:d.filter(e=>(null==B?void 0:B.some(t=>{var n;return null===(n=e.roles)||void 0===n?void 0:n.includes(t)}))||!e.roles))||(null==A||null===(v=A.data)||void 0===v||null===(p=v.nextActions)||void 0===p?void 0:p.filter(e=>(null==B?void 0:B.some(t=>{var n;return null===(n=e.roles)||void 0===n?void 0:n.includes(t)}))||!e.roles));Digit.Hooks.useClickOutside(F,()=>{I(!1)},D),(window.location.href.includes("/obps")||window.location.href.includes("/noc"))&&1==(null==j?void 0:j.length)||null!=j&&null!==(f=j[0])&&void 0!==f&&null!==(m=f.redirectionUrl)&&void 0!==m&&m.pathname.includes("/pt/property-details/")&&1==(null==j?void 0:j.length)?(W=!1,U=!0):(null==j?void 0:j.length)>0&&(W=!0,U=!1);const H=Digit.SessionStorage.get("User"),z=null==H||null===(E=H.info)||void 0===E?void 0:E.uuid,V=null==P||null===(_=P.applicationData)||void 0===_||null===(g=_.auditDetails)||void 0===g?void 0:g.lastModifiedBy;return i.createElement(i.Fragment,null,!(null!=A&&A.isLoading)&&W&&!U&&!L&&i.createElement(c.ActionBar,{style:s({},x)},D&&(null!=A&&null!==(h=A.data)&&void 0!==h&&null!==(S=h.actionState)&&void 0!==S&&S.nextActions||null!=A&&null!==(y=A.data)&&void 0!==y&&y.nextActions)?i.createElement(c.Menu,{localeKeyPrefix:O||"WF_EMPLOYEE_"+(null==w?void 0:w.toUpperCase()),options:j,optionKey:"action",t:k,onSelect:N,style:R}):null,"ewst"===w?V===z||null==V?i.createElement(c.SubmitBar,{ref:F,label:k("WF_TAKE_ACTION"),onSubmit:()=>I(!D)}):i.createElement(c.CardLabel,{style:{color:"red",font:"30px",fontWeight:"bold"}},""+k("EW_ALERT_ANOTHER_VENDOR")):i.createElement(c.SubmitBar,{ref:F,label:k("WF_TAKE_ACTION"),onSubmit:()=>I(!D)})),!(null!=A&&A.isLoading)&&!W&&U&&!L&&i.createElement(c.ActionBar,{style:s({},x)},i.createElement("button",{style:{color:"#FFFFFF",fontSize:"18px"},className:"submit-bar",name:null==j||null===(b=j[0])||void 0===b?void 0:b.action,value:null==j||null===(T=j[0])||void 0===T?void 0:T.action,onClick:e=>{N((null==j?void 0:j[0])||{})}},k((O||"WF_EMPLOYEE_"+(null==w?void 0:w.toUpperCase()))+"_"+(null==j||null===(C=j[0])||void 0===C?void 0:C.action)))))}const Ci=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Ai=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Ci,null));function Di(e){let{action:t,closeWarningPopup:n}=e;const{t:l}=o.useTranslation(),r=window.Digit.Utils.browser.isMobile();return i.createElement(i.Fragment,null,i.createElement(c.Modal,{headerBarMain:i.createElement("h1",{className:"heading-m"},l("PT_DUES_ARE_PENDING")),headerBarEnd:i.createElement(Ai,{onClick:()=>{n()}}),hideSubmit:!0,isDisabled:!1,popupStyles:r?{}:{width:"29%",marginTop:"auto"}},i.createElement(c.Card,null,i.createElement("div",{style:{marginBottom:"30px"}},i.createElement("h1",null,l("PT_YOU_HAVE")," ₹",null==t?void 0:t.AmountDueForPay," ",l("PT_DUE_WARNING_MSG2"))),i.createElement(c.Row,{rowContainerStyle:{display:"flex"},labelStyle:{fontSize:"24px",fontWeight:"700",marginRight:"10%"},textStyle:{fontSize:"24px",fontWeight:"700",marginBottom:"20px"},label:""+l("PT_AMOUNT_DUE"),text:"₹"+l(null==t?void 0:t.AmountDueForPay)}),i.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"flex-end"}},i.createElement(c.ButtonSelector,{theme:"border",label:l("ES_PT_COMMON_CANCEL"),onSubmit:n,style:{marginLeft:"10px"}}),i.createElement(c.ButtonSelector,{label:l("PT_COLLECT"),onSubmit:()=>{var e;return window.location.assign(""+window.location.origin+(null==t||null===(e=t.redirectionUrl)||void 0===e?void 0:e.pathname))},style:{marginLeft:"10px"}})))),")")}const Ni=e=>{var t;const n=Digit.ULBService.getCurrentTenantId(),u=Digit.ULBService.getStateId(),{t:d}=o.useTranslation(),v=r.useHistory();let{id:p}=r.useParams();const[f,m]=l.useState(!1),[E,_]=l.useState(null),[g,h]=l.useState(!1),[S,y]=l.useState(!1),[b,T]=l.useState(!1),{applicationDetails:C,showToast:A,setShowToast:D,isLoading:N,isDataLoading:I,applicationData:w,mutate:O,nocMutation:x,workflowDetails:R,id:L,businessService:P,closeToast:k,moduleCode:M,timelineStatusPrefix:F,forcedActionPrefix:B,statusAttribute:U,ActionBarStyle:W,MenuStyle:j,paymentsList:H,showTimeLine:z=!0,oldValue:V,isInfoLabel:G=!1,clearDataDetails:K,isAction:q=!1}=e;l.useEffect(()=>{A&&R.revalidate()},[A]);const Y=a.useQueryClient(),X=()=>{_(null),h(!1)};return N||S?i.createElement(c.Loader,null):i.createElement(i.Fragment,null,N?i.createElement(c.Loader,null):i.createElement(i.Fragment,null,i.createElement(yi,{applicationDetails:C,id:L,workflowDetails:R,isDataLoading:I,applicationData:w,businessService:P,timelineStatusPrefix:F,statusAttribute:U,paymentsList:H,showTimeLine:z,oldValue:V,isInfoLabel:G}),g?i.createElement(zl,{t:d,vending_Zone:(null==e?void 0:e.vending_Zone)||[],UserVendingZone:(null==e?void 0:e.UserVendingZone)||"",UserVendingZoneCode:(null==e?void 0:e.UserVendingZoneCode)||"",action:E,tenantId:n,state:u,id:p,applicationDetails:C,applicationData:null==C?void 0:C.applicationData,closeModal:X,submitAction:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n={});try{let l=!1;const i=function(i,o,r,a,u,c,p,f,m,E,_,g){if(0!=(null==e||null===(i=e.Property)||void 0===i||null===(o=i.workflow)||void 0===o||null===(r=o.comment)||void 0===r?void 0:r.length)&&0!=(null==e||null===(a=e.Licenses)||void 0===a||null===(u=a[0])||void 0===u||null===(c=u.comment)||void 0===c?void 0:c.length)&&0!=(null==e||null===(p=e.WaterConnection)||void 0===p||null===(f=p.comment)||void 0===f?void 0:f.length)&&0!=(null==e||null===(m=e.SewerageConnection)||void 0===m||null===(E=m.comment)||void 0===E?void 0:E.length)&&0!=(null==e||null===(_=e.BPA)||void 0===_||null===(g=_.comment)||void 0===g?void 0:g.length)){function h(t){if(l)return t;sessionStorage.setItem("updateData",JSON.stringify(e)),O&&(y(!0),O(e,{onError:(e,t)=>{y(!1),D({key:"error",error:e}),setTimeout(k,5e3)},onSuccess:(e,t)=>{var l,i,o,r,a,u,c,s,p,f,m,E;sessionStorage.removeItem("WS_SESSION_APPLICATION_DETAILS"),y(!1),null!==(l=n)&&void 0!==l&&l.bpa&&v.replace("/digit-ui/employee/obps/response",{data:e}),null!==(i=n)&&void 0!==i&&i.isStakeholder&&v.push("/digit-ui/employee/obps/stakeholder-response",{data:e}),null!==(o=n)&&void 0!==o&&o.isNoc&&v.push("/digit-ui/employee/noc/response",{data:e}),(null==e||null===(r=e.Amendments)||void 0===r?void 0:r.length)>0?null!=t&&null!==(a=t.AmendmentUpdate)&&void 0!==a&&null!==(u=a.workflow)&&void 0!==u&&u.action.includes("SEND_BACK")?D({key:"success",label:d("ES_MODIFYSWCONNECTION_SEND_BACK_UPDATE_SUCCESS")}):null!=t&&null!==(c=t.AmendmentUpdate)&&void 0!==c&&null!==(s=c.workflow)&&void 0!==s&&s.action.includes("RE-SUBMIT")?D({key:"success",label:d("ES_MODIFYSWCONNECTION_RE_SUBMIT_UPDATE_SUCCESS")}):null!=t&&null!==(p=t.AmendmentUpdate)&&void 0!==p&&null!==(f=p.workflow)&&void 0!==f&&f.action.includes("APPROVE")?D({key:"success",label:d("ES_MODIFYSWCONNECTION_APPROVE_UPDATE_SUCCESS")}):null!=t&&null!==(m=t.AmendmentUpdate)&&void 0!==m&&null!==(E=m.workflow)&&void 0!==E&&E.action.includes("REJECT")&&D({key:"success",label:d("ES_MODIFYWSCONNECTION_REJECT_UPDATE_SUCCESS")}):(K&&setTimeout(K,3e3),setTimeout(k,5e3),Y.clear(),Y.refetchQueries("APPLICATION_SEARCH"))}})),X()}y(!0),"function"==typeof(null==e?void 0:e.customFunctionToExecute)&&(null==e||e.customFunctionToExecute(s({},e)));const i=function(){if(!1!==t&&x){var e;const n=null===(e=t)||void 0===e?void 0:e.map(e=>null==x?void 0:x.mutateAsync(e)),i=qe(function(){return y(!0),Promise.resolve(Promise.all(n)).then(function(e){e&&e.map(e=>{var t,n;Digit.SessionStorage.del(null==e||null===(t=e.Noc)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.nocType)})})},function(e){var t,n,i,o,r,a,u,c,s,v,p,f;y(!1);let m=null!=e&&null!==(t=e.response)&&void 0!==t&&null!==(n=t.data)&&void 0!==n&&null!==(i=n.Errors)&&void 0!==i&&null!==(o=i[0])&&void 0!==o&&o.code?d(null==e||null===(r=e.response)||void 0===r||null===(a=r.data)||void 0===a||null===(u=a.Errors)||void 0===u||null===(c=u[0])||void 0===c?void 0:c.code):(null==e||null===(s=e.response)||void 0===s||null===(v=s.data)||void 0===v||null===(p=v.Errors)||void 0===p||null===(f=p[0])||void 0===f?void 0:f.message)||e;X(),D({key:"error",error:{message:m}}),setTimeout(k,5e3),l=!0});if(i&&i.then)return i.then(function(){})}}();return i&&i.then?i.then(h):h(i)}alert("Please fill in the comments before submitting")}();return Promise.resolve(i&&i.then?i.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},actionData:null==R||null===(t=R.data)||void 0===t?void 0:t.timeline,businessService:P,workflowDetails:R,moduleCode:M}):null,b?i.createElement(Di,{action:E,workflowDetails:R,businessService:P,isWarningPop:b,closeWarningPopup:()=>{T(!1)}}):null,i.createElement(bi,{t:d,showToast:A,closeToast:k,businessService:P}),i.createElement(Ti,{isAction:q,workflowDetails:R,displayMenu:f,onActionSelect:function(e){if(sessionStorage.setItem("SELECTED_ACTION",null==e?void 0:e.action),e)if(null!=e&&e.isToast)D({key:"error",error:{message:null==e?void 0:e.toastMessage}}),setTimeout(k,5e3);else if(null!=e&&e.isWarningPopUp)T(!0);else if(null!=e&&e.redirectionUrll){var t,n,l,i,o;if("ACTIVATE_CONNECTION"===(null==e||null===(t=e.redirectionUrll)||void 0===t?void 0:t.action))v.push(""+(null==e||null===(l=e.redirectionUrll)||void 0===l?void 0:l.pathname),JSON.stringify({data:null==e||null===(i=e.redirectionUrll)||void 0===i?void 0:i.state,url:""+(null===(o=location)||void 0===o?void 0:o.pathname)+location.search}));else if("RE-SUBMIT-APPLICATION"===(null==e||null===(n=e.redirectionUrll)||void 0===n?void 0:n.action)){var r,a;v.push(""+(null==e||null===(r=e.redirectionUrll)||void 0===r?void 0:r.pathname),{data:null==e||null===(a=e.redirectionUrll)||void 0===a?void 0:a.state})}else{var u;window.location.assign(window.location.origin+"/digit-ui/employee/payment/collect/"+(null==e||null===(u=e.redirectionUrll)||void 0===u?void 0:u.pathname))}}else if(null!=e&&e.redirectionUrl){var c,d;v.push({pathname:null===(c=e.redirectionUrl)||void 0===c?void 0:c.pathname,state:s({},null===(d=e.redirectionUrl)||void 0===d?void 0:d.state)})}else h(!0);_(e),m(!1)},setDisplayMenu:m,businessService:P,forcedActionPrefix:B,ActionBarStyle:W,MenuStyle:j,applicationDetails:C})))};var Ii=i.memo(()=>{var e,n,a,u;const{t:c}=o.useTranslation(),s=(Digit.Hooks.useStore.getInitData(),Digit.ULBService.getCurrentTenantId()),{id:d}=r.useParams(),[v,p]=l.useState(null),[f,m]=l.useState({}),[E,_]=l.useState(!1),[g,h]=l.useState("watertanker"),S=null==d?void 0:d.startsWith("WT"),y=null==d?void 0:d.startsWith("TP"),b=S?"watertanker":y?"treePruning":"mobileToilet",T=Digit.UserService.getUser().info;sessionStorage.setItem(S?"wt":y?"tp":"mt",d);const{isLoading:C,data:A}=S?Digit.Hooks.wt.useWTApplicationDetail(c,s,d):y?Digit.Hooks.wt.useTPApplicationDetail(c,s,d):Digit.Hooks.wt.useMTApplicationDetail(c,s,d),{mutate:D}=S?Digit.Hooks.wt.useWTApplicationAction(s):y?Digit.Hooks.wt.useTPApplicationAction(s):Digit.Hooks.wt.useMTApplicationAction(s);let N=Digit.Hooks.useWorkflowDetails({tenantId:(null==A||null===(e=A.applicationData)||void 0===e?void 0:e.tenantId)||s,id:null==A||null===(n=A.applicationData)||void 0===n||null===(a=n.applicationData)||void 0===a?void 0:a.bookingNo,moduleCode:b,role:S?["WT_CEMP"]:y?["TP_CEMP"]:["MT_CEMP"]});l.useEffect(()=>{A&&m(Ue.cloneDeep(A))},[A]),l.useEffect(()=>{var e,t,n,l,i;null!=N&&null!==(e=N.data)&&void 0!==e&&e.applicationBusinessService&&!("watertanker"===(null==N||null===(t=N.data)||void 0===t?void 0:t.applicationBusinessService)&&"watertanker"===b||"mobileToilet"===(null==N||null===(n=N.data)||void 0===n?void 0:n.applicationBusinessService)&&"mobileToilet"===b||"treePruning"===(null==N||null===(l=N.data)||void 0===l?void 0:l.applicationBusinessService)&&"treePruning"===b)&&h(null==N||null===(i=N.data)||void 0===i?void 0:i.applicationBusinessService)},[N.data]);let I=[];return i.createElement("div",{style:{padding:"CITIZEN"===(null==T?void 0:T.type)?"0 15px":""}},i.createElement("div",{className:"employee-application-details",style:{marginBottom:"15px"}},i.createElement(t.Header,{styles:{marginLeft:"0px",paddingTop:"10px",fontSize:"32px"}},c("BOOKING_DETAILS")),i.createElement("div",{style:{zIndex:"10",display:"flex",flexDirection:"row-reverse",alignItems:"center",marginTop:"-25px"}},I&&I.length>0&&i.createElement(t.MultiLink,{className:"multilinkWrapper employee-mulitlink-main-div",onHeadClick:()=>_(!E),displayOptions:E,options:I,downloadBtnClassName:"employee-download-btn-className",optionsClassName:"employee-options-btn-className"}))),i.createElement(Ni,{applicationDetails:null==f?void 0:f.applicationData,isLoading:C,isDataLoading:C,applicationData:null==f||null===(u=f.applicationData)||void 0===u?void 0:u.applicationData,mutate:D,workflowDetails:N,businessService:b,moduleCode:"request-service",showToast:v,setShowToast:p,closeToast:()=>{p(null)},timelineStatusPrefix:"",forcedActionPrefix:"RS",statusAttribute:"state",MenuStyle:{color:"#FFFFFF",fontSize:"18px"}}))});const wi=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Oi=e=>{let{onClick:t}=e;return i.createElement("div",{className:"icon-bg-secondary",onClick:t},i.createElement(wi,null))},xi=e=>i.createElement("h1",{className:"heading-m"},e.t("SERVICE_TYPE")),Ri=e=>e.substr(0,1).toUpperCase()+e.substr(1),Li=function(e,t,n){try{var l,i,o,r,a,u,c,s,d,v,p,E,_,g;return Promise.resolve({t:n,tenantId:null==t?void 0:t.code,name:n(null==t?void 0:t.i18nKey)+" "+(h=n("ULBGRADE_"+(null==t||null===(l=t.city)||void 0===l?void 0:l.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))),h.toLowerCase().split(" ").map(Ri).join(" ")),email:null==t?void 0:t.emailId,phoneNumber:null==t?void 0:t.contactNumber,applicationNumber:null==e?void 0:e.bookingNo,isTOCRequired:!1,heading:n("MT_ACKNOWLEDGEMENT"),details:[{title:n("MT_APPLICANT_DETAILS"),asSectionHeader:!0,values:[{title:n("MT_APPLICANT_NAME"),value:null==e||null===(i=e.applicantDetail)||void 0===i?void 0:i.name},{title:n("MT_MOBILE_NUMBER"),value:null==e||null===(o=e.applicantDetail)||void 0===o?void 0:o.mobileNumber},{title:n("MT_ALT_MOBILE_NUMBER"),value:null==e||null===(r=e.applicantDetail)||void 0===r?void 0:r.alternateNumber},{title:n("MT_EMAIL_ID"),value:null==e||null===(a=e.applicantDetail)||void 0===a?void 0:a.emailId}].filter(e=>e.value)},{title:n("WT_ADDRESS_DETAILS"),asSectionHeader:!0,values:[{title:n("WT_PINCODE"),value:null==e||null===(u=e.address)||void 0===u?void 0:u.pincode},{title:n("WT_CITY"),value:null==e||null===(c=e.address)||void 0===c?void 0:c.city},{title:n("WT_LOCALITY"),value:null==e||null===(s=e.address)||void 0===s?void 0:s.locality},{title:n("WT_STREET_NAME"),value:null==e||null===(d=e.address)||void 0===d?void 0:d.streetName},{title:n("WT_DOOR_NO"),value:null==e||null===(v=e.address)||void 0===v?void 0:v.doorNo},{title:n("WT_HOUSE_NO"),value:null==e||null===(p=e.address)||void 0===p?void 0:p.houseNo},{title:n("WT_ADDRESS_LINE1"),value:null==e||null===(E=e.address)||void 0===E?void 0:E.addressLine1},{title:n("WT_ADDRESS_LINE2"),value:null==e||null===(_=e.address)||void 0===_?void 0:_.addressLine2},{title:n("WT_LANDMARK"),value:null==e||null===(g=e.address)||void 0===g?void 0:g.landmark}].filter(e=>e.value)},{title:n("MT_REQUEST_DETAILS"),asSectionHeader:!0,values:[{title:n("MT_NUMBER_OF_MOBILE_TOILETS"),value:null==e?void 0:e.noOfMobileToilet},{title:n("MT_DELIVERY_FROM_DATE"),value:m(null==e?void 0:e.deliveryFromDate)},{title:n("MT_DELIVERY_TO_DATE"),value:m(null==e?void 0:e.deliveryToDate)},{title:n("MT_REQUIREMENT_TIME"),value:f(null==e?void 0:e.deliveryFromTime)+" - "+f(null==e?void 0:e.deliveryToTime)},{title:n("MT_SPECIAL_REQUEST"),value:null==e?void 0:e.description}].filter(e=>e.value)}]})}catch(e){return Promise.reject(e)}var h},Pi=e=>{console.log("GetActionMessage",e);const{t:t}=o.useTranslation();return e.isSuccess?t("MT_SUBMIT_SUCCESSFULL"):e.isLoading?t("MT_APPLICATION_PENDING"):e.isSuccess?void 0:t("MT_APPLICATION_FAILED")},ki={padding:"4px 0px",justifyContent:"space-between"},Mi=e=>{var n,l;return console.log("BannerPicker",e),i.createElement(t.Banner,{message:Pi(e),applicationNumber:null===(n=e.data)||void 0===n||null===(l=n.mobileToiletBookingDetail)||void 0===l?void 0:l.bookingNo,info:e.isSuccess?e.t("MT_BOOKING_NO"):"",successful:e.isSuccess,style:{width:"100%"}})},Fi=e=>e.substr(0,1).toUpperCase()+e.substr(1),Bi=function(e,t,n){try{var l,i,o,r,a,u,c,s,d,v,p,f,m,E;return Promise.resolve({t:n,tenantId:null==t?void 0:t.code,name:n(null==t?void 0:t.i18nKey)+" "+(_=n("ULBGRADE_"+(null==t||null===(l=t.city)||void 0===l?void 0:l.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))),_.toLowerCase().split(" ").map(Fi).join(" ")),email:null==t?void 0:t.emailId,phoneNumber:null==t?void 0:t.contactNumber,applicationNumber:null==e?void 0:e.bookingNo,isTOCRequired:!1,heading:n("TP_ACKNOWLEDGEMENT"),details:[{title:n("MT_APPLICANT_DETAILS"),asSectionHeader:!0,values:[{title:n("MT_APPLICANT_NAME"),value:null==e||null===(i=e.applicantDetail)||void 0===i?void 0:i.name},{title:n("MT_MOBILE_NUMBER"),value:null==e||null===(o=e.applicantDetail)||void 0===o?void 0:o.mobileNumber},{title:n("MT_ALT_MOBILE_NUMBER"),value:null==e||null===(r=e.applicantDetail)||void 0===r?void 0:r.alternateNumber},{title:n("MT_EMAIL_ID"),value:null==e||null===(a=e.applicantDetail)||void 0===a?void 0:a.emailId}].filter(e=>e.value)},{title:n("WT_ADDRESS_DETAILS"),asSectionHeader:!0,values:[{title:n("WT_PINCODE"),value:null==e||null===(u=e.address)||void 0===u?void 0:u.pincode},{title:n("WT_CITY"),value:null==e||null===(c=e.address)||void 0===c?void 0:c.city},{title:n("WT_LOCALITY"),value:null==e||null===(s=e.address)||void 0===s?void 0:s.locality},{title:n("WT_STREET_NAME"),value:null==e||null===(d=e.address)||void 0===d?void 0:d.streetName},{title:n("WT_DOOR_NO"),value:null==e||null===(v=e.address)||void 0===v?void 0:v.doorNo},{title:n("WT_HOUSE_NO"),value:null==e||null===(p=e.address)||void 0===p?void 0:p.houseNo},{title:n("WT_ADDRESS_LINE1"),value:null==e||null===(f=e.address)||void 0===f?void 0:f.addressLine1},{title:n("WT_ADDRESS_LINE2"),value:null==e||null===(m=e.address)||void 0===m?void 0:m.addressLine2},{title:n("WT_LANDMARK"),value:null==e||null===(E=e.address)||void 0===E?void 0:E.landmark}].filter(e=>e.value)},{title:n("TP_REQUEST_DETAILS"),asSectionHeader:!0,values:[{title:n("REASON_FOR_PRUNING"),value:n(null==e?void 0:e.reasonForPruning)},{title:n("LATITUDE_GEOTAG"),value:null==e?void 0:e.latitude},{title:n("LONGITUDE_GEOTAG"),value:null==e?void 0:e.longitude}].filter(e=>e.value)}]})}catch(e){return Promise.reject(e)}var _},Ui=e=>{const{t:t}=o.useTranslation();return e.isSuccess?t("TP_SUBMIT_SUCCESSFULL"):e.isLoading?t("TP_APPLICATION_PENDING"):e.isSuccess?void 0:t("TP_APPLICATION_FAILED")},Wi={padding:"4px 0px",justifyContent:"space-between"},ji=e=>{var n,l;return console.log("BannerPicker",e),i.createElement(t.Banner,{message:Ui(e),applicationNumber:null===(n=e.data)||void 0===n||null===(l=n.treePruningBookingDetail)||void 0===l?void 0:l.bookingNo,info:e.isSuccess?e.t("TP_BOOKING_NO"):"",successful:e.isSuccess,style:{width:"100%"}})},Hi=["tenantId","payments"],zi=["tenantId","payments"],Vi={ApplicantDetails:t.ApplicantDetails,AddressDetails:t.AddressDetails,WTCreate:()=>{var e,n,l,u,c,d,p,f;const m=a.useQueryClient(),E=r.useRouteMatch(),{t:_}=o.useTranslation(),{pathname:g}=r.useLocation(),h=r.useHistory();let S=[];const[y,b,T]=Digit.Hooks.useSessionStorage("WT_Create",{});function C(e,t,n,l,i){if(void 0===i&&(i=!1),"owners"===e){let n=y.owners||[];n[l]=t,b(s({},y,{[e]:[...n]}))}else if("units"===e){let e=y.units||[];e=t,b(s({},y,{units:e}))}else b(s({},y,{[e]:s({},y[e],t)}));((e,t,n,l)=>{let i,o=g.split("/").pop(),r=o.charAt(o.length-1),a=!1;Number(parseInt(o))||"0"==o||"-1"==o?"-1"==o||"-2"==o?(o=g.slice(0,-3),o=o.split("/").pop(),a=!0):(o=g.slice(0,-2),o=o.split("/").pop(),a=!0):a=!1,isNaN(r)||(a=!0);let{nextStep:u={}}=S.find(e=>e.route===o),c=h.push;if(e&&(c=h.replace),n&&(u=l),"request-details"===u){var s,d;const e=null==y||null===(s=y.serviceType)||void 0===s||null===(d=s.serviceType)||void 0===d?void 0:d.code;"MobileToilet"===e?u="toiletRequest-details":"TREE_PRUNING"===e&&(u="treePruningRequest-details")}if(null===u)return c(E.path+"/check");i=isNaN(u.split("/").pop())&&a&&"map"!==u?E.path+"/"+u+"/"+t:E.path+"/"+u,c(i)})(n,l,i,e)}y.serviceType&&0!==Object.keys(y.serviceType).length||!g.includes("employee")||(g.includes("mt")?(console.log("MT Create"),b({serviceType:{serviceType:{code:"MobileToilet",i18nKey:"Mobile Toilet",value:"Mobile Toilet"}}})):g.includes("tp")?b({serviceType:{serviceType:{code:"TREE_PRUNING",i18nKey:"Tree Pruning",value:"Tree Pruning"}}}):b({serviceType:{serviceType:{code:"WT",i18nKey:"Water Tanker",value:"Water Tanker"}}})),y&&Object.keys(y).length>0&&window.location.href.includes("/service-type")&&"true"!==sessionStorage.getItem("docReqScreenByBack")&&(T(),m.invalidateQueries("WT_Create"));const A=()=>{T(),m.invalidateQueries("WT_Create")};v.forEach(e=>{S=S.concat(e.body.filter(e=>!e.hideInCitizen))}),S.indexRoute=g.includes("citizen")?"service-type":"info";const D=null===(e=Digit)||void 0===e||null===(n=e.ComponentRegistryService)||void 0===n?void 0:n.getComponent("WTCheckPage"),N=null===(l=Digit)||void 0===l||null===(u=l.ComponentRegistryService)||void 0===u?void 0:u.getComponent("WTAcknowledgement"),I=null===(c=Digit)||void 0===c||null===(d=c.ComponentRegistryService)||void 0===d?void 0:d.getComponent("MTAcknowledgement"),w=null===(p=Digit)||void 0===p||null===(f=p.ComponentRegistryService)||void 0===f?void 0:f.getComponent("TPAcknowledgement");return i.createElement(i.Fragment,null,i.createElement(t.Timeline,{config:S}),i.createElement(r.Switch,null,S.map((e,t)=>{const{component:n,texts:l,inputs:o,key:a,additionaFields:u}=e,c="string"==typeof n?Digit.ComponentRegistryService.getComponent(n):n;return i.createElement(r.Route,{path:E.path+"/"+e.route,key:t},i.createElement(c,{config:{texts:l,inputs:o,key:a,additionaFields:u},onSelect:C,t:_,formData:y}))}),i.createElement(r.Route,{path:E.path+"/check"},i.createElement(D,{onSubmit:function(){try{var e,t,n,l,i,o;return"WT"===(null==y||null===(e=y.serviceType)||void 0===e||null===(t=e.serviceType)||void 0===t?void 0:t.code)&&h.push(E.path+"/wt-acknowledgement"),"MobileToilet"===(null==y||null===(n=y.serviceType)||void 0===n||null===(l=n.serviceType)||void 0===l?void 0:l.code)&&h.push(E.path+"/mt-acknowledgement"),"TREE_PRUNING"===(null==y||null===(i=y.serviceType)||void 0===i||null===(o=i.serviceType)||void 0===o?void 0:o.code)&&h.push(E.path+"/tp-acknowledgement"),Promise.resolve()}catch(e){return Promise.reject(e)}},value:y})),i.createElement(r.Route,{path:E.path+"/wt-acknowledgement"},i.createElement(N,{data:y,onSuccess:A})),i.createElement(r.Route,{path:E.path+"/mt-acknowledgement"},i.createElement(I,{data:y,onSuccess:A})),i.createElement(r.Route,{path:E.path+"/tp-acknowledgement"},i.createElement(w,{data:y,onSuccess:A})),i.createElement(r.Route,null,i.createElement(r.Redirect,{to:E.path+"/"+S.indexRoute}))))},InfoPage:e=>{var n,o;let{t:r,onSelect:a,formData:u,config:c}=e;const[d,v]=l.useState(""),[p,f]=l.useState(!1),[m,E]=l.useState(!1),_={MobileToilet:"MT_MODULE",WT:"WT_MODULE",TREE_PRUNING:"TREE_PRUNING"}[null==u||null===(n=u.serviceType)||void 0===n||null===(o=n.serviceType)||void 0===o?void 0:o.code],g=()=>{const e=s({},u.infodetails||{},{existingDataSet:d});a(c.key,s({},u[c.key],e))};return i.createElement(i.Fragment,null,i.createElement(t.Card,null,_&&i.createElement(t.CardHeader,null,r(_)),i.createElement("div",null,i.createElement(t.CardText,{className:"primaryColor"},r("SV_DOC_REQ_SCREEN_SUB_HEADER")),i.createElement(t.CardText,{className:"primaryColor"},r("SV_DOC_REQ_SCREEN_TEXT")),i.createElement(t.CardText,{className:"primaryColor"},r("SV_DOC_REQ_SCREEN_SUB_TEXT"))),i.createElement("span",null,i.createElement(t.SubmitBar,{label:r("COMMON_NEXT"),onSubmit:()=>{m?f(!0):g()}}))),p&&i.createElement(A,{t:r,closeModal:()=>f(!1),actionCancelOnSubmit:()=>f(!1),onSubmit:()=>{g(),f(!1)},setExistingDataSet:v}))},RequestDetails:e=>{var n,o,r,a,u,c,d,v;let{t:p,config:f,onSelect:m,formData:E}=e;const _=Digit.UserService.getUser().info;let g={};const[h,S]=l.useState((null==E||null===(n=E.requestDetails)||void 0===n?void 0:n.tankerType)||""),[y,b]=l.useState((null==E||null===(o=E.requestDetails)||void 0===o?void 0:o.tankerQuantity)||""),[T,C]=l.useState((null==E||null===(r=E.requestDetails)||void 0===r?void 0:r.waterQuantity)||""),[A,D]=l.useState((null==E||null===(a=E.requestDetails)||void 0===a?void 0:a.waterType)||""),[N,I]=l.useState((null==E||null===(u=E.requestDetails)||void 0===u?void 0:u.deliveryDate)||""),[w,O]=l.useState((null==E||null===(c=E.requestDetails)||void 0===c?void 0:c.description)||""),[x,R]=l.useState((null==E||null===(d=E.requestDetails)||void 0===d?void 0:d.deliveryTime)||""),[L,P]=l.useState((null==E||null===(v=E.requestDetails)||void 0===v?void 0:v.extraCharge)||!1),k=Digit.ULBService.getStateId(),M={width:"EMPLOYEE"===_.type?"50%":"100%"},{data:F}=Digit.Hooks.useCustomMDMS(k,"request-service",[{name:"VehicleType"}],{select:e=>{var t;return null==e||null===(t=e["request-service"])||void 0===t?void 0:t.VehicleType}}),{data:B}=Digit.Hooks.useCustomMDMS(k,"request-service",[{name:"TankerType"}],{select:e=>{var t;return null==e||null===(t=e["request-service"])||void 0===t?void 0:t.TankerType}}),{data:U}=Digit.Hooks.useCustomMDMS(k,"request-service",[{name:"TankerQuantity"}],{select:e=>{var t;return null==e||null===(t=e["request-service"])||void 0===t?void 0:t.TankerQuantity}}),{data:W}=Digit.Hooks.useCustomMDMS(k,"Request-service",[{name:"WaterType"}],{select:e=>{var t;return null==e||null===(t=e["Request-service"])||void 0===t?void 0:t.WaterType}});let j=[],H=[],z=[],V=[];W&&W.map(e=>{V.push({i18nKey:""+e.code,code:""+e.code,value:""+e.code})}),U&&U.map(e=>{H.push({i18nKey:""+e.code,code:""+e.code,value:""+e.code})}),F&&F.map(e=>{j.push({i18nKey:""+e.capacity,code:""+e.capacity,value:""+e.capacity,vehicleType:e.vehicleType,capacityName:e.capacityName})}),B&&B.map(e=>{z.push({i18nKey:""+e.i18nKey,code:""+e.code,value:""+e.value})});const G=j.map(e=>{if(h.code===e.vehicleType)return{i18nKey:e.capacityName,code:e.code,value:e.capacityName}}).filter(e=>void 0!==e),K=()=>i.createElement("div",{className:"flex items-center"},i.createElement(t.TextInput,{type:"time",value:x,style:M,onChange:e=>R(e.target.value),min:"06:00",max:"23:59"}));return l.useEffect(()=>{!h&&null!=z&&z.length&&S(z[0])},[z]),i.createElement(i.Fragment,null,i.createElement(t.FormStep,{config:f,onSelect:()=>{let e=s({},E.requestDetails,{tankerType:h,deliveryDate:N,tankerQuantity:y,waterType:A,waterQuantity:T,deliveryTime:x,description:w,extraCharge:L});m(f.key,e,!1)},t:p,isDisabled:!(h&&N&&y&&T&&x&&w&&A)},i.createElement("div",null,i.createElement(t.CardLabel,null,""+p("WT_TANKER_TYPE")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.RadioButtons,{t:p,options:z,style:{display:"flex",flexWrap:"wrap",maxHeight:"30px"},innerStyles:{minWidth:"24%"},optionsKey:"i18nKey",name:"tankerType",value:h,selectedOption:h,onSelect:S,labelKey:"i18nKey",isPTFlow:!0}),i.createElement(t.CardLabel,null,""+p("WT_WATER_TYPE")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.Dropdown,{className:"form-field",selected:A,placeholder:p("WT_SELECT_WATER_TYPE"),select:D,option:V,style:M,optionKey:"i18nKey",t:p}),i.createElement(t.CardLabel,null,""+p("WT_WATER_QUANTITY")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.Dropdown,{className:"form-field",selected:T,placeholder:"Select Water Quantity",select:C,option:G,style:M,optionKey:"i18nKey",t:p}),i.createElement(t.CardLabel,null,""+p("WT_TANKER_QUANTITY")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.Dropdown,{className:"form-field",selected:y,placeholder:"Select Tanker Quantity",select:b,option:H,style:M,optionKey:"i18nKey",t:p}),i.createElement(t.CardLabel,null,""+p("WT_DELIVERY_DATE")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.TextInput,{t:p,type:"date",isMandatory:!1,optionKey:"i18nKey",name:"deliveryDate",style:M,value:N,onChange:function(e){I(e.target.value)},min:(new Date).toISOString().split("T")[0],rules:{required:p("CORE_COMMON_REQUIRED_ERRMSG"),validDate:e=>!!/^\d{4}-\d{2}-\d{2}$/.test(e)||p("ERR_DEFAULT_INPUT_FIELD_MSG")}}),i.createElement(t.CardLabel,null,""+p("WT_DELIVERY_TIME")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(K,null),i.createElement(t.CardLabel,null,""+p("WT_DESCRIPTION")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.TextArea,s({t:p,type:"text",isMandatory:!1,optionKey:"i18nKey",name:"description",value:w,onChange:function(e){O(e.target.value)},style:M,ValidationRequired:!0},g={isRequired:!0,pattern:"^[a-zA-Z ]+$",type:"tel",title:p("PT_NAME_ERROR_MESSAGE")})),i.createElement(t.CheckBox,{label:p("WT_IMMEDIATE"),onChange:()=>{P(!L)},checked:L}))))},WTCheckPage:e=>{var n,r,a,u,c,s,d,v,E,_,g,h;let{onSubmit:S,value:y={}}=e;const{t:b}=o.useTranslation(),{owner:T,requestDetails:C,address:A,serviceType:N,toiletRequestDetails:I,treePruningRequestDetails:w}=y,[O,x]=l.useState(!1),R=null!=C&&C.extraCharge?"YES":"NO";return i.createElement(i.Fragment,null,i.createElement(t.Card,null,i.createElement(t.CardHeader,null,b("WT_SUMMARY_PAGE")),i.createElement("div",null,i.createElement(t.CardSubHeader,null,b("ES_TITILE_OWNER_DETAILS")),i.createElement(t.StatusTable,{style:{marginTop:"30px",marginBottom:"30px"}},i.createElement(t.Row,{label:b("COMMON_APPLICANT_NAME"),text:""+b(p(null==T?void 0:T.applicantName)),actionButton:i.createElement(D,{jumpTo:"/digit-ui/citizen/wt/request-service/applicant-details"})}),i.createElement(t.Row,{label:b("COMMON_MOBILE_NUMBER"),text:""+b(p(null==T?void 0:T.mobileNumber))}),i.createElement(t.Row,{label:b("COMMON_ALT_MOBILE_NUMBER"),text:""+b(p(null==T?void 0:T.alternateNumber))}),i.createElement(t.Row,{label:b("COMMON_EMAIL_ID"),text:""+b(p(null==T?void 0:T.emailId))})),i.createElement(t.CardSubHeader,null,b("ES_TITLE_ADDRESS_DETAILS")),i.createElement(t.StatusTable,{style:{marginTop:"30px",marginBottom:"30px"}},i.createElement(t.Row,{label:b("HOUSE_NO"),text:""+b(p(null==A?void 0:A.houseNo)),actionButton:i.createElement(D,{jumpTo:"/digit-ui/citizen/wt/request-service/address-details"})}),i.createElement(t.Row,{label:b("ADDRESS_LINE1"),text:""+b(p(null==A?void 0:A.addressLine1))}),i.createElement(t.Row,{label:b("ADDRESS_LINE2"),text:""+b(p(null==A?void 0:A.addressLine2))}),i.createElement(t.Row,{label:b("CITY"),text:""+b(p(null==A||null===(n=A.city)||void 0===n||null===(r=n.city)||void 0===r?void 0:r.name))}),i.createElement(t.Row,{label:b("LOCALITY"),text:""+b(p(null==A||null===(a=A.locality)||void 0===a?void 0:a.i18nKey))}),i.createElement(t.Row,{label:b("PINCODE"),text:""+b(p(null==A?void 0:A.pincode))}),i.createElement(t.Row,{label:b("LANDMARK"),text:""+b(p(null==A?void 0:A.landmark))}),i.createElement(t.Row,{label:b("STREET_NAME"),text:""+b(p(null==A?void 0:A.streetName))})),"WT"===(null==N||null===(u=N.serviceType)||void 0===u?void 0:u.code)&&i.createElement(l.Fragment,null,i.createElement(t.CardSubHeader,null,b("WT_REQUEST_DETAILS")),i.createElement(t.StatusTable,{style:{marginTop:"30px",marginBottom:"30px"}},i.createElement(t.Row,{label:b("WT_TANKER_TYPE"),text:""+b(p(null==C||null===(c=C.tankerType)||void 0===c?void 0:c.value)),actionButton:i.createElement(D,{jumpTo:"/digit-ui/citizen/wt/request-service/request-details"})}),i.createElement(t.Row,{label:b("WT_WATER_TYPE"),text:""+b(p(null==C||null===(s=C.waterType)||void 0===s?void 0:s.code))}),i.createElement(t.Row,{label:b("WT_TANKER_QUANTITY"),text:""+b(p(null==C||null===(d=C.tankerQuantity)||void 0===d?void 0:d.code))}),i.createElement(t.Row,{label:b("WT_WATER_QUANTITY"),text:""+b(p(null==C||null===(v=C.waterQuantity)||void 0===v?void 0:v.value))}),i.createElement(t.Row,{label:b("WT_DELIVERY_DATE"),text:""+b(p(m(null==C?void 0:C.deliveryDate)))}),i.createElement(t.Row,{label:b("WT_DELIVERY_TIME"),text:""+p(f(null==C?void 0:C.deliveryTime))}),i.createElement(t.Row,{label:b("WT_DESCRIPTION"),text:""+b(p(null==C?void 0:C.description))}),i.createElement(t.Row,{label:b("WT_IMMEDIATE"),text:""+b(p(R))}))),"MobileToilet"===(null==N||null===(E=N.serviceType)||void 0===E?void 0:E.code)&&i.createElement(l.Fragment,null,i.createElement(t.CardSubHeader,null,b("ES_REQUEST_DETAILS")),i.createElement(t.StatusTable,{style:{marginTop:"30px",marginBottom:"30px"}},i.createElement(t.Row,{label:b("MT_NUMBER_OF_MOBILE_TOILETS"),text:""+b(p(null==I||null===(_=I.mobileToilet)||void 0===_?void 0:_.code)),actionButton:i.createElement(D,{jumpTo:"/digit-ui/citizen/wt/request-service/toiletRequest-details"})}),i.createElement(t.Row,{label:b("MT_DELIVERY_FROM_DATE"),text:""+b(p(m(null==I?void 0:I.deliveryfromDate)))}),i.createElement(t.Row,{label:b("MT_DELIVERY_TO_DATE"),text:""+b(m(p(null==I?void 0:I.deliverytoDate)))}),i.createElement(t.Row,{label:b("MT_REQUIREMNENT_FROM_TIME"),text:p(f(null==I?void 0:I.deliveryfromTime))}),i.createElement(t.Row,{label:b("MT_REQUIREMNENT_TO_TIME"),text:p(f(null==I?void 0:I.deliverytoTime))}),i.createElement(t.Row,{label:b("MT_SPECIAL_REQUEST"),text:""+b(p(null==I?void 0:I.specialRequest))}))),"TREE_PRUNING"===(null==N||null===(g=N.serviceType)||void 0===g?void 0:g.code)&&i.createElement(l.Fragment,null,i.createElement(t.CardSubHeader,null,b("TP_REQUEST_DETAILS")),i.createElement(t.StatusTable,{style:{marginTop:"30px",marginBottom:"30px"}},i.createElement(t.Row,{label:b("REASON_FOR_PRUNING"),text:""+b(p(null==w||null===(h=w.reasonOfPruning)||void 0===h?void 0:h.code)),actionButton:i.createElement(D,{jumpTo:"/digit-ui/citizen/wt/request-service/treePruningRequest-details"})}),i.createElement(t.Row,{label:b("LOCATION_GEOTAG"),text:""+b(p(null==w?void 0:w.geoTagLocation))}),i.createElement(t.Row,{label:b("UPLOAD_THE_SITE_PHOTOGRAPH"),text:i.createElement("span",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer"},onClick:()=>{Digit.UploadServices.Filefetch([null==w?void 0:w.supportingDocumentFile],Digit.ULBService.getStateId()).then(e=>{var t,n,l;const i=null==e||null===(t=e.data)||void 0===t||null===(n=t.fileStoreIds)||void 0===n||null===(l=n[0])||void 0===l?void 0:l.url;if(i){const e=i.split(",")[0];e?window.open(e,"_blank"):console.error("No valid URL found to open!")}else console.error("URL is missing in the response!")}).catch(e=>{console.error("Error fetching file:",e)})}},i.createElement(t.GenericFileIcon,null))}))),i.createElement(t.CheckBox,{label:b("FINAL_DECLARATION_MESSAGE"),onChange:()=>{x(!O)},styles:{height:"auto",marginBottom:"30px",marginTop:"10px"}})),i.createElement(t.SubmitBar,{label:b("COMMON_BUTTON_SUBMIT"),onSubmit:S,disabled:!O})))},WTAcknowledgement:e=>{let{data:n,onSuccess:a}=e;const{t:u}=o.useTranslation(),c=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),d=Digit.Hooks.wt.useTankerCreateAPI(c),v=Digit.UserService.getUser().info,{data:p}=Digit.Hooks.useStore.getInitData(),{tenants:f}=p||{};return l.useEffect(()=>{try{n.tenantId=c;let e=(e=>{var t,n,l,i,o,r,a,u,c,s,d,v,p,f,m,E,_,g,h,S,y,b,T,C,A,D,N,I,w,O,x,R,L,P,k;return{waterTankerBookingDetail:{tenantId:null==e?void 0:e.tenantId,tankerType:null==e||null===(t=e.requestDetails)||void 0===t||null===(n=t.tankerType)||void 0===n?void 0:n.code,waterType:null==e||null===(l=e.requestDetails)||void 0===l||null===(i=l.waterType)||void 0===i?void 0:i.code,tankerQuantity:null==e||null===(o=e.requestDetails)||void 0===o||null===(r=o.tankerQuantity)||void 0===r?void 0:r.code,waterQuantity:null==e||null===(a=e.requestDetails)||void 0===a||null===(u=a.waterQuantity)||void 0===u?void 0:u.code,description:null==e||null===(c=e.requestDetails)||void 0===c?void 0:c.description,deliveryDate:null==e||null===(s=e.requestDetails)||void 0===s?void 0:s.deliveryDate,deliveryTime:null==e||null===(d=e.requestDetails)||void 0===d?void 0:d.deliveryTime,extraCharge:null!=e&&null!==(v=e.requestDetails)&&void 0!==v&&v.extraCharge?"Y":"N",addressDetailId:(null==e||null===(p=e.address)||void 0===p?void 0:p.addressDetailId)||"",applicantDetail:{name:null==e||null===(f=e.owner)||void 0===f?void 0:f.applicantName,mobileNumber:null==e||null===(m=e.owner)||void 0===m?void 0:m.mobileNumber,alternateNumber:null==e||null===(E=e.owner)||void 0===E?void 0:E.alternateNumber,emailId:null==e||null===(_=e.owner)||void 0===_?void 0:_.emailId},address:{addressType:null==e||null===(g=e.address)||void 0===g||null===(h=g.addressType)||void 0===h?void 0:h.code,pincode:null==e||null===(S=e.address)||void 0===S?void 0:S.pincode,city:null==e||null===(y=e.address)||void 0===y||null===(b=y.city)||void 0===b||null===(T=b.city)||void 0===T?void 0:T.name,cityCode:null==e||null===(C=e.address)||void 0===C||null===(A=C.city)||void 0===A||null===(D=A.city)||void 0===D?void 0:D.code,addressLine1:null==e||null===(N=e.address)||void 0===N?void 0:N.addressLine1,addressLine2:null==e||null===(I=e.address)||void 0===I?void 0:I.addressLine2,locality:null==e||null===(w=e.address)||void 0===w||null===(O=w.locality)||void 0===O?void 0:O.i18nKey,localityCode:null==e||null===(x=e.address)||void 0===x||null===(R=x.locality)||void 0===R?void 0:R.code,streetName:null==e||null===(L=e.address)||void 0===L?void 0:L.streetName,houseNo:null==e||null===(P=e.address)||void 0===P?void 0:P.houseNo,landmark:null==e||null===(k=e.address)||void 0===k?void 0:k.landmark},bookingStatus:"BOOKING_CREATED",workflow:{action:"APPLY",comments:"",businessService:"watertanker",moduleName:"request-service.water_tanker"}}}})(n);d.mutate(e,{onSuccess:a})}catch(e){}},[]),Digit.Hooks.useCustomBackNavigation({redirectPath:"${APPLICATION_PATH}/citizen"}),d.isLoading||d.isIdle?i.createElement(t.Loader,null):i.createElement(t.Card,null,i.createElement(x,{t:u,data:d.data,isSuccess:d.isSuccess,isLoading:d.isIdle||d.isLoading}),i.createElement(t.StatusTable,null,d.isSuccess&&i.createElement(t.Row,{rowContainerStyle:O,last:!0,textStyle:{whiteSpace:"pre",width:"60%"}})),d.isSuccess&&i.createElement(t.SubmitBar,{label:u("WT_DOWNLOAD_ACKNOWLEDGEMENT"),onSubmit:function(){try{var e;let t=null===(e=d.data)||void 0===e?void 0:e.waterTankerBookingDetail;const n=f.find(e=>e.code===t.tenantId);return Promise.resolve(I(s({},t),n,u)).then(function(e){Digit.Utils.pdf.generate(e)})}catch(e){return Promise.reject(e)}}}),i.createElement(r.Link,"CITIZEN"===(null==v?void 0:v.type)?{to:"/digit-ui/citizen"}:{to:"/digit-ui/employee"},i.createElement(t.LinkButton,{label:u("CORE_COMMON_GO_TO_HOME")})))},WTApplicationDetails:()=>{var e,n,a,u,c,v,p,E,_,g,h,S,y;const{t:b}=o.useTranslation(),{acknowledgementIds:T,tenantId:C}=r.useParams(),[A,D]=l.useState(!1),[N,w]=l.useState(null),{data:O}=Digit.Hooks.useStore.getInitData(),{tenants:x}=O||{},{isLoading:R,data:L,refetch:P}=Digit.Hooks.wt.useTankerSearchAPI({tenantId:C,filters:{bookingNo:T}}),k=Be(L,"waterTankerBookingDetail",[]);Be(L,"waterTankerBookingDetail[0].bookingNo",[]);let M=k&&k.length>0&&k[0]||{};const F=M;sessionStorage.setItem("wt",JSON.stringify(F));let B="N"===(null==M?void 0:M.extraCharge)?"No":"Yes";const U=Digit.Hooks.wt.useTankerCreateAPI(C,!1),{data:W,isLoading:j}=Digit.Hooks.useRecieptSearch({tenantId:C,businessService:"request-service.water_tanker",consumerCodes:T,isEmployee:!1},{enabled:!!T});let H=[];H.push({label:b("WT_DOWNLOAD_ACKNOWLEDGEMENT"),onClick:()=>z()});const z=function(){try{const e=F||{},t=x.find(t=>t.code===e.tenantId);return Promise.resolve(I(s({},e),t,b)).then(function(e){Digit.Utils.pdf.generate(e)})}catch(e){return Promise.reject(e)}};return R?i.createElement(t.Loader,null):(W&&(null==W?void 0:W.Payments.length)>0&&0==j&&H.push({label:b("WT_FEE_RECEIPT"),onClick:()=>{var e;return function(e){let{tenantId:t,payments:n}=e;d(e,He);try{function l(){return Promise.resolve(Digit.PaymentService.printReciept(t,{fileStoreIds:i})).then(function(e){window.open(e[i],"_blank")})}let e=k[0]||{},i=null==e?void 0:e.paymentReceiptFilestoreId;const o=function(){if(!i){let l={filestoreIds:[null==n?void 0:n.fileStoreId]};return Promise.resolve(Digit.PaymentService.generatePdf(t,{Payments:[s({},n)]},"request-service.water_tanker-receipt")).then(function(t){var n;l=t;const o=s({},e,{paymentReceiptFilestoreId:null===(n=l)||void 0===n?void 0:n.filestoreIds[0]});return Promise.resolve(U.mutateAsync({waterTankerBookingDetail:o})).then(function(){var e;i=null===(e=l)||void 0===e?void 0:e.filestoreIds[0],P()})})}}();return Promise.resolve(o&&o.then?o.then(l):l())}catch(e){return Promise.reject(e)}}({tenantId:null==W||null===(e=W.Payments[0])||void 0===e?void 0:e.tenantId,payments:null==W?void 0:W.Payments[0]})}}),i.createElement(i.Fragment,null,i.createElement("div",null,i.createElement("div",{className:"cardHeaderWithOptions",style:{marginRight:"auto",maxWidth:"960px"}},i.createElement(t.Header,{styles:{fontSize:"32px"}},b("WT_BOOKING_DETAILS")),H&&H.length>0&&i.createElement(t.MultiLink,{className:"multilinkWrapper",onHeadClick:()=>D(!A),displayOptions:A,options:H})),i.createElement(t.Card,null,i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:b("WT_BOOKING_NO"),text:null==M?void 0:M.bookingNo})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},b("WT_APPLICANT_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:b("WT_APPLICANT_NAME"),text:(null==M||null===(e=M.applicantDetail)||void 0===e?void 0:e.name)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_MOBILE_NUMBER"),text:(null==M||null===(n=M.applicantDetail)||void 0===n?void 0:n.mobileNumber)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_ALT_MOBILE_NUMBER"),text:(null==M||null===(a=M.applicantDetail)||void 0===a?void 0:a.alternateNumber)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_EMAIL_ID"),text:(null==M||null===(u=M.applicantDetail)||void 0===u?void 0:u.emailId)||b("CS_NA")})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},b("WT_ADDRESS_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:b("WT_PINCODE"),text:(null==M||null===(c=M.address)||void 0===c?void 0:c.pincode)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_CITY"),text:(null==M||null===(v=M.address)||void 0===v?void 0:v.city)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_LOCALITY"),text:(null==M||null===(p=M.address)||void 0===p?void 0:p.locality)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_STREET_NAME"),text:(null==M||null===(E=M.address)||void 0===E?void 0:E.streetName)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_DOOR_NO"),text:(null==M||null===(_=M.address)||void 0===_?void 0:_.doorNo)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_HOUSE_NO"),text:(null==M||null===(g=M.address)||void 0===g?void 0:g.houseNo)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_ADDRESS_LINE1"),text:(null==M||null===(h=M.address)||void 0===h?void 0:h.addressLine1)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_ADDRESS_LINE2"),text:(null==M||null===(S=M.address)||void 0===S?void 0:S.addressLine2)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_LANDMARK"),text:(null==M||null===(y=M.address)||void 0===y?void 0:y.landmark)||b("CS_NA")})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},b("ES_REQUEST_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:b("WT_TANKER_TYPE"),text:(null==M?void 0:M.tankerType)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_WATER_TYPE"),text:b(null==M?void 0:M.waterType)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_TANKER_QUANTITY"),text:(null==M?void 0:M.tankerQuantity)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_WATER_QUANTITY"),text:(null==M?void 0:M.waterQuantity)+" Ltr"||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_DELIVERY_DATE"),text:m(null==M?void 0:M.deliveryDate)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_DELIVERY_TIME"),text:f(null==M?void 0:M.deliveryTime)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_DESCRIPTION"),text:(null==M?void 0:M.description)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_IMMEDIATE"),text:B||b("CS_NA")})),i.createElement(je,{application:F,id:null==F?void 0:F.bookingNo,userType:"citizen"}),N&&i.createElement(t.Toast,{error:N.key,label:b(N.label),style:{bottom:"0px"},onClose:()=>{w(null)}})))))},MTApplicationDetails:()=>{var e,n,a,u,c,v,p,E,_,g,h,S;const{t:y}=o.useTranslation(),{acknowledgementIds:b,tenantId:T}=r.useParams(),[C,A]=l.useState(!1),[D,N]=l.useState(null),{data:I}=Digit.Hooks.useStore.getInitData(),{tenants:w}=I||{},{isLoading:O,data:x,refetch:R}=Digit.Hooks.wt.useMobileToiletSearchAPI({tenantId:T,filters:{bookingNo:b}}),L=Be(x,"mobileToiletBookingDetails",[]);Be(x,"mobileToiletBookingDetails[0].bookingNo",[]);let P=L&&L.length>0&&L[0]||{};const k=P;sessionStorage.setItem("mt",JSON.stringify(k));const M=Digit.Hooks.wt.useMobileToiletCreateAPI(T,!1),{data:F,isLoading:B}=Digit.Hooks.useRecieptSearch({tenantId:T,businessService:"request-service.mobile_toilet",consumerCodes:b,isEmployee:!1},{enabled:!!b});let U=[];if(U.push({label:y("MT_DOWNLOAD_ACKNOWLEDGEMENT"),onClick:()=>W()}),O)return i.createElement(t.Loader,null);F&&(null==F?void 0:F.Payments.length)>0&&0==B&&U.push({label:y("MT_FEE_RECEIPT"),onClick:()=>{var e;return function(e){let{tenantId:t,payments:n}=e;d(e,Hi);try{function l(){return Promise.resolve(Digit.PaymentService.printReciept(t,{fileStoreIds:i})).then(function(e){window.open(e[i],"_blank")})}let e=L[0]||{},i=null==e?void 0:e.paymentReceiptFilestoreId;const o=function(){if(!i){let l={filestoreIds:[null==n?void 0:n.fileStoreId]};return Promise.resolve(Digit.PaymentService.generatePdf(t,{Payments:[s({},n)]},"request-service.mobile_toilet-receipt")).then(function(t){var n;l=t;const o=s({},e,{paymentReceiptFilestoreId:null===(n=l)||void 0===n?void 0:n.filestoreIds[0]});return Promise.resolve(M.mutateAsync({mobileToiletBookingDetail:o})).then(function(){var e;i=null===(e=l)||void 0===e?void 0:e.filestoreIds[0],R()})})}}();return Promise.resolve(o&&o.then?o.then(l):l())}catch(e){return Promise.reject(e)}}({tenantId:null==F||null===(e=F.Payments[0])||void 0===e?void 0:e.tenantId,payments:null==F?void 0:F.Payments[0]})}});const W=function(){try{const e=k||{},t=w.find(t=>t.code===e.tenantId);return Promise.resolve(Li(s({},e),t,y)).then(function(e){Digit.Utils.pdf.generate(e)})}catch(e){return Promise.reject(e)}};return i.createElement(i.Fragment,null,i.createElement("div",null,i.createElement("div",{className:"cardHeaderWithOptions",style:{marginRight:"auto",maxWidth:"960px"}},i.createElement(t.Header,{styles:{fontSize:"32px"}},y("MT_BOOKING_DETAILS")),U.length>0&&i.createElement(t.MultiLink,{className:"multilinkWrapper",onHeadClick:()=>A(!C),displayOptions:C,options:U})),i.createElement(t.Card,null,i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:y("MT_BOOKING_NO"),text:null==P?void 0:P.bookingNo})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},y("MT_APPLICANT_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:y("MT_APPLICANT_NAME"),text:(null==P||null===(e=P.applicantDetail)||void 0===e?void 0:e.name)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_MOBILE_NUMBER"),text:(null==P||null===(n=P.applicantDetail)||void 0===n?void 0:n.mobileNumber)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_ALT_MOBILE_NUMBER"),text:(null==P||null===(a=P.applicantDetail)||void 0===a?void 0:a.alternateNumber)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_EMAIL_ID"),text:(null==P||null===(u=P.applicantDetail)||void 0===u?void 0:u.emailId)||y("CS_NA")})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},y("ES_TITLE_ADDRESS_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:y("PINCODE"),text:(null==P||null===(c=P.address)||void 0===c?void 0:c.pincode)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("CITY"),text:(null==P||null===(v=P.address)||void 0===v?void 0:v.city)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("LOCALITY"),text:(null==P||null===(p=P.address)||void 0===p?void 0:p.locality)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("STREET_NAME"),text:(null==P||null===(E=P.address)||void 0===E?void 0:E.streetName)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("HOUSE_NO"),text:(null==P||null===(_=P.address)||void 0===_?void 0:_.houseNo)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("ADDRESS_LINE1"),text:(null==P||null===(g=P.address)||void 0===g?void 0:g.addressLine1)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("ADDRESS_LINE2"),text:(null==P||null===(h=P.address)||void 0===h?void 0:h.addressLine2)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("LANDMARK"),text:(null==P||null===(S=P.address)||void 0===S?void 0:S.landmark)||y("CS_NA")})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},y("ES_REQUEST_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:y("MT_NUMBER_OF_MOBILE_TOILETS"),text:(null==P?void 0:P.noOfMobileToilet)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_DELIVERY_FROM_DATE"),text:m(null==P?void 0:P.deliveryFromDate)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_DELIVERY_TO_DATE"),text:m(null==P?void 0:P.deliveryToDate)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_REQUIREMNENT_FROM_TIME"),text:f(null==P?void 0:P.deliveryFromTime)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_REQUIREMNENT_TO_TIME"),text:f(null==P?void 0:P.deliveryToTime)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_SPECIAL_REQUEST"),text:(null==P?void 0:P.description)||y("CS_NA")})),i.createElement(je,{application:k,id:null==k?void 0:k.bookingNo,userType:"citizen"}),D&&i.createElement(t.Toast,{error:D.key,label:y(D.label),style:{bottom:"0px"},onClose:()=>{N(null)}}))))},TPApplicationDetails:()=>{var e,n,a,u,c,v,p,f,m,E,_,g;const{t:h}=o.useTranslation(),{acknowledgementIds:S,tenantId:y}=r.useParams(),[b,T]=l.useState(!1),[C,A]=l.useState(null),{data:D}=Digit.Hooks.useStore.getInitData(),{tenants:N}=D||{},{isLoading:I,data:w,refetch:O}=Digit.Hooks.wt.useTreePruningSearchAPI({tenantId:y,filters:{bookingNo:S}}),x=Be(w,"treePruningBookingDetails",[]);Be(w,"treePruningBookingDetails[0].bookingNo",[]);let R=x&&x.length>0&&x[0]||{};console.log("tp_details",R);const L=R;sessionStorage.setItem("tp",JSON.stringify(L));const P=Digit.Hooks.wt.useTreePruningCreateAPI(y,!1),{data:k,isLoading:M}=Digit.Hooks.useRecieptSearch({tenantId:y,businessService:"request-service.tree_pruning",consumerCodes:S,isEmployee:!1},{enabled:!!S});let F=[];if(F.push({label:h("TP_DOWNLOAD_ACKNOWLEDGEMENT"),onClick:()=>B()}),I)return i.createElement(t.Loader,null);k&&(null==k?void 0:k.Payments.length)>0&&0==M&&F.push({label:h("TP_FEE_RECEIPT"),onClick:()=>{var e;return function(e){let{tenantId:t,payments:n}=e;d(e,zi);try{function l(){return Promise.resolve(Digit.PaymentService.printReciept(t,{fileStoreIds:i})).then(function(e){window.open(e[i],"_blank")})}let e=x[0]||{},i=null==e?void 0:e.paymentReceiptFilestoreId;const o=function(){if(!i){let l={filestoreIds:[null==n?void 0:n.fileStoreId]};return Promise.resolve(Digit.PaymentService.generatePdf(t,{Payments:[s({},n)]},"request-service.tree_pruning-receipt")).then(function(t){var n;l=t;const o=s({},e,{paymentReceiptFilestoreId:null===(n=l)||void 0===n?void 0:n.filestoreIds[0]});return Promise.resolve(P.mutateAsync({treePruningBookingDetail:o})).then(function(){var e;i=null===(e=l)||void 0===e?void 0:e.filestoreIds[0],O()})})}}();return Promise.resolve(o&&o.then?o.then(l):l())}catch(e){return Promise.reject(e)}}({tenantId:null==k||null===(e=k.Payments[0])||void 0===e?void 0:e.tenantId,payments:null==k?void 0:k.Payments[0]})}});const B=function(){try{const e=L||{},t=N.find(t=>t.code===e.tenantId);return Promise.resolve(Bi(s({},e),t,h)).then(function(e){Digit.Utils.pdf.generate(e)})}catch(e){return Promise.reject(e)}};return i.createElement(i.Fragment,null,i.createElement("div",null,i.createElement("div",{className:"cardHeaderWithOptions",style:{marginRight:"auto",maxWidth:"960px"}},i.createElement(t.Header,{styles:{fontSize:"32px"}},h("TP_BOOKING_DETAILS")),F.length>0&&i.createElement(t.MultiLink,{className:"multilinkWrapper",onHeadClick:()=>T(!b),displayOptions:b,options:F})),i.createElement(t.Card,null,i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:h("WT_BOOKING_NO"),text:null==R?void 0:R.bookingNo})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},h("TP_APPLICANT_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:h("WT_APPLICANT_NAME"),text:(null==R||null===(e=R.applicantDetail)||void 0===e?void 0:e.name)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("WT_MOBILE_NUMBER"),text:(null==R||null===(n=R.applicantDetail)||void 0===n?void 0:n.mobileNumber)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("WT_ALT_MOBILE_NUMBER"),text:(null==R||null===(a=R.applicantDetail)||void 0===a?void 0:a.alternateNumber)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("WT_EMAIL_ID"),text:(null==R||null===(u=R.applicantDetail)||void 0===u?void 0:u.emailId)||h("CS_NA")})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},h("ES_TITLE_ADDRESS_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:h("PINCODE"),text:(null==R||null===(c=R.address)||void 0===c?void 0:c.pincode)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("CITY"),text:(null==R||null===(v=R.address)||void 0===v?void 0:v.city)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("LOCALITY"),text:(null==R||null===(p=R.address)||void 0===p?void 0:p.locality)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("STREET_NAME"),text:(null==R||null===(f=R.address)||void 0===f?void 0:f.streetName)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("HOUSE_NO"),text:(null==R||null===(m=R.address)||void 0===m?void 0:m.houseNo)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("ADDRESS_LINE1"),text:(null==R||null===(E=R.address)||void 0===E?void 0:E.addressLine1)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("ADDRESS_LINE2"),text:(null==R||null===(_=R.address)||void 0===_?void 0:_.addressLine2)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("LANDMARK"),text:(null==R||null===(g=R.address)||void 0===g?void 0:g.landmark)||h("CS_NA")})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},h("TP_REQUEST_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:h("REASON_FOR_PRUNING"),text:h(null==R?void 0:R.reasonForPruning)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("LATITUDE_GEOTAG"),text:(null==R?void 0:R.latitude)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("LONGITUDE_GEOTAG"),text:(null==R?void 0:R.longitude)||h("CS_NA")})),i.createElement(je,{application:L,id:null==L?void 0:L.bookingNo,userType:"citizen"}),C&&i.createElement(t.Toast,{error:C.key,label:h(C.label),style:{bottom:"0px"},onClose:()=>{A(null)}}))))},WTMyApplications:()=>{const{t:e}=o.useTranslation(),n=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),a=Digit.UserService.getUser().info,[u,c]=l.useState(""),[d,v]=l.useState(null),[p,f]=l.useState(null),[m,E]=l.useState("watertanker"),[_,g]=l.useState("watertanker");let h,S,y=window.location.href.split("/").pop();isNaN(parseInt(y))?h=4:(S=y,h=parseInt(y)+50);let b=isNaN(parseInt(y))?{limit:"4",sortOrder:"ASC",sortBy:"createdTime",offset:"0",tenantId:n,MobileNumber:null==a?void 0:a.mobileNumber}:{limit:"50",sortOrder:"ASC",sortBy:"createdTime",offset:S,tenantId:n,MobileNumber:null==a?void 0:a.mobileNumber};l.useEffect(()=>{f(b)},[y]);const{isLoading:T,data:C}=Digit.Hooks.wt.useTankerSearchAPI({filters:p},{enabled:!!p&&"watertanker"===m}),{isLoading:A,data:D}=Digit.Hooks.wt.useMobileToiletSearchAPI({filters:p},{enabled:!!p&&"mobileToilet"===m}),{isLoading:N,data:I}=Digit.Hooks.wt.useTreePruningSearchAPI({filters:p},{enabled:!!p&&"treePruning"===m});let w=!1,O=[];if("watertanker"===m?(w=T,O=(null==C?void 0:C.waterTankerBookingDetail)||[]):"mobileToilet"===m?(w=A,O=(null==D?void 0:D.mobileToiletBookingDetails)||[]):"treePruning"===m?(w=N,O=null==I?void 0:I.treePruningBookingDetails):(w=T||A||N,O=[...(null==D?void 0:D.mobileToiletBookingDetails)||[],...(null==C?void 0:C.waterTankerBookingDetail)||[],...(null==I?void 0:I.treePruningBookingDetails)||[]]),w)return i.createElement(t.Loader,null);const x=[{label:e("MOBILE_TOILET"),code:"mobileToilet"},{label:e("WATER_TANKER"),code:"watertanker"},{label:e("TREE_PRUNING"),code:"treePruning"}],R=[{i18nKey:"Booking Created",code:"BOOKING_CREATED",value:e("WT_BOOKING_CREATED")},{i18nKey:"Booking Approved",code:"APPROVED",value:e("WT_BOOKING_APPROVED")},{i18nKey:"Tanker Delivered",code:"TANKER_DELIVERED",value:e("WT_TANKER_DELIVERED")},{i18nKey:"Vendor Assigned",code:"ASSIGN_VENDOR",value:e("WT_ASSIGN_VENDOR")},{i18nKey:"Rejected",code:"REJECT",value:e("WT_BOOKING_REJECTED")}],L=[{i18nKey:"BOOKING_CREATED",code:"BOOKING_CREATED",value:e("TP_BOOKING_CREATED")},{i18nKey:"PENDING_FOR_APPROVAL",code:"PENDING_FOR_APPROVAL",value:e("TP_PENDING_FOR_APPROVAL")},{i18nKey:"PAYMENT_PENDING",code:"PAYMENT_PENDING",value:e("TP_PAYMENT_PENDING")},{i18nKey:"TEAM_ASSIGNMENT_FOR_VERIFICATION",code:"TEAM_ASSIGNMENT_FOR_VERIFICATION",value:e("TP_TEAM_ASSIGNMENT_FOR_VERIFICATION")},{i18nKey:"TEAM_ASSIGNMENT_FOR_EXECUTION",code:"TEAM_ASSIGNMENT_FOR_EXECUTION",value:e("TP_TEAM_ASSIGNMENT_FOR_EXECUTION")},{i18nKey:"TREE_PRUNING_SERVICE_COMPLETED",code:"TREE_PRUNING_SERVICE_COMPLETED",value:e("TP_TREE_PRUNING_SERVICE_COMPLETED")}];return i.createElement(i.Fragment,null,i.createElement(t.Header,null,e("MY_BOOKINGS")+" ("+O.length+")"),i.createElement(t.Card,null,i.createElement("div",{style:{marginLeft:"16px"}},i.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"16px"}},i.createElement("div",{style:{flex:1}},i.createElement(t.CardLabel,null,e("SERVICE_TYPE")),i.createElement(t.Dropdown,{selected:x.find(e=>e.code===_),select:e=>{g(e.code),v("")},option:x,placeholder:e("Select Service Type"),optionKey:"label",t:e})),i.createElement("div",{style:{flex:1}},i.createElement(t.CardLabel,null,e("BOOKING_NO")),i.createElement(t.TextInput,{placeholder:e("Enter Booking No."),value:u,onChange:e=>c(e.target.value)})),i.createElement("div",{style:{flex:1}},i.createElement("div",{style:{display:"flex",flexDirection:"column"}},i.createElement(t.CardLabel,null,e("PT_COMMON_TABLE_COL_STATUS_LABEL")),i.createElement(t.Dropdown,{className:"form-field",selected:d,select:v,option:"treePruning"===_?L:R,placeholder:e("Select Status"),optionKey:"value",style:{width:"100%"},t:e}))),i.createElement("div",null,i.createElement("div",{style:{marginTop:"17%"}},i.createElement(t.SubmitBar,{label:e("ES_COMMON_SEARCH"),onSubmit:()=>{E(_);const e=u.trim(),t=s({},b,{bookingNo:e||void 0,status:(null==d?void 0:d.code)||void 0});f(t)}}),i.createElement("p",{className:"link",style:{marginLeft:"30%",marginTop:"10px",display:"block"},onClick:()=>{c(""),v("")}},e("ES_COMMON_CLEAR_ALL"))))),i.createElement(r.Link,{to:"request-service/service-type"},i.createElement(t.SubmitBar,{style:{borderRadius:"30px",width:"20%"},label:e("NEW_REQUEST")+" +"})))),i.createElement("div",null,O.length>0&&O.map((t,l)=>i.createElement("div",{key:l},i.createElement(G,{application:t,tenantId:n,buttonLabel:e("SUMMARY")}))),0===O.length&&!w&&i.createElement("p",{style:{marginLeft:"16px",marginTop:"16px"}},e("NO_APPLICATION_FOUND_MSG")),0!==O.length&&((null==D?void 0:D.count)||0)+((null==C?void 0:C.count)||0)+((null==I?void 0:I.count)||0)>h&&i.createElement("div",null,i.createElement("p",{style:{marginLeft:"16px",marginTop:"16px"}},i.createElement("span",{className:"link"},i.createElement(r.Link,{to:"/digit-ui/citizen/wt/status/"+h},e("LOAD_MORE_MSG")))))))},ApplicationDetails:Ii,WFApplicationTimeline:je,WFCaption:We,WTEmpInbox:z,WTCitizenCard:()=>{const{t:e}=o.useTranslation(),[n,r]=l.useState("-"),a=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),{data:u,isFetching:c,isSuccess:s}=Digit.Hooks.useNewInboxGeneral({tenantId:a,ModuleCode:"WT",filters:{limit:10,offset:0,services:["watertanker"]},config:{select:e=>({totalCount:null==e?void 0:e.totalCount,nearingSlaCount:null==e?void 0:e.nearingSlaCount}||"-"),enabled:Digit.Utils.wtAccess()}});if(l.useEffect(()=>{!c&&s&&r(u)},[c]),!Digit.Utils.wtAccess())return null;const d=[{label:e("ES_COMMON_INBOX"),link:"/digit-ui/citizen/wt/inbox"},{label:e("ES_COMMON_APPLICATION_SEARCH"),link:"/digit-ui/citizen/wt/my-bookings"}],v={Icon:i.createElement(t.CHBIcon,null),moduleName:e("WT_MODULE_NAME"),kpis:[{count:null==n?void 0:n.totalCount,label:e("ES_TITLE_INBOX"),link:"/digit-ui/employee/wt/inbox"}],links:d};return i.createElement(t.EmployeeModuleCard,v)},ServiceTypes:e=>{var n;let{t:o,config:r,onSelect:a,userType:u,formData:c}=e;const d=Digit.ULBService.getStateId(),{data:v}=Digit.Hooks.useCustomMDMS(d,"request-service",[{name:"ServiceType"}],{select:e=>{var t;return null==e||null===(t=e["request-service"])||void 0===t?void 0:t.ServiceType}}),[p,f]=(Digit.UserService.getUser(),l.useState((null==c||null===(n=c.serviceType)||void 0===n?void 0:n.serviceType)||"")),m=l.useCallback(()=>{let e=s({},c.serviceType,{serviceType:p});a(r.key,e,!1)},[c.serviceType,p,a,r.key]);return l.useEffect(()=>{"citizen"===u&&(console.log("calling meeeeeee"),m())},[p,u,m]),i.createElement(t.Modal,{headerBarMain:i.createElement(xi,{t:o}),headerBarEnd:i.createElement(Oi,{onClick:()=>window.history.back()}),popupStyles:{backgroundColor:"#fff",position:"relative",maxHeight:"50vh",width:"50%",overflowY:"visible"},popupModuleMianStyles:{padding:"10px"},hideSubmit:!0,headerBarMainStyle:{position:"sticky",top:0,backgroundColor:"#f5f5f5"},formId:"modal-action"},i.createElement(i.Fragment,null,i.createElement(t.FormStep,{config:r,onSelect:m,t:o,isDisabled:!p},i.createElement("div",null,i.createElement(t.CardLabel,null,""+o("REQUEST_TYPE")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.Dropdown,{className:"form-field",selected:p,placeholder:"Select Service Type",select:f,option:v,optionKey:"i18nKey",t:o})))))},ToiletRequestDetails:e=>{var n,o,r,a,u,c;let{t:d,config:v,onSelect:p,userType:f,formData:m}=e;const E=Digit.UserService.getUser().info,[_,g]=l.useState((null==m||null===(n=m.toiletRequestDetails)||void 0===n?void 0:n.mobileToilet)||""),[h,S]=l.useState((null==m||null===(o=m.toiletRequestDetails)||void 0===o?void 0:o.deliveryfromTime)||""),[y,b]=l.useState((null==m||null===(r=m.toiletRequestDetails)||void 0===r?void 0:r.deliverytoTime)||""),[T,C]=l.useState((null==m||null===(a=m.toiletRequestDetails)||void 0===a?void 0:a.deliveryfromDate)||""),[A,D]=l.useState((null==m||null===(u=m.toiletRequestDetails)||void 0===u?void 0:u.deliverytoDate)||""),[N,I]=l.useState((null==m||null===(c=m.toiletRequestDetails)||void 0===c?void 0:c.specialRequest)||""),w=Digit.ULBService.getStateId(),O={width:"EMPLOYEE"===E.type?"52%":"100%"},{data:x}=Digit.Hooks.useCustomMDMS(w,"request-service",[{name:"NoOfMobileToilet"}],{select:e=>{var t;return null==e||null===(t=e["request-service"])||void 0===t?void 0:t.NoOfMobileToilet}});let R=[];x&&x.map(e=>{R.push({i18nKey:""+e.code,code:""+e.code,value:""+e.code})});const L=()=>i.createElement("div",{className:"flex items-center"},i.createElement(t.TextInput,{type:"time",value:h,style:O,onChange:e=>S(e.target.value),min:"06:00",max:"23:59"})),P=()=>i.createElement("div",{className:"flex items-center"},i.createElement(t.TextInput,{type:"time",value:y,style:O,onChange:e=>b(e.target.value),min:"06:00",max:"23:59"})),k=()=>{let e=s({},m.toiletRequestDetails,{mobileToilet:_,deliveryfromTime:h,deliverytoTime:y,deliveryfromDate:T,deliverytoDate:A,specialRequest:N});p(v.key,e,!1)};return l.useEffect(()=>{"citizen"===f&&k()},[_,h,y,T,A,N]),i.createElement(i.Fragment,null,i.createElement(t.FormStep,{config:v,onSelect:k,t:d,isDisabled:!(_&&h&&y&&T&&A&&N)},i.createElement("div",null,i.createElement(t.CardLabel,null,d("MT_NUMBER_OF_MOBILE_TOILETS")," ",i.createElement("span",{className:"check-page-link-button"},"*")),i.createElement(t.Dropdown,{className:"form-field",selected:_,placeholder:"Select Number of Mobile Toilets",select:g,option:R,style:O,optionKey:"i18nKey",t:d}),i.createElement(t.CardLabel,null,""+d("MT_DELIVERY_FROM_DATE")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.TextInput,{t:d,type:"date",isMandatory:!1,optionKey:"i18nKey",name:"deliveryDate",style:O,value:T,onChange:function(e){C(e.target.value)},min:(new Date).toISOString().split("T")[0],rules:{required:d("CORE_COMMON_REQUIRED_ERRMSG"),validDate:e=>!!/^\d{4}-\d{2}-\d{2}$/.test(e)||d("ERR_DEFAULT_INPUT_FIELD_MSG")}}),i.createElement(t.CardLabel,null,""+d("MT_DELIVERY_TO_DATE")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.TextInput,{t:d,type:"date",isMandatory:!1,optionKey:"i18nKey",name:"deliveryDate",value:A,style:O,onChange:function(e){D(e.target.value)},min:T,rules:{required:d("CORE_COMMON_REQUIRED_ERRMSG"),validDate:e=>!!/^\d{4}-\d{2}-\d{2}$/.test(e)||d("ERR_DEFAULT_INPUT_FIELD_MSG")}}),i.createElement(t.CardLabel,null,""+d("MT_REQUIREMNENT_FROM_TIME")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(L,null),i.createElement(t.CardLabel,null,""+d("MT_REQUIREMNENT_TO_TIME")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(P,null),i.createElement(t.CardLabel,null,""+d("MT_SPECIAL_REQUEST")," ",i.createElement("span",{className:"check-page-link-button"})),i.createElement(t.TextArea,{t:d,type:"text",isMandatory:!1,optionKey:"i18nKey",name:"mobileToilet",style:O,placeholder:"Special Request",value:N,onChange:function(e){I(e.target.value)},style:{width:"EMPLOYEE"===E.type?"51.6%":null}}))))},TreePruningRequestDetails:e=>{var n,o,r;let{t:a,config:u,onSelect:c,userType:d,formData:v}=e;const p=Digit.UserService.getUser().info,[f,m]=l.useState((null==v||null===(n=v.treePruningRequestDetails)||void 0===n?void 0:n.reasonOfPruning)||""),[E,_]=l.useState(""),[g,h]=l.useState(""),[S,y]=l.useState((null==v||null===(o=v.treePruningRequestDetails)||void 0===o?void 0:o.geoTagLocation)||""),[b,T]=l.useState((null==v||null===(r=v.treePruningRequestDetails)||void 0===r?void 0:r.supportingDocumentFile)||""),[C,A]=l.useState(!1),[D,N]=l.useState(""),I=Digit.ULBService.getStateId(),w={width:"EMPLOYEE"===p.type?"50%":"100%"},{data:O}=Digit.Hooks.useCustomMDMS(I,"request-service",[{name:"ReasonPruningType"}],{select:e=>{var t;return null==e||null===(t=e["request-service"])||void 0===t?void 0:t.ReasonPruningType}}),x=()=>{let e=s({},v.treePruningRequestDetails,{reasonOfPruning:f,geoTagLocation:S,supportingDocumentFile:b,latitude:E,longitude:g});c(u.key,e,!1)};l.useEffect(()=>{"citizen"===d&&x()},[f,S,b,C]);const R=()=>i.createElement("div",{className:"loading-spinner"});return i.createElement(t.FormStep,{config:u,onSelect:x,t:a,isDisabled:!f||!b},i.createElement("div",null,i.createElement(t.CardLabel,null,a("REASON_FOR_PRUNING")," ",i.createElement("span",{className:"check-page-link-button"},"*")),i.createElement(t.Dropdown,{className:"form-field",selected:f,placeholder:"Select Reason",select:m,option:O,style:w,optionKey:"code",t:a}),i.createElement(t.CardLabel,null,a("LOCATION_GEOTAG")),i.createElement("div",{style:{display:"flex",alignItems:"stretch",gap:"8px",width:"EMPLOYEE"===p.type?"53%":"100%"}},i.createElement(t.TextInput,{t:a,type:"text",isMandatory:!1,optionKey:"i18nKey",name:"geoTagLocation",value:S,placeholder:"Select Location",onChange:e=>{const{name:t,value:n}=e.target?e.target:{name:e.name,value:e};"reasonOfPruning"===t?m(n):"geoTagLocation"===t||"location"===t?y(n):"supportingDocumentFile"===t&&T(n)},max:(new Date).toISOString().split("T")[0],style:{flex:1},rules:{required:a("dddddddd"),validDate:e=>!!/^\d{4}-\d{2}-\d{2}$/.test(e)||a("hhhhhhh")},className:"location-input"}),i.createElement("div",{className:"butt-icon",onClick:()=>{"geolocation"in navigator?navigator.geolocation.getCurrentPosition(e=>{const{latitude:t,longitude:n}=e.coords;y(t+", "+n),_(t),h(n)},e=>{console.error("Error getting location:",e),alert("Unable to retrieve your location. Please check your browser settings.")}):alert("Geolocation is not supported by your browser.")},style:{cursor:"pointer",width:"25px",marginBottom:"8px"}},i.createElement(t.LocationIcon,{className:"fill-path-primary-main"}))),i.createElement(t.CardLabel,null,a("UPLOAD_THE_SITE_PHOTOGRAPH")," ",i.createElement("span",{className:"check-page-link-button"},"*")),i.createElement("div",{style:s({marginBottom:"16px"},w)},i.createElement(t.UploadFile,{id:"supportingDocument",onUpload:e=>((e,t)=>{const n=e.target.files[0];n.size>=5242880?(setError("supportingDocument",{message:a("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED")}),t(null)):(A(!0),Digit.UploadServices.Filestorage("TP",n,Digit.ULBService.getStateId()).then(e=>{var n,l;(null==e||null===(n=e.data)||void 0===n||null===(l=n.files)||void 0===l?void 0:l.length)>0?t(e.data.files[0].fileStoreId):setError("supportingDocument",{message:a("CS_FILE_UPLOAD_ERROR")})}).catch(()=>setError("supportingDocument",{message:a("CS_FILE_UPLOAD_ERROR")})).finally(()=>A(!1)))})(e,T),onDelete:()=>{T(null)},message:C?i.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},i.createElement(R,null),i.createElement("span",null,"Uploading...")):b?"1 File Uploaded":"No File Uploaded",textStyles:{width:"100%"},accept:"image/*, .pdf, .png, .jpeg, .jpg",buttonType:"button",error:D||!b}))))},MTAcknowledgement:e=>{let{data:n,onSuccess:a}=e;const{t:u}=o.useTranslation(),c=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),d=Digit.Hooks.wt.useMobileToiletCreateAPI(c),v=Digit.UserService.getUser().info,{data:p}=Digit.Hooks.useStore.getInitData(),{tenants:f}=p||{};return l.useEffect(()=>{try{n.tenantId=c;let e=(e=>{var t,n,l,i,o,r,a,u,c,s,d,v,p,f,m,E,_,g,h,S,y,b,T,C,A,D,N,I,w,O;return{mobileToiletBookingDetail:{tenantId:null==e?void 0:e.tenantId,description:null==e||null===(t=e.toiletRequestDetails)||void 0===t?void 0:t.specialRequest,noOfMobileToilet:null==e||null===(n=e.toiletRequestDetails)||void 0===n||null===(l=n.mobileToilet)||void 0===l?void 0:l.code,deliveryFromDate:null==e||null===(i=e.toiletRequestDetails)||void 0===i?void 0:i.deliveryfromDate,deliveryToDate:null==e||null===(o=e.toiletRequestDetails)||void 0===o?void 0:o.deliverytoDate,deliveryFromTime:null==e||null===(r=e.toiletRequestDetails)||void 0===r?void 0:r.deliveryfromTime,deliveryToTime:null==e||null===(a=e.toiletRequestDetails)||void 0===a?void 0:a.deliverytoTime,addressDetailId:(null==e||null===(u=e.address)||void 0===u?void 0:u.addressDetailId)||"",applicantDetail:{name:null==e||null===(c=e.owner)||void 0===c?void 0:c.applicantName,mobileNumber:null==e||null===(s=e.owner)||void 0===s?void 0:s.mobileNumber,alternateNumber:null==e||null===(d=e.owner)||void 0===d?void 0:d.alternateNumber,emailId:null==e||null===(v=e.owner)||void 0===v?void 0:v.emailId},address:{addressType:null==e||null===(p=e.address)||void 0===p||null===(f=p.addressType)||void 0===f?void 0:f.code,pincode:null==e||null===(m=e.address)||void 0===m?void 0:m.pincode,city:null==e||null===(E=e.address)||void 0===E||null===(_=E.city)||void 0===_||null===(g=_.city)||void 0===g?void 0:g.name,cityCode:null==e||null===(h=e.address)||void 0===h||null===(S=h.city)||void 0===S||null===(y=S.city)||void 0===y?void 0:y.code,addressLine1:null==e||null===(b=e.address)||void 0===b?void 0:b.addressLine1,addressLine2:null==e||null===(T=e.address)||void 0===T?void 0:T.addressLine2,locality:null==e||null===(C=e.address)||void 0===C||null===(A=C.locality)||void 0===A?void 0:A.i18nKey,localityCode:null==e||null===(D=e.address)||void 0===D||null===(N=D.locality)||void 0===N?void 0:N.code,streetName:null==e||null===(I=e.address)||void 0===I?void 0:I.streetName,houseNo:null==e||null===(w=e.address)||void 0===w?void 0:w.houseNo,landmark:null==e||null===(O=e.address)||void 0===O?void 0:O.landmark},bookingStatus:"BOOKING_CREATED",workflow:{action:"APPLY",comments:"",businessService:"mobileToilet",moduleName:"request-service.mobile_toilet"}}}})(n);d.mutate(e,{onSuccess:a})}catch(e){}},[]),Digit.Hooks.useCustomBackNavigation({redirectPath:"${APPLICATION_PATH}/citizen"}),d.isLoading||d.isIdle?i.createElement(t.Loader,null):i.createElement(t.Card,null,i.createElement(Mi,{t:u,data:d.data,isSuccess:d.isSuccess,isLoading:d.isIdle||d.isLoading}),i.createElement(t.StatusTable,null,d.isSuccess&&i.createElement(t.Row,{rowContainerStyle:ki,last:!0,textStyle:{whiteSpace:"pre",width:"60%"}})),d.isSuccess&&i.createElement(t.SubmitBar,{label:u("MT_DOWNLOAD_ACKNOWLEDGEMENT"),onSubmit:function(){try{var e;let t=null===(e=d.data)||void 0===e?void 0:e.mobileToiletBookingDetail;const n=f.find(e=>e.code===t.tenantId);return Promise.resolve(Li(s({},t),n,u)).then(function(e){Digit.Utils.pdf.generate(e)})}catch(e){return Promise.reject(e)}}}),i.createElement(r.Link,"CITIZEN"===(null==v?void 0:v.type)?{to:"/digit-ui/citizen"}:{to:"/digit-ui/employee"},i.createElement(t.LinkButton,{label:u("CORE_COMMON_GO_TO_HOME")})))},TPAcknowledgement:e=>{let{data:n,onSuccess:a}=e;const{t:u}=o.useTranslation(),c=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),d=Digit.Hooks.wt.useTreePruningCreateAPI(c),v=Digit.UserService.getUser().info,{data:p}=Digit.Hooks.useStore.getInitData(),{tenants:f}=p||{};return l.useEffect(()=>{try{n.tenantId=c;let e=(e=>{var t,n,l,i,o,r,a,u,c,s,d,v,p,f,m,E,_,g,h,S,y,b,T,C,A,D,N;return{treePruningBookingDetail:{tenantId:null==e?void 0:e.tenantId,latitude:null==e||null===(t=e.treePruningRequestDetails)||void 0===t?void 0:t.latitude,longitude:null==e||null===(n=e.treePruningRequestDetails)||void 0===n?void 0:n.longitude,reasonForPruning:null==e||null===(l=e.treePruningRequestDetails)||void 0===l||null===(i=l.reasonOfPruning)||void 0===i?void 0:i.code,applicantDetail:{name:null==e||null===(o=e.owner)||void 0===o?void 0:o.applicantName,mobileNumber:null==e||null===(r=e.owner)||void 0===r?void 0:r.mobileNumber,alternateNumber:null==e||null===(a=e.owner)||void 0===a?void 0:a.alternateNumber,emailId:null==e||null===(u=e.owner)||void 0===u?void 0:u.emailId},documentDetails:[{documentType:"Site Photograph",fileStoreId:null==e||null===(c=e.treePruningRequestDetails)||void 0===c?void 0:c.supportingDocumentFile}],address:{addressType:null==e||null===(s=e.address)||void 0===s||null===(d=s.addressType)||void 0===d?void 0:d.code,pincode:null==e||null===(v=e.address)||void 0===v?void 0:v.pincode,city:null==e||null===(p=e.address)||void 0===p||null===(f=p.city)||void 0===f||null===(m=f.city)||void 0===m?void 0:m.name,cityCode:null==e||null===(E=e.address)||void 0===E||null===(_=E.city)||void 0===_||null===(g=_.city)||void 0===g?void 0:g.code,addressLine1:null==e||null===(h=e.address)||void 0===h?void 0:h.addressLine1,addressLine2:null==e||null===(S=e.address)||void 0===S?void 0:S.addressLine2,locality:null==e||null===(y=e.address)||void 0===y||null===(b=y.locality)||void 0===b?void 0:b.i18nKey,localityCode:null==e||null===(T=e.address)||void 0===T||null===(C=T.locality)||void 0===C?void 0:C.code,streetName:null==e||null===(A=e.address)||void 0===A?void 0:A.streetName,houseNo:null==e||null===(D=e.address)||void 0===D?void 0:D.houseNo,landmark:null==e||null===(N=e.address)||void 0===N?void 0:N.landmark},bookingStatus:"BOOKING_CREATED",workflow:{action:"APPLY",comments:"",businessService:"treePruning",moduleName:"request-service.tree_pruning"}}}})(n);d.mutate(e,{onSuccess:a})}catch(e){}},[]),Digit.Hooks.useCustomBackNavigation({redirectPath:"${APPLICATION_PATH}/citizen"}),d.isLoading||d.isIdle?i.createElement(t.Loader,null):i.createElement(t.Card,null,i.createElement(ji,{t:u,data:d.data,isSuccess:d.isSuccess,isLoading:d.isIdle||d.isLoading}),i.createElement(t.StatusTable,null,d.isSuccess&&i.createElement(t.Row,{rowContainerStyle:Wi,last:!0,textStyle:{whiteSpace:"pre",width:"60%"}})),d.isSuccess&&i.createElement(t.SubmitBar,{label:u("TP_DOWNLOAD_ACKNOWLEDGEMENT"),onSubmit:function(){try{var e;let t=null===(e=d.data)||void 0===e?void 0:e.treePruningBookingDetail;const n=f.find(e=>e.code===t.tenantId);return Promise.resolve(Bi(s({},t),n,u)).then(function(e){Digit.Utils.pdf.generate(e)})}catch(e){return Promise.reject(e)}}}),i.createElement(r.Link,"CITIZEN"===(null==v?void 0:v.type)?{to:"/digit-ui/citizen"}:{to:"/digit-ui/employee"},i.createElement(t.LinkButton,{label:u("CORE_COMMON_GO_TO_HOME")})))},MTCitizenCard:()=>{const{t:e}=o.useTranslation(),[n,r]=l.useState("-"),a=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),{data:u,isFetching:c,isSuccess:s}=Digit.Hooks.useNewInboxGeneral({tenantId:a,ModuleCode:"WT",filters:{limit:10,offset:0,services:["mobileToilet"]},config:{select:e=>({totalCount:null==e?void 0:e.totalCount,nearingSlaCount:null==e?void 0:e.nearingSlaCount}||"-"),enabled:Digit.Utils.mtAccess()}});if(l.useEffect(()=>{!c&&s&&r(u)},[c]),!Digit.Utils.mtAccess())return null;const d=[{label:e("ES_COMMON_INBOX"),link:"/digit-ui/citizen/wt/mt/inbox"},{label:e("ES_COMMON_APPLICATION_SEARCH"),link:"/digit-ui/citizen/wt/mt/my-bookings"}],v={Icon:i.createElement(t.CHBIcon,null),moduleName:e("ACTION_TEST_MT"),kpis:[{count:null==n?void 0:n.totalCount,label:e("ES_TITLE_INBOX"),link:"/digit-ui/employee/wt/mt/inbox"}],links:d};return i.createElement(t.EmployeeModuleCard,v)}},Gi=e=>{let{stateCode:t,userType:n,tenants:o}=e;const{path:a,url:u}=r.useRouteMatch(),c=Digit.StoreData.getCurrentLanguage();return Digit.Services.useStore({stateCode:t,moduleCode:"WT",language:c}),Object.entries(Vi).forEach(e=>{let[t,n]=e;Digit.ComponentRegistryService.setComponent(t,n)}),Digit.SessionStorage.set("WT_TENANTS",o),l.useEffect(()=>"employee"===n&&Digit.LocalizationService.getLocale({modules:["rainmaker-"+Digit.ULBService.getCurrentTenantId()],locale:Digit.StoreData.getCurrentLanguage(),tenantId:Digit.ULBService.getCurrentTenantId()}),[]),"employee"===n?i.createElement(V,{path:a,url:u,userType:n}):i.createElement(S,null)},Ki=e=>{let{matchPath:n}=e;const{t:r}=o.useTranslation(),[a,u,c]=Digit.Hooks.useSessionStorage("WT",{});l.useEffect(()=>{c()},[]);const s=[{link:n+"/wt",i18nKey:r("WT_REAQUEST_TANKER")},{link:n+"/wt/status",i18nKey:r("WT_VIEW_APPLICATIONS")}];return i.createElement(t.CitizenHomeCard,{header:r("WATER_TANKER_SERVICE"),links:s,Icon:()=>i.createElement(t.PTIcon,{className:"fill-path-primary-main"})})};exports.WTComponents={WTCard:()=>{const{t:e}=o.useTranslation(),[n,r]=l.useState("-"),{data:a,isLoading:u,isFetching:c,isSuccess:s}=Digit.Hooks.useNewInboxGeneral({tenantId:Digit.ULBService.getCurrentTenantId(),ModuleCode:"WT",filters:{limit:10,offset:0,services:["watertanker"]},config:{select:e=>({totalCount:null==e?void 0:e.totalCount,nearingSlaCount:null==e?void 0:e.nearingSlaCount}||"-"),enabled:Digit.Utils.wtAccess()}});if(l.useEffect(()=>{!c&&s&&r(a)},[c]),!Digit.Utils.wtAccess())return null;const d=[{count:u?"-":null==n?void 0:n.totalCount,label:e("ES_COMMON_INBOX"),link:"/digit-ui/employee/wt/inbox"},{label:e("ES_COMMON_APPLICATION_SEARCH"),link:"/digit-ui/employee/wt/my-bookings"},{label:e("WT_APPLICATION_CREATE"),link:"/digit-ui/employee/wt/request-service"}],v=Digit.UserService.hasAccess(["WT_CEMP"])||!1,p={Icon:i.createElement(t.CHBIcon,null),moduleName:e("WT_MODULE_NAME"),kpis:[{count:null==n?void 0:n.totalCount,label:e("ES_TITLE_INBOX"),link:"/digit-ui/employee/wt/inbox"}],links:d.filter(e=>!(null!=e&&e.role)||v)};return i.createElement(t.EmployeeModuleCard,p)},WTModule:Gi,MTCard:()=>{const{t:e}=o.useTranslation(),[n,r]=l.useState("-"),{data:a,isLoading:u,isFetching:c,isSuccess:s}=Digit.Hooks.useNewInboxGeneral({tenantId:Digit.ULBService.getCurrentTenantId(),ModuleCode:"MT",filters:{limit:10,offset:0,services:["mobileToilet"]},config:{select:e=>({totalCount:null==e?void 0:e.totalCount,nearingSlaCount:null==e?void 0:e.nearingSlaCount}||"-"),enabled:Digit.Utils.mtAccess()}});if(l.useEffect(()=>{!c&&s&&r(a)},[c]),!Digit.Utils.mtAccess())return null;const d=[{count:u?"-":null==n?void 0:n.totalCount,label:e("ES_COMMON_INBOX"),link:"/digit-ui/employee/wt/mt/inbox"},{label:e("ES_COMMON_APPLICATION_SEARCH"),link:"/digit-ui/employee/wt/mt/my-bookings"},{label:e("MT_APPLICATION_CREATE"),link:"/digit-ui/employee/wt/mt/request-service"}],v=Digit.UserService.hasAccess(["MT_CEMP"])||!1,p={Icon:i.createElement(t.CHBIcon,null),moduleName:e("ACTION_TEST_MT"),kpis:[{count:null==n?void 0:n.totalCount,label:e("ES_TITLE_INBOX"),link:"/digit-ui/employee/mt/inbox"}],links:d.filter(e=>!(null!=e&&e.role)||v)};return i.createElement(t.EmployeeModuleCard,p)},TPCard:()=>{const{t:e}=o.useTranslation(),[n,r]=l.useState("-"),{data:a,isLoading:u,isFetching:c,isSuccess:s}=Digit.Hooks.useNewInboxGeneral({tenantId:Digit.ULBService.getCurrentTenantId(),ModuleCode:"TP",filters:{limit:10,offset:0,services:["treePruning"]},config:{select:e=>({totalCount:null==e?void 0:e.totalCount,nearingSlaCount:null==e?void 0:e.nearingSlaCount}||"-"),enabled:Digit.Utils.tpAccess()}});if(l.useEffect(()=>{!c&&s&&r(a)},[c]),!Digit.Utils.tpAccess())return null;const d=[{count:u?"-":null==n?void 0:n.totalCount,label:e("ES_COMMON_INBOX"),link:"/digit-ui/employee/wt/tp/inbox"},{label:e("ES_COMMON_APPLICATION_SEARCH"),link:"/digit-ui/employee/wt/tp/my-bookings"},{label:e("TP_APPLICATION_CREATE"),link:"/digit-ui/employee/wt/tp/request-service"}],v=Digit.UserService.hasAccess(["TP_CEMP"])||!1,p={Icon:i.createElement(t.CHBIcon,null),moduleName:e("ACTION_TEST_TP"),kpis:[{count:null==n?void 0:n.totalCount,label:e("ES_TITLE_INBOX"),link:"/digit-ui/employee/wt/tp/inbox"}],links:d.filter(e=>!(null!=e&&e.role)||v)};return i.createElement(t.EmployeeModuleCard,p)},WTLinks:Ki,WT_INBOX_FILTER:e=>i.createElement(Ke,e),WTInboxTableConfig:e=>({WT:{inboxColumns:t=>[{Header:e("WT_BOOKING_NO"),Cell:e=>{var n,l,o,a;let{row:u}=e;return i.createElement("div",null,i.createElement("span",{className:"link"},i.createElement(r.Link,{to:t.parentRoute+"/booking-details/"+(null==u||null===(n=u.original)||void 0===n||null===(l=n.searchData)||void 0===l?void 0:l.bookingNo)},null===(o=u.original)||void 0===o||null===(a=o.searchData)||void 0===a?void 0:a.bookingNo)))},mobileCell:e=>{var t;return Ve(null==e||null===(t=e.searchData)||void 0===t?void 0:t.bookingNo)}},{Header:e("WT_APPLICANT_NAME"),Cell:e=>{var t,n,l,i,o;return ze(""+(null==e||null===(t=e.cell)||void 0===t||null===(n=t.row)||void 0===n||null===(l=n.original)||void 0===l||null===(i=l.searchData)||void 0===i||null===(o=i.applicantDetail)||void 0===o?void 0:o.name))},mobileCell:e=>{var t,n;return Ve(null==e||null===(t=e.searchData)||void 0===t||null===(n=t.applicantDetail)||void 0===n?void 0:n.name)}},{Header:e("WT_MOBILE_NUMBER"),Cell:e=>{var t,n,l,i,o;return ze(""+(null==e||null===(t=e.cell)||void 0===t||null===(n=t.row)||void 0===n||null===(l=n.original)||void 0===l||null===(i=l.searchData)||void 0===i||null===(o=i.applicantDetail)||void 0===o?void 0:o.mobileNumber))},mobileCell:e=>{var t,n;return Ve(null==e||null===(t=e.searchData)||void 0===t||null===(n=t.applicantDetail)||void 0===n?void 0:n.mobileNumber)}},{Header:e("LOCALITY"),Cell:t=>{var n,l;let{row:i}=t;return ze(e(""+(null===(n=i.original)||void 0===n||null===(l=n.searchData)||void 0===l?void 0:l.localityCode)))},mobileCell:t=>{var n;return Ve(e(""+(null==t||null===(n=t.searchData)||void 0===n?void 0:n.localityCode)))}},{Header:e("WT_STATUS"),Cell:t=>{var n,l,i;let{row:o}=t;return ze(e(""+(null==o||null===(n=o.original)||void 0===n||null===(l=n.workflowData)||void 0===l||null===(i=l.state)||void 0===i?void 0:i.applicationStatus)))},mobileCell:t=>{var n,l;return Ve(e("ES_WT_COMMON_STATUS_"+(null==t||null===(n=t.workflowData)||void 0===n||null===(l=n.state)||void 0===l?void 0:l.applicationStatus)))}}],serviceRequestIdKey:t=>{var n,l;return null==t||null===(n=t[e("WT_INBOX_UNIQUE_BOOKING_NO")])||void 0===n||null===(l=n.props)||void 0===l?void 0:l.children}},MT:{inboxColumns:t=>[{Header:e("MT_BOOKING_NO"),Cell:e=>{var n,l,o,a;let{row:u}=e;return i.createElement("div",null,i.createElement("span",{className:"link"},i.createElement(r.Link,{to:t.parentRoute+"/booking-details/"+(null==u||null===(n=u.original)||void 0===n||null===(l=n.searchData)||void 0===l?void 0:l.bookingNo)},null===(o=u.original)||void 0===o||null===(a=o.searchData)||void 0===a?void 0:a.bookingNo)))},mobileCell:e=>{var t;return Ve(null==e||null===(t=e.searchData)||void 0===t?void 0:t.bookingNo)}},{Header:e("MT_APPLICANT_NAME"),Cell:e=>{var t,n,l,i,o;return ze(""+(null==e||null===(t=e.cell)||void 0===t||null===(n=t.row)||void 0===n||null===(l=n.original)||void 0===l||null===(i=l.searchData)||void 0===i||null===(o=i.applicantDetail)||void 0===o?void 0:o.name))},mobileCell:e=>{var t,n;return Ve(null==e||null===(t=e.searchData)||void 0===t||null===(n=t.applicantDetail)||void 0===n?void 0:n.name)}},{Header:e("MT_MOBILE_NUMBER"),Cell:e=>{var t,n,l,i,o;return ze(""+(null==e||null===(t=e.cell)||void 0===t||null===(n=t.row)||void 0===n||null===(l=n.original)||void 0===l||null===(i=l.searchData)||void 0===i||null===(o=i.applicantDetail)||void 0===o?void 0:o.mobileNumber))},mobileCell:e=>{var t,n;return Ve(null==e||null===(t=e.searchData)||void 0===t||null===(n=t.applicantDetail)||void 0===n?void 0:n.mobileNumber)}},{Header:e("LOCALITY"),Cell:t=>{var n,l;let{row:i}=t;return ze(e(""+(null===(n=i.original)||void 0===n||null===(l=n.searchData)||void 0===l?void 0:l.localityCode)))},mobileCell:t=>{var n;return Ve(e(""+(null==t||null===(n=t.searchData)||void 0===n?void 0:n.localityCode)))}},{Header:e("MT_STATUS"),Cell:t=>{var n,l,i;let{row:o}=t;return ze(e(""+(null==o||null===(n=o.original)||void 0===n||null===(l=n.workflowData)||void 0===l||null===(i=l.state)||void 0===i?void 0:i.applicationStatus)))},mobileCell:t=>{var n,l;return Ve(e("ES_WT_COMMON_STATUS_"+(null==t||null===(n=t.workflowData)||void 0===n||null===(l=n.state)||void 0===l?void 0:l.applicationStatus)))}}],serviceRequestIdKey:t=>{var n,l;return null==t||null===(n=t[e("WT_INBOX_UNIQUE_BOOKING_NO")])||void 0===n||null===(l=n.props)||void 0===l?void 0:l.children}},TP:{inboxColumns:t=>[{Header:e("MT_BOOKING_NO"),Cell:e=>{var n,l,o,a;let{row:u}=e;return i.createElement("div",null,i.createElement("span",{className:"link"},i.createElement(r.Link,{to:t.parentRoute+"/booking-details/"+(null==u||null===(n=u.original)||void 0===n||null===(l=n.searchData)||void 0===l?void 0:l.bookingNo)},null===(o=u.original)||void 0===o||null===(a=o.searchData)||void 0===a?void 0:a.bookingNo)))},mobileCell:e=>{var t;return Ve(null==e||null===(t=e.searchData)||void 0===t?void 0:t.bookingNo)}},{Header:e("MT_APPLICANT_NAME"),Cell:e=>{var t,n,l,i,o;return ze(""+(null==e||null===(t=e.cell)||void 0===t||null===(n=t.row)||void 0===n||null===(l=n.original)||void 0===l||null===(i=l.searchData)||void 0===i||null===(o=i.applicantDetail)||void 0===o?void 0:o.name))},mobileCell:e=>{var t,n;return Ve(null==e||null===(t=e.searchData)||void 0===t||null===(n=t.applicantDetail)||void 0===n?void 0:n.name)}},{Header:e("MT_MOBILE_NUMBER"),Cell:e=>{var t,n,l,i,o;return ze(""+(null==e||null===(t=e.cell)||void 0===t||null===(n=t.row)||void 0===n||null===(l=n.original)||void 0===l||null===(i=l.searchData)||void 0===i||null===(o=i.applicantDetail)||void 0===o?void 0:o.mobileNumber))},mobileCell:e=>{var t,n;return Ve(null==e||null===(t=e.searchData)||void 0===t||null===(n=t.applicantDetail)||void 0===n?void 0:n.mobileNumber)}},{Header:e("LOCALITY"),Cell:t=>{var n,l;let{row:i}=t;return ze(e(""+(null===(n=i.original)||void 0===n||null===(l=n.searchData)||void 0===l?void 0:l.localityCode)))},mobileCell:t=>{var n;return Ve(e(""+(null==t||null===(n=t.searchData)||void 0===n?void 0:n.localityCode)))}},{Header:e("MT_STATUS"),Cell:t=>{var n,l,i;let{row:o}=t;return ze(e(""+(null==o||null===(n=o.original)||void 0===n||null===(l=n.workflowData)||void 0===l||null===(i=l.state)||void 0===i?void 0:i.applicationStatus)))},mobileCell:t=>{var n,l;return Ve(e("ES_WT_COMMON_STATUS_"+(null==t||null===(n=t.workflowData)||void 0===n||null===(l=n.state)||void 0===l?void 0:l.applicationStatus)))}}],serviceRequestIdKey:t=>{var n,l;return null==t||null===(n=t[e("WT_INBOX_UNIQUE_BOOKING_NO")])||void 0===n||null===(l=n.props)||void 0===l?void 0:l.children}}})},exports.WTLinks=Ki,exports.WTModule=Gi;
1
+ var e,t=require("@nudmcdgnpm/digit-ui-react-components"),l=require("react"),i=(e=l)&&"object"==typeof e&&"default"in e?e.default:e,o=require("react-i18next"),r=require("react-router-dom"),a=require("react-query"),u=require("react-hook-form"),c=require("@upyog/digit-ui-react-components");function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e}).apply(null,arguments)}function d(e,t){if(null==e)return{};var n={};for(var l in e)if({}.hasOwnProperty.call(e,l)){if(-1!==t.indexOf(l))continue;n[l]=e[l]}return n}const v=[{head:"ES_TITILE_OWNER_DETAILS",body:[{route:"service-type",component:"ServiceTypes",withoutLabel:!0,key:"serviceType",type:"component",nextStep:"info",hideInEmployee:!0,isMandatory:!0,texts:{submitBarLabel:"COMMON_SAVE_NEXT"}},{route:"info",component:"InfoPage",nextStep:"applicant-details",key:"infodetails"},{route:"applicant-details",component:"ApplicantDetails",withoutLabel:!0,key:"owner",type:"component",nextStep:"address-details",hideInEmployee:!0,isMandatory:!0,texts:{submitBarLabel:"COMMON_SAVE_NEXT",header:"ES_APPLICANT_DETAILS"},timeLine:[{currentStep:1,actions:"ES_APPLICANT_DETAILS"}]}]},{head:"ES_TITLE_ADDRESS_DETAILS",body:[{route:"address-details",component:"AddressDetails",withoutLabel:!0,key:"address",type:"component",isMandatory:!0,hideInEmployee:!0,nextStep:"request-details",texts:{submitBarLabel:"COMMON_SAVE_NEXT",header:"ES_ADDRESS_DETAILS"},timeLine:[{currentStep:2,actions:"ES_ADDRESS_DETAILS"}]}]},{head:"ES_REQUEST_DETAILS",body:[{route:"request-details",component:"RequestDetails",withoutLabel:!0,key:"requestDetails",type:"component",isMandatory:!0,hideInEmployee:!0,nextStep:null,texts:{submitBarLabel:"COMMON_SAVE_NEXT",header:"WT_REQUEST_DETAILS"},timeLine:[{currentStep:3,actions:"ES_REQUEST_DETAILS"}]}]},{head:"ES_TOILET_REQUEST_DETAILS",body:[{route:"toiletRequest-details",component:"ToiletRequestDetails",withoutLabel:!0,key:"toiletRequestDetails",type:"component",isMandatory:!0,hideInEmployee:!0,nextStep:null,texts:{submitBarLabel:"COMMON_SAVE_NEXT",header:"MT_REQUEST_DETAILS"},timeLine:[{currentStep:3,actions:"ES_TOILET_REQUEST_DETAILS"}]}]},{head:"ES_TREE_PRUNING_REQUEST_DETAILS",body:[{route:"treePruningRequest-details",component:"TreePruningRequestDetails",withoutLabel:!0,key:"treePruningRequestDetails",type:"component",isMandatory:!0,hideInEmployee:!0,nextStep:null,texts:{submitBarLabel:"COMMON_SAVE_NEXT",header:"TP_REQUEST_DETAILS"},timeLine:[{currentStep:3,actions:"ES_TREE_PRUNING_REQUEST_DETAILS"}]}]}],p=function(e){return void 0===e&&(e=""),function(e){return void 0===e&&(e=""),!(!e||null==e||null==e||""==e)}(e)?e:"NA"},f=e=>{if(!e)return"NA";const[t,n]=e.split(":").map(Number),l=t>=12?"PM":"AM";return(t%12||12)+":"+n.toString().padStart(2,"0")+" "+l},m=e=>{if(!e)return"NA";const[t,n,l]=e.split("-");return l+"-"+n+"-"+t},E=e=>{var n,o;let{isLoading:a,t:c,onSubmit:s,data:d,count:v,setShowToast:p,moduleCode:f}=e;const m=window.Digit.Utils.browser.isMobile(),{register:E,control:_,handleSubmit:g,setValue:h,getValues:S,reset:y,formState:b}=u.useForm({defaultValues:{offset:0,limit:!m&&10,sortBy:"commencementDate",sortOrder:"DESC"}});l.useEffect(()=>{E("offset",0),E("limit",10),E("sortBy","commencementDate"),E("sortOrder","DESC")},[E]);const T=Digit.UserService.getUser().info,C=e=>i.createElement("span",{className:"cell-text"},e),A=l.useMemo(()=>[{Header:c("WT_BOOKING_NO"),accessor:"bookingNo",disableSortBy:!0,Cell:e=>{let{row:t}=e;return i.createElement("div",null,i.createElement("span",{className:"link"},"CITIZEN"===T.type&&i.createElement(r.Link,{to:"/digit-ui/citizen/wt/bookingsearch/booking-details/"+t.original.bookingNo},t.original.bookingNo),"EMPLOYEE"===T.type&&i.createElement(r.Link,{to:"/digit-ui/employee/wt/bookingsearch/booking-details/"+t.original.bookingNo},t.original.bookingNo)))}},{Header:c("WT_APPLICANT_NAME"),Cell:e=>{var t,n,l;return C(""+(null==e||null===(t=e.row)||void 0===t||null===(n=t.original)||void 0===n||null===(l=n.applicantDetail)||void 0===l?void 0:l.name))},disableSortBy:!0},{Header:c("WT_MOBILE_NUMBER"),Cell:e=>{var t,n,l;return C(""+(null==e||null===(t=e.row)||void 0===t||null===(n=t.original)||void 0===n||null===(l=n.applicantDetail)||void 0===l?void 0:l.mobileNumber))},disableSortBy:!0},{Header:c("PT_COMMON_TABLE_COL_STATUS_LABEL"),Cell:e=>{let{row:t}=e;return C(""+c(null==t?void 0:t.original.bookingStatus))},disableSortBy:!0}],[]),D=[{i18nKey:"Booking Created",code:"BOOKING_CREATED",value:c("WT_BOOKING_CREATED")},{i18nKey:"Booking Approved",code:"APPROVED",value:c("WT_BOOKING_APPROVED")},{i18nKey:"Tanker Delivered",code:"TANKER_DELIVERED",value:c("WT_TANKER_DELIVERED")},{i18nKey:"Vendor Assigned",code:"ASSIGN_VENDOR",value:c("WT_ASSIGN_VENDOR")},{i18nKey:"Rejected",code:"REJECT",value:c("WT_BOOKING_REJECTED")}],N=[{i18nKey:"TP_BOOKING_CREATED",code:"BOOKING_CREATED",value:c("TP_BOOKING_CREATED")},{i18nKey:"TP_PENDING_FOR_APPROVAL",code:"PENDING_FOR_APPROVAL",value:c("TP_PENDING_FOR_APPROVAL")},{i18nKey:"TP_PAYMENT_PENDING",code:"PAYMENT_PENDING",value:c("TP_PAYMENT_PENDING")},{i18nKey:"TP_TEAM_ASSIGNMENT_FOR_VERIFICATION",code:"TEAM_ASSIGNMENT_FOR_VERIFICATION",value:c("TP_TEAM_ASSIGNMENT_FOR_VERIFICATION")},{i18nKey:"TP_TEAM_ASSIGNMENT_FOR_EXECUTION",code:"TEAM_ASSIGNMENT_FOR_EXECUTION",value:c("TP_TEAM_ASSIGNMENT_FOR_EXECUTION")},{i18nKey:"TP_TREE_PRUNING_SERVICE_COMPLETED",code:"TREE_PRUNING_SERVICE_COMPLETED",value:c("TP_TREE_PRUNING_SERVICE_COMPLETED")}],I=l.useCallback(e=>{0!==e.length&&(h("sortBy",e.id),h("sortOrder",e.desc?"DESC":"ASC"))},[]);function w(){h("offset",S("offset")-S("limit")),g(s)()}return i.createElement(i.Fragment,null,i.createElement("div",{style:{padding:"CITIZEN"===(null==T?void 0:T.type)?"0 24px 0 24px":""}},i.createElement(t.Header,null,c("WT_SEARCH_BOOKINGS")),"EMPLOYEE"===(null==T?void 0:T.type)&&i.createElement(t.Card,{className:"card-search-heading"},i.createElement("span",{style:{color:"#505A5F"}},c("PROVIDE_ATLEAST_ONE_PARAMETERS"))),"CITIZEN"===(null==T?void 0:T.type)&&i.createElement("span",{style:{color:"#505A5F",marginBottom:"10px"}},c("PROVIDE_ATLEAST_ONE_PARAMETERS")),i.createElement(t.SearchForm,{onSubmit:s,handleSubmit:g},i.createElement(t.SearchField,null,i.createElement("label",null,c("WT_BOOKING_NO")),i.createElement(t.TextInput,{name:"bookingNo",inputRef:E({})})),i.createElement(t.SearchField,null,i.createElement("label",null,c("PT_COMMON_TABLE_COL_STATUS_LABEL")),i.createElement(u.Controller,{control:_,name:"status",render:e=>i.createElement(t.Dropdown,{selected:e.value,select:e.onChange,onBlur:e.onBlur,option:"TP"===f?N:D,optionKey:"i18nKey",t:c,disable:!1})})),i.createElement(t.SearchField,null,i.createElement("label",null,c("WT_MOBILE_NUMBER")),i.createElement(t.MobileNumber,{name:"mobileNumber",inputRef:E({minLength:{value:10,message:c("CORE_COMMON_MOBILE_ERROR")},maxLength:{value:10,message:c("CORE_COMMON_MOBILE_ERROR")},pattern:{value:/[6789][0-9]{9}/,message:c("CORE_COMMON_MOBILE_ERROR")}}),type:"number",componentInFront:i.createElement("div",{className:"employee-card-input employee-card-input--front"},"+91"),maxlength:10}),i.createElement(t.CardLabelError,null,null==b||null===(n=b.errors)||void 0===n||null===(o=n.mobileNumber)||void 0===o?void 0:o.message)),i.createElement(t.SearchField,null,i.createElement("label",null,c("FROM_DATE")),i.createElement(u.Controller,{render:e=>i.createElement(t.DatePicker,{date:e.value,disabled:!1,onChange:e.onChange,max:(new Date).toISOString().split("T")[0]}),name:"fromDate",control:_})),i.createElement(t.SearchField,null,i.createElement("label",null,c("TO_DATE")),i.createElement(u.Controller,{render:e=>i.createElement(t.DatePicker,{date:e.value,disabled:!1,onChange:e.onChange}),name:"toDate",control:_})),i.createElement(t.SearchField,null),i.createElement(t.SearchField,{className:"submit"},i.createElement(t.SubmitBar,{label:c("ES_COMMON_SEARCH"),submit:!0}),i.createElement("p",{style:{marginTop:"10px"},onClick:()=>{y({bookingNo:"",communityHallCode:"",fromDate:"",toDate:"",mobileNumber:"",status:"",offset:0,limit:10,sortBy:"commencementDate",sortOrder:"DESC"}),p(null),w()}},c("ES_COMMON_CLEAR_ALL")))),!a&&null!=d&&d.display?i.createElement(t.Card,{style:{marginTop:20}},c(d.display).split("\\n").map((e,t)=>i.createElement("p",{key:t,style:{textAlign:"center"}},e))):a||""===d?""!==d||a&&i.createElement(t.Loader,null):i.createElement(t.Table,{t:c,data:d,totalRecords:v,columns:A,getCellProps:e=>({style:{minWidth:e.column.Header===c("WT_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}),onPageSizeChange:function(e){h("limit",Number(e.target.value)),g(s)()},currentPage:S("offset")/S("limit"),onNextPage:function(){h("offset",S("offset")+S("limit")),g(s)()},onPrevPage:w,pageSizeLimit:S("limit"),onSort:I,disableSort:!1,sortParams:[{id:S("sortBy"),desc:"DESC"===S("sortOrder")}]})))},g=e=>{let{moduleCode:n}=e;const{t:r}=o.useTranslation(),a=Digit.ULBService.getCurrentTenantId(),[u,c]=l.useState({}),[d,v]=l.useState(null);l.useEffect(()=>{if(d){const e=setTimeout(()=>{v(null)},1e3);return()=>clearTimeout(e)}},[d]);const p={enabled:!!(u&&Object.keys(u).length>0)};let f=[],m=0,_=!1,g=!1,h=!1,S=null;return"WT"===n?({isLoading:_,isSuccess:g,isError:h,error:S,data:{waterTankerBookingDetail:f=[],Count:m=0}={}}=Digit.Hooks.wt.useTankerSearchAPI({tenantId:a,filters:u},p)):"MT"===n?({isLoading:_,isSuccess:g,isError:h,error:S,data:{mobileToiletBookingDetails:f=[],Count:m=0}={}}=Digit.Hooks.wt.useMobileToiletSearchAPI({tenantId:a,filters:u},p)):"TP"===n&&({isLoading:_,isSuccess:g,isError:h,error:S,data:{treePruningBookingDetails:f=[],Count:m=0}={}}=Digit.Hooks.wt.useTreePruningSearchAPI({tenantId:a,filters:u},p)),i.createElement(i.Fragment,null,i.createElement(E,{t:r,isLoading:_,tenantId:a,setShowToast:v,onSubmit:function(e){const{fromDate:t,toDate:n}=e,l=s({},e,n?{toDate:n}:{},t?{fromDate:t}:{});let i=Object.keys(l).filter(e=>l[e]).reduce((e,t)=>s({},e,{[t]:"object"==typeof l[t]?l[t].code:l[t]}),{});!(Object.keys(i).length>0)||i.bookingNo||i.fromDate||i.status||i.toDate||i.mobileNumber?i.fromDate&&!i.toDate||!i.fromDate&&i.toDate?v({warning:!0,label:"ERR_PROVIDE_BOTH_FORM_TO_DATE"}):c(i):v({warning:!0,label:"ERR_PROVIDE_ONE_PARAMETERS"})},data:g&&!_?f.length>0?f:{display:"ES_COMMON_NO_DATA"}:"",count:m,moduleCode:n}),d&&i.createElement(t.Toast,{error:d.error,warning:d.warning,label:r(d.label),onClose:()=>v(null)}))},h=["path","url"],S=()=>{var e,n,l,o,a,u,c,v,p,f,m,E;const _=r.useRouteMatch(),{path:S}=_,y=(d(_,h),null===(e=Digit)||void 0===e||null===(n=e.ComponentRegistryService)||void 0===n?void 0:n.getComponent("WTCreate")),b=null===(l=Digit)||void 0===l||null===(o=l.ComponentRegistryService)||void 0===o?void 0:o.getComponent("WTApplicationDetails"),T=null===(a=Digit)||void 0===a||null===(u=a.ComponentRegistryService)||void 0===u?void 0:u.getComponent("MTApplicationDetails"),C=null===(c=Digit)||void 0===c||null===(v=c.ComponentRegistryService)||void 0===v?void 0:v.getComponent("TPApplicationDetails"),A=null===(p=Digit)||void 0===p||null===(f=p.ComponentRegistryService)||void 0===f?void 0:f.getComponent("WTMyApplications"),D=Digit.ComponentRegistryService.getComponent("WTEmpInbox"),N=Digit.ComponentRegistryService.getComponent("WTCitizenCard"),I=Digit.ComponentRegistryService.getComponent("MTCitizenCard"),w=null===(m=Digit)||void 0===m||null===(E=m.ComponentRegistryService)||void 0===E?void 0:E.getComponent("ApplicationDetails"),O=e=>({searchParams:{uuid:{code:"ASSIGNED_TO_ALL",name:"ES_INBOX_ASSIGNED_TO_ALL"},services:[e],applicationStatus:[],locality:[]}}),x=O("watertanker"),R=O("mobileToilet");return i.createElement("span",{style:{width:"100%"}},i.createElement(r.Switch,null,i.createElement(t.AppContainer,null,i.createElement(t.BackButton,null,"Back"),i.createElement(t.PrivateRoute,{path:S+"/inbox",component:()=>i.createElement(D,{useNewInboxAPI:!0,parentRoute:S,moduleCode:"WT",businessService:"watertanker",filterComponent:"WT_INBOX_FILTER",initialStates:x,isInbox:!0})}),i.createElement(t.PrivateRoute,{path:S+"/mt/inbox",component:()=>i.createElement(D,{useNewInboxAPI:!0,parentRoute:S,businessService:"mobileToilet",moduleCode:"MT",filterComponent:"WT_INBOX_FILTER",initialStates:R,isInbox:!0})}),i.createElement(t.PrivateRoute,{path:S+"/request-service",component:y}),i.createElement(t.PrivateRoute,{path:S+"/status",component:A}),i.createElement(t.PrivateRoute,{path:S+"/booking/waterTanker/:acknowledgementIds/:tenantId",component:b}),i.createElement(t.PrivateRoute,{path:S+"/booking/mobileToilet/:acknowledgementIds/:tenantId",component:T}),i.createElement(t.PrivateRoute,{path:S+"/booking/treePruning/:acknowledgementIds/:tenantId",component:C}),i.createElement(t.PrivateRoute,{path:S+"/booking-details/:id",component:()=>i.createElement(w,{parentRoute:S})}),i.createElement(t.PrivateRoute,{path:S+"/bookingsearch/booking-details/:id",component:()=>i.createElement(w,{parentRoute:S})}),i.createElement(t.PrivateRoute,{path:S+"/wt-Vendor",component:()=>Digit.UserService.hasAccess(["WT_VENDOR"])?i.createElement(N,{parentRoute:S}):i.createElement(r.Redirect,{to:{pathname:"/digit-ui/citizen/login",state:{from:S+"/wt-Vendor",role:"WT_VENDOR"}}})}),i.createElement(t.PrivateRoute,{path:S+"/mt-Vendor",component:()=>Digit.UserService.hasAccess(["MT_VENDOR"])?i.createElement(I,{parentRoute:S}):i.createElement(r.Redirect,{to:{pathname:"/digit-ui/citizen/login",state:{from:S+"/mt-Vendor",role:"MT_VENDOR"}}})}),i.createElement(t.PrivateRoute,{path:S+"/my-bookings",component:e=>i.createElement(g,s({},e,{parentRoute:S,moduleCode:"WT"}))}),i.createElement(t.PrivateRoute,{path:S+"/mt/my-bookings",component:e=>i.createElement(g,s({},e,{parentRoute:S,moduleCode:"MT"}))}))))},y=e=>{let{onSubmit:n,setExistingDataSet:a}=e;const{t:u}=o.useTranslation(),c=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),[d,v]=l.useState(null),[p,f]=l.useState(!1),{offset:m}=r.useParams();l.useEffect(()=>{p&&(n(),f(!1))},[p,n]);let E={limit:"3",sortOrder:"ASC",sortBy:"createdTime",offset:m&&!isNaN(parseInt(m))?m:"0",tenantId:c};l.useEffect(()=>{v(E)},[m]);const{isLoading:_,data:g}=Digit.Hooks.wt.useTankerSearchAPI({filters:d});if(_)return i.createElement(t.Loader,null);const h=(null==g?void 0:g.waterTankerBookingDetail)||[],S={padding:"10px",margin:"10px 0",border:"1px solid #ccc",transition:"background-color 0.3s ease, box-shadow 0.3s ease"},y={boxShadow:"1px 4px 4px 7px rgba(0, 0, 0, 0.5)"};return i.createElement(i.Fragment,null,i.createElement("div",null,h.length>0&&h.map((e,n)=>{var l;return i.createElement("div",{key:n},i.createElement(t.Card,{style:s({},S,{cursor:"pointer"}),onMouseEnter:e=>{e.currentTarget.style.backgroundColor=y.backgroundColor,e.currentTarget.style.boxShadow=y.boxShadow},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="",e.currentTarget.style.boxShadow=""},onClick:()=>{(e=>{var t,n,l,i,o,r,u,c,s,d,v,p,m,E,_,g,h,S;const y={address:{houseNo:null==e||null===(t=e.address)||void 0===t?void 0:t.houseNo,streetName:null==e||null===(n=e.address)||void 0===n?void 0:n.streetName,addressline1:null==e||null===(l=e.address)||void 0===l?void 0:l.addressLine1,addressline2:null==e||null===(i=e.address)||void 0===i?void 0:i.addressLine2,landmark:null==e||null===(o=e.address)||void 0===o?void 0:o.landmark,pincode:null==e||null===(r=e.address)||void 0===r?void 0:r.pincode,cityValue:{code:null==e||null===(u=e.address)||void 0===u?void 0:u.city,value:null==e||null===(c=e.address)||void 0===c?void 0:c.city,i18nKey:null==e||null===(s=e.address)||void 0===s?void 0:s.city,city:{name:null==e||null===(d=e.address)||void 0===d?void 0:d.city,code:null==e||null===(v=e.address)||void 0===v?void 0:v.cityCode}},locality:{code:null==e||null===(p=e.address)||void 0===p?void 0:p.localityCode,value:null==e||null===(m=e.address)||void 0===m?void 0:m.locality,i18nKey:null==e||null===(E=e.address)||void 0===E?void 0:E.locality}},owner:{applicantName:null==e||null===(_=e.applicantDetail)||void 0===_?void 0:_.name,mobileNumber:null==e||null===(g=e.applicantDetail)||void 0===g?void 0:g.mobileNumber,alternateNumber:null==e||null===(h=e.applicantDetail)||void 0===h?void 0:h.alternateNumber,emailId:null==e||null===(S=e.applicantDetail)||void 0===S?void 0:S.emailId},requestDetails:{deliveryDate:null==e?void 0:e.deliveryDate,deliveryTime:null==e?void 0:e.deliveryTime,waterQuantity:{code:null==e?void 0:e.waterQuantity,value:null==e?void 0:e.waterQuantity,i18nKey:null==e?void 0:e.waterQuantity},tankerType:{code:null==e?void 0:e.tankerType,value:null==e?void 0:e.tankerType,i18nKey:null==e?void 0:e.tankerType},description:null==e?void 0:e.description}};a(y),f(!0)})(e)}},i.createElement(t.KeyNote,{keyValue:u("BOOKING_NO"),note:null==e?void 0:e.bookingNo}),i.createElement(t.KeyNote,{keyValue:u("APPLICANT_NAME"),note:null==e||null===(l=e.applicantDetail)||void 0===l?void 0:l.name}),i.createElement(t.KeyNote,{keyValue:u("PT_COMMON_TABLE_COL_STATUS_LABEL"),note:u(""+(null==e?void 0:e.bookingStatus))})))}),0===h.length&&!_&&i.createElement("p",{style:{marginLeft:"16px",marginTop:"16px"}},u("NO_APPLICATION_FOUND_MSG"))))},b=i.memo(e=>{let{t:t}=e;return i.createElement("h1",{className:"heading-m"},t("MY_BOOKINGS"))}),T=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),C=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(T,null)),A=e=>{let{t:n,closeModal:o,onSubmit:r,setExistingDataSet:a}=e;const[u,c]=l.useState(!1),[s,d]=l.useState(!1),v=l.useCallback(()=>{s&&(r(),d(!1))},[s,r]);return l.useEffect(()=>{v()},[v]),i.createElement(i.Fragment,null,i.createElement(t.Modal,{headerBarMain:i.createElement(b,{t:n}),headerBarEnd:i.createElement(C,{onClick:o}),actionCancelLabel:u&&n("CS_COMMON_BACK"),actionCancelOnSubmit:()=>c(!1),hideSubmit:!0,formId:"modal-action"},i.createElement(t.Card,{style:{boxShadow:"none"}},u&&i.createElement(y,{onSubmit:r,setExistingDataSet:a}),i.createElement("div",{style:{display:"flex",justifyContent:"center",gap:"20px",flexDirection:"column",alignItems:"center"}},!u&&i.createElement(t.SubmitBar,{label:n("USE_EXISTING_DETAILS"),onSubmit:()=>{c(!0)}}),!u&&i.createElement(t.SubmitBar,{label:n("FILL_NEW_DETAILS"),onSubmit:()=>{d(!0)}})))))},D=e=>{let{jumpTo:n}=e;o.useTranslation();const l=r.useHistory();return i.createElement(t.LinkButton,{label:i.createElement(t.EditIcon,{style:{marginTop:"-30px",float:"right",position:"relative",bottom:"32px"}}),className:"check-page-link-button",onClick:function(){l.push(n)}})},N=e=>e.substr(0,1).toUpperCase()+e.substr(1),I=function(e,t,n){try{var l,i,o,r,a,u,c,s,d,v,p,E,_,g;return console.log("booking",e),console.log("tenantInfo",t),Promise.resolve({t:n,tenantId:null==t?void 0:t.code,name:n(null==t?void 0:t.i18nKey)+" "+(h=n("ULBGRADE_"+(null==t||null===(l=t.city)||void 0===l?void 0:l.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))),h.toLowerCase().split(" ").map(N).join(" ")),email:null==t?void 0:t.emailId,phoneNumber:null==t?void 0:t.contactNumber,applicationNumber:null==e?void 0:e.bookingNo,isTOCRequired:!1,heading:n("WT_ACKNOWLEDGEMENT"),details:[{title:n("WT_APPLICANT_DETAILS"),asSectionHeader:!0,values:[{title:n("WT_APPLICANT_NAME"),value:null==e||null===(i=e.applicantDetail)||void 0===i?void 0:i.name},{title:n("WT_MOBILE_NUMBER"),value:null==e||null===(o=e.applicantDetail)||void 0===o?void 0:o.mobileNumber},{title:n("WT_ALT_MOBILE_NUMBER"),value:null==e||null===(r=e.applicantDetail)||void 0===r?void 0:r.alternateNumber},{title:n("WT_EMAIL_ID"),value:null==e||null===(a=e.applicantDetail)||void 0===a?void 0:a.emailId}].filter(e=>e.value)},{title:n("WT_ADDRESS_DETAILS"),asSectionHeader:!0,values:[{title:n("WT_PINCODE"),value:null==e||null===(u=e.address)||void 0===u?void 0:u.pincode},{title:n("WT_CITY"),value:null==e||null===(c=e.address)||void 0===c?void 0:c.city},{title:n("WT_LOCALITY"),value:null==e||null===(s=e.address)||void 0===s?void 0:s.locality},{title:n("WT_STREET_NAME"),value:null==e||null===(d=e.address)||void 0===d?void 0:d.streetName},{title:n("WT_DOOR_NO"),value:null==e||null===(v=e.address)||void 0===v?void 0:v.doorNo},{title:n("WT_HOUSE_NO"),value:null==e||null===(p=e.address)||void 0===p?void 0:p.houseNo},{title:n("WT_ADDRESS_LINE1"),value:null==e||null===(E=e.address)||void 0===E?void 0:E.addressLine1},{title:n("WT_ADDRESS_LINE2"),value:null==e||null===(_=e.address)||void 0===_?void 0:_.addressLine2},{title:n("WT_LANDMARK"),value:null==e||null===(g=e.address)||void 0===g?void 0:g.landmark}].filter(e=>e.value)},{title:n("WT_REQUEST_DETAILS"),asSectionHeader:!0,values:[{title:n("WT_TANKER_TYPE"),value:null==e?void 0:e.tankerType},{title:n("WT_WATER_TYPE"),value:n(null==e?void 0:e.waterType)},{title:n("WT_TANKER_QUANTITY"),value:null==e?void 0:e.tankerQuantity},{title:n("WT_WATER_QUANTITY"),value:(null==e?void 0:e.waterQuantity)+" Ltr"},{title:n("WT_DELIVERY_DATE_TIME"),value:m(null==e?void 0:e.deliveryDate)+" ("+f(null==e?void 0:e.deliveryTime)+")"},{title:n("WT_DESCRIPTION"),value:null==e?void 0:e.description},{title:n("WT_IMMEDIATE"),value:n("Y"===(null==e?void 0:e.extraCharge)?"YES":"NO")}].filter(e=>e.value)}]})}catch(e){return Promise.reject(e)}var h},w=e=>{const{t:t}=o.useTranslation();return e.isSuccess?t("WT_SUBMIT_SUCCESSFULL"):e.isLoading?t("WT_APPLICATION_PENDING"):e.isSuccess?void 0:t("WT_APPLICATION_FAILED")},O={padding:"4px 0px",justifyContent:"space-between"},x=e=>{var n,l;return i.createElement(t.Banner,{message:w(e),applicationNumber:null===(n=e.data)||void 0===n||null===(l=n.waterTankerBookingDetail)||void 0===l?void 0:l.bookingNo,info:e.isSuccess?e.t("WT_BOOKING_NO"):"",successful:e.isSuccess,style:{width:"100%"}})},R=e=>{let{t:n,currentPage:l,columns:o,data:r,getCellProps:a,disableSort:u,onSort:c,onNextPage:s,onPrevPage:d,onPageSizeChange:v,isPaginationRequired:p,pageSizeLimit:f,sortParams:m,totalRecords:E}=e;return i.createElement(t.Table,{t:n,data:r,currentPage:l,columns:o,getCellProps:a,onNextPage:s,onPrevPage:d,pageSizeLimit:f,disableSort:u,isPaginationRequired:p,onPageSizeChange:v,onSort:c,sortParams:m,totalRecords:E})},L=e=>{let{businessService:n}=e;const{t:a}=o.useTranslation(),u=[],[c,s]=l.useState([]),{roles:d}=Digit.UserService.getUser().info;return l.useEffect(()=>{let e=u.filter(e=>e.businessService===n).filter(e=>{let{roles:t}=e;return t.some(e=>d.map(e=>{let{code:t}=e;return t}).includes(e))||!(null!=t&&t.length)});s(e)},[]),i.createElement(t.Card,{className:"employeeCard filter inboxLinks"},i.createElement("div",{className:"complaint-links-container"},i.createElement("div",{className:"header"},i.createElement("span",{className:"logo"},i.createElement(t.CHBIcon,null))," ",i.createElement("span",{className:"text"},a(n+"_REQUEST"))),i.createElement("div",{className:"body"},c.map((e,t)=>{let{link:n,text:l,hyperlink:o=!1,roles:u=[]}=e;return i.createElement("span",{className:"link",key:t},o?i.createElement("a",{href:n},l):i.createElement(r.Link,{to:n},a(l)))}))))},P={mobileNumber:t.MobileNumber},k=e=>{var n;let{onSearch:l,type:r,onClose:a,searchFields:c,searchParams:d,isInboxPage:v,clearSearch:p}=e;const{t:f}=o.useTranslation(),{handleSubmit:m,reset:E,watch:_,control:g,formState:h,setValue:S}=u.useForm({defaultValues:v?d:s({locality:null,city:null},d)}),y=_(),b=innerWidth<=640;function T(){const e=c.reduce((e,t)=>s({},e,{[null==t?void 0:t.name]:""}),{});if(E(e),v){const e=s({},d);e.delete=[],c.forEach(t=>{e.delete.push(null==t?void 0:t.name)}),l(s({},e))}else p()}const C=e=>i.createElement(t.LinkLabel,{style:s({display:"inline"},e?{margin:0}:{}),onClick:T},f("ES_COMMON_CLEAR_SEARCH"));return i.createElement("form",{onSubmit:m(e=>{e.mobileNumber||delete e.mobileNumber,e.delete=[],c.forEach(t=>{e[t.name]||e.delete.push(t.name)}),l(e),"mobile"===r&&a()})},i.createElement(i.Fragment,null,i.createElement("div",{className:"search-container",style:{width:"auto",marginLeft:v?"24px":"revert"}},i.createElement("div",{className:"search-complaint-container"},("mobile"===r||b)&&i.createElement("div",{className:"complaint-header"},i.createElement("h2",null,f("ES_COMMON_SEARCH_BY")),i.createElement("span",{onClick:a},i.createElement(t.CloseSvg,null))),i.createElement("div",{className:"complaint-input-container for-pt "+(v?"":"for-search"),style:{width:"100%",display:"grid"}},null==c||null===(n=c.filter(e=>!0))||void 0===n?void 0:n.map((e,n)=>{var l,o,r;return i.createElement("div",{key:e.name,className:"input-fields"},i.createElement("span",{className:"mobile-input"},i.createElement(t.Label,null,f(e.label)+" "+(e.isMendatory?"*":"")),i.createElement(u.Controller,e.type?{render:t=>i.createElement(null==P?void 0:P[e.type],{formValue:y,setValue:S,onChange:t.onChange,value:t.value}),name:e.name,control:g,defaultValue:""}:{render:e=>i.createElement(t.TextInput,{onChange:e.onChange,value:e.value}),name:e.name,control:g,defaultValue:""})),null!=h&&null!==(l=h.dirtyFields)&&void 0!==l&&l[e.name]?i.createElement("span",{style:{fontWeight:"700",color:"rgba(212, 53, 28)",paddingLeft:"8px",marginTop:"-20px",fontSize:"12px"},className:"inbox-search-form-error"},null==h||null===(o=h.errors)||void 0===o||null===(r=o[e.name])||void 0===r?void 0:r.message):null)}),v&&i.createElement("div",{style:{gridColumn:"2/3",textAlign:"right",paddingTop:"10px"},className:"input-fields"},i.createElement("div",null,C())),"desktop"===r&&!b&&i.createElement("div",{style:{maxWidth:"unset",marginLeft:"unset"},className:"search-submit-wrapper"},i.createElement(t.SubmitBar,{className:"submit-bar-search",label:f("ES_COMMON_SEARCH"),disabled:!!Object.keys(h.errors).length||(()=>{var e;let t=!0;return Object.keys(y).forEach(e=>{!["locality","city"].includes(e)&&y[e]&&(t=!1)}),null==c||!c.find(e=>"locality"===e.name)||null!=y&&null!==(e=y.locality)&&void 0!==e&&e.code||(t=!0),t})(),submit:!0}),!v&&i.createElement("div",null,C()))))),("mobile"===r||b)&&i.createElement(t.ActionBar,{className:"clear-search-container"},i.createElement("button",{className:"clear-search",style:{flex:1}},C(b)),i.createElement(t.SubmitBar,{disabled:!!Object.keys(h.errors).length,label:f("ES_COMMON_SEARCH"),style:{flex:1},submit:!0}))))},M=["tableConfig","filterComponent"],F=e=>{let{tableConfig:n,filterComponent:r}=e,a=d(e,M);const{data:u,useNewInboxAPI:c}=a,{t:s}=o.useTranslation(),[v,p]=l.useState(()=>{var e;return null===(e=Digit.ComponentRegistryService)||void 0===e?void 0:e.getComponent(r)}),[f,m]=l.useState(()=>{var e;return null===(e=Digit.ComponentRegistryService)||void 0===e?void 0:e.getComponent(a.EmptyResultInboxComp)}),[E,_]=l.useState(!1),g=i.useMemo(()=>a.isSearch?n.searchColumns(a):n.inboxColumns(a)||[],[]);let h;return a.isLoading?h=i.createElement(t.Loader,null):E?h=null:!u||0===(null==u?void 0:u.length)||c&&null!=u&&u[0].dataEmpty?h=f&&i.createElement(f,{data:u})||(0===(null==u?void 0:u.length)||c&&null!=u&&u[0].dataEmpty?i.createElement(t.Card,{style:{marginTop:20}},s("CS_MYAPPLICATIONS_NO_APPLICATION").split("\\n").map((e,t)=>i.createElement("p",{key:t,style:{textAlign:"center"}},e))):i.createElement(t.Loader,null)):(null==u?void 0:u.length)>0&&(h=i.createElement(R,{t:s,data:u,columns:g,getCellProps:e=>({style:{minWidth:e.column.Header===s("ES_INBOX_APPLICATION_NO")?"240px":"",padding:"20px 18px",fontSize:"16px"}}),onPageSizeChange:a.onPageSizeChange,currentPage:a.currentPage,onNextPage:a.onNextPage,onPrevPage:a.onPrevPage,pageSizeLimit:a.pageSizeLimit,onSort:a.onSort,disableSort:a.disableSort,sortParams:a.sortParams,totalRecords:a.totalRecords})),i.createElement("div",{className:"inbox-container"},!a.isSearch&&i.createElement("div",{className:"filters-container"},i.createElement(L,{parentRoute:a.parentRoute,businessService:a.moduleCode}),i.createElement("div",null,i.createElement(v,{defaultSearchParams:a.defaultSearchParams,onFilterChange:a.onFilterChange,searchParams:a.searchParams,type:"desktop",useNewInboxAPI:c,statusMap:c?null==u?void 0:u[0].statusMap:null,moduleCode:a.moduleCode}))),i.createElement("div",{style:{flex:1}},i.createElement(k,{defaultSearchParams:a.defaultSearchParams,onSearch:e=>{a.onSearch(e),_(!1)},type:"desktop",searchFields:a.searchFields,isInboxPage:!(null!=a&&a.isSearch),searchParams:a.searchParams,clearSearch:()=>_(!0)}),i.createElement("div",{className:"result",style:{marginLeft:null!=a&&a.isSearch?"":"24px",flex:1}},h)))},B=e=>{const{t:n}=o.useTranslation(),[r,a]=l.useState(()=>{var t,l;return null!==(t=e.sortParams)&&void 0!==t&&null!==(l=t[0])&&void 0!==l&&l.desc?{code:"DESC",name:n("ES_INBOX_DATE_LATEST_FIRST")}:{code:"ASC",name:n("ES_INBOX_DATE_LATEST_LAST")}});function u(){}return i.createElement(i.Fragment,null,i.createElement("div",{className:"filter"},i.createElement("div",{className:"filter-card"},i.createElement("div",{className:"heading"},i.createElement("div",{className:"filter-label"},n("SORT_BY"),":"),i.createElement("div",{className:"clearAll",onClick:u},n("ES_COMMON_CLEAR_ALL")),"desktop"===e.type&&i.createElement("span",{className:"clear-search",onClick:u},n("ES_COMMON_CLEAR_ALL")),"mobile"===e.type&&i.createElement("span",{onClick:e.onClose},i.createElement(t.CloseSvg,null))),i.createElement("div",null,i.createElement(t.RadioButtons,{onSelect:function(t){e.onSort([{id:"createdTime",desc:"DESC"===t.code}]),e.onClose()},selectedOption:r,optionsKey:"name",options:[{code:"DESC",name:n("ES_INBOX_DATE_LATEST_FIRST")},{code:"ASC",name:n("ES_INBOX_DATE_LATEST_LAST")}]})))))},U=e=>{let{t:n,data:o,onFilterChange:r,onSearch:a,onSort:u,serviceRequestIdKey:c,isFstpOperator:s,isLoading:d,isSearch:v,searchParams:p,searchFields:f,sortParams:m,linkPrefix:E,filterComponent:_}=e;const[g,h]=l.useState(v?"SEARCH":""),[S,y]=l.useState(!!v),[b,T]=l.useState(m),[C]=l.useState(()=>{var e;return null===(e=Digit.ComponentRegistryService)||void 0===e?void 0:e.getComponent(_)});l.useEffect(()=>{g&&y(!0)},[g]);const A=()=>{y(!1),h(""),T(m)};if(d)return i.createElement(t.Loader,null);let D;return o&&0!==(null==o?void 0:o.length)?o&&(null==o?void 0:o.length)>0&&(D=i.createElement(t.DetailsCard,{data:o,serviceRequestIdKey:c,linkPrefix:E||"/digit-ui/employee/chb/"})):D=i.createElement(t.Card,{style:{marginTop:20}},n("CS_MYAPPLICATIONS_NO_APPLICATION").split("\\n").map((e,t)=>i.createElement("p",{key:t,style:{textAlign:"center"}},e))),i.createElement(i.Fragment,null,i.createElement("div",{className:"searchBox"},a&&i.createElement(t.SearchAction,{text:"SEARCH",handleActionClick:()=>{h("SEARCH"),y(!0)}}),!v&&r&&i.createElement(t.FilterAction,{text:"FILTER",handleActionClick:()=>{h("FILTER"),y(!0)}}),i.createElement(t.FilterAction,{text:"SORT",handleActionClick:()=>{h("SORT"),y(!0)}})),D,S&&i.createElement(t.PopUp,null,"FILTER"===g&&i.createElement("div",{className:"popup-module"},i.createElement(C,{onFilterChange:e=>{r(e),y(!1)},Close:A,type:"mobile",searchParams:p})),"SORT"===g&&i.createElement("div",{className:"popup-module"},i.createElement(B,{type:"mobile",sortParams:m,onClose:A,onSort:u})),"SEARCH"===g&&i.createElement("div",{className:"popup-module"},i.createElement(k,{type:"mobile",onClose:A,onSearch:a,isFstpOperator:s,searchParams:p,searchFields:f}))))},W=e=>{let{classNameForMobileView:n=""}=e;const{t:a}=o.useTranslation(),u=[],[c,s]=l.useState([]),{roles:d}=Digit.UserService.getUser().info;return l.useEffect(()=>{let e=[];u.forEach(t=>{var n;t.accessTo?(n=t.accessTo,d.filter(e=>n.includes(e.code)).length&&e.push(t)):e.push(t)}),s(e)},[]),i.createElement(t.Card,{className:"employeeCard filter"},i.createElement("div",{className:"complaint-links-container "+n},i.createElement("div",{className:"header"},i.createElement("span",{className:"logo"},i.createElement(t.ShippingTruck,null))," ",i.createElement("span",{className:"text"},a("ES_TITLE_WT_REGISTRATION"))),i.createElement("div",{className:"body"},c.map((e,t)=>{let{link:n,text:l}=e;return i.createElement("span",{className:"link",key:t},i.createElement(r.Link,{to:n},l))}))))},j=e=>{let{data:t,isLoading:n,isSearch:l,searchFields:r,onFilterChange:a,onSearch:u,onSort:c,parentRoute:s,searchParams:d,sortParams:v,linkPrefix:p,tableConfig:f,filterComponent:m}=e;const{t:E}=o.useTranslation();return i.createElement("div",{style:{padding:0}},i.createElement("div",{className:"inbox-container"},i.createElement("div",{className:"filters-container"},!l&&i.createElement(W,{classNameForMobileView:"linksWrapperForMobileInbox",linkPrefix:s,isMobile:!0}),i.createElement(U,{t:E,data:null==t?void 0:t.map(e=>{const t={};return(l?f.searchColumns():f.inboxColumns()).forEach(n=>{n.mobileCell&&(t[n.Header]=n.mobileCell(e))}),t}),onFilterChange:a,isLoading:n,isSearch:l,onSearch:u,onSort:c,searchParams:d,searchFields:r,linkPrefix:p,sortParams:v,serviceRequestIdKey:null==f?void 0:f.serviceRequestIdKey,filterComponent:m}))))},H=["isFetching","isLoading","searchResponseKey","data","searchFields"],z=e=>{var n,r,a,u,c;let{useNewInboxAPI:v,parentRoute:p,moduleCode:f,initialStates:m={},filterComponent:E,isInbox:_,rawWfHandler:g,rawSearchHandler:h,combineResponse:S,wfConfig:y,searchConfig:b,middlewaresWf:T,middlewareSearch:C,EmptyResultInboxComp:A}=e;const D=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),N=Digit.UserService.getUser().info,{t:I}=o.useTranslation(),[w,O]=l.useState(()=>_?{}:{enabled:!1}),[x,R]=l.useState(()=>{var e;return null===(e=Digit.ComponentRegistryService)||void 0===e?void 0:e.getComponent("WTInboxTableConfig")}),[L,P]=l.useState(m.pageOffset||0),[k,M]=l.useState(m.pageSize||10),[B,U]=l.useState(m.sortParams||[{id:"createdTime",desc:!0}]),[W,z]=l.useState(m.searchParams||{});let V=window.Digit.Utils.browser.isMobile(),G=V?{limit:100,offset:0,sortBy:null==B||null===(n=B[0])||void 0===n?void 0:n.id,sortOrder:null!=B&&null!==(r=B[0])&&void 0!==r&&r.desc?"DESC":"ASC"}:{limit:k,offset:L,sortBy:null==B||null===(a=B[0])||void 0===a?void 0:a.id,sortOrder:null!=B&&null!==(u=B[0])&&void 0!==u&&u.desc?"DESC":"ASC"};const K=v?Digit.Hooks.useNewInboxGeneral({tenantId:D,ModuleCode:f,filters:s({},W,G,{sortParams:B})}):Digit.Hooks.useInboxGeneral({tenantId:D,businessService:f,isInbox:_,filters:s({},W,G,{sortParams:B}),rawWfHandler:g,rawSearchHandler:h,combineResponse:S,wfConfig:y,searchConfig:s({},w,b),middlewaresWf:T,middlewareSearch:C}),{isLoading:q,data:Y,searchFields:X}=K,Z=d(K,H);l.useEffect(()=>{P(0)},[W]);const $=e=>{let t=e.delete,n=s({},W,e);t&&t.forEach(e=>delete n[e]),delete e.delete,z(s({},n)),O({enabled:!0})},Q=l.useCallback(e=>{0!==e.length&&U(e)},[]);var J,ee;if(null!==(null==Z||null===(c=Z.data)||void 0===c?void 0:c.length))return V?i.createElement(j,{data:Y,isLoading:q,isSearch:!_,searchFields:X,onFilterChange:$,onSearch:$,onSort:Q,parentRoute:p,searchParams:W,sortParams:B,linkPrefix:p+"/application-details/",tableConfig:null!=Z&&Z.tableConfig?null===(J=res)||void 0===J?void 0:J.tableConfig:x(I)[f],filterComponent:E,EmptyResultInboxComp:A,useNewInboxAPI:v}):i.createElement("div",{style:{padding:"CITIZEN"===(null==N?void 0:N.type)?"0 24px":""}},_&&i.createElement(t.Header,null,I("ES_COMMON_INBOX")),i.createElement(F,{moduleCode:f,data:Y,tableConfig:x(I)[f],isLoading:q,defaultSearchParams:m.searchParams,isSearch:!_,onFilterChange:$,searchFields:X,onSearch:$,onSort:Q,onNextPage:()=>{P(e=>e+k)},onPrevPage:()=>{P(e=>e-k)},currentPage:Math.floor(L/k),pageSizeLimit:k,disableSort:!1,onPageSizeChange:e=>{M(Number(e.target.value))},parentRoute:p,searchParams:W,sortParams:B,totalRecords:Number(null==Y||null===(ee=Y[0])||void 0===ee?void 0:ee.totalCount),filterComponent:E,EmptyResultInboxComp:A,useNewInboxAPI:v}))},V=e=>{var n,l,a,u;let{path:c}=e;o.useTranslation();const d=r.useLocation();sessionStorage.removeItem("revalidateddone"),window.Digit.Utils.browser.isMobile();const v={searchParams:{uuid:{code:"ASSIGNED_TO_ALL",name:"ES_INBOX_ASSIGNED_TO_ALL"},services:["watertanker"],applicationStatus:[],locality:[]}},p={searchParams:{uuid:{code:"ASSIGNED_TO_ALL",name:"ES_INBOX_ASSIGNED_TO_ALL"},services:["mobileToilet"],applicationStatus:[],locality:[]}},f={searchParams:{uuid:{code:"ASSIGNED_TO_ALL",name:"ES_INBOX_ASSIGNED_TO_ALL"},services:["treePruning"],applicationStatus:[],locality:[]}},m=null===(n=Digit)||void 0===n||null===(l=n.ComponentRegistryService)||void 0===l?void 0:l.getComponent("ApplicationDetails"),E=null===(a=Digit)||void 0===a||null===(u=a.ComponentRegistryService)||void 0===u?void 0:u.getComponent("WTCreate"),_=window.location.href.includes("info")||window.location.href.includes("wt/status");return i.createElement(r.Switch,null,i.createElement(t.AppContainer,null,i.createElement(i.Fragment,null,i.createElement("div",{className:"ground-container"},i.createElement("div",{style:_?{marginLeft:"12px",display:"flex",alignItems:"center"}:{marginLeft:"-4px",display:"flex",alignItems:"center"}},i.createElement(t.BackButton,{location:d})),i.createElement(t.PrivateRoute,{path:c+"/inbox",component:()=>i.createElement(z,{useNewInboxAPI:!0,parentRoute:c,businessService:"watertanker",moduleCode:"WT",filterComponent:"WT_INBOX_FILTER",initialStates:v,isInbox:!0})}),i.createElement(t.PrivateRoute,{path:c+"/mt/inbox",component:()=>i.createElement(z,{useNewInboxAPI:!0,parentRoute:c,moduleCode:"MT",businessService:"mobileToilet",filterComponent:"WT_INBOX_FILTER",initialStates:p,isInbox:!0})}),i.createElement(t.PrivateRoute,{path:c+"/tp/inbox",component:()=>i.createElement(z,{useNewInboxAPI:!0,parentRoute:c,moduleCode:"TP",businessService:"treePruning",filterComponent:"WT_INBOX_FILTER",initialStates:f,isInbox:!0})}),i.createElement(t.PrivateRoute,{path:c+"/request-service",component:E}),i.createElement(t.PrivateRoute,{path:c+"/mt/request-service",component:E}),i.createElement(t.PrivateRoute,{path:c+"/tp/request-service",component:E}),i.createElement(t.PrivateRoute,{path:c+"/booking-details/:id",component:()=>i.createElement(m,{parentRoute:c})}),i.createElement(t.PrivateRoute,{path:c+"/bookingsearch/booking-details/:id",component:()=>i.createElement(m,{parentRoute:c})}),i.createElement(t.PrivateRoute,{path:c+"/my-bookings",component:e=>i.createElement(g,s({},e,{parentRoute:c,moduleCode:"WT"}))}),i.createElement(t.PrivateRoute,{path:c+"/mt/my-bookings",component:e=>i.createElement(g,s({},e,{parentRoute:c,moduleCode:"MT"}))}),i.createElement(t.PrivateRoute,{path:c+"/tp/my-bookings",component:e=>i.createElement(g,s({},e,{parentRoute:c,moduleCode:"TP"}))})))))},G=e=>{var n,l;let{application:a,tenantId:u,buttonLabel:c}=e,s=null==a?void 0:a.bookingNo.split("-")[0];const{t:d}=o.useTranslation();return i.createElement(t.Card,null,i.createElement(t.KeyNote,{keyValue:d("BOOKING_NO"),note:null==a?void 0:a.bookingNo}),i.createElement(t.KeyNote,{keyValue:d("APPLICANT_NAME"),note:null==a||null===(n=a.applicantDetail)||void 0===n?void 0:n.name}),i.createElement(t.KeyNote,{keyValue:d("MOBILE_NUMBER"),note:d(""+(null==a||null===(l=a.applicantDetail)||void 0===l?void 0:l.mobileNumber))}),i.createElement(t.KeyNote,{keyValue:d("LOCALITY"),note:d(""+(null==a?void 0:a.localityCode))}),i.createElement(t.KeyNote,{keyValue:d("PT_COMMON_TABLE_COL_STATUS_LABEL"),note:d(""+(null==a?void 0:a.bookingStatus))}),i.createElement("div",null,"WT"===s&&i.createElement(r.Link,{to:"/digit-ui/citizen/wt/booking/waterTanker/"+(null==a?void 0:a.bookingNo)+"/"+u},i.createElement(t.SubmitBar,{label:c})),"MT"===s&&i.createElement(r.Link,{to:"/digit-ui/citizen/wt/booking/mobileToilet/"+(null==a?void 0:a.bookingNo)+"/"+u},i.createElement(t.SubmitBar,{label:c})),"TP"===s&&i.createElement(r.Link,{to:"/digit-ui/citizen/wt/booking/treePruning/"+(null==a?void 0:a.bookingNo)+"/"+u},i.createElement(t.SubmitBar,{label:c}))))};var K=Array.isArray,q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Y(e,t){return e(t={exports:{}},t.exports),t.exports}var X,Z="object"==typeof self&&self&&self.Object===Object&&self,$="object"==typeof q&&q&&q.Object===Object&&q||Z||Function("return this")(),Q=$.Symbol,J=Object.prototype,ee=J.hasOwnProperty,te=J.toString,ne=Q?Q.toStringTag:void 0,le=Object.prototype.toString,ie=Q?Q.toStringTag:void 0,oe=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ie&&ie in Object(e)?function(e){var t=ee.call(e,ne),n=e[ne];try{e[ne]=void 0;var l=!0}catch(e){}var i=te.call(e);return l&&(t?e[ne]=n:delete e[ne]),i}(e):function(e){return le.call(e)}(e)},re=function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==oe(e)},ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ue=/^\w*$/,ce=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},se=$["__core-js_shared__"],de=(X=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||""))?"Symbol(src)_1."+X:"",ve=Function.prototype.toString,pe=/^\[object .+?Constructor\]$/,fe=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ce(e)||(t=e,de&&de in t))&&(function(e){if(!ce(e))return!1;var t=oe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)?fe:pe).test(function(e){if(null!=e){try{return ve.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}(n)?n:void 0},Ee=me(Object,"create"),_e=Object.prototype.hasOwnProperty,ge=Object.prototype.hasOwnProperty;function he(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}he.prototype.clear=function(){this.__data__=Ee?Ee(null):{},this.size=0},he.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},he.prototype.get=function(e){var t=this.__data__;if(Ee){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return _e.call(t,e)?t[e]:void 0},he.prototype.has=function(e){var t=this.__data__;return Ee?void 0!==t[e]:ge.call(t,e)},he.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ee&&void 0===t?"__lodash_hash_undefined__":t,this};var Se=he,ye=function(e,t){for(var n=e.length;n--;)if((l=e[n][0])===(i=t)||l!=l&&i!=i)return n;var l,i;return-1},be=Array.prototype.splice;function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}Te.prototype.clear=function(){this.__data__=[],this.size=0},Te.prototype.delete=function(e){var t=this.__data__,n=ye(t,e);return!(n<0||(n==t.length-1?t.pop():be.call(t,n,1),--this.size,0))},Te.prototype.get=function(e){var t=this.__data__,n=ye(t,e);return n<0?void 0:t[n][1]},Te.prototype.has=function(e){return ye(this.__data__,e)>-1},Te.prototype.set=function(e,t){var n=this.__data__,l=ye(n,e);return l<0?(++this.size,n.push([e,t])):n[l][1]=t,this};var Ce=Te,Ae=me($,"Map"),De=function(e,t){var n,l,i=e.__data__;return("string"==(l=typeof(n=t))||"number"==l||"symbol"==l||"boolean"==l?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}Ne.prototype.clear=function(){this.size=0,this.__data__={hash:new Se,map:new(Ae||Ce),string:new Se}},Ne.prototype.delete=function(e){var t=De(this,e).delete(e);return this.size-=t?1:0,t},Ne.prototype.get=function(e){return De(this,e).get(e)},Ne.prototype.has=function(e){return De(this,e).has(e)},Ne.prototype.set=function(e,t){var n=De(this,e),l=n.size;return n.set(e,t),this.size+=n.size==l?0:1,this};var Ie=Ne;function we(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var l=arguments,i=t?t.apply(this,l):l[0],o=n.cache;if(o.has(i))return o.get(i);var r=e.apply(this,l);return n.cache=o.set(i,r)||o,r};return n.cache=new(we.Cache||Ie),n}we.Cache=Ie;var Oe,xe,Re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Le=/\\(\\)?/g,Pe=(Oe=we(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Re,function(e,n,l,i){t.push(l?i.replace(Le,"$1"):n||e)}),t},function(e){return 500===xe.size&&xe.clear(),e}),xe=Oe.cache,Oe),ke=Q?Q.prototype:void 0,Me=ke?ke.toString:void 0,Fe=function(e){if("string"==typeof e||re(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},Be=function(e,t,n){var l=null==e?void 0:function(e,t){for(var n=0,l=(t=function(e,t){return K(e)?e:function(e,t){if(K(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!re(e))||ue.test(e)||!ae.test(e)||null!=t&&e in Object(t)}(e,t)?[e]:Pe(function(e){return null==e?"":function e(t){if("string"==typeof t)return t;if(K(t))return function(e,t){for(var n=-1,l=null==e?0:e.length,i=Array(l);++n<l;)i[n]=t(e[n],n,e);return i}(t,e)+"";if(re(t))return Me?Me.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}(e)}(e))}(t,e)).length;null!=e&&n<l;)e=e[Fe(t[n++])];return n&&n==l?e:void 0}(e,t);return void 0===l?n:l},Ue=Y(function(e,t){(function(){var n="Expected a function",l="__lodash_placeholder__",i=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],o="[object Arguments]",r="[object Array]",a="[object Boolean]",u="[object Date]",c="[object Error]",s="[object Function]",d="[object GeneratorFunction]",v="[object Map]",p="[object Number]",f="[object Object]",m="[object RegExp]",E="[object Set]",_="[object String]",g="[object Symbol]",h="[object WeakMap]",S="[object ArrayBuffer]",y="[object DataView]",b="[object Float32Array]",T="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",D="[object Int32Array]",N="[object Uint8Array]",I="[object Uint16Array]",w="[object Uint32Array]",O=/\b__p \+= '';/g,x=/\b(__p \+=) '' \+/g,R=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,P=/[&<>"']/g,k=RegExp(L.source),M=RegExp(P.source),F=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,U=/<%=([\s\S]+?)%>/g,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,j=/^\w*$/,H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,z=/[\\^$.*+?()[\]{}|]/g,V=RegExp(z.source),G=/^\s+/,K=/\s/,Y=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,X=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,$=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Q=/[()=,{}\[\]\/\s]/,J=/\\(\\)?/g,ee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ne=/^[-+]0x[0-9a-f]+$/i,le=/^0b[01]+$/i,ie=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,re=/^(?:0|[1-9]\d*)$/,ae=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,ce=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ve="["+de+"]",pe="["+se+"]",fe="\\d+",me="[a-z\\xdf-\\xf6\\xf8-\\xff]",Ee="[^\\ud800-\\udfff"+de+fe+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",ge="[^\\ud800-\\udfff]",he="(?:\\ud83c[\\udde6-\\uddff]){2}",Se="[\\ud800-\\udbff][\\udc00-\\udfff]",ye="[A-Z\\xc0-\\xd6\\xd8-\\xde]",be="(?:"+me+"|"+Ee+")",Te="(?:"+ye+"|"+Ee+")",Ce="(?:"+pe+"|"+_e+")?",Ae="[\\ufe0e\\ufe0f]?"+Ce+"(?:\\u200d(?:"+[ge,he,Se].join("|")+")[\\ufe0e\\ufe0f]?"+Ce+")*",De="(?:"+["[\\u2700-\\u27bf]",he,Se].join("|")+")"+Ae,Ne="(?:"+[ge+pe+"?",pe,he,Se,"[\\ud800-\\udfff]"].join("|")+")",Ie=RegExp("['’]","g"),we=RegExp(pe,"g"),Oe=RegExp(_e+"(?="+_e+")|"+Ne+Ae,"g"),xe=RegExp([ye+"?"+me+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ve,ye,"$"].join("|")+")",Te+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ve,ye+be,"$"].join("|")+")",ye+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ye+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fe,De].join("|"),"g"),Re=RegExp("[\\u200d\\ud800-\\udfff"+se+"\\ufe0e\\ufe0f]"),Le=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ke=-1,Me={};Me[b]=Me[T]=Me[C]=Me[A]=Me[D]=Me[N]=Me["[object Uint8ClampedArray]"]=Me[I]=Me[w]=!0,Me[o]=Me[r]=Me[S]=Me[a]=Me[y]=Me[u]=Me[c]=Me[s]=Me[v]=Me[p]=Me[f]=Me[m]=Me[E]=Me[_]=Me[h]=!1;var Fe={};Fe[o]=Fe[r]=Fe[S]=Fe[y]=Fe[a]=Fe[u]=Fe[b]=Fe[T]=Fe[C]=Fe[A]=Fe[D]=Fe[v]=Fe[p]=Fe[f]=Fe[m]=Fe[E]=Fe[_]=Fe[g]=Fe[N]=Fe["[object Uint8ClampedArray]"]=Fe[I]=Fe[w]=!0,Fe[c]=Fe[s]=Fe[h]=!1;var Be={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ue=parseFloat,We=parseInt,je="object"==typeof q&&q&&q.Object===Object&&q,He="object"==typeof self&&self&&self.Object===Object&&self,ze=je||He||Function("return this")(),Ve=t&&!t.nodeType&&t,Ge=Ve&&e&&!e.nodeType&&e,Ke=Ge&&Ge.exports===Ve,qe=Ke&&je.process,Ye=function(){try{return Ge&&Ge.require&&Ge.require("util").types||qe&&qe.binding&&qe.binding("util")}catch(e){}}(),Xe=Ye&&Ye.isArrayBuffer,Ze=Ye&&Ye.isDate,$e=Ye&&Ye.isMap,Qe=Ye&&Ye.isRegExp,Je=Ye&&Ye.isSet,et=Ye&&Ye.isTypedArray;function tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function nt(e,t,n,l){for(var i=-1,o=null==e?0:e.length;++i<o;){var r=e[i];t(l,r,n(r),e)}return l}function lt(e,t){for(var n=-1,l=null==e?0:e.length;++n<l&&!1!==t(e[n],n,e););return e}function it(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ot(e,t){for(var n=-1,l=null==e?0:e.length;++n<l;)if(!t(e[n],n,e))return!1;return!0}function rt(e,t){for(var n=-1,l=null==e?0:e.length,i=0,o=[];++n<l;){var r=e[n];t(r,n,e)&&(o[i++]=r)}return o}function at(e,t){return!(null==e||!e.length)&&_t(e,t,0)>-1}function ut(e,t,n){for(var l=-1,i=null==e?0:e.length;++l<i;)if(n(t,e[l]))return!0;return!1}function ct(e,t){for(var n=-1,l=null==e?0:e.length,i=Array(l);++n<l;)i[n]=t(e[n],n,e);return i}function st(e,t){for(var n=-1,l=t.length,i=e.length;++n<l;)e[i+n]=t[n];return e}function dt(e,t,n,l){var i=-1,o=null==e?0:e.length;for(l&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function vt(e,t,n,l){var i=null==e?0:e.length;for(l&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function pt(e,t){for(var n=-1,l=null==e?0:e.length;++n<l;)if(t(e[n],n,e))return!0;return!1}var ft=yt("length");function mt(e,t,n){var l;return n(e,function(e,n,i){if(t(e,n,i))return l=n,!1}),l}function Et(e,t,n,l){for(var i=e.length,o=n+(l?1:-1);l?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function _t(e,t,n){return t==t?function(e,t,n){for(var l=n-1,i=e.length;++l<i;)if(e[l]===t)return l;return-1}(e,t,n):Et(e,ht,n)}function gt(e,t,n,l){for(var i=n-1,o=e.length;++i<o;)if(l(e[i],t))return i;return-1}function ht(e){return e!=e}function St(e,t){var n=null==e?0:e.length;return n?Ct(e,t)/n:NaN}function yt(e){return function(t){return null==t?void 0:t[e]}}function bt(e){return function(t){return null==e?void 0:e[t]}}function Tt(e,t,n,l,i){return i(e,function(e,i,o){n=l?(l=!1,e):t(n,e,i,o)}),n}function Ct(e,t){for(var n,l=-1,i=e.length;++l<i;){var o=t(e[l]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function At(e,t){for(var n=-1,l=Array(e);++n<e;)l[n]=t(n);return l}function Dt(e){return e?e.slice(0,Vt(e)+1).replace(G,""):e}function Nt(e){return function(t){return e(t)}}function It(e,t){return ct(t,function(t){return e[t]})}function wt(e,t){return e.has(t)}function Ot(e,t){for(var n=-1,l=e.length;++n<l&&_t(t,e[n],0)>-1;);return n}function xt(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function Rt(e,t){for(var n=e.length,l=0;n--;)e[n]===t&&++l;return l}var Lt=bt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Pt=bt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function kt(e){return"\\"+Be[e]}function Mt(e){return Re.test(e)}function Ft(e){var t=-1,n=Array(e.size);return e.forEach(function(e,l){n[++t]=[l,e]}),n}function Bt(e,t){return function(n){return e(t(n))}}function Ut(e,t){for(var n=-1,i=e.length,o=0,r=[];++n<i;){var a=e[n];a!==t&&a!==l||(e[n]=l,r[o++]=n)}return r}function Wt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function jt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function Ht(e){return Mt(e)?function(e){for(var t=Oe.lastIndex=0;Oe.test(e);)++t;return t}(e):ft(e)}function zt(e){return Mt(e)?function(e){return e.match(Oe)||[]}(e):function(e){return e.split("")}(e)}function Vt(e){for(var t=e.length;t--&&K.test(e.charAt(t)););return t}var Gt=bt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Kt=function e(t){var K=(t=null==t?ze:Kt.defaults(ze.Object(),t,Kt.pick(ze,Pe))).Array,q=t.Date,se=t.Error,de=t.Function,ve=t.Math,pe=t.Object,fe=t.RegExp,me=t.String,Ee=t.TypeError,_e=K.prototype,ge=pe.prototype,he=t["__core-js_shared__"],Se=de.prototype.toString,ye=ge.hasOwnProperty,be=0,Te=function(){var e=/[^.]+$/.exec(he&&he.keys&&he.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ce=ge.toString,Ae=Se.call(pe),De=ze._,Ne=fe("^"+Se.call(ye).replace(z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Oe=Ke?t.Buffer:void 0,Re=t.Symbol,Be=t.Uint8Array,je=Oe?Oe.allocUnsafe:void 0,He=Bt(pe.getPrototypeOf,pe),Ve=pe.create,Ge=ge.propertyIsEnumerable,qe=_e.splice,Ye=Re?Re.isConcatSpreadable:void 0,ft=Re?Re.iterator:void 0,bt=Re?Re.toStringTag:void 0,qt=function(){try{var e=$i(pe,"defineProperty");return e({},"",{}),e}catch(e){}}(),Yt=t.clearTimeout!==ze.clearTimeout&&t.clearTimeout,Xt=q&&q.now!==ze.Date.now&&q.now,Zt=t.setTimeout!==ze.setTimeout&&t.setTimeout,$t=ve.ceil,Qt=ve.floor,Jt=pe.getOwnPropertySymbols,en=Oe?Oe.isBuffer:void 0,tn=t.isFinite,nn=_e.join,ln=Bt(pe.keys,pe),on=ve.max,rn=ve.min,an=q.now,un=t.parseInt,cn=ve.random,sn=_e.reverse,dn=$i(t,"DataView"),vn=$i(t,"Map"),pn=$i(t,"Promise"),fn=$i(t,"Set"),mn=$i(t,"WeakMap"),En=$i(pe,"create"),_n=mn&&new mn,gn={},hn=Ao(dn),Sn=Ao(vn),yn=Ao(pn),bn=Ao(fn),Tn=Ao(mn),Cn=Re?Re.prototype:void 0,An=Cn?Cn.valueOf:void 0,Dn=Cn?Cn.toString:void 0;function Nn(e){if(Hr(e)&&!xr(e)&&!(e instanceof xn)){if(e instanceof On)return e;if(ye.call(e,"__wrapped__"))return Do(e)}return new On(e)}var In=function(){function e(){}return function(t){if(!jr(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function wn(){}function On(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function xn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Rn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}function Ln(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}function kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Pn;++t<n;)this.add(e[t])}function Mn(e){var t=this.__data__=new Ln(e);this.size=t.size}function Fn(e,t){var n=xr(e),l=!n&&Or(e),i=!n&&!l&&kr(e),o=!n&&!l&&!i&&Zr(e),r=n||l||i||o,a=r?At(e.length,me):[],u=a.length;for(var c in e)!t&&!ye.call(e,c)||r&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||io(c,u))||a.push(c);return a}function Bn(e){var t=e.length;return t?e[Pl(0,t-1)]:void 0}function Un(e,t){return bo(mi(e),Yn(t,0,e.length))}function Wn(e){return bo(mi(e))}function jn(e,t,n){(void 0!==n&&!Nr(e[t],n)||void 0===n&&!(t in e))&&Kn(e,t,n)}function Hn(e,t,n){var l=e[t];ye.call(e,t)&&Nr(l,n)&&(void 0!==n||t in e)||Kn(e,t,n)}function zn(e,t){for(var n=e.length;n--;)if(Nr(e[n][0],t))return n;return-1}function Vn(e,t,n,l){return Jn(e,function(e,i,o){t(l,e,n(e),o)}),l}function Gn(e,t){return e&&Ei(t,ga(t),e)}function Kn(e,t,n){"__proto__"==t&&qt?qt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function qn(e,t){for(var n=-1,l=t.length,i=K(l),o=null==e;++n<l;)i[n]=o?void 0:pa(e,t[n]);return i}function Yn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Xn(e,t,n,l,i,r){var c,h=1&t,O=2&t,x=4&t;if(n&&(c=i?n(e,l,i,r):n(e)),void 0!==c)return c;if(!jr(e))return e;var R=xr(e);if(R){if(c=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ye.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!h)return mi(e,c)}else{var L=eo(e),P=L==s||L==d;if(kr(e))return ci(e,h);if(L==f||L==o||P&&!i){if(c=O||P?{}:no(e),!h)return O?function(e,t){return Ei(e,Ji(e),t)}(e,function(e,t){return e&&Ei(t,ha(t),e)}(c,e)):function(e,t){return Ei(e,Qi(e),t)}(e,Gn(c,e))}else{if(!Fe[L])return i?e:{};c=function(e,t,n){var l=e.constructor;switch(t){case S:return si(e);case a:case u:return new l(+e);case y:return function(e,t){var n=t?si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case b:case T:case C:case A:case D:case N:case"[object Uint8ClampedArray]":case I:case w:return di(e,n);case v:return new l;case p:case _:return new l(e);case m:return function(e){var t=new e.constructor(e.source,te.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new l;case g:return An?pe(An.call(e)):{}}}(e,L,h)}}r||(r=new Mn);var k=r.get(e);if(k)return k;r.set(e,c),qr(e)?e.forEach(function(l){c.add(Xn(l,t,n,l,e,r))}):zr(e)&&e.forEach(function(l,i){c.set(i,Xn(l,t,n,i,e,r))});var M=R?void 0:(x?O?Vi:zi:O?ha:ga)(e);return lt(M||e,function(l,i){M&&(l=e[i=l]),Hn(c,i,Xn(l,t,n,i,e,r))}),c}function Zn(e,t,n){var l=n.length;if(null==e)return!l;for(e=pe(e);l--;){var i=n[l],o=e[i];if(void 0===o&&!(i in e)||!(0,t[i])(o))return!1}return!0}function $n(e,t,l){if("function"!=typeof e)throw new Ee(n);return go(function(){e.apply(void 0,l)},t)}function Qn(e,t,n,l){var i=-1,o=at,r=!0,a=e.length,u=[],c=t.length;if(!a)return u;n&&(t=ct(t,Nt(n))),l?(o=ut,r=!1):t.length>=200&&(o=wt,r=!1,t=new kn(t));e:for(;++i<a;){var s=e[i],d=null==n?s:n(s);if(s=l||0!==s?s:0,r&&d==d){for(var v=c;v--;)if(t[v]===d)continue e;u.push(s)}else o(t,d,l)||u.push(s)}return u}Nn.templateSettings={escape:F,evaluate:B,interpolate:U,variable:"",imports:{_:Nn}},(Nn.prototype=wn.prototype).constructor=Nn,(On.prototype=In(wn.prototype)).constructor=On,(xn.prototype=In(wn.prototype)).constructor=xn,Rn.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},Rn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Rn.prototype.get=function(e){var t=this.__data__;if(En){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ye.call(t,e)?t[e]:void 0},Rn.prototype.has=function(e){var t=this.__data__;return En?void 0!==t[e]:ye.call(t,e)},Rn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=En&&void 0===t?"__lodash_hash_undefined__":t,this},Ln.prototype.clear=function(){this.__data__=[],this.size=0},Ln.prototype.delete=function(e){var t=this.__data__,n=zn(t,e);return!(n<0||(n==t.length-1?t.pop():qe.call(t,n,1),--this.size,0))},Ln.prototype.get=function(e){var t=this.__data__,n=zn(t,e);return n<0?void 0:t[n][1]},Ln.prototype.has=function(e){return zn(this.__data__,e)>-1},Ln.prototype.set=function(e,t){var n=this.__data__,l=zn(n,e);return l<0?(++this.size,n.push([e,t])):n[l][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Rn,map:new(vn||Ln),string:new Rn}},Pn.prototype.delete=function(e){var t=Xi(this,e).delete(e);return this.size-=t?1:0,t},Pn.prototype.get=function(e){return Xi(this,e).get(e)},Pn.prototype.has=function(e){return Xi(this,e).has(e)},Pn.prototype.set=function(e,t){var n=Xi(this,e),l=n.size;return n.set(e,t),this.size+=n.size==l?0:1,this},kn.prototype.add=kn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},kn.prototype.has=function(e){return this.__data__.has(e)},Mn.prototype.clear=function(){this.__data__=new Ln,this.size=0},Mn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Mn.prototype.get=function(e){return this.__data__.get(e)},Mn.prototype.has=function(e){return this.__data__.has(e)},Mn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ln){var l=n.__data__;if(!vn||l.length<199)return l.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pn(l)}return n.set(e,t),this.size=n.size,this};var Jn=hi(al),el=hi(ul,!0);function tl(e,t){var n=!0;return Jn(e,function(e,l,i){return n=!!t(e,l,i)}),n}function nl(e,t,n){for(var l=-1,i=e.length;++l<i;){var o=e[l],r=t(o);if(null!=r&&(void 0===a?r==r&&!Xr(r):n(r,a)))var a=r,u=o}return u}function ll(e,t){var n=[];return Jn(e,function(e,l,i){t(e,l,i)&&n.push(e)}),n}function il(e,t,n,l,i){var o=-1,r=e.length;for(n||(n=lo),i||(i=[]);++o<r;){var a=e[o];t>0&&n(a)?t>1?il(a,t-1,n,l,i):st(i,a):l||(i[i.length]=a)}return i}var ol=Si(),rl=Si(!0);function al(e,t){return e&&ol(e,t,ga)}function ul(e,t){return e&&rl(e,t,ga)}function cl(e,t){return rt(t,function(t){return Br(e[t])})}function sl(e,t){for(var n=0,l=(t=oi(t,e)).length;null!=e&&n<l;)e=e[Co(t[n++])];return n&&n==l?e:void 0}function dl(e,t,n){var l=t(e);return xr(e)?l:st(l,n(e))}function vl(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":bt&&bt in pe(e)?function(e){var t=ye.call(e,bt),n=e[bt];try{e[bt]=void 0;var l=!0}catch(e){}var i=Ce.call(e);return l&&(t?e[bt]=n:delete e[bt]),i}(e):function(e){return Ce.call(e)}(e)}function pl(e,t){return e>t}function fl(e,t){return null!=e&&ye.call(e,t)}function ml(e,t){return null!=e&&t in pe(e)}function El(e,t,n){for(var l=n?ut:at,i=e[0].length,o=e.length,r=o,a=K(o),u=Infinity,c=[];r--;){var s=e[r];r&&t&&(s=ct(s,Nt(t))),u=rn(s.length,u),a[r]=!n&&(t||i>=120&&s.length>=120)?new kn(r&&s):void 0}s=e[0];var d=-1,v=a[0];e:for(;++d<i&&c.length<u;){var p=s[d],f=t?t(p):p;if(p=n||0!==p?p:0,!(v?wt(v,f):l(c,f,n))){for(r=o;--r;){var m=a[r];if(!(m?wt(m,f):l(e[r],f,n)))continue e}v&&v.push(f),c.push(p)}}return c}function _l(e,t,n){var l=null==(e=fo(e,t=oi(t,e)))?e:e[Co(Fo(t))];return null==l?void 0:tt(l,e,n)}function gl(e){return Hr(e)&&vl(e)==o}function hl(e,t,n,l,i){return e===t||(null==e||null==t||!Hr(e)&&!Hr(t)?e!=e&&t!=t:function(e,t,n,l,i,s){var d=xr(e),h=xr(t),b=d?r:eo(e),T=h?r:eo(t),C=(b=b==o?f:b)==f,A=(T=T==o?f:T)==f,D=b==T;if(D&&kr(e)){if(!kr(t))return!1;d=!0,C=!1}if(D&&!C)return s||(s=new Mn),d||Zr(e)?ji(e,t,n,l,i,s):function(e,t,n,l,i,o,r){switch(n){case y:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!o(new Be(e),new Be(t)));case a:case u:case p:return Nr(+e,+t);case c:return e.name==t.name&&e.message==t.message;case m:case _:return e==t+"";case v:var s=Ft;case E:if(s||(s=Wt),e.size!=t.size&&!(1&l))return!1;var d=r.get(e);if(d)return d==t;l|=2,r.set(e,t);var f=ji(s(e),s(t),l,i,o,r);return r.delete(e),f;case g:if(An)return An.call(e)==An.call(t)}return!1}(e,t,b,n,l,i,s);if(!(1&n)){var N=C&&ye.call(e,"__wrapped__"),I=A&&ye.call(t,"__wrapped__");if(N||I){var w=N?e.value():e,O=I?t.value():t;return s||(s=new Mn),i(w,O,n,l,s)}}return!!D&&(s||(s=new Mn),function(e,t,n,l,i,o){var r=1&n,a=zi(e),u=a.length;if(u!=zi(t).length&&!r)return!1;for(var c=u;c--;){var s=a[c];if(!(r?s in t:ye.call(t,s)))return!1}var d=o.get(e),v=o.get(t);if(d&&v)return d==t&&v==e;var p=!0;o.set(e,t),o.set(t,e);for(var f=r;++c<u;){var m=e[s=a[c]],E=t[s];if(l)var _=r?l(E,m,s,t,e,o):l(m,E,s,e,t,o);if(!(void 0===_?m===E||i(m,E,n,l,o):_)){p=!1;break}f||(f="constructor"==s)}if(p&&!f){var g=e.constructor,h=t.constructor;g==h||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof h&&h instanceof h||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,l,i,s))}(e,t,n,l,hl,i))}function Sl(e,t,n,l){var i=n.length,o=i,r=!l;if(null==e)return!o;for(e=pe(e);i--;){var a=n[i];if(r&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var u=(a=n[i])[0],c=e[u],s=a[1];if(r&&a[2]){if(void 0===c&&!(u in e))return!1}else{var d=new Mn;if(l)var v=l(c,s,u,e,t,d);if(!(void 0===v?hl(s,c,3,l,d):v))return!1}}return!0}function yl(e){return!(!jr(e)||(t=e,Te&&Te in t))&&(Br(e)?Ne:ie).test(Ao(e));var t}function bl(e){return"function"==typeof e?e:null==e?Va:"object"==typeof e?xr(e)?Nl(e[0],e[1]):Dl(e):Ja(e)}function Tl(e){if(!co(e))return ln(e);var t=[];for(var n in pe(e))ye.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Cl(e,t){return e<t}function Al(e,t){var n=-1,l=Lr(e)?K(e.length):[];return Jn(e,function(e,i,o){l[++n]=t(e,i,o)}),l}function Dl(e){var t=Zi(e);return 1==t.length&&t[0][2]?vo(t[0][0],t[0][1]):function(n){return n===e||Sl(n,e,t)}}function Nl(e,t){return ro(e)&&so(t)?vo(Co(e),t):function(n){var l=pa(n,e);return void 0===l&&l===t?fa(n,e):hl(t,l,3)}}function Il(e,t,n,l,i){e!==t&&ol(t,function(o,r){if(i||(i=new Mn),jr(o))!function(e,t,n,l,i,o,r){var a=Eo(e,n),u=Eo(t,n),c=r.get(u);if(c)jn(e,n,c);else{var s=o?o(a,u,n+"",e,t,r):void 0,d=void 0===s;if(d){var v=xr(u),p=!v&&kr(u),f=!v&&!p&&Zr(u);s=u,v||p||f?xr(a)?s=a:Pr(a)?s=mi(a):p?(d=!1,s=ci(u,!0)):f?(d=!1,s=di(u,!0)):s=[]:Gr(u)||Or(u)?(s=a,Or(a)?s=ia(a):jr(a)&&!Br(a)||(s=no(u))):d=!1}d&&(r.set(u,s),i(s,u,l,o,r),r.delete(u)),jn(e,n,s)}}(e,t,r,n,Il,l,i);else{var a=l?l(Eo(e,r),o,r+"",e,t,i):void 0;void 0===a&&(a=o),jn(e,r,a)}},ha)}function wl(e,t){var n=e.length;if(n)return io(t+=t<0?n:0,n)?e[t]:void 0}function Ol(e,t,n){t=t.length?ct(t,function(e){return xr(e)?function(t){return sl(t,1===e.length?e[0]:e)}:e}):[Va];var l=-1;return t=ct(t,Nt(Yi())),function(e,t){var l=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var l=-1,i=e.criteria,o=t.criteria,r=i.length,a=n.length;++l<r;){var u=vi(i[l],o[l]);if(u)return l>=a?u:u*("desc"==n[l]?-1:1)}return e.index-t.index}(e,t,n)});l--;)e[l]=e[l].value;return e}(Al(e,function(e,n,i){return{criteria:ct(t,function(t){return t(e)}),index:++l,value:e}}))}function xl(e,t,n){for(var l=-1,i=t.length,o={};++l<i;){var r=t[l],a=sl(e,r);n(a,r)&&Ul(o,oi(r,e),a)}return o}function Rl(e,t,n,l){var i=l?gt:_t,o=-1,r=t.length,a=e;for(e===t&&(t=mi(t)),n&&(a=ct(e,Nt(n)));++o<r;)for(var u=0,c=t[o],s=n?n(c):c;(u=i(a,s,u,l))>-1;)a!==e&&qe.call(a,u,1),qe.call(e,u,1);return e}function Ll(e,t){for(var n=e?t.length:0,l=n-1;n--;){var i=t[n];if(n==l||i!==o){var o=i;io(i)?qe.call(e,i,1):$l(e,i)}}return e}function Pl(e,t){return e+Qt(cn()*(t-e+1))}function kl(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function Ml(e,t){return ho(po(e,t,Va),e+"")}function Fl(e){return Bn(Na(e))}function Bl(e,t){var n=Na(e);return bo(n,Yn(t,0,n.length))}function Ul(e,t,n,l){if(!jr(e))return e;for(var i=-1,o=(t=oi(t,e)).length,r=o-1,a=e;null!=a&&++i<o;){var u=Co(t[i]),c=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(i!=r){var s=a[u];void 0===(c=l?l(s,u,a):void 0)&&(c=jr(s)?s:io(t[i+1])?[]:{})}Hn(a,u,c),a=a[u]}return e}var Wl=_n?function(e,t){return _n.set(e,t),e}:Va,jl=qt?function(e,t){return qt(e,"toString",{configurable:!0,enumerable:!1,value:ja(t),writable:!0})}:Va;function Hl(e){return bo(Na(e))}function zl(e,t,n){var l=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=K(i);++l<i;)o[l]=e[l+t];return o}function Vl(e,t){var n;return Jn(e,function(e,l,i){return!(n=t(e,l,i))}),!!n}function Gl(e,t,n){var l=0,i=null==e?l:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;l<i;){var o=l+i>>>1,r=e[o];null!==r&&!Xr(r)&&(n?r<=t:r<t)?l=o+1:i=o}return i}return Kl(e,t,Va,n)}function Kl(e,t,n,l){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var r=(t=n(t))!=t,a=null===t,u=Xr(t),c=void 0===t;i<o;){var s=Qt((i+o)/2),d=n(e[s]),v=void 0!==d,p=null===d,f=d==d,m=Xr(d);if(r)var E=l||f;else E=c?f&&(l||v):a?f&&v&&(l||!p):u?f&&v&&!p&&(l||!m):!p&&!m&&(l?d<=t:d<t);E?i=s+1:o=s}return rn(o,4294967294)}function ql(e,t){for(var n=-1,l=e.length,i=0,o=[];++n<l;){var r=e[n],a=t?t(r):r;if(!n||!Nr(a,u)){var u=a;o[i++]=0===r?0:r}}return o}function Yl(e){return"number"==typeof e?e:Xr(e)?NaN:+e}function Xl(e){if("string"==typeof e)return e;if(xr(e))return ct(e,Xl)+"";if(Xr(e))return Dn?Dn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Zl(e,t,n){var l=-1,i=at,o=e.length,r=!0,a=[],u=a;if(n)r=!1,i=ut;else if(o>=200){var c=t?null:ki(e);if(c)return Wt(c);r=!1,i=wt,u=new kn}else u=t?[]:a;e:for(;++l<o;){var s=e[l],d=t?t(s):s;if(s=n||0!==s?s:0,r&&d==d){for(var v=u.length;v--;)if(u[v]===d)continue e;t&&u.push(d),a.push(s)}else i(u,d,n)||(u!==a&&u.push(d),a.push(s))}return a}function $l(e,t){var n=-1,l=(t=oi(t,e)).length;if(!l)return!0;for(var i=null==e||"object"!=typeof e&&"function"!=typeof e;++n<l;){var o=t[n];if("string"==typeof o){if("__proto__"===o&&!ye.call(e,"__proto__"))return!1;if("constructor"===o&&n+1<l&&"string"==typeof t[n+1]&&"prototype"===t[n+1]){if(i&&0===n)continue;return!1}}}var r=fo(e,t);return null==r||delete r[Co(Fo(t))]}function Ql(e,t,n,l){return Ul(e,t,n(sl(e,t)),l)}function Jl(e,t,n,l){for(var i=e.length,o=l?i:-1;(l?o--:++o<i)&&t(e[o],o,e););return n?zl(e,l?0:o,l?o+1:i):zl(e,l?o+1:0,l?i:o)}function ei(e,t){var n=e;return n instanceof xn&&(n=n.value()),dt(t,function(e,t){return t.func.apply(t.thisArg,st([e],t.args))},n)}function ti(e,t,n){var l=e.length;if(l<2)return l?Zl(e[0]):[];for(var i=-1,o=K(l);++i<l;)for(var r=e[i],a=-1;++a<l;)a!=i&&(o[i]=Qn(o[i]||r,e[a],t,n));return Zl(il(o,1),t,n)}function ni(e,t,n){for(var l=-1,i=e.length,o=t.length,r={};++l<i;)n(r,e[l],l<o?t[l]:void 0);return r}function li(e){return Pr(e)?e:[]}function ii(e){return"function"==typeof e?e:Va}function oi(e,t){return xr(e)?e:ro(e,t)?[e]:To(oa(e))}var ri=Ml;function ai(e,t,n){var l=e.length;return n=void 0===n?l:n,!t&&n>=l?e:zl(e,t,n)}var ui=Yt||function(e){return ze.clearTimeout(e)};function ci(e,t){if(t)return e.slice();var n=e.length,l=je?je(n):new e.constructor(n);return e.copy(l),l}function si(e){var t=new e.constructor(e.byteLength);return new Be(t).set(new Be(e)),t}function di(e,t){var n=t?si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function vi(e,t){if(e!==t){var n=void 0!==e,l=null===e,i=e==e,o=Xr(e),r=void 0!==t,a=null===t,u=t==t,c=Xr(t);if(!a&&!c&&!o&&e>t||o&&r&&u&&!a&&!c||l&&r&&u||!n&&u||!i)return 1;if(!l&&!o&&!c&&e<t||c&&n&&i&&!l&&!o||a&&n&&i||!r&&i||!u)return-1}return 0}function pi(e,t,n,l){for(var i=-1,o=e.length,r=n.length,a=-1,u=t.length,c=on(o-r,0),s=K(u+c),d=!l;++a<u;)s[a]=t[a];for(;++i<r;)(d||i<o)&&(s[n[i]]=e[i]);for(;c--;)s[a++]=e[i++];return s}function fi(e,t,n,l){for(var i=-1,o=e.length,r=-1,a=n.length,u=-1,c=t.length,s=on(o-a,0),d=K(s+c),v=!l;++i<s;)d[i]=e[i];for(var p=i;++u<c;)d[p+u]=t[u];for(;++r<a;)(v||i<o)&&(d[p+n[r]]=e[i++]);return d}function mi(e,t){var n=-1,l=e.length;for(t||(t=K(l));++n<l;)t[n]=e[n];return t}function Ei(e,t,n,l){var i=!n;n||(n={});for(var o=-1,r=t.length;++o<r;){var a=t[o],u=l?l(n[a],e[a],a,n,e):void 0;void 0===u&&(u=e[a]),i?Kn(n,a,u):Hn(n,a,u)}return n}function _i(e,t){return function(n,l){var i=xr(n)?nt:Vn,o=t?t():{};return i(n,e,Yi(l,2),o)}}function gi(e){return Ml(function(t,n){var l=-1,i=n.length,o=i>1?n[i-1]:void 0,r=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,r&&oo(n[0],n[1],r)&&(o=i<3?void 0:o,i=1),t=pe(t);++l<i;){var a=n[l];a&&e(t,a,l,o)}return t})}function hi(e,t){return function(n,l){if(null==n)return n;if(!Lr(n))return e(n,l);for(var i=n.length,o=t?i:-1,r=pe(n);(t?o--:++o<i)&&!1!==l(r[o],o,r););return n}}function Si(e){return function(t,n,l){for(var i=-1,o=pe(t),r=l(t),a=r.length;a--;){var u=r[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function yi(e){return function(t){var n=Mt(t=oa(t))?zt(t):void 0,l=n?n[0]:t.charAt(0),i=n?ai(n,1).join(""):t.slice(1);return l[e]()+i}}function bi(e){return function(t){return dt(Ba(Oa(t).replace(Ie,"")),e,"")}}function Ti(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=In(e.prototype),l=e.apply(n,t);return jr(l)?l:n}}function Ci(e){return function(t,n,l){var i=pe(t);if(!Lr(t)){var o=Yi(n,3);t=ga(t),n=function(e){return o(i[e],e,i)}}var r=e(t,n,l);return r>-1?i[o?t[r]:r]:void 0}}function Ai(e){return Hi(function(t){var l=t.length,i=l,o=On.prototype.thru;for(e&&t.reverse();i--;){var r=t[i];if("function"!=typeof r)throw new Ee(n);if(o&&!a&&"wrapper"==Ki(r))var a=new On([],!0)}for(i=a?i:l;++i<l;){var u=Ki(r=t[i]),c="wrapper"==u?Gi(r):void 0;a=c&&ao(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?a[Ki(c[0])].apply(a,c[3]):1==r.length&&ao(r)?a[u]():a.thru(r)}return function(){var e=arguments,n=e[0];if(a&&1==e.length&&xr(n))return a.plant(n).value();for(var i=0,o=l?t[i].apply(this,e):n;++i<l;)o=t[i].call(this,o);return o}})}function Di(e,t,n,l,i,o,r,a,u,c){var s=128&t,d=1&t,v=2&t,p=24&t,f=512&t,m=v?void 0:Ti(e);return function E(){for(var _=arguments.length,g=K(_),h=_;h--;)g[h]=arguments[h];if(p)var S=qi(E),y=Rt(g,S);if(l&&(g=pi(g,l,i,p)),o&&(g=fi(g,o,r,p)),_-=y,p&&_<c){var b=Ut(g,S);return Li(e,t,Di,E.placeholder,n,g,b,a,u,c-_)}var T=d?n:this,C=v?T[e]:e;return _=g.length,a?g=mo(g,a):f&&_>1&&g.reverse(),s&&u<_&&(g.length=u),this&&this!==ze&&this instanceof E&&(C=m||Ti(C)),C.apply(T,g)}}function Ni(e,t){return function(n,l){return function(e,t,n,l){return al(e,function(e,i,o){t(l,n(e),i,o)}),l}(n,e,t(l),{})}}function Ii(e,t){return function(n,l){var i;if(void 0===n&&void 0===l)return t;if(void 0!==n&&(i=n),void 0!==l){if(void 0===i)return l;"string"==typeof n||"string"==typeof l?(n=Xl(n),l=Xl(l)):(n=Yl(n),l=Yl(l)),i=e(n,l)}return i}}function wi(e){return Hi(function(t){return t=ct(t,Nt(Yi())),Ml(function(n){var l=this;return e(t,function(e){return tt(e,l,n)})})})}function Oi(e,t){var n=(t=void 0===t?" ":Xl(t)).length;if(n<2)return n?kl(t,e):t;var l=kl(t,$t(e/Ht(t)));return Mt(t)?ai(zt(l),0,e).join(""):l.slice(0,e)}function xi(e){return function(t,n,l){return l&&"number"!=typeof l&&oo(t,n,l)&&(n=l=void 0),t=ea(t),void 0===n?(n=t,t=0):n=ea(n),function(e,t,n,l){for(var i=-1,o=on($t((t-e)/(n||1)),0),r=K(o);o--;)r[l?o:++i]=e,e+=n;return r}(t,n,l=void 0===l?t<n?1:-1:ea(l),e)}}function Ri(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=la(t),n=la(n)),e(t,n)}}function Li(e,t,n,l,i,o,r,a,u,c){var s=8&t;t|=s?32:64,4&(t&=~(s?64:32))||(t&=-4);var d=[e,t,i,s?o:void 0,s?r:void 0,s?void 0:o,s?void 0:r,a,u,c],v=n.apply(void 0,d);return ao(e)&&_o(v,d),v.placeholder=l,So(v,e,t)}function Pi(e){var t=ve[e];return function(e,n){if(e=la(e),(n=null==n?0:rn(ta(n),292))&&tn(e)){var l=(oa(e)+"e").split("e");return+((l=(oa(t(l[0]+"e"+(+l[1]+n)))+"e").split("e"))[0]+"e"+(+l[1]-n))}return t(e)}}var ki=fn&&1/Wt(new fn([,-0]))[1]==1/0?function(e){return new fn(e)}:Xa;function Mi(e){return function(t){var n=eo(t);return n==v?Ft(t):n==E?jt(t):function(e,t){return ct(t,function(t){return[t,e[t]]})}(t,e(t))}}function Fi(e,t,i,o,r,a,u,c){var s=2&t;if(!s&&"function"!=typeof e)throw new Ee(n);var d=o?o.length:0;if(d||(t&=-97,o=r=void 0),u=void 0===u?u:on(ta(u),0),c=void 0===c?c:ta(c),d-=r?r.length:0,64&t){var v=o,p=r;o=r=void 0}var f=s?void 0:Gi(e),m=[e,t,i,o,r,v,p,a,u,c];if(f&&function(e,t){var n=e[1],i=t[1],o=n|i;if(!(o<131||128==i&&8==n||128==i&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n))return e;1&i&&(e[2]=t[2],o|=1&n?0:4);var r=t[3];if(r){var a=e[3];e[3]=a?pi(a,r,t[4]):r,e[4]=a?Ut(e[3],l):t[4]}(r=t[5])&&(e[5]=(a=e[5])?fi(a,r,t[6]):r,e[6]=a?Ut(e[5],l):t[6]),(r=t[7])&&(e[7]=r),128&i&&(e[8]=null==e[8]?t[8]:rn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(m,f),e=m[0],t=m[1],i=m[2],o=m[3],r=m[4],!(c=m[9]=void 0===m[9]?s?0:e.length:on(m[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||16==t?function(e,t,n){var l=Ti(e);return function i(){for(var o=arguments.length,r=K(o),a=o,u=qi(i);a--;)r[a]=arguments[a];var c=o<3&&r[0]!==u&&r[o-1]!==u?[]:Ut(r,u);if((o-=c.length)<n)return Li(e,t,Di,i.placeholder,void 0,r,c,void 0,void 0,n-o);var s=this&&this!==ze&&this instanceof i?l:e;return tt(s,this,r)}}(e,t,c):32!=t&&33!=t||r.length?Di.apply(void 0,m):function(e,t,n,l){var i=1&t,o=Ti(e);return function t(){for(var r=-1,a=arguments.length,u=-1,c=l.length,s=K(c+a),d=this&&this!==ze&&this instanceof t?o:e;++u<c;)s[u]=l[u];for(;a--;)s[u++]=arguments[++r];return tt(d,i?n:this,s)}}(e,t,i,o);else var E=function(e,t,n){var l=1&t,i=Ti(e);return function t(){var o=this&&this!==ze&&this instanceof t?i:e;return o.apply(l?n:this,arguments)}}(e,t,i);return So((f?Wl:_o)(E,m),e,t)}function Bi(e,t,n,l){return void 0===e||Nr(e,ge[n])&&!ye.call(l,n)?t:e}function Ui(e,t,n,l,i,o){return jr(e)&&jr(t)&&(o.set(t,e),Il(e,t,void 0,Ui,o),o.delete(t)),e}function Wi(e){return Gr(e)?void 0:e}function ji(e,t,n,l,i,o){var r=1&n,a=e.length,u=t.length;if(a!=u&&!(r&&u>a))return!1;var c=o.get(e),s=o.get(t);if(c&&s)return c==t&&s==e;var d=-1,v=!0,p=2&n?new kn:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var f=e[d],m=t[d];if(l)var E=r?l(m,f,d,t,e,o):l(f,m,d,e,t,o);if(void 0!==E){if(E)continue;v=!1;break}if(p){if(!pt(t,function(e,t){if(!wt(p,t)&&(f===e||i(f,e,n,l,o)))return p.push(t)})){v=!1;break}}else if(f!==m&&!i(f,m,n,l,o)){v=!1;break}}return o.delete(e),o.delete(t),v}function Hi(e){return ho(po(e,void 0,Ro),e+"")}function zi(e){return dl(e,ga,Qi)}function Vi(e){return dl(e,ha,Ji)}var Gi=_n?function(e){return _n.get(e)}:Xa;function Ki(e){for(var t=e.name+"",n=gn[t],l=ye.call(gn,t)?n.length:0;l--;){var i=n[l],o=i.func;if(null==o||o==e)return i.name}return t}function qi(e){return(ye.call(Nn,"placeholder")?Nn:e).placeholder}function Yi(){var e=Nn.iteratee||Ga;return e=e===Ga?bl:e,arguments.length?e(arguments[0],arguments[1]):e}function Xi(e,t){var n,l,i=e.__data__;return("string"==(l=typeof(n=t))||"number"==l||"symbol"==l||"boolean"==l?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Zi(e){for(var t=ga(e),n=t.length;n--;){var l=t[n],i=e[l];t[n]=[l,i,so(i)]}return t}function $i(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return yl(n)?n:void 0}var Qi=Jt?function(e){return null==e?[]:(e=pe(e),rt(Jt(e),function(t){return Ge.call(e,t)}))}:nu,Ji=Jt?function(e){for(var t=[];e;)st(t,Qi(e)),e=He(e);return t}:nu,eo=vl;function to(e,t,n){for(var l=-1,i=(t=oi(t,e)).length,o=!1;++l<i;){var r=Co(t[l]);if(!(o=null!=e&&n(e,r)))break;e=e[r]}return o||++l!=i?o:!!(i=null==e?0:e.length)&&Wr(i)&&io(r,i)&&(xr(e)||Or(e))}function no(e){return"function"!=typeof e.constructor||co(e)?{}:In(He(e))}function lo(e){return xr(e)||Or(e)||!!(Ye&&e&&e[Ye])}function io(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&re.test(e))&&e>-1&&e%1==0&&e<t}function oo(e,t,n){if(!jr(n))return!1;var l=typeof t;return!!("number"==l?Lr(n)&&io(t,n.length):"string"==l&&t in n)&&Nr(n[t],e)}function ro(e,t){if(xr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Xr(e))||j.test(e)||!W.test(e)||null!=t&&e in pe(t)}function ao(e){var t=Ki(e),n=Nn[t];if("function"!=typeof n||!(t in xn.prototype))return!1;if(e===n)return!0;var l=Gi(n);return!!l&&e===l[0]}(dn&&eo(new dn(new ArrayBuffer(1)))!=y||vn&&eo(new vn)!=v||pn&&"[object Promise]"!=eo(pn.resolve())||fn&&eo(new fn)!=E||mn&&eo(new mn)!=h)&&(eo=function(e){var t=vl(e),n=t==f?e.constructor:void 0,l=n?Ao(n):"";if(l)switch(l){case hn:return y;case Sn:return v;case yn:return"[object Promise]";case bn:return E;case Tn:return h}return t});var uo=he?Br:lu;function co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ge)}function so(e){return e==e&&!jr(e)}function vo(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in pe(n))}}function po(e,t,n){return t=on(void 0===t?e.length-1:t,0),function(){for(var l=arguments,i=-1,o=on(l.length-t,0),r=K(o);++i<o;)r[i]=l[t+i];i=-1;for(var a=K(t+1);++i<t;)a[i]=l[i];return a[t]=n(r),tt(e,this,a)}}function fo(e,t){return t.length<2?e:sl(e,zl(t,0,-1))}function mo(e,t){for(var n=e.length,l=rn(t.length,n),i=mi(e);l--;){var o=t[l];e[l]=io(o,n)?i[o]:void 0}return e}function Eo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var _o=yo(Wl),go=Zt||function(e,t){return ze.setTimeout(e,t)},ho=yo(jl);function So(e,t,n){var l=t+"";return ho(e,function(e,t){var n=t.length;if(!n)return e;var l=n-1;return t[l]=(n>1?"& ":"")+t[l],t=t.join(n>2?", ":" "),e.replace(Y,"{\n/* [wrapped with "+t+"] */\n")}(l,function(e,t){return lt(i,function(n){var l="_."+n[0];t&n[1]&&!at(e,l)&&e.push(l)}),e.sort()}(function(e){var t=e.match(X);return t?t[1].split(Z):[]}(l),n)))}function yo(e){var t=0,n=0;return function(){var l=an(),i=16-(l-n);if(n=l,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function bo(e,t){var n=-1,l=e.length,i=l-1;for(t=void 0===t?l:t;++n<t;){var o=Pl(n,i),r=e[o];e[o]=e[n],e[n]=r}return e.length=t,e}var To=function(e){var t=yr(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(H,function(e,n,l,i){t.push(l?i.replace(J,"$1"):n||e)}),t},function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}();function Co(e){if("string"==typeof e||Xr(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ao(e){if(null!=e){try{return Se.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Do(e){if(e instanceof xn)return e.clone();var t=new On(e.__wrapped__,e.__chain__);return t.__actions__=mi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var No=Ml(function(e,t){return Pr(e)?Qn(e,il(t,1,Pr,!0)):[]}),Io=Ml(function(e,t){var n=Fo(t);return Pr(n)&&(n=void 0),Pr(e)?Qn(e,il(t,1,Pr,!0),Yi(n,2)):[]}),wo=Ml(function(e,t){var n=Fo(t);return Pr(n)&&(n=void 0),Pr(e)?Qn(e,il(t,1,Pr,!0),void 0,n):[]});function Oo(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=null==n?0:ta(n);return i<0&&(i=on(l+i,0)),Et(e,Yi(t,3),i)}function xo(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=l-1;return void 0!==n&&(i=ta(n),i=n<0?on(l+i,0):rn(i,l-1)),Et(e,Yi(t,3),i,!0)}function Ro(e){return null!=e&&e.length?il(e,1):[]}function Lo(e){return e&&e.length?e[0]:void 0}var Po=Ml(function(e){var t=ct(e,li);return t.length&&t[0]===e[0]?El(t):[]}),ko=Ml(function(e){var t=Fo(e),n=ct(e,li);return t===Fo(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?El(n,Yi(t,2)):[]}),Mo=Ml(function(e){var t=Fo(e),n=ct(e,li);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?El(n,void 0,t):[]});function Fo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Bo=Ml(Uo);function Uo(e,t){return e&&e.length&&t&&t.length?Rl(e,t):e}var Wo=Hi(function(e,t){var n=null==e?0:e.length,l=qn(e,t);return Ll(e,ct(t,function(e){return io(e,n)?+e:e}).sort(vi)),l});function jo(e){return null==e?e:sn.call(e)}var Ho=Ml(function(e){return Zl(il(e,1,Pr,!0))}),zo=Ml(function(e){var t=Fo(e);return Pr(t)&&(t=void 0),Zl(il(e,1,Pr,!0),Yi(t,2))}),Vo=Ml(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,Zl(il(e,1,Pr,!0),void 0,t)});function Go(e){if(!e||!e.length)return[];var t=0;return e=rt(e,function(e){if(Pr(e))return t=on(e.length,t),!0}),At(t,function(t){return ct(e,yt(t))})}function Ko(e,t){if(!e||!e.length)return[];var n=Go(e);return null==t?n:ct(n,function(e){return tt(t,void 0,e)})}var qo=Ml(function(e,t){return Pr(e)?Qn(e,t):[]}),Yo=Ml(function(e){return ti(rt(e,Pr))}),Xo=Ml(function(e){var t=Fo(e);return Pr(t)&&(t=void 0),ti(rt(e,Pr),Yi(t,2))}),Zo=Ml(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,ti(rt(e,Pr),void 0,t)}),$o=Ml(Go),Qo=Ml(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ko(e,n)});function Jo(e){var t=Nn(e);return t.__chain__=!0,t}function er(e,t){return t(e)}var tr=Hi(function(e){var t=e.length,n=t?e[0]:0,l=this.__wrapped__,i=function(t){return qn(t,e)};return!(t>1||this.__actions__.length)&&l instanceof xn&&io(n)?((l=l.slice(n,+n+(t?1:0))).__actions__.push({func:er,args:[i],thisArg:void 0}),new On(l,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(i)}),nr=_i(function(e,t,n){ye.call(e,n)?++e[n]:Kn(e,n,1)}),lr=Ci(Oo),ir=Ci(xo);function or(e,t){return(xr(e)?lt:Jn)(e,Yi(t,3))}function rr(e,t){return(xr(e)?it:el)(e,Yi(t,3))}var ar=_i(function(e,t,n){ye.call(e,n)?e[n].push(t):Kn(e,n,[t])}),ur=Ml(function(e,t,n){var l=-1,i="function"==typeof t,o=Lr(e)?K(e.length):[];return Jn(e,function(e){o[++l]=i?tt(t,e,n):_l(e,t,n)}),o}),cr=_i(function(e,t,n){Kn(e,n,t)});function sr(e,t){return(xr(e)?ct:Al)(e,Yi(t,3))}var dr=_i(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),vr=Ml(function(e,t){if(null==e)return[];var n=t.length;return n>1&&oo(e,t[0],t[1])?t=[]:n>2&&oo(t[0],t[1],t[2])&&(t=[t[0]]),Ol(e,il(t,1),[])}),pr=Xt||function(){return ze.Date.now()};function fr(e,t,n){return t=n?void 0:t,Fi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function mr(e,t){var l;if("function"!=typeof t)throw new Ee(n);return e=ta(e),function(){return--e>0&&(l=t.apply(this,arguments)),e<=1&&(t=void 0),l}}var Er=Ml(function(e,t,n){var l=1;if(n.length){var i=Ut(n,qi(Er));l|=32}return Fi(e,l,t,n,i)}),_r=Ml(function(e,t,n){var l=3;if(n.length){var i=Ut(n,qi(_r));l|=32}return Fi(t,l,e,n,i)});function gr(e,t,l){var i,o,r,a,u,c,s=0,d=!1,v=!1,p=!0;if("function"!=typeof e)throw new Ee(n);function f(t){var n=i,l=o;return i=o=void 0,s=t,a=e.apply(l,n)}function m(e){return s=e,u=go(_,t),d?f(e):a}function E(e){var n=e-c;return void 0===c||n>=t||n<0||v&&e-s>=r}function _(){var e=pr();if(E(e))return g(e);u=go(_,function(e){var n=t-(e-c);return v?rn(n,r-(e-s)):n}(e))}function g(e){return u=void 0,p&&i?f(e):(i=o=void 0,a)}function h(){var e=pr(),n=E(e);if(i=arguments,o=this,c=e,n){if(void 0===u)return m(c);if(v)return ui(u),u=go(_,t),f(c)}return void 0===u&&(u=go(_,t)),a}return t=la(t)||0,jr(l)&&(d=!!l.leading,r=(v="maxWait"in l)?on(la(l.maxWait)||0,t):r,p="trailing"in l?!!l.trailing:p),h.cancel=function(){void 0!==u&&ui(u),s=0,i=c=o=u=void 0},h.flush=function(){return void 0===u?a:g(pr())},h}var hr=Ml(function(e,t){return $n(e,1,t)}),Sr=Ml(function(e,t,n){return $n(e,la(t)||0,n)});function yr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ee(n);var l=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=l.cache;if(o.has(i))return o.get(i);var r=e.apply(this,n);return l.cache=o.set(i,r)||o,r};return l.cache=new(yr.Cache||Pn),l}function br(e){if("function"!=typeof e)throw new Ee(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}yr.Cache=Pn;var Tr=ri(function(e,t){var n=(t=1==t.length&&xr(t[0])?ct(t[0],Nt(Yi())):ct(il(t,1),Nt(Yi()))).length;return Ml(function(l){for(var i=-1,o=rn(l.length,n);++i<o;)l[i]=t[i].call(this,l[i]);return tt(e,this,l)})}),Cr=Ml(function(e,t){return Fi(e,32,void 0,t,Ut(t,qi(Cr)))}),Ar=Ml(function(e,t){return Fi(e,64,void 0,t,Ut(t,qi(Ar)))}),Dr=Hi(function(e,t){return Fi(e,256,void 0,void 0,void 0,t)});function Nr(e,t){return e===t||e!=e&&t!=t}var Ir=Ri(pl),wr=Ri(function(e,t){return e>=t}),Or=gl(function(){return arguments}())?gl:function(e){return Hr(e)&&ye.call(e,"callee")&&!Ge.call(e,"callee")},xr=K.isArray,Rr=Xe?Nt(Xe):function(e){return Hr(e)&&vl(e)==S};function Lr(e){return null!=e&&Wr(e.length)&&!Br(e)}function Pr(e){return Hr(e)&&Lr(e)}var kr=en||lu,Mr=Ze?Nt(Ze):function(e){return Hr(e)&&vl(e)==u};function Fr(e){if(!Hr(e))return!1;var t=vl(e);return t==c||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Gr(e)}function Br(e){if(!jr(e))return!1;var t=vl(e);return t==s||t==d||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ur(e){return"number"==typeof e&&e==ta(e)}function Wr(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function jr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Hr(e){return null!=e&&"object"==typeof e}var zr=$e?Nt($e):function(e){return Hr(e)&&eo(e)==v};function Vr(e){return"number"==typeof e||Hr(e)&&vl(e)==p}function Gr(e){if(!Hr(e)||vl(e)!=f)return!1;var t=He(e);if(null===t)return!0;var n=ye.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Se.call(n)==Ae}var Kr=Qe?Nt(Qe):function(e){return Hr(e)&&vl(e)==m},qr=Je?Nt(Je):function(e){return Hr(e)&&eo(e)==E};function Yr(e){return"string"==typeof e||!xr(e)&&Hr(e)&&vl(e)==_}function Xr(e){return"symbol"==typeof e||Hr(e)&&vl(e)==g}var Zr=et?Nt(et):function(e){return Hr(e)&&Wr(e.length)&&!!Me[vl(e)]},$r=Ri(Cl),Qr=Ri(function(e,t){return e<=t});function Jr(e){if(!e)return[];if(Lr(e))return Yr(e)?zt(e):mi(e);if(ft&&e[ft])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[ft]());var t=eo(e);return(t==v?Ft:t==E?Wt:Na)(e)}function ea(e){return e?(e=la(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ta(e){var t=ea(e),n=t%1;return t==t?n?t-n:t:0}function na(e){return e?Yn(ta(e),0,4294967295):0}function la(e){if("number"==typeof e)return e;if(Xr(e))return NaN;if(jr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=jr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Dt(e);var n=le.test(e);return n||oe.test(e)?We(e.slice(2),n?2:8):ne.test(e)?NaN:+e}function ia(e){return Ei(e,ha(e))}function oa(e){return null==e?"":Xl(e)}var ra=gi(function(e,t){if(co(t)||Lr(t))Ei(t,ga(t),e);else for(var n in t)ye.call(t,n)&&Hn(e,n,t[n])}),aa=gi(function(e,t){Ei(t,ha(t),e)}),ua=gi(function(e,t,n,l){Ei(t,ha(t),e,l)}),ca=gi(function(e,t,n,l){Ei(t,ga(t),e,l)}),sa=Hi(qn),da=Ml(function(e,t){e=pe(e);var n=-1,l=t.length,i=l>2?t[2]:void 0;for(i&&oo(t[0],t[1],i)&&(l=1);++n<l;)for(var o=t[n],r=ha(o),a=-1,u=r.length;++a<u;){var c=r[a],s=e[c];(void 0===s||Nr(s,ge[c])&&!ye.call(e,c))&&(e[c]=o[c])}return e}),va=Ml(function(e){return e.push(void 0,Ui),tt(ya,void 0,e)});function pa(e,t,n){var l=null==e?void 0:sl(e,t);return void 0===l?n:l}function fa(e,t){return null!=e&&to(e,t,ml)}var ma=Ni(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),e[t]=n},ja(Va)),Ea=Ni(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),ye.call(e,t)?e[t].push(n):e[t]=[n]},Yi),_a=Ml(_l);function ga(e){return Lr(e)?Fn(e):Tl(e)}function ha(e){return Lr(e)?Fn(e,!0):function(e){if(!jr(e))return function(e){var t=[];if(null!=e)for(var n in pe(e))t.push(n);return t}(e);var t=co(e),n=[];for(var l in e)("constructor"!=l||!t&&ye.call(e,l))&&n.push(l);return n}(e)}var Sa=gi(function(e,t,n){Il(e,t,n)}),ya=gi(function(e,t,n,l){Il(e,t,n,l)}),ba=Hi(function(e,t){var n={};if(null==e)return n;var l=!1;t=ct(t,function(t){return t=oi(t,e),l||(l=t.length>1),t}),Ei(e,Vi(e),n),l&&(n=Xn(n,7,Wi));for(var i=t.length;i--;)$l(n,t[i]);return n}),Ta=Hi(function(e,t){return null==e?{}:function(e,t){return xl(e,t,function(t,n){return fa(e,n)})}(e,t)});function Ca(e,t){if(null==e)return{};var n=ct(Vi(e),function(e){return[e]});return t=Yi(t),xl(e,n,function(e,n){return t(e,n[0])})}var Aa=Mi(ga),Da=Mi(ha);function Na(e){return null==e?[]:It(e,ga(e))}var Ia=bi(function(e,t,n){return t=t.toLowerCase(),e+(n?wa(t):t)});function wa(e){return Fa(oa(e).toLowerCase())}function Oa(e){return(e=oa(e))&&e.replace(ae,Lt).replace(we,"")}var xa=bi(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ra=bi(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),La=yi("toLowerCase"),Pa=bi(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),ka=bi(function(e,t,n){return e+(n?" ":"")+Fa(t)}),Ma=bi(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Fa=yi("toUpperCase");function Ba(e,t,n){return e=oa(e),void 0===(t=n?void 0:t)?function(e){return Le.test(e)}(e)?function(e){return e.match(xe)||[]}(e):function(e){return e.match($)||[]}(e):e.match(t)||[]}var Ua=Ml(function(e,t){try{return tt(e,void 0,t)}catch(e){return Fr(e)?e:new se(e)}}),Wa=Hi(function(e,t){return lt(t,function(t){t=Co(t),Kn(e,t,Er(e[t],e))}),e});function ja(e){return function(){return e}}var Ha=Ai(),za=Ai(!0);function Va(e){return e}function Ga(e){return bl("function"==typeof e?e:Xn(e,1))}var Ka=Ml(function(e,t){return function(n){return _l(n,e,t)}}),qa=Ml(function(e,t){return function(n){return _l(e,n,t)}});function Ya(e,t,n){var l=ga(t),i=cl(t,l);null!=n||jr(t)&&(i.length||!l.length)||(n=t,t=e,e=this,i=cl(t,ga(t)));var o=!(jr(n)&&"chain"in n&&!n.chain),r=Br(e);return lt(i,function(n){var l=t[n];e[n]=l,r&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=mi(this.__actions__);return i.push({func:l,args:arguments,thisArg:e}),n.__chain__=t,n}return l.apply(e,st([this.value()],arguments))})}),e}function Xa(){}var Za=wi(ct),$a=wi(ot),Qa=wi(pt);function Ja(e){return ro(e)?yt(Co(e)):function(e){return function(t){return sl(t,e)}}(e)}var eu=xi(),tu=xi(!0);function nu(){return[]}function lu(){return!1}var iu,ou=Ii(function(e,t){return e+t},0),ru=Pi("ceil"),au=Ii(function(e,t){return e/t},1),uu=Pi("floor"),cu=Ii(function(e,t){return e*t},1),su=Pi("round"),du=Ii(function(e,t){return e-t},0);return Nn.after=function(e,t){if("function"!=typeof t)throw new Ee(n);return e=ta(e),function(){if(--e<1)return t.apply(this,arguments)}},Nn.ary=fr,Nn.assign=ra,Nn.assignIn=aa,Nn.assignInWith=ua,Nn.assignWith=ca,Nn.at=sa,Nn.before=mr,Nn.bind=Er,Nn.bindAll=Wa,Nn.bindKey=_r,Nn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return xr(e)?e:[e]},Nn.chain=Jo,Nn.chunk=function(e,t,n){t=(n?oo(e,t,n):void 0===t)?1:on(ta(t),0);var l=null==e?0:e.length;if(!l||t<1)return[];for(var i=0,o=0,r=K($t(l/t));i<l;)r[o++]=zl(e,i,i+=t);return r},Nn.compact=function(e){for(var t=-1,n=null==e?0:e.length,l=0,i=[];++t<n;){var o=e[t];o&&(i[l++]=o)}return i},Nn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=K(e-1),n=arguments[0],l=e;l--;)t[l-1]=arguments[l];return st(xr(n)?mi(n):[n],il(t,1))},Nn.cond=function(e){var t=null==e?0:e.length,l=Yi();return e=t?ct(e,function(e){if("function"!=typeof e[1])throw new Ee(n);return[l(e[0]),e[1]]}):[],Ml(function(n){for(var l=-1;++l<t;){var i=e[l];if(tt(i[0],this,n))return tt(i[1],this,n)}})},Nn.conforms=function(e){return function(e){var t=ga(e);return function(n){return Zn(n,e,t)}}(Xn(e,1))},Nn.constant=ja,Nn.countBy=nr,Nn.create=function(e,t){var n=In(e);return null==t?n:Gn(n,t)},Nn.curry=function e(t,n,l){var i=Fi(t,8,void 0,void 0,void 0,void 0,void 0,n=l?void 0:n);return i.placeholder=e.placeholder,i},Nn.curryRight=function e(t,n,l){var i=Fi(t,16,void 0,void 0,void 0,void 0,void 0,n=l?void 0:n);return i.placeholder=e.placeholder,i},Nn.debounce=gr,Nn.defaults=da,Nn.defaultsDeep=va,Nn.defer=hr,Nn.delay=Sr,Nn.difference=No,Nn.differenceBy=Io,Nn.differenceWith=wo,Nn.drop=function(e,t,n){var l=null==e?0:e.length;return l?zl(e,(t=n||void 0===t?1:ta(t))<0?0:t,l):[]},Nn.dropRight=function(e,t,n){var l=null==e?0:e.length;return l?zl(e,0,(t=l-(t=n||void 0===t?1:ta(t)))<0?0:t):[]},Nn.dropRightWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3),!0,!0):[]},Nn.dropWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3),!0):[]},Nn.fill=function(e,t,n,l){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&oo(e,t,n)&&(n=0,l=i),function(e,t,n,l){var i=e.length;for((n=ta(n))<0&&(n=-n>i?0:i+n),(l=void 0===l||l>i?i:ta(l))<0&&(l+=i),l=n>l?0:na(l);n<l;)e[n++]=t;return e}(e,t,n,l)):[]},Nn.filter=function(e,t){return(xr(e)?rt:ll)(e,Yi(t,3))},Nn.flatMap=function(e,t){return il(sr(e,t),1)},Nn.flatMapDeep=function(e,t){return il(sr(e,t),1/0)},Nn.flatMapDepth=function(e,t,n){return n=void 0===n?1:ta(n),il(sr(e,t),n)},Nn.flatten=Ro,Nn.flattenDeep=function(e){return null!=e&&e.length?il(e,1/0):[]},Nn.flattenDepth=function(e,t){return null!=e&&e.length?il(e,t=void 0===t?1:ta(t)):[]},Nn.flip=function(e){return Fi(e,512)},Nn.flow=Ha,Nn.flowRight=za,Nn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,l={};++t<n;){var i=e[t];l[i[0]]=i[1]}return l},Nn.functions=function(e){return null==e?[]:cl(e,ga(e))},Nn.functionsIn=function(e){return null==e?[]:cl(e,ha(e))},Nn.groupBy=ar,Nn.initial=function(e){return null!=e&&e.length?zl(e,0,-1):[]},Nn.intersection=Po,Nn.intersectionBy=ko,Nn.intersectionWith=Mo,Nn.invert=ma,Nn.invertBy=Ea,Nn.invokeMap=ur,Nn.iteratee=Ga,Nn.keyBy=cr,Nn.keys=ga,Nn.keysIn=ha,Nn.map=sr,Nn.mapKeys=function(e,t){var n={};return t=Yi(t,3),al(e,function(e,l,i){Kn(n,t(e,l,i),e)}),n},Nn.mapValues=function(e,t){var n={};return t=Yi(t,3),al(e,function(e,l,i){Kn(n,l,t(e,l,i))}),n},Nn.matches=function(e){return Dl(Xn(e,1))},Nn.matchesProperty=function(e,t){return Nl(e,Xn(t,1))},Nn.memoize=yr,Nn.merge=Sa,Nn.mergeWith=ya,Nn.method=Ka,Nn.methodOf=qa,Nn.mixin=Ya,Nn.negate=br,Nn.nthArg=function(e){return e=ta(e),Ml(function(t){return wl(t,e)})},Nn.omit=ba,Nn.omitBy=function(e,t){return Ca(e,br(Yi(t)))},Nn.once=function(e){return mr(2,e)},Nn.orderBy=function(e,t,n,l){return null==e?[]:(xr(t)||(t=null==t?[]:[t]),xr(n=l?void 0:n)||(n=null==n?[]:[n]),Ol(e,t,n))},Nn.over=Za,Nn.overArgs=Tr,Nn.overEvery=$a,Nn.overSome=Qa,Nn.partial=Cr,Nn.partialRight=Ar,Nn.partition=dr,Nn.pick=Ta,Nn.pickBy=Ca,Nn.property=Ja,Nn.propertyOf=function(e){return function(t){return null==e?void 0:sl(e,t)}},Nn.pull=Bo,Nn.pullAll=Uo,Nn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Rl(e,t,Yi(n,2)):e},Nn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Rl(e,t,void 0,n):e},Nn.pullAt=Wo,Nn.range=eu,Nn.rangeRight=tu,Nn.rearg=Dr,Nn.reject=function(e,t){return(xr(e)?rt:ll)(e,br(Yi(t,3)))},Nn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var l=-1,i=[],o=e.length;for(t=Yi(t,3);++l<o;){var r=e[l];t(r,l,e)&&(n.push(r),i.push(l))}return Ll(e,i),n},Nn.rest=function(e,t){if("function"!=typeof e)throw new Ee(n);return Ml(e,t=void 0===t?t:ta(t))},Nn.reverse=jo,Nn.sampleSize=function(e,t,n){return t=(n?oo(e,t,n):void 0===t)?1:ta(t),(xr(e)?Un:Bl)(e,t)},Nn.set=function(e,t,n){return null==e?e:Ul(e,t,n)},Nn.setWith=function(e,t,n,l){return l="function"==typeof l?l:void 0,null==e?e:Ul(e,t,n,l)},Nn.shuffle=function(e){return(xr(e)?Wn:Hl)(e)},Nn.slice=function(e,t,n){var l=null==e?0:e.length;return l?(n&&"number"!=typeof n&&oo(e,t,n)?(t=0,n=l):(t=null==t?0:ta(t),n=void 0===n?l:ta(n)),zl(e,t,n)):[]},Nn.sortBy=vr,Nn.sortedUniq=function(e){return e&&e.length?ql(e):[]},Nn.sortedUniqBy=function(e,t){return e&&e.length?ql(e,Yi(t,2)):[]},Nn.split=function(e,t,n){return n&&"number"!=typeof n&&oo(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=oa(e))&&("string"==typeof t||null!=t&&!Kr(t))&&!(t=Xl(t))&&Mt(e)?ai(zt(e),0,n):e.split(t,n):[]},Nn.spread=function(e,t){if("function"!=typeof e)throw new Ee(n);return t=null==t?0:on(ta(t),0),Ml(function(n){var l=n[t],i=ai(n,0,t);return l&&st(i,l),tt(e,this,i)})},Nn.tail=function(e){var t=null==e?0:e.length;return t?zl(e,1,t):[]},Nn.take=function(e,t,n){return e&&e.length?zl(e,0,(t=n||void 0===t?1:ta(t))<0?0:t):[]},Nn.takeRight=function(e,t,n){var l=null==e?0:e.length;return l?zl(e,(t=l-(t=n||void 0===t?1:ta(t)))<0?0:t,l):[]},Nn.takeRightWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3),!1,!0):[]},Nn.takeWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3)):[]},Nn.tap=function(e,t){return t(e),e},Nn.throttle=function(e,t,l){var i=!0,o=!0;if("function"!=typeof e)throw new Ee(n);return jr(l)&&(i="leading"in l?!!l.leading:i,o="trailing"in l?!!l.trailing:o),gr(e,t,{leading:i,maxWait:t,trailing:o})},Nn.thru=er,Nn.toArray=Jr,Nn.toPairs=Aa,Nn.toPairsIn=Da,Nn.toPath=function(e){return xr(e)?ct(e,Co):Xr(e)?[e]:mi(To(oa(e)))},Nn.toPlainObject=ia,Nn.transform=function(e,t,n){var l=xr(e),i=l||kr(e)||Zr(e);if(t=Yi(t,4),null==n){var o=e&&e.constructor;n=i?l?new o:[]:jr(e)&&Br(o)?In(He(e)):{}}return(i?lt:al)(e,function(e,l,i){return t(n,e,l,i)}),n},Nn.unary=function(e){return fr(e,1)},Nn.union=Ho,Nn.unionBy=zo,Nn.unionWith=Vo,Nn.uniq=function(e){return e&&e.length?Zl(e):[]},Nn.uniqBy=function(e,t){return e&&e.length?Zl(e,Yi(t,2)):[]},Nn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Zl(e,void 0,t):[]},Nn.unset=function(e,t){return null==e||$l(e,t)},Nn.unzip=Go,Nn.unzipWith=Ko,Nn.update=function(e,t,n){return null==e?e:Ql(e,t,ii(n))},Nn.updateWith=function(e,t,n,l){return l="function"==typeof l?l:void 0,null==e?e:Ql(e,t,ii(n),l)},Nn.values=Na,Nn.valuesIn=function(e){return null==e?[]:It(e,ha(e))},Nn.without=qo,Nn.words=Ba,Nn.wrap=function(e,t){return Cr(ii(t),e)},Nn.xor=Yo,Nn.xorBy=Xo,Nn.xorWith=Zo,Nn.zip=$o,Nn.zipObject=function(e,t){return ni(e||[],t||[],Hn)},Nn.zipObjectDeep=function(e,t){return ni(e||[],t||[],Ul)},Nn.zipWith=Qo,Nn.entries=Aa,Nn.entriesIn=Da,Nn.extend=aa,Nn.extendWith=ua,Ya(Nn,Nn),Nn.add=ou,Nn.attempt=Ua,Nn.camelCase=Ia,Nn.capitalize=wa,Nn.ceil=ru,Nn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=la(n))==n?n:0),void 0!==t&&(t=(t=la(t))==t?t:0),Yn(la(e),t,n)},Nn.clone=function(e){return Xn(e,4)},Nn.cloneDeep=function(e){return Xn(e,5)},Nn.cloneDeepWith=function(e,t){return Xn(e,5,t="function"==typeof t?t:void 0)},Nn.cloneWith=function(e,t){return Xn(e,4,t="function"==typeof t?t:void 0)},Nn.conformsTo=function(e,t){return null==t||Zn(e,t,ga(t))},Nn.deburr=Oa,Nn.defaultTo=function(e,t){return null==e||e!=e?t:e},Nn.divide=au,Nn.endsWith=function(e,t,n){e=oa(e),t=Xl(t);var l=e.length,i=n=void 0===n?l:Yn(ta(n),0,l);return(n-=t.length)>=0&&e.slice(n,i)==t},Nn.eq=Nr,Nn.escape=function(e){return(e=oa(e))&&M.test(e)?e.replace(P,Pt):e},Nn.escapeRegExp=function(e){return(e=oa(e))&&V.test(e)?e.replace(z,"\\$&"):e},Nn.every=function(e,t,n){var l=xr(e)?ot:tl;return n&&oo(e,t,n)&&(t=void 0),l(e,Yi(t,3))},Nn.find=lr,Nn.findIndex=Oo,Nn.findKey=function(e,t){return mt(e,Yi(t,3),al)},Nn.findLast=ir,Nn.findLastIndex=xo,Nn.findLastKey=function(e,t){return mt(e,Yi(t,3),ul)},Nn.floor=uu,Nn.forEach=or,Nn.forEachRight=rr,Nn.forIn=function(e,t){return null==e?e:ol(e,Yi(t,3),ha)},Nn.forInRight=function(e,t){return null==e?e:rl(e,Yi(t,3),ha)},Nn.forOwn=function(e,t){return e&&al(e,Yi(t,3))},Nn.forOwnRight=function(e,t){return e&&ul(e,Yi(t,3))},Nn.get=pa,Nn.gt=Ir,Nn.gte=wr,Nn.has=function(e,t){return null!=e&&to(e,t,fl)},Nn.hasIn=fa,Nn.head=Lo,Nn.identity=Va,Nn.includes=function(e,t,n,l){e=Lr(e)?e:Na(e),n=n&&!l?ta(n):0;var i=e.length;return n<0&&(n=on(i+n,0)),Yr(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&_t(e,t,n)>-1},Nn.indexOf=function(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=null==n?0:ta(n);return i<0&&(i=on(l+i,0)),_t(e,t,i)},Nn.inRange=function(e,t,n){return t=ea(t),void 0===n?(n=t,t=0):n=ea(n),function(e,t,n){return e>=rn(t,n)&&e<on(t,n)}(e=la(e),t,n)},Nn.invoke=_a,Nn.isArguments=Or,Nn.isArray=xr,Nn.isArrayBuffer=Rr,Nn.isArrayLike=Lr,Nn.isArrayLikeObject=Pr,Nn.isBoolean=function(e){return!0===e||!1===e||Hr(e)&&vl(e)==a},Nn.isBuffer=kr,Nn.isDate=Mr,Nn.isElement=function(e){return Hr(e)&&1===e.nodeType&&!Gr(e)},Nn.isEmpty=function(e){if(null==e)return!0;if(Lr(e)&&(xr(e)||"string"==typeof e||"function"==typeof e.splice||kr(e)||Zr(e)||Or(e)))return!e.length;var t=eo(e);if(t==v||t==E)return!e.size;if(co(e))return!Tl(e).length;for(var n in e)if(ye.call(e,n))return!1;return!0},Nn.isEqual=function(e,t){return hl(e,t)},Nn.isEqualWith=function(e,t,n){var l=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===l?hl(e,t,void 0,n):!!l},Nn.isError=Fr,Nn.isFinite=function(e){return"number"==typeof e&&tn(e)},Nn.isFunction=Br,Nn.isInteger=Ur,Nn.isLength=Wr,Nn.isMap=zr,Nn.isMatch=function(e,t){return e===t||Sl(e,t,Zi(t))},Nn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,Sl(e,t,Zi(t),n)},Nn.isNaN=function(e){return Vr(e)&&e!=+e},Nn.isNative=function(e){if(uo(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yl(e)},Nn.isNil=function(e){return null==e},Nn.isNull=function(e){return null===e},Nn.isNumber=Vr,Nn.isObject=jr,Nn.isObjectLike=Hr,Nn.isPlainObject=Gr,Nn.isRegExp=Kr,Nn.isSafeInteger=function(e){return Ur(e)&&e>=-9007199254740991&&e<=9007199254740991},Nn.isSet=qr,Nn.isString=Yr,Nn.isSymbol=Xr,Nn.isTypedArray=Zr,Nn.isUndefined=function(e){return void 0===e},Nn.isWeakMap=function(e){return Hr(e)&&eo(e)==h},Nn.isWeakSet=function(e){return Hr(e)&&"[object WeakSet]"==vl(e)},Nn.join=function(e,t){return null==e?"":nn.call(e,t)},Nn.kebabCase=xa,Nn.last=Fo,Nn.lastIndexOf=function(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=l;return void 0!==n&&(i=(i=ta(n))<0?on(l+i,0):rn(i,l-1)),t==t?function(e,t,n){for(var l=n+1;l--;)if(e[l]===t)return l;return l}(e,t,i):Et(e,ht,i,!0)},Nn.lowerCase=Ra,Nn.lowerFirst=La,Nn.lt=$r,Nn.lte=Qr,Nn.max=function(e){return e&&e.length?nl(e,Va,pl):void 0},Nn.maxBy=function(e,t){return e&&e.length?nl(e,Yi(t,2),pl):void 0},Nn.mean=function(e){return St(e,Va)},Nn.meanBy=function(e,t){return St(e,Yi(t,2))},Nn.min=function(e){return e&&e.length?nl(e,Va,Cl):void 0},Nn.minBy=function(e,t){return e&&e.length?nl(e,Yi(t,2),Cl):void 0},Nn.stubArray=nu,Nn.stubFalse=lu,Nn.stubObject=function(){return{}},Nn.stubString=function(){return""},Nn.stubTrue=function(){return!0},Nn.multiply=cu,Nn.nth=function(e,t){return e&&e.length?wl(e,ta(t)):void 0},Nn.noConflict=function(){return ze._===this&&(ze._=De),this},Nn.noop=Xa,Nn.now=pr,Nn.pad=function(e,t,n){e=oa(e);var l=(t=ta(t))?Ht(e):0;if(!t||l>=t)return e;var i=(t-l)/2;return Oi(Qt(i),n)+e+Oi($t(i),n)},Nn.padEnd=function(e,t,n){e=oa(e);var l=(t=ta(t))?Ht(e):0;return t&&l<t?e+Oi(t-l,n):e},Nn.padStart=function(e,t,n){e=oa(e);var l=(t=ta(t))?Ht(e):0;return t&&l<t?Oi(t-l,n)+e:e},Nn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),un(oa(e).replace(G,""),t||0)},Nn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&oo(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=ea(e),void 0===t?(t=e,e=0):t=ea(t)),e>t){var l=e;e=t,t=l}if(n||e%1||t%1){var i=cn();return rn(e+i*(t-e+Ue("1e-"+((i+"").length-1))),t)}return Pl(e,t)},Nn.reduce=function(e,t,n){var l=xr(e)?dt:Tt,i=arguments.length<3;return l(e,Yi(t,4),n,i,Jn)},Nn.reduceRight=function(e,t,n){var l=xr(e)?vt:Tt,i=arguments.length<3;return l(e,Yi(t,4),n,i,el)},Nn.repeat=function(e,t,n){return t=(n?oo(e,t,n):void 0===t)?1:ta(t),kl(oa(e),t)},Nn.replace=function(){var e=arguments,t=oa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Nn.result=function(e,t,n){var l=-1,i=(t=oi(t,e)).length;for(i||(i=1,e=void 0);++l<i;){var o=null==e?void 0:e[Co(t[l])];void 0===o&&(l=i,o=n),e=Br(o)?o.call(e):o}return e},Nn.round=su,Nn.runInContext=e,Nn.sample=function(e){return(xr(e)?Bn:Fl)(e)},Nn.size=function(e){if(null==e)return 0;if(Lr(e))return Yr(e)?Ht(e):e.length;var t=eo(e);return t==v||t==E?e.size:Tl(e).length},Nn.snakeCase=Pa,Nn.some=function(e,t,n){var l=xr(e)?pt:Vl;return n&&oo(e,t,n)&&(t=void 0),l(e,Yi(t,3))},Nn.sortedIndex=function(e,t){return Gl(e,t)},Nn.sortedIndexBy=function(e,t,n){return Kl(e,t,Yi(n,2))},Nn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var l=Gl(e,t);if(l<n&&Nr(e[l],t))return l}return-1},Nn.sortedLastIndex=function(e,t){return Gl(e,t,!0)},Nn.sortedLastIndexBy=function(e,t,n){return Kl(e,t,Yi(n,2),!0)},Nn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Gl(e,t,!0)-1;if(Nr(e[n],t))return n}return-1},Nn.startCase=ka,Nn.startsWith=function(e,t,n){return e=oa(e),n=null==n?0:Yn(ta(n),0,e.length),t=Xl(t),e.slice(n,n+t.length)==t},Nn.subtract=du,Nn.sum=function(e){return e&&e.length?Ct(e,Va):0},Nn.sumBy=function(e,t){return e&&e.length?Ct(e,Yi(t,2)):0},Nn.template=function(e,t,n){var l=Nn.templateSettings;n&&oo(e,t,n)&&(t=void 0),e=oa(e),t=ua({},t,l,Bi);var i,o,r=ua({},t.imports,l.imports,Bi),a=ga(r),u=It(r,a),c=0,s=t.interpolate||ue,d="__p += '",v=fe((t.escape||ue).source+"|"+s.source+"|"+(s===U?ee:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),p="//# sourceURL="+(ye.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ke+"]")+"\n";e.replace(v,function(t,n,l,r,a,u){return l||(l=r),d+=e.slice(c,u).replace(ce,kt),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),a&&(o=!0,d+="';\n"+a+";\n__p += '"),l&&(d+="' +\n((__t = ("+l+")) == null ? '' : __t) +\n'"),c=u+t.length,t}),d+="';\n";var f=ye.call(t,"variable")&&t.variable;if(f){if(Q.test(f))throw new se("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(O,""):d).replace(x,"$1").replace(R,"$1;"),d="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Ua(function(){return de(a,p+"return "+d).apply(void 0,u)});if(m.source=d,Fr(m))throw m;return m},Nn.times=function(e,t){if((e=ta(e))<1||e>9007199254740991)return[];var n=4294967295,l=rn(e,4294967295);e-=4294967295;for(var i=At(l,t=Yi(t));++n<e;)t(n);return i},Nn.toFinite=ea,Nn.toInteger=ta,Nn.toLength=na,Nn.toLower=function(e){return oa(e).toLowerCase()},Nn.toNumber=la,Nn.toSafeInteger=function(e){return e?Yn(ta(e),-9007199254740991,9007199254740991):0===e?e:0},Nn.toString=oa,Nn.toUpper=function(e){return oa(e).toUpperCase()},Nn.trim=function(e,t,n){if((e=oa(e))&&(n||void 0===t))return Dt(e);if(!e||!(t=Xl(t)))return e;var l=zt(e),i=zt(t);return ai(l,Ot(l,i),xt(l,i)+1).join("")},Nn.trimEnd=function(e,t,n){if((e=oa(e))&&(n||void 0===t))return e.slice(0,Vt(e)+1);if(!e||!(t=Xl(t)))return e;var l=zt(e);return ai(l,0,xt(l,zt(t))+1).join("")},Nn.trimStart=function(e,t,n){if((e=oa(e))&&(n||void 0===t))return e.replace(G,"");if(!e||!(t=Xl(t)))return e;var l=zt(e);return ai(l,Ot(l,zt(t))).join("")},Nn.truncate=function(e,t){var n=30,l="...";if(jr(t)){var i="separator"in t?t.separator:i;n="length"in t?ta(t.length):n,l="omission"in t?Xl(t.omission):l}var o=(e=oa(e)).length;if(Mt(e)){var r=zt(e);o=r.length}if(n>=o)return e;var a=n-Ht(l);if(a<1)return l;var u=r?ai(r,0,a).join(""):e.slice(0,a);if(void 0===i)return u+l;if(r&&(a+=u.length-a),Kr(i)){if(e.slice(a).search(i)){var c,s=u;for(i.global||(i=fe(i.source,oa(te.exec(i))+"g")),i.lastIndex=0;c=i.exec(s);)var d=c.index;u=u.slice(0,void 0===d?a:d)}}else if(e.indexOf(Xl(i),a)!=a){var v=u.lastIndexOf(i);v>-1&&(u=u.slice(0,v))}return u+l},Nn.unescape=function(e){return(e=oa(e))&&k.test(e)?e.replace(L,Gt):e},Nn.uniqueId=function(e){var t=++be;return oa(e)+t},Nn.upperCase=Ma,Nn.upperFirst=Fa,Nn.each=or,Nn.eachRight=rr,Nn.first=Lo,Ya(Nn,(iu={},al(Nn,function(e,t){ye.call(Nn.prototype,t)||(iu[t]=e)}),iu),{chain:!1}),Nn.VERSION="4.17.23",lt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Nn[e].placeholder=Nn}),lt(["drop","take"],function(e,t){xn.prototype[e]=function(n){n=void 0===n?1:on(ta(n),0);var l=this.__filtered__&&!t?new xn(this):this.clone();return l.__filtered__?l.__takeCount__=rn(n,l.__takeCount__):l.__views__.push({size:rn(n,4294967295),type:e+(l.__dir__<0?"Right":"")}),l},xn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),lt(["filter","map","takeWhile"],function(e,t){var n=t+1,l=1==n||3==n;xn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Yi(e,3),type:n}),t.__filtered__=t.__filtered__||l,t}}),lt(["head","last"],function(e,t){var n="take"+(t?"Right":"");xn.prototype[e]=function(){return this[n](1).value()[0]}}),lt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");xn.prototype[e]=function(){return this.__filtered__?new xn(this):this[n](1)}}),xn.prototype.compact=function(){return this.filter(Va)},xn.prototype.find=function(e){return this.filter(e).head()},xn.prototype.findLast=function(e){return this.reverse().find(e)},xn.prototype.invokeMap=Ml(function(e,t){return"function"==typeof e?new xn(this):this.map(function(n){return _l(n,e,t)})}),xn.prototype.reject=function(e){return this.filter(br(Yi(e)))},xn.prototype.slice=function(e,t){e=ta(e);var n=this;return n.__filtered__&&(e>0||t<0)?new xn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ta(t))<0?n.dropRight(-t):n.take(t-e)),n)},xn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},xn.prototype.toArray=function(){return this.take(4294967295)},al(xn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),l=/^(?:head|last)$/.test(t),i=Nn[l?"take"+("last"==t?"Right":""):t],o=l||/^find/.test(t);i&&(Nn.prototype[t]=function(){var t=this.__wrapped__,r=l?[1]:arguments,a=t instanceof xn,u=r[0],c=a||xr(t),s=function(e){var t=i.apply(Nn,st([e],r));return l&&d?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(a=c=!1);var d=this.__chain__,v=!!this.__actions__.length,p=o&&!d,f=a&&!v;if(!o&&c){t=f?t:new xn(this);var m=e.apply(t,r);return m.__actions__.push({func:er,args:[s],thisArg:void 0}),new On(m,d)}return p&&f?e.apply(this,r):(m=this.thru(s),p?l?m.value()[0]:m.value():m)})}),lt(["pop","push","shift","sort","splice","unshift"],function(e){var t=_e[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",l=/^(?:pop|shift)$/.test(e);Nn.prototype[e]=function(){var e=arguments;if(l&&!this.__chain__){var i=this.value();return t.apply(xr(i)?i:[],e)}return this[n](function(n){return t.apply(xr(n)?n:[],e)})}}),al(xn.prototype,function(e,t){var n=Nn[t];if(n){var l=n.name+"";ye.call(gn,l)||(gn[l]=[]),gn[l].push({name:t,func:n})}}),gn[Di(void 0,2).name]=[{name:"wrapper",func:void 0}],xn.prototype.clone=function(){var e=new xn(this.__wrapped__);return e.__actions__=mi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=mi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=mi(this.__views__),e},xn.prototype.reverse=function(){if(this.__filtered__){var e=new xn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},xn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=xr(e),l=t<0,i=n?e.length:0,o=function(e,t,n){for(var l=-1,i=n.length;++l<i;){var o=n[l],r=o.size;switch(o.type){case"drop":e+=r;break;case"dropRight":t-=r;break;case"take":t=rn(t,e+r);break;case"takeRight":e=on(e,t-r)}}return{start:e,end:t}}(0,i,this.__views__),r=o.start,a=o.end,u=a-r,c=l?a:r-1,s=this.__iteratees__,d=s.length,v=0,p=rn(u,this.__takeCount__);if(!n||!l&&i==u&&p==u)return ei(e,this.__actions__);var f=[];e:for(;u--&&v<p;){for(var m=-1,E=e[c+=t];++m<d;){var _=s[m],g=_.type,h=(0,_.iteratee)(E);if(2==g)E=h;else if(!h){if(1==g)continue e;break e}}f[v++]=E}return f},Nn.prototype.at=tr,Nn.prototype.chain=function(){return Jo(this)},Nn.prototype.commit=function(){return new On(this.value(),this.__chain__)},Nn.prototype.next=function(){void 0===this.__values__&&(this.__values__=Jr(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Nn.prototype.plant=function(e){for(var t,n=this;n instanceof wn;){var l=Do(n);l.__index__=0,l.__values__=void 0,t?i.__wrapped__=l:t=l;var i=l;n=n.__wrapped__}return i.__wrapped__=e,t},Nn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof xn){var t=e;return this.__actions__.length&&(t=new xn(this)),(t=t.reverse()).__actions__.push({func:er,args:[jo],thisArg:void 0}),new On(t,this.__chain__)}return this.thru(jo)},Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return ei(this.__wrapped__,this.__actions__)},Nn.prototype.first=Nn.prototype.head,ft&&(Nn.prototype[ft]=function(){return this}),Nn}();Ge?((Ge.exports=Kt)._=Kt,Ve._=Kt):ze._=Kt}).call(q)});const We=e=>{var n,l,r;let{data:a,OpenImage:u}=e;const{t:c}=o.useTranslation();return i.createElement("div",null,a.date&&i.createElement("p",null,a.date),i.createElement("p",null,a.name),a.mobileNumber&&i.createElement(t.TelePhone,{mobile:a.mobileNumber}),a.source&&i.createElement("p",null,c("ES_APPLICATION_DETAILS_APPLICATION_CHANNEL_"+a.source.toUpperCase())),null!=a&&a.wfComment?i.createElement("div",null,null==a||null===(n=a.wfComment)||void 0===n?void 0:n.map(e=>i.createElement("div",{className:"TLComments"},i.createElement("h3",null,c("WF_COMMON_COMMENTS")),i.createElement("p",{style:{overflowX:"scroll"}},e)))):null,(null==a||null===(l=a.thumbnailsToShow)||void 0===l||null===(r=l.thumbs)||void 0===r?void 0:r.length)>0?i.createElement("div",{className:"TLComments"},i.createElement("h3",null,c("CS_COMMON_ATTACHMENTS")),i.createElement(t.DisplayPhotos,{srcs:null==a?void 0:a.thumbnailsToShow.thumbs,onClick:()=>{u(null==a?void 0:a.thumbnailsToShow)}})):null)},je=e=>{var n,a,u,c,s,d;let v=null==e||null===(n=e.application)||void 0===n?void 0:n.bookingNo.split("-")[0];const{t:p}=o.useTranslation(),f="WT"==v?"watertanker":"MT"===v?"mobileToilet":"TP"===v?"treePruning":"unknown",m="WT"===v?"request-service.water_tanker":"MT"===v?"request-service.mobile_toilet":"TP"===v?"request-service.tree_pruning":"request-service.unknown",{isLoading:E,data:_}=Digit.Hooks.useWorkflowDetails({tenantId:null===(a=e.application)||void 0===a?void 0:a.tenantId,id:null===(u=e.application)||void 0===u?void 0:u.bookingNo,moduleCode:f});function g(e){var t;window.open(null==e||null===(t=e.fullImage)||void 0===t?void 0:t[0],"_blank")}const h=t=>{if("OPEN"===t.state){var n,l;const o={date:null==t||null===(n=t.auditDetails)||void 0===n?void 0:n.lastModified,source:(null===(l=e.application)||void 0===l?void 0:l.channel)||""};return i.createElement(We,{data:o})}if(t.state){var o,r,a,u,c;const e={date:null==t||null===(o=t.auditDetails)||void 0===o?void 0:o.lastModified,name:null==t||null===(r=t.assignes)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.name,mobileNumber:null==t||null===(u=t.assignes)||void 0===u||null===(c=u[0])||void 0===c?void 0:c.mobileNumber,comment:p(null==t?void 0:t.comment),wfComment:t.wfComment,thumbnailsToShow:null==t?void 0:t.thumbnailsToShow};return i.createElement(We,{data:e,OpenImage:g})}{var s,d;const n={date:Digit.DateUtils.ConvertTimestampToDate(null===(s=e.application)||void 0===s?void 0:s.auditDetails.lastModified),name:null==t||null===(d=t.assigner)||void 0===d?void 0:d.name,comment:p(null==t?void 0:t.comment)};return i.createElement(We,{data:n})}};return E?i.createElement(t.Loader,null):i.createElement(i.Fragment,null,!E&&i.createElement(l.Fragment,null,(null==_||null===(c=_.timeline)||void 0===c?void 0:c.length)>0&&i.createElement(t.CardSectionHeader,{style:{marginBottom:"16px",marginTop:"32px"}},p("CS_APPLICATION_DETAILS_APPLICATION_TIMELINE")),null!=_&&_.timeline&&1===(null==_||null===(s=_.timeline)||void 0===s?void 0:s.length)?i.createElement(t.CheckPoint,{isCompleted:!0,label:p((null==_||null===(d=_.timeline[0])||void 0===d?void 0:d.state)&&""+_.timeline[0].state||"NA"),customChild:h(null==_?void 0:_.timeline[0])}):i.createElement(t.ConnectingCheckPoints,null,(null==_?void 0:_.timeline)&&(null==_?void 0:_.timeline.map((e,n)=>{var l;return i.createElement(i.Fragment,{key:n},i.createElement(t.CheckPoint,{keyValue:n,isCompleted:0===n,label:p(""+(null==_||null===(l=_.processInstances[n].state)||void 0===l?void 0:l.state)),customChild:h(e)}))})))),_&&(n=>{var l,o;let a=n[0];switch(null==a?void 0:a.action){case"PAY":return"citizen"===(null==e?void 0:e.userType)?i.createElement("div",{style:{marginTop:"1em",bottom:"0px",width:"100%",marginBottom:"1.2em"}},i.createElement(r.Link,{to:{pathname:"/digit-ui/citizen/payment/my-bills/"+m+"/"+(null==e||null===(l=e.application)||void 0===l?void 0:l.bookingNo),state:{tenantId:e.application.tenantId,bookingNo:null==e||null===(o=e.application)||void 0===o?void 0:o.bookingNo}}},i.createElement(t.SubmitBar,{label:p("CS_APPLICATION_DETAILS_MAKE_PAYMENT")}))):null;default:return null}})(null==_?void 0:_.nextActions))},He=["tenantId","payments"],ze=e=>i.createElement("span",{className:"cell-text"},e),Ve=e=>i.createElement("span",{className:"sla-cell"},e),Ge=["searchParams","onFilterChange","defaultSearchParams","statusMap","moduleCode"],Ke=e=>{var n;let{searchParams:r,onFilterChange:u,defaultSearchParams:c}=e,v=d(e,Ge);const{t:p}=o.useTranslation(),[f,m]=(a.useQueryClient(),l.useState(()=>s({},r,{services:[]}))),E=e=>{let t=e.delete,n=s({},f,e);t&&t.forEach(e=>delete n[e]),delete e.delete,m(s({},n))},_=()=>{m(s({},c,{services:[]})),u(s({},c))},g=Digit.ULBService.getCurrentTenantId();return i.createElement(i.Fragment,null,i.createElement("div",{className:"filter"},i.createElement("div",{className:"filter-card"},i.createElement("div",{className:"heading",style:{alignItems:"center"}},i.createElement("div",{className:"filter-label",style:{display:"flex",alignItems:"center"}},i.createElement("span",null,i.createElement("svg",{width:"17",height:"17",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{d:"M0.66666 2.48016C3.35999 5.9335 8.33333 12.3335 8.33333 12.3335V20.3335C8.33333 21.0668 8.93333 21.6668 9.66666 21.6668H12.3333C13.0667 21.6668 13.6667 21.0668 13.6667 20.3335V12.3335C13.6667 12.3335 18.6267 5.9335 21.32 2.48016C22 1.60016 21.3733 0.333496 20.2667 0.333496H1.71999C0.613327 0.333496 -0.01334 1.60016 0.66666 2.48016Z",fill:"#505A5F"}))),i.createElement("span",{style:{marginLeft:"8px",fontWeight:"normal"}},p("ES_COMMON_FILTER_BY"),":")),i.createElement("div",{className:"clearAll",onClick:_},p("ES_COMMON_CLEAR_ALL")),"desktop"===v.type&&i.createElement("span",{className:"clear-search",onClick:_,style:{border:"1px solid #e0e0e0",padding:"6px"}},i.createElement("svg",{width:"17",height:"17",viewBox:"0 0 16 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{d:"M8 5V8L12 4L8 0V3C3.58 3 0 6.58 0 11C0 12.57 0.46 14.03 1.24 15.26L2.7 13.8C2.25 12.97 2 12.01 2 11C2 7.69 4.69 5 8 5ZM14.76 6.74L13.3 8.2C13.74 9.04 14 9.99 14 11C14 14.31 11.31 17 8 17V14L4 18L8 22V19C12.42 19 16 15.42 16 11C16 9.43 15.54 7.97 14.76 6.74Z",fill:"#505A5F"}))),"mobile"===v.type&&i.createElement("span",{onClick:v.onClose},i.createElement(t.CloseSvg,null))),i.createElement("div",null,i.createElement("div",null,i.createElement("div",{className:"filter-label",style:{fontWeight:"normal"}},p("ES_INBOX_LOCALITY"),":"),i.createElement(t.Localities,{selectLocality:e=>{E({locality:[...(null==f?void 0:f.locality)||[],e]})},tenantId:g,boundaryType:"revenue"}),i.createElement("div",{className:"tag-container"},null==f||null===(n=f.locality)||void 0===n?void 0:n.map((e,n)=>i.createElement(t.RemoveableTag,{key:n,text:p(e.i18nkey),onClick:()=>{E({locality:null==f?void 0:f.locality.filter(t=>t.code!==e.code)})}})))),i.createElement("div",null,i.createElement(t.SubmitBar,{onSubmit:()=>{u(0===f.services.length?s({},f,{services:c.services}):f)},label:p("ES_COMMON_APPLY")}))))))};function qe(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));const Ye=e=>i.createElement("h1",{className:"heading-m"},e.label),Xe=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Ze=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Xe,null)),$e=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p,moduleCode:f}=e;const{data:m,isLoading:E}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),{isLoading:_,data:g}=Digit.Hooks.pt.useMDMS(a,p,"FINANCIAL_YEARLS",{},{details:{tenantId:Digit.ULBService.getStateId(),moduleDetails:[{moduleName:"egf-master",masterDetails:[{name:"FinancialYear",filter:"[?(@.module == 'PT')]"}]}]}}),[h,S]=l.useState({}),[y,b]=l.useState({}),[T,C]=l.useState([]),[A,D]=l.useState(null),[N,I]=l.useState(null),[w,O]=l.useState(null),[x,R]=l.useState(null),[L,P]=l.useState([]),[k,M]=l.useState(null),[F,B]=l.useState(!1);function U(e){I(e.target.files[0])}return l.useEffect(()=>{var e;g&&g["egf-master"]&&P(null===(e=g["egf-master"])||void 0===e?void 0:e.FinancialYear)},[g]),l.useEffect(()=>{var e;C(null==m||null===(e=m.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[m]),l.useEffect(()=>{!function(){try{R(null);const e=function(){if(N){const e=function(){if(N.size>=5242880)R(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("PT",N,Digit.ULBService.getStateId())).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?O(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):R(o("CS_FILE_UPLOAD_ERROR"))})},function(){R(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[N]),l.useEffect(()=>{r&&S(null!=r&&r.showFinancialYearsModal?(e=>{let{t:t,action:n,financialYears:l,selectedFinancialYear:o,setSelectedFinancialYear:r}=e;return{label:{heading:"WF_"+n.action+"_APPLICATION",submit:"WF_PT.CREATE_"+n.action,cancel:"ES_PT_COMMON_CANCEL"},form:[{body:[{label:t("ES_PT_FINANCIAL_YEARS"),isMandatory:!0,type:"radio",populators:i.createElement(c.RadioButtons,{options:l,optionsKey:"name",onSelect:r,selectedOption:o})}]}]}})({t:o,action:r,financialYears:L,selectedFinancialYear:k,setSelectedFinancialYear:M}):(e=>{var t;let{t:n,action:l,approvers:o,selectedApprover:r,setSelectedApprover:a,selectFile:u,uploadedFile:s,setUploadedFile:d,assigneeLabel:v,businessService:p}=e;return{label:{heading:"WF_"+(null==l?void 0:l.action)+"_APPLICATION",submit:"WF_"+p+"_"+(null==l?void 0:l.action),cancel:"ES_PT_COMMON_CANCEL"},form:[{body:[{label:l.isTerminateState||"SENDBACKTOCITIZEN"===(null==l?void 0:l.action)?null:n(v||"WF_ROLE_"+(null===(t=l.assigneeRoles)||void 0===t?void 0:t[0])),type:"dropdown",populators:l.isTerminateState||"SENDBACKTOCITIZEN"===(null==l?void 0:l.action)?null:i.createElement(c.Dropdown,{option:o,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:a,selected:r})},{label:n("ES_PT_ACTION_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:n("ES_PT_ATTACH_FILE")+(l.docUploadRequired?" *":""),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:u,onDelete:()=>{d(null)},showHint:!0,hintText:n("PT_ATTACH_RESTRICTIONS_SIZE"),message:s?"1 "+n("ES_PT_ACTION_FILEUPLOADED"):n("ES_PT_ACTION_NO_FILEUPLOADED")})}]}]}})({t:o,action:r,approvers:T,selectedApprover:A,setSelectedApprover:D,selectFile:U,uploadedFile:w,setUploadedFile:O,businessService:p}))},[r,T,L,k,w]),r&&h.form?i.createElement(c.Modal,{headerBarMain:i.createElement(Ye,{label:o(h.label.heading)}),headerBarEnd:i.createElement(Ze,{onClick:u}),actionCancelLabel:o(h.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(h.label.submit),actionSaveOnSubmit:()=>{},isDisabled:r.showFinancialYearsModal?!k:E||(null==r?void 0:r.docUploadRequired)&&!w,formId:"modal-action"},_?i.createElement(c.Loader,null):i.createElement(c.FormComposer,{config:h.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){if("INACTIVE_PROPERTY"==(null==r?void 0:r.action)){let t={action:"OPEN",comment:null==e?void 0:e.comments,businessService:"PT.CREATE",moduleName:"PT"};v.creationReason="STATUS",d({customFunctionToExecute:null==r?void 0:r.customFunctionToExecute,Property:s({},v,{workflow:t})})}else if(null!=r&&r.showFinancialYearsModal)d({customFunctionToExecute:null==r?void 0:r.customFunctionToExecute,Assessment:{financialYear:null==k?void 0:k.name,propertyId:null==v?void 0:v.propertyId,tenantId:a,source:null==v?void 0:v.source,channel:null==v?void 0:v.channel,assessmentDate:Date.now()}});else{let t={action:null==r?void 0:r.action,comment:null==e?void 0:e.comments,businessService:p,moduleName:f};t.assignes=null!=r&&r.isTerminateState||!A?[]:[A],w&&(t.documents=[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==N?void 0:N.name,fileStoreId:w}]),d({Property:s({},v,{workflow:t})})}},defaultValues:y,formId:"modal-action"})):i.createElement(c.Loader,null)},Qe=e=>i.createElement("h1",{className:"heading-m"},e.label),Je=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),et=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Je,null)),tt=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p}=e;const{data:f}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),{isLoading:m,data:E}=Digit.Hooks.pt.useMDMS(a,p,"FINANCIAL_YEARLS",{},{details:{tenantId:Digit.ULBService.getStateId(),moduleDetails:[{moduleName:"egf-master",masterDetails:[{name:"FinancialYear",filter:"[?(@.module == 'TL')]"}]}]}}),[_,g]=l.useState({}),[h,S]=l.useState({}),[y,b]=l.useState([]),[T,C]=l.useState({}),[A,D]=l.useState(null),[N,I]=l.useState(null),[w,O]=l.useState(null),[x,R]=l.useState([]),[L,P]=l.useState(null);function k(e){D(e.target.files[0])}return l.useEffect(()=>{var e;E&&E["egf-master"]&&R(null===(e=E["egf-master"])||void 0===e?void 0:e.FinancialYear)},[E]),l.useEffect(()=>{var e;b(null==f||null===(e=f.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[f]),l.useEffect(()=>{!function(){try{O(null);const e=function(){if(A){const e=function(){if(A.size>=5242880)O(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("PT",A,Digit.ULBService.getStateId())).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?I(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):O(o("CS_FILE_UPLOAD_ERROR"))})},function(){O(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[A]),l.useEffect(()=>{r&&g((e=>{let{t:t,action:n,approvers:l,selectedApprover:o,setSelectedApprover:r,selectFile:a,uploadedFile:u,setUploadedFile:s,businessService:d}=e,v=!0;return"SENDBACKTOCITIZEN"!=(null==n?void 0:n.action)&&"APPROVE"!=(null==n?void 0:n.action)||(v=!1),n.isTerminateState&&(v=!1),{label:{heading:"WF_"+(null==n?void 0:n.action)+"_APPLICATION",submit:"WF_"+(null==d?void 0:d.toUpperCase())+"_"+(null==n?void 0:n.action),cancel:"WF_EMPLOYEE_NEWTL_CANCEL"},form:[{body:[{label:v?t("WF_ASSIGNEE_NAME_LABEL"):null,placeholder:v?t("WF_ASSIGNEE_NAME_PLACEHOLDER"):null,type:"dropdown",populators:v?i.createElement(c.Dropdown,{option:l,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:r,selected:o}):null},{label:t("WF_COMMON_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:t("TL_APPROVAL_CHECKLIST_BUTTON_UP_FILE"),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:a,onDelete:()=>{s(null)},message:u?"1 "+t("ES_PT_ACTION_FILEUPLOADED"):t("CS_ACTION_NO_FILEUPLOADED")})}]}]}})({t:o,action:r,approvers:y,selectedApprover:T,setSelectedApprover:C,selectFile:k,uploadedFile:N,setUploadedFile:I,businessService:p}))},[r,y,x,L,N]),r&&_.form?i.createElement(c.Modal,{headerBarMain:i.createElement(Qe,{label:o(_.label.heading)}),headerBarEnd:i.createElement(et,{onClick:u}),actionCancelLabel:o(_.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(_.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action"},m?i.createElement(c.Loader,null):i.createElement(c.FormComposer,{config:_.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){v=s({},v,{action:null==r?void 0:r.action,comment:null==e?void 0:e.comments,assignee:null!=T&&T.uuid?[null==T?void 0:T.uuid]:null,wfDocuments:N?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==A?void 0:A.name,fileStoreId:N}]:null}),d({Licenses:[v]})},defaultValues:h,formId:"modal-action"})):i.createElement(c.Loader,null)},nt=e=>i.createElement("h1",{style:{marginLeft:"22px"},className:"heading-m BPAheading-m"},e.label),lt=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),it=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(lt,null)),ot=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p}=e;const{data:f,isLoading:m}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),[E,_]=l.useState({}),[g,h]=l.useState({}),[S,y]=l.useState([]),[b,T]=l.useState({}),[C,A]=l.useState(null),[D,N]=l.useState(null),[I,w]=l.useState(null),O=!!Digit.Utils.browser.isMobile();function x(e){A(e.target.files[0])}return l.useEffect(()=>{var e;y(null==f||null===(e=f.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[f]),l.useEffect(()=>{!function(){try{w(null);const e=function(){if(C){const e=/(.*?)(jpg|jpeg|png|image|pdf)$/i,t=function(){if(C.size>=5242880)w(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const t=function(){if(null!=C&&C.type&&!e.test(null==C?void 0:C.type))w(o("NOT_SUPPORTED_FILE_TYPE"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("OBPS",C,Digit.ULBService.getStateId()||(null==a?void 0:a.split(".")[0]))).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?N(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):w(o("CS_FILE_UPLOAD_ERROR"))})},function(){w(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[C]),l.useEffect(()=>{r&&_((e=>{let{t:t,action:n,approvers:l,selectedApprover:o,setSelectedApprover:r,selectFile:a,uploadedFile:u,setUploadedFile:s,businessService:d,error:v}=e,p=!0;return"SENDBACKTOCITIZEN"==(null==n?void 0:n.action)&&(p=!1),n.isTerminateState&&(p=!1),{label:{heading:"WF_"+(null==n?void 0:n.action)+"_APPLICATION",submit:"WF_"+(null==d?void 0:d.toUpperCase())+"_"+(null==n?void 0:n.action),cancel:"WF_EMPLOYEE_BPAREG_CANCEL"},form:[{body:[{label:p?t("WF_ASSIGNEE_NAME_LABEL"):null,placeholder:p?t("WF_ASSIGNEE_NAME_PLACEHOLDER"):null,type:"dropdown",populators:p?i.createElement(c.Dropdown,{option:l,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:r,selected:o}):null},{label:t("WF_COMMON_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:t("BPA_APPROVAL_CHECKLIST_BUTTON_UP_FILE"),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:a,onDelete:()=>{s(null)},message:u?"1 "+t("ES_PT_ACTION_FILEUPLOADED"):t("CS_ACTION_NO_FILEUPLOADED"),accept:"image/*, .pdf, .png, .jpeg, .jpg",iserror:v})}]}]}})({t:o,action:r,approvers:S,selectedApprover:b,setSelectedApprover:T,selectFile:x,uploadedFile:D,setUploadedFile:N,businessService:p,error:I}))},[r,S,D,I]),r&&E.form?i.createElement(c.Modal,{headerBarMain:i.createElement(nt,{label:o(E.label.heading)}),headerBarEnd:i.createElement(it,{onClick:u}),actionCancelLabel:o(E.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(E.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action",isOBPSFlow:!0,popupStyles:O?{width:"720px"}:{},style:O?{height:"45px",width:"44%"}:{height:"45px",width:"107px",paddingLeft:"0px",paddingRight:"0px"},popupModuleMianStyles:O?{paddingLeft:"5px"}:{}},m?i.createElement(c.Loader,null):i.createElement(c.FormComposer,{config:E.form,cardStyle:{marginLeft:"0px",marginRight:"0px",marginTop:"-25px"},className:"BPAemployeeCard",noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){v=s({},v,{action:null==r?void 0:r.action,comment:null==e?void 0:e.comments,assignee:null!=b&&b.uuid?[null==b?void 0:b.uuid]:null,wfDocuments:D?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]:null}),d({Licenses:[v]},!1,{isStakeholder:!0,bpa:!1})},defaultValues:g,formId:"modal-action"})):i.createElement(c.Loader,null)},rt=e=>i.createElement("h1",{style:{marginLeft:"22px"},className:"heading-m BPAheading-m"},e.label),at=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),ut=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(at,null)),ct=e=>{var t,n,o,r,u,d,v,p,f,m,E,_;let{t:g,action:h,tenantId:S,closeModal:y,submitAction:b,applicationDetails:T,applicationData:C,businessService:A,workflowDetails:D}=e;Digit.Hooks.obps.useObpsAPI(null!==(t=C)&&void 0!==t&&null!==(n=t.landInfo)&&void 0!==n&&null!==(o=n.address)&&void 0!==o&&o.city?null===(r=C)||void 0===r||null===(u=r.landInfo)||void 0===u||null===(d=u.address)||void 0===d?void 0:d.city:S,!1);const{data:N,isLoading:I}=Digit.Hooks.useEmployeeSearch(S,{roles:null==D||null===(v=D.data)||void 0===v||null===(p=v.initialActionState)||void 0===p||null===(f=p.nextActions)||void 0===f||null===(m=f.filter(e=>(null==e?void 0:e.action)==(null==h?void 0:h.action)))||void 0===m||null===(E=m[0])||void 0===E||null===(_=E.assigneeRoles)||void 0===_?void 0:_.map(e=>({code:e})),isActive:!0},{enabled:!(null!=h&&h.isTerminateState)}),[w,O]=(a.useQueryClient(),l.useState({})),[x,R]=l.useState({}),[L,P]=l.useState([]),[k,M]=l.useState({}),[F,B]=l.useState(null),[U,W]=l.useState(null),[j,H]=l.useState(null),[z,V]=l.useState(null),G=!!Digit.Utils.browser.isMobile();function K(e){B(e.target.files[0])}l.useEffect(()=>{var e;P(null==N||null===(e=N.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[N]),l.useEffect(()=>{!function(){try{H(null);const e=function(){if(F){const e=/(.*?)(jpg|jpeg|png|image|pdf)$/i,t=function(){if(F.size>=5242880)H(g("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const t=function(){if(null!=F&&F.type&&!e.test(null==F?void 0:F.type))H(g("NOT_SUPPORTED_FILE_TYPE"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("OBPS",F,Digit.ULBService.getStateId()||(null==S?void 0:S.split(".")[0]))).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?W(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):H(g("CS_FILE_UPLOAD_ERROR"))})},function(){H(g("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[F]);const q=e=>{let t=[];return e&&e.map((e,n)=>{t.push({documentType:(e.documentType+"_"+e.documentType.split("_")[1]).replaceAll("_","."),fileStoreId:e.fileStoreId,fileStore:e.fileStoreId,fileName:"",dropDownValues:{value:(e.documentType+"_"+e.documentType.split("_")[1]).replaceAll("_",".")}})}),t},Y=e=>{let t=[];var n;for(n=0;n<(null==e?void 0:e.questionLength);n++){var l;t.push({remarks:e["Remarks_"+n],question:null==e?void 0:e.questionList[n].question,value:null==e||null===(l=e["question_"+n])||void 0===l?void 0:l.code})}return t},X=e=>{var t,n;let l=[],i=[];var o,r;return(null==e||null===(t=e.additionalDetails)||void 0===t||null===(n=t.fieldinspection_pending)||void 0===n?void 0:n.length)>0&&(i=null==e||null===(o=e.additionalDetails)||void 0===o?void 0:o.fieldinspection_pending),"FIELDINSPECTION_INPROGRESS"==e.status?(l=JSON.parse(sessionStorage.getItem("INSPECTION_DATA")),(null===(r=l)||void 0===r?void 0:r.length)>0&&l.map((e,t)=>{i.push({docs:q(e.Documents),date:e.InspectionDate,questions:Y(e),time:null==e?void 0:e.InspectionTime})}),i=i.filter(e=>e.docs&&e.docs.length>0)):sessionStorage.removeItem("INSPECTION_DATA"),[...i]},Z=e=>{let t=JSON.parse(sessionStorage.getItem("BPA_DOCUMENTS")),n=[];return t.map(e=>{var t,l,i,o,r,a;(null==e||null===(t=e.uploadedDocuments)||void 0===t||null===(l=t[0])||void 0===l||null===(i=l.values)||void 0===i?void 0:i.length)>0&&(n=[...n,...null==e||null===(o=e.uploadedDocuments)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.values]),(null==e||null===(a=e.newUploadedDocs)||void 0===a?void 0:a.length)>0&&(n=[...n,...null==e?void 0:e.newUploadedDocs])}),n},$=()=>{var e;const t=Digit.SessionStorage.get("OBPS_APPROVAL_CHECKS"),n=Digit.SessionStorage.get("OBPS_NEW_APPROVALS");let l=null==t?void 0:t.reduce((e,t)=>null!=t&&t.checked?e.push(null==t?void 0:t.label)&&e:e,[]);return l=null===(e=l)||void 0===e?void 0:e.concat(null!==n?n.filter(e=>""!==e.label).map(e=>null==e?void 0:e.label):[]),l};return l.useEffect(()=>{h&&O((e=>{var t;let{t:n,action:l,approvers:o,selectedApprover:r,setSelectedApprover:a,selectFile:u,uploadedFile:s,setUploadedFile:d,assigneeLabel:v,businessService:p,error:f}=e,m=!1;return"REVOCATE"!=(null==l?void 0:l.action)&&"REJECT"!=(null==l?void 0:l.action)&&"SKIP_PAYMENT"!=l.action&&"SEND_BACK_TO_CITIZEN"!=(null==l?void 0:l.action)&&"APPROVE"!=(null==l?void 0:l.action)||(m=!0),{label:{heading:"WF_"+(null==l?void 0:l.action)+"_APPLICATION",submit:"WF_"+p+"_"+(null==l?void 0:l.action),cancel:"BPA_CITIZEN_CANCEL_BUTTON"},form:[{body:[{label:l.isTerminateState||m?null:n(v||"WF_ROLE_"+(null===(t=l.assigneeRoles)||void 0===t?void 0:t[0])),type:"dropdown",populators:l.isTerminateState||m?null:i.createElement(c.Dropdown,{option:o,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:a,selected:r})},{label:n("WF_COMMON_COMMENTS"),type:"textarea",isMandatory:!0,populators:{name:"comments"}},{label:""+n("WF_APPROVAL_UPLOAD_HEAD"),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:u,onDelete:()=>{d(null)},message:s?"1 "+n("ES_PT_ACTION_FILEUPLOADED"):n("CS_ACTION_NO_FILEUPLOADED"),accept:"image/*, .pdf, .png, .jpeg, .jpg",iserror:f})}]}]}})({t:g,action:h,approvers:L,selectedApprover:k,setSelectedApprover:M,selectFile:K,uploadedFile:U,setUploadedFile:W,businessService:A,assigneeLabel:"WF_ASSIGNEE_NAME_LABEL",error:j}))},[h,L,z,U,j]),h&&w.form?i.createElement(c.Modal,{headerBarMain:i.createElement(rt,{label:g(w.label.heading)}),headerBarEnd:i.createElement(ut,{onClick:y}),actionCancelLabel:g(w.label.cancel),actionCancelOnSubmit:y,actionSaveLabel:g(w.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action",isOBPSFlow:!0,popupStyles:G?{width:"720px"}:{},style:G?{minHeight:"45px",height:"auto",width:"44%"}:{minHeight:"45px",height:"auto",width:"107px",paddingLeft:"0px",paddingRight:"0px"},popupModuleMianStyles:G?{paddingLeft:"5px"}:{}},I?i.createElement(c.Loader,null):i.createElement(c.FormComposer,{config:w.form,cardStyle:{marginLeft:"0px",marginRight:"0px",marginTop:"-25px"},className:"BPAemployeeCard",noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){try{var t,n,l,i,o,r;C=s({},C,{documents:Z(),additionalDetails:s({},null===(t=C)||void 0===t?void 0:t.additionalDetails,{fieldinspection_pending:X(C),pendingapproval:$()}),workflow:{action:null==h?void 0:h.action,comment:(null==e||null===(n=e.comments)||void 0===n?void 0:n.length)>0?null==e?void 0:e.comments:null,comments:(null==e||null===(l=e.comments)||void 0===l?void 0:l.length)>0?null==e?void 0:e.comments:null,assignee:null!=k&&k.uuid?[null==k?void 0:k.uuid]:null,assignes:null!=k&&k.uuid?[null==k?void 0:k.uuid]:null,varificationDocuments:U?[{documentType:(null==h?void 0:h.action)+" DOC",fileName:null==F?void 0:F.name,fileStoreId:U}]:null},action:null==h?void 0:h.action,comment:null==e?void 0:e.comments,assignee:null!=k&&k.uuid?[null==k?void 0:k.uuid]:null,wfDocuments:U?[{documentType:(null==h?void 0:h.action)+" DOC",fileName:null==F?void 0:F.name,fileStoreId:U}]:null});const a=null==T||null===(i=T.nocData)||void 0===i?void 0:i.map(e=>{const t=Digit.SessionStorage.get(null==e?void 0:e.nocType)||[];return{Noc:s({},e,{documents:[...null!=e&&e.documents?null==e?void 0:e.documents:[],...t||[]]})}});let u={sourceRefId:null==a||null===(o=a[0])||void 0===o||null===(r=o.Noc)||void 0===r?void 0:r.sourceRefId};return Promise.resolve(Digit.NOCSearch.all(S,u)).then(function(e){var t;let n=!0,l=!0;null==e||null===(t=e.Noc)||void 0===t||t.map(e=>{var t,i,o,r,a;"APPROVED"!==(null==e||null===(t=e.applicationStatus)||void 0===t?void 0:t.toUpperCase())&&"AUTO_APPROVED"!==(null==e||null===(i=e.applicationStatus)||void 0===i?void 0:i.toUpperCase())&&"REJECTED"!==(null==e||null===(o=e.applicationStatus)||void 0===o?void 0:o.toUpperCase())&&"AUTO_REJECTED"!==(null==e||null===(r=e.applicationStatus)||void 0===r?void 0:r.toUpperCase())&&"VOIDED"!==(null==e||null===(a=e.applicationStatus)||void 0===a?void 0:a.toUpperCase())||1!=n&&1!=l||("AIRPORT_AUTHORITY"===(null==e?void 0:e.nocType)?n=!1:"FIRE_NOC"===(null==e?void 0:e.nocType)&&(l=!1))});let i=[];a&&a.map(e=>{var t,o,r,a,u,c,s,d,v,p,f,m;("APPROVED"!=(null==e||null===(t=e.Noc)||void 0===t||null===(o=t.applicationStatus)||void 0===o?void 0:o.toUpperCase())&&"AUTO_APPROVED"!=(null==e||null===(r=e.Noc)||void 0===r||null===(a=r.applicationStatus)||void 0===a?void 0:a.toUpperCase())&&"REJECTED"!=(null==e||null===(u=e.Noc)||void 0===u||null===(c=u.applicationStatus)||void 0===c?void 0:c.toUpperCase())&&"AUTO_REJECTED"!=(null==e||null===(s=e.Noc)||void 0===s||null===(d=s.applicationStatus)||void 0===d?void 0:d.toUpperCase())&&"VOIDED"!=(null==e||null===(v=e.Noc)||void 0===v||null===(p=v.applicationStatus)||void 0===p?void 0:p.toUpperCase())&&"AIRPORT_AUTHORITY"===(null==e||null===(f=e.Noc)||void 0===f?void 0:f.nocType)&&n||"FIRE_NOC"===(null==e||null===(m=e.Noc)||void 0===m?void 0:m.nocType)&&l)&&i.push(e)}),b({BPA:C},(null==i?void 0:i.length)>0&&i,{isStakeholder:!1,bpa:!0})})}catch(e){return Promise.reject(e)}},defaultValues:x,formId:"modal-action"})):i.createElement(c.Loader,null)},st=e=>i.createElement("h1",{style:{marginLeft:"22px"},className:"heading-m BPAheading-m"},e.label),dt=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),vt=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(dt,null)),pt=e=>{var t,n;let{t:o,action:u,tenantId:d,closeModal:v,submitAction:p,applicationData:f,businessService:m}=e;const{data:E,isLoading:_}=Digit.Hooks.useEmployeeSearch(d,{roles:null==u||null===(t=u.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=u&&u.isTerminateState)}),[g,h]=(a.useQueryClient(),l.useState({})),[S,y]=l.useState({}),[b,T]=l.useState([]),[C,A]=l.useState({}),[D,N]=l.useState(null),[I,w]=l.useState(null),[O,x]=l.useState(null),R=!!Digit.Utils.browser.isMobile();function L(e){N(e.target.files[0])}return r.useHistory(),l.useEffect(()=>{var e;T(null==E||null===(e=E.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[E]),l.useEffect(()=>{!function(){try{x(null);const e=function(){if(D){const e=/(.*?)(jpg|jpeg|png|image|pdf)$/i,t=function(){if(D.size>=5242880)x(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const t=function(){if(null!=D&&D.type&&!e.test(null==D?void 0:D.type))x(o("NOT_SUPPORTED_FILE_TYPE"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("NOC",D,Digit.ULBService.getStateId()||(null==d?void 0:d.split(".")[0]))).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?w(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):x(o("CS_FILE_UPLOAD_ERROR"))})},function(){x(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[D]),l.useEffect(()=>{u&&h((e=>{var t;let{t:n,action:l,approvers:o,selectedApprover:r,setSelectedApprover:a,selectFile:u,uploadedFile:s,setUploadedFile:d,assigneeLabel:v,businessService:p,error:f}=e,m=!1;"REVOCATE"!=(null==l?void 0:l.action)&&"REJECT"!=(null==l?void 0:l.action)||(m=!0);let E=!1;return"APPROVE"!=(null==l?void 0:l.action)&&"REJECT"!=(null==l?void 0:l.action)&&"AUTO_APPROVE"!=l.action&&"AUTO_REJECT"!=l.action||(E=!0),{label:{heading:"WF_"+(null==l?void 0:l.action)+"_APPLICATION",submit:"WF_"+p+"_"+(null==l?void 0:l.action),cancel:"CORE_LOGOUTPOPUP_CANCEL"},form:[{body:[{label:l.isTerminateState||E?null:n(v||"WF_ROLE_"+(null===(t=l.assigneeRoles)||void 0===t?void 0:t[0])),type:"dropdown",populators:l.isTerminateState||E?null:i.createElement(c.Dropdown,{option:o,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:a,selected:r})},{label:n("WF_COMMON_COMMENTS"),type:"textarea",isMandatory:m,populators:{name:"comments"}},{label:""+n("WF_APPROVAL_UPLOAD_HEAD"),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:u,onDelete:()=>{d(null)},showHint:!0,message:s?"1 "+n("ES_PT_ACTION_FILEUPLOADED"):n("CS_ACTION_NO_FILEUPLOADED"),accept:"image/*, .pdf, .png, .jpeg, .jpg",iserror:f})}]}]}})({t:o,action:u,approvers:b,selectedApprover:C,setSelectedApprover:A,selectFile:L,uploadedFile:I,setUploadedFile:w,businessService:m,assigneeLabel:"WF_ASSIGNEE_NAME_LABEL",error:O}))},[u,b,I,O]),u&&g.form?i.createElement(c.Modal,{headerBarMain:i.createElement(st,{label:o(g.label.heading)}),headerBarEnd:i.createElement(vt,{onClick:v}),actionCancelLabel:o(g.label.cancel),actionCancelOnSubmit:v,actionSaveLabel:o(g.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action",isOBPSFlow:!0,popupStyles:R?{width:"720px"}:{},style:R?{height:"45px",width:"44%"}:{height:"45px",width:"107px",paddingLeft:"0px",paddingRight:"0px"},popupModuleMianStyles:R?{paddingLeft:"5px"}:{}},_?i.createElement(c.Loader,null):i.createElement(c.FormComposer,{config:g.form,cardStyle:{marginLeft:"0px",marginRight:"0px",marginTop:"-25px"},className:"BPAemployeeCard",noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){var t,n,l;let i=JSON.parse(sessionStorage.getItem("NewNOCDocs")),o=(null===(t=f)||void 0===t||null===(n=t.documents)||void 0===n?void 0:n.length)>0?[...null===(l=f)||void 0===l?void 0:l.documents]:[];i.map((e,t)=>{o.push(e)}),f=s({},f,{workflow:{action:null==u?void 0:u.action,comment:null!=e&&e.comments?null==e?void 0:e.comments:null,assignee:null!=C&&C.uuid?[null==C?void 0:C.uuid]:null,documents:I?[{documentType:(null==u?void 0:u.action)+" DOC",fileName:null==D?void 0:D.name,fileStoreId:I}]:null},documents:o}),p({Noc:f},!1,{isNoc:!0})},defaultValues:S,formId:"modal-action"})):i.createElement(c.Loader,null)};var ft=function(e,t){return e===t||e!=e&&t!=t},mt=function(e,t){for(var n=e.length;n--;)if(ft(e[n][0],t))return n;return-1},Et=Array.prototype.splice;function _t(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}_t.prototype.clear=function(){this.__data__=[],this.size=0},_t.prototype.delete=function(e){var t=this.__data__,n=mt(t,e);return!(n<0||(n==t.length-1?t.pop():Et.call(t,n,1),--this.size,0))},_t.prototype.get=function(e){var t=this.__data__,n=mt(t,e);return n<0?void 0:t[n][1]},_t.prototype.has=function(e){return mt(this.__data__,e)>-1},_t.prototype.set=function(e,t){var n=this.__data__,l=mt(n,e);return l<0?(++this.size,n.push([e,t])):n[l][1]=t,this};var gt=_t,ht="object"==typeof q&&q&&q.Object===Object&&q,St="object"==typeof self&&self&&self.Object===Object&&self,yt=ht||St||Function("return this")(),bt=yt.Symbol,Tt=Object.prototype,Ct=Tt.hasOwnProperty,At=Tt.toString,Dt=bt?bt.toStringTag:void 0,Nt=Object.prototype.toString,It=bt?bt.toStringTag:void 0,wt=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":It&&It in Object(e)?function(e){var t=Ct.call(e,Dt),n=e[Dt];try{e[Dt]=void 0;var l=!0}catch(e){}var i=At.call(e);return l&&(t?e[Dt]=n:delete e[Dt]),i}(e):function(e){return Nt.call(e)}(e)},Ot=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},xt=function(e){if(!Ot(e))return!1;var t=wt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Rt=yt["__core-js_shared__"],Lt=function(){var e=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Pt=Function.prototype.toString,kt=function(e){if(null!=e){try{return Pt.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Mt=/^\[object .+?Constructor\]$/,Ft=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bt=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ot(e)||(t=e,Lt&&Lt in t))&&(xt(e)?Ft:Mt).test(kt(e));var t}(n)?n:void 0},Ut=Bt(yt,"Map"),Wt=Bt(Object,"create"),jt=Object.prototype.hasOwnProperty,Ht=Object.prototype.hasOwnProperty;function zt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}zt.prototype.clear=function(){this.__data__=Wt?Wt(null):{},this.size=0},zt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zt.prototype.get=function(e){var t=this.__data__;if(Wt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return jt.call(t,e)?t[e]:void 0},zt.prototype.has=function(e){var t=this.__data__;return Wt?void 0!==t[e]:Ht.call(t,e)},zt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Wt&&void 0===t?"__lodash_hash_undefined__":t,this};var Vt=zt,Gt=function(e,t){var n,l,i=e.__data__;return("string"==(l=typeof(n=t))||"number"==l||"symbol"==l||"boolean"==l?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function Kt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}Kt.prototype.clear=function(){this.size=0,this.__data__={hash:new Vt,map:new(Ut||gt),string:new Vt}},Kt.prototype.delete=function(e){var t=Gt(this,e).delete(e);return this.size-=t?1:0,t},Kt.prototype.get=function(e){return Gt(this,e).get(e)},Kt.prototype.has=function(e){return Gt(this,e).has(e)},Kt.prototype.set=function(e,t){var n=Gt(this,e),l=n.size;return n.set(e,t),this.size+=n.size==l?0:1,this};var qt=Kt;function Yt(e){var t=this.__data__=new gt(e);this.size=t.size}Yt.prototype.clear=function(){this.__data__=new gt,this.size=0},Yt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yt.prototype.get=function(e){return this.__data__.get(e)},Yt.prototype.has=function(e){return this.__data__.has(e)},Yt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof gt){var l=n.__data__;if(!Ut||l.length<199)return l.push([e,t]),this.size=++n.size,this;n=this.__data__=new qt(l)}return n.set(e,t),this.size=n.size,this};var Xt=Yt,Zt=function(){try{var e=Bt(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),$t=function(e,t,n){"__proto__"==t&&Zt?Zt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Qt=Object.prototype.hasOwnProperty,Jt=function(e,t,n){var l=e[t];Qt.call(e,t)&&ft(l,n)&&(void 0!==n||t in e)||$t(e,t,n)},en=function(e,t,n,l){var i=!n;n||(n={});for(var o=-1,r=t.length;++o<r;){var a=t[o],u=l?l(n[a],e[a],a,n,e):void 0;void 0===u&&(u=e[a]),i?$t(n,a,u):Jt(n,a,u)}return n},tn=function(e){return null!=e&&"object"==typeof e},nn=function(e){return tn(e)&&"[object Arguments]"==wt(e)},ln=Object.prototype,on=ln.hasOwnProperty,rn=ln.propertyIsEnumerable,an=nn(function(){return arguments}())?nn:function(e){return tn(e)&&on.call(e,"callee")&&!rn.call(e,"callee")},un=Array.isArray,cn=function(){return!1},sn=Y(function(e,t){var n=t&&!t.nodeType&&t,l=n&&e&&!e.nodeType&&e,i=l&&l.exports===n?yt.Buffer:void 0;e.exports=(i?i.isBuffer:void 0)||cn}),dn=/^(?:0|[1-9]\d*)$/,vn=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&dn.test(e))&&e>-1&&e%1==0&&e<t},pn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},fn={};fn["[object Float32Array]"]=fn["[object Float64Array]"]=fn["[object Int8Array]"]=fn["[object Int16Array]"]=fn["[object Int32Array]"]=fn["[object Uint8Array]"]=fn["[object Uint8ClampedArray]"]=fn["[object Uint16Array]"]=fn["[object Uint32Array]"]=!0,fn["[object Arguments]"]=fn["[object Array]"]=fn["[object ArrayBuffer]"]=fn["[object Boolean]"]=fn["[object DataView]"]=fn["[object Date]"]=fn["[object Error]"]=fn["[object Function]"]=fn["[object Map]"]=fn["[object Number]"]=fn["[object Object]"]=fn["[object RegExp]"]=fn["[object Set]"]=fn["[object String]"]=fn["[object WeakMap]"]=!1;var mn=function(e){return function(t){return e(t)}},En=Y(function(e,t){var n=t&&!t.nodeType&&t,l=n&&e&&!e.nodeType&&e,i=l&&l.exports===n&&ht.process,o=function(){try{return l&&l.require&&l.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o}),_n=En&&En.isTypedArray,gn=_n?mn(_n):function(e){return tn(e)&&pn(e.length)&&!!fn[wt(e)]},hn=Object.prototype.hasOwnProperty,Sn=function(e,t){var n=un(e),l=!n&&an(e),i=!n&&!l&&sn(e),o=!n&&!l&&!i&&gn(e),r=n||l||i||o,a=r?function(e,t){for(var n=-1,l=Array(e);++n<e;)l[n]=t(n);return l}(e.length,String):[],u=a.length;for(var c in e)!t&&!hn.call(e,c)||r&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vn(c,u))||a.push(c);return a},yn=Object.prototype,bn=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yn)},Tn=function(e,t){return function(n){return e(t(n))}},Cn=Tn(Object.keys,Object),An=Object.prototype.hasOwnProperty,Dn=function(e){return null!=e&&pn(e.length)&&!xt(e)},Nn=function(e){return Dn(e)?Sn(e):function(e){if(!bn(e))return Cn(e);var t=[];for(var n in Object(e))An.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)},In=Object.prototype.hasOwnProperty,wn=function(e){return Dn(e)?Sn(e,!0):function(e){if(!Ot(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=bn(e),n=[];for(var l in e)("constructor"!=l||!t&&In.call(e,l))&&n.push(l);return n}(e)},On=Y(function(e,t){var n=t&&!t.nodeType&&t,l=n&&e&&!e.nodeType&&e,i=l&&l.exports===n?yt.Buffer:void 0,o=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,l=o?o(n):new e.constructor(n);return e.copy(l),l}}),xn=function(){return[]},Rn=Object.prototype.propertyIsEnumerable,Ln=Object.getOwnPropertySymbols,Pn=Ln?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var l=-1,i=null==t?0:t.length,o=0,r=[];++l<i;){var a=t[l];Rn.call(e,a)&&(r[o++]=a)}return r}(Ln(e)))}:xn,kn=function(e,t){for(var n=-1,l=t.length,i=e.length;++n<l;)e[i+n]=t[n];return e},Mn=Tn(Object.getPrototypeOf,Object),Fn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)kn(t,Pn(e)),e=Mn(e);return t}:xn,Bn=function(e,t,n){var l=t(e);return un(e)?l:kn(l,n(e))},Un=function(e){return Bn(e,Nn,Pn)},Wn=function(e){return Bn(e,wn,Fn)},jn=Bt(yt,"DataView"),Hn=Bt(yt,"Promise"),zn=Bt(yt,"Set"),Vn=Bt(yt,"WeakMap"),Gn=kt(jn),Kn=kt(Ut),qn=kt(Hn),Yn=kt(zn),Xn=kt(Vn),Zn=wt;(jn&&"[object DataView]"!=Zn(new jn(new ArrayBuffer(1)))||Ut&&"[object Map]"!=Zn(new Ut)||Hn&&"[object Promise]"!=Zn(Hn.resolve())||zn&&"[object Set]"!=Zn(new zn)||Vn&&"[object WeakMap]"!=Zn(new Vn))&&(Zn=function(e){var t=wt(e),n="[object Object]"==t?e.constructor:void 0,l=n?kt(n):"";if(l)switch(l){case Gn:return"[object DataView]";case Kn:return"[object Map]";case qn:return"[object Promise]";case Yn:return"[object Set]";case Xn:return"[object WeakMap]"}return t});var $n=Zn,Qn=Object.prototype.hasOwnProperty,Jn=yt.Uint8Array,el=function(e){var t=new e.constructor(e.byteLength);return new Jn(t).set(new Jn(e)),t},tl=/\w*$/,nl=bt?bt.prototype:void 0,ll=nl?nl.valueOf:void 0,il=Object.create,ol=function(){function e(){}return function(t){if(!Ot(t))return{};if(il)return il(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),rl=En&&En.isMap,al=rl?mn(rl):function(e){return tn(e)&&"[object Map]"==$n(e)},ul=En&&En.isSet,cl=ul?mn(ul):function(e){return tn(e)&&"[object Set]"==$n(e)},sl={};sl["[object Arguments]"]=sl["[object Array]"]=sl["[object ArrayBuffer]"]=sl["[object DataView]"]=sl["[object Boolean]"]=sl["[object Date]"]=sl["[object Float32Array]"]=sl["[object Float64Array]"]=sl["[object Int8Array]"]=sl["[object Int16Array]"]=sl["[object Int32Array]"]=sl["[object Map]"]=sl["[object Number]"]=sl["[object Object]"]=sl["[object RegExp]"]=sl["[object Set]"]=sl["[object String]"]=sl["[object Symbol]"]=sl["[object Uint8Array]"]=sl["[object Uint8ClampedArray]"]=sl["[object Uint16Array]"]=sl["[object Uint32Array]"]=!0,sl["[object Error]"]=sl["[object Function]"]=sl["[object WeakMap]"]=!1;var dl=function e(t,n,l,i,o,r){var a,u=1&n,c=2&n,s=4&n;if(l&&(a=o?l(t,i,o,r):l(t)),void 0!==a)return a;if(!Ot(t))return t;var d=un(t);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Qn.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!u)return function(e,t){var n=-1,l=e.length;for(t||(t=Array(l));++n<l;)t[n]=e[n];return t}(t,a)}else{var v=$n(t),p="[object Function]"==v||"[object GeneratorFunction]"==v;if(sn(t))return On(t,u);if("[object Object]"==v||"[object Arguments]"==v||p&&!o){if(a=c||p?{}:function(e){return"function"!=typeof e.constructor||bn(e)?{}:ol(Mn(e))}(t),!u)return c?function(e,t){return en(e,Fn(e),t)}(t,function(e,t){return e&&en(t,wn(t),e)}(a,t)):function(e,t){return en(e,Pn(e),t)}(t,function(e,t){return e&&en(t,Nn(t),e)}(a,t))}else{if(!sl[v])return o?t:{};a=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return el(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return function(e,t){var n=t?el(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?el(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,tl.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Set]":return new l;case"[object Symbol]":return ll?Object(ll.call(e)):{}}}(t,v,u)}}r||(r=new Xt);var f=r.get(t);if(f)return f;r.set(t,a),cl(t)?t.forEach(function(i){a.add(e(i,n,l,i,t,r))}):al(t)&&t.forEach(function(i,o){a.set(o,e(i,n,l,o,t,r))});var m=d?void 0:(s?c?Wn:Un:c?wn:Nn)(t);return function(e,t){for(var n=-1,l=null==e?0:e.length;++n<l&&!1!==t(e[n],n););}(m||t,function(i,o){m&&(i=t[o=i]),Jt(a,o,e(i,n,l,o,t,r))}),a},vl=function(e){return dl(e,5)};const pl=e=>i.createElement("h1",{className:"heading-m"},e.label),fl=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),ml=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(fl,null)),El=function(e,t){void 0===t&&(t="dayend");try{const n=e.match(/(\d{4})-(\d{1,2})-(\d{1,2})/),l=new Date(Date.UTC(n[1],n[2]-1,n[3]));return l.setMinutes(l.getMinutes()+l.getTimezoneOffset()),"dayend"===t&&(l.setHours(l.getHours()+24),l.setSeconds(l.getSeconds()-1)),l.getTime()}catch(t){return e}},_l=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p}=e;const{data:f,isLoading:m}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),[E,_]=l.useState({}),[g,h]=l.useState({}),[S,y]=l.useState([]),[b,T]=l.useState({}),[C,A]=l.useState(null),[D,N]=l.useState(null),[I,w]=l.useState(null),O=window.Digit.Utils.browser.isMobile(),x=window.location.href.includes("/employee");function R(e){A(e.target.files[0])}return l.useEffect(()=>{var e;y(null==f||null===(e=f.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[f]),l.useEffect(()=>{!function(){try{w(null);const e=function(){if(C){const e=/(.*?)(jpg|jpeg|png|image|pdf)$/i,t=function(){if(C.size>=5242880)w(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const t=function(){if(null!=C&&C.type&&!e.test(null==C?void 0:C.type))w(o("NOT_SUPPORTED_FILE_TYPE"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("WS",C,Digit.ULBService.getCurrentTenantId())).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?N(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):w(o("CS_FILE_UPLOAD_ERROR"))})},function(e){console.error("Modal -> err ",e),w(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();if(t&&t.then)return t.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[C]),l.useEffect(()=>{var e,t,n,l;"DisconnectWSConnection"==(null===(e=v)||void 0===e||null===(t=e.processInstance)||void 0===t?void 0:t.businessService)||"DisconnectSWConnection"==(null===(n=v)||void 0===n||null===(l=n.processInstance)||void 0===l?void 0:l.businessService)?r&&_((e=>{var t;let{t:n,action:l,approvers:o,selectedApprover:r,setSelectedApprover:a,selectFile:u,uploadedFile:d,setUploadedFile:v,businessService:p,error:f}=e,m=!0,E=!1;return(null!=l&&null!==(t=l.action)&&void 0!==t&&t.includes("SEND_BACK")||"APPROVE_FOR_DISCONNECTION"==(null==l?void 0:l.action)||"RESUBMIT_APPLICATION"==(null==l?void 0:l.action))&&(m=!1),l.isTerminateState&&(m=!1),"EXECUTE_DISCONNECTION"!=(null==l?void 0:l.action)&&"DISCONNECTION_EXECUTED"!=(null==l?void 0:l.action)||(E=!0),{label:{heading:"WF_"+(null==l?void 0:l.action)+"_APPLICATION",submit:"WF_"+(null==p?void 0:p.toUpperCase())+"_"+(null==l?void 0:l.action),cancel:"CS_COMMON_CANCEL"},form:[{body:[{label:m?n("WF_ASSIGNEE_NAME_LABEL"):null,placeholder:m?n("WF_ASSIGNEE_NAME_PLACEHOLDER"):null,type:"dropdown",populators:m?i.createElement(c.Dropdown,{option:o,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:a,selected:r}):null},E&&{label:n("ES_FSM_ACTION_SERVICE_DATE"),isMandatory:!!E,type:"custom",populators:E?{name:"date",validation:{required:!0},defaultValue:Digit.Utils.date.getDate(),component:(e,t)=>i.createElement(c.DatePicker,s({onChange:e.onChange,date:e.value},t))}:null},{label:n("WF_COMMON_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:n("WS_APPROVAL_CHECKLIST_BUTTON_UP_FILE"),populators:i.createElement(c.UploadFile,{id:"workflow-doc",accept:".jpg,.pdf,.png,.jpeg",onUpload:u,onDelete:()=>{v(null)},message:d?"1 "+n("ES_PT_ACTION_FILEUPLOADED"):n("CS_ACTION_NO_FILEUPLOADED"),error:f,iserror:f,showHintBelow:!0,hintText:"WS_HINT_TEXT_LABEL"})}]}]}})({t:o,action:r,approvers:S,selectedApprover:b,setSelectedApprover:T,selectFile:R,uploadedFile:D,setUploadedFile:N,businessService:p,error:I})):r&&_((e=>{var t;let{t:n,action:l,approvers:o,selectedApprover:r,setSelectedApprover:a,selectFile:u,uploadedFile:s,setUploadedFile:d,businessService:v,error:p}=e,f=!0;return(null!=l&&null!==(t=l.action)&&void 0!==t&&t.includes("SEND_BACK")||"APPROVE_FOR_CONNECTION"==(null==l?void 0:l.action))&&(f=!1),l.isTerminateState&&(f=!1),{label:{heading:"WF_"+(null==l?void 0:l.action)+"_APPLICATION",submit:"WF_"+(null==v?void 0:v.toUpperCase())+"_"+(null==l?void 0:l.action),cancel:"CS_COMMON_CANCEL"},form:[{body:[{label:f?n("WF_ASSIGNEE_NAME_LABEL"):null,placeholder:f?n("WF_ASSIGNEE_NAME_PLACEHOLDER"):null,type:"dropdown",populators:f?i.createElement(c.Dropdown,{option:o,autoComplete:"off",optionKey:"name",id:"fieldInspector",select:a,selected:r}):null},{label:n("WF_COMMON_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:n("WS_APPROVAL_CHECKLIST_BUTTON_UP_FILE"),populators:i.createElement(c.UploadFile,{id:"workflow-doc",accept:".jpg,.pdf,.png,.jpeg",onUpload:u,onDelete:()=>{d(null)},message:s?"1 "+n("ES_PT_ACTION_FILEUPLOADED"):n("CS_ACTION_NO_FILEUPLOADED"),error:p,iserror:p,showHintBelow:!0,hintText:"WS_HINT_TEXT_LABEL"})}]}]}})({t:o,action:r,approvers:S,selectedApprover:b,setSelectedApprover:T,selectFile:R,uploadedFile:D,setUploadedFile:N,businessService:p,error:I}))},[r,S,D,I]),r&&E.form?i.createElement(c.Modal,{headerBarMain:i.createElement(pl,{label:o(E.label.heading)}),headerBarEnd:i.createElement(ml,{onClick:u}),actionCancelLabel:o(E.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(E.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action",style:O&&x?{width:"100%",height:"auto"}:{}},m?i.createElement(c.Loader,null):i.createElement(c.FormComposer,{config:E.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){var t,n,l,i,o,u,c,p,f,m;if(null!==(t=v)&&void 0!==t&&t.isBillAmend){var E,_,g,h,S,y,T,A,N;const t=s({},null===(E=v)||void 0===E||null===(_=E.billAmendmentDetails)||void 0===_?void 0:_.additionalDetails,{comments:null!=e&&e.comments?e.comments:null}),n=s({},null===(g=v)||void 0===g?void 0:g.billAmendmentDetails,{workflow:{businessId:null===(h=v)||void 0===h||null===(S=h.billAmendmentDetails)||void 0===S?void 0:S.amendmentId,action:null==r?void 0:r.action,tenantId:a,businessService:null!==(y=v)&&void 0!==y&&null!==(T=y.applicationType)&&void 0!==T&&T.includes("WATER")?"WS.AMENDMENT":"SW.AMENDMENT",moduleName:null!==(A=v)&&void 0!==A&&null!==(N=A.applicationType)&&void 0!==N&&N.includes("WATER")?"WS":"SW",assignes:null!=b&&b.uuid?[{uuid:null==b?void 0:b.uuid}]:[],comment:(null==e?void 0:e.comments)||"",documents:D?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]:[]},additionalDetails:t,comment:(null==e?void 0:e.comments)||"",wfDocuments:D?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]:null,processInstance:{action:null==r?void 0:r.action,assignes:null!=b&&b.uuid?[{uuid:null==b?void 0:b.uuid}]:[],comment:(null==e?void 0:e.comments)||"",documents:D?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]:[]}});d({AmendmentUpdate:n})}else{if(v=s({},v,{action:null==r?void 0:r.action,comment:(null==e?void 0:e.comments)||"",assignee:null!=b&&b.uuid?[null==b?void 0:b.uuid]:[],assignes:null!=b&&b.uuid?[{uuid:null==b?void 0:b.uuid}]:[],wfDocuments:D?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]:null,processInstance:s({},null===(n=v)||void 0===n?void 0:n.processInstance,{action:null==r?void 0:r.action,assignes:null!=b&&b.uuid?[{uuid:null==b?void 0:b.uuid}]:[],comment:(null==e?void 0:e.comments)||"",documents:D?[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]:[]})}),null!=e&&e.date&&null!==(l=v)&&void 0!==l&&null!==(i=l.applicationType)&&void 0!==i&&i.includes("DISCONNECT")){const t=vl(null==e?void 0:e.date);v.disconnectionExecutionDate=El(t)}else if(null!=e&&e.date){const t=vl(null==e?void 0:e.date);v.connectionExecutionDate=El(t)}var I;if("DisconnectWSConnection"==(null===(o=v)||void 0===o||null===(u=o.processInstance)||void 0===u?void 0:u.businessService)||"DisconnectSWConnection"==(null===(c=v)||void 0===c||null===(p=c.processInstance)||void 0===p?void 0:p.businessService)||window.location.href.includes("disconnection"))"WATER"==(null===(I=v)||void 0===I?void 0:I.serviceType)?d({WaterConnection:v,disconnectRequest:!0}):d({SewerageConnection:v,disconnectRequest:!0});else if("SEWERAGE_RECONNECTION"==(null===(f=v)||void 0===f?void 0:f.applicationType))d({SewerageConnection:v,disconnectRequest:!1,reconnectRequest:!0});else if("WATER_RECONNECTION"==(null===(m=v)||void 0===m?void 0:m.applicationType))d({WaterConnection:v,disconnectRequest:!1,reconnectRequest:!0});else{var w,O,x,R,L,P,k,M,F,B,U,W,j;const e=sessionStorage.getItem("Digit.ADHOC_ADD_REBATE_DATA"),t=e?JSON.parse(e):"";null!=t&&null!==(w=t.value)&&void 0!==w&&w.adhocPenalty&&(v.additionalDetails.adhocPenalty=parseInt(null==t||null===(O=t.value)||void 0===O?void 0:O.adhocPenalty)||""),null!=t&&null!==(x=t.value)&&void 0!==x&&x.adhocPenaltyComment&&(v.additionalDetails.adhocPenaltyComment=(null==t||null===(R=t.value)||void 0===R?void 0:R.adhocPenaltyComment)||""),null!=t&&null!==(L=t.value)&&void 0!==L&&L.adhocPenaltyReason&&(v.additionalDetails.adhocPenaltyReason=(null==t||null===(P=t.value)||void 0===P?void 0:P.adhocPenaltyReason)||""),null!=t&&null!==(k=t.value)&&void 0!==k&&k.adhocRebate&&(v.additionalDetails.adhocRebate=parseInt(null==t||null===(M=t.value)||void 0===M?void 0:M.adhocRebate)||""),null!=t&&null!==(F=t.value)&&void 0!==F&&F.adhocRebateComment&&(v.additionalDetails.adhocRebateComment=(null==t||null===(B=t.value)||void 0===B?void 0:B.adhocRebateComment)||""),null!=t&&null!==(U=t.value)&&void 0!==U&&U.adhocRebateReason&&(v.additionalDetails.adhocRebateReason=(null==t||null===(W=t.value)||void 0===W?void 0:W.adhocRebateReason)||""),"WATER"==(null===(j=v)||void 0===j?void 0:j.serviceType)?d({WaterConnection:v,disconnectRequest:!1,reconnectRequest:!1}):d({SewerageConnection:v,disconnectRequest:!1,reconnectRequest:!1})}}},defaultValues:g,formId:"modal-action"})):i.createElement(c.Loader,null)},gl=e=>i.createElement("h1",{className:"heading-m"},e.label),hl=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Sl=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(hl,null)),yl=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p,moduleCode:f}=e;console.log("applicationData",v);const{data:m}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),[E,_]=l.useState({}),[g,h]=l.useState({}),[S,y]=l.useState([]),[b,T]=l.useState(null),[C,A]=l.useState(null),[D,N]=l.useState(null),[I,w]=l.useState(null),[O,x]=l.useState(!1);function R(e){A(e.target.files[0])}return l.useEffect(()=>{var e;y(null==m||null===(e=m.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[m]),l.useEffect(()=>{!function(){try{w(null);const e=function(){if(C){const e=function(){if(C.size>=5242880)w(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("PTR",C,Digit.ULBService.getStateId())).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?N(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):w(o("CS_FILE_UPLOAD_ERROR"))})},function(){w(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[C]),l.useEffect(()=>{r&&_((e=>{let{t:t,action:n,selectFile:l,uploadedFile:o,setUploadedFile:r,businessService:a}=e;return{label:{heading:"WF_"+(null==n?void 0:n.action)+"_APPLICATION",submit:"WF_"+a+"_"+(null==n?void 0:n.action),cancel:"ES_PTR_COMMON_CANCEL"},form:[{body:[{label:t("ES_PTR_ACTION_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:t("ES_PTR_ATTACH_FILE")+(n.docUploadRequired?" *":""),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:l,onDelete:()=>{r(null)},showHint:!0,hintText:t("PTR_ATTACH_RESTRICTIONS_SIZE"),message:o?"1 "+t("ES_PTR_ACTION_FILEUPLOADED"):t("ES_PTR_ACTION_NO_FILEUPLOADED")})}]}]}})({t:o,action:r,approvers:S,selectedApprover:b,setSelectedApprover:T,selectFile:R,uploadedFile:D,setUploadedFile:N,businessService:p}))},[r,S,D]),r&&E.form?i.createElement(c.Modal,{headerBarMain:i.createElement(gl,{label:o(E.label.heading)}),headerBarEnd:i.createElement(Sl,{onClick:u}),actionCancelLabel:o(E.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(E.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action"},i.createElement(c.FormComposer,{config:E.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){let t={action:null==r?void 0:r.action,comments:null==e?void 0:e.comments,businessService:p,moduleName:f};D&&(t.documents=[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,filestoreId:D}]),d({PetRegistrationApplications:[s({},v,{workflow:t})]})},defaultValues:g,formId:"modal-action"})):i.createElement(c.Loader,null)},bl=e=>i.createElement("h1",{className:"heading-m"},e.label),Tl=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Cl=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Tl,null)),Al=e=>{var t,n,o;let{t:a,action:u,tenantId:d,closeModal:v,submitAction:p,applicationData:f,businessService:m,moduleCode:E}=e;const{data:_}=Digit.Hooks.useEmployeeSearch(d,{roles:null==u||null===(t=u.roles)||void 0===t||null===(n=t[0])||void 0===n||null===(o=n.map)||void 0===o?void 0:o.call(n,e=>({code:e})),isActive:!0},{enabled:!(null!=u&&u.isTerminateState)}),g=r.useHistory(),[h,S]=l.useState({}),[y,b]=l.useState({}),[T,C]=l.useState([]),[A,D]=l.useState(null),[N,I]=l.useState(null);return l.useEffect(()=>{var e;C(null==_||null===(e=_.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[_]),l.useEffect(()=>{"INITIATED"===(null==u?void 0:u.state)?g.push("/digit-ui/employee/asset/assetservice/edit/"+(null==f?void 0:f.applicationNo)):S((e=>{let{t:t,action:n,businessService:l}=e;return{label:{heading:"WF_"+(null==n?void 0:n.action)+"_APPLICATION",submit:"WF_"+l+"_"+(null==n?void 0:n.action),cancel:"ES_AST_COMMON_CANCEL"},form:[{body:[{label:t("AST_ACTION_COMMENTS"),type:"textarea",populators:{name:"comments"}}]}]}})({t:a,action:u,approvers:T,selectedApprover:A,setSelectedApprover:D,uploadedFile:N,setUploadedFile:I,businessService:m}))},[u,T,N]),u&&h.form?i.createElement(c.Modal,{headerBarMain:i.createElement(bl,{label:a(h.label.heading)}),headerBarEnd:i.createElement(Cl,{onClick:v}),actionCancelLabel:a(h.label.cancel),actionCancelOnSubmit:v,actionSaveLabel:a(h.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action"},i.createElement(c.FormComposer,{config:h.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){let t={action:null==u?void 0:u.action,comment:null==e?void 0:e.comments,businessService:m,moduleName:E};N&&(t.documents=[]),p({Asset:s({},f,{workflow:t})})},defaultValues:y,formId:"modal-action"})):i.createElement(c.Loader,null)},Dl=e=>i.createElement("h1",{className:"heading-m"},e.label),Nl=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Il=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Nl,null)),wl=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p,moduleCode:f}=e;const{data:m}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),[E,_]=l.useState({}),[g,h]=l.useState({}),[S,y]=l.useState([]),[b,T]=l.useState(null),[C,A]=l.useState(null),[D,N]=l.useState(null),[I,w]=l.useState(null),[O,x]=l.useState(!1);function R(e){A(e.target.files[0])}return l.useEffect(()=>{var e;y(null==m||null===(e=m.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[m]),l.useEffect(()=>{!function(){try{w(null);const e=function(){if(C){const e=function(){if(C.size>=5242880)w(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("CHB",C,a)).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?N(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):w(o("CS_FILE_UPLOAD_ERROR"))})},function(){w(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[C]),l.useEffect(()=>{r&&_((e=>{let{t:t,action:n,selectFile:l,uploadedFile:o,setUploadedFile:r}=e;return{label:{heading:"CHB_"+(null==n?void 0:n.action),submit:"CHB_"+(null==n?void 0:n.action),cancel:"CS_COMMON_BACK"},form:[{body:[{label:t("ES_CHB_ACTION_COMMENTS")+" *",type:"textarea",populators:{name:"comments",validation:{required:!0}}},{label:t("ES_CHB_ATTACH_FILE")+(n.docUploadRequired?" *":""),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:l,onDelete:()=>{r(null)},message:o?"1 "+t("CS_ACTION_FILEUPLOADED"):t("CS_ACTION_NO_FILEUPLOADED")})}]}]}})({t:o,action:r,approvers:S,selectedApprover:b,setSelectedApprover:T,selectFile:R,uploadedFile:D,setUploadedFile:N,businessService:p}))},[r,S,D]),r&&E.form?i.createElement(c.Modal,{headerBarMain:i.createElement(Dl,{label:o(E.label.heading)}),headerBarEnd:i.createElement(Il,{onClick:u}),actionCancelLabel:o(E.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(E.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action"},i.createElement(c.FormComposer,{config:E.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){let t={action:null==r?void 0:r.action,comment:null==e?void 0:e.comments,businessService:p,moduleName:f};D&&(t.documents=[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==C?void 0:C.name,fileStoreId:D}]),d({hallsBookingApplication:s({},v,{workflow:t})})},defaultValues:g,formId:"modal-action"})):i.createElement(c.Loader,null)},Ol=e=>i.createElement("h1",{className:"heading-m"},e.label),xl=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Rl=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(xl,null)),Ll=e=>{var t,n;let{t:o,action:r,tenantId:a,closeModal:u,submitAction:d,applicationData:v,businessService:p,moduleCode:f}=e;console.log("snjdskbjdfbjskfjkbs",r);const{data:m}=Digit.Hooks.useEmployeeSearch(a,{roles:null==r||null===(t=r.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:!(null!=r&&r.isTerminateState)}),[E,_]=l.useState({}),[g,h]=l.useState({}),[S,y]=l.useState([]),[b,T]=l.useState(null),[C,A]=l.useState(null),[D,N]=l.useState(null),[I,w]=l.useState(null),[O,x]=l.useState(null),[R,L]=l.useState(!1);function P(e){N(e.target.files[0])}return l.useEffect(()=>{var e;y(null==m||null===(e=m.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[m]),l.useEffect(()=>{!function(){try{x(null);const e=function(){if(D){const e=function(){if(D.size>=5242880)x(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("PTR",D,Digit.ULBService.getStateId())).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?w(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):x(o("CS_FILE_UPLOAD_ERROR"))})},function(){x(o("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[D]),l.useEffect(()=>{r&&_((e=>{let{t:t,action:n,selectFile:l,uploadedFile:o,setUploadedFile:r,businessService:a}=e;console.log("action",n);const u=(new Date).toISOString().split("T")[0];return console.log("todayedsta ::",u),{label:{heading:"WF_"+(null==n?void 0:n.action)+"_APPLICATION",submit:"WF_"+a+"_"+(null==n?void 0:n.action),cancel:"ES_PTR_COMMON_CANCEL"},form:[{body:["COMPLETIONPENDING"===(null==n?void 0:n.state)?{label:t("EW_PICKUP_DATE"),type:"date",isMandatory:!0,populators:{name:"date",min:(new Date).toISOString().split("T")[0],max:new Date(Date.now()+6048e5).toISOString().split("T")[0]}}:"null","REQUESTCOMPLETED"===(null==n?void 0:n.state)?{label:t("ES_EW_ACTION_TRANSACTION_ID"),type:"text",isMandatory:!0,populators:{name:"transactionId"}}:"null","REQUESTCOMPLETED"===(null==n?void 0:n.state)?{label:t("ES_EW_ACTION_FINALAMOUNT"),type:"text",isMandatory:!0,populators:{name:"finalAmount"}}:"null",{label:t("ES_EW_ACTION_COMMENTS"),type:"textarea",populators:{name:"comments"}},{label:t("ES_EW_PHOTO")+(n.docUploadRequired?" *":""),populators:i.createElement(c.UploadFile,{id:"workflow-doc",onUpload:l,onDelete:()=>{r(null)},showHint:!0,hintText:t("EW_ATTACH_RESTRICTIONS_SIZE"),message:o?"1 "+t("ES_EW_ACTION_FILEUPLOADED"):t("ES_EW_ACTION_NO_FILEUPLOADED")})}]}]}})({t:o,action:r,approvers:S,selectedApprover:b,setSelectedApprover:T,selectFile:P,uploadedFile:I,setUploadedFile:w,businessService:p}))},[r,S,I]),console.log("conggg",E),r&&E.form?i.createElement(c.Modal,{headerBarMain:i.createElement(Ol,{label:o(E.label.heading)}),headerBarEnd:i.createElement(Rl,{onClick:u}),actionCancelLabel:o(E.label.cancel),actionCancelOnSubmit:u,actionSaveLabel:o(E.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action"},i.createElement(c.FormComposer,{config:E.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){let t={action:null==r?void 0:r.action,comments:null==e?void 0:e.comments,businessService:p,moduleName:f};console.log("applicationData",e),I&&(t.documents=[{documentType:(null==r?void 0:r.action)+" DOC",fileName:null==D?void 0:D.name,filestoreId:I},{}]),v.pickUpDate=null==e?void 0:e.date,v.transactionId=null==e?void 0:e.transactionId,v.finalAmount=null==e?void 0:e.finalAmount,d({EwasteApplication:[s({},v,{workflow:t})]})},defaultValues:g,formId:"modal-action"})):i.createElement(c.Loader,null)};var Pl=Y(function(e,t){(function(){var l=function(e){return e instanceof l?e:this instanceof l?void(this.EXIFwrapped=e):new l(e)};e.exports&&(t=e.exports=l),t.EXIF=l;var i=l.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},o=l.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},r=l.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},a=l.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},u=l.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function c(e){return!!e.exifdata}function s(e){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,l=e.byteLength;n<l;){if(255!=t.getUint8(n))return!1;if(225==t.getUint8(n+1))return E(t,n+4,t.getUint16(n+2));n+=2+t.getUint16(n+2)}}var d={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};function v(e,t,n){for(var l,i,o,r,a=new DataView(e),u={},c=t;c<t+n;)28===a.getUint8(c)&&2===a.getUint8(c+1)&&(r=a.getUint8(c+2))in d&&(o=a.getInt16(c+3),i=d[r],l=m(a,c+5,o),u.hasOwnProperty(i)?u[i]instanceof Array?u[i].push(l):u[i]=[u[i],l]:u[i]=l),c++;return u}function p(e,t,n,l,i){var o,r,a=e.getUint16(n,!i),u={};for(r=0;r<a;r++)u[l[e.getUint16(o=n+12*r+2,!i)]]=f(e,o,t,0,i);return u}function f(e,t,n,l,i){var o,r,a,u,c,s,d=e.getUint16(t+2,!i),v=e.getUint32(t+4,!i),p=e.getUint32(t+8,!i)+n;switch(d){case 1:case 7:if(1==v)return e.getUint8(t+8,!i);for(o=v>4?p:t+8,r=[],u=0;u<v;u++)r[u]=e.getUint8(o+u);return r;case 2:return m(e,o=v>4?p:t+8,v-1);case 3:if(1==v)return e.getUint16(t+8,!i);for(o=v>2?p:t+8,r=[],u=0;u<v;u++)r[u]=e.getUint16(o+2*u,!i);return r;case 4:if(1==v)return e.getUint32(t+8,!i);for(r=[],u=0;u<v;u++)r[u]=e.getUint32(p+4*u,!i);return r;case 5:if(1==v)return c=e.getUint32(p,!i),s=e.getUint32(p+4,!i),(a=new Number(c/s)).numerator=c,a.denominator=s,a;for(r=[],u=0;u<v;u++)c=e.getUint32(p+8*u,!i),s=e.getUint32(p+4+8*u,!i),r[u]=new Number(c/s),r[u].numerator=c,r[u].denominator=s;return r;case 9:if(1==v)return e.getInt32(t+8,!i);for(r=[],u=0;u<v;u++)r[u]=e.getInt32(p+4*u,!i);return r;case 10:if(1==v)return e.getInt32(p,!i)/e.getInt32(p+4,!i);for(r=[],u=0;u<v;u++)r[u]=e.getInt32(p+8*u,!i)/e.getInt32(p+4+8*u,!i);return r}}function m(e,t,l){var i="";for(n=t;n<t+l;n++)i+=String.fromCharCode(e.getUint8(n));return i}function E(e,t){if("Exif"!=m(e,t,4))return!1;var n,l,c,s,d,v=t+6;if(18761==e.getUint16(v))n=!1;else{if(19789!=e.getUint16(v))return!1;n=!0}if(42!=e.getUint16(v+2,!n))return!1;var f=e.getUint32(v+4,!n);if(f<8)return!1;if((l=p(e,v,v+f,o,n)).ExifIFDPointer)for(c in s=p(e,v,v+l.ExifIFDPointer,i,n)){switch(c){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":s[c]=u[c][s[c]];break;case"ExifVersion":case"FlashpixVersion":s[c]=String.fromCharCode(s[c][0],s[c][1],s[c][2],s[c][3]);break;case"ComponentsConfiguration":s[c]=u.Components[s[c][0]]+u.Components[s[c][1]]+u.Components[s[c][2]]+u.Components[s[c][3]]}l[c]=s[c]}if(l.GPSInfoIFDPointer)for(c in d=p(e,v,v+l.GPSInfoIFDPointer,r,n)){switch(c){case"GPSVersionID":d[c]=d[c][0]+"."+d[c][1]+"."+d[c][2]+"."+d[c][3]}l[c]=d[c]}return l.thumbnail=function(e,t,n,l){var i=function(e,t,n){var l=e.getUint16(t,!n);return e.getUint32(t+2+12*l,!n)}(e,t+n,l);if(!i)return{};if(i>e.byteLength)return{};var o=p(e,t,t+i,a,l);if(o.Compression)switch(o.Compression){case 6:o.JpegIFOffset&&o.JpegIFByteCount&&(o.blob=new Blob([new Uint8Array(e.buffer,t+o.JpegIFOffset,o.JpegIFByteCount)],{type:"image/jpeg"}));break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",o.Compression)}else 2==o.PhotometricInterpretation&&console.log("Thumbnail image format is RGB, which is not implemented.");return o}(e,v,f,n),l}function _(e){var t={};if(1==e.nodeType){if(e.attributes.length>0){t["@attributes"]={};for(var n=0;n<e.attributes.length;n++){var l=e.attributes.item(n);t["@attributes"][l.nodeName]=l.nodeValue}}}else if(3==e.nodeType)return e.nodeValue;if(e.hasChildNodes())for(var i=0;i<e.childNodes.length;i++){var o=e.childNodes.item(i),r=o.nodeName;if(null==t[r])t[r]=_(o);else{if(null==t[r].push){var a=t[r];t[r]=[],t[r].push(a)}t[r].push(_(o))}}return t}function g(e){try{var t={};if(e.children.length>0)for(var n=0;n<e.children.length;n++){var l=e.children.item(n),i=l.attributes;for(var o in i){var r=i[o],a=r.nodeName;void 0!==a&&(t[a]=r.nodeValue)}var u=l.nodeName;if(void 0===t[u])t[u]=_(l);else{if(void 0===t[u].push){var c=t[u];t[u]=[],t[u].push(c)}t[u].push(_(l))}}else t=e.textContent;return t}catch(e){console.log(e.message)}}l.enableXmp=function(){l.isXmpEnabled=!0},l.disableXmp=function(){l.isXmpEnabled=!1},l.getData=function(e,t){return!((self.Image&&e instanceof self.Image||self.HTMLImageElement&&e instanceof self.HTMLImageElement)&&!e.complete||(c(e)?t&&t.call(e):function(e,t){function n(n){var i=s(n);e.exifdata=i||{};var o=function(e){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,l=e.byteLength,i=function(e,t){return 56===e.getUint8(t)&&66===e.getUint8(t+1)&&73===e.getUint8(t+2)&&77===e.getUint8(t+3)&&4===e.getUint8(t+4)&&4===e.getUint8(t+5)};n<l;){if(i(t,n)){var o=t.getUint8(n+7);return o%2!=0&&(o+=1),0===o&&(o=4),v(e,n+8+o,t.getUint16(n+6+o))}n++}}(n);if(e.iptcdata=o||{},l.isXmpEnabled){var r=function(e){if("DOMParser"in self){var t=new DataView(e);if(255!=t.getUint8(0)||216!=t.getUint8(1))return!1;for(var n=2,l=e.byteLength,i=new DOMParser;n<l-4;){if("http"==m(t,n,4)){var o=n-1,r=t.getUint16(n-2)-1,a=m(t,o,r),u=a.indexOf("xmpmeta>")+8,c=(a=a.substring(a.indexOf("<x:xmpmeta"),u)).indexOf("x:xmpmeta")+10;return a=a.slice(0,c)+'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+a.slice(c),g(i.parseFromString(a,"text/xml"))}n++}}}(n);e.xmpdata=r||{}}t&&t.call(e)}if(e.src)if(/^data\:/i.test(e.src))n(function(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/im)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var n=atob(e),l=n.length,i=new ArrayBuffer(l),o=new Uint8Array(i),r=0;r<l;r++)o[r]=n.charCodeAt(r);return i}(e.src));else if(/^blob\:/i.test(e.src))(o=new FileReader).onload=function(e){n(e.target.result)},function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(e){200!=this.status&&0!==this.status||o.readAsArrayBuffer(this.response)},n.send()}(e.src);else{var i=new XMLHttpRequest;i.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";n(i.response),i=null},i.open("GET",e.src,!0),i.responseType="arraybuffer",i.send(null)}else if(self.FileReader&&(e instanceof self.Blob||e instanceof self.File)){var o;(o=new FileReader).onload=function(e){n(e.target.result)},o.readAsArrayBuffer(e)}}(e,t),0))},l.getTag=function(e,t){if(c(e))return e.exifdata[t]},l.getIptcTag=function(e,t){if(c(e))return e.iptcdata[t]},l.getAllTags=function(e){if(!c(e))return{};var t,n=e.exifdata,l={};for(t in n)n.hasOwnProperty(t)&&(l[t]=n[t]);return l},l.getAllIptcTags=function(e){if(!c(e))return{};var t,n=e.iptcdata,l={};for(t in n)n.hasOwnProperty(t)&&(l[t]=n[t]);return l},l.pretty=function(e){if(!c(e))return"";var t,n=e.exifdata,l="";for(t in n)n.hasOwnProperty(t)&&(l+="object"==typeof n[t]?n[t]instanceof Number?t+" : "+n[t]+" ["+n[t].numerator+"/"+n[t].denominator+"]\r\n":t+" : ["+n[t].length+" values]\r\n":t+" : "+n[t]+"\r\n");return l},l.readFromBinaryFile=function(e){return s(e)}}).call(q)});const kl=e=>i.createElement("h1",{className:"heading-m"},e.label),Ml=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Fl=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Ml,null)),Bl=e=>{var t,n;let{t:o,action:a,tenantId:u,closeModal:d,submitAction:v,applicationData:p,businessService:f,moduleCode:m,vending_Zone:E,UserVendingZone:_,UserVendingZoneCode:g}=e;r.useHistory();const h=Digit.UserService.getUser().info,S=null==h?void 0:h.roles,{data:y}=Digit.Hooks.useEmployeeSearch(u,{roles:null==a||null===(t=a.assigneeRoles)||void 0===t||null===(n=t.map)||void 0===n?void 0:n.call(t,e=>({code:e})),isActive:!0},{enabled:null==a?void 0:a.isTerminateState}),[b,T]=l.useState({}),[C,A]=l.useState({}),[D,N]=l.useState([]),[I,w]=l.useState(null),[O,x]=l.useState(null),[R,L]=l.useState(null),[P,k]=l.useState(null),[M,F]=l.useState(!1),[B,U]=l.useState(),[W,j]=l.useState(),[H,z]=l.useState("");function V(e){F(!0),x(e.target.files[0])}function G(e){return e[0]+e[1]/60+e[2]/3600}return l.useEffect(()=>{var e;N(null==y||null===(e=y.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[y]),l.useEffect(()=>{!function(){try{k(null);const e=function(){if(O){(function(e){return new Promise(t=>{Pl.getData(e,function(){const e=Pl.getTag(this,"GPSLatitude"),n=Pl.getTag(this,"GPSLongitude");if(e&&n){const l=G(e),i=G(n);t({latitude:l,longitude:i})}else t({latitude:null,longitude:null})})})})(O).then(e=>{let{latitude:t,longitude:n}=e;t&&n?function(e,t){try{Promise.resolve(qe(function(){return Promise.resolve(fetch(((e,t)=>"https://nominatim.openstreetmap.org/reverse?format=json&lat="+e+"&lon="+t+"&zoom=18&addressdetails=1")(e,t))).then(function(e){if(!e.ok)throw new Error("Failed to fetch address");return Promise.resolve(e.json()).then(function(e){if(e&&e.address){var t,n,l,i,o,r,a,u;const c=[null===(t=e.address)||void 0===t?void 0:t.amenity,null===(n=e.address)||void 0===n?void 0:n.road,null===(l=e.address)||void 0===l?void 0:l.neighbourhood,null===(i=e.address)||void 0===i?void 0:i.suburb,null===(o=e.address)||void 0===o?void 0:o.city,null===(r=e.address)||void 0===r?void 0:r.state,null===(a=e.address)||void 0===a?void 0:a.postcode,null===(u=e.address)||void 0===u?void 0:u.country].filter(Boolean).join(", ");U(c)}})})},function(e){console.error("Error fetching address:",e)}))}catch(e){return Promise.reject(e)}}(t,n):console.log("No geolocation data found in the image.")});const e=function(){if(O.size>=5242880)k(o("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=function(e,t){try{var n=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("StreetVending",O,u)).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?L(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):k(o("CS_FILE_UPLOAD_ERROR"))})},function(){k(o("CS_FILE_UPLOAD_ERROR"))})}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,n)}(0,function(e,t){if(F(!1),e)throw t;return t});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[O]),l.useEffect(()=>{T((e=>{let{t:t,action:n,selectFile:o,uploadedFile:r,setUploadedFile:a,approvers:u,selectedApprover:s,setSelectedApprover:d,isUploading:v,geoLocationData:p,vending_Zone:f,vendingZones:m,setvendingZones:E,UserVendingZone:_,selectApprover:g}=e;const h=()=>i.createElement("div",{className:"loading-spinner"});return{label:{heading:"WF_"+(null==n?void 0:n.action)+"_APPLICATION",submit:"SV_"+(null==n?void 0:n.action),cancel:"SV_COMMON_CANCEL"},form:[{body:["APPROVE"===(null==n?void 0:n.action)||"REJECT"===(null==n?void 0:n.action)||"SENDBACKTOCITIZEN"===(null==n?void 0:n.action)?"":{label:t("SV_ASSIGNEE"),type:"dropdown",populators:i.createElement(c.Dropdown,{option:u,t:t,optionKey:"name",select:d,selected:s})},(g||[]).some(e=>"TVCEMPLOYEE"===e.code||"SVCEMP"===e.code)&&{label:t("SV_CONFIRM_VENDING_ZONE"),type:"dropdown",populators:i.createElement(c.Dropdown,{option:f,t:t,optionKey:"i18nKey",select:E,selected:(e=>e?{i18nKey:e,code:e,value:e}:null)(_)||m})},{label:t("SV_ACTION_COMMENTS"),isMandatory:!0,type:"textarea",populators:{name:"comments",validation:{required:!0}}},{label:t("SV_ATTATCH_FILE")+(n.docUploadRequired?" *":""),populators:i.createElement(l.Fragment,null,i.createElement(c.UploadFile,{id:"workflow-doc-sv",onUpload:o,onDelete:()=>{a(null)},message:v?i.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},i.createElement(h,null),i.createElement("span",null,"Uploading...")):r?"1 "+t("SV_FILE_UPLOADED"):t("SV_NO_FILE")}),(g||[]).some(e=>"INSPECTIONOFFICER"===e.code)&&p&&i.createElement("div",null,i.createElement("strong",null," Location: ",p," ")))}]}]}})({t:o,action:a,approvers:D,selectedApprover:I,setSelectedApprover:w,selectFile:V,uploadedFile:R,setUploadedFile:L,businessService:f,isUploading:M,geoLocationData:B,vending_Zone:E,vendingZones:W,setvendingZones:j,UserVendingZone:_,selectApprover:S}))},[a,D,R]),a&&b.form?i.createElement(c.Modal,{headerBarMain:i.createElement(kl,{label:o(b.label.heading)}),headerBarEnd:i.createElement(Fl,{onClick:d}),actionCancelLabel:o(b.label.cancel),actionCancelOnSubmit:d,actionSaveLabel:o(b.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action",isDisabled:(null==a?void 0:a.docUploadRequired)&&!R&&!H||!H},i.createElement(c.FormComposer,{config:b.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){var t;let n={action:null==a?void 0:a.action,comments:null==e?void 0:e.comments,businessService:f,moduleName:m,assignes:"SENDBACKTOCITIZEN"===(null==a?void 0:a.action)?[null==p||null===(t=p.auditDetails)||void 0===t?void 0:t.createdBy]:null!=I&&I.uuid?[null==I?void 0:I.uuid]:null};R&&(n.documents=[{documentType:(null==a?void 0:a.action)+" DOC",fileName:null==O?void 0:O.name,fileStoreId:R}]),v({streetVendingDetail:s({},p,{vendingZone:(null==W?void 0:W.code)||g,workflow:n})})},defaultValues:C,formId:"modal-action",onFormValueChange:(e,t)=>{z(null==t?void 0:t.comments)}})):i.createElement(c.Loader,null)},Ul=e=>i.createElement("h1",{className:"heading-m"},e.label),Wl=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),jl=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Wl,null)),Hl=e=>{var n,o,a,u;let{t:c,action:d,tenantId:v,closeModal:p,submitAction:f,applicationData:m,businessService:E,moduleCode:_}=e;const{data:g}=Digit.Hooks.useEmployeeSearch(v,{roles:null==d||null===(n=d.assigneeRoles)||void 0===n||null===(o=n.map)||void 0===o?void 0:o.call(n,e=>({code:e})),isActive:!0},{enabled:!(null!=d&&d.isTerminateState)}),{data:h}=Digit.Hooks.fsm.useVendorSearch({tenantId:v,config:{enabled:"PENDING_FOR_VEHICLE_DRIVER_ASSIGN"===(null==d?void 0:d.state)}});let S=[];null==h||null===(a=h.vendor)||void 0===a||a.map(e=>{var t,n;(null==e||null===(t=e.additionalDetails)||void 0===t?void 0:t.serviceType)===(null==m?void 0:m.bookingNo.split("-")[0])&&S.push({code:null==e?void 0:e.name,name:null==e?void 0:e.name,i18nKey:null==e?void 0:e.name,vendorId:null==e?void 0:e.id,uuid:null==e||null===(n=e.owner)||void 0===n?void 0:n.uuid})});const{data:y}=Digit.Hooks.fsm.useVehiclesSearch({tenantId:v,config:{enabled:"DELIVERY_PENDING"===(null==d?void 0:d.state)}});let b=[];null==y||null===(u=y.vehicle)||void 0===u||u.map(e=>{var t;b.push({code:null==e?void 0:e.registrationNumber,name:null==e?void 0:e.registrationNumber,i18nKey:null==e?void 0:e.registrationNumber,tankerCapacity:null==e?void 0:e.tankCapacity,vehicleId:null==e?void 0:e.id,uuid:null==e||null===(t=e.owner)||void 0===t?void 0:t.uuid})});const[T,C]=l.useState({}),[A,D]=l.useState({}),[N,I]=l.useState([]),[w,O]=l.useState(null),[x,R]=l.useState(null),[L,P]=l.useState(null),[k,M]=l.useState(null),[F,B]=l.useState(null),[U,W]=l.useState(""),j=r.useHistory();function H(e){O(e.target.files[0])}return l.useEffect(()=>{var e;I(null==g||null===(e=g.Employees)||void 0===e?void 0:e.map(e=>{var t;return{uuid:null==e?void 0:e.uuid,name:null==e||null===(t=e.user)||void 0===t?void 0:t.name}}))},[g]),l.useEffect(()=>{!function(){try{P(null);const e=function(){if(w){const e=function(){if(w.size>=5242880)P(c("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const e=qe(function(){return Promise.resolve(Digit.UploadServices.Filestorage("WT",w,v)).then(function(e){var t,n,l,i;(null==e||null===(t=e.data)||void 0===t||null===(n=t.files)||void 0===n?void 0:n.length)>0?R(null==e||null===(l=e.data)||void 0===l||null===(i=l.files[0])||void 0===i?void 0:i.fileStoreId):P(c("CS_FILE_UPLOAD_ERROR"))})},function(){P(c("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(e&&e.then)return e.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[w]),l.useEffect(()=>{if(d){if("PAY"===d.action){var e;const t=null===(e=m.bookingNo)||void 0===e?void 0:e.split("-")[0];let n="";switch(t){case"WT":n="request-service.water_tanker";break;case"MT":n="request-service.mobile_toilet";break;case"TP":n="request-service.tree_pruning";break;default:return void console.error("Unknown booking prefix:",t)}return j.push("/digit-ui/employee/payment/collect/"+n+"/"+m.bookingNo)}C((e=>{let{t:n,action:l,selectFile:o,uploadedFile:r,setUploadedFile:a,selectedVendor:u,setSelectedVendor:c,vendorDescription:s,vehicleDescription:d,selectVehicle:v,setSelectVehicle:p}=e;return{label:{heading:"RS_"+(null==l?void 0:l.action),submit:"RS_"+(null==l?void 0:l.action),cancel:"CS_COMMON_BACK"},form:[{body:["PENDING_FOR_VEHICLE_DRIVER_ASSIGN"===(null==l?void 0:l.state)?{label:n("RS_ASSIGN"),type:"dropdown",isMandatory:!0,populators:i.createElement(t.Dropdown,{option:s,t:n,optionKey:"i18nKey",select:c,selected:u})}:"null","DELIVERY_PENDING"===(null==l?void 0:l.state)?{label:n("RS_REGISTRATION_NUMBER"),isMandatory:!0,type:"dropdown",populators:i.createElement(t.Dropdown,{option:d,t:n,optionKey:"i18nKey",select:p,selected:v})}:"null",{label:n("ES_RS_ACTION_COMMENTS")+" *",type:"textarea",populators:{name:"comments",validation:{required:!0}}},{label:n("ES_RS_ATTACH_FILE")+(l.docUploadRequired?" *":""),populators:i.createElement(t.UploadFile,{id:"workflow-doc",onUpload:o,onDelete:()=>{a(null)},message:r?"1 "+n("CS_ACTION_FILEUPLOADED"):n("CS_ACTION_NO_FILEUPLOADED")})}]}]}})({t:c,action:d,selectFile:H,uploadedFile:x,setUploadedFile:R,selectedVendor:k,setSelectedVendor:M,vendorDescription:h?S:void 0,vehicleDescription:y?b:void 0,selectVehicle:F,setSelectVehicle:B}))}},[d,N,x,h,F,y]),d&&T.form?i.createElement(t.Modal,{headerBarMain:i.createElement(Ul,{label:c(T.label.heading)}),headerBarEnd:i.createElement(jl,{onClick:p}),actionCancelLabel:c(T.label.cancel),actionCancelOnSubmit:p,actionSaveLabel:c(T.label.submit),actionSaveOnSubmit:()=>{},formId:"modal-action",isDisabled:(null==d?void 0:d.docUploadRequired)&&!x&&!U||"PENDING_FOR_VEHICLE_DRIVER_ASSIGN"===(null==d?void 0:d.state)&&!k&&!U||"DELIVERY_PENDING"===(null==d?void 0:d.state)&&!F&&!U||!U},i.createElement(t.FormComposer,{config:T.form,noBoxShadow:!0,inline:!0,childrenAtTheBottom:!0,onSubmit:function(e){let t,n={action:null==d?void 0:d.action,comments:null==e?void 0:e.comments,businessService:E,moduleName:_};x&&(n.documents=[{documentType:(null==d?void 0:d.action)+" DOC",fileName:null==w?void 0:w.name,fileStoreId:x}]),"PENDING_FOR_VEHICLE_DRIVER_ASSIGN"===(null==d?void 0:d.state)&&(n.assignes=[null==k?void 0:k.uuid],m.vendorId=null==k?void 0:k.vendorId),"DELIVERY_PENDING"===(null==d?void 0:d.state)&&(m.vehicleId=null==F?void 0:F.vehicleId),t="watertanker"===E?{waterTankerBookingDetail:s({},m,{workflow:n})}:"treePruning"===E?{treePruningBookingDetail:s({},m,{workflow:n})}:{mobileToiletBookingDetail:s({},m,{workflow:n})},f(t)},defaultValues:A,formId:"modal-action",onFormValueChange:(e,t)=>{W(null==t?void 0:t.comments)}})):i.createElement(t.Loader,null)},zl=e=>null!=e&&e.businessService.includes("PT")?i.createElement($e,e):null!=e&&e.businessService.includes("ptr")?i.createElement(yl,e):null!=e&&e.businessService.includes("NewTL")||null!=e&&e.businessService.includes("TL")||null!=e&&e.businessService.includes("EDITRENEWAL")||null!=e&&e.businessService.includes("DIRECTRENEWAL")?i.createElement(tt,e):null!=e&&e.moduleCode.includes("BPAREG")?i.createElement(ot,e):null!=e&&e.moduleCode.includes("BPA")?i.createElement(ct,e):null!=e&&e.moduleCode.includes("NOC")?i.createElement(pt,e):null!=e&&e.moduleCode.includes("WS")?i.createElement(_l,e):null!=e&&e.businessService.includes("asset-create")?i.createElement(Al,e):null!=e&&e.businessService.includes("ewst")?i.createElement(Ll,e):null!=e&&e.businessService.includes("booking-refund")?i.createElement(wl,e):null!=e&&e.businessService.includes("street-vending")?i.createElement(Bl,e):null!=e&&e.businessService.includes("watertanker")||null!=e&&e.businessService.includes("mobileToilet")||null!=e&&e.businessService.includes("treePruning")?i.createElement(Hl,e):void 0;function Vl(e){let{documents:t,svgStyles:n={},isSendBackFlow:l=!1,isHrLine:r=!1,titleStyles:a}=e;const{t:u}=o.useTranslation(),s=window.location.href.includes("stakeholder");return i.createElement("div",{style:{marginTop:"19px"}},!s&&(null==t?void 0:t.map((e,n)=>{var o;return i.createElement(i.Fragment,{key:n},null!=e&&e.title?i.createElement(c.CardSubHeader,{style:a||{marginTop:"32px",marginBottom:"8px",color:"#505A5F",fontSize:"24px"}},u(null==e?void 0:e.title)):null,i.createElement("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start"}},null!=e&&e.values&&(null==e?void 0:e.values.length)>0?null==e||null===(o=e.values)||void 0===o?void 0:o.map((e,t)=>{var n;return i.createElement("a",{target:"_",href:null==e?void 0:e.url,style:{minWidth:"80px",marginRight:"10px",maxWidth:"100px",height:"auto",minWidth:"100px"},key:t},i.createElement("div",{style:{display:"flex",justifyContent:"center"}},i.createElement(c.PDFSvg,null)),i.createElement("p",{style:{marginTop:"8px",fontWeight:"bold",textAlign:"center",color:"#505A5F"}},u(null==e?void 0:e.title)),l?null!=e&&null!==(n=e.documentType)&&void 0!==n&&n.includes("NOC")?i.createElement("p",{style:{textAlign:"center"}},u(null==e?void 0:e.documentType.split(".")[1])):i.createElement("p",{style:{textAlign:"center"}},u(null==e?void 0:e.documentType)):"")}):!window.location.href.includes("citizen")&&i.createElement("div",null,i.createElement("p",null,u("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))),r&&(null==t?void 0:t.length)!=n+1?i.createElement("hr",{style:{color:"#D6D5D4",backgroundColor:"#D6D5D4",height:"2px",marginTop:"20px",marginBottom:"20px"}}):null)})),s&&(null==t?void 0:t.map((e,t)=>{var l;return i.createElement(i.Fragment,{key:t},null!=e&&e.title?i.createElement(c.CardSubHeader,{style:{marginTop:"32px",marginBottom:"8px",color:"#505A5F",fontSize:"24px"}},u(null==e?void 0:e.title)):null,i.createElement("div",null,null!=e&&e.values&&(null==e?void 0:e.values.length)>0?null==e||null===(l=e.values)||void 0===l?void 0:l.map((e,t)=>i.createElement("a",{target:"_",href:null==e?void 0:e.url,style:{minWidth:null!=n&&n.minWidth?null==n?void 0:n.minWidth:"160px",marginRight:"20px"},key:t},i.createElement("div",{style:{maxWidth:"940px",padding:"8px",borderRadius:"4px",border:"1px solid #D6D5D4",background:"#FAFAFA"}},i.createElement("p",{style:{marginTop:"8px",fontWeight:"bold",marginBottom:"10px"}},u(null==e?void 0:e.title)),null!=e&&e.docInfo?i.createElement("div",{style:{fontSize:"12px",color:"#505A5F",fontWeight:400,lineHeight:"15px",marginBottom:"10px"}},""+u(null==e?void 0:e.docInfo)):null,i.createElement(c.PDFSvg,null),i.createElement("p",{style:{marginTop:"8px",fontSize:"16px",lineHeight:"19px",color:"#505A5F",fontWeight:"400",textAlign:"center",color:"#505A5F"}},""+u(null==e?void 0:e.title))))):!window.location.href.includes("citizen")&&i.createElement("div",null,i.createElement("p",null,u("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))))})))}Y(function(e,t){(function(){var n="Expected a function",l="__lodash_placeholder__",i=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],o="[object Arguments]",r="[object Array]",a="[object Boolean]",u="[object Date]",c="[object Error]",s="[object Function]",d="[object GeneratorFunction]",v="[object Map]",p="[object Number]",f="[object Object]",m="[object RegExp]",E="[object Set]",_="[object String]",g="[object Symbol]",h="[object WeakMap]",S="[object ArrayBuffer]",y="[object DataView]",b="[object Float32Array]",T="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",D="[object Int32Array]",N="[object Uint8Array]",I="[object Uint16Array]",w="[object Uint32Array]",O=/\b__p \+= '';/g,x=/\b(__p \+=) '' \+/g,R=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,P=/[&<>"']/g,k=RegExp(L.source),M=RegExp(P.source),F=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,U=/<%=([\s\S]+?)%>/g,W=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,j=/^\w*$/,H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,z=/[\\^$.*+?()[\]{}|]/g,V=RegExp(z.source),G=/^\s+/,K=/\s/,Y=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,X=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,$=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Q=/[()=,{}\[\]\/\s]/,J=/\\(\\)?/g,ee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ne=/^[-+]0x[0-9a-f]+$/i,le=/^0b[01]+$/i,ie=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,re=/^(?:0|[1-9]\d*)$/,ae=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,ce=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ve="["+de+"]",pe="["+se+"]",fe="\\d+",me="[a-z\\xdf-\\xf6\\xf8-\\xff]",Ee="[^\\ud800-\\udfff"+de+fe+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",ge="[^\\ud800-\\udfff]",he="(?:\\ud83c[\\udde6-\\uddff]){2}",Se="[\\ud800-\\udbff][\\udc00-\\udfff]",ye="[A-Z\\xc0-\\xd6\\xd8-\\xde]",be="(?:"+me+"|"+Ee+")",Te="(?:"+ye+"|"+Ee+")",Ce="(?:"+pe+"|"+_e+")?",Ae="[\\ufe0e\\ufe0f]?"+Ce+"(?:\\u200d(?:"+[ge,he,Se].join("|")+")[\\ufe0e\\ufe0f]?"+Ce+")*",De="(?:"+["[\\u2700-\\u27bf]",he,Se].join("|")+")"+Ae,Ne="(?:"+[ge+pe+"?",pe,he,Se,"[\\ud800-\\udfff]"].join("|")+")",Ie=RegExp("['’]","g"),we=RegExp(pe,"g"),Oe=RegExp(_e+"(?="+_e+")|"+Ne+Ae,"g"),xe=RegExp([ye+"?"+me+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ve,ye,"$"].join("|")+")",Te+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ve,ye+be,"$"].join("|")+")",ye+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ye+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fe,De].join("|"),"g"),Re=RegExp("[\\u200d\\ud800-\\udfff"+se+"\\ufe0e\\ufe0f]"),Le=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ke=-1,Me={};Me[b]=Me[T]=Me[C]=Me[A]=Me[D]=Me[N]=Me["[object Uint8ClampedArray]"]=Me[I]=Me[w]=!0,Me[o]=Me[r]=Me[S]=Me[a]=Me[y]=Me[u]=Me[c]=Me[s]=Me[v]=Me[p]=Me[f]=Me[m]=Me[E]=Me[_]=Me[h]=!1;var Fe={};Fe[o]=Fe[r]=Fe[S]=Fe[y]=Fe[a]=Fe[u]=Fe[b]=Fe[T]=Fe[C]=Fe[A]=Fe[D]=Fe[v]=Fe[p]=Fe[f]=Fe[m]=Fe[E]=Fe[_]=Fe[g]=Fe[N]=Fe["[object Uint8ClampedArray]"]=Fe[I]=Fe[w]=!0,Fe[c]=Fe[s]=Fe[h]=!1;var Be={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ue=parseFloat,We=parseInt,je="object"==typeof q&&q&&q.Object===Object&&q,He="object"==typeof self&&self&&self.Object===Object&&self,ze=je||He||Function("return this")(),Ve=t&&!t.nodeType&&t,Ge=Ve&&e&&!e.nodeType&&e,Ke=Ge&&Ge.exports===Ve,qe=Ke&&je.process,Ye=function(){try{return Ge&&Ge.require&&Ge.require("util").types||qe&&qe.binding&&qe.binding("util")}catch(e){}}(),Xe=Ye&&Ye.isArrayBuffer,Ze=Ye&&Ye.isDate,$e=Ye&&Ye.isMap,Qe=Ye&&Ye.isRegExp,Je=Ye&&Ye.isSet,et=Ye&&Ye.isTypedArray;function tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function nt(e,t,n,l){for(var i=-1,o=null==e?0:e.length;++i<o;){var r=e[i];t(l,r,n(r),e)}return l}function lt(e,t){for(var n=-1,l=null==e?0:e.length;++n<l&&!1!==t(e[n],n,e););return e}function it(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ot(e,t){for(var n=-1,l=null==e?0:e.length;++n<l;)if(!t(e[n],n,e))return!1;return!0}function rt(e,t){for(var n=-1,l=null==e?0:e.length,i=0,o=[];++n<l;){var r=e[n];t(r,n,e)&&(o[i++]=r)}return o}function at(e,t){return!(null==e||!e.length)&&_t(e,t,0)>-1}function ut(e,t,n){for(var l=-1,i=null==e?0:e.length;++l<i;)if(n(t,e[l]))return!0;return!1}function ct(e,t){for(var n=-1,l=null==e?0:e.length,i=Array(l);++n<l;)i[n]=t(e[n],n,e);return i}function st(e,t){for(var n=-1,l=t.length,i=e.length;++n<l;)e[i+n]=t[n];return e}function dt(e,t,n,l){var i=-1,o=null==e?0:e.length;for(l&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function vt(e,t,n,l){var i=null==e?0:e.length;for(l&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function pt(e,t){for(var n=-1,l=null==e?0:e.length;++n<l;)if(t(e[n],n,e))return!0;return!1}var ft=yt("length");function mt(e,t,n){var l;return n(e,function(e,n,i){if(t(e,n,i))return l=n,!1}),l}function Et(e,t,n,l){for(var i=e.length,o=n+(l?1:-1);l?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function _t(e,t,n){return t==t?function(e,t,n){for(var l=n-1,i=e.length;++l<i;)if(e[l]===t)return l;return-1}(e,t,n):Et(e,ht,n)}function gt(e,t,n,l){for(var i=n-1,o=e.length;++i<o;)if(l(e[i],t))return i;return-1}function ht(e){return e!=e}function St(e,t){var n=null==e?0:e.length;return n?Ct(e,t)/n:NaN}function yt(e){return function(t){return null==t?void 0:t[e]}}function bt(e){return function(t){return null==e?void 0:e[t]}}function Tt(e,t,n,l,i){return i(e,function(e,i,o){n=l?(l=!1,e):t(n,e,i,o)}),n}function Ct(e,t){for(var n,l=-1,i=e.length;++l<i;){var o=t(e[l]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function At(e,t){for(var n=-1,l=Array(e);++n<e;)l[n]=t(n);return l}function Dt(e){return e?e.slice(0,Vt(e)+1).replace(G,""):e}function Nt(e){return function(t){return e(t)}}function It(e,t){return ct(t,function(t){return e[t]})}function wt(e,t){return e.has(t)}function Ot(e,t){for(var n=-1,l=e.length;++n<l&&_t(t,e[n],0)>-1;);return n}function xt(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function Rt(e,t){for(var n=e.length,l=0;n--;)e[n]===t&&++l;return l}var Lt=bt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Pt=bt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function kt(e){return"\\"+Be[e]}function Mt(e){return Re.test(e)}function Ft(e){var t=-1,n=Array(e.size);return e.forEach(function(e,l){n[++t]=[l,e]}),n}function Bt(e,t){return function(n){return e(t(n))}}function Ut(e,t){for(var n=-1,i=e.length,o=0,r=[];++n<i;){var a=e[n];a!==t&&a!==l||(e[n]=l,r[o++]=n)}return r}function Wt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function jt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function Ht(e){return Mt(e)?function(e){for(var t=Oe.lastIndex=0;Oe.test(e);)++t;return t}(e):ft(e)}function zt(e){return Mt(e)?function(e){return e.match(Oe)||[]}(e):function(e){return e.split("")}(e)}function Vt(e){for(var t=e.length;t--&&K.test(e.charAt(t)););return t}var Gt=bt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Kt=function e(t){var K=(t=null==t?ze:Kt.defaults(ze.Object(),t,Kt.pick(ze,Pe))).Array,q=t.Date,se=t.Error,de=t.Function,ve=t.Math,pe=t.Object,fe=t.RegExp,me=t.String,Ee=t.TypeError,_e=K.prototype,ge=pe.prototype,he=t["__core-js_shared__"],Se=de.prototype.toString,ye=ge.hasOwnProperty,be=0,Te=function(){var e=/[^.]+$/.exec(he&&he.keys&&he.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ce=ge.toString,Ae=Se.call(pe),De=ze._,Ne=fe("^"+Se.call(ye).replace(z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Oe=Ke?t.Buffer:void 0,Re=t.Symbol,Be=t.Uint8Array,je=Oe?Oe.allocUnsafe:void 0,He=Bt(pe.getPrototypeOf,pe),Ve=pe.create,Ge=ge.propertyIsEnumerable,qe=_e.splice,Ye=Re?Re.isConcatSpreadable:void 0,ft=Re?Re.iterator:void 0,bt=Re?Re.toStringTag:void 0,qt=function(){try{var e=$i(pe,"defineProperty");return e({},"",{}),e}catch(e){}}(),Yt=t.clearTimeout!==ze.clearTimeout&&t.clearTimeout,Xt=q&&q.now!==ze.Date.now&&q.now,Zt=t.setTimeout!==ze.setTimeout&&t.setTimeout,$t=ve.ceil,Qt=ve.floor,Jt=pe.getOwnPropertySymbols,en=Oe?Oe.isBuffer:void 0,tn=t.isFinite,nn=_e.join,ln=Bt(pe.keys,pe),on=ve.max,rn=ve.min,an=q.now,un=t.parseInt,cn=ve.random,sn=_e.reverse,dn=$i(t,"DataView"),vn=$i(t,"Map"),pn=$i(t,"Promise"),fn=$i(t,"Set"),mn=$i(t,"WeakMap"),En=$i(pe,"create"),_n=mn&&new mn,gn={},hn=Ao(dn),Sn=Ao(vn),yn=Ao(pn),bn=Ao(fn),Tn=Ao(mn),Cn=Re?Re.prototype:void 0,An=Cn?Cn.valueOf:void 0,Dn=Cn?Cn.toString:void 0;function Nn(e){if(Hr(e)&&!xr(e)&&!(e instanceof xn)){if(e instanceof On)return e;if(ye.call(e,"__wrapped__"))return Do(e)}return new On(e)}var In=function(){function e(){}return function(t){if(!jr(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function wn(){}function On(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function xn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Rn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}function Ln(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var l=e[t];this.set(l[0],l[1])}}function kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Pn;++t<n;)this.add(e[t])}function Mn(e){var t=this.__data__=new Ln(e);this.size=t.size}function Fn(e,t){var n=xr(e),l=!n&&Or(e),i=!n&&!l&&kr(e),o=!n&&!l&&!i&&Zr(e),r=n||l||i||o,a=r?At(e.length,me):[],u=a.length;for(var c in e)!t&&!ye.call(e,c)||r&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||io(c,u))||a.push(c);return a}function Bn(e){var t=e.length;return t?e[Pl(0,t-1)]:void 0}function Un(e,t){return bo(mi(e),Yn(t,0,e.length))}function Wn(e){return bo(mi(e))}function jn(e,t,n){(void 0!==n&&!Nr(e[t],n)||void 0===n&&!(t in e))&&Kn(e,t,n)}function Hn(e,t,n){var l=e[t];ye.call(e,t)&&Nr(l,n)&&(void 0!==n||t in e)||Kn(e,t,n)}function zn(e,t){for(var n=e.length;n--;)if(Nr(e[n][0],t))return n;return-1}function Vn(e,t,n,l){return Jn(e,function(e,i,o){t(l,e,n(e),o)}),l}function Gn(e,t){return e&&Ei(t,ga(t),e)}function Kn(e,t,n){"__proto__"==t&&qt?qt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function qn(e,t){for(var n=-1,l=t.length,i=K(l),o=null==e;++n<l;)i[n]=o?void 0:pa(e,t[n]);return i}function Yn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Xn(e,t,n,l,i,r){var c,h=1&t,O=2&t,x=4&t;if(n&&(c=i?n(e,l,i,r):n(e)),void 0!==c)return c;if(!jr(e))return e;var R=xr(e);if(R){if(c=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ye.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!h)return mi(e,c)}else{var L=eo(e),P=L==s||L==d;if(kr(e))return ci(e,h);if(L==f||L==o||P&&!i){if(c=O||P?{}:no(e),!h)return O?function(e,t){return Ei(e,Ji(e),t)}(e,function(e,t){return e&&Ei(t,ha(t),e)}(c,e)):function(e,t){return Ei(e,Qi(e),t)}(e,Gn(c,e))}else{if(!Fe[L])return i?e:{};c=function(e,t,n){var l=e.constructor;switch(t){case S:return si(e);case a:case u:return new l(+e);case y:return function(e,t){var n=t?si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case b:case T:case C:case A:case D:case N:case"[object Uint8ClampedArray]":case I:case w:return di(e,n);case v:return new l;case p:case _:return new l(e);case m:return function(e){var t=new e.constructor(e.source,te.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new l;case g:return An?pe(An.call(e)):{}}}(e,L,h)}}r||(r=new Mn);var k=r.get(e);if(k)return k;r.set(e,c),qr(e)?e.forEach(function(l){c.add(Xn(l,t,n,l,e,r))}):zr(e)&&e.forEach(function(l,i){c.set(i,Xn(l,t,n,i,e,r))});var M=R?void 0:(x?O?Vi:zi:O?ha:ga)(e);return lt(M||e,function(l,i){M&&(l=e[i=l]),Hn(c,i,Xn(l,t,n,i,e,r))}),c}function Zn(e,t,n){var l=n.length;if(null==e)return!l;for(e=pe(e);l--;){var i=n[l],o=e[i];if(void 0===o&&!(i in e)||!(0,t[i])(o))return!1}return!0}function $n(e,t,l){if("function"!=typeof e)throw new Ee(n);return go(function(){e.apply(void 0,l)},t)}function Qn(e,t,n,l){var i=-1,o=at,r=!0,a=e.length,u=[],c=t.length;if(!a)return u;n&&(t=ct(t,Nt(n))),l?(o=ut,r=!1):t.length>=200&&(o=wt,r=!1,t=new kn(t));e:for(;++i<a;){var s=e[i],d=null==n?s:n(s);if(s=l||0!==s?s:0,r&&d==d){for(var v=c;v--;)if(t[v]===d)continue e;u.push(s)}else o(t,d,l)||u.push(s)}return u}Nn.templateSettings={escape:F,evaluate:B,interpolate:U,variable:"",imports:{_:Nn}},(Nn.prototype=wn.prototype).constructor=Nn,(On.prototype=In(wn.prototype)).constructor=On,(xn.prototype=In(wn.prototype)).constructor=xn,Rn.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},Rn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Rn.prototype.get=function(e){var t=this.__data__;if(En){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ye.call(t,e)?t[e]:void 0},Rn.prototype.has=function(e){var t=this.__data__;return En?void 0!==t[e]:ye.call(t,e)},Rn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=En&&void 0===t?"__lodash_hash_undefined__":t,this},Ln.prototype.clear=function(){this.__data__=[],this.size=0},Ln.prototype.delete=function(e){var t=this.__data__,n=zn(t,e);return!(n<0||(n==t.length-1?t.pop():qe.call(t,n,1),--this.size,0))},Ln.prototype.get=function(e){var t=this.__data__,n=zn(t,e);return n<0?void 0:t[n][1]},Ln.prototype.has=function(e){return zn(this.__data__,e)>-1},Ln.prototype.set=function(e,t){var n=this.__data__,l=zn(n,e);return l<0?(++this.size,n.push([e,t])):n[l][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Rn,map:new(vn||Ln),string:new Rn}},Pn.prototype.delete=function(e){var t=Xi(this,e).delete(e);return this.size-=t?1:0,t},Pn.prototype.get=function(e){return Xi(this,e).get(e)},Pn.prototype.has=function(e){return Xi(this,e).has(e)},Pn.prototype.set=function(e,t){var n=Xi(this,e),l=n.size;return n.set(e,t),this.size+=n.size==l?0:1,this},kn.prototype.add=kn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},kn.prototype.has=function(e){return this.__data__.has(e)},Mn.prototype.clear=function(){this.__data__=new Ln,this.size=0},Mn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Mn.prototype.get=function(e){return this.__data__.get(e)},Mn.prototype.has=function(e){return this.__data__.has(e)},Mn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ln){var l=n.__data__;if(!vn||l.length<199)return l.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pn(l)}return n.set(e,t),this.size=n.size,this};var Jn=hi(al),el=hi(ul,!0);function tl(e,t){var n=!0;return Jn(e,function(e,l,i){return n=!!t(e,l,i)}),n}function nl(e,t,n){for(var l=-1,i=e.length;++l<i;){var o=e[l],r=t(o);if(null!=r&&(void 0===a?r==r&&!Xr(r):n(r,a)))var a=r,u=o}return u}function ll(e,t){var n=[];return Jn(e,function(e,l,i){t(e,l,i)&&n.push(e)}),n}function il(e,t,n,l,i){var o=-1,r=e.length;for(n||(n=lo),i||(i=[]);++o<r;){var a=e[o];t>0&&n(a)?t>1?il(a,t-1,n,l,i):st(i,a):l||(i[i.length]=a)}return i}var ol=Si(),rl=Si(!0);function al(e,t){return e&&ol(e,t,ga)}function ul(e,t){return e&&rl(e,t,ga)}function cl(e,t){return rt(t,function(t){return Br(e[t])})}function sl(e,t){for(var n=0,l=(t=oi(t,e)).length;null!=e&&n<l;)e=e[Co(t[n++])];return n&&n==l?e:void 0}function dl(e,t,n){var l=t(e);return xr(e)?l:st(l,n(e))}function vl(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":bt&&bt in pe(e)?function(e){var t=ye.call(e,bt),n=e[bt];try{e[bt]=void 0;var l=!0}catch(e){}var i=Ce.call(e);return l&&(t?e[bt]=n:delete e[bt]),i}(e):function(e){return Ce.call(e)}(e)}function pl(e,t){return e>t}function fl(e,t){return null!=e&&ye.call(e,t)}function ml(e,t){return null!=e&&t in pe(e)}function El(e,t,n){for(var l=n?ut:at,i=e[0].length,o=e.length,r=o,a=K(o),u=Infinity,c=[];r--;){var s=e[r];r&&t&&(s=ct(s,Nt(t))),u=rn(s.length,u),a[r]=!n&&(t||i>=120&&s.length>=120)?new kn(r&&s):void 0}s=e[0];var d=-1,v=a[0];e:for(;++d<i&&c.length<u;){var p=s[d],f=t?t(p):p;if(p=n||0!==p?p:0,!(v?wt(v,f):l(c,f,n))){for(r=o;--r;){var m=a[r];if(!(m?wt(m,f):l(e[r],f,n)))continue e}v&&v.push(f),c.push(p)}}return c}function _l(e,t,n){var l=null==(e=fo(e,t=oi(t,e)))?e:e[Co(Fo(t))];return null==l?void 0:tt(l,e,n)}function gl(e){return Hr(e)&&vl(e)==o}function hl(e,t,n,l,i){return e===t||(null==e||null==t||!Hr(e)&&!Hr(t)?e!=e&&t!=t:function(e,t,n,l,i,s){var d=xr(e),h=xr(t),b=d?r:eo(e),T=h?r:eo(t),C=(b=b==o?f:b)==f,A=(T=T==o?f:T)==f,D=b==T;if(D&&kr(e)){if(!kr(t))return!1;d=!0,C=!1}if(D&&!C)return s||(s=new Mn),d||Zr(e)?ji(e,t,n,l,i,s):function(e,t,n,l,i,o,r){switch(n){case y:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!o(new Be(e),new Be(t)));case a:case u:case p:return Nr(+e,+t);case c:return e.name==t.name&&e.message==t.message;case m:case _:return e==t+"";case v:var s=Ft;case E:if(s||(s=Wt),e.size!=t.size&&!(1&l))return!1;var d=r.get(e);if(d)return d==t;l|=2,r.set(e,t);var f=ji(s(e),s(t),l,i,o,r);return r.delete(e),f;case g:if(An)return An.call(e)==An.call(t)}return!1}(e,t,b,n,l,i,s);if(!(1&n)){var N=C&&ye.call(e,"__wrapped__"),I=A&&ye.call(t,"__wrapped__");if(N||I){var w=N?e.value():e,O=I?t.value():t;return s||(s=new Mn),i(w,O,n,l,s)}}return!!D&&(s||(s=new Mn),function(e,t,n,l,i,o){var r=1&n,a=zi(e),u=a.length;if(u!=zi(t).length&&!r)return!1;for(var c=u;c--;){var s=a[c];if(!(r?s in t:ye.call(t,s)))return!1}var d=o.get(e),v=o.get(t);if(d&&v)return d==t&&v==e;var p=!0;o.set(e,t),o.set(t,e);for(var f=r;++c<u;){var m=e[s=a[c]],E=t[s];if(l)var _=r?l(E,m,s,t,e,o):l(m,E,s,e,t,o);if(!(void 0===_?m===E||i(m,E,n,l,o):_)){p=!1;break}f||(f="constructor"==s)}if(p&&!f){var g=e.constructor,h=t.constructor;g==h||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof h&&h instanceof h||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,l,i,s))}(e,t,n,l,hl,i))}function Sl(e,t,n,l){var i=n.length,o=i,r=!l;if(null==e)return!o;for(e=pe(e);i--;){var a=n[i];if(r&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var u=(a=n[i])[0],c=e[u],s=a[1];if(r&&a[2]){if(void 0===c&&!(u in e))return!1}else{var d=new Mn;if(l)var v=l(c,s,u,e,t,d);if(!(void 0===v?hl(s,c,3,l,d):v))return!1}}return!0}function yl(e){return!(!jr(e)||(t=e,Te&&Te in t))&&(Br(e)?Ne:ie).test(Ao(e));var t}function bl(e){return"function"==typeof e?e:null==e?Va:"object"==typeof e?xr(e)?Nl(e[0],e[1]):Dl(e):Ja(e)}function Tl(e){if(!co(e))return ln(e);var t=[];for(var n in pe(e))ye.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Cl(e,t){return e<t}function Al(e,t){var n=-1,l=Lr(e)?K(e.length):[];return Jn(e,function(e,i,o){l[++n]=t(e,i,o)}),l}function Dl(e){var t=Zi(e);return 1==t.length&&t[0][2]?vo(t[0][0],t[0][1]):function(n){return n===e||Sl(n,e,t)}}function Nl(e,t){return ro(e)&&so(t)?vo(Co(e),t):function(n){var l=pa(n,e);return void 0===l&&l===t?fa(n,e):hl(t,l,3)}}function Il(e,t,n,l,i){e!==t&&ol(t,function(o,r){if(i||(i=new Mn),jr(o))!function(e,t,n,l,i,o,r){var a=Eo(e,n),u=Eo(t,n),c=r.get(u);if(c)jn(e,n,c);else{var s=o?o(a,u,n+"",e,t,r):void 0,d=void 0===s;if(d){var v=xr(u),p=!v&&kr(u),f=!v&&!p&&Zr(u);s=u,v||p||f?xr(a)?s=a:Pr(a)?s=mi(a):p?(d=!1,s=ci(u,!0)):f?(d=!1,s=di(u,!0)):s=[]:Gr(u)||Or(u)?(s=a,Or(a)?s=ia(a):jr(a)&&!Br(a)||(s=no(u))):d=!1}d&&(r.set(u,s),i(s,u,l,o,r),r.delete(u)),jn(e,n,s)}}(e,t,r,n,Il,l,i);else{var a=l?l(Eo(e,r),o,r+"",e,t,i):void 0;void 0===a&&(a=o),jn(e,r,a)}},ha)}function wl(e,t){var n=e.length;if(n)return io(t+=t<0?n:0,n)?e[t]:void 0}function Ol(e,t,n){t=t.length?ct(t,function(e){return xr(e)?function(t){return sl(t,1===e.length?e[0]:e)}:e}):[Va];var l=-1;return t=ct(t,Nt(Yi())),function(e,t){var l=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var l=-1,i=e.criteria,o=t.criteria,r=i.length,a=n.length;++l<r;){var u=vi(i[l],o[l]);if(u)return l>=a?u:u*("desc"==n[l]?-1:1)}return e.index-t.index}(e,t,n)});l--;)e[l]=e[l].value;return e}(Al(e,function(e,n,i){return{criteria:ct(t,function(t){return t(e)}),index:++l,value:e}}))}function xl(e,t,n){for(var l=-1,i=t.length,o={};++l<i;){var r=t[l],a=sl(e,r);n(a,r)&&Ul(o,oi(r,e),a)}return o}function Rl(e,t,n,l){var i=l?gt:_t,o=-1,r=t.length,a=e;for(e===t&&(t=mi(t)),n&&(a=ct(e,Nt(n)));++o<r;)for(var u=0,c=t[o],s=n?n(c):c;(u=i(a,s,u,l))>-1;)a!==e&&qe.call(a,u,1),qe.call(e,u,1);return e}function Ll(e,t){for(var n=e?t.length:0,l=n-1;n--;){var i=t[n];if(n==l||i!==o){var o=i;io(i)?qe.call(e,i,1):$l(e,i)}}return e}function Pl(e,t){return e+Qt(cn()*(t-e+1))}function kl(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function Ml(e,t){return ho(po(e,t,Va),e+"")}function Fl(e){return Bn(Na(e))}function Bl(e,t){var n=Na(e);return bo(n,Yn(t,0,n.length))}function Ul(e,t,n,l){if(!jr(e))return e;for(var i=-1,o=(t=oi(t,e)).length,r=o-1,a=e;null!=a&&++i<o;){var u=Co(t[i]),c=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(i!=r){var s=a[u];void 0===(c=l?l(s,u,a):void 0)&&(c=jr(s)?s:io(t[i+1])?[]:{})}Hn(a,u,c),a=a[u]}return e}var Wl=_n?function(e,t){return _n.set(e,t),e}:Va,jl=qt?function(e,t){return qt(e,"toString",{configurable:!0,enumerable:!1,value:ja(t),writable:!0})}:Va;function Hl(e){return bo(Na(e))}function zl(e,t,n){var l=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=K(i);++l<i;)o[l]=e[l+t];return o}function Vl(e,t){var n;return Jn(e,function(e,l,i){return!(n=t(e,l,i))}),!!n}function Gl(e,t,n){var l=0,i=null==e?l:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;l<i;){var o=l+i>>>1,r=e[o];null!==r&&!Xr(r)&&(n?r<=t:r<t)?l=o+1:i=o}return i}return Kl(e,t,Va,n)}function Kl(e,t,n,l){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var r=(t=n(t))!=t,a=null===t,u=Xr(t),c=void 0===t;i<o;){var s=Qt((i+o)/2),d=n(e[s]),v=void 0!==d,p=null===d,f=d==d,m=Xr(d);if(r)var E=l||f;else E=c?f&&(l||v):a?f&&v&&(l||!p):u?f&&v&&!p&&(l||!m):!p&&!m&&(l?d<=t:d<t);E?i=s+1:o=s}return rn(o,4294967294)}function ql(e,t){for(var n=-1,l=e.length,i=0,o=[];++n<l;){var r=e[n],a=t?t(r):r;if(!n||!Nr(a,u)){var u=a;o[i++]=0===r?0:r}}return o}function Yl(e){return"number"==typeof e?e:Xr(e)?NaN:+e}function Xl(e){if("string"==typeof e)return e;if(xr(e))return ct(e,Xl)+"";if(Xr(e))return Dn?Dn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Zl(e,t,n){var l=-1,i=at,o=e.length,r=!0,a=[],u=a;if(n)r=!1,i=ut;else if(o>=200){var c=t?null:ki(e);if(c)return Wt(c);r=!1,i=wt,u=new kn}else u=t?[]:a;e:for(;++l<o;){var s=e[l],d=t?t(s):s;if(s=n||0!==s?s:0,r&&d==d){for(var v=u.length;v--;)if(u[v]===d)continue e;t&&u.push(d),a.push(s)}else i(u,d,n)||(u!==a&&u.push(d),a.push(s))}return a}function $l(e,t){return null==(e=fo(e,t=oi(t,e)))||delete e[Co(Fo(t))]}function Ql(e,t,n,l){return Ul(e,t,n(sl(e,t)),l)}function Jl(e,t,n,l){for(var i=e.length,o=l?i:-1;(l?o--:++o<i)&&t(e[o],o,e););return n?zl(e,l?0:o,l?o+1:i):zl(e,l?o+1:0,l?i:o)}function ei(e,t){var n=e;return n instanceof xn&&(n=n.value()),dt(t,function(e,t){return t.func.apply(t.thisArg,st([e],t.args))},n)}function ti(e,t,n){var l=e.length;if(l<2)return l?Zl(e[0]):[];for(var i=-1,o=K(l);++i<l;)for(var r=e[i],a=-1;++a<l;)a!=i&&(o[i]=Qn(o[i]||r,e[a],t,n));return Zl(il(o,1),t,n)}function ni(e,t,n){for(var l=-1,i=e.length,o=t.length,r={};++l<i;)n(r,e[l],l<o?t[l]:void 0);return r}function li(e){return Pr(e)?e:[]}function ii(e){return"function"==typeof e?e:Va}function oi(e,t){return xr(e)?e:ro(e,t)?[e]:To(oa(e))}var ri=Ml;function ai(e,t,n){var l=e.length;return n=void 0===n?l:n,!t&&n>=l?e:zl(e,t,n)}var ui=Yt||function(e){return ze.clearTimeout(e)};function ci(e,t){if(t)return e.slice();var n=e.length,l=je?je(n):new e.constructor(n);return e.copy(l),l}function si(e){var t=new e.constructor(e.byteLength);return new Be(t).set(new Be(e)),t}function di(e,t){var n=t?si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function vi(e,t){if(e!==t){var n=void 0!==e,l=null===e,i=e==e,o=Xr(e),r=void 0!==t,a=null===t,u=t==t,c=Xr(t);if(!a&&!c&&!o&&e>t||o&&r&&u&&!a&&!c||l&&r&&u||!n&&u||!i)return 1;if(!l&&!o&&!c&&e<t||c&&n&&i&&!l&&!o||a&&n&&i||!r&&i||!u)return-1}return 0}function pi(e,t,n,l){for(var i=-1,o=e.length,r=n.length,a=-1,u=t.length,c=on(o-r,0),s=K(u+c),d=!l;++a<u;)s[a]=t[a];for(;++i<r;)(d||i<o)&&(s[n[i]]=e[i]);for(;c--;)s[a++]=e[i++];return s}function fi(e,t,n,l){for(var i=-1,o=e.length,r=-1,a=n.length,u=-1,c=t.length,s=on(o-a,0),d=K(s+c),v=!l;++i<s;)d[i]=e[i];for(var p=i;++u<c;)d[p+u]=t[u];for(;++r<a;)(v||i<o)&&(d[p+n[r]]=e[i++]);return d}function mi(e,t){var n=-1,l=e.length;for(t||(t=K(l));++n<l;)t[n]=e[n];return t}function Ei(e,t,n,l){var i=!n;n||(n={});for(var o=-1,r=t.length;++o<r;){var a=t[o],u=l?l(n[a],e[a],a,n,e):void 0;void 0===u&&(u=e[a]),i?Kn(n,a,u):Hn(n,a,u)}return n}function _i(e,t){return function(n,l){var i=xr(n)?nt:Vn,o=t?t():{};return i(n,e,Yi(l,2),o)}}function gi(e){return Ml(function(t,n){var l=-1,i=n.length,o=i>1?n[i-1]:void 0,r=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,r&&oo(n[0],n[1],r)&&(o=i<3?void 0:o,i=1),t=pe(t);++l<i;){var a=n[l];a&&e(t,a,l,o)}return t})}function hi(e,t){return function(n,l){if(null==n)return n;if(!Lr(n))return e(n,l);for(var i=n.length,o=t?i:-1,r=pe(n);(t?o--:++o<i)&&!1!==l(r[o],o,r););return n}}function Si(e){return function(t,n,l){for(var i=-1,o=pe(t),r=l(t),a=r.length;a--;){var u=r[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function yi(e){return function(t){var n=Mt(t=oa(t))?zt(t):void 0,l=n?n[0]:t.charAt(0),i=n?ai(n,1).join(""):t.slice(1);return l[e]()+i}}function bi(e){return function(t){return dt(Ba(Oa(t).replace(Ie,"")),e,"")}}function Ti(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=In(e.prototype),l=e.apply(n,t);return jr(l)?l:n}}function Ci(e){return function(t,n,l){var i=pe(t);if(!Lr(t)){var o=Yi(n,3);t=ga(t),n=function(e){return o(i[e],e,i)}}var r=e(t,n,l);return r>-1?i[o?t[r]:r]:void 0}}function Ai(e){return Hi(function(t){var l=t.length,i=l,o=On.prototype.thru;for(e&&t.reverse();i--;){var r=t[i];if("function"!=typeof r)throw new Ee(n);if(o&&!a&&"wrapper"==Ki(r))var a=new On([],!0)}for(i=a?i:l;++i<l;){var u=Ki(r=t[i]),c="wrapper"==u?Gi(r):void 0;a=c&&ao(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?a[Ki(c[0])].apply(a,c[3]):1==r.length&&ao(r)?a[u]():a.thru(r)}return function(){var e=arguments,n=e[0];if(a&&1==e.length&&xr(n))return a.plant(n).value();for(var i=0,o=l?t[i].apply(this,e):n;++i<l;)o=t[i].call(this,o);return o}})}function Di(e,t,n,l,i,o,r,a,u,c){var s=128&t,d=1&t,v=2&t,p=24&t,f=512&t,m=v?void 0:Ti(e);return function E(){for(var _=arguments.length,g=K(_),h=_;h--;)g[h]=arguments[h];if(p)var S=qi(E),y=Rt(g,S);if(l&&(g=pi(g,l,i,p)),o&&(g=fi(g,o,r,p)),_-=y,p&&_<c){var b=Ut(g,S);return Li(e,t,Di,E.placeholder,n,g,b,a,u,c-_)}var T=d?n:this,C=v?T[e]:e;return _=g.length,a?g=mo(g,a):f&&_>1&&g.reverse(),s&&u<_&&(g.length=u),this&&this!==ze&&this instanceof E&&(C=m||Ti(C)),C.apply(T,g)}}function Ni(e,t){return function(n,l){return function(e,t,n,l){return al(e,function(e,i,o){t(l,n(e),i,o)}),l}(n,e,t(l),{})}}function Ii(e,t){return function(n,l){var i;if(void 0===n&&void 0===l)return t;if(void 0!==n&&(i=n),void 0!==l){if(void 0===i)return l;"string"==typeof n||"string"==typeof l?(n=Xl(n),l=Xl(l)):(n=Yl(n),l=Yl(l)),i=e(n,l)}return i}}function wi(e){return Hi(function(t){return t=ct(t,Nt(Yi())),Ml(function(n){var l=this;return e(t,function(e){return tt(e,l,n)})})})}function Oi(e,t){var n=(t=void 0===t?" ":Xl(t)).length;if(n<2)return n?kl(t,e):t;var l=kl(t,$t(e/Ht(t)));return Mt(t)?ai(zt(l),0,e).join(""):l.slice(0,e)}function xi(e){return function(t,n,l){return l&&"number"!=typeof l&&oo(t,n,l)&&(n=l=void 0),t=ea(t),void 0===n?(n=t,t=0):n=ea(n),function(e,t,n,l){for(var i=-1,o=on($t((t-e)/(n||1)),0),r=K(o);o--;)r[l?o:++i]=e,e+=n;return r}(t,n,l=void 0===l?t<n?1:-1:ea(l),e)}}function Ri(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=la(t),n=la(n)),e(t,n)}}function Li(e,t,n,l,i,o,r,a,u,c){var s=8&t;t|=s?32:64,4&(t&=~(s?64:32))||(t&=-4);var d=[e,t,i,s?o:void 0,s?r:void 0,s?void 0:o,s?void 0:r,a,u,c],v=n.apply(void 0,d);return ao(e)&&_o(v,d),v.placeholder=l,So(v,e,t)}function Pi(e){var t=ve[e];return function(e,n){if(e=la(e),(n=null==n?0:rn(ta(n),292))&&tn(e)){var l=(oa(e)+"e").split("e");return+((l=(oa(t(l[0]+"e"+(+l[1]+n)))+"e").split("e"))[0]+"e"+(+l[1]-n))}return t(e)}}var ki=fn&&1/Wt(new fn([,-0]))[1]==1/0?function(e){return new fn(e)}:Xa;function Mi(e){return function(t){var n=eo(t);return n==v?Ft(t):n==E?jt(t):function(e,t){return ct(t,function(t){return[t,e[t]]})}(t,e(t))}}function Fi(e,t,i,o,r,a,u,c){var s=2&t;if(!s&&"function"!=typeof e)throw new Ee(n);var d=o?o.length:0;if(d||(t&=-97,o=r=void 0),u=void 0===u?u:on(ta(u),0),c=void 0===c?c:ta(c),d-=r?r.length:0,64&t){var v=o,p=r;o=r=void 0}var f=s?void 0:Gi(e),m=[e,t,i,o,r,v,p,a,u,c];if(f&&function(e,t){var n=e[1],i=t[1],o=n|i;if(!(o<131||128==i&&8==n||128==i&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n))return e;1&i&&(e[2]=t[2],o|=1&n?0:4);var r=t[3];if(r){var a=e[3];e[3]=a?pi(a,r,t[4]):r,e[4]=a?Ut(e[3],l):t[4]}(r=t[5])&&(e[5]=(a=e[5])?fi(a,r,t[6]):r,e[6]=a?Ut(e[5],l):t[6]),(r=t[7])&&(e[7]=r),128&i&&(e[8]=null==e[8]?t[8]:rn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(m,f),e=m[0],t=m[1],i=m[2],o=m[3],r=m[4],!(c=m[9]=void 0===m[9]?s?0:e.length:on(m[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||16==t?function(e,t,n){var l=Ti(e);return function i(){for(var o=arguments.length,r=K(o),a=o,u=qi(i);a--;)r[a]=arguments[a];var c=o<3&&r[0]!==u&&r[o-1]!==u?[]:Ut(r,u);if((o-=c.length)<n)return Li(e,t,Di,i.placeholder,void 0,r,c,void 0,void 0,n-o);var s=this&&this!==ze&&this instanceof i?l:e;return tt(s,this,r)}}(e,t,c):32!=t&&33!=t||r.length?Di.apply(void 0,m):function(e,t,n,l){var i=1&t,o=Ti(e);return function t(){for(var r=-1,a=arguments.length,u=-1,c=l.length,s=K(c+a),d=this&&this!==ze&&this instanceof t?o:e;++u<c;)s[u]=l[u];for(;a--;)s[u++]=arguments[++r];return tt(d,i?n:this,s)}}(e,t,i,o);else var E=function(e,t,n){var l=1&t,i=Ti(e);return function t(){var o=this&&this!==ze&&this instanceof t?i:e;return o.apply(l?n:this,arguments)}}(e,t,i);return So((f?Wl:_o)(E,m),e,t)}function Bi(e,t,n,l){return void 0===e||Nr(e,ge[n])&&!ye.call(l,n)?t:e}function Ui(e,t,n,l,i,o){return jr(e)&&jr(t)&&(o.set(t,e),Il(e,t,void 0,Ui,o),o.delete(t)),e}function Wi(e){return Gr(e)?void 0:e}function ji(e,t,n,l,i,o){var r=1&n,a=e.length,u=t.length;if(a!=u&&!(r&&u>a))return!1;var c=o.get(e),s=o.get(t);if(c&&s)return c==t&&s==e;var d=-1,v=!0,p=2&n?new kn:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var f=e[d],m=t[d];if(l)var E=r?l(m,f,d,t,e,o):l(f,m,d,e,t,o);if(void 0!==E){if(E)continue;v=!1;break}if(p){if(!pt(t,function(e,t){if(!wt(p,t)&&(f===e||i(f,e,n,l,o)))return p.push(t)})){v=!1;break}}else if(f!==m&&!i(f,m,n,l,o)){v=!1;break}}return o.delete(e),o.delete(t),v}function Hi(e){return ho(po(e,void 0,Ro),e+"")}function zi(e){return dl(e,ga,Qi)}function Vi(e){return dl(e,ha,Ji)}var Gi=_n?function(e){return _n.get(e)}:Xa;function Ki(e){for(var t=e.name+"",n=gn[t],l=ye.call(gn,t)?n.length:0;l--;){var i=n[l],o=i.func;if(null==o||o==e)return i.name}return t}function qi(e){return(ye.call(Nn,"placeholder")?Nn:e).placeholder}function Yi(){var e=Nn.iteratee||Ga;return e=e===Ga?bl:e,arguments.length?e(arguments[0],arguments[1]):e}function Xi(e,t){var n,l,i=e.__data__;return("string"==(l=typeof(n=t))||"number"==l||"symbol"==l||"boolean"==l?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Zi(e){for(var t=ga(e),n=t.length;n--;){var l=t[n],i=e[l];t[n]=[l,i,so(i)]}return t}function $i(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return yl(n)?n:void 0}var Qi=Jt?function(e){return null==e?[]:(e=pe(e),rt(Jt(e),function(t){return Ge.call(e,t)}))}:nu,Ji=Jt?function(e){for(var t=[];e;)st(t,Qi(e)),e=He(e);return t}:nu,eo=vl;function to(e,t,n){for(var l=-1,i=(t=oi(t,e)).length,o=!1;++l<i;){var r=Co(t[l]);if(!(o=null!=e&&n(e,r)))break;e=e[r]}return o||++l!=i?o:!!(i=null==e?0:e.length)&&Wr(i)&&io(r,i)&&(xr(e)||Or(e))}function no(e){return"function"!=typeof e.constructor||co(e)?{}:In(He(e))}function lo(e){return xr(e)||Or(e)||!!(Ye&&e&&e[Ye])}function io(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&re.test(e))&&e>-1&&e%1==0&&e<t}function oo(e,t,n){if(!jr(n))return!1;var l=typeof t;return!!("number"==l?Lr(n)&&io(t,n.length):"string"==l&&t in n)&&Nr(n[t],e)}function ro(e,t){if(xr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Xr(e))||j.test(e)||!W.test(e)||null!=t&&e in pe(t)}function ao(e){var t=Ki(e),n=Nn[t];if("function"!=typeof n||!(t in xn.prototype))return!1;if(e===n)return!0;var l=Gi(n);return!!l&&e===l[0]}(dn&&eo(new dn(new ArrayBuffer(1)))!=y||vn&&eo(new vn)!=v||pn&&"[object Promise]"!=eo(pn.resolve())||fn&&eo(new fn)!=E||mn&&eo(new mn)!=h)&&(eo=function(e){var t=vl(e),n=t==f?e.constructor:void 0,l=n?Ao(n):"";if(l)switch(l){case hn:return y;case Sn:return v;case yn:return"[object Promise]";case bn:return E;case Tn:return h}return t});var uo=he?Br:lu;function co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ge)}function so(e){return e==e&&!jr(e)}function vo(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in pe(n))}}function po(e,t,n){return t=on(void 0===t?e.length-1:t,0),function(){for(var l=arguments,i=-1,o=on(l.length-t,0),r=K(o);++i<o;)r[i]=l[t+i];i=-1;for(var a=K(t+1);++i<t;)a[i]=l[i];return a[t]=n(r),tt(e,this,a)}}function fo(e,t){return t.length<2?e:sl(e,zl(t,0,-1))}function mo(e,t){for(var n=e.length,l=rn(t.length,n),i=mi(e);l--;){var o=t[l];e[l]=io(o,n)?i[o]:void 0}return e}function Eo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var _o=yo(Wl),go=Zt||function(e,t){return ze.setTimeout(e,t)},ho=yo(jl);function So(e,t,n){var l=t+"";return ho(e,function(e,t){var n=t.length;if(!n)return e;var l=n-1;return t[l]=(n>1?"& ":"")+t[l],t=t.join(n>2?", ":" "),e.replace(Y,"{\n/* [wrapped with "+t+"] */\n")}(l,function(e,t){return lt(i,function(n){var l="_."+n[0];t&n[1]&&!at(e,l)&&e.push(l)}),e.sort()}(function(e){var t=e.match(X);return t?t[1].split(Z):[]}(l),n)))}function yo(e){var t=0,n=0;return function(){var l=an(),i=16-(l-n);if(n=l,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function bo(e,t){var n=-1,l=e.length,i=l-1;for(t=void 0===t?l:t;++n<t;){var o=Pl(n,i),r=e[o];e[o]=e[n],e[n]=r}return e.length=t,e}var To=function(e){var t=yr(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(H,function(e,n,l,i){t.push(l?i.replace(J,"$1"):n||e)}),t},function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}();function Co(e){if("string"==typeof e||Xr(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ao(e){if(null!=e){try{return Se.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Do(e){if(e instanceof xn)return e.clone();var t=new On(e.__wrapped__,e.__chain__);return t.__actions__=mi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var No=Ml(function(e,t){return Pr(e)?Qn(e,il(t,1,Pr,!0)):[]}),Io=Ml(function(e,t){var n=Fo(t);return Pr(n)&&(n=void 0),Pr(e)?Qn(e,il(t,1,Pr,!0),Yi(n,2)):[]}),wo=Ml(function(e,t){var n=Fo(t);return Pr(n)&&(n=void 0),Pr(e)?Qn(e,il(t,1,Pr,!0),void 0,n):[]});function Oo(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=null==n?0:ta(n);return i<0&&(i=on(l+i,0)),Et(e,Yi(t,3),i)}function xo(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=l-1;return void 0!==n&&(i=ta(n),i=n<0?on(l+i,0):rn(i,l-1)),Et(e,Yi(t,3),i,!0)}function Ro(e){return null!=e&&e.length?il(e,1):[]}function Lo(e){return e&&e.length?e[0]:void 0}var Po=Ml(function(e){var t=ct(e,li);return t.length&&t[0]===e[0]?El(t):[]}),ko=Ml(function(e){var t=Fo(e),n=ct(e,li);return t===Fo(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?El(n,Yi(t,2)):[]}),Mo=Ml(function(e){var t=Fo(e),n=ct(e,li);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?El(n,void 0,t):[]});function Fo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Bo=Ml(Uo);function Uo(e,t){return e&&e.length&&t&&t.length?Rl(e,t):e}var Wo=Hi(function(e,t){var n=null==e?0:e.length,l=qn(e,t);return Ll(e,ct(t,function(e){return io(e,n)?+e:e}).sort(vi)),l});function jo(e){return null==e?e:sn.call(e)}var Ho=Ml(function(e){return Zl(il(e,1,Pr,!0))}),zo=Ml(function(e){var t=Fo(e);return Pr(t)&&(t=void 0),Zl(il(e,1,Pr,!0),Yi(t,2))}),Vo=Ml(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,Zl(il(e,1,Pr,!0),void 0,t)});function Go(e){if(!e||!e.length)return[];var t=0;return e=rt(e,function(e){if(Pr(e))return t=on(e.length,t),!0}),At(t,function(t){return ct(e,yt(t))})}function Ko(e,t){if(!e||!e.length)return[];var n=Go(e);return null==t?n:ct(n,function(e){return tt(t,void 0,e)})}var qo=Ml(function(e,t){return Pr(e)?Qn(e,t):[]}),Yo=Ml(function(e){return ti(rt(e,Pr))}),Xo=Ml(function(e){var t=Fo(e);return Pr(t)&&(t=void 0),ti(rt(e,Pr),Yi(t,2))}),Zo=Ml(function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,ti(rt(e,Pr),void 0,t)}),$o=Ml(Go),Qo=Ml(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ko(e,n)});function Jo(e){var t=Nn(e);return t.__chain__=!0,t}function er(e,t){return t(e)}var tr=Hi(function(e){var t=e.length,n=t?e[0]:0,l=this.__wrapped__,i=function(t){return qn(t,e)};return!(t>1||this.__actions__.length)&&l instanceof xn&&io(n)?((l=l.slice(n,+n+(t?1:0))).__actions__.push({func:er,args:[i],thisArg:void 0}),new On(l,this.__chain__).thru(function(e){return t&&!e.length&&e.push(void 0),e})):this.thru(i)}),nr=_i(function(e,t,n){ye.call(e,n)?++e[n]:Kn(e,n,1)}),lr=Ci(Oo),ir=Ci(xo);function or(e,t){return(xr(e)?lt:Jn)(e,Yi(t,3))}function rr(e,t){return(xr(e)?it:el)(e,Yi(t,3))}var ar=_i(function(e,t,n){ye.call(e,n)?e[n].push(t):Kn(e,n,[t])}),ur=Ml(function(e,t,n){var l=-1,i="function"==typeof t,o=Lr(e)?K(e.length):[];return Jn(e,function(e){o[++l]=i?tt(t,e,n):_l(e,t,n)}),o}),cr=_i(function(e,t,n){Kn(e,n,t)});function sr(e,t){return(xr(e)?ct:Al)(e,Yi(t,3))}var dr=_i(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),vr=Ml(function(e,t){if(null==e)return[];var n=t.length;return n>1&&oo(e,t[0],t[1])?t=[]:n>2&&oo(t[0],t[1],t[2])&&(t=[t[0]]),Ol(e,il(t,1),[])}),pr=Xt||function(){return ze.Date.now()};function fr(e,t,n){return t=n?void 0:t,Fi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function mr(e,t){var l;if("function"!=typeof t)throw new Ee(n);return e=ta(e),function(){return--e>0&&(l=t.apply(this,arguments)),e<=1&&(t=void 0),l}}var Er=Ml(function(e,t,n){var l=1;if(n.length){var i=Ut(n,qi(Er));l|=32}return Fi(e,l,t,n,i)}),_r=Ml(function(e,t,n){var l=3;if(n.length){var i=Ut(n,qi(_r));l|=32}return Fi(t,l,e,n,i)});function gr(e,t,l){var i,o,r,a,u,c,s=0,d=!1,v=!1,p=!0;if("function"!=typeof e)throw new Ee(n);function f(t){var n=i,l=o;return i=o=void 0,s=t,a=e.apply(l,n)}function m(e){return s=e,u=go(_,t),d?f(e):a}function E(e){var n=e-c;return void 0===c||n>=t||n<0||v&&e-s>=r}function _(){var e=pr();if(E(e))return g(e);u=go(_,function(e){var n=t-(e-c);return v?rn(n,r-(e-s)):n}(e))}function g(e){return u=void 0,p&&i?f(e):(i=o=void 0,a)}function h(){var e=pr(),n=E(e);if(i=arguments,o=this,c=e,n){if(void 0===u)return m(c);if(v)return ui(u),u=go(_,t),f(c)}return void 0===u&&(u=go(_,t)),a}return t=la(t)||0,jr(l)&&(d=!!l.leading,r=(v="maxWait"in l)?on(la(l.maxWait)||0,t):r,p="trailing"in l?!!l.trailing:p),h.cancel=function(){void 0!==u&&ui(u),s=0,i=c=o=u=void 0},h.flush=function(){return void 0===u?a:g(pr())},h}var hr=Ml(function(e,t){return $n(e,1,t)}),Sr=Ml(function(e,t,n){return $n(e,la(t)||0,n)});function yr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ee(n);var l=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=l.cache;if(o.has(i))return o.get(i);var r=e.apply(this,n);return l.cache=o.set(i,r)||o,r};return l.cache=new(yr.Cache||Pn),l}function br(e){if("function"!=typeof e)throw new Ee(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}yr.Cache=Pn;var Tr=ri(function(e,t){var n=(t=1==t.length&&xr(t[0])?ct(t[0],Nt(Yi())):ct(il(t,1),Nt(Yi()))).length;return Ml(function(l){for(var i=-1,o=rn(l.length,n);++i<o;)l[i]=t[i].call(this,l[i]);return tt(e,this,l)})}),Cr=Ml(function(e,t){return Fi(e,32,void 0,t,Ut(t,qi(Cr)))}),Ar=Ml(function(e,t){return Fi(e,64,void 0,t,Ut(t,qi(Ar)))}),Dr=Hi(function(e,t){return Fi(e,256,void 0,void 0,void 0,t)});function Nr(e,t){return e===t||e!=e&&t!=t}var Ir=Ri(pl),wr=Ri(function(e,t){return e>=t}),Or=gl(function(){return arguments}())?gl:function(e){return Hr(e)&&ye.call(e,"callee")&&!Ge.call(e,"callee")},xr=K.isArray,Rr=Xe?Nt(Xe):function(e){return Hr(e)&&vl(e)==S};function Lr(e){return null!=e&&Wr(e.length)&&!Br(e)}function Pr(e){return Hr(e)&&Lr(e)}var kr=en||lu,Mr=Ze?Nt(Ze):function(e){return Hr(e)&&vl(e)==u};function Fr(e){if(!Hr(e))return!1;var t=vl(e);return t==c||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Gr(e)}function Br(e){if(!jr(e))return!1;var t=vl(e);return t==s||t==d||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ur(e){return"number"==typeof e&&e==ta(e)}function Wr(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function jr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Hr(e){return null!=e&&"object"==typeof e}var zr=$e?Nt($e):function(e){return Hr(e)&&eo(e)==v};function Vr(e){return"number"==typeof e||Hr(e)&&vl(e)==p}function Gr(e){if(!Hr(e)||vl(e)!=f)return!1;var t=He(e);if(null===t)return!0;var n=ye.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Se.call(n)==Ae}var Kr=Qe?Nt(Qe):function(e){return Hr(e)&&vl(e)==m},qr=Je?Nt(Je):function(e){return Hr(e)&&eo(e)==E};function Yr(e){return"string"==typeof e||!xr(e)&&Hr(e)&&vl(e)==_}function Xr(e){return"symbol"==typeof e||Hr(e)&&vl(e)==g}var Zr=et?Nt(et):function(e){return Hr(e)&&Wr(e.length)&&!!Me[vl(e)]},$r=Ri(Cl),Qr=Ri(function(e,t){return e<=t});function Jr(e){if(!e)return[];if(Lr(e))return Yr(e)?zt(e):mi(e);if(ft&&e[ft])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[ft]());var t=eo(e);return(t==v?Ft:t==E?Wt:Na)(e)}function ea(e){return e?(e=la(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ta(e){var t=ea(e),n=t%1;return t==t?n?t-n:t:0}function na(e){return e?Yn(ta(e),0,4294967295):0}function la(e){if("number"==typeof e)return e;if(Xr(e))return NaN;if(jr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=jr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Dt(e);var n=le.test(e);return n||oe.test(e)?We(e.slice(2),n?2:8):ne.test(e)?NaN:+e}function ia(e){return Ei(e,ha(e))}function oa(e){return null==e?"":Xl(e)}var ra=gi(function(e,t){if(co(t)||Lr(t))Ei(t,ga(t),e);else for(var n in t)ye.call(t,n)&&Hn(e,n,t[n])}),aa=gi(function(e,t){Ei(t,ha(t),e)}),ua=gi(function(e,t,n,l){Ei(t,ha(t),e,l)}),ca=gi(function(e,t,n,l){Ei(t,ga(t),e,l)}),sa=Hi(qn),da=Ml(function(e,t){e=pe(e);var n=-1,l=t.length,i=l>2?t[2]:void 0;for(i&&oo(t[0],t[1],i)&&(l=1);++n<l;)for(var o=t[n],r=ha(o),a=-1,u=r.length;++a<u;){var c=r[a],s=e[c];(void 0===s||Nr(s,ge[c])&&!ye.call(e,c))&&(e[c]=o[c])}return e}),va=Ml(function(e){return e.push(void 0,Ui),tt(ya,void 0,e)});function pa(e,t,n){var l=null==e?void 0:sl(e,t);return void 0===l?n:l}function fa(e,t){return null!=e&&to(e,t,ml)}var ma=Ni(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),e[t]=n},ja(Va)),Ea=Ni(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),ye.call(e,t)?e[t].push(n):e[t]=[n]},Yi),_a=Ml(_l);function ga(e){return Lr(e)?Fn(e):Tl(e)}function ha(e){return Lr(e)?Fn(e,!0):function(e){if(!jr(e))return function(e){var t=[];if(null!=e)for(var n in pe(e))t.push(n);return t}(e);var t=co(e),n=[];for(var l in e)("constructor"!=l||!t&&ye.call(e,l))&&n.push(l);return n}(e)}var Sa=gi(function(e,t,n){Il(e,t,n)}),ya=gi(function(e,t,n,l){Il(e,t,n,l)}),ba=Hi(function(e,t){var n={};if(null==e)return n;var l=!1;t=ct(t,function(t){return t=oi(t,e),l||(l=t.length>1),t}),Ei(e,Vi(e),n),l&&(n=Xn(n,7,Wi));for(var i=t.length;i--;)$l(n,t[i]);return n}),Ta=Hi(function(e,t){return null==e?{}:function(e,t){return xl(e,t,function(t,n){return fa(e,n)})}(e,t)});function Ca(e,t){if(null==e)return{};var n=ct(Vi(e),function(e){return[e]});return t=Yi(t),xl(e,n,function(e,n){return t(e,n[0])})}var Aa=Mi(ga),Da=Mi(ha);function Na(e){return null==e?[]:It(e,ga(e))}var Ia=bi(function(e,t,n){return t=t.toLowerCase(),e+(n?wa(t):t)});function wa(e){return Fa(oa(e).toLowerCase())}function Oa(e){return(e=oa(e))&&e.replace(ae,Lt).replace(we,"")}var xa=bi(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ra=bi(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),La=yi("toLowerCase"),Pa=bi(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),ka=bi(function(e,t,n){return e+(n?" ":"")+Fa(t)}),Ma=bi(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Fa=yi("toUpperCase");function Ba(e,t,n){return e=oa(e),void 0===(t=n?void 0:t)?function(e){return Le.test(e)}(e)?function(e){return e.match(xe)||[]}(e):function(e){return e.match($)||[]}(e):e.match(t)||[]}var Ua=Ml(function(e,t){try{return tt(e,void 0,t)}catch(e){return Fr(e)?e:new se(e)}}),Wa=Hi(function(e,t){return lt(t,function(t){t=Co(t),Kn(e,t,Er(e[t],e))}),e});function ja(e){return function(){return e}}var Ha=Ai(),za=Ai(!0);function Va(e){return e}function Ga(e){return bl("function"==typeof e?e:Xn(e,1))}var Ka=Ml(function(e,t){return function(n){return _l(n,e,t)}}),qa=Ml(function(e,t){return function(n){return _l(e,n,t)}});function Ya(e,t,n){var l=ga(t),i=cl(t,l);null!=n||jr(t)&&(i.length||!l.length)||(n=t,t=e,e=this,i=cl(t,ga(t)));var o=!(jr(n)&&"chain"in n&&!n.chain),r=Br(e);return lt(i,function(n){var l=t[n];e[n]=l,r&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=mi(this.__actions__);return i.push({func:l,args:arguments,thisArg:e}),n.__chain__=t,n}return l.apply(e,st([this.value()],arguments))})}),e}function Xa(){}var Za=wi(ct),$a=wi(ot),Qa=wi(pt);function Ja(e){return ro(e)?yt(Co(e)):function(e){return function(t){return sl(t,e)}}(e)}var eu=xi(),tu=xi(!0);function nu(){return[]}function lu(){return!1}var iu,ou=Ii(function(e,t){return e+t},0),ru=Pi("ceil"),au=Ii(function(e,t){return e/t},1),uu=Pi("floor"),cu=Ii(function(e,t){return e*t},1),su=Pi("round"),du=Ii(function(e,t){return e-t},0);return Nn.after=function(e,t){if("function"!=typeof t)throw new Ee(n);return e=ta(e),function(){if(--e<1)return t.apply(this,arguments)}},Nn.ary=fr,Nn.assign=ra,Nn.assignIn=aa,Nn.assignInWith=ua,Nn.assignWith=ca,Nn.at=sa,Nn.before=mr,Nn.bind=Er,Nn.bindAll=Wa,Nn.bindKey=_r,Nn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return xr(e)?e:[e]},Nn.chain=Jo,Nn.chunk=function(e,t,n){t=(n?oo(e,t,n):void 0===t)?1:on(ta(t),0);var l=null==e?0:e.length;if(!l||t<1)return[];for(var i=0,o=0,r=K($t(l/t));i<l;)r[o++]=zl(e,i,i+=t);return r},Nn.compact=function(e){for(var t=-1,n=null==e?0:e.length,l=0,i=[];++t<n;){var o=e[t];o&&(i[l++]=o)}return i},Nn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=K(e-1),n=arguments[0],l=e;l--;)t[l-1]=arguments[l];return st(xr(n)?mi(n):[n],il(t,1))},Nn.cond=function(e){var t=null==e?0:e.length,l=Yi();return e=t?ct(e,function(e){if("function"!=typeof e[1])throw new Ee(n);return[l(e[0]),e[1]]}):[],Ml(function(n){for(var l=-1;++l<t;){var i=e[l];if(tt(i[0],this,n))return tt(i[1],this,n)}})},Nn.conforms=function(e){return function(e){var t=ga(e);return function(n){return Zn(n,e,t)}}(Xn(e,1))},Nn.constant=ja,Nn.countBy=nr,Nn.create=function(e,t){var n=In(e);return null==t?n:Gn(n,t)},Nn.curry=function e(t,n,l){var i=Fi(t,8,void 0,void 0,void 0,void 0,void 0,n=l?void 0:n);return i.placeholder=e.placeholder,i},Nn.curryRight=function e(t,n,l){var i=Fi(t,16,void 0,void 0,void 0,void 0,void 0,n=l?void 0:n);return i.placeholder=e.placeholder,i},Nn.debounce=gr,Nn.defaults=da,Nn.defaultsDeep=va,Nn.defer=hr,Nn.delay=Sr,Nn.difference=No,Nn.differenceBy=Io,Nn.differenceWith=wo,Nn.drop=function(e,t,n){var l=null==e?0:e.length;return l?zl(e,(t=n||void 0===t?1:ta(t))<0?0:t,l):[]},Nn.dropRight=function(e,t,n){var l=null==e?0:e.length;return l?zl(e,0,(t=l-(t=n||void 0===t?1:ta(t)))<0?0:t):[]},Nn.dropRightWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3),!0,!0):[]},Nn.dropWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3),!0):[]},Nn.fill=function(e,t,n,l){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&oo(e,t,n)&&(n=0,l=i),function(e,t,n,l){var i=e.length;for((n=ta(n))<0&&(n=-n>i?0:i+n),(l=void 0===l||l>i?i:ta(l))<0&&(l+=i),l=n>l?0:na(l);n<l;)e[n++]=t;return e}(e,t,n,l)):[]},Nn.filter=function(e,t){return(xr(e)?rt:ll)(e,Yi(t,3))},Nn.flatMap=function(e,t){return il(sr(e,t),1)},Nn.flatMapDeep=function(e,t){return il(sr(e,t),1/0)},Nn.flatMapDepth=function(e,t,n){return n=void 0===n?1:ta(n),il(sr(e,t),n)},Nn.flatten=Ro,Nn.flattenDeep=function(e){return null!=e&&e.length?il(e,1/0):[]},Nn.flattenDepth=function(e,t){return null!=e&&e.length?il(e,t=void 0===t?1:ta(t)):[]},Nn.flip=function(e){return Fi(e,512)},Nn.flow=Ha,Nn.flowRight=za,Nn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,l={};++t<n;){var i=e[t];l[i[0]]=i[1]}return l},Nn.functions=function(e){return null==e?[]:cl(e,ga(e))},Nn.functionsIn=function(e){return null==e?[]:cl(e,ha(e))},Nn.groupBy=ar,Nn.initial=function(e){return null!=e&&e.length?zl(e,0,-1):[]},Nn.intersection=Po,Nn.intersectionBy=ko,Nn.intersectionWith=Mo,Nn.invert=ma,Nn.invertBy=Ea,Nn.invokeMap=ur,Nn.iteratee=Ga,Nn.keyBy=cr,Nn.keys=ga,Nn.keysIn=ha,Nn.map=sr,Nn.mapKeys=function(e,t){var n={};return t=Yi(t,3),al(e,function(e,l,i){Kn(n,t(e,l,i),e)}),n},Nn.mapValues=function(e,t){var n={};return t=Yi(t,3),al(e,function(e,l,i){Kn(n,l,t(e,l,i))}),n},Nn.matches=function(e){return Dl(Xn(e,1))},Nn.matchesProperty=function(e,t){return Nl(e,Xn(t,1))},Nn.memoize=yr,Nn.merge=Sa,Nn.mergeWith=ya,Nn.method=Ka,Nn.methodOf=qa,Nn.mixin=Ya,Nn.negate=br,Nn.nthArg=function(e){return e=ta(e),Ml(function(t){return wl(t,e)})},Nn.omit=ba,Nn.omitBy=function(e,t){return Ca(e,br(Yi(t)))},Nn.once=function(e){return mr(2,e)},Nn.orderBy=function(e,t,n,l){return null==e?[]:(xr(t)||(t=null==t?[]:[t]),xr(n=l?void 0:n)||(n=null==n?[]:[n]),Ol(e,t,n))},Nn.over=Za,Nn.overArgs=Tr,Nn.overEvery=$a,Nn.overSome=Qa,Nn.partial=Cr,Nn.partialRight=Ar,Nn.partition=dr,Nn.pick=Ta,Nn.pickBy=Ca,Nn.property=Ja,Nn.propertyOf=function(e){return function(t){return null==e?void 0:sl(e,t)}},Nn.pull=Bo,Nn.pullAll=Uo,Nn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Rl(e,t,Yi(n,2)):e},Nn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Rl(e,t,void 0,n):e},Nn.pullAt=Wo,Nn.range=eu,Nn.rangeRight=tu,Nn.rearg=Dr,Nn.reject=function(e,t){return(xr(e)?rt:ll)(e,br(Yi(t,3)))},Nn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var l=-1,i=[],o=e.length;for(t=Yi(t,3);++l<o;){var r=e[l];t(r,l,e)&&(n.push(r),i.push(l))}return Ll(e,i),n},Nn.rest=function(e,t){if("function"!=typeof e)throw new Ee(n);return Ml(e,t=void 0===t?t:ta(t))},Nn.reverse=jo,Nn.sampleSize=function(e,t,n){return t=(n?oo(e,t,n):void 0===t)?1:ta(t),(xr(e)?Un:Bl)(e,t)},Nn.set=function(e,t,n){return null==e?e:Ul(e,t,n)},Nn.setWith=function(e,t,n,l){return l="function"==typeof l?l:void 0,null==e?e:Ul(e,t,n,l)},Nn.shuffle=function(e){return(xr(e)?Wn:Hl)(e)},Nn.slice=function(e,t,n){var l=null==e?0:e.length;return l?(n&&"number"!=typeof n&&oo(e,t,n)?(t=0,n=l):(t=null==t?0:ta(t),n=void 0===n?l:ta(n)),zl(e,t,n)):[]},Nn.sortBy=vr,Nn.sortedUniq=function(e){return e&&e.length?ql(e):[]},Nn.sortedUniqBy=function(e,t){return e&&e.length?ql(e,Yi(t,2)):[]},Nn.split=function(e,t,n){return n&&"number"!=typeof n&&oo(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=oa(e))&&("string"==typeof t||null!=t&&!Kr(t))&&!(t=Xl(t))&&Mt(e)?ai(zt(e),0,n):e.split(t,n):[]},Nn.spread=function(e,t){if("function"!=typeof e)throw new Ee(n);return t=null==t?0:on(ta(t),0),Ml(function(n){var l=n[t],i=ai(n,0,t);return l&&st(i,l),tt(e,this,i)})},Nn.tail=function(e){var t=null==e?0:e.length;return t?zl(e,1,t):[]},Nn.take=function(e,t,n){return e&&e.length?zl(e,0,(t=n||void 0===t?1:ta(t))<0?0:t):[]},Nn.takeRight=function(e,t,n){var l=null==e?0:e.length;return l?zl(e,(t=l-(t=n||void 0===t?1:ta(t)))<0?0:t,l):[]},Nn.takeRightWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3),!1,!0):[]},Nn.takeWhile=function(e,t){return e&&e.length?Jl(e,Yi(t,3)):[]},Nn.tap=function(e,t){return t(e),e},Nn.throttle=function(e,t,l){var i=!0,o=!0;if("function"!=typeof e)throw new Ee(n);return jr(l)&&(i="leading"in l?!!l.leading:i,o="trailing"in l?!!l.trailing:o),gr(e,t,{leading:i,maxWait:t,trailing:o})},Nn.thru=er,Nn.toArray=Jr,Nn.toPairs=Aa,Nn.toPairsIn=Da,Nn.toPath=function(e){return xr(e)?ct(e,Co):Xr(e)?[e]:mi(To(oa(e)))},Nn.toPlainObject=ia,Nn.transform=function(e,t,n){var l=xr(e),i=l||kr(e)||Zr(e);if(t=Yi(t,4),null==n){var o=e&&e.constructor;n=i?l?new o:[]:jr(e)&&Br(o)?In(He(e)):{}}return(i?lt:al)(e,function(e,l,i){return t(n,e,l,i)}),n},Nn.unary=function(e){return fr(e,1)},Nn.union=Ho,Nn.unionBy=zo,Nn.unionWith=Vo,Nn.uniq=function(e){return e&&e.length?Zl(e):[]},Nn.uniqBy=function(e,t){return e&&e.length?Zl(e,Yi(t,2)):[]},Nn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Zl(e,void 0,t):[]},Nn.unset=function(e,t){return null==e||$l(e,t)},Nn.unzip=Go,Nn.unzipWith=Ko,Nn.update=function(e,t,n){return null==e?e:Ql(e,t,ii(n))},Nn.updateWith=function(e,t,n,l){return l="function"==typeof l?l:void 0,null==e?e:Ql(e,t,ii(n),l)},Nn.values=Na,Nn.valuesIn=function(e){return null==e?[]:It(e,ha(e))},Nn.without=qo,Nn.words=Ba,Nn.wrap=function(e,t){return Cr(ii(t),e)},Nn.xor=Yo,Nn.xorBy=Xo,Nn.xorWith=Zo,Nn.zip=$o,Nn.zipObject=function(e,t){return ni(e||[],t||[],Hn)},Nn.zipObjectDeep=function(e,t){return ni(e||[],t||[],Ul)},Nn.zipWith=Qo,Nn.entries=Aa,Nn.entriesIn=Da,Nn.extend=aa,Nn.extendWith=ua,Ya(Nn,Nn),Nn.add=ou,Nn.attempt=Ua,Nn.camelCase=Ia,Nn.capitalize=wa,Nn.ceil=ru,Nn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=la(n))==n?n:0),void 0!==t&&(t=(t=la(t))==t?t:0),Yn(la(e),t,n)},Nn.clone=function(e){return Xn(e,4)},Nn.cloneDeep=function(e){return Xn(e,5)},Nn.cloneDeepWith=function(e,t){return Xn(e,5,t="function"==typeof t?t:void 0)},Nn.cloneWith=function(e,t){return Xn(e,4,t="function"==typeof t?t:void 0)},Nn.conformsTo=function(e,t){return null==t||Zn(e,t,ga(t))},Nn.deburr=Oa,Nn.defaultTo=function(e,t){return null==e||e!=e?t:e},Nn.divide=au,Nn.endsWith=function(e,t,n){e=oa(e),t=Xl(t);var l=e.length,i=n=void 0===n?l:Yn(ta(n),0,l);return(n-=t.length)>=0&&e.slice(n,i)==t},Nn.eq=Nr,Nn.escape=function(e){return(e=oa(e))&&M.test(e)?e.replace(P,Pt):e},Nn.escapeRegExp=function(e){return(e=oa(e))&&V.test(e)?e.replace(z,"\\$&"):e},Nn.every=function(e,t,n){var l=xr(e)?ot:tl;return n&&oo(e,t,n)&&(t=void 0),l(e,Yi(t,3))},Nn.find=lr,Nn.findIndex=Oo,Nn.findKey=function(e,t){return mt(e,Yi(t,3),al)},Nn.findLast=ir,Nn.findLastIndex=xo,Nn.findLastKey=function(e,t){return mt(e,Yi(t,3),ul)},Nn.floor=uu,Nn.forEach=or,Nn.forEachRight=rr,Nn.forIn=function(e,t){return null==e?e:ol(e,Yi(t,3),ha)},Nn.forInRight=function(e,t){return null==e?e:rl(e,Yi(t,3),ha)},Nn.forOwn=function(e,t){return e&&al(e,Yi(t,3))},Nn.forOwnRight=function(e,t){return e&&ul(e,Yi(t,3))},Nn.get=pa,Nn.gt=Ir,Nn.gte=wr,Nn.has=function(e,t){return null!=e&&to(e,t,fl)},Nn.hasIn=fa,Nn.head=Lo,Nn.identity=Va,Nn.includes=function(e,t,n,l){e=Lr(e)?e:Na(e),n=n&&!l?ta(n):0;var i=e.length;return n<0&&(n=on(i+n,0)),Yr(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&_t(e,t,n)>-1},Nn.indexOf=function(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=null==n?0:ta(n);return i<0&&(i=on(l+i,0)),_t(e,t,i)},Nn.inRange=function(e,t,n){return t=ea(t),void 0===n?(n=t,t=0):n=ea(n),function(e,t,n){return e>=rn(t,n)&&e<on(t,n)}(e=la(e),t,n)},Nn.invoke=_a,Nn.isArguments=Or,Nn.isArray=xr,Nn.isArrayBuffer=Rr,Nn.isArrayLike=Lr,Nn.isArrayLikeObject=Pr,Nn.isBoolean=function(e){return!0===e||!1===e||Hr(e)&&vl(e)==a},Nn.isBuffer=kr,Nn.isDate=Mr,Nn.isElement=function(e){return Hr(e)&&1===e.nodeType&&!Gr(e)},Nn.isEmpty=function(e){if(null==e)return!0;if(Lr(e)&&(xr(e)||"string"==typeof e||"function"==typeof e.splice||kr(e)||Zr(e)||Or(e)))return!e.length;var t=eo(e);if(t==v||t==E)return!e.size;if(co(e))return!Tl(e).length;for(var n in e)if(ye.call(e,n))return!1;return!0},Nn.isEqual=function(e,t){return hl(e,t)},Nn.isEqualWith=function(e,t,n){var l=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===l?hl(e,t,void 0,n):!!l},Nn.isError=Fr,Nn.isFinite=function(e){return"number"==typeof e&&tn(e)},Nn.isFunction=Br,Nn.isInteger=Ur,Nn.isLength=Wr,Nn.isMap=zr,Nn.isMatch=function(e,t){return e===t||Sl(e,t,Zi(t))},Nn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,Sl(e,t,Zi(t),n)},Nn.isNaN=function(e){return Vr(e)&&e!=+e},Nn.isNative=function(e){if(uo(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yl(e)},Nn.isNil=function(e){return null==e},Nn.isNull=function(e){return null===e},Nn.isNumber=Vr,Nn.isObject=jr,Nn.isObjectLike=Hr,Nn.isPlainObject=Gr,Nn.isRegExp=Kr,Nn.isSafeInteger=function(e){return Ur(e)&&e>=-9007199254740991&&e<=9007199254740991},Nn.isSet=qr,Nn.isString=Yr,Nn.isSymbol=Xr,Nn.isTypedArray=Zr,Nn.isUndefined=function(e){return void 0===e},Nn.isWeakMap=function(e){return Hr(e)&&eo(e)==h},Nn.isWeakSet=function(e){return Hr(e)&&"[object WeakSet]"==vl(e)},Nn.join=function(e,t){return null==e?"":nn.call(e,t)},Nn.kebabCase=xa,Nn.last=Fo,Nn.lastIndexOf=function(e,t,n){var l=null==e?0:e.length;if(!l)return-1;var i=l;return void 0!==n&&(i=(i=ta(n))<0?on(l+i,0):rn(i,l-1)),t==t?function(e,t,n){for(var l=n+1;l--;)if(e[l]===t)return l;return l}(e,t,i):Et(e,ht,i,!0)},Nn.lowerCase=Ra,Nn.lowerFirst=La,Nn.lt=$r,Nn.lte=Qr,Nn.max=function(e){return e&&e.length?nl(e,Va,pl):void 0},Nn.maxBy=function(e,t){return e&&e.length?nl(e,Yi(t,2),pl):void 0},Nn.mean=function(e){return St(e,Va)},Nn.meanBy=function(e,t){return St(e,Yi(t,2))},Nn.min=function(e){return e&&e.length?nl(e,Va,Cl):void 0},Nn.minBy=function(e,t){return e&&e.length?nl(e,Yi(t,2),Cl):void 0},Nn.stubArray=nu,Nn.stubFalse=lu,Nn.stubObject=function(){return{}},Nn.stubString=function(){return""},Nn.stubTrue=function(){return!0},Nn.multiply=cu,Nn.nth=function(e,t){return e&&e.length?wl(e,ta(t)):void 0},Nn.noConflict=function(){return ze._===this&&(ze._=De),this},Nn.noop=Xa,Nn.now=pr,Nn.pad=function(e,t,n){e=oa(e);var l=(t=ta(t))?Ht(e):0;if(!t||l>=t)return e;var i=(t-l)/2;return Oi(Qt(i),n)+e+Oi($t(i),n)},Nn.padEnd=function(e,t,n){e=oa(e);var l=(t=ta(t))?Ht(e):0;return t&&l<t?e+Oi(t-l,n):e},Nn.padStart=function(e,t,n){e=oa(e);var l=(t=ta(t))?Ht(e):0;return t&&l<t?Oi(t-l,n)+e:e},Nn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),un(oa(e).replace(G,""),t||0)},Nn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&oo(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=ea(e),void 0===t?(t=e,e=0):t=ea(t)),e>t){var l=e;e=t,t=l}if(n||e%1||t%1){var i=cn();return rn(e+i*(t-e+Ue("1e-"+((i+"").length-1))),t)}return Pl(e,t)},Nn.reduce=function(e,t,n){var l=xr(e)?dt:Tt,i=arguments.length<3;return l(e,Yi(t,4),n,i,Jn)},Nn.reduceRight=function(e,t,n){var l=xr(e)?vt:Tt,i=arguments.length<3;return l(e,Yi(t,4),n,i,el)},Nn.repeat=function(e,t,n){return t=(n?oo(e,t,n):void 0===t)?1:ta(t),kl(oa(e),t)},Nn.replace=function(){var e=arguments,t=oa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Nn.result=function(e,t,n){var l=-1,i=(t=oi(t,e)).length;for(i||(i=1,e=void 0);++l<i;){var o=null==e?void 0:e[Co(t[l])];void 0===o&&(l=i,o=n),e=Br(o)?o.call(e):o}return e},Nn.round=su,Nn.runInContext=e,Nn.sample=function(e){return(xr(e)?Bn:Fl)(e)},Nn.size=function(e){if(null==e)return 0;if(Lr(e))return Yr(e)?Ht(e):e.length;var t=eo(e);return t==v||t==E?e.size:Tl(e).length},Nn.snakeCase=Pa,Nn.some=function(e,t,n){var l=xr(e)?pt:Vl;return n&&oo(e,t,n)&&(t=void 0),l(e,Yi(t,3))},Nn.sortedIndex=function(e,t){return Gl(e,t)},Nn.sortedIndexBy=function(e,t,n){return Kl(e,t,Yi(n,2))},Nn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var l=Gl(e,t);if(l<n&&Nr(e[l],t))return l}return-1},Nn.sortedLastIndex=function(e,t){return Gl(e,t,!0)},Nn.sortedLastIndexBy=function(e,t,n){return Kl(e,t,Yi(n,2),!0)},Nn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Gl(e,t,!0)-1;if(Nr(e[n],t))return n}return-1},Nn.startCase=ka,Nn.startsWith=function(e,t,n){return e=oa(e),n=null==n?0:Yn(ta(n),0,e.length),t=Xl(t),e.slice(n,n+t.length)==t},Nn.subtract=du,Nn.sum=function(e){return e&&e.length?Ct(e,Va):0},Nn.sumBy=function(e,t){return e&&e.length?Ct(e,Yi(t,2)):0},Nn.template=function(e,t,n){var l=Nn.templateSettings;n&&oo(e,t,n)&&(t=void 0),e=oa(e),t=ua({},t,l,Bi);var i,o,r=ua({},t.imports,l.imports,Bi),a=ga(r),u=It(r,a),c=0,s=t.interpolate||ue,d="__p += '",v=fe((t.escape||ue).source+"|"+s.source+"|"+(s===U?ee:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),p="//# sourceURL="+(ye.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ke+"]")+"\n";e.replace(v,function(t,n,l,r,a,u){return l||(l=r),d+=e.slice(c,u).replace(ce,kt),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),a&&(o=!0,d+="';\n"+a+";\n__p += '"),l&&(d+="' +\n((__t = ("+l+")) == null ? '' : __t) +\n'"),c=u+t.length,t}),d+="';\n";var f=ye.call(t,"variable")&&t.variable;if(f){if(Q.test(f))throw new se("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(O,""):d).replace(x,"$1").replace(R,"$1;"),d="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Ua(function(){return de(a,p+"return "+d).apply(void 0,u)});if(m.source=d,Fr(m))throw m;return m},Nn.times=function(e,t){if((e=ta(e))<1||e>9007199254740991)return[];var n=4294967295,l=rn(e,4294967295);e-=4294967295;for(var i=At(l,t=Yi(t));++n<e;)t(n);return i},Nn.toFinite=ea,Nn.toInteger=ta,Nn.toLength=na,Nn.toLower=function(e){return oa(e).toLowerCase()},Nn.toNumber=la,Nn.toSafeInteger=function(e){return e?Yn(ta(e),-9007199254740991,9007199254740991):0===e?e:0},Nn.toString=oa,Nn.toUpper=function(e){return oa(e).toUpperCase()},Nn.trim=function(e,t,n){if((e=oa(e))&&(n||void 0===t))return Dt(e);if(!e||!(t=Xl(t)))return e;var l=zt(e),i=zt(t);return ai(l,Ot(l,i),xt(l,i)+1).join("")},Nn.trimEnd=function(e,t,n){if((e=oa(e))&&(n||void 0===t))return e.slice(0,Vt(e)+1);if(!e||!(t=Xl(t)))return e;var l=zt(e);return ai(l,0,xt(l,zt(t))+1).join("")},Nn.trimStart=function(e,t,n){if((e=oa(e))&&(n||void 0===t))return e.replace(G,"");if(!e||!(t=Xl(t)))return e;var l=zt(e);return ai(l,Ot(l,zt(t))).join("")},Nn.truncate=function(e,t){var n=30,l="...";if(jr(t)){var i="separator"in t?t.separator:i;n="length"in t?ta(t.length):n,l="omission"in t?Xl(t.omission):l}var o=(e=oa(e)).length;if(Mt(e)){var r=zt(e);o=r.length}if(n>=o)return e;var a=n-Ht(l);if(a<1)return l;var u=r?ai(r,0,a).join(""):e.slice(0,a);if(void 0===i)return u+l;if(r&&(a+=u.length-a),Kr(i)){if(e.slice(a).search(i)){var c,s=u;for(i.global||(i=fe(i.source,oa(te.exec(i))+"g")),i.lastIndex=0;c=i.exec(s);)var d=c.index;u=u.slice(0,void 0===d?a:d)}}else if(e.indexOf(Xl(i),a)!=a){var v=u.lastIndexOf(i);v>-1&&(u=u.slice(0,v))}return u+l},Nn.unescape=function(e){return(e=oa(e))&&k.test(e)?e.replace(L,Gt):e},Nn.uniqueId=function(e){var t=++be;return oa(e)+t},Nn.upperCase=Ma,Nn.upperFirst=Fa,Nn.each=or,Nn.eachRight=rr,Nn.first=Lo,Ya(Nn,(iu={},al(Nn,function(e,t){ye.call(Nn.prototype,t)||(iu[t]=e)}),iu),{chain:!1}),Nn.VERSION="4.17.21",lt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Nn[e].placeholder=Nn}),lt(["drop","take"],function(e,t){xn.prototype[e]=function(n){n=void 0===n?1:on(ta(n),0);var l=this.__filtered__&&!t?new xn(this):this.clone();return l.__filtered__?l.__takeCount__=rn(n,l.__takeCount__):l.__views__.push({size:rn(n,4294967295),type:e+(l.__dir__<0?"Right":"")}),l},xn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),lt(["filter","map","takeWhile"],function(e,t){var n=t+1,l=1==n||3==n;xn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Yi(e,3),type:n}),t.__filtered__=t.__filtered__||l,t}}),lt(["head","last"],function(e,t){var n="take"+(t?"Right":"");xn.prototype[e]=function(){return this[n](1).value()[0]}}),lt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");xn.prototype[e]=function(){return this.__filtered__?new xn(this):this[n](1)}}),xn.prototype.compact=function(){return this.filter(Va)},xn.prototype.find=function(e){return this.filter(e).head()},xn.prototype.findLast=function(e){return this.reverse().find(e)},xn.prototype.invokeMap=Ml(function(e,t){return"function"==typeof e?new xn(this):this.map(function(n){return _l(n,e,t)})}),xn.prototype.reject=function(e){return this.filter(br(Yi(e)))},xn.prototype.slice=function(e,t){e=ta(e);var n=this;return n.__filtered__&&(e>0||t<0)?new xn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ta(t))<0?n.dropRight(-t):n.take(t-e)),n)},xn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},xn.prototype.toArray=function(){return this.take(4294967295)},al(xn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),l=/^(?:head|last)$/.test(t),i=Nn[l?"take"+("last"==t?"Right":""):t],o=l||/^find/.test(t);i&&(Nn.prototype[t]=function(){var t=this.__wrapped__,r=l?[1]:arguments,a=t instanceof xn,u=r[0],c=a||xr(t),s=function(e){var t=i.apply(Nn,st([e],r));return l&&d?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(a=c=!1);var d=this.__chain__,v=!!this.__actions__.length,p=o&&!d,f=a&&!v;if(!o&&c){t=f?t:new xn(this);var m=e.apply(t,r);return m.__actions__.push({func:er,args:[s],thisArg:void 0}),new On(m,d)}return p&&f?e.apply(this,r):(m=this.thru(s),p?l?m.value()[0]:m.value():m)})}),lt(["pop","push","shift","sort","splice","unshift"],function(e){var t=_e[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",l=/^(?:pop|shift)$/.test(e);Nn.prototype[e]=function(){var e=arguments;if(l&&!this.__chain__){var i=this.value();return t.apply(xr(i)?i:[],e)}return this[n](function(n){return t.apply(xr(n)?n:[],e)})}}),al(xn.prototype,function(e,t){var n=Nn[t];if(n){var l=n.name+"";ye.call(gn,l)||(gn[l]=[]),gn[l].push({name:t,func:n})}}),gn[Di(void 0,2).name]=[{name:"wrapper",func:void 0}],xn.prototype.clone=function(){var e=new xn(this.__wrapped__);return e.__actions__=mi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=mi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=mi(this.__views__),e},xn.prototype.reverse=function(){if(this.__filtered__){var e=new xn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},xn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=xr(e),l=t<0,i=n?e.length:0,o=function(e,t,n){for(var l=-1,i=n.length;++l<i;){var o=n[l],r=o.size;switch(o.type){case"drop":e+=r;break;case"dropRight":t-=r;break;case"take":t=rn(t,e+r);break;case"takeRight":e=on(e,t-r)}}return{start:e,end:t}}(0,i,this.__views__),r=o.start,a=o.end,u=a-r,c=l?a:r-1,s=this.__iteratees__,d=s.length,v=0,p=rn(u,this.__takeCount__);if(!n||!l&&i==u&&p==u)return ei(e,this.__actions__);var f=[];e:for(;u--&&v<p;){for(var m=-1,E=e[c+=t];++m<d;){var _=s[m],g=_.type,h=(0,_.iteratee)(E);if(2==g)E=h;else if(!h){if(1==g)continue e;break e}}f[v++]=E}return f},Nn.prototype.at=tr,Nn.prototype.chain=function(){return Jo(this)},Nn.prototype.commit=function(){return new On(this.value(),this.__chain__)},Nn.prototype.next=function(){void 0===this.__values__&&(this.__values__=Jr(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Nn.prototype.plant=function(e){for(var t,n=this;n instanceof wn;){var l=Do(n);l.__index__=0,l.__values__=void 0,t?i.__wrapped__=l:t=l;var i=l;n=n.__wrapped__}return i.__wrapped__=e,t},Nn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof xn){var t=e;return this.__actions__.length&&(t=new xn(this)),(t=t.reverse()).__actions__.push({func:er,args:[jo],thisArg:void 0}),new On(t,this.__chain__)}return this.thru(jo)},Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return ei(this.__wrapped__,this.__actions__)},Nn.prototype.first=Nn.prototype.head,ft&&(Nn.prototype[ft]=function(){return this}),Nn}();Ge?((Ge.exports=Kt)._=Kt,Ve._=Kt):ze._=Kt}).call(q)});const Gl=e=>{var t,n;let{t:o,formData:r,applicationData:a,docs:u,bpaActionsDetails:c}=e;const s=(null==a?void 0:a.status)||"",d=(null==c||null===(t=c.data)||void 0===t?void 0:t.nextActions)||[],v=Digit.ULBService.getStateId(),[p,f]=l.useState((null==r||null===(n=r.documents)||void 0===n?void 0:n.documents)||[]),[m,E]=l.useState(null),[_,g]=l.useState([]),[h,S]=l.useState(!0),[y,b]=l.useState(!1),[T,C]=l.useState(!1),{isLoading:A,data:D}=Digit.Hooks.obps.useMDMS(v,"BPA",["DocTypeMapping"]),{isLoading:N,data:I}=Digit.Hooks.obps.useMDMS(v,"common-masters",["DocumentType"]);return l.useEffect(()=>{var e,t,n,l;let i=[];var o,r;null!=D&&null!==(e=D.BPA)&&void 0!==e&&e.DocTypeMapping&&(i=null==D||null===(o=D.BPA)||void 0===o||null===(r=o.DocTypeMapping)||void 0===r?void 0:r.filter(e=>{var t,n;return e.WFState==(null==a?void 0:a.status)?null==a?void 0:a.status:e.RiskType==(null==a?void 0:a.riskType)&&e.ServiceType==(null==a||null===(t=a.additionalDetails)||void 0===t?void 0:t.serviceType)&&e.applicationType==(null==a||null===(n=a.additionalDetails)||void 0===n?void 0:n.applicationType)}));let c=[];null===(t=i)||void 0===t||null===(n=t[0])||void 0===n||null===(l=n.docTypes)||void 0===l||l.forEach(e=>{var t,n,l,i;let o=e.code;e.dropdownData=[],e.uploadedDocuments=[],null==I||null===(t=I["common-masters"])||void 0===t||null===(n=t.DocumentType)||void 0===n||n.forEach(t=>{let n=t.code.slice(0,o.length);o===n&&(e.hasDropdown=!0,t.i18nKey=t.code,e.dropdownData.push(t))}),e.uploadedDocuments[0]={},e.uploadedDocuments[0].values=[],null==u||null===(l=u[0])||void 0===l||null===(i=l.values)||void 0===i||i.map(t=>{var n,l;o===(null==t||null===(n=t.documentType)||void 0===n?void 0:n.split(".")[0])+"."+(null==t||null===(l=t.documentType)||void 0===l?void 0:l.split(".")[1])&&e.uploadedDocuments[0].values.push(t)}),c.push(e)}),sessionStorage.setItem("BPA_DOCUMENTS",JSON.stringify(c)),g(c)},[!A,!N]),l.useEffect(()=>{let e=0;_.map(t=>{let n=!1;p.map(e=>{t.required&&t.code==e.documentType.split(".")[0]+"."+e.documentType.split(".")[1]&&(n=!0)}),!n&&t.required&&(e+=1)}),S("0"!=e&&0!=e||!(p.length>0))},[p,y]),l.useEffect(()=>{C("DOC_VERIFICATION_INPROGRESS"===s&&(null==d?void 0:d.length)>0)},[a,c]),i.createElement("div",null,null==_?void 0:_.map((e,t)=>i.createElement("div",null,i.createElement(Kl,{key:t,index:t,document:e,t:o,error:m,setError:E,setDocuments:f,documents:p,setCheckRequiredFields:b,applicationStatus:s,actions:d,bpaTaxDocuments:_,checkEnablingDocs:T}))))};function Kl(e){var t,n;let{t:o,document:r,setDocuments:a,documents:u,index:d,bpaTaxDocuments:v,checkEnablingDocs:p}=e;const f=null==u?void 0:u.filter(e=>{var t;return null==e||null===(t=e.documentType)||void 0===t?void 0:t.includes(null==r?void 0:r.code)})[0],m=Digit.ULBService.getStateId(),[E,_]=l.useState(f?s({},f,{active:!0,code:null==f?void 0:f.documentType,i18nKey:null==f?void 0:f.documentType}):1===(null==r||null===(t=r.dropdownData)||void 0===t?void 0:t.length)?null==r?void 0:r.dropdownData[0]:{}),[g,h]=l.useState(null),[S,y]=l.useState(()=>(null==f?void 0:f.fileStoreId)||null),[b,T]=l.useState([]);return l.useEffect(()=>{null!=E&&E.code&&a(e=>{var t;const n=null==e?void 0:e.filter(e=>(null==e?void 0:e.documentType)!==(null==E?void 0:E.code));return 0===(null==S?void 0:S.length)||null===S?n:[...null==n?void 0:n.filter(e=>(null==e?void 0:e.fileStoreId)!==S),{documentType:null==E?void 0:E.code,fileStoreId:S,documentUid:S,fileName:(null==g?void 0:g.name)||"",id:u?null===(t=u.find(e=>e.documentType===(null==E?void 0:E.code)))||void 0===t?void 0:t.id:void 0}]})},[S,E]),l.useEffect(()=>{try{b.length>0&&(sessionStorage.removeItem("BPA_DOCUMENTS"),r.newUploadedDocs=[],b.map(e=>{var t,n,l;null!=E&&E.code&&r.newUploadedDocs.push({documentType:null==E?void 0:E.code,fileStoreId:null==e||null===(t=e.fileStoreId)||void 0===t?void 0:t.fileStoreId,documentUid:null==e||null===(n=e.fileStoreId)||void 0===n?void 0:n.fileStoreId,tenantId:null==e||null===(l=e.fileStoreId)||void 0===l?void 0:l.tenantId})}),v[d]=r,sessionStorage.setItem("BPA_DOCUMENTS",JSON.stringify(v)))}catch(e){Promise.reject(e)}},[b,E]),l.useEffect(()=>{},[g]),i.createElement("div",{style:{marginBottom:"24px",maxWidth:"950px",minWidth:"280px",background:"#FAFAFA",borderRadius:"4px",border:"1px solid #D6D5D4",padding:"8px"}},i.createElement(c.CardSubHeader,{style:{marginBottom:"8px",paddingBottom:"9px",color:"#0B0C0C",fontSize:"16px",lineHeight:"19px"}},""+o(null==r?void 0:r.code)),(null==r||null===(n=r.uploadedDocuments)||void 0===n?void 0:n.length)&&i.createElement(Vl,{documents:null==r?void 0:r.uploadedDocuments,svgStyles:{width:"100px",height:"100px",viewBox:"0 0 25 25",minWidth:"100px"}}),p?i.createElement("div",{style:{marginTop:"20px"}},i.createElement(c.LabelFieldPair,{style:{width:"100%"}},i.createElement(c.CardLabel,{style:{marginTop:"-10px",width:"100%"}},null!=r&&r.required?o(null==r?void 0:r.code)+"* ":""+o(null==r?void 0:r.code)),i.createElement(c.Dropdown,{className:"form-field",t:o,isMandatory:!1,option:null==r?void 0:r.dropdownData,selected:E,optionKey:"i18nKey",select:e=>_(e),style:{width:"100%"}})),i.createElement(c.LabelFieldPair,{style:{width:"100%"}},i.createElement(c.CardLabel,{className:"card-label-smaller",style:{width:"100%"}}),i.createElement("div",{className:"field",style:{width:"100%"}},i.createElement(c.MultiUploadWrapper,{module:"BPA",tenantId:m,getFormState:e=>((e,t)=>{let n=Object.fromEntries(t),l=Object.values(n);var i;0!==Object.keys(n).length&&T(l),(i=l[l.length-1])&&h(i.file)})(0,e),t:o,allowedFileTypesRegex:/(.*?)(jpg|jpeg|png|image|pdf)$/i,allowedMaxSizeInMB:5,acceptFiles:"image/*, .pdf, .png, .jpeg, .jpg"})))):null)}function ql(e){let{fiReport:t,isCitizen:n=!1}=e;const{t:l}=o.useTranslation();return i.createElement(i.Fragment,null,i.createElement("div",{style:{marginTop:"10px"}},i.createElement(n?c.CardHeader:c.CardSectionHeader,{style:{fontSize:"24px"}},""+l("BPA_FI_REPORT")),t.map((e,n)=>{var o,r,a,u,s,d;return i.createElement("div",{style:{background:"#FAFAFA",border:"1px solid #D6D5D4",padding:"8px",borderRadius:"4px",maxWidth:"950px",minWidth:"280px",marginBottom:"24px"}},i.createElement(c.StatusTable,null,i.createElement(c.CardSectionHeader,{style:{fontSize:"20px"}},1==(null==t?void 0:t.length)?""+l("BPA_FI_REPORT"):l("BPA_FI_REPORT")+" - "+(n+1)),i.createElement(c.Row,{className:"border-none",label:""+l("BPA_FI_DATE_LABEL"),text:null!=e&&e.date?e.date.includes("-")?(null===(o=e.date)||void 0===o?void 0:o.split("-")[2])+"/"+(null===(r=e.date)||void 0===r?void 0:r.split("-")[1])+"/"+(null===(a=e.date)||void 0===a?void 0:a.split("-")[0]):null==e?void 0:e.date:"NA"}),i.createElement(c.Row,{className:"border-none",label:""+l("BPA_FI_TIME_LABEL"),text:null!=e&&e.time?null==e?void 0:e.time:"NA"}),(null==e||null===(u=e.questions)||void 0===u?void 0:u.length)&&(null==e||null===(s=e.questions)||void 0===s?void 0:s.map(e=>i.createElement("div",{style:{background:"white",border:"1px solid #D6D5D4",padding:"8px",borderRadius:"4px",marginTop:"10px"}},i.createElement(c.Row,{className:"border-none",label:""+l(""+e.question),text:null!=e&&e.value?null==e?void 0:e.value:"NA"}),i.createElement(c.Row,{className:"border-none",label:""+l("BPA_ENTER_REMARKS"),text:e.remarks?e.remarks:"NA"})))),i.createElement(Vl,{documents:(d=null==e?void 0:e.docs,[{title:"BPA_DOCUMENT_DETAILS_LABEL",values:null==d?void 0:d.map(e=>{var t;return{title:null==e||null===(t=e.documentType)||void 0===t?void 0:t.replaceAll(".","_"),documentType:null==e?void 0:e.documentType,documentUid:null==e?void 0:e.documentUid,fileStoreId:null==e?void 0:e.fileStoreId,id:null==e?void 0:e.id,url:null==e?void 0:e.url}})}]),svgStyles:{width:"100px",height:"100px",viewBox:"0 0 25 25",minWidth:"100px"}})))})))}function Yl(e){let{t:t,document:n,setNocDocuments:o,setError:r,nocDocuments:a}=e;const u=null==a?void 0:a.filter(e=>{var t;return null==e||null===(t=e.documentType)||void 0===t?void 0:t.includes(null==n?void 0:n.code)})[0],s=Digit.ULBService.getStateId(),[d,v]=l.useState(),[p,f]=l.useState(null),[m,E]=l.useState(()=>(null==u?void 0:u.fileStoreId)||null);return l.useEffect(()=>{var e,t;null!=n&&null!==(e=n.dropdownData)&&void 0!==e&&null!==(t=e[0])&&void 0!==t&&t.code&&o(e=>{var t;const l=null==e?void 0:e.filter(e=>{var t,l;return(null==e?void 0:e.documentType)!==(null==n||null===(t=n.dropdownData)||void 0===t||null===(l=t[0])||void 0===l?void 0:l.code)});return 0===(null==m?void 0:m.length)||null===m?l:[...null==l?void 0:l.filter(e=>(null==e?void 0:e.fileStoreId)!==m),{documentType:null==n||null===(t=n.dropdownData)||void 0===t?void 0:t[0].code,fileStoreId:m,documentUid:m,fileName:(null==p?void 0:p.name)||""}]})},[m]),l.useEffect(()=>{!function(){try{r(null);const e=function(){if(p){const e=/(.*?)(jpg|jpeg|png|image|pdf)$/i,n=function(){if(p.size>=5242880)r(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));else{const n=function(){if(null!=p&&p.type&&!e.test(null==p?void 0:p.type))r(t("NOT_SUPPORTED_FILE_TYPE"));else{const e=qe(function(){return E(null),Promise.resolve(Digit.UploadServices.Filestorage("PT",p,Digit.ULBService.getStateId())).then(function(e){var n,l,i,o;(null==e||null===(n=e.data)||void 0===n||null===(l=n.files)||void 0===l?void 0:l.length)>0?E(null==e||null===(i=e.data)||void 0===i||null===(o=i.files[0])||void 0===o?void 0:o.fileStoreId):r(t("CS_FILE_UPLOAD_ERROR"))})},function(){r(t("CS_FILE_UPLOAD_ERROR"))});if(e&&e.then)return e.then(function(){})}}();if(n&&n.then)return n.then(function(){})}}();if(n&&n.then)return n.then(function(){})}}();e&&e.then&&e.then(function(){})}catch(e){Promise.reject(e)}}()},[p]),i.createElement("div",{style:{}},i.createElement(c.LabelFieldPair,{style:{width:"98%",marginRight:"10px"}},i.createElement(c.CardLabel,{style:{width:"100%"}},null!=n&&n.required?t("TL_BUTTON_UPLOAD FILE")+"*":""+t("TL_BUTTON_UPLOAD FILE")),i.createElement("div",{className:"field",style:{width:"100%"}},i.createElement(c.MultiUploadWrapper,{module:"NOC",tenantId:s,getFormState:e=>(e=>{let t=Object.fromEntries(e),n=Object.values(t);var l;(l=n[n.length-1])&&f(l.file)})(e),t:t,allowedFileTypesRegex:/(.*?)(jpg|jpeg|png|image|pdf)$/i,allowedMaxSizeInMB:5,acceptFiles:"image/*, .pdf, .png, .jpeg, .jpg"}))))}const Xl=e=>{var t;let{t:n,noc:o,docs:r,isNoc:a,applicationData:u,NOCdata:s,bpaActionsDetails:d}=e;Digit.ULBService.getStateId();const v=Digit.ULBService.getStateId(),p=(null==u?void 0:u.status)||"",f=(null==d||null===(t=d.data)||void 0===t?void 0:t.nextActions)||[],{data:m}=Digit.Hooks.obps.useMDMS(v,"NOC",["DocumentTypeMapping"],{enabled:a}),{data:E}=Digit.Hooks.obps.useMDMS(v,"BPA",["DocTypeMapping"],{enabled:!a}),{data:_}=Digit.Hooks.obps.useMDMS(v,"common-masters",["DocumentType"]),[g,h]=l.useState([]),[S,y]=l.useState([]),[b,T]=l.useState(!1),[C,A]=Digit.Hooks.useSessionStorage(null==o?void 0:o.nocType,[]),[D,N]=l.useState(null),I=window.location.href.includes("/employee/");return l.useEffect(()=>{var e;h(null==_||null===(e=_["common-masters"])||void 0===e?void 0:e.DocumentType)},[_]),l.useEffect(()=>{var e,t,n;let l,i=[];var r,c,s,d;l=a?null==m||null===(r=m.NOC)||void 0===r||null===(c=r.DocumentTypeMapping)||void 0===c?void 0:c.filter(e=>(null==e?void 0:e.applicationType)===(null==o?void 0:o.applicationType)&&(null==e?void 0:e.nocType)===(null==o?void 0:o.nocType)):null==E||null===(s=E.BPA)||void 0===s||null===(d=s.DocTypeMapping)||void 0===d?void 0:d.filter(e=>{var t,n;return e.WFState==(null==u?void 0:u.status)&&e.RiskType==(null==u?void 0:u.riskType)&&e.ServiceType==(null==u||null===(t=u.additionalDetails)||void 0===t?void 0:t.serviceType)&&e.applicationType==(null==u||null===(n=u.additionalDetails)||void 0===n?void 0:n.applicationType)}),null!==(e=l)&&void 0!==e&&null!==(t=e[0])&&void 0!==t&&null!==(n=t.docTypes)&&void 0!==n&&n[0]&&(l[0].docTypes[0].nocType=l[0].nocType,l[0].docTypes[0].additionalDetails={submissionDetails:null==o?void 0:o.additionalDetails,applicationStatus:null==o?void 0:o.applicationStatus,appNumberLink:null==o?void 0:o.applicationNo,nocNo:null==o?void 0:o.nocNo},i.push(l[0].docTypes[0]));let v=[];i&&i.length>0&&(i.map(e=>{let t=e.documentType;e.dropdownData=[],null==g||g.forEach(n=>{let l=n.code.slice(0,null==t?void 0:t.length);t===l&&(e.hasDropdown=!0,e.dropdownData.push(n))}),v.push(e)}),y(v))},[m,g]),l.useEffect(()=>{T("NOC_VERIFICATION_INPROGRESS"===p&&(null==f?void 0:f.length)>0)},[u,d]),i.createElement("div",{style:{border:"1px solid #D6D5D4",padding:"16px 0px 16px 8px",background:"#FAFAFA",borderRadius:"5px",marginBottom:"24px",maxWidth:"950px"}},i.createElement(c.StatusTable,null,i.createElement(c.Row,{label:I?""+n("BPA_"+(null==o?void 0:o.nocType)+"_HEADER"):n("BPA_"+(null==o?void 0:o.nocType)+"_HEADER"),labelStyle:{fontSize:"20px",width:"150%"}}),s&&s.map((e,t)=>{if(null!=e&&e.value)return i.createElement(c.Row,"STATUS"==(null==e?void 0:e.field)?{className:"border-none",label:I?""+n(null==e?void 0:e.title):n(null==e?void 0:e.title),text:n(null!=e&&e.value?null==e?void 0:e.value:"CS_NA"),textStyle:"APPROVED"==(null==e?void 0:e.value)||"AUTO_APPROVED"==(null==e?void 0:e.value)?{color:"#00703C"}:{color:"#D4351C"}}:{className:"border-none",label:I?""+n(null==e?void 0:e.title):n(null==e?void 0:e.title),text:n(null!=e&&e.value?null==e?void 0:e.value:"CS_NA")})})),i.createElement(Vl,{documents:r,svgStyles:{width:"80px",height:"100px",viewBox:"0 0 25 25",minWidth:"80px"}}),b&&(null==S?void 0:S.map((e,t)=>i.createElement(Yl,{key:t,document:e,t:n,error:D,setError:N,setNocDocuments:A,nocDocuments:C,checkEnablingDocs:b}))))},Zl=e=>{let{permissions:t,t:n}=e;const[o,r,a]=Digit.Hooks.useSessionStorage("OBPS_APPROVAL_CHECKS",null==t?void 0:t.map(e=>({label:e,checked:!1}))),[u,d,v]=Digit.Hooks.useSessionStorage("OBPS_NEW_APPROVALS",[]);l.useEffect(()=>()=>{Digit.SessionStorage.del("OBPS_NEW_APPROVALS"),Digit.SessionStorage.del("OBPS_APPROVAL_CHECKS")},[]);const p=window.Digit.Utils.browser.isMobile();return i.createElement("div",null,i.createElement(c.CardSubHeader,{style:{marginBottom:"16px",fontSize:"24px"}},n("BPA_PERMIT_CONDITIONS")),null==o?void 0:o.map((e,t)=>i.createElement(c.CheckBox,{key:t,styles:{margin:"20px 0 40px",maxWidth:p?"100%":"70%"},label:null==e?void 0:e.label,checked:null==e?void 0:e.checked,onChange:e=>((e,t,n)=>{const l=e.target.checked;r(()=>null==o?void 0:o.map((e,t)=>n===t?s({},e,{checked:l}):e))})(e,0,t),isLabelFirst:!0,index:t})),null==u?void 0:u.map((e,t)=>i.createElement("div",null,i.createElement(c.TextInput,{key:t,value:null==e?void 0:e.label,onChange:e=>((e,t)=>{d(()=>null==u?void 0:u.map((n,l)=>{var i;return t===l?{label:null==e||null===(i=e.target)||void 0===i?void 0:i.value}:n}))})(e,t),textInputStyle:{maxWidth:p?"96%":"830px",width:p?"96%":"830px"},style:p?{paddingRight:"10%"}:{},placeholder:n("BPA_ENTER_PERMIT_CONDITIONS_LABEL")}),i.createElement(c.LinkButton,{label:i.createElement("div",null,i.createElement("span",null,i.createElement(c.Close,{style:{float:"right",position:"relative",bottom:"32px",marginTop:"-22px",marginRight:p?"5%":"35%"}}))),style:{},onClick:e=>(e=>{const t=[...u];t.splice(e,1),d([...t])})(t)}))),i.createElement(c.LinkButton,{style:{color:"#a82227",maxWidth:p?"fit-content":"10%",marginRight:"3%"},label:n("BPA_ADD_MORE"),onClick:()=>{d([...u,{label:""}])}}))};function $l(e){let{documents:t,svgStyles:n={},isSendBackFlow:r=!1}=e;const{t:a}=o.useTranslation(),[u,s]=l.useState(()=>[]),[d,v]=(Digit.ULBService.getCurrentTenantId(),l.useState({}));l.useEffect(()=>{var e;let n=[];null==t||t.forEach((e,t,l)=>{n=[...n,...e.values?e.values:[]]}),s(null===(e=n)||void 0===e?void 0:e.map(e=>null==e?void 0:e.fileStoreId))},[t]),l.useEffect(()=>{var e;null!=u&&u.length&&"BillAmend"===(null==t||null===(e=t[0])||void 0===e?void 0:e.BS)?Digit.UploadServices.Filefetch(u,Digit.ULBService.getCurrentTenantId()).then(e=>{v(null==e?void 0:e.data)}):null!=u&&u.length&&Digit.UploadServices.Filefetch(u,Digit.ULBService.getStateId()).then(e=>{v(null==e?void 0:e.data)})},[u]);const p=window.location.href.includes("employee/tl")||window.location.href.includes("/obps")||window.location.href.includes("employee/ws"),f=window.location.href.includes("stakeholder");return i.createElement("div",{style:{marginTop:"19px"}},!f&&(null==t?void 0:t.map((e,t)=>{var n;return i.createElement(i.Fragment,{key:t},null!=e&&e.title?i.createElement(c.CardSubHeader,{style:p?{marginTop:"32px",marginBottom:"18px",color:"#0B0C0C, 100%",fontSize:"24px",lineHeight:"30px"}:{marginTop:"32px",marginBottom:"8px",color:"#505A5F",fontSize:"24px"}},a(null==e?void 0:e.title)):null,i.createElement("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"flex-start"}},null!=e&&e.values&&(null==e?void 0:e.values.length)>0?null==e||null===(n=e.values)||void 0===n?void 0:n.map((e,t)=>{var n,l;return i.createElement("a",{target:"_",href:null===(n=d[e.fileStoreId])||void 0===n?void 0:n.split(",")[0],style:{minWidth:"80px",marginRight:"10px",maxWidth:"100px",height:"auto"},key:t},i.createElement("div",{style:{display:"flex",justifyContent:"center"}},i.createElement(c.PDFSvg,null)),i.createElement("p",{style:p?{marginTop:"8px",fontWeight:"bold",fontSize:"16px",lineHeight:"19px",color:"#505A5F",textAlign:"center"}:{marginTop:"8px",fontWeight:"bold"}},a(null==e?void 0:e.title)),r?null!=e&&null!==(l=e.documentType)&&void 0!==l&&l.includes("NOC")?i.createElement("p",{style:{textAlign:"center"}},a(null==e?void 0:e.documentType.split(".")[1])):i.createElement("p",{style:{textAlign:"center"}},a(null==e?void 0:e.documentType)):"")}):!window.location.href.includes("citizen")&&i.createElement("div",null,i.createElement("p",null,a("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))))})),f&&(null==t?void 0:t.map((e,t)=>{var l;return i.createElement(i.Fragment,{key:t},null!=e&&e.title?i.createElement(c.CardSubHeader,{style:{marginTop:"32px",marginBottom:"8px",color:"#505A5F",fontSize:"24px"}},a(null==e?void 0:e.title)):null,i.createElement("div",null,null!=e&&e.values&&(null==e?void 0:e.values.length)>0?null==e||null===(l=e.values)||void 0===l?void 0:l.map((e,t)=>{var l;return i.createElement("a",{target:"_",href:null===(l=d[e.fileStoreId])||void 0===l?void 0:l.split(",")[0],style:{minWidth:null!=n&&n.minWidth?null==n?void 0:n.minWidth:"160px",marginRight:"20px"},key:t},i.createElement("div",{style:{maxWidth:"940px",padding:"8px",borderRadius:"4px",border:"1px solid #D6D5D4",background:"#FAFAFA"}},i.createElement("p",{style:{marginTop:"8px",fontWeight:"bold",marginBottom:"10px"}},a(null==e?void 0:e.title)),null!=e&&e.docInfo?i.createElement("div",{style:{fontSize:"12px",color:"#505A5F",fontWeight:400,lineHeight:"15px",marginBottom:"10px"}},""+a(null==e?void 0:e.docInfo)):null,i.createElement(c.PDFSvg,null),i.createElement("p",{style:{marginTop:"8px",fontSize:"16px",lineHeight:"19px",color:"#505A5F",fontWeight:"400"}},""+a(null==e?void 0:e.title))))}):!window.location.href.includes("citizen")&&i.createElement("div",null,i.createElement("p",null,a("BPA_NO_DOCUMENTS_UPLOADED_LABEL")))))})))}function Ql(e){let{taxHeadEstimatesCalculation:t}=e;const{taxHeadEstimates:n}=t,{t:l}=o.useTranslation();return i.createElement("div",{style:{marginTop:"40px"}},i.createElement(c.StatusTable,null,i.createElement(c.Row,{label:l("ES_PT_TITLE_TAX_HEADS"),text:l("ES_PT_TITLE_AMOUNT"),className:"border-none",textStyle:{fontWeight:"bold"}}),i.createElement(c.BreakLine,{style:{margin:"16px 0",width:"40%"}}),null==n?void 0:n.map((e,t)=>i.createElement(c.Row,{key:l(e.taxHeadCode),label:l(e.taxHeadCode),text:"₹ "+e.estimateAmount||"N/A",last:t===(null==n?void 0:n.length)-1,className:"border-none",textStyle:{color:"#505A5F"},labelStyle:{color:"#505A5F"}})),i.createElement(c.BreakLine,{style:{margin:"16px 0",width:"40%"}}),i.createElement(c.Row,{label:l("ES_PT_TITLE_TOTAL_DUE_AMOUNT"),text:"₹ "+(null==t?void 0:t.totalAmount)||"N/A",className:"border-none",textStyle:{fontSize:"24px",fontWeight:"bold"}})))}function Jl(e){let{floors:t}=e;const{t:n}=o.useTranslation();return i.createElement(i.Fragment,null,t.map(e=>{var t;return i.createElement("div",{key:n(null==e?void 0:e.title),style:{marginTop:"19px"}},i.createElement(c.CardSubHeader,{style:{marginBottom:"8px",color:"#505A5F",fontSize:"24px"}},n(null==e?void 0:e.title)),null==e||null===(t=e.values)||void 0===t?void 0:t.map((e,t)=>{var l;return i.createElement(i.Fragment,{key:t},i.createElement(c.CardSectionHeader,{style:{marginBottom:"16px",color:"#505A5F",fontSize:"16px",marginTop:0!==t?"16px":"revert"}},n(e.title)),i.createElement(c.StatusTable,{style:{position:"relative",padding:"8px"}},i.createElement("div",{style:{border:"1px solid #D6D5D4",padding:"16px",marginTop:"8px",borderRadius:"4px",background:"#FAFAFA",maxWidth:"100%"}},null==e||null===(l=e.values)||void 0===l?void 0:l.map((e,t)=>{var l;return i.createElement(c.Row,!0===e.map&&"N/A"!==e.value?{key:n(e.title),label:n(e.title),text:i.createElement("img",{src:n(e.value),alt:""})}:{key:n(e.title),label:n(e.title),text:n(e.value)||"N/A",last:t===(null==e||null===(l=e.values)||void 0===l?void 0:l.length)-1,caption:e.caption,className:"border-none"})}))))}))}))}function ei(e){let{owners:t}=e,n={};n=window.location.href.includes("/employee/pt/")?t.slice().reverse():t;const{t:l}=o.useTranslation(),r=(null==t?void 0:t.length)||1;let a={marginTop:"19px"},u={position:"relative",padding:"8px"},d={justifyContent:"space-between",fontSize:"16px",lineHeight:"19px",color:"#0B0C0C"};return Number(r)>1?a={marginTop:"19px",background:"#FAFAFA",border:"1px solid #D6D5D4",borderRadius:"4px",padding:"8px",lineHeight:"19px",maxWidth:"600px",minWidth:"280px"}:Number(r)>1||(a={marginTop:"19px",lineHeight:"19px",maxWidth:"600px",minWidth:"280px"},u={position:"relative",marginTop:"19px"}),window.location.href.includes("obps")&&(a=s({},a,{maxWidth:"950px"}),a=s({},a,{maxWidth:"950px"}),d={}),t.sort((e,t)=>{var n,l;return(null==e||null===(n=e.additionalDetails)||void 0===n?void 0:n.ownerSequence)-(null==t||null===(l=t.additionalDetails)||void 0===l?void 0:l.ownerSequence)}),i.createElement(i.Fragment,null,i.createElement("div",{className:"owner-details"},n.map((e,t)=>{var n;return i.createElement("div",{key:l(null==e?void 0:e.title),style:a,className:"owner-details-child"},i.createElement(c.CardSubHeader,{style:Number(r)>1?{marginBottom:"8px",paddingBottom:"9px",color:"#0B0C0C",fontSize:"16px",lineHeight:"19px"}:{marginBottom:"8px",color:"#505A5F",fontSize:"24px"}},Number(r)>1?l(null==e?void 0:e.title)+" "+(t+1):l(null==e?void 0:e.title)),i.createElement(i.Fragment,{key:t},i.createElement(c.StatusTable,{style:u},i.createElement("div",{style:{maxWidth:"640px",top:0,left:0,bottom:0,right:0,width:"auto"}}),null==e||null===(n=e.values)||void 0===n?void 0:n.map((e,t)=>{var n;return!0===e.map&&"N/A"!==e.value?i.createElement(c.Row,{key:l(e.title),label:l(e.title),text:i.createElement("img",{src:l(e.value),alt:"",privacy:null==e?void 0:e.privacy})}):i.createElement("span",null,i.createElement(c.Row,{key:l(e.title),label:""+l(e.title),text:l(e.value)||"N/A",last:t===(null==e||null===(n=e.values)||void 0===n?void 0:n.length)-1,caption:e.caption,className:"border-none",textStyle:e.textStyle,privacy:null==e?void 0:e.privacy,rowContainerStyle:d}))}))))})))}const ti=e=>{var t,n,r;let{scrutinyDetails:a,paymentsList:u=[]}=e;const{t:s}=o.useTranslation(),d=e=>null!=e&&e.value&&null!=e&&e.isTransLate?i.createElement("span",{style:{color:"#00703C"}},s(null==e?void 0:e.value)):null!=e&&e.value&&null!=e&&e.isTransLate?s(null==e?void 0:e.value):null!=e&&e.value?null==e?void 0:e.value:void s("NA");return i.createElement(l.Fragment,null,!(null!=a&&a.isChecklist)&&i.createElement("div",{style:{background:"#FAFAFA",border:"1px solid #D6D5D4",padding:"8px",borderRadius:"4px",maxWidth:"950px"}},i.createElement(c.StatusTable,null,i.createElement("div",null,null==a||null===(t=a.values)||void 0===t?void 0:t.map((e,t)=>null!=e&&e.isUnit?i.createElement(c.Row,{className:"border-none",textStyle:"Paid"===(null==e?void 0:e.value)?{color:"darkgreen"}:"Unpaid"===(null==e?void 0:e.value)?{color:"red"}:{},key:""+e.title,label:""+s(""+e.title),text:null!=e&&e.value?d(e)+" "+s(null==e?void 0:e.isUnit):s("NA"),labelStyle:null!=e&&e.isHeader?{fontSize:"20px"}:{}}):null==e||!e.isHeader||null!=e&&e.isUnit?null==e||!e.isSubTitle||null!=e&&e.isUnit?i.createElement(c.Row,{className:"border-none",textStyle:"Paid"===(null==e?void 0:e.value)?{color:"darkgreen",wordBreak:"break-all"}:"Unpaid"===(null==e?void 0:e.value)?{color:"red",wordBreak:"break-all"}:{wordBreak:"break-all"},key:""+e.title,label:""+s(""+e.title),text:d(e),labelStyle:null!=e&&e.isHeader?{fontSize:"20px"}:{}}):i.createElement(c.CardSubHeader,{style:{fontSize:"20px",paddingBottom:"10px",margin:"0px"}},s(null==e?void 0:e.title)):i.createElement(c.CardSubHeader,{style:{fontSize:"20px",paddingBottom:"10px"}},s(null==e?void 0:e.title))),null==a||null===(n=a.permit)||void 0===n?void 0:n.map((e,t)=>i.createElement(c.CardLabel,{style:{fontWeight:"400"}},null==e?void 0:e.title))),i.createElement("div",null,null==a||null===(r=a.scruntinyDetails)||void 0===r?void 0:r.map((e,t)=>i.createElement(l.Fragment,null,i.createElement(c.Row,{className:"border-none",label:""+s(null==e?void 0:e.title),labelStyle:{width:"150%"}}),i.createElement("a",{href:null==e?void 0:e.value}," ",i.createElement(c.PDFSvg,null)," "),i.createElement("p",{style:{margin:"8px 0px",fontWeight:"bold",fontSize:"16px",lineHeight:"19px",color:"#505A5F"}},s(null==e?void 0:e.text))))))))},ni=e=>{var t,n,r,a,u,s,d,v,p;let{edcrDetails:f,applicationData:m}=e;const{t:E}=o.useTranslation(),_=window.Digit.Utils.browser.isMobile(),g=[{name:"BPA_TABLE_COL_FLOOR",id:"Floor"},{name:"BPA_TABLE_COL_LEVEL",id:"Level"},{name:"BPA_TABLE_COL_OCCUPANCY",id:"Occupancy"},{name:"BPA_TABLE_COL_BUILDUPAREA",id:"BuildupArea"},{name:"BPA_TABLE_COL_FLOORAREA",id:"FloorArea"},{name:"BPA_TABLE_COL_CARPETAREA",id:"CarpetArea"}],h=e=>{const t=e;return(e,n,l)=>e[t]},S=l.useMemo(()=>g.map(e=>({Header:E(""+e.name),accessor:h(e.id),id:e.id})));function y(e){var t;let n=[];return null==e||null===(t=e.building)||void 0===t||t.floors.map(e=>{var t,l,i,o,r,a,u,c;n.push({Floor:(null==e?void 0:e.floorName)||E("BPA_FLOOR_NAME_"+e.number),Level:(null==e?void 0:e.number)||(null==e?void 0:e.floorNo),Occupancy:E(""+("BPA-PAP"===(null==m?void 0:m.businessService)?"Residential":null===(t=e.occupancies)||void 0===t||null===(l=t[0])||void 0===l?void 0:l.type))||"NA",BuildupArea:(null==e||null===(i=e.occupancies)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.builtUpArea)||(null==e?void 0:e.builtUpArea),FloorArea:(null==e||null===(r=e.occupancies)||void 0===r||null===(a=r[0])||void 0===a?void 0:a.floorArea)||(null==e?void 0:e.builtUpArea),CarpetArea:(null==e||null===(u=e.occupancies)||void 0===u||null===(c=u[0])||void 0===c?void 0:c.carpetArea)||0,key:(null==e?void 0:e.floorName)||E("BPA_FLOOR_NAME_"+e.number)})}),n}function b(e){var t;let n=null==m||null===(t=m.landInfo)||void 0===t?void 0:t.unit,l="";if((null==n?void 0:n.length)>0){var i,o;let t=null===(i=n[e])||void 0===i||null===(o=i.usageCategory)||void 0===o?void 0:o.split(",");null!=t&&t.length&&(l=t.map(e=>e?""+E("BPA_SUBOCCUPANCYTYPE_"+function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),""==t)return e;for(;e.includes(t);)e=e.replace(t,n);return e}(null==e?void 0:e.toUpperCase(),"-","_")):"NA").join(", "))}return l||"NA"}return i.createElement(l.Fragment,null,i.createElement("div",{style:{background:"#FAFAFA",border:"1px solid #D6D5D4",padding:"8px",borderRadius:"4px",maxWidth:"950px",minWidth:"280px"}},i.createElement(c.StatusTable,null,null==f||null===(t=f.values)||void 0===t?void 0:t.map((e,t)=>null!=e&&e.isHeader?i.createElement(c.CardSubHeader,{style:{fontSize:"20px",paddingBottom:"10px"}},E(null==e?void 0:e.title)):i.createElement(c.Row,{className:"border-none",labelStyle:{width:"100%",fontSize:"20px"},key:""+e.title,label:""+E(""+e.title),text:null!=e&&e.value?null==e?void 0:e.value:""}))),null==f||null===(n=f.subOccupancyTableDetails)||void 0===n||null===(r=n[0])||void 0===r||null===(a=r.value)||void 0===a||null===(u=a.planDetail)||void 0===u?void 0:u.blocks.map((e,t)=>{var n,l,o,r,a;return i.createElement("div",{key:t,style:(null==f||null===(n=f.subOccupancyTableDetails)||void 0===n||null===(l=n[0])||void 0===l||null===(o=l.value)||void 0===o||null===(r=o.planDetail)||void 0===r||null===(a=r.blocks)||void 0===a?void 0:a.length)>0?{marginBottom:"30px",background:"#FAFAFA",border:"1px solid #D6D5D4",padding:"8px",borderRadius:"4px",maxWidth:"950px",minWidth:"280px"}:{marginBottom:"30px"}},i.createElement(c.CardSubHeader,{style:{marginBottom:"8px",paddingBottom:"9px",color:"#0B0C0C",fontSize:"18px",lineHeight:"19px"}},E("BPA_BLOCK_SUBHEADER")," ",t+1),i.createElement(c.StatusTable,null,i.createElement(c.Row,{className:"border-none",textStyle:{wordBreak:"break-word"},label:""+E("BPA_SUB_OCCUPANCY_LABEL"),text:b(t)})),i.createElement("div",{style:window.location.href.includes("citizen")||_?{overflow:"scroll"}:{maxWidth:"950px",maxHeight:"280px"}},i.createElement(c.Table,{className:"customTable table-fixed-first-column table-border-style",t:E,disableSort:!1,autoSort:!0,manualPagination:!1,isPaginationRequired:!1,initSortId:"S N ",data:y(e),columns:S,getCellProps:e=>({style:{}})})))}),null==f||null===(s=f.subOccupancyTableDetails)||void 0===s||null===(d=s[0])||void 0===d||null===(v=d.value)||void 0===v||null===(p=v.drawingDetail)||void 0===p?void 0:p.blocks.map((e,t)=>{var n,l,o,r,a;return i.createElement("div",{key:t,style:(null==f||null===(n=f.subOccupancyTableDetails)||void 0===n||null===(l=n[0])||void 0===l||null===(o=l.value)||void 0===o||null===(r=o.drawingDetail)||void 0===r||null===(a=r.blocks)||void 0===a?void 0:a.length)>0?{marginBottom:"30px",background:"#FAFAFA",border:"1px solid #D6D5D4",padding:"8px",borderRadius:"4px",maxWidth:"950px",minWidth:"280px"}:{marginBottom:"30px"}},i.createElement(c.CardSubHeader,{style:{marginBottom:"8px",paddingBottom:"9px",color:"#0B0C0C",fontSize:"18px",lineHeight:"19px"}},E("BPA_BLOCK_SUBHEADER")," ",t+1),i.createElement(c.StatusTable,null,i.createElement(c.Row,{className:"border-none",textStyle:{wordBreak:"break-word"},label:""+E("BPA_SUB_OCCUPANCY_LABEL"),text:b(t)})),i.createElement("div",{style:window.location.href.includes("citizen")||_?{overflow:"scroll"}:{maxWidth:"950px",maxHeight:"280px"}},i.createElement(c.Table,{className:"customTable table-fixed-first-column table-border-style",t:E,disableSort:!1,autoSort:!0,manualPagination:!1,isPaginationRequired:!1,initSortId:"S N ",data:y(e),columns:S,getCellProps:e=>({style:{}})})))})))},li=e=>{let{headComment:t,otherComment:n}=e;return i.createElement("div",{className:"checkpoint-comments-wrap"},i.createElement("h4",null,t),i.createElement("p",null,n))},ii=e=>{var t,n,l;let{data:r,OpenImage:a,privacy:u={}}=e;const{t:s}=o.useTranslation();return i.createElement("div",null,r.date&&i.createElement("p",null,r.date),i.createElement("p",null,r.name),r.mobileNumber&&i.createElement("span",{style:{display:"inline-flex",width:"fit-content",marginLeft:"10px"}},i.createElement(c.TelePhone,{mobile:r.mobileNumber,privacy:u}),i.createElement("p",null,"    ")),r.source&&i.createElement("p",null,s("ES_APPLICATION_DETAILS_APPLICATION_CHANNEL_"+r.source.toUpperCase())),r.comment&&i.createElement(li,{otherComment:null==r?void 0:r.otherComment,headComment:null==r?void 0:r.comment}),null!=r&&r.wfComment?i.createElement("div",null,null==r||null===(t=r.wfComment)||void 0===t?void 0:t.map(e=>i.createElement("div",{className:"TLComments"},i.createElement("h3",null,s("WF_COMMON_COMMENTS")),i.createElement("p",{style:{overflowX:"scroll"}},e)))):null,(null==r||null===(n=r.thumbnailsToShow)||void 0===n||null===(l=n.thumbs)||void 0===l?void 0:l.length)>0?i.createElement("div",{className:"TLComments"},i.createElement("h3",null,s("CS_COMMON_ATTACHMENTS")),i.createElement(c.DisplayPhotos,{srcs:null==r?void 0:r.thumbnailsToShow.thumbs,onClick:(e,t)=>{a(e,t,null==r?void 0:r.thumbnailsToShow)}})):null)};function oi(e){let{units:t}=e;const{t:n}=o.useTranslation();return i.createElement(i.Fragment,null,t.map((e,t)=>{var l;return i.createElement("div",{key:n(null==e?void 0:e.title),style:{marginTop:"19px",background:"#FAFAFA",border:"1px solid #D6D5D4",borderRadius:"4px",padding:"8px",lineHeight:"19px",maxWidth:"600px",minWidth:"280px"}},i.createElement(c.CardSubHeader,{style:{marginBottom:"8px",paddingBottom:"9px",color:"#0B0C0C",fontSize:"16px",lineHeight:"19px"}},n(null==e?void 0:e.title)+" "+(t+1)),i.createElement(i.Fragment,{key:t},i.createElement(c.StatusTable,{style:{position:"relative",marginTop:"19px"}},i.createElement("div",{style:{position:"absolute",maxWidth:"640px",top:0,left:0,bottom:0,right:0,width:"auto"}}),null==e||null===(l=e.values)||void 0===l?void 0:l.map((e,t)=>{var l;return i.createElement(c.Row,!0===e.map&&"N/A"!==e.value?{key:n(e.title),label:n(e.title),text:i.createElement("img",{src:n(e.value),alt:""})}:{key:n(e.title),label:n(e.title)+":",text:n(e.value)||"N/A",last:t===(null==e||null===(l=e.values)||void 0===l?void 0:l.length)-1,caption:e.caption,className:"border-none",rowContainerStyle:{justifyContent:"space-between",fontSize:"16px",lineHeight:"19px",color:"#0B0C0C"}})}))))}))}function ri(e){let{units:t}=e;const{t:n}=o.useTranslation();return i.createElement(i.Fragment,null,t.map((e,t)=>{var l;return i.createElement("div",{key:n(null==e?void 0:e.title),style:{marginTop:"19px",background:"#FAFAFA",border:"1px solid #D6D5D4",borderRadius:"4px",padding:"8px",lineHeight:"19px",maxWidth:"600px",minWidth:"280px"}},i.createElement(c.CardSubHeader,{style:{marginBottom:"9px",paddingBottom:"9px",color:"#0B0C0C",fontSize:"16px",lineHeight:"19px"}},n(null==e?void 0:e.title)+" "+(t+1)),i.createElement(i.Fragment,{key:t},i.createElement(c.StatusTable,{style:{position:"relative",marginTop:"19px"}},i.createElement("div",{style:{position:"absolute",maxWidth:"640px",top:0,left:0,bottom:0,right:0,width:"auto"}}),null==e||null===(l=e.values)||void 0===l?void 0:l.map((e,t)=>{var l;return i.createElement(c.Row,!0===e.map&&"N/A"!==e.value?{key:n(e.title),label:n(e.title),text:i.createElement("img",{src:n(e.value),alt:""})}:{key:n(e.title),label:n(e.title)+":",text:n(e.value)||"NA",last:t===(null==e||null===(l=e.values)||void 0===l?void 0:l.length)-1,caption:e.caption,className:"border-none",rowContainerStyle:{justifyContent:"space-between",fontSize:"16px",lineHeight:"19px",color:"#0B0C0C"}})}))))}))}const ai=e=>{var t,n,r,a;let{wsAdditionalDetails:u}=e;const{t:s}=o.useTranslation();let d=(v=location.search)?(/^[?#]/.test(v)?v.slice(1):v).split("&").reduce((e,t)=>{let[n,l]=t.split("=");return e[n]=l?decodeURIComponent(l.replace(/\+/g," ")):"",e},{}):{};var v;const p=null==d?void 0:d.mode;var{connectionDetails:f,plumberDetails:m,roadCuttingDetails:E,activationDetails:_}=(null==u?void 0:u.additionalDetails)||{connectionDetails:[],plumberDetails:[]};return i.createElement(l.Fragment,null,i.createElement("div",{style:{lineHeight:"19px",maxWidth:"950px",minWidth:"280px"}},(null==u||null===(t=u.additionalDetails)||void 0===t?void 0:t.connectionDetails)&&i.createElement(c.StatusTable,null,i.createElement(c.CardSubHeader,{style:{fontSize:"24px",marginBottom:"16px",marginTop:"32px"}},s("WS_COMMON_CONNECTION_DETAIL")),i.createElement("div",null,i.createElement("div",{className:"connection-details-new-value-wrapper"},null==f?void 0:f.map((e,t)=>i.createElement("div",null,i.createElement(c.Row,{className:"border-none",key:""+e.title,label:""+s(""+e.title),text:null!=e&&e.oldValue?null==e?void 0:e.oldValue:null!=e&&e.value?null==e?void 0:e.value:""})))))),(null==u||null===(n=u.additionalDetails)||void 0===n?void 0:n.plumberDetails)&&"MODIFY"!=p&&i.createElement(c.StatusTable,null,i.createElement(c.CardSubHeader,{style:{fontSize:"24px",marginBottom:"16px",marginTop:"32px"}},s("WS_COMMON_PLUMBER_DETAILS")),i.createElement("div",null,i.createElement("div",{className:"plumber-details-new-value-wrapper"},null==m?void 0:m.map((e,t)=>i.createElement(c.Row,{className:"border-none",key:""+e.title,label:""+s(""+e.title),text:null!=e&&e.oldValue?null==e?void 0:e.oldValue:null!=e&&e.value?null==e?void 0:e.value:"",privacy:e.privacy}))))),(null==u||null===(r=u.additionalDetails)||void 0===r?void 0:r.roadCuttingDetails)&&"MODIFY"!=p&&i.createElement(c.StatusTable,null,i.createElement(c.CardSubHeader,{style:{fontSize:"24px",marginBottom:"16px",marginTop:"32px"}},s("WS_ROAD_CUTTING_DETAILS")),i.createElement("div",null,i.createElement("div",{className:"plumber-details-new-value-wrapper"},null==E?void 0:E.map(e=>{var t;return i.createElement("div",{style:(null==E?void 0:E.length)>1?{border:"1px solid #D6D5D4",background:"#FAFAFA",borderRadius:"4px",padding:"10px 10px 0px 10px",margin:"5px 0px"}:{}},null==e||null===(t=e.values)||void 0===t?void 0:t.map(e=>i.createElement(c.Row,{className:"border-none",key:""+e.title,label:""+s(""+e.title),text:null!=e&&e.oldValue?null==e?void 0:e.oldValue:null!=e&&e.value?null==e?void 0:e.value:""})))})))),(null==u||null===(a=u.additionalDetails)||void 0===a?void 0:a.activationDetails)&&i.createElement(c.StatusTable,null,i.createElement(c.CardSubHeader,{style:{fontSize:"24px",marginBottom:"16px",marginTop:"32px"}},s("WS_ACTIVATION_DETAILS")),i.createElement("div",null,i.createElement("div",{className:"plumber-details-new-value-wrapper"},null==_?void 0:_.map((e,t)=>i.createElement(c.Row,{className:"border-none",key:""+e.title,label:""+s(""+e.title),text:null!=e&&e.oldValue?null==e?void 0:e.oldValue:null!=e&&e.value?null==e?void 0:e.value:""})))))))},ui=[{title:"PT_PENDING_DUES_FROM_EARLIER",value:"Pending dues from earlier"},{title:"PT_MISCALCULATION_OF_EARLIER_ASSESSMENT",value:"Miscalculation of earlier Assessment"},{title:"PT_ONE_TIME_PENALITY",value:"One time penality"},{title:"PT_OTHERS",value:"Others"}],ci=[{title:"PT_ADVANCED_PAID_BY_CITIZEN_EARLIER",value:"Advanced Paid By Citizen Earlier"},{title:"PT_REBATE_PROVIDED_BY_COMMISSIONER_EO",value:"Rebate provided by commissioner/EO"},{title:"PT_ADDITIONAL_AMOUNT_CHARGED_FROM_THE_CITIZEN",value:"Additional amount charged from the citizen"},{title:"PT_OTHERS",value:"Others"}],si=e=>{var t,n,r,a;let{wsAdditionalDetails:u}=e;const{t:d}=o.useTranslation(),[v,p,f]=Digit.Hooks.useSessionStorage("ADHOC_ADD_REBATE_DATA",{}),[m,E,g]=Digit.Hooks.useSessionStorage("ADHOC_BILL_ADD_REBATE_DATA",{}),h=!(null==u||null===(t=u.additionalDetails)||void 0===t||!t.isPaid),[S,y]=l.useState(!1),[b,T]=l.useState(v||{}),[C,A]=l.useState(null),[D,N]=l.useState(u.additionalDetails.data?u.additionalDetails.data:{}),[I,w]=l.useState(u.additionalDetails.values?u.additionalDetails.values:[]),O=Digit.ULBService.getStateId();Digit.Hooks.ws.useMDMS(O,"BillingService",["TaxHeadMaster"]),l.useEffect(()=>{var e,t,n;const l=s({},null==u||null===(e=u.additionalDetails)||void 0===e||null===(t=e.appDetails)||void 0===t?void 0:t.additionalDetails);if((null==v||null===(n=v.billDetails)||void 0===n?void 0:n.length)>0){var o,r,a,c,d,f,m;const e=[{title:"WS_APPLICATION_FEE_HEADER",value:i.createElement("span",null,"₹",null==v||null===(o=v.billDetails)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.fee)},{title:"WS_SERVICE_FEE_HEADER",value:i.createElement("span",null,"₹",null==v||null===(a=v.billDetails)||void 0===a||null===(c=a[0])||void 0===c?void 0:c.charge)},{title:"WS_TAX_HEADER",value:i.createElement("span",null,"₹",null==v||null===(d=v.billDetails)||void 0===d||null===(f=d[0])||void 0===f?void 0:f.taxAmount)}];w(e),N(null==v||null===(m=v.billDetails)||void 0===m?void 0:m[0])}else p(l),T(l)},[]);let x={};const R=e=>i.createElement("h1",{className:"heading-m"},e.label),L=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),P=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(L,null)),k=function(e,t,n){void 0===t&&(t=!1);let l=s({},b);if("adhocPenalty"!=e&&"adhocRebate"!=e||!n.target.value)t?(l[e+"_data"]=n,l[e]=n.title,"PT_OTHERS"==n.title&&"adhocPenaltyReason"==e&&(l.adhocPenaltyComment=""),"PT_OTHERS"==n.title&&"adhocRebateReason"==e&&(l.adhocRebateComment="")):l[e]=n.target.value;else{var i,o;const t=0==(null==n||null===(i=n.target)||void 0===i?void 0:i.value)?1:Math.sign(null==n||null===(o=n.target)||void 0===o?void 0:o.value)||-1;l[e]=1==t?n.target.value:""}T(l)};return i.createElement(l.Fragment,null,i.createElement("div",{style:{lineHeight:"19px",maxWidth:"950px",minWidth:"280px"}},I&&i.createElement(c.StatusTable,null,i.createElement("div",null,null==I?void 0:I.map((e,t)=>i.createElement(c.Row,{className:"border-none",key:""+e.title,label:""+d(""+e.title),text:null!=e&&e.value?null==e?void 0:e.value:""}))),i.createElement("hr",{style:{border:"1px solid #D6D5D4",color:"#D6D5D4",margin:"16px 0px"}}),i.createElement("div",null,i.createElement(c.Row,{className:"border-none",key:"WS_COMMON_TOTAL_AMT",label:""+d("WS_COMMON_TOTAL_AMT"),text:i.createElement("span",null,"₹",(null==D?void 0:D.totalAmount)||0),textStyle:{fontSize:"24px",fontWeight:"700"}}),i.createElement(c.Row,{className:"border-none",key:"CS_INBOX_STATUS_FILTER",label:""+d("CS_INBOX_STATUS_FILTER"),text:d(h?"WS_COMMON_PAID_LABEL":"WS_COMMON_NOT_PAID"),textStyle:h?{color:"#00703C"}:{color:"#D4351C"}}))),null!=u&&null!==(n=u.additionalDetails)&&void 0!==n&&n.isAdhocRebate?i.createElement("div",{onClick:e=>{y(!0)}},i.createElement("span",{style:{cursor:"pointer",color:"#a82227"}},d("WS_PAYMENT_ADD_REBATE_PENALTY"))):null,S&&i.createElement(c.Modal,{headerBarMain:i.createElement(R,{label:d("PT_ADD_REBATE_PENALITY")}),headerBarEnd:i.createElement(P,{onClick:()=>{T(v),y(!1)}}),actionCancelLabel:d("PT_CANCEL"),actionCancelOnSubmit:()=>{T(v),y(!1)},actionSaveLabel:d("PT_ADD"),actionSaveOnSubmit:e=>(e=>{const t=null!=b&&b.adhocPenalty?Number(null==b?void 0:b.adhocPenalty):0,n=null!=b&&b.adhocRebate?Number(null==b?void 0:b.adhocRebate):0;var l,i;if(t||n)if(n>(null==u||null===(l=u.additionalDetails)||void 0===l||null===(i=l.data)||void 0===i?void 0:i.totalAmount))A({isError:!1,isWarning:!0,key:"error",message:d("ERR_WS_REBATE_GREATER_THAN_AMOUNT")});else{var o,r,a,c,v,f,m,g,h,S;const e=null==u||null===(o=u.additionalDetails)||void 0===o||null===(r=o.appDetails)||void 0===r?void 0:r.applicationNo,t=null==u||null===(a=u.additionalDetails)||void 0===a||null===(c=a.appDetails)||void 0===c?void 0:c.tenantId,n=s({},null==u||null===(v=u.additionalDetails)||void 0===v||null===(f=v.appDetails)||void 0===f?void 0:f.additionalDetails,b);u.additionalDetails.appDetails.additionalDetails=n;const l={CalculationCriteria:"WATER"==(null==u||null===(m=u.additionalDetails)||void 0===m||null===(g=m.appDetails)||void 0===g?void 0:g.service)?[{applicationNo:e,tenantId:t,waterConnection:u.additionalDetails.appDetails}]:[{applicationNo:e,tenantId:t,sewerageConnection:u.additionalDetails.appDetails}],isconnectionCalculation:!1};let i="WATER"==(null==u||null===(h=u.additionalDetails)||void 0===h||null===(S=h.appDetails)||void 0===S?void 0:S.service)?"WS":"SW";Digit.WSService.wsCalculationEstimate(l,i).then((e,t)=>{var n,l,i,o,r,a,u,c,s,d,v,f,m,g,h;(null==e||null===(n=e.Calculation)||void 0===n||null===(l=n[0])||void 0===l||null===(i=l.taxHeadEstimates)||void 0===i?void 0:i.length)>0&&(null==e||null===(m=e.Calculation)||void 0===m||null===(g=m[0])||void 0===g||null===(h=g.taxHeadEstimates)||void 0===h||h.forEach(e=>e.amount=e.estimateAmount)),e.Calculation[0].billSlabData=_.groupBy(null==e||null===(o=e.Calculation)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.taxHeadEstimates,"category");const S=[{title:"WS_APPLICATION_FEE_HEADER",value:null===(a=e.Calculation)||void 0===a||null===(u=a[0])||void 0===u?void 0:u.fee},{title:"WS_SERVICE_FEE_HEADER",value:null===(c=e.Calculation)||void 0===c||null===(s=c[0])||void 0===s?void 0:s.charge},{title:"WS_TAX_HEADER",value:null===(d=e.Calculation)||void 0===d||null===(v=d[0])||void 0===v?void 0:v.taxAmount}];E(vl(e.Calculation[0])),N(null==e||null===(f=e.Calculation)||void 0===f?void 0:f[0]),w(S),b.billDetails=null==e?void 0:e.Calculation,p(b),y(!1)}).catch(e=>{var t,n,l,i,o,r;A({isError:!0,isWarning:!1,key:"error",message:null!=e&&null!==(t=e.response)&&void 0!==t&&null!==(n=t.data)&&void 0!==n&&null!==(l=n.Errors[0])&&void 0!==l&&l.message?d(""+(null==e||null===(i=e.response)||void 0===i||null===(o=i.data)||void 0===o||null===(r=o.Errors[0])||void 0===r?void 0:r.code)):d("PT_COMMON_ADD_REBATE_PENALITY")})})}else A({isError:!1,isWarning:!0,key:"warning",message:d("ERR_WS_ENTER_ATLEAST_ONE_FIELD")})})(),hideSubmit:!1,popupStyles:{overflowY:"auto"}},i.createElement("div",null,i.createElement(c.Card,{style:{padding:"10px 10px 1px 10px",margin:"0px 0px 15px 0px"}},i.createElement(c.CardSectionHeader,{style:{fontSize:"16px",fontWeight:"700",lineHeight:"18px",padding:"0px",margin:"0px 0px 10px 0px"}},d("PT_AD_PENALTY")),i.createElement(c.CardLabel,null,d("PT_TX_HEADS")),i.createElement("div",{className:"field"},i.createElement(c.Dropdown,{isMandatory:!0,option:ui,optionKey:"title",select:e=>k("adhocPenaltyReason",!0,e),selected:(null==b?void 0:b.adhocPenaltyReason_data)||"",isPropertyAssess:!0,name:"adhocPenaltyReason_data",t:d})),"PT_OTHERS"===(null==b||null===(r=b.adhocPenaltyReason_data)||void 0===r?void 0:r.title)&&i.createElement("div",{className:"field"},i.createElement(c.CardLabel,null,d("PT_REASON")),i.createElement("div",{className:"field"},i.createElement(c.TextInput,s({style:{background:"#FAFAFA"},t:d,type:"text",isMandatory:!1,name:"adhocPenaltyComment",value:(null==b?void 0:b.adhocPenaltyComment)||"",onChange:e=>k("adhocPenaltyComment",!1,e)},x={isRequired:!0,pattern:"^[a-zA-Z ]*$",type:"text",title:d("TL_NAME_ERROR_MESSAGE")})))),i.createElement(c.CardLabel,null,d("PT_HEAD_AMT")),i.createElement("div",{className:"field"},i.createElement(c.TextInput,s({style:{background:"#FAFAFA"},t:d,type:"number",isMandatory:!1,name:"adhocPenalty",value:(null==b?void 0:b.adhocPenalty)||"",onChange:e=>k("adhocPenalty",!1,e)},x={isRequired:!0,pattern:"^[1-9]+[0-9]*$",title:d("ERR_DEFAULT_INPUT_FIELD_MSG")})))),i.createElement(c.Card,{style:{padding:"10px 10px 1px 10px",margin:"0px 0px 15px 0px"}},i.createElement(c.CardSectionHeader,{style:{fontSize:"16px",fontWeight:"700",lineHeight:"18px",padding:"0px",margin:"0px 0px 10px 0px"}},d("PT_AD_REBATE")),i.createElement(c.CardLabel,null,d("PT_TX_HEADS")),i.createElement("div",{className:"field"},i.createElement(c.Dropdown,{isMandatory:!0,option:ci,optionKey:"title",select:e=>k("adhocRebateReason",!0,e),selected:(null==b?void 0:b.adhocRebateReason_data)||"",name:"adhocRebateReason_data",isPropertyAssess:!0,t:d})),"PT_OTHERS"===(null==b||null===(a=b.adhocRebateReason_data)||void 0===a?void 0:a.title)&&i.createElement("div",{className:"field"},i.createElement(c.CardLabel,null,d("PT_REASON")),i.createElement(c.TextInput,s({style:{background:"#FAFAFA"},t:d,type:"text",isMandatory:!1,name:"adhocRebateComment",value:(null==b?void 0:b.adhocRebateComment)||"",onChange:e=>k("adhocRebateComment",!1,e)},x={isRequired:!0,pattern:"^[a-zA-Z ]*$",type:"text",title:d("TL_NAME_ERROR_MESSAGE")}))),i.createElement(c.CardLabel,null,d("PT_HEAD_AMT")),i.createElement("div",{className:"field"},i.createElement(c.TextInput,s({style:{background:"#FAFAFA"},t:d,type:"number",isMandatory:!1,name:"adhocRebate",value:(null==b?void 0:b.adhocRebate)||"",onChange:e=>k("adhocRebate",!1,e)},x={isRequired:!0,pattern:"^[1-9]+[0-9]*$",title:d("ERR_DEFAULT_INPUT_FIELD_MSG")})))))," "),C&&i.createElement(c.Toast,{style:{zIndex:"10000"},warning:null==C?void 0:C.isWarning,error:null==C||!C.isWarning,label:d(null==C?void 0:C.message),onClose:()=>{A(!1)},isDleteBtn:!0})))},di=e=>{let{style:t}=e;return i.createElement("span",null,i.createElement("svg",{style:s({},t),display:"inline",width:"22",height:"16",viewBox:"0 0 22 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{d:"M11 0.5C6 0.5 1.73 3.61 0 8C1.73 12.39 6 15.5 11 15.5C16 15.5 20.27 12.39 22 8C20.27 3.61 16 0.5 11 0.5ZM11 13C8.24 13 6 10.76 6 8C6 5.24 8.24 3 11 3C13.76 3 16 5.24 16 8C16 10.76 13.76 13 11 13ZM11 5C9.34 5 8 6.34 8 8C8 9.66 9.34 11 11 11C12.66 11 14 9.66 14 8C14 6.34 12.66 5 11 5Z",fill:"#a82227"})))},vi=e=>{let{t:t,userType:n=!1,infoBannerLabel:l="",infoClickLable:o="",infoClickInfoLabel:r="",infoClickInfoLabel1:a=""}=e;n=n||Digit.SessionStorage.get("userType");const u=window.Digit.Utils.browser.isMobile();return i.createElement(i.Fragment,null,i.createElement("div",{style:u?{}:{width:"80%"}},i.createElement("div",{className:"info-banner-wrap",style:{color:"#3498DB",margin:"0px"}},i.createElement("div",null,i.createElement(c.InfoBannerIcon,null),i.createElement("h2",{style:{color:"#3498DB"}},t(l))),t(o)+" ",i.createElement(di,{style:{display:"inline",marginBottom:"5px"}})," "+t(r),i.createElement("div",null," "+t(a)))))},pi=e=>{var t,n,r,a,u,s,d;let{wsAdditionalDetails:v}=e;const{t:p}=o.useTranslation(),[f,m]=l.useState(!1),[E,_]=l.useState({}),g=e=>i.createElement("h1",{className:"heading-m"},e.label),h=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),S=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(h,null));return i.createElement(l.Fragment,null,i.createElement("div",{style:{lineHeight:"19px",maxWidth:"950px",minWidth:"280px"}},null!=v&&null!==(t=v.additionalDetails)&&void 0!==t&&t.isViewBreakup?i.createElement("div",{onClick:e=>(()=>{var e;let t=v.additionalDetails.data||{};const n=sessionStorage.getItem("Digit.ADHOC_BILL_ADD_REBATE_DATA"),l=n?JSON.parse(n):{};null!=l&&null!==(e=l.value)&&void 0!==e&&e.totalAmount&&(t=null==l?void 0:l.value),_(t),m(!0)})(),style:{marginTop:"12px"}},i.createElement("span",{style:{cursor:"pointer",color:"#a82227"}},p("WS_PAYMENT_VIEW_BREAKUP"))):null,f&&i.createElement(c.Modal,{headerBarMain:i.createElement(g,{label:p("WS_CALCULATION_BREAKUP")}),headerBarEnd:i.createElement(S,{onClick:()=>{m(!1)}}),hideSubmit:!0,popupStyles:{overflowY:"auto"},headerBarMainStyle:{marginBottom:"0px"},popupModuleMianStyles:{paddingTop:"0px"}},i.createElement(c.StatusTable,{style:{padding:"10px",paddingTop:"0px"}},i.createElement(c.CardSectionHeader,{style:{margin:"10px 0px"}},p("WS_APPLICATION_FEE_HEADER")),null==E||null===(n=E.billSlabData)||void 0===n||null===(r=n.FEE)||void 0===r?void 0:r.map(e=>i.createElement(c.Row,{className:"border-none",rowContainerStyle:{margin:"0px"},labelStyle:{width:"50%"},key:""+(null==e?void 0:e.taxHeadCode),label:""+p(""+(null==e?void 0:e.taxHeadCode)),text:i.createElement("span",null,"₹",Number(null==e?void 0:e.amount)||0),textStyle:{textAlign:"right"}})),i.createElement("hr",{style:{color:"#cccccc",backgroundColor:"#cccccc",marginBottom:"10px"}}),i.createElement(c.Row,{className:"border-none",rowContainerStyle:{margin:"0px"},labelStyle:{width:"50%"},key:"PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT1",label:""+p("PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT"),text:i.createElement("span",null,"₹",Number(null==E?void 0:E.fee)||0),textStyle:{textAlign:"right",fontWeight:"700",fontSize:"24px"}}),i.createElement(c.CardSectionHeader,{style:{margin:"10px 0px"}},p("WS_SERVICE_FEE_HEADER")),null==E||null===(a=E.billSlabData)||void 0===a||null===(u=a.CHARGES)||void 0===u?void 0:u.map(e=>i.createElement(c.Row,{className:"border-none",rowContainerStyle:{margin:"0px"},labelStyle:{width:"50%"},key:""+(null==e?void 0:e.taxHeadCode),label:""+p(""+(null==e?void 0:e.taxHeadCode)),text:i.createElement("span",null,"₹",Number(null==e?void 0:e.amount)||0),textStyle:{textAlign:"right"}})),i.createElement("hr",{style:{color:"#cccccc",backgroundColor:"#cccccc",marginBottom:"10px"}}),i.createElement(c.Row,{className:"border-none",rowContainerStyle:{margin:"0px"},labelStyle:{width:"50%"},key:"PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT2",label:""+p("PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT"),text:i.createElement("span",null,"₹",Number(null==E?void 0:E.charge)||0),textStyle:{textAlign:"right",fontWeight:"700",fontSize:"24px"}}),null==E||null===(s=E.billSlabData)||void 0===s||null===(d=s.TAX)||void 0===d?void 0:d.map(e=>i.createElement(c.Row,{className:"border-none",rowContainerStyle:{margin:"0px"},labelStyle:{width:"50%"},key:""+(null==e?void 0:e.taxHeadCode),label:""+p(""+(null==e?void 0:e.taxHeadCode)),text:i.createElement("span",null,"₹",Number(null==e?void 0:e.amount)||0),textStyle:{textAlign:"right"}})),i.createElement("hr",{style:{color:"#cccccc",backgroundColor:"#cccccc",marginBottom:"10px"}}),i.createElement(c.Row,{className:"border-none",rowContainerStyle:{margin:"0px"},labelStyle:{width:"50%"},key:"PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT3",label:""+p("PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT"),text:i.createElement("span",null,"₹",Number(null==E?void 0:E.totalAmount)||0),textStyle:{textAlign:"right",fontWeight:"700",fontSize:"24px"}})))))},fi={root:{width:"100%",marginTop:"2px",overflowX:"auto",boxShadow:"none"},table:{minWidth:700,backgroundColor:"rgba(250, 250, 250, var(--bg-opacity))"},cell:{maxWidth:"7em",minWidth:"1em",border:"1px solid #e8e7e6",padding:"4px 5px",fontSize:"0.8em",textAlign:"left",lineHeight:"1.5em"},cellHeader:{overflow:"hidden",textOverflow:"ellipsis"},cellLeft:{},cellRight:{}},mi=e=>{let{className:t="table",headers:n=[],values:l=[],arrears:r=0}=e;const{t:a}=o.useTranslation();return i.createElement(i.Fragment,null,i.createElement("div",{style:fi.root},i.createElement("table",{className:"table-fixed-column-common-pay",style:fi.table},i.createElement("thead",null,i.createElement("tr",null,i.createElement("th",{style:s({},fi.cell,fi.cellLeft,fi.cellHeader)},a("CS_BILL_PERIOD")),n.map((e,t)=>i.createElement("th",{style:s({},fi.cell,n.length==t+1?fi.cellRight:{},fi.cellHeader),key:t},a(e))))),i.createElement("tbody",null,Object.values(l).map((e,t)=>i.createElement("tr",{key:t},i.createElement("td",{style:s({},fi.cell,fi.cellLeft),component:"th",scope:"row"},Object.keys(l)[t]),n.map((t,l)=>i.createElement("td",{style:s({},fi.cell,{textAlign:"left"},n.length==l+1?fi.cellRight:{},{whiteSpace:"pre"}),key:l,numeric:!0},l>1&&"₹",e[t]&&e[t].value||"0")))),i.createElement("tr",null,i.createElement("td",{style:s({},fi.cell,fi.cellLeft)}),n.map((e,t)=>t==n.length-1?i.createElement("td",{style:s({},fi.cell,fi.cellRight,{textAlign:"left",fontWeight:"700",whiteSpace:"pre"}),key:t,numeric:!0},r):t==n.length-2?i.createElement("td",{style:s({},fi.cell,{textAlign:"left"}),key:t,numeric:!0},a("COMMON_ARREARS_TOTAL")):i.createElement("td",{style:fi.cell,key:t,numeric:!0})))))))},Ei={buttonStyle:{display:"flex",justifyContent:"flex-end",color:"#a82227"},headerStyle:{marginTop:"10px",fontSize:"16px",fontWeight:"700",lineHeight:"24px",color:" rgba(11, 12, 12, var(--text-opacity))"}},_i=e=>{var t,n,r;let{bill:a={}}=e;const{t:u}=o.useTranslation();let c={},s=(null==a||null===(t=a.billDetails)||void 0===t?void 0:t.sort((e,t)=>t.fromPeriod-e.fromPeriod))||[];s=[...s];const d=(null===(n=s)||void 0===n?void 0:n.reduce((e,t,n)=>0===n?e:e+t.amount,0))||0;let v="₹ "+((null==d||null===(r=d.toFixed)||void 0===r?void 0:r.call(d,0))||Number(0).toFixed(0));s.shift(),s.map(e=>{let t=function(e){var t,n,l;void 0===e&&(e={});let i={};const{billAccountDetails:o=[]}=e;return o.map(e=>{i[e.taxHeadCode]={value:e.amount,order:e.order}}),i.CS_BILL_NO={value:(null===(t=e)||void 0===t?void 0:t.billNumber)||"NA",order:-2},i.CS_BILL_DUEDATE={value:(null===(n=e)||void 0===n?void 0:n.expiryDate)&&new Date(null===(l=e)||void 0===l?void 0:l.expiryDate).toLocaleDateString()||"NA",order:-1},i.TL_COMMON_TOTAL_AMT={value:e.amount,order:10},i}(e);c[((e,t)=>{const n=new Date(e),l=new Date(t);return l.getYear()-n.getYear()!=0?"FY"+(n.getYear()+1900)+"-"+(l.getYear()-100):n.toLocaleDateString()+"-"+l.toLocaleDateString()})(e.fromPeriod,e.toPeriod)]=t});let p={};!c||Object.keys(c).map((e,t)=>{Object.keys(c[e]).map(t=>{p[t]=c[e]&&c[e][t]&&c[e][t].order||0})});let f=[];f=Object.keys(p),f.sort((e,t)=>p[e]-p[t]);const[m,E]=l.useState(!1);return 0==d||d<0?i.createElement("span",null):i.createElement(i.Fragment,null,i.createElement("div",{style:Ei.headerStyle},u("CS_ARREARS_DETAILS")),m&&i.createElement(mi,{headers:[...f],values:c,arrears:v}),!m&&i.createElement("div",{style:Ei.buttonStyle},i.createElement("button",{type:"button",onClick:()=>{E(!0)}},u("CS_SHOW_CARD"))),m&&i.createElement("div",{style:Ei.buttonStyle},i.createElement("button",{type:"button",onClick:()=>{E(!1)}},u("CS_HIDE_CARD"))))},gi=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),hi=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(gi,null)),Si=e=>{let{t:n,closeModal:l}=e;console.log(" ----- Renew POP coming "),Digit.Hooks.sv.useCreateDemand();const o=r.useHistory();return i.createElement(i.Fragment,null,i.createElement(t.Modal,{headerBarMain:i.createElement(e=>i.createElement("h1",{className:"heading-m"},e.label),{label:"SV_WANT_TO_EDIT"}),headerBarEnd:i.createElement(hi,{onClick:l}),actionCancelLabel:n("CS_COMMON_BACK"),actionCancelOnSubmit:l,hideSubmit:!0,formId:"modal-action"},i.createElement(t.Card,{style:{boxShadow:"none"}},i.createElement("div",{style:{display:"flex",justifyContent:"center",gap:"20px",flexDirection:"column",alignItems:"center"}},i.createElement(t.SubmitBar,{label:n("SV_YES_PROCEED_WITH_APPLICATION"),onSubmit:()=>{o.push("renew-application/info")}}),i.createElement(t.SubmitBar,{label:n("SV_NO_PROCEED_PAYEMNT"),onSubmit:()=>{console.log(" testing coming compilter"),o.push("renew-application/check/makePayment")}})))))};function yi(e){var t,n,a,u,s,d,v,p,f,m,E,g,h,S,y;let{applicationDetails:b,workflowDetails:T,isDataLoading:C,applicationData:A,timelineStatusPrefix:D,showTimeLine:N=!0,statusAttribute:I="status",paymentsList:w,oldValue:O,isInfoLabel:x=!1}=e;const{t:R}=o.useTranslation(),L=(r.useHistory(),r.useLocation()),[P,k]=l.useState(!1),[M,F]=l.useState(null);new URLSearchParams(L.search);let{id:B}=r.useParams();const U=null==b||null===(t=b.applicationData)||void 0===t?void 0:t.owners;function W(e,t,n){var l;window.open(null==n||null===(l=n.fullImage)||void 0===l?void 0:l[0],"_blank")}console.log("ownersSequences:- ",U);const[j,H]=l.useState({}),[z,V]=l.useState({loading:!1,loaded:!1,canLoad:!1});"ACTIVE"!=(null==A?void 0:A.status)||z.loading||z.loaded||z.canLoad||V({loading:!1,loaded:!1,canLoad:!0}),null==z||!z.canLoad||z.loading||z.loaded||(V({loading:!0,loaded:!1,canLoad:!0}),function(e,t,n,l){try{Promise.resolve(Digit.PTService.assessmentSearch({tenantId:e,filters:{propertyIds:t}})).then(function(i){function o(){n(r),l({loading:!1,loaded:!0,canLoad:!0})}let r={};const a=function(n){if((null==i||null===(n=i.Assessments)||void 0===n?void 0:n.length)>0)return Promise.resolve(Digit.PaymentService.fetchBill(e,{businessService:"PT",consumerCode:t})).then(function(e){r=e})}();return a&&a.then?a.then(o):o()})}catch(e){return Promise.reject(e)}}((null==A?void 0:A.tenantId)||tenantId,null==A?void 0:A.propertyId,H,V));const G=e=>{if(null==e||null==e||""==e)return"NA";const t=new Date(e);let n=t.getMonth()+1,l=t.getDate();return n=(n>9?"":"0")+n,l=(l>9?"":"0")+l,l+"/"+n+"/"+t.getFullYear()},K=function(e,t,n){if(void 0===t&&(t=0),"OPEN"===e.state||"INITIATED"===e.status&&!window.location.href.includes("/obps/")){var l;const e={date:G(null==A||null===(l=A.auditDetails)||void 0===l?void 0:l.createdTime),source:(null==A?void 0:A.channel)||""};return i.createElement(ii,{data:e})}if(window.location.href.includes("/obps/")||window.location.href.includes("/noc/")||window.location.href.includes("/ws/")){var o,r,a,u,c,s,d,v,p,f,m,E,g,h,S,y,T,C;const l={uuid:null==e||null===(o=e.assignes)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.uuid,fieldName:"mobileNumber",model:"User",showValue:!1,loadData:{serviceName:"/egov-workflow-v2/egov-wf/process/_search",requestBody:{},requestParam:{tenantId:null==b?void 0:b.tenantId,businessIds:null==b?void 0:b.applicationNo,history:!0},jsonPath:"ProcessInstances[0].assignes[0].mobileNumber",isArray:!1,d:e=>{let n="";return n="+91 "+_.get(e,"ProcessInstances["+t+"].assignes[0].mobileNumber"),n}}},D=n&&n[t-1]&&(null==n?void 0:n[t-1]),N={date:null==e||null===(a=e.auditDetails)||void 0===a?void 0:a.lastModified,name:null==e||null===(u=e.assignes)||void 0===u||null===(c=u[0])||void 0===c?void 0:c.name,mobileNumber:(null==A||null===(s=A.processInstance)||void 0===s||null===(d=s.assignes)||void 0===d||null===(v=d[0])||void 0===v?void 0:v.uuid)===(null==e||null===(p=e.assignes)||void 0===p||null===(f=p[0])||void 0===f?void 0:f.uuid)&&null!=A&&null!==(m=A.processInstance)&&void 0!==m&&null!==(E=m.assignes)&&void 0!==E&&null!==(g=E[0])&&void 0!==g&&g.mobileNumber?null==A||null===(h=A.processInstance)||void 0===h||null===(S=h.assignes)||void 0===S||null===(y=S[0])||void 0===y?void 0:y.mobileNumber:null==e||null===(T=e.assignes)||void 0===T||null===(C=T[0])||void 0===C?void 0:C.mobileNumber,comment:R(e&&(null==e?void 0:e.comment)),wfComment:D?D&&D.wfComment:[],thumbnailsToShow:null==e?void 0:e.thumbnailsToShow};return i.createElement(ii,{data:N,OpenImage:W,privacy:l})}{var D,N,I,w,O;const t={date:G(null==A||null===(D=A.auditDetails)||void 0===D?void 0:D.lastModifiedTime),name:null==e||null===(N=e.assignes)||void 0===N||null===(I=N[0])||void 0===I?void 0:I.name,wfComment:null==e?void 0:e.wfComment,mobileNumber:null==e||null===(w=e.assignes)||void 0===w||null===(O=w[0])||void 0===O?void 0:O.mobileNumber,thumbnailsToShow:null==e?void 0:e.thumbnailsToShow};return i.createElement(ii,{data:t,OpenImage:W})}},q=(e,t)=>e?t?e:R(e):R("NA"),Y=window.location.href.includes("employee/tl")||window.location.href.includes("employee/obps")||window.location.href.includes("employee/noc"),X=window.location.href.includes("employee/noc"),Z=window.location.href.includes("employee/obps"),$=(window.location.href.includes("employee/ws"),()=>window.location.href.includes("employee/obps")||window.location.href.includes("employee/noc")||Y?{justifyContent:"space-between",fontSize:"16px",lineHeight:"19px",color:"#0B0C0C"}:{}),Q=e=>{if(null!=e&&e.isTimeValue&&null!=e&&e.value){const t=e.value,[n,l]=t.split(":").map(e=>parseInt(e,10));if(!isNaN(n)&&!isNaN(l)){const e=n>=12?"PM":"AM";return(n%12||12)+":"+String(l).padStart(2,"0")+" "+e}return e.value}return null!=e&&e.skip?e.value:null!=e&&e.isUnit?null!=e&&e.value?q(null==e?void 0:e.value,null==e?void 0:e.isNotTranslated)+" "+R(null==e?void 0:e.isUnit):R("N/A"):null!=e&&e.value?q(null==e?void 0:e.value,null==e?void 0:e.isNotTranslated):R("N/A")},[J,ee]=l.useState(!1);return i.createElement(c.Card,{style:{position:"relative"},className:"employeeCard-override"},x?i.createElement(vi,{t:R,userType:!1,infoBannerLabel:"CS_FILE_APPLICATION_INFO_LABEL",infoClickLable:"WS_CLICK_ON_LABEL",infoClickInfoLabel:window.location.href.includes("disconnection")||window.location.href.includes("application")?"WS_DISCONNECTION_CLICK_ON_INFO_LABEL":"WS_CLICK_ON_INFO_LABEL",infoClickInfoLabel1:window.location.href.includes("disconnection")||window.location.href.includes("application")?"WS_DISCONNECTION_CLICK_ON_INFO1_LABEL":""}):null,null==b||null===(n=b.applicationDetails)||void 0===n?void 0:n.map((e,t)=>{var n,l,o,a,u,s,d,v,p,f,m,E,_,g,h,S,y,C,A,D,N,I,x,L,P,M,U,W,H,z,V,G,K,q,J,ee,te,ne,le;return i.createElement(i.Fragment,{key:t},i.createElement("div",{style:window.location.href.includes("employee/obps")||window.location.href.includes("employee/noc")||window.location.href.includes("employee/ws")?{lineHeight:"19px",maxWidth:"950px",minWidth:"280px"}:Y?{lineHeight:"19px",maxWidth:"600px",minWidth:"280px"}:{}},0!==t||e.asSectionHeader?i.createElement(i.Fragment,null,i.createElement(c.CardSectionHeader,{style:0==t&&Y?{marginBottom:"16px",fontSize:"24px"}:{marginBottom:"16px",marginTop:"32px",fontSize:"24px"}},X?""+R(e.title):R(e.title),null!=e&&e.Component?i.createElement(e.Component,null):null)):i.createElement(c.CardSubHeader,{style:{marginBottom:"16px",fontSize:"24px"}},R(e.title)),(null==e?void 0:e.isTable)&&i.createElement("table",{style:{tableLayout:"fixed",width:"100%",borderCollapse:"collapse",borderCollapse:"collapse",border:"1px solid black"}},i.createElement("tr",{style:{textAlign:"left"}},null==e?void 0:e.headers.map(e=>i.createElement("th",{style:{padding:"10px",paddingLeft:"5px",border:"1px solid black"}},R(e)))),null==e?void 0:e.tableRows.map((t,n)=>i.createElement("tr",null,t.map((t,l)=>Array.isArray(t)&&t.length>1&&!0===e.isMaintenance?i.createElement("td",{style:{paddingTop:"20px",textAlign:"left",border:"1px solid black",verticalAlign:"middle"},key:l},i.createElement("div",{style:{display:"flex",flexWrap:"nowrap",gap:"5px"}},t.map((e,t)=>i.createElement("a",{key:t,onClick:()=>{Digit.UploadServices.Filefetch([e.fileStoreId],Digit.ULBService.getStateId()).then(e=>{var t,n,l;console.log("Response of file:",e);const i=null==e||null===(t=e.data)||void 0===t||null===(n=t.fileStoreIds)||void 0===n||null===(l=n[0])||void 0===l?void 0:l.url;if(i){const e=i.split(",")[0];e?window.open(e,"_blank"):console.error("No valid URL found to open!")}else console.error("URL is missing in the response!")}).catch(e=>{console.error("Error fetching file:",e)})},rel:"noopener noreferrer",style:{marginRight:"5px",display:"inline-block",cursor:"pointer"}},i.createElement(c.PDFSvg,{style:{width:"25px",height:"25px"}}))))):i.createElement("td",{key:l,style:{paddingTop:"20px",textAlign:"left",border:"1px solid black",verticalAlign:"middle"}},console.log("Comming Maintainaince data row:- ",t.data),t&&!0===t.editButton?i.createElement("span",{style:{display:"inline-flex",gap:"10px",alignItems:"center"}},i.createElement(r.Link,{to:{pathname:"/digit-ui/employee/asset/assetservice/maintenance-edit/"+B,state:{data:t.data}}},i.createElement("button",null," ",i.createElement(c.EditIcon,null)," ")),i.createElement("div",{key:n,onClick:()=>(F(t.data),void k(!0)),style:{cursor:"pointer"}},i.createElement(c.ViewsIcon,null))):R(t)))))),i.createElement(c.StatusTable,{style:window.location.href.includes("employee/obps")||window.location.href.includes("employee/noc")||Y?{position:"relative",marginTop:"19px"}:{}},(null==e?void 0:e.title)&&!(null!=e&&e.title.includes("NOC"))&&(null==e||null===(n=e.values)||void 0===n?void 0:n.map((t,n)=>{var l,o,a;return!0===t.map&&"N/A"!==t.value?i.createElement(c.Row,{labelStyle:{wordBreak:"break-all"},textStyle:{wordBreak:"break-all"},key:R(t.title),label:R(t.title),text:i.createElement("img",{src:R(t.value),alt:"",privacy:null==t?void 0:t.privacy})}):1==(null==t?void 0:t.isLink)?i.createElement(c.Row,{key:R(t.title),label:window.location.href.includes("tl")||window.location.href.includes("ws")?i.createElement("div",{style:{width:"200%"}},i.createElement(r.Link,{to:null==t?void 0:t.to},i.createElement("span",{className:"link",style:{color:"#a82227"}},R(null==t?void 0:t.title)))):X||Z?""+R(t.title):R(t.title),text:i.createElement("div",null,i.createElement(r.Link,{to:null==t?void 0:t.to},i.createElement("span",{className:"link",style:{color:"#a82227"}},null==t?void 0:t.value))),last:n===(null==e||null===(a=e.values)||void 0===a?void 0:a.length)-1,caption:t.caption,className:"border-none",rowContainerStyle:$(),labelStyle:{wordBreak:"break-all"},textStyle:{wordBreak:"break-all"}}):i.createElement("div",null,window.location.href.includes("modify")?i.createElement(c.Row,{className:"border-none",key:""+t.title,label:""+R(""+t.title),privacy:null==t?void 0:t.privacy,text:null!=t&&t.oldValue?null==t?void 0:t.oldValue:null!=t&&t.value?null==t?void 0:t.value:"",labelStyle:{wordBreak:"break-all"},textStyle:{wordBreak:"break-all"}}):i.createElement(c.Row,{key:R(t.title),label:R(t.title),text:Q(t),last:n===(null==e||null===(l=e.values)||void 0===l?void 0:l.length)-1,caption:t.caption,className:"border-none",privacy:null==t?void 0:t.privacy,rowContainerStyle:$(),labelStyle:{wordBreak:"break-all",fontWeight:t.isBold?"bold":"normal",fontStyle:t.isBold?"italic":"normal"},textStyle:{wordBreak:"break-all",fontWeight:t.isBold?"bold":"normal",fontStyle:t.isBold?"italic":"normal"}}),"PT_TOTAL_DUES"===t.title?i.createElement(_i,{bill:null===(o=j.Bill)||void 0===o?void 0:o[0]}):"")})))),(null==e?void 0:e.belowComponent)&&i.createElement(e.belowComponent,null),(null==e||null===(l=e.additionalDetails)||void 0===l?void 0:l.inspectionReport)&&i.createElement(ti,{scrutinyDetails:null==e?void 0:e.additionalDetails,paymentsList:w}),(null==b||null===(o=b.applicationData)||void 0===o||null===(a=o.additionalDetails)||void 0===a||null===(u=a.fieldinspection_pending)||void 0===u?void 0:u.length)>0&&(null==e||null===(s=e.additionalDetails)||void 0===s?void 0:s.fiReport)&&i.createElement(ql,{fiReport:null==b||null===(d=b.applicationData)||void 0===d||null===(v=d.additionalDetails)||void 0===v?void 0:v.fieldinspection_pending}),(null==e||null===(p=e.additionalDetails)||void 0===p?void 0:p.floors)&&i.createElement(Jl,{floors:null==e||null===(f=e.additionalDetails)||void 0===f?void 0:f.floors}),(null==e||null===(m=e.additionalDetails)||void 0===m?void 0:m.owners)&&i.createElement(ei,{owners:null==e||null===(E=e.additionalDetails)||void 0===E?void 0:E.owners}),(null==e||null===(_=e.additionalDetails)||void 0===_?void 0:_.units)&&i.createElement(ri,{units:null==e||null===(g=e.additionalDetails)||void 0===g?void 0:g.units}),(null==e||null===(h=e.additionalDetails)||void 0===h?void 0:h.accessories)&&i.createElement(oi,{units:null==e||null===(S=e.additionalDetails)||void 0===S?void 0:S.accessories}),(null==e||null===(y=e.additionalDetails)||void 0===y?void 0:y.permissions)&&(null==T||null===(C=T.data)||void 0===C||null===(A=C.nextActions)||void 0===A?void 0:A.length)>0&&i.createElement(Zl,{applicationData:null==b?void 0:b.applicationData,t:R,permissions:null==e||null===(D=e.additionalDetails)||void 0===D?void 0:D.permissions}),(null==e||null===(N=e.additionalDetails)||void 0===N?void 0:N.obpsDocuments)&&i.createElement(Gl,{t:R,applicationData:null==b?void 0:b.applicationData,docs:e.additionalDetails.obpsDocuments,bpaActionsDetails:T}),(null==e||null===(I=e.additionalDetails)||void 0===I?void 0:I.noc)&&i.createElement(Xl,{t:R,isNoc:!0,NOCdata:e.values,applicationData:null==b?void 0:b.applicationData,docs:e.additionalDetails.noc,noc:null===(x=e.additionalDetails)||void 0===x?void 0:x.data,bpaActionsDetails:T}),(null==e||null===(L=e.additionalDetails)||void 0===L?void 0:L.scruntinyDetails)&&i.createElement(ti,{scrutinyDetails:null==e?void 0:e.additionalDetails}),(null==e||null===(P=e.additionalDetails)||void 0===P?void 0:P.buildingExtractionDetails)&&i.createElement(ti,{scrutinyDetails:null==e?void 0:e.additionalDetails}),(null==e||null===(M=e.additionalDetails)||void 0===M?void 0:M.subOccupancyTableDetails)&&i.createElement(ni,{edcrDetails:null==e?void 0:e.additionalDetails,applicationData:null==b?void 0:b.applicationData}),(null==e||null===(U=e.additionalDetails)||void 0===U?void 0:U.documentsWithUrl)&&i.createElement(Vl,{documents:null==e||null===(W=e.additionalDetails)||void 0===W?void 0:W.documentsWithUrl}),(null==e||null===(H=e.additionalDetails)||void 0===H?void 0:H.documents)&&i.createElement($l,{documents:null==e||null===(z=e.additionalDetails)||void 0===z?void 0:z.documents}),(null==e||null===(V=e.additionalDetails)||void 0===V?void 0:V.taxHeadEstimatesCalculation)&&i.createElement(Ql,{taxHeadEstimatesCalculation:null==e||null===(G=e.additionalDetails)||void 0===G?void 0:G.taxHeadEstimatesCalculation}),(null==e?void 0:e.isWaterConnectionDetails)&&i.createElement(ai,{wsAdditionalDetails:e,oldValue:O}),(null==e||null===(K=e.additionalDetails)||void 0===K?void 0:K.redirectUrl)&&i.createElement("div",{style:{fontSize:"16px",lineHeight:"24px",fontWeight:"400",padding:"10px 0px"}},i.createElement(r.Link,{to:null==e||null===(q=e.additionalDetails)||void 0===q||null===(J=q.redirectUrl)||void 0===J?void 0:J.url},i.createElement("span",{className:"link",style:{color:"#a82227"}},null==e||null===(ee=e.additionalDetails)||void 0===ee||null===(te=ee.redirectUrl)||void 0===te?void 0:te.title))),(null==e||null===(ne=e.additionalDetails)||void 0===ne?void 0:ne.estimationDetails)&&i.createElement(si,{wsAdditionalDetails:e,workflowDetails:T}),(null==e||null===(le=e.additionalDetails)||void 0===le?void 0:le.estimationDetails)&&i.createElement(pi,{wsAdditionalDetails:e,workflowDetails:T}))}),N&&(null==T||null===(a=T.data)||void 0===a||null===(u=a.timeline)||void 0===u?void 0:u.length)>0&&i.createElement(i.Fragment,null,i.createElement(c.BreakLine,null),((null==T?void 0:T.isLoading)||C)&&i.createElement(c.Loader,null),!(null!=T&&T.isLoading)&&!C&&i.createElement(l.Fragment,null,i.createElement("div",{id:"timeline"},i.createElement(c.CardSectionHeader,{style:{marginBottom:"16px",marginTop:"32px"}},R("ES_APPLICATION_DETAILS_APPLICATION_TIMELINE")),null!=T&&null!==(s=T.data)&&void 0!==s&&s.timeline&&1===(null==T||null===(d=T.data)||void 0===d||null===(v=d.timeline)||void 0===v?void 0:v.length)?i.createElement(c.CheckPoint,{isCompleted:!0,label:R(""+D+(null==T||null===(p=T.data)||void 0===p||null===(f=p.timeline[0])||void 0===f?void 0:f.state)),customChild:K(null==T||null===(m=T.data)||void 0===m?void 0:m.timeline[0],null==T||null===(E=T.data)||void 0===E?void 0:E.timeline)}):i.createElement(c.ConnectingCheckPoints,null,(null==T||null===(g=T.data)||void 0===g?void 0:g.timeline)&&(null==T||null===(h=T.data)||void 0===h?void 0:h.timeline.slice(0,J?null==T?void 0:T.data.timeline.length:2).map((e,t,n)=>{var l;let o="";var r,a,u,s,d,v;return window.location.href.includes("/obps/")&&(o=null!=T&&null!==(r=T.data)&&void 0!==r&&null!==(a=r.timeline[t-1])&&void 0!==a&&null!==(u=a.state)&&void 0!==u&&u.includes("BACK_FROM")||null!=T&&null!==(s=T.data)&&void 0!==s&&null!==(d=s.timeline[t-1])&&void 0!==d&&null!==(v=d.state)&&void 0!==v&&v.includes("SEND_TO_CITIZEN")?"_NOT_DONE":"SEND_TO_ARCHITECT"===(null==e?void 0:e.performedAction)?"_BY_ARCHITECT_DONE":0==t?"":"_DONE"),i.createElement(i.Fragment,{key:t},i.createElement(c.CheckPoint,{keyValue:t,isCompleted:0===t,info:e.comment,label:R(""+D+("REOPEN"===(null==e?void 0:e.performedAction)?null==e?void 0:e.performedAction:null==e?void 0:e[I])+o),customChild:K(e,t,null==T||null===(l=T.data)||void 0===l?void 0:l.timeline)}))}))),(null==T||null===(S=T.data)||void 0===S||null===(y=S.timeline)||void 0===y?void 0:y.length)>2&&i.createElement(c.LinkButton,{label:R(J?"COLLAPSE":"VIEW_TIMELINE"),onClick:()=>{ee(e=>!e)}})))),i.createElement("div",null,P&&i.createElement(Si,{t:R,closeModal:()=>setRnewButton(!1),actionCancelOnSubmit:()=>setRnewButton(!1),application:application})))}function bi(e){var t,n,l,o,r,a,u,s,d,v,p,f,m,E,_,g,h,S;let{t:y,showToast:b,closeToast:T,businessService:C}=e;if(null!=C&&C.includes("NewTL")||null!=C&&C.includes("TL")||null!=C&&C.includes("EDITRENEWAL")){var A;let e="";switch(null==b||null===(A=b.action)||void 0===A?void 0:A.action){case"SENDBACK":e="error"===(null==b?void 0:b.key)?null==b||null===(t=b.error)||void 0===t?void 0:t.message:y("TL_SENDBACK_CHECKLIST_MESSAGE_HEAD");break;case"FORWARD":e="error"===(null==b?void 0:b.key)?null==b||null===(n=b.error)||void 0===n?void 0:n.message:y("TL_FORWARD_SUCCESS_MESSAGE_MAIN");break;case"APPROVE":e="error"===(null==b?void 0:b.key)?null==b||null===(l=b.error)||void 0===l?void 0:l.message:y("TL_APPROVAL_CHECKLIST_MESSAGE_HEAD");break;case"SENDBACKTOCITIZEN":e="error"===(null==b?void 0:b.key)?null==b||null===(o=b.error)||void 0===o?void 0:o.message:y("TL_SENDBACK_TOCITIZEN_CHECKLIST_MESSAGE_HEAD");break;case"REJECT":e="error"===(null==b?void 0:b.key)?null==b||null===(r=b.error)||void 0===r?void 0:r.message:y("TL_APPROVAL_REJ_MESSAGE_HEAD");break;case"RESUBMIT":e="error"===(null==b?void 0:b.key)?null==b||null===(a=b.error)||void 0===a?void 0:a.message:y("TL_APPLICATION_RESUBMIT_SUCCESS_MESSAGE_MAIN");break;case"CANCEL":e="error"===(null==b?void 0:b.key)?null==b||null===(u=b.error)||void 0===u?void 0:u.message:y("TL_TL_CANCELLED_MESSAGE_HEAD");break;default:e="error"===(null==b?void 0:b.key)?null==b||null===(s=b.error)||void 0===s?void 0:s.message:y("ES_"+C+"_"+(null==b||null===(d=b.action)||void 0===d?void 0:d.action)+"_UPDATE_SUCCESS")}return i.createElement(i.Fragment,null,b&&i.createElement(c.Toast,{error:"error"===b.key,label:e,onClose:T}))}if(null!=C&&C.includes("BPA")||null!=C&&C.includes("BPA_LOW")||null!=C&&C.includes("BPA_OC")){var D;const e=function(e){var t;void 0===e&&(e=[]);let n=e[0];return n=2==(null===(t=e)||void 0===t?void 0:t.length)&&null!=C&&C.includes("BPA_OC")?y(e[1]):y(e[0]),n};let t="";switch(null==b||null===(D=b.action)||void 0===D?void 0:D.action){case"REVOCATE":t="error"===(null==b?void 0:b.key)?null==b||null===(v=b.error)||void 0===v?void 0:v.message:e(["BPA_APPROVAL_REVOCATED_MESSAGE_HEAD","BPA_APPROVAL_OC_REVOCATED_MESSAGE_HEAD"]);break;case"VERIFY_AND_FORWARD":t="error"===(null==b?void 0:b.key)?null==b||null===(p=b.error)||void 0===p?void 0:p.message:e(["BPA_FORWARD_SUCCESS_MESSAGE_MAIN"]);break;case"SEND_BACK_TO_CITIZEN":t="error"===(null==b?void 0:b.key)?null==b||null===(f=b.error)||void 0===f?void 0:f.message:e(["BPA_SENDBACK_SUCCESS_MESSAGE_MAIN"]);break;case"APPROVE":t="error"===(null==b?void 0:b.key)?null==b||null===(m=b.error)||void 0===m?void 0:m.message:e(["BPA_APPROVAL_CHECKLIST_MESSAGE_HEAD"]);break;case"REJECT":t="error"===(null==b?void 0:b.key)?null==b||null===(E=b.error)||void 0===E?void 0:E.message:e(["BPA_APPROVAL_REJECTED_MESSAGE_HEAD","BPA_OC_APPROVAL_REJECTED_MESSAGE_HEAD"]);break;case"FORWARD":t="error"===(null==b?void 0:b.key)?null==b||null===(_=b.error)||void 0===_?void 0:_.message:e(["BPA_FORWARD_SUCCESS_MESSAGE_MAIN"]);break;case"SEND_BACK_FOR_DOCUMENT_VERIFICATION":case"SEND_BACK_FOR_FIELD_INSPECTION":t="error"===(null==b?void 0:b.key)?null==b||null===(g=b.error)||void 0===g?void 0:g.message:e(["BPA_SENDBACK_SUCCESS_MESSAGE_MAIN"]);break;default:t="error"===(null==b?void 0:b.key)?null==b||null===(h=b.error)||void 0===h?void 0:h.message:y("ES_"+C+"_"+(null==b||null===(S=b.action)||void 0===S?void 0:S.action)+"_UPDATE_SUCCESS")}return i.createElement(i.Fragment,null,b&&i.createElement(c.Toast,{error:"error"===b.key,label:t,onClose:T}))}{var N,I;const e="error"===(null==b?void 0:b.key)?null==b||null===(N=b.error)||void 0===N?void 0:N.message:"ES_"+C+"_"+(null==b||null===(I=b.action)||void 0===I?void 0:I.action)+"_UPDATE_SUCCESS";return i.createElement(i.Fragment,null,b&&i.createElement(c.Toast,{error:"error"===b.key,label:y(e),onClose:T}))}}function Ti(e){var t,n,r,a,u,d,v,p,f,m,E,_,g,h,S,y,b,T,C;let{workflowDetails:A,displayMenu:D,onActionSelect:N,setDisplayMenu:I,businessService:w,forcedActionPrefix:O,ActionBarStyle:x={},MenuStyle:R={},isAction:L,applicationDetails:P}=e;const{t:k}=o.useTranslation();let M=Digit.UserService.getUser();const F=l.useRef();if(window.location.href.includes("/obps")||window.location.href.includes("/noc")){const e=sessionStorage.getItem("Digit.citizen.userRequestObject"),t=e?JSON.parse(e):{};M=null==t?void 0:t.value}const B=null===(t=M)||void 0===t||null===(n=t.info)||void 0===n||null===(r=n.roles)||void 0===r?void 0:r.map(e=>e.code);let U=!1,W=!1,j=(null==A||null===(a=A.data)||void 0===a||null===(u=a.actionState)||void 0===u||null===(d=u.nextActions)||void 0===d?void 0:d.filter(e=>(null==B?void 0:B.some(t=>{var n;return null===(n=e.roles)||void 0===n?void 0:n.includes(t)}))||!e.roles))||(null==A||null===(v=A.data)||void 0===v||null===(p=v.nextActions)||void 0===p?void 0:p.filter(e=>(null==B?void 0:B.some(t=>{var n;return null===(n=e.roles)||void 0===n?void 0:n.includes(t)}))||!e.roles));Digit.Hooks.useClickOutside(F,()=>{I(!1)},D),(window.location.href.includes("/obps")||window.location.href.includes("/noc"))&&1==(null==j?void 0:j.length)||null!=j&&null!==(f=j[0])&&void 0!==f&&null!==(m=f.redirectionUrl)&&void 0!==m&&m.pathname.includes("/pt/property-details/")&&1==(null==j?void 0:j.length)?(W=!1,U=!0):(null==j?void 0:j.length)>0&&(W=!0,U=!1);const H=Digit.SessionStorage.get("User"),z=null==H||null===(E=H.info)||void 0===E?void 0:E.uuid,V=null==P||null===(_=P.applicationData)||void 0===_||null===(g=_.auditDetails)||void 0===g?void 0:g.lastModifiedBy;return i.createElement(i.Fragment,null,!(null!=A&&A.isLoading)&&W&&!U&&!L&&i.createElement(c.ActionBar,{style:s({},x)},D&&(null!=A&&null!==(h=A.data)&&void 0!==h&&null!==(S=h.actionState)&&void 0!==S&&S.nextActions||null!=A&&null!==(y=A.data)&&void 0!==y&&y.nextActions)?i.createElement(c.Menu,{localeKeyPrefix:O||"WF_EMPLOYEE_"+(null==w?void 0:w.toUpperCase()),options:j,optionKey:"action",t:k,onSelect:N,style:R}):null,"ewst"===w?V===z||null==V?i.createElement(c.SubmitBar,{ref:F,label:k("WF_TAKE_ACTION"),onSubmit:()=>I(!D)}):i.createElement(c.CardLabel,{style:{color:"red",font:"30px",fontWeight:"bold"}},""+k("EW_ALERT_ANOTHER_VENDOR")):i.createElement(c.SubmitBar,{ref:F,label:k("WF_TAKE_ACTION"),onSubmit:()=>I(!D)})),!(null!=A&&A.isLoading)&&!W&&U&&!L&&i.createElement(c.ActionBar,{style:s({},x)},i.createElement("button",{style:{color:"#FFFFFF",fontSize:"18px"},className:"submit-bar",name:null==j||null===(b=j[0])||void 0===b?void 0:b.action,value:null==j||null===(T=j[0])||void 0===T?void 0:T.action,onClick:e=>{N((null==j?void 0:j[0])||{})}},k((O||"WF_EMPLOYEE_"+(null==w?void 0:w.toUpperCase()))+"_"+(null==j||null===(C=j[0])||void 0===C?void 0:C.action)))))}const Ci=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Ai=e=>i.createElement("div",{className:"icon-bg-secondary",onClick:e.onClick},i.createElement(Ci,null));function Di(e){let{action:t,closeWarningPopup:n}=e;const{t:l}=o.useTranslation(),r=window.Digit.Utils.browser.isMobile();return i.createElement(i.Fragment,null,i.createElement(c.Modal,{headerBarMain:i.createElement("h1",{className:"heading-m"},l("PT_DUES_ARE_PENDING")),headerBarEnd:i.createElement(Ai,{onClick:()=>{n()}}),hideSubmit:!0,isDisabled:!1,popupStyles:r?{}:{width:"29%",marginTop:"auto"}},i.createElement(c.Card,null,i.createElement("div",{style:{marginBottom:"30px"}},i.createElement("h1",null,l("PT_YOU_HAVE")," ₹",null==t?void 0:t.AmountDueForPay," ",l("PT_DUE_WARNING_MSG2"))),i.createElement(c.Row,{rowContainerStyle:{display:"flex"},labelStyle:{fontSize:"24px",fontWeight:"700",marginRight:"10%"},textStyle:{fontSize:"24px",fontWeight:"700",marginBottom:"20px"},label:""+l("PT_AMOUNT_DUE"),text:"₹"+l(null==t?void 0:t.AmountDueForPay)}),i.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"flex-end"}},i.createElement(c.ButtonSelector,{theme:"border",label:l("ES_PT_COMMON_CANCEL"),onSubmit:n,style:{marginLeft:"10px"}}),i.createElement(c.ButtonSelector,{label:l("PT_COLLECT"),onSubmit:()=>{var e;return window.location.assign(""+window.location.origin+(null==t||null===(e=t.redirectionUrl)||void 0===e?void 0:e.pathname))},style:{marginLeft:"10px"}})))),")")}const Ni=e=>{var t;const n=Digit.ULBService.getCurrentTenantId(),u=Digit.ULBService.getStateId(),{t:d}=o.useTranslation(),v=r.useHistory();let{id:p}=r.useParams();const[f,m]=l.useState(!1),[E,_]=l.useState(null),[g,h]=l.useState(!1),[S,y]=l.useState(!1),[b,T]=l.useState(!1),{applicationDetails:C,showToast:A,setShowToast:D,isLoading:N,isDataLoading:I,applicationData:w,mutate:O,nocMutation:x,workflowDetails:R,id:L,businessService:P,closeToast:k,moduleCode:M,timelineStatusPrefix:F,forcedActionPrefix:B,statusAttribute:U,ActionBarStyle:W,MenuStyle:j,paymentsList:H,showTimeLine:z=!0,oldValue:V,isInfoLabel:G=!1,clearDataDetails:K,isAction:q=!1}=e;l.useEffect(()=>{A&&R.revalidate()},[A]);const Y=a.useQueryClient(),X=()=>{_(null),h(!1)};return N||S?i.createElement(c.Loader,null):i.createElement(i.Fragment,null,N?i.createElement(c.Loader,null):i.createElement(i.Fragment,null,i.createElement(yi,{applicationDetails:C,id:L,workflowDetails:R,isDataLoading:I,applicationData:w,businessService:P,timelineStatusPrefix:F,statusAttribute:U,paymentsList:H,showTimeLine:z,oldValue:V,isInfoLabel:G}),g?i.createElement(zl,{t:d,vending_Zone:(null==e?void 0:e.vending_Zone)||[],UserVendingZone:(null==e?void 0:e.UserVendingZone)||"",UserVendingZoneCode:(null==e?void 0:e.UserVendingZoneCode)||"",action:E,tenantId:n,state:u,id:p,applicationDetails:C,applicationData:null==C?void 0:C.applicationData,closeModal:X,submitAction:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n={});try{let l=!1;const i=function(i,o,r,a,u,c,p,f,m,E,_,g){if(0!=(null==e||null===(i=e.Property)||void 0===i||null===(o=i.workflow)||void 0===o||null===(r=o.comment)||void 0===r?void 0:r.length)&&0!=(null==e||null===(a=e.Licenses)||void 0===a||null===(u=a[0])||void 0===u||null===(c=u.comment)||void 0===c?void 0:c.length)&&0!=(null==e||null===(p=e.WaterConnection)||void 0===p||null===(f=p.comment)||void 0===f?void 0:f.length)&&0!=(null==e||null===(m=e.SewerageConnection)||void 0===m||null===(E=m.comment)||void 0===E?void 0:E.length)&&0!=(null==e||null===(_=e.BPA)||void 0===_||null===(g=_.comment)||void 0===g?void 0:g.length)){function h(t){if(l)return t;sessionStorage.setItem("updateData",JSON.stringify(e)),O&&(y(!0),O(e,{onError:(e,t)=>{y(!1),D({key:"error",error:e}),setTimeout(k,5e3)},onSuccess:(e,t)=>{var l,i,o,r,a,u,c,s,p,f,m,E;sessionStorage.removeItem("WS_SESSION_APPLICATION_DETAILS"),y(!1),null!==(l=n)&&void 0!==l&&l.bpa&&v.replace("/digit-ui/employee/obps/response",{data:e}),null!==(i=n)&&void 0!==i&&i.isStakeholder&&v.push("/digit-ui/employee/obps/stakeholder-response",{data:e}),null!==(o=n)&&void 0!==o&&o.isNoc&&v.push("/digit-ui/employee/noc/response",{data:e}),(null==e||null===(r=e.Amendments)||void 0===r?void 0:r.length)>0?null!=t&&null!==(a=t.AmendmentUpdate)&&void 0!==a&&null!==(u=a.workflow)&&void 0!==u&&u.action.includes("SEND_BACK")?D({key:"success",label:d("ES_MODIFYSWCONNECTION_SEND_BACK_UPDATE_SUCCESS")}):null!=t&&null!==(c=t.AmendmentUpdate)&&void 0!==c&&null!==(s=c.workflow)&&void 0!==s&&s.action.includes("RE-SUBMIT")?D({key:"success",label:d("ES_MODIFYSWCONNECTION_RE_SUBMIT_UPDATE_SUCCESS")}):null!=t&&null!==(p=t.AmendmentUpdate)&&void 0!==p&&null!==(f=p.workflow)&&void 0!==f&&f.action.includes("APPROVE")?D({key:"success",label:d("ES_MODIFYSWCONNECTION_APPROVE_UPDATE_SUCCESS")}):null!=t&&null!==(m=t.AmendmentUpdate)&&void 0!==m&&null!==(E=m.workflow)&&void 0!==E&&E.action.includes("REJECT")&&D({key:"success",label:d("ES_MODIFYWSCONNECTION_REJECT_UPDATE_SUCCESS")}):(K&&setTimeout(K,3e3),setTimeout(k,5e3),Y.clear(),Y.refetchQueries("APPLICATION_SEARCH"))}})),X()}y(!0),"function"==typeof(null==e?void 0:e.customFunctionToExecute)&&(null==e||e.customFunctionToExecute(s({},e)));const i=function(){if(!1!==t&&x){var e;const n=null===(e=t)||void 0===e?void 0:e.map(e=>null==x?void 0:x.mutateAsync(e)),i=qe(function(){return y(!0),Promise.resolve(Promise.all(n)).then(function(e){e&&e.map(e=>{var t,n;Digit.SessionStorage.del(null==e||null===(t=e.Noc)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.nocType)})})},function(e){var t,n,i,o,r,a,u,c,s,v,p,f;y(!1);let m=null!=e&&null!==(t=e.response)&&void 0!==t&&null!==(n=t.data)&&void 0!==n&&null!==(i=n.Errors)&&void 0!==i&&null!==(o=i[0])&&void 0!==o&&o.code?d(null==e||null===(r=e.response)||void 0===r||null===(a=r.data)||void 0===a||null===(u=a.Errors)||void 0===u||null===(c=u[0])||void 0===c?void 0:c.code):(null==e||null===(s=e.response)||void 0===s||null===(v=s.data)||void 0===v||null===(p=v.Errors)||void 0===p||null===(f=p[0])||void 0===f?void 0:f.message)||e;X(),D({key:"error",error:{message:m}}),setTimeout(k,5e3),l=!0});if(i&&i.then)return i.then(function(){})}}();return i&&i.then?i.then(h):h(i)}alert("Please fill in the comments before submitting")}();return Promise.resolve(i&&i.then?i.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},actionData:null==R||null===(t=R.data)||void 0===t?void 0:t.timeline,businessService:P,workflowDetails:R,moduleCode:M}):null,b?i.createElement(Di,{action:E,workflowDetails:R,businessService:P,isWarningPop:b,closeWarningPopup:()=>{T(!1)}}):null,i.createElement(bi,{t:d,showToast:A,closeToast:k,businessService:P}),i.createElement(Ti,{isAction:q,workflowDetails:R,displayMenu:f,onActionSelect:function(e){if(sessionStorage.setItem("SELECTED_ACTION",null==e?void 0:e.action),e)if(null!=e&&e.isToast)D({key:"error",error:{message:null==e?void 0:e.toastMessage}}),setTimeout(k,5e3);else if(null!=e&&e.isWarningPopUp)T(!0);else if(null!=e&&e.redirectionUrll){var t,n,l,i,o;if("ACTIVATE_CONNECTION"===(null==e||null===(t=e.redirectionUrll)||void 0===t?void 0:t.action))v.push(""+(null==e||null===(l=e.redirectionUrll)||void 0===l?void 0:l.pathname),JSON.stringify({data:null==e||null===(i=e.redirectionUrll)||void 0===i?void 0:i.state,url:""+(null===(o=location)||void 0===o?void 0:o.pathname)+location.search}));else if("RE-SUBMIT-APPLICATION"===(null==e||null===(n=e.redirectionUrll)||void 0===n?void 0:n.action)){var r,a;v.push(""+(null==e||null===(r=e.redirectionUrll)||void 0===r?void 0:r.pathname),{data:null==e||null===(a=e.redirectionUrll)||void 0===a?void 0:a.state})}else{var u;window.location.assign(window.location.origin+"/digit-ui/employee/payment/collect/"+(null==e||null===(u=e.redirectionUrll)||void 0===u?void 0:u.pathname))}}else if(null!=e&&e.redirectionUrl){var c,d;v.push({pathname:null===(c=e.redirectionUrl)||void 0===c?void 0:c.pathname,state:s({},null===(d=e.redirectionUrl)||void 0===d?void 0:d.state)})}else h(!0);_(e),m(!1)},setDisplayMenu:m,businessService:P,forcedActionPrefix:B,ActionBarStyle:W,MenuStyle:j,applicationDetails:C})))};var Ii=i.memo(()=>{var e,n,a,u;const{t:c}=o.useTranslation(),s=(Digit.Hooks.useStore.getInitData(),Digit.ULBService.getCurrentTenantId()),{id:d}=r.useParams(),[v,p]=l.useState(null),[f,m]=l.useState({}),[E,_]=l.useState(!1),[g,h]=l.useState("watertanker"),S=null==d?void 0:d.startsWith("WT"),y=null==d?void 0:d.startsWith("TP"),b=S?"watertanker":y?"treePruning":"mobileToilet",T=Digit.UserService.getUser().info;sessionStorage.setItem(S?"wt":y?"tp":"mt",d);const{isLoading:C,data:A}=S?Digit.Hooks.wt.useWTApplicationDetail(c,s,d):y?Digit.Hooks.wt.useTPApplicationDetail(c,s,d):Digit.Hooks.wt.useMTApplicationDetail(c,s,d),{mutate:D}=S?Digit.Hooks.wt.useWTApplicationAction(s):y?Digit.Hooks.wt.useTPApplicationAction(s):Digit.Hooks.wt.useMTApplicationAction(s);let N=Digit.Hooks.useWorkflowDetails({tenantId:(null==A||null===(e=A.applicationData)||void 0===e?void 0:e.tenantId)||s,id:null==A||null===(n=A.applicationData)||void 0===n||null===(a=n.applicationData)||void 0===a?void 0:a.bookingNo,moduleCode:b,role:S?["WT_CEMP"]:y?["TP_CEMP"]:["MT_CEMP"]});l.useEffect(()=>{A&&m(Ue.cloneDeep(A))},[A]),l.useEffect(()=>{var e,t,n,l,i;null!=N&&null!==(e=N.data)&&void 0!==e&&e.applicationBusinessService&&!("watertanker"===(null==N||null===(t=N.data)||void 0===t?void 0:t.applicationBusinessService)&&"watertanker"===b||"mobileToilet"===(null==N||null===(n=N.data)||void 0===n?void 0:n.applicationBusinessService)&&"mobileToilet"===b||"treePruning"===(null==N||null===(l=N.data)||void 0===l?void 0:l.applicationBusinessService)&&"treePruning"===b)&&h(null==N||null===(i=N.data)||void 0===i?void 0:i.applicationBusinessService)},[N.data]);let I=[];return i.createElement("div",{style:{padding:"CITIZEN"===(null==T?void 0:T.type)?"0 15px":""}},i.createElement("div",{className:"employee-application-details",style:{marginBottom:"15px"}},i.createElement(t.Header,{styles:{marginLeft:"0px",paddingTop:"10px",fontSize:"32px"}},c("BOOKING_DETAILS")),i.createElement("div",{style:{zIndex:"10",display:"flex",flexDirection:"row-reverse",alignItems:"center",marginTop:"-25px"}},I&&I.length>0&&i.createElement(t.MultiLink,{className:"multilinkWrapper employee-mulitlink-main-div",onHeadClick:()=>_(!E),displayOptions:E,options:I,downloadBtnClassName:"employee-download-btn-className",optionsClassName:"employee-options-btn-className"}))),i.createElement(Ni,{applicationDetails:null==f?void 0:f.applicationData,isLoading:C,isDataLoading:C,applicationData:null==f||null===(u=f.applicationData)||void 0===u?void 0:u.applicationData,mutate:D,workflowDetails:N,businessService:b,moduleCode:"request-service",showToast:v,setShowToast:p,closeToast:()=>{p(null)},timelineStatusPrefix:"",forcedActionPrefix:"RS",statusAttribute:"state",MenuStyle:{color:"#FFFFFF",fontSize:"18px"}}))});const wi=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#FFFFFF"},i.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),i.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 12 19 6.41z"})),Oi=e=>{let{onClick:t}=e;return i.createElement("div",{className:"icon-bg-secondary",onClick:t},i.createElement(wi,null))},xi=e=>i.createElement("h1",{className:"heading-m"},e.t("SERVICE_TYPE")),Ri=e=>e.substr(0,1).toUpperCase()+e.substr(1),Li=function(e,t,n){try{var l,i,o,r,a,u,c,s,d,v,p,E,_,g;return Promise.resolve({t:n,tenantId:null==t?void 0:t.code,name:n(null==t?void 0:t.i18nKey)+" "+(h=n("ULBGRADE_"+(null==t||null===(l=t.city)||void 0===l?void 0:l.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))),h.toLowerCase().split(" ").map(Ri).join(" ")),email:null==t?void 0:t.emailId,phoneNumber:null==t?void 0:t.contactNumber,applicationNumber:null==e?void 0:e.bookingNo,isTOCRequired:!1,heading:n("MT_ACKNOWLEDGEMENT"),details:[{title:n("MT_APPLICANT_DETAILS"),asSectionHeader:!0,values:[{title:n("MT_APPLICANT_NAME"),value:null==e||null===(i=e.applicantDetail)||void 0===i?void 0:i.name},{title:n("MT_MOBILE_NUMBER"),value:null==e||null===(o=e.applicantDetail)||void 0===o?void 0:o.mobileNumber},{title:n("MT_ALT_MOBILE_NUMBER"),value:null==e||null===(r=e.applicantDetail)||void 0===r?void 0:r.alternateNumber},{title:n("MT_EMAIL_ID"),value:null==e||null===(a=e.applicantDetail)||void 0===a?void 0:a.emailId}].filter(e=>e.value)},{title:n("WT_ADDRESS_DETAILS"),asSectionHeader:!0,values:[{title:n("WT_PINCODE"),value:null==e||null===(u=e.address)||void 0===u?void 0:u.pincode},{title:n("WT_CITY"),value:null==e||null===(c=e.address)||void 0===c?void 0:c.city},{title:n("WT_LOCALITY"),value:null==e||null===(s=e.address)||void 0===s?void 0:s.locality},{title:n("WT_STREET_NAME"),value:null==e||null===(d=e.address)||void 0===d?void 0:d.streetName},{title:n("WT_DOOR_NO"),value:null==e||null===(v=e.address)||void 0===v?void 0:v.doorNo},{title:n("WT_HOUSE_NO"),value:null==e||null===(p=e.address)||void 0===p?void 0:p.houseNo},{title:n("WT_ADDRESS_LINE1"),value:null==e||null===(E=e.address)||void 0===E?void 0:E.addressLine1},{title:n("WT_ADDRESS_LINE2"),value:null==e||null===(_=e.address)||void 0===_?void 0:_.addressLine2},{title:n("WT_LANDMARK"),value:null==e||null===(g=e.address)||void 0===g?void 0:g.landmark}].filter(e=>e.value)},{title:n("MT_REQUEST_DETAILS"),asSectionHeader:!0,values:[{title:n("MT_NUMBER_OF_MOBILE_TOILETS"),value:null==e?void 0:e.noOfMobileToilet},{title:n("MT_DELIVERY_FROM_DATE"),value:m(null==e?void 0:e.deliveryFromDate)},{title:n("MT_DELIVERY_TO_DATE"),value:m(null==e?void 0:e.deliveryToDate)},{title:n("MT_REQUIREMENT_TIME"),value:f(null==e?void 0:e.deliveryFromTime)+" - "+f(null==e?void 0:e.deliveryToTime)},{title:n("MT_SPECIAL_REQUEST"),value:null==e?void 0:e.description}].filter(e=>e.value)}]})}catch(e){return Promise.reject(e)}var h},Pi=e=>{console.log("GetActionMessage",e);const{t:t}=o.useTranslation();return e.isSuccess?t("MT_SUBMIT_SUCCESSFULL"):e.isLoading?t("MT_APPLICATION_PENDING"):e.isSuccess?void 0:t("MT_APPLICATION_FAILED")},ki={padding:"4px 0px",justifyContent:"space-between"},Mi=e=>{var n,l;return console.log("BannerPicker",e),i.createElement(t.Banner,{message:Pi(e),applicationNumber:null===(n=e.data)||void 0===n||null===(l=n.mobileToiletBookingDetail)||void 0===l?void 0:l.bookingNo,info:e.isSuccess?e.t("MT_BOOKING_NO"):"",successful:e.isSuccess,style:{width:"100%"}})},Fi=e=>e.substr(0,1).toUpperCase()+e.substr(1),Bi=function(e,t,n){try{var l,i,o,r,a,u,c,s,d,v,p,f,m,E;return Promise.resolve({t:n,tenantId:null==t?void 0:t.code,name:n(null==t?void 0:t.i18nKey)+" "+(_=n("ULBGRADE_"+(null==t||null===(l=t.city)||void 0===l?void 0:l.ulbGrade.toUpperCase().replace(" ","_").replace(".","_"))),_.toLowerCase().split(" ").map(Fi).join(" ")),email:null==t?void 0:t.emailId,phoneNumber:null==t?void 0:t.contactNumber,applicationNumber:null==e?void 0:e.bookingNo,isTOCRequired:!1,heading:n("TP_ACKNOWLEDGEMENT"),details:[{title:n("MT_APPLICANT_DETAILS"),asSectionHeader:!0,values:[{title:n("MT_APPLICANT_NAME"),value:null==e||null===(i=e.applicantDetail)||void 0===i?void 0:i.name},{title:n("MT_MOBILE_NUMBER"),value:null==e||null===(o=e.applicantDetail)||void 0===o?void 0:o.mobileNumber},{title:n("MT_ALT_MOBILE_NUMBER"),value:null==e||null===(r=e.applicantDetail)||void 0===r?void 0:r.alternateNumber},{title:n("MT_EMAIL_ID"),value:null==e||null===(a=e.applicantDetail)||void 0===a?void 0:a.emailId}].filter(e=>e.value)},{title:n("WT_ADDRESS_DETAILS"),asSectionHeader:!0,values:[{title:n("WT_PINCODE"),value:null==e||null===(u=e.address)||void 0===u?void 0:u.pincode},{title:n("WT_CITY"),value:null==e||null===(c=e.address)||void 0===c?void 0:c.city},{title:n("WT_LOCALITY"),value:null==e||null===(s=e.address)||void 0===s?void 0:s.locality},{title:n("WT_STREET_NAME"),value:null==e||null===(d=e.address)||void 0===d?void 0:d.streetName},{title:n("WT_DOOR_NO"),value:null==e||null===(v=e.address)||void 0===v?void 0:v.doorNo},{title:n("WT_HOUSE_NO"),value:null==e||null===(p=e.address)||void 0===p?void 0:p.houseNo},{title:n("WT_ADDRESS_LINE1"),value:null==e||null===(f=e.address)||void 0===f?void 0:f.addressLine1},{title:n("WT_ADDRESS_LINE2"),value:null==e||null===(m=e.address)||void 0===m?void 0:m.addressLine2},{title:n("WT_LANDMARK"),value:null==e||null===(E=e.address)||void 0===E?void 0:E.landmark}].filter(e=>e.value)},{title:n("TP_REQUEST_DETAILS"),asSectionHeader:!0,values:[{title:n("REASON_FOR_PRUNING"),value:n(null==e?void 0:e.reasonForPruning)},{title:n("LATITUDE_GEOTAG"),value:null==e?void 0:e.latitude},{title:n("LONGITUDE_GEOTAG"),value:null==e?void 0:e.longitude}].filter(e=>e.value)}]})}catch(e){return Promise.reject(e)}var _},Ui=e=>{const{t:t}=o.useTranslation();return e.isSuccess?t("TP_SUBMIT_SUCCESSFULL"):e.isLoading?t("TP_APPLICATION_PENDING"):e.isSuccess?void 0:t("TP_APPLICATION_FAILED")},Wi={padding:"4px 0px",justifyContent:"space-between"},ji=e=>{var n,l;return console.log("BannerPicker",e),i.createElement(t.Banner,{message:Ui(e),applicationNumber:null===(n=e.data)||void 0===n||null===(l=n.treePruningBookingDetail)||void 0===l?void 0:l.bookingNo,info:e.isSuccess?e.t("TP_BOOKING_NO"):"",successful:e.isSuccess,style:{width:"100%"}})},Hi=["tenantId","payments"],zi=["tenantId","payments"],Vi=e=>{let{stateCode:t,userType:n,tenants:o}=e;const{path:a,url:u}=r.useRouteMatch(),c=Digit.StoreData.getCurrentLanguage();return Digit.Services.useStore({stateCode:t,moduleCode:"WT",language:c}),Digit.SessionStorage.set("WT_TENANTS",o),l.useEffect(()=>"employee"===n&&Digit.LocalizationService.getLocale({modules:["rainmaker-"+Digit.ULBService.getCurrentTenantId()],locale:Digit.StoreData.getCurrentLanguage(),tenantId:Digit.ULBService.getCurrentTenantId()}),[]),"employee"===n?i.createElement(V,{path:a,url:u,userType:n}):i.createElement(S,null)},Gi=e=>{let{matchPath:n}=e;const{t:r}=o.useTranslation(),[a,u,c]=Digit.Hooks.useSessionStorage("WT",{});l.useEffect(()=>{c()},[]);const s=[{link:n+"/wt",i18nKey:r("WT_REAQUEST_TANKER")},{link:n+"/wt/status",i18nKey:r("WT_VIEW_APPLICATIONS")}];return i.createElement(t.CitizenHomeCard,{header:r("WATER_TANKER_SERVICE"),links:s,Icon:()=>i.createElement(t.PTIcon,{className:"fill-path-primary-main"})})},Ki={ApplicantDetails:t.ApplicantDetails,AddressDetails:t.AddressDetails,WTCreate:()=>{var e,n,l,u,c,d,p,f;const m=a.useQueryClient(),E=r.useRouteMatch(),{t:_}=o.useTranslation(),{pathname:g}=r.useLocation(),h=r.useHistory();let S=[];const[y,b,T]=Digit.Hooks.useSessionStorage("WT_Create",{});function C(e,t,n,l,i){if(void 0===i&&(i=!1),"owners"===e){let n=y.owners||[];n[l]=t,b(s({},y,{[e]:[...n]}))}else if("units"===e){let e=y.units||[];e=t,b(s({},y,{units:e}))}else b(s({},y,{[e]:s({},y[e],t)}));((e,t,n,l)=>{let i,o=g.split("/").pop(),r=o.charAt(o.length-1),a=!1;Number(parseInt(o))||"0"==o||"-1"==o?"-1"==o||"-2"==o?(o=g.slice(0,-3),o=o.split("/").pop(),a=!0):(o=g.slice(0,-2),o=o.split("/").pop(),a=!0):a=!1,isNaN(r)||(a=!0);let{nextStep:u={}}=S.find(e=>e.route===o),c=h.push;if(e&&(c=h.replace),n&&(u=l),"request-details"===u){var s,d;const e=null==y||null===(s=y.serviceType)||void 0===s||null===(d=s.serviceType)||void 0===d?void 0:d.code;"MobileToilet"===e?u="toiletRequest-details":"TREE_PRUNING"===e&&(u="treePruningRequest-details")}if(null===u)return c(E.path+"/check");i=isNaN(u.split("/").pop())&&a&&"map"!==u?E.path+"/"+u+"/"+t:E.path+"/"+u,c(i)})(n,l,i,e)}y.serviceType&&0!==Object.keys(y.serviceType).length||!g.includes("employee")||(g.includes("mt")?(console.log("MT Create"),b({serviceType:{serviceType:{code:"MobileToilet",i18nKey:"Mobile Toilet",value:"Mobile Toilet"}}})):g.includes("tp")?b({serviceType:{serviceType:{code:"TREE_PRUNING",i18nKey:"Tree Pruning",value:"Tree Pruning"}}}):b({serviceType:{serviceType:{code:"WT",i18nKey:"Water Tanker",value:"Water Tanker"}}})),y&&Object.keys(y).length>0&&window.location.href.includes("/service-type")&&"true"!==sessionStorage.getItem("docReqScreenByBack")&&(T(),m.invalidateQueries("WT_Create"));const A=()=>{T(),m.invalidateQueries("WT_Create")};v.forEach(e=>{S=S.concat(e.body.filter(e=>!e.hideInCitizen))}),S.indexRoute=g.includes("citizen")?"service-type":"info";const D=null===(e=Digit)||void 0===e||null===(n=e.ComponentRegistryService)||void 0===n?void 0:n.getComponent("WTCheckPage"),N=null===(l=Digit)||void 0===l||null===(u=l.ComponentRegistryService)||void 0===u?void 0:u.getComponent("WTAcknowledgement"),I=null===(c=Digit)||void 0===c||null===(d=c.ComponentRegistryService)||void 0===d?void 0:d.getComponent("MTAcknowledgement"),w=null===(p=Digit)||void 0===p||null===(f=p.ComponentRegistryService)||void 0===f?void 0:f.getComponent("TPAcknowledgement");return i.createElement(i.Fragment,null,i.createElement(t.Timeline,{config:S}),i.createElement(r.Switch,null,S.map((e,t)=>{const{component:n,texts:l,inputs:o,key:a,additionaFields:u}=e,c="string"==typeof n?Digit.ComponentRegistryService.getComponent(n):n;return i.createElement(r.Route,{path:E.path+"/"+e.route,key:t},i.createElement(c,{config:{texts:l,inputs:o,key:a,additionaFields:u},onSelect:C,t:_,formData:y}))}),i.createElement(r.Route,{path:E.path+"/check"},i.createElement(D,{onSubmit:function(){try{var e,t,n,l,i,o;return"WT"===(null==y||null===(e=y.serviceType)||void 0===e||null===(t=e.serviceType)||void 0===t?void 0:t.code)&&h.push(E.path+"/wt-acknowledgement"),"MobileToilet"===(null==y||null===(n=y.serviceType)||void 0===n||null===(l=n.serviceType)||void 0===l?void 0:l.code)&&h.push(E.path+"/mt-acknowledgement"),"TREE_PRUNING"===(null==y||null===(i=y.serviceType)||void 0===i||null===(o=i.serviceType)||void 0===o?void 0:o.code)&&h.push(E.path+"/tp-acknowledgement"),Promise.resolve()}catch(e){return Promise.reject(e)}},value:y})),i.createElement(r.Route,{path:E.path+"/wt-acknowledgement"},i.createElement(N,{data:y,onSuccess:A})),i.createElement(r.Route,{path:E.path+"/mt-acknowledgement"},i.createElement(I,{data:y,onSuccess:A})),i.createElement(r.Route,{path:E.path+"/tp-acknowledgement"},i.createElement(w,{data:y,onSuccess:A})),i.createElement(r.Route,null,i.createElement(r.Redirect,{to:E.path+"/"+S.indexRoute}))))},InfoPage:e=>{var n,o;let{t:r,onSelect:a,formData:u,config:c}=e;const[d,v]=l.useState(""),[p,f]=l.useState(!1),[m,E]=l.useState(!1),_={MobileToilet:"MT_MODULE",WT:"WT_MODULE",TREE_PRUNING:"TREE_PRUNING"}[null==u||null===(n=u.serviceType)||void 0===n||null===(o=n.serviceType)||void 0===o?void 0:o.code],g=()=>{const e=s({},u.infodetails||{},{existingDataSet:d});a(c.key,s({},u[c.key],e))};return i.createElement(i.Fragment,null,i.createElement(t.Card,null,_&&i.createElement(t.CardHeader,null,r(_)),i.createElement("div",null,i.createElement(t.CardText,{className:"primaryColor"},r("SV_DOC_REQ_SCREEN_SUB_HEADER")),i.createElement(t.CardText,{className:"primaryColor"},r("SV_DOC_REQ_SCREEN_TEXT")),i.createElement(t.CardText,{className:"primaryColor"},r("SV_DOC_REQ_SCREEN_SUB_TEXT"))),i.createElement("span",null,i.createElement(t.SubmitBar,{label:r("COMMON_NEXT"),onSubmit:()=>{m?f(!0):g()}}))),p&&i.createElement(A,{t:r,closeModal:()=>f(!1),actionCancelOnSubmit:()=>f(!1),onSubmit:()=>{g(),f(!1)},setExistingDataSet:v}))},RequestDetails:e=>{var n,o,r,a,u,c,d,v;let{t:p,config:f,onSelect:m,formData:E}=e;const _=Digit.UserService.getUser().info;let g={};const[h,S]=l.useState((null==E||null===(n=E.requestDetails)||void 0===n?void 0:n.tankerType)||""),[y,b]=l.useState((null==E||null===(o=E.requestDetails)||void 0===o?void 0:o.tankerQuantity)||""),[T,C]=l.useState((null==E||null===(r=E.requestDetails)||void 0===r?void 0:r.waterQuantity)||""),[A,D]=l.useState((null==E||null===(a=E.requestDetails)||void 0===a?void 0:a.waterType)||""),[N,I]=l.useState((null==E||null===(u=E.requestDetails)||void 0===u?void 0:u.deliveryDate)||""),[w,O]=l.useState((null==E||null===(c=E.requestDetails)||void 0===c?void 0:c.description)||""),[x,R]=l.useState((null==E||null===(d=E.requestDetails)||void 0===d?void 0:d.deliveryTime)||""),[L,P]=l.useState((null==E||null===(v=E.requestDetails)||void 0===v?void 0:v.extraCharge)||!1),k=Digit.ULBService.getStateId(),M={width:"EMPLOYEE"===_.type?"50%":"100%"},{data:F}=Digit.Hooks.useCustomMDMS(k,"request-service",[{name:"VehicleType"}],{select:e=>{var t;return null==e||null===(t=e["request-service"])||void 0===t?void 0:t.VehicleType}}),{data:B}=Digit.Hooks.useCustomMDMS(k,"request-service",[{name:"TankerType"}],{select:e=>{var t;return null==e||null===(t=e["request-service"])||void 0===t?void 0:t.TankerType}}),{data:U}=Digit.Hooks.useCustomMDMS(k,"request-service",[{name:"TankerQuantity"}],{select:e=>{var t;return null==e||null===(t=e["request-service"])||void 0===t?void 0:t.TankerQuantity}}),{data:W}=Digit.Hooks.useCustomMDMS(k,"Request-service",[{name:"WaterType"}],{select:e=>{var t;return null==e||null===(t=e["Request-service"])||void 0===t?void 0:t.WaterType}});let j=[],H=[],z=[],V=[];W&&W.map(e=>{V.push({i18nKey:""+e.code,code:""+e.code,value:""+e.code})}),U&&U.map(e=>{H.push({i18nKey:""+e.code,code:""+e.code,value:""+e.code})}),F&&F.map(e=>{j.push({i18nKey:""+e.capacity,code:""+e.capacity,value:""+e.capacity,vehicleType:e.vehicleType,capacityName:e.capacityName})}),B&&B.map(e=>{z.push({i18nKey:""+e.i18nKey,code:""+e.code,value:""+e.value})});const G=j.map(e=>{if(h.code===e.vehicleType)return{i18nKey:e.capacityName,code:e.code,value:e.capacityName}}).filter(e=>void 0!==e),K=()=>i.createElement("div",{className:"flex items-center"},i.createElement(t.TextInput,{type:"time",value:x,style:M,onChange:e=>R(e.target.value),min:"06:00",max:"23:59"}));return l.useEffect(()=>{!h&&null!=z&&z.length&&S(z[0])},[z]),i.createElement(i.Fragment,null,i.createElement(t.FormStep,{config:f,onSelect:()=>{let e=s({},E.requestDetails,{tankerType:h,deliveryDate:N,tankerQuantity:y,waterType:A,waterQuantity:T,deliveryTime:x,description:w,extraCharge:L});m(f.key,e,!1)},t:p,isDisabled:!(h&&N&&y&&T&&x&&w&&A)},i.createElement("div",null,i.createElement(t.CardLabel,null,""+p("WT_TANKER_TYPE")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.RadioButtons,{t:p,options:z,style:{display:"flex",flexWrap:"wrap",maxHeight:"30px"},innerStyles:{minWidth:"24%"},optionsKey:"i18nKey",name:"tankerType",value:h,selectedOption:h,onSelect:S,labelKey:"i18nKey",isPTFlow:!0}),i.createElement(t.CardLabel,null,""+p("WT_WATER_TYPE")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.Dropdown,{className:"form-field",selected:A,placeholder:p("WT_SELECT_WATER_TYPE"),select:D,option:V,style:M,optionKey:"i18nKey",t:p}),i.createElement(t.CardLabel,null,""+p("WT_WATER_QUANTITY")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.Dropdown,{className:"form-field",selected:T,placeholder:"Select Water Quantity",select:C,option:G,style:M,optionKey:"i18nKey",t:p}),i.createElement(t.CardLabel,null,""+p("WT_TANKER_QUANTITY")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.Dropdown,{className:"form-field",selected:y,placeholder:"Select Tanker Quantity",select:b,option:H,style:M,optionKey:"i18nKey",t:p}),i.createElement(t.CardLabel,null,""+p("WT_DELIVERY_DATE")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.TextInput,{t:p,type:"date",isMandatory:!1,optionKey:"i18nKey",name:"deliveryDate",style:M,value:N,onChange:function(e){I(e.target.value)},min:(new Date).toISOString().split("T")[0],rules:{required:p("CORE_COMMON_REQUIRED_ERRMSG"),validDate:e=>!!/^\d{4}-\d{2}-\d{2}$/.test(e)||p("ERR_DEFAULT_INPUT_FIELD_MSG")}}),i.createElement(t.CardLabel,null,""+p("WT_DELIVERY_TIME")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(K,null),i.createElement(t.CardLabel,null,""+p("WT_DESCRIPTION")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.TextArea,s({t:p,type:"text",isMandatory:!1,optionKey:"i18nKey",name:"description",value:w,onChange:function(e){O(e.target.value)},style:M,ValidationRequired:!0},g={isRequired:!0,pattern:"^[a-zA-Z ]+$",type:"tel",title:p("PT_NAME_ERROR_MESSAGE")})),i.createElement(t.CheckBox,{label:p("WT_IMMEDIATE"),onChange:()=>{P(!L)},checked:L}))))},WTCheckPage:e=>{var n,r,a,u,c,s,d,v,E,_,g,h;let{onSubmit:S,value:y={}}=e;const{t:b}=o.useTranslation(),{owner:T,requestDetails:C,address:A,serviceType:N,toiletRequestDetails:I,treePruningRequestDetails:w}=y,[O,x]=l.useState(!1),R=null!=C&&C.extraCharge?"YES":"NO";return i.createElement(i.Fragment,null,i.createElement(t.Card,null,i.createElement(t.CardHeader,null,b("WT_SUMMARY_PAGE")),i.createElement("div",null,i.createElement(t.CardSubHeader,null,b("ES_TITILE_OWNER_DETAILS")),i.createElement(t.StatusTable,{style:{marginTop:"30px",marginBottom:"30px"}},i.createElement(t.Row,{label:b("COMMON_APPLICANT_NAME"),text:""+b(p(null==T?void 0:T.applicantName)),actionButton:i.createElement(D,{jumpTo:"/digit-ui/citizen/wt/request-service/applicant-details"})}),i.createElement(t.Row,{label:b("COMMON_MOBILE_NUMBER"),text:""+b(p(null==T?void 0:T.mobileNumber))}),i.createElement(t.Row,{label:b("COMMON_ALT_MOBILE_NUMBER"),text:""+b(p(null==T?void 0:T.alternateNumber))}),i.createElement(t.Row,{label:b("COMMON_EMAIL_ID"),text:""+b(p(null==T?void 0:T.emailId))})),i.createElement(t.CardSubHeader,null,b("ES_TITLE_ADDRESS_DETAILS")),i.createElement(t.StatusTable,{style:{marginTop:"30px",marginBottom:"30px"}},i.createElement(t.Row,{label:b("HOUSE_NO"),text:""+b(p(null==A?void 0:A.houseNo)),actionButton:i.createElement(D,{jumpTo:"/digit-ui/citizen/wt/request-service/address-details"})}),i.createElement(t.Row,{label:b("ADDRESS_LINE1"),text:""+b(p(null==A?void 0:A.addressLine1))}),i.createElement(t.Row,{label:b("ADDRESS_LINE2"),text:""+b(p(null==A?void 0:A.addressLine2))}),i.createElement(t.Row,{label:b("CITY"),text:""+b(p(null==A||null===(n=A.city)||void 0===n||null===(r=n.city)||void 0===r?void 0:r.name))}),i.createElement(t.Row,{label:b("LOCALITY"),text:""+b(p(null==A||null===(a=A.locality)||void 0===a?void 0:a.i18nKey))}),i.createElement(t.Row,{label:b("PINCODE"),text:""+b(p(null==A?void 0:A.pincode))}),i.createElement(t.Row,{label:b("LANDMARK"),text:""+b(p(null==A?void 0:A.landmark))}),i.createElement(t.Row,{label:b("STREET_NAME"),text:""+b(p(null==A?void 0:A.streetName))})),"WT"===(null==N||null===(u=N.serviceType)||void 0===u?void 0:u.code)&&i.createElement(l.Fragment,null,i.createElement(t.CardSubHeader,null,b("WT_REQUEST_DETAILS")),i.createElement(t.StatusTable,{style:{marginTop:"30px",marginBottom:"30px"}},i.createElement(t.Row,{label:b("WT_TANKER_TYPE"),text:""+b(p(null==C||null===(c=C.tankerType)||void 0===c?void 0:c.value)),actionButton:i.createElement(D,{jumpTo:"/digit-ui/citizen/wt/request-service/request-details"})}),i.createElement(t.Row,{label:b("WT_WATER_TYPE"),text:""+b(p(null==C||null===(s=C.waterType)||void 0===s?void 0:s.code))}),i.createElement(t.Row,{label:b("WT_TANKER_QUANTITY"),text:""+b(p(null==C||null===(d=C.tankerQuantity)||void 0===d?void 0:d.code))}),i.createElement(t.Row,{label:b("WT_WATER_QUANTITY"),text:""+b(p(null==C||null===(v=C.waterQuantity)||void 0===v?void 0:v.value))}),i.createElement(t.Row,{label:b("WT_DELIVERY_DATE"),text:""+b(p(m(null==C?void 0:C.deliveryDate)))}),i.createElement(t.Row,{label:b("WT_DELIVERY_TIME"),text:""+p(f(null==C?void 0:C.deliveryTime))}),i.createElement(t.Row,{label:b("WT_DESCRIPTION"),text:""+b(p(null==C?void 0:C.description))}),i.createElement(t.Row,{label:b("WT_IMMEDIATE"),text:""+b(p(R))}))),"MobileToilet"===(null==N||null===(E=N.serviceType)||void 0===E?void 0:E.code)&&i.createElement(l.Fragment,null,i.createElement(t.CardSubHeader,null,b("ES_REQUEST_DETAILS")),i.createElement(t.StatusTable,{style:{marginTop:"30px",marginBottom:"30px"}},i.createElement(t.Row,{label:b("MT_NUMBER_OF_MOBILE_TOILETS"),text:""+b(p(null==I||null===(_=I.mobileToilet)||void 0===_?void 0:_.code)),actionButton:i.createElement(D,{jumpTo:"/digit-ui/citizen/wt/request-service/toiletRequest-details"})}),i.createElement(t.Row,{label:b("MT_DELIVERY_FROM_DATE"),text:""+b(p(m(null==I?void 0:I.deliveryfromDate)))}),i.createElement(t.Row,{label:b("MT_DELIVERY_TO_DATE"),text:""+b(m(p(null==I?void 0:I.deliverytoDate)))}),i.createElement(t.Row,{label:b("MT_REQUIREMNENT_FROM_TIME"),text:p(f(null==I?void 0:I.deliveryfromTime))}),i.createElement(t.Row,{label:b("MT_REQUIREMNENT_TO_TIME"),text:p(f(null==I?void 0:I.deliverytoTime))}),i.createElement(t.Row,{label:b("MT_SPECIAL_REQUEST"),text:""+b(p(null==I?void 0:I.specialRequest))}))),"TREE_PRUNING"===(null==N||null===(g=N.serviceType)||void 0===g?void 0:g.code)&&i.createElement(l.Fragment,null,i.createElement(t.CardSubHeader,null,b("TP_REQUEST_DETAILS")),i.createElement(t.StatusTable,{style:{marginTop:"30px",marginBottom:"30px"}},i.createElement(t.Row,{label:b("REASON_FOR_PRUNING"),text:""+b(p(null==w||null===(h=w.reasonOfPruning)||void 0===h?void 0:h.code)),actionButton:i.createElement(D,{jumpTo:"/digit-ui/citizen/wt/request-service/treePruningRequest-details"})}),i.createElement(t.Row,{label:b("LOCATION_GEOTAG"),text:""+b(p(null==w?void 0:w.geoTagLocation))}),i.createElement(t.Row,{label:b("UPLOAD_THE_SITE_PHOTOGRAPH"),text:i.createElement("span",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer"},onClick:()=>{Digit.UploadServices.Filefetch([null==w?void 0:w.supportingDocumentFile],Digit.ULBService.getStateId()).then(e=>{var t,n,l;const i=null==e||null===(t=e.data)||void 0===t||null===(n=t.fileStoreIds)||void 0===n||null===(l=n[0])||void 0===l?void 0:l.url;if(i){const e=i.split(",")[0];e?window.open(e,"_blank"):console.error("No valid URL found to open!")}else console.error("URL is missing in the response!")}).catch(e=>{console.error("Error fetching file:",e)})}},i.createElement(t.GenericFileIcon,null))}))),i.createElement(t.CheckBox,{label:b("FINAL_DECLARATION_MESSAGE"),onChange:()=>{x(!O)},styles:{height:"auto",marginBottom:"30px",marginTop:"10px"}})),i.createElement(t.SubmitBar,{label:b("COMMON_BUTTON_SUBMIT"),onSubmit:S,disabled:!O})))},WTAcknowledgement:e=>{let{data:n,onSuccess:a}=e;const{t:u}=o.useTranslation(),c=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),d=Digit.Hooks.wt.useTankerCreateAPI(c),v=Digit.UserService.getUser().info,{data:p}=Digit.Hooks.useStore.getInitData(),{tenants:f}=p||{};return l.useEffect(()=>{try{n.tenantId=c;let e=(e=>{var t,n,l,i,o,r,a,u,c,s,d,v,p,f,m,E,_,g,h,S,y,b,T,C,A,D,N,I,w,O,x,R,L,P,k;return{waterTankerBookingDetail:{tenantId:null==e?void 0:e.tenantId,tankerType:null==e||null===(t=e.requestDetails)||void 0===t||null===(n=t.tankerType)||void 0===n?void 0:n.code,waterType:null==e||null===(l=e.requestDetails)||void 0===l||null===(i=l.waterType)||void 0===i?void 0:i.code,tankerQuantity:null==e||null===(o=e.requestDetails)||void 0===o||null===(r=o.tankerQuantity)||void 0===r?void 0:r.code,waterQuantity:null==e||null===(a=e.requestDetails)||void 0===a||null===(u=a.waterQuantity)||void 0===u?void 0:u.code,description:null==e||null===(c=e.requestDetails)||void 0===c?void 0:c.description,deliveryDate:null==e||null===(s=e.requestDetails)||void 0===s?void 0:s.deliveryDate,deliveryTime:null==e||null===(d=e.requestDetails)||void 0===d?void 0:d.deliveryTime,extraCharge:null!=e&&null!==(v=e.requestDetails)&&void 0!==v&&v.extraCharge?"Y":"N",addressDetailId:(null==e||null===(p=e.address)||void 0===p?void 0:p.addressDetailId)||"",applicantDetail:{name:null==e||null===(f=e.owner)||void 0===f?void 0:f.applicantName,mobileNumber:null==e||null===(m=e.owner)||void 0===m?void 0:m.mobileNumber,alternateNumber:null==e||null===(E=e.owner)||void 0===E?void 0:E.alternateNumber,emailId:null==e||null===(_=e.owner)||void 0===_?void 0:_.emailId},address:{addressType:null==e||null===(g=e.address)||void 0===g||null===(h=g.addressType)||void 0===h?void 0:h.code,pincode:null==e||null===(S=e.address)||void 0===S?void 0:S.pincode,city:null==e||null===(y=e.address)||void 0===y||null===(b=y.city)||void 0===b||null===(T=b.city)||void 0===T?void 0:T.name,cityCode:null==e||null===(C=e.address)||void 0===C||null===(A=C.city)||void 0===A||null===(D=A.city)||void 0===D?void 0:D.code,addressLine1:null==e||null===(N=e.address)||void 0===N?void 0:N.addressLine1,addressLine2:null==e||null===(I=e.address)||void 0===I?void 0:I.addressLine2,locality:null==e||null===(w=e.address)||void 0===w||null===(O=w.locality)||void 0===O?void 0:O.i18nKey,localityCode:null==e||null===(x=e.address)||void 0===x||null===(R=x.locality)||void 0===R?void 0:R.code,streetName:null==e||null===(L=e.address)||void 0===L?void 0:L.streetName,houseNo:null==e||null===(P=e.address)||void 0===P?void 0:P.houseNo,landmark:null==e||null===(k=e.address)||void 0===k?void 0:k.landmark},bookingStatus:"BOOKING_CREATED",workflow:{action:"APPLY",comments:"",businessService:"watertanker",moduleName:"request-service.water_tanker"}}}})(n);d.mutate(e,{onSuccess:a})}catch(e){}},[]),Digit.Hooks.useCustomBackNavigation({redirectPath:"${APPLICATION_PATH}/citizen"}),d.isLoading||d.isIdle?i.createElement(t.Loader,null):i.createElement(t.Card,null,i.createElement(x,{t:u,data:d.data,isSuccess:d.isSuccess,isLoading:d.isIdle||d.isLoading}),i.createElement(t.StatusTable,null,d.isSuccess&&i.createElement(t.Row,{rowContainerStyle:O,last:!0,textStyle:{whiteSpace:"pre",width:"60%"}})),d.isSuccess&&i.createElement(t.SubmitBar,{label:u("WT_DOWNLOAD_ACKNOWLEDGEMENT"),onSubmit:function(){try{var e;let t=null===(e=d.data)||void 0===e?void 0:e.waterTankerBookingDetail;const n=f.find(e=>e.code===t.tenantId);return Promise.resolve(I(s({},t),n,u)).then(function(e){Digit.Utils.pdf.generate(e)})}catch(e){return Promise.reject(e)}}}),i.createElement(r.Link,"CITIZEN"===(null==v?void 0:v.type)?{to:"/digit-ui/citizen"}:{to:"/digit-ui/employee"},i.createElement(t.LinkButton,{label:u("CORE_COMMON_GO_TO_HOME")})))},WTApplicationDetails:()=>{var e,n,a,u,c,v,p,E,_,g,h,S,y;const{t:b}=o.useTranslation(),{acknowledgementIds:T,tenantId:C}=r.useParams(),[A,D]=l.useState(!1),[N,w]=l.useState(null),{data:O}=Digit.Hooks.useStore.getInitData(),{tenants:x}=O||{},{isLoading:R,data:L,refetch:P}=Digit.Hooks.wt.useTankerSearchAPI({tenantId:C,filters:{bookingNo:T}}),k=Be(L,"waterTankerBookingDetail",[]);Be(L,"waterTankerBookingDetail[0].bookingNo",[]);let M=k&&k.length>0&&k[0]||{};const F=M;sessionStorage.setItem("wt",JSON.stringify(F));let B="N"===(null==M?void 0:M.extraCharge)?"No":"Yes";const U=Digit.Hooks.wt.useTankerCreateAPI(C,!1),{data:W,isLoading:j}=Digit.Hooks.useRecieptSearch({tenantId:C,businessService:"request-service.water_tanker",consumerCodes:T,isEmployee:!1},{enabled:!!T});let H=[];H.push({label:b("WT_DOWNLOAD_ACKNOWLEDGEMENT"),onClick:()=>z()});const z=function(){try{const e=F||{},t=x.find(t=>t.code===e.tenantId);return Promise.resolve(I(s({},e),t,b)).then(function(e){Digit.Utils.pdf.generate(e)})}catch(e){return Promise.reject(e)}};return R?i.createElement(t.Loader,null):(W&&(null==W?void 0:W.Payments.length)>0&&0==j&&H.push({label:b("WT_FEE_RECEIPT"),onClick:()=>{var e;return function(e){let{tenantId:t,payments:n}=e;d(e,He);try{function l(){return Promise.resolve(Digit.PaymentService.printReciept(t,{fileStoreIds:i})).then(function(e){window.open(e[i],"_blank")})}let e=k[0]||{},i=null==e?void 0:e.paymentReceiptFilestoreId;const o=function(){if(!i){let l={filestoreIds:[null==n?void 0:n.fileStoreId]};return Promise.resolve(Digit.PaymentService.generatePdf(t,{Payments:[s({},n)]},"request-service.water_tanker-receipt")).then(function(t){var n;l=t;const o=s({},e,{paymentReceiptFilestoreId:null===(n=l)||void 0===n?void 0:n.filestoreIds[0]});return Promise.resolve(U.mutateAsync({waterTankerBookingDetail:o})).then(function(){var e;i=null===(e=l)||void 0===e?void 0:e.filestoreIds[0],P()})})}}();return Promise.resolve(o&&o.then?o.then(l):l())}catch(e){return Promise.reject(e)}}({tenantId:null==W||null===(e=W.Payments[0])||void 0===e?void 0:e.tenantId,payments:null==W?void 0:W.Payments[0]})}}),i.createElement(i.Fragment,null,i.createElement("div",null,i.createElement("div",{className:"cardHeaderWithOptions",style:{marginRight:"auto",maxWidth:"960px"}},i.createElement(t.Header,{styles:{fontSize:"32px"}},b("WT_BOOKING_DETAILS")),H&&H.length>0&&i.createElement(t.MultiLink,{className:"multilinkWrapper",onHeadClick:()=>D(!A),displayOptions:A,options:H})),i.createElement(t.Card,null,i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:b("WT_BOOKING_NO"),text:null==M?void 0:M.bookingNo})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},b("WT_APPLICANT_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:b("WT_APPLICANT_NAME"),text:(null==M||null===(e=M.applicantDetail)||void 0===e?void 0:e.name)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_MOBILE_NUMBER"),text:(null==M||null===(n=M.applicantDetail)||void 0===n?void 0:n.mobileNumber)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_ALT_MOBILE_NUMBER"),text:(null==M||null===(a=M.applicantDetail)||void 0===a?void 0:a.alternateNumber)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_EMAIL_ID"),text:(null==M||null===(u=M.applicantDetail)||void 0===u?void 0:u.emailId)||b("CS_NA")})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},b("WT_ADDRESS_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:b("WT_PINCODE"),text:(null==M||null===(c=M.address)||void 0===c?void 0:c.pincode)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_CITY"),text:(null==M||null===(v=M.address)||void 0===v?void 0:v.city)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_LOCALITY"),text:(null==M||null===(p=M.address)||void 0===p?void 0:p.locality)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_STREET_NAME"),text:(null==M||null===(E=M.address)||void 0===E?void 0:E.streetName)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_DOOR_NO"),text:(null==M||null===(_=M.address)||void 0===_?void 0:_.doorNo)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_HOUSE_NO"),text:(null==M||null===(g=M.address)||void 0===g?void 0:g.houseNo)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_ADDRESS_LINE1"),text:(null==M||null===(h=M.address)||void 0===h?void 0:h.addressLine1)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_ADDRESS_LINE2"),text:(null==M||null===(S=M.address)||void 0===S?void 0:S.addressLine2)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_LANDMARK"),text:(null==M||null===(y=M.address)||void 0===y?void 0:y.landmark)||b("CS_NA")})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},b("ES_REQUEST_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:b("WT_TANKER_TYPE"),text:(null==M?void 0:M.tankerType)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_WATER_TYPE"),text:b(null==M?void 0:M.waterType)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_TANKER_QUANTITY"),text:(null==M?void 0:M.tankerQuantity)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_WATER_QUANTITY"),text:(null==M?void 0:M.waterQuantity)+" Ltr"||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_DELIVERY_DATE"),text:m(null==M?void 0:M.deliveryDate)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_DELIVERY_TIME"),text:f(null==M?void 0:M.deliveryTime)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_DESCRIPTION"),text:(null==M?void 0:M.description)||b("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:b("WT_IMMEDIATE"),text:B||b("CS_NA")})),i.createElement(je,{application:F,id:null==F?void 0:F.bookingNo,userType:"citizen"}),N&&i.createElement(t.Toast,{error:N.key,label:b(N.label),style:{bottom:"0px"},onClose:()=>{w(null)}})))))},MTApplicationDetails:()=>{var e,n,a,u,c,v,p,E,_,g,h,S;const{t:y}=o.useTranslation(),{acknowledgementIds:b,tenantId:T}=r.useParams(),[C,A]=l.useState(!1),[D,N]=l.useState(null),{data:I}=Digit.Hooks.useStore.getInitData(),{tenants:w}=I||{},{isLoading:O,data:x,refetch:R}=Digit.Hooks.wt.useMobileToiletSearchAPI({tenantId:T,filters:{bookingNo:b}}),L=Be(x,"mobileToiletBookingDetails",[]);Be(x,"mobileToiletBookingDetails[0].bookingNo",[]);let P=L&&L.length>0&&L[0]||{};const k=P;sessionStorage.setItem("mt",JSON.stringify(k));const M=Digit.Hooks.wt.useMobileToiletCreateAPI(T,!1),{data:F,isLoading:B}=Digit.Hooks.useRecieptSearch({tenantId:T,businessService:"request-service.mobile_toilet",consumerCodes:b,isEmployee:!1},{enabled:!!b});let U=[];if(U.push({label:y("MT_DOWNLOAD_ACKNOWLEDGEMENT"),onClick:()=>W()}),O)return i.createElement(t.Loader,null);F&&(null==F?void 0:F.Payments.length)>0&&0==B&&U.push({label:y("MT_FEE_RECEIPT"),onClick:()=>{var e;return function(e){let{tenantId:t,payments:n}=e;d(e,Hi);try{function l(){return Promise.resolve(Digit.PaymentService.printReciept(t,{fileStoreIds:i})).then(function(e){window.open(e[i],"_blank")})}let e=L[0]||{},i=null==e?void 0:e.paymentReceiptFilestoreId;const o=function(){if(!i){let l={filestoreIds:[null==n?void 0:n.fileStoreId]};return Promise.resolve(Digit.PaymentService.generatePdf(t,{Payments:[s({},n)]},"request-service.mobile_toilet-receipt")).then(function(t){var n;l=t;const o=s({},e,{paymentReceiptFilestoreId:null===(n=l)||void 0===n?void 0:n.filestoreIds[0]});return Promise.resolve(M.mutateAsync({mobileToiletBookingDetail:o})).then(function(){var e;i=null===(e=l)||void 0===e?void 0:e.filestoreIds[0],R()})})}}();return Promise.resolve(o&&o.then?o.then(l):l())}catch(e){return Promise.reject(e)}}({tenantId:null==F||null===(e=F.Payments[0])||void 0===e?void 0:e.tenantId,payments:null==F?void 0:F.Payments[0]})}});const W=function(){try{const e=k||{},t=w.find(t=>t.code===e.tenantId);return Promise.resolve(Li(s({},e),t,y)).then(function(e){Digit.Utils.pdf.generate(e)})}catch(e){return Promise.reject(e)}};return i.createElement(i.Fragment,null,i.createElement("div",null,i.createElement("div",{className:"cardHeaderWithOptions",style:{marginRight:"auto",maxWidth:"960px"}},i.createElement(t.Header,{styles:{fontSize:"32px"}},y("MT_BOOKING_DETAILS")),U.length>0&&i.createElement(t.MultiLink,{className:"multilinkWrapper",onHeadClick:()=>A(!C),displayOptions:C,options:U})),i.createElement(t.Card,null,i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:y("MT_BOOKING_NO"),text:null==P?void 0:P.bookingNo})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},y("MT_APPLICANT_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:y("MT_APPLICANT_NAME"),text:(null==P||null===(e=P.applicantDetail)||void 0===e?void 0:e.name)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_MOBILE_NUMBER"),text:(null==P||null===(n=P.applicantDetail)||void 0===n?void 0:n.mobileNumber)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_ALT_MOBILE_NUMBER"),text:(null==P||null===(a=P.applicantDetail)||void 0===a?void 0:a.alternateNumber)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_EMAIL_ID"),text:(null==P||null===(u=P.applicantDetail)||void 0===u?void 0:u.emailId)||y("CS_NA")})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},y("ES_TITLE_ADDRESS_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:y("PINCODE"),text:(null==P||null===(c=P.address)||void 0===c?void 0:c.pincode)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("CITY"),text:(null==P||null===(v=P.address)||void 0===v?void 0:v.city)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("LOCALITY"),text:(null==P||null===(p=P.address)||void 0===p?void 0:p.locality)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("STREET_NAME"),text:(null==P||null===(E=P.address)||void 0===E?void 0:E.streetName)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("HOUSE_NO"),text:(null==P||null===(_=P.address)||void 0===_?void 0:_.houseNo)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("ADDRESS_LINE1"),text:(null==P||null===(g=P.address)||void 0===g?void 0:g.addressLine1)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("ADDRESS_LINE2"),text:(null==P||null===(h=P.address)||void 0===h?void 0:h.addressLine2)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("LANDMARK"),text:(null==P||null===(S=P.address)||void 0===S?void 0:S.landmark)||y("CS_NA")})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},y("ES_REQUEST_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:y("MT_NUMBER_OF_MOBILE_TOILETS"),text:(null==P?void 0:P.noOfMobileToilet)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_DELIVERY_FROM_DATE"),text:m(null==P?void 0:P.deliveryFromDate)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_DELIVERY_TO_DATE"),text:m(null==P?void 0:P.deliveryToDate)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_REQUIREMNENT_FROM_TIME"),text:f(null==P?void 0:P.deliveryFromTime)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_REQUIREMNENT_TO_TIME"),text:f(null==P?void 0:P.deliveryToTime)||y("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:y("MT_SPECIAL_REQUEST"),text:(null==P?void 0:P.description)||y("CS_NA")})),i.createElement(je,{application:k,id:null==k?void 0:k.bookingNo,userType:"citizen"}),D&&i.createElement(t.Toast,{error:D.key,label:y(D.label),style:{bottom:"0px"},onClose:()=>{N(null)}}))))},TPApplicationDetails:()=>{var e,n,a,u,c,v,p,f,m,E,_,g;const{t:h}=o.useTranslation(),{acknowledgementIds:S,tenantId:y}=r.useParams(),[b,T]=l.useState(!1),[C,A]=l.useState(null),{data:D}=Digit.Hooks.useStore.getInitData(),{tenants:N}=D||{},{isLoading:I,data:w,refetch:O}=Digit.Hooks.wt.useTreePruningSearchAPI({tenantId:y,filters:{bookingNo:S}}),x=Be(w,"treePruningBookingDetails",[]);Be(w,"treePruningBookingDetails[0].bookingNo",[]);let R=x&&x.length>0&&x[0]||{};console.log("tp_details",R);const L=R;sessionStorage.setItem("tp",JSON.stringify(L));const P=Digit.Hooks.wt.useTreePruningCreateAPI(y,!1),{data:k,isLoading:M}=Digit.Hooks.useRecieptSearch({tenantId:y,businessService:"request-service.tree_pruning",consumerCodes:S,isEmployee:!1},{enabled:!!S});let F=[];if(F.push({label:h("TP_DOWNLOAD_ACKNOWLEDGEMENT"),onClick:()=>B()}),I)return i.createElement(t.Loader,null);k&&(null==k?void 0:k.Payments.length)>0&&0==M&&F.push({label:h("TP_FEE_RECEIPT"),onClick:()=>{var e;return function(e){let{tenantId:t,payments:n}=e;d(e,zi);try{function l(){return Promise.resolve(Digit.PaymentService.printReciept(t,{fileStoreIds:i})).then(function(e){window.open(e[i],"_blank")})}let e=x[0]||{},i=null==e?void 0:e.paymentReceiptFilestoreId;const o=function(){if(!i){let l={filestoreIds:[null==n?void 0:n.fileStoreId]};return Promise.resolve(Digit.PaymentService.generatePdf(t,{Payments:[s({},n)]},"request-service.tree_pruning-receipt")).then(function(t){var n;l=t;const o=s({},e,{paymentReceiptFilestoreId:null===(n=l)||void 0===n?void 0:n.filestoreIds[0]});return Promise.resolve(P.mutateAsync({treePruningBookingDetail:o})).then(function(){var e;i=null===(e=l)||void 0===e?void 0:e.filestoreIds[0],O()})})}}();return Promise.resolve(o&&o.then?o.then(l):l())}catch(e){return Promise.reject(e)}}({tenantId:null==k||null===(e=k.Payments[0])||void 0===e?void 0:e.tenantId,payments:null==k?void 0:k.Payments[0]})}});const B=function(){try{const e=L||{},t=N.find(t=>t.code===e.tenantId);return Promise.resolve(Bi(s({},e),t,h)).then(function(e){Digit.Utils.pdf.generate(e)})}catch(e){return Promise.reject(e)}};return i.createElement(i.Fragment,null,i.createElement("div",null,i.createElement("div",{className:"cardHeaderWithOptions",style:{marginRight:"auto",maxWidth:"960px"}},i.createElement(t.Header,{styles:{fontSize:"32px"}},h("TP_BOOKING_DETAILS")),F.length>0&&i.createElement(t.MultiLink,{className:"multilinkWrapper",onHeadClick:()=>T(!b),displayOptions:b,options:F})),i.createElement(t.Card,null,i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:h("WT_BOOKING_NO"),text:null==R?void 0:R.bookingNo})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},h("TP_APPLICANT_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:h("WT_APPLICANT_NAME"),text:(null==R||null===(e=R.applicantDetail)||void 0===e?void 0:e.name)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("WT_MOBILE_NUMBER"),text:(null==R||null===(n=R.applicantDetail)||void 0===n?void 0:n.mobileNumber)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("WT_ALT_MOBILE_NUMBER"),text:(null==R||null===(a=R.applicantDetail)||void 0===a?void 0:a.alternateNumber)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("WT_EMAIL_ID"),text:(null==R||null===(u=R.applicantDetail)||void 0===u?void 0:u.emailId)||h("CS_NA")})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},h("ES_TITLE_ADDRESS_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:h("PINCODE"),text:(null==R||null===(c=R.address)||void 0===c?void 0:c.pincode)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("CITY"),text:(null==R||null===(v=R.address)||void 0===v?void 0:v.city)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("LOCALITY"),text:(null==R||null===(p=R.address)||void 0===p?void 0:p.locality)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("STREET_NAME"),text:(null==R||null===(f=R.address)||void 0===f?void 0:f.streetName)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("HOUSE_NO"),text:(null==R||null===(m=R.address)||void 0===m?void 0:m.houseNo)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("ADDRESS_LINE1"),text:(null==R||null===(E=R.address)||void 0===E?void 0:E.addressLine1)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("ADDRESS_LINE2"),text:(null==R||null===(_=R.address)||void 0===_?void 0:_.addressLine2)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("LANDMARK"),text:(null==R||null===(g=R.address)||void 0===g?void 0:g.landmark)||h("CS_NA")})),i.createElement(t.CardSubHeader,{style:{fontSize:"24px"}},h("TP_REQUEST_DETAILS")),i.createElement(t.StatusTable,null,i.createElement(t.Row,{className:"border-none",label:h("REASON_FOR_PRUNING"),text:h(null==R?void 0:R.reasonForPruning)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("LATITUDE_GEOTAG"),text:(null==R?void 0:R.latitude)||h("CS_NA")}),i.createElement(t.Row,{className:"border-none",label:h("LONGITUDE_GEOTAG"),text:(null==R?void 0:R.longitude)||h("CS_NA")})),i.createElement(je,{application:L,id:null==L?void 0:L.bookingNo,userType:"citizen"}),C&&i.createElement(t.Toast,{error:C.key,label:h(C.label),style:{bottom:"0px"},onClose:()=>{A(null)}}))))},WTMyApplications:()=>{const{t:e}=o.useTranslation(),n=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),a=Digit.UserService.getUser().info,[u,c]=l.useState(""),[d,v]=l.useState(null),[p,f]=l.useState(null),[m,E]=l.useState("watertanker"),[_,g]=l.useState("watertanker");let h,S,y=window.location.href.split("/").pop();isNaN(parseInt(y))?h=4:(S=y,h=parseInt(y)+50);let b=isNaN(parseInt(y))?{limit:"4",sortOrder:"ASC",sortBy:"createdTime",offset:"0",tenantId:n,MobileNumber:null==a?void 0:a.mobileNumber}:{limit:"50",sortOrder:"ASC",sortBy:"createdTime",offset:S,tenantId:n,MobileNumber:null==a?void 0:a.mobileNumber};l.useEffect(()=>{f(b)},[y]);const{isLoading:T,data:C}=Digit.Hooks.wt.useTankerSearchAPI({filters:p},{enabled:!!p&&"watertanker"===m}),{isLoading:A,data:D}=Digit.Hooks.wt.useMobileToiletSearchAPI({filters:p},{enabled:!!p&&"mobileToilet"===m}),{isLoading:N,data:I}=Digit.Hooks.wt.useTreePruningSearchAPI({filters:p},{enabled:!!p&&"treePruning"===m});let w=!1,O=[];if("watertanker"===m?(w=T,O=(null==C?void 0:C.waterTankerBookingDetail)||[]):"mobileToilet"===m?(w=A,O=(null==D?void 0:D.mobileToiletBookingDetails)||[]):"treePruning"===m?(w=N,O=null==I?void 0:I.treePruningBookingDetails):(w=T||A||N,O=[...(null==D?void 0:D.mobileToiletBookingDetails)||[],...(null==C?void 0:C.waterTankerBookingDetail)||[],...(null==I?void 0:I.treePruningBookingDetails)||[]]),w)return i.createElement(t.Loader,null);const x=[{label:e("MOBILE_TOILET"),code:"mobileToilet"},{label:e("WATER_TANKER"),code:"watertanker"},{label:e("TREE_PRUNING"),code:"treePruning"}],R=[{i18nKey:"Booking Created",code:"BOOKING_CREATED",value:e("WT_BOOKING_CREATED")},{i18nKey:"Booking Approved",code:"APPROVED",value:e("WT_BOOKING_APPROVED")},{i18nKey:"Tanker Delivered",code:"TANKER_DELIVERED",value:e("WT_TANKER_DELIVERED")},{i18nKey:"Vendor Assigned",code:"ASSIGN_VENDOR",value:e("WT_ASSIGN_VENDOR")},{i18nKey:"Rejected",code:"REJECT",value:e("WT_BOOKING_REJECTED")}],L=[{i18nKey:"BOOKING_CREATED",code:"BOOKING_CREATED",value:e("TP_BOOKING_CREATED")},{i18nKey:"PENDING_FOR_APPROVAL",code:"PENDING_FOR_APPROVAL",value:e("TP_PENDING_FOR_APPROVAL")},{i18nKey:"PAYMENT_PENDING",code:"PAYMENT_PENDING",value:e("TP_PAYMENT_PENDING")},{i18nKey:"TEAM_ASSIGNMENT_FOR_VERIFICATION",code:"TEAM_ASSIGNMENT_FOR_VERIFICATION",value:e("TP_TEAM_ASSIGNMENT_FOR_VERIFICATION")},{i18nKey:"TEAM_ASSIGNMENT_FOR_EXECUTION",code:"TEAM_ASSIGNMENT_FOR_EXECUTION",value:e("TP_TEAM_ASSIGNMENT_FOR_EXECUTION")},{i18nKey:"TREE_PRUNING_SERVICE_COMPLETED",code:"TREE_PRUNING_SERVICE_COMPLETED",value:e("TP_TREE_PRUNING_SERVICE_COMPLETED")}];return i.createElement(i.Fragment,null,i.createElement(t.Header,null,e("MY_BOOKINGS")+" ("+O.length+")"),i.createElement(t.Card,null,i.createElement("div",{style:{marginLeft:"16px"}},i.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"16px"}},i.createElement("div",{style:{flex:1}},i.createElement(t.CardLabel,null,e("SERVICE_TYPE")),i.createElement(t.Dropdown,{selected:x.find(e=>e.code===_),select:e=>{g(e.code),v("")},option:x,placeholder:e("Select Service Type"),optionKey:"label",t:e})),i.createElement("div",{style:{flex:1}},i.createElement(t.CardLabel,null,e("BOOKING_NO")),i.createElement(t.TextInput,{placeholder:e("Enter Booking No."),value:u,onChange:e=>c(e.target.value)})),i.createElement("div",{style:{flex:1}},i.createElement("div",{style:{display:"flex",flexDirection:"column"}},i.createElement(t.CardLabel,null,e("PT_COMMON_TABLE_COL_STATUS_LABEL")),i.createElement(t.Dropdown,{className:"form-field",selected:d,select:v,option:"treePruning"===_?L:R,placeholder:e("Select Status"),optionKey:"value",style:{width:"100%"},t:e}))),i.createElement("div",null,i.createElement("div",{style:{marginTop:"17%"}},i.createElement(t.SubmitBar,{label:e("ES_COMMON_SEARCH"),onSubmit:()=>{E(_);const e=u.trim(),t=s({},b,{bookingNo:e||void 0,status:(null==d?void 0:d.code)||void 0});f(t)}}),i.createElement("p",{className:"link",style:{marginLeft:"30%",marginTop:"10px",display:"block"},onClick:()=>{c(""),v("")}},e("ES_COMMON_CLEAR_ALL"))))),i.createElement(r.Link,{to:"request-service/service-type"},i.createElement(t.SubmitBar,{style:{borderRadius:"30px",width:"20%"},label:e("NEW_REQUEST")+" +"})))),i.createElement("div",null,O.length>0&&O.map((t,l)=>i.createElement("div",{key:l},i.createElement(G,{application:t,tenantId:n,buttonLabel:e("SUMMARY")}))),0===O.length&&!w&&i.createElement("p",{style:{marginLeft:"16px",marginTop:"16px"}},e("NO_APPLICATION_FOUND_MSG")),0!==O.length&&((null==D?void 0:D.count)||0)+((null==C?void 0:C.count)||0)+((null==I?void 0:I.count)||0)>h&&i.createElement("div",null,i.createElement("p",{style:{marginLeft:"16px",marginTop:"16px"}},i.createElement("span",{className:"link"},i.createElement(r.Link,{to:"/digit-ui/citizen/wt/status/"+h},e("LOAD_MORE_MSG")))))))},ApplicationDetails:Ii,WFApplicationTimeline:je,WFCaption:We,WTEmpInbox:z,WTCitizenCard:()=>{const{t:e}=o.useTranslation(),[n,r]=l.useState("-"),a=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),{data:u,isFetching:c,isSuccess:s}=Digit.Hooks.useNewInboxGeneral({tenantId:a,ModuleCode:"WT",filters:{limit:10,offset:0,services:["watertanker"]},config:{select:e=>({totalCount:null==e?void 0:e.totalCount,nearingSlaCount:null==e?void 0:e.nearingSlaCount}||"-"),enabled:Digit.Utils.wtAccess()}});l.useEffect(()=>{!c&&s&&r(u)},[c]);const d=[{label:e("ES_COMMON_INBOX"),link:"/digit-ui/citizen/wt/inbox"},{label:e("ES_COMMON_APPLICATION_SEARCH"),link:"/digit-ui/citizen/wt/my-bookings"}],v={Icon:i.createElement(t.CHBIcon,null),moduleName:e("WT_MODULE_NAME"),kpis:[{count:null==n?void 0:n.totalCount,label:e("ES_TITLE_INBOX"),link:"/digit-ui/employee/wt/inbox"}],links:d};return i.createElement(t.EmployeeModuleCard,v)},ServiceTypes:e=>{var n;let{t:o,config:r,onSelect:a,userType:u,formData:c}=e;const d=Digit.ULBService.getStateId(),{data:v}=Digit.Hooks.useCustomMDMS(d,"request-service",[{name:"ServiceType"}],{select:e=>{var t;return null==e||null===(t=e["request-service"])||void 0===t?void 0:t.ServiceType}}),[p,f]=(Digit.UserService.getUser(),l.useState((null==c||null===(n=c.serviceType)||void 0===n?void 0:n.serviceType)||"")),m=l.useCallback(()=>{let e=s({},c.serviceType,{serviceType:p});a(r.key,e,!1)},[c.serviceType,p,a,r.key]);return l.useEffect(()=>{"citizen"===u&&(console.log("calling meeeeeee"),m())},[p,u,m]),i.createElement(t.Modal,{headerBarMain:i.createElement(xi,{t:o}),headerBarEnd:i.createElement(Oi,{onClick:()=>window.history.back()}),popupStyles:{backgroundColor:"#fff",position:"relative",maxHeight:"50vh",width:"50%",overflowY:"visible"},popupModuleMianStyles:{padding:"10px"},hideSubmit:!0,headerBarMainStyle:{position:"sticky",top:0,backgroundColor:"#f5f5f5"},formId:"modal-action"},i.createElement(i.Fragment,null,i.createElement(t.FormStep,{config:r,onSelect:m,t:o,isDisabled:!p},i.createElement("div",null,i.createElement(t.CardLabel,null,""+o("REQUEST_TYPE")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.Dropdown,{className:"form-field",selected:p,placeholder:"Select Service Type",select:f,option:v,optionKey:"i18nKey",t:o})))))},ToiletRequestDetails:e=>{var n,o,r,a,u,c;let{t:d,config:v,onSelect:p,userType:f,formData:m}=e;const E=Digit.UserService.getUser().info,[_,g]=l.useState((null==m||null===(n=m.toiletRequestDetails)||void 0===n?void 0:n.mobileToilet)||""),[h,S]=l.useState((null==m||null===(o=m.toiletRequestDetails)||void 0===o?void 0:o.deliveryfromTime)||""),[y,b]=l.useState((null==m||null===(r=m.toiletRequestDetails)||void 0===r?void 0:r.deliverytoTime)||""),[T,C]=l.useState((null==m||null===(a=m.toiletRequestDetails)||void 0===a?void 0:a.deliveryfromDate)||""),[A,D]=l.useState((null==m||null===(u=m.toiletRequestDetails)||void 0===u?void 0:u.deliverytoDate)||""),[N,I]=l.useState((null==m||null===(c=m.toiletRequestDetails)||void 0===c?void 0:c.specialRequest)||""),w=Digit.ULBService.getStateId(),O={width:"EMPLOYEE"===E.type?"52%":"100%"},{data:x}=Digit.Hooks.useCustomMDMS(w,"request-service",[{name:"NoOfMobileToilet"}],{select:e=>{var t;return null==e||null===(t=e["request-service"])||void 0===t?void 0:t.NoOfMobileToilet}});let R=[];x&&x.map(e=>{R.push({i18nKey:""+e.code,code:""+e.code,value:""+e.code})});const L=()=>i.createElement("div",{className:"flex items-center"},i.createElement(t.TextInput,{type:"time",value:h,style:O,onChange:e=>S(e.target.value),min:"06:00",max:"23:59"})),P=()=>i.createElement("div",{className:"flex items-center"},i.createElement(t.TextInput,{type:"time",value:y,style:O,onChange:e=>b(e.target.value),min:"06:00",max:"23:59"})),k=()=>{let e=s({},m.toiletRequestDetails,{mobileToilet:_,deliveryfromTime:h,deliverytoTime:y,deliveryfromDate:T,deliverytoDate:A,specialRequest:N});p(v.key,e,!1)};return l.useEffect(()=>{"citizen"===f&&k()},[_,h,y,T,A,N]),i.createElement(i.Fragment,null,i.createElement(t.FormStep,{config:v,onSelect:k,t:d,isDisabled:!(_&&h&&y&&T&&A&&N)},i.createElement("div",null,i.createElement(t.CardLabel,null,d("MT_NUMBER_OF_MOBILE_TOILETS")," ",i.createElement("span",{className:"check-page-link-button"},"*")),i.createElement(t.Dropdown,{className:"form-field",selected:_,placeholder:"Select Number of Mobile Toilets",select:g,option:R,style:O,optionKey:"i18nKey",t:d}),i.createElement(t.CardLabel,null,""+d("MT_DELIVERY_FROM_DATE")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.TextInput,{t:d,type:"date",isMandatory:!1,optionKey:"i18nKey",name:"deliveryDate",style:O,value:T,onChange:function(e){C(e.target.value)},min:(new Date).toISOString().split("T")[0],rules:{required:d("CORE_COMMON_REQUIRED_ERRMSG"),validDate:e=>!!/^\d{4}-\d{2}-\d{2}$/.test(e)||d("ERR_DEFAULT_INPUT_FIELD_MSG")}}),i.createElement(t.CardLabel,null,""+d("MT_DELIVERY_TO_DATE")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(t.TextInput,{t:d,type:"date",isMandatory:!1,optionKey:"i18nKey",name:"deliveryDate",value:A,style:O,onChange:function(e){D(e.target.value)},min:T,rules:{required:d("CORE_COMMON_REQUIRED_ERRMSG"),validDate:e=>!!/^\d{4}-\d{2}-\d{2}$/.test(e)||d("ERR_DEFAULT_INPUT_FIELD_MSG")}}),i.createElement(t.CardLabel,null,""+d("MT_REQUIREMNENT_FROM_TIME")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(L,null),i.createElement(t.CardLabel,null,""+d("MT_REQUIREMNENT_TO_TIME")," ",i.createElement("span",{className:"astericColor"},"*")),i.createElement(P,null),i.createElement(t.CardLabel,null,""+d("MT_SPECIAL_REQUEST")," ",i.createElement("span",{className:"check-page-link-button"})),i.createElement(t.TextArea,{t:d,type:"text",isMandatory:!1,optionKey:"i18nKey",name:"mobileToilet",style:O,placeholder:"Special Request",value:N,onChange:function(e){I(e.target.value)},style:{width:"EMPLOYEE"===E.type?"51.6%":null}}))))},TreePruningRequestDetails:e=>{var n,o,r;let{t:a,config:u,onSelect:c,userType:d,formData:v}=e;const p=Digit.UserService.getUser().info,[f,m]=l.useState((null==v||null===(n=v.treePruningRequestDetails)||void 0===n?void 0:n.reasonOfPruning)||""),[E,_]=l.useState(""),[g,h]=l.useState(""),[S,y]=l.useState((null==v||null===(o=v.treePruningRequestDetails)||void 0===o?void 0:o.geoTagLocation)||""),[b,T]=l.useState((null==v||null===(r=v.treePruningRequestDetails)||void 0===r?void 0:r.supportingDocumentFile)||""),[C,A]=l.useState(!1),[D,N]=l.useState(""),I=Digit.ULBService.getStateId(),w={width:"EMPLOYEE"===p.type?"50%":"100%"},{data:O}=Digit.Hooks.useCustomMDMS(I,"request-service",[{name:"ReasonPruningType"}],{select:e=>{var t;return null==e||null===(t=e["request-service"])||void 0===t?void 0:t.ReasonPruningType}}),x=()=>{let e=s({},v.treePruningRequestDetails,{reasonOfPruning:f,geoTagLocation:S,supportingDocumentFile:b,latitude:E,longitude:g});c(u.key,e,!1)};l.useEffect(()=>{"citizen"===d&&x()},[f,S,b,C]);const R=()=>i.createElement("div",{className:"loading-spinner"});return i.createElement(t.FormStep,{config:u,onSelect:x,t:a,isDisabled:!f||!b},i.createElement("div",null,i.createElement(t.CardLabel,null,a("REASON_FOR_PRUNING")," ",i.createElement("span",{className:"check-page-link-button"},"*")),i.createElement(t.Dropdown,{className:"form-field",selected:f,placeholder:"Select Reason",select:m,option:O,style:w,optionKey:"code",t:a}),i.createElement(t.CardLabel,null,a("LOCATION_GEOTAG")),i.createElement("div",{style:{display:"flex",alignItems:"stretch",gap:"8px",width:"EMPLOYEE"===p.type?"53%":"100%"}},i.createElement(t.TextInput,{t:a,type:"text",isMandatory:!1,optionKey:"i18nKey",name:"geoTagLocation",value:S,placeholder:"Select Location",onChange:e=>{const{name:t,value:n}=e.target?e.target:{name:e.name,value:e};"reasonOfPruning"===t?m(n):"geoTagLocation"===t||"location"===t?y(n):"supportingDocumentFile"===t&&T(n)},max:(new Date).toISOString().split("T")[0],style:{flex:1},rules:{required:a("dddddddd"),validDate:e=>!!/^\d{4}-\d{2}-\d{2}$/.test(e)||a("hhhhhhh")},className:"location-input"}),i.createElement("div",{className:"butt-icon",onClick:()=>{"geolocation"in navigator?navigator.geolocation.getCurrentPosition(e=>{const{latitude:t,longitude:n}=e.coords;y(t+", "+n),_(t),h(n)},e=>{console.error("Error getting location:",e),alert("Unable to retrieve your location. Please check your browser settings.")}):alert("Geolocation is not supported by your browser.")},style:{cursor:"pointer",width:"25px",marginBottom:"8px"}},i.createElement(t.LocationIcon,{className:"fill-path-primary-main"}))),i.createElement(t.CardLabel,null,a("UPLOAD_THE_SITE_PHOTOGRAPH")," ",i.createElement("span",{className:"check-page-link-button"},"*")),i.createElement("div",{style:s({marginBottom:"16px"},w)},i.createElement(t.UploadFile,{id:"supportingDocument",onUpload:e=>((e,t)=>{const n=e.target.files[0];n.size>=5242880?(setError("supportingDocument",{message:a("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED")}),t(null)):(A(!0),Digit.UploadServices.Filestorage("TP",n,Digit.ULBService.getStateId()).then(e=>{var n,l;(null==e||null===(n=e.data)||void 0===n||null===(l=n.files)||void 0===l?void 0:l.length)>0?t(e.data.files[0].fileStoreId):setError("supportingDocument",{message:a("CS_FILE_UPLOAD_ERROR")})}).catch(()=>setError("supportingDocument",{message:a("CS_FILE_UPLOAD_ERROR")})).finally(()=>A(!1)))})(e,T),onDelete:()=>{T(null)},message:C?i.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},i.createElement(R,null),i.createElement("span",null,"Uploading...")):b?"1 File Uploaded":"No File Uploaded",textStyles:{width:"100%"},accept:"image/*, .pdf, .png, .jpeg, .jpg",buttonType:"button",error:D||!b}))))},MTAcknowledgement:e=>{let{data:n,onSuccess:a}=e;const{t:u}=o.useTranslation(),c=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),d=Digit.Hooks.wt.useMobileToiletCreateAPI(c),v=Digit.UserService.getUser().info,{data:p}=Digit.Hooks.useStore.getInitData(),{tenants:f}=p||{};return l.useEffect(()=>{try{n.tenantId=c;let e=(e=>{var t,n,l,i,o,r,a,u,c,s,d,v,p,f,m,E,_,g,h,S,y,b,T,C,A,D,N,I,w,O;return{mobileToiletBookingDetail:{tenantId:null==e?void 0:e.tenantId,description:null==e||null===(t=e.toiletRequestDetails)||void 0===t?void 0:t.specialRequest,noOfMobileToilet:null==e||null===(n=e.toiletRequestDetails)||void 0===n||null===(l=n.mobileToilet)||void 0===l?void 0:l.code,deliveryFromDate:null==e||null===(i=e.toiletRequestDetails)||void 0===i?void 0:i.deliveryfromDate,deliveryToDate:null==e||null===(o=e.toiletRequestDetails)||void 0===o?void 0:o.deliverytoDate,deliveryFromTime:null==e||null===(r=e.toiletRequestDetails)||void 0===r?void 0:r.deliveryfromTime,deliveryToTime:null==e||null===(a=e.toiletRequestDetails)||void 0===a?void 0:a.deliverytoTime,addressDetailId:(null==e||null===(u=e.address)||void 0===u?void 0:u.addressDetailId)||"",applicantDetail:{name:null==e||null===(c=e.owner)||void 0===c?void 0:c.applicantName,mobileNumber:null==e||null===(s=e.owner)||void 0===s?void 0:s.mobileNumber,alternateNumber:null==e||null===(d=e.owner)||void 0===d?void 0:d.alternateNumber,emailId:null==e||null===(v=e.owner)||void 0===v?void 0:v.emailId},address:{addressType:null==e||null===(p=e.address)||void 0===p||null===(f=p.addressType)||void 0===f?void 0:f.code,pincode:null==e||null===(m=e.address)||void 0===m?void 0:m.pincode,city:null==e||null===(E=e.address)||void 0===E||null===(_=E.city)||void 0===_||null===(g=_.city)||void 0===g?void 0:g.name,cityCode:null==e||null===(h=e.address)||void 0===h||null===(S=h.city)||void 0===S||null===(y=S.city)||void 0===y?void 0:y.code,addressLine1:null==e||null===(b=e.address)||void 0===b?void 0:b.addressLine1,addressLine2:null==e||null===(T=e.address)||void 0===T?void 0:T.addressLine2,locality:null==e||null===(C=e.address)||void 0===C||null===(A=C.locality)||void 0===A?void 0:A.i18nKey,localityCode:null==e||null===(D=e.address)||void 0===D||null===(N=D.locality)||void 0===N?void 0:N.code,streetName:null==e||null===(I=e.address)||void 0===I?void 0:I.streetName,houseNo:null==e||null===(w=e.address)||void 0===w?void 0:w.houseNo,landmark:null==e||null===(O=e.address)||void 0===O?void 0:O.landmark},bookingStatus:"BOOKING_CREATED",workflow:{action:"APPLY",comments:"",businessService:"mobileToilet",moduleName:"request-service.mobile_toilet"}}}})(n);d.mutate(e,{onSuccess:a})}catch(e){}},[]),Digit.Hooks.useCustomBackNavigation({redirectPath:"${APPLICATION_PATH}/citizen"}),d.isLoading||d.isIdle?i.createElement(t.Loader,null):i.createElement(t.Card,null,i.createElement(Mi,{t:u,data:d.data,isSuccess:d.isSuccess,isLoading:d.isIdle||d.isLoading}),i.createElement(t.StatusTable,null,d.isSuccess&&i.createElement(t.Row,{rowContainerStyle:ki,last:!0,textStyle:{whiteSpace:"pre",width:"60%"}})),d.isSuccess&&i.createElement(t.SubmitBar,{label:u("MT_DOWNLOAD_ACKNOWLEDGEMENT"),onSubmit:function(){try{var e;let t=null===(e=d.data)||void 0===e?void 0:e.mobileToiletBookingDetail;const n=f.find(e=>e.code===t.tenantId);return Promise.resolve(Li(s({},t),n,u)).then(function(e){Digit.Utils.pdf.generate(e)})}catch(e){return Promise.reject(e)}}}),i.createElement(r.Link,"CITIZEN"===(null==v?void 0:v.type)?{to:"/digit-ui/citizen"}:{to:"/digit-ui/employee"},i.createElement(t.LinkButton,{label:u("CORE_COMMON_GO_TO_HOME")})))},TPAcknowledgement:e=>{let{data:n,onSuccess:a}=e;const{t:u}=o.useTranslation(),c=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),d=Digit.Hooks.wt.useTreePruningCreateAPI(c),v=Digit.UserService.getUser().info,{data:p}=Digit.Hooks.useStore.getInitData(),{tenants:f}=p||{};return l.useEffect(()=>{try{n.tenantId=c;let e=(e=>{var t,n,l,i,o,r,a,u,c,s,d,v,p,f,m,E,_,g,h,S,y,b,T,C,A,D,N;return{treePruningBookingDetail:{tenantId:null==e?void 0:e.tenantId,latitude:null==e||null===(t=e.treePruningRequestDetails)||void 0===t?void 0:t.latitude,longitude:null==e||null===(n=e.treePruningRequestDetails)||void 0===n?void 0:n.longitude,reasonForPruning:null==e||null===(l=e.treePruningRequestDetails)||void 0===l||null===(i=l.reasonOfPruning)||void 0===i?void 0:i.code,applicantDetail:{name:null==e||null===(o=e.owner)||void 0===o?void 0:o.applicantName,mobileNumber:null==e||null===(r=e.owner)||void 0===r?void 0:r.mobileNumber,alternateNumber:null==e||null===(a=e.owner)||void 0===a?void 0:a.alternateNumber,emailId:null==e||null===(u=e.owner)||void 0===u?void 0:u.emailId},documentDetails:[{documentType:"Site Photograph",fileStoreId:null==e||null===(c=e.treePruningRequestDetails)||void 0===c?void 0:c.supportingDocumentFile}],address:{addressType:null==e||null===(s=e.address)||void 0===s||null===(d=s.addressType)||void 0===d?void 0:d.code,pincode:null==e||null===(v=e.address)||void 0===v?void 0:v.pincode,city:null==e||null===(p=e.address)||void 0===p||null===(f=p.city)||void 0===f||null===(m=f.city)||void 0===m?void 0:m.name,cityCode:null==e||null===(E=e.address)||void 0===E||null===(_=E.city)||void 0===_||null===(g=_.city)||void 0===g?void 0:g.code,addressLine1:null==e||null===(h=e.address)||void 0===h?void 0:h.addressLine1,addressLine2:null==e||null===(S=e.address)||void 0===S?void 0:S.addressLine2,locality:null==e||null===(y=e.address)||void 0===y||null===(b=y.locality)||void 0===b?void 0:b.i18nKey,localityCode:null==e||null===(T=e.address)||void 0===T||null===(C=T.locality)||void 0===C?void 0:C.code,streetName:null==e||null===(A=e.address)||void 0===A?void 0:A.streetName,houseNo:null==e||null===(D=e.address)||void 0===D?void 0:D.houseNo,landmark:null==e||null===(N=e.address)||void 0===N?void 0:N.landmark},bookingStatus:"BOOKING_CREATED",workflow:{action:"APPLY",comments:"",businessService:"treePruning",moduleName:"request-service.tree_pruning"}}}})(n);d.mutate(e,{onSuccess:a})}catch(e){}},[]),Digit.Hooks.useCustomBackNavigation({redirectPath:"${APPLICATION_PATH}/citizen"}),d.isLoading||d.isIdle?i.createElement(t.Loader,null):i.createElement(t.Card,null,i.createElement(ji,{t:u,data:d.data,isSuccess:d.isSuccess,isLoading:d.isIdle||d.isLoading}),i.createElement(t.StatusTable,null,d.isSuccess&&i.createElement(t.Row,{rowContainerStyle:Wi,last:!0,textStyle:{whiteSpace:"pre",width:"60%"}})),d.isSuccess&&i.createElement(t.SubmitBar,{label:u("TP_DOWNLOAD_ACKNOWLEDGEMENT"),onSubmit:function(){try{var e;let t=null===(e=d.data)||void 0===e?void 0:e.treePruningBookingDetail;const n=f.find(e=>e.code===t.tenantId);return Promise.resolve(Bi(s({},t),n,u)).then(function(e){Digit.Utils.pdf.generate(e)})}catch(e){return Promise.reject(e)}}}),i.createElement(r.Link,"CITIZEN"===(null==v?void 0:v.type)?{to:"/digit-ui/citizen"}:{to:"/digit-ui/employee"},i.createElement(t.LinkButton,{label:u("CORE_COMMON_GO_TO_HOME")})))},MTCitizenCard:()=>{const{t:e}=o.useTranslation(),[n,r]=l.useState("-"),a=Digit.ULBService.getCitizenCurrentTenant(!0)||Digit.ULBService.getCurrentTenantId(),{data:u,isFetching:c,isSuccess:s}=Digit.Hooks.useNewInboxGeneral({tenantId:a,ModuleCode:"WT",filters:{limit:10,offset:0,services:["mobileToilet"]},config:{select:e=>({totalCount:null==e?void 0:e.totalCount,nearingSlaCount:null==e?void 0:e.nearingSlaCount}||"-"),enabled:Digit.Utils.mtAccess()}});l.useEffect(()=>{!c&&s&&r(u)},[c]);const d=[{label:e("ES_COMMON_INBOX"),link:"/digit-ui/citizen/wt/mt/inbox"},{label:e("ES_COMMON_APPLICATION_SEARCH"),link:"/digit-ui/citizen/wt/mt/my-bookings"}],v={Icon:i.createElement(t.CHBIcon,null),moduleName:e("ACTION_TEST_MT"),kpis:[{count:null==n?void 0:n.totalCount,label:e("ES_TITLE_INBOX"),link:"/digit-ui/employee/wt/mt/inbox"}],links:d};return i.createElement(t.EmployeeModuleCard,v)}};exports.WTComponents={WTCard:()=>{const{t:e}=o.useTranslation(),[n,r]=l.useState("-"),{data:a,isLoading:u,isFetching:c,isSuccess:s}=Digit.Hooks.useNewInboxGeneral({tenantId:Digit.ULBService.getCurrentTenantId(),ModuleCode:"WT",filters:{limit:10,offset:0,services:["watertanker"]},config:{select:e=>({totalCount:null==e?void 0:e.totalCount,nearingSlaCount:null==e?void 0:e.nearingSlaCount}||"-"),enabled:Digit.Utils.wtAccess()}});l.useEffect(()=>{!c&&s&&r(a)},[c]);const d=[{count:u?"-":null==n?void 0:n.totalCount,label:e("ES_COMMON_INBOX"),link:"/digit-ui/employee/wt/inbox"},{label:e("ES_COMMON_APPLICATION_SEARCH"),link:"/digit-ui/employee/wt/my-bookings"},{label:e("WT_APPLICATION_CREATE"),link:"/digit-ui/employee/wt/request-service"}],v=Digit.UserService.hasAccess(["WT_CEMP"])||!1,p={Icon:i.createElement(t.CHBIcon,null),moduleName:e("WT_MODULE_NAME"),kpis:[{count:null==n?void 0:n.totalCount,label:e("ES_TITLE_INBOX"),link:"/digit-ui/employee/wt/inbox"}],links:d.filter(e=>!(null!=e&&e.role)||v)};return i.createElement(t.EmployeeModuleCard,p)},WTModule:Vi,MTCard:()=>{const{t:e}=o.useTranslation(),[n,r]=l.useState("-"),{data:a,isLoading:u,isFetching:c,isSuccess:s}=Digit.Hooks.useNewInboxGeneral({tenantId:Digit.ULBService.getCurrentTenantId(),ModuleCode:"MT",filters:{limit:10,offset:0,services:["mobileToilet"]},config:{select:e=>({totalCount:null==e?void 0:e.totalCount,nearingSlaCount:null==e?void 0:e.nearingSlaCount}||"-"),enabled:Digit.Utils.mtAccess()}});if(l.useEffect(()=>{!c&&s&&r(a)},[c]),!Digit.Utils.mtAccess())return null;const d=[{count:u?"-":null==n?void 0:n.totalCount,label:e("ES_COMMON_INBOX"),link:"/digit-ui/employee/wt/mt/inbox"},{label:e("ES_COMMON_APPLICATION_SEARCH"),link:"/digit-ui/employee/wt/mt/my-bookings"},{label:e("MT_APPLICATION_CREATE"),link:"/digit-ui/employee/wt/mt/request-service"}],v=Digit.UserService.hasAccess(["MT_CEMP"])||!1,p={Icon:i.createElement(t.CHBIcon,null),moduleName:e("ACTION_TEST_MT"),kpis:[{count:null==n?void 0:n.totalCount,label:e("ES_TITLE_INBOX"),link:"/digit-ui/employee/mt/inbox"}],links:d.filter(e=>!(null!=e&&e.role)||v)};return i.createElement(t.EmployeeModuleCard,p)},TPCard:()=>{const{t:e}=o.useTranslation(),[n,r]=l.useState("-"),{data:a,isLoading:u,isFetching:c,isSuccess:s}=Digit.Hooks.useNewInboxGeneral({tenantId:Digit.ULBService.getCurrentTenantId(),ModuleCode:"TP",filters:{limit:10,offset:0,services:["treePruning"]},config:{select:e=>({totalCount:null==e?void 0:e.totalCount,nearingSlaCount:null==e?void 0:e.nearingSlaCount}||"-"),enabled:Digit.Utils.tpAccess()}});l.useEffect(()=>{!c&&s&&r(a)},[c]);const d=[{count:u?"-":null==n?void 0:n.totalCount,label:e("ES_COMMON_INBOX"),link:"/digit-ui/employee/wt/tp/inbox"},{label:e("ES_COMMON_APPLICATION_SEARCH"),link:"/digit-ui/employee/wt/tp/my-bookings"},{label:e("TP_APPLICATION_CREATE"),link:"/digit-ui/employee/wt/tp/request-service"}],v=Digit.UserService.hasAccess(["TP_CEMP"])||!1,p={Icon:i.createElement(t.CHBIcon,null),moduleName:e("ACTION_TEST_TP"),kpis:[{count:null==n?void 0:n.totalCount,label:e("ES_TITLE_INBOX"),link:"/digit-ui/employee/wt/tp/inbox"}],links:d.filter(e=>!(null!=e&&e.role)||v)};return i.createElement(t.EmployeeModuleCard,p)},WTLinks:Gi,WT_INBOX_FILTER:e=>i.createElement(Ke,e),WTInboxTableConfig:e=>({WT:{inboxColumns:t=>[{Header:e("WT_BOOKING_NO"),Cell:e=>{var n,l,o,a;let{row:u}=e;return i.createElement("div",null,i.createElement("span",{className:"link"},i.createElement(r.Link,{to:t.parentRoute+"/booking-details/"+(null==u||null===(n=u.original)||void 0===n||null===(l=n.searchData)||void 0===l?void 0:l.bookingNo)},null===(o=u.original)||void 0===o||null===(a=o.searchData)||void 0===a?void 0:a.bookingNo)))},mobileCell:e=>{var t;return Ve(null==e||null===(t=e.searchData)||void 0===t?void 0:t.bookingNo)}},{Header:e("WT_APPLICANT_NAME"),Cell:e=>{var t,n,l,i,o;return ze(""+(null==e||null===(t=e.cell)||void 0===t||null===(n=t.row)||void 0===n||null===(l=n.original)||void 0===l||null===(i=l.searchData)||void 0===i||null===(o=i.applicantDetail)||void 0===o?void 0:o.name))},mobileCell:e=>{var t,n;return Ve(null==e||null===(t=e.searchData)||void 0===t||null===(n=t.applicantDetail)||void 0===n?void 0:n.name)}},{Header:e("WT_MOBILE_NUMBER"),Cell:e=>{var t,n,l,i,o;return ze(""+(null==e||null===(t=e.cell)||void 0===t||null===(n=t.row)||void 0===n||null===(l=n.original)||void 0===l||null===(i=l.searchData)||void 0===i||null===(o=i.applicantDetail)||void 0===o?void 0:o.mobileNumber))},mobileCell:e=>{var t,n;return Ve(null==e||null===(t=e.searchData)||void 0===t||null===(n=t.applicantDetail)||void 0===n?void 0:n.mobileNumber)}},{Header:e("LOCALITY"),Cell:t=>{var n,l;let{row:i}=t;return ze(e(""+(null===(n=i.original)||void 0===n||null===(l=n.searchData)||void 0===l?void 0:l.localityCode)))},mobileCell:t=>{var n;return Ve(e(""+(null==t||null===(n=t.searchData)||void 0===n?void 0:n.localityCode)))}},{Header:e("WT_STATUS"),Cell:t=>{var n,l,i;let{row:o}=t;return ze(e(""+(null==o||null===(n=o.original)||void 0===n||null===(l=n.workflowData)||void 0===l||null===(i=l.state)||void 0===i?void 0:i.applicationStatus)))},mobileCell:t=>{var n,l;return Ve(e("ES_WT_COMMON_STATUS_"+(null==t||null===(n=t.workflowData)||void 0===n||null===(l=n.state)||void 0===l?void 0:l.applicationStatus)))}}],serviceRequestIdKey:t=>{var n,l;return null==t||null===(n=t[e("WT_INBOX_UNIQUE_BOOKING_NO")])||void 0===n||null===(l=n.props)||void 0===l?void 0:l.children}},MT:{inboxColumns:t=>[{Header:e("MT_BOOKING_NO"),Cell:e=>{var n,l,o,a;let{row:u}=e;return i.createElement("div",null,i.createElement("span",{className:"link"},i.createElement(r.Link,{to:t.parentRoute+"/booking-details/"+(null==u||null===(n=u.original)||void 0===n||null===(l=n.searchData)||void 0===l?void 0:l.bookingNo)},null===(o=u.original)||void 0===o||null===(a=o.searchData)||void 0===a?void 0:a.bookingNo)))},mobileCell:e=>{var t;return Ve(null==e||null===(t=e.searchData)||void 0===t?void 0:t.bookingNo)}},{Header:e("MT_APPLICANT_NAME"),Cell:e=>{var t,n,l,i,o;return ze(""+(null==e||null===(t=e.cell)||void 0===t||null===(n=t.row)||void 0===n||null===(l=n.original)||void 0===l||null===(i=l.searchData)||void 0===i||null===(o=i.applicantDetail)||void 0===o?void 0:o.name))},mobileCell:e=>{var t,n;return Ve(null==e||null===(t=e.searchData)||void 0===t||null===(n=t.applicantDetail)||void 0===n?void 0:n.name)}},{Header:e("MT_MOBILE_NUMBER"),Cell:e=>{var t,n,l,i,o;return ze(""+(null==e||null===(t=e.cell)||void 0===t||null===(n=t.row)||void 0===n||null===(l=n.original)||void 0===l||null===(i=l.searchData)||void 0===i||null===(o=i.applicantDetail)||void 0===o?void 0:o.mobileNumber))},mobileCell:e=>{var t,n;return Ve(null==e||null===(t=e.searchData)||void 0===t||null===(n=t.applicantDetail)||void 0===n?void 0:n.mobileNumber)}},{Header:e("LOCALITY"),Cell:t=>{var n,l;let{row:i}=t;return ze(e(""+(null===(n=i.original)||void 0===n||null===(l=n.searchData)||void 0===l?void 0:l.localityCode)))},mobileCell:t=>{var n;return Ve(e(""+(null==t||null===(n=t.searchData)||void 0===n?void 0:n.localityCode)))}},{Header:e("MT_STATUS"),Cell:t=>{var n,l,i;let{row:o}=t;return ze(e(""+(null==o||null===(n=o.original)||void 0===n||null===(l=n.workflowData)||void 0===l||null===(i=l.state)||void 0===i?void 0:i.applicationStatus)))},mobileCell:t=>{var n,l;return Ve(e("ES_WT_COMMON_STATUS_"+(null==t||null===(n=t.workflowData)||void 0===n||null===(l=n.state)||void 0===l?void 0:l.applicationStatus)))}}],serviceRequestIdKey:t=>{var n,l;return null==t||null===(n=t[e("WT_INBOX_UNIQUE_BOOKING_NO")])||void 0===n||null===(l=n.props)||void 0===l?void 0:l.children}},TP:{inboxColumns:t=>[{Header:e("MT_BOOKING_NO"),Cell:e=>{var n,l,o,a;let{row:u}=e;return i.createElement("div",null,i.createElement("span",{className:"link"},i.createElement(r.Link,{to:t.parentRoute+"/booking-details/"+(null==u||null===(n=u.original)||void 0===n||null===(l=n.searchData)||void 0===l?void 0:l.bookingNo)},null===(o=u.original)||void 0===o||null===(a=o.searchData)||void 0===a?void 0:a.bookingNo)))},mobileCell:e=>{var t;return Ve(null==e||null===(t=e.searchData)||void 0===t?void 0:t.bookingNo)}},{Header:e("MT_APPLICANT_NAME"),Cell:e=>{var t,n,l,i,o;return ze(""+(null==e||null===(t=e.cell)||void 0===t||null===(n=t.row)||void 0===n||null===(l=n.original)||void 0===l||null===(i=l.searchData)||void 0===i||null===(o=i.applicantDetail)||void 0===o?void 0:o.name))},mobileCell:e=>{var t,n;return Ve(null==e||null===(t=e.searchData)||void 0===t||null===(n=t.applicantDetail)||void 0===n?void 0:n.name)}},{Header:e("MT_MOBILE_NUMBER"),Cell:e=>{var t,n,l,i,o;return ze(""+(null==e||null===(t=e.cell)||void 0===t||null===(n=t.row)||void 0===n||null===(l=n.original)||void 0===l||null===(i=l.searchData)||void 0===i||null===(o=i.applicantDetail)||void 0===o?void 0:o.mobileNumber))},mobileCell:e=>{var t,n;return Ve(null==e||null===(t=e.searchData)||void 0===t||null===(n=t.applicantDetail)||void 0===n?void 0:n.mobileNumber)}},{Header:e("LOCALITY"),Cell:t=>{var n,l;let{row:i}=t;return ze(e(""+(null===(n=i.original)||void 0===n||null===(l=n.searchData)||void 0===l?void 0:l.localityCode)))},mobileCell:t=>{var n;return Ve(e(""+(null==t||null===(n=t.searchData)||void 0===n?void 0:n.localityCode)))}},{Header:e("MT_STATUS"),Cell:t=>{var n,l,i;let{row:o}=t;return ze(e(""+(null==o||null===(n=o.original)||void 0===n||null===(l=n.workflowData)||void 0===l||null===(i=l.state)||void 0===i?void 0:i.applicationStatus)))},mobileCell:t=>{var n,l;return Ve(e("ES_WT_COMMON_STATUS_"+(null==t||null===(n=t.workflowData)||void 0===n||null===(l=n.state)||void 0===l?void 0:l.applicationStatus)))}}],serviceRequestIdKey:t=>{var n,l;return null==t||null===(n=t[e("WT_INBOX_UNIQUE_BOOKING_NO")])||void 0===n||null===(l=n.props)||void 0===l?void 0:l.children}}})},exports.WTLinks=Gi,exports.WTModule=Vi,exports.initWTComponents=()=>{Object.entries(Ki).forEach(e=>{let[t,n]=e;Digit.ComponentRegistryService.setComponent(t,n)})};