PageSourceSearch

https://campertunity.com/chunk-HE6EVW4W.js

js campertunity.com collected 2026-10-03 22:54:28 UTC 12,659 bytes, 1 lines download raw bytes

1import{a as ae}from"./chunk-SM37FEV5.js";import{a as re}from"./chunk-NUYCBMYV.js";import{a as de}from"./chunk-43BFRUMA.js";import{a as oe}from"./chunk-4LHJ4GDP.js";import{a as ie}from"./chunk-KD3U3I5I.js";import{a as ne}from"./chunk-JFBNO63N.js";import{N as P,S as $,T as ee,Y as w,f as Y,g as Z,vb as te}from"./chunk-KUO5X3JT.js";import{a as X}from"./chunk-JWIE767S.js";import{a as J,d as K,e as Q}from"./chunk-WPBLXIKM.js";import{M as R,N as A,O as q,R as G,U as H,aa as W,z as V}from"./chunk-GSIVSSTW.js";import{d as z,g as j}from"./chunk-O6CGIT4T.js";import{A as T,Bc as m,Cc as _,Dc as x,Ob as s,Qb as c,Rc as O,Sc as F,Tc as E,Vb as l,Wb as o,Xb as r,Yb as u,_c as B,a as D,dd as U,eb as i,fa as f,fc as I,id as b,kc as v,la as S,ld as L,ma as y,mc as p,md as h,ub as N,xa as C,xc as k,za as M}from"./chunk-KMSAVGVC.js";var se=t=>({"hidden-md-up":t}),ce=()=>({"padding-left":"16px","padding-right":"16px"}),me=(t,d)=>[t,d,!1,2,!0],pe=(t,d)=>({color:t,background:d}),le=t=>({color:t});function ge(t,d){if(t&1&&(o(0,"div",15)(1,"span",16),m(2),r()()),t&2){let e=p();k("background",e.campground().submittedForReview===1?"#e37e40":"#888"),i(2),x(" ",e.campground().submittedForReview===1?"Pending Campertunity's review":"Draft"," ")}}function ue(t,d){if(t&1&&(o(0,"div",18)(1,"span",16),m(2),r()()),t&2){let e=p(2);k("background",e.campground().submittedForReview===1?"#e37e40":"#888"),i(2),x(" ",e.campground().submittedForReview===1?"Pending Campertunity's review":"Draft"," ")}}function fe(t,d){if(t&1&&(o(0,"ion-col",6),u(1,"app-lazy-load-image",3),s(2,ue,3,3,"div",17),r()),t&2){let e=p();i(),l("isNew",e.isNew())("thumbnailImg",e.getThumbnailPhoto(e.campground()))("radius",!0)("mainImg",e.getFirstImage(e.campground())),i(),c(e.campground().published===0?2:-1)}}function Ce(t,d){if(t&1&&(m(0," Starting at "),o(1,"span",22),m(2),B(3,"campertunityCurrency"),r(),m(4," / night ")),t&2){let e=p(2);i(2),_(U(3,1,E(7,me,e.campground().startingAt,e.campground().country)))}}function he(t,d){t&1&&(o(0,"span",19),m(1,"Price not set"),r())}function ve(t,d){if(t&1&&(u(0,"app-ratings",23),o(1,"span",24),m(2),r()),t&2){let e=p(2);l("rating",e.campground().averageRating??void 0),i(2),_(e.campground().reviewsCount)}}function _e(t,d){t&1&&(o(0,"span",21),m(1,"No reviews yet"),r())}function xe(t,d){if(t&1&&(o(0,"div"),s(1,Ce,5,10)(2,he,2,0,"span",19),o(3,"span",20),s(4,ve,3,2)(5,_e,2,0,"span",21),r()()),t&2){let e=p();i(),c(e.campground().startingAt!==null?1:2),i(3),c(e.campground().reviewsCount>0?4:5)}}function be(t,d){t&1&&(o(0,"p",10),m(1," Government Parks Campsite "),r())}function we(t,d){t&1&&u(0,"app-spinner")}function Se(t,d){if(t&1){let e=I();o(0,"div",25),v("click",function(n){S(e);let g=p();return y(g.onSelectBooking(n))}),o(1,"div",26)(2,"span",27),m(3),r()(),o(4,"span",28),m(5),r(),s(6,we,1,0,"app-spinner"),r()}if(t&2){let e=p();i(),l("ngStyle",E(5,pe,e.bookings().length>0?"#e02828":null,e.bookings().length>0?"#fbc5c56e":null)),i(2),_(e.bookings().length),i(),l("ngStyle",F(8,le,e.bookings().length>0?"#e02828":null)),i(),x(" Pending booking request",e.bookings().length>1?"s":""," "),i(),c(e.isLoadingUnconfirmedBookings()?6:-1)}}function ye(t,d){t&1&&(o(0,"span"),m(1,"s"),r())}function Ie(t,d){if(t&1&&(o(0,"div",12)(1,"span",29),m(2),s(3,ye,2,0,"span"),r()()),t&2){let e=p();i(2),x(" Total: ",e.campground().sites.length," site "),i(),c(e.campground().sites.length>1?3:-1)}}function ke(t,d){t&1&&(o(0,"div")(1,"app-button",30),m(2," Edit listing "),r()()),t&2&&(i(),k("margin-top","8px")("width","100%"))}function Pe(t,d){if(t&1){let e=I();o(0,"span",32),v("click",function(n){S(e);let g=p(2);return y(g.addCampgroundFavorite(n))}),u(1,"app-icon",33),r()}}function Me(t,d){if(t&1){let e=I();o(0,"span",32),v("click",function(n){S(e);let g=p(2);return y(g.deleteCamgroundFavorite(n))}),u(1,"app-icon",34),r()}}function Fe(t,d){if(t&1&&(o(0,"div",13),s(1,Pe,2,0,"span",31),s(2,Me,2,0,"span",31),r()),t&2){let e=p();i(),c(e.isFavorite()?-1:1),i(),c(e.isFavorite()?2:-1)}}function Ee(t,d){t&1&&(o(0,"div",14)(1,"span",35),u(2,"app-icon",36),r()())}var $e=(()=>{class t{campground=h();sidePhoto=h(!1);showExtended=h(!1);showUnconfirmedBookingsCount=h(!1);isFavoriteItem=h(!1);emitEventSelect=L();screenSizeService=f(Z);bookingService=f(ae);favoriteService=f(de);userService=f(te);navCtrl=f(V);errorImage=ne;offset=100;bookings=C([]);isLoadingUnconfirmedBookings=C(!1);
1finishedLoadingImg=C(!1);finishedLoadingSideImg=C(!1);isFavorite=C(!1);user=this.userService.userSignal;isLogin=this.userService.isLoggedInSignal;isShost=b(()=>!!this.campground()?.owner?.shost);isNew=b(()=>{let e=this.campground();return e?this.checkNewStatus(e):!1});image=b(()=>{let e=this.campground();return $(w.hasPhoto(e)?e.photos[0]:"")});defaultImage=b(()=>{let e=this.campground();return ee(w.hasPhoto(e)?e.photos[0]:"")});getThumbnailPhoto=w.getThumbnailPhoto;getFirstImage=w.getFirstImage;favorites=Y(this.favoriteService.favorites$.pipe(T(e=>!!e)),{initialValue:[]});subscriptions=new D;constructor(){M(()=>{let e=this.favorites(),a=this.campground();if(e&&a){let n=e.some(g=>String(g.campgroundId)===String(a.id));this.isFavorite.set(n)}}),M(()=>{this.showUnconfirmedBookingsCount()&&this.campground()&&this.loadUnconfirmedBookings()})}ngOnInit(){}checkNewStatus(e){let a=typeof e.createdDate=="string"?P.parseISO(e.createdDate):e.createdDate,n=P.addWeeks(a,2);return P.isAfter(n,new Date)||n.getTime()===new Date().getTime()}loadUnconfirmedBookings(){let e=this.campground();e&&(this.isLoadingUnconfirmedBookings.set(!0),this.subscriptions.add(this.bookingService.loadCampgroundBookings(e.id,{statuses:[1]}).subscribe(a=>{this.bookings.set(a),this.isLoadingUnconfirmedBookings.set(!1)},a=>{this.isLoadingUnconfirmedBookings.set(!1)})))}imgState(e){e.reason==="finally"&&this.finishedLoadingImg.set(!0)}imgSideState(e){e.reason==="finally"&&this.finishedLoadingSideImg.set(!0)}ngOnDestroy(){this.subscriptions.unsubscribe()}addCampgroundFavorite(e){e.stopPropagation(),e.preventDefault();let a=this.campground(),n=this.user();!a||!n||this.subscriptions.add(this.favoriteService.createFavorite(a.id,a.name,n.id).subscribe(()=>this.isFavorite.set(!0),()=>this.isFavorite.set(!1)))}deleteCamgroundFavorite(e){e.stopPropagation(),e.preventDefault();let a=this.campground(),n=this.user();!a||!n||this.subscriptions.add(this.favoriteService.deleteFavorite(a.id,n.id).subscribe(()=>this.isFavorite.set(!1),()=>this.isFavorite.set(!0)))}onSelectCampground(){this.emitEventSelect.emit()}onSelectBooking(e){e.stopPropagation();let a=this.campground();a&&this.navCtrl.navigateForward(X.hostBookings,{queryParams:{campgroundId:a.id}})}static \u0275fac=function(a){return new(a||t)};static \u0275cmp=N({type:t,selectors:[["app-campground-item"]],inputs:{campground:[1,"campground"],sidePhoto:[1,"sidePhoto"],showExtended:[1,"showExtended"],showUnconfirmedBookingsCount:[1,"showUnconfirmedBookingsCount"],isFavoriteItem:[1,"isFavoriteItem"]},outputs:{emitEventSelect:"emitEventSelect"},decls:18,vars:19,consts:[[2,"border-radius","16px","box-shadow","unset","border","1px solid #d3d3d378",3,"click"],[1,"grid-view-container","ion-no-padding"],[2,"padding","6px","position","relative",3,"ngClass"],[3,"isNew","thumbnailImg","radius","mainImg"],[2,"position","absolute","bottom","25%","height","50px","width","calc(100% - 12px)","color","white","display","flex","justify-content","center","align-items","center",3,"background"],[2,"padding","6px",3,"ngClass"],["size","5",1,"hidden-sm-down",2,"position","relative"],[2,"display","grid","align-content","space-evenly",3,"ngStyle"],[2,"padding","0px 6px 6px 6px"],[2,"padding","6px","white-space","nowrap","font-size","16px"],[2,"opacity","0.8","font-style","italic"],[2,"display","flex","margin-top","8px","padding-bottom","8px","padding-top","8px","align-items","center","border-bottom","1px solid #dfdfdf","border-top","1px solid #dfdfdf"],[2,"margin-top","8px","height","50px","background","#e1fbfc","border-radius","16px","display","flex","align-items","center"],[1,"icon-favorite","icon-favorite-item"],[1,"icon-shost"],[2,"position","absolute","bottom","25%","height","50px","width","calc(100% - 12px)","color","white","display","flex","justify-content","center","align-items","center"],[2,"font-size","14px"],[2,"position","absolute","bottom","25%","height","50px","width","100%","color","white","display","flex","justify-content","center","align-items","center",3,"background"],[2,"position","absolute","bottom","25%","height","50px","width","100%","color","white","display","flex","justify-content","center","align-items","center"],[2,"color","var(--ion-color-medium)"],[1,"rating-row"],[1,"n
1o-reviews"],[2,"font-weight","bold"],[3,"rating"],[1,"rating-count"],[2,"display","flex","margin-top","8px","padding-bottom","8px","padding-top","8px","align-items","center","border-bottom","1px solid #dfdfdf","border-top","1px solid #dfdfdf",3,"click"],[2,"width","42px","height","42px","margin-right","16px","border-radius","16px","display","flex","align-items","center","justify-content","center",3,"ngStyle"],[2,"font-size","18px"],[3,"ngStyle"],[2,"color","#2a8a8e","font-weight","500","margin-left","16px"],["borderRadius","16px","buttonHeight","50px"],[1,"btn-favorite-item"],[1,"btn-favorite-item",3,"click"],["name","heart-outline",1,"item-not-favorite","btn-icon-favorite-item"],["name","heart",1,"item-favorite","btn-icon-favorite-item"],["title","Stellarhost"],["name","star"]],template:function(a,n){a&1&&(o(0,"ion-card",0),v("click",function(){return n.onSelectCampground()}),o(1,"ion-grid",1)(2,"ion-row",2),u(3,"app-lazy-load-image",3),s(4,ge,3,3,"div",4),r(),o(5,"ion-row",5),s(6,fe,3,5,"ion-col",6),o(7,"ion-col",7)(8,"ion-card-header",8),m(9),r(),o(10,"ion-card-content",9),s(11,xe,6,2,"div")(12,be,2,0,"p",10),s(13,Se,7,10,"div",11),s(14,Ie,4,2,"div",12),r(),s(15,ke,3,4,"div"),r()(),s(16,Fe,3,2,"div",13),s(17,Ee,3,0,"div",14),r()()),a&2&&(i(2),l("ngClass",F(16,se,n.sidePhoto())),i(),l("isNew",n.isNew()&&!n.campground().externalSource)("thumbnailImg",n.getThumbnailPhoto(n.campground()))("radius",!0)("mainImg",n.getFirstImage(n.campground())),i(),c(n.campground().published===0?4:-1),i(),l("ngClass",n.isNew()?"wrapper":""),i(),c(n.sidePhoto()?6:-1),i(),l("ngStyle",n.sidePhoto()&&!n.screenSizeService.isMobile()?O(18,ce):null),i(2),_(n.campground().name),i(2),c(n.campground().externalSource?12:11),i(2),c(n.showUnconfirmedBookingsCount()?13:-1),i(),c(n.showExtended()?14:-1),i(),c(n.showExtended()&&n.showUnconfirmedBookingsCount()?15:-1),i(),c(n.isLogin()&&n.isFavoriteItem()&&!n.campground().externalSource?16:-1),i(),c(n.isShost()?17:-1))},dependencies:[J,R,A,q,G,H,K,W,Q,z,ie,j,re,oe],styles:[".campertunity-campground-item[_ngcontent-%COMP%]{box-shadow:none;cursor:pointer}.campertunity-campground-item[_ngcontent-%COMP%]   .card-header-md[_ngcontent-%COMP%]{padding:8px 0;font-weight:700}.campertunity-campground-item[_ngcontent-%COMP%]   .card-content-md[_ngcontent-%COMP%]{padding:0}ion-card-header[_ngcontent-%COMP%]{font-weight:700;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.campertunity-thumbnail[_ngcontent-%COMP%]{min-height:100px;background:#e8e8e8}img.campertunity-thumbnail[_ngcontent-%COMP%]:hover{opacity:.5!important}.campertunity-item-description[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.loading-photo-spinner[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.icon-shost[_ngcontent-%COMP%]{position:absolute;top:10px;left:10px;background:#0000003a;width:32px;height:32px;text-align:center;border-radius:50%;display:flex;align-items:center;justify-content:center}.icon-shost[_ngcontent-%COMP%]   ion-icon[_ngcontent-%COMP%]{pointer-events:none;padding-bottom:2px;font-size:20px;color:#ffd200}.icon-favorite-item[_ngcontent-%COMP%]{position:absolute;top:10px;right:10px;background:#0000003a;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center}.btn-favorite-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%;cursor:pointer}.btn-icon-favorite-item[_ngcontent-%COMP%]{font-size:20px}.grid-view-container[_ngcontent-%COMP%]{cursor:pointer}@media screen and (max-width:768px){.grid-view-container[_ngcontent-%COMP%]{position:relative}}.rating-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin-top:4px;width:100%}.rating-count[_ngcontent-%COMP%]{font-size:14px;color:var(--ion-color-medium);line-height:1}.no-reviews[_ngcontent-%COMP%]{font-size:14px;color:var(--ion-color-medium)}"],changeDetection:0})}return t})();export{$e 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.