vuepress-shared
Advanced tools
Comparing version 2.0.0-beta.223 to 2.0.0-beta.224
@@ -42,3 +42,3 @@ import * as vue from 'vue'; | ||
declare const useLink: (link: string | Ref<string>) => LinkOptions; | ||
declare const VPLink: vue.DefineComponent<{ | ||
declare const RouterLink: vue.DefineComponent<{ | ||
/** | ||
@@ -63,2 +63,9 @@ * Link | ||
interface VPLinkProps { | ||
to: string; | ||
} | ||
declare const VPLink: FunctionalComponent<VPLinkProps, Record<never, never>, { | ||
default: () => string | VNode | (string | VNode)[]; | ||
}>; | ||
declare const GitHubIcon: FunctionalComponent; | ||
@@ -333,5 +340,7 @@ declare const GitLabIcon: FunctionalComponent; | ||
declare const guardEvent: (event: MouseEvent) => boolean | void; | ||
declare const getSize: () => Record<"width" | "height" | "left" | "top", number>; | ||
declare const openPopupWindow: (link: string, target?: string, features?: string[]) => void; | ||
export { Author, AuthorInfo, AuthorName, BasePageFrontMatter, BitbucketIcon, GitHubIcon, GitLabIcon, GiteeIcon, IconBase, IconBaseProps, LinkOptions, LoadingIcon, Message, PageTitleRef, Popup, RenderDefault, RepoType, RequiredLocaleConfig, SourceIcon, VPLink, atou, checkIsChromeWebView, checkIsIOS, checkIsMacOS, checkIsMobile, checkIsSafari, checkIsSafariMobile, checkIsWindows, checkIsiPad, checkIsiPhone, deepAssign, endsWith, entries, fromEntries, generateIndexFromHash, getAuthor, getCategory, getDate, getHash, getSize, getStringArray, getTag, hasGlobalComponent, isAbsoluteUrl, isActiveLink, isBoolean, isFunction, isNumber, isRegExp, isString, isUrl, keys, normalizePath, openPopupWindow, resolveRepoLink, resolveRepoType, resolveRouteWithRedirect, startsWith, useIsMobile, useLink, useLocaleConfig, usePageTitle, useSupportUserAgent, utoa, values }; | ||
export { Author, AuthorInfo, AuthorName, BasePageFrontMatter, BitbucketIcon, GitHubIcon, GitLabIcon, GiteeIcon, IconBase, IconBaseProps, LinkOptions, LoadingIcon, Message, PageTitleRef, Popup, RenderDefault, RepoType, RequiredLocaleConfig, RouterLink, SourceIcon, VPLink, VPLinkProps, atou, checkIsChromeWebView, checkIsIOS, checkIsMacOS, checkIsMobile, checkIsSafari, checkIsSafariMobile, checkIsWindows, checkIsiPad, checkIsiPhone, deepAssign, endsWith, entries, fromEntries, generateIndexFromHash, getAuthor, getCategory, getDate, getHash, getSize, getStringArray, getTag, guardEvent, hasGlobalComponent, isAbsoluteUrl, isActiveLink, isBoolean, isFunction, isNumber, isRegExp, isString, isUrl, keys, normalizePath, openPopupWindow, resolveRepoLink, resolveRepoType, resolveRouteWithRedirect, startsWith, useIsMobile, useLink, useLocaleConfig, usePageTitle, useSupportUserAgent, utoa, values }; |
@@ -1,2 +0,2 @@ | ||
import{h as s,computed as l,unref as w,defineComponent as O,toRef as D,getCurrentInstance as y,camelize as E,capitalize as G,ref as V,onMounted as U}from"vue";import{useRouter as F,useRoute as K}from"vue-router";import{useRouteLocale as q,usePageData as Y}from"@vuepress/client";import{strToU8 as k,zlibSync as J,strFromU8 as S,unzlibSync as Q}from"fflate/browser";const u=({name:e="",color:t="currentColor"},{slots:n})=>{var o;return s("svg",{xmlns:"http://www.w3.org/2000/svg",class:["icon",`${e}-icon`],viewBox:"0 0 1024 1024",fill:t,"aria-label":`${e} icon`},(o=n.default)==null?void 0:o.call(n))};u.displayName="IconBase";const x=({size:e=48,stroke:t=4,wrapper:n=!0,height:o=2*e})=>{const i=s("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,preserveAspectRatio:"xMidYMid",viewBox:"25 25 50 50"},[s("animateTransform",{attributeName:"transform",type:"rotate",dur:"2s",keyTimes:"0;1",repeatCount:"indefinite",values:"0;360"}),s("circle",{cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":t,"stroke-linecap":"round"},[s("animate",{attributeName:"stroke-dasharray",dur:"1.5s",keyTimes:"0;0.5;1",repeatCount:"indefinite",values:"1,200;90,200;1,200"}),s("animate",{attributeName:"stroke-dashoffset",dur:"1.5s",keyTimes:"0;0.5;1",repeatCount:"indefinite",values:"0;-35px;-125px"})])]);return n?s("div",{class:"loading-icon-wrapper",style:`display:flex;align-items:center;justify-content:center;height:${o}px`},i):i};x.displayName="LoadingIcon";const X=(e,{slots:t})=>{var n;return(n=t.default)==null?void 0:n.call(t)},Z=e=>{if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget){const t=e.currentTarget.getAttribute("target");if(t!=null&&t.match(/\b_blank\b/i))return}return e.preventDefault(),!0}},I=e=>{const t=F(),n=K(),o=l(()=>t.resolve(w(e))),i=l(()=>o.value.path===n.path),r=(c={})=>Z(c)?t.push(w(e)).catch():Promise.resolve();return{route:o,href:l(()=>o.value.href),isActive:i,navigate:r}},ee=O({name:"VPLink",props:{to:{type:String,required:!0}},slots:Object,setup(e,{slots:t}){const n=D(e,"to"),o=I(n);return()=>{var i;return s("a",{class:["vp-link",{"vp-active":o.isActive.value}],href:o.href.value,onClick:o.navigate},(i=t.default)==null?void 0:i.call(t,o))}}}),L=()=>s(u,{name:"github"},()=>s("path",{d:"M511.957 21.333C241.024 21.333 21.333 240.981 21.333 512c0 216.832 140.544 400.725 335.574 465.664 24.49 4.395 32.256-10.07 32.256-23.083 0-11.69.256-44.245 0-85.205-136.448 29.61-164.736-64.64-164.736-64.64-22.315-56.704-54.4-71.765-54.4-71.765-44.587-30.464 3.285-29.824 3.285-29.824 49.195 3.413 75.179 50.517 75.179 50.517 43.776 75.008 114.816 53.333 142.762 40.79 4.523-31.66 17.152-53.377 31.19-65.537-108.971-12.458-223.488-54.485-223.488-242.602 0-53.547 19.114-97.323 50.517-131.67-5.035-12.33-21.93-62.293 4.779-129.834 0 0 41.258-13.184 134.912 50.346a469.803 469.803 0 0 1 122.88-16.554c41.642.213 83.626 5.632 122.88 16.554 93.653-63.488 134.784-50.346 134.784-50.346 26.752 67.541 9.898 117.504 4.864 129.834 31.402 34.347 50.474 78.123 50.474 131.67 0 188.586-114.73 230.016-224.042 242.09 17.578 15.232 33.578 44.672 33.578 90.454v135.85c0 13.142 7.936 27.606 32.854 22.87C862.25 912.597 1002.667 728.747 1002.667 512c0-271.019-219.648-490.667-490.71-490.667z"}));L.displayName="GitHubIcon";const C=()=>s(u,{name:"gitlab"},()=>s("path",{d:"M229.333 78.688C223.52 62 199.895 62 193.895 78.688L87.958 406.438h247.5c-.188 0-106.125-327.75-106.125-327.75zM33.77 571.438c-4.875 15 .563 31.687 13.313 41.25l464.812 345L87.77 406.438zm301.5-165 176.813 551.25 176.812-551.25zm655.125 165-54-165-424.312 551.25 464.812-345c12.938-9.563 18.188-26.25 13.5-41.25zM830.27 78.688c-5.812-16.688-29.437-16.688-35.437 0l-106.125 327.75h247.5z"}));C.displayName="GitLabIcon";const z=()=>s(u,{name:"gitee"},()=>s("path",{d:"M512 992C246.92 992 32 777.08 32 512S246.92 32 512 32s480 214.92 480 480-214.92 480-480 480zm242.97-533.34H482.39a23.7 23.7 0 0 0-23.7 23.7l-.03 59.28c0 13.08 10.59 23.7 23.7 23.7h165.96a23.7 23.7 0 0 1 23.7 23.7v11.85a71.1 71.1 0 0 1-71.1 71.1H375.71a23.7 23.7 0 0 1-23.7-23.7V423.11a71.1 71.1 0 0 1 71.1-71.1h331.8a23.7 23.7 0 0 0 23.7-23.7l.06-59.25a23.73 23.73 0 0 0-23.7-23.73H423.11a177.78 177.78 0 0 0-177.78 177.75v331.83c0 13.08 10.62 23.7 23.7 23.7h349.62a159.99 159.99 0 0 0 159.99-159.99V482.33a23.7 23.7 0 0 0-23.7-23.7z"}));z.displayName="GiteeIcon";const M=()=>s(u,{name:"bitbucket"},()=>s("path",{d:"M575.256 490.862c6.29 47.981-52.005 85.723-92.563 61.147-45.714-20.004-45.714-92.562-1.133-113.152 38.29-23.442 93.696 7.424 93.696 52.005zm63.451-11.996c-10.276-81.152-102.29-134.839-177.152-101.156-47.433 21.138-79.433 71.424-77.129 124.562 2.853 69.705 69.157 126.866 138.862 120.576S647.3 548.571 638.708 478.83zm136.558-309.723c-25.161-33.134-67.986-38.839-105.728-45.13-106.862-17.151-216.576-17.7-323.438 1.134-35.438 5.706-75.447 11.996-97.719 43.996 36.572 34.304 88.576 39.424 135.424 45.129 84.553 10.862 171.447 11.447 256 .585 47.433-5.705 99.987-10.276 135.424-45.714zm32.585 591.433c-16.018 55.99-6.839 131.438-66.304 163.986-102.29 56.576-226.304 62.867-338.87 42.862-59.43-10.862-129.135-29.696-161.72-85.723-14.3-54.858-23.442-110.848-32.585-166.84l3.438-9.142 10.276-5.157c170.277 112.567 408.576 112.567 579.438 0 26.844 8.01 6.84 40.558 6.29 60.014zm103.424-549.157c-19.42 125.148-41.728 249.71-63.415 374.272-6.29 36.572-41.728 57.162-71.424 72.558-106.862 53.724-231.424 62.866-348.562 50.286-79.433-8.558-160.585-29.696-225.134-79.433-30.28-23.443-30.28-63.415-35.986-97.134-20.005-117.138-42.862-234.277-57.161-352.585 6.839-51.42 64.585-73.728 107.447-89.71 57.16-21.138 118.272-30.866 178.87-36.571 129.134-12.58 261.157-8.01 386.304 28.562 44.581 13.13 92.563 31.415 122.844 69.705 13.714 17.7 9.143 40.01 6.29 60.014z"}));M.displayName="BitbucketIcon";const $=()=>s(u,{name:"source"},()=>s("path",{d:"M601.92 475.2c0 76.428-8.91 83.754-28.512 99.594-14.652 11.88-43.956 14.058-78.012 16.434-18.81 1.386-40.392 2.97-62.172 6.534-18.612 2.97-36.432 9.306-53.064 17.424V299.772c37.818-21.978 63.36-62.766 63.36-109.692 0-69.894-56.826-126.72-126.72-126.72S190.08 120.186 190.08 190.08c0 46.926 25.542 87.714 63.36 109.692v414.216c-37.818 21.978-63.36 62.766-63.36 109.692 0 69.894 56.826 126.72 126.72 126.72s126.72-56.826 126.72-126.72c0-31.086-11.286-59.598-29.7-81.576 13.266-9.504 27.522-17.226 39.996-19.206 16.038-2.574 32.868-3.762 50.688-5.148 48.312-3.366 103.158-7.326 148.896-44.55 61.182-49.698 74.25-103.158 75.24-187.902V475.2h-126.72zM316.8 126.72c34.848 0 63.36 28.512 63.36 63.36s-28.512 63.36-63.36 63.36-63.36-28.512-63.36-63.36 28.512-63.36 63.36-63.36zm0 760.32c-34.848 0-63.36-28.512-63.36-63.36s28.512-63.36 63.36-63.36 63.36 28.512 63.36 63.36-28.512 63.36-63.36 63.36zM823.68 158.4h-95.04V63.36h-126.72v95.04h-95.04v126.72h95.04v95.04h126.72v-95.04h95.04z"}));$.displayName="SourceIcon";const d=Array.isArray,te=e=>typeof e=="function",ne=e=>typeof e=="string";var oe=e=>e[0]==="/"?e:`/${e}`,ie=e=>e[e.length-1]==="/"||e.endsWith(".html")?e:`${e}/`,A=e=>e.startsWith("ftp://"),h=e=>/^(https?:)?\/\//.test(e),se=/.md((\?|#).*)?$/,re=(e,t="/")=>!!(h(e)||A(e)||e.startsWith("/")&&!e.startsWith(t)&&!se.test(e)),ae=e=>/^mailto:/.test(e),ce=e=>/^tel:/.test(e),p=e=>Object.prototype.toString.call(e)==="[object Object]",le=e=>e[e.length-1]==="/"?e.slice(0,-1):e,ue=e=>e[0]==="/"?e.slice(1):e;const pe=(e,t)=>{const n=t?t._instance:y();return p(n==null?void 0:n.appContext.components)&&(e in n.appContext.components||E(e)in n.appContext.components||G(E(e))in n.appContext.components)},me=e=>typeof e<"u",de=Object.prototype.toString,he=e=>de.call(e)==="[object Object]";function fe(){const e=V(!1);return y()&&U(()=>{e.value=!0}),e}function ve(e){return fe(),l(()=>!!e())}const N=()=>ve(()=>typeof window<"u"&&window.navigator&&"userAgent"in window.navigator),ge=()=>{const e=N();return l(()=>e.value&&/\b(?:Android|iPhone)/i.test(navigator.userAgent))},be=e=>{const t=q();return l(()=>e[t.value])},we=()=>l(()=>Y().value.title),ye=e=>/\b(?:Android|iPhone)/i.test(e),Ee=e=>/ wv\).+(chrome)\/([\w.]+)/i.test(e),ke=e=>/version\/([\w.]+) .*mobile\/\w+ (safari)/i.test(e),Se=e=>/version\/([\w.]+) .*(mobile ?safari|safari)/i.test(e),xe=e=>/\((ip(?:hone|od)[\w ]*);/i.test(e),Ie=e=>[/\((ipad);[-\w),; ]+apple/i,/applecoremedia\/[\w.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i].some(t=>t.test(e)),Le=e=>[/microsoft (windows) (vista|xp)/i,/(win(?=3|9|n)|win 9x )([nt\d.]+)/i,/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[/ ]?([\d.\w ]*)/i,/(windows)[/ ]?([ntce\d. ]+\w)(?!.+xbox)/i].some(t=>t.test(e)),Ce=e=>[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i].some(t=>t.test(e)),ze=e=>[/(mac os x) ?([\w. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i].some(t=>t.test(e)),Me=(e="")=>{if(e){if(typeof e=="number")return new Date(e);const t=Date.parse(e.toString());if(!Number.isNaN(t))return new Date(t)}return null},$e=(e,t)=>{let n=1;for(let o=0;o<e.length;o++)n+=e.charCodeAt(o),n+=n<<10,n^=n>>6;return n+=n<<3,n^=n>>11,n%t},Ae=e=>typeof e=="boolean",Ne=e=>typeof e=="function",Re=e=>typeof e=="number",a=e=>typeof e=="string",_e=e=>e instanceof RegExp,R=(e,t)=>a(e)&&e.startsWith(t),Pe=(e,t)=>a(e)&&e.endsWith(t),_=Object.entries,Te=Object.fromEntries,f=Object.keys,je=Object.values,v=(e,...t)=>{if(t.length===0)return e;const n=t.shift()||null;return n&&_(n).forEach(([o,i])=>{o==="__proto__"||o==="constructor"||(p(e[o])&&p(i)?v(e[o],i):d(i)?e[o]=[...i]:p(i)?e[o]={...i}:e[o]=n[o])}),v(e,...t)},P=e=>p(e)&&a(e.name),We=(e,t=!1)=>e?d(e)?e.map(n=>a(n)?{name:n}:P(n)?n:null).filter(n=>n!==null):a(e)?[{name:e}]:P(e)?[e]:(console.error(`Expect "author" to be \`AuthorInfo[] | AuthorInfo | string[] | string ${t?"":"| false"} | undefined\`, but got`,e),[]):[],g=(e,t)=>{if(e){if(d(e)&&e.every(a))return e;if(a(e))return[e];console.error(`Expect ${t||"value"} to be \`string[] | string | undefined\`, but got`,e)}return[]},Be=e=>g(e,"category"),He=e=>g(e,"tag"),Oe=e=>{if(!a(e)||e==="")return!1;const t=/^(?:\w+:)?\/\/(\S+)$/u.exec(e);if(!t)return!1;const n=t[1];return n?/^localhost[:?\d]*(?:[^:?\d]\S*)?$/u.test(n)||/^[^\s.]+\.\S{2,}$/u.test(n):!1},De=e=>R(e,"/");class Ge{constructor(){this.messageElements={};const t="message-container",n=document.getElementById(t);n?this.containerElement=n:(this.containerElement=document.createElement("div"),this.containerElement.id=t,document.body.appendChild(this.containerElement))}pop(t,n=2e3){const o=document.createElement("div"),i=Date.now();return o.className="message move-in",o.innerHTML=t,this.containerElement.appendChild(o),this.messageElements[i]=o,n>0&&setTimeout(()=>{this.close(i)},n),i}close(t){if(t){const n=this.messageElements[t];n.classList.remove("move-in"),n.classList.add("move-out"),n.addEventListener("animationend",()=>{n.remove(),delete this.messageElements[t]})}else f(this.messageElements).forEach(n=>this.close(Number(n)))}destroy(){document.body.removeChild(this.containerElement)}}const T=/#.*$/u,j=e=>{const t=T.exec(e);return t?t[0]:""},b=e=>decodeURI(e).replace(T,"").replace(/(index)?\.(md|html)$/,""),Ve=(e,t)=>{if(t===void 0)return!1;const n=b(e.path),o=b(t),i=j(t);return i?i===e.hash&&(!o||n===o):n===o};class Ue{constructor(){this.popupElements={};const t="popup-container",n=document.getElementById(t);n?this.containerElement=n:(this.containerElement=document.createElement("div"),this.containerElement.id=t,document.body.appendChild(this.containerElement))}emit(t,n){const o=document.createElement("div"),i=document.createElement("div"),r=Date.now();return this.containerElement.appendChild(o),this.popupElements[r]=o,o.className="popup-wrapper appear",o.appendChild(i),o.addEventListener("click",()=>this.close(r)),i.className="popup-container",i.innerHTML=t,typeof n=="number"&&setTimeout(()=>{this.close(r)},n),r}close(t){if(t){const n=this.popupElements[t];n.classList.replace("appear","disappear"),n.children[0].addEventListener("animationend",()=>{n.remove(),delete this.popupElements[t]})}else f(this.popupElements).forEach(n=>this.close(Number(n)))}destroy(){document.body.removeChild(this.containerElement)}}const Fe=(e,t=6)=>{const n=k(e),o=J(n,{level:t}),i=S(o,!0);return __VUEPRESS_SSR__?Buffer.from(i,"binary").toString("base64"):btoa(i)},Ke=e=>{const t=__VUEPRESS_SSR__?Buffer.from(e,"base64").toString("binary"):atob(e);return S(Q(k(t,!0)))},qe=e=>h(e)?e:`https://github.com/${e}`,Ye=e=>!h(e)||/github\.com/.test(e)?"GitHub":/bitbucket\.org/.test(e)?"Bitbucket":/gitlab\.com/.test(e)?"GitLab":/gitee\.com/.test(e)?"Gitee":null,W=(e,...t)=>{const n=e.resolve(...t),o=n.matched[n.matched.length-1];if(!(o!=null&&o.redirect))return n;const{redirect:i}=o,r=te(i)?i(n):i,c=ne(r)?{path:r}:r;return W(e,{hash:n.hash,query:n.query,params:n.params,...c})},B=()=>{const{availWidth:e,availHeight:t}=screen,{screenLeft:n,screenTop:o,innerWidth:i,innerHeight:r}=window,c=Math.max(e/2,600),m=Math.max(t/2,400);return{width:c,height:m,left:n+i/2-c/2,top:o+r/2-m/2}},Je=(e,t="_blank",n=["resizable","status"])=>{var o,i;const{width:r,height:c,left:m,top:H}=B();(i=(o=window.open(e,t,`width=${r},height=${c},left=${m},top=${H},${n.join(",")}`))==null?void 0:o.focus)==null||i.call(o)};export{M as BitbucketIcon,L as GitHubIcon,C as GitLabIcon,z as GiteeIcon,u as IconBase,x as LoadingIcon,Ge as Message,Ue as Popup,X as RenderDefault,$ as SourceIcon,ee as VPLink,Ke as atou,Ee as checkIsChromeWebView,Ce as checkIsIOS,ze as checkIsMacOS,ye as checkIsMobile,Se as checkIsSafari,ke as checkIsSafariMobile,Le as checkIsWindows,Ie as checkIsiPad,xe as checkIsiPhone,v as deepAssign,Pe as endsWith,ie as ensureEndingSlash,oe as ensureLeadingSlash,_ as entries,Te as fromEntries,$e as generateIndexFromHash,We as getAuthor,Be as getCategory,Me as getDate,j as getHash,B as getSize,g as getStringArray,He as getTag,pe as hasGlobalComponent,De as isAbsoluteUrl,Ve as isActiveLink,d as isArray,Ae as isBoolean,me as isDef,Ne as isFunction,re as isLinkExternal,A as isLinkFtp,h as isLinkHttp,ae as isLinkMailto,ce as isLinkTel,Re as isNumber,he as isObject,p as isPlainObject,_e as isRegExp,a as isString,Oe as isUrl,f as keys,b as normalizePath,Je as openPopupWindow,le as removeEndingSlash,ue as removeLeadingSlash,qe as resolveRepoLink,Ye as resolveRepoType,W as resolveRouteWithRedirect,R as startsWith,ge as useIsMobile,I as useLink,be as useLocaleConfig,we as usePageTitle,N as useSupportUserAgent,Fe as utoa,je as values}; | ||
import{h as s,computed as l,ref as V,getCurrentInstance as y,onMounted as U,unref as E,defineComponent as F,toRef as K,camelize as k,capitalize as q}from"vue";import{useRouter as S,useRoute as Y}from"vue-router";import{withBase as J,useRouteLocale as Q,usePageData as X}from"@vuepress/client";import{strToU8 as L,zlibSync as Z,strFromU8 as x,unzlibSync as ee}from"fflate/browser";const u=({name:e="",color:t="currentColor"},{slots:n})=>{var o;return s("svg",{xmlns:"http://www.w3.org/2000/svg",class:["icon",`${e}-icon`],viewBox:"0 0 1024 1024",fill:t,"aria-label":`${e} icon`},(o=n.default)==null?void 0:o.call(n))};u.displayName="IconBase";const I=({size:e=48,stroke:t=4,wrapper:n=!0,height:o=2*e})=>{const i=s("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,preserveAspectRatio:"xMidYMid",viewBox:"25 25 50 50"},[s("animateTransform",{attributeName:"transform",type:"rotate",dur:"2s",keyTimes:"0;1",repeatCount:"indefinite",values:"0;360"}),s("circle",{cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":t,"stroke-linecap":"round"},[s("animate",{attributeName:"stroke-dasharray",dur:"1.5s",keyTimes:"0;0.5;1",repeatCount:"indefinite",values:"1,200;90,200;1,200"}),s("animate",{attributeName:"stroke-dashoffset",dur:"1.5s",keyTimes:"0;0.5;1",repeatCount:"indefinite",values:"0;-35px;-125px"})])]);return n?s("div",{class:"loading-icon-wrapper",style:`display:flex;align-items:center;justify-content:center;height:${o}px`},i):i};I.displayName="LoadingIcon";const te=(e,{slots:t})=>{var n;return(n=t.default)==null?void 0:n.call(t)},ne=e=>/\b(?:Android|iPhone)/i.test(e),oe=e=>/ wv\).+(chrome)\/([\w.]+)/i.test(e),ie=e=>/version\/([\w.]+) .*mobile\/\w+ (safari)/i.test(e),se=e=>/version\/([\w.]+) .*(mobile ?safari|safari)/i.test(e),re=e=>/\((ip(?:hone|od)[\w ]*);/i.test(e),ae=e=>[/\((ipad);[-\w),; ]+apple/i,/applecoremedia\/[\w.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i].some(t=>t.test(e)),ce=e=>[/microsoft (windows) (vista|xp)/i,/(win(?=3|9|n)|win 9x )([nt\d.]+)/i,/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[/ ]?([\d.\w ]*)/i,/(windows)[/ ]?([ntce\d. ]+\w)(?!.+xbox)/i].some(t=>t.test(e)),le=e=>[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i].some(t=>t.test(e)),ue=e=>[/(mac os x) ?([\w. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i].some(t=>t.test(e)),me=(e="")=>{if(e){if(typeof e=="number")return new Date(e);const t=Date.parse(e.toString());if(!Number.isNaN(t))return new Date(t)}return null},pe=(e,t)=>{let n=1;for(let o=0;o<e.length;o++)n+=e.charCodeAt(o),n+=n<<10,n^=n>>6;return n+=n<<3,n^=n>>11,n%t},d=Array.isArray,de=e=>typeof e=="function",he=e=>typeof e=="string";var fe=e=>e[0]==="/"?e:`/${e}`,ve=e=>e[e.length-1]==="/"||e.endsWith(".html")?e:`${e}/`,C=e=>e.startsWith("ftp://"),h=e=>/^(https?:)?\/\//.test(e),ge=/.md((\?|#).*)?$/,be=(e,t="/")=>!!(h(e)||C(e)||e.startsWith("/")&&!e.startsWith(t)&&!ge.test(e)),we=e=>/^mailto:/.test(e),ye=e=>/^tel:/.test(e),m=e=>Object.prototype.toString.call(e)==="[object Object]",Ee=e=>e[e.length-1]==="/"?e.slice(0,-1):e,ke=e=>e[0]==="/"?e.slice(1):e;const Se=e=>typeof e<"u",Le=Object.prototype.toString,xe=e=>Le.call(e)==="[object Object]";function Ie(){const e=V(!1);return y()&&U(()=>{e.value=!0}),e}function Ce(e){return Ie(),l(()=>!!e())}const ze=e=>typeof e=="boolean",Me=e=>typeof e=="function",$e=e=>typeof e=="number",a=e=>typeof e=="string",Ae=e=>e instanceof RegExp,z=(e,t)=>a(e)&&e.startsWith(t),Ne=(e,t)=>a(e)&&e.endsWith(t),M=Object.entries,Re=Object.fromEntries,f=Object.keys,_e=Object.values,v=(e,...t)=>{if(t.length===0)return e;const n=t.shift()||null;return n&&M(n).forEach(([o,i])=>{o==="__proto__"||o==="constructor"||(m(e[o])&&m(i)?v(e[o],i):d(i)?e[o]=[...i]:m(i)?e[o]={...i}:e[o]=n[o])}),v(e,...t)},$=e=>m(e)&&a(e.name),Pe=(e,t=!1)=>e?d(e)?e.map(n=>a(n)?{name:n}:$(n)?n:null).filter(n=>n!==null):a(e)?[{name:e}]:$(e)?[e]:(console.error(`Expect "author" to be \`AuthorInfo[] | AuthorInfo | string[] | string ${t?"":"| false"} | undefined\`, but got`,e),[]):[],g=(e,t)=>{if(e){if(d(e)&&e.every(a))return e;if(a(e))return[e];console.error(`Expect ${t||"value"} to be \`string[] | string | undefined\`, but got`,e)}return[]},Te=e=>g(e,"category"),je=e=>g(e,"tag"),Be=e=>{if(!a(e)||e==="")return!1;const t=/^(?:\w+:)?\/\/(\S+)$/u.exec(e);if(!t)return!1;const n=t[1];return n?/^localhost[:?\d]*(?:[^:?\d]\S*)?$/u.test(n)||/^[^\s.]+\.\S{2,}$/u.test(n):!1},We=e=>z(e,"/");class He{constructor(){this.messageElements={};const t="message-container",n=document.getElementById(t);n?this.containerElement=n:(this.containerElement=document.createElement("div"),this.containerElement.id=t,document.body.appendChild(this.containerElement))}pop(t,n=2e3){const o=document.createElement("div"),i=Date.now();return o.className="message move-in",o.innerHTML=t,this.containerElement.appendChild(o),this.messageElements[i]=o,n>0&&setTimeout(()=>{this.close(i)},n),i}close(t){if(t){const n=this.messageElements[t];n.classList.remove("move-in"),n.classList.add("move-out"),n.addEventListener("animationend",()=>{n.remove(),delete this.messageElements[t]})}else f(this.messageElements).forEach(n=>this.close(Number(n)))}destroy(){document.body.removeChild(this.containerElement)}}const A=/#.*$/u,N=e=>{const t=A.exec(e);return t?t[0]:""},b=e=>decodeURI(e).replace(A,"").replace(/(index)?\.(md|html)$/,""),Oe=(e,t)=>{if(t===void 0)return!1;const n=b(e.path),o=b(t),i=N(t);return i?i===e.hash&&(!o||n===o):n===o};class De{constructor(){this.popupElements={};const t="popup-container",n=document.getElementById(t);n?this.containerElement=n:(this.containerElement=document.createElement("div"),this.containerElement.id=t,document.body.appendChild(this.containerElement))}emit(t,n){const o=document.createElement("div"),i=document.createElement("div"),r=Date.now();return this.containerElement.appendChild(o),this.popupElements[r]=o,o.className="popup-wrapper appear",o.appendChild(i),o.addEventListener("click",()=>this.close(r)),i.className="popup-container",i.innerHTML=t,typeof n=="number"&&setTimeout(()=>{this.close(r)},n),r}close(t){if(t){const n=this.popupElements[t];n.classList.replace("appear","disappear"),n.children[0].addEventListener("animationend",()=>{n.remove(),delete this.popupElements[t]})}else f(this.popupElements).forEach(n=>this.close(Number(n)))}destroy(){document.body.removeChild(this.containerElement)}}const Ge=(e,t=6)=>{const n=L(e),o=Z(n,{level:t}),i=x(o,!0);return __VUEPRESS_SSR__?Buffer.from(i,"binary").toString("base64"):btoa(i)},Ve=e=>{const t=__VUEPRESS_SSR__?Buffer.from(e,"base64").toString("binary"):atob(e);return x(ee(L(t,!0)))},Ue=e=>h(e)?e:`https://github.com/${e}`,Fe=e=>!h(e)||/github\.com/.test(e)?"GitHub":/bitbucket\.org/.test(e)?"Bitbucket":/gitlab\.com/.test(e)?"GitLab":/gitee\.com/.test(e)?"Gitee":null,R=(e,...t)=>{const n=e.resolve(...t),o=n.matched[n.matched.length-1];if(!(o!=null&&o.redirect))return n;const{redirect:i}=o,r=de(i)?i(n):i,c=he(r)?{path:r}:r;return R(e,{hash:n.hash,query:n.query,params:n.params,...c})},w=e=>{if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget){const t=e.currentTarget.getAttribute("target");if(t!=null&&t.match(/\b_blank\b/i))return}return e.preventDefault(),!0}},_=()=>{const{availWidth:e,availHeight:t}=screen,{screenLeft:n,screenTop:o,innerWidth:i,innerHeight:r}=window,c=Math.max(e/2,600),p=Math.max(t/2,400);return{width:c,height:p,left:n+i/2-c/2,top:o+r/2-p/2}},Ke=(e,t="_blank",n=["resizable","status"])=>{var o,i;const{width:r,height:c,left:p,top:G}=_();(i=(o=window.open(e,t,`width=${r},height=${c},left=${p},top=${G},${n.join(",")}`))==null?void 0:o.focus)==null||i.call(o)},P=e=>{const t=S(),n=Y(),o=l(()=>t.resolve(E(e))),i=l(()=>o.value.path===n.path),r=(c={})=>w(c)?t.push(E(e)).catch():Promise.resolve();return{route:o,href:l(()=>o.value.href),isActive:i,navigate:r}},qe=F({name:"RouterLink",props:{to:{type:String,required:!0}},slots:Object,setup(e,{slots:t}){const n=K(e,"to"),o=P(n);return()=>{var i;return s("a",{class:["vp-link",{"vp-active":o.isActive.value}],href:o.href.value,onClick:o.navigate},(i=t.default)==null?void 0:i.call(t,o))}}}),T=({to:e=""},{slots:t})=>{var n;const o=S(),i=(r={})=>w(r)?o.push(e).catch():Promise.resolve();return s("a",{class:"md-link",href:J(e),onClick:i},(n=t.default)==null?void 0:n.call(t))};T.displayName="VPLink";const j=()=>s(u,{name:"github"},()=>s("path",{d:"M511.957 21.333C241.024 21.333 21.333 240.981 21.333 512c0 216.832 140.544 400.725 335.574 465.664 24.49 4.395 32.256-10.07 32.256-23.083 0-11.69.256-44.245 0-85.205-136.448 29.61-164.736-64.64-164.736-64.64-22.315-56.704-54.4-71.765-54.4-71.765-44.587-30.464 3.285-29.824 3.285-29.824 49.195 3.413 75.179 50.517 75.179 50.517 43.776 75.008 114.816 53.333 142.762 40.79 4.523-31.66 17.152-53.377 31.19-65.537-108.971-12.458-223.488-54.485-223.488-242.602 0-53.547 19.114-97.323 50.517-131.67-5.035-12.33-21.93-62.293 4.779-129.834 0 0 41.258-13.184 134.912 50.346a469.803 469.803 0 0 1 122.88-16.554c41.642.213 83.626 5.632 122.88 16.554 93.653-63.488 134.784-50.346 134.784-50.346 26.752 67.541 9.898 117.504 4.864 129.834 31.402 34.347 50.474 78.123 50.474 131.67 0 188.586-114.73 230.016-224.042 242.09 17.578 15.232 33.578 44.672 33.578 90.454v135.85c0 13.142 7.936 27.606 32.854 22.87C862.25 912.597 1002.667 728.747 1002.667 512c0-271.019-219.648-490.667-490.71-490.667z"}));j.displayName="GitHubIcon";const B=()=>s(u,{name:"gitlab"},()=>s("path",{d:"M229.333 78.688C223.52 62 199.895 62 193.895 78.688L87.958 406.438h247.5c-.188 0-106.125-327.75-106.125-327.75zM33.77 571.438c-4.875 15 .563 31.687 13.313 41.25l464.812 345L87.77 406.438zm301.5-165 176.813 551.25 176.812-551.25zm655.125 165-54-165-424.312 551.25 464.812-345c12.938-9.563 18.188-26.25 13.5-41.25zM830.27 78.688c-5.812-16.688-29.437-16.688-35.437 0l-106.125 327.75h247.5z"}));B.displayName="GitLabIcon";const W=()=>s(u,{name:"gitee"},()=>s("path",{d:"M512 992C246.92 992 32 777.08 32 512S246.92 32 512 32s480 214.92 480 480-214.92 480-480 480zm242.97-533.34H482.39a23.7 23.7 0 0 0-23.7 23.7l-.03 59.28c0 13.08 10.59 23.7 23.7 23.7h165.96a23.7 23.7 0 0 1 23.7 23.7v11.85a71.1 71.1 0 0 1-71.1 71.1H375.71a23.7 23.7 0 0 1-23.7-23.7V423.11a71.1 71.1 0 0 1 71.1-71.1h331.8a23.7 23.7 0 0 0 23.7-23.7l.06-59.25a23.73 23.73 0 0 0-23.7-23.73H423.11a177.78 177.78 0 0 0-177.78 177.75v331.83c0 13.08 10.62 23.7 23.7 23.7h349.62a159.99 159.99 0 0 0 159.99-159.99V482.33a23.7 23.7 0 0 0-23.7-23.7z"}));W.displayName="GiteeIcon";const H=()=>s(u,{name:"bitbucket"},()=>s("path",{d:"M575.256 490.862c6.29 47.981-52.005 85.723-92.563 61.147-45.714-20.004-45.714-92.562-1.133-113.152 38.29-23.442 93.696 7.424 93.696 52.005zm63.451-11.996c-10.276-81.152-102.29-134.839-177.152-101.156-47.433 21.138-79.433 71.424-77.129 124.562 2.853 69.705 69.157 126.866 138.862 120.576S647.3 548.571 638.708 478.83zm136.558-309.723c-25.161-33.134-67.986-38.839-105.728-45.13-106.862-17.151-216.576-17.7-323.438 1.134-35.438 5.706-75.447 11.996-97.719 43.996 36.572 34.304 88.576 39.424 135.424 45.129 84.553 10.862 171.447 11.447 256 .585 47.433-5.705 99.987-10.276 135.424-45.714zm32.585 591.433c-16.018 55.99-6.839 131.438-66.304 163.986-102.29 56.576-226.304 62.867-338.87 42.862-59.43-10.862-129.135-29.696-161.72-85.723-14.3-54.858-23.442-110.848-32.585-166.84l3.438-9.142 10.276-5.157c170.277 112.567 408.576 112.567 579.438 0 26.844 8.01 6.84 40.558 6.29 60.014zm103.424-549.157c-19.42 125.148-41.728 249.71-63.415 374.272-6.29 36.572-41.728 57.162-71.424 72.558-106.862 53.724-231.424 62.866-348.562 50.286-79.433-8.558-160.585-29.696-225.134-79.433-30.28-23.443-30.28-63.415-35.986-97.134-20.005-117.138-42.862-234.277-57.161-352.585 6.839-51.42 64.585-73.728 107.447-89.71 57.16-21.138 118.272-30.866 178.87-36.571 129.134-12.58 261.157-8.01 386.304 28.562 44.581 13.13 92.563 31.415 122.844 69.705 13.714 17.7 9.143 40.01 6.29 60.014z"}));H.displayName="BitbucketIcon";const O=()=>s(u,{name:"source"},()=>s("path",{d:"M601.92 475.2c0 76.428-8.91 83.754-28.512 99.594-14.652 11.88-43.956 14.058-78.012 16.434-18.81 1.386-40.392 2.97-62.172 6.534-18.612 2.97-36.432 9.306-53.064 17.424V299.772c37.818-21.978 63.36-62.766 63.36-109.692 0-69.894-56.826-126.72-126.72-126.72S190.08 120.186 190.08 190.08c0 46.926 25.542 87.714 63.36 109.692v414.216c-37.818 21.978-63.36 62.766-63.36 109.692 0 69.894 56.826 126.72 126.72 126.72s126.72-56.826 126.72-126.72c0-31.086-11.286-59.598-29.7-81.576 13.266-9.504 27.522-17.226 39.996-19.206 16.038-2.574 32.868-3.762 50.688-5.148 48.312-3.366 103.158-7.326 148.896-44.55 61.182-49.698 74.25-103.158 75.24-187.902V475.2h-126.72zM316.8 126.72c34.848 0 63.36 28.512 63.36 63.36s-28.512 63.36-63.36 63.36-63.36-28.512-63.36-63.36 28.512-63.36 63.36-63.36zm0 760.32c-34.848 0-63.36-28.512-63.36-63.36s28.512-63.36 63.36-63.36 63.36 28.512 63.36 63.36-28.512 63.36-63.36 63.36zM823.68 158.4h-95.04V63.36h-126.72v95.04h-95.04v126.72h95.04v95.04h126.72v-95.04h95.04z"}));O.displayName="SourceIcon";const Ye=(e,t)=>{const n=t?t._instance:y();return m(n==null?void 0:n.appContext.components)&&(e in n.appContext.components||k(e)in n.appContext.components||q(k(e))in n.appContext.components)},D=()=>Ce(()=>typeof window<"u"&&window.navigator&&"userAgent"in window.navigator),Je=()=>{const e=D();return l(()=>e.value&&/\b(?:Android|iPhone)/i.test(navigator.userAgent))},Qe=e=>{const t=Q();return l(()=>e[t.value])},Xe=()=>l(()=>X().value.title);export{H as BitbucketIcon,j as GitHubIcon,B as GitLabIcon,W as GiteeIcon,u as IconBase,I as LoadingIcon,He as Message,De as Popup,te as RenderDefault,qe as RouterLink,O as SourceIcon,T as VPLink,Ve as atou,oe as checkIsChromeWebView,le as checkIsIOS,ue as checkIsMacOS,ne as checkIsMobile,se as checkIsSafari,ie as checkIsSafariMobile,ce as checkIsWindows,ae as checkIsiPad,re as checkIsiPhone,v as deepAssign,Ne as endsWith,ve as ensureEndingSlash,fe as ensureLeadingSlash,M as entries,Re as fromEntries,pe as generateIndexFromHash,Pe as getAuthor,Te as getCategory,me as getDate,N as getHash,_ as getSize,g as getStringArray,je as getTag,w as guardEvent,Ye as hasGlobalComponent,We as isAbsoluteUrl,Oe as isActiveLink,d as isArray,ze as isBoolean,Se as isDef,Me as isFunction,be as isLinkExternal,C as isLinkFtp,h as isLinkHttp,we as isLinkMailto,ye as isLinkTel,$e as isNumber,xe as isObject,m as isPlainObject,Ae as isRegExp,a as isString,Be as isUrl,f as keys,b as normalizePath,Ke as openPopupWindow,Ee as removeEndingSlash,ke as removeLeadingSlash,Ue as resolveRepoLink,Fe as resolveRepoType,R as resolveRouteWithRedirect,z as startsWith,Je as useIsMobile,P as useLink,Qe as useLocaleConfig,Xe as usePageTitle,D as useSupportUserAgent,Ge as utoa,_e as values}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "vuepress-shared", | ||
"version": "2.0.0-beta.223", | ||
"version": "2.0.0-beta.224", | ||
"description": "Shared files for vuepress-theme-hope", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
693485
1080