1import{n as e}from"./api-BwT6cO7F.js";import{$ as t}from"./constants-DbfXh5Va.js";import{t as n}from"./build-odata-filter-D2-YxYgg.js";var r=async(n,r)=>{let i=`${t}?scope=${encodeURIComponent(n)}&type=${encodeURIComponent(r.type)}`,a=await e(i).post(r);if(![200,201].includes(a.status))throw a;return a.id},i=async(n,r,i)=>{let a=`${t}/${n}?scope=${encodeURIComponent(r)}`,o=await e(a).patch(void 0,i);if(![200,201,204].includes(o.status))throw o},a=`Meeting Room`,o=a,s=[`name`,`description`,`buildingName`,`floorName`,`updatedBy`],c=[`name`,`description`,`buildingName`,`floorName`,`createdOn`,`lastUpdated`,`updatedBy`],l=e=>{if(!Array.isArray(e)||e.length===0)return{};let t=e[0];if(typeof t?.colId!=`string`||typeof t?.sort!=`string`)return{};let n=t.sort.toLowerCase();return n!==`asc`&&n!==`desc`?{}:t.colId===`active`?{sortBy:n===`asc`?`active`:`inactive`,sortDir:n}:c.includes(t.colId)?{sortBy:t.colId,sortDir:n}:{}},u=e=>{if(typeof e==`object`&&e&&`status`in e)return e.status},d=async({scope:r,page:i=1,filter:a,filterModel:c,sort:d,size:f=20,q:p,type:m=o,startDate:h,endDate:g,setUp:_,cleanDown:v,applyDefaultBuffers:y})=>{let b=t,x=a??n(c,{allowedFields:s}),{sortBy:S,sortDir:C}=l(d),w={scope:r,type:m,page:i,size:f};x&&(w.filter=x),S&&(w.sortBy=S),C&&(w.sortDir=C),p&&(w.q=p),h&&(w.startDate=h.toISOString()),g&&(w.endDate=g.toISOString()),typeof _==`number`&&Number.isFinite(_)&&_>=0&&(w.setUp=_),typeof v==`number`&&Number.isFinite(v)&&v>=0&&(w.cleanDown=v),y&&(w.applyDefaultBuffers=!0);let T;try{T=await e(b).get(w)}catch{throw Error(`Failed to fetch resources`)}if(u(T)!==200)throw Error(`Failed to fetch resources`);let E=Array.isArray(T)?T:T.data??[];return{data:E,total:Array.isArray(T)?T.length:T.total??E.length}},f=async(n,r)=>{let i=`${t}/${n}/type/${encodeURIComponent(o)}?scope=${encodeURIComponent(r)}`,a;try{a=await e(i).get()}catch{throw Error(`Failed to fetch resource`)}if(u(a)!==200)throw Error(`Failed to fetch resource ${n}`);if(Array.isArray(a))throw Error(`Invalid response while fetching resource ${n}`);return`data`in a&&a.data?a.data:a};export{i as a,f as i,r as n,d as r,a as t};
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.