PageSourceSearch

https://video.envysion.com/ui/assets/index-a9d8b7a8.js

js envysion.com collected 2026-09-25 02:52:01 UTC 6,557 bytes, 2 lines download raw bytes

1var k=Object.defineProperty;var U=(a,r,e)=>r in a?k(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e;var x=(a,r,e)=>(U(a,typeof r!="symbol"?r+"":r,e),e);import{a as s,cP as w,cQ as n,r as C,j as t,cR as D,cS as B,q as W,w as $,b as _,H as M,P as O,aD as L,c0 as Y,ah as P,cT as G,cU as Q,cr as N,cV as X,cW as Z,cX as J,cY as K,cZ as ee,c_ as te,c$ as se,aI as b,cd as re,N as ae,d0 as ie,d1 as oe,d2 as ne}from"./index-53d92ba5.js";import{B as ce}from"./index-5bead37d.js";import{S as le}from"./SitesNewNavRedirect-b125898d.js";const A=a=>{const{categoryId:r,searchPhrase:e,onFetch:o,onSearch:l,pageSize:d,onCloudArchiveFetch:c,onCloudArchiveSearch:h,...m}=a,[u,S,y]=w((p,v,I)=>e?l(e,v,p,I):o(r,v,p,I),0,d),[f,i,F]=w((p,v,I)=>e?h(e,v,p,I):c(r,v,p),0,d),g=u===n.Loading||f===n.Loading,j=u===n.Terminated,R=u===n.Error||f===n.Error,q=u===n.Reloading||f===n.Reloading,H=u===n.Idle||f===n.Idle;return C.useEffect(()=>{const p=new AbortController;return y(!0,p.signal),F(!0,p.signal),()=>{p.abort()}},[r,e,d]),t.jsx(D,{list:(S==null?void 0:S.map(p=>B(p,i)))||[],hasFilter:!!e,showSiteCategoryList:j||H||g,showProgress:g||q,showError:R,showMoreButton:!(j||q),disabledMoreButton:g,handleLoadMore:()=>{y(!1),F(!1)},...m})};A.propTypes={categoryId:s.number,searchPhrase:s.string,onFetch:s.func.isRequired,onSearch:s.func.isRequired,onCloudArchiveFetch:s.func.isRequired,onCloudArchiveSearch:s.func.isRequired,pageSize:s.number};A.defaultProps={categoryId:void 0,searchPhrase:void 0,pageSize:50};const E=a=>{const{categoryId:r,searchPhrase:e,onFetch:o,onSearch:l,pageSize:d,...c}=a,[h,m,u]=w((g,j,R)=>e?l(e,j,g,R):o(r,j,g,R),0,d),S=h===n.Loading,y=h===n.Terminated,f=h===n.Error,i=h===n.Reloading,F=h===n.Idle;return C.useEffect(()=>{const g=new AbortController;return u(!0,g.signal),()=>{g.abort()}},[r,e,d]),t.jsx(D,{list:(m==null?void 0:m.map(g=>B(g)))||[],hasFilter:!!e,showSiteCategoryList:y||F||S,showProgress:S||i,showError:f,showMoreButton:!(y||i),disabledMoreButton:S,handleLoadMore:()=>{u(!1)},...c})};E.propTypes={categoryId:s.number,searchPhrase:s.string,onFetch:s.func.isRequired,onSearch:s.func.isRequired,pageSize:s.number};E.defaultProps={categoryId:void 0,searchPhrase:void 0,pageSize:50};const z=({includeCloudArchive:a,...r})=>{const e=a?A:E;return t.jsx(e,{...r})};z.propTypes={includeCloudArchive:s.bool.isRequired};const de=()=>({loader:{height:150}}),he=(a,r,e)=>r===0?`${e}/sites`:`${e}/sites/category/${a.id}`,T=a=>{const r=a.match(/\/category\/([^/]+)/);return r?r[1]:null};class V extends C.PureComponent{constructor(e){super(e);x(this,"state",{categoryId:void 0,rootCategory:null,filteredSites:null,filterValue:"",isFiltering:!1});x(this,"updateCategoryFromLocation",e=>{this.setState({categoryId:T(e.pathname)})});x(this,"handleFilterChange",(e,o)=>{this.props.setRouteState({filterValue:o}),o?this.setState(({rootCategory:l})=>({filteredSites:{...l,children:e},filterValue:o,isFiltering:!1})):this.setState(()=>({filteredSites:null,filterValue:"",isFiltering:!1}))});x(this,"drawNoSites",()=>t.jsxs(C.Fragment,{children:[t.jsx(M,{children:t.jsx("title",{children:"No Sites Available | Envysion"})}),t.jsx(O,{title:"Sites"}),t.jsx(L,{sx:{mt:"5vh",justifyContent:"center"},children:t.jsxs(Y,{sx:e=>({p:"4vh",mx:"auto",width:e.spacing(45)}),children:[t.jsx(P,{variant:"h5",gutterBottom:!0,sx:{textAlign:"center"},children:"No Sites Available"}),t.jsx(P,{gutterBottom:!0,variant:"body2",children:"You do not have permission to access any sites. If this is in error, please contact your Envysion administrator."}),t.jsx(P,{gutterBottom:!0,variant:"body2",children:"If you continue having problems, please call the Envysion Help Desk at 877-258-9441."})]})})]}));x(this,"resetSearch",e=>{const{setCurrentSite:o,setRouteState:l}=this.props;e&&o({currentSite:e.id}),this.setState(()=>({filterValue:"",filteredSites:null})),l({filterValue:""})});x(this,"getSitesCategoriesList",e=>{const{currentUser:o}=this.props,{categoryId:l,rootCategory:d}=this.state,c=parseInt(l||d.id,10);return t.jsx(z,{pageSize:50,categoryId:c,searchPhrase:e,onCategoryClick:h=>this.resetSearch(h),onFetch:G,onSearch:Q,includeCloudArchive:N(o,X)||N(o,Z),onCloudArchiveFetch:J,onCloudArchiveSearch:K,disableSiteDetails:ee()})});this.stopListeningToHistory=this.props.history.listen(this.updateCategoryFromLocation),this.state={filterValue:this.props.filterValue}}static getDerivedStateFromProps(e){return{categoryId:T(e.location.pathname),rootCategory:e.rootCategory}}componentWillUnmount(){this.stopListeningToHistory()}render(){const{classes:e,siteSearchList:o}=this.props,{categoryId:l,filterValue:d,rootCategory:c,filteredSites:h,isFiltering:m,isFilterValueValid:u=!0}=this.state,S=ne();if(!c.numSites)return this.drawNoSites();if(c.numSites===1)return t.jsx(te,{to:`${S}/sites/${c.children[0].id}`});const y=h||se(c,l),f=t.jsxs(C.Fragment,{children:[t.jsxs(b,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},children:[t.jsx(b,{item:!0,xs:12,md:6,children:t.jsx(ce,{hierarchy:c,node:{name:y.name,id:y.id},maxNodes:4,link:(i,F)=>he(i,F,S),onClick:this.resetSearch,"data-cy":"site-breadcrumb"})}),t.jsx(b,{item:!0,xs:12,md:4,sx:i=>({height:i.spacing(8)}),children:t.jsx(re,{sx:i=>({float:"right",pt:1,m:0,minWidth:300,[i.breakpoints.down("md")]:{width:1}}),onFilter:i=>{i?this.setState({...i.length!==1&&{filterValue:i},filteredSites:c,isFilterValueValid:i.length!==1}):this.setState({filteredSites:null,isFilterValueValid:!0,filterValue:""})},filterValue:d,error:!u,helperText:u?null:"Please enter at least 2 characters",isDebounced:!0,"data-cy":"site-list-filter",variant:"outlined",size:"small",autoFocus:!0})})]}),t.jsx(L,{sx:{display:"flex"},children:t.jsx(L,{sx:{flex:"auto",width:"100%",pt:0},children:t.jsx(ae,{sx:{width:"100%"},children:m&&o.length>500?t.jsx(ie,{classes:{root:e.loader}}):this.getSitesCategoriesList(d)})})})]});return t.jsxs(C.Fragment,{children:[t.jsx(M,{children:t.jsxs("title",{children:["Sites | ",y.name," | Envysion"]})}),t.jsxs(C.Fragment,{children:[t.jsx(le,{}),t.jsx(b,{container:!0,"data-cy":"sites-list",children:t.jsx(b,{item:!0,xs:12,children:f})})]})]})}}V.propTypes={rootCategory:oe.isRequired,loginMessage:s.arrayOf(s.shape({message:s.string.isRequired})),history:s.shape({listen:s.func}
1).isRequired,filterValue:s.string,setRouteState:s.func.isRequired,siteSearchList:s.arrayOf(s.shape({})).isRequired,classes:s.shape({}).isRequired};V.defaultProps={loginMessage:[],filterValue:""};const ye=W(de)($(_(V)));export{ye as default};
2//# sourceMappingURL=index-a9d8b7a8.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.