mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
ae867d484b
commit 9b5b80380fc81f5a68828e22754f0e7d53b0dea0
Author: squidfunk <martin.donath@squidfunk.com>
Date: Sun Feb 7 16:25:06 2021 +0100
Refactored more stuff
commit 5a2108254f1222db7de08690e13c24e972ea19c0
Author: squidfunk <martin.donath@squidfunk.com>
Date: Sun Feb 7 13:48:16 2021 +0100
Refactored more stuff
commit b3a112f4bddefebcf9dbd1d0ffe240d86fc9aa08
Author: squidfunk <martin.donath@squidfunk.com>
Date: Sun Feb 7 12:02:42 2021 +0100
Refactored more stuff
commit bff323b6b81571021c0ac9be6f637de7728447a5
Author: squidfunk <martin.donath@squidfunk.com>
Date: Sat Feb 6 18:14:52 2021 +0100
Refactored search result list
commit 27b7e7e2da3b725797ad769e4411260ffd35b9f8
Author: squidfunk <martin.donath@squidfunk.com>
Date: Sat Feb 6 17:12:36 2021 +0100
Refactored more components
commit 3747e5ba6d084ed513a2659f48f161449b760076
Author: squidfunk <martin.donath@squidfunk.com>
Date: Sun Jan 24 18:56:26 2021 +0100
Implemented new architecture for several components
commit ea2851ab0f27113b080c2539a94a88dc0332be84
Author: squidfunk <martin.donath@squidfunk.com>
Date: Sun Jan 24 14:53:42 2021 +0100
Removed unnecessary height declaration for sidebars
commit 3c3f83ab4ef392dbabf1a11afba2556e529b1674
Merge: 91d239d8 13024179
Author: squidfunk <martin.donath@squidfunk.com>
Date: Sun Jan 24 13:04:49 2021 +0100
Merge branch 'master' into refactor/observable-architecture
commit 91d239d86649b9571b376011669bc73a7865b186
Author: squidfunk <martin.donath@squidfunk.com>
Date: Sat Jan 9 13:11:04 2021 +0100
Started refactoring observable architecture
2 lines
19 KiB
JavaScript
2 lines
19 KiB
JavaScript
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){function t(t){for(var a,o,i=t[0],s=t[1],p=t[2],b=0,l=[];b<i.length;b++)o=i[b],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&l.push(c[o][0]),c[o]=0;for(a in s)Object.prototype.hasOwnProperty.call(s,a)&&(e[a]=s[a]);for(u&&u(t);l.length;)l.shift()();return r.push.apply(r,p||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],a=!0,i=1;i<n.length;i++){var s=n[i];0!==c[s]&&(a=!1)}a&&(r.splice(t--,1),e=o(o.s=n[0]))}return e}var a={},c={0:0},r=[];function o(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=a,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var i=window.webpackJsonp=window.webpackJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var p=0;p<i.length;p++)t(i[p]);var u=s;return r.push([48,1]),n()}({48:function(e,t,n){"use strict";n.r(t);n(44);var a=n(22),c=n(50),r=n(54),o=n(37),i=(n(38),n(49)),s=n(39);function p(e,t=document){return t.querySelector(e)||void 0}function u(e,t=document){const n=p(e,t);if(void 0===n)throw new ReferenceError(`Missing element: expected "${e}" to be present`);return n}function b(e,t=document){return Array.from(t.querySelectorAll(e))}function l(e){return document.createElement(e)}function f(e,t){e.replaceWith(t)}var d=n(32),h=n(51);function j(e){return Object(c.a)(Object(i.a)(e,"focus"),Object(i.a)(e,"blur")).pipe(Object(d.a)(({type:e})=>"focus"===e),Object(h.a)(e===(document.activeElement instanceof HTMLElement?document.activeElement:void 0)))}var O=n(52),m=n(53),g=n(55),v=n(56),w=n(57),$=n(58);const x=new a.a,y=Object(O.a)(()=>Object(m.a)(new ResizeObserver(e=>{for(const t of e)x.next(t)}))).pipe(Object(o.a)(e=>r.a.pipe(Object(h.a)(e)).pipe(Object(g.a)(()=>e.disconnect()))),Object(v.a)(1));function _(e){return{width:e.offsetWidth,height:e.offsetHeight}}function E(e){return y.pipe(Object(w.a)(t=>t.observe(e)),Object(o.a)(t=>x.pipe(Object($.a)(({target:t})=>t===e),Object(g.a)(()=>t.unobserve(e)),Object(d.a)(({contentRect:e})=>({width:e.width,height:e.height})))),Object(h.a)(_(e)))}var S=n(40);n(59);function A(){return new URL(location.href)}function k(){return location.hash.substring(1)}function T(e){const t=matchMedia(e);return Object(i.a)(t,"change").pipe(Object(d.a)(e=>e.matches),Object(h.a)(t.matches))}const R={drawer:u("[data-md-toggle=drawer]"),search:u("[data-md-toggle=search]")};var M=n(43),C=n(60);function L(){return{x:Math.max(0,pageXOffset),y:Math.max(0,pageYOffset)}}function P(){return{width:innerWidth,height:innerHeight}}function U(e,{viewport$:t,header$:n}){const a=t.pipe(Object(C.a)("size")),c=Object(M.a)([a,n]).pipe(Object(d.a)(()=>({x:e.offsetLeft,y:e.offsetTop})));return Object(M.a)([n,t,c]).pipe(Object(d.a)(([{height:e},{offset:t,size:n},{x:a,y:c}])=>({offset:{x:t.x-a,y:t.y-c+e},size:n})))}var z=n(61),I=n(62);var N=n(25),H=n.n(N),Y=n(63);function q(e,t){e.setAttribute("data-md-state",t)}function F(e){e.removeAttribute("data-md-state")}function J(e,t){e.classList.toggle("md-nav__link--active",t)}function W(e){e.classList.remove("md-nav__link--active")}let B=JSON.parse(u("#__config").textContent);function Q(){return B}function D(e,t){if(void 0===B.translations[e])throw new ReferenceError("Invalid translation: "+e);return void 0!==t?B.translations[e].replace("#",t.toString()):B.translations[e]}function V(e,t){e.appendChild(t)}function X(e){e.removeAttribute("data-md-state")}function G(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)G(e,n)}function K(e,t,...n){const a=document.createElement(e);if(t)for(const e of Object.keys(t))"boolean"!=typeof t[e]?a.setAttribute(e,t[e]):t[e]&&a.setAttribute(e,"");for(const e of n)G(a,e);return a}function Z(e){if(e>999){return((e+1e-6)/1e3).toFixed(+((e-950)%1e3>99))+"k"}return e.toString()}var ee;function te(e,t){const n=t&ee.PARENT,a=t&ee.TEASER,c=Object.keys(e.terms).filter(t=>!e.terms[t]).map(e=>[K("del",null,e)," "]).flat().slice(0,-1);return K("a",{href:e.location,class:"md-search-result__link",tabIndex:-1},K("article",{class:["md-search-result__article",...n?["md-search-result__article--document"]:[]].join(" "),"data-md-score":e.score.toFixed(2)},n>0&&K("div",{class:"md-search-result__icon md-icon"}),K("h1",{class:"md-search-result__title"},e.title),a>0&&e.text.length>0&&K("p",{class:"md-search-result__teaser"},function(e,t){let n=t;if(e.length>n){for(;" "!==e[n]&&--n>0;);return e.substring(0,n)+"..."}return e}(e.text,320)),a>0&&c.length>0&&K("p",{class:"md-search-result__terms"},D("search.result.term.missing"),": ",c)))}function ne(e,t=1/0){const n=[...e],a=n.findIndex(e=>!e.location.includes("#")),[c]=n.splice(a,1);let r=n.findIndex(e=>e.score<t);-1===r&&(r=n.length);const o=n.slice(0,r),i=n.slice(r),s=[te(c,ee.PARENT|+(!a&&0===r)),...o.map(e=>te(e,ee.TEASER)),...i.length?[K("details",{class:"md-search-result__more"},K("summary",{tabIndex:-1},i.length>0&&1===i.length?D("search.result.more.one"):D("search.result.more.other",i.length)),i.map(e=>te(e,ee.TEASER)))]:[]];return K("li",{class:"md-search-result__item"},s)}B.base=new URL(B.base,A()).toString().replace(/\/$/,""),function(e){e[e.TEASER=1]="TEASER",e[e.PARENT=2]="PARENT"}(ee||(ee={}));let ae=0;function ce(e,t){const n=new a.a;if(n.pipe(Object(Y.a)(T("(hover)"))).subscribe(([{scroll:t},n])=>{t&&n?function(e,t=0){e.setAttribute("tabindex",t.toString())}(e):function(e){e.removeAttribute("tabindex")}(e)}),H.a.isSupported()){const t=e.closest("pre");t.id="__code_"+ae++,t.insertBefore((c=t.id,K("button",{class:"md-clipboard md-icon",title:D("clipboard.copy"),"data-clipboard-target":`#${c} > code`})),e)}var c;return function(e,{viewport$:t}){return t.pipe(Object(C.a)("size"),Object(d.a)(()=>{const t=_(e);return{scroll:function(e){return{width:e.scrollWidth,height:e.scrollHeight}}(e).width>t.width}}),Object(C.a)("scroll"))}(e,t).pipe(Object(w.a)(n),Object(g.a)(()=>n.complete()),Object(d.a)(t=>Object.assign({ref:e},t)))}var re=n(64);function oe(e,t){const n=new a.a;return n.subscribe(()=>{e.setAttribute("open",""),e.scrollIntoView()}),function(e,{target$:t,print$:n}){return t.pipe(Object(d.a)(e=>e.closest("details:not([open])")),Object($.a)(t=>e===t),Object(re.a)(n),Object(s.a)(e))}(e,t).pipe(Object(w.a)(n),Object(g.a)(()=>n.complete()),Object(s.a)({ref:e}))}const ie=l("table");function se(e){return f(e,ie),f(ie,K("div",{class:"md-typeset__scrollwrap"},K("div",{class:"md-typeset__table"},e))),Object(m.a)({ref:e})}var pe=n(73),ue=n(72),be=n(65);function le(e,{message$:t}){const n=new a.a;return n.pipe(Object(be.a)(pe.a)).subscribe(({message:t,open:n})=>{!function(e,t){e.firstElementChild.innerHTML=t}(e,t),n?function(e,t){e.setAttribute("data-md-state",t)}(e,"open"):function(e){e.removeAttribute("data-md-state")}(e)}),function(e,{message$:t}){return t.pipe(Object(o.a)(e=>Object(c.a)(Object(m.a)(!0),Object(m.a)(!1).pipe(Object(ue.a)(2e3))).pipe(Object(d.a)(t=>({message:e,open:t})))))}(0,{message$:t}).pipe(Object(w.a)(n),Object(g.a)(()=>n.complete()),Object(d.a)(t=>Object.assign({ref:e},t)))}var fe=n(66),de=n(41);function he(e,t){const n=new a.a;n.pipe(Object(be.a)(pe.a)).subscribe(({active:t})=>{t?function(e,t){e.setAttribute("data-md-state",t)}(e,"active"):function(e){e.removeAttribute("data-md-state")}(e)});return function(e,{viewport$:t,header$:n}){return U(e,{header$:n,viewport$:t}).pipe(Object(d.a)(({offset:{y:t}})=>{const{height:n}=_(e);return{active:t>=n}}),Object(C.a)("active"))}(u("article h1"),t).pipe(Object(w.a)(n),Object(g.a)(()=>n.complete()),Object(d.a)(t=>Object.assign({ref:e},t)))}var je=n(4);n(42);function Oe(e){return e.split(/"([^"]+)"/g).map((e,t)=>1&t?e.replace(/^\b|^(?![^\x00-\x7F]|$)|\s+/g," +"):e).join("").replace(/"|(?:^|\s+)[*+\-:^~]+(?=\s+|$)/g,"").trim()}var me,ge=n(34);function ve(e){return e.type===me.RESULT}function we({config:e,docs:t,index:n}){1===e.lang.length&&"en"===e.lang[0]&&(e.lang=[D("search.config.lang")]),"[\\s\\-]+"===e.separator&&(e.separator=D("search.config.separator"));return{config:e,docs:t,index:n,pipeline:D("search.config.pipeline").split(/\s*,\s*/).filter(Boolean)}}function $e(e,{index$:t}){const n=Q(),c=new Worker(e),r=new a.a,o=function(e,{tx$:t}){const n=Object(i.a)(e,"message").pipe(Object(d.a)(({data:e})=>e));return t.pipe(Object(z.a)(()=>n,{leading:!0,trailing:!0}),Object(w.a)(t=>e.postMessage(t)),Object(I.a)(n),Object(S.a)())}(c,{tx$:r}).pipe(Object(d.a)(e=>{if(ve(e))for(const t of e.data)for(const e of t)e.location=`${n.base}/${e.location}`;return e}),Object(S.a)());return t.pipe(Object(d.a)(e=>({type:me.SETUP,data:we(e)})),Object(be.a)(ge.b)).subscribe(r.next.bind(r)),{tx$:r,rx$:o}}!function(e){e[e.SETUP=0]="SETUP",e[e.READY=1]="READY",e[e.QUERY=2]="QUERY",e[e.RESULT=3]="RESULT"}(me||(me={}));var xe=n(67),ye=n(68);function _e(e,{tx$:t}){const n=new a.a;return n.pipe(Object(C.a)("value"),Object(d.a)(({value:e})=>({type:me.QUERY,data:e}))).subscribe(t.next.bind(t)),n.pipe(Object(C.a)("focus")).subscribe(({focus:t})=>{var n,a;t?(a=t,R[n="search"].checked!==a&&R[n].click(),function(e,t){e.placeholder=t}(e,"")):function(e){e.placeholder=D("search.placeholder")}(e)}),Object(i.a)(e.form,"reset").pipe(Object(xe.a)(n.pipe(Object(ye.a)(1)))).subscribe(()=>function(e,t=!0){t?e.focus():e.blur()}(e)),function(e){const t=(null===__search||void 0===__search?void 0:__search.transform)||Oe,n=j(e),a=Object(c.a)(Object(i.a)(e,"keyup"),Object(i.a)(e,"focus").pipe(Object(ue.a)(1))).pipe(Object(d.a)(()=>t(e.value)),Object(h.a)(t(e.value)),Object(de.a)());return Object(M.a)([a,n]).pipe(Object(d.a)(([e,t])=>({value:e,focus:t})))}(e).pipe(Object(w.a)(n),Object(g.a)(()=>n.complete()),Object(d.a)(t=>Object.assign({ref:e},t)))}function Ee(e,{rx$:t},{query$:n}){const c=new a.a,r=u(":first-child",e);c.pipe(Object(Y.a)(n)).subscribe(([{data:e},{value:t}])=>{t?function(e,t){switch(t){case 0:e.textContent=D("search.result.none");break;case 1:e.textContent=D("search.result.one");break;default:e.textContent=D("search.result.other",t)}}(r,e.length):function(e){e.textContent=D("search.result.placeholder")}(r)});const o=u(":last-child",e);c.subscribe(({data:e})=>{!function(e){e.innerHTML=""}(o);const t=[...e.map(([e])=>e.score),0];for(let n=0;n<e.length;n++)V(o,ne(e[n++],t[n]))});return t.pipe(Object($.a)(ve),Object(d.a)(({data:e})=>({data:e})),Object(h.a)({data:[]})).pipe(Object(w.a)(c),Object(g.a)(()=>c.complete()),Object(d.a)(t=>Object.assign({ref:e},t)))}var Se=n(24);function Ae(e,t){var{header$:n}=t,c=Object(Se.c)(t,["header$"]);const r=new a.a;return r.pipe(Object(be.a)(pe.a),Object(Y.a)(n)).subscribe({next([{height:t},{height:n}]){!function(e,t){const n=e.firstElementChild;n.style.height=t-2*n.offsetTop+"px"}(e,t),function(e,t){e.style.top=t+"px"}(e,n)},complete(){!function(e){e.style.top=""}(e),function(e){e.firstElementChild.style.height=""}(e)}}),function(e,{viewport$:t,main$:n}){const a=e.parentElement.offsetTop-e.parentElement.parentElement.offsetTop;return Object(M.a)([n,t]).pipe(Object(d.a)(([{offset:e,height:t},{offset:{y:n}}])=>({height:t=t+Math.min(a,Math.max(0,n-e))-a,locked:n>=e+a})),Object(de.a)((e,t)=>e.height===t.height&&e.locked===t.locked))}(e,c).pipe(Object(w.a)(r),Object(g.a)(()=>r.complete()),Object(d.a)(t=>Object.assign({ref:e},t)))}var ke=n(70),Te=n(6),Re=n(69);function Me(e){const[t]=e.match(/(git(?:hub|lab))/i)||[];switch(t.toLowerCase()){case"github":const[,t,n]=e.match(/^.+github\.com\/([^\/]+)\/?([^\/]+)?/i);return function(e,t){const n=void 0!==t?`https://api.github.com/repos/${e}/${t}`:"https://api.github.com/users/"+e;return Object(Te.a)(fetch(n)).pipe(Object($.a)(e=>200===e.status),Object(o.a)(e=>e.json()),Object(d.a)(e=>{if(void 0!==t){const{stargazers_count:t,forks_count:n}=e;return[Z(t)+" Stars",Z(n)+" Forks"]}{const{public_repos:t}=e;return[Z(t)+" Repositories"]}}),Object(Re.a)([]))}(t,n);case"gitlab":const[,a,c]=e.match(/^.+?([^\/]*gitlab[^\/]+)\/(.+?)\/?$/i);return function(e,t){const n=`https://${e}/api/v4/projects/${encodeURIComponent(t)}`;return Object(Te.a)(fetch(n)).pipe(Object($.a)(e=>200===e.status),Object(o.a)(e=>e.json()),Object(d.a)(({star_count:e,forks_count:t})=>[Z(e)+" Stars",Z(t)+" Forks"]),Object(Re.a)([]))}(a,c);default:return r.a}}let Ce;function Le(e){const t=new a.a;return t.subscribe(({facts:t})=>{!function(e,t){e.lastElementChild.appendChild(t)}(e,function(e){return K("ul",{class:"md-source__facts"},e.map(e=>K("li",{class:"md-source__fact"},e)))}(t)),function(e,t){e.lastElementChild.setAttribute("data-md-state",t)}(e,"done")}),function(e){const t=function(e){let t=0;for(let n=0,a=e.length;n<a;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}(e.href).toString();return Ce||(Ce=Object(O.a)(()=>{const n=sessionStorage.getItem(t);if(n)return Object(m.a)(JSON.parse(n));{const n=Me(e.href);return n.subscribe(e=>{try{sessionStorage.setItem(t,JSON.stringify(e))}catch(e){}}),n}}).pipe(Object(ke.a)(()=>r.a),Object($.a)(e=>e.length>0),Object(d.a)(e=>({facts:e})),Object(v.a)(1)))}(e).pipe(Object(w.a)(t),Object(g.a)(()=>t.complete()),Object(d.a)(t=>Object.assign({ref:e},t)))}function Pe(e,t){const n=new a.a;return n.pipe(Object(be.a)(pe.a)).subscribe({next({hidden:t}){t?function(e,t){e.setAttribute("data-md-state",t)}(e,"hidden"):X(e)},complete(){X(e)}}),function(e,{viewport$:t,header$:n}){return U(e,{header$:n,viewport$:t}).pipe(Object(d.a)(({offset:{y:e}})=>({hidden:e>=10})),Object(C.a)("hidden"))}(e,t).pipe(Object(w.a)(n),Object(g.a)(()=>n.complete()),Object(d.a)(t=>Object.assign({ref:e},t)))}var Ue=n(74),ze=n(71);function Ie(e,t){const n=new a.a;n.pipe(Object(be.a)(pe.a)).subscribe(({prev:e,next:t})=>{for(const[e]of t)W(e),F(e);for(const[t,[n]]of e.entries())J(n,t===e.length-1),q(n,"blur")});return function(e,{viewport$:t,header$:n}){const a=new Map;for(const t of e){const e=p(`[id="${decodeURIComponent(t.hash.substring(1))}"]`);void 0!==e&&a.set(t,e)}const c=n.pipe(Object(d.a)(e=>24+e.height));return E(document.body).pipe(Object(C.a)("height"),Object(d.a)(()=>{let e=[];return[...a].reduce((t,[n,c])=>{for(;e.length;){if(!(a.get(e[e.length-1]).tagName>=c.tagName))break;e.pop()}let r=c.offsetTop;for(;!r&&c.parentElement;)r=(c=c.parentElement).offsetTop;return t.set([...e=[...e,n]].reverse(),r)},new Map)}),Object(o.a)(e=>Object(M.a)([c,t]).pipe(Object(Ue.a)(([e,t],[n,{offset:{y:a}}])=>{for(;t.length;){const[,c]=t[0];if(!(c-n<a))break;e=[...e,t.shift()]}for(;e.length;){const[,c]=e[e.length-1];if(!(c-n>=a))break;t=[e.pop(),...t]}return[e,t]},[[],[...e]]),Object(de.a)((e,t)=>e[0]===t[0]&&e[1]===t[1])))).pipe(Object(d.a)(([e,t])=>({prev:e.map(([e])=>e),next:t.map(([e])=>e)})),Object(h.a)({prev:[],next:[]}),Object(ze.a)(2,1),Object(d.a)(([e,t])=>e.prev.length<t.prev.length?{prev:t.prev.slice(Math.max(0,e.prev.length-1),t.prev.length),next:[]}:{prev:t.prev.slice(-1),next:t.next.slice(0,t.next.length-e.next.length)}))}(b("[href^=\\#]",e),t).pipe(Object(w.a)(n),Object(g.a)(()=>n.complete()),Object(d.a)(t=>Object.assign({ref:e},t)))}document.documentElement.classList.remove("no-js"),document.documentElement.classList.add("js");const Ne=Object(i.a)(window,"hashchange").pipe(Object(d.a)(k),Object(h.a)(k()),Object($.a)(e=>e.length>0),Object(S.a)()).pipe(Object(o.a)(e=>Object(m.a)(p(`[id="${e}"]`)))),He=Object(M.a)([Object(c.a)(Object(i.a)(window,"scroll",{passive:!0}),Object(i.a)(window,"resize",{passive:!0})).pipe(Object(d.a)(L),Object(h.a)(L())),Object(i.a)(window,"resize",{passive:!0}).pipe(Object(d.a)(P),Object(h.a)(P()))]).pipe(Object(d.a)(([e,t])=>({offset:e,size:t})),Object(v.a)(1)),Ye=T("(min-width: 960px)"),qe=T("(min-width: 1220px)"),Fe=Object(c.a)(T("print").pipe(Object($.a)(Boolean)),Object(i.a)(window,"beforeprint")).pipe(Object(s.a)(void 0)),Je=u("[data-md-component=header]"),We=u("[data-md-component=main]"),Be=(Qe=Je,Object(O.a)(()=>{const e=getComputedStyle(Qe);return Object(m.a)("sticky"===e.position||"-webkit-sticky"===e.position)}).pipe(Object(fe.a)(E(Qe)),Object(d.a)(([e,{height:t}])=>({sticky:e,height:e?t:0})),Object(de.a)((e,t)=>e.sticky===t.sticky&&e.height===t.height)));var Qe;const De=function(e,{viewport$:t,header$:n}){const a=n.pipe(Object(d.a)(({height:e})=>e),Object(de.a)()),c=a.pipe(Object(o.a)(()=>E(e).pipe(Object(d.a)(({height:t})=>({top:e.offsetTop,bottom:e.offsetTop+t})),Object(C.a)("bottom"))));return Object(M.a)([a,c,t]).pipe(Object(d.a)(([e,{top:t,bottom:n},{offset:{y:a},size:{height:c}}])=>({offset:t-e,height:c=Math.max(0,c-Math.max(0,t-a,e)-Math.max(0,c+a-n)),active:t-e<=a})),Object(de.a)((e,t)=>e.offset===t.offset&&e.height===t.height&&e.active===t.active),Object(v.a)(1))}(We,{header$:Be,viewport$:He}),Ve=new a.a;(H.a.isSupported()?new je.a(e=>{new H.a("[data-clipboard-target], [data-clipboard-text]").on("success",t=>e.next(t))}).pipe(Object(S.a)()):r.a).subscribe(()=>Ve.next(D("clipboard.copied")));function Xe(e,t){return e.pipe(Object(o.a)(e=>e?t():r.a))}Object(c.a)(...b("[data-md-component=content]").map(e=>function(e,{target$:t,viewport$:n,print$:a}){return Object(c.a)(...b("pre > code",e).map(e=>ce(e,{viewport$:n})),...b("table:not([class])",e).map(e=>se(e)),...b("details",e).map(e=>oe(e,{target$:t,print$:a})))}(e,{target$:Ne,viewport$:He,print$:Fe})),...b("[data-md-component=dialog]").map(e=>le(e,{message$:Ve})),...b("[data-md-component=header]").map(e=>function(e,{header$:t,main$:n}){const c=new a.a;return c.pipe(Object(C.a)("active"),Object(be.a)(pe.a)).subscribe(({active:t})=>{t?function(e,t){e.setAttribute("data-md-state",t)}(e,"shadow"):function(e){e.removeAttribute("data-md-state")}(e)}),n.subscribe(e=>c.next(e)),t.pipe(Object(d.a)(t=>Object.assign({ref:e},t)),Object(v.a)(1))}(e,{viewport$:He,header$:Be,main$:De})),...b("[data-md-component=header-title]").map(e=>he(e,{viewport$:He,header$:Be})),...b("[data-md-component=search]").map(e=>function(e){const t=u("[data-md-component=search-query]",e),n=u("[data-md-component=search-result]",e),a=Q(),r=Object(O.a)(()=>fetch(a.base+"/search/search_index.json",{credentials:"same-origin"}).then(e=>e.json())),o=$e(a.search,{index$:r}),i=_e(t,o),s=Ee(n,o,{query$:i});return Object(c.a)(i,s)}(e)),...b("[data-md-component=sidebar]").map(e=>"navigation"===e.getAttribute("data-md-type")?Xe(qe,()=>Ae(e,{viewport$:He,header$:Be,main$:De})):Xe(Ye,()=>Ae(e,{viewport$:He,header$:Be,main$:De}))),...b("[data-md-component=source]").map(e=>Le(e)),...b("[data-md-component=tabs]").map(e=>Pe(e,{viewport$:He,header$:Be})),...b("[data-md-component=toc]").map(e=>Ie(e,{viewport$:He,header$:Be}))).subscribe(console.log)}}));
|
|
//# sourceMappingURL=bundle.0168bc18.min.js.map
|