1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2673],{334:(e,t,r)=>{r.d(t,{N:()=>a});let a={LOCATION_ADMIN:"LOCATION_ADMIN",CC_LOCATION_ADMIN:"CC_LOCATION_ADMIN",MENDIX_LOCATION_ADMIN:"MENDIX_LOCATION_ADMIN",MODERATOR:"MODERATOR",MODERATOR_CHIEF:"MODERATOR_CHIEF",CUSTOMER_SERVICE:"CUSTOMER_SERVICE"}},10103:(e,t,r)=>{r.d(t,{j:()=>s});var a=r(20861),n=r(50742),o=r(40459);let l={apiKey:o.env.NEXT_PUBLIC_FIREBASE_API_KEY||"AIzaSyDqfGmgBnqwofeIG8R0OXXtXKrvLeLjoi8",appId:o.env.NEXT_PUBLIC_FIREBASE_APP_ID||"1:532005957721:android:bc50b41df8b8f7fe5e0148",authDomain:o.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN||"campercontact-d6505.firebaseapp.com",measurementId:o.env.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID||"G-3BTP3H96K4",messagingSenderId:o.env.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID||"532005957721",projectId:o.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID||"campercontact-d6505",storageBucket:o.env.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET||"campercontact-d6505.appspot.com"},i=(0,a.Wp)(l),s=(0,n.xI)(i)},15822:(e,t,r)=>{r.d(t,{O:()=>h,A:()=>p});var a=r(54568),n=r(7620),o=r(10103),l=r(50742),i=r(27273);let s={PRO:"pro",POI_CONTACT_DETAILS:"poi_contact_details",ALL_ROUTES:"all_routes",TRIP_PLANNER:"trip_planner"};class u extends Error{constructor(){super("User not logged in"),this.name="NotLoggedInError"}}var c=r(334);let d=(0,n.createContext)(void 0),p=()=>{let e=(0,n.useContext)(d);if(void 0===e)throw Error("Auth provider not found.");return e},h=e=>{let{children:t}
1=e,[r,p]=(0,n.useState)(!0),[h,m]=(0,n.useState)(null),[g,f]=(0,n.useState)(null),v=(0,n.useMemo)(()=>{if(!g)return[];try{var e;let t=(0,i.s)(g);return(null!=(e=null==t?void 0:t.roles)?e:[]).filter(e=>Object.values(c.N).includes(e))}catch(e){return console.error("Error decoding token for roles",e),[]}},[g]),y=(0,n.useMemo)(()=>{if(!g)return[];try{var e;let t=(0,i.s)(g);return(null!=(e=null==t?void 0:t.revenueCatEntitlements)?e:[]).filter(e=>Object.values(s).includes(e))}catch(e){return console.error("Error decoding token for entitlements",e),[]}},[g]),b=(0,n.useRef)([]),x=async()=>{await o.j.signOut().catch(e=>{console.error("Error signing out",e)}),await fetch("/api/auth/logout",{method:"POST"})};(0,n.useEffect)(()=>{let e=o.j.onAuthStateChanged(async e=>{if(e){let t=await e.getIdToken();m(e),f(t),fetch("/api/auth/session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:t})}),b.current.forEach(r=>r(e,t))}else m(null),f(null),b.current.forEach(e=>e(null,null));p(!1)});return()=>{e()}},[]),(0,n.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let t=await fetch("/api/auth/status",{signal:e.signal}),r=await t.json();r.customToken&&await (0,l.p)(o.j,r.customToken)}catch(e){e instanceof Error&&"AbortError"===e.name?console.log("Request was aborted"):console.error("Error checking auth status:",e)}})(),()=>{e.abort()}},[]);let w=(0,n.useCallback)(async()=>o.j.currentUser?o.j.currentUser.getIdToken():null,[]),E=(0,n.useCallback)(async()=>{let e=await w();if(!e)throw new u;return e},[w]),A=(0,n.useCallback)(e=>(b.current.push(e),e(h,g),()=>{b.current=b.current.filter(t=>t!==e)}),[h,g]);return(0,a.jsx)(d.Provider,{value:{loading:r,user:h,token:g||void 0,getToken:w,requireToken:E,isLoggedIn:!!g,onAuthChanged:A,roles:v,hasRole:e=>v.includes(e),entitlements:y,hasEntitlement:e=>y.includes(e),auth:o.j,logout:x},children:t})}},36103:(e,t,r)=>{r.d(t,{$C:()=>o,Es:()=>l});var a=r(7620),n=r(75326);function o(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=(0,a.useRef)();(0,a.useMemo)(()=>{o.current=t},r);let l=function(){let[,e]=(0,a.useReducer)(e=>e+1,0);return e}();e=function(e,t){let r=(0,a.useRef)(e);return r.current=(0,a.useCallback)(e,t),(0,a.useCallback)(function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return r.current&&r.current(...t)},[])}(e,[e]);let i=(0,a.useCallback)(function(){for(var t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];let i=(0,n.jM)(o.current,t=>e(t,...r));i!==o.current&&(o.current=i,l())},[]);return[o.current,i]}let l=a.useLayoutEffect},46804:(e,t,r)=>{r.d(t,{Eo:()=>n,Z2:()=>a,cJ:()=>o,it:()=>l});let a={IMAGE:"photo",VIDEO:"video"},n={YOUTUBE:"youtube",NATIVE:"native"},o={OWNER:"owner_generated",USER:"user_generated",COVER_PHOTO:"cover_photo",ABOUT_US:"about_us"};function l(e){let{mediaItems:t,mediaDisplayType:r,width:n,mediaType:o=a.IMAGE,videoType:l}=e;if(!t)return[];let i=t;return r&&(i=i.filter(e=>e.displayType===r&&e.type===o)),void 0!==l&&(i=i.filter(e=>e.videoType===l)),i.map(e=>{let t="".concat(e.url);return void 0!==n&&(t+="?width=".concat(n)),{uid:e.id,status:"done",url:t}})}},78324:(e,t,r)=>{r.d(t,{d:()=>n});var a=r(63916);function n(e){let t=Object.values(e);return a.k5(t)}},79291:(e,t,r)=>{r.d(t,{l:()=>o});var a=r(7620),n=r(87189);let o=e=>{let{accessToken:t,mediaDisplayType:r,urls:{request:o,success:l,failure:i,remove:s}}=e,u="Failed to upload file",c=(0,a.useCallback)(async e=>{let a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({contentType:e.type,contentLength:e.size,mediaDisplayType:r})});if(!a.ok)throw Error(a.statusText);return await a.json()},[o,t,r]),d=(0,a.useCallback)(async e=>{if(!(await fetch(l(e),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)}})).ok)throw Error(u)},[l,t]),p=(0,a.useCallback)(async e=>{if(!(await fetch(i(e),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)}})).ok)throw Error(u)},[i,t]),h=(0,a.useCallback)(async(e,t,r)=>{let a=Object.assign(new File([t],t.name,{type:t.type}),{uid:r});try{if(!(await fetch(e,{method:"PUT",headers:{"Content-Type":t.type,"Content-Length":t.size.toString()},body:t})).ok)throw Error("Upload failed");return await d(a.uid||""),a}catch(e){throw await p(a.uid||""),e}},[d,p]),m=(0,a.useCallback)(async e=>{if(!e)throw Error("File is required for upload");try{let{uploadUrl:t,mediaId:r}=await c(e);return{file:await h(t,e,r),mediaId:r}}catch(e){throw console.error("Upload error:",e),Error(u)}},[c,h]),g=(0,a.useCallback)(async(e,t)=>{let{concurrency:r=3,onFileProgress:a}=null!=t?t:{};return e.forEach((e,t)=>null==a?void 0:a(t,"pending")),(await (0,n.WS)(e,r,async(e,t)=>{null==a||a(t,"uploading");try{let r=await m(e);return null==a||a(t,"done"),{ok:!0,response:r}}catch(r){return null==a||a(t,"error"),{ok:!1,file:e,error:r instanceof Error?r:Error(u)}}})).reduce((e,t)=>
1(t.ok?e.succeeded.push(t.response):e.failed.push({file:t.file,error:t.error}),e),{succeeded:[],failed:[]})},[m]);return{upload:m,uploadMany:g,remove:(0,a.useCallback)(async(e,r,a)=>{try{if(!(await fetch(s(e),{method:"DELETE",headers:{Authorization:"Bearer ".concat(t),...r?{"Content-Type":"application/json"}:{}},...r?{body:JSON.stringify({reason:r,reasonMessage:a})}:{}})).ok)throw Error("Failed to delete file")}catch(e){throw console.error("Delete error:",e),Error("Failed to delete file")}},[t,s])}}},82673:(e,t,r)=>{r.d(t,{GU:()=>a.GU,d9:()=>q,RR:()=>V,iq:()=>h,r:()=>k,qb:()=>D,B9:()=>S,Qm:()=>T,Yj:()=>_,xp:()=>a.xp,mT:()=>a.mT,m3:()=>a.m3,rB:()=>a.rB,_A:()=>a._A,BS:()=>a.BS,OD:()=>a.OD,Yy:()=>a.Yy,jf:()=>a.jf,LD:()=>J,xo:()=>a.xo,si:()=>a.si,JV:()=>a.JV,bC:()=>C,s_:()=>c,zI:()=>el,gT:()=>U,iI:()=>j,ms:()=>$,IS:()=>ee,xc:()=>eo,I1:()=>ei,JS:()=>p,ON:()=>Y,hJ:()=>A,Vn:()=>a.Vn});var a=r(87189),n=r(33645),o=r(27455),l=r(74160),i=r(7620);let s=e=>({year:e.getFullYear(),month:e.getMonth()}),u=(e,t)=>{if("none"===e.phase)return t;let[r,a]=e.arrival.split("-");return{year:Number(r),month:Number(a)-1}};function c(e,t,r){let c=(0,i.useRef)(new Date),d=(0,i.useRef)(r);d.current=r;let[p,h]=(0,i.useState)(()=>null!=r?r:(0,a.qu)(c.current)),[m,g]=(0,i.useState)(()=>r?u(r,s(c.current)):s(c.current)),{data:f,isLoading:v,error:y}=function(e,t,r,a,i,s){let{locale:u}=(0,l.tz)(),{data:c,isLoading:d,error:p}=(0,o.A)(e&&t?["/v1/rentalUnits/calendar",e,t,r,a,i,s,u]:null,async()=>{let{data:o,error:l}=await (0,n.EOE)({path:{siteCode:e},query:{month:t,persons:r,babies:a,pets:i,hasSelectedStartDateOnPreviousMonth:s},headers:{"Accept-Language":u}});if(l||!o)throw Error("Error fetching availability calendar");let c={};for(let[e,t]of Object.entries(o.days))c[e]=t.map(e=>{var t,r,a,n;return{duration:e.duration,price:e.price,originalPrice:null!=(t=e.originalPrice)?t:null,type:null!=(r=e.type)?r:"REGULAR",rentalUnitSlug:null!=(a=e.rentalUnitSlug)?a:"",rentalUnitName:null!=(n=e.rentalUnitName)?n:""}});return{days:c,currency:"EUR"}});return{data:c,isLoading:d,error:p}}(e,"".concat(m.year,"-").concat(String(m.month+1).padStart(2,"0")),null==t?void 0:t.persons,null==t?void 0:t.babies,null==t?void 0:t.pets,(0,a.pT)(p,m)),[b,x]=(0,i.useState)(null),[w,E]=(0,i.useState)(!1),A=(0,i.useRef)(null),D=(0,i.useCallback)(e=>{A.current&&clearTimeout(A.current),x(null!=e?e:null),e&&(A.current=setTimeout(()=>x(null),3e3))},[]);(0,i.useEffect)(()=>()=>{A.current&&clearTimeout(A.current)},[]);let S=(0,i.useCallback)(e=>{var t;if(!f)return;let r=(0,a.iC)(f,p,e,c.current);t=r.selection,(p.phase!==t.phase||("arrival"===p.phase&&"arrival"===t.phase?p.arrival!==t.arrival:"range"===p.phase&&"range"===t.phase&&(p.arrival!==t.arrival||p.departure!==t.departure)))&&E(!0),h(r.selection),D(r.tooltip)},[f,p,D]),I=(0,i.useCallback)(()=>{D(void 0),g(e=>(0,a.xx)(e,-1))},[D]),k=(0,i.useCallback)(()=>{D(void 0),g(e=>(0,a.xx)(e,1))},[D]),N=(0,i.useCallback)((e,t)=>{D(void 0),g({year:e,month:t})},[D]),T=(0,i.useCallback)(()=>{c.current=new Date,E(!1),D(void 0);let e=d.current,t=s(c.current);h(null!=e?e:(0,a.qu)(c.current)),g(e?u(e,t):t)},[D]);return{now:c.current,data:f,isLoading:v,error:y,selection:p,month:m,tooltip:b,touched:w,canGoPrevious:!(0,a.yz)(m,c.current),canGoNext:!(0,a.Wr)(m,c.current),onDayPress:S,goToPreviousMonth:I,goToNextMonth:k,goToMonth:N,dismissTooltip:()=>D(void 0),reset:T}}var d=r(36103);let p=function(){let{ref:e,initialIsTruncated:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[r,a]=(0,i.useState)(t),[n,o]=(0,i.useState)(!1);return(0,d.Es)(()=>{if(!e)return;let{offsetHeight:t,scrollHeight:r}=e.current||{};a(!!(t&&r&&t<r))},[e]),{isTruncated:r,isShowingMore:n,toggleIsShowingMore:()=>o(e=>!e),setIsTruncated:a}},h={country:3,region:5,municipality:8,city:10};var m=r(91892),g=r.n(m),f=r(62617),v=r.n(f),y=r(45435),b=r.n(y);let x={content:["../ui-web/{icons,components}/**/*.{js,ts,jsx,tsx,mdx}","../../packages/@campercontact/ui-web/{icons,components}/**/*.{js,ts,jsx,tsx,mdx}","../domains-web/**/*.{js,ts,jsx,tsx,mdx}","../../packages/@campercontact/domains-web/**/*.{js,ts,jsx,tsx,mdx}","!../**/node_modules/**/*"],theme:{fontSize:{xs:["0.8125rem",{lineHeight:"1.25rem",fontWeight:"400"}],sm:["0.875rem",{lineHeight:"1.25rem",fontWeight:"400"}],base:["1rem",{lineHeight:"1.5rem",fontWeight:"400"}],lg:["1rem",{lineHeight:"1.5rem",fontWeight:"600"}],xl:["1.125rem",{lineHeight:"1.5rem",fontWeight:"500"}],"2xl":["1.25rem",{lineHeight:"1.5rem",fontWeight:"500"}],"3xl":["1.5rem",{lineHeight:"2rem",fontWeight:"500"}],"4xl":["1.75rem",{lineHeight:"2rem",fontWeight:"500",letterSpacing:"-0.0175rem"}],"5xl":["2rem",{lineHeight:"2.5rem",fontWeight:"500"}],"6xl":["2.25rem",{lineHeight:"2.5rem",fontWeight:"500"}],"7xl":["2.8125rem",{lineHeight:"3rem",fontWeight:"500"}],"8xl":["3.125rem",{lineHeight:"3.5rem",fontWeight:"500"}]},extend:{borderRadius:{button:"0.75rem","button-large":"1.125rem",card:"2rem","card-top":"2rem 2rem 0 0"},backgroundImage:{"big-pro-banner-curve":"url('/illustrations/big-pro-banner-curve.svg)"},container:{padding:"1rem",screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px"}},dropShadow:{claimed:"0px 5px 12px 0px rgba(12, 135, 70, 0.40)"},boxShadow:{bookingModule:"0px -53px 15px 0px rgba(0, 0, 0, 0.00), 0px -34px 13px 0px rgba(0, 0, 0, 0.00), 0px -19px 11px 0px rgba(0, 0, 0, 0.02), 0px -8px 8px 0px rgba(0, 0, 0, 0.03), 0px -2px 5px 0px rgba(0, 0, 0, 0.03)",card:"0px 17px 44px 0px rgba(13, 36, 38, 0.10)",cardHover:"0px 4px 20px 0px rgba(0, 0, 0, 0.16), 0px 1px 2px 0px rgba(0, 0, 0, 0.08)",pro:"0px 5px 12px 0px #ED612E66",dropdown:"0px 8px 32px 0px rgba(42, 39, 36, 0.08)",footer
1:"0px 4px 24px 0px rgba(16, 85, 45, 0.32)",navigation:"0px 8px 16px 0px rgba(42, 39, 36, 0.08)",cardElevated:"0px 12px 24px 0px rgba(42, 39, 36, 0.08)",floating:"0px 41px 103px 0px rgba(0, 0, 0, 0.03), 0px 18.956px 47.62px 0px rgba(0, 0, 0, 0.02), 0px 10.846px 27.247px 0px rgba(0, 0, 0, 0.02), 0px 6.583px 16.539px 0px rgba(0, 0, 0, 0.02), 0px 3.967px 9.965px 0px rgba(0, 0, 0, 0.01), 0px 2.209px 5.549px 0px rgba(0, 0, 0, 0.01), 0px 0.95px 2.387px 0px rgba(0, 0, 0, 0.01)",hover:"0px 39px 11px 0px rgba(23, 23, 23, 0.00), 0px 25px 10px 0px rgba(23, 23, 23, 0.02), 0px 14px 8px 0px rgba(23, 23, 23, 0.08), 0px 6px 6px 0px rgba(23, 23, 23, 0.13), 0px 2px 3px 0px rgba(23, 23, 23, 0.15)"},colors:{"base-black":"#000000","base-white":"#ffffff","brand-cc-button":"#ff6647","brand-cc-dark":"#2a2724","brand-cc-green":"#18a95d","brand-cc-green-a11y":"#0c8746","brand-cc-green-a11y-opacity05":"#0C87460D","brand-cc-green-a11y-opacity20":"#0c874633","brand-cc-orange":"#ed612e","brand-cc-pinegreen":"#244e52","brand-cc-steunkleur":"#84a3a5","cc-orange-60":"#ed612e","cc-orange-96":"#fdede8","cc-light-green":"#f1f8f2","cc-sand":"#faf7f5","cc-green-96":"#e9fcf2",neutral10:"#0d2426",neutral20:"#244e52",neutral30:"#326267",neutral40:"#537679",neutral50:"#74898b",neutral60:"#999999",neutral70:"#b2b2b2",neutral80:"#cccccc",neutral90:"#e5e5e5",neutral92:"#ebebeb",neutral94:"#f0f0f0",neutral96:"#f5f5f5",neutral98:"#fafafa","ui-headline":'theme("colors.neutral10")',"ui-icon-ui":'theme("colors.neutral10")',"ui-icon-primary-variant":'theme("colors.neutral40")',"ui-icon-disabled":'theme("colors.neutral70")',"ui-outline":'theme("colors.neutral92")',"ui-page-background":'theme("colors.base-white")',"ui-seperator":'theme("colors.neutral96")',"ui-text-link":'theme("colors.brand-cc-green-a11y")',"ui-text-primary":'theme("colors.neutral10")',"ui-text-secondary":'theme("colors.neutral40")',"ui-cta-on-primary":'theme("colors.base-white")',"ui-cta-primary":'theme("colors.brand-cc-green-a11y")',"ui-primary":'theme("colors.brand-cc-green-a11y")',"ui-purpose-claimed":'theme("colors.brand-cc-green-a11y")',"ui-purpose-pro":'theme("colors.brand-cc-orange")',"ui-purpose-rating":'theme("colors.brand-cc-green")',"ui-secondary-on-secondary":'theme("colors.neutral96")',"ui-secondary":'theme("colors.neutral20")',"ui-secondary-opacity30":"#0d24264d","ui-secondary-opacity80":"#0d2426cc","ui-semantic-green-positive":'theme("colors.ui-primary")',"ui-semantic-yellow-notice":"#f68524","ui-notice-surface":"#fefce6","ui-notice-outline":"#f2e1af","ui-notice-on-surface":'theme("colors.brand-cc-pinegreen")',"ui-semantic-red-negative":"#ea3829","ui-scrim":"#1c1a184d","ui-section-mobile":'theme("colors.base-white")',"ui-surface":'theme("colors.neutral98")',"ui-surface-container":'theme("colors.neutral96")',"ui-surface-container-high":'theme("colors.neutral94")',"ui-surface-container-highest":'theme("colors.neutral92")',"ui-surface-container-low":'theme("colors.neutral98")',"ui-tertiary-tertiary":'theme("colors.brand-cc-orange")',sidebar:{DEFAULT:"hsl(var(--sidebar-background))",foreground:"hsl(var(--sidebar-foreground))",primary:"hsl(var(--sidebar-primary))","primary-foreground":"hsl(var(--sidebar-primary-foreground))",accent:"hsl(var(--sidebar-accent))","accent-foreground":"hsl(var(--sidebar-accent-foreground))",border:"hsl(var(--sidebar-border))",ring:"hsl(var(--sidebar-ring))"}},fontFamily:{sans:"var(--font-radio-canada-big)",heading:"var(--font-radio-canada-big)"},keyframes:{"accordion-down":{from:{height:"0"},to:{height:"var(--radix-accordion-content-height)"}},"accordion-up":{from:{height:"var(--radix-accordion-content-height)"},to:{height:"0"}},"slide-up":{"0%":{transform:"translateY(100%)"},"100%":{transform:"translateY(0)"}}},animation:{"accordion-down":"accordion-down 0.2s ease-out","accordion-up":"accordion-up 0.2s ease-out","slide-up":"slide-up 0.1s ease"},containerQueries:{"@container":!0}}},plugins:[g(),v(),b(),e=>{let{addBase:t,theme:r,addVariant:a}=e;a("not-last","&:not(:last-of-type)"),t({"h1, h2, h3, h4, h5, h6":{fontFamily:r("fontFamily.heading"),fontWeight:"700"},body:{fontFamily:r("fontFamily.sans")}})}]};var w=r(18481);let{theme:{screens:E}}=r.n(w)()(x),A=e=>{let t="(min-width: ".concat(E[e],")"),[r,a]=(0,i.useState)(!1),n=e=>a(e.matches);return(0,i.useEffect)(()=>{let e=window.matchMedia(t);
1return a(e.matches),e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[t,e]),r},D=e=>{let{accommodationSlug:t}=e,r=Number(t);return Number.isInteger(r)&&r>0?r:null},S=e=>{let t=new Set;for(let r of null!=e?e:[]){let e=D(r);null!==e&&t.add(e)}return[...t].sort((e,t)=>e-t)},I={completed:{labelId:"booking.my.overview.cta.bookAgain",kind:"rebook"},cancelled_partner:{labelId:"booking.my.overview.cta.findAnother",kind:"findAnother"}},k=e=>{var t;let r=e.displayStatus&&null!=(t=I[e.displayStatus])?t:null;return(null==r?void 0:r.kind)==="rebook"&&null===D(e)?null:r},N={confirmed:{labelId:"booking.my.overview.status.confirmed",tone:"positive"},completed:{labelId:"booking.my.overview.status.completed",tone:"positive"},awaiting_confirmation:{labelId:"booking.my.overview.status.awaitingConfirmation",tone:"neutral"},expired:{labelId:"booking.my.overview.status.expired",tone:"negative"},declined:{labelId:"booking.my.overview.status.declined",tone:"negative"},cancelled_guest:{labelId:"booking.my.overview.status.cancelledByYou",tone:"negative"},cancelled_partner:{labelId:"booking.my.overview.status.cancelledByCampsite",tone:"negative"},cancelled_external:{labelId:"booking.my.overview.status.cancelled",tone:"negative"},no_show:{labelId:"booking.my.overview.status.noShow",tone:"negative"}},T=e=>e.displayStatus?N[e.displayStatus]:null,_=e=>{let{guests:t}=e;return{guests:t.adults+t.youths+t.children+t.babies,pets:t.pets}},C=e=>(0,i.useMemo)(()=>(e=>{if(!(null==e?void 0:e.length))return[];let t=[],r=[];for(let a of e)(a.isUpcoming?t:r).push(a);return[{key:"upcoming",data:t},{key:"previous",data:r}].filter(e=>e.data.length>0)})(e),[e]);var O=r(78227),R=r(15822);let U=e=>{let{isLoggedIn:t,token:r}=(0,R.A)(),{data:a,mutate:o,isLoading:l,error:i}=(0,O.Ay)(t?["/v1/locations",e,t,r]:null,async()=>{if(""===e)return;let{data:t,error:r}=await (0,n.BIb)({path:{sitecode:e}});if(r)throw Error("Error fetching location");return t}),s=async e=>{if(!a||!a.siteCode)return;let{data:t,error:r}=await (0,n.KTh)({body:e,path:{sitecode:null==a?void 0:a.siteCode}});if(r)throw r;return o(t,!1),t},u=async(t,r,l,i,s)=>{if(!a)return;let u={status:t,...t===n.iaf.DENIED?{rejectionReason:r,rejectionMessage:l}:{},...t===n.iaf.EXPIRED&&i?{removalReason:i,removalReasonMessage:s}:{}},{error:c}=await (0,n.T$B)({body:u,path:{sitecode:e}});if(c)throw Error("Error updating location status");return o({...a,status:t},!1),a},c=async e=>{if(!a||!a.siteCode)return;let{data:t,error:r}=await (0,n._9I)({body:e,path:{sitecode:null==a?void 0:a.siteCode}});if(r)throw Error("Error updating subscription");return o(t,!1),t};return{location:a,isLoading:l,error:i,updateLocation:s,updateStatus:u,updateSubscription:c,revalidate:e=>{a&&o({...a,...e},!1)}}};r(40459);var M=r(46804),P=r(79291),L=r(40459);let j=e=>{let{sitecode:t,id:r,mediaDisplayType:a}=e,{token:n}=(0,R.A)(),{location:o,revalidate:l}=U(t),i=L.env.NEXT_PUBLIC_API_URL_V2||"",s=a===M.cJ.USER?"photos":"media",{upload:u,uploadMany:c,remove:d}=(0,P.l)({accessToken:n||"",mediaDisplayType:a,urls:{request:"".concat(i,"v1/location/").concat(r,"/request-upload"),success:e=>"".concat(i,"v1/location/").concat(r,"/").concat(s,"/").concat(e,"/upload-success"),failure:e=>"".concat(i,"v1/location/").concat(r,"/").concat(s,"/").concat(e,"/upload-failed"),remove:e=>"".concat(i,"v1/location/").concat(r,"/").concat(s,"/").concat(e)}});return{upload:async e=>{var t;let r=await u(e),a={id:r.mediaId,url:window.URL.createObjectURL(r.file),type:M.Z2.VIDEO,displayType:M.cJ.ABOUT_US,order:0,videoType:M.Eo.NATIVE};return l({...o,media:[...null!=(t=null==o?void 0:o.media)?t:[],a]}),r},uploadMany:async(e,t)=>c(e,t),remove:async(e,t,r)=>{if(await d(e,t,r),!o)return;let a=o.photos.items.filter(t=>t.id!==e);l({media:o.media.filter(t=>t.id!==e),photos:{...o.photos,items:a,total:o.photos.total-(o.photos.items.length-a.length)}})}}};var B=r(39861);let Y=(e,t)=>{let[r,a]=(0,i.useState)(null!=e&&null!=t?{lat:e,lon:t}:null);(0,B.A)(()=>{if(null==e||null==t)return void a(null);a({lat:e,lon:t})},500,[e,t]);let{data:o,isLoading:l,error:s}=(0,O.Ay)(r?["/v1/locations/reverse-geocode",r.lat,r.lon]:null,async()=>{let{data:e,error:t}=await (0,n._Uw)({query:{lat:r.lat,lon:r.lon}});if(t||!e)throw Error("Failed to fetch reverse-geocode preview");return e},{keepPreviousData:!0});return{preview:o,isLoading:l,error:s}};r(40459),r(334),r(40459);var W=r(83631),F=r(72935),H=r(63916),G=r(78324);let q=20,z=e=>Number(e.replaceAll(",",".")),V={length:{labelKey:"profile.personalData.motorhome.length",min:2,max:18,unit:"m",decimals:2},height:{labelKey:"profile.personalData.motorhome.height",min:1.5,max:4.5,unit:"m",decimals:2},width:{labelKey:"profile.personalData.motorhome.width",min:1.5,max:3,unit:"m",decimals:2},weight:{labelKey:"profile.personalData.motorhome.weight",min:500,max:18e3,unit:"kg",decimals:0}},K=(e,t)=>{let{labelKey:r,min:a,max:n,unit:o,decimals:l}=e,i=l?new RegExp("^\\d+([.,]\\d{1,".concat(l,"})?$")):/^\d+$/,s=t(l?"profile.personalData.motorhome.dimension.error":"profile.personalData.motorhome.dimension.error.whole",{label:t(r),min:a,max:n,unit:o,decimals:l});return H.Yj().optional().refine(e=>!e||i.test(e)&&z(e)>=a&&z(e)<=n,{message:s})},X=e=>e?z(e):null,J=e=>({motorhomeBrand:e.brand,motorhomeModel:e.model,motorhomeType:e.type,motorhomeLicensePlate:e.licensePlate,motorhomeAssemblyYear:X(e.assemblyYear),motorhomeChassis:e.chassis,motorhomeCategory:e.category,motorhomePossession:e.possession,motorhomeLength:X(e.length),motorhomeHeight:X(e.he
1ight),motorhomeWidth:X(e.width),motorhomeWeight:X(e.weight)}),$=e=>{let{user:t,onSave:r,onError:a}=e,{formatMessage:o}=(0,l.tz)(),[s,u]=(0,i.useState)(!1),c=(e=>{var t,r,a,n,o,l;let i=null==e||null==(t=e.personalData)?void 0:t.motorhome;return{brand:(null==i?void 0:i.brand)||"",model:(null==i?void 0:i.model)||"",type:(null==i?void 0:i.type)||"",licensePlate:(null==i?void 0:i.licensePlate)||"",assemblyYear:(null==i||null==(r=i.assemblyYear)?void 0:r.toString())||"",chassis:(null==i?void 0:i.chassis)||"UNKNOWN",category:(null==i?void 0:i.category)||"UNKNOWN",possession:(null==i?void 0:i.possession)||"UNKNOWN",length:(null==i||null==(a=i.length)?void 0:a.toString())||"",height:(null==i||null==(n=i.height)?void 0:n.toString())||"",width:(null==i||null==(o=i.width)?void 0:o.toString())||"",weight:(null==i||null==(l=i.weight)?void 0:l.toString())||""}})(t),d=(0,i.useMemo)(()=>(e=>H.Ik({brand:H.Yj().optional(),model:H.Yj().optional(),type:H.Yj().optional(),licensePlate:H.Yj().max(q,{message:e("profile.personalData.motorhome.licensePlate.error",{max:q})}).optional(),assemblyYear:H.Yj().optional().refine(e=>!e||/^\d{4}$/.test(e)&&Number(e)<=new Date().getFullYear(),{message:e("profile.personalData.motorhome.assemblyYear.error")}),chassis:(0,G.d)(n.VH$),category:(0,G.d)(n.lqq),possession:(0,G.d)(n.dH6),length:K(V.length,e),height:K(V.height,e),width:K(V.width,e),weight:K(V.weight,e)}))(o),[o]),p=(0,W.mN)({resolver:(0,F.u)(d),defaultValues:c,values:c,resetOptions:{keepDirtyValues:!0}}),h=p.handleSubmit(async e=>{try{u(!0),r&&await r(e),p.reset(e)}catch(e){a&&a(e)}finally{u(!1)}});return{form:p,handleSubmit:h,isSaving:s,isDirty:p.formState.isDirty,canSubmit:p.formState.isDirty&&!s,canCancel:p.formState.isDirty}};var Z=r(68975);let Q=H.Ik({firstName:H.Yj().min(2,{message:"First name must be at least 2 characters."}).max(100,{message:"First name must be at most 100 characters."}).or(H.eu("")).optional(),lastName:H.Yj().min(2,{message:"Last name must be at least 2 characters."}).max(100,{message:"Last name must be at most 100 characters."}).or(H.eu("")).optional(),username:H.Yj().min(2,{message:"Username must be at least 2 characters."}).max(60,{message:"Username must be at max. 60 characters."}),gender:(0,G.d)(n.YT8).optional(),language:H.Yj().optional(),birthDate:H.p6().max(new Date,{message:"Birth date cannot be in the future."}).optional(),aboutMe:H.Yj().max(750,{message:"About me must be at most 750 characters."}).optional(),travelGroup:(0,G.d)(n.EJx).optional(),withPets:H.zM().optional(),camperSince:H.ai().int().min(1900,{message:"Year must be 1900 or later."}).max(new Date().getFullYear(),{message:"Year cannot be in the future."}).optional()}),ee=e=>{var t,r,a,n,o,l,s,u,c;let{user:d,onSave:p,onError:h}=e,[m,g]=(0,i.useState)(!1),f=(0,W.mN)({resolver:(0,F.u)(Q),defaultValues:{firstName:(null==d||null==(t=d.personalData)?void 0:t.firstName)||"",lastName:(null==d||null==(r=d.personalData)?void 0:r.lastName)||"",username:(null==d?void 0:d.username)||"",gender:(null==d||null==(a=d.personalData)?void 0:a.gender)||void 0,language:(null==d||null==(n=d.personalData)?void 0:n.language)||void 0,birthDate:(null==d||null==(o=d.personalData)?void 0:o.birthDate)?(0,Z.A)(d.personalData.birthDate,"yyyy-MM-dd",new Date):void 0,aboutMe:(null==d||null==(l=d.personalData)?void 0:l.aboutMe)||"",travelGroup:(null==d||null==(s=d.personalData)?void 0:s.travelGroup)||void 0,withPets:(null==d||null==(u=d.personalData)?void 0:u.withPets)||void 0,camperSince:(null==d||null==(c=d.personalData)?void 0:c.camperSince)||void 0}}),v=f.handleSubmit(async e=>{try{g(!0),p&&await p(e),f.reset(e)}catch(e){h&&h(e)}finally{g(!1)}});return{form:f,handleSubmit:v,isSaving:m,isDirty:f.formState.isDirty,canSubmit:f.formState.isDirty&&!m,canCancel:f.formState.isDirty}},et={request:"".concat("https://api.campercontact.com/","v1/me/request-upload"),success:e=>"".concat("https://api.campercontact.com/","v1/me/media/").concat(e,"/upload-success"),failure:e=>"".concat("https://api.campercontact.com/","v1/me/media/").concat(e,"/upload-failed"),remove:e=>"".concat("https://api.campercontact.com/","v1/me/media/").concat(e)},er=(e,t,r)=>((null==r?void 0:r.startsWith("blob:"))&&window.URL.revokeObjectURL(r),{url:window.URL.createObjectURL(e.file),id:e.mediaId,order:0,displayType:t,type:M.Z2.IMAGE}),ea=e=>{(null==e?void 0:e.startsWith("blob:"))&&window.URL.revokeObjectURL(e)},en={brand:"",model:"",type:"",chassis:n.VH$.UNKNOWN,category:n.lqq.UNKNOWN,possession:n.dH6.UNKNOWN},eo=()=>{let{isLoggedIn:e,token:t}=(0,R.A)(),{upload:r,remove:a}=(0,P.l)({accessToken:t||"",mediaDisplayType:"user_profile",urls:et}),{upload:l,remove:s}=(0,P.l)({accessToken:t||"",mediaDisplayType:"user_motorhome",urls:et}),u=e?["/v1/me",e,t]:null,{data:c,mutate:d,isLoading:p,error:h}=(0,o.A)(u,async()=>{let{data:e,error:r}=await (0,n.W_R)({headers:{Authorization:"Bearer ".concat(t)}});if(r)throw Error("Error fetching profile");return e}),m=(0,i.useMemo)(()=>{var t;return e?(null==c||null==(t=c.entitlements)?void 0:t.hasProEntitlement)?"pro":"free":"anonymous"},[c,e]),g=async function(){for(var e,t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];if(!c)return;let o=er(await r(...a),"user_profile",null==(e=c.personalData.profilePicture)?void 0:e.url);d(e=>e&&{...e,personalData:{...e.personalData,profilePicture:o}},!1)},f=async function(){for(var e,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];c&&(await a(...r),ea(null==(e=c.personalData.profilePicture)?void 0:e.url),d(e=>e&&{...e,personalData:{...e.personalData,profilePicture:void 0}},!1))},v=async function(){let e;for(var t,r=arguments.length,a=Array(r),n=0;n<r;n++)a[n]=arguments[n];if(!c)return;let o=null==(t=c.personalData.motorhome)?void 0:t.picture;try{e=await l(...a)}catch(e){throw await d(),ea(null==o?void 0:o.url),e}let i=er(e,"user_motorhome",null==o?void 0:o.url);d(e=>e&&{...e,personalData:{...e.personalData,motorhome:{...en,...e.personalData.motorhome,picture:i}}},!1)},y=async function(){for(var e,t=arguments.length,r=Array(t),a=0;a<t;a++)r[a]=arguments[a];(null==c?void 0:c.personalData.motorhome)&&(await s(...r),ea(null==(e=c.personalData.motorhome.picture)?void 0:e.url),d(e=>(null==e?void 0:e.personalData.motorhome)?{...e,personalData:{...e.personalData,motorhome:{...e.personalData.motorhome,picture:void 0}}}:e,!1))};return{profile:c,userStatus:m,updateProfilePicture:g,deleteProfilePicture:f,updateMotorhomePicture:v,deleteMotorhomePicture:y,updateProfile:async e=>{let{data:r,error:a}=await (0,n.IAB)({body:e,headers:{Authorization:"Bearer ".concat(t)}});if(a)throw Error("Error updating profile");return d(r,!1),r},updatePassword:async e=>{await (0,n.g39)({body:{password:e},headers:{Authorization:"Bearer ".concat(t)}})},isLoading:p,error:h}},el=()=>{var e,t;let{profile:r,isLoading:a,error:n}=eo();return{isPro:null!=(t=null==r||null==(e=r.entitlements)?void 0:e.hasProEntitlement)&&t,isLoading:a,error:n}},ei=e=>{let{isLoggedIn:t,token:r}=(0,R.A)(),{locale:a}=(0,l.tz)(),{data:i,isLoading:s,error:u}=(0,o.A)(t&&e?["/v1/users/{username}/contributions",e,r,a]:null,async()=>{let{data:t,error:o}=await (0,n.w4W)({path:{username:e||""},headers:{"Accept-Language":a,Authorization:"Bearer ".concat(r)}});if(o)throw Error("Error fetching contributions");return t});return{contributions:i,isLoading:s,error:u}};r(45824)},87189:(e,t,r)=>{r.d(t,{GU:()=>C,xp:()=>T,mT:()=>P,qu:()=>g,m3:()=>x,rB:()=>U,_A:()=>R,BS:()=>w,iC:()=>y,OD:()=>E,yz:()=>I,Wr:()=>k,pT:()=>f,Yy:()=>O,WS:()=>B,jf:()=>j,xo:()=>A,si:()=>M,JV:()=>_,xx:()=>N,Vn:()=>L});var a=r(77833),n=r(23113),o=r(3961),l=r(83664),i=r(5801),s=r(9679);let u=e=>(0,a.A)(e,"yyyy-MM-dd"),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return u(e)},d=(e,t)=>u((0,n.A)((0,o.A)(e),t)),p=(e,t)=>(0,l.A)((0,o.A)(t),(0,o.A)(e)),h=(e,t)=>{var r,a;return(null!=(a=null==(r=e.days[t])?void 0:r.length)?a:0)>0},m=(e,t,r)=>{let a=p(t,r);if(a<=0)return{kind:"noAvailability",nights:a};let n=e.days[t];
1if(!n||0===n.length)return{kind:"noAvailability",nights:a};let o=n.find(e=>e.duration===a);if(o)return{kind:"valid",nights:a,total:o.price,originalPrice:o.originalPrice,tripType:o.type,rentalUnitSlug:o.rentalUnitSlug,rentalUnitName:o.rentalUnitName};let l=n.map(e=>e.duration),i=Math.min(...l),s=Math.max(...l);return a<i?{kind:"tooShort",nights:a}:a>s?{kind:"tooLong",nights:a,maxNights:s}:{kind:"noAvailability",nights:a}},g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=c(e);return{phase:"range",arrival:t,departure:d(t,1)}},f=(e,t)=>{if("none"===e.phase)return!1;let[r,a]=e.arrival.split("-"),n=12*Number(r)+(Number(a)-1);return 12*t.year+t.month===n+1},v=(e,t)=>{let r=((e,t)=>{let r=e.days[t];return r&&0!==r.length?Math.min(...r.map(e=>e.duration)):1})(e,t),a={selection:{phase:"arrival",arrival:t}};return r>1&&(a.tooltip={type:"minStay",nights:r,anchorIso:t}),a},y=function(e,t,r){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Date;if(r<c(a))return{selection:t};let n=h(e,r);if("none"===t.phase)return n?v(e,r):{selection:t,tooltip:{type:"noAvailability",anchorIso:r}};if("arrival"===t.phase){let{arrival:a}=t;if(r===a)return{selection:{phase:"none"}};if(r<a)return n?v(e,r):{selection:t,tooltip:{type:"noAvailability",anchorIso:r}};let o=m(e,a,r);switch(o.kind){case"valid":return{selection:{phase:"range",arrival:a,departure:r}};case"tooLong":return{selection:t,tooltip:{type:"maxStay",nights:o.maxNights,anchorIso:r}};case"tooShort":return{selection:t};default:return{selection:t,tooltip:{type:"noAvailability",anchorIso:r}}}}return n?v(e,r):{selection:t,tooltip:{type:"noAvailability",anchorIso:r}}},b=(e,t)=>"range"===t.phase&&"valid"===m(e,t.arrival,t.departure).kind,x=function(e,t,r){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Date,n=(0,o.A)(r).getDate(),l=r<c(a),i=h(e,r),s={iso:r,dayOfMonth:n,isPast:l,available:i,selectable:!1,role:"none",rangeBookable:"arrival"===t.phase?h(e,t.arrival):b(e,t)};if("range"===t.phase?r===t.arrival?s.role="arrival":r===t.departure?s.role="departure":r>t.arrival&&r<t.departure&&(s.role="inRange"):"arrival"===t.phase&&r===t.arrival&&(s.role="arrival"),l)return s.disabledReason="past",s;if("arrival"===t.phase&&r>t.arrival){let a=m(e,t.arrival,r);switch(a.kind){case"valid":return{...s,selectable:!0,price:a.total};case"tooShort":return{...s,selectable:!1,disabledReason:"tooShort"};case"tooLong":return{...s,selectable:!1,disabledReason:"tooLong",tapTooltip:{type:"maxStay",nights:a.maxNights,anchorIso:r}};default:return{...s,selectable:!1,disabledReason:"noAvailability",tapTooltip:{type:"noAvailability",anchorIso:r}}}}if(!i)return{...s,selectable:!1,disabledReason:"noAvailability",tapTooltip:{type:"noAvailability",anchorIso:r}};if("arrival"!==t.phase&&"none"===s.role){let a=((e,t,r)=>{if("range"!==t.phase||!b(e,t))return!0;let{arrival:a,departure:n}=t;if(r>=a&&r<=n)return!0;if(r>n){for(let t=d(n,1);t<r;t=d(t,1))if(!h(e,t))return!1;return!0}for(let t=d(r,1);t<a;t=d(t,1))if(!h(e,t))return!1;return!0})(e,t,r)?((e,t)=>
1{let r=e.days[t];if(r&&0!==r.length)return Math.min(...r.map(e=>e.price))})(e,r):void 0;return{...s,selectable:!0,price:a}}return{...s,selectable:!0}},w=(e,t)=>{if("none"===t.phase)return{type:"selectArrival"};if("arrival"===t.phase)return{type:"selectDeparture"};let r=m(e,t.arrival,t.departure);return"valid"===r.kind?{type:"valid",nights:r.nights,total:r.total,originalPrice:r.originalPrice,tripType:r.tripType,rentalUnitName:r.rentalUnitName,rentalUnitSlug:r.rentalUnitSlug,arrival:t.arrival,departure:t.departure}:"tooShort"===r.kind?{type:"invalid",reason:"tooShort"}:{type:"invalid",reason:"noAvailability"}},E=(e,t)=>"valid"===w(e,t).type,A=(e,t)=>"invalid"===w(e,t).type,D=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return Array.from({length:18},(t,r)=>{let a=(0,i.A)(e,r);return{year:a.getFullYear(),month:a.getMonth()}})},S=e=>12*e.year+e.month,I=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;return S(e)<=S({year:t.getFullYear(),month:t.getMonth()})},k=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,r=D(t),a=r[r.length-1];return void 0!==a&&S(e)>=S(a)},N=(e,t)=>{let r=(0,i.A)(new Date(e.year,e.month,1),t);return{year:r.getFullYear(),month:r.getMonth()}},T=(e,t)=>{let r=new Date(e,t,1),a=((0,s.A)(r)+6)%7,o=(0,n.A)(r,-a),l=Array.from({length:42},(e,r)=>{let a=(0,n.A)(o,r);return{iso:u(a),dayOfMonth:a.getDate(),inCurrentMonth:a.getMonth()===t}}),i=e=>l.slice(e,e+7).some(e=>e.inCurrentMonth),c=0,d=l.length;return i(c)||(c+=7),i(d-7)||(d-=7),l.slice(c,d)},_=p,C={lightGreen:"#E6F2EB",grayEndpoint:"#E0E0E0",lightGray:"#EEEEEE"},O=e=>{let[t,r,a]=e.split("-");return new Date(Number(t),Number(r)-1,Number(a))},R=(e,t)=>{let{role:r,isPast:a,disabledReason:n,rangeBookable:o}=e,l="inRange"===r,i=o?"green":"gray",s=null;l?s={side:"full",tone:i}:"arrival"===r&&t?s={side:"right",tone:i}:"departure"===r&&(s={side:"left",tone:i});let u="none",c="normal",d=!1;return"arrival"===r||"departure"===r?(u=o?"green":"gray",c=o?"white":"disabled",d=!o):l?(c=o?"inRangeGreen":"disabled",d=!o):a||"noAvailability"===n?(c="disabled",d=!0):("tooShort"===n||"tooLong"===n)&&(c="disabled",d=!0),{marker:u,fill:s,numberTone:c,struck:d}},U=(e,t,r)=>e(t,r,2).replace(/(\S)\s+â¬/g,"$1â¬").replace(/â¬\s+(\S)/g,"â¬$1"),M=(e,t,r)=>{let a=U(e,t,r),n=a.match(/^(\D*\d+)[.,](\d{2})(\D*)$/);if(!n)return{main:a,cents:"",suffix:""};let[,o,l,i]=n;return{main:o,cents:l,suffix:i}},P=(e,t)=>{let{formatMessage:r,formatDate:a,formatCurrency:n,currency:o}=t;switch(e.type){case"selectArrival":return r("availabilityCalendar.status.selectArrival");case"selectDeparture":return r("availabilityCalendar.status.selectDeparture");case"invalid":default:return"";case"valid":{let t=O(e.arrival),l=O(e.departure),i={day:"numeric",month:"short"},s="".concat(a(t,i)," â ").concat(a(l,i)),u=r("availabilityCalendar.status.nights",{count:e.nights});return"".concat(u," \xb7 ").concat(s," \xb7 ").concat(U(n,e.total,o))}}},L=e=>Array.from({length:7},(t,r)=>e(new Date(2024,0,1+r),{weekday:"short"})),j=(e,t,r)=>r(new Date(e,t,1),{month:"long",year:"numeric"}),B=async(e,t,r)=>{let a=Math.max(1,Math.floor(t)),n=Array(e.length),o=0,l=null,i=async()=>{for(;;){if(null!==l)return;let t=o;if(t>=e.length)return;o+=1;let a=e[t];try{n[t]=await r(a,t)}catch(e){throw l=e,e}}},s=Math.min(a,e.length);return await Promise.all(Array.from({length:s},()=>i())),n}}}]);
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.