1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="2b574c0a-bc74-bc47-ff1c-78012af6a4d2")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,68054,e=>{"use strict";var t=e.i(91398),i=e.i(91788);e.i(50810);var s=e.i(16351),s=s,r=e.i(66981);let n=e=>2===e?2:3===e?2.1:4===e?3.1:4.1,o=(0,t.jsx)("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M5.93994 13.78L10.2866 9.4333C10.7999 8.91997 10.7999 8.07997 10.2866 7.56664L5.93994 3.21997",stroke:"currentColor",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})}),l=({disabled:e,onClick:i,left:s,textColorClass:n})=>(0,t.jsx)("button",{onClick:i,"aria-label":s?"Previous":"Next",disabled:e,className:(0,r.cn)(n,"size-4 cursor-pointer transition-opacity",e&&"pointer-events-none opacity-30",s&&"rotate-180"),children:(0,t.jsx)("span",{className:"flex h-full w-full",children:o})});var a=e.i(65599),h=e.i(46242),c=e.i(46048);let u=({link:e})=>{let s=(0,i.useCallback)(()=>{let t={event:"click",enhance_ecomm:!0,ecommerce:{name:e.linkText,link_to:(0,h.parseHref)(e),section_name:"CardGrid"}};(0,c.gtmDebugger)("click",t),window.dataLayer.push(t)},[e]);return(0,t.jsx)(a.Button,{href:(0,h.parseHref)(e),size:e?.linkVariant==="button"?"buttonDefault":"link",label:e?.linkText,variant:e?.linkVariant==="button"?e?.buttonStyle:e?.linkStyle,onClick:s,calendlyLink:e?.calendlyLink,testRideStoreHandle:e?.testRideStoreHandle})},d=(0,i.memo)(function({currentPage:e,totalPages:s,onPageChange:n,textColorClass:l}){let h=(0,i.useMemo)(()=>((e,t)=>{let i=[];i.push(1);let s=Math.max(2,e-2),r=Math.min(t-1,e+2);s>2&&i.push("...");for(let e=s;e<=r;e++)i.push(e);return r<t-1&&i.push("..."),t>1&&i.push(t),i})(e,s),[e,s]),c=(0,i.useCallback)(()=>n(e-1),[n,e]),u=(0,i.useCallback)(()=>n(e+1),[n,e]);return(0,t.jsxs)("div",{className:"mt-16 flex items-center justify-center gap-6",children:[(0,t.jsx)(a.Button,{className:"mr-10 rotate-180 cursor-pointer",variant:"iconNormal",size:"iconLarge",icon:o,onClick:c,disabled:1===e,"aria-label":"Previous page"}),h.map((i,s)=>"..."===i?(0,t.jsx)("span",{className:(0,r.cn)("px-2",l),children:"..."},`dots-${s}`):(0,t.jsx)("button",{onClick:()=>n(i),"aria-label":`Page ${i}`,"aria-current":i===e?"page":void 0,className:"text-button cursor-pointer border-0",children:i},i)),(0,t.jsx)(a.Button,{className:"ml-10 cursor-pointer",variant:"iconNormal",size:"iconLarge",icon:o,onClick:u,disabled:e===s,"aria-label":"Next page"})]})});var p=e.i(95894),m=e.i(75141),f=e.i(73425),v=e.i(50323);let g={revalidateOnFocus:!1,revalidateOnReconnect:!1},w=p.parseAsInteger.withDefault(1).withOptions({clearOnDefault:!0,shallow:!1}),S=({title:e,subtitle:i,centerTitle:s,link:n,hasLink:o,showLinkBelowCards:l,enableSlider:a,loaded:h,instanceRef:c,currentSlide:d,totalSlides:p,slidesPerView:m,textColorClass:f})=>(0,t.jsxs)("div",{className:(0,r.cn)("mb-6 flex gap-y-4 empty:hidden lg:mb-10",s?"flex-col items-center":"justify-between lg:items-center"),children:[(0,t.jsxs)("div",{className:(0,r.cn)("flex flex-col gap-6",s&&"items-center text-center"),children:[e?(0,t.jsx)("h2",{className:"lg:text-heading-sm text-heading-xs font-medium",children:e}):null,i?(0,t.jsx)("h3",{className:"text-bodytext-m max-w-113.25",children:i}):null]}),!l&&o?(0,t.jsx)(u,{link:n}):a&&h&&c.current?(0,t.jsx)(y,{instanceRef:c,currentSlide:d,totalSlides:p,slidesPerView:m,textColorClass:f}):null]}),y=({instanceRef:e,currentSlide:i,totalSlides:s,slidesPerView:r,textColorClass:n})=>(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(l,{left:!0,onClick:t=>{t.stopPropagation(),e.current?.prev()},disabled:0===i,textColorClass:n}),(0,t.jsx)(l,{onClick:t=>{t.stopPropagation(),e.current?.next()},disabled:i>=s-Math.floor(r),textColorClass:n})]}),b=({enableSlider:e,enableSliderMobile:i,desktopSliderRef:n,mobileSliderRef:o,displayCards:l,backgroundColor:a,oneCardPerRowMobile:h})=>{let c=l.length;return(0,t.jsxs)(t.Fragment,{children:[i?(0,t.jsx)("div",{ref:o,className:"keen-slider -mx-2 lg:hidden!",children:l.map(e=>(0,t.jsx)("div",{className:"keen-slider__slide px-2",children:(0,t.jsx)(s.default,{card:e,backgroundColor:a})},e.id))}):(0,t.jsx)("div",{className:(0,r.cn)("grid gap-4 lg:hidden",h?"grid-cols-1":"grid-cols-2"),children:l.map(e=>(0,t.jsx)(s.default,{card:e,backgroundColor:a},e.id))}),e?(0,t.jsx)("div",{ref:n,className:"keen-slider -mx-2 hidden! lg:flex!",children:l.map(e=>(0,t.jsx)("div",{className:"keen-slider__slide px-2",children:(0,t.jsx)(s.default,{card:e,backgroundColor:a})},e.id))}):(0,t.jsx)("div",{className:(0,r.cn)("hidden gap-x-6 gap-y-16 lg:grid",c<=1&&"grid-cols-1",2===c&&"grid-cols-2",(3===c||c>4)&&"grid-cols-3",4===c&&"grid-cols-2 xl:grid-cols-4"),children:l.map(e=>(0,t.jsx)(s.default,{card:e,backgroundColor:a},e.id))})]})};
2e.s([],54728),e.i(54728),e.s(["default",0,({data:{title:e,subtitle:s,centerTitle:o,cards:l,link:a,showLinkBelowCards:h,enableSlider:c,enableSliderMobile:y,oneCardPerRowMobile:x,backgroundColor:k,maxCardsPerPage:O}})=>{if(!l||0===l.length)return null;let E=(0,i.useRef)(null),M=k?`bg-${k}`:"bg-white",N=!!k,C=k?(e=>{switch(e){case"neutral-smoke":case"secondary-brown-100":return"text-black";case"black":return"text-white";default:return"text-core-brown-400"}})(k):"text-black",j=a?.linkText&&(a?.linkDestination||a?.externalLinkUrl),{currentPage:T,totalPages:L,isPaginationEnabled:R,displayCards:z,handlePageChange:P}=(({cards:e,maxCardsPerPage:t,sectionRef:s})=>{let r=(0,f.useLenis)(),[n,o]=(0,p.useQueryState)("page",w),l=t&&t>0&&e.length>t,a=l?Math.ceil(e.length/t):1,h=Math.min(Math.max(1,n),a),c=(0,i.useMemo)(()=>e.map(e=>e.id).join(","),[e]),u=(0,i.useCallback)(()=>e.slice((h-1)*t,h*t),[e,h,t]),{data:d}=(0,v.default)(l?["card-grid-pagination",c,h,t]:null,u,g),m=l?d??e.slice(0,t):e;return{currentPage:h,totalPages:a,isPaginationEnabled:l,displayCards:m,handlePageChange:(0,i.useCallback)(e=>{o(e),s.current&&r&&r.scrollTo(s.current,{immediate:!0})},[o,r,s])}})({cards:l,maxCardsPerPage:O,sectionRef:E}),{desktopSliderRef:q,desktopInstanceRef:_,mobileSliderRef:A,currentSlide:V,desktopLoaded:H,totalSlides:U,slidesPerView:D}=(({displayCardsLength:e,currentPage:t,enableSlider:s,enableSliderMobile:r})=>{let o=n(e),[l,a]=(0,i.useState)(o),[h,c]=(0,i.useState)(0),[u,d]=(0,i.useState)(!1),[p,f]=(0,i.useState)(!1),v=(0,i.useMemo)(()=>({loop:!1,disabled:!s,slideChanged(e){c(e.track.details.rel)},initial:0,created(){d(!0)},slides:{perView:l,spacing:16}}),[l,s]),g=(0,i.useMemo)(()=>({loop:!1,disabled:!r,initial:0,created(){f(!0)},slides:{perView:1.3,spacing:16}}),[r]),[w,S]=(0,m.useKeenSlider)(v),[y,b]=(0,m.useKeenSlider)(g);(0,i.useEffect)(()=>{let t=()=>{a(n(e))};return t(),window.addEventListener("resize",t,{passive:!0}),()=>window.removeEventListener("resize",t)},[e]),(0,i.useEffect)(()=>{S.current&&(S.current.moveToIdx(0),c(0)),b.current&&b.current.moveToIdx(0)},[t,S,b]);let x=S.current?.track.details.slides.length||0,k=S.current?.track.details.slidesPerView||n(e);return{desktopSliderRef:w,desktopInstanceRef:S,mobileSliderRef:y,mobileInstanceRef:b,currentSlide:h,desktopLoaded:u,mobileLoaded:p,totalSlides:x,slidesPerView:k}})({displayCardsLength:z.length,currentPage:T,enableSlider:c,enableSliderMobile:y});return(0,t.jsxs)("section",{ref:E,className:(0,r.cn)(M,C,N&&"py-16 lg:py-24"),style:{contentVisibility:"auto",containIntrinsicSize:"auto 500px"},children:[(0,t.jsxs)("div",{className:"container mx-auto px-4 xl:px-0",children:[(0,t.jsx)(S,{title:e,subtitle:s,centerTitle:o,link:a,hasLink:j,showLinkBelowCards:h,enableSlider:c,loaded:H,instanceRef:_,currentSlide:V,totalSlides:U,slidesPerView:D,textColorClass:C}),(0,t.jsx)(b,{enableSlider:c,enableSliderMobile:y,desktopSliderRef:q,mobileSliderRef:A,displayCards:z,backgroundColor:k,oneCardPerRowMobile:x}),R&&L>1?(0,t.jsx)(d,{currentPage:T,totalPages:L,onPageChange:P,textColorClass:C,backgroundColor:k}):null]}),h&&j?(0,t.jsx)("div",{className:"mt-16 flex justify-center",children:(0,t.jsx)(u,{link:a})}):null]})}],68054)},41032,function(e){e.n(e.i(68054))},73425,e=>{"use strict";var t="1.3.26";function i(e,t,i){return Math.max(e,Math.min(t,i))}var s=class{isRunning=!1;value=0;from=0;to=0;currentTime=0;lerp;duration;easing;onUpdate;advance(e){if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;let s=i(0,this.currentTime/this.duration,1),r=(t=s>=1)?1:this.easing(s);this.value=this.from+(this.to-this.from)*r}else if(this.lerp){var s,r,n,o;this.value=(s=this.value,r=this.to,n=60*this.lerp,(1-(o=1-Math.exp(-n*e)))*s+o*r),Math.round(this.value)===Math.round(this.to)&&(this.value=this.to,t=!0)}else this.value=this.to,t=!0;t&&this.stop(),this.onUpdate?.(this.value,t)}stop(){this.isRunning=!1}fromTo(e,t,{lerp:i,duration:s,easing:r,onStart:n,onUpdate:o}){this.from=this.value=e,this.to=t,this.lerp=i,this.duration=s,this.easing=r,this.currentTime=0,this.isRunning=!0,n?.(),this.onUpdate=o}},r=class{width=0;height=0;scrollHeight=0;scrollWidth=0;debouncedResize;wrapperResizeObserver;contentResizeObserver;constructor(e,t,{autoResize:i=!0,debounce:s=250}={}){this.wrapper=e,this.content=t,i&&(this.debouncedResize=function(e,t){let i;return function(...s){clearTimeout(i),i=setTimeout(()=>{i=void 0,e.apply(this,s)},t)}}(this.resize,s),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){this.wrapperResizeObserver?.disconnect(),this.contentResizeObserver?.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize)}resize=()=>{this.onWrapperResize(),this.onContentResize()};onWrapperResize=()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)};onContentResize=()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)};get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},n=class{events={};emit(e,...t){let i=this.events[e]||[];for(let e=0,s=i.length;e<s;e++)i[e]?.(...t)}on(e,t){return this.events[e]?this.events[e].push(t):this.events[e]=[t],()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}off(e,t){this.events[e]=this.events[e]?.filter(e=>t!==e)}destroy(){this.events={}}};let o=100/6,l={passive:!1};function a(e,t){return 1===e?o:2===e?t:1}var h=class{touchStart={x:0,y:0};lastDelta={x:0,y:0};window={width:0,height:0};emitter=new n;constructor(e,t={wheelMultiplier:1,touchMultiplier:1}){this.element=e,this.options=t,window.addEventListener("resize",this.onWindowResize),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,l),this.element.addEventListener("touchstart",this.onTouchStart,l),this.element.addEventListener("touchmove",this.onTouchMove,l),this.element.addEventListener("touchend",this.onTouchEnd,l)}on(e,t){return this.emitter.on(e,t)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize),this.element.removeEventListener("wheel",this.onWheel,l),this.element.removeEventListener("touchstart",this.onTouchStart,l),this.element.removeEventListener("touchmove",this.onTouchMove,l),this.element.removeEventListener("touchend",this.onTouchEnd,l)}onTouchStart=e=>{let{clientX:t,clientY:i}=e.targetTouches?e.targetTouches[0]:e;this.touchStart.x=t,this.touchStart.y=i,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:e})};onTouchMove=e=>{let{clientX:t,clientY:i}=e.targetTouches?e.targetTouches[0]:e,s=-(t-this.touchStart.x)*this.options.touchMultiplier,r=-(i-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=t,this.touchStart.y=i,this.lastDelta={x:s,y:r},this.emitter.emit("scroll",{deltaX:s,deltaY:r,event:e})};onTouchEnd=e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})};onWheel=e=>{let{deltaX:t,deltaY:i,deltaMode:s}=e,r=a(s,this.window.width),n=a(s,this.window.height);t*=r,i*=n,t*=this.options.wheelMultiplier,i*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:i,event:e})};onWindowResize=()=>{this.window={width:window.innerWidth,height:window.innerHeight}}};let c=e=>Math.min(1,1.001-2**(-10*e));var u=class{_isScrolling=!1;_isStopped=!1;_isLocked=!1;_preventNextNativeScrollEvent=!1;_resetVelocityTimeout=null;_rafId=null;_isDraggingSelection=!1;reducedMotionMediaQuery=window.matchMedia("(prefers-reduced-motion: reduce)");
2isTouching;isIos;time=0;userData={};lastVelocity=0;velocity=0;direction=0;options;targetScroll;animatedScroll;animate=new s;emitter=new n;dimensions;virtualScroll;constructor({wrapper:e=window,content:i=document.documentElement,eventsTarget:s=e,smoothWheel:n=!0,syncTouch:o=!1,syncTouchLerp:l=.075,touchInertiaExponent:a=1.7,duration:u,easing:d,lerp:p=.1,infinite:m=!1,orientation:f="vertical",gestureOrientation:v="horizontal"===f?"both":"vertical",touchMultiplier:g=1,wheelMultiplier:w=1,autoResize:S=!0,prevent:y,virtualScroll:b,overscroll:x=!0,autoRaf:k=!1,anchors:O=!1,autoToggle:E=!1,allowNestedScroll:M=!1,__experimental__naiveDimensions:N=!1,naiveDimensions:C=N,stopInertiaOnNavigate:j=!1,respectReducedMotion:T=!0}={}){window.lenisVersion=t,window.lenis||(window.lenis={}),window.lenis.version=t,"horizontal"===f&&(window.lenis.horizontal=!0),!0===o&&(window.lenis.touch=!0),this.isIos=/(iPad|iPhone|iPod)/g.test(navigator.userAgent),e&&e!==document.documentElement||(e=window),"number"==typeof u&&"function"!=typeof d?d=c:"function"==typeof d&&"number"!=typeof u&&(u=1),this.options={wrapper:e,content:i,eventsTarget:s,smoothWheel:n,syncTouch:o,syncTouchLerp:l,touchInertiaExponent:a,duration:u,easing:d,lerp:p,infinite:m,gestureOrientation:v,orientation:f,touchMultiplier:g,wheelMultiplier:w,autoResize:S,prevent:y,virtualScroll:b,overscroll:x,autoRaf:k,anchors:O,autoToggle:E,allowNestedScroll:M,naiveDimensions:C,stopInertiaOnNavigate:j,respectReducedMotion:T},this.dimensions=new r(e,i,{autoResize:S}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown),this.virtualScroll=new h(s,{touchMultiplier:g,wheelMultiplier:w}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd)),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(e,t){return this.emitter.on(e,t)}off(e,t){return this.emitter.off(e,t)}onScrollEnd=e=>{e instanceof CustomEvent||"smooth"!==this.isScrolling&&!1!==this.isScrolling||e.stopPropagation()};dispatchScrollendEvent=()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))};get overflow(){let e=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[e]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}onTransitionEnd=e=>{e.propertyName?.includes("overflow")&&e.target===this.rootElement&&this.checkOverflow()};setScroll(e){this.isHorizontal?this.options.wrapper.scrollTo({left:e,behavior:"instant"}):this.options.wrapper.scrollTo({top:e,behavior:"instant"})}onClick=e=>{let t=e.composedPath().filter(e=>e instanceof HTMLAnchorElement&&e.href).map(e=>new URL(e.href)),i=new URL(window.location.href);if(this.options.anchors){let e=t.find(e=>i.host===e.host&&i.pathname===e.pathname&&e.hash);if(e){let t="object"==typeof this.options.anchors&&this.options.anchors?this.options.anchors:void 0,i=decodeURIComponent(e.hash);this.scrollTo(i,t);return}}if(this.options.stopInertiaOnNavigate&&t.some(e=>i.host===e.host&&i.pathname!==e.pathname))return void this.reset()};onPointerDown=e=>{1===e.button&&this.reset()};isTouchOnSelectionHandle(e){let t=window.getSelection();if(!t||t.isCollapsed||0===t.rangeCount)return!1;let i=e.targetTouches[0]??e.changedTouches[0];if(!i)return!1;let s=t.getRangeAt(0).getClientRects();if(0===s.length)return!1;let r=s[0],n=s[s.length-1],o=40>=Math.hypot(i.clientX-r.left,i.clientY-r.top),l=40>=Math.hypot(i.clientX-n.right,i.clientY-n.bottom);return o||l}onVirtualScroll=e=>{if("function"==typeof this.options.virtualScroll&&!1===this.options.virtualScroll(e))return;let{deltaX:t,deltaY:i,event:s}=e;if(this.emitter.emit("virtual-scroll",{deltaX:t,deltaY:i,event:s}),s.ctrlKey||s.lenisStopPropagation)return;let r=s.type.includes("touch"),n=s.type.includes("wheel");if(r&&this.isIos&&("touchstart"===s.type&&(this._isDraggingSelection=this.isTouchOnSelectionHandle(s)),this._isDraggingSelection)){"touchend"===s.type&&(this._isDraggingSelection=!1);return}this.isTouching="touchstart"===s.type||"touchmove"===s.type;let o=0===t&&0===i;if(this.options.syncTouch&&r&&"touchstart"===s.type&&o&&!this.isStopped&&!this.isLocked)return void this.reset();let l="vertical"===this.options.gestureOrientation&&0===i||"horizontal"===this.options.gestureOrientation&&0===t;if(o||l)return;let a=s.composedPath();a=a.slice(0,a.indexOf(this.rootElement));let h=this.options.prevent,c=Math.abs(t)>=Math.abs(i)?"horizontal":"vertical";if(a.find(e=>e instanceof HTMLElement&&("function"==typeof h&&h?.(e)||e.hasAttribute?.("data-lenis-prevent")||"vertical"===c&&e.hasAttribute?.("data-lenis-prevent-vertical")||"horizontal"===c&&e.hasAttribute?.("data-lenis-prevent-horizontal")||r&&e.hasAttribute?.("data-lenis-prevent-touch")||n&&e.hasAttribute?.("data-lenis-prevent-wheel")||this.options.allowNestedScroll&&this.hasNestedScroll(e,{deltaX:t,deltaY:i}
2))))return;if(this.isStopped||this.isLocked){s.cancelable&&s.preventDefault();return}if(!(this.options.syncTouch&&r||this.options.smoothWheel&&n)){this.isScrolling="native",this.animate.stop(),s.lenisStopPropagation=!0;return}let u=i;"both"===this.options.gestureOrientation?u=Math.abs(i)>Math.abs(t)?i:t:"horizontal"===this.options.gestureOrientation&&(u=t),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||0===this.animatedScroll&&i>0||this.animatedScroll===this.limit&&i<0))&&(s.lenisStopPropagation=!0),s.cancelable&&s.preventDefault();let d=r&&this.options.syncTouch,p=r&&"touchend"===s.type;p&&(u=Math.sign(u)*Math.abs(this.velocity)**this.options.touchInertiaExponent),this.scrollTo(this.targetScroll+u,{programmatic:!1,...d?{lerp:p?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})};resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}onNativeScroll=()=>{if(null!==this._resetVelocityTimeout&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(!1===this.isScrolling||"native"===this.isScrolling){let e=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-e,this.direction=Math.sign(this.animatedScroll-e),this.isStopped||(this.isScrolling="native"),this.emit(),0!==this.velocity&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}};reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle)return void this.rootElement.style.removeProperty("overflow");this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle)return void this.rootElement.style.setProperty("overflow","clip");this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}raf=e=>{let t=e-(this.time||e);this.time=e,this.animate.advance(.001*t),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))};scrollTo(e,{offset:t=0,immediate:s=!1,lock:r=!1,programmatic:n=!0,lerp:o=n?this.options.lerp:void 0,duration:l=n?this.options.duration:void 0,easing:a=n?this.options.easing:void 0,onStart:h,onComplete:u,force:d=!1,userData:p}={}){if(this.prefersReducedMotion&&(n?s=!0:(o=1,l=void 0,a=void 0)),(this.isStopped||this.isLocked)&&!d)return;let m=e,f=t;if("string"==typeof m&&["top","left","start","#"].includes(m))m=0;else if("string"==typeof m&&["bottom","right","end"].includes(m))m=this.limit;else{let e=null;if("string"==typeof m?(e=m.startsWith("#")?document.getElementById(m.slice(1)):document.querySelector(m))||("#top"===m?m=0:console.warn("Lenis: Target not found",m)):m instanceof HTMLElement&&m?.nodeType&&(e=m),e){if(this.options.wrapper!==window){let e=this.rootElement.getBoundingClientRect();f-=this.isHorizontal?e.left:e.top}let t=e.getBoundingClientRect(),i=getComputedStyle(e),s=this.isHorizontal?Number.parseFloat(i.scrollMarginLeft):Number.parseFloat(i.scrollMarginTop),r=getComputedStyle(this.rootElement),n=this.isHorizontal?Number.parseFloat(r.scrollPaddingLeft):Number.parseFloat(r.scrollPaddingTop);m=(this.isHorizontal?t.left:t.top)+this.animatedScroll-(Number.isNaN(s)?0:s)-(Number.isNaN(n)?0:n)}}if("number"==typeof m){if(m+=f,this.options.infinite){if(n){this.targetScroll=this.animatedScroll=this.scroll;let e=m-this.animatedScroll;e>this.limit/2?m-=this.limit:e<-this.limit/2&&(m+=this.limit)}}else m=i(0,m,this.limit);if(m===this.targetScroll){h?.(this),u?.(this);return}if(this.userData=p??{},s){this.animatedScroll=this.targetScroll=m,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit
2(),u?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}n||(this.targetScroll=m),"number"==typeof l&&"function"!=typeof a?a=c:"function"==typeof a&&"number"!=typeof l&&(l=1),this.animate.fromTo(this.animatedScroll,m,{duration:l,easing:a,lerp:o,onStart:()=>{r&&(this.isLocked=!0),this.isScrolling="smooth",h?.(this)},onUpdate:(e,t)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=e-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=e,this.setScroll(this.scroll),n&&(this.targetScroll=e),t||this.emit(),t&&(this.reset(),this.emit(),u?.(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}hasNestedScroll(e,{deltaX:t,deltaY:i}){let s,r,n,o,l,a,h,c,u,d,p,m,f,v,g,w,S=Date.now();e._lenis||(e._lenis={});let y=e._lenis;if(S-(y.time??0)>2e3){y.time=Date.now();let t=window.getComputedStyle(e);if(y.computedStyle=t,s=["auto","overlay","scroll"].includes(t.overflowX),r=["auto","overlay","scroll"].includes(t.overflowY),l=["auto"].includes(t.overscrollBehaviorX),a=["auto"].includes(t.overscrollBehaviorY),y.hasOverflowX=s,y.hasOverflowY=r,!(s||r))return!1;h=e.scrollWidth,c=e.scrollHeight,u=e.clientWidth,d=e.clientHeight,n=h>u,o=c>d,y.isScrollableX=n,y.isScrollableY=o,y.scrollWidth=h,y.scrollHeight=c,y.clientWidth=u,y.clientHeight=d,y.hasOverscrollBehaviorX=l,y.hasOverscrollBehaviorY=a}else n=y.isScrollableX,o=y.isScrollableY,s=y.hasOverflowX,r=y.hasOverflowY,h=y.scrollWidth,c=y.scrollHeight,u=y.clientWidth,d=y.clientHeight,l=y.hasOverscrollBehaviorX,a=y.hasOverscrollBehaviorY;if(!(s&&n||r&&o))return!1;let b=Math.abs(t)>=Math.abs(i)?"horizontal":"vertical";if("horizontal"===b)p=Math.round(e.scrollLeft),m=h-u,f=t,v=s,g=n,w=l;else{if("vertical"!==b)return!1;p=Math.round(e.scrollTop),m=c-d,f=i,v=r,g=o,w=a}return!w&&(p>=m||p<=0)||(f>0?p<m:p>0)&&v&&g}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return"horizontal"===this.options.orientation}get actualScroll(){let e=this.options.wrapper;return this.isHorizontal?e.scrollX??e.scrollLeft:e.scrollY??e.scrollTop}get scroll(){var e;return this.options.infinite?(this.animatedScroll%(e=this.limit)+e)%e:this.animatedScroll}get progress(){return 0===this.limit?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(e){this._isScrolling!==e&&(this._isScrolling=e,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(e){this._isStopped!==e&&(this._isStopped=e,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this.updateClassName())}get isSmooth(){return"smooth"===this.isScrolling}get prefersReducedMotion(){return this.options.respectReducedMotion&&this.reducedMotionMediaQuery.matches}get className(){let e="lenis";return this.options.autoToggle&&(e+=" lenis-autoToggle"),this.isStopped&&(e+=" lenis-stopped"),this.isLocked&&(e+=" lenis-locked"),this.isScrolling&&(e+=" lenis-scrolling"),"smooth"===this.isScrolling&&(e+=" lenis-smooth"),e}updateClassName(){this.cleanUpClassName(),this.className.split(" ").forEach(e=>{this.rootElement.classList.add(e)})}cleanUpClassName(){for(let e of Array.from(this.rootElement.classList))("lenis"===e||e.startsWith("lenis-"))&&this.rootElement.classList.remove(e)}},d=e.i(91788),p=e.i(91398);let m=(0,d.createContext)(null),f=new class{listeners=[];constructor(e){this.state=e}set(e){for(let t of(this.state=e,this.listeners))t(this.state)}subscribe(e){return this.listeners=[...this.listeners,e],()=>{this.listeners=this.listeners.filter(t=>t!==e)}}get(){return this.state}}(null),v=(0,d.forwardRef)(({children:e,root:t=!1,options:i={},autoRaf:s=!0,className:r="",...n},o)=>{let l=(0,d.useRef)(null),a=(0,d.useRef)(null),[h,c]=(0,d.useState)(void 0);(0,d.useImperativeHandle)(o,()=>({wrapper:l.current,content:a.current,lenis:h}),[h]),(0,d.useEffect)(()=>{let e=new u({...i,...l.current&&a.current&&{wrapper:l.current,content:a.current},autoRaf:i?.autoRaf??s});return c(e),()=>{e.destroy(),c(void 0)}},[s,JSON.stringify({...i,wrapper:null,content:null})]);let v=(0,d.useRef)([]),g=(0,d.useCallback)((e,t)=>{v.current.push({callback:e,priority:t}),v.current.sort((e,t)=>
2e.priority-t.priority)},[]),w=(0,d.useCallback)(e=>{v.current=v.current.filter(t=>t.callback!==e)},[]);return((0,d.useEffect)(()=>{if(t&&h)return f.set({lenis:h,addCallback:g,removeCallback:w}),()=>f.set(null)},[t,h,g,w]),(0,d.useEffect)(()=>{if(!h)return;let e=e=>{for(let{callback:t}of v.current)t(e)};return h.on("scroll",e),()=>{h.off("scroll",e)}},[h]),e)?(0,p.jsx)(m.Provider,{value:{lenis:h,addCallback:g,removeCallback:w},children:t&&"asChild"!==t?e:(0,p.jsx)("div",{ref:l,className:`${r} ${h?.className??""}`.trim(),...n,children:(0,p.jsx)("div",{ref:a,children:e})})}):null}),g={};e.s(["ReactLenis",0,v,"useLenis",0,function(e,t=[],i=0){let s=(0,d.useContext)(m),r=function(e){let[t,i]=(0,d.useState)(e.get());return(0,d.useEffect)(()=>e.subscribe(e=>i(e)),[e]),t}(f),{lenis:n,addCallback:o,removeCallback:l}=s??r??g;return(0,d.useEffect)(()=>{if(e&&o&&l&&n)return o(e,i),e(n),()=>{l(e)}},[n,o,l,i,...t,e]),n}],73425)},34589,e=>{"use strict";let t;var i,s,r=e.i(91788);let n={303:"Multiple adapter contexts detected. This might happen in monorepos.",404:"nuqs requires an adapter to work with your framework.",409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:"Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:"Empty search params cache. Search params can't be accessed in Layouts.",501:"Search params cache already populated. Have you called `parse` twice?",502:"`processUrlSearchParams` threw while processing key(s) `%s`. %O"};function o(e){return`[nuqs] ${n[e]} 3 See https://nuqs.dev/NUQS-${e}`}let l={};function a(e,t){let i=Symbol.for(`nuqs.2.9.5.${e}`),s=globalThis;if(null!=s[i])return s[i];let r=Object.isExtensible(s)?s:l;return r[i]??=t()}let h=(i=r.createContext,s=()=>{let e=(0,r.createContext)({useAdapter(){throw Error(o(404))}});return e.displayName="NuqsAdapterContext",e},(t=a("adapter-context",()=>new WeakMap)).has(i)||t.set(i,s()),t.get(i));"u">typeof window&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==h&&console.error(o(303)),window.__NuqsAdapterContext=h),e.s(["a",0,()=>(0,r.useContext)(h).processUrlSearchParams,"c",0,function(e){if(0===e.size)return"";let t=[];for(let[i,s]of e.entries()){let e=i.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");t.push(`${e}=${s.replace(/%/g,"%25").replace(/\+/g,"%2B").replace(/ /g,"+").replace(/#/g,"%23").replace(/&/g,"%26").replace(/"/g,"%22").replace(/'/g,"%27").replace(/`/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/[\x00-\x1F]/g,e=>encodeURIComponent(e))}`)}return"?"+t.join("&")},"i",0,()=>(0,r.useContext)(h).defaultOptions,"l",0,o,"n",0,function(e){return({children:t,defaultOptions:i,processUrlSearchParams:s,...n})=>(0,r.createElement)(h.Provider,{...n,value:{useAdapter:e,defaultOptions:i,processUrlSearchParams:s}},t)},"o",0,a,"r",0,function(e){let t=(0,r.useContext)(h);if(!("useAdapter"in t))throw Error(o(404));return t.useAdapter(e)}])},32725,e=>{"use strict";var t=e.i(96102),i=e.i(34589),s=e.i(91788);function r(e){return{method:"throttle",timeMs:e}}let n=r(function(){if("u"<typeof window||!window.GestureEvent)return 50;try{let e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}());function o(e,t,i){if("string"==typeof i)e.set(t,i);else{for(let s of(e.delete(t),i))e.append(t,s);e.has(t)||e.set(t,"")}return e}function l(){let e=new Map;return{on(t,i){let s=e.get(t)||[];return s.push(i),e.set(t,s),()=>this.off(t,i)},off(t,i){let s=e.get(t);s&&e.set(t,s.filter(e=>e!==i))},emit(t,i){e.get(t)?.forEach(e=>e(i))}}}function a(e,t,i){let s=setTimeout(function(){e(),i.removeEventListener("abort",r)},t);function r(){clearTimeout(s),i.removeEventListener("abort",r)}i.addEventListener("abort",r)}function h(){let e=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let t=()=>{},i=()=>{};
3return{promise:new e((e,s)=>{t=e,i=s}),resolve:t,reject:i}}function c(){return new URLSearchParams(location.search)}var u=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=n.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:i,options:s},r=n.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),(0,t.t)(7,e,i,s),this.updateMap.set(e,i),"push"===s.history&&(this.options.history="push"),s.scroll&&(this.options.scroll=!0),!1===s.shallow&&(this.options.shallow=!1),s.startTransition&&this.transitions.add(s.startTransition),(!Number.isFinite(this.timeMs)||r>this.timeMs)&&(this.timeMs=r)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=c}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=c,rateLimitFactor:i=1,...s},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return(0,t.t)(8),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=h();let n=()=>{this.lastFlushedAt=performance.now();let[t,i]=this.applyPendingUpdates({...s,autoResetQueueOnUpdate:s.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},r);null===i?(this.resolvers.resolve(t),this.resetQueueOnNextPush=!0):this.resolvers.reject(t),this.resolvers=null},o=()=>{let e=performance.now()-this.lastFlushedAt,s=this.timeMs,r=i*Math.max(0,s-e);(0,t.t)(9,r,s,i),0===r?n():a(n,r,this.controller.signal)};return a(o,0,this.controller.signal),this.resolvers.promise}abort(){return this.controller?.abort(),this.controller=new AbortController,this.resolvers?.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){let e=Array.from(this.updateMap.keys());return(0,t.t)(10,JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=n.timeMs,e}applyPendingUpdates(e,s){let{updateUrl:r,getSearchParamsSnapshot:n}=e,l=n();if((0,t.t)(11,this.updateMap.size,l.toString()),0===this.updateMap.size)return[l,null];let a=Array.from(this.updateMap.entries()),h={...this.options},c=Array.from(this.transitions);for(let[i,s]of(e.autoResetQueueOnUpdate&&this.reset(),(0,t.t)(12,a,h),a))null===s?l.delete(i):l=o(l,i,s);if(s)try{l=s(l)}catch(e){return console.error((0,i.l)(502),a.map(([e])=>e).join(),e),this.resetQueueOnNextPush=!0,[l,e]}try{return!function(e,t){let i=t;for(let t=e.length-1;t>=0;t--){let s=e[t];if(!s)continue;let r=i;i=()=>s(r)}i()}(c,()=>r(l,h)),[l,null]}catch(e){return console.error((0,i.l)(429),a.map(([e])=>e).join(),e),[l,e]}}};let d=(0,i.o)("throttle-queue",()=>new u);var p=class{callback;resolvers=h();controller=new AbortController;queuedValue=void 0;constructor(e){this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,i){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,a(()=>{let i=this.resolvers;try{(0,t.t)(13,e);let s=this.callback(e);(0,t.t)(14,this.queuedValue),this.queuedValue=void 0,this.resolvers=h(),s.then(e=>i.resolve(e)).catch(e=>i.reject(e))}catch(e){this.queuedValue=void 0,i.reject(e)}},i,this.controller.signal),this.resolvers.promise}},m=class{throttleQueue;queues=new Map;queuedQuerySync=l();constructor(e=new u){this.throttleQueue=e}push(e,i,s,r){if(!Number.isFinite(i))return Promise.resolve((s.getSearchParamsSnapshot??c)());let n=e.key;if(!this.queues.has(n)){(0,t.t)(15,n);let e=new p(e=>(this.throttleQueue.push(e),this.throttleQueue.flush(s,r).finally(()=>{this.queues.get(e.key)?.queuedValue===void 0&&((0,t.t)(16,e.key),this.queues.delete(e.key)),this.queuedQuerySync.emit(e.key)})));this.queues.set(n,e)}(0,t.t)(17,e);let o=this.queues.get(n).push(e,i);return this.queuedQuerySync.emit(n),o}abort(e){let i=this.queues.get(e);return i?((0,t.t)(18,e,i.queuedValue?.query),this.queues.delete(e),i.abort(),this.queuedQuerySync.emit(e),e=>(e.then(i.resolvers.resolve,i.resolvers.reject),e)):e=>e}abortAll(){for(let[e,i]of this.queues.entries())(0,t.t)(18,e,i.queuedValue?.query),i.abort(),i.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(e);this.queues.clear()}getQueuedQuery(e){let t=this.queues.get(e)?.queuedValue?.query;return void 0!==t?t:this.throttleQueue.getQueuedQuery(e)}};let f=(0,i.o)("debounce-controller",()=>new m(d));e.s(["c",0,function(e){return{method:"debounce",timeMs:e}},"i",0,l,"l",0,n,"n",0,function(e){var t,i;let r,n;return t=(e,t)=>f.queuedQuerySync.on(e,t),i=e=>f.getQueuedQuery(e),r=(0,s.useCallback)(()=>{let t=Object.fromEntries(e.map(e=>[e,i(e)]));return[JSON.stringify(t),t]},[e.join(","),i]),null===(n=(0,s.useRef)(null)).current&&(n.current=r()),(0,s.useSyncExternalStore)((0,s.useCallback)(i=>{let s=e.map(e=>t(e,i));return()=>
3s.forEach(e=>e())},[e.join(","),t]),()=>{let[e,t]=r();return n.current[0]===e?n.current[1]:(n.current=[e,t],t)},()=>n.current[1])},"o",0,function(e){return null===e||Array.isArray(e)&&0===e.length},"r",0,d,"s",0,o,"t",0,f,"u",0,r])},96102,e=>{"use strict";e.s(["i",0,function(e){},"t",0,function(e){}])},95894,e=>{"use strict";var t=e.i(32725),i=e.i(96102),s=e.i(34589),r=e.i(91788);function n(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function o(e,t,s){try{return e(t)}catch(e){return s?(0,i.i)(25,t,e,s):(0,i.i)(24,t,e),null}}function l(e){function t(t){if(void 0===t)return null;let i="";if(Array.isArray(t)){if(void 0===t[0])return null;i=t[0]}return"string"==typeof t&&(i=t),o(e.parse,i)}return{type:"single",eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide:i=>t(i)??e}},withOptions(e){return{...this,...e}}}}let a=l({parse:e=>e,serialize:String}),h=l({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});function c(e,t){return e.valueOf()===t.valueOf()}l({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)}),l({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return t<"0"||!(1&t.length)?t:"0"+t}}),l({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),l({parse:e=>"true"===e.toLowerCase(),serialize:String}),l({parse:e=>{let t=new Date(parseInt(e));return t.valueOf()==t.valueOf()?t:null},serialize:e=>""+e.valueOf(),eq:c}),l({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:c}),l({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:c});let u=(0,s.o)("sync-emitter",()=>(0,t.i)()),d={},p=(e,t)=>"defaultValue"===e?void 0:t;function m(e,o={}){let l=(0,r.useId)(),a=(0,s.i)(),h=(0,s.a)(),{history:c=a?.history??"replace",scroll:g=a?.scroll??!1,shallow:w=a?.shallow??!0,throttleMs:S=t.l.timeMs,limitUrlUpdates:y=a?.limitUrlUpdates,clearOnDefault:b=a?.clearOnDefault??!0,startTransition:x,urlKeys:k=d}=o,O=Object.keys(e).join(","),E=(0,r.useRef)(e),M=E.current,N=JSON.stringify(Object.entries(M),p)===JSON.stringify(Object.entries(e),p)&&Object.entries(e).every(([e,t])=>{if(M[e]?.startTransition!==t.startTransition)return!1;let i=M[e]?.defaultValue,s=t.defaultValue;return!!Object.is(i,s)||void 0!==i&&void 0!==s&&t.eq?.(i,s)===!0})?M:e;E.current=N;let C=(0,r.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,n(k,e)??e])),[O,JSON.stringify(k)]),j=(0,s.r)(Object.values(C)),T=j.searchParams,L=(0,r.useRef)({}
3),R=(0,r.useRef)(null),z=(0,r.useRef)(null),P=(0,t.n)(Object.values(C)),[q,_]=(0,r.useState)(()=>f(e,C,T,P).state),A=(0,r.useRef)(q),V=JSON.stringify([Object.values(C).map(e=>[e,T.getAll(e)]),P]),H=()=>{let{state:t,hasChanged:s}=f(e,C,T,P,L.current,A.current);return s&&((0,i.t)(1,l,O,t),A.current=t,_(t)),s},U=Object.keys(L.current).join("&")!==Object.values(C).join("&"),D=null===z.current||z.current===(j.pathname??location.pathname),Q=!1;(U||D&&R.current!==V)&&(R.current=V,Q=H(),U&&(L.current=Object.fromEntries(Object.entries(C).map(([t,i])=>[i,e[t]?.type==="multi"?T.getAll(i):T.get(i)??null])))),U||Q||!D||q===A.current||_(A.current),(0,r.useEffect)(()=>{z.current=j.pathname??location.pathname,H()},[V,j.pathname]),(0,r.useEffect)(()=>{let t=Object.keys(e).reduce((t,s)=>(t[s]=({state:t,query:r})=>{_(n=>{let o=C[s];return Object.is(n[s]??null,t)?((0,i.t)(2,l,O,o,t,e[s]?.defaultValue,A.current),n):(A.current={...A.current,[s]:t},L.current[o]=r,(0,i.t)(3,l,O,o,t,e[s]?.defaultValue,A.current),A.current)})},t),{});for(let s of Object.keys(e)){let e=C[s];(0,i.t)(4,l,e,O),u.on(e,t[s])}return()=>{for(let s of Object.keys(e)){let e=C[s];(0,i.t)(5,l,e,O),u.off(e,t[s])}}},[O,C]);let W=(0,r.useCallback)((e,s={})=>{let r,o=Object.fromEntries(Object.keys(N).map(e=>[e,null])),a="function"==typeof e?e(v(A.current,N))??o:e??o;(0,i.t)(6,l,O,a);let d=0,p=!1,m=[];for(let[e,i]of Object.entries(a)){let o=n(N,e),l=C[e];if(!o||void 0===l||void 0===i)continue;(s.clearOnDefault??o.clearOnDefault??b)&&null!==i&&void 0!==o.defaultValue&&(o.eq??((e,t)=>e===t))(i,o.defaultValue)&&(i=null);let a=null===i?null:(o.serialize??String)(i);u.emit(l,{state:i,query:a});let f={key:l,query:a,options:{history:s.history??o.history??c,shallow:s.shallow??o.shallow??w,scroll:s.scroll??o.scroll??g,startTransition:s.startTransition??o.startTransition??x}},v=s.limitUrlUpdates??o.limitUrlUpdates??y;if(v?.method==="debounce"){let e=v.timeMs??t.l.timeMs,i=t.t.push(f,e,j,h);d<e&&(r=i,d=e)}else{let e=v?.timeMs??s.throttleMs??o.throttleMs??S;m.push(t.t.abort(l)),t.r.push(f,e),p=!0}}let f=m.reduce((e,t)=>t(e),p?t.r.flush(j,h):t.r.getPendingPromise(j));return r??f},[O,c,w,g,S,y?.method,y?.timeMs,x,b,N,C,j.updateUrl,j.getSearchParamsSnapshot,j.rateLimitFactor,h]);return[(0,r.useMemo)(()=>v(q,N),[q,N]),W]}function f(e,i,s,r,l,a){let h=!1,c=Object.entries(e).reduce((e,[c,u])=>{var d;let p=i[c],m=n(r,p),f="multi"===u.type?[]:null,v=void 0===m?("multi"===u.type?s.getAll(p):s.get(p))??f:m,g=a&&n(a,c);return l&&void 0!==g&&((d=n(l,p)??f)===v||null!==d&&null!==v&&"string"!=typeof d&&"string"!=typeof v&&d.length===v.length&&d.every((e,t)=>e===v[t]))?e[c]=g:(h=!0,e[c]=((0,t.o)(v)?null:o(u.parse,v,p))??null,l&&(l[p]=v)),e},{});if(!h){let t=Object.keys(e),i=Object.keys(a??{});h=t.length!==i.length||t.some(e=>!i.includes(e))}return{state:c,hasChanged:h}}function v(e,t){return Object.fromEntries(Object.keys(e).map(i=>[i,e[i]??t[i]?.defaultValue??null]))}e.s(["createParser",0,l,"parseAsInteger",0,h,"parseAsString",0,a,"useQueryState",0,function(e,t={}){let{parse:i,type:s,serialize:n,eq:o,defaultValue:l,...a}=t,[{[e]:h},c]=m({[e]:{parse:i??(e=>e),type:s,serialize:n,eq:o,defaultValue:l}},a);return[h,(0,r.useCallback)((t,i={})=>c(i=>({[e]:"function"==typeof t?t(i[e]):t}),i),[e,c])]},"useQueryStates",0,m],95894)}]); 4 5//# debugId=2b574c0a-bc74-bc47-ff1c-78012af6a4d2
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.