新增简易的8080面板😊
This commit is contained in:
@@ -1,95 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>架构设计 - Future OSS</title>
|
||||
<meta name="description" content="了解 Future OSS 的插件化架构设计:插件管理器、依赖关系图、事件总线、数据流。" />
|
||||
<meta name="keywords" content="OSS架构, 插件架构, 依赖图, 拓扑排序, 事件总线, 数据流, 微服务架构, Python架构" />
|
||||
<meta name="author" content="Falck" />
|
||||
<meta property="og:title" content="架构设计 - Future OSS" />
|
||||
<meta property="og:description" content="插件化架构:插件管理器、依赖关系图、事件总线、数据流" />
|
||||
<meta property="og:type" content="website" />
|
||||
<link rel="canonical" href="https://oss-runtime.dev/architecture" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="css/main.css" />
|
||||
<link rel="stylesheet" href="css/dock.css" />
|
||||
<link rel="stylesheet" href="css/page.css" />
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="particles"></canvas>
|
||||
|
||||
<!-- Dock 侧边栏 (由 js/dock.js 动态生成) -->
|
||||
<div id="dock-container"></div>
|
||||
|
||||
<main class="page-content">
|
||||
<div class="page-header" data-parallax-speed="0.5">
|
||||
<span class="section-badge">架构设计</span>
|
||||
<h1 class="page-title">插件驱动的<span class="gradient-text">分层架构</span></h1>
|
||||
<p class="page-desc">一切皆为插件,框架本身只提供核心能力</p>
|
||||
</div>
|
||||
|
||||
<div class="arch-diagram" data-parallax-speed="0.5">
|
||||
<div class="arch-layer arch-core">
|
||||
<div class="arch-label">Future OSS 核心</div>
|
||||
<div class="arch-modules">
|
||||
<div class="arch-module">插件管理</div>
|
||||
<div class="arch-module">事件总线</div>
|
||||
<div class="arch-module">消息总线</div>
|
||||
<div class="arch-module">配置系统</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="arch-connector"></div>
|
||||
<div class="arch-layer arch-plugins">
|
||||
<div class="arch-plugin-grid">
|
||||
<div class="arch-plugin">
|
||||
<div class="arch-plugin-title">协议插件</div>
|
||||
<div class="arch-plugin-items">HTTP / WS</div>
|
||||
<div class="arch-plugin-items">TCP / gRPC</div>
|
||||
<div class="arch-plugin-items">UDP / Unix</div>
|
||||
</div>
|
||||
<div class="arch-plugin">
|
||||
<div class="arch-plugin-title">工具插件</div>
|
||||
<div class="arch-plugin-items">外部进程</div>
|
||||
<div class="arch-plugin-items">脚本执行</div>
|
||||
<div class="arch-plugin-items">依赖管理</div>
|
||||
</div>
|
||||
<div class="arch-plugin">
|
||||
<div class="arch-plugin-title">中间件插件</div>
|
||||
<div class="arch-plugin-items">限流 / 认证</div>
|
||||
<div class="arch-plugin-items">日志 / 压缩</div>
|
||||
<div class="arch-plugin-items">缓存 / 重试</div>
|
||||
</div>
|
||||
<div class="arch-plugin">
|
||||
<div class="arch-plugin-title">通知插件</div>
|
||||
<div class="arch-plugin-items">Webhook</div>
|
||||
<div class="arch-plugin-items">邮件 / 钉钉</div>
|
||||
<div class="arch-plugin-items">Telegram</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="arch-flow">
|
||||
<h2 class="arch-flow-title">数据流</h2>
|
||||
<div class="arch-flow-steps">
|
||||
<div class="flow-step"><span class="flow-step-num">1</span><span>外部请求进入协议插件</span></div>
|
||||
<div class="flow-arrow">→</div>
|
||||
<div class="flow-step"><span class="flow-step-num">2</span><span>中间件链处理(认证/限流)</span></div>
|
||||
<div class="flow-arrow">→</div>
|
||||
<div class="flow-step"><span class="flow-step-num">3</span><span>业务插件执行逻辑</span></div>
|
||||
<div class="flow-arrow">→</div>
|
||||
<div class="flow-step"><span class="flow-step-num">4</span><span>发布事件 + 返回响应</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/gsap.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/ScrollTrigger.min.js"></script>
|
||||
<script src="js/dock.js"></script>
|
||||
<script src="js/particles.js"></script>
|
||||
<script src="js/parallax.js"></script>
|
||||
<script src="js/animations.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 MiB |
@@ -1,10 +0,0 @@
|
||||
import{o as W,i as X}from"./lifecycle.MLiOCzKC.js";import{a as y,p as Z,b as $,s as tt,e as S,h as l,r as o,i as g,g as e,u as d,t as D,j as P,d as et}from"./template.CyUWgh-J.js";import{s as c}from"./render.C4NccAY7.js";import{e as M,i as N}from"./each.DMYtlFB3.js";import{p as A,s as U}from"./props.h8jPqBEd.js";import{I as k}from"./zh_TW.CqrCsd4X.js";import{i as B}from"./translation.BRy61wHY.js";import{g as F}from"./url-utils.CaIMLrxo.js";import"./utils.DonxBMOE.js";import"./config.B4FKKqOZ.js";var at=S(`<a class="group btn-plain !block h-10 w-full rounded-lg hover:text-[initial]"><div class="flex flex-row justify-start items-center h-full"><div class="w-[15%] md:w-[10%] transition text-sm text-right text-50"> </div> <div class="w-[15%] md:w-[10%] relative dash-line h-full flex items-center"><div class="transition-all mx-auto w-1 h-1 rounded group-hover:h-5
|
||||
bg-[oklch(0.5_0.05_var(--hue))] group-hover:bg-[var(--primary)]
|
||||
outline outline-4 z-50
|
||||
outline-[var(--card-bg)]
|
||||
group-hover:outline-[var(--btn-plain-bg-hover)]
|
||||
group-active:outline-[var(--btn-plain-bg-active)]"></div></div> <div class="w-[70%] md:max-w-[65%] md:w-[65%] text-left font-bold
|
||||
group-hover:translate-x-1 transition-all group-hover:text-[var(--primary)]
|
||||
text-75 pr-8 whitespace-nowrap overflow-ellipsis overflow-hidden"> </div> <div class="hidden md:block md:w-[15%] text-left text-sm transition
|
||||
whitespace-nowrap overflow-ellipsis overflow-hidden text-30"> </div></div></a>`),rt=S(`<div><div class="flex flex-row w-full items-center h-[3.75rem]"><div class="w-[15%] md:w-[10%] transition text-2xl font-bold text-right text-75"> </div> <div class="w-[15%] md:w-[10%]"><div class="h-3 w-3 bg-none rounded-full outline outline-[var(--primary)] mx-auto
|
||||
-outline-offset-[2px] z-50 outline-3"></div></div> <div class="w-[70%] md:w-[80%] transition text-left text-50"> </div></div> <!></div>`),it=S('<div class="card-base px-8 py-6"></div>');function gt(K,f){$(f,!1);let h=A(f,"tags",12),p=A(f,"categories",12),L=A(f,"sortedPosts",24,()=>[]);const v=new URLSearchParams(window.location.search);h(v.has("tag")?v.getAll("tag"):[]),p(v.has("category")?v.getAll("category"):[]);const O=v.get("uncategorized");let j=et([]);function R(r){const a=(r.getMonth()+1).toString().padStart(2,"0"),n=r.getDate().toString().padStart(2,"0");return`${a}-${n}`}function T(r){return r.map(a=>`#${a}`).join(" ")}W(async()=>{let r=L();h().length>0&&(r=r.filter(t=>Array.isArray(t.data.tags)&&t.data.tags.some(i=>h().includes(i)))),p().length>0&&(r=r.filter(t=>t.data.category&&p().includes(t.data.category))),O&&(r=r.filter(t=>!t.data.category));const a=r.reduce((t,i)=>{const u=i.data.published.getFullYear();return t[u]||(t[u]=[]),t[u].push(i),t},{}),n=Object.keys(a).map(t=>({year:Number.parseInt(t),posts:a[Number.parseInt(t)]}));n.sort((t,i)=>i.year-t.year),tt(j,n)}),X();var x=it();M(x,5,()=>e(j),N,(r,a)=>{var n=rt(),t=l(n),i=l(t),u=l(i,!0);o(i);var z=g(i,4),Y=l(z);o(z),o(t);var q=g(t,2);M(q,1,()=>(e(a),d(()=>e(a).posts)),N,(w,s)=>{var m=at(),I=l(m),b=l(I),E=l(b,!0);o(b);var _=g(b,4),G=l(_,!0);o(_);var C=g(_,2),H=l(C,!0);o(C),o(I),o(m),D((J,Q,V)=>{U(m,"href",J),U(m,"aria-label",(e(s),d(()=>e(s).data.title))),c(E,Q),c(G,(e(s),d(()=>e(s).data.title))),c(H,V)},[()=>(P(F),e(s),d(()=>F(e(s).slug))),()=>(e(s),d(()=>R(e(s).data.published))),()=>(e(s),d(()=>T(e(s).data.tags)))]),y(w,m)}),o(n),D(w=>{c(u,(e(a),d(()=>e(a).year))),c(Y,`${e(a),d(()=>e(a).posts.length)??""} ${w??""}`)},[()=>(P(B),e(a),P(k),d(()=>B(e(a).posts.length===1?k.postCount:k.postsCount)))]),y(r,n)}),o(x),y(K,x),Z()}export{gt as default};
|
||||
@@ -1,4 +0,0 @@
|
||||
import{i as R}from"./lifecycle.MLiOCzKC.js";import{d as V,l as $,k as z,t as A,g as t,a as B,p as E,b as F,h as a,j as i,u as y,s as k,e as G,i as p,r}from"./template.CyUWgh-J.js";import{s as w}from"./render.C4NccAY7.js";import{a as J,s as L,r as M}from"./props.h8jPqBEd.js";import{e as N}from"./utils.DonxBMOE.js";import{b as O}from"./input.CM2Xh3yk.js";import{I as o}from"./zh_TW.CqrCsd4X.js";import{i as l}from"./translation.BRy61wHY.js";import{I as P}from"./Icon.DAqWeDJZ.js";import{b as Q,c as H,d as I}from"./setting-utils.Bem8IX7u.js";/* empty css */import"./config.B4FKKqOZ.js";import"./functions.LP-DBi81.js";var T=G(`<div id="display-setting" class="float-panel float-panel-closed absolute transition-all w-80 right-4 px-4 py-4 svelte-d7tq3k"><div class="flex flex-row gap-2 mb-3 items-center justify-between"><div class="flex gap-2 font-bold text-lg text-neutral-900 dark:text-neutral-100 transition relative ml-3
|
||||
before:w-1 before:h-4 before:rounded-md before:bg-[var(--primary)]
|
||||
before:absolute before:-left-3 before:top-[0.33rem]"> <button aria-label="Reset to Default"><div class="text-[var(--btn-content)]"><!></div></button></div> <div class="flex gap-1"><div id="hueValue" class="transition bg-[var(--btn-regular-bg)] w-10 h-7 rounded-md flex justify-center
|
||||
font-bold text-sm items-center text-[var(--btn-content)]"> </div></div></div> <div class="w-full h-6 px-1 bg-[oklch(0.80_0.10_0)] dark:bg-[oklch(0.70_0.10_0)] rounded select-none"><input type="range" min="0" max="360" class="slider svelte-d7tq3k" id="colorSlider" step="5" style="width: 100%"/></div></div>`);function ne(j,D){F(D,!1);let e=V(Q());const u=H();function q(){k(e,H())}$(()=>(t(e),I),()=>{(t(e)||t(e)===0)&&I(t(e))}),z(),R();var n=T(),d=a(n),f=a(d),c=a(f),s=p(c);let b;var _=a(s),C=a(_);P(C,{icon:"fa6-solid:arrow-rotate-left",class:"text-[0.875rem]"}),r(_),r(s),r(f);var g=p(f,2),x=a(g),S=a(x,!0);r(x),r(g),r(d);var h=p(d,2),v=a(h);M(v),r(h),r(n),A((m,K)=>{w(c,`${m??""} `),b=J(s,1,"btn-regular w-7 h-7 rounded-md active:scale-90",null,b,{"opacity-0":t(e)===u,"pointer-events-none":t(e)===u}),w(S,t(e)),L(v,"aria-label",K)},[()=>(i(l),i(o),y(()=>l(o.themeColor))),()=>(i(l),i(o),y(()=>l(o.themeColor)))]),N("click",s,q),O(v,()=>t(e),m=>k(e,m)),B(j,n),E()}export{ne as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{w as r}from"./widget-manager.B87vf-Ll.js";import"./config.B4FKKqOZ.js";class n{sidebar;resizeObserver=null;constructor(){this.sidebar=document.getElementById("dynamic-sidebar"),this.init()}init(){this.sidebar&&(this.setupResponsiveDisplay(),this.setupResizeObserver(),this.setupWidgetInteractions(),this.applyInitialAnimations())}setupResponsiveDisplay(){this.updateResponsiveDisplay(),window.addEventListener("resize",()=>this.updateResponsiveDisplay())}updateResponsiveDisplay(){if(!this.sidebar)return;const s=r.getBreakpoints(),e=window.innerWidth;let i;e<s.mobile?i="mobile":e<s.tablet?i="tablet":i="desktop";const t=r.shouldShowSidebar(i);this.sidebar.style.setProperty(`--sidebar-${i}-display`,t?"block":"none"),this.sidebar.setAttribute("data-device-type",i)}setupResizeObserver(){!this.sidebar||!window.ResizeObserver||(this.resizeObserver=new ResizeObserver(s=>{for(const e of s){const{width:i,height:t}=e.contentRect;console.debug(`Sidebar size changed: ${i}x${t}`)}}),this.resizeObserver.observe(this.sidebar))}setupWidgetInteractions(){if(!this.sidebar)return;this.sidebar.querySelectorAll(".widget-container").forEach(e=>{const i=e.getAttribute("data-widget-type");e.addEventListener("mouseenter",()=>{e.classList.add("widget-hover")}),e.addEventListener("mouseleave",()=>{e.classList.remove("widget-hover")}),console.debug(`Widget ${i} interaction setup complete`)})}applyInitialAnimations(){if(!this.sidebar)return;this.sidebar.querySelectorAll(".widget-container").forEach((e,i)=>{const t=i*100;e.style.animationDelay=`${t}ms`})}destroy(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}}const a=new n;window.addEventListener("beforeunload",()=>{a.destroy()});
|
||||
@@ -1 +0,0 @@
|
||||
import{o as $,a as j,i as P,c as z}from"./lifecycle.MLiOCzKC.js";import{i as A,g as C,c as G}from"./functions.LP-DBi81.js";import{v as y,w as D,x as v,t as V,y as L,a8 as Y,a9 as E,aa as q,C as T,D as B,a2 as F,ab as J,ac as K,ad as Q,ae as U,af as W,l as X,k as Z,c as k,f as I,a as b,p as x,b as aa,s as N,g as a,j as ea,m as w,d as M,u as H,ag as sa,r as ta,ah as ra,e as oa}from"./template.CyUWgh-J.js";import{l as na,b as O}from"./props.h8jPqBEd.js";function ia(p,g,r=!1,s=!1,i=!1,m=!1){var e=p,f="";if(r){var u=p;y&&(e=D(v(u)))}V(()=>{var l=Y;if(f===(f=g()??"")){y&&L();return}if(r&&!y){l.nodes=null,u.innerHTML=f,f!==""&&E(v(u),u.lastChild);return}if(l.nodes!==null&&(q(l.nodes.start,l.nodes.end),l.nodes=null),f!==""){if(y){T.data;for(var o=L(),h=o;o!==null&&(o.nodeType!==B||o.data!=="");)h=o,o=F(o);if(o===null)throw J(),K;E(T,h),e=D(o);return}var n=s?U:i?W:void 0,t=Q(s?"svg":i?"math":"template",n);t.innerHTML=f;var c=s||i?t:t.content;if(E(v(c),c.lastChild),s||i)for(;v(c);)e.before(v(c));else e.before(c)}})}var fa=ra("<svg></svg>"),la=oa("<span></span>");function va(p,g){const r=na(g,["children","$$slots","$$events","$$legacy"]);aa(g,!1);const s=M({name:"",loading:null,destroyed:!1});let i=M(!1),m=M(0),e=M();const f=n=>{typeof r.onLoad=="function"&&r.onLoad(n),z()("load",{icon:n})};function u(){sa(m)}$(()=>{N(i,!0)}),j(()=>{w(s,a(s).destroyed=!0),a(s).loading&&(a(s).loading.abort(),w(s,a(s).loading=null))}),X(()=>(a(m),ea(r),a(i),a(s),a(e),C),()=>{a(m);const n=!!r.ssr||a(i),t=G(r.icon,a(s),n,u,f);N(e,t?C(t.data,r):null),a(e)&&t.classes&&w(e,a(e).attributes.class=(typeof r.class=="string"?r.class+" ":"")+t.classes.join(" "))}),Z(),P();var l=k(),o=I(l);{var h=n=>{var t=k(),c=I(t);{var R=_=>{var d=fa();O(d,()=>({...a(e).attributes})),ia(d,()=>(a(e),H(()=>a(e).body)),!0),ta(d),b(_,d)},S=_=>{var d=la();O(d,()=>({...a(e).attributes})),b(_,d)};A(c,_=>{a(e),H(()=>a(e).svg)?_(R):_(S,-1)})}b(n,t)};A(o,n=>{a(e)&&n(h)})}b(p,l),x()}export{va as I,ia as h};
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
/*! PhotoSwipe main CSS by Dmytro Semenov | photoswipe.com */.pswp{--pswp-bg: #000;--pswp-placeholder-bg: #222;--pswp-root-z-index: 100000;--pswp-preloader-color: rgba(79, 79, 79, .4);--pswp-preloader-color-secondary: rgba(255, 255, 255, .9);--pswp-icon-color: #fff;--pswp-icon-color-secondary: #4f4f4f;--pswp-icon-stroke-color: #4f4f4f;--pswp-icon-stroke-width: 2px;--pswp-error-text-color: var(--pswp-icon-color)}.pswp{position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--pswp-root-z-index);display:none;touch-action:none;outline:0;opacity:.003;contain:layout style size;-webkit-tap-highlight-color:rgba(0,0,0,0)}.pswp:focus{outline:0}.pswp *{box-sizing:border-box}.pswp img{max-width:none}.pswp--open{display:block}.pswp,.pswp__bg{transform:translateZ(0);will-change:opacity}.pswp__bg{opacity:.005;background:var(--pswp-bg)}.pswp,.pswp__scroll-wrap{overflow:hidden}.pswp__scroll-wrap,.pswp__bg,.pswp__container,.pswp__item,.pswp__content,.pswp__img,.pswp__zoom-wrap{position:absolute;top:0;left:0;width:100%;height:100%}.pswp__img,.pswp__zoom-wrap{width:auto;height:auto}.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img{cursor:zoom-in}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img{cursor:move;cursor:grab}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active{cursor:grabbing}.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img,.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img:active,.pswp__img{cursor:zoom-out}.pswp__container,.pswp__img,.pswp__button,.pswp__counter{-webkit-user-select:none;-moz-user-select:none;user-select:none}.pswp__item{z-index:1;overflow:hidden}.pswp__hidden{display:none!important}.pswp__content{pointer-events:none}.pswp__content>*{pointer-events:auto}.pswp__error-msg-container{display:grid}.pswp__error-msg{margin:auto;font-size:1em;line-height:1;color:var(--pswp-error-text-color)}.pswp .pswp__hide-on-close{opacity:.005;will-change:opacity;transition:opacity var(--pswp-transition-duration) cubic-bezier(.4,0,.22,1);z-index:10;pointer-events:none}.pswp--ui-visible .pswp__hide-on-close{opacity:1;pointer-events:auto}.pswp__button{position:relative;display:block;width:50px;height:60px;padding:0;margin:0;overflow:hidden;cursor:pointer;background:none;border:0;box-shadow:none;opacity:.85;-webkit-appearance:none;-webkit-touch-callout:none}.pswp__button:hover,.pswp__button:active,.pswp__button:focus{transition:none;padding:0;background:none;border:0;box-shadow:none;opacity:1}.pswp__button:disabled{opacity:.3;cursor:auto}.pswp__icn{fill:var(--pswp-icon-color);color:var(--pswp-icon-color-secondary);position:absolute;top:14px;left:9px;width:32px;height:32px;overflow:hidden;pointer-events:none}.pswp__icn-shadow{stroke:var(--pswp-icon-stroke-color);stroke-width:var(--pswp-icon-stroke-width);fill:none}.pswp__icn:focus{outline:0}div.pswp__img--placeholder,.pswp__img--with-bg{background:var(--pswp-placeholder-bg)}.pswp__top-bar{position:absolute;left:0;top:0;width:100%;height:60px;display:flex;flex-direction:row;justify-content:flex-end;z-index:10;pointer-events:none!important}.pswp__top-bar>*{pointer-events:auto;will-change:opacity}.pswp__button--close{margin-right:6px}.pswp__button--arrow{position:absolute;width:75px;height:100px;top:50%;margin-top:-50px}.pswp__button--arrow:disabled{display:none;cursor:default}.pswp__button--arrow .pswp__icn{top:50%;margin-top:-30px;width:60px;height:60px;background:none;border-radius:0}.pswp--one-slide .pswp__button--arrow{display:none}.pswp--touch .pswp__button--arrow{visibility:hidden}.pswp--has_mouse .pswp__button--arrow{visibility:visible}.pswp__button--arrow--prev{right:auto;left:0}.pswp__button--arrow--next{right:0}.pswp__button--arrow--next .pswp__icn{left:auto;right:14px;transform:scaleX(-1)}.pswp__button--zoom{display:none}.pswp--zoom-allowed .pswp__button--zoom{display:block}.pswp--zoomed-in .pswp__zoom-icn-bar-v{display:none}.pswp__preloader{position:relative;overflow:hidden;width:50px;height:60px;margin-right:auto}.pswp__preloader .pswp__icn{opacity:0;transition:opacity .2s linear;animation:pswp-clockwise .6s linear infinite}.pswp__preloader--active .pswp__icn{opacity:.85}@keyframes pswp-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.pswp__counter{height:30px;margin-top:15px;margin-inline-start:20px;font-size:14px;line-height:30px;color:var(--pswp-icon-color);text-shadow:1px 1px 3px var(--pswp-icon-color-secondary);opacity:.85}.pswp--one-slide .pswp__counter{display:none}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{o as S}from"./lifecycle.MLiOCzKC.js";import{t as O,a as A,p as I,b as q,a3 as z,a4 as C,s as b,g as t,e as G,h as s,r as o,i as _}from"./template.CyUWgh-J.js";import{d as H,a as K}from"./utils.DonxBMOE.js";import{a as m}from"./props.h8jPqBEd.js";import{g as P,a as R,A as u,L as y,D as k,s as U}from"./setting-utils.Bem8IX7u.js";import"./config.B4FKKqOZ.js";import"./zh_TW.CqrCsd4X.js";import{I as h}from"./Icon.DAqWeDJZ.js";import"./functions.LP-DBi81.js";var W=G('<div class="relative z-50"><button aria-label="Light/Dark Mode" class="relative btn-plain scale-animation rounded-lg h-11 w-11 active:scale-90" id="scheme-switch"><div><!></div> <div><!></div> <div><!></div></button></div>');function $(D,T){q(T,!0);const r=[y,k,u];let a=z(C(u));S(()=>{b(a,P(),!0);const e=window.matchMedia("(prefers-color-scheme: dark)"),f=j=>{R(t(a))};return e.addEventListener("change",f),()=>{e.removeEventListener("change",f)}});function w(e){b(a,e,!0),U(e)}function L(){let e=0;for(;e<r.length&&r[e]!==t(a);e++);w(r[(e+1)%r.length])}var n=W(),c=s(n),i=s(c);let v;var M=s(i);h(M,{icon:"material-symbols:wb-sunny-outline-rounded",class:"text-[1.25rem]"}),o(i);var l=_(i,2);let p;var x=s(l);h(x,{icon:"material-symbols:dark-mode-outline-rounded",class:"text-[1.25rem]"}),o(l);var d=_(l,2);let g;var E=s(d);h(E,{icon:"material-symbols:radio-button-partial-outline",class:"text-[1.25rem]"}),o(d),o(c),o(n),O(()=>{v=m(i,1,"absolute",null,v,{"opacity-0":t(a)!==y}),p=m(l,1,"absolute",null,p,{"opacity-0":t(a)!==k}),g=m(d,1,"absolute",null,g,{"opacity-0":t(a)!==u})}),K("click",c,L),A(D,n),I()}H(["click"]);export{$ as default};
|
||||
@@ -1,2 +0,0 @@
|
||||
import{o as ht,i as bt}from"./lifecycle.MLiOCzKC.js";import{f as j,t as C,a as p,p as wt,b as gt,g as o,e as f,s as g,d as L,h as d,i as _,r as l,c as F,n as G}from"./template.CyUWgh-J.js";import{s as A}from"./render.C4NccAY7.js";import{i as x}from"./functions.LP-DBi81.js";import{e as J,i as Q}from"./each.DMYtlFB3.js";import{e as S}from"./utils.DonxBMOE.js";import{a as _t}from"./props.h8jPqBEd.js";import{I as y}from"./Icon.DAqWeDJZ.js";import{I as U}from"./zh_TW.CqrCsd4X.js";import{i as W}from"./translation.BRy61wHY.js";import{n as xt}from"./navigation-utils.Cc6bKnia.js";/* empty css */import"./config.B4FKKqOZ.js";var yt=f('<div class="text-center py-8 text-black/50 dark:text-white/50"><!> <p>暂无文章</p></div>'),It=f('<div class="post-category svelte-cz3h3s"> </div>'),kt=f('<button class="post-item svelte-cz3h3s"><div class="post-title svelte-cz3h3s"><!> </div> <!></button>'),Tt=f('<div class="post-content svelte-cz3h3s"></div>'),Et=f('<div class="text-center py-8 text-black/50 dark:text-white/50"><!> <p>当前页面没有目录</p></div>'),Ct=f('<button><span class="toc-text svelte-cz3h3s"> </span></button>'),Lt=f('<div class="toc-content svelte-cz3h3s"></div>'),At=f(`<button aria-label="Table of Contents" id="mobile-toc-switch" class="btn-plain scale-animation rounded-lg h-11 w-11 active:scale-90 lg:!hidden"><!></button> <div id="mobile-toc-panel" class="float-panel float-panel-closed mobile-toc-panel absolute md:w-[20rem] w-[calc(100vw-2rem)]
|
||||
top-20 left-4 md:left-[unset] right-4 shadow-2xl rounded-2xl p-4 svelte-cz3h3s"><div class="flex items-center justify-between mb-4"><h3 class="text-lg font-bold text-[var(--primary)]"> </h3> <button aria-label="Close TOC" class="btn-plain rounded-lg h-8 w-8 active:scale-90"><!></button></div> <!></div>`,1);function Yt(X,Z){gt(Z,!1);let z=L([]),P=L([]),I=L(""),h,k=L(!1),T=!1;const K=()=>{document.getElementById("mobile-toc-panel")?.classList.toggle("float-panel-closed")},R=t=>{const e=document.getElementById("mobile-toc-panel");e&&e.classList.add("float-panel-closed")},$=()=>{const t=document.querySelectorAll("h1, h2, h3, h4, h5, h6"),e=[];t.forEach(a=>{if(a.id){const i=Number.parseInt(a.tagName.charAt(1)),v=a.textContent?.trim()||"";e.push({id:a.id,text:v,level:i})}}),g(z,e)},tt=()=>{const t=document.querySelectorAll(".card-base"),e=[];t.forEach(a=>{const i=a.querySelector('a[href*="/posts/"].transition.group'),v=a.querySelector('a[href*="/categories/"].link-lg'),n=i?.querySelector('svg[data-icon="mdi:pin"]');if(i){const s=i.getAttribute("href"),m=i.textContent?.replace(/\s+/g," ").trim()||"",r=v?.textContent?.trim()||"",c=!!n;s&&m&&e.push({title:m,url:s,category:r,pinned:c})}}),g(P,e)},et=()=>{g(k,window.location.pathname==="/"||window.location.pathname==="")},ot=t=>{const e=document.getElementById(t);if(e){R();const i=e.offsetTop-80;window.scrollTo({top:i,behavior:"smooth"})}},st=t=>{R(),xt(t)},q=()=>{const t=document.querySelectorAll("h1, h2, h3, h4, h5, h6"),e=window.scrollY,a=100;let i="";t.forEach(v=>{if(v.id){const n=v.offsetTop-a;e>=n&&(i=v.id)}}),g(I,i)},at=()=>{const t=document.querySelectorAll("h1, h2, h3, h4, h5, h6");h&&h.disconnect(),h=new IntersectionObserver(e=>{e.forEach(a=>{a.isIntersecting&&g(I,a.target.id)})},{rootMargin:"-80px 0px -80% 0px",threshold:0}),t.forEach(e=>{e.id&&h.observe(e)})},nt=()=>{if(typeof window<"u"&&(T=!!window.swup,!T)){const t=()=>{window.swup&&(T=!0,document.removeEventListener("swup:enable",t))};document.addEventListener("swup:enable",t),setTimeout(()=>{window.swup&&(T=!0,document.removeEventListener("swup:enable",t))},1e3)}},V=()=>{et(),nt(),o(k)?tt():($(),at(),q())};ht(()=>(setTimeout(V,100),window.addEventListener("scroll",q),()=>{h&&h.disconnect(),window.removeEventListener("scroll",q)})),typeof window<"u"&&(window.mobileTOCInit=V),bt();var Y=At(),E=j(Y),it=d(E);y(it,{icon:"material-symbols:format-list-bulleted",class:"text-[1.25rem]"}),l(E);var D=_(E,2),O=d(D),H=d(O),lt=d(H,!0);l(H);var B=_(H,2),rt=d(B);y(rt,{icon:"material-symbols:close",class:"text-[1rem]"}),l(B),l(O);var ct=_(O,2);{var dt=t=>{var e=F(),a=j(e);{var i=n=>{var s=yt(),m=d(s);y(m,{icon:"material-symbols:article-outline",class:"text-2xl mb-2"}),G(2),l(s),p(n,s)},v=n=>{var s=Tt();J(s,5,()=>o(P),Q,(m,r)=>{var c=kt(),b=d(c),w=d(b);{var M=u=>{y(u,{icon:"mdi:pin",class:"pinned-icon"})};x(w,u=>{o(r).pinned&&u(M)})}var mt=_(w);l(b);var pt=_(b,2);{var ft=u=>{var N=It(),ut=d(N,!0);l(N),C(()=>A(ut,o(r).category)),p(u,N)};x(pt,u=>{o(r).category&&u(ft)})}l(c),C(()=>A(mt,` ${o(r).title??""}`)),S("click",c,()=>st(o(r).url)),p(m,c)}),l(s),p(n,s)};x(a,n=>{o(P).length===0?n(i):n(v,-1)})}p(t,e)},vt=t=>{var e=F(),a=j(e);{var i=n=>{var s=Et(),m=d(s);y(m,{icon:"material-symbols:article-outline",class:"text-2xl mb-2"}),G(2),l(s),p(n,s)},v=n=>{var s=Lt();J(s,5,()=>o(z),Q,(m,r)=>{var c=Ct();let b;var w=d(c),M=d(w,!0);l(w),l(c),C(()=>{b=_t(c,1,`toc-item level-${o(r).level??""} ${o(I)===o(r).id?"active":""}`,"svelte-cz3h3s",b,{active:o(I)===o(r).id}),A(M,o(r).text)}),S("click",c,()=>ot(o(r).id)),p(m,c)}),l(s),p(n,s)};x(a,n=>{o(z).length===0?n(i):n(v,-1)})}p(t,e)};x(ct,t=>{o(k)?t(dt):t(vt,-1)})}l(D),C(t=>A(lt,t),[()=>o(k)?W(U.postList):W(U.tableOfContents)]),S("click",E,K),S("click",B,K),p(X,Y),wt()}export{Yt as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{o as b,a as W,i as _}from"./lifecycle.MLiOCzKC.js";import{c as x,f as I,a as k,p as R,b as j,s as n,m as s,g as e,d as a}from"./template.CyUWgh-J.js";import{i as q}from"./functions.LP-DBi81.js";import"./config.B4FKKqOZ.js";import"./zh_TW.CqrCsd4X.js";function N(B,F){j(F,!1);let o=a(!1),c=a(0),d=a(0),S=a(.7),l=a(!1),m=a(!1),v=a(0),w=a(""),h=a(!1),f=a({title:"示例歌曲",artist:"示例艺术家",cover:"/favicon/favicon-light-192.png",url:"",duration:0}),u=a([]),i=a(0),t=a();function E(){if(e(u).length<=1)return;let r;if(e(m))do r=Math.floor(Math.random()*e(u).length);while(r===e(i)&&e(u).length>1);else r=e(i)<e(u).length-1?e(i)+1:0;D(r)}function D(r){if(r<0||r>=e(u).length)return;const $=e(o);n(i,r),e(t)&&e(t).pause(),T(e(u)[e(i)]),($||!e(o))&&setTimeout(()=>{e(t)&&(e(t).readyState>=2?e(t).play().catch(()=>{}):e(t).addEventListener("canplay",()=>{e(t).play().catch(()=>{})},{once:!0}))},100)}function M(r){return r.startsWith("http://")||r.startsWith("https://")||r.startsWith("/")?r:`/${r}`}function T(r){!r||!e(t)||(n(f,{...r}),r.url?(n(l,!0),e(t).pause(),s(t,e(t).currentTime=0),n(c,0),n(d,r.duration??0),e(t).removeEventListener("loadeddata",p),e(t).removeEventListener("error",g),e(t).removeEventListener("loadstart",L),e(t).addEventListener("loadeddata",p,{once:!0}),e(t).addEventListener("error",g,{once:!0}),e(t).addEventListener("loadstart",L,{once:!0}),s(t,e(t).src=M(r.url)),e(t).load()):n(l,!1))}function p(){n(l,!1),e(t)?.duration&&e(t).duration>1&&(n(d,Math.floor(e(t).duration)),e(u)[e(i)]&&s(u,e(u)[e(i)].duration=e(d)),s(f,e(f).duration=e(d)))}function g(r){n(l,!1),y(`无法播放 "${e(f).title}",正在尝试下一首...`),e(u).length>1?setTimeout(()=>E(),1e3):y("播放列表中没有可用的歌曲")}function L(){}function y(r){n(w,r),n(h,!0),setTimeout(()=>{n(h,!1)},3e3)}function C(){e(t)&&(e(t).addEventListener("play",()=>{n(o,!0)}),e(t).addEventListener("pause",()=>{n(o,!1)}),e(t).addEventListener("timeupdate",()=>{n(c,e(t).currentTime)}),e(t).addEventListener("ended",()=>{e(v)===1?(s(t,e(t).currentTime=0),e(t).play().catch(()=>{})):e(v)===2||e(i)<e(u).length-1||e(m)?E():n(o,!1)}),e(t).addEventListener("error",r=>{n(l,!1)}),e(t).addEventListener("stalled",()=>{}),e(t).addEventListener("waiting",()=>{}))}b(()=>{n(t,new Audio),s(t,e(t).volume=e(S)),C()}),W(()=>{e(t)&&(e(t).pause(),s(t,e(t).src=""))}),_();var A=x(),P=I(A);q(P,r=>{}),k(B,A),R()}export{N as default};
|
||||
@@ -1,11 +0,0 @@
|
||||
import{o as X,i as Z}from"./lifecycle.MLiOCzKC.js";import{l as R,k as $,f as ee,t as z,g as e,a as F,p as te,b as ae,s,i as o,e as q,d as g,h as f,r as c,u as b,j as M}from"./template.CyUWgh-J.js";import{s as re}from"./render.C4NccAY7.js";import{e as ie,i as se}from"./each.DMYtlFB3.js";import{I as w,h as ne}from"./Icon.DAqWeDJZ.js";import{r as j,s as C}from"./props.h8jPqBEd.js";import{e as I}from"./utils.DonxBMOE.js";import{b as K}from"./input.CM2Xh3yk.js";import{I as V}from"./zh_TW.CqrCsd4X.js";import{i as W}from"./translation.BRy61wHY.js";import{u as Y}from"./url-utils.CaIMLrxo.js";import{n as le}from"./navigation-utils.Cc6bKnia.js";/* empty css */import"./functions.LP-DBi81.js";import"./config.B4FKKqOZ.js";var oe=q(`<a class="transition first-of-type:mt-2 lg:first-of-type:mt-0 group block
|
||||
rounded-xl text-lg px-3 py-2 hover:bg-[var(--btn-plain-bg-hover)] active:bg-[var(--btn-plain-bg-active)]"><div class="transition text-90 inline-flex font-bold group-hover:text-[var(--primary)]"> <!></div> <div class="transition text-sm text-50"></div></a>`),ce=q(`<div id="search-bar" class="hidden lg:flex transition-all items-center h-11 mr-2 rounded-lg
|
||||
bg-black/[0.04] hover:bg-black/[0.06] focus-within:bg-black/[0.06]
|
||||
dark:bg-white/5 dark:hover:bg-white/10 dark:focus-within:bg-white/10
|
||||
"><!> <input class="transition-all pl-10 text-sm bg-transparent outline-0
|
||||
h-full w-40 active:w-60 focus:w-60 text-black/50 dark:text-white/50 svelte-1wah7ro"/></div> <button aria-label="Search Panel" id="search-switch" class="btn-plain scale-animation lg:!hidden rounded-lg w-11 h-11 active:scale-90"><!></button> <div id="search-panel" class="float-panel float-panel-closed search-panel absolute md:w-[30rem]
|
||||
top-20 left-4 md:left-[unset] right-4 shadow-2xl rounded-2xl p-2 svelte-1wah7ro"><div id="search-bar-inside" class="flex relative lg:hidden transition-all items-center h-11 rounded-xl
|
||||
bg-black/[0.04] hover:bg-black/[0.06] focus-within:bg-black/[0.06]
|
||||
dark:bg-white/5 dark:hover:bg-white/10 dark:focus-within:bg-white/10
|
||||
"><!> <input placeholder="Search" class="pl-10 absolute inset-0 text-sm bg-transparent outline-0
|
||||
focus:w-60 text-black/50 dark:text-white/50 svelte-1wah7ro"/></div> <!></div>`,1);function Se(A,D){ae(D,!1);let i=g(""),n=g(""),d=g([]),x=!1,l=g(!1);const de=[{url:Y("/"),meta:{title:"This Is a Fake Search Result"},excerpt:"Because the search cannot work in the <mark>dev</mark> environment."},{url:Y("/"),meta:{title:"If You Want to Test the Search"},excerpt:"Try running <mark>npm build && npm preview</mark> instead."}],G=()=>{document.getElementById("search-panel")?.classList.toggle("float-panel-closed")},k=(t,a)=>{const r=document.getElementById("search-panel");!r||!a||(t?r.classList.remove("float-panel-closed"):r.classList.add("float-panel-closed"))},H=()=>{const t=document.getElementById("search-panel");t&&t.classList.add("float-panel-closed"),s(i,""),s(n,""),s(d,[])},J=(t,a)=>{t.preventDefault(),H(),le(a)},p=async(t,a)=>{if(!t){k(!1,a),s(d,[]);return}if(e(l))try{let r=[];if(x&&window.pagefind){const m=await window.pagefind.search(t);r=await Promise.all(m.results.map(v=>v.data()))}else r=[],console.error("Pagefind is not available in production environment.");s(d,r),k(e(d).length>0,a)}catch(r){console.error("Search error:",r),s(d,[]),k(!1,a)}finally{}};X(()=>{const t=()=>{s(l,!0),x=typeof window<"u"&&!!window.pagefind&&typeof window.pagefind.search=="function",console.log("Pagefind status on init:",x),e(i)&&p(e(i),!0),e(n)&&p(e(n),!1)};document.addEventListener("pagefindready",()=>{console.log("Pagefind ready event received."),t()}),document.addEventListener("pagefindloaderror",()=>{console.warn("Pagefind load error event received. Search functionality will be limited."),t()}),setTimeout(()=>{e(l)||(console.log("Fallback: Initializing search after timeout."),t())},2e3)}),R(()=>(e(l),e(i)),()=>{e(l)&&e(i)&&(async()=>await p(e(i),!0))()}),R(()=>(e(l),e(n)),()=>{e(l)&&e(n)&&(async()=>await p(e(n),!1))()}),$(),Z();var P=ce(),y=ee(P),S=f(y);w(S,{icon:"material-symbols:search",class:"absolute text-[1.25rem] pointer-events-none ml-3 transition my-auto text-black/30 dark:text-white/30"});var u=o(S,2);j(u),c(y);var h=o(y,2),N=f(h);w(N,{icon:"material-symbols:search",class:"text-[1.25rem]"}),c(h);var L=o(h,2),_=f(L),E=f(_);w(E,{icon:"material-symbols:search",class:"absolute text-[1.25rem] pointer-events-none ml-3 transition my-auto text-black/30 dark:text-white/30"});var T=o(E,2);j(T),c(_);var O=o(_,2);ie(O,1,()=>e(d),se,(t,a)=>{var r=oe(),m=f(r),v=f(m,!0),Q=o(v);w(Q,{icon:"fa6-solid:chevron-right",class:"transition text-[0.75rem] translate-x-1 my-auto text-[var(--primary)]"}),c(m);var B=o(m,2);ne(B,()=>(e(a),b(()=>e(a).excerpt)),!0),c(B),c(r),z(()=>{C(r,"href",(e(a),b(()=>e(a).url))),re(v,(e(a),b(()=>e(a).meta.title)))}),I("click",r,U=>J(U,e(a).url)),F(t,r)}),c(L),z(t=>C(u,"placeholder",t),[()=>(M(W),M(V),b(()=>W(V.search)))]),K(u,()=>e(i),t=>s(i,t)),I("focus",u,()=>p(e(i),!0)),I("click",h,G),K(T,()=>e(n),t=>s(n,t)),F(A,P),te()}export{Se as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{w as o}from"./widget-manager.B87vf-Ll.js";import"./config.B4FKKqOZ.js";class a{constructor(){this.init()}init(){this.updateResponsiveDisplay(),window.addEventListener("resize",()=>this.updateResponsiveDisplay())}updateResponsiveDisplay(){const i=o.getBreakpoints(),t=window.innerWidth;let e;t<i.mobile?e="mobile":t<i.tablet?e="tablet":e="desktop";const n=o.shouldShowSidebar(e),s=document.getElementById("sidebar");s&&s.style.setProperty(`--sidebar-${e}-display`,n?"block":"none")}}new a;
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{e as $}from"./index.modern.D46RI4Wq.js";function w(){return w=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)({}).hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},w.apply(null,arguments)}function A(r){return r.localName!=="title"&&!r.matches("[data-swup-theme]")}function P(r,n){return r.outerHTML===n.outerHTML}function x(r,n=[]){const t=Array.from(r.attributes);return n.length?t.filter(({name:i})=>n.some(f=>f instanceof RegExp?f.test(i):i===f)):t}function j(r){return r.matches("link[rel=stylesheet][href]")}class B extends ${constructor(n={}){var t;super(),t=this,this.name="SwupHeadPlugin",this.requires={swup:">=4.6"},this.defaults={persistTags:!1,persistAssets:!1,awaitAssets:!1,attributes:["lang","dir"],timeout:3e3},this.options=void 0,this.updateHead=async function(i,{page:{}}){const{awaitAssets:f,attributes:y,timeout:H}=t.options,T=i.to.document,{removed:E,added:b}=(function(s,m,{shouldPersist:c=()=>!1}={}){const a=Array.from(s.children),o=Array.from(m.children),d=(h=a,o.reduce((e,u,g)=>(h.some(v=>P(u,v))||e.push({el:u,index:g}),e),[]));var h;const p=(function(e,u){return e.reduce((g,v)=>(u.some(O=>P(v,O))||g.push({el:v}),g),[])})(a,o);p.reverse().filter(({el:e})=>A(e)).filter(({el:e})=>!c(e)).forEach(({el:e})=>s.removeChild(e));const l=d.filter(({el:e})=>A(e)).map(e=>{let u=e.el.cloneNode(!0);return s.insertBefore(u,s.children[(e.index||0)+1]||null),w({},e,{el:u})});return{removed:p.map(({el:e})=>e),added:l.map(({el:e})=>e)}})(document.head,T.head,{shouldPersist:s=>t.isPersistentTag(s)});if(t.swup.log(`Removed ${E.length} / added ${b.length} tags in head`),y!=null&&y.length&&(function(s,m,c=[]){const a=new Set;for(const{name:o,value:d}of x(m,c))s.setAttribute(o,d),a.add(o);for(const{name:o}of x(s,c))a.has(o)||s.removeAttribute(o)})(document.documentElement,T.documentElement,y),f){const s=(function(m,c=0){return m.filter(j).map(a=>(function(o,d=0){let h;const p=l=>{o.sheet?l():h=setTimeout(()=>p(l),10)};return new Promise(l=>{p(()=>l(o)),d>0&&setTimeout(()=>{h&&clearTimeout(h),l(o)},d)})})(a,c))})(b,H);s.length&&(t.swup.log(`Waiting for ${s.length} assets to load`),await Promise.all(s))}},this.options=w({},this.defaults,n),this.options.persistAssets&&!this.options.persistTags&&(this.options.persistTags="link[rel=stylesheet], script[src], style")}mount(){this.before("content:replace",this.updateHead)}isPersistentTag(n){const{persistTags:t}=this.options;return typeof t=="function"?t(n):typeof t=="string"&&t.length>0?n.matches(t):!!t}}export{B as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{e as a}from"./index.modern.D46RI4Wq.js";function o(){return o=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},o.apply(this,arguments)}class p extends a{constructor(t={}){super(),this.name="SwupScriptsPlugin",this.requires={swup:">=4"},this.defaults={head:!0,body:!0,optin:!1},this.options=void 0,this.options=o({},this.defaults,t)}mount(){this.on("content:replace",this.runScripts)}runScripts(){const{head:t,body:e,optin:r}=this.options,s=this.getScope({head:t,body:e});if(!s)return;const i=Array.from(s.querySelectorAll(r?"script[data-swup-reload-script]":"script:not([data-swup-ignore-script])"));i.forEach(u=>this.runScript(u)),this.swup.log(`Executed ${i.length} scripts.`)}runScript(t){const e=document.createElement("script");for(const{name:r,value:s}of t.attributes)e.setAttribute(r,s);return e.textContent=t.textContent,t.replaceWith(e),e}getScope({head:t,body:e}){return t&&e?document:t?document.head:e?document.body:null}}export{p as default};
|
||||
@@ -1,6 +0,0 @@
|
||||
class l extends HTMLElement{tocEl=null;visibleClass="visible";observer;anchorNavTarget=null;headingIdxMap=new Map;headings=[];sections=[];tocEntries=[];active=[];activeIndicator=null;constructor(){super(),this.observer=new IntersectionObserver(this.markVisibleSection,{threshold:0})}markVisibleSection=t=>{t.forEach(i=>{const e=i.target.children[0]?.getAttribute("id"),s=e?this.headingIdxMap.get(e):void 0;s!=null&&(this.active[s]=i.isIntersecting),i.isIntersecting&&this.anchorNavTarget==i.target.firstChild&&(this.anchorNavTarget=null)}),this.active.includes(!0)||this.fallback(),this.update()};toggleActiveHeading=()=>{let t=this.active.length-1,i=this.active.length-1,e=-1;for(;t>=0&&!this.active[t];)this.tocEntries[t].classList.remove(this.visibleClass),t--;for(;t>=0&&this.active[t];)this.tocEntries[t].classList.add(this.visibleClass),i=Math.min(i,t),e=Math.max(e,t),t--;for(;t>=0;)this.tocEntries[t].classList.remove(this.visibleClass),t--;if(i>e)this.activeIndicator?.setAttribute("style","opacity: 0");else{let s=this.tocEl?.getBoundingClientRect().top||0,o=this.tocEl?.scrollTop||0,r=this.tocEntries[i].getBoundingClientRect().top-s+o,n=this.tocEntries[e].getBoundingClientRect().bottom-s+o;this.activeIndicator?.setAttribute("style",`top: ${r}px; height: ${n-r}px`)}};scrollToActiveHeading=()=>{if(this.anchorNavTarget||!this.tocEl)return;const t=document.querySelectorAll(`#toc .${this.visibleClass}`);if(!t.length)return;const i=t[0],e=t[t.length-1],s=this.tocEl.clientHeight;let o;e.getBoundingClientRect().bottom-i.getBoundingClientRect().top<.9*s?o=i.offsetTop-32:o=e.offsetTop-s*.8,this.tocEl.scrollTo({top:o,left:0,behavior:"smooth"})};update=()=>{requestAnimationFrame(()=>{this.toggleActiveHeading(),this.scrollToActiveHeading()})};fallback=()=>{if(this.sections.length)for(let t=0;t<this.sections.length;t++){let i=this.sections[t].getBoundingClientRect().top,e=this.sections[t].getBoundingClientRect().bottom;if(this.isInRange(i,0,window.innerHeight)||this.isInRange(e,0,window.innerHeight)||i<0&&e>window.innerHeight)this.markActiveHeading(t);else if(i>window.innerHeight)break}};markActiveHeading=t=>{this.active[t]=!0};handleAnchorClick=t=>{const i=t.composedPath().find(e=>e instanceof HTMLAnchorElement);if(i){t.preventDefault();const e=decodeURIComponent(i.hash?.substring(1)),s=document.getElementById(e);if(s){const n=s.getBoundingClientRect().top+window.pageYOffset-80;window.scrollTo({top:n,behavior:"smooth"})}const o=this.headingIdxMap.get(e);o!==void 0?this.anchorNavTarget=this.headings[o]:this.anchorNavTarget=null}};isInRange(t,i,e){return i<t&&t<e}connectedCallback(){const t=document.querySelector(".custom-md")||document.querySelector(".prose")||document.querySelector(".markdown-content");t?t.addEventListener("animationend",()=>{this.init()},{once:!0}):(console.debug("Animation element not found, initializing directly"),setTimeout(()=>this.init(),100))}init(){if(this.regenerateTOC(),this.tocEl=this,this.tocEl.addEventListener("click",this.handleAnchorClick,{capture:!0}),this.activeIndicator=document.getElementById("active-indicator"),this.tocEntries=Array.from(this.querySelectorAll("a[href^='#']")),this.tocEntries.length!==0){this.sections=new Array(this.tocEntries.length),this.headings=new Array(this.tocEntries.length);for(let t=0;t<this.tocEntries.length;t++){const i=decodeURIComponent(this.tocEntries[t].hash?.substring(1)),e=document.getElementById(i),s=e?.parentElement;e instanceof HTMLElement&&s instanceof HTMLElement&&(this.headings[t]=e,this.sections[t]=s,this.headingIdxMap.set(i,t))}this.active=new Array(this.tocEntries.length).fill(!1),this.sections.forEach(t=>this.observer.observe(t)),this.fallback(),this.update()}}regenerateTOC(){if(!(window.location.pathname.includes("/posts/")||document.querySelector(".custom-md, .markdown-content")!==null)){this.innerHTML="";return}const i=Array.from(document.querySelectorAll("h1, h2, h3, h4, h5, h6")).filter(n=>n.id).map(n=>({depth:parseInt(n.tagName.substring(1)),slug:n.id,text:n.textContent||""}));if(i.length===0){this.innerHTML="";return}const e=Math.min(...i.map(n=>n.depth)),s=3;let o=1;const r=i.filter(n=>n.depth<e+s).map(n=>{const c=n.depth===e?"":n.depth===e+1?"ml-4":"ml-8",a=n.depth===e?o++:n.depth===e+1?'<div class="transition w-2 h-2 rounded-[0.1875rem] bg-[var(--toc-badge-bg)]"></div>':'<div class="transition w-1.5 h-1.5 rounded-sm bg-black/5 dark:bg-white/10"></div>';return`<a href="#${n.slug}" class="px-2 flex gap-2 relative transition w-full min-h-9 rounded-xl hover:bg-[var(--toc-btn-hover)] active:bg-[var(--toc-btn-active)] py-2">
|
||||
<div class="transition w-5 h-5 shrink-0 rounded-lg text-xs flex items-center justify-center font-bold ${c} ${n.depth===e?"bg-[var(--toc-badge-bg)] text-[var(--btn-content)]":""}">
|
||||
${a}
|
||||
</div>
|
||||
<div class="transition text-sm ${n.depth<=e+1?"text-50":"text-30"}">${n.text}</div>
|
||||
</a>`}).join("");this.innerHTML=r+'<div id="active-indicator" style="opacity: 0" class="-z-10 absolute bg-[var(--toc-btn-hover)] left-0 right-0 rounded-xl transition-all group-hover:bg-transparent border-2 border-[var(--toc-btn-hover)] group-hover:border-[var(--toc-btn-active)] border-dashed"></div>'}disconnectedCallback(){this.sections.forEach(t=>this.observer.unobserve(t)),this.observer.disconnect(),this.tocEl?.removeEventListener("click",this.handleAnchorClick)}}customElements.get("table-of-contents")||customElements.define("table-of-contents",l);
|
||||
@@ -1 +0,0 @@
|
||||
import{o as G,a as R,i as W}from"./lifecycle.MLiOCzKC.js";import{ap as H,aq as J,a7 as K,u as Q,a8 as U,ar as V,as as X,c as Z,f as aa,a as F,p as ea,b as ta,s as L,d as D,h as p,r as d,i as b,g as a,t as na,e as T}from"./template.CyUWgh-J.js";import{s as j}from"./render.C4NccAY7.js";import{i as C}from"./functions.LP-DBi81.js";import{e as ia,i as ra}from"./each.DMYtlFB3.js";import{e as S}from"./utils.DonxBMOE.js";import{a as B}from"./props.h8jPqBEd.js";import{I as sa}from"./Icon.DAqWeDJZ.js";import{s as oa}from"./config.B4FKKqOZ.js";/* empty css */function I(e,l){return e===l||e?.[X]===l}function la(e={},l,t,n){var c=H.r,x=U;return J(()=>{var u,r;return K(()=>{u=r,r=[],Q(()=>{e!==t(...r)&&(l(e,...r),u&&I(t(...u),e)&&l(null,...u))})}),()=>{let s=x;for(;s!==c&&s.parent!==null&&s.parent.f&V;)s=s.parent;const v=()=>{r&&I(t(...r),e)&&l(null,...r)},g=s.teardown;s.teardown=()=>{v(),g?.()}}}),e}const ca={zh_CN:"chinese_simplified",zh_TW:"chinese_traditional",en:"english",ja:"japanese",ko:"korean",es:"spanish",th:"thai",vi:"vietnamese",tr:"turkish",id:"indonesian",fr:"french",de:"german",ru:"russian",ar:"arabic"};function ua(e){return ca[e]}var da=T('<span class="ml-auto text-[var(--primary)]">✓</span>'),fa=T('<button><span class="text-lg transition text-black/75 dark:text-white/75"> </span> <span> </span> <!></button>'),pa=T('<div class="relative"><button aria-label="Language Translation" class="btn-plain scale-animation rounded-lg h-11 w-11 active:scale-90" id="translate-switch"><!></button> <div id="translate-panel" class="float-panel-closed absolute top-[3.5rem] right-0 z-50 w-64 bg-[var(--float-panel-bg)] rounded-[var(--radius-large)] shadow-lg border border-[var(--line-divider)] p-4 svelte-1dy47ij"><div class="text-sm font-medium text-[var(--primary)] mb-3">选择语言 / Select Language</div> <div class="grid grid-cols-1 gap-2 max-h-64 overflow-y-auto svelte-1dy47ij"></div></div></div>');function Ea(e,l){ta(l,!1);let t=!1,n=D(),c=D("");const x=[{code:"chinese_simplified",name:"简体中文",icon:"🇨🇳"},{code:"chinese_traditional",name:"繁體中文",icon:"🇹🇼"},{code:"english",name:"English",icon:"🇺🇸"},{code:"japanese",name:"日本語",icon:"🇯🇵"},{code:"korean",name:"한국어",icon:"🇰🇷"},{code:"french",name:"Français",icon:"🇫🇷"},{code:"german",name:"Deutsch",icon:"🇩🇪"},{code:"spanish",name:"Español",icon:"🇪🇸"},{code:"russian",name:"Русский",icon:"🇷🇺"},{code:"arabic",name:"العربية",icon:"🇸🇦"}],u=ua(oa.lang);function r(){t=!t,a(n)&&a(n).classList.toggle("float-panel-closed",!t)}async function s(o){try{if(typeof window.loadTranslateScript=="function"&&await window.loadTranslateScript(),typeof window.translate<"u"&&window.translate.language&&typeof window.translate.language.getLocal=="function"){const i=window.translate.language.getLocal();o==="chinese_simplified"&&i==="chinese_simplified"&&(typeof window.translate.reset=="function"&&window.translate.reset(),window.translate.language&&(window.translate.language.translateLocal=!0)),window.translate.to=o,typeof window.translate.execute=="function"&&window.translate.execute()}else console.warn("translate.js is not fully loaded or language API is not available");L(c,o)}catch(i){console.error("Failed to load or execute translation:",i)}t=!1,a(n)&&a(n).classList.add("float-panel-closed")}function v(o){const i=o.target;!t||!a(n)||!a(n).contains(i)&&!i.closest("#translate-switch")&&(t=!1,a(n).classList.add("float-panel-closed"))}G(()=>{document.addEventListener("click",v),L(c,u),typeof window.translate<"u"&&(window.translate.to=u)}),R(()=>{document.removeEventListener("click",v)}),W();var g=Z(),O=aa(g);{var z=o=>{var i=pa(),w=p(i),M=p(w);sa(M,{icon:"material-symbols:translate",class:"text-[1.25rem] transition text-black/75 dark:text-white/75 hover:text-[var(--primary)]"}),d(w);var _=b(w,2),A=b(p(_),2);ia(A,5,()=>x,ra,(y,f)=>{var m=fa(),E=p(m),P=p(E,!0);d(E);var h=b(E,2),N=p(h,!0);d(h);var Y=b(h,2);{var $=k=>{var q=da();F(k,q)};C(Y,k=>{a(c)===a(f).code&&k($)})}d(m),na(()=>{B(m,1,`flex items-center gap-3 p-2 rounded-lg hover:bg-[var(--btn-plain-bg-hover)] transition-colors text-left w-full ${a(c)===a(f).code?"bg-[var(--btn-plain-bg-hover)] border-1 border-[var(--primary)]":""}`),j(P,a(f).icon),B(h,1,`text-sm transition text-black/75 dark:text-white/75 ${a(c)===a(f).code?"font-medium text-[var(--primary)]":""}`),j(N,a(f).name)}),S("click",m,()=>s(a(f).code)),F(y,m)}),d(A),d(_),la(_,y=>L(n,y),()=>a(n)),d(i),S("click",w,r),F(o,i)};C(O,o=>{o(z)})}F(e,g),ea()}export{Ea as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,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) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/blog/_astro/jetbrains-mono-cyrillic-wght-normal.D73BlboJ.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/blog/_astro/jetbrains-mono-greek-wght-normal.Bw9x6K1M.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/blog/_astro/jetbrains-mono-vietnamese-wght-normal.Bt-aOZkq.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/blog/_astro/jetbrains-mono-latin-ext-wght-normal.DBQx-q_a.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/blog/_astro/jetbrains-mono-latin-wght-normal.B9CIFXIH.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 565 KiB |
@@ -1 +0,0 @@
|
||||
import{ai as u,a9 as m,aj as v,v as y,C as _,y as h,x as $,a4 as g}from"./template.CyUWgh-J.js";import{u as b,h as x,m as j}from"./render.C4NccAY7.js";import"./utils.DonxBMOE.js";function c(e){return(a,...l)=>{var n=e(...l),t;if(y)t=_,h();else{var i=n.render().trim(),o=u(i);t=$(o),a.before(t)}const s=n.setup?.(t);m(t,t),typeof s=="function"&&v(s)}}const p=new WeakMap;var L=e=>async(a,l,n,{client:t})=>{if(!e.hasAttribute("ssr"))return;let i,o,s={};for(const[r,f]of Object.entries(n))o??={},r==="default"?(o.default=!0,i=c(()=>({render:()=>`<astro-slot>${f}</astro-slot>`}))):o[r]=c(()=>({render:()=>`<astro-slot name="${r}">${f}</astro-slot>`})),r==="default"?s.children=c(()=>({render:()=>`<astro-slot>${f}</astro-slot>`})):s[r]=c(()=>({render:()=>`<astro-slot name="${r}">${f}</astro-slot>`}));const d={...l,children:i,$$slots:o,...s};if(p.has(e))p.get(e).setProps(d);else{const r=k(a,e,d,t!=="only");p.set(e,r),e.addEventListener("astro:unmount",()=>r.destroy(),{once:!0})}};function k(e,a,l,n){let t=g(l);const i=n?x:j;n||(a.innerHTML="");const o=i(e,{target:a,props:t});return{setProps(s){Object.assign(t,s);for(const d in t)d in s||delete t[d]},destroy(){b(o)}}}export{L as default};
|
||||
@@ -1 +0,0 @@
|
||||
var e=(a=>(a[a.Home=0]="Home",a[a.Archive=1]="Archive",a[a.About=2]="About",a[a.Friends=3]="Friends",a[a.Anime=4]="Anime",a[a.Diary=5]="Diary",a[a.Gallery=6]="Gallery",a[a.Projects=7]="Projects",a[a.Skills=8]="Skills",a[a.Timeline=9]="Timeline",a))(e||{});const o="zh_CN",i={lang:o,banner:{carousel:{enable:!1}}};e.Home,e.Archive;const t={theme:"github-dark"},l={enable:!0,position:"left",components:[{type:"profile",enable:!0,order:1,position:"top",class:"onload-animation",animationDelay:0},{type:"announcement",enable:!0,order:2,position:"top",class:"onload-animation",animationDelay:50},{type:"categories",enable:!0,order:3,position:"sticky",class:"onload-animation",animationDelay:150,responsive:{collapseThreshold:5}},{type:"tags",enable:!0,order:4,position:"sticky",class:"onload-animation",animationDelay:200,responsive:{collapseThreshold:20}}],defaultAnimation:{enable:!0,baseDelay:0,increment:50},responsive:{breakpoints:{mobile:768,tablet:1024,desktop:1280},layout:{mobile:"sidebar",tablet:"sidebar",desktop:"sidebar"}}};export{l as a,t as e,i as s};
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 877 KiB |
@@ -1 +0,0 @@
|
||||
import{o as b,q as $,E as K,v as R,w as z,x as j,y as ee,g as U,z as ne,H as re,A as X,B as L,C as F,D as fe,F as ae,G as y,I as ie,J as w,K as q,L as le,M as se,N as ue,O as oe,P as V,Q as te,R as de,d as ve,S as G,T as ce,U as pe,V as P,W as Q,X as Y,Y as ge,Z as _e,_ as he,$ as Ee,a0 as me,a1 as Te,a2 as we}from"./template.CyUWgh-J.js";function Ne(e,r){return r}function Ae(e,r,s){for(var o=[],c=r.length,l,i=r.length,p=0;p<c;p++){let h=r[p];Q(h,()=>{if(l){if(l.pending.delete(h),l.done.add(h),l.pending.size===0){var t=e.outrogroups;B(e,V(l.done)),t.delete(l),t.size===0&&(e.outrogroups=null)}}else i-=1},!1)}if(i===0){var a=o.length===0&&s!==null;if(a){var v=s,f=v.parentNode;Ee(f),f.append(v),e.items.clear()}B(e,r,!a)}else l={pending:new Set(r),done:new Set},(e.outrogroups??=new Set).add(l)}function B(e,r,s=!0){var o;if(e.pending.size>0){o=new Set;for(const i of e.pending.values())for(const p of i)o.add(e.items.get(p).e)}for(var c=0;c<r.length;c++){var l=r[c];if(o?.has(l)){l.f|=w;const i=document.createDocumentFragment();me(l,i)}else Te(r[c],s)}}var J;function xe(e,r,s,o,c,l=null){var i=e,p=new Map,a=(r&K)!==0;if(a){var v=e;i=R?z(j(v)):v.appendChild(b())}R&&ee();var f=null,h=ue(()=>{var d=s();return oe(d)?d:d==null?[]:V(d)}),t,E=new Map,m=!0;function x(d){(C.effect.f&pe)===0&&(C.pending.delete(d),C.fallback=f,Ce(C,t,i,r,o),f!==null&&(t.length===0?(f.f&w)===0?P(f):(f.f^=w,k(f,null,i)):Q(f,()=>{f=null})))}function n(d){C.pending.delete(d)}var u=$(()=>{t=U(h);var d=t.length;let _=!1;if(R){var H=ne(i)===re;H!==(d===0)&&(i=X(),z(i),L(!1),_=!0)}for(var S=new Set,g=ie,D=se(),I=0;I<d;I+=1){R&&F.nodeType===fe&&F.data===ae&&(i=F,_=!0,L(!1));var T=t[I],O=o(T,I),A=m?null:p.get(O);A?(A.v&&y(A.v,T),A.i&&y(A.i,I),D&&g.unskip_effect(A.e)):(A=Se(p,m?i:J??=b(),T,O,I,c,r,s),m||(A.e.f|=w),p.set(O,A)),S.add(O)}if(d===0&&l&&!f&&(m?f=q(()=>l(i)):(f=q(()=>l(J??=b())),f.f|=w)),d>S.size&&le(),R&&d>0&&z(X()),!m)if(E.set(g,S),D){for(const[W,Z]of p)S.has(W)||g.skip_effect(Z.e);g.oncommit(x),g.ondiscard(n)}else x(g);_&&L(!0),U(h)}),C={effect:u,items:p,pending:E,outrogroups:null,fallback:f};m=!1,R&&(i=F)}function M(e){for(;e!==null&&(e.f&_e)===0;)e=e.next;return e}function Ce(e,r,s,o,c){var l=(o&he)!==0,i=r.length,p=e.items,a=M(e.effect.first),v,f=null,h,t=[],E=[],m,x,n,u;if(l)for(u=0;u<i;u+=1)m=r[u],x=c(m,u),n=p.get(x).e,(n.f&w)===0&&(n.nodes?.a?.measure(),(h??=new Set).add(n));for(u=0;u<i;u+=1){if(m=r[u],x=c(m,u),n=p.get(x).e,e.outrogroups!==null)for(const T of e.outrogroups)T.pending.delete(n),T.done.delete(n);if((n.f&Y)!==0&&(P(n),l&&(n.nodes?.a?.unfix(),(h??=new Set).delete(n))),(n.f&w)!==0)if(n.f^=w,n===a)k(n,null,s);else{var C=f?f.next:a;n===e.effect.last&&(e.effect.last=n.prev),n.prev&&(n.prev.next=n.next),n.next&&(n.next.prev=n.prev),N(e,f,n),N(e,n,C),k(n,C,s),f=n,t=[],E=[],a=M(f.next);continue}if(n!==a){if(v!==void 0&&v.has(n)){if(t.length<E.length){var d=E[0],_;f=d.prev;var H=t[0],S=t[t.length-1];for(_=0;_<t.length;_+=1)k(t[_],d,s);for(_=0;_<E.length;_+=1)v.delete(E[_]);N(e,H.prev,S.next),N(e,f,H),N(e,S,d),a=d,f=S,u-=1,t=[],E=[]}else v.delete(n),k(n,a,s),N(e,n.prev,n.next),N(e,n,f===null?e.effect.first:f.next),N(e,f,n),f=n;continue}for(t=[],E=[];a!==null&&a!==n;)(v??=new Set).add(a),E.push(a),a=M(a.next);if(a===null)continue}(n.f&w)===0&&t.push(n),f=n,a=M(n.next)}if(e.outrogroups!==null){for(const T of e.outrogroups)T.pending.size===0&&(B(e,V(T.done)),e.outrogroups?.delete(T));e.outrogroups.size===0&&(e.outrogroups=null)}if(a!==null||v!==void 0){var g=[];if(v!==void 0)for(n of v)(n.f&Y)===0&&g.push(n);for(;a!==null;)(a.f&Y)===0&&a!==e.fallback&&g.push(a),a=M(a.next);var D=g.length;if(D>0){var I=(o&K)!==0&&i===0?s:null;if(l){for(u=0;u<D;u+=1)g[u].nodes?.a?.measure();for(u=0;u<D;u+=1)g[u].nodes?.a?.fix()}Ae(e,g,I)}}l&&ge(()=>{if(h!==void 0)for(n of h)n.nodes?.a?.apply()})}function Se(e,r,s,o,c,l,i,p){var a=(i&te)!==0?(i&de)===0?ve(s,!1,!1):G(s):null,v=(i&ce)!==0?G(c):null;return{v:a,i:v,e:q(()=>(l(r,a??s,v??c,p),()=>{e.delete(o)}))}}function k(e,r,s){if(e.nodes)for(var o=e.nodes.start,c=e.nodes.end,l=r&&(r.f&w)===0?r.nodes.start:s;o!==null;){var i=we(o);if(l.before(o),o===c)return;o=i}}function N(e,r,s){r===null?e.effect.first=s:r.next=s,s===null?e.effect.last=r:s.prev=r}export{xe as e,Ne as i};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
try{(()=>{function a(e){if(!e)return;let t=e.getAttribute("tabindex")!==null,r=e.scrollWidth>e.clientWidth;r&&!t?(e.setAttribute("tabindex","0"),e.setAttribute("role","region")):!r&&t&&(e.removeAttribute("tabindex"),e.removeAttribute("role"))}var u=window.requestIdleCallback||(e=>setTimeout(e,1)),s=window.cancelIdleCallback||clearTimeout;function l(e){let t=new Set,r,n;return new ResizeObserver(c=>{c.forEach(o=>t.add(o.target)),r&&clearTimeout(r),n&&s(n),r=setTimeout(()=>{n&&s(n),n=u(()=>{t.forEach(o=>e(o)),t.clear()})},250)})}function i(e,t){e.querySelectorAll?.(".expressive-code pre > code").forEach(r=>{let n=r.parentElement;n&&t.observe(n)})}var d=l(a);i(document,d);var b=new MutationObserver(e=>e.forEach(t=>t.addedNodes.forEach(r=>{i(r,d)})));b.observe(document.body,{childList:!0,subtree:!0});document.addEventListener("astro:page-load",()=>{i(document,d)});})();}catch(e){console.error("[EC] tabindex-js-module failed:",e)}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
function o(){return o=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(s[e]=r[e])}return s},o.apply(this,arguments)}const d=s=>String(s).split(".").map(t=>String(parseInt(t||"0",10))).concat(["0","0"]).slice(0,3).join(".");class y{constructor(){this.isSwupPlugin=!0,this.swup=void 0,this.version=void 0,this.requires={},this.handlersToUnregister=[]}mount(){}unmount(){this.handlersToUnregister.forEach(t=>t()),this.handlersToUnregister=[]}_beforeMount(){if(!this.name)throw new Error("You must define a name of plugin when creating a class.")}_afterUnmount(){}_checkRequirements(){return typeof this.requires!="object"||Object.entries(this.requires).forEach(([t,r])=>{if(!(function(e,i,u){const g=(function(a,h){var c;if(a==="swup")return(c=h.version)!=null?c:"";{var l;const p=h.findPlugin(a);return(l=p?.version)!=null?l:""}})(e,u);return!!g&&((a,h)=>h.every(c=>{const[,l,p]=c.match(/^([\D]+)?(.*)$/)||[];var m,f;return((w,b)=>{const v={"":n=>n===0,">":n=>n>0,">=":n=>n>=0,"<":n=>n<0,"<=":n=>n<=0};return(v[b]||v[""])(w)})((f=p,m=d(m=a),f=d(f),m.localeCompare(f,void 0,{numeric:!0})),l||">=")}))(g,i)})(t,r=Array.isArray(r)?r:[r],this.swup)){const e=`${t} ${r.join(", ")}`;throw new Error(`Plugin version mismatch: ${this.name} requires ${e}`)}}),!0}on(t,r,e={}){var i;r=!(i=r).name.startsWith("bound ")||i.hasOwnProperty("prototype")?r.bind(this):r;const u=this.swup.hooks.on(t,r,e);return this.handlersToUnregister.push(u),u}once(t,r,e={}){return this.on(t,r,o({},e,{once:!0}))}before(t,r,e={}){return this.on(t,r,o({},e,{before:!0}))}replace(t,r,e={}){return this.on(t,r,o({},e,{replace:!0}))}off(t,r){return this.swup.hooks.off(t,r)}}export{y as e};
|
||||
@@ -1 +0,0 @@
|
||||
import{a5 as m,I as v,a6 as _,u as b,a7 as i,v as y}from"./template.CyUWgh-J.js";function E(a,l,u=l){var s=new WeakSet;m(a,"input",async r=>{var e=r?a.defaultValue:a.value;if(e=t(a)?o(e):e,u(e),v!==null&&s.add(v),await _(),e!==(e=l())){var d=a.selectionStart,f=a.selectionEnd,n=a.value.length;if(a.value=e??"",f!==null){var c=a.value.length;d===f&&f===n&&c>n?(a.selectionStart=c,a.selectionEnd=c):(a.selectionStart=d,a.selectionEnd=Math.min(f,c))}}}),(y&&a.defaultValue!==a.value||b(l)==null&&a.value)&&(u(t(a)?o(a.value):a.value),v!==null&&s.add(v)),i(()=>{var r=l();if(a===document.activeElement){var e=v;if(s.has(e))return}t(a)&&r===o(a.value)||a.type==="date"&&!r&&!a.value||r!==a.value&&(a.value=r??"")})}function t(a){var l=a.type;return l==="number"||l==="range"}function o(a){return a===""?null:+a}export{E as b};
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user