uweb/script/doc.js

27 lines
146 KiB
JavaScript
Raw Normal View History

2018-12-11 03:23:39 +00:00
/*!
* hexo-theme-doc - 1.0.0-rc
* Copyright (c) see LICENSE at https://github.com/zalando-incubator/hexo-theme-doc/blob/master/LICENSE
*/
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=11)}([function(e,t,n){"use strict";e.exports=n(18)},function(e,t,n){"use strict";function r(e){return function(t){return/^(f|ht)tps?:\/\//i.test(t)?t:u(e.config.root,t).replace(/\/{2,}/g,"/")}}function o(){return s("h2")}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new CustomEvent(e,{detail:t});window.dispatchEvent(n)}function a(e,t){var n=function(e){t(Object.assign({},{type:e.type},e.detail))};return window.addEventListener(e,n),function(){window.removeEventListener(e,n)}}function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce(function(t,n){return"string"!=typeof n||"undefined"===n?t:e[n]?t.concat(n):t},[]).join(" ")}var u=n(29),s=n(4);e.exports={url_for:r,getTOCHeaders:o,dispatch:i,subscribeOn:a,classNames:l}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){e.exports=$},function(e,t,n){"use strict";e.exports={SHOW_SEARCH_RESULTS:"SHOW_SEARCH_RESULTS",HIDE_SEARCH_RESULTS:"HIDE_SEARCH_RESULTS"}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){var t=e.results,n=e.query;return s.createElement("div",null,s.createElement("h1",{className:"doc-search-results__title"},t.length?t.length:"No"," results for ",s.createElement("span",{className:"doc-search-results__title__query"},'"',n,'"')),t.length?null:s.createElement("p",null,'There are no results for "',n,'". Why not ',s.createElement("strong",null,"try typing another keyword?")))}function l(e){var t=e.results;if(!t.length)return null;var n=function(){return h(d)},r=function(e){return{__html:e}};return s.createElement("ul",{className:"doc-search-results__list"},t.map(function(e,t){return s.createElement("li",{key:"doc-search-results__list__item-"+t,className:"doc-search-results__list__item"},s.createElement("a",{href:e.path,className:"doc-search-results__list__link",onClick:n},e.title),s.createElement("span",{className:"doc-search-results__list__score-divider"},"|"),s.createElement("span",{className:"doc-search-results__list__score"},"score: ",e.score.toFixed(2)),s.createElement("p",{dangerouslySetInnerHTML:r(e.body)}))}))}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),c=n(5),f=c.SHOW_SEARCH_RESULTS,d=c.HIDE_SEARCH_RESULTS,p=n(1),h=p.dispatch,m=function(e){function t(e){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return i(t,e),u(t,[{key:"handleKeyUp",value:function(e){var t=(e.target.value||"").trim();if(!t)return void h(d);if(!(t.length<3)){var n=this.p
object-assign
(c) Sindre Sorhus
@license MIT
*/
var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,u=r(e),s=1;s<arguments.length;s++){n=Object(arguments[s]);for(var c in n)i.call(n,c)&&(u[c]=n[c]);if(o){l=o(n);for(var f=0;f<l.length;f++)a.call(n,l[f])&&(u[l[f]]=n[l[f]])}}return u}},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),e.exports=n(19)},function(e,t,n){"use strict";function r(e){var t=e.support;return o.createElement("div",{className:"doc-support-footer"},o.createElement("span",{className:"doc-support-footer__text",dangerouslySetInnerHTML:{__html:t.text}})," ",o.createElement("a",{href:t.link_url,target:"_blank",className:"doc-support-footer__link"},t.link_text))}var o=n(0);e.exports={SupportFooter:r}},function(e,t,n){"use strict";n(12);var r=n(0),o=n(9),i=n(28),a=i.Navigation,l=n(36),u=l.SearchResults,s=n(37),c=s.SupportFooter,f=Object.assign({},window.__INITIAL_STATE__,{log:console});n(38),o.hydrate(r.createFactory(a)(f),document.getElementById("react-navigation-root")),o.render(r.createFactory(u)(f),document.getElementById("react-search-results-root")),o.render(r.createFactory(c)(f),document.getElementById("react-support-footer-root"))},function(e,t,n){"use strict";n(13);var r=n(14);window&&!window.Promise&&(window.Promise=r)},function(e,t){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return g.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function a(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function l(e){var t=new FileReader,n=a(t);return t.readAsArrayBuffer(e),n}function u(e){var t=new FileReader,n=a(t);return t.readAsText(e),n}function s(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function c(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function f(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(g.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(g.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(g.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(g.arrayBuffer&&g.blob&&b(e))this._bodyArrayBuffer=c(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!g.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!w(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=c(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",thi
* react.production.min.js
*
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var v=n(7),b=n(8),w=n(3),E="function"==typeof Symbol&&Symbol.for,_=E?Symbol.for("react.element"):60103,C=E?Symbol.for("react.call"):60104,k=E?Symbol.for("react.return"):60105,x=E?Symbol.for("react.portal"):60106,T=E?Symbol.for("react.fragment"):60107,S="function"==typeof Symbol&&Symbol.iterator,O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};o.prototype.isReactComponent={},o.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&r("85"),this.updater.enqueueSetState(this,e,t,"setState")},o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},a.prototype=o.prototype;var P=i.prototype=new a;P.constructor=i,v(P,o.prototype),P.isPureReactComponent=!0;var I=l.prototype=new a;I.constructor=l,v(I,o.prototype),I.unstable_isAsyncReactComponent=!0,I.render=function(){return this.props.children};var N={current:null},A=Object.prototype.hasOwnProperty,R={key:!0,ref:!0,__self:!0,__source:!0},L=/\/+/g,F=[],M={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return g(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=f(null,null,t,n),null==e||p(e,"",m,t),d(t)},count:function(e){return null==e?0:p(e,"",w.thatReturnsNull,null)},toArray:function(e){var t=[];return g(e,t,null,w.thatReturnsArgument),t},only:function(e){return s(e)||r("143"),e}},Component:o,PureComponent:i,unstable_AsyncComponent:l,Fragment:T,createElement:u,cloneElement:function(e,t,n){var r=v({},e.props),o=e.key,i=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,a=N.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)A.call(t,u)&&!R.hasOwnProperty(u)&&(r[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)r.children=n;else if(1<u){l=Array(u);for(var s=0;s<u;s++)l[s]=arguments[s+2];r.children=l}return{$$typeof:_,type:e.type,key:o,ref:i,props:r,_owner:a}},createFactory:function(e){var t=u.bind(null,e);return t.type=e,t},isValidElement:s,version:"16.2.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:N,assign:v}},D=Object.freeze({default:M}),j=D&&M||D;e.exports=j.default?j.default:j},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function o(e,t){return(e&t)===t}function i(e,t){if(Pn.hasOwnProperty(e)||2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1]))return!1;if(null===t)return!0;switch(typeof t){case"boolean":return Pn.hasOwnProperty(e)?e=!0:(t=a(e))?e=t.hasBooleanValue||t.hasStringBooleanValue||t.hasOverloadedBooleanValue:(e=e.toLowerCase().slice(0,5),e="data-"===e||"aria-"===e),e;case"undefined":case"number":case"string":case"object":return!0;default:return!1}}function a(e){return Nn.hasOwnProperty(e)?Nn[e]:null}function l(e){return e[1].toUpperCase()}function u(e,t,n,r,o,i,a,l,u){Kn._hasCaughtError=!1,Kn._caughtError=null;var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){Kn._caughtError=e,Kn._hasCaughtError=!0}}function s(){if(Kn._hasRethrowError){var e=Kn._rethrowError;throw Kn._rethrowError=null,Kn._hasRethrowError=!1,e}}function c(){if(Wn)for(var e in qn){var t=qn[e],n=Wn.indexOf(e);if(-1<n||r("96",e),!$n[n]){t.extractEvents||r("97",e),$n[n]=t,n=t.eventTypes;for(var o in n){var i=void 0,a=n[o],l=t,u=o;Qn.hasOwnProperty(u)&&r("99",u),Qn[u]=a;var s=a.phasedRegistrationNames;if(s){for(i in s)s.hasOwnProperty(i)&&f(s[i],l,u);i=!0}else a.registrationName?(f(a.registrationName,l,u),i=!0):i=!1;i||r("98",o,e)}}}}function f(e,t,n){Gn[e]&&r("100",e),Gn[e]=t,Yn[e]=t.eventTypes[n].dependencies}function d(e){Wn&&r("101"),Wn=Array.prototype.slice.call(e),c()}function p(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){v
* react-dom.production.min.js
*
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var bn=n(0),wn=n(20),En=n(7),_n=n(3),Cn=n(21),kn=n(22),xn=n(23),Tn=n(24),Sn=n(27),On=n(8);bn||r("227");var Pn={children:!0,dangerouslySetInnerHTML:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,style:!0},In={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,HAS_STRING_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=In,n=e.Properties||{},i=e.DOMAttributeNamespaces||{},a=e.DOMAttributeNames||{};e=e.DOMMutationMethods||{};for(var l in n){Nn.hasOwnProperty(l)&&r("48",l);var u=l.toLowerCase(),s=n[l];u={attributeName:u,attributeNamespace:null,propertyName:l,mutationMethod:null,mustUseProperty:o(s,t.MUST_USE_PROPERTY),hasBooleanValue:o(s,t.HAS_BOOLEAN_VALUE),hasNumericValue:o(s,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:o(s,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:o(s,t.HAS_OVERLOADED_BOOLEAN_VALUE),hasStringBooleanValue:o(s,t.HAS_STRING_BOOLEAN_VALUE)},1>=u.hasBooleanValue+u.hasNumericValue+u.hasOverloadedBooleanValue||r("50",l),a.hasOwnProperty(l)&&(u.attributeName=a[l]),i.hasOwnProperty(l)&&(u.attributeNamespace=i[l]),e.hasOwnProperty(l)&&(u.mutationMethod=e[l]),Nn[l]=u}}},Nn={},An=In,Rn=An.MUST_USE_PROPERTY,Ln=An.HAS_BOOLEAN_VALUE,Fn=An.HAS_NUMERIC_VALUE,Mn=An.HAS_POSITIVE_NUMERIC_VALUE,Dn=An.HAS_OVERLOADED_BOOLEAN_VALUE,jn=An.HAS_STRING_BOOLEAN_VALUE,Un={Properties:{allowFullScreen:Ln,async:Ln,autoFocus:Ln,autoPlay:Ln,capture:Dn,checked:Rn|Ln,cols:Mn,contentEditable:jn,controls:Ln,default:Ln,defer:Ln,disabled:Ln,download:Dn,draggable:jn,formNoValidate:Ln,hidden:Ln,loop:Ln,multiple:Rn|Ln,muted:Rn|Ln,noValidate:Ln,open:Ln,playsInline:Ln,readOnly:Ln,required:Ln,reversed:Ln,rows:Mn,rowSpan:Fn,scoped:Ln,seamless:Ln,selected:Rn|Ln,size:Mn,start:Fn,span:Mn,spellCheck:jn,style:0,tabIndex:0,itemScope:Ln,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:jn},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute("value");"number"!==e.type||!1===e.hasAttribute("value")?e.setAttribute("value",""+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute("value",""+t)}}},Hn=An.HAS_STRING_BOOLEAN_VALUE,Bn={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},zn={Properties:{autoReverse:Hn,externalResourcesRequired:Hn,preserveAlpha:Hn},DOMAttributeNames:{autoReverse:"autoReverse",externalResourcesRequired:"externalResourcesRequired",preserveAlpha:"preserveAlpha"},DOMAttributeNamespaces:{xlinkActuate:Bn.xlink,xlinkArcrole:Bn.xlink,xlinkHref:Bn.xlink,xlinkRole:Bn.xlink,xlinkShow:Bn.xlink,xlinkTitle:Bn.xlink,xlinkType:Bn.xlink,xmlBase:Bn.xml,xmlLang:Bn.xml,xmlSpace:Bn.xml}},Vn=/[\-\:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space".split(" ").forEach(function(e
!function(n,i){r=[],void 0!==(o=function(){return i(n)}.apply(t,r))&&(e.exports=o)}(void 0!==n?n:"undefined"!=typeof window?window:this,function(e){"use strict";var t="querySelector"in document&&"addEventListener"in e&&"requestAnimationFrame"in e&&"closest"in e.Element.prototype,n={ignore:"[data-scroll-ignore]",header:null,speed:500,offset:0,easing:"easeInOutCubic",customEasing:null,before:function(){},after:function(){}},r=function(){for(var e={},t=0,n=arguments.length;t<n;t++){var r=arguments[t];!function(t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}(r)}return e},o=function(t){return parseInt(e.getComputedStyle(t).height,10)},i=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,n=String(e),r=n.length,o=-1,i="",a=n.charCodeAt(0);++o<r;){if(0===(t=n.charCodeAt(o)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");i+=t>=1&&t<=31||127==t||0===o&&t>=48&&t<=57||1===o&&t>=48&&t<=57&&45===a?"\\"+t.toString(16)+" ":t>=128||45===t||95===t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?n.charAt(o):"\\"+n.charAt(o)}return"#"+i},a=function(e,t){var n;return"easeInQuad"===e.easing&&(n=t*t),"easeOutQuad"===e.easing&&(n=t*(2-t)),"easeInOutQuad"===e.easing&&(n=t<.5?2*t*t:(4-2*t)*t-1),"easeInCubic"===e.easing&&(n=t*t*t),"easeOutCubic"===e.easing&&(n=--t*t*t+1),"easeInOutCubic"===e.easing&&(n=t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1),"easeInQuart"===e.easing&&(n=t*t*t*t),"easeOutQuart"===e.easing&&(n=1- --t*t*t*t),"easeInOutQuart"===e.easing&&(n=t<.5?8*t*t*t*t:1-8*--t*t*t*t),"easeInQuint"===e.easing&&(n=t*t*t*t*t),"easeOutQuint"===e.easing&&(n=1+--t*t*t*t*t),"easeInOutQuint"===e.easing&&(n=t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t),e.customEasing&&(n=e.customEasing(t)),n||t},l=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},u=function(e,t,n){var r=0;if(e.offsetParent)do{r+=e.offsetTop,e=e.offsetParent}while(e);return r=Math.max(r-t-n,0)},s=function(e){return e?o(e)+e.offsetTop:0},c=function(t,n,r){r||(t.focus(),document.activeElement.id!==t.id&&(t.setAttribute("tabindex","-1"),t.focus(),t.style.outline="none"),e.scrollTo(0,n))},f=function(t){return!!("matchMedia"in e&&e.matchMedia("(prefers-reduced-motion)").matches)};return function(o,d){var p,h,m,y,g,v,b,w={};w.cancelScroll=function(){cancelAnimationFrame(b)},w.animateScroll=function(t,o,i){var f=r(p||n,i||{}),d="[object Number]"===Object.prototype.toString.call(t),h=d||!t.tagName?null:t;if(d||h){var m=e.pageYOffset;f.header&&!y&&(y=document.querySelector(f.header)),g||(g=s(y));var v,b,E,_=d?t:u(h,g,parseInt("function"==typeof f.offset?f.offset():f.offset,10)),C=_-m,k=l(),x=0,T=function(n,r){var i=e.pageYOffset;if(n==r||i==r||(m<r&&e.innerHeight+i)>=k)return w.cancelScroll(),c(t,r,d),f.after(t,o),v=null,!0},S=function(t){v||(v=t),x+=t-v,b=x/parseInt(f.speed,10),b=b>1?1:b,E=m+C*a(f,b),e.scrollTo(0,Math.floor(E)),T(E,_)||(e.requestAnimationFrame(S),v=t)};0===e.pageYOffset&&e.scrollTo(0,0),f.before(t,o),w.cancelScroll(),e.requestAnimationFrame(S)}};var E=function(e){h&&(h.id=h.getAttribute("data-scroll-id"),w.animateScroll(h,m),h=null,m=null)},_=function(t){if(!f()&&0===t.button&&!t.metaKey&&!t.ctrlKey&&(m=t.target.closest(o))&&"a"===m.tagName.toLowerCase()&&!t.target.closest(p.ignore)&&m.hostname===e.location.hostname&&m.pathname===e.location.pathname&&/#/.test(m.href)){var n;try{n=i(decodeURIComponent(m.hash))}catch(e){n=i(m.hash)}if("#"===n){t.preventDefault(),h=document.body;var r=h.id?h.id:"smooth-scroll-top";return h.setAttribute("data-scroll-id",r),h.id="",void(e.location.hash.substring(1)===r?E():e.location.hash=r)}(h=document.querySelector(n))&&(h.setAttribute("data-scroll-id",h.id),h.id="",m.hash===e.location.hash&&(t.preventDefault(),E()))}},C=function(e){v||(v=setTimeout(function(){v=null,g=s(y)},66))};return w.destroy=function(){p&&(document.removeEventListener("click",_,!1),e.removeEventListener("resize",C,!1),w.cancelScroll(),p=null,h=null,m=null,y=null,g=null,v=null,b=nul