1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{76489:function(t,e){"use strict";e.parse=function(t,e){if("string"!=typeof t)throw TypeError("argument str must be a string");var i={},r=t.length;if(r<2)return i;var n=e&&e.decode||h,o=0,l=0,d=0;do{if(-1===(l=t.indexOf("=",o)))break;if(-1===(d=t.indexOf(";",o)))d=r;else if(l>d){o=t.lastIndexOf(";",l-1)+1;continue}var u=a(t,o,l),p=c(t,l,u),m=t.slice(u,p);if(!s.call(i,m)){var f=a(t,l+1,d),v=c(t,d,f);34===t.charCodeAt(f)&&34===t.charCodeAt(v-1)&&(f++,v--);var g=t.slice(f,v);i[m]=function(t,e){try{return e(t)}catch(e){return t}}(g,n)}o=d+1}while(o<r);return i},e.serialize=function(t,e,s){var a=s&&s.encode||encodeURIComponent;if("function"!=typeof a)throw TypeError("option encode is invalid");if(!r.test(t))throw TypeError("argument name is invalid");var c=a(e);if(!n.test(c))throw TypeError("argument val is invalid");var h=t+"="+c;if(!s)return h;if(null!=s.maxAge){var d=Math.floor(s.maxAge);if(!isFinite(d))throw TypeError("option maxAge is invalid");h+="; Max-Age="+d}if(s.domain){if(!o.test(s.domain))throw TypeError("option domain is invalid");h+="; Domain="+s.domain}if(s.path){if(!l.test(s.path))throw TypeError("option path is invalid");h+="; Path="+s.path}if(s.expires){var u=s.expires;if("[object Date]"!==i.call(u)||isNaN(u.valueOf()))throw TypeError("option expires is invali
1d");h+="; Expires="+u.toUTCString()}if(s.httpOnly&&(h+="; HttpOnly"),s.secure&&(h+="; Secure"),s.partitioned&&(h+="; Partitioned"),s.priority)switch("string"==typeof s.priority?s.priority.toLowerCase():s.priority){case"low":h+="; Priority=Low";break;case"medium":h+="; Priority=Medium";break;case"high":h+="; Priority=High";break;default:throw TypeError("option priority is invalid")}if(s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":h+="; SameSite=Strict";break;case"lax":h+="; SameSite=Lax";break;case"none":h+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return h};var i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,r=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,n=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,o=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,l=/^[\u0020-\u003A\u003D-\u007E]*$/;function a(t,e,i){do{var s=t.charCodeAt(e);if(32!==s&&9!==s)return e}while(++e<i);return i}function c(t,e,i){for(;e>i;){var s=t.charCodeAt(--e);if(32!==s&&9!==s)return e+1}return i}
1function h(t){return -1!==t.indexOf("%")?decodeURIComponent(t):t}},47041:function(t,e,i){"use strict";var s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},r=this&&this.__rest||function(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&0>e.indexOf(s)&&(i[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,s=Object.getOwnPropertySymbols(t);r<s.length;r++)0>e.indexOf(s[r])&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(i[s[r]]=t[s[r]]);return i};Object.defineProperty(e,"__esModule",{value:!0}),e.hasCookie=e.deleteCookie=e.setCookie=e.getCookie=e.getCookies=void 0;var n=i(76489),o=function(){return"undefined"!=typeof window},l=function(t){return!!t&&"getAll"in t&&"set"in t&&"function"==typeof t.getAll&&"function"==typeof t.set},a=function(t){return!!(null==t?void 0:t.req)&&"cookies"in t.req&&l(null==t?void 0:t.req.cookies)||!!(null==t?void 0:t.res)&&"cookies"in t.res&&l(null==t?void 0:t.res.cookies)||!!(null==t?void 0:t.cookies)&&l(t.cookies())},c=function(t){var e={};return t.getAll().forEach(function(t){var i=t.name,s=t.value;e[i]=s}),e},h=function(t){try{if("string"==typeof t)return t;return JSON.stringify(t)}catch(e){return t}};e.getCookies=function(t){if(a(t)){if(null==t?void 0:t.req)return c(t.req.cookies);if(null==t?void 0:t.cookies)return c(t.cookies())}if(t&&(e=t.req),!o())return e&&e.cookies?e.cookies:e&&e.headers.cookie?(0,n.parse)(e.headers.cookie):{};for(var e,i={},s=document.cookie?document.cookie.split("; "):[],r=0,l=s.length;r<l;r++){var h=s[r].split("="),d=h.slice(1).join("=");i[h[0]]=d}return i},e.getCookie=function(t,i){var s=(0,e.getCookies)(i)[t];if(void 0!==s)return s?s.replace(/(%[0-9A-Z]{2}
1)+/g,decodeURIComponent):s},e.setCookie=function(t,e,i){if(a(i)){var l,c,d,u=i.req,p=i.res,m=i.cookies,f=r(i,["req","res","cookies"]),v=s({name:t,value:h(e)},f);u&&u.cookies.set(v),p&&p.cookies.set(v),m&&m().set(v);return}if(i){var u=i.req,p=i.res,g=r(i,["req","res"]);c=u,d=p,l=g}var y=(0,n.serialize)(t,h(e),s({path:"/"},l));if(o())document.cookie=y;else if(d&&c){var w=d.getHeader("Set-Cookie");if(Array.isArray(w)||(w=w?[String(w)]:[]),d.setHeader("Set-Cookie",w.concat(y)),c&&c.cookies){var b=c.cookies;""===e?delete b[t]:b[t]=h(e)}if(c&&c.headers&&c.headers.cookie){var b=(0,n.parse)(c.headers.cookie);""===e?delete b[t]:b[t]=h(e),c.headers.cookie=Object.entries(b).reduce(function(t,e){return t.concat("".concat(e[0],"=").concat(e[1],";"))},"")}}},e.deleteCookie=function(t,i){return(0,e.setCookie)(t,"",s(s({},i),{maxAge:-1}))},e.hasCookie=function(t,i){return!!t&&(0,e.getCookies)(i).hasOwnProperty(t)}},6840:function(t,e,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return i(48211)}])},32382:function(t,e,i){"use strict";i.d(e,{Z:function(){return f},j:function(){return v}});var s=i(85893),r=i(67294),n=i(47041),o=i(87653),l=i(48093);let a="\n mutation addToCart($cartId: ID!, $lines: [CartLineInput!]!) {\n cartLinesAdd(cartId: $cartId, lines: $lines) {\n cart {\n ...cart\n }\n }\n }\n ".concat(l.Z,"\n"),c="\n mutation createCart($lineItems: [CartLineInput!]) {\n cartCreate(input: { lines: $lineItems }) {\n cart {\n ...cart\n }\n }\n }\n ".concat(l.Z,"\n"),h="\n mutation editCartItems($cartId: ID!, $lines: [CartLineUpdateInput!]!) {\n cartLinesUpdate(cartId: $cartId, lines: $lines) {\n cart {\n ...cart\n }\n }\n }\n ".concat(l.Z,"\n"),d="\n mutation removeFromCart($cartId: ID!, $lineIds: [ID!]!) {\n cartLinesRemove(cartId: $cartId, lineIds: $lineIds) {\n cart {\n ...cart\n }\n }\n }\n ".concat(l.Z,"\n"),u="\n query getCart($cartId: ID!) {\n cart(id: $cartId) {\n ...cart\n }\n }\n ".concat(l.Z,"\n"),p=(0,o.X)({storeDomain:"theyoungvets.myshopify.com",apiVersion:"2024-01",publicAccessToken:"3107dcf8bd9b85e4de67dece3929bbdf"}),m=(0,r.createContext)(void 0);function f(t){let{children:e}=t,[i,o]=(0,r.useState)(null),[l,f]=(0,r.useState)(null),[v,g]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{let t=(0,n.getCookie)("localCartId");if(t){f(t.toString());try{let{data:e}=await p.request(u,{variables:{cartId:t.toString()}});(null==e?void 0:e.cart)?(o(e.cart),(0,n.setCookie)("localCart",JSON.stringify(e.cart))):y()}catch(t){console.error("Error loading cart:",t),y()}}})()},[]);let y=()=>{o(null),f(null),(0,n.deleteCookie)("localCartId"),(0,n.deleteCookie)("localCart")},w=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=[{merchandiseId:t,quantity:e}];try{var s,r;if(l){let{data:t}=await p.request(a,{variables:{cartId:l,lines:i}});(null==t?void 0:null===(s=t.cartLinesAdd)||void 0===s?void 0:s.cart)&&(o(t.cartLinesAdd.cart),(0,n.setCookie)("localCart",JSON.stringify(t.cartLinesAdd.cart)))}else{let{data:t}=await p.request(c,{variables:{lineItems:i}});(null==t?void 0:null===(r=t.cartCreate)||void 0===r?void 0:r.cart)&&(o(t.cartCreate.cart),f(t.cartCreate.cart.id),(0,n.setCookie)("localCart",JSON.stringify(t.cartCreate.cart)),(0,n.setCookie)("localCartId",t.cartCreate.cart.id))}}catch(t){console.error("Error adding to cart:",t)}},b=async(t,e)=>{if(l)try{var i;let{data:s}=await p.request(h,{variables:{cartId:l,lines:[{id:t,quantity:e}]}});(null==s?void 0:null===(i=s.cartLinesUpdate)||void 0===i?void 0:i.cart)&&(o(s.cartLinesUpdate.cart),(0,n.setCookie)("localCart",JSON.stringify(s.cartLinesUpdate.cart)))}catch(t){console.error("Error updating cart item:",t)}},S=async t=>{if(l)try{var e;let{data:i}=await p.request(d,{variables:{cartId:l,lineIds:[t]}});(null==i?void 0:null===(e=i.cartLinesRemove)||void 0===e?void 0:e.cart)&&(o(i.cartLinesRemove.cart),(0,n.setCookie)("localCart",JSON.stringify(i.cartLinesRemove.cart)))}catch(t){console.error("Error removing from cart:",t)}},E=async(t,e)=>{var s,r;let n=null==i?void 0:null===(r=i.lines)||void 0===r?void 0:null===(s=r.edges)||void 0===s?void 0:s.find(e=>e.node.id===t);if(!n)return;let o=n.node.quantity,l="add"===e?o+1:o-1;return 0===l?S(t):b(t,l)};return(0,s.jsx)(m.Provider,{value:{cart:i,cartId:l,openCart:v,setOpenCart:g,clearCart:y,handleAddToCart:w,handleRemoveFromCart:S,handleCartItemUpdate:E},children:e})}function v(){let t=(0,r.useContext)(m);if(void 0===t)throw Error("useCart must be used within a CartProvider");return t}}
1,48093:function(t,e,i){"use strict";var s=i(62423);let r="\n fragment cart on Cart {\n id\n checkoutUrl\n cost {\n subtotalAmount {\n amount\n currencyCode\n }\n totalAmount {\n amount\n currencyCode\n }\n totalTaxAmount {\n amount\n currencyCode\n }\n }\n lines(first: 100) {\n edges {\n node {\n id\n quantity\n cost {\n totalAmount {\n amount\n currencyCode\n }\n }\n merchandise {\n ... on ProductVariant {\n id\n title\n selectedOptions {\n name\n value\n }\n product {\n ...product\n }\n }\n }\n }\n }\n }\n totalQuantity\n }\n ".concat(s.Z,"\n");e.Z=r},62423:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});var s="\n fragment product on Product {\n id\n handle\n availableForSale\n title\n description\n descriptionHtml\n options {\n id\n name\n values\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 250) {\n edges {\n node {\n id\n title\n availableForSale\n selectedOptions {\n name\n value\n }\n price {\n amount\n currencyCode\n }\n }\n }\n }\n featuredImage {\n ...image\n }\n images(first: 20) {\n edges {\n node {\n ...image\n }\n }\n }\n seo {\n ...seo\n }\n tags\n updatedAt\n }\n ".concat("\n fragment image on Image {\n url\n altText\n width\n height\n }\n","\n ").concat("\n fragment seo on SEO {\n description\n title\n }\n","\n")},48211:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return R}});var s=i(85893),r=i(67294),n=i(11163),o=i(34155),l=()=>{window.va||(window.va=function(...t){(window.vaq=window.vaq||[]).push(t)})};function a(){return"undefined"!=typeof window}function c(){return"production"}function h(){return"development"===((a()?window.vam:c())||"production")}function d(t){return(0,r.useEffect)(()=>{var e;t.beforeSend&&(null==(e=window.va)||e.call(window,"beforeSend",t.beforeSend))},[t.beforeSend]),(0,r.useEffect)(()=>{!function(t={debug:!0}){var e;if(!a())return;(function(t="auto"){if("auto"===t){window.vam=c();return}window.vam=t})(t.mode),l(),t.beforeSend&&(null==(e=window.va)||e.call(window,"beforeSend",t.beforeSend));let i=t.scriptSrc?t.scriptSrc:h()?"https://va.vercel-scripts.com/v1/script.debug.js":t.basePath?`${t.basePath}/insights/script.js`:"/_vercel/insights/script.js";if(document.head.querySelector(`script[src*="${i}"]`))return;let s=document.createElement("script");s.src=i,s.defer=!0,s.dataset.sdkn="@vercel/analytics"+(t.framework?`/${t.framework}`:""),s.dataset.sdkv="1.5.0",t.disableAutoTrack&&(s.dataset.disableAutoTrack="1"),t.endpoint?s.dataset.endpoint=t.endpoint:t.basePath&&(s.dataset.endpoint=`${t.basePath}/insights`),t.dsn&&(s.dataset.dsn=t.dsn),s.onerror=()=>{let t=h()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${i}. ${t}`)},h()&&!1===t.debug&&(s.dataset.debug="false"),document.head.appendChild(s)}({framework:t.framework||"react",basePath:t.basePath??function(){if(void 0!==o&&void 0!==o.env)return o.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==t.route&&{disableAutoTrack:!0},...t})},[]),(0,r.useEffect)(()=>{t.route&&t.path&&function({route:t,path:e}){var i;null==(i=window.va)||i.call(window,"pageview",{route:t,path:e})}({route:t.route,path:t.path})},[t.route,t.path]),null}function u(t,e,i){return Math.max(t,Math.min(e,i))}i(2851),i(82111),i(72256);class p{constructor(){this.isRunning=!1,this.value=0,this.from=0,this.to=0,this.duration=0,this.currentTime=0}advance(t){var e,i,s,r;if(!this.isRunning)return;let n=!1;if(this.duration&&this.easing){this.currentTime+=t;let e=u(0,this.currentTime/this.duration,1),i=(n=e>=1)?1:this.easing(e);this.value=this.from+(this.to-this.from)*i}else this.lerp?(this.value=(i=this.value,s=this.to,(1-(r=1-Math.exp(-(60*this.lerp)*t)))*i+r*s),Math.round(this.value)===this.to&&(this.value=this.to,n=!0)):(this.value=this.to,n=!0);n&&this.stop(),null===(e=this.onUpdate)||void 0===e||e.call(this,this.value,
1n)}stop(){this.isRunning=!1}fromTo(t,e,{lerp:i,duration:s,easing:r,onStart:n,onUpdate:o}){this.from=this.value=t,this.to=e,this.lerp=i,this.duration=s,this.easing=r,this.currentTime=0,this.isRunning=!0,null==n||n(),this.onUpdate=o}}class m{constructor({wrapper:t,content:e,autoResize:i=!0,debounce:s=250}={}){var r;let n;this.width=0,this.height=0,this.scrollWidth=0,this.scrollHeight=0,this.resize=()=>{this.onWrapperResize(),this.onContentResize()},this.onWrapperResize=()=>{this.wrapper===window?(this.width=window.innerWidth,this.height=window.innerHeight):this.wrapper instanceof HTMLElement&&(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)},this.onContentResize=()=>{this.wrapper===window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):this.wrapper instanceof HTMLElement&&(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)},this.wrapper=t,this.content=e,i&&(this.debouncedResize=(r=this.resize,function(){let t=arguments,e=this;clearTimeout(n),n=setTimeout(function(){r.apply(e,t)},s)}),this.wrapper===window?window.addEventListener("resize",this.debouncedResize,!1):(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(){var t,e;null===(t=this.wrapperResizeObserver)||void 0===t||t.disconnect(),null===(e=this.contentResizeObserver)||void 0===e||e.disconnect(),window.removeEventListener("resize",this.debouncedResize,!1)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}}class f{constructor(){this.events={}}emit(t,...e){let i=this.events[t]||[];for(let t=0,s=i.length;t<s;t++)i[t](...e)}on(t,e){var i;return(null===(i=this.events[t])||void 0===i?void 0:i.push(e))||(this.events[t]=[e]),()=>{var i;this.events[t]=null===(i=this.events[t])||void 0===i?void 0:i.filter(t=>e!==t)}}off(t,e){var i;this.events[t]=null===(i=this.events[t])||void 0===i?void 0:i.filter(t=>e!==t)}destroy(){this.events={}}}let v=100/6;class g{constructor(t,{wheelMultiplier:e=1,touchMultiplier:i=1}){this.lastDelta={x:0,y:0},this.windowWidth=0,this.windowHeight=0,this.onTouchStart=t=>{let{clientX:e,clientY:i}=t.targetTouches?t.targetTouches[0]:t;this.touchStart.x=e,this.touchStart.y=i,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:t})},this.onTouchMove=t=>{var e,i,s,r;let{clientX:n,clientY:o}=t.targetTouches?t.targetTouches[0]:t,l=-(n-(null!==(i=null===(e=this.touchStart)||void 0===e?void 0:e.x)&&void 0!==i?i:0))*this.touchMultiplier,a=-(o-(null!==(r=null===(s=this.touchStart)||void 0===s?void 0:s.y)&&void 0!==r?r:0))*this.touchMultiplier;this.touchStart.x=n,this.touchStart.y=o,this.lastDelta={x:l,y:a},this.emitter.emit("scroll",{deltaX:l,deltaY:a,event:t})},this.onTouchEnd=t=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:t})},this.onWheel=t=>{let{deltaX:e,deltaY:i,deltaMode:s}=t;e*=1===s?v:2===s?this.windowWidth:1,i*=1===s?v:2===s?this.windowHeight:1,e*=this.wheelMultiplier,i*=this.wheelMultiplier,this.emitter.emit("scroll",{deltaX:e,deltaY:i,event:t})},this.onWindowResize=()=>{this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight},this.element=t,this.wheelMultiplier=e,this.touchMultiplier=i,this.touchStart={x:null,y:null},this.emitter=new f,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,{passive:!1}),this.element.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.element.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.element.addEventListener("touchend",this.onTouchEnd,{passive:!1})}on(t,e){return this.emitter.on(t,e)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel),this.element.removeEventListener("touchstart",this.onTouchStart),this.element.removeEventListener("touchmove",this.onTouchMove),this.element.removeEventListener("touchend",this.onTouchEnd)}}class y{constructor({wrapper:t=window,content:e=document.documentElement,wheelEventsTarget:i=t,eventsTarget:s=i,smoothWheel:r=!0,syncTouch:n=!1,syncTouchLerp:o=.075,touchInertiaMultiplier:l=35,duration:a,easing:c=t=>Math.min(1,1.001-Math.pow(2,-10*t)),lerp:h=.1,infinite:d=!1,orientation:u="vertical",gestureOrientation:v="vertical",touchMultiplier:y=1,wheelMultiplier:w=1,autoResize:b=!0,prevent:S,virtualScroll:E,__experimental__naiveDimensions:I=!1}={}){this.__isScrolling=!1,this.__isStopped=!1,this.__isLocked=!1,this.userData={},this.lastVelocity=0,this.velocity=0,this.direction=0,this.onPointerDown=t=>{1===t.button&&this.reset()},this.onVirtualScroll=t=>{if("function"==typeof this.options.virtualScroll&&!1===this.options.virtualScroll(t))return;let{deltaX:e,deltaY:i,event:s}=t;if(this.emitter.emit("virtual-scroll",{deltaX:e,deltaY:i,event:s}),s.ctrlKey)return;let r=s.type.includes("touch"),n=s.type.includes("wheel");if(this.isTouching="touchstart"===s.type||"touchmove"===s.type,this.options.syncTouch&&r&&"touchstart"===s.type&&!this.isStopped&&!this.isLocked)return void this.reset();let o=0===e&&0===i,l="vertical"===this.options.gestureOrientation&&0===i||"horizontal"===this.options.gestureOrientation&&0===e;if(o||l)return;let a=s.composedPath();a=a.slice(0,a.indexOf(this.rootElement));let c=this.options.prevent;if(a.find(t=>{var e,i,s,o,l;return t instanceof Element&&("function"==typeof c&&(null==c?void 0:c(t))||(null===(e=t.hasAttribute)||void 0===e?void 0:e.call(t,"data-lenis-prevent"))||r&&(null===(i=t.hasAttribute)||void 0===i?void 0:i.call(t,"data-lenis-prevent-touch"))||n&&(null===(s=t.hasAttribute)||void 0===s?void 0:s.call(t,"data-lenis-prevent-wheel"))||(null===(o=t.classList)||void 0===o?void 0:o.contains("lenis"))&&!(null===(l=t.classList)||void 0===l?void 0:l.contains("lenis-stopped")))}))return;if(this.isStopped||this.isLocked)return void s.preventDefault();if(!(this.options.syncTouch&&r||this.options.smoothWheel&&n))return this.isScrolling="native",void this.animate.stop();s.preventDefault();let h=i;"both"===this.options.gestureOrientation?h=Math.abs(i)>Math.abs(e)?i:e:"horizontal"===this.options.gestureOrientation&&(h=e);let d=r&&this.options.syncTouch,u=r&&"touchend"===s.type&&Math.abs(h)>5;
1u&&(h=this.velocity*this.options.touchInertiaMultiplier),this.scrollTo(this.targetScroll+h,Object.assign({programmatic:!1},d?{lerp:u?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}))},this.onNativeScroll=()=>{if(clearTimeout(this.__resetVelocityTimeout),delete this.__resetVelocityTimeout,this.__preventNextNativeScrollEvent)delete this.__preventNextNativeScrollEvent;else if(!1===this.isScrolling||"native"===this.isScrolling){let t=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-t,this.direction=Math.sign(this.animatedScroll-t),this.isScrolling="native",this.emit(),0!==this.velocity&&(this.__resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}},window.lenisVersion="1.1.9",t&&t!==document.documentElement&&t!==document.body||(t=window),this.options={wrapper:t,content:e,wheelEventsTarget:i,eventsTarget:s,smoothWheel:r,syncTouch:n,syncTouchLerp:o,touchInertiaMultiplier:l,duration:a,easing:c,lerp:h,infinite:d,gestureOrientation:v,orientation:u,touchMultiplier:y,wheelMultiplier:w,autoResize:b,prevent:S,virtualScroll:E,__experimental__naiveDimensions:I},this.animate=new p,this.emitter=new f,this.dimensions=new m({wrapper:t,content:e,autoResize:b}),this.updateClassName(),this.userData={},this.time=0,this.velocity=this.lastVelocity=0,this.isLocked=!1,this.isStopped=!1,this.isScrolling=!1,this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new g(s,{touchMultiplier:y,wheelMultiplier:w}),this.virtualScroll.on("scroll",this.onVirtualScroll)}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName()}on(t,e){return this.emitter.on(t,e)}off(t,e){return this.emitter.off(t,e)}setScroll(t){this.isHorizontal?this.rootElement.scrollLeft=t:this.rootElement.scrollTop=t}resize(){this.dimensions.resize()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){this.isStopped&&(this.isStopped=!1,this.reset())}stop(){this.isStopped||(this.isStopped=!0,this.animate.stop(),this.reset())}raf(t){let e=t-(this.time||t);this.time=t,this.animate.advance(.001*e)}scrollTo(t,{offset:e=0,immediate:i=!1,lock:s=!1,duration:r=this.options.duration,easing:n=this.options.easing,lerp:o=this.options.lerp,onStart:l,onComplete:a,force:c=!1,programmatic:h=!0,userData:d={}}={}){if(!this.isStopped&&!this.isLocked||c){if("string"==typeof t&&["top","left","start"].includes(t))t=0;else if("string"==typeof t&&["bottom","right","end"].includes(t))t=this.limit;else{let i;if("string"==typeof t?i=document.querySelector(t):t instanceof HTMLElement&&(null==t?void 0:t.nodeType)&&(i=t),i){if(this.options.wrapper!==window){let t=this.rootElement.getBoundingClientRect();e-=this.isHorizontal?t.left:t.top}let s=i.getBoundingClientRect();t=(this.isHorizontal?s.left:s.top)+this.animatedScroll}}if("number"==typeof t&&(t+=e,t=Math.round(t),this.options.infinite?h&&(this.targetScroll=this.animatedScroll=this.scroll):t=u(0,t,this.limit),t!==this.targetScroll)){if(this.userData=d,i)return this.animatedScroll=this.targetScroll=t,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),null==a||a(this),void(this.userData={});h||(this.targetScroll=t),this.animate.fromTo(this.animatedScroll,t,{duration:r,easing:n,lerp:o,onStart:()=>{s&&(this.isLocked=!0),this.isScrolling="smooth",null==l||l(this)},onUpdate:(t,e)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=t-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=t,this.setScroll(this.scroll),h&&(this.targetScroll=t),e||this.emit
1(),e&&(this.reset(),this.emit(),null==a||a(this),this.userData={},this.preventNextNativeScrollEvent())}})}}}preventNextNativeScrollEvent(){this.__preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{delete this.__preventNextNativeScrollEvent})}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.__experimental__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(){return this.isHorizontal?this.rootElement.scrollLeft:this.rootElement.scrollTop}get scroll(){var t;return this.options.infinite?(this.animatedScroll%(t=this.limit)+t)%t:this.animatedScroll}get progress(){return 0===this.limit?1:this.scroll/this.limit}get isScrolling(){return this.__isScrolling}set isScrolling(t){this.__isScrolling!==t&&(this.__isScrolling=t,this.updateClassName())}get isStopped(){return this.__isStopped}set isStopped(t){this.__isStopped!==t&&(this.__isStopped=t,this.updateClassName())}get isLocked(){return this.__isLocked}set isLocked(t){this.__isLocked!==t&&(this.__isLocked=t,this.updateClassName())}get isSmooth(){return"smooth"===this.isScrolling}get className(){let t="lenis";return this.isStopped&&(t+=" lenis-stopped"),this.isLocked&&(t+=" lenis-locked"),this.isScrolling&&(t+=" lenis-scrolling"),"smooth"===this.isScrolling&&(t+=" lenis-smooth"),t}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}}function w(){return(w=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)({}).hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t}).apply(null,arguments)}class b{constructor({scrollElements:t,rootMargin:e="-1px -1px -1px -1px",IORaf:i}){this.scrollElements=void 0,this.rootMargin=void 0,this.IORaf=void 0,this.observer=void 0,this.scrollElements=t,this.rootMargin=e,this.IORaf=i,this._init()}_init(){for(let t of(this.observer=new IntersectionObserver(t=>{t.forEach(t=>{let e=this.scrollElements.find(e=>e.$el===t.target);t.isIntersecting?(e&&(e.isAlreadyIntersected=!0),this._setInview(t)):e&&e.isAlreadyIntersected&&this._setOutOfView(t)})},{rootMargin:this.rootMargin}),this.scrollElements))this.observe(t.$el)}destroy(){this.observer.disconnect()}observe(t){t&&this.observer.observe(t)}unobserve(t){t&&this.observer.unobserve(t)}_setInview(t){let e=this.scrollElements.find(e=>e.$el===t.target);this.IORaf&&(null==e||e.setInteractivityOn()),this.IORaf||null==e||e.setInview()}_setOutOfView(t){let e=this.scrollElements.find(e=>e.$el===t.target);this.IORaf&&(null==e||e.setInteractivityOff()),this.IORaf||null==e||e.setOutOfView(),null!=e&&e.attributes.scrollRepeat||this.IORaf||this.unobserve(t.target)}}function S(t,e){return t.reduce((t,i)=>Math.abs(i-e)<Math.abs(t-e)?i:t)}class E{constructor({$el:t,id:e,modularInstance:i,subscribeElementUpdateFn:s,unsubscribeElementUpdateFn:r,needRaf:n,scrollOrientation:o}){var l,a,c,h,d;this.$el=void 0,this.id=void 0,this.needRaf=void 0,this.attributes=void 0,this.scrollOrientation=void 0,this.isAlreadyIntersected=void 0,this.intersection=void 0,this.metrics=void 0,this.currentScroll=void 0,this.translateValue=void 0,this.progress=void 0,this.lastProgress=void 0,this.modularInstance=void 0,this.progressModularModules=void 0,this.isInview=void 0,this.isInteractive=void 0,this.isInFold=void 0,this.isFirstResize=void 0,this.subscribeElementUpdateFn=void 0,this.unsubscribeElementUpdateFn=void 0,this.$el=t,this.id=e,this.needRaf=n,this.scrollOrientation=o,this.modularInstance=i,this.subscribeElementUpdateFn=s,this.unsubscribeElementUpdateFn=r,this.attributes={scrollClass:null!=(l=this.$el.dataset.scrollClass)?l:"is-inview",scrollOffset:null!=(a=this.$el.dataset.scrollOffset)?a:"0,0",scrollPosition:null!=(c=this.$el.dataset.scrollPosition)?c:"start,end",scrollModuleProgress:null!=this.$el.dataset.scrollModuleProgress,scrollCssProgress:null!=this.$el.dataset.scrollCssProgress,scrollEventProgress:null!=(h=this.$el.dataset.scrollEventProgress)?h:null,scrollSpeed:null!=this.$el.dataset.scrollSpeed?parseFloat(this.$el.dataset.scrollSpeed):null,scrollRepeat:null!=this.$el.dataset.scrollRepeat,scrollCall:null!=(d=this.$el.dataset.scrollCall)?d:null,scrollCallSelf:null!=this.$el.dataset.scrollCallSelf,scrollIgnoreFold:null!=this.$el.dataset.scrollIgnoreFold,scrollEnableTouchSpeed:null!=this.$el.dataset.scrollEnableTouchSpeed},this.intersection={start:0,end:0},this.metrics={offsetStart:0,offsetEnd:0,bcr:{}},this.currentScroll="vertical"===this.scrollOrientation?window.scrollY:window.scrollX,this.translateValue=0,this.progress=0,this.lastProgress=null,this.progressModularModules=[],this.isInview=!1,this.isInteractive=!1,this.isAlreadyIntersected=!1,this.isInFold=!1,this.isFirstResize=!0,this._init()}_init(){this.needRaf&&(this.modularInstance&&this.attributes.scrollModuleProgress&&this._getProgressModularModules(),this._resize())}onResize({currentScroll:t}){this.currentScroll=t,this._resize()}onRender({currentScroll:t,smooth:e}){let i="vertical"===this.scrollOrientation?window.innerHeight:window.innerWidth;if(this.currentScroll=t,this._computeProgress(),this.attributes.scrollSpeed&&!isNaN(this.attributes.scrollSpeed)){if
1(this.attributes.scrollEnableTouchSpeed||e){if(this.isInFold){let t=Math.max(0,this.progress);this.translateValue=-(t*i*this.attributes.scrollSpeed*1)}else{let t=-1+((this.progress-0)/1*2||0);this.translateValue=-(t*i*this.attributes.scrollSpeed*1)}this.$el.style.transform="vertical"===this.scrollOrientation?`translate3d(0, ${this.translateValue}px, 0)`:`translate3d(${this.translateValue}px, 0, 0)`}else this.translateValue&&(this.$el.style.transform="translate3d(0, 0, 0)"),this.translateValue=0}}setInview(){if(this.isInview)return;this.isInview=!0,this.$el.classList.add(this.attributes.scrollClass);let t=this._getScrollCallFrom();this.attributes.scrollCall&&this._dispatchCall("enter",t)}setOutOfView(){if(!this.isInview||!this.attributes.scrollRepeat)return;this.isInview=!1,this.$el.classList.remove(this.attributes.scrollClass);let t=this._getScrollCallFrom();this.attributes.scrollCall&&this._dispatchCall("leave",t)}setInteractivityOn(){this.isInteractive||(this.isInteractive=!0,this.subscribeElementUpdateFn(this))}setInteractivityOff(){this.isInteractive&&(this.isInteractive=!1,this.unsubscribeElementUpdateFn(this),null!=this.lastProgress&&this._computeProgress(S([0,1],this.lastProgress)))}_resize(){this.metrics.bcr=this.$el.getBoundingClientRect(),this._computeMetrics(),this._computeIntersection(),this.isFirstResize&&(this.isFirstResize=!1,this.isInFold&&this.setInview())}_computeMetrics(){let{top:t,left:e,height:i,width:s}=this.metrics.bcr,r="vertical"===this.scrollOrientation?window.innerHeight:window.innerWidth,n="vertical"===this.scrollOrientation?i:s;this.metrics.offsetStart=this.currentScroll+("vertical"===this.scrollOrientation?t:e)-this.translateValue,this.metrics.offsetEnd=this.metrics.offsetStart+n,this.isInFold=this.metrics.offsetStart<r&&!this.attributes.scrollIgnoreFold}_computeIntersection(){let t="vertical"===this.scrollOrientation?window.innerHeight:window.innerWidth,e="vertical"===this.scrollOrientation?this.metrics.bcr.height:this.metrics.bcr.width,i=this.attributes.scrollOffset.split(","),s=null!=i[0]?i[0].trim():"0",r=null!=i[1]?i[1].trim():"0",n=this.attributes.scrollPosition.split(","),o=null!=n[0]?n[0].trim():"start",l=null!=n[1]?n[1].trim():"end",a=s.includes("%")?t*parseInt(s.replace("%","").trim())*.01:parseInt(s),c=r.includes("%")?t*parseInt(r.replace("%","").trim())*.01:parseInt(r);switch(this.isInFold&&(o="fold"),o){case"start":default:this.intersection.start=this.metrics.offsetStart-t+a;break;case"middle":this.intersection.start=this.metrics.offsetStart-t+a+.5*e;break;case"end":this.intersection.start=this.metrics.offsetStart-t+a+e;break;case"fold":this.intersection.start=0}switch(l){case"start":this.intersection.end=this.metrics.offsetStart-c;break;case"middle":this.intersection.end=this.metrics.offsetStart-c+.5*e;break;default:this.intersection.end=this.metrics.offsetStart-c+e}if(this.intersection.end<=this.intersection.start)switch(l){case"start":default:this.intersection.end=this.intersection.start+1;break;case"middle":this.intersection.end=this.intersection.start+.5*e;break;case"end":this.intersection.end=this.intersection.start+e}}_computeProgress(t){var e,i,s;let r=null!=t?t:(i=this.intersection.start,s=this.intersection.end,(e=0+((this.currentScroll-i)/(s-i)*1||0))<0)?0:e>1?1:e;if(this.progress=r,r!=this.lastProgress){if(this.lastProgress=r,this.attributes.scrollCssProgress&&this._setCssProgress(r),this.attributes.scrollEventProgress&&this._setCustomEventProgress(r),this.attributes.scrollModuleProgress)for(let t of this.progressModularModules)this.modularInstance&&this.modularInstance.call("onScrollProgress",r,t.moduleName,t.moduleId);r>0&&r<1&&this.setInview(),0===r&&this.setOutOfView(),1===r&&this.setOutOfView()}}_setCssProgress(t=0){this.$el.style.setProperty("--progress",t.toString())}_setCustomEventProgress(t=0){let e=this.attributes.scrollEventProgress;if(!e)return;let i=new CustomEvent(e,{detail:{target:this.$el,progress:t}});window.dispatchEvent(i)}_getProgressModularModules(){if(!this.modularInstance)return;let t=Object.keys(this.$el.dataset).filter(t=>t.includes("module")),e=Object.entries(this.modularInstance.modules);if(t.length)for(let i of t){let t=this.$el.dataset[i];if(!t)return;for(let i of e){let[e,s]=i;t in s&&this.progressModularModules.push({moduleName:e,moduleId:t})}}}_getScrollCallFrom(){let t=S([this.intersection.start,this.intersection.end],this.currentScroll);return this.intersection.start===t?"start":"end"}_dispatchCall(t,e){var i,s;let r=null==(i=this.attributes.scrollCall)?void 0:i.split(","),n=null==(s=this.attributes)?void 0:s.scrollCallSelf;if(r&&r.length>1){let i;let[s,o,l]=r;i=n?this.$el.dataset[`module${o.trim()}`]:l,this.modularInstance&&this.modularInstance.call(s.trim(),{target:this.$el,way:t,from:e},o.trim(),null==i?void 0:i.trim())}else if(r){let[i]=r,s=new CustomEvent(i,{detail:{target:this.$el,way:t,from:e}});window.dispatchEvent(s)}}}let I=["scrollOffset","scrollPosition","scrollModuleProgress","scrollCssProgress","scrollEventProgress","scrollSpeed"];class C{constructor({$el:t,modularInstance:e,triggerRootMargin:i,rafRootMargin:s,scrollOrientation:r}
1){this.$scrollContainer=void 0,this.modularInstance=void 0,this.triggerRootMargin=void 0,this.rafRootMargin=void 0,this.scrollElements=void 0,this.triggeredScrollElements=void 0,this.RAFScrollElements=void 0,this.scrollElementsToUpdate=void 0,this.IOTriggerInstance=void 0,this.IORafInstance=void 0,this.scrollOrientation=void 0,t?(this.$scrollContainer=t,this.modularInstance=e,this.scrollOrientation=r,this.triggerRootMargin=null!=i?i:"-1px -1px -1px -1px",this.rafRootMargin=null!=s?s:"100% 100% 100% 100%",this.scrollElements=[],this.triggeredScrollElements=[],this.RAFScrollElements=[],this.scrollElementsToUpdate=[],this._init()):console.error("Please provide a DOM Element as scrollContainer")}_init(){let t=Array.from(this.$scrollContainer.querySelectorAll("[data-scroll]"));this._subscribeScrollElements(t),this.IOTriggerInstance=new b({scrollElements:[...this.triggeredScrollElements],rootMargin:this.triggerRootMargin,IORaf:!1}),this.IORafInstance=new b({scrollElements:[...this.RAFScrollElements],rootMargin:this.rafRootMargin,IORaf:!0})}destroy(){this.IOTriggerInstance.destroy(),this.IORafInstance.destroy(),this._unsubscribeAllScrollElements()}onResize({currentScroll:t}){for(let e of this.RAFScrollElements)e.onResize({currentScroll:t})}onRender({currentScroll:t,smooth:e}){for(let i of this.scrollElementsToUpdate)i.onRender({currentScroll:t,smooth:e})}removeScrollElements(t){let e=t.querySelectorAll("[data-scroll]");if(e.length){for(let t=0;t<this.triggeredScrollElements.length;t++){let i=this.triggeredScrollElements[t];Array.from(e).indexOf(i.$el)>-1&&(this.IOTriggerInstance.unobserve(i.$el),this.triggeredScrollElements.splice(t,1))}for(let t=0;t<this.RAFScrollElements.length;t++){let i=this.RAFScrollElements[t];Array.from(e).indexOf(i.$el)>-1&&(this.IORafInstance.unobserve(i.$el),this.RAFScrollElements.splice(t,1))}e.forEach(t=>{let e=this.scrollElementsToUpdate.find(e=>e.$el===t),i=this.scrollElements.find(e=>e.$el===t);e&&this._unsubscribeElementUpdate(e),i&&(this.scrollElements=this.scrollElements.filter(t=>t.id!=i.id))})}}addScrollElements(t){let e=t.querySelectorAll("[data-scroll]"),i=[];this.scrollElements.forEach(t=>{i.push(t.id)});let s=Array.from(e);this._subscribeScrollElements(s,Math.max(...i,0)+1,!0)}_subscribeScrollElements(t,e=0,i=!1){for(let s=0;s<t.length;s++){let r=t[s],n=this._checkRafNeeded(r),o=new E({$el:r,id:e+s,scrollOrientation:this.scrollOrientation,modularInstance:this.modularInstance,subscribeElementUpdateFn:this._subscribeElementUpdate.bind(this),unsubscribeElementUpdateFn:this._unsubscribeElementUpdate.bind(this),needRaf:n});this.scrollElements.push(o),n?(this.RAFScrollElements.push(o),i&&(this.IORafInstance.scrollElements.push(o),this.IORafInstance.observe(o.$el))):(this.triggeredScrollElements.push(o),i&&(this.IOTriggerInstance.scrollElements.push(o),this.IOTriggerInstance.observe(o.$el)))}}_unsubscribeAllScrollElements(){this.scrollElements=[],this.RAFScrollElements=[],this.triggeredScrollElements=[],this.scrollElementsToUpdate=[]}_subscribeElementUpdate(t){this.scrollElementsToUpdate.push(t)}_unsubscribeElementUpdate(t){this.scrollElementsToUpdate=this.scrollElementsToUpdate.filter(e=>e.id!=t.id)}_checkRafNeeded(t){let e=[...I],i=t=>{e=e.filter(e=>e!=t)};if(t.dataset.scrollOffset){if("0,0"!=t.dataset.scrollOffset.split(",").map(t=>t.replace("%","").trim()).join(","))return!0;i("scrollOffset")}else i("scrollOffset");if(t.dataset.scrollPosition){if("top,bottom"!=t.dataset.scrollPosition.trim())return!0;i("scrollPosition")}else i("scrollPosition");if(t.dataset.scrollSpeed&&!isNaN(parseFloat(t.dataset.scrollSpeed)))return!0;for(let s of(i("scrollSpeed"),e))if(s in t.dataset)return!0;return!1}}class O{constructor({resizeElements:t,resizeCallback:e=()=>{}}){this.$resizeElements=void 0,this.isFirstObserve=void 0,this.observer=void 0,this.resizeCallback=void 0,this.$resizeElements=t,this.resizeCallback=e,this.isFirstObserve=!0,this._init()}_init(){for(let t of(this.observer=new ResizeObserver(t=>{var e;this.isFirstObserve||null==(e=this.resizeCallback)||e.call(this),this.isFirstObserve=!1}),this.$resizeElements))this.observer.observe(t)}destroy(){this.observer.disconnect()}}class _{constructor({lenisOptions:t={},modularInstance:e,triggerRootMargin:i,rafRootMargin:s,autoResize:r=!0,autoStart:n=!0,scrollCallback:o=()=>{},initCustomTicker:l,destroyCustomTicker:a}={}){for(let[e]of(this.rafPlaying=void 0,this.lenisInstance=void 0,this.coreInstance=void 0,this.lenisOptions=void 0,this.modularInstance=void 0,this.triggerRootMargin=void 0,this.rafRootMargin=void 0,this.rafInstance=void 0,this.autoResize=void 0,this.autoStart=void 0,this.ROInstance=void 0,this.initCustomTicker=void 0,this.destroyCustomTicker=void 0,this._onRenderBind=void 0,this._onResizeBind=void 0,this._onScrollToBind=void 0,Object.entries(t)))["wrapper","content","infinite"].includes(e)&&console.warn(`Warning: Key "${e}" is not possible to edit in Locomotive Scroll.`);Object.assign(this,{lenisOptions:t,modularInstance:e,triggerRootMargin:i,rafRootMargin:s,autoResize:r,autoStart:n,scrollCallback:o,init
1CustomTicker:l,destroyCustomTicker:a}),this._onRenderBind=this._onRender.bind(this),this._onScrollToBind=this._onScrollTo.bind(this),this._onResizeBind=this._onResize.bind(this),this.rafPlaying=!1,this._init()}_init(){var t;this.lenisInstance=new y(w({},this.lenisOptions,{wrapper:window,content:document.documentElement,infinite:!1})),null==(t=this.lenisInstance)||t.on("scroll",this.scrollCallback),document.documentElement.setAttribute("data-scroll-orientation",this.lenisInstance.options.orientation),requestAnimationFrame(()=>{this.coreInstance=new C({$el:this.lenisInstance.rootElement,modularInstance:this.modularInstance,triggerRootMargin:this.triggerRootMargin,rafRootMargin:this.rafRootMargin,scrollOrientation:this.lenisInstance.options.orientation}),this._bindEvents(),this.initCustomTicker&&!this.destroyCustomTicker?console.warn("initCustomTicker callback is declared, but destroyCustomTicker is not. Please pay attention. It could cause trouble."):!this.initCustomTicker&&this.destroyCustomTicker&&console.warn("destroyCustomTicker callback is declared, but initCustomTicker is not. Please pay attention. It could cause trouble."),this.autoStart&&this.start()})}destroy(){var t;this.stop(),this._unbindEvents(),this.lenisInstance.destroy(),null==(t=this.coreInstance)||t.destroy(),requestAnimationFrame(()=>{var t;null==(t=this.coreInstance)||t.destroy()})}_bindEvents(){this._bindScrollToEvents(),this.autoResize&&("ResizeObserver"in window?this.ROInstance=new O({resizeElements:[document.body],resizeCallback:this._onResizeBind}):window.addEventListener("resize",this._onResizeBind))}_unbindEvents(){this._unbindScrollToEvents(),this.autoResize&&("ResizeObserver"in window?this.ROInstance&&this.ROInstance.destroy():window.removeEventListener("resize",this._onResizeBind))}_bindScrollToEvents(t){let e=t||this.lenisInstance.rootElement,i=null==e?void 0:e.querySelectorAll("[data-scroll-to]");(null==i?void 0:i.length)&&i.forEach(t=>{t.addEventListener("click",this._onScrollToBind,!1)})}_unbindScrollToEvents(t){let e=t||this.lenisInstance.rootElement,i=null==e?void 0:e.querySelectorAll("[data-scroll-to]");(null==i?void 0:i.length)&&i.forEach(t=>{t.removeEventListener("click",this._onScrollToBind,!1)})}_onResize(){requestAnimationFrame(()=>{var t;null==(t=this.coreInstance)||t.onResize({currentScroll:this.lenisInstance.scroll})})}_onRender(){var t,e;null==(t=this.lenisInstance)||t.raf(Date.now()),null==(e=this.coreInstance)||e.onRender({currentScroll:this.lenisInstance.scroll,smooth:this.lenisInstance.options.smoothWheel})}_onScrollTo(t){var e;t.preventDefault();let i=null!=(e=t.currentTarget)?e:null;if(!i)return;let s=i.getAttribute("data-scroll-to-href")||i.getAttribute("href"),r=i.getAttribute("data-scroll-to-offset")||0,n=i.getAttribute("data-scroll-to-duration")||this.lenisInstance.options.duration;s&&this.scrollTo(s,{offset:"string"==typeof r?parseInt(r):r,duration:"string"==typeof n?parseInt(n):n})}start(){var t;this.rafPlaying||(null==(t=this.lenisInstance)||t.start(),this.rafPlaying=!0,this.initCustomTicker?this.initCustomTicker(this._onRenderBind):this._raf())}stop(){var t;this.rafPlaying&&(null==(t=this.lenisInstance)||t.stop(),this.rafPlaying=!1,this.destroyCustomTicker?this.destroyCustomTicker(this._onRenderBind):this.rafInstance&&cancelAnimationFrame(this.rafInstance))}removeScrollElements(t){var e;t?(this._unbindScrollToEvents(t),null==(e=this.coreInstance)||e.removeScrollElements(t)):console.error("Please provide a DOM Element as $oldContainer")}addScrollElements(t){var e;t?(null==(e=this.coreInstance)||e.addScrollElements(t),requestAnimationFrame(()=>{this._bindScrollToEvents(t)})):console.error("Please provide a DOM Element as $newContainer")}resize(){this._onResizeBind()}scrollTo(t,e){var i;null==(i=this.lenisInstance)||i.scrollTo(t,{offset:null==e?void 0:e.offset,lerp:null==e?void 0:e.lerp,duration:null==e?void 0:e.duration,immediate:null==e?void 0:e.immediate,lock:null==e?void 0:e.lock,force:null==e?void 0:e.force,easing:null==e?void 0:e.easing,onComplete:null==e?void 0:e.onComplete})}_raf(){this._onRenderBind(),this.rafInstance=requestAnimationFrame(()=>this._raf())}}var T=i(32382);let k=(0,r.lazy)(()=>Promise.all([i.e(855),i.e(668),i.e(274)]).then(i.bind(i,31274)));function R(t){let{Component:e,pageProps:i}=t,{draftMode:o,token:l}=i,a=(0,n.useRouter)(),c=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let t;return a.pathname.includes("studio")||(t=new _({lenisOptions:{wrapper:window,content:document.documentElement,lerp:.1,duration:1.2,orientation:"vertical",gestureOrientation:"vertical",smoothWheel:!0,smoothTouch:!1,wheelMultiplier:1,touchMultiplier:2,normalizeWheel:!0,easing:t=>Math.min(1,1.001-Math.pow(2,-10*t)),el:c.current,smooth:!0}})),()=>{t&&t.destroy()}},[a]),(0,s.jsx)(T.Z,{children:(0,s.jsx)("div",{"data-scroll-container":!0,ref:c,children:o?(0,s.jsxs)(k,{token:l,children:[(0,s.jsx)(e,{...i}),(0,s.jsx)(d,{})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e,{...i}),(0,s.jsx)(d,{})]})})})}},72256:function(){},82111:function(){},2851:function(){}
1,11163:function(t,e,i){t.exports=i(43079)},34155:function(t){var e,i,s,r=t.exports={};function n(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function l(t){if(e===setTimeout)return setTimeout(t,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(i){try{return e.call(null,t,0)}catch(i){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:n}catch(t){e=n}try{i="function"==typeof clearTimeout?clearTimeout:o}catch(t){i=o}}();var a=[],c=!1,h=-1;function d(){c&&s&&(c=!1,s.length?a=s.concat(a):h=-1,a.length&&u())}function u(){if(!c){var t=l(d);c=!0;for(var e=a.length;e;){for(s=a,a=[];++h<e;)s&&s[h].run();h=-1,e=a.length}s=null,c=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===o||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}r.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];a.push(new p(t,e)),1!==a.length||c||l(u)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(t){return[]},r.binding=function(t){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw Error("process.chdir is not supported")},r.umask=function(){return 0}},87653:function(t,e,i){"use strict";i.d(e,{X:function(){return R}});let s="GraphQL Client",r="An error occurred while fetching from the API. Review 'graphQLErrors' for details.",n="Response returned unexpected Content-Type:",o="An unknown error has occurred. The API did not return a data object or any errors in its response.",l={json:"application/json",multipart:"multipart/mixed"},a="X-SDK-Variant",c="X-SDK-Version",h=[429,503],d=/@(defer)\b/i,u=/boundary="?([^=";]+)"?/i,p="\r\n\r\n";function m(t,e=s){return t.startsWith(`${e}`)?t:`${e}: ${t}`}function f(t){return t instanceof Error?t.message:JSON.stringify(t)}function v(t){return t instanceof Error&&t.cause?t.cause:void 0}function g(t){return t.flatMap(({errors:t})=>t??[])}function y({client:t,retries:e}){if(void 0!==e&&("number"!=typeof e||e<0||e>3))throw Error(`${t}: The provided "retries" value (${e}
1) is invalid - it cannot be less than 0 or greater than 3`)}function w(t,e){return e&&("object"!=typeof e||Array.isArray(e)||"object"==typeof e&&Object.keys(e).length>0)?{[t]:e}:{}}function b([t,...e]){return e.reduce(function t(e,i){return Object.keys(i||{}).reduce((s,r)=>(("object"==typeof i[r]||Array.isArray(i[r]))&&e[r]?s[r]=t(e[r],i[r]):s[r]=i[r],s),Array.isArray(e)?[...e]:{...e})},{...t})}async function S(t){return new Promise(e=>setTimeout(e,t))}async function E(t){let{errors:e,data:i,extensions:s}=await t.json();return{...w("data",i),...w("extensions",s),headers:t.headers,...e||!i?{errors:{networkStatusCode:t.status,message:m(e?r:o),...w("graphQLErrors",e),response:t}}:{}}}async function*I(t){let e=new TextDecoder;if(t.body[Symbol.asyncIterator])for await(let i of t.body)yield e.decode(i);else{let i;let s=t.body.getReader();try{for(;!(i=await s.read()).done;)yield e.decode(i.value)}finally{s.cancel()}}}function C({client:t,currentSupportedApiVersions:e,apiVersion:i,logger:s}){let r=`${t}: the provided apiVersion ("${i}")`,n=`Currently supported API versions: ${e.join(", ")}`;if(!i||"string"!=typeof i)throw Error(`${r} is invalid. ${n}`);let o=i.trim();e.includes(o)||(s?s({type:"Unsupported_Api_Version",content:{apiVersion:i,supportedApiVersions:e}}):console.warn(`${r} is likely deprecated or not supported. ${n}`))}function O(t){let e=3*t-2;return 10===e?e:`0${e}`}function _(t,e,i){let s=e-i;return s<=0?`${t-1}-${O(s+4)}`:`${t}-${O(s)}`}let T="application/json",k="Storefront API Client";function R({storeDomain:t,apiVersion:e,publicAccessToken:i,privateAccessToken:R,clientName:$,retries:A=0,customFetchApi:M,logger:P}){let z=function(){let{year:t,quarter:e,version:i}=function(){let t=new Date,e=t.getUTCMonth(),i=t.getUTCFullYear(),s=Math.floor(e/3+1);return{year:i,quarter:s,version:`${i}-${O(s)}`}}(),s=4===e?`${t+1}-01`:`${t}-${O(e+1)}`;return[_(t,e,3),_(t,e,2),_(t,e,1),i,s,"unstable"]}(),x=function({client:t,storeDomain:e}){try{if(!e||"string"!=typeof e)throw Error();let t=e.trim(),i=t.match(/^https?:/)?t:`https://${t}`,s=new URL(i);return s.protocol="https",s.origin}catch(i){throw Error(`${t}: a valid store domain ("${e}") must be provided`,{cause:i})}}({client:k,storeDomain:t}),L={client:k,currentSupportedApiVersions:z,logger:P};C({...L,apiVersion:e}),function(t,e){if(!t&&!e)throw Error(`${k}: a public or private access token must be provided`);if(t&&e)throw Error(`${k}: only provide either a public or private access token`)}(i,R),function(t){if(t&&"undefined"!=typeof window)throw Error(`${k}: private access tokens and headers should only be used in a server-to-server implementation. Use the public API access token in nonserver environments.`)}(R);let N=t=>{t&&C({...L,apiVersion:t});let i=(t??e).trim();return`${x}/api/${i}/graphql.json`},F={storeDomain:x,apiVersion:e,...i?{publicAccessToken:i}:{privateAccessToken:R},headers:{"Content-Type":T,Accept:T,"X-SDK-Variant":"storefront-api-client","X-SDK-Version":"1.0.3",...$?{"X-SDK-Variant-Source":$}:{},...i?{"X-Shopify-Storefront-Access-Token":i}:{"Shopify-Storefront-Private-Token":R}},apiUrl:N(),clientName:$},j=function({headers:t,url:e,customFetchApi:i=fetch,retries:C=0,logger:O}){y({client:s,retries:C});let _={headers:t,url:e,retries:C},T=function(t,{url:e,headers:i,retries:r}){return async(n,o={})=>{let{variables:l,headers:h,url:d,retries:u,signal:p}=o,m=JSON.stringify({query:n,variables:l});y({client:s,retries:u});let f=Object.entries({...i,...h}).reduce((t,[e,i])=>(t[e]=Array.isArray(i)?i.join(", "):i.toString(),t),{});return f[a]||f[c]||(f[a]="shopify-graphql-client",f[c]="1.2.1"),t([d??e,{method:"POST",headers:f,body:m,signal:p}],1,u??r)}}(function({clientLogger:t,customFetchApi:e=fetch,client:i=s,defaultRetryWaitTime:r=1e3,retriableCodes:n=h}){let o=async(s,l,a)=>{let c;let h=l+1,d=a+1;try{if(c=await e(...s),t({type:"HTTP-Response",content:{requestParams:s,response:c}}),!c.ok&&n.includes(c.status)&&h<=d)throw Error();return c}catch(e){if(h<=d){let e=c?.headers.get("Retry-After");return await S(e?parseInt(e,10):r),t({type:"HTTP-Retry",content:{requestParams:s,lastResponse:c,retryAttempt:l,maxRetries:a}}),o(s,h,a)}throw Error(m(`${a>0?`Attempted maximum number of ${a} network retries. Last message - `:""}${f(e)}`,i))}};return o}({customFetchApi:i,clientLogger:t=>{O&&O(t)},defaultRetryWaitTime:1e3}),_),k=async(...t)=>{if(d.test(t[0]))throw Error(m("This operation will result in a streamable response - use requestStream() instead."));try{let e=await T(...t),{status:i,statusText:s}=e,r=e.headers.get("content-type")||"";if(!e.ok)return{errors:{networkStatusCode:i,message:m(s),response:e}};if(!r.includes(l.json))return{errors:{networkStatusCode:i,message:m(`${n} ${r}`),response:e}};return E(e)}catch(t){return{errors:{message:f(t)}}}},R=async(...t)=>{if(!d.test(t[0]))throw Error(m("This operation does not result in a streamable response - use request() instead."));try{let e=await T(...t),{statusText:i}=e;if(!e.ok)throw Error(i,{cause:e});let s=e.headers.get("content-type")||"";switch(!0){case s.includes(l.json):return{async *[Symbol.asyncIterator](){let t=await E(e);yield{...t,hasNext:!1}}};case s.includes(l.multipart):return function(t,e){let i;let s=(e??"").match(u),n=`--${s?s[1]:"-"}`;if(!t.body?.getReader&&!t.body[Symbol.asyncIterator])throw Error("API multipart response did not return an iterable body",{cause:t});let l=I(t),a={};return{async *[Symbol.asyncIterator](){try{let t=!0;for await(let e of{async *[Symbol.asyncIterator](){try{let t="";for await(let e of l)if((t+=e).indexOf(n)>-1){let e=t.lastIndexOf(n),i=t.slice(0,e).split(n).filter(t=>t.trim().length>0).map(t=>t.slice(t.indexOf(p)+p.length).trim());i.length>0&&(yield i),t=t.slice(e+n.length),"--"===t.trim()&&(t="")}}catch(t){throw Error(`Error occured while processing stream payload - ${f(t)}`)}}}){let s=e.map(t=>{try{return JSON.parse(t)}catch(t){throw Error(`Error in parsing multipart response - ${f(t)}`)}}).map(t=>{let{data:e,incremental:i,hasNext:s,extensions:r,errors:n}=t;if(!i)return{data:e||{},...w("errors",n),...w("extensions",r),hasNext:s};let o=i.map(({data:t,path:e,errors:i})=>({data:t&&e?function t(e,i){if(0===e.length)return i;let s={[e.pop()]:i};return 0===e.length?s:t(e,s)}(e,t):{},...w("errors",i)}));return{data:1===o.length?o[0].data:b([...o.map(({data:t})=>t)]),...w("errors",g(o)),hasNext:s}});i=s.find(t=>t.extensions)?.extensions??i;let n=g(s);a=b([a,...s.map(({data:t})=>t)]),t=s.slice(-1)[0].hasNext,function(t,e){if(t.length>0)throw Error(r,{cause:{graphQLErrors:t}});if(0===Object.keys(e).length)throw Error(o)}(n,a),yield{...w("data",a),...w("extensions",i),hasNext:t}}if(t)throw Error("Response stream terminated unexpectedly")}catch(s){let e=v(s);yield{...w("data",a),...w("extensions",i),errors:{message:m(f(s)),networkStatusCode:t.status,...w("graphQLErrors",e?.graphQLErrors),response:t},hasNext:!1}}}}}(e,s);default:throw Error(`${n} ${s}`,{cause:e})}}catch(t){return{async *[Symbol.asyncIterator](){let e=v(t);yield{errors:{message:m(f(t)),...w("networkStatusCode",e?.status),...w("response",e)},hasNext:!1}}}}};return{config:_,fetch:T,request:k,requestStream:R}}({headers:F.headers,url:F.apiUrl,retries:A,customFetchApi:M,logger:P}),U=t=>({...t??{},...F.headers}),q=t=>t?N(t):F.apiUrl,D=function({getHeaders:t,getApiUrl:e}){return(i,s)=>{let r=[i];if(s&&Object.keys(s).length>0){let{variables:i,apiVersion:n,headers:o,retries:l}=s;r.push({...i?{variables:i}:{},...o?{headers:t(o)}:{},...n?{url:e(n)}:{},...l?{retries:l}:{}})}return r}}({getHeaders:U,getApiUrl:q});return Object.freeze({config:F,getHeaders:U,getApiUrl:q,fetch:(...t)=>j.fetch(...D(...t)),request:(...t)=>j.request(...D(...t)),requestStream:(...t)=>j.requestStream(...D(...t))})}}},function(t){var e=function(e){return t(t.s=e)};t.O(0,[774,179],function(){return e(6840),e(43079)}),_N_E=t.O()}]);
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.