PageSourceSearch

https://www.univacity.com/chunk-5AL3UP33.js

js univacity.com collected 2026-10-02 20:16:47 UTC 3,167 bytes, 1 lines download raw bytes

1import{Y as f}from"./chunk-EQIWCYQC.js";import{R as n,h as i,k as d,p as v}from"./chunk-LQTFT3Z4.js";import{_ as h,da as c,r as l}from"./chunk-LD77J3V7.js";import{a,b as u}from"./chunk-GM3FZBKO.js";var P=class g{baseUrl;http=c(d);authService=c(f);constructor(){let e=c(v);this.baseUrl=e.apiMainUrl+"/tour"}findMinimal(e={}){let t=a({},e);(!t.sort||t.sort?.includes("recommended"))&&(t.sort=["views, -1","excerpt, 1","commission.amount, -1","description, -1","name, -1","price.STD, 1"],t.search&&(t.sort=void 0));let r=this.authService.user();this.authService.isInstitute()&&r?.organisation&&(t.organisation=[r.organisation]);let o=new i({fromObject:n.removeEmptyProperties(u(a({},t),{select:["name","coverPhoto","status","organisation","pricing","sales","languages","currency","commission","address","excerpt","sessions"],populate:["organisation.name","organisation.isPartner","organisation.logo","organisation.address.country","organisation.slug"]}))});return this.http.get(this.baseUrl,{params:o})}find(e={}){let t=this.authService.user();this.authService.isInstitute()&&t?.organisation&&(e.organisation=[t.organisation]);let r=new i({fromObject:n.removeEmptyProperties(e)});return this.http.get(this.baseUrl,{params:r})}count(e={}){let t=new i({fromObject:n.removeEmptyProperties(e)});return this.http.get(`${this.baseUrl}/count`,{params:t})}filter(e,t={}){let r=new i({fromObject:n.removeEmptyProperties(u(a({},t),{filter:e}))});return this.http.get(`${this.baseUrl}/filter`,{params:r})}range(e,t={}){let r=new i({fromObject:n.removeEmptyProperties(u(a({},t),{key:e}))});return this.http.get(`${this.baseUrl}/range`,{params:r})}findOne(e,t){let r=typeof e=="string"?e:e._id,o=a({},t),s=new i({fromObject:o});return this.http.get(`${this.baseUrl}/${r}`,{params:s})}findOneForDetailPage(e,t={}){let r=["organisation._id","organisation.name","organisation.slug","organisation.logo","organisation.excerpt","organisation.isPartner","organisation.address.country","organisation.contact.website"];return this.findOne(e,a({populate:r},t))}create(e){return this.http.post(this.baseUrl,e)}delete(e){let t=this.authService.user()?.organisation,r=new i({fromObject:n.removeEmptyProperties({organisation:t})});return this.http.delete(`${this.baseUrl}/${e}`,{params:r})}update(e,t){return this.http.patch(`${this.baseUrl}/${e}`,t)}autoComplete=(e,t,r={})=>{let o=n.removeEmptyProperties(u(a({},r),{search:e,page:t,select:["name"]}));return this.http.get(this.baseUrl,{params:o}).pipe(l(s=>({options:s.docs.map(p=>({label:p.name,value:p._id})),nextPage:s.nextPage})))};filterAutoComplete=e=>(t,r,o={})=>{let s=n.removeEmptyProperties({search:t,page:r});return this.filter(e,s).pipe(l(m=>({options:[...new Set(m.docs)].map(b=>({label:b.value,count:b.count,value:b.value})),nextPage:m.nextPage})))};nameAutoComplete=(e,t,r={})=>{let o=n.removeEmptyProperties(u(a({},r),{search:e,page:t,select:["name"]}));return this.http.get(this.baseUrl+"/autocomplete",{params:o}).pipe(l(s=>({options:s.docs.map(p=>({label:p,value:p})),nextPage:s.nextPage})))};static \u0275fac=function(t){return new(t||g)};static \u0275prov=h({token:g,factory:g.\u0275fac,providedIn:"root"})};export{P as a};

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.