1/*! For license information please see Equipment.21a21d73.chunk.js.LICENSE.txt */ 2(this["webpackJsonpgeetee-web"]=this["webpackJsonpgeetee-web"]||[]).push([[60,10,11,15,18],{1038:function(e,t,n){"use strict";var r=n(8),i=n(9),a=n(6),o=n(0),s=n(44),c=n.n(s),l=n(25),u=n(237),d=n(55),p=n(341),h=n(326),f=n(307),m=n(40),g=n(591),b=n(416),v=n(474),j=n(473),x=n(572),O=n(2),y=Object(u.a)((function(e){return{content:Object(a.a)({width:"100%"},e.breakpoints.down("xs"),{padding:e.spacing(0)}),controls:Object(a.a)({display:"flex",alignItems:"center",gap:e.spacing(2),marginBottom:e.spacing(2),flexWrap:"wrap"},e.breakpoints.down("xs"),{flexDirection:"column",alignItems:"stretch",gap:e.spacing(1)}),tableSection:Object(a.a)({marginBottom:e.spacing(3)},e.breakpoints.down("xs"),{marginBottom:e.spacing(2)}),noDataMessage:Object(a.a)({padding:e.spacing(2),textAlign:"center"},e.breakpoints.down("xs"),{padding:e.spacing(1)})}}));t.a=Object(m.i)((function(e){var t,n=y(),a=Object(d.a)(),s=Object(p.a)(a.breakpoints.down("xs")),u=e.customerData,m=e.collection,w=e.customerField,C=void 0===w?"customerId":w,k=e.customerOp,D=void 0===k?"==":k,S=e.dateField,L=e.dateType,E=void 0===L?"timestamp":L,M=e.clientDateAccessor,P=e.mapRow,I=e.mobileColumns,N=e.desktopColumns,A=e.title,R=e.pathname,T=(e.noDataMessage,e.renderSummary),B=e.onRowClick,z=e.renderExtraControls,U=e.filterRow,_=Object(o.useState)((function(){return Object(j.b)()})),q=Object(i.a)(_,2),F=q[0],H=q[1],W=Object(o.useState)((function(){return Object(j.a)()})),V=Object(i.a)(W,2),Y=V[0],Z=V[1],G=function(e){H(e),Object(j.d)(e)},K=function(e){Z(e),Object(j.c)(e)},J=(null===(t=e.cachedData)||void 0===t?void 0:t.data)||[],Q=Object(o.useState)(!e.cachedData),$=Object(i.a)(Q,2),X=$[0],ee=$[1],te=Object(o.useState)(!!e.cachedData),ne=Object(i.a)(te,2),re=(ne[0],ne[1]),ie=function(){ee(!0),re(!0),Object(j.d)(F),Object(j.c)(Y);var t=l.c.collection(m).where(C,D,u.docId);"utcTimestamp"===E?t=t.where(S,">=",Object(x.d)(F)).where(S,"<=",Object(x.a)(Y)):"timestamp"===E?t=t.where(S,">=",c()(F).startOf("day").valueOf()).where(S,"<=",c()(Y).endOf("day").valueOf()):"string"===E&&(t=t.where(S,">=",c()(F).format("YYYY-MM-DD")).where(S,"<=",c()(Y).format("YYYY-MM-DD"))),t.get().then((function(t){var n=t.docs.map((function(e){var t=e.data();return P?P(t,e.id):Object(r.a)(Object(r.a)({},t),{},{docId:e.id})}));if("clientFilter"===E&&M){var i=Object(x.d)(F),a=Object(x.a)(Y);n=n.filter((function(e){var t=c.a.utc(M(e)).valueOf();return t>=i&&t<=a}))}U&&(n=n.filter(U)),e.onDataLoaded&&e.onDataLoaded({data:n}),ee(!1)})).catch((function(e){console.log(e.message),ee(!1)}))};return Object(o.useEffect)((function(){e.cachedData||ie()}),[e.cachedData]),Object(O.jsxs)("div",{className:n.content,children:[Object(O.jsxs)(h.a,{className:n.controls,children:[Object(O.jsx)(b.b,{label:"Start Date",value:F,onChange:G}
2),Object(O.jsx)(b.b,{label:"End Date",value:Y,onChange:K}),Object(O.jsx)(v.a,{startDateHandler:G,endDateHandler:K}),Object(O.jsx)(f.a,{variant:"contained",onClick:ie,disabled:X,children:"Generate"}),z&&z({data:J,loading:X})]}),Object(O.jsxs)(h.a,{className:n.tableSection,children:[Object(O.jsx)(g.a,{columns:s?I:N,data:J,title:A,pathname:R,isLoading:X,maxBodyHeight:"calc(100vh - 450px)",onRowClick:B,persistKey:"reportTable_"+m+"_"+C+(s?"_m":"_d")}),!X&&J.length>0&&T&&T(J)]})]})}))},1044:function(e,t,n){"use strict";var r=n(8),i=n(1),a=n(3),o=n(9),s=n(6),c=n(0),l=n.n(c),u=n(237),d=n(55),p=n(341),h=n(132),f=n(74),m=n(306),g=n(313),b=n(96),v=n(238),j=n(241),x=n(314),O=n(326),y=n(309),w=n(468),C=n(308),k=n(334),D=n(336),S=n(178),L=n(337),E=n(307),M=n(397),P=n.n(M),I=n(40),N=n(772),A=n(44),R=n.n(A),T=n(735),B=n(28),z=n.n(B),U=n(25),_=n(568),q=n(2),F=Object(u.a)((function(e){var t;return{paper:Object(s.a)({padding:e.spacing(2),borderRadius:e.spacing(.5),margin:e.spacing(1),width:"100%",maxWidth:"1000px"},e.breakpoints.down("xs"),{padding:e.spacing(1.5),margin:e.spacing(.5)}),sectionTitle:{marginBottom:e.spacing(1)},fieldRow:{display:"flex",alignItems:"center",minHeight:40},textField:Object(s.a)({width:"100%",maxWidth:150},e.breakpoints.down("xs"),{maxWidth:"100%"}),descriptionField:{width:"100%"},mapContainer:(t={width:"100%",height:350},Object(s.a)(t,e.breakpoints.down("sm"),{height:280}),Object(s.a)(t,e.breakpoints.down("xs"),{height:220}),t),ownerAutocomplete:Object(s.a)({maxWidth:300,width:"100%"},e.breakpoints.down("xs"),{maxWidth:"100%"})}})),H=["places"];t.a=Object(I.i)((function(e){var t,n,s,u,M=F(),I=Object(d.a)(),A=Object(p.a)(I.breakpoints.down("xs")),B=Object(_.h)({googleMapsApiKey:"AIzaSyBCB0Px7psLZfaPOa8LHvvFKNochbsRETw",libraries:H}),W=B.isLoaded,V=B.loadError,Y=l.a.useState({}),Z=Object(o.a)(Y,2),G=Z[0],K=Z[1],J=Object(c.useState)({}),Q=Object(o.a)(J,2),$=Q[0],X=Q[1],ee=Object(c.useState)(!1),te=Object(o.a)(ee,2),ne=te[0],re=te[1],ie=U.d.httpsCallable("getEquipmentInfoFromGeoTab"),ae=Object(c.useState)(!1),oe=Object(o.a)(ae,2),se=oe[0],ce=oe[1],le=Object(c.useState)(""),ue=Object(o.a)(le,2),de=ue[0],pe=ue[1],he=Object(c.useState)(null),fe=Object(o.a)(he,2),me=fe[0],ge=fe[1];return Object(c.useEffect)((function(){if(!z.a.isEmpty(e.equipmentData.serialNum)){var t=function(){var t=Object(a.a)(Object(i.a)().mark((function t(){var n;return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(ne){t.next=14;break}return t.prev=1,re(!0),t.next=5,ie({vin:e.equipmentData.serialNum,dataTypeRequest:"DeviceStatusInfo"});case 5:n=t.sent,X(n.data),re(!1),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(1),console.log(t.t0),re(!1);case 14:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(){return t.apply(this,arguments)}}();t()}}),[]),V?"Error":W?Object(q.jsxs)(h.a,{container:!0,spacing:A?1:2,children:[Object(q.jsxs)(h.a,{container:!0,children:[Object(q.jsx)(h.a,{container:!0,item:!0,xs:12,children:e.edit?Object(q.jsx)(m.a,{label:"Description",variant:"outlined",value:e.equipmentData.description,onChange:function(t){return e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{description:t.target.value}),"description")},className:M.descriptionField,inputProps:{style:{fontSize:A?"1.25rem":"2rem"}}}):Object(q.jsx)(f.a,{variant:A?"h5":"h4",style:{marginLeft:A?"5px":"10px"},children:e.equipmentData.description})}),!z.a.isEmpty(e.equipmentData.serialNum)&&!z.a.isEmpty($)&&Object(q.jsx)(h.a,{container:!0,item:!0,xs:12,children:Object(q.jsx)(g.a,{in:!ne,timeout:"auto",unmountOnExit:!0,style:{width:"100%"},children:Object(q.jsx)(b.a,{className:M.paper,children:Object(q.jsx)(h.a,{container:!0,spacing:2,children:Object(q.jsx)(_.b,{mapContainerClassName:M.mapContainer,mapTypeId:"roadmap",center:{lat:$.latitude,lng:$.longitude},zoom:12,onLoad:function(e){K(e)},children:""!==e.equipmentData.serialNum&&void 0!==$.latitude&&void 0!==$.longitude&&Object(q.jsx)(_.d,{position:{lat:$.latitude,lng:$.longitude},icon:{path:$.isDriving?window.google.maps.SymbolPath.FORWARD_CLOSED_ARROW:"m 0,1.25 c 0,-0.414214 0.335786,-0.75 0.75,-0.75 h 7.5 c 0.41421,0 0.75,0.335786 0.75,0.75 v 7.5 c 0,0.41421 -0.33579,0.75 -0.75,0.75 h -7.5 c -0.414214,0 -0.75,-0.33579 -0.75,-0.75 z",scale:$.isDriving?8:2,strokeColor:"#000",strokeWeight:2,fillColor:"#FFBF00",fillOpacity:1,rotation:$.bearing,anchor:new window.google.maps.Point(0,0)},rotation:$.bearing,onClick:function(){(new window.google.maps.InfoWindow).close(),new window.google.maps.InfoWindow({content:"<div>\n <h3>".concat($.isDriving?"Driving ".concat($.speed," km/h "):"Not Driving","</h3>\n <small>").concat($.isDriving?"Duration: ".concat($.currentStateDuration):"","</small>\n <p>LAT: ").concat($.latitude,"</p>\n <p>LNG: ").concat($.longitude,"</p>\n </div>"),maxWidth:"400px",minWidth:"400px",maxHeight:"300px",minHeight:"300px",position:{lat:$.latitude,lng:$.longitude},pixelOffset:{width:0,height:-20},zIndex:100}).open(G)}}
2,e.equipmentData.serialNum)})})})})}),Object(q.jsx)(h.a,{container:!0,item:!0,xs:12,sm:6,children:Object(q.jsxs)(b.a,{className:M.paper,children:[Object(q.jsx)(f.a,{variant:A?"h6":"h5",className:M.sectionTitle,children:"Unit Info"}),Object(q.jsx)("hr",{}),Object(q.jsxs)(h.a,{container:!0,spacing:1,children:[Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:"Unit Number:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(m.a,{className:M.textField,value:e.equipmentData.unitNumber,size:"small",onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{unitNumber:t.target.value}),"unitNumber")}}):Object(q.jsx)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:e.equipmentData.unitNumber||""})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:"Year:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(m.a,{className:M.textField,value:e.equipmentData.year,size:"small",onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{year:t.target.value}),"year")}}):Object(q.jsx)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:e.equipmentData.year||""})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:"Model:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(m.a,{className:M.textField,value:e.equipmentData.model,size:"small",onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{model:t.target.value}),"model")}}):Object(q.jsx)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:e.equipmentData.model||""})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:"Make:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(m.a,{className:M.textField,value:e.equipmentData.make,size:"small",onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{make:t.target.value}),"make")}}):Object(q.jsx)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:e.equipmentData.make||""})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:"Equipment Type:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(v.a,{className:M.textField,children:Object(q.jsx)(j.a,{native:!0,value:e.equipmentData.class,onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{class:t.target.value}),"class")},children:e.equipmentClasses.sort().map((function(e,t){return Object(q.jsx)("option",{value:e,children:e},t)}))})}):Object(q.jsx)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:e.equipmentData.class&&(null===(t=e.equipmentData.class)||void 0===t?void 0:t.charAt(0).toUpperCase())+(null===(n=e.equipmentData.class)||void 0===n?void 0:n.slice(1))})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:A?"Features:":"Equipment Features:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(m.a,{className:M.textField,value:e.equipmentData.features,size:"small",onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{features:t.target.value}),"features")}}):Object(q.jsx)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:e.equipmentData.features||""})})]})]})}),Object(q.jsx)(h.a,{container:!0,item:!0,xs:12,sm:6,children:Object(q.jsxs)(b.a,{className:M.paper,children:[Object(q.jsx)(f.a,{variant:A?"h6":"h5",className:M.sectionTitle,children:"Additional Info"}),Object(q.jsx)("hr",{}),Object(q.jsxs)(h.a,{container:!0,spacing:1,children:[Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:"License Plate:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(m.a,{className:M.textField,value:e.equipmentData.licensePlate,size:"small",onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{licensePlate:t.target.value}),"licensePlate")}}):Object(q.jsx)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:e.equipmentData.licensePlate||""})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:"Serial #:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(m.a,{className:M.textField,value:e.equipmentData.seri
2alNum,size:"small",error:e.duplicateSerial,helperText:e.duplicateSerial&&"Duplicate Serial Number.",onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{serialNum:t.target.value}),"serialNum")}}):Object(q.jsx)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:e.equipmentData.serialNum||""})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:"Tare:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(m.a,{className:M.textField,value:e.equipmentData.tare,size:"small",InputProps:{endAdornment:Object(q.jsx)(x.a,{position:"end",children:"kgs"})},onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{tare:t.target.value}),"tare")}}):Object(q.jsxs)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:[e.equipmentData.tare||"0"," kgs"]})}),Object(q.jsx)(h.a,{item:!0,xs:12,children:Object(q.jsx)(O.a,{mt:1,children:Object(q.jsx)(y.a,{control:Object(q.jsx)(w.a,{disabled:!e.edit,checked:e.equipmentData.isActive,name:"active",onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{isActive:t.target.checked}),"isActive")}}),label:"Equipment is Active"})})}),Object(q.jsx)(h.a,{item:!0,xs:12,children:Object(q.jsx)(y.a,{control:Object(q.jsx)(w.a,{disabled:!e.edit,checked:!!e.equipmentData.isIrpVehicle,name:"isIrpVehicle",onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{isIrpVehicle:t.target.checked}),"isIrpVehicle")}}),label:"IRP Vehicle"})})]})]})}),Object(q.jsx)(h.a,{container:!0,item:!0,xs:12,children:Object(q.jsxs)(b.a,{className:M.paper,children:[Object(q.jsx)(f.a,{variant:A?"h6":"h5",className:M.sectionTitle,children:"Ownership"}),Object(q.jsx)("hr",{}),Object(q.jsx)(h.a,{container:!0,spacing:A?1:2,children:Object(q.jsxs)(h.a,{container:!0,children:[Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(y.a,{control:Object(q.jsx)(w.a,{disabled:!e.edit,checked:e.equipmentData.isOwned,name:"owned",onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{isOwned:t.target.checked}),"isOwned")}}),label:"Equipment is Owned"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:null!==(s=e.equipmentData)&&void 0!==s&&s.isOwned?null:Object(q.jsx)(N.a,{open:se,onOpen:function(){ce(!0)},onClose:function(){ce(!1)},loading:e.loading,label:"Search",id:"autocomplete",disabled:!e.edit,autoComplete:!0,autoHighlight:!0,className:M.ownerAutocomplete,inputValue:de,onInputChange:function(e,t){pe(t)},value:null===(u=e.equipmentData)||void 0===u?void 0:u.owner,onChange:function(t,n){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{owner:n}),"owner")},options:e.customers.map((function(e){var t;return null!==(t=e.name)&&void 0!==t?t:""})).sort((function(e,t){return e.toLowerCase()>t.toLowerCase()})),getOptionSelected:function(e,t){return(null===e||void 0===e?void 0:e.name)===(null===t||void 0===t?void 0:t.name)},getOptionLabel:function(e){return e},renderInput:function(t){return Object(q.jsx)(m.a,Object(r.a)(Object(r.a)({},t),{},{className:M.ownerAutocomplete,label:"Owner",size:"small",InputProps:Object(r.a)(Object(r.a)({},t.InputProps),{},{endAdornment:Object(q.jsxs)(l.a.Fragment,{children:[e.loading?Object(q.jsx)(C.a,{color:"inherit",size:20}):null,t.InputProps.endAdornment]})})}))}})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:"Market Value:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(m.a,{className:M.textField,value:e.equipmentData.marketValue,size:"small",InputProps:{startAdornment:Object(q.jsx)(x.a,{position:"start",children:"$"})},onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{marketValue:t.target.value}),"marketValue")}}):Object(q.jsxs)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:["$",e.equipmentData.marketValue?e.equipmentData.marketValue:""]})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:"Purchase Price:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(m.a,{className:M.textField,value:e.equipmentData.purchasePrice,size:"small",InputProps:{startAdornment:Object(q.jsx)(x.a,{position:"start",children:"$"})},onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{purchasePrice:t.target.value}),"purchasePrice")}}):Object(q.jsxs)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:["$",e.equipmentData.purchasePrice?e.equipmentData.purchasePrice:""]})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:"Purchased From:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(m.a,{className:M.textField,value:e.equipmentData.purchasedFrom,size:"small",onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{purchasedFrom:t.target.value}),"purchasedFrom")}}):Object(q.jsx)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:e.equipmentData.purchasedFrom?e.equipmentData.purchasedFrom:""})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:"Purchase Date:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(T.b,{className:M.textField,autoOk:!0,format:"yyyy/MM/DD",value:R()(e.equipmentData.purchaseDate).format("YYYY-MM-DD"),error:null===e.equipmentData.purchaseDate,helperText:null===e.equipmentData.purchaseDate?"Improper format, try again.":null,onChange:function(t){z.a.isNaN(R()(t).valueOf())?e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{purchaseDate:null}),"purchaseDate"):e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{purchaseDate:R()(t).valueOf()}),"purchaseDate")}}):Object(q.jsx)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:"1990/01/01"!==e.equipmentData.purchaseDate?R()(e.equipmentData.purchaseDate).format("MMM D YYYY"):""})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{style:{lineHeight:2},noWrap:!0,variant:"body1",children:A?"Leased From:":"Leased/Financed From:"})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:e.edit?Object(q.jsx)(m.a,{className:M.textField,value:e.equipmentData.leasedFinancedFrom,size:"small",onChange:function(t){e.updateEquipmentData(Object(r.a)(Object(r.a)({},e.equipmentData),{},{leasedFinancedFrom:t.target.value}),"leasedFinancedFrom")}}):Object(q.jsx)(f.a,{style:{lineHeight:2},align:"right",variant:"body1",children:e.equipmentData.leasedFinancedFrom?e.equipmentData.leasedFinancedFrom:""})})]})})]})}),(e.equipmentData.assignedForms||[]).length>0&&Object(q.jsx)(h.a,{item:!0,xs:12,children:Object(q.jsxs)(b.a,{className:M.paper,children:[Object(q.jsx)(f.a,{variant:"h6",className:M.sectionTitle,children:"Required Reading"}),e.equipmentData.assignedForms.map((function(e,t){return Object(q.jsxs)(h.a,{container:!0,alignItems:"center",style:{padding:"4px 0",cursor:e.pdfURL?"pointer":"default"},onClick:function(){return e.pdfURL&&ge(e)},children:[Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{variant:"body2",color:e.pdfURL?"primary":"textPrimary",style:{textDecoration:e.pdfURL?"underline":"none"},children:e.formName})}),Object(q.jsx)(h.a,{item:!0,xs:6,children:Object(q.jsx)(f.a,{variant:"body2",color:"textSecondary",align:"right",children:e.timeframe?"Review every "+e.timeframe:""})})]},t)}))]})})]}),Object(q.jsx)(k.a,{open:Boolean(me),onClose:function(){return ge(null)},fullWidth:!0,maxWidth:"md",children:me&&Object(q.jsxs)(q.Fragment,{children:[Object(q.jsx)(D.a,{children:Object(q.jsxs)(h.a,{container:!0,alignItems:"center",justifyContent:"space-between",children:[Object(q.jsx)(h.a,{item:!0,children:me.formName}),Object(q.jsx)(h.a,{item:!0,children:Object(q.jsx)(S.a,{size:"small",onClick:function(){return ge(null)},children:Object(q.jsx)(P.a,{})})})]})}),Object(q.jsxs)(L.a,{children:[Object(q.jsx)("iframe",{src:me.pdfURL,title:"SWP PDF",style:{width:"100%",height:"70vh",border:"none"}}),Object(q.jsx)(E.a,{variant:"outlined",color:"primary",style:{marginTop:"8px"},onClick:function(){return e.history.push({pathname:"/dashboard/hr/form",search:"?"+new URLSearchParams({docId:me.formDocId}).toString()})},children:"Go to Document"})]})]})})]}):""}))},1572:function(e,t,n){"use strict";var r=n(31),i=n(32);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M19.77 7.23l.01-.01-3.72-3.72L15 4.56l2.11 2.11c-.94.36-1.61 1.26-1.61 2.33 0 1.38 1.12 2.5 2.5 2.5.36 0 .69-.08 1-.21v7.21c0 .55-.45 1-1 1s-1-.45-1-1V14c0-1.1-.9-2-2-2h-1V5c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v16h10v-7.5h1.5v5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V9c0-.69-.28-1.32-.73-1.77zM12 10H6V5h6v5zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"}),"LocalGasStation");t.default=o},1860:function(e,t,n){"use strict";n.r(t);var r=n(13),i=n(1),a=n(3),o=n(8),s=n(9),c=n(0),l=n.n(c),u=n(40),d=n(25),p=n(26),h=n(14),f=n(6),m=n(237),g=n(341),b=n(326),v=n(132),j=n(307),x=n(312),O=n(96),y=n(342),w=n(1873),C=n(1810),k=n(28),D=n.n(k),S=n(135),L=n.n(S),E=n(571),M=n.n(E),P=n(55),I=n(90),N=n.n(I),A=n(848),R=n.n(A),T=n(171),B=n.n(T),z=n(53),U=n(592),_=n.n(U),q=n(650),F=n.n(q),H=n(1044),W=n(334),V=n(336),Y=n(337),Z=n(632),G=n(338),K=n(74),J=n(178),Q=n(160),$=n(367),X=n.n($),ee=n(162),te=n.n(ee),ne=n(137),re=n.n(ne),ie=n(918),ae=n.n(ie),oe=n(919),se=n.n(oe),ce=n(2),le=Object(m.a)((function(e){return{content:{display:"flex",width:"100%",flexDirection:"column",maxWidth:"1000px",margin:"auto"},paper:{padding:"20px",borderRadius:"0px",margin:"0px",marginBottom:"20px",width:"100%",maxWidth:"1000px"},header:{display:"flex",justifyContent:"center",marginBottom:"10px"},card:{display:"flex",justifyContent:"center"},label:{lineHeight:2},checkbox:{lineHeight:2,padding:"0px",marginTop:"4px",marginBottom:"4px"},fileInput:{"&:hover":{cursor:"pointer"},display:"flex",alignItems:"center",border:"1px solid #bdbdbd",borderRadius:"4px",margin:"8px",marginTop:"16px",width:"100%"},fileInputAccept:{display:"flex",alignItems:"center",border:"0px",borderRadius:"4px",margin:"8px",marginTop:"16px",backgroundColor:"#56a84b",color:"white",width:"100%"}}})),ue=(Object(u.i)((function(e){var t,n,r=le(),i=Object(c.useState)([]),a=Object(s.a)(i,2),l=a[0],u=a[1];return Object(ce.jsxs)(v.a,{container:!0,style:{justifyContent:"center"},children:[Object(ce.jsxs)(W.a,{open:null!==e.deleteData,onClose:function(){e.setDeleteData(null)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(ce.jsx)(V.a,{id:"alert-dialog-title",children:"Delete Document?"}),Object(ce.jsx)(Y.a,{children:Object(ce.jsx)(Z.a,{id:"alert-dialog-description",children:"Are you sure you want to delete this document?"})}),Object(ce.jsxs)(G.a,{children:[Object(ce.jsx)(j.a,{onClick:function(){e.setDeleteData(null)},variant:"contained",color:"secondary",children:"No"}),Object(ce.jsx)(j.a,{onClick:function(){e.handleDeleteClick(e.deleteData)},variant:"contained",style:{backgroundColor:"red",color:"white"},autoFocus:!0,children:"Yes"})]})]}),Object(ce.jsx)(O.a,{className:r.paper,children:Object(ce.jsxs)(v.a,{container:!0,spacing:2,children:[Object(ce.jsx)(v.a,{item:!0,sm:12,className:r.fileInput,children:Object(ce.jsx)(Q.a,{onDrop:e.handleAddToLocal,children:function(e){var t=e.getRootProps,n=e.getInputProps;return Object(ce.jsxs)(v.a,Object(o.a)(Object(o.a)({container:!0,item:!0,xs:12,justifyContent:"center"},t()),{},{children:[Object(ce.jsx)("input",Object(o.a)(Object(o.a)({},n()),{},{style:{display:"none"}})),Object(ce.jsx)(te.a,{style:{color:"grey",marginRight:"20px"}}),Object(ce.jsx)(K.a,{variant:"h6",children:" Upload Document "})]}))}})}),Object(ce.jsx)(v.a,{item:!0,sm:12,children:null===(t=e.equipmentData.registrations)||void 0===t?void 0:t.map((function(t,n){return"object"===typeof t.pdfURL?Object(ce.jsxs)(v.a,{item:!0,xs:12,style:{display:"flex",alignItems:"center"},children:[Object(ce.jsx)(K.a,{variant:"body2",style:{marginRight:"10px"},children:t.name}),Object(ce.jsx)(J.a,{onClick:function(){e.handleRemoveFromLocal(n)},children:Object(ce.jsx)(X.a,{})})]},n):null}))}),Object(ce.jsx)(v.a,{item:!0,sm:12,children:Object(ce.jsx)(K.a,{type:"url",align:"center",style:{color:"red"},children:e.error})}),null===(n=e.equipmentData.registrations)||void 0===n?void 0:n.filter((function(e){return"string"===typeof e.pdfURL})).map((function(t,n){return Object(ce.jsx)(v.a,{container:!0,justifyContent:"center",style:{marginBottom:"25px"},children:Object(ce.jsxs)(O.a,{style:{backgroundColor:"lightGrey",paddingRight:"40px",paddingLeft:"40px",width:"100%"},children:[Object(ce.jsxs)(v.a,{container:!0,children:[Object(ce.jsx)(v.a,{item:!0,xs:10,children:Object(ce.jsx)(K.a,{style:{marginTop:"10px"},children:t.name})}),Object(ce.jsx)(v.a,{item:!0,xs:1,children:Object(ce.jsx)(v.a,{container:!0,justifyContent:"flex-end",children:Object(ce.jsx)(J.a,{onClick:function(e){var t;l.includes(n)?function(e){var t=D.a.cloneDeep(l);t.splice(l.findIndex((function(t){return t===e})),1),u(t)}(n):(t=n,u([].concat(Object(p.a)(l),[t])))},children:l.includes(n)?Object(ce.jsx)(se.a,{}):Object(ce.jsx)(ae.a,{})})})}),Object(ce.jsx)(v.a,{item:!0,xs:1,children:Object(ce.jsx)(v.a,{container:!0,justifyContent:"flex-end",children:Object(ce.jsx)(J.a,{children:Object(ce.jsx)(re.a,{onClick:function(n){e.
2setDeleteData(t.pdfURL)}})})})})]}),l.includes(n)&&Object(ce.jsx)(v.a,{item:!0,xs:12,children:Object(ce.jsx)(v.a,{item:!0,xs:12,style:{display:"flex",justifyContent:"center",alignItems:"center",paddingTop:"50px"},children:Object(ce.jsx)("iframe",{src:t.pdfURL,title:"PDF Viewer",width:"800px",height:"600px"})})})]})},n)}))]})})]})})),n(306)),de=Object(m.a)((function(e){return{paper:Object(f.a)({padding:e.spacing(1),borderRadius:"0px",margin:e.spacing(.5),width:"100%",maxWidth:"2000px"},e.breakpoints.down("sm"),{padding:e.spacing(.5),margin:e.spacing(.25)}),notesContainer:Object(f.a)({border:"1px dashed #d3d3d3",padding:e.spacing(1.5)},e.breakpoints.down("xs"),{padding:e.spacing(1)}),notesHeader:Object(f.a)({display:"flex",alignItems:"center",gap:e.spacing(1),marginBottom:e.spacing(1)},e.breakpoints.down("xs"),{marginBottom:e.spacing(.5)})}})),pe=Object(u.i)((function(e){var t,n,r=de(),i=Object(P.a)(),a=Object(g.a)(i.breakpoints.down("xs"));return Object(ce.jsx)(v.a,{container:!0,spacing:a?1:2,children:Object(ce.jsx)(v.a,{container:!0,children:Object(ce.jsx)(v.a,{container:!0,item:!0,xs:12,children:Object(ce.jsxs)(O.a,{className:r.paper,children:[Object(ce.jsxs)("div",{className:r.notesHeader,children:[Object(ce.jsx)(K.a,{variant:a?"h6":"h5",children:"Notes"}),Object(ce.jsx)(R.a,{fontSize:a?"small":"default"})]}),Object(ce.jsx)("div",{className:r.notesContainer,children:e.edit?Object(ce.jsx)(ue.a,{placeholder:"Enter Notes Here...",multiline:!0,minRows:a?6:10,value:e.equipmentData.notes?e.equipmentData.notes:"",style:{width:"100%"},variant:"outlined",onChange:function(t){e.updateEquipmentData(Object(o.a)(Object(o.a)({},e.equipmentData),{},{notes:t.target.value}))}}):Object(ce.jsx)(K.a,{variant:"body1",style:{whiteSpace:"pre-wrap"},children:null!==(t=e.equipmentData)&&void 0!==t&&t.notes?null===(n=e.equipmentData)||void 0===n?void 0:n.notes:"No Notes to Display"})})]})})})})})),he=n(915),fe=n(170),me=n.n(fe),ge=n(185),be=n.n(ge),ve=n(370),je=n(44),xe=n.n(je),Oe=n(102),ye=n(396),we=n(685),Ce=n.n(we),ke=n(188),De=n.n(ke),Se=n(816),Le=n.n(Se),Ee=n(369),Me=n.n(Ee),Pe=n(1572),Ie=n.n(Pe),Ne=n(817),Ae=n.n(Ne),Re=n(1038),Te=n(591),Be=n(416),ze=n(474),Ue=n(473),_e=Object(m.a)((function(e){return{content:Object(f.a)({width:"100%"},e.breakpoints.down("xs"),{padding:e.spacing(0)}),controls:Object(f.a)({display:"flex",alignItems:"center",gap:e.spacing(2),marginBottom:e.spacing(2),flexWrap:"wrap"},e.breakpoints.down("xs"),{flexDirection:"column",alignItems:"stretch",gap:e.spacing(1)}),tableSection:Object(f.a)({marginBottom:e.spacing(3)},e.breakpoints.down("xs"),{marginBottom:e.spacing(2)})}})),qe=function(e){return e?e<9999999999?1e3*e:e:null},Fe=Object(u.i)((function(e){var t,n=_e(),r=Object(P.a)(),i=Object(g.a)(r.breakpoints.down("xs")),a=Object(c.useState)(Ue.b),l=Object(s.a)(a,2),u=l[0],h=l[1],f=Object(c.useState)(Ue.a),m=Object(s.a)(f,2),v=m[0],x=m[1],O=function(e){h(e),Object(Ue.d)(e)},y=function(e){x(e),Object(Ue.c)(e)},w=(null===(t=e.cachedData)||void 0===t?void 0:t.data)||[],C=Object(c.useState)(!e.cachedData),k=Object(s.a)(C,2),D=k[0],S=k[1],L=function(){S(!0),Object(Ue.d)(u),Object(Ue.c)(v);var t=xe()(u).startOf("day"),n=xe()(v).endOf("day"),r=d.c.collection("workOrders").where("vehicle.unitDocId","==",e.equipmentData.docId),i=r.where("dateCreated",">=",t.utc().valueOf()).where("dateCreated","<=",n.utc().valueOf()).get(),a=r.where("dateCreated",">=",t.unix()).where("dateCreated","<=",n.unix()).get();Promise.all([i,a]).then((function(t){var n=Object(s.a)(t,2),r=n[0],i=n[1],a=new Set,c=[];[].concat(Object(p.a)(r.docs),Object(p.a)(i.docs)).forEach((function(e){a.has(e.id)||(a.add(e.id),c.push(Object(o.a)(Object(o.a)({},e.data()),{},{docId:e.id})))})),e.onDataLoaded&&e.onDataLoaded({data:c}),S(!1)})).catch((function(e){console.log(e.message),S(!1)}))};Object(c.useEffect)((function(){e.cachedData||L()}),[e.cachedData]);var E=function(e){return Array.isArray(e.repairsNeeded)?e.repairsNeeded.reduce((function(e,t){return e+Number(t.timeSpentRepairing||0)}),0):0},M=[{title:"Order #",field:"orderID",render:function(e){return Object(ce.jsx)("b",{children:(null===e||void 0===e?void 0:e.orderID)||""})}},{title:"Date",render:function(e){return xe()(qe(e.dateCreated)).format("MM-DD")},customSort:function(e,t){return qe(e.dateCreated)-qe(t.dateCreated)}},{title:"Repair Hrs",render:function(e){return E(e).toFixed(2)},type:"numeric"}],I=[{title:"Order #",field:"orderID",render:function(e){return Object(ce.jsx)("b",{children:(null===e||void 0===e?void 0:e.orderID)||""})}},{title:"Customer",field:"customer.customerName"},{title:"Date",render:function(e){return xe()(qe(e.dateCreated)).format("YYYY-MM-DD")},customSort:function(e,t){return qe(e.dateCreated)-qe(t.dateCreated)}},{title:"Tech",render:function(t){return function(t){var n,r;return(null===(n=e.users)||void 0===n||null===(r=n.find((function(e){return e.uuid===t})))||void 0===r?void 0:r.displayName)||t||""}(t.assignedUser)}},{title:"Status",render:function(e){return e.completed?"Completed":""!==e.dateCompleted?"Awaiting Review":"In Progress"}},{title:"Repair Hrs",render:function(e){return E(e).toFixed(2)},type:"numeric",customSort:function(e,t){return E(e)-E(t)}},{title:"Parts",render:function(e){var t;return(null===(t=e.partsNeeded)||void 0===t?void 0:t.length)||0},type:"numeric"}];return Object(ce.jsxs)("div",{className:n.content,children:[Object(ce.jsxs)(b.a,{className:n.controls,children:[Object(ce.jsx)(Be.b,{label:"Start Date",value:u,onChange:O}
2),Object(ce.jsx)(Be.b,{label:"End Date",value:v,onChange:y}),Object(ce.jsx)(ze.a,{startDateHandler:O,endDateHandler:y}),Object(ce.jsx)(j.a,{variant:"contained",onClick:L,disabled:D,children:"Generate"})]}),Object(ce.jsxs)(b.a,{className:n.tableSection,children:[Object(ce.jsx)(Te.a,{columns:i?M:I,data:w,title:"Work Order Details",pathname:"/dashboard/workOrders/form",isLoading:D,maxBodyHeight:"calc(100vh - 450px)",persistKey:"reportTable_equipmentWorkOrders"+(i?"_m":"_d")}),!D&&w.length>0&&Object(ce.jsx)(b.a,{display:"flex",justifyContent:"flex-end",p:1,pr:2,children:Object(ce.jsx)(K.a,{variant:"subtitle2",children:Object(ce.jsxs)("strong",{children:["Total Repair Hours: ",w.reduce((function(e,t){return e+E(t)}),0).toFixed(2)," hrs"]})})})]})]})})),He=n(572),We=Object(m.a)((function(e){return{content:Object(f.a)({width:"100%"},e.breakpoints.down("xs"),{padding:e.spacing(0)}),controls:Object(f.a)({display:"flex",alignItems:"center",gap:e.spacing(2),marginBottom:e.spacing(2),flexWrap:"wrap"},e.breakpoints.down("xs"),{flexDirection:"column",alignItems:"stretch",gap:e.spacing(1)}),tableSection:Object(f.a)({marginBottom:e.spacing(3)},e.breakpoints.down("xs"),{marginBottom:e.spacing(2)})}})),Ve=Object(u.i)((function(e){var t,n=We(),r=Object(P.a)(),i=Object(g.a)(r.breakpoints.down("xs")),a=Object(c.useState)(Ue.b),l=Object(s.a)(a,2),u=l[0],p=l[1],h=Object(c.useState)(Ue.a),f=Object(s.a)(h,2),m=f[0],v=f[1],x=function(e){p(e),Object(Ue.d)(e)},O=function(e){v(e),Object(Ue.c)(e)},y=(null===(t=e.cachedData)||void 0===t?void 0:t.data)||[],w=Object(c.useState)(!e.cachedData),C=Object(s.a)(w,2),k=C[0],S=C[1],L=function(){S(!0),Object(Ue.d)(u),Object(Ue.c)(m),d.c.collection("units").where("parentUnitDocId","==",e.equipmentData.docId).where("date",">=",Object(He.d)(u)).where("date","<=",Object(He.a)(m)).get().then((function(t){var n=t.docs.map((function(e){return e.id}));if(0===n.length)return e.onDataLoaded&&e.onDataLoaded({data:[]}),void S(!1);var r=D.a.chunk(n,10).map((function(e){return d.c.collection("jobs").where("units","array-contains-any",e).get()}));Promise.all(r).then((function(t){var n=new Set,r=[];t.forEach((function(e){e.docs.forEach((function(e){n.has(e.id)||(n.add(e.id),r.push(Object(o.a)(Object(o.a)({},e.data()),{},{docId:e.id})))}))})),e.onDataLoaded&&e.onDataLoaded({data:r}),S(!1)}))})).catch((function(e){console.log(e.message),S(!1)}))};Object(c.useEffect)((function(){e.cachedData||L()}),[e.cachedData]);var E=[{title:"Customer",field:"customer"},{title:"Time In",field:"timeIn",render:function(e){var t=e.timeIn;return t<9999999999&&(t*=1e3),xe()(t).format("MM-DD h:mm a")}},{title:"Billed",render:function(e){return e.adminTime}}],M=[{title:"Customer",field:"customer"},{title:"Address",field:"address"},{title:"Time In",field:"timeIn",render:function(e){var t=e.timeIn;return t<9999999999&&(t*=1e3),xe()(t).format("YYYY-MM-DD h:mm a")}},{title:"Time Out",field:"timeOut",render:function(e){var t=e.timeOut;return t<9999999999&&(t*=1e3),xe()(t).format("YYYY-MM-DD h:mm a")}},{title:"Billed Time",render:function(e){return e.adminTime}}];return Object(ce.jsxs)("div",{className:n.content,children:[Object(ce.jsxs)(b.a,{className:n.controls,children:[Object(ce.jsx)(Be.b,{label:"Start Date",value:u,onChange:x}),Object(ce.jsx)(Be.b,{label:"End Date",value:m,onChange:O}),Object(ce.jsx)(ze.a,{startDateHandler:x,endDateHandler:O}),Object(ce.jsx)(j.a,{variant:"contained",onClick:L,disabled:k,children:"Generate"})]}),Object(ce.jsxs)(b.a,{className:n.tableSection,children:[Object(ce.jsx)(Te.a,{columns:i?E:M,data:y,title:"Job Details",pathname:"/dashboard/reporting/timesheets/job",isLoading:k,maxBodyHeight:"calc(100vh - 450px)",persistKey:"reportTable_equipmentJobs"+(i?"_m":"_d")}),!k&&y.length>0&&Object(ce.jsx)(b.a,{display:"flex",justifyContent:"flex-end",p:1,pr:2,children:Object(ce.jsx)(K.a,{variant:"subtitle2",children:Object(ce.jsxs)("strong",{children:["Total Billed: ",y.reduce((function(e,t){return e+(Number(t.adminTime)||0)}),0).toFixed(2)," hrs"]})})})]})]})})),Ye=Object(m.a)((function(e){return{content:Object(f.a)({width:"100%"},e.breakpoints.down("xs"),{padding:e.spacing(0)}),controls:Object(f.a)({display:"flex",alignItems:"center",gap:e.spacing(2),marginBottom:e.spacing(2),flexWrap:"wrap"},e.breakpoints.down("xs"),{flexDirection:"column",alignItems:"stretch",gap:e.spacing(1)}),tableSection:Object(f.a)({marginBottom:e.spacing(3)},e.breakpoints.down("xs"),{marginBottom:e.spacing(2)})}})),Ze=Object(u.i)((function(e){var t,n=Ye(),r=Object(P.a)(),i=Object(g.a)(r.breakpoints.down("xs")),a=Object(c.useState)(Ue.b),l=Object(s.a)(a,2),u=l[0],p=l[1],h=Object(c.useState)(Ue.a),f=Object(s.a)(h,2),m=f[0],v=f[1],x=function(e){p(e),Object(Ue.d)(e)},O=function(e){v(e),Object(Ue.c)(e)},y=(null===(t=e.cachedData)||void 0===t?void 0:t.data)||[],w=Object(c.useState)(!e.cachedData),C=Object(s.a)(w,2),k=C[0],S=C[1],L=function(){S(!0),Object(Ue.d)(u),Object(Ue.c)(m);var t=Object(He.d)(u),n=Object(He.a)(m);d.c.collection("units").where("parentUnitDocId","==",e.equipmentData.docId).where("date",">=",Object(He.d)(u)).where("date","<=",Object(He.a)(m)).get().then((function(r){var i=r.docs.map((function(e){return e.id}));if(0===i.length)return e.onDataLoaded&&e.onDataLoaded({data:[]}),void S(!1);var a=D.a.chunk(i,10).map((function(e){return d.c.collection("deliveries").where("units","array-contains-any",e).get()}));Promise.all(a).then((function(r){var i=new Set,a=[];r.forEach((function(r){r.docs.forEach((function(r){if(!i.has(r.id)){var s,c;i.add(r.id);var l=r.data();if(l.date&&l.date[0]){var u=xe.a.utc(l.date[0]).valueOf();if(u<t||u>n)return}a.push(Object(o.a)(Object(o.a)({},l),{},{docId:r.id,displayName:(null===(s=e.users)||void 0===s||null===(c=s.find((function(e){return e.uuid===l.uid})))||void 0===c?void 0:c.displayName)||l.uid}))}}))})),e.onDataLoaded&&e.onDataLoaded({data:a}),S(!1)}))})).catch((function(e){console.log(e.message),S(!1)}))};Object(c.useEffect)((function(){e.cachedData||L()}),[e.cachedData]);var E=[{title:"Ticket",field:"ticket",customSort:function(e,t){return e.ticket.toLowerCase()>t.ticket.toLowerCase()?1:-1}},{title:"Date",field:"date",render:function(e){return xe.a.utc(e.date[0]).format("MM-DD")},customSort:function(e,t){return xe.a.utc(e.date[0]).isAfter(xe.a.utc(t.date[0]))?1:-1}},{title:"Material",field:"material",customSort:function(e,t){return e.material.toLowerCase()>t.material.toLowerCase()?1:-1}}],M=[{title:"Ticket",field:"ticket",customSort:function(e,t){return e.ticket.toLowerCase()>t.ticket.toLowerCase()?1:-1}},{title:"Employee",field:"displayName"},{title:"Date",field:"date",render:function(e){return xe.a.utc(e.date[0]).format("YYYY-MM-DD")},customSort:function(e,t){return xe.a.utc(e.date[0]).isAfter(xe.a.utc(t.date[0]))?1:-1},customFilterAndSearch:function(e,t){return-1!==xe.a.utc(t.date[0]).format("YYYY-MM-DD").toLowerCase().indexOf(e.toLowerCase())}},{title:"Material",field:"material",customSort:function(e,t){return e.material.toLowerCase()>t.material.toLowerCase()?1:-1}},{title:"Quantity",field:"quantity"}];return Object(ce.jsxs)("div",{className:n.content,children:[Object(ce.jsxs)(b.a,{className:n.controls,children:[Object(ce.jsx)(Be.b,{label:"Start Date",value:u,onChange:x}),Object(ce.jsx)(Be.b,{label:"End Date",value:m,onChange:O}),Object(ce.jsx)(ze.a,{startDateHandler:x,endDateHandler:O}),Object(ce.jsx)(j.a,{variant:"contained",onClick:L,disabled:k,children:"Generate"})]}),Object(ce.jsx)(b.a,{className:n.tableSection,children:Object(ce.jsx)(Te.a,{columns:i?E:M,data:y,title:"Delivery Details",pathname:"/dashboard/reporting/timesheets/delivery",isLoading:k,maxBodyHeight:"calc(100vh - 450px)",persistKey:"reportTable_equipmentDeliveries"+(i?"_m":"_d")})})]})})),Ge=n(649),Ke=n(545),Je=n(567),Qe=n(701),$e=n(597),Xe=n(601),et=Object(m.a)((function(e){return{content:Object(f.a)({width:"100%"},e.breakpoints.down("xs"),{padding:e.spacing(0)}),controls:Object(f.a)({display:"flex",alignItems:"center",gap:e.spacing(2),marginBottom:e.spacing(2),flexWrap:"wrap"},e.breakpoints.down("xs"),{flexDirection:"column",alignItems:"stretch",gap:e.spacing(1)}),tableSection:Object(f.a)({marginBottom:e.spacing(3)},e.breakpoints.down("xs"),{marginBottom:e.spacing(2)})}})),tt=Object(u.i)((function(e){var t,r=et(),l=Object(P.a)(),u=Object(g.a)(l.breakpoints.down("xs")),h=Object(c.useState)(Ue.b),f=Object(s.a)(h,2),m=f[0],v=f[1],x=Object(c.useState)(Ue.a),O=Object(s.a)(x,2),y=O[0],w=O[1],C=function(e){v(e),Object(Ue.d)(e)},k=function(e){w(e),Object(Ue.c)(e)},S=(null===(t=e.cachedData)||void 0===t?void 0:t.data)||[],L=Object(c.useState)(!e.cachedData),E=Object(s.a)(L,2),M=E[0],I=E[1],N=Object(c.useState)(!1),A=Object(s.a)(N,2),R=A[0],T=A[1],B=Object(c.useState)([]),z=Object(s.a)(B,2),U=z[0],_=z[1],q=Object(c.useState)(!1),F=Object(s.a)(q,2),H=F[0],W=F[1],V=Object(c.useState)(0),Y=Object(s.a)(V,2),Z=Y[0],G=Y[1],K=Object(c.useState)(""),J=Object(s.a)(K,2),Q=J[0],$=J[1],X=function(t,n,r){var i=[];return t.forEach((function(t){var a,s,c="function"===typeof t.data?t.data():t,l=c.photoURLs;
2if(l&&(!Array.isArray(l)||0!==l.length)){var u=(null===(a=e.users)||void 0===a||null===(s=a.find((function(e){return e.uuid===c.uid})))||void 0===s?void 0:s.displayName)||c.uid||"",d=r(c),p={origin:n,date:d,employee:u,docId:t.id};Array.isArray(l)?l.forEach((function(e){e&&i.push(Object(o.a)(Object(o.a)({},p),{},{photoURL:e}))})):"string"===typeof l&&l.length>0&&i.push(Object(o.a)(Object(o.a)({},p),{},{photoURL:l}))}})),i},ee=function(){I(!0),G(5),$("Querying photos..."),Object(Ue.d)(m),Object(Ue.c)(y);var t=d.c.collection("workOrders").where("vehicle.unitDocId","==",e.equipmentData.docId),n=t.where("dateCreated",">=",Object(He.d)(m)).where("dateCreated","<=",Object(He.a)(y)).get(),r=t.where("dateCreated",">=",Object(He.f)(m)).where("dateCreated","<=",Object(He.c)(y)).get(),i=d.c.collection("units").where("parentUnitDocId","==",e.equipmentData.docId).where("date",">=",Object(He.d)(m)).where("date","<=",Object(He.a)(y)).get();Promise.all([n,r,i]).then((function(t){var n=Object(s.a)(t,3),r=n[0],i=n[1],a=n[2];G(30),$("Processing work orders...");var c=new Set,l=function(t){var n=[];return t.forEach((function(t){var r,i,a=t.data(),s=(null===(r=e.users)||void 0===r||null===(i=r.find((function(e){return e.uuid===a.assignedUser})))||void 0===i?void 0:i.displayName)||"",c=a.dateCreated;c&&c<9999999999&&(c*=1e3);var l={origin:"Work Order",date:c,employee:s,docId:t.id},u=a.photoURLs;Array.isArray(u)&&u.filter((function(e){return e&&!e.includes(".mp4")})).forEach((function(e){n.push(Object(o.a)(Object(o.a)({},l),{},{photoURL:e}))})),Array.isArray(a.partsNeeded)&&a.partsNeeded.forEach((function(e){Array.isArray(e.photoUrls)&&e.photoUrls.filter((function(e){return e&&!e.includes(".mp4")})).forEach((function(e){n.push(Object(o.a)(Object(o.a)({},l),{},{origin:"WO Part",photoURL:e}))}))}))})),n}([].concat(Object(p.a)(r.docs),Object(p.a)(i.docs)).filter((function(e){return!c.has(e.id)&&(c.add(e.id),!0)})));G(50),$("Processing unit entries...");var u=X(a.docs,"Unit",(function(e){return e.date})),h=a.docs.map((function(e){return e.id}));if(h.length>0){G(60),$("Fetching job photos...");var f=D.a.chunk(h,10).map((function(e){return d.c.collection("jobs").where("units","array-contains-any",e).get()}));Promise.all(f).then((function(t){var n=new Set,r=[];t.forEach((function(e){e.docs.forEach((function(e){n.has(e.id)||(n.add(e.id),r.push(e))}))}));var i=X(r,"Job",(function(e){return e.date})),a=[].concat(Object(p.a)(l),Object(p.a)(u),Object(p.a)(i));e.onDataLoaded&&e.onDataLoaded({data:a}),I(!1),G(100),$("Done! Found "+a.length+" photos.")}))}else{var m=[].concat(Object(p.a)(l),Object(p.a)(u));e.onDataLoaded&&e.onDataLoaded({data:m}),I(!1),G(100),$("Done! Found "+m.length+" photos.")}})).catch((function(e){console.log(e.message),I(!1),G(0),$("")}))};Object(c.useEffect)((function(){e.cachedData||ee()}),[e.cachedData]);var te=function(e){return new Promise((function(t,n){var r=new XMLHttpRequest;r.responseType="arraybuffer",r.open("GET",e,!0),r.onreadystatechange=function(){4===r.readyState&&(200===r.status?t(r.response):n(new Error("Error downloading: "+r.status)))},r.send()}))},ne=function(){var t=Object(a.a)(Object(i.a)().mark((function t(){var r,a,o,s,c,l,u,d;return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==S.length){t.next=2;break}return t.abrupt("return");case 2:return W(!0),G(0),$("Downloading photos..."),t.prev=5,t.next=8,Promise.all([n.e(2),n.e(13)]).then(n.t.bind(null,825,7));case 8:a=t.sent.default,o=new a,s=(null===(r=e.equipmentData)||void 0===r?void 0:r.unitNumber)||"Equipment",c=S.length,l=Object(i.a)().mark((function e(t){var n,r,a,s,l,u,d,p,h;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=S[t],r=re(n.date)||"unknown",a="".concat(n.origin,"-").concat(r,"-").concat(n.employee||"unknown","-").concat(t,".jpg"),e.next=5,te(n.photoURL);case 5:return s=e.sent,l=new Blob([s]),e.next=9,createImageBitmap(l);case 9:return u=e.sent,(d=document.createElement("canvas")).width=u.width,d.height=u.height,d.getContext("2d").drawImage(u,0,0),e.next=16,new Promise((function(e){return d.toBlob(e,"
2image/jpeg",.9)}));case 16:p=e.sent,o.file(a,p),h=Math.round((t+1)/c*80),G(h),$("Downloaded ".concat(t+1," of ").concat(c," photos..."));case 21:case"end":return e.stop()}}),e)})),u=0;case 14:if(!(u<c)){t.next=19;break}return t.delegateYield(l(u),"t0",16);case 16:u++,t.next=14;break;case 19:return G(85),$("Zipping files..."),t.next=23,o.generateAsync({type:"blob"});case 23:d=t.sent,G(100),$("Download complete!"),Object($e.saveAs)(d,"".concat(s,"-Photos-").concat(xe()().format("YYYY-MM-DD"),".zip")),t.next=34;break;case 29:t.prev=29,t.t1=t.catch(5),console.log(t.t1.message),G(0),$("");case 34:W(!1);case 35:case"end":return t.stop()}}),t,null,[[5,29]])})));return function(){return t.apply(this,arguments)}}(),re=function(e){return e?"number"===typeof e?(e<9999999999&&(e*=1e3),xe.a.utc(e).format(u?"MM-DD":"YYYY-MM-DD")):xe.a.utc(e).format(u?"MM-DD":"YYYY-MM-DD"):""},ie=u?[{title:"Photo",field:"photoURL",render:function(e){return Object(ce.jsx)(Ke.a,{style:{width:"60px",height:"60px",objectFit:"cover"},placeholder:Je.a,error:Qe.a,src:e.photoURL,alt:"Photo"})}},{title:"Type",field:"origin"},{title:"Date",render:function(e){return re(e.date)}}]:[{title:"Photo",field:"photoURL",render:function(e){return Object(ce.jsx)(Ke.a,{style:{width:"80px",height:"80px",objectFit:"cover"},placeholder:Je.a,error:Qe.a,src:e.photoURL,alt:"Photo"})}},{title:"Type",field:"origin"},{title:"Date",render:function(e){return re(e.date)},customSort:function(e,t){return("number"===typeof e.date?e.date:xe.a.utc(e.date).valueOf())-("number"===typeof t.date?t.date:xe.a.utc(t.date).valueOf())}},{title:"Employee",field:"employee"}];return Object(ce.jsxs)("div",{className:r.content,children:[Object(ce.jsx)(Xe.a,{progress:Z,info:Q}),Object(ce.jsxs)(b.a,{className:r.controls,children:[Object(ce.jsx)(Be.b,{label:"Start Date",value:m,onChange:C}),Object(ce.jsx)(Be.b,{label:"End Date",value:y,onChange:k}),Object(ce.jsx)(ze.a,{startDateHandler:C,endDateHandler:k}),Object(ce.jsx)(j.a,{variant:"contained",onClick:ee,disabled:M,children:"Generate"}),Object(ce.jsx)(j.a,{variant:"contained",onClick:ne,disabled:M||H||0===S.length,children:H?"Downloading...":"Download All"})]}),Object(ce.jsx)(b.a,{className:r.tableSection,children:Object(ce.jsx)(Te.a,{columns:ie,data:S,title:"Photos",isLoading:M,disableDetailPanel:!0,onRowClick:function(e,t){_([t.photoURL]),T(!0)},persistKey:"reportTable_equipmentPhotos"+(u?"_m":"_d"),options:{toolbar:!0,paging:!0,search:!0,emptyRowsWhenPaging:!1,thirdSortClick:!1,pageSize:25,pageSizeOptions:[10,25,50],maxBodyHeight:"calc(100vh - 450px)"}})}),U.length>0&&Object(ce.jsx)(Ge.a,{open:R,handleClose:function(){return T(!1)},photoURLs:U})]})})),nt=n(849),rt=n(546),it=n.n(rt),at=n(478),ot=Object(m.a)((function(e){return{content:Object(f.a)({width:"100%"},e.breakpoints.down("xs"),{padding:e.spacing(0)}),controls:Object(f.a)({display:"flex",alignItems:"center",gap:e.spacing(2),marginBottom:e.spacing(2),flexWrap:"wrap"},e.breakpoints.down("xs"),{flexDirection:"column",alignItems:"stretch",gap:e.spacing(1)}),tableSection:Object(f.a)({marginBottom:e.spacing(3)},e.breakpoints.down("xs"),{marginBottom:e.spacing(2)})}})),st=Object(u.i)(Object(Oe.b)(null,(function(e){return{setPaging:function(t,n){return e(ye.E(t,n))}}}))((function(e){var t,n=ot(),r=Object(P.a)(),i=Object(g.a)(r.breakpoints.down("xs")),a=Object(c.useState)(Ue.b),l=Object(s.a)(a,2),u=l[0],p=l[1],h=Object(c.useState)(Ue.a),f=Object(s.a)(h,2),m=f[0],v=f[1],x=function(e){p(e),Object(Ue.d)(e)},O=function(e){v(e),Object(Ue.c)(e)},y=(null===(t=e.cachedData)||void 0===t?void 0:t.data)||[],w=Object(c.useState)(!e.cachedData),C=Object(s.a)(w,2),k=C[0],D=C[1],S=function(){D(!0),Object(Ue.d)(u),Object(Ue.c)(m);var t=new Date(Object(He.d)(u)).toISOString(),n=new Date(Object(He.a)(m)).toISOString();d.c.collection("unitIfta").where("unitDocId","==",e.equipmentData.docId).where("exitTime",">=",t).where("exitTime","<=",n).get().then((function(t){var n=t.docs.map((function(e){var t=e.data(),n=new it.a(t.exitOdometer||0).minus(t.enterOdometer||0);return Object(o.a)(Object(o.a)({},t),{},{docId:e.id,displayLocation:nt.a[t.jurisdiction]||t.jurisdiction||"",dis
2playDistance:n.toDecimalPlaces(2).toNumber(),displaySubmitted:t.submitted?"Yes":"No"})}));e.onDataLoaded&&e.onDataLoaded({data:n}),D(!1)})).catch((function(e){console.log(e.message),D(!1)}))};Object(c.useEffect)((function(){e.cachedData||S()}),[e.cachedData]);var L=[{title:"Date",field:"exitTime",defaultSort:"asc",render:function(e){return xe()(e.exitTime).utc().format("MM-DD h:mm a")},customSort:function(e,t){return xe()(e.exitTime).utc().valueOf()-xe()(t.exitTime).utc().valueOf()}},{title:"Location",field:"displayLocation"},{title:"Distance",field:"displayDistance",render:function(e){return Number(e.displayDistance||0).toLocaleString()}}],E=[{title:"Date",field:"exitTime",defaultSort:"asc",render:function(e){return xe()(e.exitTime).utc().format("YYYY-MM-DD h:mm a")},customSort:function(e,t){return xe()(e.exitTime).utc().valueOf()-xe()(t.exitTime).utc().valueOf()},customFilterAndSearch:function(e,t){return-1!==xe()(t.exitTime).utc().format("YYYY-MM-DD h:mm a").toLowerCase().indexOf(e.toLowerCase())}},{title:"Location",field:"displayLocation"},{title:"Odometer",field:"exitOdometer",render:function(e){return e.exitOdometer?new it.a(e.exitOdometer).toDecimalPlaces(0).toNumber().toLocaleString():""}},{title:"Distance",field:"displayDistance",render:function(e){return Number(e.displayDistance||0).toLocaleString()}},{title:"Litres",render:function(e){var t=Array.isArray(e.litres)?e.litres:[];return t.length>0?t.map((function(e,t){return Object(ce.jsx)("div",{children:Number(e).toLocaleString()},t)})):0}},{title:"Rate per Litre",render:function(e){var t=Array.isArray(e.ratePerLitre)?e.ratePerLitre:[];return t.length>0?t.map((function(e,t){return Object(ce.jsx)("div",{children:e},t)})):0}},{title:"Submitted",field:"displaySubmitted"}];return Object(ce.jsxs)("div",{className:n.content,children:[Object(ce.jsxs)(b.a,{className:n.controls,children:[Object(ce.jsx)(Be.b,{label:"Start Date",value:u,onChange:x}),Object(ce.jsx)(Be.b,{label:"End Date",value:m,onChange:O}),Object(ce.jsx)(ze.a,{startDateHandler:x,endDateHandler:O}),Object(ce.jsx)(j.a,{variant:"contained",onClick:S,disabled:k,children:"Generate"})]}),Object(ce.jsx)(b.a,{className:n.tableSection,children:Object(ce.jsx)(Te.a,{columns:i?L:E,data:y,title:"Fuel & Mileage",pathname:"/dashboard/equipmentIfta/form",isLoading:k,maxBodyHeight:"calc(100vh - 450px)",onShowAction:function(){return e.setPaging(at.a.IFTA,y.map((function(e){return{docId:e.docId}})))},persistKey:"reportTable_equipmentIfta"+(i?"_m":"_d")})})]})}))),ct=n(161),lt=Object(m.a)((function(e){return{subTabBar:{marginBottom:e.spacing(1)},subTab:Object(f.a)({minWidth:"auto",flex:1},e.breakpoints.down("sm"),{minWidth:50,padding:e.spacing(.5)}),subTabLabel:Object(f.a)({display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5)},e.breakpoints.down("sm"),{flexDirection:"column",fontSize:"0.65rem"}),subTabIcon:Object(f.a)({fontSize:"1.1rem"},e.breakpoints.down("sm"),{fontSize:"1rem"}),subTabText:Object(f.a)({},e.breakpoints.down("xs"),{display:"none"})}})),ut=Object(Oe.b)((function(e){return{rawCache:e.tableCache.equipmentCardReport||{}}}),(function(e){return{updateCardReportCache:function(t,n,r,i){return e(ye.M(t,n,r,i))}}}))((function(e){var t,n=lt(),r=Object(P.a)(),i=Object(g.a)(r.breakpoints.down("xs")),a=Object(ct.b)().customers,l=Object(c.useState)(JSON.parse(sessionStorage.getItem("equipmentReportSubTab"))||0),u=Object(s.a)(l,2),d=u[0],p=u[1],h=null===(t=e.equipmentData)||void 0===t?void 0:t.docId,f=e.rawCache._ownerId===h?e.rawCache:{},m=function(t,n){e.updateCardReportCache("equipmentCardReport",t,n,h)},b=[{label:"Unit Reports",icon:Ce.a},{label:"Work Orders",icon:De.a},{label:"Jobs",icon:Le.a},{label:"Deliveries",icon:B.a},{label:"Tickets",icon:Ae.a},{label:"Photos",icon:Me.a},{label:"Fuel & Mileage",icon:Ie.a}];return Object(ce.jsxs)("div",{children:[Object(ce.jsx)(w.a,{value:d,onChange:function(e,t){p(t),sessionStorage.setItem("equipmentReportSubTab",JSON.stringify(t))},variant:i?"scrollable":"fullWidth",scrollButtons:i?"on":"auto",indicatorColor:"primary",textColor:"primary",className:n.subTabBar,children:b.map((function(e,t){return Object(ce.jsx)(C.a,{className:n.subTab,label:Object(ce.jsxs)("div",{className:n.subTabLabel,children:[Object(ce.jsx)(e.icon,{className:n.subTabIcon}),Object(ce.jsx)("span",{className:n.subTabText,children:e.label})]})},t)}))}),0===d&&Object(ce.jsx)(Re.a,{customerData:e.equipmentData,collection:"units",customerField:"parentUnitDocId",dateField:"date",dateType:"utcTimestamp",title:"Unit Report Details",pathname:"/dashboard/reporting/timesheets/unit",noDataMessage:"No Unit Reports Found",cachedData:f.unitReports,onDataLoaded:function(e){return m("unitReports",e)},mapRow:function(t,n){var r,i;return Object(o.a)(Object(o.a)({},t),{},{docId:n,displayName:(null===(r=e.users)||void 0===r||null===(i=r.find((function(e){return e.uuid===t.uid})))||void 0===i?void 0:i.displayName)||t.uid})},mobileColumns:[{title:"Employee",field:"displayName"},{title:"Date",field:"date",render:function(e){return xe.a.utc(e.date).format("MM-DD")},customSort:function(e,t){return xe.a.utc(e.date).isAfter(xe.a.utc(t.date))?1:-1}},{title:"Mileage In",field:"mileageIn"},{title:"Mileage Out",field:"mileageOut"}],desktopColumns:[{title:"Employee",field:"displayName"},{title:"Date",field:"date",render:function(e){return xe.a.utc(e.date).format("YYYY-MM-DD")},customSort:function(e,t){return xe.a.utc(e.date).isAfter(xe.a.utc(t.date))?1:-1},customFilterAndSearch:function(e,t){return-1!==xe.a.utc(t.date).format("YYYY-MM-DD").toLowerCase().indexOf(e.toLowerCase())}},{title:"Trailer ID",field:"trailerID",render:function(e){return""!==e.trailerID?e.trailerID:"N/A"}},{title:"Mileage In",field:"mileageIn",customSort:function(e,t){return Number(e.mileageIn)-Number(t.mileageIn)}},{title:"Mileage Out",field:"mileageOut",customSort:function(e,t){return Number(e.mileageOut)-Number(t.mileageOut)}},{title:"Odo Units",field:"odoUnits",render:function(e){return""!==e.odoUnits?e.odoUnits:"N/A"}},{title:"Fuel Added",render:function(e){return e.fuelAdded?e.fuelAdded+" "+e.fuelUnitDisplay:"0 "+e.fuelUnitDisplay}}]}),1===d&&Object(ce.jsx)(Fe,{equipmentData:e.equipmentData,users:e.users,cachedData:f.workOrders,onDataLoaded:function(e){return m("workOrders",e)}}),2===d&&Object(ce.jsx)(Ve,{equipmentData:e.equipmentData,users:e.users,cachedData:f.jobs,onDataLoaded:function(e){return m("jobs",e)}}),3===d&&Object(ce.jsx)(Ze,{equipmentData:e.equipmentData,users:e.users,cachedData:f.deliveries,onDataLoaded:function(e){return m("deliveries",e)}}),4===d&&Object(ce.jsx)(Re.a,{customerData:e.equipmentData,collection:"ticketEntries",customerField:"units",customerOp:"array-contains",dateField:"date",dateType:"clientFilter",clientDateAccessor:function(e){return e.date},title:"Ticket Details",pathname:"/dashboard/tickets",noDataMessage:"No Tickets Found",filterRow:function(e){return"admin"!==e.adminStatus},cachedData:f.tickets,onDataLoaded:function(e){return m("tickets",e)},mapRow:function(t,n){var r,i;return Object(o.a)(Object(o.a)({},t),{},{docId:n,displayName:(null===(r=e.users)||void 0===r||null===(i=r.find((function(e){return e.uuid===t.uid})))||void 0===i?void 0:i.displayName)||t.uid})},mobileColumns:[{title:"Ticket #",field:"ticket",render:function(e){return e.ticket||"Unnumbered"},customSort:function(e,t){return(e.ticket||"").toLowerCase()>(t.ticket||"").toLowerCase()?1:-1}},{title:"Date",field:"date",render:function(e){return e.date?xe()(e.date).format("MM-DD"):""},customSort:function(e,t){return(e.date||"").localeCompare(t.date||"")}},{title:"Customer",field:"customerId",render:function(e){var t;return(null===(t=a.find((function(t){return t.docId===e.customerId})))||void 0===t?void 0:t.name)||""}}],desktopColumns:[{title:"Ticket #",field:"ticket",render:function(e){return e.ticket||"Unnumbered"},customSort:function(e,t){return(e.ticket||"").toLowerCase()>(t.ticket||"").toLowerCase()?1:-1}},{title:"Date",field:"date",render:function(e){return e.date?xe()(e.date).format("YYYY-MM-DD"):""},customSort:function(e,t){return(e.date||"").localeCompare(t.date||"")},customFilterAndSearch:function(e,t){return-1!==(t.date||"").toLowerCase().indexOf(e.toLowerCase())}},{title:"Customer",field:"customerId",render:function(e){var t;return(null===(t=a.find((function(t){return t.docId===e.customerId})))||void 0===t?void 0:t.name)||""},customSort:function(e,t){var n,r,i=(null===(n=a.find((function(t){return t.docId===e.customerId})))||void 0===n?void 0:n.name)||"",o=(null===(r=a.find((function(e){return e.docId===t.customerId})))||void 0===r?void 0:r.name)||"";return i.toLowerCase()>o.toLowerCase()?1:-1},customFilterAndSearch:function(e,t){var n;return-1!==((null===(n=a.find((function(e){return e.docId===t.customerId})))||void 0===n?void 0:n.name)||"").toLowerCase().indexOf(e.toLowerCase())}},{title:"Employee",field:"displayName"},{title:"Material",field:"material",render:function(e){return e.material||""},customSort:function(e,t){return(e.material||"").toLowerCase()>(t.material||"").toLowerCase()?1:-1}},{title:"Source",field:"sourceCollection",render:function(e){return(t=e.sourceCollection)?String(t).charAt(0).toUpperCase()+String(t).slice(1):"";var t}}
2,{title:"Cartage Units",field:"cartageSaleUnits",render:function(e){return e.cartageSaleUnits?"".concat(e.cartageSaleUnits).concat(e.cartageSalesPer?" "+e.cartageSalesPer:""):""},customSort:function(e,t){return(Number(e.cartageSaleUnits)||0)-(Number(t.cartageSaleUnits)||0)}}]}),5===d&&Object(ce.jsx)(tt,{equipmentData:e.equipmentData,users:e.users,cachedData:f.photos,onDataLoaded:function(e){return m("photos",e)}}),6===d&&Object(ce.jsx)(st,{equipmentData:e.equipmentData,users:e.users,cachedData:f.ifta,onDataLoaded:function(e){return m("ifta",e)}})]})})),dt=["children","value","index"],pt=Object(m.a)((function(e){var t,n;return{tabBar:{width:"100%",zIndex:"998"},tabBarContainer:{width:"100%",padding:0},content:Object(f.a)({display:"flex",width:"100%",flexDirection:"column",maxWidth:"1000px",margin:"auto",padding:e.spacing(0,2)},e.breakpoints.down("sm"),{padding:e.spacing(0,1)}),paper:{borderRadius:"0px",margin:"0px",marginBottom:e.spacing(2),width:"100%",maxWidth:"1000px"},backButton:Object(f.a)({marginBottom:e.spacing(2),marginTop:e.spacing(2)},e.breakpoints.down("xs"),{marginBottom:e.spacing(1),marginTop:e.spacing(1)}),buttonGroup:Object(f.a)({display:"flex",gap:e.spacing(.5),flexWrap:"wrap"},e.breakpoints.down("xs"),{"& button":{padding:e.spacing(.5,1),fontSize:"0.75rem"}}),skeletonContainer:Object(f.a)({width:"100%",padding:e.spacing(0,2)},e.breakpoints.down("xs"),{padding:e.spacing(0,1)}),tabPanel:(t={margin:e.spacing(2)},Object(f.a)(t,e.breakpoints.down("sm"),{margin:e.spacing(1)}),Object(f.a)(t,e.breakpoints.down("xs"),{margin:e.spacing(.5)}),t),tab:(n={minWidth:"auto",flex:1},Object(f.a)(n,e.breakpoints.down("sm"),{minWidth:60,padding:e.spacing(1)}),Object(f.a)(n,e.breakpoints.down("xs"),{minWidth:50,padding:e.spacing(.5),flex:"none"}),n),tabLabel:Object(f.a)({display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5),width:"100%"},e.breakpoints.down("sm"),{flexDirection:"column",fontSize:"0.7rem"}),tabIcon:Object(f.a)({verticalAlign:"middle"},e.breakpoints.down("sm"),{fontSize:"1.2rem"}),tabText:Object(f.a)({},e.breakpoints.down("xs"),{display:"none"})}})),ht=Object(u.i)(Object(Oe.b)((function(e){return{equipmentPaging:e.paging[at.a.EQUIPMENT]}}))((function(e){var t=pt(),n=Object(P.a)(),r=Object(g.a)(n.breakpoints.down("sm")),i=Object(g.a)(n.breakpoints.down("xs")),a=Object(z.b)().roles,u=l.a.useState(JSON.parse(sessionStorage.getItem("equipmentTab"))||1),d=Object(s.a)(u,2),f=d[0],m=d[1],k=l.a.useState(!1),S=Object(s.a)(k,2),E=S[0],I=S[1],A=new URLSearchParams(e.location.search).get("docId"),T=e.equipmentPaging&&e.equipmentPaging.some((function(e){return e.docId===A}))?e.equipmentPaging:null,U=null;Object(c.useEffect)((function(){}),[r]);var q=Object(c.useCallback)((function(e){var n=e.children,r=e.value,i=e.index,a=Object(h.a)(e,dt);return Object(ce.jsx)("div",Object(o.a)(Object(o.a)({role:"tabpanel",hidden:r!==i,id:"simple-tabpanel-".concat(i),"aria-labelledby":"simple-tab-".concat(i)},a),{},{children:r===i&&Object(ce.jsx)(b.a,{className:t.tabPanel,children:n})}))}),[t.tabPanel]),W=[{value:1,label:"Information",icon:B.a},{value:3,label:"Reports",icon:be.a},{value:4,label:"Notes",icon:R.a}].concat(Object(p.a)(a.includes("Use File Storage")?[{value:5,label:"Files",icon:me.a}]:[]));var V,Y;D.a.isUndefined(e.equipmentData)||(U=Object(ce.jsxs)(v.a,{className:t.content,children:[Object(ce.jsxs)(v.a,{container:!0,className:t.backButton,spacing:1,alignItems:"center",children:[Object(ce.jsx)(v.a,{item:!0,xs:12,sm:4,children:Object(ce.jsx)(j.a,{variant:"contained",onClick:function(){e.history.goBack()},startIcon:Object(ce.jsx)(N.a,{}),children:"Back"})}),Object(ce.jsx)(v.a,{item:!0,xs:6,sm:4,children:Object(ce.jsxs)(b.a,{display:"flex",justifyContent:r?"flex-start":"flex-end",className:t.buttonGroup,children:[Object(ce.jsx)(x.a,{title:"Previous Unit",children:Object(ce.jsx)("span",{children:Object(ce.jsx)(j.a,{variant:"contained",size:r?"small":"medium",disabled:!T||A===(null===(V=T[0])||void 0===V?void 0:V.docId)||e.localLoading,onClick:function(){!function(){if(T){var t=T.findIndex((function(e){return e.docId===A})),n=T[t-1];n&&(e.setLocalLoading(!0),e.history.push({pathname:"/dashboard/equipment/form",search:"?"+new URLSearchParams({docId:n.docId}).toString()}))}}()},children:Object(ce.jsx)(F.a,{})})})}),Object(ce.jsx)(x.a,{title:"Next Unit",children:Object(ce.jsx)("span",{children:Object(ce.jsx)(j.a,{variant:"contained",size:r?"small":"medium",disabled:!T||A===(null===(Y=T[T.length-1])||void 0===Y?void 0:Y.docId)||e.localLoading,onClick:function(){!function(){if(T){var t=T.findIndex((function(e){return e.docId===A})),n=T[t+1];n&&(e.setLocalLoading(!0),e.history.push({pathname:"/dashboard/equipment/form",search:"?"+new URLSearchParams({docId:n.docId}).toString()}))}}()},children:Object(ce.jsx)(_.a,{})})})})]})}),Object(ce.jsx)(v.a,{item:!0,xs:6,sm:4,children:Object(ce.jsxs)(b.a,{display:"flex",justifyContent:"flex-end",className:t.buttonGroup,children:[Object(ce.jsx)(j.a,{variant:"contained",title:"Print Equipment",size:r?"small":"medium",disabled:e.localLoading,onClick:function(t){var n;return e.history.push("/dashboard/equipment/printing/?docId="+(null===(n=e.equipmentData)||void 0===n?void 0:n.docId))},startIcon:Object(ce.jsx)(M.a,{}),children:r?"":"Print"}),a.includes("Create|Update|Delete Equipment")&&Object(ce.jsx)(j.a,{variant:"contained",onClick:function(){E&&e.cancelSave(),I(!E)},size:r?"small":"medium",disabled:e.localLoading,title:"Edit Equipment",startIcon:Object(ce.jsx)(L.a,{style:E?{color:"green"}:{}}),children:r?"":"Edit"})]})})]}
2),e.localLoading?Object(ce.jsx)(b.a,{className:t.skeletonContainer,children:Object(ce.jsx)(ve.a,{variant:"rect",width:"100%",height:r?"50vh":"68vh",style:{borderRadius:8}})}):Object(ce.jsxs)(O.a,{className:t.paper,children:[Object(ce.jsx)("div",{className:t.tabBarContainer,children:Object(ce.jsx)(y.a,{className:t.tabBar,position:"static",elevation:0,children:Object(ce.jsx)(w.a,{value:f,onChange:function(e,t){m(t),sessionStorage.setItem("equipmentTab",JSON.stringify(t))},variant:i?"scrollable":"fullWidth",scrollButtons:i?"on":"auto",centered:!i,children:W.map((function(e){return Object(ce.jsx)(C.a,Object(o.a)({value:e.value,className:t.tab,label:Object(ce.jsxs)("div",{className:t.tabLabel,children:[Object(ce.jsx)(e.icon,{className:t.tabIcon}),Object(ce.jsx)("span",{className:t.tabText,children:e.label})]})},(n=e.value-1,{id:"simple-tab-".concat(n),"aria-controls":"simple-tabpanel-".concat(n)})),e.value);var n}))})})}),Object(ce.jsx)(q,{value:f,index:1,children:Object(ce.jsx)(H.a,{edit:E,equipmentData:e.equipmentData,updateEquipmentData:e.updateEquipmentData,equipmentClasses:e.equipmentClasses,loading:e.loading,customers:e.customers,duplicateSerial:e.duplicateSerial})}),Object(ce.jsx)(q,{value:f,index:3,children:Object(ce.jsx)(ut,{equipmentData:e.equipmentData,users:e.users})}),Object(ce.jsx)(q,{value:f,index:4,children:Object(ce.jsx)(pe,{edit:E,equipmentData:e.equipmentData,updateEquipmentData:e.updateEquipmentData})}),Object(ce.jsx)(q,{value:f,index:5,children:Object(ce.jsx)(he.a,{storagePath:"Units/"+e.equipmentData.docId+"/"})})]})]}));return Object(ce.jsx)("div",{children:U})}))),ft=n(490),mt=n(463),gt=n(159),bt=n(154);t.default=Object(u.i)((function(e){var t=Object(ct.b)(),n=t.customers,u=t.loading,p=t.getCustomers,h=Object(gt.b)(),f=h.units,m=h.getUnits,g=Object(bt.b)(),b=g.getUsers,x=g.users,O=Object(mt.a)(),y=Object(c.useState)(!1),w=Object(s.a)(y,2),C=w[0],k=w[1],S=Object(c.useState)([]),L=Object(s.a)(S,2),E=L[0],M=L[1],P=Object(c.useState)({}),I=Object(s.a)(P,2),N=I[0],A=I[1],R=Object(c.useState)(!0),T=Object(s.a)(R,2),B=T[0],z=T[1],U=Object(c.useState)(!1),_=Object(s.a)(U,2),q=_[0],F=_[1],H=Object(c.useState)({}),W=Object(s.a)(H,2),V=W[0],Y=W[1],Z=Object(c.useState)(null),G=Object(s.a)(Z,2),K=G[0],J=G[1],Q={unitNumber:"",year:"",class:null,model:"",make:"",licensePlate:"",features:"",serialNum:"",tare:"",isOwned:!0,isActive:!0,owner:null,marketValue:"",purchasePrice:"",purchasedFrom:"",purchaseDate:xe()().valueOf(),leasedFinancedFrom:"",description:"",registrations:[],isPremiumTrailer:!1,isIrpVehicle:!1},$=new URLSearchParams(e.location.search).get("docId");Object(c.useEffect)((function(){try{p(),m(),b(),d.c.collection("unitDescriptions").get().then((function(e){var t=e.docs.map((function(e){return Object(o.a)(Object(o.a)({},e.data()),{},{docId:e.id})}));M(t);for(var n=t.find((function(e){return e.docId===$})),r=0,i=Object.entries(Q);r<i.length;r++){var a=Object(s.a)(i[r],2),c=a[0],l=a[1];n.hasOwnProperty(c)||(n[c]=l)}""!==n.serialNum&&k(ie(n.serialNum,t,$)),A(n),Y(n),z(!1)}))}catch(e){console.log(e.message),O(new Error(e.message,e))}}),[$]);var X=Object(c.useCallback)((function(e,t){"serialNum"===t&&""!==e.serialNum&&k(ie(e.serialNum,E,$)),A(e)}),[E,$]),ee=function(){var e=Object(a.a)(Object(i.a)().mark((function e(){var t,n;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=D.a.cloneDeep(N),F(!0),!((null===(t=N.registrations)||void 0===t?void 0:t.filter((function(e){return"object"===typeof e.pdfURL})).length)>0)){e.next=7;break}return e.next=6,ne();case 6:n.registrations=e.sent;case 7:A(n),Y(n),d.c.collection("unitDescriptions").doc($).update(n).then((function(){Y(n),F(!1)})),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),O(new Error(e.t0.message,e.t0));case 15:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}(),te=function(){""!==V.serialNum&&k(ie(V.serialNum,E,$)),A(V)},ne=function(){return new Promise(function(){var e=Object(a.a)(Object(i.a)().mark((function e(t){var n,a,o,c,l,u,p,h,f;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,n=D.a.cloneDeep(N.registrations),a=d.f.ref(),o=Object(r.a)(n.entries()),e.prev=4,o.s();case 6:if((c=o.n()).done){e.next=18;break}if(l=Object(s.a)(c.value,2),u=l[0],"object"!==typeof(p=l[1]).pdfURL){e.next=16;break}return h=a.child("Units/"+$+"/Registrations/"+p.name+"_"+xe()().valueOf()),e.next=12,h.put(p.pdfURL);case 12:return f=e.sent,e.next=15,f.ref.getDownloadURL();case 15:n[u].pdfURL=e.sent;case 16:e.next=6;break;case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(4),o.e(e.t0);case 23:return e.prev=23,o.f(),e.finish(23);case 26:t(n),e.next=32;break;case 29:e.prev=29,e.t1=e.catch(0),O(new Error(e.t1.message,e.t1));case 32:case"end":return e.stop()}}),e,null,[[0,29],[4,20,23,26]])})));return function(t){return e.apply(this,arguments)}}())},re=function(){var e=Object(a.a)(Object(i.a)().mark((function e(t){return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,F(!0),e.next=4,Object(d.e)(t).then((function(){var e=D.a.cloneDeep(N),n=e.registrations.findIndex((function(e){return e.pdfURL===t}));e.registrations.splice(n,1),A(e),Y(e),d.c.collection("unitDescriptions").doc($).update(e).then((function(){Y(e),F(!1),J(null)}))}));case 4:e.next=9;break;
2case 6:e.prev=6,e.t0=e.catch(0),O(new Error(e.t0.message,e.t0));case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),ie=function(e,t,n){var i,a=t.filter((function(e){return e.docId!==n})),o=Object(r.a)(a);try{for(o.s();!(i=o.n()).done;){if(i.value.serialNum===e)return!0}}catch(s){o.e(s)}finally{o.f()}return!1};return Object(ce.jsx)(v.a,{children:Object(ce.jsxs)(v.a,{children:[Object(ce.jsx)(ht,{equipmentData:N,saveState:V,setSaveState:Y,setEquipmentData:A,cancelSave:te,confirmSave:ee,updateEquipmentData:X,saving:q,customers:n,loading:u,localLoading:B,setLocalLoading:z,equipmentClasses:["Equipment - Dozer","Equipment - Drum Roller","Equipment - Excavator","Equipment - Grader","Equipment - Loader","Equipment - Skid Steer","Equipment - Other","Truck - Single Axle","Truck - Tandem","Truck - Tractor","Trailer - Belly Dump","Trailer - Deck","Trailer - End Dump (Tandem)","Trailer - End Dump (Triple)","Trailer - Grain Bulker","Trailer - Side Dump","Truck - Pick up or Similar","Trailer - Cargo/Utility","Trailer - Water","Labour"],path:$,handleAddToLocal:function(e){var t=D.a.cloneDeep(N);e.forEach((function(e){t.registrations.push({pdfURL:e,name:e.name,docId:$})})),A(t)},handleRemoveFromLocal:function(e){var t=D.a.cloneDeep(N);t.registrations.splice(e,1),A(t)},handleDeleteClick:re,deleteData:K,setDeleteData:J,duplicateSerial:C,units:f,users:x}),Object(ce.jsx)(ft.a,{open:!D.a.isEqual(N,V),message:q?"Saving...":"Save Document?",anchorOrigin:{vertical:"bottom",horizontal:"center"},action:Object(ce.jsx)(l.a.Fragment,{children:q?null:Object(ce.jsxs)(l.a.Fragment,{children:[Object(ce.jsx)(j.a,{variant:"text",color:"primary",onClick:te,style:{marginLeft:"32px",marginRight:"8px"},children:"Cancel"}),Object(ce.jsx)(j.a,{variant:"contained",onClick:ee,children:"Confirm"})]})})})]})})}))},350:function(e,t,n){var r=n(453),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();e.exports=a},353:function(e,t,n){var r=n(509),i=n(514);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},356:function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},357:function(e,t,n){var r=n(391),i=n(392);e.exports=function(e,t,n,a){var o=!n;n||(n={});for(var s=-1,c=t.length;++s<c;){var l=t[s],u=a?a(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]),o?i(n,l,u):r(n,l,u)}return n}},358:function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},361:function(e,t,n){"use strict";n.d(t,"a",(function(){return q}));var r=n(8),i=n(0),a=n(384),o=n.n(a),s=n(371),c=n.n(s),l=n(155),u=n.n(l),d=n(156),p=n.n(d),h=n(389),f=n.n(h),m=n(367),g=n.n(m),b=n(422),v=n.n(b),j=n(135),x=n.n(j),O=n(459),y=n.n(O),w=n(458),C=n.n(w),k=n(457),D=n.n(k),S=n(456),L=n.n(S),E=n(460),M=n.n(E),P=n(414),I=n.n(P),N=n(421),A=n.n(N),R=n(470),T=n(369),B=n.n(T),z=n(363),U=n.n(z),_=n(2),q={Add:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(o.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),Check:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(u.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),Clear:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(g.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),Delete:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(v.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),DetailPanel:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(f.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),Edit:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(x.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),Export:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(M.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),Filter:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(y.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),FirstPage:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(C.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),LastPage:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(D.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),NextPage:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(f.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),OpenInNew:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(U.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),PreviousPage:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(p.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),PhotoIcon:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(B.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),ResetSearch:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(g.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),Save:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(R.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),Search:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(I.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),SortArrow:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(c.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),ThirdStateCheck:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(L.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))})),ViewColumn:Object(i.forwardRef)((function(e,t){return Object(_.jsx)(A.a,Object(r.a)(Object(r.a)({},e),{},{ref:t}))}))}},362:function(e,t,n){var r=n(536),i=n(405),a=n(537),o=n(538),s=n(539),c=n(381),l=n(454),u="[object Map]",d="[object Promise]",p="[object Set]",h="[object WeakMap]",f="[object DataView]",m=l(r),g=l(i),b=l(a),v=l(o),j=l(s),x=c;(r&&x(new r(new ArrayBuffer(1)))!=f||i&&x(new i)!=u||a&&x(a.resolve())!=d||o&&x(new o)!=p||s&&x(new s)!=h)&&
2(x=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case m:return f;case g:return u;case b:return d;case v:return p;case j:return h}return t}),e.exports=x},363:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"OpenInNew");t.default=o},365:function(e,t,n){var r=n(408),i=n(433),a=n(410);e.exports=function(e){return a(e)?r(e,!0):i(e)}},366:function(e,t,n){var r=n(420);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},369:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}),"Photo");t.default=o},370:function(e,t,n){"use strict";var r=n(7),i=n(14),a=n(0),o=n(12),s=n(35),c=n(20),l=a.forwardRef((function(e,t){var n=e.animation,s=void 0===n?"pulse":n,c=e.classes,l=e.className,u=e.component,d=void 0===u?"span":u,p=e.height,h=e.variant,f=void 0===h?"text":h,m=e.width,g=Object(i.a)(e,["animation","classes","className","component","height","variant","width"]),b=Boolean(g.children);return a.createElement(d,Object(r.a)({ref:t,className:Object(o.a)(c.root,c[f],l,b&&[c.withChildren,!m&&c.fitContent,!p&&c.heightAuto],!1!==s&&c[s])},g,{style:Object(r.a)({width:m,height:p},g.style)}))}));t.a=Object(c.a)((function(e){return{root:{display:"block",backgroundColor:Object(s.a)(e.palette.text.primary,"light"===e.palette.type?.11:.13),height:"1.2em"},text:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 60%",transform:"scale(1, 0.60)",borderRadius:e.shape.borderRadius,"&:empty:before":{content:'"\\00a0"'}},rect:{},circle:{borderRadius:"50%"},pulse:{animation:"$pulse 1.5s ease-in-out 0.5s infinite"},"@keyframes pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}},wave:{position:"relative",overflow:"hidden","&::after":{animation:"$wave 1.6s linear 0.5s infinite",background:"linear-gradient(90deg, transparent, ".concat(e.palette.action.hover,", transparent)"),content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}},"@keyframes wave":{"0%":{transform:"translateX(-100%)"},"60%":{transform:"translateX(100%)"},"100%":{transform:"translateX(100%)"}},withChildren:{"& > *":{visibility:"hidden"}},fitContent:{maxWidth:"fit-content"},heightAuto:{height:"auto"}}}),{name:"MuiSkeleton"})(l)},371:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward");t.default=o},372:function(e,t,n){var r=n(350).Symbol;e.exports=r},373:function(e,t){var n=Array.isArray;e.exports=n},374:function(e,t,n){var r=n(408),i=n(533),a=n(410);e.exports=function(e){return a(e)?r(e):i(e)}},375:function(e,t){e.exports=function(e){return function(t){return e(t)}}},376:function(e,t,n){(function(e){var r=n(453),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i&&r.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(t){}}();e.exports=s}).call(this,n(157)(e))},377:function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},378:function(e,t,n){var r=n(535),i=n(411),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),r(o(e),(function(t){return a.call(e,t)})))}:i;e.exports=s},379:function(e,t,n){var r=n(499),i=n(500),a=n(501),o=n(502),s=n(503);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,e.exports=c},380:function(e,t,n){var r=n(400);e.exports=function(e,t){for(var n=e.length;n--;
2)if(r(e[n][0],t))return n;return-1}},381:function(e,t,n){var r=n(372),i=n(510),a=n(511),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):a(e)}},382:function(e,t,n){var r=n(353)(Object,"create");e.exports=r},383:function(e,t,n){var r=n(523);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},391:function(e,t,n){var r=n(392),i=n(400),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var o=e[t];a.call(e,t)&&i(o,n)&&(void 0!==n||t in e)||r(e,t,n)}},392:function(e,t,n){var r=n(430);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},393:function(e,t,n){var r=n(412),i=n(394),a=n(378),o=n(411),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,a(e)),e=i(e);return t}:o;e.exports=s},394:function(e,t,n){var r=n(409)(Object.getPrototypeOf,Object);e.exports=r},395:function(e,t,n){"use strict";var r=n(8),i=n(0),a=n.n(i),o=n(308),s=n(2),c=Object(i.lazy)((function(){return Promise.all([n.e(2),n.e(5),n.e(6),n.e(167),n.e(182)]).then(n.bind(null,489))}));function l(e){return Object(s.jsx)(i.Suspense,{fallback:Object(s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",padding:32},children:Object(s.jsx)(o.a,{})}),children:Object(s.jsx)(c,Object(r.a)({},e))})}t.a=a.a.memo(l)},396:function(e,t,n){"use strict";n.d(t,"l",(function(){return v})),n.d(t,"n",(function(){return b})),n.d(t,"m",(function(){return j})),n.d(t,"y",(function(){return c})),n.d(t,"q",(function(){return u})),n.d(t,"g",(function(){return d})),n.d(t,"P",(function(){return m})),n.d(t,"A",(function(){return g})),n.d(t,"G",(function(){return p})),n.d(t,"I",(function(){return h})),n.d(t,"C",(function(){return f})),n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return D})),n.d(t,"d",(function(){return z})),n.d(t,"c",(function(){return B})),n.d(t,"h",(function(){return k})),n.d(t,"r",(function(){return C})),n.d(t,"o",(function(){return M})),n.d(t,"p",(function(){return E})),n.d(t,"s",(function(){return S})),n.d(t,"t",(function(){return w})),n.d(t,"x",(function(){return I})),n.d(t,"B",(function(){return N})),n.d(t,"z",(function(){return T})),n.d(t,"J",(function(){return L})),n.d(t,"j",(function(){return H})),n.d(t,"w",(function(){return F})),n.d(t,"Q",(function(){return _})),n.d(t,"L",(function(){return V})),n.d(t,"e",(function(){return ie})),n.d(t,"f",(function(){return ae})),n.d(t,"i",(function(){return te})),n.d(t,"k",(function(){return Y})),n.d(t,"F",(function(){return X})),n.d(t,"u",(function(){return ee})),n.d(t,"K",(function(){return re})),n.d(t,"N",(function(){return Z})),n.d(t,"D",(function(){return $})),n.d(t,"S",(function(){return G})),n.d(t,"v",(function(){return Q})),n.d(t,"R",(function(){return oe})),n.d(t,"M",(function(){return se})),n.d(t,"O",(function(){return ce})),n.d(t,"H",(function(){return le})),n.d(t,"E",(function(){return ue}));var r=n(8),i=n(25),a=n(17),o=n(428),s=n.n(o),c=function(e){return{type:a.fb,variant:e}},l=function(e){var t;return void 0!==(null===e||void 0===e?void 0:e.variants)&&(t=s()(null===e||void 0===e?void 0:e.variants[0])),{type:a.H,product:e,variant:t,loading:!1}},u=function(){return{type:a.O}},d=function(){return{type:a.o}},p=function(e){return{type:a.nb,price:e}},h=function(e){return{type:a.rb,shippingMethod:e}},f=function(e){return{type:a.jb,halfNowHalfLater:e}},m=function(e){return{type:a.pb,qty:e}},g=function(e){return{type:a.hb,error:e}},b=function(){return function(e){e({type:a.v}),i.c.collection("products").get().then((function(t){var n=t.docs.filter((function(e){return!e.data().hideOnStore})).map((function(e){return Object(r.a)({docId:e.id},e.data())})).reverse();e(function(e){return{type:a.I,products:e,loading:!1}}(n))}))}},v=function(){return function(e){i.c.collection("featuredProducts").get().then((function(t){var n=[];t.forEach((function(e){n.push(e.data().product)})),n.forEach((function(t){i.c.collection("products").doc(t).get().then((function(t){var n,i=Object(r.a)(Object(r.a)({},t.data()),{},{docId:t.id});e((n=i,{type:a.F,featuredProducts:n,loading:!1}))}))}))}))}},j=function(e){return function(t,n){if(n().products.products.length>0){var a=n().products.products.filter((function(t){return t.docId===e}));t(l(a[0]))}else i.c.collection("products").doc(e).get().then((function(e){var n=Object(r.a)(Object(r.a)({},e.data()),{},{docId:e.id});t(l(n))}))}},x=n(28),O=n.n(x),y=function(e,t,n,r,i,o){return{type:a.b,product:e,variant:t,qty:n,shippingMethod:r,price:i,halfNowHalfLater:o}},w=function(){return{type:a.W}},C=function(e){return{type:a.P,index:e}},k=function(e){return{type:a.p,index:e}},D=function(){return{type:a.g}},S=function(e){return{type:a.V,index:e}},L=function(){return{type:a.sb}}
2,E=function(){return function(e){i.c.collection("shopSettings").doc("taxes").get().then((function(t){var n;e((n=t.data(),{type:a.K,taxes:n.salesTax,carbonFee:Number(n.carbonFee),fuelSurcharge:Number(n.fuelSurcharge),brickFee:n.brickFee,palletFee:Number(n.palletFee),baseDEFAULT:Number(n.cartFees.baseDEFAULT),baseSTONEWALL:Number(n.cartFees.baseSTONEWALL),deliveryMinimum:Number(n.cartFees.deliveryMinimum),deliveryLowRate:n.cartFees.deliveryLowRate,deliveryMidRate:n.cartFees.deliveryMidRate,deliveryHighRate:n.cartFees.deliveryHighRate,taxesLoading:!1}))}))}},M=function(e,t){return function(n){i.c.collection("coupons").where("isSale","==",!0).get().then((function(i){var a=i.docs.map((function(e){return Object(r.a)(Object(r.a)({},e.data()),{},{docId:e.id})}));e&&e.length>0&&!O.a.isUndefined(t)&&(a=t?a.filter((function(t){return e.includes(t.docId)})):a.filter((function(t){return!e.includes(t.docId)}))),n(P(a))}))}},P=function(e){return{type:a.J,sales:e,loading:!1}},I=function(e){return function(t){i.c.collection("coupons").where("code","==",e).get().then((function(e){var n=e.docs.map((function(e){return e.data()}));n.length>0&&(!("active"in n[0])||n[0].active)?t(A(n[0])):t(A([]))}))}},N=function(e){return function(t){i.c.collection("giftCards").where("code","==",e).get().then((function(e){var n=e.docs.map((function(e){return e.data()}));n.length>0?t(R(n[0])):t(R([]))}))}},A=function(e){return{type:a.eb,coupon:e,loading:!1}},R=function(e){return{type:a.ib,giftCard:e,loading:!1}},T=function(e,t,n){return function(r){var i,o=window.google?window.google:{};if(o.maps){var s=new o.maps.DistanceMatrixService;(i={destinations:[e,e],origins:[{lat:49.904415,lng:-96.932431},"166 Main St, Stonewall, MB R0C 2Z0"],travelMode:"DRIVING"},new Promise((function(e,t){s.getDistanceMatrix(i,(function(n,r){"OK"===r?e(n):(console.warn("Was unable to retrieve location data."),t(n))}))}))).then((function(i){switch(t){case"INPUT_SEARCHBOX":r(function(e,t,n){return{type:a.bb,searchboxCoordinates:e,distance:t,customerAddress:n}}(e,i,n));break;case"INPUT_MARKER":r(function(e,t){return{type:a.db,customerLocation:e,distance:t}}(e,i))}}))}}},B=function(){return{type:a.h}},z=function(){return{type:a.l}},U=function(){return{type:a.e,careerLoading:!0}},_=function(e){return{type:a.Ib,resumeForm:e}},q=function(e){return{type:a.y,careers:e,careerLoading:!1}},F=function(e){return{type:a.cb,selectedCareer:e}},H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.c.collection("careers").orderBy("id").get();return function(t){return t(U()),e.then((function(e){var n=e.docs.map((function(e){return Object(r.a)({docId:e.id},e.data())}));t(q(n))})).catch((function(e){console.log("Error unable to get careers")}))}},W=function(e){return{type:a.vb,loading:!1,successMessage:e}},V=function(e){return function(t){t(U()),i.d.httpsCallable("submitResume")({name:e.resumeData.name,email:e.resumeData.email,phone:e.resumeData.phone,coverLetter:e.resumeData.coverLetter,resume:e.resumeData.resume,position:e.position,docId:e.docId,dateCreated:e.dateCreated,resumeURL:e.resumeURL,coverLetterURL:e.coverLetterURL,viewed:e.viewed,sandbox:!1}).then((function(){t(W("Resume successfully submitted."))})).catch((function(e){t(W("Failed to submit resume, please try again.")),console.log(e.code),console.log(e.message),console.log(e.details)}))}},Y=function(){return{type:a.z}},Z=function(e){return{type:a.yb,checkoutForm:e}},G=function(){return{type:a.Nb}},K=function(){return{type:a.f,processingPayment:!0}},J=function(e){return{type:a.k,processingPayment:!1,paymentComplete:e}},Q=function(){return{type:a.Y}},$=function(){return{type:a.kb}},X=function(e){return{type:a.T,didPaymentFail:e}},ee=function(){return{type:a.X}},te=function(e){var t=i.d.httpsCallable("convergeSendPayment");return function(n){return n(ne(!0)),t({sandbox:!1,amount:e}).then((function(e){n(ne(!1)),n(re(e.data.message,!1))})).catch((function(e){n(ne(!1)),n(re("",!0))})),{type:a.x}}},ne=function(e){return{type:a.gb,generateDisabled:e}},re=function(e,t){return{type:a.tb,token:e,error:t}},ie=function(e,t,n,r){return function(o){return o(K()),o(X(!1)),i.d.httpsCallable("squareSendPayment")({nonce:e,buyerVerificationToken:t,customer:n,order:r,sandbox:!1}).then((function(e){})).then((function(){o(J(!0))})).catch((function(e){console.log(e.code),console.log(e.message),console.log(e.details),o(J(!1)),o(X(!0))})),{type:a.m,formSubmitted:!0}}},ae=function(e,t,n){return function(r){return r(K()),r(X(!1)),i.d.httpsCallable("convergeCreateOrder")({payment:e,customer:t,order:n,sandbox:!1}).then((function(e){})).then((function(){r(J(!0))})).catch((function(e){console.log(e.code),console.log(e.message),console.log(e.details),r(J(!1)),r(X(!0))})),{type:a.m,formSubmitted:!0}}},oe=function(e,t){return{type:a.Lb,tableKey:e,tableValue:t}},se=function(e,t,n,r){return{type:a.xb,cardKey:e,subKey:t,data:n,ownerId:r}},ce=function(e){return{type:a.Db,items:e}},le=function(e,t){return{type:a.ob,printKey:e,payload:t}},ue=function(e,t){return{type:a.mb,pagingKey:e,list:t}}},397:function(e,t,n){"use strict";var r=n(31),i=n(32);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.default=o},400:function(e,t){e.exports=function(e,t){return e===t||e!==e&&t!==t}},401:function(e,t,n){(function(e){var r=n(350),i=n(530),a=t&&!t.nodeType&&t,o=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===a?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;e.exports=c}).call(this,n(157)(e))},405:function(e,t,n){var r=n(353)(n(350),"Map");e.exports=r},408:function(e,t,n){var r=n(527),i=n(528),a=n(373),o=n(401),s=n(531),c=n(466),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),u=!n&&i(e),d=!n&&!u&&o(e),p=!n&&!u&&!d&&c(e),h=n||u||d||p,f=h?r(e.length,String):[],m=f.length;for(var g in e)!t&&!l.call(e,g)||h&&("length"==g||d&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||f.push(g);return f}},409:function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},410:function(e,t,n){var r=n(452),i=n(455);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},411:function(e,t){e.exports=function(){return[]}},412:function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},413:function(e,t,n){var r=n(412),i=n(373);e.exports=function(e,t,n){var a=t(e);return i(e)?a:r(a,n(e))}},416:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n(0);var r=n(735),i=n(660),a=n(2),o=function(e){return Object(a.jsx)(i.b,{label:e.label,value:e.value||null,style:e.style,disabled:e.disabled,onChange:e.onChange,autoOk:!0,clearable:!0,format:"YYYY/MM/DD h:mm a"})};t.b=function(e){return Object(a.jsx)(r.b,{label:e.label,value:e.value||null,style:e.style,disabled:e.disabled,onChange:e.onChange,autoOk:!0,clearable:!0,format:"YYYY/MM/DD"})}},418:function(e,t,n){var r=n(379),i=n(504),a=n(505),o=n(506),s=n(507),c=n(508);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=i,l.prototype.delete=a,l.prototype.get=o,l.prototype.has=s,l.prototype.set=c,e.exports=l},419:function(e,t,n){var r=n(413),i=n(378),a=n(374);e.exports=function(e){return r(e,a,i)}},420:function(e,t,n){var r=n(350).Uint8Array;e.exports=r},427:function(e,t,n){var r=n(418),i=n(429),a=n(391),o=n(431),s=n(432),c=n(435),l=n(436),u=n(437),d=n(438),p=n(419),h=n(439),f=n(362),m=n(440),g=n(441),b=n(446),v=n(373),j=n(401),x=n(448),O=n(358),y=n(450),w=n(374),C=n(365),k="[object Arguments]",D="[object Function]",S="[object Object]",L={};L[k]=L["[object Array]"]=L["[object ArrayBuffer]"]=L["[object DataView]"]=L["[object Boolean]"]=L["[object Date]"]=L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Map]"]=L["[object Number]"]=L[S]=L["[object RegExp]"]=L["[object Set]"]=L["[object String]"]=L["[object Symbol]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L["[object Error]"]=L[D]=L["[object WeakMap]"]=!1,e.exports=function e(t,n,E,M,P,I){var N,A=1&n,R=2&n,T=4&n;if(E&&(N=P?E(t,M,P,I):E(t)),void 0!==N)return N;if(!O(t))return t;var B=v(t);if(B){if(N=m(t),!A)return l(t,N)}else{var z=f(t),U=z==D||"[object GeneratorFunction]"==z;if(j(t))return c(t,A);if(z==S||z==k||U&&!P){if(N=R||U?{}:b(t),!A)return R?d(t,s(N,t)):u(t,o(N,t))}else{if(!L[z])return P?t:{};N=g(t,z,A)}}I||(I=new r);var _=I.get(t);if(_)return _;I.set(t,N),y(t)?t.forEach((function(r){N.add(e(r,n,E,r,t,I))})):x(t)&&t.forEach((function(r,i){N.set(i,e(r,n,E,i,t,I))}));var q=B?void 0:(T?R?h:p:R?C:w)(t);return i(q||t,(function(r,i){q&&(r=t[i=r]),a(N,i,e(r,n,E,i,t,I))})),N}},428:function(e,t,n){var r=n(427);e.exports=function(e){return r(e,4)}},429:function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},430:function(e,t,n){var r=n(353),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},431:function(e,t,n){var r=n(357),i=n(374);e.exports=function(e,t){return e&&r(t,i(t),e)}},432:function(e,t,n){var r=n(357),i=n(365);e.exports=function(e,t){return e&&r(t,i(t),e)}},433:function(e,t,n){var r=n(358),i=n(377),a=n(434),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=i(e),n=[];
2for(var s in e)("constructor"!=s||!t&&o.call(e,s))&&n.push(s);return n}},434:function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},435:function(e,t,n){(function(e){var r=n(350),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(157)(e))},436:function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},437:function(e,t,n){var r=n(357),i=n(378);e.exports=function(e,t){return r(e,i(e),t)}},438:function(e,t,n){var r=n(357),i=n(393);e.exports=function(e,t){return r(e,i(e),t)}},439:function(e,t,n){var r=n(413),i=n(393),a=n(365);e.exports=function(e){return r(e,a,i)}},440:function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},441:function(e,t,n){var r=n(366),i=n(442),a=n(443),o=n(444),s=n(445);e.exports=function(e,t,n){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return i(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 s(e,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return a(e);case"[object Symbol]":return o(e)}}},442:function(e,t,n){var r=n(366);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},443:function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},444:function(e,t,n){var r=n(372),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;e.exports=function(e){return a?Object(a.call(e)):{}}},445:function(e,t,n){var r=n(366);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},446:function(e,t,n){var r=n(447),i=n(394),a=n(377);e.exports=function(e){return"function"!=typeof e.constructor||a(e)?{}:r(i(e))}},447:function(e,t,n){var r=n(358),i=Object.create,a=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=a},448:function(e,t,n){var r=n(449),i=n(375),a=n(376),o=a&&a.isMap,s=o?i(o):r;e.exports=s},449:function(e,t,n){var r=n(362),i=n(356);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},450:function(e,t,n){var r=n(451),i=n(375),a=n(376),o=a&&a.isSet,s=o?i(o):r;e.exports=s},451:function(e,t,n){var r=n(362),i=n(356);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},452:function(e,t,n){var r=n(381),i=n(358);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},453:function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(84))},454:function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(t){}try{return e+""}catch(t){}}return""}},455:function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},463:function(e,t,n){"use strict";var r=n(9),i=n(0),a=n.n(i);t.a=function(){var e=a.a.useState(),t=Object(r.a)(e,2),n=(t[0],t[1]);return a.a.useCallback((function(e){n((function(){throw e}))}),[n])}},465:function(e,t,n){var r=n(515),i=n(522),a=n(524),o=n(525),s=n(526);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,e.exports=c},466:function(e,t,n){var r=n(532),i=n(375),a=n(376),o=a&&a.isTypedArray,s=o?i(o):r;e.exports=s},470:function(e,t,n){"use strict";var r=n(0),i=n(89);t.a=Object(i.a)(r.createElement("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"}),"Save")},472:function(e,t,n){"use strict";var r=n(0),i=n(89);t.a=Object(i.a)(r.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},473:function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return d}));var r=n(44),i=n.n(r),a=function(){return i()().subtract(1,"week").startOf("day")},o=function(){return i()().endOf("day")},s=function(e,t){try{if(null!=e){var n=i()(JSON.parse(e));if(n.isValid())return n}}catch(r){}return t()},c=function(){return s(sessionStorage.getItem("startDate"),a)},l=function(){return s(sessionStorage.getItem("endDate"),o)},u=function(e){return sessionStorage.setItem("startDate",JSON.stringify(e))},d=function(e){return sessionStorage.setItem("endDate",JSON.stringify(e))}},474:function(e,t,n){"use strict";var r=n(8),i=n(14),a=n(0),o=n(7),s=n(12),c=n(35),l=n(20),u=n(152),d=n(27),p=a.forwardRef((function(e,t){var n=e.children,r=e.classes,c=e.className,l=e.disabled,p=void 0!==l&&l,h=e.disableFocusRipple,f=void 0!==h&&h,m=e.onChange,g=e.onClick,b=e.selected,v=e.size,j=void 0===v?"medium":v,x=e.value,O=Object(i.a)(e,["children","classes","className","disabled","disableFocusRipple","onChange","onClick","selected","size","value"]);return a.createElement(u.a,Object(o.a)({className:Object(s.a)(r.root,c,p&&r.disabled,b&&r.selected,"medium"!==j&&r["size".concat(Object(d.a)(j))]),disabled:p,focusRipple:!f,ref:t,onClick:function(e){g&&(g(e,x),e.isDefaultPrevented())||m&&m(e,x)},onChange:m,value:x,"aria-pressed":b},O),a.createElement("span",{className:r.label},n))})),h=Object(l.a)((function(e){return{root:Object(o.a)({},e.typography.button,{boxSizing:"border-box",borderRadius:e.shape.borderRadius,padding:11,border:"1px solid ".concat(Object(c.a)(e.palette.action.active,.12)),color:Object(c.a)(e.palette.action.active,.38),"&$selected":{color:e.palette.action.active,backgroundColor:Object(c.a)(e.palette.action.active,.12),"&:hover":{backgroundColor:Object(c.a)(e.palette.action.active,.15)},"& + &":{borderLeft:0,marginLeft:0}},"&$disabled":{color:Object(c.a)(e.palette.action.disabled,.12)},"&:hover":{textDecoration:"none",backgroundColor:Object(c.a)(e.palette.text.primary,.05),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}}}),disabled:{},selected:{},label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},sizeSmall:{padding:7,fontSize:e.typography.pxToRem(13)},sizeLarge:{padding:15,fontSize:e.typography.pxToRem(15)}}}),{name:"MuiToggleButton"})(p);n(95);function f(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.indexOf(e)>=0:e===t)}var m=a.forwardRef((function(e,t){var n=e.children,r=e.classes,c=e.className,l=e.exclusive,u=void 0!==l&&l,p=e.onChange,h=e.orientation,m=void 0===h?"horizontal":h,g=e.size,b=void 0===g?"medium":g,v=e.value,j=Object(i.a)(e,["children","classes","className","exclusive","onChange","orientation","size","value"]),x=function(e,t){if(p){var n,r=v&&v.indexOf(t);v&&r>=0?(n=v.slice()).splice(r,1):n=v?v.concat(t):[t],p(e,n)}},O=function(e,t){p&&p(e,v===t?null:t)};return a.createElement("div",Object(o.a)({role:"group",className:Object(s.a)(r.root,c,"vertical"===m&&r.vertical),ref:t},j),a.Children.map(n,(function(e){return a.isValidElement(e)?a.cloneElement(e,{className:Object(s.a)(r.grouped,r["grouped".concat(Object(d.a)(m))],e.props.className),onChange:u?O:x,selected:void 0===e.props.selected?f(e.props.value,v):e.props.selected,size:e.props.size||b}):null})))})),g=Object(l.a)((function(e){return{root:{display:"inline-flex",borderRadius:e.shape.borderRadius},vertical:{flexDirection:"column"},grouped:{},groupedHorizontal:{"&:not(:first-child)":{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-child)":{borderTopRightRadius:0,borderBottomRightRadius:0}},groupedVertical:{"&:not(:first-child)":{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},"&:not(:last-child)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}}),{name:"MuiToggleButtonGroup"})(m),b=n(312),v=n(44),j=n.n(v),x=n(2),O=["title"],y=[{key:"week",label:"1W",description:"Last week",computeRange:function(){return{start:j()().subtract(1,"week").startOf("day"),end:j()().endOf("day")}}},{key:"month",label:"1M",description:"Last month",computeRange:function(){return{start:j()().subtract(1,"month").startOf("day"),end:j()().endOf("day")}}},{key:"threeMonths",label:"3M",description:"Last 3 months",computeRange:function(){return{start:j()().subtract(3,"months").startOf("day"),end:j()().endOf("day")}}},{key:"sixMonths",label:"6M",description:"Last 6 months",computeRange:function(){return{start:j()().subtract(6,"months").startOf("day"),end:j()().endOf("day")}}},{key:"yearToDate",label:"YTD",description:"Year to date",computeRange:function(){return{start:j()().startOf("year"),end:j()().endOf("day")}}}],w=function(e){var t=e.title,n=Object(i.a)(e,O);return Object(x.jsx)(b.a,{title:t,arrow:!0,children:Object(x.jsx)(h,Object(r.a)({},n))})};t.a=function(e){var t=e.fullWidth?Object(r.a)({width:"100%"},e.style):e.style,n=e.fullWidth?{flex:1}:void 0;return Object(x.jsx)(g,{exclusive:!0,size:"small",value:null,onChange:function(t,n){if(n){var r=y.find((function(e){return e.key===n}));if(r){var i=r.computeRange();e.onRangeChange?e.onRangeChange(i.start,i.end):(e.startDateHandler&&e.startDateHandler(i.start),e.endDateHandler&&e.endDateHandler(i.end))}}},className:e.className,style:t,children:y.map((function(e){var t=e.computeRange(),r="".concat(e.description," \xb7 ").concat(t.start.format("MMM D")," \u2013 ").concat(t.end.format("MMM D"));return Object(x.jsx)(w,{value:e.key,title:r,style:n,children:e.label},e.key)}))})}},478:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={RATES:"rates",TIMESHEET:"timesheet",ORDER:"order",UNIT:"unit",JOB:"job",DELIVERY:"delivery",CHECKLIST:"checklist",WORKORDER:"workOrder",EQUIPMENT:"equipment",IFTA:"ifta",GRAIN:"grain"}},484:function(e,t,n){"use strict";var r=n(31),i=n(32);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"GetApp");t.default=o},490:function(e,t,n){"use strict";var r=n(14),i=n(6),a=n(7),o=n(0),s=n(12),c=n(20),l=n(54),u=n(491),d=n(64),p=n(27),h=n(67),f=n(228),m=n(492),g=o.forwardRef((function(e,t){var n=e.action,i=e.anchorOrigin,c=(i=void 0===i?{vertical:"bottom",horizontal:"center"}:i).vertical,g=i.horizontal,b=e.autoHideDuration,v=void 0===b?null:b,j=e.children,x=e.classes,O=e.className,y=e.ClickAwayListenerProps,w=e.ContentProps,C=e.disableWindowBlurListener,k=void 0!==C&&C,D=e.message,S=e.onClose,L=e.onEnter,E=e.onEntered,M=e.onEntering,P=e.onExit,I=e.onExited,N=e.onExiting,A=e.onMouseEnter,R=e.onMouseLeave,T=e.open,B=e.resumeHideDuration,z=e.TransitionComponent,U=void 0===z?f.a:z,_=e.transitionDuration,q=void 0===_?{enter:l.b.enteringScreen,exit:l.b.leavingScreen}:_,F=e.TransitionProps,H=Object(r.a)(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),W=o.useRef(),V=o.useState(!0),Y=V[0],Z=V[1],G=Object(d.a)((function(){S&&S.apply(void 0,arguments)})),K=Object(d.a)((function(e){S&&null!=e&&(clearTimeout(W.current),W.current=setTimeout((function(){G(null,"timeout")}),e))}));o.useEffect((function(){return T&&K(v),function(){clearTimeout(W.current)}}),[T,v,K]);var J=function(){clearTimeout(W.current)},Q=o.useCallback((function(){null!=v&&K(null!=B?B:.5*v)}),[v,B,K]);return o.useEffect((function(){if(!k&&T)return window.addEventListener("focus",Q),window.addEventListener("blur",J),function(){window.removeEventListener("focus",Q),window.removeEventListener("blur",J)}}),[k,Q,T]),!T&&Y?null:o.createElement(u.a,Object(a.a)({onClickAway:function(e){S&&S(e,"clickaway")}},y),o.createElement("div",Object(a.a)({className:Object(s.a)(x.root,x["anchorOrigin".concat(Object(p.a)(c)).concat(Object(p.a)(g))],O),onMouseEnter:function(e){A&&A(e),J()},onMouseLeave:function(e){R&&R(e),Q()},ref:t},H),o.createElement(U,Object(a.a)({appear:!0,in:T,onEnter:Object(h.a)((function(){Z(!1)}),L),onEntered:E,onEntering:M,onExit:P,onExited:Object(h.a)((function(){Z(!0)}),I),onExiting:N,timeout:q,direction:"top"===c?"down":"up"},F),j||o.createElement(m.a,Object(a.a)({message:D,action:n},w)))))}));t.a=Object(c.a)((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},o={justifyContent:"flex-start"},s={top:24},c={bottom:24},l={right:24},u={left:24},d={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:Object(a.a)({},t,Object(i.a)({},e.breakpoints.up("sm"),Object(a.a)({},s,d))),anchorOriginBottomCenter:Object(a.a)({},n,Object(i.a)({},e.breakpoints.up("sm"),Object(a.a)({},c,d))),anchorOriginTopRight:Object(a.a)({},t,r,Object(i.a)({},e.breakpoints.up("sm"),Object(a.a)({left:"auto"},s,l))),anchorOriginBottomRight:Object(a.a)({},n,r,Object(i.a)({},e.breakpoints.up("sm"),Object(a.a)({left:"auto"},c,l))),anchorOriginTopLeft:Object(a.a)({},t,o,Object(i.a)({},e.breakpoints.up("sm"),Object(a.a)({right:"auto"},s,u))),anchorOriginBottomLeft:Object(a.a)({},n,o,Object(i.a)({},e.breakpoints.up("sm"),Object(a.a)({right:"auto"},c,u)))}}),{flip:!1,name:"MuiSnackbar"})(g)},491:function(e,t,n){"use strict";var r=n(0),i=n(36),a=n(49),o=n(30),s=n(64);function c(e){return e.substring(2).toLowerCase()}t.a=function(e){var t=e.children,n=e.disableReactTree,l=void 0!==n&&n,u=e.mouseEvent,d=void 0===u?"onClick":u,p=e.onClickAway,h=e.touchEvent,f=void 0===h?"onTouchEnd":h,m=r.useRef(!1),g=r.useRef(null),b=r.useRef(!1),v=r.useRef(!1);r.useEffect((function(){return setTimeout((function(){b.current=!0}),0),function(){b.current=!1}}),[]);var j=r.useCallback((function(e){g.current=i.findDOMNode(e)}),[]),x=Object(o.a)(t.ref,j),O=Object(s.a)((function(e){var t=v.current;if(v.current=!1,b.current&&g.current&&!function(e){return document.documentElement.clientWidth<e.clientX||document.documentElement.clientHeight<e.clientY}(e))if(m.current)m.current=!1;else{var n;if(e.composedPath)n=e.composedPath().indexOf(g.current)>-1;else n=!Object(a.a)(g.current).documentElement.contains(e.target)||g.current.contains(e.target);n||!l&&t||p(e)}})),y=function(e){return function(n){v.current=!0;var r=t.props[e];r&&r(n)}},w={ref:x};return!1!==f&&(w[f]=y(f)),r.useEffect((function(){if(!1!==f){var e=c(f),t=Object(a.a)(g.current),n=function(){m.current=!0};return t.addEventListener(e,O),t.addEventListener("touchmove",n),function(){t.removeEventListener(e,O),t.removeEventListener("touchmove",n)}}}),[O,f]),!1!==d&&(w[d]=y(d)),r.useEffect((function(){if(!1!==d){var e=c(d),t=Object(a.a)(g.current);return t.addEventListener(e,O),function(){t.removeEventListener(e,O)}}}),[O,d]),r.createElement(r.Fragment,null,r.cloneElement(t,w))}},492:function(e,t,n){"use strict";var r=n(14),i=n(6),a=n(7),o=n(0),s=n(12),c=n(20),l=n(96),u=n(35),d=o.forwardRef((function(e,t){var n=e.action,i=e.classes,c=e.className,u=e.message,d=e.role,p=void 0===d?"alert":d,h=Object(r.a)(e,["action","classes","className","message","role"]);return o.createElement(l.a,Object(a.a)({role:p,square:!0,elevation:6,className:Object(s.a)(i.root,c),ref:t},h),o.createElement("div",{className:i.message},u),n?o.createElement("div",{className:i.action},n):null)}));t.a=Object(c.a)((function(e){var t="light"===e.palette.type?.8:.98,n=Object(u.d)(e.palette.background.default,t);return{root:Object(a.a)({},e.typography.body2,Object(i.a)({color:e.palette.getContrastText(n),backgroundColor:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288})),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiSnackbarContent"})(d)},499:function(e,t){e.exports=function(){this.__data__=[],this.size=0}},500:function(e,t,n){var r=n(380),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);
vendor: 4,417 bytes, line 2
2return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},501:function(e,t,n){var r=n(380);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},502:function(e,t,n){var r=n(380);e.exports=function(e){return r(this.__data__,e)>-1}},503:function(e,t,n){var r=n(380);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},504:function(e,t,n){var r=n(379);e.exports=function(){this.__data__=new r,this.size=0}},505:function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},506:function(e,t){e.exports=function(e){return this.__data__.get(e)}},507:function(e,t){e.exports=function(e){return this.__data__.has(e)}},508:function(e,t,n){var r=n(379),i=n(405),a=n(465);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(e,t),this.size=n.size,this}},509:function(e,t,n){var r=n(452),i=n(512),a=n(358),o=n(454),s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,p=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||i(e))&&(r(e)?p:s).test(o(e))}},510:function(e,t,n){var r=n(372),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(c){}var i=o.call(e);return r&&(t?e[s]=n:delete e[s]),i}},511:function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},512:function(e,t,n){var r=n(513),i=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},513:function(e,t,n){var r=n(350)["__core-js_shared__"];e.exports=r},514:function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},515:function(e,t,n){var r=n(516),i=n(379),a=n(405);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},516:function(e,t,n){var r=n(517),i=n(518),a=n(519),o=n(520),s=n(521);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,e.exports=c},517:function(e,t,n){var r=n(382);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},518:function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},519:function(e,t,n){var r=n(382),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},520:function(e,t,n){var r=n(382),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},521:function(e,t,n){var r=n(382);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},522:function(e,t,n){var r=n(383);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},523:function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},524:function(e,t,n){var r=n(383);e.exports=function(e){return r(this,e).get(e)}},525:function(e,t,n){var r=n(383);e.exports=function(e){return r(this,e).has(e)}},526:function(e,t,n){var r=n(383);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},527:function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},528:function(e,t,n){var r=n(529),i=n(356),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return i(e)&&o.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},529:function(e,t,n){var r=n(381),i=n(356);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},530:function(e,t){e.exports=function(){return!1}},531:function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},532:function(e,t,n){var r=n(381),i=n(455),a=n(356),o={};
2o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&i(e.length)&&!!o[r(e)]}},533:function(e,t,n){var r=n(377),i=n(534),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},534:function(e,t,n){var r=n(409)(Object.keys,Object);e.exports=r},535:function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}},536:function(e,t,n){var r=n(353)(n(350),"DataView");e.exports=r},537:function(e,t,n){var r=n(353)(n(350),"Promise");e.exports=r},538:function(e,t,n){var r=n(353)(n(350),"Set");e.exports=r},539:function(e,t,n){var r=n(353)(n(350),"WeakMap");e.exports=r},545:function(e,t,n){"use strict";var r=n(0),i=n.n(r);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}var s="REACT_COOL_IMG",c=function(){function e(){a(this,"img",null),a(this,"timeout",null),a(this,"retries",1)}var t=e.prototype;return t.load=function(e,t,n,r,i,a){var o=this,s=n.count,c=void 0===s?3:s,l=n.delay,u=void 0===l?2:l,d=n.acc,p=void 0===d?"*":d;this.img=new Image,this.img.src=e,a&&(this.img.crossOrigin=a),t&&this.img.decode&&this.img.decode().catch((function(){})),this.img.onerror=function(t){if(!c||o.retries>c)r(t);else{var n="*"===p?Math.pow(u,o.retries):u*o.retries;n=!1===p?u:n,o.timeout=setTimeout((function(){o.clearImgSrc(),o.img.src=e}),1e3*n),o.retries+=1}},this.img.onload=function(e){return i(e)}},t.unload=function(){this.img&&(this.img.onerror=null,this.img.onload=null,this.clearImgSrc(),this.img=null),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.retries=1},t.clearImgSrc=function(){this.img.src="";try{delete this.img.src}catch(e){}},e}(),l=function(e){var t=Object(r.useRef)(e);return t.current=e,t},u=["className","placeholder","src","error","crossOrigin","decode","lazy","cache","debounce","observerOptions","retry","srcSet","sizes","onError","onLoad"],d="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",p=Object(r.forwardRef)((function(e,t){var n=e.className,a=void 0===n?"":n,p=e.placeholder,h=e.src,f=e.error,m=e.crossOrigin,g=e.decode,b=void 0===g||g,v=e.lazy,j=void 0===v||v,x=e.cache,O=void 0===x||x,y=e.debounce,w=void 0===y?300:y,C=e.observerOptions,k=void 0===C?{}:C,D=e.retry,S=void 0===D?{}:D,L=e.srcSet,E=e.sizes,M=e.onError,P=e.onLoad,I=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,u),N=function(e,t){var n=t.root,i=t.rootMargin,a=void 0===i?"50px":i,o=t.threshold,s=void 0===o?.01:o,c=Object(r.useState)(!1),l=c[0],u=c[1],d=Object(r.useState)(null),p=d[0],h=d[1],f=Object(r.useRef)(null),m=Object(r.useRef)(null),g=Object(r.useRef)(!1),b=s;"number"!==typeof s&&(console.warn("\ud83d\udca1react-cool-img: the threshold of observerOptions must be a number. Use 0 as fallback."),b=0);var v=Object(r.useCallback)((function(){m.current&&(clearTimeout(m.current),m.current=null)}),[]);return Object(r.useEffect)((function(){if(!("IntersectionObserver"in window)||!("IntersectionObserverEntry"in window))return g.current||(console.error("\ud83d\udca1react-cool-img: the browser doesn't support Intersection Observer, please install polyfill to enable lazy loading: https://github.com/wellyshen/react-cool-img#intersection-observer-polyfill"),g.current=!0),u(!0),function(){return null};
2f.current=new IntersectionObserver((function(t){var n=t[0],r=n.isIntersecting,i=n.intersectionRatio;(void 0!==r?r:i>0)&&!l?m.current=setTimeout((function(){u(!0)}),e):v()}),{root:n,rootMargin:a,threshold:b});var t=f.current;return p&&t.observe(p),function(){t.disconnect(),v()}}),[p,l,n,a,b,e,v]),[h,l]}(w,k),A=N[0],R=N[1],T=Object(r.useState)(p||d),B=T[0],z=T[1],U=Object(r.useRef)(new c),_=l(M),q=l(P),F=B===h,H=h?h.replace(/^.*[\\/]/,"").split(".")[0]:"";return Object(r.useEffect)((function(){if(!h)return z(p||d),function(){return null};var e=U.current;return(!j||O&&function(e){try{return!!JSON.parse(sessionStorage.getItem(s)||"{}")[e]}catch(f){return console.error("\ud83d\udca1 react-cool-img: "+f),!1}}(h)||R)&&e.load(h,b,S,(function(e){z((function(e){return f||p||e})),_.current&&_.current(e)}),(function(e){z(h),O&&function(e){try{var t=JSON.parse(sessionStorage.getItem(s)||"{}");t[e]=new Date,sessionStorage.setItem(s,JSON.stringify(t))}catch(f){console.error("\ud83d\udca1 react-cool-img: "+f)}}(h),q.current&&q.current(e)}),m),function(){return e.unload()}}),[O,m,b,f,j,_,q,p,h,R]),i.a.createElement(i.a.Fragment,null,i.a.createElement("img",o({className:a+" no-js-"+H,src:B,crossOrigin:F?m:void 0,srcSet:F?L:void 0,sizes:F?E:void 0},I,{ref:function(e){e&&(A(e),t&&(t.current=e))}})),i.a.createElement("noscript",null,i.a.createElement("style",null,".no-js-"+H+" { display: none !important; }"),i.a.createElement("img",o({className:a,src:h,crossOrigin:m,srcSet:L,sizes:E},I))))})),h=Object(r.memo)(p);t.a=h},546:function(e,t,n){var r;!function(i){"use strict";var a,o,s,c=9e15,l=1e9,u="0123456789abcdef",d="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",p="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",h={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-c,maxE:c,crypto:!1},f=!0,m="[DecimalError] ",g=m+"Invalid argument: ",b=m+"Precision limit exceeded",v=m+"crypto unavailable",j="[object Decimal]",x=Math.floor,O=Math.pow,y=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,w=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,C=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,k=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,D=1e7,S=d.length-1,L=p.length-1,E={toStringTag:j};function M(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(a+=q(n)),a+=r;(n=7-(r=(o=e[t])+"").length)&&(a+=q(n))}else if(0===o)return"0";for(;o%10===0;)o/=10;return a+o}function P(e,t,n){if(e!==~~e||e<t||e>n)throw Error(g+e)}function I(e,t,n,r){var i,a,o,s;for(a=e[0];a>=10;a/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),a=O(10,7-t),s=e[i]%a|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),o=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):o=(n<4&&s+1==a||n>3&&s+1==a/2)&&(e[i+1]/a/100|0)==O(10,t-2)-1||(s==a/2||0==s)&&0==(e[i+1]/a/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),o=(r||n<4)&&9999==s||!r&&n>3&&4999==s):o=((r||n<4)&&s+1==a||!r&&n>
vendor: 5,799 bytes, line 2
23&&s+1==a/2)&&(e[i+1]/a/1e3|0)==O(10,t-3)-1,o}function N(e,t,n){for(var r,i,a=[0],o=0,s=e.length;o<s;){for(i=a.length;i--;)a[i]*=t;for(a[0]+=u.indexOf(e.charAt(o++)),r=0;r<a.length;r++)a[r]>n-1&&(void 0===a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/n|0,a[r]%=n)}return a.reverse()}E.absoluteValue=E.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),R(e)},E.ceil=function(){return R(new this.constructor(this),this.e+1,2)},E.clampedTo=E.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(g+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},E.comparedTo=E.cmp=function(e){var t,n,r,i,a=this,o=a.d,s=(e=new a.constructor(e)).d,c=a.s,l=e.s;if(!o||!s)return c&&l?c!==l?c:o===s?0:!o^c<0?1:-1:NaN;if(!o[0]||!s[0])return o[0]?c:s[0]?-l:0;if(c!==l)return c;if(a.e!==e.e)return a.e>e.e^c<0?1:-1;for(t=0,n=(r=o.length)<(i=s.length)?r:i;t<n;++t)if(o[t]!==s[t])return o[t]>s[t]^c<0?1:-1;return r===i?0:r>i^c<0?1:-1},E.cosine=E.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;(r=t.d.length)<32?i=(1/Q(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");e.precision+=n,t=J(e,1,t.times(i),new e(1));for(var a=n;a--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}(r,$(r,n)),r.precision=e,r.rounding=t,R(2==s||3==s?n.neg():n,e,t,!0)):new r(1):new r(NaN)},E.cubeRoot=E.cbrt=function(){var e,t,n,r,i,a,o,s,c,l,u=this,d=u.constructor;if(!u.isFinite()||u.isZero())return new d(u);for(f=!1,(a=u.s*O(u.s*u,1/3))&&Math.abs(a)!=1/0?r=new d(a.toString()):(n=M(u.d),(a=((e=u.e)-n.length+1)%3)&&(n+=1==a||-2==a?"0":"00"),a=O(n,1/3),e=x((e+1)/3)-(e%3==(e<0?-1:2)),(r=new d(n=a==1/0?"5e"+e:(n=a.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=u.s),o=(e=d.precision)+3;;)if(l=(c=(s=r).times(s).times(s)).plus(u),r=A(l.plus(u).times(s),l.plus(c),o+2,1),M(s.d).slice(0,o)===(n=M(r.d)).slice(0,o)){if("9999"!=(n=n.slice(o-3,o+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(R(r,e+1,1),t=!r.times(r).times(r).eq(u));break}if(!i&&(R(s,e+1,0),s.times(s).times(s).eq(u))){r=s;break}o+=4,i=1}return f=!0,R(r,e,d.rounding,t)},E.decimalPlaces=E.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=7*((e=t.length-1)-x(this.e/7)),e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},E.dividedBy=E.div=function(e){return A(this,new this.constructor(e))},E.dividedToIntegerBy=E.divToInt=function(e){var t=this.constructor;return R(A(this,new t(e),0,1,1),t.precision,t.rounding)},E.equals=E.eq=function(e){return 0===this.cmp(e)},E.floor=function(){return R(new this.constructor(this),this.e+1,3)},E.greaterThan=E.gt=function(e){return this.cmp(e)>0},E.greaterThanOrEqualTo=E.gte=function(e){var t=this.cmp(e);return 1==t||0===t},E.hyperbolicCosine=E.cosh=function(){var e,t,n,r,i,a=this,o=a.constructor,s=new o(1);if(!a.isFinite())return new o(a.s?1/0:NaN);if(a.isZero())return s;n=o.precision,r=o.rounding,o.precision=n+Math.max(a.e,a.sd())+4,o.rounding=1,(i=a.d.length)<32?t=(1/Q(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),a=J(o,1,a.times(t),new o(1),!0);for(var c,l=e,u=new o(8);l--;)c=a.times(a),a=s.minus(c.times(u.minus(c.times(u))));return R(a,o.precision=n,o.rounding=r,!0)},E.hyperbolicSine=E.sinh=function(){var e,t,n,r,i=this,a=i.constructor;if(!i.isFinite()||i.isZero())return new a(i);if(t=a.precision,n=a.rounding,a.precision=t+Math.max(i.e,i.sd())+4,a.rounding=1,(r=i.d.length)<3)i=J(a,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=J(a,2,i=i.times(1/Q(5,e)),i,!0);for(var o,s=new a(5),c=new a(16),l=new a(20);e--;)o=i.times(i),i=i.times(s.plus(o.times(c.times(o).plus(l))))}return a.precision=t,a.rounding=n,R(i,t,n,!0)},E.hyperbolicTangent=E.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,A(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},E.inverseCosine=E.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,i=t.rounding;return-1!==n?0===n?e.isNeg()?U(t,r,i):new t(0):new t(NaN):e.isZero()?U(t,r+4,i).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=i,e.times(2))},E.inverseHyperbolicCosine=E.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,f=!1,n=n.times(n).minus(1).sqrt().plus(n),f=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},E.inverseHyperbolicSine=E.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,f=!1,n=n.times(n).plus(1).sqrt().plus(n),f=!0,r.precision=e,r.rounding=t,n.ln())},E.inverseHyperbolicTangent=E.atanh=function(){var e,t,n,r,i=this,a=i.constructor;return i.isFinite()?i.e>=0?new a(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=a.precision,t=a.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?R(new a(i),e,t,!0):(a.precision=n=r-i.e,i=A(i.plus(1),new a(1).minus(i),n+e,1),a.precision=e+4,a.rounding=1,i=i.ln(),a.precision=e,a.rounding=t,i.times(.5))):new a(NaN)},E.inverseSine=E.asin=function(){var e,t,n,r,i=this,a=i.constructor;return i.isZero()?new a(i):(t=i.abs().cmp(1),n=a.precision,r=a.rounding,-1!==t?0===t?((e=U(a,n+4,r).times(.5)).s=i.s,e):new a(NaN):(a.precision=n+6,a.rounding=1,i=i.div(new a(1).minus(i.times(i)).sqrt().plus(1)).atan(),a.precision=n,a.rounding=r,i.times(2)))},E.inverseTangent=E.atan=function(){var e,t,n,r,i,a,o,s,c,l=this,u=l.constructor,d=u.precision,p=u.rounding;if(l.isFinite()){if(l.isZero())return new u(l);
vendor: 5,461 bytes, line 2
2if(l.abs().eq(1)&&d+4<=L)return(o=U(u,d+4,p).times(.25)).s=l.s,o}else{if(!l.s)return new u(NaN);if(d+4<=L)return(o=U(u,d+4,p).times(.5)).s=l.s,o}for(u.precision=s=d+10,u.rounding=1,e=n=Math.min(28,s/7+2|0);e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(f=!1,t=Math.ceil(s/7),r=1,c=l.times(l),o=new u(l),i=l;-1!==e;)if(i=i.times(c),a=o.minus(i.div(r+=2)),i=i.times(c),void 0!==(o=a.plus(i.div(r+=2))).d[t])for(e=t;o.d[e]===a.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),f=!0,R(o,u.precision=d,u.rounding=p,!0)},E.isFinite=function(){return!!this.d},E.isInteger=E.isInt=function(){return!!this.d&&x(this.e/7)>this.d.length-2},E.isNaN=function(){return!this.s},E.isNegative=E.isNeg=function(){return this.s<0},E.isPositive=E.isPos=function(){return this.s>0},E.isZero=function(){return!!this.d&&0===this.d[0]},E.lessThan=E.lt=function(e){return this.cmp(e)<0},E.lessThanOrEqualTo=E.lte=function(e){return this.cmp(e)<1},E.logarithm=E.log=function(e){var t,n,r,i,a,o,s,c,l=this,u=l.constructor,d=u.precision,p=u.rounding;if(null==e)e=new u(10),t=!0;else{if(n=(e=new u(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(n=l.d,l.s<0||!n||!n[0]||l.eq(1))return new u(n&&!n[0]?-1/0:1!=l.s?NaN:n?0:1/0);if(t)if(n.length>1)a=!0;else{for(i=n[0];i%10===0;)i/=10;a=1!==i}if(f=!1,o=Y(l,s=d+5),r=t?z(u,s+10):Y(e,s),I((c=A(o,r,s,1)).d,i=d,p))do{if(o=Y(l,s+=10),r=t?z(u,s+10):Y(e,s),c=A(o,r,s,1),!a){+M(c.d).slice(i+1,i+15)+1==1e14&&(c=R(c,d+1,0));break}}while(I(c.d,i+=10,p));return f=!0,R(c,d,p)},E.minus=E.sub=function(e){var t,n,r,i,a,o,s,c,l,u,d,p,h=this,m=h.constructor;if(e=new m(e),!h.d||!e.d)return h.s&&e.s?h.d?e.s=-e.s:e=new m(e.d||h.s!==e.s?h:NaN):e=new m(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.plus(e);if(l=h.d,p=e.d,s=m.precision,c=m.rounding,!l[0]||!p[0]){if(p[0])e.s=-e.s;else{if(!l[0])return new m(3===c?-0:0);e=new m(h)}return f?R(e,s,c):e}if(n=x(e.e/7),u=x(h.e/7),l=l.slice(),a=u-n){for((d=a<0)?(t=l,a=-a,o=p.length):(t=p,n=u,o=l.length),a>(r=Math.max(Math.ceil(s/7),o)+2)&&(a=r,t.length=1),t.reverse(),r=a;r--;)t.push(0);t.reverse()}else{for((d=(r=l.length)<(o=p.length))&&(o=r),r=0;r<o;r++)if(l[r]!=p[r]){d=l[r]<p[r];break}a=0}for(d&&(t=l,l=p,p=t,e.s=-e.s),o=l.length,r=p.length-o;r>0;--r)l[o++]=0;for(r=p.length;r>a;){if(l[--r]<p[r]){for(i=r;i&&0===l[--i];)l[i]=D-1;--l[i],l[r]+=D}l[r]-=p[r]}for(;0===l[--o];)l.pop();for(;0===l[0];l.shift())--n;return l[0]?(e.d=l,e.e=B(l,n),f?R(e,s,c):e):new m(3===c?-0:0)},E.modulo=E.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?R(new r(n),r.precision,r.rounding):(f=!1,9==r.modulo?(t=A(n,e.abs(),0,3,1)).s*=e.s:t=A(n,e,0,r.modulo,1),t=t.times(e),f=!0,n.minus(t))},E.naturalExponential=E.exp=function(){return V(this)},E.naturalLogarithm=E.ln=function(){return Y(this)},E.negated=E.neg=function(){var e=new this.constructor(this);return e.s=-e.s,R(e)},E.plus=E.add=function(e){var t,n,r,i,a,o,s,c,l,u,d=this,p=d.constructor;if(e=new p(e),!d.d||!e.d)return d.s&&e.s?d.d||(e=new p(e.d||d.s===e.s?d:NaN)):e=new p(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.minus(e);if(l=d.d,u=e.d,s=p.precision,c=p.rounding,!l[0]||!u[0])return u[0]||(e=new p(d)),f?R(e,s,c):e;if(a=x(d.e/7),r=x(e.e/7),l=l.slice(),i=a-r){for(i<0?(n=l,i=-i,o=u.length):(n=u,r=a,o=l.length),i>(o=(a=Math.ceil(s/7))>o?a+1:o+1)&&(i=o,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((o=l.length)-(i=u.length)<0&&(i=o,n=u,u=l,l=n),t=0;i;)t=(l[--i]=l[i]+u[i]+t)/D|0,l[i]%=D;for(t&&(l.unshift(t),++r),o=l.length;0==l[--o];)l.pop();return e.d=l,e.e=B(l,r),f?R(e,s,c):e},E.precision=E.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(g+e);return n.d?(t=_(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},E.round=function(){var e=this,t=e.constructor;return R(new t(e),e.e+1,t.rounding)},E.sine=E.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:J(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=t.times(1/Q(5,n)),t=J(e,2,t,t);for(var i,a=new e(5),o=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(a.plus(i.times(o.times(i).minus(s))));return t}(r,$(r,n)),r.precision=e,r.rounding=t,R(s>2?n.neg():n,e,t,!0)):new r(NaN)},E.squareRoot=E.sqrt=function(){var e,t,n,r,i,a,o=this,s=o.d,c=o.e,l=o.s,u=o.constructor;if(1!==l||!s||!s[0])return new u(!l||l<0&&(!s||s[0])?NaN:s?o:1/0);for(f=!1,0==(l=Math.sqrt(+o))||l==1/0?(((t=M(s)).length+c)%2==0&&(t+="0"),l=Math.sqrt(t),c=x((c+1)/2)-(c<0||c%2),r=new u(t=l==1/0?"5e"+c:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+c)):r=new u(l.toString()),n=(c=u.precision)+3;;)if(r=(a=r).plus(A(o,a,n+2,1)).times(.5),M(a.d).slice(0,n)===(t=M(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(R(r,c+1,1),e=!r.times(r).eq(o));break}if(!i&&(R(a,c+1,0),a.times(a).eq(o))){r=a;break}n+=4,i=1}return f=!0,R(r,c,u.rounding,e)},E.tangent=E.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=A(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,R(2==s||4==s?n.neg():n,e,t,!0)):new r(NaN)},E.times=E.mul=function(e){var t,n,r,i,a,o,s,c,l,u=this,d=u.constructor,p=u.d,h=(e=new d(e)).d;if(e.s*=u.s,!p||!p[0]||!h||!h[0])return new d(!e.s||p&&!p[0]&&!h||h&&!h[0]&&!p?NaN:p&&h?0*e.s:e.s/0);
vendor: 5,459 bytes, line 2
2for(n=x(u.e/7)+x(e.e/7),(c=p.length)<(l=h.length)&&(a=p,p=h,h=a,o=c,c=l,l=o),a=[],r=o=c+l;r--;)a.push(0);for(r=l;--r>=0;){for(t=0,i=c+r;i>r;)s=a[i]+h[r]*p[i-r-1]+t,a[i--]=s%D|0,t=s/D|0;a[i]=(a[i]+t)%D|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=B(a,n),f?R(e,d.precision,d.rounding):e},E.toBinary=function(e,t){return X(this,2,e,t)},E.toDecimalPlaces=E.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(P(e,0,l),void 0===t?t=r.rounding:P(t,0,8),R(n,e+n.e+1,t))},E.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=T(r,!0):(P(e,0,l),void 0===t?t=i.rounding:P(t,0,8),n=T(r=R(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},E.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return void 0===e?n=T(i):(P(e,0,l),void 0===t?t=a.rounding:P(t,0,8),n=T(r=R(new a(i),e+i.e+1,t),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},E.toFraction=function(e){var t,n,r,i,a,o,s,c,l,u,d,p,h=this,m=h.d,b=h.constructor;if(!m)return new b(h);if(l=n=new b(1),r=c=new b(0),o=(a=(t=new b(r)).e=_(m)-h.e-1)%7,t.d[0]=O(10,o<0?7+o:o),null==e)e=a>0?t:l;else{if(!(s=new b(e)).isInt()||s.lt(l))throw Error(g+s);e=s.gt(t)?a>0?t:l:s}for(f=!1,s=new b(M(m)),u=b.precision,b.precision=a=7*m.length*2;d=A(s,t,0,1,1),1!=(i=n.plus(d.times(r))).cmp(e);)n=r,r=i,i=l,l=c.plus(d.times(i)),c=i,i=t,t=s.minus(d.times(i)),s=i;return i=A(e.minus(n),r,0,1,1),c=c.plus(i.times(l)),n=n.plus(i.times(r)),c.s=l.s=h.s,p=A(l,r,a,1).minus(h).abs().cmp(A(c,n,a,1).minus(h).abs())<1?[l,r]:[c,n],b.precision=u,f=!0,p},E.toHexadecimal=E.toHex=function(e,t){return X(this,16,e,t)},E.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:P(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(f=!1,n=A(n,e,0,t,1).times(e),f=!0,R(n)):(e.s=n.s,n=e),n},E.toNumber=function(){return+this},E.toOctal=function(e,t){return X(this,8,e,t)},E.toPower=E.pow=function(e){var t,n,r,i,a,o,s=this,c=s.constructor,l=+(e=new c(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new c(O(+s,l));if((s=new c(s)).eq(1))return s;if(r=c.precision,a=c.rounding,e.eq(1))return R(s,r,a);if((t=x(e.e/7))>=e.d.length-1&&(n=l<0?-l:l)<=9007199254740991)return i=F(c,s,n,r),e.s<0?new c(1).div(i):R(i,r,a);if((o=s.s)<0){if(t<e.d.length-1)return new c(NaN);if(0==(1&e.d[t])&&(o=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=o,s}return(t=0!=(n=O(+s,l))&&isFinite(n)?new c(n+"").e:x(l*(Math.log("0."+M(s.d))/Math.LN10+s.e+1)))>c.maxE+1||t<c.minE-1?new c(t>0?o/0:0):(f=!1,c.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=V(e.times(Y(s,r+n)),r)).d&&I((i=R(i,r+5,1)).d,r,a)&&(t=r+10,+M((i=R(V(e.times(Y(s,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=R(i,r+1,0))),i.s=o,f=!0,c.rounding=a,R(i,r,a))},E.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=T(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(P(e,1,l),void 0===t?t=i.rounding:P(t,0,8),n=T(r=R(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},E.toSignificantDigits=E.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(P(e,1,l),void 0===t?t=n.rounding:P(t,0,8)),R(new n(this),e,t)},E.toString=function(){var e=this,t=e.constructor,n=T(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},E.truncated=E.trunc=function(){return R(new this.constructor(this),this.e+1,1)},E.valueOf=E.toJSON=function(){var e=this,t=e.constructor,n=T(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var A=function(){function e(e,t,n){var r,i=0,a=e.length;for(e=e.slice();a--;)r=e[a]*t+i,e[a]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,a,s,c,l){var u,d,p,h,f,m,g,b,v,j,O,y,w,C,k,S,L,E,M,P,I=r.constructor,N=r.s==i.s?1:-1,A=r.d,T=i.d;if(!A||!A[0]||!T||!T[0])return new I(r.s&&i.s&&(A?!T||A[0]!=T[0]:T)?A&&0==A[0]||!T?0*N:N/0:NaN);for(l?(f=1,d=r.e-i.e):(l=D,f=7,d=x(r.e/f)-x(i.e/f)),M=T.length,L=A.length,j=(v=new I(N)).d=[],p=0;T[p]==(A[p]||0);p++);if(T[p]>(A[p]||0)&&d--,null==a?(C=a=I.precision,s=I.rounding):C=c?a+(r.e-i.e)+1:a,C<0)j.push(1),m=!0;else{if(C=C/f+2|0,p=0,1==M){for(h=0,T=T[0],C++;(p<L||h)&&C--;p++)k=h*l+(A[p]||0),j[p]=k/T|0,h=k%T|0;m=h||p<L}else{for((h=l/(T[0]+1)|0)>1&&(T=e(T,h,l),A=e(A,h,l),M=T.length,L=A.length),S=M,y=(O=A.slice(0,M)).length;y<M;)O[y++]=0;(P=T.slice()).unshift(0),E=T[0],T[1]>=l/2&&++E;do{h=0,(u=t(T,O,M,y))<0?(w=O[0],M!=y&&(w=w*l+(O[1]||0)),(h=w/E|0)>1?(h>=l&&(h=l-1),1==(u=t(g=e(T,h,l),O,b=g.length,y=O.length))&&(h--,n(g,M<b?P:T,b,l))):(0==h&&(u=h=1),g=T.slice()),(b=g.length)<y&&g.unshift(0),n(O,g,y,l),-1==u&&(u=t(T,O,M,y=O.length))<1&&(h++,n(O,M<y?P:T,y,l)),y=O.length):0===u&&(h++,O=[0]),j[p++]=h,u&&O[0]?O[y++]=A[S]||0:(O=[A[S]],y=1)}while((S++<L||void 0!==O[0])&&C--);m=void 0!==O[0]}j[0]||j.shift()}if(1==f)v.e=d,o=m;else{for(p=1,h=j[0];h>=10;h/=10)p++;v.e=p+d*f-1,R(v,c?a+v.e+1:a,s,m)}return v}}();function R(e,t,n,r){var i,a,o,s,c,l,u,d,p,h=e.constructor;e:if(null!=t){if(!(d=e.d))return e;for(i=1,s=d[0];s>=10;s/=10)i++;if((a=t-i)<0)a+=7,o=t,c=(u=d[p=0])/O(10,i-o-1)%10|0;else if((p=Math.ceil((a+1)/7))>=(s=d.length)){if(!r)break e;for(;s++<=p;)d.push(0);u=c=0,i=1,o=(a%=7)-7+1}else{for(u=s=d[p],i=1;s>=10;s/=10)i++;
vendor: 8,542 bytes, line 2
2c=(o=(a%=7)-7+i)<0?0:u/O(10,i-o-1)%10|0}if(r=r||t<0||void 0!==d[p+1]||(o<0?u:u%O(10,i-o-1)),l=n<4?(c||r)&&(0==n||n==(e.s<0?3:2)):c>5||5==c&&(4==n||r||6==n&&(a>0?o>0?u/O(10,i-o):0:d[p-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,l?(t-=e.e+1,d[0]=O(10,(7-t%7)%7),e.e=-t||0):d[0]=e.e=0,e;if(0==a?(d.length=p,s=1,p--):(d.length=p+1,s=O(10,7-a),d[p]=o>0?(u/O(10,i-o)%O(10,o)|0)*s:0),l)for(;;){if(0==p){for(a=1,o=d[0];o>=10;o/=10)a++;for(o=d[0]+=s,s=1;o>=10;o/=10)s++;a!=s&&(e.e++,d[0]==D&&(d[0]=1));break}if(d[p]+=s,d[p]!=D)break;d[p--]=0,s=1}for(a=d.length;0===d[--a];)d.pop()}return f&&(e.e>h.maxE?(e.d=null,e.e=NaN):e.e<h.minE&&(e.e=0,e.d=[0])),e}function T(e,t,n){if(!e.isFinite())return Z(e);var r,i=e.e,a=M(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+q(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):i<0?(a="0."+q(-i-1)+a,n&&(r=n-o)>0&&(a+=q(r))):i>=o?(a+=q(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+q(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=q(r))),a}function B(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function z(e,t,n){if(t>S)throw f=!0,n&&(e.precision=n),Error(b);return R(new e(d),t,1,!0)}function U(e,t,n){if(t>L)throw Error(b);return R(new e(p),t,n,!0)}function _(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function q(e){for(var t="";e--;)t+="0";return t}function F(e,t,n,r){var i,a=new e(1),o=Math.ceil(r/7+4);for(f=!1;;){if(n%2&&ee((a=a.times(t)).d,o)&&(i=!0),0===(n=x(n/2))){n=a.d.length-1,i&&0===a.d[n]&&++a.d[n];break}ee((t=t.times(t)).d,o)}return f=!0,a}function H(e){return 1&e.d[e.d.length-1]}function W(e,t,n){for(var r,i,a=new e(t[0]),o=0;++o<t.length;){if(!(i=new e(t[o])).s){a=i;break}((r=a.cmp(i))===n||0===r&&a.s===n)&&(a=i)}return a}function V(e,t){var n,r,i,a,o,s,c,l=0,u=0,d=0,p=e.constructor,h=p.rounding,m=p.precision;if(!e.d||!e.d[0]||e.e>17)return new p(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(f=!1,c=m):c=t,s=new p(.03125);e.e>-2;)e=e.times(s),d+=5;for(c+=r=Math.log(O(2,d))/Math.LN10*2+5|0,n=a=o=new p(1),p.precision=c;;){if(a=R(a.times(e),c,1),n=n.times(++u),M((s=o.plus(A(a,n,c,1))).d).slice(0,c)===M(o.d).slice(0,c)){for(i=d;i--;)o=R(o.times(o),c,1);if(null!=t)return p.precision=m,o;if(!(l<3&&I(o.d,c-r,h,l)))return R(o,p.precision=m,h,f=!0);p.precision=c+=10,n=a=s=new p(1),u=0,l++}o=s}}function Y(e,t){var n,r,i,a,o,s,c,l,u,d,p,h=1,m=e,g=m.d,b=m.constructor,v=b.rounding,j=b.precision;if(m.s<0||!g||!g[0]||!m.e&&1==g[0]&&1==g.length)return new b(g&&!g[0]?-1/0:1!=m.s?NaN:g?0:m);if(null==t?(f=!1,u=j):u=t,b.precision=u+=10,r=(n=M(g)).charAt(0),!(Math.abs(a=m.e)<15e14))return l=z(b,u+2,j).times(a+""),m=Y(new b(r+"."+n.slice(1)),u-10).plus(l),b.precision=j,null==t?R(m,j,v,f=!0):m;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=M((m=m.times(e)).d)).charAt(0),h++;for(a=m.e,r>1?(m=new b("0."+n),a++):m=new b(r+"."+n.slice(1)),d=m,c=o=m=A(m.minus(1),m.plus(1),u,1),p=R(m.times(m),u,1),i=3;;){if(o=R(o.times(p),u,1),M((l=c.plus(A(o,new b(i),u,1))).d).slice(0,u)===M(c.d).slice(0,u)){if(c=c.times(2),0!==a&&(c=c.plus(z(b,u+2,j).times(a+""))),c=A(c,new b(h),u,1),null!=t)return b.precision=j,c;if(!I(c.d,u-10,v,s))return R(c,b.precision=j,v,f=!0);b.precision=u+=10,l=o=m=A(d.minus(1),d.plus(1),u,1),p=R(m.times(m),u,1),i=s=1}c=l,i+=2}}function Z(e){return String(e.s*e.s/0)}function G(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";e.d.push(+t),f&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function K(e,t){var n,r,i,o,s,c,l,u,d;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),k.test(t))return G(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(w.test(t))n=16,t=t.toLowerCase();else if(y.test(t))n=2;else{if(!C.test(t))throw Error(g+t);n=8}for((o=t.search(/p/i))>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),s=(o=t.indexOf("."))>=0,r=e.constructor,s&&(o=(c=(t=t.replace(".","")).length)-o,i=F(r,new r(n),o,2*o)),o=d=(u=N(t,n,D)).length-1;0===u[o];--o)u.pop();return o<0?new r(0*e.s):(e.e=B(u,d),e.d=u,f=!1,s&&(e=A(e,i,4*c)),l&&(e=e.times(Math.abs(l)<54?O(2,l):a.pow(2,l))),f=!0,e)}function J(e,t,n,r,i){var a,o,s,c,l=e.precision,u=Math.ceil(l/7);for(f=!1,c=n.times(n),s=new e(r);;){if(o=A(s.times(c),new e(t++*t++),l,1),s=i?r.plus(o):r.minus(o),r=A(o.times(c),new e(t++*t++),l,1),void 0!==(o=s.plus(r)).d[u]){for(a=u;o.d[a]===s.d[a]&&a--;);if(-1==a)break}a=s,s=r,r=o,o=a}return f=!0,o.d.length=u+1,o}function Q(e,t){for(var n=e;--t;)n*=e;return n}function $(e,t){var n,r=t.s<0,i=U(e,e.precision,1),a=i.times(.5);if((t=t.abs()).lte(a))return s=r?4:1,t;if((n=t.divToInt(i)).isZero())s=r?3:2;else{if((t=t.minus(n.times(i))).lte(a))return s=H(n)?r?2:3:r?4:1,t;s=H(n)?r?1:4:r?3:2}return t.minus(i).abs()}function X(e,t,n,r){var i,a,s,c,d,p,h,f,m,g=e.constructor,b=void 0!==n;if(b?(P(n,1,l),void 0===r?r=g.rounding:P(r,0,8)):(n=g.precision,r=g.rounding),e.isFinite()){for(b?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,(s=(h=T(e)).indexOf("."))>=0&&(h=h.replace(".",""),(m=new g(1)).e=h.length-s,m.d=N(T(m),10,i),m.e=m.d.length),a=d=(f=N(h,10,i)).length;0==f[--d];)f.pop();if(f[0]){if(s<0?a--:((e=new g(e)).d=f,e.e=a,f=(e=A(e,m,n,r,0,i)).d,a=e.e,p=o),s=f[n],c=i/2,p=p||void 0!==f[n+1],p=r<4?(void 0!==s||p)&&(0===r||r===(e.s<0?3:2)):s>c||s===c&&(4===r||p||6===r&&1&f[n-1]||r===(e.s<0?8:7)),f.length=n,p)for(;++f[--n]>i-1;)f[n]=0,n||(++a,f.unshift(1));for(d=f.length;!f[d-1];--d);for(s=0,h="";s<d;s++)h+=u.charAt(f[s]);if(b){if(d>1)if(16==t||8==t){for(s=16==t?4:3,--d;d%s;d++)h+="0";for(d=(f=N(h,i,t)).length;!f[d-1];--d);for(s=1,h="1.";s<d;s++)h+=u.charAt(f[s])}else h=h.charAt(0)+"."+h.slice(1);h=h+(a<0?"p":"p+")+a}else if(a<0){for(;++a;)h="0"+h;h="0."+h}else if(++a>d)for(a-=d;a--;)h+="0";else a<d&&(h=h.slice(0,a)+"."+h.slice(a))}else h=b?"0p+0":"0";h=(16==t?"0x":2==t?"0b":8==t?"0o":"")+h}else h=Z(e);return e.s<0?"-"+h:h}function ee(e,t){if(e.length>t)return e.length=t,!0}function te(e){return new this(e).abs()}function ne(e){return new this(e).acos()}function re(e){return new this(e).acosh()}function ie(e,t){return new this(e).plus(t)}function ae(e){return new this(e).asin()}function oe(e){return new this(e).asinh()}function se(e){return new this(e).atan()}function ce(e){return new this(e).atanh()}function le(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,a=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?U(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=U(this,a,1).times(.5)).s=e.s:t.s<0?(this.precision=a,this.rounding=1,n=this.atan(A(e,t,a,1)),t=U(this,a,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(A(e,t,a,1)):(n=U(this,a,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function ue(e){return new this(e).cbrt()}function de(e){return R(e=new this(e),e.e+1,2)}function pe(e,t,n){return new this(e).clamp(t,n)}function he(e){if(!e||"object"!==typeof e)throw Error(m+"Object expected");var t,n,r,i=!0===e.defaults,a=["precision",1,l,"rounding",0,8,"toExpNeg",-c,0,"toExpPos",0,c,"maxE",0,c,"minE",-c,0,"modulo",0,9];for(t=0;t<a.length;t+=3)if(n=a[t],i&&(this[n]=h[n]),void 0!==(r=e[n])){if(!(x(r)===r&&r>=a[t+1]&&r<=a[t+2]))throw Error(g+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=h[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(g+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(v);this[n]=!0}else this[n]=!1}return this}function fe(e){return new this(e).cos()}function me(e){return new this(e).cosh()}function ge(e,t){return new this(e).div(t)}function be(e){return new this(e).exp()}function ve(e){return R(e=new this(e),e.e+1,3)}function je(){var e,t,n=new this(0);for(f=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return f=!0,new this(1/0);n=t}return f=!0,n.sqrt()}function xe(e){return e instanceof a||e&&e.toStringTag===j||!1}function Oe(e){return new this(e).ln()}function ye(e,t){return new this(e).log(t)}function we(e){return new this(e).log(2)}function Ce(e){return new this(e).log(10)}function ke(){return W(this,arguments,-1)}
vendor: 4,941 bytes, line 2
2function De(){return W(this,arguments,1)}function Se(e,t){return new this(e).mod(t)}function Le(e,t){return new this(e).mul(t)}function Ee(e,t){return new this(e).pow(t)}function Me(e){var t,n,r,i,a=0,o=new this(1),s=[];if(void 0===e?e=this.precision:P(e,1,l),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));a<r;)(i=t[a])>=429e7?t[a]=crypto.getRandomValues(new Uint32Array(1))[0]:s[a++]=i%1e7;else{if(!crypto.randomBytes)throw Error(v);for(t=crypto.randomBytes(r*=4);a<r;)(i=t[a]+(t[a+1]<<8)+(t[a+2]<<16)+((127&t[a+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,a):(s.push(i%1e7),a+=4);a=r/4}else for(;a<r;)s[a++]=1e7*Math.random()|0;for(e%=7,(r=s[--a])&&e&&(i=O(10,7-e),s[a]=(r/i|0)*i);0===s[a];a--)s.pop();if(a<0)n=0,s=[0];else{for(n=-1;0===s[0];n-=7)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<7&&(n-=7-r)}return o.e=n,o.d=s,o}function Pe(e){return R(e=new this(e),e.e+1,this.rounding)}function Ie(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Ne(e){return new this(e).sin()}function Ae(e){return new this(e).sinh()}function Re(e){return new this(e).sqrt()}function Te(e,t){return new this(e).sub(t)}function Be(){var e=0,t=arguments,n=new this(t[e]);for(f=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return f=!0,R(n,this.precision,this.rounding)}function ze(e){return new this(e).tan()}function Ue(e){return new this(e).tanh()}function _e(e){return R(e=new this(e),e.e+1,1)}a=function e(t){var n,r,i;function a(e){var t,n,r,i=this;if(!(i instanceof a))return new a(e);if(i.constructor=a,xe(e))return i.s=e.s,void(f?!e.d||e.e>a.maxE?(i.e=NaN,i.d=null):e.e<a.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"===(r=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void(f?t>a.maxE?(i.e=NaN,i.d=null):t<a.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!==0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):G(i,e.toString())}if("string"===r)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===n&&(e=e.slice(1)),i.s=1),k.test(e)?G(i,e):K(i,e);if("bigint"===r)return e<0?(e=-e,i.s=-1):i.s=1,G(i,e.toString());throw Error(g+e)}if(a.prototype=E,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=he,a.clone=e,a.isDecimal=xe,a.abs=te,a.acos=ne,a.acosh=re,a.add=ie,a.asin=ae,a.asinh=oe,a.atan=se,a.atanh=ce,a.atan2=le,a.cbrt=ue,a.ceil=de,a.clamp=pe,a.cos=fe,a.cosh=me,a.div=ge,a.exp=be,a.floor=ve,a.hypot=je,a.ln=Oe,a.log=ye,a.log10=Ce,a.log2=we,a.max=ke,a.min=De,a.mod=Se,a.mul=Le,a.pow=Ee,a.random=Me,a.round=Pe,a.sign=Ie,a.sin=Ne,a.sinh=Ae,a.sqrt=Re,a.sub=Te,a.sum=Be,a.tan=ze,a.tanh=Ue,a.trunc=_e,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return a.config(t),a}(h),a.prototype.constructor=a,a.default=a.Decimal=a,d=new a(d),p=new a(p),void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},567:function(e,t,n){"use strict";t.a="data:image/gif;base64,R0lGODdhZgBiAHcAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJDAAAACwAAAAAZgBiAIMAAAD////7qjYNDQ378jb/+veAgIC5vdVaWmKEfofDUwoAAAAAAAAAAAAAAAAAAAAE/xDISau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRyyWw6n9CodEqtWq/YrHbL7Xq/YGRgTC6bzWHAeb0GjwWCgXwAhxPu+Dt87H3H53UCeXl7AVx+c4l0dYN4hWxnTIiKcoGNegKQbUt+gZaXoKGOmWRiAZ6eoqqXj4ZHY5Wpq7OghUawi5+0u6N8RbgFBbp4lHJ3xciKvkTAwoyDyMfJ08tDzcF2xMlw09SuzAFywdiC2sjc3cjVQtfj2dPo6ZRlEpo47eTS53/yyqVqkO6FmzPOHb9i8foBKjfGgMOHENfFwCWuoDN4BxUuutMQokeJMP9wobPoDJVJWbxWgWwh8g/JkzCfpVS1kkXLkSRzHtjJs2dOi3k8GoAjtOaKmy5/WuzJ9IDScUE9Ev34beJAVBWfNvX5FCoBhwgQOJwa1iE9q7ECZVW6lWdXr2DFDhUQ1+y/kFdladw7507YvwjgAA6bx6gJpO/47vU7WPDgwlUtsJEMKa1MVTEzl7tTd27nRisnV9BkOdsqzTGjlvVsYDXoyADVuaLor/TlWib3wSnIWSpdj3cKSqSdyBfxOYhvs8qNsA7vr76FBh9XjXaCBPMGyrmuG3XMRNwVwVFAXkFUoQ7zlFdQXfuA8MXdwxfvPTN47PTXn0evvnz77fjNFxbfgATOsdqBg0EEmIIIFDjfMOjxN8h/7wWInxwDVlgghnIhuOBDH8bl4IW5bAZdhBC9RgEu4QnYoIYwctjZYHIxyOCIiQyzX3qhUNgiiRn+mAiCcYUIYo2tvSjkQqYNIl2PVVlHohxSZndcfJpU6U+W7lkJm5bx3eelN1yKuWWWZMJWT5fIzcYmlVGyadgEVw4w55rZcVCncW/aGWeeHeyp5gXH3QlQJKNtQtlZIIjWKBofOEqnookyGimlHiCaxqacdurpp6CGKuqopJZq6qmopqrqqqy26uqrsMYqq6wRAAAh+QQJDAAAACwCACEAYgApAIMAAAD////7qjYNDQ378jb/+veAgIC5vdVaWmKEfofDUwoAAAAAAAAAAAAAAAAAAAAE/xDISau9MujNe8dgKI5kCXgoaq5sG2qCMMxDHBN4jsea6/8lmIxmE+h0vABwyZwIadCa7ZhLpjzNbOUZnRWpO8FVpS0Li1+wel0Vb8rMM/rGrlOtSjhQ40Xb/2tJej58UmmAiG09gy2FBQWHOV0zOJOWUYuMK46QU0eWlZeimZpBATOPj3ShljGio3mlpqipqwSirq+WpLIinKmdrJO5ul0cGVe9v7VGt5fExVDHJ8myhbTA0F3a0VI4Ggbh4uO8cNcDwKpDrevdfd8B4/IG5WanUtjMc/t+iX/1TQrlSteJn8Fm/uoAjHOvSD6CwA5InEgRYjod82LMW7hEoI2HFv8LUBx5IGQqjPI0yuO4pyEakARJVjR5kkA4BAjCqcQZbpq9Pg7R0ZQ5kWbNmzkN7EzqU4vHNO6i0sCBsyqCGFZx6iiXwsIYoJ6kSqWaFWvWrbGckKHw1ZAnOwfjIrRpgKdSAUjDUVl0TlqevjSevq3Dj12
2kvHcR7/17zxjjXS7nwN1nWAAwHOEoxLCAg+C5BAm6SIACunIkNXNIh44S4zLdcSrHdU7FQbVj28Pk6sYNJYaC3wpQztObA7iC2gNKJ189o5By5WB1x53xnLkU48KH6zCOvDoUnNRXQx9gt3zWcVbRIwjPnsjg4dqPdBdvHfzy9jPMI00vjj/S9uMdBp+APIs5R993692nYH5Jmedff0n9p2CAg2VHnBrI4UeDfRoyiFhWEUKoHm/u2WKhAWxkuGBgja3Y3AawjPGZdS/K2KJjpABWI4yTeBCjjTeyCCSPfjWl4wB8BfkiW0GypBZks2CSlldrqYXFBVduUqUpTWHQ1RZbWvkGC19q2eUEEQAAOw=="},568:function(e,t,n){"use strict";n.d(t,"a",(function(){return me})),n.d(t,"b",(function(){return D})),n.d(t,"c",(function(){return re})),n.d(t,"d",(function(){return G})),n.d(t,"e",(function(){return Q})),n.d(t,"f",(function(){return le})),n.d(t,"g",(function(){return He})),n.d(t,"h",(function(){return z}));var r=n(0),i=n(703),a=n.n(i),o=(function(){function e(e){var t=e.apiKey,n=e.channel,r=e.id,i=void 0===r?"__googleMapsScriptId":r,a=e.libraries,o=void 0===a?[]:a,s=e.language,c=e.region,l=e.version,u=e.mapIds,d=e.nonce,p=e.url,h=void 0===p?"https://maps.googleapis.com/maps/api/js":p;this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.version=l,this.apiKey=t,this.channel=n,this.id=i,this.libraries=o,this.language=s,this.region=c,this.mapIds=u,this.nonce=d,this.url=h}e.prototype.createUrl=function(){var e=this.url;return e+="?callback="+this.CALLBACK,this.apiKey&&(e+="&key="+this.apiKey),this.channel&&(e+="&channel="+this.channel),this.libraries.length>0&&(e+="&libraries="+this.libraries.join(",")),this.language&&(e+="&language="+this.language),this.region&&(e+="®ion="+this.region),this.version&&(e+="&v="+this.version),this.mapIds&&(e+="&map_ids="+this.mapIds.join(",")),e},e.prototype.load=function(){return this.loadPromise()},e.prototype.loadPromise=function(){var e=this;return new Promise((function(t,n){e.loadCallback((function(e){e?n(e):t()}))}))},e.prototype.loadCallback=function(e){this.callbacks.push(e),this.execute()},e.prototype.setScript=function(){if(this.id&&document.getElementById(this.id))this.callback();else{var e=this.createUrl(),t=document.createElement("script");t.id=this.id,t.type="text/javascript",t.src=e,t.onerror=this.loadErrorCallback.bind(this),t.defer=!0,t.async=!0,this.nonce&&(t.nonce=this.nonce),document.head.appendChild(t)}},e.prototype.loadErrorCallback=function(e){this.onerrorEvent=e,this.callback()},e.prototype.setCallback=function(){window.__googleMapsCallback=this.callback.bind(this)},e.prototype.callback=function(){var e=this;this.done=!0,this.loading=!1,this.callbacks.forEach((function(t){t(e.onerrorEvent)})),this.callbacks=[]},e.prototype.execute=function(){this.done?this.callback():this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}(),function(){function e(t,n){t.getClusterer().extend(e,google.maps.OverlayView),this.cluster=t,this.className=this.cluster.getClusterer().getClusterClass(),this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.setMap(t.getMap())}var t=e.prototype;return t.onAdd=function(){var e,t,n=this;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div),this.boundsChangedListener=google.maps.event.addListener(this.getMap(),"boundschanged",(function(){t=e})),google.maps.event.addDomListener(this.div,"mousedown",(function(){e=!0,t=!1})),google.maps.event.addDomListener(this.div,"click",(function(r){if(e=!1,!t){var i=n.cluster.getClusterer();if(google.maps.event.trigger(i,"click",n.cluster),google.maps.event.trigger(i,"clusterclick",n.cluster),i.getZoomOnClick()){var a=i.getMaxZoom(),o=n.cluster.getBounds();i.getMap().fitBounds(o),setTimeout((function(){i.getMap().fitBounds(o),null!==a&&i.getMap().getZoom()>a&&i.getMap().setZoom(a+1)}),100)}r.cancelBubble=!0,r.stopPropagation&&r.stopPropagation()}})),google.maps.event.addDomListener(this.div,"mouseover",(function(){google.maps.event.trigger(n.cluster.getClusterer(),"mouseover",n.cluster)})),google.maps.event.addDomListener(this.div,"mouseout",(function(){google.maps.event.trigger(n.cluster.getClusterer(),"mouseout",n.cluster)}))},t.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),google.maps.event.clearInstanceListeners(this.div),this.div.parentNode.removeChild(this.div),this.div=null)},t.draw=function(){if(this.visible&&null!==this.div&&this.center){var e=this.getPosFromLatLng(this.center),t=e.x,n=e.y;this.div.style.top=n+"px",this.div.style.left=t+"px"}},t.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.show=function(){if(this.div&&this.center){var e="",t="",n=this.backgroundPosition.split(" "),r=parseInt(n[0].replace(/^\s+|\s+$/g,""),10),i=parseInt(n[1].replace(/^\s+|\s+$/g,""),10),a=this.getPosFromLatLng(this.center);t=null===this.sums||"undefined"===typeof this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cssText=this.createCss(a),e="<img alt='"+t+"' src='"+this.url+"' style='position: absolute; top: "+i+"px; left: "+r+"px; ",this.cluster.getClusterer().enableRetinaIcons||(e+="clip: rect("+-1*i+"px, "+(-1*r+this.width)+"px, "+(-1*i+this.height)+"px, "+-1*r+"px);"),e+="'>",this.div.innerHTML=e+"<div style='position: absolute;top: "+this.anchorText[0]+"px;left: "+this.anchorText[1]+"px;color: "+this.textColor+";font-size: "+this.textSize+"px;font-family: "+this.fontFamily+";font-weight: "+this.fontWeight+";font-style: "+this.fontStyle+";text-decoration: "+this.textDecoration+";text-align: center;width: "+this.width+"px;line-height:"+this.height+"px;'>"+this.sums.text+"</div>",this.div.title=t,this.div.style.display=""}this.visible=!0},t.useStyle=function(e){this.sums=e;var t=this.styles[Math.min(this.styles.length-1,Math.max(0,e.index-1))];this.url=t.url,this.height=t.height,this.width=t.width,this.anchorText=t.anchorText||[0,0],this.anchorIcon=t.anchorIcon||[this.height/2,this.width/2],this.textColor=t.textColor||"black",this.textSize=t.textSize||11,this.textDecoration=t.textDecoration||"none",this.fontWeight=t.fontWeight||"bold",this.fontStyle=t.fontStyle||"normal",this.fontFamily=t.fontFamily||"Arial,sans-serif",this.backgroundPosition=t.backgroundPosition||"0 0"},t.setCenter=function(e){this.center=e},t.createCss=function(e){var t=[];return t.push("cursor: pointer;
2"),t.push("position: absolute; top: "+e.y+"px; left: "+e.x+"px;"),t.push("width: "+this.width+"px; height: "+this.height+"px;"),t.join("")},t.getPosFromLatLng=function(e){var t=this.getProjection().fromLatLngToDivPixel(e);return t.x-=this.anchorIcon[1],t.y-=this.anchorIcon[0],t},e}()),s=function(){function e(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new o(this,this.markerClusterer.getStyles())}var t=e.prototype;return t.getSize=function(){return this.markers.length},t.getMarkers=function(){return this.markers},t.getCenter=function(){return this.center},t.getMap=function(){return this.map},t.getClusterer=function(){return this.markerClusterer},t.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),t=this.getMarkers(),n=0;n<t.length;n++){var r=t[n].getPosition();r&&e.extend(r)}return e},t.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.addMarker=function(e){if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var t=e.getPosition();if(t){var n=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(n-1)+t.lat())/n,(this.center.lng()*(n-1)+t.lng())/n),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var i=this.markers.length,a=this.markerClusterer.getMaxZoom();if(null!==a&&this.map.getZoom()>a)e.getMap()!==this.map&&e.setMap(this.map);else if(i<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(i===this.minClusterSize)for(var o=0;o<i;o++)this.markers[o].setMap(null);else e.setMap(null);return!0},t.isMarkerInClusterBounds=function(e){if(null!==this.bounds){var t=e.getPosition();if(t)return this.bounds.contains(t)}return!1},t.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.updateIcon=function(){var e=this.markers.length,t=this.markerClusterer.getMaxZoom();null!==t&&this.map.getZoom()>t||e<this.minClusterSize?this.clusterIcon.hide():(this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show())},t.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var t=0;t<this.markers.length;t++)if(e===this.markers[t])return!0;return!1},e}(),c=function(e,t){for(var n=0,r=e.length.toString(),i=r;0!==i;)i=parseInt(i,10)/10,n++;return{text:r,index:n=Math.min(n,t),title:""}},l=[53,56,66,78,90],u=function(){function e(t,n,r){void 0===n&&(n=[]),void 0===r&&(r={}),this.extend(e,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,void 0!==r.zoomOnClick&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,void 0!==r.averageCenter&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,void 0!==r.ignoreHidden&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,void 0!==r.enableRetinaIcons&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=r.imageExtension||"png",this.imageSizes=r.imageSizes||l,this.calculator=r.calculator||c,this.batchSize=r.batchSize||2e3,this.batchSizeIE=r.batchSizeIE||500,this.clusterClass=r.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(t)}var t=e.prototype;return t.onAdd=function(){var e=this;this.activeMap=this.getMap(),this.ready=!0,this.repaint(),this.listeners=[google.maps.event.addListener(this.getMap(),"zoom_changed",(function(){e.resetViewport(!1),e.getMap().getZoom()!==(e.get("minZoom")||0)&&e.getMap().getZoom()!==e.get("maxZoom")||google.maps.event.trigger(e,"idle")})),google.maps.event.addListener(this.getMap(),"idle",(function(){e.redraw()}))]},t.onRemove=function(){for(var e=0;e<this.markers.length;e++)this.markers[e].getMap()!==this.activeMap&&this.markers[e].setMap(this.activeMap);for(var t=0;
2t<this.clusters.length;t++)this.clusters[t].remove();this.clusters=[];for(var n=0;n<this.listeners.length;n++)google.maps.event.removeListener(this.listeners[n]);this.listeners=[],this.activeMap=null,this.ready=!1},t.draw=function(){},t.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:this.imagePath+(e+1)+"."+this.imageExtension,height:this.imageSizes[e],width:this.imageSizes[e]})},t.fitMapToMarkers=function(){for(var e=this.getMarkers(),t=new google.maps.LatLngBounds,n=0;n<e.length;n++){var r=e[n].getPosition();r&&t.extend(r)}this.getMap().fitBounds(t)},t.getGridSize=function(){return this.gridSize},t.setGridSize=function(e){this.gridSize=e},t.getMinimumClusterSize=function(){return this.minClusterSize},t.setMinimumClusterSize=function(e){this.minClusterSize=e},t.getMaxZoom=function(){return this.maxZoom},t.setMaxZoom=function(e){this.maxZoom=e},t.getStyles=function(){return this.styles},t.setStyles=function(e){this.styles=e},t.getTitle=function(){return this.title},t.setTitle=function(e){this.title=e},t.getZoomOnClick=function(){return this.zoomOnClick},t.setZoomOnClick=function(e){this.zoomOnClick=e},t.getAverageCenter=function(){return this.averageCenter},t.setAverageCenter=function(e){this.averageCenter=e},t.getIgnoreHidden=function(){return this.ignoreHidden},t.setIgnoreHidden=function(e){this.ignoreHidden=e},t.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.getImageExtension=function(){return this.imageExtension},t.setImageExtension=function(e){this.imageExtension=e},t.getImagePath=function(){return this.imagePath},t.setImagePath=function(e){this.imagePath=e},t.getImageSizes=function(){return this.imageSizes},t.setImageSizes=function(e){this.imageSizes=e},t.getCalculator=function(){return this.calculator},t.setCalculator=function(e){this.calculator=e},t.getBatchSizeIE=function(){return this.batchSizeIE},t.setBatchSizeIE=function(e){this.batchSizeIE=e},t.getClusterClass=function(){return this.clusterClass},t.setClusterClass=function(e){this.clusterClass=e},t.getMarkers=function(){return this.markers},t.getTotalMarkers=function(){return this.markers.length},t.getClusters=function(){return this.clusters},t.getTotalClusters=function(){return this.clusters.length},t.addMarker=function(e,t){this.pushMarkerTo(e),t||this.redraw()},t.addMarkers=function(e,t){for(var n in e)e.hasOwnProperty(n)&&this.pushMarkerTo(e[n]);t||this.redraw()},t.pushMarkerTo=function(e){var t=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",(function(){t.ready&&(e.isAdded=!1,t.repaint())})),e.isAdded=!1,this.markers.push(e)},t.removeMarker_=function(e){var t=-1;if(this.markers.indexOf)t=this.markers.indexOf(e);else for(var n=0;n<this.markers.length;n++)if(e===this.markers[n]){t=n;break}return-1!==t&&(e.setMap(null),this.markers.splice(t,1),!0)},t.removeMarker=function(e,t){var n=this.removeMarker_(e);return!t&&n&&this.repaint(),n},t.removeMarkers=function(e,t){for(var n=!1,r=0;r<e.length;r++)n=n||this.removeMarker_(e[r]);return!t&&n&&this.repaint(),n},t.clearMarkers=function(){this.resetViewport(!0),this.markers=[]}
2,t.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout((function(){for(var t=0;t<e.length;t++)e[t].remove()}),0)},t.getExtendedBounds=function(e){var t=this.getProjection(),n=t.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));n.x+=this.gridSize,n.y-=this.gridSize;var r=t.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));return r.x-=this.gridSize,r.y+=this.gridSize,e.extend(t.fromDivPixelToLatLng(n)),e.extend(t.fromDivPixelToLatLng(r)),e},t.redraw=function(){this.createClusters(0)},t.resetViewport=function(e){for(var t=0;t<this.clusters.length;t++)this.clusters[t].remove();this.clusters=[];for(var n=0;n<this.markers.length;n++){var r=this.markers[n];r.isAdded=!1,e&&r.setMap(null)}},t.distanceBetweenPoints=function(e,t){var n=(t.lat()-e.lat())*Math.PI/180,r=(t.lng()-e.lng())*Math.PI/180,i=Math.sin(n/2)*Math.sin(n/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(t.lat()*Math.PI/180)*Math.sin(r/2)*Math.sin(r/2);return 2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i))*6371},t.isMarkerInBounds=function(e,t){var n=e.getPosition();return!!n&&t.contains(n)},t.addToClosestCluster=function(e){for(var t,n=4e4,r=null,i=0;
2i<this.clusters.length;i++){var a=(t=this.clusters[i]).getCenter(),o=e.getPosition();if(a&&o){var c=this.distanceBetweenPoints(a,o);c<n&&(n=c,r=t)}}r&&r.isMarkerInClusterBounds(e)?r.addMarker(e):((t=new s(this)).addMarker(e),this.clusters.push(t))},t.createClusters=function(e){var t=this;if(this.ready){0===e&&(google.maps.event.trigger(this,"clusteringbegin",this),null!==this.timerRefStatic&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var n=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),r=this.getExtendedBounds(n),i=Math.min(e+this.batchSize,this.markers.length),a=e;a<i;a++){var o=this.markers[a];!o.isAdded&&this.isMarkerInBounds(o,r)&&(!this.ignoreHidden||this.ignoreHidden&&o.getVisible())&&this.addToClosestCluster(o)}if(i<this.markers.length)this.timerRefStatic=window.setTimeout((function(){t.createClusters(i)}),0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var s=0;
2s<this.clusters.length;s++)this.clusters[s].updateIcon()}}},t.extend=function(e,t){return function(e){for(var t in e.prototype)this.prototype[t]=e.prototype[t];return this}.apply(e,[t])},e}(),d=n(36),p=function(){function e(t){void 0===t&&(t={}),this.extend(e,google.maps.OverlayView),this.content=t.content||"",this.disableAutoPan=t.disableAutoPan||!1,this.maxWidth=t.maxWidth||0,this.pixelOffset=t.pixelOffset||new google.maps.Size(0,0),this.position=t.position||new google.maps.LatLng(0,0),this.zIndex=t.zIndex||null,this.boxClass=t.boxClass||"infoBox",this.boxStyle=t.boxStyle||{},this.closeBoxMargin=t.closeBoxMargin||"2px",this.closeBoxURL=t.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===t.closeBoxURL&&(this.closeBoxURL=""),this.infoBoxClearance=t.infoBoxClearance||new google.maps.Size(1,1),"undefined"===typeof t.visible&&("undefined"===typeof t.isHidden?t.visible=!0:t.visible=!t.isHidden),this.isHidden=!t.visible,this.alignBottom=t.alignBottom||!1,this.pane=t.pane||"floatPane",this.enableEventPropagation=t.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}var t=e.prototype;return t.createInfoBoxDiv=function(){var e=this;function t(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}if(!this.div){if(this.div=document.createElement("div"),this.setBoxStyle(),"string"===typeof this.content?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content)),this.getPanes()[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(0!==this.maxWidth&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var n=this.getBoxWidths();
2this.div.style.width=this.div.offsetWidth-n.left-n.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var r=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],i=0;i<r.length;i++)this.eventListeners.push(google.maps.event.addDomListener(this.div,r[i],t));this.eventListeners.push(google.maps.event.addDomListener(this.div,"mouseover",(function(){e.div&&(e.div.style.cursor="default")})))}this.contextListener=google.maps.event.addDomListener(this.div,"contextmenu",(function(n){n.returnValue=!1,n.preventDefault&&n.preventDefault(),e.enableEventPropagation||t(n)})),google.maps.event.trigger(this,"domready")}},t.getCloseBoxImg=function(){var e="";return""!==this.closeBoxURL&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.addClickHandler=function(){if(this.div&&this.div.firstChild&&""!==this.closeBoxURL){var e=this.div.firstChild;this.closeListener=google.maps.event.addDomListener(e,"click",this.getCloseClickHandler())}else this.closeListener=null},t.getCloseClickHandler=function(){var e=this;return function(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),google.maps.event.trigger(e,"closeclick"),e.close()}},t.panBox=function(e){if(this.div&&!e){var t=this.getMap();if(t instanceof google.maps.Map){var n=0,r=0,i=t.getBounds();i&&!i.contains(this.position)&&t.setCenter(this.position);var a=t.getDiv(),o=a.offsetWidth,s=a.offsetHeight,c=this.pixelOffset.width,l=this.pixelOffset.height,u=this.div.offsetWidth,d=this.div.offsetHeight,p=this.infoBoxClearance.width,h=this.infoBoxClearance.height,f=this.getProjection().fromLatLngToContainerPixel(this.position);f.x<-c+p?n=f.x+c-p:f.x+u+c+p>o&&(n=f.x+u+c+p-o),this.alignBottom?f.y<-l+h+d?r=f.y+l-h-d:f.y+l+h>s&&(r=f.y+l+h-s):f.y<-l+h?r=f.y+l-h:f.y+d+l+h>s&&(r=f.y+d+l+h-s),0===n&&0===r||t.panBy(n,r)}}},t.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var t in e)e.hasOwnProperty(t)&&(this.div.style[t]=e[t]);if(this.div.style.webkitTransform="translateZ(0)","undefined"!==typeof this.div.style.opacity&&""!==this.div.style.opacity){var n=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*n+')"',this.div.style.filter="alpha(opacity="+100*n+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",null!==this.zIndex&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView&&document.defaultView.getComputedStyle){var t=this.div.ownerDocument,n=t&&t.defaultView?t.defaultView.getComputedStyle(this.div,""):null;n&&(e.top=parseInt(n.borderTopWidth||"",10)||0,e.bottom=parseInt(n.borderBottomWidth||"",10)||0,e.left=parseInt(n.borderLeftWidth||"",10)||0,e.right=parseInt(n.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var r=this.div.currentStyle;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}return e},t.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection().fromLatLngToDivPixel(this.position);this.div.style.left=e.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(e.y+this.pixelOffset.height)+"px":this.div.style.top=e.y+this.pixelOffset.height+"px",this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.setOptions=function(e){void 0===e&&(e={}),"undefined"!==typeof e.boxClass&&(this.boxClass=e.boxClass,this.setBoxStyle()),"undefined"!==typeof e.boxStyle&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),"undefined"!==typeof e.content&&this.setContent(e.content),"undefined"!==typeof e.disableAutoPan&&(this.disableAutoPan=e.disableAutoPan),"undefined"!==typeof e.maxWidth&&(this.maxWidth=e.maxWidth),"undefined"!==typeof e.pixelOffset&&(this.pixelOffset=e.pixelOffset),"undefined"!==typeof e.alignBottom&&(this.alignBottom=e.alignBottom),"undefined"!==typeof e.position&&this.setPosition(e.position),"undefined"!==typeof e.zIndex&&this.setZIndex(e.zIndex),"undefined"!==typeof e.closeBoxMargin&&(this.closeBoxMargin=e.closeBoxMargin),"undefined"!==typeof e.closeBoxURL&&(this.closeBoxURL=e.closeBoxURL),"undefined"!==typeof e.infoBoxClearance&&(this.infoBoxClearance=e.infoBoxClearance),"undefined"!==typeof e.isHidden&&(this.isHidden=e.isHidden),"undefined"!==typeof e.visible&&(this.isHidden=!e.visible),"undefined"!==typeof e.enableEventPropagation&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),"string"===typeof e?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px","string"===typeof e?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.getContent=function(){return this.content},t.getPosition=function(){return this.position},t.getZIndex=function(){return this.zIndex},t.getVisible=function(){var e=this.getMap();return"undefined"!==typeof e&&null!==e&&!this.isHidden},t.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.open=function(e,t){var n=this;t&&(this.position=t.getPosition(),this.moveListener=google.maps.event.addListener(t,"position_changed",(function(){var e=t.getPosition();n.setPosition(e)})),this.mapListener=google.maps.event.addListener(t,"map_changed",(function(){n.setMap(t.map)}))),this.setMap(e),this.div&&this.panBox()},t.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0;e<this.eventListeners.length;e++)google.maps.event.removeListener(this.eventListeners[e]);this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.extend=function(e,t){return function(e){for(var t in e.prototype)this.prototype.hasOwnProperty(t)||(this.prototype[t]=e.prototype[t]);return this}.apply(e,[t])},e}();function h(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}function f(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){h(a,r,i,o,s,"next",e)}function s(e){h(a,r,i,o,s,"throw",e)}o(void 0)}))}}function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function b(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var v=Object(r.createContext)(null);var j=function(e,t,n,r){var i,a,o={};return i=e,a=function(e,i){var a=n[i];a!==t[i]&&(o[i]=a,e(r,a))}
2,Object.keys(i).forEach((function(e){return a(i[e],e)})),o};function x(e,t,n){var r,i,a,o=(r=n,i=function(n,r,i){return"function"===typeof e[i]&&n.push(google.maps.event.addListener(t,r,e[i])),n},a=[],Object.keys(r).reduce((function(e,t){return i(e,r[t],t)}),a));return o}function O(e){google.maps.event.removeListener(e)}function y(e){void 0===e&&(e=[]),e.forEach(O)}function w(e){var t=e.updaterMap,n=e.eventMap,r=e.prevProps,i=e.nextProps,a=e.instance,o=x(i,a,n);return j(t,r,i,a),o}var C={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},k={extraMapTypes:function(e,t){t.forEach((function(t,n){e.mapTypes.set(String(n),t)}))},center:function(e,t){e.setCenter(t)},clickableIcons:function(e,t){e.setClickableIcons(t)},heading:function(e,t){e.setHeading(t)},mapTypeId:function(e,t){e.setMapTypeId(t)},options:function(e,t){e.setOptions(t)},streetView:function(e,t){e.setStreetView(t)},tilt:function(e,t){e.setTilt(t)},zoom:function(e,t){e.setZoom(t)}},D=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={map:null},t.registeredEvents=[],t.mapRef=null,t.getInstance=function(){return null===t.mapRef?null:new google.maps.Map(t.mapRef,t.props.options)},t.panTo=function(e){var n=t.getInstance();n&&n.panTo(e)},t.setMapCallback=function(){null!==t.state.map&&t.props.onLoad&&t.props.onLoad(t.state.map)},t.getRef=function(e){t.mapRef=e},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.getInstance();this.registeredEvents=w({updaterMap:k,eventMap:C,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{map:e}}),this.setMapCallback)},n.componentDidUpdate=function(e){null!==this.state.map&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:k,eventMap:C,prevProps:e,nextProps:this.props,instance:this.state.map}))},n.componentWillUnmount=function(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),y(this.registeredEvents))},n.render=function(){return Object(r.createElement)("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName},Object(r.createElement)(v.Provider,{value:this.state.map},null!==this.state.map?this.props.children:Object(r.createElement)(r.Fragment,null)))},t}(r.PureComponent);var S=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=function(e){var t,n=Object.prototype,r=n.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),o=new S(r||[]);return a._invoke=function(e,t,n){var r=u;return function(i,a){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw a;return E()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=C(o,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===u)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?h:d,c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(e,n,o),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}e.wrap=c;var u="suspendedStart",d="suspendedYield",p="executing",h="completed",f={};function m(){}function g(){}function b(){}var v={};v[a]=function(){return this};var j=Object.getPrototypeOf,x=j&&j(j(L([])));x&&x!==n&&r.call(x,a)&&(v=x);var O=b.prototype=m.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function w(e,t){function n(i,a,o,s){var c=l(e[i],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"===typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(d).then((function(e){u.value=e,o(u)}),(function(e){return n("throw",e,o,s)}))}s(c.arg)}var i;this._invoke=function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}}function C(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&
vendor: 4,271 bytes, line 2
2(n.method="return",n.arg=t,C(e,n),"throw"===n.method))return f;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var i=l(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,f;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,f):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(e){if(e){var n=e[a];if(n)return n.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:E}}function E(){return{value:t,done:!0}}return g.prototype=O.constructor=b,b.constructor=g,b[s]=g.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(O),e},e.awrap=function(e){return{__await:e}},y(w.prototype),w.prototype[o]=function(){return this},e.AsyncIterator=w,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new w(c(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},y(O),O[s]="Generator",O[a]=function(){return this},O.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=L,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),D(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;D(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),f}},e}(e.exports);try{regeneratorRuntime=t}catch(n){Function("r","regeneratorRuntime = r")(t)}}
2)),L="undefined"!==typeof document,E=function(e){var t=e.url,n=e.id,r=e.nonce;return L?new Promise((function(e,i){var a=document.getElementById(n),o=window;if(a){var s=a.getAttribute("data-state");if(a.src===t&&"error"!==s){if("ready"===s)return e(n);var c=o.initMap,l=a.onerror;return o.initMap=function(){c&&c(),e(n)},void(a.onerror=function(e){l&&l(e),i(e)})}a.remove()}var u=document.createElement("script");u.type="text/javascript",u.src=t,u.id=n,u.async=!0,u.nonce=r,u.onerror=function(e){u.setAttribute("data-state","error"),i(e)},o.initMap=function(){u.setAttribute("data-state","ready"),e(n)},document.head.appendChild(u)})).catch((function(e){throw console.error("injectScript error: ",e),e})):Promise.reject(new Error("document is undefined"))},M=function(e){return!(!e.href||0!==e.href.indexOf("https://fonts.googleapis.com/css?family=Roboto"))||("style"===e.tagName.toLowerCase()&&e.styleSheet&&e.styleSheet.cssText&&0===e.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(e.styleSheet.cssText="",!0):"style"===e.tagName.toLowerCase()&&e.innerHTML&&0===e.innerHTML.replace("\r\n","").indexOf(".gm-style")?(e.innerHTML="",!0):"style"===e.tagName.toLowerCase()&&!e.styleSheet&&!e.innerHTML)},P=function(){var e=document.getElementsByTagName("head")[0],t=e.insertBefore.bind(e);e.insertBefore=function(n,r){M(n)||Reflect.apply(t,e,[n,r])};var n=e.appendChild.bind(e);e.appendChild=function(t){M(t)||Reflect.apply(n,e,[t])}};function I(e){var t=e.googleMapsApiKey,n=e.googleMapsClientId,r=e.version,i=void 0===r?"weekly":r,o=e.language,s=e.region,c=e.libraries,l=e.channel,u=e.mapIds,d=[];return t&&n||!t||!n||a()(!1),t?d.push("key="+t):n&&d.push("client="+n),i&&d.push("v="+i),o&&d.push("language="+o),s&&d.push("region="+s),c&&c.length&&d.push("libraries="+c.sort().join(",")),l&&d.push("channel="+l),u&&u.length&&d.push("map_ids="+u.join(",")),d.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?"+d.join("&")}var N=!1;function A(){return Object(r.createElement)("div",null,"Loading...")}var R,T={id:"script-loader",version:"weekly"},B=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).check=Object(r.createRef)(),t.state={loaded:!1},t.cleanupCallback=function(){delete window.google.maps,t.injectScript()},t.isCleaningUp=f(S.mark((function e(){var t;return S.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=function(e){if(N){if(L)var t=window.setInterval((function(){N||(window.clearInterval(t),e())}),1)}else e()},e.abrupt("return",new Promise(t));case 2:case"end":return e.stop()}}),e)}))),t.cleanup=function(){N=!0;var e=document.getElementById(t.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter((function(e){return"string"===typeof e.src&&e.src.includes("maps.googleapis")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("link")).filter((function(e){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===e.href})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("style")).filter((function(e){return void 0!==e.innerText&&e.innerText.length>0&&e.innerText.includes(".gm-")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))},t.injectScript=function(){t.props.preventGoogleFontsLoading&&P(),t.props.id||a()(!1);var e={id:t.props.id,nonce:t.props.nonce,url:I(t.props)};E(e).then((function(){t.props.onLoad&&t.props.onLoad(),t.setState((function(){return{loaded:!0}}))})).catch((function(e){t.props.onError&&t.props.onError(e),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(t.props.googleMapsApiKey||"-")+") or Client ID ("+(t.props.googleMapsClientId||"-")+") to <LoadScript />\n Otherwise it is a Network issue.\n ")}))},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){if(L){if(window.google&&window.google.maps&&!N)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch((function(e){console.error("Error at injecting script after cleaning up: ",e)}))}},n.componentDidUpdate=function(e){this.props.libraries!==e.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as
2static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),L&&e.language!==this.props.language&&(this.cleanup(),this.setState((function(){return{loaded:!1}}),this.cleanupCallback))},n.componentWillUnmount=function(){var e=this;if(L){this.cleanup();window.setTimeout((function(){e.check.current||(delete window.google,N=!1)}),1),this.props.onUnmount&&this.props.onUnmount()}},n.render=function(){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||Object(r.createElement)(A,null))},t}(r.PureComponent);function z(e){var t=e.id,n=void 0===t?T.id:t,i=e.version,o=void 0===i?T.version:i,s=e.nonce,c=e.googleMapsApiKey,l=e.googleMapsClientId,u=e.language,d=e.region,p=e.libraries,h=e.preventGoogleFontsLoading,f=e.channel,m=e.mapIds,g=Object(r.useRef)(!1),b=Object(r.useState)(!1),v=b[0],j=b[1],x=Object(r.useState)(void 0),O=x[0],y=x[1];Object(r.useEffect)((function(){return g.current=!0,function(){g.current=!1}}),[]),Object(r.useEffect)((function(){L&&h&&P()}),[h]),Object(r.useEffect)((function(){v&&(window.google||a()(!1))}),[v]);var w=I({version:o,googleMapsApiKey:c,googleMapsClientId:l,language:u,region:d,libraries:p,channel:f,mapIds:m});Object(r.useEffect)((function(){function e(){g.current&&(j(!0),R=w)}L&&(window.google&&window.google.maps&&R===w?e():E({id:n,url:w,nonce:s}).then(e).catch((function(e){g.current&&y(e),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(c||"-")+") or Client ID ("+(l||"-")+")\n Otherwise it is a Network issue.\n "),console.error(e)})))}),[n,w,s]);var C=Object(r.useRef)();return Object(r.useEffect)((function(){C.current&&p!==C.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),C.current=p}),[p]),{isLoaded:v,loadError:O,url:w}}B.defaultProps=T;var U={},_={options:function(e,t){e.setOptions(t)}},q=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={trafficLayer:null},t.setTrafficLayerCallback=function(){null!==t.state.trafficLayer&&t.props.onLoad&&t.props.onLoad(t.state.trafficLayer)},t.registeredEvents=[],t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.TrafficLayer(m({},this.props.options||{},{map:this.context}));this.registeredEvents=w({updaterMap:_,eventMap:U,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{trafficLayer:e}}),this.setTrafficLayerCallback)},n.componentDidUpdate=function(e){null!==this.state.trafficLayer&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:_,eventMap:U,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))},n.componentWillUnmount=function(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),y(this.registeredEvents),this.state.trafficLayer.setMap(null))},n.render=function(){return null},t}(r.PureComponent);q.contextType=v;var F=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={bicyclingLayer:null},t.setBicyclingLayerCallback=function(){null!==t.state.bicyclingLayer&&(t.state.bicyclingLayer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.bicyclingLayer))},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.BicyclingLayer;this.setState((function(){return{bicyclingLayer:e}}),this.setBicyclingLayerCallback)},n.componentWillUnmount=function(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},n.render=function(){return null},t}(r.PureComponent);F.contextType=v;var H=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={transitLayer:null},t.setTransitLayerCallback=function(){null!==t.state.transitLayer&&(t.state.transitLayer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.transitLayer))},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.TransitLayer;this.setState((function(){return{transitLayer:e}}),this.setTransitLayerCallback)},n.componentWillUnmount=function(){null!==this.state.transitLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},n.render=function(){return null},t}(r.PureComponent);H.contextType=v;var W={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},V={drawingMode:function(e,t){e.setDrawingMode(t)},options:function(e,t){e.setOptions(t)}};(function(e){function t(t){var n;return(n=e.call(this,t)||this).registeredEvents=[],n.state={drawingManager:null},n.setDrawingManagerCallback=function(){null!==n.state.drawingManager&&n.props.onLoad&&n.props.onLoad(n.state.drawingManager)},google.maps.drawing||a()(!1),n}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.drawing.DrawingManager(m({},this.props.options||{},{map:this.context}));this.registeredEvents=w({updaterMap:V,eventMap:W,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{drawingManager:e}}),this.setDrawingManagerCallback)},n.componentDidUpdate=function(e){null!==this.state.drawingManager&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:V,eventMap:W,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))},n.componentWillUnmount=function(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),y(this.registeredEvents),this.state.drawingManager.setMap(null))},n.render=function(){return Object(r.createElement)(r.Fragment,null)},t}(r.PureComponent)).contextType=v;var Y={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},Z={animation:function(e,t){e.setAnimation(t)},clickable:function(e,t){e.setClickable(t)},cursor:function(e,t){e.setCursor(t)},draggable:function(e,t){e.setDraggable(t)},icon:function(e,t){e.setIcon(t)},label:function(e,t){e.setLabel(t)},map:function(e,t){e.setMap(t)},opacity:function(e,t){e.setOpacity(t)},options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},shape:function(e,t){e.setShape(t)},title:function(e,t){e.setTitle(t)}
2,visible:function(e,t){e.setVisible(t)},zIndex:function(e,t){e.setZIndex(t)}},G=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={marker:null},t.setMarkerCallback=function(){null!==t.state.marker&&t.props.onLoad&&t.props.onLoad(t.state.marker)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=m({},this.props.options||{},this.props.clusterer?{}:{map:this.context},{position:this.props.position}),t=new google.maps.Marker(e);this.props.clusterer?this.props.clusterer.addMarker(t,!!this.props.noClustererRedraw):t.setMap(this.context),this.registeredEvents=w({updaterMap:Z,eventMap:Y,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{marker:t}}),this.setMarkerCallback)},n.componentDidUpdate=function(e){null!==this.state.marker&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:Z,eventMap:Y,prevProps:e,nextProps:this.props,instance:this.state.marker}))},n.componentWillUnmount=function(){null!==this.state.marker&&(this.props.onUnmount&&this.props.onUnmount(this.state.marker),y(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.state.marker,!!this.props.noClustererRedraw):this.state.marker&&this.state.marker.setMap(null))},n.render=function(){var e=this,t=null;return this.props.children&&(t=r.Children.map(this.props.children,(function(t){if(!Object(r.isValidElement)(t))return t;var n=t;return Object(r.cloneElement)(n,{anchor:e.state.marker})}))),t||null},t}(r.PureComponent);G.contextType=v;var K={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},J={averageCenter:function(e,t){e.setAverageCenter(t)},batchSizeIE:function(e,t){e.setBatchSizeIE(t)},calculator:function(e,t){e.setCalculator(t)},clusterClass:function(e,t){e.setClusterClass(t)},enableRetinaIcons:function(e,t){e.setEnableRetinaIcons(t)},gridSize:function(e,t){e.setGridSize(t)},ignoreHidden:function(e,t){e.setIgnoreHidden(t)},imageExtension:function(e,t){e.setImageExtension(t)},imagePath:function(e,t){e.setImagePath(t)},imageSizes:function(e,t){e.setImageSizes(t)},maxZoom:function(e,t){e.setMaxZoom(t)},minimumClusterSize:function(e,t){e.setMinimumClusterSize(t)},styles:function(e,t){e.setStyles(t)},title:function(e,t){e.setTitle(t)},zoomOnClick:function(e,t){e.setZoomOnClick(t)}},Q=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={markerClusterer:null},t.setClustererCallback=function(){null!==t.state.markerClusterer&&t.props.onLoad&&t.props.onLoad(t.state.markerClusterer)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){if(this.context){var e=new u(this.context,[],this.props.options);this.registeredEvents=w({updaterMap:J,eventMap:K,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{markerClusterer:e}}),this.setClustererCallback)}},n.componentDidUpdate=function(e){this.state.markerClusterer&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:J,eventMap:K,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))},n.componentWillUnmount=function(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),y(this.registeredEvents),this.state.markerClusterer.setMap(null))},n.render=function(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null},t}(r.PureComponent);Q.contextType=v;var $={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},X={options:function(e,t){e.setOptions(t)},position:function(e,t){t instanceof google.maps.LatLng?e.setPosition(t):e.setPosition(new google.maps.LatLng(t.lat,t.lng))},visible:function(e,t){e.setVisible(t)},zIndex:function(e,t){e.setZIndex(t)}},ee=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.containerElement=null,t.state={infoBox:null}
2,t.open=function(e,n){n?e.open(t.context,n):e.getPosition()?e.open(t.context):a()(!1)},t.setInfoBoxCallback=function(){var e=t.props,n=e.anchor,r=e.onLoad,i=t.state.infoBox;null!==i&&null!==t.containerElement&&(i.setContent(t.containerElement),t.open(i,n),r&&r(i))},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e,t=this.props.options||{},n=t.position,r=b(t,["position"]);!n||n instanceof google.maps.LatLng||(e=new google.maps.LatLng(n.lat,n.lng));var i=new p(m({},r,e?{position:e}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=w({updaterMap:X,eventMap:$,prevProps:{},nextProps:this.props,instance:i}),this.setState({infoBox:i},this.setInfoBoxCallback)},n.componentDidUpdate=function(e){var t=this.state.infoBox;null!==t&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:X,eventMap:$,prevProps:e,nextProps:this.props,instance:t}))},n.componentWillUnmount=function(){var e=this.props.onUnmount,t=this.state.infoBox;null!==t&&(e&&e(t),y(this.registeredEvents),t.close())},n.render=function(){return this.containerElement?Object(d.createPortal)(r.Children.only(this.props.children),this.containerElement):null},t}(r.PureComponent);ee.contextType=v;var te={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},ne={options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},zIndex:function(e,t){e.setZIndex(t)}},re=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.containerElement=null,t.state={infoWindow:null}
2,t.open=function(e,n){n?e.open(t.context,n):e.getPosition()?e.open(t.context):a()(!1)},t.setInfoWindowCallback=function(){null!==t.state.infoWindow&&null!==t.containerElement&&(t.state.infoWindow.setContent(t.containerElement),t.open(t.state.infoWindow,t.props.anchor),t.props.onLoad&&t.props.onLoad(t.state.infoWindow))},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.InfoWindow(m({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=w({updaterMap:ne,eventMap:te,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{infoWindow:e}}),this.setInfoWindowCallback)},n.componentDidUpdate=function(e){null!==this.state.infoWindow&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:ne,eventMap:te,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))},n.componentWillUnmount=function(){null!==this.state.infoWindow&&(y(this.registeredEvents),this.state.infoWindow.close())},n.render=function(){return this.containerElement?Object(d.createPortal)(r.Children.only(this.props.children),this.containerElement):Object(r.createElement)(r.Fragment,null)},t}(r.PureComponent);re.contextType=v;var ie={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ae={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},visible:function(e,t){e.setVisible(t)}},oe=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={polyline:null},t.setPolylineCallback=function(){null!==t.state.polyline&&t.props.onLoad&&t.props.onLoad(t.state.polyline)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.Polyline(m({},this.props.options||{},{map:this.context}));this.registeredEvents=w({updaterMap:ae,eventMap:ie,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{polyline:e}}),this.setPolylineCallback)},n.componentDidUpdate=function(e){null!==this.state.polyline&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:ae,eventMap:ie,prevProps:e,nextProps:this.props,instance:this.state.polyline}))},n.componentWillUnmount=function(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),y(this.registeredEvents),this.state.polyline.setMap(null))},n.render=function(){return Object(r.createElement)(r.Fragment,null)},t}(r.PureComponent);oe.contextType=v;var se={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},ce={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},paths:function(e,t){e.setPaths(t)},visible:function(e,t){e.setVisible(t)}},le=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={polygon:null},t.setPolygonCallback=function(){null!==t.state.polygon&&t.props.onLoad&&t.props.onLoad(t.state.polygon)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.Polygon(m({},this.props.options||{},{map:this.context}));this.registeredEvents=w({updaterMap:ce,eventMap:se,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{polygon:e}}),this.setPolygonCallback)},n.componentDidUpdate=function(e){null!==this.state.polygon&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:ce,eventMap:se,prevProps:e,nextProps:this.props,instance:this.state.polygon}))},n.componentWillUnmount=function(){null!==this.state.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),y(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},n.render=function(){return null},t}(r.PureComponent);le.contextType=v;var ue={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},de={bounds:function(e,t){e.setBounds(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},visible:function(e,t){e.setVisible(t)}},pe=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={rectangle:null},t.setRectangleCallback=function(){null!==t.state.rectangle&&t.props.onLoad&&t.props.onLoad(t.state.rectangle)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.Rectangle(m({},this.props.options||{},{map:this.context}));this.registeredEvents=w({updaterMap:de,eventMap:ue,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{rectangle:e}}),this.setRectangleCallback)},n.componentDidUpdate=function(e){null!==this.state.rectangle&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:de,eventMap:ue,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))},n.componentWillUnmount=function(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),y(this.registeredEvents),this.state.rectangle.setMap(null))},n.render=function(){return Object(r.createElement)(r.Fragment,null)},t}(r.PureComponent);pe.contextType=v;var he={onCenterChanged:"center_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRadiusChanged:"radius_changed",onRightClick:"rightclick"},fe={center:function(e,t){e.setCenter(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},radius:function(e,t){e.setRadius(t)},visible:function(e,t){e.setVisible(t)}},me=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={circle:null}
2,t.setCircleCallback=function(){null!==t.state.circle&&t.props.onLoad&&t.props.onLoad(t.state.circle)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.Circle(m({},this.props.options||{},{map:this.context}));this.registeredEvents=w({updaterMap:fe,eventMap:he,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{circle:e}}),this.setCircleCallback)},n.componentDidUpdate=function(e){null!==this.state.circle&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:fe,eventMap:he,prevProps:e,nextProps:this.props,instance:this.state.circle}))},n.componentWillUnmount=function(){null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),y(this.registeredEvents),this.state.circle&&this.state.circle.setMap(null))},n.render=function(){return Object(r.createElement)(r.Fragment,null)},t}(r.PureComponent);me.contextType=v;var ge={onAddFeature:"addfeature",onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onRightClick:"rightclick",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},be={add:function(e,t){e.add(t)},addgeojson:function(e,t,n){e.addGeoJson(t,n)},contains:function(e,t){e.contains(t)},foreach:function(e,t){e.forEach(t)},loadgeojson:function(e,t,n,r){e.loadGeoJson(t,n,r)},overridestyle:function(e,t,n){e.overrideStyle(t,n)},remove:function(e,t){e.remove(t)},revertstyle:function(e,t){e.revertStyle(t)},controlposition:function(e,t){e.setControlPosition(t)},controls:function(e,t){e.setControls(t)},drawingmode:function(e,t){e.setDrawingMode(t)},map:function(e,t){e.setMap(t)},style:function(e,t){e.setStyle(t)},togeojson:function(e,t){e.toGeoJson(t)}},ve=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={data:null},t.setDataCallback=function(){null!==t.state.data&&t.props.onLoad&&t.props.onLoad(t.state.data)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.Data(m({},this.props.options||{},{map:this.context}));this.registeredEvents=w({updaterMap:be,eventMap:ge,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{data:e}}),this.setDataCallback)},n.componentDidUpdate=function(e){null!==this.state.data&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:be,eventMap:ge,prevProps:e,nextProps:this.props,instance:this.state.data}))},n.componentWillUnmount=function(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),y(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},n.render=function(){return null},t}(r.PureComponent);ve.contextType=v;var je={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},xe={options:function(e,t){e.setOptions(t)},url:function(e,t){e.setUrl(t)},zIndex:function(e,t){e.setZIndex(t)}},Oe=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={kmlLayer:null},t.setKmlLayerCallback=function(){null!==t.state.kmlLayer&&t.props.onLoad&&t.props.onLoad(t.state.kmlLayer)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.KmlLayer(m({},this.props.options,{map:this.context}));this.registeredEvents=w({updaterMap:xe,eventMap:je,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{kmlLayer:e}}),this.setKmlLayerCallback)},n.componentDidUpdate=function(e){null!==this.state.kmlLayer&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:xe,eventMap:je,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))},n.componentWillUnmount=function(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),y(this.registeredEvents),this.state.kmlLayer.setMap(null))},n.render=function(){return null},t}(r.PureComponent);Oe.contextType=v;var ye=function(e,t){return new t(e.lat,e.lng)},we=function(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.
2ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))},Ce=function(e,t,n){return e instanceof t?e:n(e,t)};function ke(e){return e?(e instanceof google.maps.LatLng?e:new google.maps.LatLng(e.lat,e.lng))+"":""}function De(e){return e?(e instanceof google.maps.LatLngBounds?e:new google.maps.LatLngBounds(new google.maps.LatLng(e.south,e.east),new google.maps.LatLng(e.north,e.west)))+"":""}var Se=function(e){function t(t){var n;(n=e.call(this,t)||this).state={paneEl:null,containerStyle:{position:"absolute"}},n.updatePane=function(){var e=n.props.mapPaneName,t=n.overlayView.getPanes();e||a()(!1),t?n.setState({paneEl:t[e]}):n.setState({paneEl:null})},n.onAdd=function(){n.updatePane(),null==n.props.onLoad||n.props.onLoad(n.overlayView)},n.onPositionElement=function(){var e,t,r,i,a=function(e,t,n,r){return void 0!==n?function(e,t,n){var r=e&&e.fromLatLngToDivPixel(n.getNorthEast()),i=e&&e.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:i.x+t.x+"px",top:r.y+t.y+"px",width:r.x-i.x-t.x+"px",height:i.y-r.y-t.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,t,Ce(n,google.maps.LatLngBounds,we)):function(e,t,n){var r=e&&e.fromLatLngToDivPixel(n);if(r){var i=r.x,a=r.y;return{left:i+t.x+"px",top:a+t.y+"px"}}return{left:"-9999px",top:"-9999px"}}(e,t,Ce(r,google.maps.LatLng,ye))}(n.overlayView.getProjection(),m({x:0,y:0},n.containerRef.current?(e=n.containerRef.current,"function"===typeof(t=n.props.getPixelPositionOffset)?t(e.offsetWidth,e.offsetHeight):{}):{}),n.props.bounds,n.props.position),o=n.state.containerStyle,s=o.left,c=o.top,l=o.width,u=o.height;i={left:s,top:c,width:l,height:u},((r=a).left!==i.left||r.top!==i.top||r.width!==i.height||r.height!==i.height)&&n.setState({containerStyle:m({},a,{position:"absolute"})})},n.draw=function(){n.onPositionElement()},n.onRemove=function(){n.setState((function(){return{paneEl:null}})),null==n.props.onUnmount||n.props.onUnmount(n.overlayView)},n.containerRef=Object(r.createRef)();var i=new google.maps.OverlayView;return i.onAdd=n.onAdd,i.draw=n.draw,i.onRemove=n.onRemove,n.overlayView=i,n}g(t,e);var n=t.prototype;return n.componentDidMount=function(){this.overlayView.setMap(this.context)},n.componentDidUpdate=function(e){var t=ke(e.position),n=ke(this.props.position),r=De(e.bounds),i=De(this.props.bounds);t===n&&r===i||this.overlayView.draw(),e.mapPaneName!==this.props.mapPaneName&&this.updatePane()},n.componentWillUnmount=function(){this.overlayView.setMap(null)},n.render=function(){var e=this.state.paneEl;return e?Object(d.createPortal)(Object(r.createElement)("div",{ref:this.containerRef,style:this.state.containerStyle},r.Children.only(this.props.children)),e):null},t}(r.PureComponent);Se.FLOAT_PANE="floatPane",Se.MAP_PANE="mapPane",Se.MARKER_LAYER="markerLayer",Se.OVERLAY_LAYER="overlayLayer",Se.OVERLAY_MOUSE_TARGET="overlayMouseTarget",Se.contextType=v;var Le={onDblClick:"dblclick",onClick:"click"},Ee={opacity:function(e,t){e.setOpacity(t)}},Me=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={groundOverlay:null},t.setGroundOverlayCallback=function(){null!==t.state.groundOverlay&&t.props.onLoad&&t.props.onLoad(t.state.groundOverlay)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.url||this.props.bounds||a()(!1);var e=new google.maps.GroundOverlay(this.props.url,this.props.bounds,m({},this.props.options,{map:this.context}));this.registeredEvents=w({updaterMap:Ee,eventMap:Le,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{groundOverlay:e}}),this.setGroundOverlayCallback)},n.componentDidUpdate=function(e){null!==this.state.groundOverlay&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:Ee,eventMap:Le,prevProps:e,nextProps:this.props,instance:this.state.groundOverlay}))},n.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},n.render=function(){return null},t}(r.PureComponent);Me.defaultProps={onLoad:function(){}},Me.contextType=v;var Pe={},Ie={data:function(e,t){e.setData(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)}},Ne=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={heatmapLayer:null},t.setHeatmapLayerCallback=function(){null!==t.state.heatmapLayer&&t.props.onLoad&&t.props.onLoad(t.state.heatmapLayer)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){google.maps.visualization||a()(!1),this.props.data||a()(!1);var e=new google.maps.visualization.HeatmapLayer(m({},this.props.options||{},{data:this.props.data,map:this.context}));this.registeredEvents=w({updaterMap:Ie,eventMap:Pe,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{heatmapLayer:e}}),this.setHeatmapLayerCallback)},n.componentDidUpdate=function(e){y(this.registeredEvents),this.registeredEvents=w({updaterMap:Ie,eventMap:Pe,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})},n.componentWillUnmount=function(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),y(this.registeredEvents),this.state.heatmapLayer.setMap(null))},n.render=function(){return null},t}(r.PureComponent);Ne.contextType=v;var Ae={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"}
2,Re={register:function(e,t,n){e.registerPanoProvider(t,n)},links:function(e,t){e.setLinks(t)},motionTracking:function(e,t){e.setMotionTracking(t)},options:function(e,t){e.setOptions(t)},pano:function(e,t){e.setPano(t)},position:function(e,t){e.setPosition(t)},pov:function(e,t){e.setPov(t)},visible:function(e,t){e.setVisible(t)},zoom:function(e,t){e.setZoom(t)}},Te=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={streetViewPanorama:null},t.setStreetViewPanoramaCallback=function(){null!==t.state.streetViewPanorama&&t.props.onLoad&&t.props.onLoad(t.state.streetViewPanorama)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.context.getStreetView();this.registeredEvents=w({updaterMap:Re,eventMap:Ae,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{streetViewPanorama:e}}),this.setStreetViewPanoramaCallback)},n.componentDidUpdate=function(e){null!==this.state.streetViewPanorama&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:Re,eventMap:Ae,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))},n.componentWillUnmount=function(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),y(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},n.render=function(){return null},t}(r.PureComponent);Te.contextType=v;var Be=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={streetViewService:null},t.setStreetViewServiceCallback=function(){null!==t.state.streetViewService&&t.props.onLoad&&t.props.onLoad(t.state.streetViewService)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.StreetViewService;this.setState((function(){return{streetViewService:e}}),this.setStreetViewServiceCallback)},n.componentWillUnmount=function(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},n.render=function(){return null},t}(r.PureComponent);Be.contextType=v;r.PureComponent;var ze={onDirectionsChanged:"directions_changed"},Ue={directions:function(e,t){e.setDirections(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},panel:function(e,t){e.setPanel(t)},routeIndex:function(e,t){e.setRouteIndex(t)}},_e=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={directionsRenderer:null},t.setDirectionsRendererCallback=function(){null!==t.state.directionsRenderer&&(t.state.directionsRenderer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.directionsRenderer))},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=w({updaterMap:Ue,eventMap:ze,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{directionsRenderer:e}}),this.setDirectionsRendererCallback)},n.componentDidUpdate=function(e){null!==this.state.directionsRenderer&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:Ue,eventMap:ze,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))},n.componentWillUnmount=function(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),y(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},n.render=function(){return Object(r.createElement)(r.Fragment,null)},t}(r.PureComponent);_e.contextType=v;r.PureComponent;var qe={onPlacesChanged:"places_changed"},Fe={bounds:function(e,t){e.setBounds(t)}},He=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.containerElement=Object(r.createRef)(),t.state={searchBox:null},t.setSearchBoxCallback=function(){null!==t.state.searchBox&&t.props.onLoad&&t.props.onLoad(t.state.searchBox)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){if(google.maps.places||a()(!1),null!==this.containerElement&&null!==this.containerElement.current){var e=this.containerElement.current.querySelector("input");if(null!==e){var t=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=w({updaterMap:Fe,eventMap:qe,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{searchBox:t}}),this.setSearchBoxCallback)}}},n.componentDidUpdate=function(e){null!==this.state.searchBox&&(y(this.registeredEvents),this.registeredEvents=w({updaterMap:Fe,eventMap:qe,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))},n.componentWillUnmount=function(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox
2),y(this.registeredEvents))},n.render=function(){return Object(r.createElement)("div",{ref:this.containerElement},r.Children.only(this.props.children))},t}(r.PureComponent);He.contextType=v;var We={onPlaceChanged:"place_changed"},Ve={bounds:function(e,t){e.setBounds(t)},restrictions:function(e,t){e.setComponentRestrictions(t)},fields:function(e,t){e.setFields(t)},options:function(e,t){e.setOptions(t)},types:function(e,t){e.setTypes(t)}},Ye=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.containerElement=Object(r.createRef)(),t.state={autocomplete:null},t.setAutocompleteCallback=function(){null!==t.state.autocomplete&&t.props.onLoad&&t.props.onLoad(t.state.autocomplete)},t}g(t,e);var n=t.prototype;return n.componentDidMount=function(){google.maps.places||a()(!1);var e=this.containerElement.current.querySelector("input");if(e){var t=new google.maps.places.Autocomplete(e,this.props.options);this.registeredEvents=w({updaterMap:Ve,eventMap:We,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{autocomplete:t}}),this.setAutocompleteCallback)}},n.componentDidUpdate=function(e){y(this.registeredEvents),this.registeredEvents=w({updaterMap:Ve,eventMap:We,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})},n.componentWillUnmount=function(){null!==this.state.autocomplete&&y(this.registeredEvents)},n.render=function(){return Object(r.createElement)("div",{ref:this.containerElement,className:this.props.className||""},r.Children.only(this.props.children))},t}(r.PureComponent);Ye.contextType=v},571:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"}),"Print");t.default=o},572:function(e,t,n){"use strict";n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"f",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"g",(function(){return d}));var r=n(44),i=n.n(r),a=function(e){return i.a.utc(i()(e).local().format("YYYY-MM-DD"),"YYYY-MM-DD").valueOf()},o=function(e){return i.a.utc(i()(e).local().format("YYYY-MM-DD"),"YYYY-MM-DD").endOf("day").valueOf()},s=function(e){return Math.floor(a(e)/1e3)},c=function(e){return Math.floor(o(e)/1e3)},l=function(e){return new Date(a(e))},u=function(e){return new Date(o(e))},d=function(e){return i()(e).local().format("YYYY-MM-DD")}},577:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z"}),"ArrowForwardIos");t.default=o},591:function(e,t,n){"use strict";var r=n(1),i=n(3),a=n(26),o=n(8),s=n(9),c=n(6),l=n(0),u=n.n(l),d=n(237),p=n(332),h=n(178),f=n(361),m=n(402),g=n.n(m),b=n(649),v=n(40),j=n(577),x=n.n(j),O=n(44),y=n.n(O),w=n(545),C=n(567),k=n(2),D=Object(d.a)((function(e){return{root:Object(c.a)({"& .MuiTable-root":{"& tr":{"& td":{"&:last-child":{"& div":{justifyContent:"flex-end"}}}}}},e.breakpoints.down("sm"),{"& .MuiToolbar-root":{flexWrap:"wrap",padding:e.spacing(1)}}),detailPanel:Object(c.a)({overflowX:"auto",backgroundColor:"#FFBF00",color:"black"},e.breakpoints.down("sm"),{"& table":{fontSize:"0.75rem"},"& td":{padding:"8px !important",paddingLeft:"30px !important"}}),photoImage:Object(c.a)({width:"100px",height:"100px"},e.breakpoints.down("sm"),{width:"60px",height:"60px"})}}));t.a=Object(v.i)((function(e){var t=u.a.useState(!1),c=Object(s.a)(t,2),l=c[0],d=c[1],m=u.a.useState([]),v=Object(s.a)(m,2),j=v[0],O=v[1],S=e.persistKey,L=function(e,t){if(!S)return t;var n=sessionStorage.getItem(S+e);return null===n?t:n},E=L("_search",void 0),M=S?parseInt(L("_page","0"),10):void 0,P=S?parseInt(L("_pageSize","25"),10):void 0,I=S?parseInt(L("_orderBy","-1"),10):-1,N=S?L("_orderDir",""):"",A=u.a.useMemo((function(){return!S||I<0||!N?e.columns:e.columns.map((function(e,t){return t===I?Object(o.a)(Object(o.a)({},e),{},{defaultSort:N}):e}))}),[e.columns]),R=S?Object(o.a)({initialPage:M,pageSize:P},void 0!==E?{searchText:E}:{}):{},T=u.a.useState(!S||!e.isLoading),B=Object(s.a)(T,2),z=B[0],U=B[1];u.a.useEffect((function(){!S||z||e.isLoading||U(!0)}),[S,e.isLoading,z]);var _=D(),q=function(e){var t=[];t.push(e),O(t),d(!0)},F=function(e){for(var t=e.photos,n=e.classes,r=[],i=0;i<t.length;i+=5)r.push(Object(k.jsx)(u.a.Fragment,{children:Object(k.jsx)("tr",{children:t.slice(i,i+5).map((function(e,t){return Object(k.jsx)("td",{style:0===t?{width:"1px",paddingLeft:"60px"}:{width:"1px"},children:Object(k.jsx)(w.a,{id:"img-"+t,className:n.photoImage,placeholder:C.a,src:e,alt:t,onClick:function(){return q(e)}},t)},t)}))})},i));return Object(k.jsx)("tr",{children:r})};return z?Object(k.jsxs)("div",{className:_.root,children:[Object(k.jsx)(g.a,Object(o.a)(Object(o.a)({tableRef:e.tableRef,style:{},columns:A,data:e.data,title:e.title,isLoading:e.isLoading,icons:f.a,editable:e.editable,onSearchChange:function(t){S&&sessionStorage.setItem(S+"_search",t),e.onSearchChange&&e.onSearchChange(t)}
2,onRowsPerPageChange:function(t){S&&sessionStorage.setItem(S+"_pageSize",String(t)),e.onRowsPerPageChange&&e.onRowsPerPageChange(t)},onPageChange:function(t,n){S&&sessionStorage.setItem(S+"_page",String(t)),e.onPageChange&&e.onPageChange(t,n)},onOrderChange:function(t,n){S&&(sessionStorage.setItem(S+"_orderBy",String(t)),sessionStorage.setItem(S+"_orderDir",n||"")),e.onOrderChange&&e.onOrderChange(t,n)},actions:[].concat(Object(a.a)(e.actions||[]),[function(e){var t;return{icon:f.a.PhotoIcon,tooltip:"View Photos",onClick:function(e,t){O(t.photoURLs),d(!0)},hidden:void 0===e.photoURLs||null===e.photoURLs||0===(null===(t=Object.values(e.photoURLs))||void 0===t?void 0:t.length)}}],Object(a.a)(e.pathname?[{icon:f.a.OpenInNew,tooltip:"Show "+e.title,onClick:function(t,n){e.onShowAction&&e.onShowAction(n),e.history.push({pathname:e.pathname,search:"?"+new URLSearchParams({docId:n.docId}).toString()})}}]:[]))},e.disableDetailPanel?{}:{detailPanel:[function(t){var n,r,i,a;return{disabled:!(null!==t&&void 0!==t&&t.notes||(null===t||void 0===t||null===(n=t.photoURLs)||void 0===n?void 0:n.length)>0||(null===t||void 0===t||null===(r=t.checklist)||void 0===r?void 0:r.length)>0),tooltip:null!==t&&void 0!==t&&t.notes||(null===t||void 0===t||null===(i=t.photoURLs)||void 0===i?void 0:i.length)>0||(null===t||void 0===t||null===(a=t.checklist)||void 0===a?void 0:a.length)>0?"Show Details":null,icon:function(){var e,n;return null!==t&&void 0!==t&&t.notes||(null===t||void 0===t||null===(e=t.photoURLs)||void 0===e?void 0:e.length)>0||(null===t||void 0===t||null===(n=t.checklist)||void 0===n?void 0:n.length)>0?Object(k.jsx)("small",{children:Object(k.jsx)(x.a,{style:{fontSize:"15px"}})}):null},render:function(){var n;return Object(k.jsxs)("div",{className:_.detailPanel,children:[Object(k.jsx)("table",{children:Object(k.jsx)("tbody",{children:null!==t&&void 0!==t&&t.notes&&t.notes.length>0?Object(k.jsxs)("tr",{style:{borderBottom:"1px solid rgba(224, 224, 224, 1)"},children:[Object(k.jsx)("td",{style:{padding:"16px",paddingLeft:"60px"},children:Object(k.jsx)("b",{children:"Notes: "})}),Object(k.jsx)("td",{colSpan:"100",style:{padding:"16px"},children:t.notes?t.notes:"N/A"})]}):null})}),Object(k.jsx)("table",{style:{width:"100%"},children:Object(k.jsx)("tbody",{children:null!==t&&void 0!==t&&t.photoURLs&&t.photoURLs.length>0?Object(k.jsxs)(u.a.Fragment,{children:[Object(k.jsx)("tr",{style:{borderBottom:"1px solid rgba(224, 224, 224, 1)"},children:Object(k.jsx)("td",{style:{padding:"16px",paddingLeft:"60px"},children:Object(k.jsx)("b",{children:"Photos: "})})}),Object(k.jsx)(F,{photos:t.photoURLs,classes:_})]}):null})}),Object(k.jsx)("table",{style:{width:"100%"},children:Object(k.jsxs)("tbody",{children:[null!==t&&void 0!==t&&t.checklist&&(null===t||void 0===t?void 0:t.checklist.length)>0?Object(k.jsxs)(u.a.Fragment,{children:[Object(k.jsx)("tr",{children:Object(k.jsx)("td",{colSpan:"10",children:Object(k.jsx)(p.a,{})})}),Object(k.jsx)("tr",{children:Object(k.jsx)("td",{style:{paddingLeft:"60px"},children:Object(k.jsx)("b",{children:"Checklists "})})}),Object(k.jsxs)("tr",{children:[Object(k.jsx)("td",{colSpan:"1",style:{padding:"16px",paddingLeft:"60px"},children:Object(k.jsx)("b",{children:"Service Type"})}),Object(k.jsx)("td",{colSpan:"1",style:{padding:"16px"},children:Object(k.jsx)("b",{children:"Service Reason"})}),Object(k.jsx)("td",{colSpan:"1",style:{padding:"16px"},children:Object(k.jsx)("b",{children:"Sand Amount"})}),Object(k.jsx)("td",{colSpan:"1",style:{padding:"16px"},children:Object(k.jsx)("b",{children:"Date"})}),Object(k.jsx)("td",{colSpan:"1",style:{padding:"16px"},children:Object(k.jsx)("b",{children:"Equipment"})}),Object(k.jsx)("td",{colSpan:"1",style:{padding:"16px"},children:Object(k.jsx)("b",{children:"Link"})})]})]}):null,null!==t&&void 0!==t&&t.checklist&&(null===t||void 0===t||null===(n=t.checklist)||void 0===n?void 0:n.length)>0?t.checklist.map((function(t,n){return Object(k.jsxs)("tr",{children:[Object(k.jsx)("td",{colSpan:"1",style:{padding:"16px",paddingLeft:"60px"},children:t.serviceType}),Object(k.jsx)("td",{colSpan:"1",style:{padding:"16px"},children:t.serviceReason}),Object(k.jsx)("td",{colSpan:"1",style:{padding:"16px"},children:t.sandAmount?t.sandAmount:"None"}),Object(k.jsx)("td",{colSpan:"1",style:{padding:"16px"},children:t.date<9999999999?y()(t.date*=1e3).format("YYYY-MM-DD"):y()(t.date).format("YYYY-MM-DD")}),Object(k.jsx)("td",{colSpan:"1",style:{padding:"16px"},children:t.equipmentType?Object.values(t.equipmentType).join(", "):"N/A"}),Object(k.jsx)("td",{colSpan:"1",style:{padding:"16px"},children:Object(k.jsx)(h.a,{color:"secondary",onClick:function(n){return e.history.push({pathname:"/dashboard/reporting/timesheets/checklist",search:"?"+new URLSearchParams({docId:t.docId}).toString()})},children:Object(k.jsx)(f.a.OpenInNew,{})})})]},n)})):null]})})]})}}}]}),{},{localization:{header:{actions:"Actions"}},onRowClick:e.onRowClick||function(e,t,n){var r,i;if(!(""!==(null===t||void 0===t?void 0:t.notes)||t.photoURLs&&(null===t||void 0===t||null===(r=t.photoURLs)||void 0===r?void 0:r.length)>0||t.checklist&&(null===t||void 0===t||null===(i=t.checklist)||void 0===i?void 0:i.length)>0))return null;n()},options:"options"in e?Object(o.a)(Object(o.a)(Object(o.a)({},e.options),R),e.maxBodyHeight?{maxBodyHeight:e.maxBodyHeight}:{}):Object(o.a)(Object(o.a)(Object(o.a)({toolbar:!0,paging:!0,actionsColumnIndex:-1,search:!0,emptyRowsWhenPaging:!1,thirdSortClick:!1,pageSize:25,pageSizeOptions:[10,25,50],rowStyle:{whiteSpace:"pre-wrap"}},R),e.maxBodyHeight?{maxBodyHeight:e.maxBodyHeight}:{}),{},{exportMenu:[{label:"Export CSV",exportFunc:function(){var t=Object(i.a)(Object(r.a)().mark((function t(i,a){var o;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([n.e(7),n.e(8),n.e(9)]).then(n.t.bind(null,616,7));case 2:o=t.sent,(0,o.ExportCsv)(i,a,"".concat(e.title,"Data.csv"));case 5:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()},{label:"Export PDF",exportFunc:function(){var t=Object(i.a)(Object(r.a)().mark((function t(i,a){var o;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([n.e(7),n.e(8),n.e(9)]).then(n.t.bind(null,616,7));case 2:o=t.sent,(0,o.ExportPdf)(i,a,"".concat(e.title,"Data.pdf"));case 5:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()}]})})),j.length>0?Object(k.jsx)(b.a,{open:l,handleClose:function(){return d(!1)},photoURLs:j}):null]}):Object(k.jsx)("div",{className:_.root,style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:200},children:Object(k.jsx)(w.a,{placeholder:C.a,src:C.a,alt:"Loading",style:{width:80,height:80}})})}))},592:function(e,t,n){"use strict";var r=n(31),i=n(32);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");t.default=o},597:function(e,t,n){var r,i=i||function(e){"use strict";if(!("undefined"===typeof e||"undefined"!==typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),i="download"in r,a=/constructor/i.test(e.HTMLElement)||e.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent),s=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},c=function(e){setTimeout((function(){"string"===typeof e?n().revokeObjectURL(e):e.remove()}),4e4)},l=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},u=function(t,u,d){d||(t=l(t));var p,h=this,f="application/octet-stream"===t.type,m=function(){!function(e,t,n){for(var r=(t=[].concat(t)).length;r--;){var i=e["on"+t[r]];if("function"===typeof i)try{i.call(e,n||e)}catch(a){s(a)}}}(h,"writestart progress write writeend".split(" "))};if(h.readyState=h.INIT,i)return p=n().createObjectURL(t),void setTimeout((function(){r.href=p,r.download=u,function(e){var t=new MouseEvent("click");e.dispatchEvent(t)}(r),m(),c(p),h.readyState=h.DONE}));!function(){if((o||f&&a)&&e.FileReader){var r=new FileReader;return r.onloadend=function(){var t=o?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");e.open(t,"_blank")||(e.location.href=t),t=void 0,h.readyState=h.DONE,m()},r.readAsDataURL(t),void(h.readyState=h.INIT)}(p||(p=n().createObjectURL(t)),f)?e.location.href=p:e.open(p,"_blank")||(e.location.href=p);h.readyState=h.DONE,m(),c(p)}()},d=u.prototype;return"undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,n){return t=t||e.name||"download",n||(e=l(e)),navigator.msSaveOrOpenBlob(e,t)}:(d.abort=function(){},d.readyState=d.INIT=0,d.WRITING=1,d.DONE=2,d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null,function(e,t,n){return new u(e,t||e.name||"download",n)})}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);e.exports?e.exports.saveAs=i:null!==n(613)&&null!==n(614)&&(void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r))},601:function(e,t,n){"use strict";var r=n(9),i=n(0),a=n(20),o=n(675),s=n(313),c=n(328),l=n(2);t.a=function(e){var t=e.progress,n=void 0===t?0:t,u=e.show,d=e.color,p=void 0===d?c.a[500]:d,h=e.height,f=void 0===h?10:h,m=e.backgroundColor,g=void 0===m?"grey":m,b=e.hideDelay,v=void 0===b?3e3:b,j=Object(i.useState)(!1),x=Object(r.a)(j,2),O=x[0],y=x[1];Object(i.useEffect)((function(){var e;return void 0!==u?u?y(!0):e=setTimeout((function(){return y(!1)}),v):n>0&&n<100?y(!0):n>=100?e=setTimeout((function(){return y(!1)}),v):y(!1),function(){e&&clearTimeout(e)}}),[n,u,v]);var w=Object(a.a)((function(e){return{root:{height:f,borderRadius:5,border:"1px solid white"},colorPrimary:{backgroundColor:g},bar:{borderRadius:5,backgroundColor:p}}}))(o.a);return Object(l.jsxs)(s.a,{in:O,timeout:"auto",children:[Object(l.jsx)(w,{variant:"determinate",value:n}),Object(l.jsx)("small",{children:e.info})]})}},613:function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},614:function(e,t){(function(t){e.exports=t}).call(this,{})},620:function(e,t,n){"use strict";var r=n(14),i=n(7),a=n(0),o=n(12),s=n(20),c=n(152),l=n(27),u=a.forwardRef((function(e,t){var n=e.children,s=e.classes,u=e.className,d=e.color,p=void 0===d?"default":d,h=e.component,f=void 0===h?"button":h,m=e.disabled,g=void 0!==m&&m,b=e.disableFocusRipple,v=void 0!==b&&b,j=e.focusVisibleClassName,x=e.size,O=void 0===x?"large":x,y=e.variant,w=void 0===y?"circular":y,C=Object(r.a)(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return a.createElement(c.a,Object(i.a)({className:Object(o.a)(s.root,u,"large"!==O&&s["size".concat(Object(l.a)(O))],g&&s.disabled,"extended"===w&&s.extended,{primary:s.primary,secondary:s.secondary,inherit:s.colorInherit}
2[p]),component:f,disabled:g,focusRipple:!v,focusVisibleClassName:Object(o.a)(s.focusVisible,j),ref:t},C),a.createElement("span",{className:s.label},n))}));t.a=Object(s.a)((function(e){return{root:Object(i.a)({},e.typography.button,{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:e.shadows[6]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,he
2ight:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}}),{name:"MuiFab"})(u)},632:function(e,t,n){"use strict";var r=n(7),i=n(0),a=n(20),o=n(74),s=i.forwardRef((function(e,t){return i.createElement(o.a,Object(r.a)({component:"p",variant:"body1",color:"textSecondary",ref:t},e))}));t.a=Object(a.a)({root:{marginBottom:12}},{name:"MuiDialogContentText"})(s)},649:function(e,t,n){"use strict";var r=n(9),i=n(0),a=n.n(i),o=n(237),s=n(144),c=n(226),l=n(225),u=n(74),d=n(620),p=n(679),h=n.n(p),f=n(156),m=n.n(f),g=n(389),b=n.n(g),v=n(397),j=n.n(v),x=n(23),O=n(28),y=n.n(O),w=n(2),C=Object(o.a)((function(e){return{mediaSelected:{padding:"4px",width:"200px",height:"200px",backgroundColor:"#000",opacity:.4,border:"1px solid white"},modal:{display:"flex",alignItems:"center",justifyContent:"center"},paper:{backgroundColor:"rgba(1,1,1,0.9)",border:"2px solid #000",boxShadow:e.shadows[5],padding:e.spacing(2,4,3)},scroll:{overflowX:"auto"}}}));t.a=function(e){var t=C(),n=a.a.useState(0),i=Object(r.a)(n,2),o=i[0],p=i[1],f=a.a.useState(0),g=Object(r.a)(f,2),v=g[0],O=g[1],k=a.a.useState(0),D=Object(r.a)(k,2),S=D[0],L=D[1],E=a.a.useState(0),M=Object(r.a)(E,2),P=M[0],I=M[1],N=a.a.useState(!0),A=Object(r.a)(N,2),R=A[0],T=A[1],B=a.a.useState(!1),z=Object(r.a)(B,2),U=z[0],_=z[1],q=[],F=[];switch(y.a.isArray(e.photoURLs)?"Array":"JSON"){case"Array":q=e.photoURLs;break;case"JSON":y.a.isEmpty(e.photoURLs)||(q=JSON.parse(Object.values(e.ph
2otoURLs)),F=Object.keys(e.photoURLs));break;default:q=[]}q.forEach((function(e,t){""===e&&q.splice(t,1)}));return Object(w.jsx)(s.a,{className:t.modal,open:e.open,onClose:function(){e.handleClose(),O(0),p(0),L(0),I(0),T(!1),_(h.a.mediaOpacity1)},closeAfterTransition:!0,BackdropComponent:c.a,BackdropProps:{timeout:500},children:Object(w.jsx)(l.a,{in:e.open,children:Object(w.jsxs)("div",{className:t.paper,children:[Object(w.jsxs)("div",{className:h.a.content,children:[F.map((function(e,t){return Object(w.jsx)(u.a,{variant:"body1",className:h.a.caption,children:e.charAt(0).toUpperCase()+e.slice(1)},t)})),Object(w.jsx)("div",{className:h.a.fabClose,children:Object(w.jsx)(d.a,{color:"primary",onClick:e.handleClose,children:Object(w.jsx)(j.a,{})})}),Object(w.jsx)("img",{alt:"",className:[h.a.mediaMainPrev,U?h.a.mediaOpacity1:h.a.mediaOpacity0].join(" "),src:q[S]}),Object(w.jsx)("img",{alt:"",className:[h.a.mediaMain,U?h.a.mediaOpacity0:h.a.mediaOpacity1].join(" "),src:q[P]})]}),Object(w.jsxs)("div",{className:h.a.content,children:[q.length>5?Object(w.jsx)("div",{className:h.a.fabLeft,children:Object(w.jsx)(d.a,{color:"primary",onClick:function(){return p(Object(x.a)(o-5,0,q.length-5))},children:Object(w.jsx)(m.a,{})})}):null,Object(w.jsx)("div",{className:t.scroll,children:function(e){for(var n=[],r=q.length>5?5:q.length,i=function(e){n.push(Object(w.jsx)("img",{alt:"",className:!R&&e===S||R&&e===P?t.mediaSelected:h.a.media,src:q[e],onClick:function(){var t;(t=e)!==v&&(_(!U),T(!R),O(t),R?L(t):I(t))}},e))},a=e;a<e+r&&a<q.length;a++)i(a);return n}(o)}),q.length>5?Object(w.jsx)("div",{className:h.a.fabRight,children:Object(w.jsx)(d.a,{color:"primary",onClick:function(){return p(Object(x.a)(o+5,0,q.length-5))},children:Object(w.jsx)(b.a,{})})}):null,Object(w.jsx)("div",{className:h.a.pagination,children:Object(w.jsxs)(u.a,{children:["Photos ",o+1,"-",q.length<5?q.length:o+5," of ",q.length]})})]})]})})})}},650:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore");t.default=o},663:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"}),"CloudUpload");t.default=o},679:function(e,t,n){e.exports={mediaContainer:"MediaViewer_mediaContainer__2eXkJ",caption:"MediaViewer_caption__1hsZ0",content:"MediaViewer_content__162hi",pagination:"MediaViewer_pagination__1N-vv",fabClose:"MediaViewer_fabClose__y_Ui6",fabLeft:"MediaViewer_fabLeft__2Ov1q",fabRight:"MediaViewer_fabRight__36XpQ",mediaMain:"MediaViewer_mediaMain__KNIhT",mediaMainPrev:"MediaViewer_mediaMainPrev__2-M57",mediaOpacity1:"MediaViewer_mediaOpacity1__2GaY6",mediaOpacity0:"MediaViewer_mediaOpacity0__1D0qE",media:"MediaViewer_media__1e9QY"}},685:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"}),"Assignment");t.default=o},700:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"}),"InsertDriveFile");t.default=o},701:function(e,t,n){"use strict";t.a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGYAAABiCAYAAACiTqZ0AAAC+0lEQVR4nO3asWsTYRjH8V/EsWQRHDI4OBTyRzgVdKrFwUDoaCGLIE6CWxbBSQSXQB1LIYvUTSGTf0Sgg4NDB8EldBTSQR7LPcnb9+5yyftGv5+lXO/eu7ft+8v7vk9PAgAAAAAAAAAAAAAAAAAAAAAAALZXK3UH5vP5vMn7tVqt5D9TE26l7gCWu53qwZaUwWAgSTo9PS2c7/f7heO9vb0b7zeZTAr33fbkkJhMbXxUxZLi1U3OaDSq3UcpfeJITKaSJyYmlpCmhRK36QSRmEwlS0y73Za0OIeYTSclxCdoU8khMZlKnpjZr5+SpMHzF4XrQok5Ojq68f7Hx8elrqtqNptJIjH/vWQ7f2/04b2kxeSYsgmwOWHbkZhMZZMY45OTy+rM+Fpc2ep41bmJxGQqeWLad+5Kul6dmdics2lWqbAEW
21KGw2Gp9lWr3iQmU8n3MbbztyqzT45pOjmp5q5erycpnhwSk6nkc4yx5MTmnJiv376Xuu7hg/sVeieNP30uHE+n00rtqyIxmcomMSaWnFR6Tx5LWkzO+fkPSdLu7r2l7ULnY6s0EpOp7BJjrEpsycmF9Svk4uJCktTpdJaeH4/HheNQckhMpoKJidWAQp+NTb9ZGRuh3rqqy+va91iCfHJITKYWEuN35iGhKmusnf0nMMZGftMjtep7bH7/5FdlfrXl55bQas1WeSEkJlN/54nQiH/18rUk6e27N0tvYAmo2s6E3pJpmk9KrH/Wr8vL34XvHxw8KhxbBcBWY54lqNvtFr5/dvalcHxy8lESc0z2gqsyP6JCI+zw8Fmtdvv7TyVdjyi/Q7Zjz39m++ti58v2z+zs/PkV+bnOJyW0b/FJsuT45HkkJlPZ7vzLiiVsXWzk29dQtbnuqpLEZCrZqszvZ2L7n1C7slbtX93nhPj7UyvbEgv1rqo7+Lo7fz9CYu1XfXd41f419Zyy9ycxmQr+1dZVXY6NlFD7pt6yX7V/qz6H98oAAAAAAAAAAAAAAAAAAPiHXAGAuHUHBtZ8JwAAAABJRU5ErkJggg=="},702:function(e,t,n){"use strict";n.d(t,"b",(function(){return g}));var r=n(1),i=n(3),a=n(9),o=n(0),s=n(237),c=n(132),l=n(74),u=n(178),d=n(169),p=n.n(d),h=n(25),f=n(2),m=Object(s.a)((function(e){return{container:{width:"100%"},barRow:{display:"flex",alignItems:"center",gap:e.spacing(1)},label:{whiteSpace:"nowrap",minWidth:"fit-content"}}}));function g(e){return null==e||isNaN(e)?"0 B":e<1024?e+" B":e<1048576?(e/1024).toFixed(1)+" KB":e<1073741824?(e/1048576).toFixed(1)+" MB":(e/1073741824).toFixed(2)+" GB"}var b=null;t.a=function(e){var t=e.showRefresh,n=void 0===t||t,s=e.compact,d=void 0!==s&&s,v=m(),j=Object(o.useState)(!1),x=Object(a.a)(j,2),O=x[0],y=x[1],w=Object(o.useState)(0),C=Object(a.a)(w,2),k=C[0],D=C[1];Object(o.useEffect)((function(){return h.c.collection("shopSettings").doc("bizSettings").onSnapshot((function(e){e.exists&&D(e.data().storageUsed||0)}),(function(e){return console.error("Error fetching storage usage:",e)}))}),[]);var S=Object(o.useCallback)(Object(i.a)(Object(r.a)().mark((function e(){var t;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!b){e.next=2;break}return e.abrupt("return",b);case 2:return t=h.d.httpsCallable("calculateStorageBreakdown"),y(!0),b=t({}).catch((function(e){return console.error("Storage calculation error:",e)})).finally((function(){y(!1),b=null})),e.abrupt("return",b);case 6:case"end":return e.stop()}}),e)}))),[]);return Object(f.jsxs)("div",{className:v.container,children:[Object(f.jsxs)(c.a,{container:!0,alignItems:"center",spacing:1,children:[Object(f.jsx)(c.a,{item:!0,children:Object(f.jsxs)(l.a,{variant:d?"caption":"body2",className:v.label,children:["Storage Used: ",g(k)]})}),n&&Object(f.jsx)(c.a,{item:!0,children:Object(f.jsx)(u.a,{size:"small",onClick:S,disabled:O,children:Object(f.jsx)(p.a,{fontSize:"small",style:O?{animation:"spin 1s linear infinite"}:{}})})})]}),Object(f.jsx)("style",{children:"@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }"})]})}},703:function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,a,o,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,o,s],u=0;(c=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},748:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z"}),"PictureAsPdf");t.default=o},772:function(e,t,n){"use strict";var r=n(14),i=n(6),a=n(7),o=n(0),s=n(12),c=n(20),l=n(290),u=n(344),d=n(96),p=n(178),h=n(315),f=n(472),m=n(89),g=Object(m.a)(o.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),b=n(9),v=(n(50),n(106)),j=n(76),x=n(64),O=n(60);function y(e){return"undefined"!==typeof e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function w(e,t){for(var n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1}var C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.ignoreAccents,n=void 0===t||t,r=e.ignoreCase,i=void 0===r||r,a=e.limit,o=e.matchFrom,s=void 0===o?"any":o,c=e.stringify,l=e.trim,u=void 0!==l&&l;return function(e,t){var r=t.inputValue,o=t.getOptionLabel,l=u?r.trim():r;i&&(l=l.toLowerCase()),n&&(l=y(l));var d=e.filter((function(e){var t=(c||o)(e);return i&&(t=t.toLowerCase()),n&&(t=y(t)),"start"===s?0===t.indexOf(l):t.indexOf(l)>-1}));return"number"===typeof a?d.slice(0,a):d}}();function k(e){var t=e.autoComplete,n=void 0!==t&&t,r=e.autoHighlight,i=void 0!==r&&r,s=e.autoSelect,c=void 0!==s&&s,l=e.blurOnSelect,u=void 0!==l&&l,d=e.clearOnBlur,p=void 0===d?!e.freeSolo:d,h=e.clearOnEscape,f=void 0!==h&&h,m=e.componentName,g=void 0===m?"useAutocomplete":m,y=e.debug,k=void 0!==y&&y,D=e.defaultValue,S=void 0===D?e.multiple?[]:null:D,L=e.disableClearable,E=void 0!==L&&L,M=e.disableCloseOnSelect,P=void 0!==M&&M,I=e.disabledItemsFocusable,N=void 0!==I&&I,A=e.disableListWrap,R=void 0!==A&&A,T=e.filterOptions,B=void 0===T?C:T,z=e.filterSelectedOptions,U=void 0!==z&&z,_=e.freeSolo,q=void 0!==_&&_,F=e.getOptionDisabled,H=e.getOptionLabel,W=void 0===H?function(e){return e}:H,V=e.getOptionSelected,Y=void 0===V?function(e,t){return e===t}:V,Z=e.groupBy,G=e.handleHomeEndKeys,K=void 0===G?!e.freeSolo:G,J=e.id,Q=e.includeInputInList,$=void 0!==Q&&Q,X=e.inputValue,ee=e.multiple,te=void 0!==ee&&ee,ne=e.onChange,re=e.onClose,ie=e.onHighlightChange,ae=e.onInputChange,oe=e.onOpen,se=e.open,ce=e.openOnFocus,le=void 0!==ce&&ce,ue=e.options,de=e.selectOnFocus,pe=void 0===de?!e.freeSolo:de,he=e.value,fe=Object(v.a)(J),me=W;var ge=o.useRef(!1),be=o.useRef(!0),ve=o.useRef(null),je=o.useRef(null),xe=o.useState(null),Oe=xe[0],ye=xe[1],we=o.useState(-1),Ce=we[0],ke=we[1],De=i?0:-1,Se=o.useRef(De),Le=Object(j.a)({controlled:he,default:S,name:g}),Ee=Object(b.a)(Le,2),Me=Ee[0],Pe=Ee[1],Ie=Object(j.a)({controlled:X,default:"",name:g,state:"inputValue"}),Ne=Object(b.a)(Ie,2),Ae=Ne[0],Re=Ne[1],Te=o.useState(!1),Be=Te[0],ze=Te[1],Ue=Object(x.a)((function(e,t){var n;if(te)n="";else if(null==t)n="";else{var r=me(t);n="string"===typeof r?r:""}Ae!==n&&(Re(n),ae&&ae(e,n,"reset"))}));o.useEffect((function(){Ue(null,Me)}),[Me,Ue]);var _e=Object(j.a)({controlled:se,default:!1,name:g,state:"open"}),qe=Object(b.a)(_e,2),Fe=qe[0],He=qe[1],We=!te&&null!=Me&&Ae===me(Me),Ve=Fe,Ye=Ve?B(ue.filter((function(e){return!U||!(te?Me:[Me]).some((function(t){return null!==t&&Y(e,t)}))})),{inputValue:We?"":Ae,getOptionLabel:me}):[],Ze=Object(x.a)((function(e){-1===e?ve.current.focus():Oe.querySelector('[data-tag-index="'.concat(e,'"]')).focus()}));o.useEffect((function(){te&&Ce>Me.length-1&&(ke(-1),Ze(-1))}),[Me,te,Ce,Ze]);var Ge=Object(x.a)((function(e){var t=e.event,n=e.index,r=e.reason,i=void 0===r?"auto":r;if(Se.current=n,-1===n?ve.current.removeAttribute("aria-activedescendant"):ve.current.setAttribute("aria-activedescendant","".concat(fe,"-option-").concat(n)),ie&&ie(t,-1===n?null:Ye[n],i),je.current){var a=je.current.querySelector("[data-focus]");a&&a.removeAttribute("data-focus");var o=je.current.parentElement.querySelector('[role="listbox"]');if(o)if(-1!==n){var s=je.current.querySelector('[data-option-index="'.concat(n,'"]'));if(s&&(s.setAttribute("data-focus","true"),o.scrollHeight>o.clientHeight&&"mouse"!==i)){var c=s,l=o.clientHeight+o.scrollTop,u=c.offsetTop+c.offsetHeight;u>l?o.scrollTop=u-o.clientHeight:c.offsetTop-c.offsetHeight*(Z?1.3:0)<o.scrollTop&&(o.scrollTop=c.offsetTop-c.offsetHeight*(Z?1.3:0))}}else o.scrollTop=0}})),Ke=Object(x.a)((function(e){var t=e.event,r=e.diff,i=e.direction,a=void 0===i?"next":i,o=e.reason,s=void 0===o?"auto":o;if(Ve){var c=function(e,t){if(!je.current||-1===e)return-1;for(var n=e;;){if("next"===t&&n===Ye.length||"previous"===t&&-1===n)return-1;var r=je.current.querySelector('[data-option-index="'.concat(n,'"]')),i=!N&&r&&(r.disabled||"true"===r.getAttribute("aria-disabled"));if(!(r&&!r.hasAttribute("tabindex")||i))return n;n+="next"===t?1:-1}}(function(){var e=Ye.length-1;if("reset"===r)return De;if("start"===r)return 0;if("end"===r)return e;var t=Se.current+r;return t<0?-1===t&&$?-1:R&&-1!==Se.current||Math.abs(r)>1?0:e:t>e?t===e+1&&$?-1:R||Math.abs(r)>1?e:0:t}(),a);if(Ge({index:c,reason:s,event:t}),n&&"reset"!==r)if(-1===c)ve.current.value=Ae;else{var l=me(Ye[c]);ve.current.value=l,0===l.toLowerCase().indexOf(Ae.toLowerCase())&&Ae.length>0&&ve.current.setSelectionRange(Ae.length,l.length)}}})),Je=o.useCallback((function(){if(Ve){var e=te?Me[0]:Me;if(0!==Ye.length&&null!=e){if(je.current)if(U||null==e)Se.current>=Ye.length-1?Ge({index:Ye.length-1}):Ge({index:Se.current});else{var t=Ye[Se.current];
2if(te&&t&&-1!==w(Me,(function(e){return Y(t,e)})))return;var n=w(Ye,(function(t){return Y(t,e)}));-1===n?Ke({diff:"reset"}):Ge({index:n})}}else Ke({diff:"reset"})}}),[0===Ye.length,!te&&Me,U,Ke,Ge,Ve,Ae,te]),Qe=Object(x.a)((function(e){Object(O.a)(je,e),e&&Je()}));o.useEffect((function(){Je()}),[Je]);var $e=function(e){Fe||(He(!0),oe&&oe(e))},Xe=function(e,t){Fe&&(He(!1),re&&re(e,t))},et=function(e,t,n,r){Me!==t&&(ne&&ne(e,t,n,r),Pe(t))},tt=o.useRef(!1),nt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"select-option",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"options",i=n,a=t;if(te){var o=w(a=Array.isArray(Me)?Me.slice():[],(function(e){return Y(t,e)}));-1===o?a.push(t):"freeSolo"!==r&&(a.splice(o,1),i="remove-option")}Ue(e,a),et(e,a,i,{option:t}),P||Xe(e,i),(!0===u||"touch"===u&&tt.current||"mouse"===u&&!tt.current)&&ve.current.blur()};var rt=function(e,t){if(te){Xe(e,"toggleInput");var n=Ce;-1===Ce?""===Ae&&"previous"===t&&(n=Me.length-1):((n+="next"===t?1:-1)<0&&(n=0),n===Me.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;for(var n=e;;){if("next"===t&&n===Me.length||"previous"===t&&-1===n)return-1;var r=Oe.querySelector('[data-tag-index="'.concat(n,'"]'));if(!r||r.hasAttribute("tabindex")&&!r.disabled&&"true"!==r.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),ke(n),Ze(n)}},it=function(e){ge.current=!0,Re(""),ae&&ae(e,"","clear"),et(e,te?[]:null,"clear")},at=function(e){return function(t){switch(-1!==Ce&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(ke(-1),Ze(-1)),t.key){case"Home":Ve&&K&&(t.preventDefault(),Ke({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":Ve&&K&&(t.preventDefault(),Ke({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),Ke({diff:-5,direction:"previous",reason:"keyboard",event:t}),$e(t);break;case"PageDown":t.preventDefault(),Ke({diff:5,direction:"next",reason:"keyboard",event:t}),$e(t);break;case"ArrowDown":t.preventDefault(),Ke({diff:1,direction:"next",reason:"keyboard",event:t}),$e(t);break;case"ArrowUp":t.preventDefault(),Ke({diff:-1,direction:"previous",reason:"keyboard",event:t}),$e(t);break;case"ArrowLeft":rt(t,"previous");break;case"ArrowRight":rt(t,"next");break;case"Enter":if(229===t.which)break;if(-1!==Se.current&&Ve){var r=Ye[Se.current],i=!!F&&F(r);if(t.preventDefault(),i)return;nt(t,r,"select-option"),n&&ve.current.setSelectionRange(ve.current.value.length,ve.current.value.length)}else q&&""!==Ae&&!1===We&&(te&&t.preventDefault(),nt(t,Ae,"create-option","freeSolo"));break;case"Escape":Ve?(t.preventDefault(),t.stopPropagation(),Xe(t,"escape")):f&&(""!==Ae||te&&Me.length>0)&&(t.preventDefault(),t.stopPropagation(),it(t));break;case"Backspace":if(te&&""===Ae&&Me.length>0){var a=-1===Ce?Me.length-1:Ce,o=Me.slice();o.splice(a,1),et(t,o,"remove-option",{option:Me[a]})}}e.onKeyDown&&e.onKeyDown(t)}},ot=function(e){ze(!0),le&&!ge.current&&$e(e)},st=function(e){null===je.current||document.activeElement!==je.current.parentElement?(ze(!1),be.current=!0,ge.current=!1,k&&""!==Ae||(c&&-1!==Se.current&&Ve?nt(e,Ye[Se.current],"blur"):c&&q&&""!==Ae?nt(e,Ae,"blur","freeSolo"):p&&Ue(e,Me),Xe(e,"blur"))):ve.current.focus()},ct=function(e){var t=e.target.value;Ae!==t&&(Re(t),ae&&ae(e,t,"input")),""===t?E||te||et(e,null,"clear"):$e(e)},lt=function(e){Ge({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"mouse"})},ut=function(){tt.current=!0},dt=function(e){var t=Number(e.currentTarget.getAttribute("data-option-index"));nt(e,Ye[t],"select-option"),tt.current=!1},pt=function(e){return function(t){var n=Me.slice();n.splice(e,1),et(t,n,"remove-option",{option:Me[e]})}},ht=function(e){Fe?Xe(e,"toggleInput"):$e(e)},ft=function(e){e.target.getAttribute("id")!==fe&&e.preventDefault()},mt=function(){ve.current.focus(),pe&&be.current&&ve.current.selectionEnd-ve.current.selectionStart===0&&ve.current.select(),be.current=!1},gt=function(e){""!==Ae&&Fe||ht(e)},bt=q&&Ae.length>0;bt=bt||(te?Me.length>0:null!==Me);var vt=Ye;if(Z){new Map;vt=Ye.reduce((function(e,t,n){var r=Z(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e}),[])}return{getRootProps:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(a.a)({"aria-owns":Ve?"".concat(fe,"-popup"):null,role:"combobox","aria-expanded":Ve},e,{onKeyDown:at(e),onMouseDown:ft,onClick:mt})},getInputLabelProps:function(){return{id:"".concat(fe,"-label"),htmlFor:fe}},getInputProps:function(){return{id:fe,value:Ae,onBlur:st,onFocus:ot,onChange:ct,onMouseDown:gt,"aria-activedescendant":Ve?"":null,"aria-autocomplete":n?"both":"list","aria-controls":Ve?"".concat(fe,"-popup"):null,autoComplete:"off",ref:ve,autoCapitalize:"none",spellCheck:"false"}},getClearProps:function(){return{tabIndex:-1,onClick:it}},getPopupIndicatorProps:function(){return{tabIndex:-1,onClick:ht}},getTagProps:function(e){var t=e.index;return{key:t,"data-tag-index":t,tabIndex:-1,onDelete:pt(t)}},getListboxProps:function(){return{role:"listbox",id:"".concat(fe,"-popup"),"aria-labelledby":"".concat(fe,"-label"),ref:Qe,onMouseDown:function(e){e.preventDefault()}}},getOptionProps:function(e){var t=e.index,n=e.option,r=(te?Me:[Me]).some((function(e){return null!=e&&Y(n,e)})),i=!!F&&F(n);return{key:t,tabIndex:-1,role:"option",id:"".concat(fe,"-option-").concat(t),onMouseOver:lt,onClick:dt,onTouchStart:ut,"data-option-index":t,"aria-disabled":i,"aria-selected":r}},id:fe,inputValue:Ae,value:Me,dirty:bt,popupOpen:Ve,focused:Be||-1!==Ce,anchorEl:Oe,setAnchorEl:ye,focusedTag:Ce,groupedOptions:vt}}function D(e){e.anchorEl,e.open;var t=Object(r.a)(e,["anchorEl","open"]);return o.createElement("div",t)}var S=o.createElement(f.a,{fontSize:"small"}),L=o.createElement(g,null),E=o.forwardRef((function(e,t){e.autoComplete,e.autoHighlight,e.autoSelect,e.blurOnSelect;var n,i=e.ChipProps,c=e.classes,f=e.className,m=e.clearOnBlur,g=(void 0===m&&e.freeSolo,e.clearOnEscape,e.clearText),b=void 0===g?"Clear":g,v=e.closeIcon,j=void 0===v?S:v,x=e.closeText,O=void 0===x?"Close":x,y=(e.debug,e.defaultValue),w=(void 0===y&&e.multiple,e.disableClearable),C=void 0!==w&&w,E=(e.disableCloseOnSelect,e.disabled),M=void 0!==E&&E,P=(e.disabledItemsFocusable,e.disableListWrap,e.disablePortal),I=void 0!==P&&P,N=(e.filterOptions,e.filterSelectedOptions,e.forcePopupIcon),A=void 0===N?"auto":N,R=e.freeSolo,T=void 0!==R&&R,B=e.fullWidth,z=void 0!==B&&B,U=e.getLimitTagsText,_=void 0===U?function(e){return"+".concat(e)}:U,q=(e.getOptionDisabled,e.getOptionLabel),F=void 0===q?function(e){return e}:q,H=(e.getOptionSelected,e.groupBy),W=e.handleHomeEndKeys,V=(void 0===W&&e.freeSolo,e.id,e.includeInputInList,e.inputValue,e.limitTags),Y=void 0===V?-1:V,Z=e.ListboxComponent,G=void 0===Z?"ul":Z,K=e.ListboxProps,J=e.loading,Q=void 0!==J&&J,$=e.loadingText,X=void 0===$?"L
2oading\u2026":$,ee=e.multiple,te=void 0!==ee&&ee,ne=e.noOptionsText,re=void 0===ne?"No options":ne,ie=(e.onChange,e.onClose,e.onHighlightChange,e.onInputChange,e.onOpen,e.open,e.openOnFocus,e.openText),ae=void 0===ie?"Open":ie,oe=(e.options,e.PaperComponent),se=void 0===oe?d.a:oe,ce=e.PopperComponent,le=void 0===ce?l.a:ce,ue=e.popupIcon,de=void 0===ue?L:ue,pe=e.renderGroup,he=e.renderInput,fe=e.renderOption,me=e.renderTags,ge=e.selectOnFocus,be=(void 0===ge&&e.freeSolo,e.size),ve=void 0===be?"medium":be,je=(e.value,Object(r.a)(e,["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","classes","className","clearOnBlur","clearOnEscape","clearText","closeIcon","closeText","debug","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","getOptionSelected","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","value"])),xe=I?D:le,Oe=k(Object(a.a)({},e,{componentName:"Autocomplete"})),ye=Oe.getRootProps,we=Oe.getInputProps,Ce=Oe.getInputLabelProps,ke=Oe.getPopupIndicatorProps,De=Oe.getClearProps,Se=Oe.getTagProps,Le=Oe.getListboxProps,Ee=Oe.getOptionProps,Me=Oe.value,Pe=Oe.dirty,Ie=Oe.id,Ne=Oe.popupOpen,Ae=Oe.focused,Re=Oe.focusedTag,Te=Oe.anchorEl,Be=Oe.setAnchorEl,ze=Oe.inputValue,Ue=Oe.groupedOptions;if(te&&Me.length>0){var _e=function(e){return Object(a.a)({className:Object(s.a)(c.tag,"small"===ve&&c.tagSizeSmall),disabled:M},Se(e))};n=me?me(Me,_e):Me.map((function(e,t){return o.createElement(h.a,Object(a.a)({label:F(e),size:ve},_e({index:t}),i))}))}if(Y>-1&&Array.isArray(n)){var qe=n.length-Y;!Ae&&qe>0&&(n=n.splice(0,Y)).push(o.createElement("span",{className:c.tag,key:n.length},_(qe)))}var Fe=pe||function(e){return o.createElement("li",{key:e.key},o.createElement(u.a,{className:c.groupLabel,component:"div"},e.group),o.createElement("ul",{className:c.groupUl},e.children))},He=fe||F,We=function(e,t){var n=Ee({option:e,index:t});return o.createElement("li",Object(a.a)({},n,{className:c.option}),He(e,{selected:n["aria-selected"],inputValue:ze}))},Ve=!C&&!M,Ye=(!T||!0===A)&&!1!==A;return o.createElement(o.Fragment,null,o.createElement("div",Object(a.a)({ref:t,className:Object(s.a)(c.root,f,Ae&&c.focused,z&&c.fullWidth,Ve&&c.hasClearIcon,Ye&&c.hasPopupIcon)},ye(je)),he({id:Ie,disabled:M,fullWidth:!0,size:"small"===ve?"small":void 0,InputLabelProps:Ce(),InputProps:{ref:Be,className:c.inputRoot,startAdornment:n,endAdornment:o.createElement("div",{className:c.endAdornment},Ve?o.createElement(p.a,Object(a.a)({},De(),{"aria-label":b,title:b,className:Object(s.a)(c.clearIndicator,Pe&&c.clearIndicatorDirty)}),j):null,Ye?o.createElement(p.a,Object(a.a)({},ke(),{disabled:M,"aria-label":Ne?O:ae,title:Ne?O:ae,className:Object(s.a)(c.popupIndicator,Ne&&c.popupIndicatorOpen)}),de):null)},inputProps:Object(a.a)({className:Object(s.a)(c.input,-1===Re&&c.inputFocused),disabled:M},we())})),Ne&&Te?o.createElement(xe,{className:Object(s.a)(c.popper,I&&c.popperDisablePortal),style:{width:Te?Te.clientWidth:null},role:"presentation",anchorEl:Te,open:!0},o.createElement(se,{className:c.paper},Q&&0===Ue.length?o.createElement("div",{className:c.loading},X):null,0!==Ue.length||T||Q?null:o.createElement("div",{className:c.noOptions},re),Ue.length>0?o.createElement(G,Object(a.a)({className:c.listbox},Le(),K),Ue.map((function(e,t){return H?Fe({key:e.key,group:e.group,children:e.options.map((function(t,n){return We(t,e.index+n)}))}):We(e,t)}))):null)):null)}));t.a=Object(c.a)((function(e){var t;return{root:{"&$focused $clearIndicatorDirty":{visibility:"visible"},"@media (pointer: fine)":{"&:hover $clearIndicatorDirty":{visibility:"visible"}}},fullWidth:{width:"100%"},focused:{},tag:{margin:3,maxWidth:"calc(100% - 6px)"},tagSizeSmall:{margin:2,maxWidth:"calc(100% - 4px)"},hasPopupIcon:{},hasClearIcon:{},inputRoot:{flexWrap:"wrap","$hasPopupIcon &, $hasClearIcon &":{paddingRight:30},"$hasPopupIcon$hasClearIcon &":{paddingRight:56},"& $input":{width:0,minWidth:30},'&[class*="MuiInput-root"]':{paddingBottom:1,"& $input":{padding:4},"& $input:first-child":{padding:"6px 0"}},'&[class*="MuiInput-root"][class*="MuiInput-marginDense"]':{"& $input":{padding:"4px 4px 5px"},"& $input:first-child":{padding:"3px 0 6px"}},'&[class*="MuiOutlinedInput-root"]':{padding:9,"$hasPopupIcon &, $hasClearIcon &":{paddingRight:39},"$hasPopupIcon$hasClearIcon &":{paddingRight:65},"& $input":{padding:"9.5px 4px"},"& $input:first-child":{paddingLeft:6},"& $endAdornment":{right:9}},'&[class*="MuiOutlinedInput-root"][class*="MuiOutlinedInput-marginDense"]':{padding:6,"& $input":{padding:"4.5px 4px"}},'&[class*="MuiFilledInput-root"]':{paddingTop:19,paddingLeft:8,"$hasPopupIcon &, $hasClearIcon &":{paddingRight:39},"$hasPopupIcon$hasClearIcon &":{paddingRight:65},"& $input":{padding:"9px 4px"},"& $endAdornment":{right:9}},'&[class*="MuiFilledInput-root"][class*="MuiFilledInput-marginDense"]':{paddingBottom:1,"& $input":{padding:"4.5px 4px"}}},input:{flexGrow:1,textOverflow:"ellipsis",opacity:0}
2,inputFocused:{opacity:1},endAdornment:{position:"absolute",right:0,top:"calc(50% - 14px)"},clearIndicator:{marginRight:-2,padding:4,visibility:"hidden"},clearIndicatorDirty:{},popupIndicator:{padding:2,marginRight:-2},popupIndicatorOpen:{transform:"rotate(180deg)"},popper:{zIndex:e.zIndex.modal},popperDisablePortal:{position:"absolute"},paper:Object(a.a)({},e.typography.body1,{overflow:"hidden",margin:"4px 0"}),listbox:{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto"},loading:{color:e.palette.text.secondary,padding:"14px 16px"},noOptions:{color:e.palette.text.secondary,padding:"14px 16px"},option:(t={minHeight:48,display:"flex",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16},Object(i.a)(t,e.breakpoints.up("sm"),{minHeight:"auto"}),Object(i.a)(t,'&[aria-selected="true"]',{backgroundColor:e.palette.action.selected}),Object(i.a)(t,'&[data-focus="true"]',{backgroundColor:e.palette.action.hover}),Object(i.a)(t,"&:active",{backgroundColor:e.palette.action.selected}),Object(i.a)(t,'&[aria-disabled="true"]',{opacity:e.palette.action.disabledOpacity,pointerEvents:"none"}),t),groupLabel:{backgroundColor:e.palette.background.paper,top:-8},groupUl:{padding:0,"& $option":{paddingLeft:24}}}}),{name:"MuiAutocomplete"})(E)},775:function(e,t,n){"use strict";var r=n(7),i=n(14),a=n(0),o=n(12),s=n(27),c=n(20),l=n(91),u=n(30),d=n(74),p=a.forwardRef((function(e,t){var n=e.classes,c=e.className,p=e.color,h=void 0===p?"primary":p,f=e.component,m=void 0===f?"a":f,g=e.onBlur,b=e.onFocus,v=e.TypographyClasses,j=e.underline,x=void 0===j?"hover":j,O=e.variant,y=void 0===O?"inherit":O,w=Object(i.a)(e,["classes","className","color","component","onBlur","onFocus","TypographyClasses","underline","variant"]),C=Object(l.a)(),k=C.isFocusVisible,D=C.onBlurVisible,S=C.ref,L=a.useState(!1),E=L[0],M=L[1],P=Object(u.a)(t,S);return a.createElement(d.a,Object(r.a)({className:Object(o.a)(n.root,n["underline".concat(Object(s.a)(x))],c,E&&n.focusVisible,"button"===m&&n.button),classes:v,color:h,component:m,onBlur:function(e){E&&(D(),M(!1)),g&&g(e)},onFocus:function(e){k(e)&&M(!0),b&&b(e)},ref:P,variant:y},w))}));t.a=Object(c.a)({root:{},underlineNone:{textDecoration:"none"},underlineHover:{textDecoration:"none","&:hover":{textDecoration:"underline"}},underlineAlways:{textDecoration:"underline"},button:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none","&::-moz-focus-inner":{borderStyle:"none"},"&$focusVisible":{outline:"auto"}},focusVisible:{}},{name:"MuiLink"})(p)},816:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6 0h-4V4h4v2z"}),"Work");t.default=o},817:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"}),"Receipt");t.default=o},818:function(e,t,n){"use strict";var r=n(1),i=n(3),a=n(9),o=n(0),s=n(25),c=s.d.httpsCallable("convertImageToWebp"),l=["image/jpeg","image/png","image/jpg"];t.a=function(e){var t=Object(o.useState)([]),n=Object(a.a)(t,2),u=n[0],d=n[1],p=Object(o.useState)([]),h=Object(a.a)(p,2),f=h[0],m=h[1],g=Object(o.useState)(!1),b=Object(a.a)(g,2),v=b[0],j=b[1],x=Object(o.useState)(!1),O=Object(a.a)(x,2),y=O[0],w=O[1],C=Object(o.useState)(0),k=Object(a.a)(C,2),D=k[0],S=k[1],L=Object(o.useState)(""),E=Object(a.a)(L,2),M=E[0],P=E[1],I=Object(o.useState)(!1),N=Object(a.a)(I,2),A=N[0],R=N[1],T=Object(o.useState)(""),B=Object(a.a)(T,2),z=B[0],U=B[1],_=Object(o.useState)(null),q=Object(a.a)(_,2),F=q[0],H=q[1],W=Object(o.useState)(null),V=Object(a.a)(W,2),Y=V[0],Z=V[1],G=Object(o.useRef)(!0);Object(o.useEffect)((function(){return function(){G.current=!1}}),[]),Object(o.useEffect)((function(){void 0===e||null===e||String(e).startsWith("undefined")?null===e&&(Z(null),d([]),m([])):Z(e)}),[e]);var K=Object(o.useCallback)(Object(i.a)(Object(r.a)().mark((function e(){var t,n,o,c,l;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==Y&&!String(Y).startsWith("undefined")){e.next=2;break}return e.abrupt("return");case 2:return j(!0),H(null),e.prev=4,t=s.f.ref(Y),e.next=8,t.listAll();case 8:return n=e.sent,o=n.prefixes.map((function(e){return{name:e.name,fullPath:e.fullPath+"/"}})),c=n.items.filter((function(e){return".keep"!==e.name})).map(function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i,o,s,c;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.all([t.getMetadata(),t.getDownloadURL()]);case 3:return i=e.sent,o=Object(a.a)(i,2),s=o[0],c=o[1],e.abrupt("return",{name:t.name,fullPath:t.fullPath,size:s.size,contentType:s.contentType,updated:s.updated,downloadURL:c,uploadedVia:(null===(n=s.customMetadata)||void 0===n?void 0:n.uploadedVia)||null});case 10:return e.prev=10,e.t0=e.catch(0),console.warn("Error fetching file metadata:",t.name,e.t0),e.abrupt("return",null);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t){return e.apply(this,arguments)}}()),e.next=13,Promise.all(c);case 13:l=e.sent.filter(Boolean),G.current&&(m(o),d(l)),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(4),console.error("Error listing storage:",e.t0),G.current&&H(e.t0.message);case 21:return e.prev=21,G.current&&j(!1),e.finish(21);case 24:case"end":return e.stop()}}),e,null,[[4,17,21,24]])}))),[Y]);Object(o.useEffect)((function(){null!==Y&&K()}),[Y,K]);var J=Object(o.useCallback)(function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,a,o,u;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==Y&&t){e.next=2;break}return e.abrupt("return");case 2:return i=n&&n.trim()||t.name,w(!0),S(0),P(i),H(null),e.prev=7,a=l.includes(t.type),o=s.f.ref().child(Y+i),u={customMetadata:{uploadedVia:"storageComponent"}},e.next=13,new Promise((function(e,n){o.put(t,u).on("state_changed",(function(e){var t=e.bytesTransferred/e.totalBytes*100;G.current&&S(t)}),(function(e){return n(e)}),(function(){return e()}))}));case 13:if(!a){e.next=22;break}return e.prev=14,e.next=17,c({filePath:o.fullPath});case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(14),console.warn("WebP conversion failed, keeping original:",e.t0);case 22:if(!G.current){e.next=27;break}return S(0),P(""),e.next=27,K();case 27:e.next=33;break;case 29:e.prev=29,e.t1=e.catch(7),console.error("Error uploading file:",e.t1),G.current&&H(e.t1.message);case 33:return e.prev=33,G.current&&(w(!1),P("")),e.finish(33);case 36:case"end":return e.stop()}}),e,null,[[7,29,33,36],[14,19]])})));return function(t,n){return e.apply(this,arguments)}}(),[Y,K]),Q=Object(o.useCallback)(function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,o,c,l,u,d,p,h,f,m,g;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&n&&n.trim()){e.next=2;break}return e.abrupt("return");case 2:if(i=n.trim(),o=t.substring(0,t.lastIndexOf("/")+1),(c=o+i)!==t){e.next=7;break}return e.abrupt("return");case 7:return H(null),R(!0),U(i),e.prev=10,l=s.f.ref(t),e.next=14,Promise.all([l.getMetadata(),l.getDownloadURL()]);case 14:return u=e.sent,d=Object(a.a)(u,2),p=d[0],h=d[1],e.next=20,fetch(h);case 20:return f=e.sent,e.next=23,f.blob();case 23:return m=e.sent,g=s.f.ref(c),e.next=27,g.put(m,{contentType:p.contentType,customMetadata:p.customMetadata});case 27:return e.next=29,l.delete();case 29:if(!G.current){e.next=32;break}return e.next=32,K();case 32:e.next=38;break;case 34:e.prev=34,e.t0=e.catch(10),console.error("Error renaming file:",e.t0),G.current&&H(e.t0.message);case 38:return e.prev=38,G.current&&(R(!1),U("")),e.finish(38);case 41:case"end":return e.stop()}}),e,null,[[10,34,38,41]])})));return function(t,n){return e.apply(this,arguments)}}(),[K]),$=Object(o.useCallback)(function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return H(null),e.prev=3,e.next=6,s.f.ref(t).delete();case 6:if(!G.current){e.next=9;break}return e.next=9,K();case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(3),console.error("Error deleting file:",e.t0),G.current&&H(e.t0.message);case 15:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t){return e.apply(this,arguments)}}(),[K]),X=Object(o.useCallback)(function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==Y&&t){e.next=2;break}return e.abrupt("return");case 2:return H(null),e.prev=3,n=s.f.ref().child(Y+t+"/.keep"),e.next=7,n.putString("");case 7:if(!G.current){e.next=10;break}return e.next=10,K();case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(3),console.error("Error creating folder:",e.t0),G.current&&H(e.t0.message);case 16:case"end":return e.stop()}}),e,null,[[3,12]])})));return function(t){return e.apply(this,arguments)}}(),[Y,K]),ee=Object(o.useCallback)((function(e){Z(e)}),[]);return{files:u,folders:f,loading:v,uploading:y,uploadProgress:D,uploadingFileName:M,renaming:A,renamingFileName:z,error:F,currentPath:Y,basePath:e,refresh:K,uploadFile:J,deleteFile:$,renameFile:Q,createFolder:X,navigateTo:ee}}},819:function(e,t,n){"use strict";var r=n(31),i=n(32);
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}),"Image");t.default=o},848:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M22 10l-6-6H4c-1.1 0-2 .9-2 2v12.01c0 1.1.9 1.99 2 1.99l16-.01c1.1 0 2-.89 2-1.99v-8zm-7-4.5l5.5 5.5H15V5.5z"}),"Note");t.default=o},849:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={AB:"Alberta",BC:"British Columbia",MB:"Manitoba",NB:"New Brunswick",NL:"Newfoundland and Labrador",NS:"Nova Scotia",NT:"Northwest Territories",NU:"Nunavut",ON:"Ontario",PE:"Prince Edward Island",QC:"Quebec",SK:"Saskatchewan",YT:"Yukon"}},915:function(e,t,n){"use strict";var r=n(1),i=n(13),a=n(3),o=n(8),s=n(9),c=n(0),l=n(237),u=n(238),d=n(239),p=n(241),h=n(310),f=n(74),m=n(988),g=n(775),b=n(132),v=n(281),j=n(282),x=n(333),O=n(305),y=n(340),w=n(178),C=n(334),k=n(336),D=n(337),S=n(338),L=n(307),E=n(306),M=n(314),P=n(632),I=n(490),N=n(675),A=n(170),R=n.n(A),T=n(700),B=n.n(T),z=n(819),U=n.n(z),_=n(748),q=n.n(_),F=n(166),H=n.n(F),W=n(484),V=n.n(W),Y=n(137),Z=n.n(Y),G=n(135),K=n.n(G),J=n(592),Q=n.n(J),$=n(160),X=n(663),ee=n.n(X),te=n(818),ne=n(53),re=n(702),ie=n(370),ae=n(395),oe=n(2),se=Object(l.a)((function(e){return{root:{width:"100%"},addressSelect:{marginBottom:e.spacing(2),minWidth:240},dropzone:{border:"2px dashed #ccc",borderRadius:8,padding:e.spacing(2),textAlign:"center",cursor:"pointer",transition:"border-color 0.2s, background-color 0.2s","&:hover":{borderColor:e.palette.primary.main,backgroundColor:e.palette.action.hover},marginBottom:e.spacing(2)},dropzoneDisabled:{opacity:.5,cursor:"default","&:hover":{borderColor:"#ccc",backgroundColor:"transparent"}},icon:{fontSize:32,color:"#999",marginBottom:e.spacing(.5)},fileList:{width:"100%"},fileItem:{borderBottom:"1px solid ".concat(e.palette.divider)},breadcrumbs:{marginBottom:e.spacing(1)},emptyMessage:{padding:e.spacing(3),textAlign:"center",color:e.palette.text.secondary},errorText:{color:e.palette.error.main,marginBottom:e.spacing(1)},storageBar:{marginBottom:e.spacing(2)},previewImage:{maxWidth:"100%",maxHeight:"70vh",display:"block",margin:"auto"}}})),ce=[".webp",".jpg",".jpeg",".png",".gif",".bmp",".svg"];function le(e){if(e.contentType&&e.contentType.startsWith("image/"))return!0;var t=(e.name||"").toLowerCase();return ce.some((function(e){return t.endsWith(e)}))}function ue(e){return"application/pdf"===e.contentType||(e.name||"").toLowerCase().endsWith(".pdf")}function de(e,t){return le(e)?Object(oe.jsx)(U.a,{style:{color:t}}):ue(e)?Object(oe.jsx)(q.a,{style:{color:t}}):Object(oe.jsx)(B.a,{color:"action"})}var pe={"image/jpeg":[".jpg",".jpeg"],"image/png":[".png"],"application/pdf":[".pdf"]},he=[".jpg",".jpeg",".png",".pdf"];function fe(e){var t=e.toLowerCase();return he.some((function(e){return t.endsWith(e)}))}function me(e){var t=(e||"").lastIndexOf(".");return t<=0?{base:e||"",ext:""}:{base:e.substring(0,t),ext:e.substring(t)}}function ge(e){var t=[e.address||""];return e.jobNumber&&t.push(e.jobNumber),t.join(" - ").replace(/[/\\#?*:"|<>]/g,"_").trim()||"unnamed"}t.a=function(e){var t,n,l=e.storagePath,A=e.addresses,T=se(),B=Object(ne.b)().roles.includes("Delete Storage Items"),z=Object(c.useState)(""),U=Object(s.a)(z,2),_=U[0],q=U[1],F=Object(c.useState)({open:!1,file:null}),W=Object(s.a)(F,2),Y=W[0],G=W[1],J=Object(c.useState)({open:!1,file:null,name:"",ext:""}),X=Object(s.a)(J,2),ce=X[0],be=X[1],ve=Object(c.useState)([]),je=Object(s.a)(ve,2),xe=je[0],Oe=je[1],ye=Object(c.useState)(null),we=Object(s.a)(ye,2),Ce=we[0],ke=we[1],De=A&&""!==_?"".concat(l).concat(ge(A[_]),"/"):l,Se=Object(te.a)(De),Le=Se.files,Ee=Se.folders,Me=Se.loading,Pe=Se.uploading,Ie=Se.uploadProgress,Ne=Se.uploadingFileName,Ae=Se.renaming,Re=Se.renamingFileName,Te=Se.error,Be=Se.currentPath,ze=(Se.basePath,Se.navigateTo),Ue=Se.uploadFile,_e=Se.deleteFile,qe=Se.renameFile,Fe=function(){var e=Object(a.a)(Object(r.a)().mark((function e(){var t,n,a,o,s,c,l,u,d;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=xe,Oe([]),n=Object(i.a)(t),e.prev=3,n.s();case 5:if((a=n.n()).done){e.next=16;break}if(o=a.value,s=o.file,c=o.newBase,l=o.ext,u=(c||"").trim(),fe(d=u?u+l:s.name)){e.next=12;break}return alert("File type not accepted: ".concat(d,". Allowed: ").concat(he.join(", "))),e.abrupt("continue",14);case 12:return e.next=14,Ue(s,d);case 14:e.next=5;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(3),n.e(e.t0);case 21:return e.prev=21,n.f(),e.finish(21);case 24:case"end":return e.stop()}}),e,null,[[3,18,21,24]])})));return function(){return e.apply(this,arguments)}}(),He=function(e){window.open(e.downloadURL,"_blank")},We=function(){var e=Object(a.a)(Object(r.a)().mark((function e(){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Y.file){e.next=3;break}return e.next=3,_e(Y.file.fullPath);case 3:G({open:!1,file:null});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ve=function(){G({open:!1,file:null})},Ye=function(){var e=Object(a.a)(Object(r.a)().mark((function e(){var t,n,i,a,o;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=ce.file,n=ce.name,i=ce.ext,a=(n||"").trim(),o=a+i,t&&a&&o!==t.name){e.next=6;break}return be({open:!1,file:null,name:"",ext:""}),e.abrupt("return");case 6:if(!Le.some((function(e){return e.name===o&&e.fullPath!==t.fullPath}))){e.next=10;break}return alert('A file named "'.concat(o,'" already exists in this folder.')),e.abrupt("return");case 10:return be({open:!1,file:null,name:"",ext:""}),e.next=13,qe(t.fullPath,o);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ze=function(){var e=A&&""!==_?"".concat(l).concat(ge(A[_]),"/"):l;if(!Be||!e)return[];var t=Be.replace(e,"");if(!t)return[];
2var n,r=t.split("/").filter(Boolean),a=[],o=e,s=Object(i.a)(r);try{for(s.s();!(n=s.n()).done;){var c=n.value;o+=c+"/",a.push({label:c,path:o})}}catch(u){s.e(u)}finally{s.f()}return a}(),Ge=Ze.length>0,Ke="#4caf50";return Object(oe.jsxs)("div",{className:T.root,children:[A&&A.length>0&&Object(oe.jsxs)(u.a,{variant:"outlined",size:"small",className:T.addressSelect,children:[Object(oe.jsx)(d.a,{children:"Address / Job Site"}),Object(oe.jsxs)(p.a,{value:_,onChange:function(e){return q(e.target.value)},label:"Address / Job Site",children:[Object(oe.jsx)(h.a,{value:"",children:Object(oe.jsx)("em",{children:"Root (No address)"})}),A.map((function(e,t){return Object(oe.jsxs)(h.a,{value:t,children:[e.address,e.city?", ".concat(e.city):"",e.jobNumber?" - ".concat(e.jobNumber):""]},t)}))]})]}),Object(oe.jsx)($.a,{accept:pe,onDrop:function(e){e&&0!==e.length&&Oe(e.map((function(e){var t=me(e.name);return{file:e,newBase:t.base,ext:t.ext}})))},disabled:Pe,children:function(e){var t=e.getRootProps,n=e.getInputProps;return Object(oe.jsxs)("div",Object(o.a)(Object(o.a)({},t()),{},{className:"".concat(T.dropzone," ").concat(Pe?T.dropzoneDisabled:""),children:[Object(oe.jsx)("input",Object(o.a)({},n())),Object(oe.jsx)(ee.a,{className:T.icon}),Object(oe.jsx)(f.a,{variant:"body2",children:Pe?"Uploading...":"Click or drag files to upload"}),Object(oe.jsx)(f.a,{variant:"caption",color:"textSecondary",children:"Accepted: .jpg, .jpeg, .png, .pdf"})]}))}}),Te&&Object(oe.jsx)(f.a,{variant:"body2",className:T.errorText,children:Te}),Ge&&Object(oe.jsxs)(m.a,{separator:Object(oe.jsx)(Q.a,{fontSize:"small"}),className:T.breadcrumbs,children:[Object(oe.jsx)(g.a,{color:"inherit",href:"#",onClick:function(e){e.preventDefault();var t=A&&""!==_?"".concat(l).concat(ge(A[_]),"/"):l;ze(t)},children:"Root"}),Ze.map((function(e,t){return t<Ze.length-1?Object(oe.jsx)(g.a,{color:"inherit",href:"#",onClick:function(t){t.preventDefault(),ze(e.path)},children:e.label},t):Object(oe.jsx)(f.a,{color:"textPrimary",children:e.label},t)}))]}),Me?Object(oe.jsx)(b.a,{container:!0,spacing:1,children:[1,2,3].map((function(e){return Object(oe.jsx)(b.a,{item:!0,xs:12,children:Object(oe.jsx)(ie.a,{variant:"rect",height:48,style:{borderRadius:4}})},e)}))}):Object(oe.jsxs)(oe.Fragment,{children:[Ee.length>0&&Object(oe.jsx)(v.a,{dense:!0,className:T.fileList,children:Ee.map((function(e){return Object(oe.jsxs)(j.a,{button:!0,onClick:function(){return ze(e.fullPath)},className:T.fileItem,children:[Object(oe.jsx)(x.a,{children:Object(oe.jsx)(R.a,{style:{color:Ke}})}),Object(oe.jsx)(O.a,{primary:e.name})]},e.fullPath)}))}),Le.length>0?Object(oe.jsx)(v.a,{dense:!0,className:T.fileList,children:Le.map((function(e){var t=le(e);return Object(oe.jsxs)(j.a,{className:T.fileItem,children:[Object(oe.jsx)(x.a,{children:de(e,Ke)}),Object(oe.jsx)(O.a,{primary:e.name,secondary:Object(oe.jsxs)(oe.Fragment,{children:[Object(re.b)(e.size),t?" - Image":"",e.updated?" - ".concat(new Date(e.updated).toLocaleDateString()):"","storageComponent"!==e.uploadedVia&&Object(oe.jsx)(f.a,{variant:"caption",component:"span",style:{marginLeft:8,color:"#1976d2",fontStyle:"italic"},children:"Connected to Database"})]})}),Object(oe.jsxs)(y.a,{children:[(t||ue(e))&&Object(oe.jsx)(w.a,{edge:"end",size:"small",onClick:function(){return ke(e)},title:"Preview",style:{marginRight:4},children:Object(oe.jsx)(H.a,{})}),Object(oe.jsx)(w.a,{edge:"end",size:"small",onClick:function(){return He(e)},title:"Download",children:Object(oe.jsx)(V.a,{})}),"storageComponent"===e.uploadedVia&&Object(oe.jsx)(w.a,{edge:"end",size:"small",onClick:function(){return function(e){var t=me(e.name),n=t.base,r=t.ext;be({open:!0,file:e,name:n,ext:r})}(e)},title:"Rename",style:{marginLeft:4},children:Object(oe.jsx)(K.a,{})}),B&&Object(oe.jsx)(w.a,{edge:"end",size:"small",onClick:function(){return function(e){G({open:!0,file:e})}(e)},title:"Delete",style:{marginLeft:4},children:Object(oe.jsx)(Z.a,{})})]})]},e.fullPath)}))}):0===Ee.length?Object(oe.jsx)(f.a,{className:T.emptyMessage,children:"No files uploaded yet."}):null]}),Object(oe.jsxs)(C.a,{open:!!Ce,onClose:function(){return ke(null)},maxWidth:"md",fullWidth:!0,children:[Object(oe.jsx)(k.a,{children:null===Ce||void 0===Ce?void 0:Ce.name}),Object(oe.jsxs)(D.a,{children:[Ce&&le(Ce)&&Object(oe.jsx)("img",{src:Ce.downloadURL,alt:Ce.name,className:T.previewImage}),Ce&&ue(Ce)&&Object(oe.jsx)(ae.a,{url:Ce.downloadURL,maxHeight:"70vh"})]}),Object(oe.jsxs)(S.a,{children:[Object(oe.jsx)(L.a,{onClick:function(){return He(Ce)},startIcon:Object(oe.jsx)(V.a,{}),children:"Download"}
2),Object(oe.jsx)(L.a,{onClick:function(){return ke(null)},variant:"contained",children:"Close"})]})]}),Object(oe.jsxs)(C.a,{open:ce.open,onClose:function(){return be({open:!1,file:null,name:"",ext:""})},fullWidth:!0,maxWidth:"xs",children:[Object(oe.jsx)(k.a,{children:"Rename File"}),Object(oe.jsx)(D.a,{children:Object(oe.jsx)(E.a,{autoFocus:!0,fullWidth:!0,variant:"outlined",label:"File Name",value:ce.name,onChange:function(e){return be((function(t){return Object(o.a)(Object(o.a)({},t),{},{name:e.target.value})}))},onKeyDown:function(e){"Enter"===e.key&&Ye()},InputProps:ce.ext?{endAdornment:Object(oe.jsx)(M.a,{position:"end",children:ce.ext})}:void 0,helperText:"The file extension cannot be changed."})}),Object(oe.jsxs)(S.a,{children:[Object(oe.jsx)(L.a,{onClick:function(){return be({open:!1,file:null,name:"",ext:""})},children:"Cancel"}),Object(oe.jsx)(L.a,{onClick:Ye,variant:"contained",color:"primary",disabled:!ce.name.trim()||ce.name.trim()+ce.ext===(null===(t=ce.file)||void 0===t?void 0:t.name),children:"Rename"})]})]}),Object(oe.jsxs)(C.a,{open:xe.length>0,onClose:function(){return Oe([])},fullWidth:!0,maxWidth:"sm",children:[Object(oe.jsx)(k.a,{children:1===xe.length?"Rename file before upload?":"Rename ".concat(xe.length," files before upload?")}),Object(oe.jsxs)(D.a,{children:[Object(oe.jsx)(f.a,{variant:"body2",color:"textSecondary",style:{marginBottom:12},children:"Edit the name(s) below or leave as-is, then click Upload."}),xe.map((function(e,t){var n=(e.newBase||"").trim()+e.ext;return Object(oe.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[Object(oe.jsx)(E.a,{fullWidth:!0,size:"small",variant:"outlined",value:e.newBase,onChange:function(e){return function(e,t){Oe((function(n){return n.map((function(n,r){return r===e?Object(o.a)(Object(o.a)({},n),{},{newBase:t}):n}))}))}(t,e.target.value)},InputProps:e.ext?{endAdornment:Object(oe.jsx)(M.a,{position:"end",children:e.ext})}:void 0,helperText:n!==e.file.name?"Original: ".concat(e.file.name):" "}),xe.length>1&&Object(oe.jsx)(w.a,{size:"small",onClick:function(){return function(e){Oe((function(t){return t.filter((function(t,n){return n!==e}))}))}(t)},title:"Remove from upload",children:Object(oe.jsx)(Z.a,{})})]},t)}))]}),Object(oe.jsxs)(S.a,{children:[Object(oe.jsx)(L.a,{onClick:function(){return Oe([])},children:"Cancel"}),Object(oe.jsx)(L.a,{onClick:Fe,variant:"contained",color:"primary",children:"Upload"})]})]}),Object(oe.jsxs)(C.a,{open:Y.open,onClose:Ve,children:[Object(oe.jsx)(k.a,{children:"Delete File?"}),Object(oe.jsx)(D.a,{children:Object(oe.jsxs)(P.a,{children:['Are you sure you want to delete "',null===(n=Y.file)||void 0===n?void 0:n.name,'"? This cannot be undone.']})}),Object(oe.jsxs)(S.a,{children:[Object(oe.jsx)(L.a,{onClick:Ve,variant:"contained",color:"secondary",children:"No"}),Object(oe.jsx)(L.a,{onClick:We,variant:"contained",style:{backgroundColor:"red",color:"white"},children:"Yes"})]})]}),Object(oe.jsx)(I.a,{open:Pe,anchorOrigin:{vertical:"bottom",horizontal:"center"},message:Object(oe.jsxs)("div",{style:{minWidth:280},children:[Object(oe.jsxs)(f.a,{variant:"body2",style:{color:"white",marginBottom:4},children:["Uploading: ",Ne]}),Object(oe.jsx)(N.a,{variant:"determinate",value:Ie,style:{height:8,borderRadius:4}}),Object(oe.jsxs)(f.a,{variant:"caption",style:{color:"rgba(255,255,255,0.7)",marginTop:2,display:"block"},children:[Math.round(Ie),"%"]})]})}),Object(oe.jsx)(I.a,{open:Ae,anchorOrigin:{vertical:"bottom",horizontal:"center"},message:Object(oe.jsxs)("div",{style:{minWidth:280},children:[Object(oe.jsxs)(f.a,{variant:"body2",style:{color:"white",marginBottom:4},children:["Renaming to: ",Re]}),Object(oe.jsx)(N.a,{style:{height:8,borderRadius:4}})]})})]})}},918:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");t.default=o},919:function(e,t,n){"use strict";var r=n(31),i=n(32);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(0)),o=(0,r(n(33)).default)(a.createElement("path",{d:"M7 14l5-5 5 5z"}),"ArrowDropUp");t.default=o},988:function(e,t,n){"use strict";var r=n(7),i=n(26),a=n(14),o=n(0),s=(n(95),n(12)),c=n(20),l=n(74),u=n(35),d=n(89),p=Object(d.a)(o.createElement("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),h=n(152);var f=Object(c.a)((function(e){return{root:{display:"flex",marginLeft:e.spacing(.5),marginRight:e.spacing(.5),backgroundColor:e.palette.grey[100],c
2olor:e.palette.grey[700],borderRadius:2,cursor:"pointer","&:hover, &:focus":{backgroundColor:e.palette.grey[200]},"&:active":{boxShadow:e.shadows[0],backgroundColor:Object(u.d)(e.palette.grey[200],.12)}},icon:{width:24,height:16}}}),{name:"PrivateBreadcrumbCollapsed"})((function(e){var t=e.classes,n=Object(a.a)(e,["classes"]);return o.createElement(h.a,Object(r.a)({component:"li",className:t.root,focusRipple:!0},n),o.createElement(p,{className:t.icon}))}));var m=o.forwardRef((function(e,t){var n=e.children,c=e.classes,u=e.className,d=e.component,p=void 0===d?"nav":d,h=e.expandText,m=void 0===h?"Show path":h,g=e.itemsAfterCollapse,b=void 0===g?1:g,v=e.itemsBeforeCollapse,j=void 0===v?1:v,x=e.maxItems,O=void 0===x?8:x,y=e.separator,w=void 0===y?"/":y,C=Object(a.a)(e,["children","classes","className","component","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),k=o.useState(!1),D=k[0],S=k[1],L=o.Children.toArray(n).filter((function(e){return o.isValidElement(e)})).map((function(e,t){return o.createElement("li",{className:c.li,key:"child-".concat(t)},e)}));return o.createElement(l.a,Object(r.a)({ref:t,component:p,color:"textSecondary",className:Object(s.a)(c.root,u)},C),o.createElement("ol",{className:c.ol},function(e,t,n){return e.reduce((function(r,i,a){return a<e.length-1?r=r.concat(i,o.createElement("li",{"aria-hidden":!0,key:"separator-".concat(a),className:t},n)):r.push(i),r}),[])}(D||O&&L.length<=O?L:function(e){return j+b>=e.length?e:[].concat(Object(i.a)(e.slice(0,j)),[o.createElement(f,{"aria-label":m,key:"ellipsis",onClick:function(e){S(!0);var t=e.currentTarget.parentNode.querySelector("a[href],button,[tabindex]");t&&t.focus()}})],Object(i.a)(e.slice(e.length-b,e.length)))}(L),c.separator,w)))}));t.a=Object(c.a)({root:{},ol:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"},li:{},separator:{display:"flex",userSelect:"none",marginLeft:8,marginRight:8}},{name:"MuiBreadcrumbs"})(m)}}]); 3//# sourceMappingURL=Equipment.21a21d73.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.