1import{d as a,l as K,m as Q,r as o,A as X,j as t,p as L,z as U,D as H,S as ee,y as te,E as ie}from"./index-Cp46EeMd.js";import{c as ne,l as G,i as V,D as oe,a as re,d as se}from"./images-D0VLRMsS.js";import{d as ae,e as le,b as ce}from"./Sidebar-Bwoh2c-o.js";import{a as de,p as he}from"./dataMapping-D6khG6yw.js";const pe=a.div` 2 display: flex; 3 flex-direction: column; 4 justify-content: center; 5 align-items: center; 6 height: 100%; 7 width: 100%; 8 /* max-height: 660px; */ 9 10 11 //hide cards if iframe conatiner is less than in docs: 660px 12 @media (max-height: 600px) { 13 display: none; 14 } 15 16 @media (max-width: 1024px) { 17 /* max-height: 660px; */ 18 }; 19 20 @media (max-width: 600px) { 21 width: auto; 22 height: 100%; 23 max-height: 100%; 24 justify-content: center; 25 align-items: center; 26 overflow: hidden; 27 } 28 29`,xe=a.div` 30 position: relative; 31 display: ${({$isMobile:e,$isGridLayout:i})=>!e&&i?"grid":"inline-flex"}; 32 width: 100%; 33 height: 100%; 34 flex-direction: ${({$isMobile:e})=>e?"column":"row"}; 35 36 //GRID auto layout 37 grid-template-columns: ${({$isGridLayout:e})=>e?"repeat(auto-fill, minmax(310px, 1fr))":"none"}; 38 39 //GRID GAP handling 40 ${({$isGridLayout:e,$isLastPage:i,$isMobile:r})=>e?` 41 grid-auto-rows: auto; 42 row-gap: 20px; 43 justify-items: center; // center cards within columns 44 `:` 45 gap: ${r||i&&!r?"20px":"5px"}; 46 `} 47 48 //ALIGN content handling 49 align-items: ${({$isMobile:e,$isGridLayout:i})=>i?"stretch":"center"}; 50 51 //JUSTIFY/ content handling 52 justify-content: ${({$isLastPage:e,$cardsPerPage:i,$isMobile:r,$isGridLayout:n})=>n?"center":r?"flex-start":i===1?"center":e?"flex-start":"space-between"}; 53 54 //OVERFLOW handling 55 overflow-x: hidden; 56 overflow-y: ${({$isMobile:e})=>"hidden"}; 57 overscroll-behavior: contain; 58 -webkit-overflow-scrolling: ${({$isMobile:e})=>e?"none":"auto"}; 59 60 scrollbar-width: none; 61 -ms-overflow-style: none; 62 63 &::-webkit-scrollbar { 64 width : 0; 65 height: 0; 66 display: none; 67 } 68`,Y=a.button` 69 position: absolute; 70 top: 35%; 71 display: flex; 72 ${({side:e})=>e==="left"?"left: 1px;":"right: 1px;"} 73 transform: translateY(-50%); 74 width: 55px; 75 height: 55px; 76 border: none; 77 border-radius: 50%; 78 background-color: #ffffffb5; 79 border: 2px solid #4C8C2B; 80 color: white; 81 justify-content: center; 82 align-items: center; 83 font-size: 25px; 84 line-height: 1; 85 z-index: 99; 86 user-select: none; 87 88 &:hover { 89 background-color: #7aa3668d; 90 cursor: pointer; 91 } 92 93 94 //WORDPRESS ----------------------------------- 95 @media (max-width: 600px) { 96 top: 50%; 97 ${({side:e})=>e==="left"?"left: 2px;":"right: 10px;"} 98 } 99 100 //WIX ------------------------------------- 101 @media (max-width: 350px) { 102 top: 50%; 103 width: 43px; 104 height: 43px; 105 ${({side:e})=>e==="left"?"left: 2px;":"right: 0px;"} 106 } 107 108`,q=a.img` 109 width: 24px; 110 height: 24px; 111 transition: filter 0.3s ease; 112 z-index: 100; 113`,ue=a.div.attrs(()=>({"data-card":!0}))` 114 display: flex; 115 flex: 0 0 calc(30% - 10px); 116 position: relative; 117 top: ${e=>e["grid-layout"]==="true"?"0":"8px"}; 118 flex-direction: column; 119 justify-content: space-between; 120 align-items: center; 121 /* width: 30%; */ 122 width: ${e=>e["grid-layout"]==="true"?"310px":"30%"}; 123 min-width: ${e=>e["grid-layout"]==="true"?"none":"280px"}; 124 max-width: ${e=>e["grid-layout"]==="true"?"none":"310px"}; 125 height: ${e=>(e["grid-layout"]==="true","520px")}; 126 max-height: 520px; 127 padding:18px; 128 scroll-snap-align: start !important; 129 // --------- 130 gap: 2%; 131 border-radius: 20px; 132 border: 1px solid #e0e0e0; 133 box-shadow: 0 4px 4px 0 rgba(160, 160, 160, 0.2); 134 transition: 0.25s; 135 136 &:hover { 137 box-shadow: 0 8px 8px 0 rgba(136, 136, 136, 0.2); 138 transform: scale(1.0025); 139 }; 140 141 142 //WORDPRESS ----------------------------------- 143 @media (max-width: 600px) { 144 width:calc(100% - 26px); 145 min-width: 310px; 146 max-width : 330px; 147 max-height: 500px; 148 flex: 0 0 calc(100% - 50px); 149 gap:20px; 150 height:auto; 151 scroll-snap-align: start !important; 152 scroll-snap-stop: always; 153 154 &:hover { 155 box-shadow: 0 4px 4px 0 rgba(160,160,160,.20); 156 transform: none; 157 } 158 } 159 160 161 //WIX ----------------------------------- 162 @media (max-width: 350px) { 163 width:calc(100% - 26px); 164 padding: 12px; 165 min-width: 265px; 166 max-width : 330px; 167 flex-shrink: 0; 168 gap:20px; 169 height:auto; 170 max-height: 500px; 171 scroll-snap-align: start !important; 172 scroll-snap-stop: always; 173 174 &:hover { 175 box-shadow: 0 4px 4px 0 rgba(160,160,160,.20); 176 transform: none; 177 } 178 } 179 180 181 ::-webkit-scrollbar {
182 width: 0.5em; 183 height:12.5px; 184 background-color: #F5F5F5; 185 border-radius:15px; 186 } 187 188 ::-webkit-scrollbar-thumb { 189 background-color: #c9c9c9; 190 border-radius:15px; 191 } 192 ::-webkit-scrollbar-track { 193 -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3); 194 box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3); 195 196 background-color: #F5F5F5; 197 border-radius:15px; 198 } 199`,fe=a.img` 200 position: absolute; 201 top:6%; 202 left: 2%; 203 width: 35%; 204 height:auto; 205 z-index: 50; 206 207 @media (max-width: 1044px) { 208 width: 35%; 209 } 210 211 //WORDPRESS ----------------------------------- 212 @media (max-width: 600px) { 213 width: 30%; 214 }; 215 216 //WIX ----------------------------------- 217 @media (max-width: 350px) { 218 top: 4%; 219 left:0px; 220 width: 30%; 221 }; 222 223 224 @media (max-height: 350px) { 225 display: none; 226 }; 227`;a.div` 228 display: flex; 229 justify-content: center; 230 align-items: center; 231 width: 22%; 232 height: 22%; 233 background: #f0f0f0; 234`;const me=a.div` 235 display:flex; 236 width: 100%; 237 flex-direction: row; 238 justify-content: flex-start; 239 gap: 2.5%; 240 241@media (max-width: 1024px) { 242 gap:2.5%; 243}`,ge=a.div` 244 display:flex; 245 width: 100%; 246 flex-direction: column; 247 justify-content: flex-start; 248 gap: 3px; 249 250 @media (max-width: 1024px) { 251 gap:2px; 252 }`,we=a.div` 253 display:flex; 254 width: 100%; 255 flex-direction: column; 256 justify-content: space-between; 257 `,I=a.div` 258 position:relative; 259 justify-content: center; 260 align-items: center; 261 vertical-align: middle; 262 padding: 5px; 263`,O=a.img` 264 width:30px; 265 height:auto; 266 z-index:1; 267`,be=a.img` 268 position: absolute; 269 top: 5px; 270 right:-2.5px; 271 width: 18px; 272 height: 18px; 273 z-index: 2; 274`,ve=a.div` 275 font-weight: 700; 276 font-size: 22px; 277 line-height: 22px; 278 letter-spacing: -0.24px; 279 color: #000; 280 281 @media (max-width: 1024px) { 282 font-size: 1.3rem; 283 }; 284 285 //WORDPRESS ----------------------------------- 286 @media (max-width: 600px) { 287 font-size: 1.2rem; 288 }; 289 290 //WIX ----------------------------------- 291 @media (max-width: 350px) { 292 font-size: 1.0rem; 293 }; 294 `,ye=a.div` 295 font-weight: 500; 296 font-size: 16px; 297 line-height: 14.72px; 298 letter-spacing: -0.24px; 299 max-width: 240px; 300 301 @media (max-width: 1024px) { 302 font-size: 1rem; 303 }; 304 305 //WORDPRESS ----------------------------------- 306 @media (max-width: 600px) { 307 font-size: 0.95rem; 308 }; 309 310 //WIX ----------------------------------- 311 @media (max-width: 350px) { 312 font-size: 0.85rem; 313 }; 314 `,je=a.div` 315 display: ${e=>e.$hasTrailData?"flex":"none"}; 316 flex-direction: row; 317 justify-content: space-between; 318 align-items: center; 319 padding: 0px; 320 width: 100%; 321 height: auto; 322`,B=a.div` 323 display: flex; 324 width: auto; 325 height: auto; 326 flex-direction: column; 327 align-items: center; 328 gap:4px !important; 329`,F=a.p` 330 font-weight: 600; 331 font-size: 18px; 332 letter-spacing: -0.24px; 333 margin:0; 334 padding:0; 335 336 @media (max-width: 1024px) { 337 font-size: 1rem; 338 } 339 340 //WORDPRESS -------------------------------- 341 @media (max-width: 600px) { 342 font-size: 0.95rem; 343 }; 344 345 //WIX ----------------------------------- 346 @media (max-width: 350px) { 347 font-size: 0.85rem; 348 }; 349`,_=a.p` 350 font-weight: 500; 351 font-size: 14px; 352 margin:0; 353 padding:0; 354 color: #6F6F6F; 355 356 357 @media (max-width: 1024px) { 358 font-size: 0.85rem; 359 } 360 361 //WORDPRESS ----------------------------------- 362 @media (max-width: 600px) { 363 font-size: 0.85rem; 364 }; 365 366 //WIX ----------------------------------- 367 @media (max-width: 350px) { 368 font-size: 0.80rem; 369 }; 370 371`,$e=a.div` 372 display: flex; 373 position: relative; 374 justify-content: flex-start; 375 align-items: flex-start; 376 width: 100%; 377 height: ${e=>e.$hasTrailData?"15%":"25%"}; 378 overflow-x: hidden; 379 overflow-y: ${e=>e.$expanded?"auto":"hidden"}; 380 background-color: white; 381 /* text-overflow: ellipsis; */ 382 -webkit-overflow-scrolling: touch; 383 384 385 @media (max-width: 600px) { 386 height: 78px; 387 mask-image: ${({$expanded:e,$atBottom:i})=>e&&!i?"linear-gradient(to bottom, black 80%, transparent 100%)":"none"}; 388 } 389`,Ce=a.p` 390 width: 100%; 391 font-weight: 400; 392 font-size: 16px; 393 line-height: 19.8px; 394 letter-spacing: -0.24px; 395 color:#646262; 396 padding:0; 397 margin:0; 398 399 @media (max-width: 1024px) { 400 font-size: 1rem; 401 }; 402 403 //WORDPRESS ----------------------------------- 404 @media (max-width: 600px) { 405 font-size: 0.95rem; 406 padding-bottom: 5px; 407 }; 408 409 //WIX ----------------------------------- 410 @media (max-width: 350px) { 411 font-size: 0.9rem; 412 padding-bottom: 5px; 413 }; 414`,Se=a.span` 415 font-size:16px; 416 color: #4C8C2B; 417 font-weight: 600; 418 cursor: pointer; 419 display:inline; 420 margin-left: 5px; 421 422 @media (max-width: 1024px) { 423 font-size: 1rem; 424 }; 425 426 //WORDPRESS ----------------------------------- 427 @media (max-width: 600px) { 428 font-size: 0.9rem; 429 }; 430 431 //WIX ----------------------------------- 432 @media (max-width: 350px) { 433 font-size: 0.85rem; 434 }; 435 436 &:hover { 437 text-decoration: underline; 438 }; 439`,ke=Q` 440 0%, 441 100% { opacity: 1;} 442 50% { opacity: 0.25; } 443`,Pe=a.div` 444 display: flex; 445 justify-content: center; 446 width: 95%; 447 border-radius: 10px; 448 border-width: 1px; 449 padding: 13px; 450 background-color: #4C8C2B; 451 color: #fff; 452 cursor: pointer; 453 transition: 454 background-color 0.3s, 455 color 0.3s, 456 box-shadow 0.3s, 457 transform 0.3s; 458 font-size: 18px; 459 box-shadow: ${({$isFocused:e})=>e?"0 4px 16px 0 rgba(76,140,43,0.25)":"none"}; 460 transform: ${({$isFocused:e})=>e?"scale(1.04)":"scale(1)"}; 461 background-color: ${({$isFocused:e})=>e?"#5cbf2a":"#4C8C2B"}; 462 color: #fff; 463 464 ${({$isFocused:e})=>e&&K` 465 animation: ${ke} 0.6s linear 1; 466 `} 467 468 //WORDPRESS ----------------------------------- 469 @media (max-width: 600px) { 470 font-size: 1rem; 471 }; 472 473 //WIX ----------------------------------- 474 @media (max-width: 480px) { 475 font-size: 0.95rem; 476 }; 477`,ze=a.a` 478 display: flex; 479 width: 100%; 480 text-decoration: none; 481 color: white; 482`,Ee=a.div` 483 display: flex; 484 width: 100%; 485 margin:5px 0 15px 0; 486 flex-direction: row; 487 align-items: flex-start; 488 gap: 12px; 489`,J=a.img` 490 width: 32px; 491 height: 32px; 492 border-radius: 1px; 493 494 @media (max-width: 1024px) { 495 width: 28px; 496 height: 28px; 497 }; 498 499 //WORDPRESS ----------------------------------- 500 @media (max-width: 600px) { 501 width: 24px; 502 height: 24px; 503 }; 504`,N=new Map,Ae=({orgId:e,serviceName:i,objectId:r,masterTableLayerId:n,setLogoURL:p,setImageURLs:l,setInsetMapURL:s,setIsCardReady:d})=>{const c=o.useMemo(()=>`${e??"all"}-${i??"all"}-${r??"none"}`,[e,i,r]);o.useEffect(()=>{if(!r||n===void 0)return;const x=N.get(c);if(x){o.startTransition(()=>
504{l(x.images),p(x.logos),s(x.inset),d(!0)});return}const f=new AbortController;return(async()=>{try{const g=await ne({objectId:r,baseURL:X(e,i,n).preserve.url,queryField:X(e,i).preserve.queryField,signal:f.signal}),u=g.filter(v=>!G.test(v.name)&&!V.test(v.name)),w=g.filter(v=>G.test(v.name)),h=g.find(v=>V.test(v.name)),b=h?h.url:null;N.set(c,{images:u,logos:w,inset:b}),o.startTransition(()=>{l(u),p(w),s(b),d(!0)})}catch(g){if(f.signal.aborted)return;console.error("Image fetch error:",g)}})(),()=>f.abort()},[c,i,e,r,n,l,p,s,d])};function Me(e,i=!0){const[r,n]=o.useState(!1);return o.useEffect(()=>{const p=e.current;if(!p||p===null||!i)return;const l=()=>n(p.scrollHeight>p.clientHeight);l();const s=new ResizeObserver(l);s.observe(p);const d=new MutationObserver(l);return d.observe(p,{childList:!0,subtree:!0,characterData:!0}),()=>{s.disconnect(),d.disconnect()}},[e,i]),r}const M=a.img` 505 position:absolute; 506 width: 25px; 507 height: auto; 508 margin-top:-9px; 509 padding: 0px; 510 z-index:25 !important; 511 transition: 0.3s; 512 cursor: pointer; 513 opacity: ${e=>e.$isMobile?1:0}; 514 transform: ${e=>e.$isMobile?"scale(1.25)":"none"}; 515 516 &:hover { 517 opacity: 0.85; 518 transform: scale(1.2); 519 }; 520 `,Te=a.div` 521 display: flex; 522 position: relative; 523 width: 100%; 524 height: 35%; 525 flex-direction: row; 526 justify-content: center; 527 align-items: center; 528 overflow: hidden; 529 border-radius: 15px; 530 touch-action: pan-y; 531 overscroll-behavior: contain; 532 533 534 &:hover ${M} { 535 opacity:1; 536 }; 537 538 @media (max-width: 1024px) { 539 height: 38%; 540 }; 541 542 @media (max-width: 768px) { 543 height: 185px !important; 544 }; 545 546 @media (max-height: 480px) { 547 display: none; 548 }; 549`,Re=a.div` 550 display: flex; 551 position:relative; 552 justify-content: flex-start; 553 align-items: center; 554 height: 100%; 555 transition: ${e=>e.$translateX===0?"transform 0.5s ease-in-out":"none"}; 556 transform: ${e=>`translateX(calc(-${e.$activeIndex*100}% + ${e.$translateX}px))`}; 557`,De=a.img` 558 position: relative; 559 width: 100%; 560 height: 100%; 561 object-fit: cover; 562`,Ie=a.div` 563 position: absolute; 564 display: ${e=>e.$hasTrailData?"block":"none"}; 565 bottom: 11%; 566 right: 10.5%; 567 width: 65px; 568 height: 65px; 569 border-radius: 6.1px; 570 object-fit: cover; 571 border: 1px solid #ffffffe6; 572 cursor: pointer; 573 background-image: url(${e=>e.$imageUrl}); 574 background-size: 200%; 575 background-position: center; 576 transition: transform 0.3s, bottom 0.3s, background-size 0.3s; 577 z-index: 50; 578 object-fit: cover; 579 580 &:hover { 581 transform: scale(1.85) translateY(-15px) translateX(-10px); 582 background-size: 100%; 583 z-index: 100; 584 } 585 586 &:hover ~ ${M} { 587 opacity: 0; 588 } 589 590 @media (max-width: 768px) { 591 width: 65px; 592 height: 65px; 593 right:10%; 594 bottom: 15.5% !important; 595 } 596`,Oe=({isMobile:e,imageURLs:i,insetMapURL:r,exploreHref:n,setIsMapHovered:p})=>{const l=o.useRef(null),s=o.useRef(null),[d,c]=o.useState(0),[x,f]=o.useState(0),y=o.useCallback(h=>{h&&f(b=>(b+1)%h.length)},[]),g=o.useCallback(h=>{h&&f(b=>(b-1+h.length)%h.length)},[]),u=o.useMemo(()=>(i==null?void 0:i.length)>0?i:[{name:"placeholder",url:"/img/raster/PreserveCards/carousel_placeholder.png"}],[i]),w=o.useMemo(()=>r||"/img/raster/PreserveCards/insetmap_placeholder.png",[r]);return t.jsxs(Te,{"data-noswipe":!0,children:[t.jsx(Ie,{$hasTrailData:w,$imageUrl:w,onClick:()=>{window.top&&typeof n=="string"&&(window.top.location.href=n)},onMouseEnter:()=>{p(!0)},onMouseLeave:()=>{p(!1)}}),t.jsx(M,{$isMobile:e,style:{left:"5px",visibility:e&&x>0||x>0?"visible":"hidden"},src:"img/vector/RightSidebar/leftArrow.svg",onClick:()=>g(u)}),t.jsx(M,{$isMobile:e,style:{right:"5px",visibility:e&&x<(u==null?void 0:u.length)-1||x<(u==null?void 0:u.length)-1?"visible":"hidden"},src:"img/vector/RightSidebar/rightArrow.svg",onClick:()=>y(u)}),t.jsx(Re,{$activeIndex:x,$translateX:d,onTouchStart:h=>{h.stopPropagation(),ce(h,{startX:l})},onTouchMove:h=>{h.stopPropagation(),le(h,{startX:l,setTranslateX:c,currentIndex:x,imagesLength:u==null?void 0:u.length})},onTouchEnd:h=>{h.stopPropagation(),ae({startX:l,currentX:s,currentIndex:x,imagesLength:u==null?void 0:u.length,translateX:d,setCurrentIndex:f,setTranslateX:c})},children:u.map((h,b)=>t.jsx(De,{src:h.url,loading:"lazy",alt:`Image ${h.name+1}`},b))}),t.jsx(oe,{children:u.map((h,b)=>t.jsx(re,{$active:b===x},b))})]})},Be=a.div.attrs({})` 597 display: flex;
598 flex: 0 0 calc(30% - 10px); 599 position: relative; 600 top: 8px; 601 flex-direction: column; 602 justify-content: space-between; 603 align-items: center; 604 width: 30%; 605 height: 100%; 606 min-width: 280px; 607 max-width: 310px; 608 max-height: 500px; 609 padding:18px; 610 scroll-snap-align: start; 611 // --------- 612 gap: 2%; 613 border-radius: 20px; 614 border: 1px solid #e0e0e0; 615 box-shadow: 0 4px 4px 0 rgba(160, 160, 160, 0.2); 616 transition: 0.25s; 617 618 &:hover { 619 box-shadow: 0 8px 8px 0 rgba(136, 136, 136, 0.2); 620 transform: scale(1.005); 621 }; 622 623 //WORDPRESS ----------------------------------- 624 @media (max-width: 600px) { 625 width:calc(100% - 26px); 626 min-width: 310px; 627 max-height: 500px; 628 max-width : 330px; 629 flex: 0 0 calc(100% - 50px); 630 gap:20px; 631 height:auto; 632 } 633 634 635 //WIX ----------------------------------- 636 @media (max-width: 350px) { 637 width:calc(100% - 26px); 638 padding: 12px; 639 min-width: 265px; 640 max-width : 330px; 641 flex-shrink: 0; 642 gap:20px; 643 height:auto; 644 max-height: 500px; 645 } 646 647 648 649 650 ::-webkit-scrollbar {
651 width: 0.5em; 652 height:12.5px; 653 background-color: #F5F5F5; 654 border-radius:15px; 655 } 656 657 ::-webkit-scrollbar-thumb { 658 background-color: #c9c9c9; 659 border-radius:15px; 660 } 661 ::-webkit-scrollbar-track { 662 -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3); 663 box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3); 664 665 background-color: #F5F5F5; 666 border-radius:15px; 667 } 668`,Fe=Q` 669 0% { background-position: -468px 0; } 670 100% { background-position: 468px 0; } 671`,j=K` 672 position: relative; 673 overflow: hidden; 674 background: #f0f0f0; 675 background-image: linear-gradient( 676 90deg, 677 #f0f0f0 0px, 678 #e6e6e6 40px, 679 #f0f0f0 80px 680 ); 681 background-size: 600px 100%; 682 animation: ${Fe} 1.4s ease-in-out infinite; 683`,_e=a.div` 684 ${j}; 685 position: absolute; 686 top: 6%; 687 left: 2%; 688 width: 35%; 689 height: 28px; 690 border-radius: 6px; 691 z-index: 50; 692`,We=a.div` 693 ${j}; 694 width: 100%; 695 height: 35%; 696 border-radius: 14px; 697`,Xe=a.div` 698 ${j}; 699 width: 40px; 700 height: 40px; 701 border-radius: 50%; 702`,Le=a.div` 703 ${j}; 704 width: 70%; 705 height: 18px; 706 border-radius: 4px; 707 margin-bottom: 6px; 708`,He=a.div` 709 ${j}; 710 width: 50%; 711 height: 14px; 712 border-radius: 4px; 713`,Ge=a.div` 714 display: flex; 715 flex-direction: column; 716 align-items: center; 717 gap: 4px; 718 width: 30%; 719`,Ve=a.div` 720 ${j}; 721 width: 60%; 722 height: 14px; 723 border-radius: 4px; 724`,Ye=a.div` 725 ${j}; 726 width: 70%; 727 height: 8px; 728 border-radius: 4px; 729`,W=a.div` 730 ${j}; 731 width: 100%; 732 height: 8px; 733 border-radius: 4px; 734 735 &:not(:last-child) { 736 margin-bottom: 6px; 737 } 738`,qe=a.div` 739 ${j}; 740 width: 32px; 741 height: 32px; 742 border-radius: 6px; 743`,Je=a.div` 744 ${j}; 745 width: 95%; 746 height: 48px; 747 border-radius: 10px; 748 margin-top: auto; 749`,Ne=a.div` 750 display:flex; 751 width: 100%; 752 flex-direction: row; 753 justify-content: flex-start; 754 gap: 2.5%; 755 756@media (max-width: 1024px) { 757 gap:2.5%; 758}`,Ke=a.div` 759 display:flex; 760 width: 100%; 761 flex-direction: column; 762 justify-content: flex-start; 763 gap: 3px; 764 765 @media (max-width: 1024px) { 766 gap:2px; 767 }`,Qe=a.div` 768 display: flex; 769 width: 100%; 770 flex-direction: row; 771 justify-content: space-between; 772 align-items: center; 773 padding: 0px; 774 height: auto; 775 gap: 5%; 776`,Ze=a.div` 777 display: flex; 778 width: 100%; 779 margin:5px 0 15px 0; 780 flex-direction: row; 781 align-items: flex-start; 782 gap: 12px; 783`,Ue=()=>t.jsxs(Be,{children:[t.jsx(We,{}),t.jsx(_e,{}),t.jsxs(Ne,{children:[t.jsx(Xe,{}),t.jsxs(Ke,{children:[t.jsx(Le,{}),t.jsx(He,{})]})]}),t.jsx(Qe,{children:[...Array(3)].map((e,i)=>t.jsxs(Ge,{children:[t.jsx(Ve,{}),t.jsx(Ye,{})]},i))}),t.jsxs("div",{style:{width:"100%",margin:"8px 0"},children:[t.jsx(W,{}),t.jsx(W,{}),t.jsx(W,{style:{width:"60%"}})]}),t.jsx(Ze,{children:[...Array(3)].map((e,i)=>t.jsx(qe,{},i))}),t.jsx(Je,{})]}),et=({allowedActs:e,prohibitedActs:i})=>{const r=L(e),n=L(i),p=r.map(s=>de[s]).filter(Boolean),l=n.map(s=>he[s]).filter(Boolean);return t.jsxs(Ee,{children:[l.map((s,d)=>t.jsx(J,{src:s,alt:"image"+d+1},d)),p.map((s,d)=>t.jsx(J,{src:s,alt:"image"+d},d))]})},tt=e=>{const i=/Maintainer|Owner|maintainer|owner/,r=e==null?void 0:e.filter(l=>i.test(l.name));if((r==null?void 0:r.length)===0)return t.jsx(I,{children:t.jsx(O,{src:"/img/raster/LeftSidebar/placeholder_owner_logo.png",alt:"Placeholder_owner_logo"})});const n=r==null?void 0:r.find(l=>{var s;return(s=l.name)==null?void 0:s.toLowerCase().includes("maintainer")}),p=r==null?void 0:r.find(l=>{var s;return(s=l.name)==null?void 0:s.toLowerCase().includes("owner")});if(r.length===1)return t.jsx(I,{children:t.jsx(O,{src:n?n.url:r[0].url,alt:"Logo 1"})});if(r.length>=2)return t.jsxs(I,{children:[t.jsx(O,{src:n==null?void 0:n.url}),t.jsx(be,{src:p==null?void 0:p.url})]})},it=({orgId:e,serviceName:i,masterTableLayerId:r,card:n,isMobile:p,isGridLayout:l})=>{const s=o.useRef(null),[d,c]=o.useState(!1),[x,f]=o.useState([]),[y,g]=o.useState([]),[u,w]=o.useState(null),[h,b]=o.useState(!1),[v,z]=o.useState(!1),[$,T]=o.useState(!1),S=160;Ae({orgId:e,serviceName:i,objectId:n.OBJECTID,masterTableLayerId:r,setLogoURL:f,setImageURLs:g,setInsetMapURL:w,setIsCardReady:c}),o.useEffect(()=>{!h&&s.current&&s.current.scrollTo({top:0,behavior:"smooth"})},[h]),o.useEffect(()=>{const m=s.current;if(!m)return;const k=()=>{const Z=m.scrollHeight-m.scrollTop===m.clientHeight;z(Z)};return m.addEventListener("scroll",k),()=>m.removeEventListener("scroll",k)},[]);const E=Me(s,d),P=o.useMemo(()=>n.preserve_page_url,[n.preserve_page_url]),R=o.useMemo(()=>{const m=n.dominant_activity;return m?t.jsx(fe,{src:`/img/vector/PreserveCards/Activity/${m}.svg`,alt:"actsBan"}):null},[n.dominant_activity]),A=o.useMemo(()=>d?null:t.jsx(Ue,{}),[d]),C=o.useMemo(()=>typeof n.total_distance=="number"&&n.total_distance>0&&typeof n.elevation_gain=="number"&&typeof n.dominant_activity=="string"&&typeof n.dominant_surface=="string",[n]),D=o.useMemo(()=>l?"true":"false",[l]);return A||t.jsxs(ue,{"data-card":!0,"grid-layout":D,children:[R,t.jsx(Oe,{isMobile:p,imageURLs:y,insetMapURL:u,exploreHref:P,setIsMapHovered:T}),t.jsxs(me,{children:[tt(x),t.jsxs(ge,{children:[t.jsx(ve,{children:n.preserve_name}),t.jsx(ye,{children:n.owner})]})]}),t.jsxs(je,{$hasTrailData:C,children:[t.jsxs(B,{children:[t.jsxs(F,{children:[n.total_distance," mi"]}),t.jsx(_,{children:"Total Trails"})]}),t.jsxs(B,{children:[t.jsx(F,{children:n.dominant_surface}),t.jsx(_,{children:"Trail Surface"})]}),t.jsxs(B,{children:[t.jsxs(F,{children:[n.elevation_gain," ft"]}),t.jsx(_,{children:"Elevation Gain"})]})]}),t.jsx($e,{ref:s,$hasTrailData:C,$expanded:h,$atBottom:v,children:t.jsxs(Ce,{children:[h?n.preserve_description:U({text:n.preserve_description,maxLength:C?S:250}),E&&t.jsx(Se,{onClick:()=>b(!h),children:h?"Show Less â²":"Show More â¼"})]})}),t.jsxs(we,{children:[t.jsx(et,{allowedActs:n.allowed_acts,prohibitedActs:n.prohibited_acts}),t.jsx(ze,{href:P,target:"_top",rel:"noopener noreferrer",children:t.jsx(Pe,{$isFocused:$,children:"Explore"})})]})]})},nt=a.div` 784 display:flex; 785 position: relative; 786 margin-top: 25px; 787 flex-shrink: 1; 788 justify-content: center; 789 gap:15px; 790 `;a.button` 791 padding: 8px 16px; 792 font-size: 16px; 793 border: 1px solid #ccc; 794 background-color: #4C8C2B;`;const ot=a.button` 795 width: 50px; 796 height: 50px; 797 font-size: 18px; 798 font-weight: 500; 799 border: ${e=>e.$isActive?"none":"1px solid #ccc"}; 800 border-radius: 50%; 801 background-color: ${e=>e.$isActive?"#4C8C2B":"white"}; 802 color: ${e=>e.$isActive?"white":"black"}; 803 cursor: ${e=>e.$isActive?"default":"pointer"}; 804 pointer-events: ${e=>e.$disabled?"none":"auto"}; 805 transition: all 0.3s ease; 806 807 &:hover { 808 background-color: ${e=>e.$isActive?"#4C8C2B":"#f0f0f0"}; 809 color: ${e=>e.$isActive?"white":"#4C8C2B"}; 810 } 811 `,rt=({totalPages:e,currentPage:i,isLoading:r,setPage:n})=>{const[p,l]=o.useTransition(),s=o.useMemo(()=>{const c=[],f=Math.max(1,i-Math.floor(2.5)),y=Math.min(e,f+5-1);for(let g=f;g<=y;g++)c.push(g);return f>1&&(c.unshift("..."),c.unshift(1)),y<e&&(c.push("..."),c.push(e)),c},[e,i]),d=(c,x)=>{c.preventDefault(),c.stopPropagation(),typeof x=="number"?x-1>=0&&x-1<e&&l(()=>{n(x-1)}):l(()=>{n(i)})};return t.jsx(nt,{children:s.map((c,x)=>t.jsx(ot,{$isActive:i+1===c,$disabled:r||p,onClick:f=>d(f,c),children:c},x))})},st=({orgId:e,serviceName:i,masterTableLayerId:r,setIsFetching:n,setData:p})=>{const l=o.useRef(!1);return o.useEffect(()=>{if(l.current||!i||!e||!r)return;const s=async()=>{try{n(!0);const d=await se(e,i,r);if(!d){console.error("No features found in the fetched data"),n(!1),p([]);return}const c=Array.isArray(d)?[...d].sort((x,f)=>H(x).localeCompare(H(f),void 0,{sensitivity:"base"})):d;p(c)}catch(d){console.error("Error fetching data:",d)}finally{n(!1)}};o.startTransition(()=>{s()}),l.current=!0},[e,i,r,p,n]),null};function at({ref:e,width:i,gap:r}
811){const[n,p]=o.useState(1);return o.useEffect(()=>{const l=e.current;if(!l)return;const s=c=>{const x=Math.floor((c+r)/(i+r));p(Math.max(1,x))};s(l.getBoundingClientRect().width);const d=new ResizeObserver(c=>{for(const x of c)s(x.contentRect.width)});return d.observe(l),()=>{d.disconnect()}},[e,i,r]),n}const lt=(e,i,r)=>{o.useEffect(()=>{if(!e||!i)return;(async()=>{var p;try{const l=new URLSearchParams({orgId:e,serviceName:i}),s=await fetch(`/api/map-config?${l.toString()}`);if(!s.ok)throw new Error("Failed to fetch map configs");const d=await s.json(),c=(d==null?void 0:d.data[0])??d,x=(p=c==null?void 0:c.dataRefs)==null?void 0:p.masterTable;x&&r(x)}catch(l){console.error("Error fetching master table:",l)}})()},[e,i,r])},ct=({enabled:e=!0,targetOrigin:i="*",messageType:r="omlt-wheel",easing:n=.15}={})=>{o.useEffect(()=>{if(!e)return;const p=document.documentElement,l=document.body,s=document.getElementById("root"),d={pos:l.style.position,bodyOv:l.style.overflow,htmlOv:p.style.overflow,rootH:(s==null?void 0:s.style.height)??"",rootOv:(s==null?void 0:s.style.overflow)??""};l.style.position="static",l.style.overflow="hidden",p.style.overflow="hidden";const c=window.parent!==window;let x=0,f=null;const y=w=>w.deltaMode===1?w.deltaY*16:w.deltaMode===2?w.deltaY*window.innerHeight:w.deltaY,g=()=>{const w=x*n;if(Math.abs(w)<.5){x=0,f=null;return}x-=w,window.parent.postMessage({type:r,deltaY:w},i),f=requestAnimationFrame(g)},u=w=>{let h=w.target;for(;h&&h!==l;){const b=getComputedStyle(h).overflowY;if((b==="auto"||b==="scroll")&&h.scrollHeight>h.clientHeight)return;h=h.parentElement}x+=y(w),f==null&&(f=requestAnimationFrame(g))};return c&&window.addEventListener("wheel",u,{passive:!0}),()=>{c&&window.removeEventListener("wheel",u),f!=null&&cancelAnimationFrame(f),l.style.position=d.pos,l.style.overflow=d.bodyOv,p.style.overflow=d.htmlOv,s&&(s.style.height=d.rootH,s.style.overflow=d.rootOv)}},[e,i,r,n])},ut=()=>{const{isMobile:e}=o.useContext(ee),[i]=te(),r=i.get("serviceName"),n=i.get("orgId"),p=i.get("pagination"),l=o.useRef(null),[s,d]=o.useState(void 0),[c,x]=o.useState([]),[f,y]=o.useState(!1),[g,u]=o.useState(0);lt(n,r,d),st({orgId:n,serviceName:r,masterTableLayerId:s,setIsFetching:y,setData:x}),ct({enabled:p==="off"});const w=at({ref:l,width:290,gap:20}),h=o.useMemo(()=>p!=="off",[p]),b=o.useMemo(()=>e===!1,[e]),v=o.useMemo(()=>b&&h,[b,h]),z=o.useMemo(()=>b&&!h,[b,h]),$=o.useMemo(()=>v?w:c.length||0,[w,c.length,v]),T=o.useMemo(()=>{if(!v)return c;const m=g*$;return c.slice(m,m+$)},[c,v,g,$]),S=o.useMemo(()=>!v||$<=0?1:Math.ceil(c.length/$),[c.length,v,$]),E=v&&g>0,P=v&&g<S-1,R=m=>{m.preventDefault(),m.stopPropagation(),u(k=>Math.max(0,k-1))},A=m=>{m.preventDefault(),m.stopPropagation(),u(k=>Math.min(S-1,k+1))},C=o.useMemo(()=>c.length==0||f||e==null,[e,c,f]),D=o.useMemo(()=>C?t.jsx(ie,{}):null,[C]);return t.jsxs(pe,{ref:l,children:[D,E&&t.jsx(Y,{side:"left",disabled:!E,onClick:m=>R(m),children:t.jsx(q,{src:"/img/raster/PreserveCards/Navigation/left.png",alt:"Left Arrow"})}),P&&t.jsx(Y,{side:"right",disabled:!P,onClick:m=>A(m),children:t.jsx(q,{src:"/img/raster/PreserveCards/Navigation/right.png",alt:"Right Arrow"})}),t.jsx(xe,{$isLastPage:v&&g===S-1,$cardsPerPage:$,$isMobile:e,$isGridLayout:z,children:T.map(m=>t.jsx(it,{orgId:n,serviceName:r,masterTableLayerId:s,card:m,isMobile:e,isGridLayout:z,"data-card":!0},m.OBJECTID))}),v&&t.jsx(rt,{totalPages:S,currentPage:g,isLoading:C,setPage:u})]})};export{ut as default};
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.