PageSourceSearch

https://www.nuzest.com.au/cdn/shop/t/85/assets/vendor-swup-DffxvhUk.js

js nuzest.com.au collected 2026-10-05 07:47:06 UTC 39,363 bytes, 2 lines download raw bytes

1import{d as G,i as X}from"./vendor-utils-0Rj-ygjs.js";function k(){return k=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(s[o]=e[o])}return s},k.apply(this,arguments)}const j=s=>String(s).split(".").map(t=>String(parseInt(t||"0",10))).concat(["0","0"]).slice(0,3).join(".");let U=class{constructor(){this.isSwupPlugin=!0,this.swup=void 0,this.version=void 0,this.requires={},this.handlersToUnregister=[]}mount(){}unmount(){this.handlersToUnregister.forEach(t=>t()),this.handlersToUnregister=[]}_beforeMount(){if(!this.name)throw new Error("You must define a name of plugin when creating a class.")}_afterUnmount(){}_checkRequirements(){return typeof this.requires!="object"||Object.entries(this.requires).forEach(([t,e])=>{if(!(function(o,i,n){const r=(function(a,l){var c;if(a==="swup")return(c=l.version)!=null?c:"";{var h;const u=l.findPlugin(a);return(h=u?.version)!=null?h:""}})(o,n);return!!r&&((a,l)=>l.every(c=>{const[,h,u]=c.match(/^([\D]+)?(.*)$/)||[];var d,f;return((m,p)=>{const g={"":w=>w===0,">":w=>w>0,">=":w=>w>=0,"<":w=>w<0,"<=":w=>w<=0};return(g[p]||g[""])(m)})((f=u,d=j(d=a),f=j(f),d.localeCompare(f,void 0,{numeric:!0})),h||">=")}))(r,i)})(t,e=Array.isArray(e)?e:[e],this.swup)){const o=`${t} ${e.join(", ")}`;throw new Error(`Plugin version mismatch: ${this.name} requires ${o}`)}}),!0}on(t,e,o={}){var i;e=!(i=e).name.startsWith("bound ")||i.hasOwnProperty("prototype")?e.bind(this):e;const n=this.swup.hooks.on(t,e,o);return this.handlersToUnregister.push(n),n}once(t,e,o={}){return this.on(t,e,k({},o,{once:!0}))}before(t,e,o={}){return this.on(t,e,k({},o,{before:!0}))}replace(t,e,o={}){return this.on(t,e,k({},o,{replace:!0}))}off(t,e){return this.swup.hooks.off(t,e)}};function v(){return v=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)({}).hasOwnProperty.call(e,o)&&(s[o]=e[o])}return s},v.apply(null,arguments)}const F=(s,t)=>String(s).toLowerCase().replace(/[\s/_.]+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+|-+$/g,"")||t||"",S=({hash:s}={})=>window.location.pathname+window.location.search+(s?window.location.hash:""),J=(s,t={})=>{const e=v({url:s=s||S({hash:!0}),random:Math.random(),source:"swup"},t);window.history.pushState(e,"",s)},P=(s=null,t={})=>{s=s||S({hash:!0});const e=v({},window.history.state||{},{url:s,random:Math.random(),source:"swup"},t);window.history.replaceState(e,"",s)},Q=(s,t,e,o)=>{const i=new AbortController;return o=v({},o,{signal:i.signal}),G(s,t,e,o),{destroy:()=>i.abort()}};let y=class L extends URL{constructor(t,e=document.baseURI){super(t.toString(),e),Object.setPrototypeOf(this,L.prototype)}get url(){return this.pathname+this.search}static fromElement(t){const e=t.getAttribute("href")||t.getAttribute("xlink:href")||"";return new L(e)}static fromUrl(t){return new L(t)}};class A extends Error{constructor(t,e){super(t),this.url=void 0,this.status=void 0,this.aborted=void 0,this.timedOut=void 0,this.name="FetchError",this.url=e.url,this.status=e.status,this.aborted=e.aborted||!1,this.timedOut=e.timedOut||!1}}async function Z(s,t={}){var e;s=y.fromUrl(s).url;const{visit:o=this.visit}=t,i=v({},this.options.requestHeaders,t.headers),n=(e=t.timeout)!=null?e:this.options.timeout,r=new AbortController,{signal:a}=r;t=v({},t,{headers:i,signal:a});let l,c=!1,h=null;n&&n>0&&(h=setTimeout(()=>{c=!0,r.abort("timeout")},n));try{l=await this.hooks.call("fetch:request",o,{url:s,options:t},(g,{url:w,options:b})=>fetch(w,b)),h&&clearTimeout(h)}catch(g){throw c?(this.hooks.call("fetch:timeout",o,{url:s}),new A(`Request timed out: ${s}`,{url:s,timedOut:c})):g?.name==="AbortError"||a.aborted?new A(`Request aborted: ${s}`,{url:s,aborted:!0}):g}const{status:u,url:d}=l,f=await l.text();if(u===500)throw this.hooks.call("fetch:error",o,{status:u,response:l,url:d}),new A(`Server error: ${d}`,{status:u,url:d});if(!f)throw new A(`Empty response: ${d}`,{status:u,url:d});const{url:m}=y.fromUrl(d),p={url:m,html:f};return!o.cache.write||t.method&&t.method!=="GET"||s!==m||this.cache.set(p.url,p),p}class tt{constructor(t){this.swup=void 0,this.pages=new Map,this.swup=t}get size(){return this.pages.size}get all(){const t=new Map;
vendor: 6,526 bytes, line 1
1return this.pages.forEach((e,o)=>{t.set(o,v({},e))}),t}has(t){return this.pages.has(this.resolve(t))}get(t){const e=this.pages.get(this.resolve(t));return e&&v({},e)}set(t,e){e=v({},e,{url:t=this.resolve(t)}),this.pages.set(t,e),this.swup.hooks.callSync("cache:set",void 0,{page:e})}update(t,e){t=this.resolve(t);const o=v({},this.get(t),e,{url:t});this.pages.set(t,o)}delete(t){this.pages.delete(this.resolve(t))}clear(){this.pages.clear(),this.swup.hooks.callSync("cache:clear",void 0,void 0)}prune(t){this.pages.forEach((e,o)=>{t(o,e)&&this.delete(o)})}resolve(t){const{url:e}=y.fromUrl(t);return this.swup.resolveUrl(e)}}const V=(s,t=document)=>t.querySelector(s),E=(s,t=document)=>Array.from(t.querySelectorAll(s)),K=()=>new Promise(s=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{s()})})});function z(s){return!!s&&(typeof s=="object"||typeof s=="function")&&typeof s.then=="function"}function et(s,t=[]){return new Promise((e,o)=>{const i=s(...t);z(i)?i.then(e,o):e(i)})}function I(s,t){const e=s?.closest(`[${t}]`);return e!=null&&e.hasAttribute(t)?e?.getAttribute(t)||!0:void 0}class st{constructor(t){this.swup=void 0,this.swupClasses=["to-","is-changing","is-rendering","is-popstate","is-animating","is-leaving"],this.swup=t}get selectors(){const{scope:t}=this.swup.visit.animation;return t==="containers"?this.swup.visit.containers:t==="html"?["html"]:Array.isArray(t)?t:[]}get selector(){return this.selectors.join(",")}get targets(){return this.selector.trim()?E(this.selector):[]}add(...t){this.targets.forEach(e=>e.classList.add(...t))}remove(...t){this.targets.forEach(e=>e.classList.remove(...t))}clear(){this.targets.forEach(t=>{const e=t.className.split(" ").filter(o=>this.isSwupClass(o));t.classList.remove(...e)})}isSwupClass(t){return this.swupClasses.some(e=>t.startsWith(e))}}class Y{constructor(t,e){this.id=void 0,this.state=void 0,this.from=void 0,this.to=void 0,this.containers=void 0,this.animation=void 0,this.trigger=void 0,this.cache=void 0,this.history=void 0,this.scroll=void 0,this.meta=void 0;const{to:o,from:i,hash:n,el:r,event:a}=e;this.id=Math.random(),this.state=1,this.from={url:i??t.location.url,hash:t.location.hash},this.to={url:o,hash:n},this.containers=t.options.containers,this.animation={animate:!0,wait:!1,name:void 0,native:t.options.native,scope:t.options.animationScope,selector:t.options.animationSelector},this.trigger={el:r,event:a},this.cache={read:t.options.cache,write:t.options.cache},this.history={action:"push",popstate:!1,direction:void 0},this.scroll={reset:!0,target:void 0},this.meta={}}advance(t){this.state<t&&(this.state=t)}abort(){this.state=8}get done(){return this.state>=7}}function ot(s){return new Y(this,s)}class it{constructor(t){this.swup=void 0,this.registry=new Map,this.hooks=["animation:out:start","animation:out:await","animation:out:end","animation:in:start","animation:in:await","animation:in:end","animation:skip","cache:clear","cache:set","content:replace","content:scroll","enable","disable","fetch:request","fetch:error","fetch:timeout","history:popstate","link:click","link:self","link:anchor","link:newtab","page:load","page:view","scroll:top","scroll:anchor","visit:start","visit:transition","visit:abort","visit:end"],this.swup=t,this.init()}init(){this.hooks.forEach(t=>this.create(t))}create(t){this.registry.has(t)||this.registry.set(t,new Map)}exists(t){return this.registry.has(t)}get(t){const e=this.registry.get(t);if(e)return e;console.error(`Unknown hook '${t}'`)}clear(){this.registry.forEach(t=>t.clear())}on(t,e,o={}){const i=this.get(t);if(!i)return console.warn(`Hook '${t}' not found.`),()=>{};const n=v({},o,{id:i.size+1,hook:t,handler:e});return i.set(e,n),()=>this.off(t,e)}before(t,e,o={}){return this.on(t,e,v({},o,{before:!0}))}replace(t,e,o={}){return this.on(t,e,v({},o,{replace:!0}))}once(t,e,o={}){return this.on(t,e,v({},o,{once:!0}))}off(t,e){const o=this.get(t);o&&e?o.delete(e)||console.warn(`Handler for hook '${t}' not found.`):o&&o.clear()}async call(t,e,o,i){const[n,r,a]=this.parseCallArgs(t,e,o,i),{before:l,handler:c,after:h}=this.getHandlers(t,a);await this.run(l,n,r);const[u]=await this.run(c,n,r,!0);return await this.run(h,n,r),this.dispatchDomEvent(t,n,r),u}callSync(t,e,o,i){const[n,r,a]=this.parseCallArgs(t,e,o,i),{before:l,handler:c,after:h}=this.getHandlers(t,a);this.runSync(l,n,r);const[u]=this.runSync(c,n,r,!0);return this.runSync(h,n,r),this.dispatchDomEvent(t,n,r),u}parseCallArgs(t,e,o,i){return e instanceof Y||typeof e!="object"&&typeof o!="function"?[e,o,i]:[void 0,e,o]}async run(t,e=this.swup.visit,o,i=!1){const n=[];for(const{hook:r,handler:a,defaultHandler:l,once:c}of t)if(e==null||!e.done){c&&this.off(r,a);try{const h=await et(a,[e,o,l]);n.push(h)}catch(h){if(i)throw h;console.error(`Error in hook '${r}':`,h)}}return n}runSync(t,e=this.swup.visit,o,i=!1){const n=[];for(const{hook:r,handler:a,defaultHandler:l,once:c}of t)if(e==null||!e.done){c&&this.off(r,a);try{const h=a(e,o,l);n.push(h),z(h)&&console.warn(`Swup will not await Promises in handler for synchronous hook '${r}'.`)}catch(h){if(i)throw h;console.error(`Error in hook '${r}':`,h)}}return n}getHandlers(t,e){const o=this.get(t);if(!o)return{found:!1,before:[],handler:[],after:[],replaced:!1};const i=Array.from(o.values()),n=this.sortRegistrations,r=i.filter(({before:u,replace:d})=>u&&!d).sort(n),a=i.filter(({replace:u})=>u).filter(u=>!0).sort(n),l=i.filter(({before:u,replace:d})=>!u&&!d).sort(n),c=a.length>0;let h=[];if(e&&(h=[{id:0,hook:t,handler:e}],c)){const u=a.length-1,{handler:d,once:f}=a[u],m=p=>{const g=a[p-1];return g?(w,b)=>g.handler(w,b,m(p-1)):e};h=[{id:0,hook:t,once:f,handler:d,defaultHandler:m(u)}]}return{found:!0,before:r,handler:h,after:l,replaced:c}}sortRegistrations(t,e){var o,i;return((o=t.priority)!=null?o:0)-((i=e.priority)!=null?i:0)||t.id-e.id||0}dispatchDomEvent(t,e,o){if(e!=null&&e.done)return;const i={hook:t,args:o,visit:e||this.swup.visit};document.dispatchEvent(new CustomEvent("swup:any",{detail:i,bubbles:!0})),document.dispatchEvent(new CustomEvent(`swup:${t}`,{detail:i,bubbles:!0}))}parseName(t){const[e,...o]=t.split(".");return[e,o.reduce((i,n)=>v({},i,{[n]:!0}),{})]}}const nt=s=>{if(s&&s.charAt(0)==="#"&&(s=s.substring(1)),!s)return null;const t=decodeURIComponent(s);let e=document.getElementById(s)||document.getElementById(t)||V(`a[name='${CSS.escape(s)}']`)||V(`a[name='${CSS.escape(t)}']`);return e||s!=="top"||(e=document.body),e},T="transition",x="animation";async function rt({selector:s,elements:t}){if(s===!1&&!t)return;let e=[];
1if(t)e=Array.from(t);else if(s&&(e=E(s,document.body),!e.length))return void console.warn(`[swup] No elements found matching animationSelector \`${s}\``);const o=e.map(i=>(function(n){const{type:r,timeout:a,propCount:l}=(function(c){const h=window.getComputedStyle(c),u=C(h,`${T}Delay`),d=C(h,`${T}Duration`),f=D(u,d),m=C(h,`${x}Delay`),p=C(h,`${x}Duration`),g=D(m,p),w=Math.max(f,g),b=w>0?f>g?T:x:null;return{type:b,timeout:w,propCount:b?b===T?d.length:p.length:0}})(n);return!(!r||!a)&&new Promise(c=>{const h=`${r}end`,u=performance.now();let d=0;const f=()=>{n.removeEventListener(h,m),c()},m=p=>{p.target===n&&((performance.now()-u)/1e3<p.elapsedTime||++d>=l&&f())};setTimeout(()=>{d<l&&f()},a+1),n.addEventListener(h,m)})})(i));o.filter(Boolean).length>0?await Promise.all(o):s&&console.warn(`[swup] No CSS animation duration defined on elements matching \`${s}\``)}function C(s,t){return(s[t]||"").split(", ")}function D(s,t){for(;s.length<t.length;)s=s.concat(s);return Math.max(...t.map((e,o)=>M(e)+M(s[o])))}function M(s){return 1e3*parseFloat(s)}function at(s,t={},e={}){if(typeof s!="string")throw new Error("swup.navigate() requires a URL parameter");if(this.shouldIgnoreVisit(s,{el:e.el,event:e.event}))return void window.location.assign(s);const{url:o,hash:i}=y.fromUrl(s),n=this.createVisit(v({},e,{to:o,hash:i}));this.performNavigation(n,t)}async function lt(s,t={}){if(this.navigating){if(this.visit.state>=6)return s.state=2,void(this.onVisitEnd=()=>this.performNavigation(s,t));await this.hooks.call("visit:abort",this.visit,void 0),delete this.visit.to.document,this.visit.state=8}this.navigating=!0,this.visit=s;const{el:e}=s.trigger;t.referrer=t.referrer||this.location.url,t.animate===!1&&(s.animation.animate=!1),s.animation.animate||this.classes.clear();const o=t.history||I(e,"data-swup-history");typeof o=="string"&&["push","replace"].includes(o)&&(s.history.action=o);const i=t.animation||I(e,"data-swup-animation");var n,r;typeof i=="string"&&(s.animation.name=i),s.meta=t.meta||{},typeof t.cache=="object"?(s.cache.read=(n=t.cache.read)!=null?n:s.cache.read,s.cache.write=(r=t.cache.write)!=null?r:s.cache.write):t.cache!==void 0&&(s.cache={read:!!t.cache,write:!!t.cache}),delete t.cache;try{await this.hooks.call("visit:start",s,void 0),s.state=3;const a=this.hooks.call("page:load",s,{options:t},async(c,h)=>{let u;return c.cache.read&&(u=this.cache.get(c.to.url)),h.page=u||await this.fetchPage(c.to.url,h.options),h.cache=!!u,h.page});a.then(({html:c})=>{s.advance(5),s.to.html=c,s.to.document=new DOMParser().parseFromString(c,"text/html")});const l=s.to.url+s.to.hash;if(s.history.popstate||(s.history.action==="replace"||s.to.url===this.location.url?P(l):(this.currentHistoryIndex++,J(l,{index:this.currentHistoryIndex}))),this.location=y.fromUrl(l),s.history.popstate&&this.classes.add("is-popstate"),s.animation.name&&this.classes.add(`to-${F(s.animation.name)}`),s.animation.wait&&await a,s.done||(await this.hooks.call("visit:transition",s,void 0,async()=>{if(!s.animation.animate)return await this.hooks.call("animation:skip",void 0),void await this.renderPage(s,await a);s.advance(4),await this.animatePageOut(s),s.animation.native&&document.startViewTransition?await document.startViewTransition(async()=>await this.renderPage(s,await a)).finished:await this.renderPage(s,await a),await this.animatePageIn(s)}),s.done))return;await this.hooks.call("visit:end",s,void 0,()=>this.classes.clear()),s.state=7,this.navigating=!1,this.onVisitEnd&&(this.onVisitEnd(),this.onVisitEnd=void 0)}catch(a){if(!a||a!=null&&a.aborted)return void(s.state=8);s.state=9,console.error(a),this.options.skipPopStateHandling=()=>(window.location.assign(s.to.url+s.to.hash),!0),window.history.back()}finally{delete s.to.document}}const ct=async function(s){await this.hooks.call("animation:out:start",s,void 0,()=>{this.classes.add("is-changing","is-animating","is-leaving")}),await this.hooks.call("animation:out:await",s,{skip:!1},(t,{skip:e})=>{if(!e)return this.awaitAnimations({selector:t.animation.selector})}),await this.hooks.call("animation:out:end",s,void 0)},ht=function(s){var t;const e=s.to.document;if(!e)return!1;const o=((t=e.querySelector("title"))==null?void 0:t.innerText)||"";document.title=o;const i=E('[data-swup-persist]:not([data-swup-persist=""])'),n=s.containers.map(r=>{const a=document.querySelector(r),l=e.querySelector(r);return a&&l?(a.replaceWith(l.cloneNode(!0)),!0):(a||console.warn(`[swup] Container missing in current document: ${r}`),l||console.warn(`[swup] Container missing in incoming document: ${r}`),!1)}
vendor: 5,296 bytes, line 1
1).filter(Boolean);return i.forEach(r=>{const a=r.getAttribute("data-swup-persist"),l=V(`[data-swup-persist="${a}"]`);l&&l!==r&&l.replaceWith(r)}),n.length===s.containers.length},ut=function(s){const t={behavior:"auto"},{target:e,reset:o}=s.scroll,i=e??s.to.hash;let n=!1;return i&&(n=this.hooks.callSync("scroll:anchor",s,{hash:i,options:t},(r,{hash:a,options:l})=>{const c=this.getAnchorElement(a);return c&&c.scrollIntoView(l),!!c})),o&&!n&&(n=this.hooks.callSync("scroll:top",s,{options:t},(r,{options:a})=>(window.scrollTo(v({top:0,left:0},a)),!0))),n},dt=async function(s){if(s.done)return;const t=this.hooks.call("animation:in:await",s,{skip:!1},(e,{skip:o})=>{if(!o)return this.awaitAnimations({selector:e.animation.selector})});await K(),await this.hooks.call("animation:in:start",s,void 0,()=>{this.classes.remove("is-animating")}),await t,await this.hooks.call("animation:in:end",s,void 0)},pt=async function(s,t){if(s.done)return;s.advance(6);const{url:e}=t;this.isSameResolvedUrl(S(),e)||(P(e),this.location=y.fromUrl(e),s.to.url=this.location.url,s.to.hash=this.location.hash),await this.hooks.call("content:replace",s,{page:t},(o,{})=>{if(this.classes.remove("is-leaving"),o.animation.animate&&this.classes.add("is-rendering"),!this.replaceContent(o))throw new Error("[swup] Container mismatch, aborting");o.animation.animate&&(this.classes.add("is-changing","is-animating","is-rendering"),o.animation.name&&this.classes.add(`to-${F(o.animation.name)}`))}),await this.hooks.call("content:scroll",s,void 0,()=>this.scrollToContent(s)),await this.hooks.call("page:view",s,{url:this.location.url,title:document.title})},mt=function(s){var t;if(t=s,!!(t!=null&&t.isSwupPlugin)){if(s.swup=this,!s._checkRequirements||s._checkRequirements())return s._beforeMount&&s._beforeMount(),s.mount(),this.plugins.push(s),this.plugins}else console.error("Not a swup plugin instance",s)};function ft(s){const t=this.findPlugin(s);if(t)return t.unmount(),t._afterUnmount&&t._afterUnmount(),this.plugins=this.plugins.filter(e=>e!==t),this.plugins;console.error("No such plugin",t)}function gt(s){return this.plugins.find(t=>t===s||t.name===s||t.name===`Swup${String(s)}`)}function wt(s){if(typeof this.options.resolveUrl!="function")return console.warn("[swup] options.resolveUrl expects a callback function."),s;const t=this.options.resolveUrl(s);return t&&typeof t=="string"?t.startsWith("//")||t.startsWith("http")?(console.warn("[swup] options.resolveUrl needs to return a relative url"),s):t:(console.warn("[swup] options.resolveUrl needs to return a url"),s)}function vt(s,t){return this.resolveUrl(s)===this.resolveUrl(t)}const yt={animateHistoryBrowsing:!1,animationSelector:'[class*="transition-"]',animationScope:"html",cache:!0,containers:["#swup"],hooks:{},ignoreVisit:(s,{el:t}={})=>!(t==null||!t.closest("[data-no-swup]")),linkSelector:"a[href]",linkToSelf:"scroll",native:!1,plugins:[],resolveUrl:s=>s,requestHeaders:{"X-Requested-With":"swup",Accept:"text/html, application/xhtml+xml"},skipPopStateHandling:s=>{var t;return((t=s.state)==null?void 0:t.source)!=="swup"},timeout:0};class Et{get currentPageUrl(){return this.location.url}constructor(t={}){var e,o;this.version="4.8.1",this.options=void 0,this.defaults=yt,this.plugins=[],this.visit=void 0,this.cache=void 0,this.hooks=void 0,this.classes=void 0,this.location=y.fromUrl(window.location.href),this.currentHistoryIndex=void 0,this.clickDelegate=void 0,this.navigating=!1,this.onVisitEnd=void 0,this.use=mt,this.unuse=ft,this.findPlugin=gt,this.log=()=>{},this.navigate=at,this.performNavigation=lt,this.createVisit=ot,this.delegateEvent=Q,this.fetchPage=Z,this.awaitAnimations=rt,this.renderPage=pt,this.replaceContent=ht,this.animatePageIn=dt,this.animatePageOut=ct,this.scrollToContent=ut,this.getAnchorElement=nt,this.getCurrentUrl=S,this.resolveUrl=wt,this.isSameResolvedUrl=vt,this.options=v({},this.defaults,t),this.handleLinkClick=this.handleLinkClick.bind(this),this.handlePopState=this.handlePopState.bind(this),this.cache=new tt(this),this.classes=new st(this),this.hooks=new it(this),this.visit=this.createVisit({to:""}),this.currentHistoryIndex=(e=(o=window.history.state)==null?void 0:o.index)!=null?e:1,this.enable()}async enable(){var t;const{linkSelector:e}=this.options;this.clickDelegate=this.delegateEvent(e,"click",this.handleLinkClick),window.addEventListener("popstate",this.handlePopState),this.options.animateHistoryBrowsing&&(window.history.scrollRestoration="manual"),this.options.native=this.options.native&&!!document.startViewTransition,this.options.plugins.forEach(o=>this.use(o));for(const[o,i]of Object.entries(this.options.hooks)){const[n,r]=this.hooks.parseName(o);this.hooks.on(n,i,r)}((t=window.history.state)==null?void 0:t.source)!=="swup"&&P(null,{index:this.currentHistoryIndex}),await K(),await this.hooks.call("enable",void 0,void 0,()=>{const o=document.documentElement;o.classList.add("swup-enabled"),o.classList.toggle("swup-native",this.options.native)})}async destroy(){this.clickDelegate.destroy(),window.removeEventListener("popstate",this.handlePopState),this.cache.clear(),this.options.plugins.forEach(t=>this.unuse(t)),await this.hooks.call("disable",void 0,void 0,()=>{const t=document.documentElement;t.classList.remove("swup-enabled"),t.classList.remove("swup-native")}
1),this.hooks.clear()}shouldIgnoreVisit(t,{el:e,event:o}={}){const{origin:i,url:n,hash:r}=y.fromUrl(t);return i!==window.location.origin||!(!e||!this.triggerWillOpenNewWindow(e))||!!this.options.ignoreVisit(n+r,{el:e,event:o})}handleLinkClick(t){const e=t.delegateTarget,{href:o,url:i,hash:n}=y.fromElement(e);if(this.shouldIgnoreVisit(o,{el:e,event:t}))return;if(this.navigating&&i===this.visit.to.url)return void t.preventDefault();const r=this.createVisit({to:i,hash:n,el:e,event:t});t.metaKey||t.ctrlKey||t.shiftKey||t.altKey?this.hooks.callSync("link:newtab",r,{href:o}):t.button===0&&this.hooks.callSync("link:click",r,{el:e,event:t},()=>{var a;const l=(a=r.from.url)!=null?a:"";t.preventDefault(),i&&i!==l?this.isSameResolvedUrl(i,l)||this.performNavigation(r):n?this.hooks.callSync("link:anchor",r,{hash:n},()=>{P(i+n),this.scrollToContent(r)}):this.hooks.callSync("link:self",r,void 0,()=>{this.options.linkToSelf==="navigate"?this.performNavigation(r):(P(i),this.scrollToContent(r))})})}handlePopState(t){var e,o,i,n;const r=(e=(o=t.state)==null?void 0:o.url)!=null?e:window.location.href;if(this.options.skipPopStateHandling(t)||this.isSameResolvedUrl(S(),this.location.url))return;const{url:a,hash:l}=y.fromUrl(r),c=this.createVisit({to:a,hash:l,event:t});c.history.popstate=!0;const h=(i=(n=t.state)==null?void 0:n.index)!=null?i:0;h&&h!==this.currentHistoryIndex&&(c.history.direction=h-this.currentHistoryIndex>0?"forwards":"backwards",this.currentHistoryIndex=h),c.animation.animate=!1,c.scroll.reset=!1,c.scroll.target=!1,this.options.animateHistoryBrowsing&&(c.animation.animate=!0,c.scroll.reset=!0),this.hooks.callSync("history:popstate",c,{event:t},()=>{this.performNavigation(c)})}triggerWillOpenNewWindow(t){return!!t.matches('[download], [target="_blank"]')}}function O(){return O=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)({}).hasOwnProperty.call(e,o)&&(s[o]=e[o])}return s},O.apply(null,arguments)}function B(){return window.matchMedia("(hover: hover)").matches}function $(s){return!!s&&(s instanceof HTMLAnchorElement||s instanceof SVGAElement)}const N=window.requestIdleCallback||(s=>setTimeout(s,1)),bt=["preloadVisibleLinks"];let At=class extends U{constructor(t={}){var e;super(),e=this,this.name="SwupPreloadPlugin",this.requires={swup:">=4.5"},this.defaults={throttle:5,preloadInitialPage:!0,preloadHoveredLinks:!0,preloadVisibleLinks:{enabled:!1,threshold:.2,delay:500,containers:["body"],ignore:()=>!1}},this.options=void 0,this.queue=void 0,this.preloadObserver=void 0,this.preloadPromises=new Map,this.mouseEnterDelegate=void 0,this.touchStartDelegate=void 0,this.focusDelegate=void 0,this.onPageLoad=(n,r,a)=>{const{url:l}=n.to;return l&&this.preloadPromises.has(l)?this.preloadPromises.get(l):a(n,r)},this.onMouseEnter=async function(n){if(n.target!==n.delegateTarget||!B())return;const r=n.delegateTarget;if(!$(r))return;const{url:a,hash:l}=y.fromElement(r),c=e.swup.createVisit({to:a,hash:l,el:r,event:n});e.swup.hooks.callSync("link:hover",c,{el:r,event:n}),e.preload(r,{priority:!0})},this.onTouchStart=n=>{if(B())return;const r=n.delegateTarget;$(r)&&this.preload(r,{priority:!0})},this.onFocus=n=>{const r=n.delegateTarget;$(r)&&this.preload(r,{priority:!0})};const{preloadVisibleLinks:o}=t,i=(function(n,r){if(n==null)return{};var a={};for(var l in n)if({}.hasOwnProperty.call(n,l)){if(r.includes(l))continue;a[l]=n[l]}return a})(t,bt);this.options=O({},this.defaults,i),typeof o=="object"?this.options.preloadVisibleLinks=O({},this.options.preloadVisibleLinks,{enabled:!0},o):this.options.preloadVisibleLinks.enabled=!!o,this.preload=this.preload.bind(this),this.queue=(function(n=1){const r=[],a=[];let l=0,c=0;function h(){c<n&&l>0&&((a.shift()||r.shift()||(()=>{}))(),l--,c++)}return{add:function(u,d=!1){if(u.__queued){if(!d)return;{const f=r.indexOf(u);if(f>=0){const m=r.splice(f,1);l-=m.length}}}u.__queued=!0,(d?a:r).push(u),l++,l<=1&&h()},next:function(){c--,h()}}})(this.options.throttle)}mount(){const t=this.swup;t.options.cache?(t.hooks.create("page:preload"),t.hooks.create("link:hover"),t.preload=this.preload,t.preloadLinks=this.preloadLinks,this.replace("page:load",this.onPageLoad),this.preloadLinks(),this.on("page:view",()=>this.preloadLinks()),this.options.preloadVisibleLinks.enabled&&(this.preloadVisibleLinks(),this.on("page:view",()=>this.preloadVisibleLinks())),this.options.preloadHoveredLinks&&this.preloadLinksOnAttention(),this.options.preloadInitialPage&&this.preload(S())):console.warn("SwupPreloadPlugin: swup cache needs to be enabled for preloading")}unmount(){var t,e,o;this.swup.preload=void 0,this.swup.preloadLinks=void 0,this.preloadPromises.clear(),(t=this.mouseEnterDelegate)==null||t.destroy(),(e=this.touchStartDelegate)==null||e.destroy(),(o=this.focusDelegate)==null||o.destroy(),this.stopPreloadingVisibleLinks()}async preload(t,e={}){var o;let i,n;const r=(o=e.priority)!=null&&o;if(Array.isArray(t))return Promise.all(t.map(l=>this.preload(l)));if($(t))n=t,{href:i}=y.fromElement(t);else{if(typeof t!="string")return;i=t}if(!i)return;if(this.swup.cache.has(i))return this.swup.cache.get(i);if(this.preloadPromises.has(i))return this.preloadPromises.get(i);if(!this.shouldPreload(i,{el:n}))return;const a=new Promise(l=>{this.queue.add(()=>{this.performPreload(i).catch(()=>{}).then(c=>l(c)).finally(()=>{this.queue.next(),this.preloadPromises.delete(i)})},r)});return this.preloadPromises.set(i,a),a}preloadLinks(){N(()=>{Array.from(document.querySelectorAll("a[data-swup-preload], [data-swup-preload-all] a")).forEac
1h(t=>this.preload(t))})}preloadLinksOnAttention(){const{swup:t}=this,{linkSelector:e}=t.options,o={passive:!0,capture:!0};this.mouseEnterDelegate=t.delegateEvent(e,"mouseenter",this.onMouseEnter,o),this.touchStartDelegate=t.delegateEvent(e,"touchstart",this.onTouchStart,o),this.focusDelegate=t.delegateEvent(e,"focus",this.onFocus,o)}preloadVisibleLinks(){if(this.preloadObserver)return void this.preloadObserver.update();const{threshold:t,delay:e,containers:o}=this.options.preloadVisibleLinks;this.preloadObserver=(function({threshold:i,delay:n,containers:r,callback:a,filter:l}){const c=new Map,h=new IntersectionObserver(m=>{m.forEach(p=>{p.isIntersecting?u(p.target):d(p.target)})},{threshold:i}),u=m=>{var p;const{href:g}=y.fromElement(m),w=(p=c.get(g))!=null?p:new Set;c.set(g,w),w.add(m),setTimeout(()=>{const b=c.get(g);b!=null&&b.size&&(a(m),h.unobserve(m),b.delete(m))},n)},d=m=>{var p;const{href:g}=y.fromElement(m);(p=c.get(g))==null||p.delete(m)},f=()=>{N(()=>{const m=r.map(p=>`${p} a[*|href]`).join(", ");Array.from(document.querySelectorAll(m)).filter(p=>l(p)).forEach(p=>h.observe(p))})};return{start:()=>f(),stop:()=>h.disconnect(),update:()=>(c.clear(),f())}})({threshold:t,delay:e,containers:o,callback:i=>this.preload(i),filter:i=>{if(this.options.preloadVisibleLinks.ignore(i)||!i.matches(this.swup.options.linkSelector))return!1;const{href:n}=y.fromElement(i);return this.shouldPreload(n,{el:i})}}),this.preloadObserver.start()}stopPreloadingVisibleLinks(){this.preloadObserver&&this.preloadObserver.stop()}shouldPreload(t,{el:e}={}){const{url:o,href:i}=y.fromUrl(t);return!(!(function(){if(navigator.connection){var n;if(navigator.connection.saveData||(n=navigator.connection.effectiveType)!=null&&n.endsWith("2g"))return!1}return!0})()||this.swup.cache.has(o)||this.preloadPromises.has(o)||this.swup.shouldIgnoreVisit(i,{el:e})||e&&this.swup.resolveUrl(o)===this.swup.resolveUrl(S()))}async performPreload(t){var e=this;const{url:o}=y.fromUrl(t),i=this.swup.createVisit({to:o});return await this.swup.hooks.call("page:preload",i,{url:o},async function(r,a){return a.page=await e.swup.fetchPage(t,{visit:r}),a.page})}};function q(){return q=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(s[o]=e[o])}return s},q.apply(this,arguments)}function W(s,t){return Object.keys(t).reduce((e,o)=>e.replace(`{${o}}`,t[o]||""),s||"")}class St{constructor(){var t;this.id="swup-announcer",this.style="position:absolute;top:0;left:0;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;white-space:nowrap;word-wrap:normal;width:1px;height:1px;",this.region=void 0,this.region=(t=this.getRegion())!=null?t:this.createRegion()}getRegion(){return document.getElementById(this.id)}createRegion(){const t=(function(e){const o=document.createElement("template");return o.innerHTML=e,o.content.children[0]})(`<p aria-live="assertive" aria-atomic="true" id="${this.id}" style="${this.style}"></p>`);return document.body.appendChild(t),t}announce(t,e=0){return new Promise(o=>{setTimeout(()=>{this.region.textContent===t&&(t=`${t}.`),this.region.textContent="",this.region.textContent=t,o()},e)})}}function _(s){let t;if(t=typeof s=="string"?document.querySelector(s):s,!(t instanceof HTMLElement))return;const e=t.getAttribute("tabindex");t.setAttribute("tabindex","-1"),t.focus({preventScroll:!0}),e!==null&&t.setAttribute("tabindex",e)}let Ct=class extends U{constructor(t={}){super(),this.name="SwupA11yPlugin",this.requires={swup:">=4"},this.defaults={headingSelector:"h1",respectReducedMotion:!0,autofocus:!1,announcements:{visit:"Navigated to: {title}",url:"New page at {url}"}},this.options=void 0,this.announcer=void 0,this.announcementDelay=100,this.rootSelector="body",this.handleAnchorScroll=(e,{hash:o})=>{const i=this.swup.getAnchorElement(o);i instanceof HTMLElement&&_(i)},this.options=q({},this.defaults,t),this.announcer=new St}mount(){this.swup.hooks.create("content:announce"),this.swup.hooks.create("content:focus"),this.before("visit:start",this.prepareVisit),this.on("visit:start",this.markAsBusy),this.on("visit:end",this.unmarkAsBusy),this.on("visit:end",this.focusContent),this.on("visit:end",this.announceContent),this.on("scroll:anchor",this.handleAnchorScroll),this.before("visit:start",this.disableAnimations),this.before("link:self",this.disableAnimations),this.before("link:anchor",this.disableAnimations),this.swup.announce=this.announce.bind(this)}unmount(){this.swup.announce=void 0}async announce(t){await this.announcer.announce(t)}markAsBusy(){document.documentElement.setAttribute("aria-busy","true")}unmarkAsBusy(){document.documentElement.removeAttribute("aria-busy")}prepareVisit(t){t.a11y={announce:void 0,focus:this.rootSelector}}announceContent(t){this.swup.hooks.callSync("content:announce",t,void 0,e=>{e.a11y.announce===void 0&&(e.a11y.announce=this.getPageAnnouncement()),e.a11y.announce&&this.announcer.announce(e.a11y.announce,this.announcementDelay)})}focusContent(t){this.swup.hooks.callSync("content:focus",t,void 0,e=>{e.a11y.focus&&(this.options.autofocus&&(function(){const o=(function(){const i=document.querySelector("body [autofocus]");if(i&&!i.closest('[inert], [aria-disabled], [aria-hidden="true"]'))return i})();return!!o&&(o!==document.activeElement&&o.focus(),!0)})()===!0||_(e.a11y.focus))})}getPageAnnouncement(){const{headingSelector:t,announcements:e}=this.options;return(function({headingSelector:o="h1",announcements:i={}}){var n,r;const a=document.documentElement.lang||"*",{href:l,url:c,pathname:h}=y.fromUrl(window.location.href),u=(n=(r=i[a])!=null?r:i["*"])!=null?n:i;if(typeof u!="object")return;const d=document.querySelector(o);d||console.warn(`SwupA11yPlugin: No main heading (${o}) found on new page`);const f=d?.getAttribute("aria-label")||d?.textContent||document.title||W(u.url,{href:l,url:c,path:h});return W(u.visit,{title:f,href:l,url:c,path:h})})({headingSelector:t,announcements:e})}disableAnimations(t){this.options.respectReducedMotion&&window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(t.animation.animate=!1,t.scroll.animate=!1)}};function R(){return R=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(s[o]=e[o])}return s},R.apply(this,arguments)}class Lt extends U{constructor(t={}){super(),this.name="SwupScrollPlugin",this.requires={swup:">=4.2.0"},this.scrl=void 0,this.defaults={doScrollingRightAway:!1,animateScroll:{betweenPages:!0,samePageWithHash:!0,samePage:!0},scrollFriction:.3,scrollAcceleration:.04,getAnchorElement:void 0,offset:0,scrollContainers:"[data-swup-scroll-container]",shouldResetScrollPosition:()=>!0,markScrollTarget:!1},this.options=void 0,this.cachedScrollPositions={},this.previousScrollRestoration=void 0,this.currentCacheKey=void 0,this.getAnchorElement=(e="")=>typeof this.options.getAnchorElement=="function"?this.options.getAnchorElement(e):this.swup.getAnchorElement(e),this.getOffset=e=>
1e?typeof this.options.offset=="function"?parseInt(String(this.options.offset(e)),10):parseInt(String(this.options.offset),10):0,this.onBeforeLinkToSelf=e=>{e.scroll.animate=this.shouldAnimate("samePage")},this.handleScrollToTop=e=>{var o,i;return(o=(i=this.swup).scrollTo)==null||o.call(i,0,e.scroll.animate),!0},this.onBeforeLinkToAnchor=e=>{e.scroll.animate=this.shouldAnimate("samePageWithHash")},this.handleScrollToAnchor=(e,{hash:o})=>this.maybeScrollToAnchor(o,e.scroll.animate),this.onBeforeVisitStart=e=>{e.scroll.scrolledToContent=!1,e.scroll.animate=this.shouldAnimate("betweenPages")},this.onVisitStart=e=>{var o;this.cacheScrollPositions(e.from.url),this.maybeResetScrollPositions(e);const i=(o=e.scroll.target)!=null?o:e.to.hash;e.scroll.animate&&this.options.doScrollingRightAway&&!i&&this.doScrollingBetweenPages(e)},this.handleScrollToContent=e=>{e.scroll.scrolledToContent||this.doScrollingBetweenPages(e),this.restoreScrollContainers(e.to.url)},this.doScrollingBetweenPages=e=>{var o,i;if(e.history.popstate&&!e.animation.animate)return;const n=(o=e.scroll.target)!=null?o:e.to.hash;if(n&&this.maybeScrollToAnchor(n,e.scroll.animate)||!e.scroll.reset)return;const r=this.getCachedScrollPositions(e.to.url),a=(r==null||(i=r.window)==null?void 0:i.top)||0;requestAnimationFrame(()=>{var l,c;return(l=(c=this.swup).scrollTo)==null?void 0:l.call(c,a,e.scroll.animate)}),e.scroll.scrolledToContent=!0},this.maybeResetScrollPositions=e=>{const{popstate:o}=e.history,{url:i}=e.to,{el:n}=e.trigger;o||n&&!this.options.shouldResetScrollPosition(n)||this.resetScrollPositions(i)},this.options=R({},this.defaults,t)}mount(){const t=this.swup;t.hooks.create("scroll:start"),t.hooks.create("scroll:end");const e=this.swup.createVisit({to:this.swup.currentPageUrl});this.scrl=new X({onStart:()=>t.hooks.callSync("scroll:start",e,void 0),onEnd:()=>t.hooks.callSync("scroll:end",e,void 0),onCancel:()=>t.hooks.callSync("scroll:end",e,void 0),friction:this.options.scrollFriction,acceleration:this.options.scrollAcceleration}),t.scrollTo=(o,i=!0)=>{i?this.scrl.scrollTo(o):(t.hooks.callSync("scroll:start",e,void 0),window.scrollTo(0,o),t.hooks.callSync("scroll:end",e,void 0))},this.previousScrollRestoration=window.history.scrollRestoration,t.options.animateHistoryBrowsing&&(window.history.scrollRestoration="manual"),this.updateScrollTarget=this.updateScrollTarget.bind(this),this.options.markScrollTarget&&(window.addEventListener("popstate",this.updateScrollTarget),window.addEventListener("hashchange",this.updateScrollTarget),this.on("page:view",this.updateScrollTarget),this.on("link:anchor",this.updateScrollTarget),this.on("link:self",this.updateScrollTarget),this.updateScrollTarget()),this.before("visit:start",this.onBeforeVisitStart,{priority:-1}),this.on("visit:start",this.onVisitStart,{priority:1}),this.replace("content:scroll",this.handleScrollToContent),this.before("link:self",this.onBeforeLinkToSelf,{priority:-1}),this.replace("scroll:top",this.handleScrollToTop),this.before("link:anchor",this.onBeforeLinkToAnchor,{priority:-1}),this.replace("scroll:anchor",this.handleScrollToAnchor)}unmount(){super.unmount(),this.previousScrollRestoration&&(window.history.scrollRestoration=this.previousScrollRestoration),window.removeEventListener("popstate",this.updateScrollTarget),window.removeEventListener("hashchange",this.updateScrollTarget),this.cachedScrollPositions={},delete this.swup.scrollTo,delete this.scrl}shouldAnimate(t){return typeof this.options.animateScroll=="boolean"?this.options.animateScroll:this.options.animateScroll[t]}maybeScrollToAnchor(t,e=!1){var o,i;if(!t)return!1;const n=this.getAnchorElement(t);if(!n)return console.warn(`Anchor target ${t} not found`),!1;if(!(n instanceof Element))return console.warn(`Anchor target ${t} is not a DOM node`),!1;const{top:r}=n.getBoundingClientRect(),a=r+window.scrollY-this.getOffset(n);return(o=(i=this.swup).scrollTo)==null||o.call(i,a,e),!0}cacheScrollPositions(t){const e=this.swup.resolveUrl(t),o=E(this.options.scrollContainers).map(n=>({top:n.scrollTop,left:n.scrollLeft})),i={window:{top:window.scrollY,left:window.scrollX},containers:o};this.cachedScrollPositions[e]=i}resetScrollPositions(t){const e=this.swup.resolveUrl(t);delete this.cachedScrollPositions[e]}getCachedScrollPositions(t){const e=this.swup.resolveUrl(t);return this.cachedScrollPositions[e]}restoreScrollContainers(t){const e=this.getCachedScrollPositions(t);
1e&&e.containers.length!==0&&E(this.options.scrollContainers).forEach((o,i)=>{const n=e.containers[i];n!=null&&(o.scrollTop=n.top,o.scrollLeft=n.left)})}updateScrollTarget(){var t;const{hash:e}=window.location,o=document.querySelector("[data-swup-scroll-target]");let i=this.getAnchorElement(e);i instanceof HTMLBodyElement&&(i=null),o!==i&&(o?.removeAttribute("data-swup-scroll-target"),(t=i)==null||t.setAttribute("data-swup-scroll-target",""))}}function H(){return H=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(s[o]=e[o])}return s},H.apply(this,arguments)}class Ot extends U{constructor(t={}){super(),this.name="SwupScriptsPlugin",this.requires={swup:">=4"},this.defaults={head:!0,body:!0,optin:!1},this.options=void 0,this.options=H({},this.defaults,t)}mount(){this.on("content:replace",this.runScripts)}runScripts(){const{head:t,body:e,optin:o}=this.options,i=this.getScope({head:t,body:e});if(!i)return;const n=Array.from(i.querySelectorAll(o?"script[data-swup-reload-script]":"script:not([data-swup-ignore-script])"));n.forEach(r=>this.runScript(r)),this.swup.log(`Executed ${n.length} scripts.`)}runScript(t){const e=document.createElement("script");for(const{name:o,value:i}of t.attributes)e.setAttribute(o,i);return e.textContent=t.textContent,t.replaceWith(e),e}getScope({head:t,body:e}){return t&&e?document:t?document.head:e?document.body:null}}export{Et as _,Ot as a,Lt as b,P as c,At as l,Ct as r};
2//# sourceMappingURL=/cdn/shop/t/85/assets/vendor-swup-DffxvhUk.js.map

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.