1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2025-02-15 18:02:37 +01:00

2 lines
6.2 KiB
JavaScript

!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){function t(t){for(var r,a,i=t[0],u=t[1],s=t[2],f=0,b=[];f<i.length;f++)a=i[f],Object.prototype.hasOwnProperty.call(c,a)&&c[a]&&b.push(c[a][0]),c[a]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(l&&l(t);b.length;)b.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,i=1;i<n.length;i++){var u=n[i];0!==c[u]&&(r=!1)}r&&(o.splice(t--,1),e=a(a.s=n[0]))}return e}var r={},c={0:0},o=[];function a(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=r,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackJsonp=window.webpackJsonp||[],u=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var l=u;return o.push([46,1]),n()}({46:function(e,t,n){"use strict";n.r(t);var r=n(48),c=n(47),o=n(36);n(38),n(39);function a(e,t=document){return t.querySelector(e)||void 0}function i(e,t=document){const n=a(e,t);if(void 0===n)throw new ReferenceError(`Missing element: expected "${e}" to be present`);return n}function u(){return document.activeElement instanceof HTMLElement?document.activeElement:void 0}var s=n(28),l=n(49);var f=n(41),b=n(19),p=n(50),d=n(51),O=n(52),j=n(53),h=n(54),m=n(55),v=n(56);const g=new b.a;Object(p.a)(()=>Object(d.a)(new ResizeObserver(e=>{for(const t of e)g.next(t)}))).pipe(Object(o.a)(e=>O.a.pipe(Object(l.a)(e)).pipe(Object(j.a)(()=>e.disconnect()))),Object(h.a)(1));function y(e){return{width:e.offsetWidth,height:e.offsetHeight}}function w(e){return{x:e.scrollLeft,y:e.scrollTop}}function x(e,t=16){return function(e){return Object(r.a)(Object(c.a)(e,"scroll"),Object(c.a)(window,"resize")).pipe(Object(s.a)(()=>w(e)),Object(l.a)(w(e)))}(e).pipe(Object(s.a)(({y:n})=>{const r=y(e);return n>=function(e){return{width:e.scrollWidth,height:e.scrollHeight}}(e).height-r.height-t}),Object(f.a)())}n(40);i("[data-md-toggle=drawer]"),i("[data-md-toggle=search]");n(57);function k(){return new URL(location.href)}var S=n(4);function $(e,t={credentials:"same-origin"}){return Object(S.a)(fetch(e,t)).pipe(Object(v.a)(e=>200===e.status))}var M=n(66),_=n(58);n(59),n(60);function L(e,t=document){return i(`[data-mdx-component=${e}]`,t)}function C(e,t=document){return function(e,t=document){return Array.from(t.querySelectorAll(e))}(`[data-mdx-component=${e}]`,t)}const T=i("#__config"),E=JSON.parse(T.textContent);function H(e,t){return void 0!==t?E.translations[e].replace("#",t.toString()):E.translations[e]}E.base=new URL(E.base,k()).toString().replace(/\/$/,"");var P=n(64);function q(e){const t=function(e){return Object(r.a)(Object(c.a)(e,"focus"),Object(c.a)(e,"blur")).pipe(Object(s.a)(({type:e})=>"focus"===e),Object(l.a)(e===u()))}(e),n=Object(r.a)(Object(c.a)(e,"keyup"),Object(c.a)(e,"focus").pipe(Object(P.a)(1))).pipe(Object(s.a)(()=>e.value),Object(l.a)(e.value),Object(f.a)());return Object(M.a)([n,t]).pipe(Object(s.a)(([t,n])=>({ref:e,value:t,focus:n})))}var A=n(32),R=n(65),J=n(61),z=n(62),N=n(63),U=n(67);function W(e,t){if("string"==typeof t||"number"==typeof t)e.innerHTML+=t.toString();else if(t instanceof Node)e.appendChild(t);else if(Array.isArray(t))for(const n of t)W(e,n)}function B(e,t,...n){const r=document.createElement(e);if(t)for(const e of Object.keys(t))"boolean"!=typeof t[e]?r.setAttribute(e,t[e]):t[e]&&r.setAttribute(e,"");for(const e of n)W(r,e);return r}function F(e){return`:${e.replace(/\.svg$/,"").replace(/\//g,"-")}:`}function D(e,t){return B("li",{class:"mdx-icon-search-result__item"},B("span",{class:"twemoji"},B("img",{src:"https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/material/.icons/"+e})),B("button",{class:"md-clipboard--inline",title:H("clipboard.copy"),"data-clipboard-text":F(e)},B("code",null,function(e,t){return Object(A.wrap)(F(e),t,{wrap:{tagOpen:"<b>",tagClose:"</b>"}})}(e,t))))}function G(e,{index$:t,query$:n}){const c=new b.a,a=x(e).pipe(Object(v.a)(Boolean)),u=i(":scope > :first-child",e);c.pipe(Object(J.a)(R.a),Object(z.a)(n)).subscribe(([{data:e},{value:t}])=>{t?function(e,t){switch(t){case 0:e.textContent=H("search.result.none");break;case 1:e.textContent=H("search.result.one");break;default:e.textContent=H("search.result.other",function(e){if(e>999){return((e+1e-6)/1e3).toFixed(+((e-950)%1e3>99))+"k"}return e.toString()}(t))}}(u,e.length):function(e){e.textContent=H("search.result.placeholder")}(u)});const l=i(":scope > :last-child",e);return c.pipe(Object(J.a)(R.a),Object(m.a)(()=>function(e){e.innerHTML=""}(l)),Object(o.a)(({data:e})=>Object(r.a)(Object(d.a)(...e.slice(0,10)),Object(d.a)(...e.slice(10)).pipe(Object(N.a)(10),Object(U.a)(a),Object(o.a)(([e])=>Object(d.a)(...e))))),Object(z.a)(n)).subscribe(([e,{value:t}])=>{!function(e,t){e.appendChild(t)}(l,D(e,t))}),Object(M.a)([t,n.pipe(Object(_.a)("value"))]).pipe(Object(s.a)(([e,{value:t}])=>({data:Object(A.filter)(e,t)})),Object(m.a)(c),Object(j.a)(()=>c.complete()),Object(s.a)(t=>Object.assign({ref:e},t)))}function I(e){const t=$(E.base+"/overrides/assets/javascripts/icons.json",n).pipe(Object(o.a)(e=>e.json()),Object(h.a)(1));var n;const c=L("icon-search-query",e),a=L("icon-search-result",e),i=q(c);return Object(r.a)(i,G(a,{index$:t,query$:i}))}document$.pipe(Object(o.a)(()=>Object(r.a)(...C("icon-search").map(e=>I(e))))).subscribe(),Object(c.a)(document.body,"click").subscribe(e=>{if(e.target instanceof HTMLElement){const t=e.target.closest("a[href^=http]");t instanceof HTMLLinkElement&&ga("send","event","outbound","click",t.href)}})}}));
//# sourceMappingURL=bundle.b60297a2.min.js.map