@tdesign/site-components 0.19.0 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/site.es.js CHANGED
@@ -3327,7 +3327,7 @@ O({
3327
3327
  `.css`${E1}`;
3328
3328
  }
3329
3329
  });
3330
- const I1 = ":host{display:inline-block;position:relative;font-family:PingFang SC,Microsoft YaHei,sans-serif;color:var(--text-primary, rgba(0, 0, 0, .9));text-align:left}.TDesign-docsearch-trigger{box-sizing:border-box;position:relative;display:inline-flex;align-items:center;gap:8px;width:200px;max-width:100%;height:32px;padding:0 10px 0 32px;background:var(--bg-color-container, #fff);border:1px solid var(--component-stroke, #dcdcdc);border-radius:var(--border-radius, 3px);transition:border-color .2s ease,box-shadow .2s ease}.TDesign-docsearch-trigger:hover{border-color:var(--brand-main-hover, #366ef4)}.TDesign-docsearch-trigger:focus-within{border-color:var(--brand-main, #0052d9);box-shadow:0 0 0 2px var(--brand-main-focus, rgba(0, 82, 217, .2))}.TDesign-docsearch-trigger__icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);display:inline-flex;width:16px;height:16px;color:var(--text-placeholder, rgba(0, 0, 0, .4));pointer-events:none}.TDesign-docsearch-trigger__icon svg{width:100%;height:100%;fill:currentColor}.TDesign-docsearch-trigger__input{flex:1;min-width:0;height:100%;padding:0;border:0;outline:0;background:transparent;font-family:inherit;font-size:14px;line-height:22px;color:var(--text-primary, rgba(0, 0, 0, .9))}.TDesign-docsearch-trigger__input::placeholder{color:var(--text-placeholder, rgba(0, 0, 0, .4))}.TDesign-docsearch-trigger__input::-webkit-search-cancel-button,.TDesign-docsearch-trigger__input::-webkit-search-decoration{-moz-appearance:none;appearance:none;-webkit-appearance:none}.TDesign-docsearch-trigger__suffix{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;flex-shrink:0;pointer-events:none}@media screen and (max-width: 768px){.TDesign-docsearch-trigger{width:100%;min-width:0}}.TDesign-docsearch-popover{position:absolute;top:calc(100% + 6px);left:0;z-index:1000;width:520px;max-width:calc(100vw - 32px);max-height:70vh;display:flex;flex-direction:column;background:var(--bg-color-container, #fff);border:1px solid var(--component-stroke, #dcdcdc);border-radius:6px;box-shadow:var(--shadow-2, 0 4px 16px rgba(0, 0, 0, .08));opacity:0;transform:translateY(-4px);pointer-events:none;transition:opacity .15s ease,transform .15s ease;overflow:hidden;text-align:left}.TDesign-docsearch-popover.is-open{opacity:1;transform:translateY(0);pointer-events:auto}:root[theme-mode=dark] .TDesign-docsearch-popover{border-color:var(--component-stroke, rgba(255, 255, 255, .12));box-shadow:0 4px 16px #00000080}.TDesign-docsearch-spinner{width:14px;height:14px;border:2px solid var(--component-stroke, #dcdcdc);border-top-color:var(--brand-main, #0052d9);border-radius:50%;animation:td-docsearch-spin .8s linear infinite}@keyframes td-docsearch-spin{to{transform:rotate(360deg)}}.TDesign-docsearch-popover__body{flex:1;overflow:hidden;padding:8px}.TDesign-docsearch-cols{display:flex;align-items:stretch;max-height:calc(70vh - 60px)}.TDesign-docsearch-cols__left,.TDesign-docsearch-cols__right{overflow-y:auto;max-height:calc(70vh - 60px);scrollbar-width:thin;scrollbar-color:var(--text-placeholder, rgba(0, 0, 0, .25)) transparent}.TDesign-docsearch-cols__left::-webkit-scrollbar,.TDesign-docsearch-cols__right::-webkit-scrollbar{width:6px}.TDesign-docsearch-cols__left::-webkit-scrollbar-track,.TDesign-docsearch-cols__right::-webkit-scrollbar-track{background:transparent}.TDesign-docsearch-cols__left::-webkit-scrollbar-thumb,.TDesign-docsearch-cols__right::-webkit-scrollbar-thumb{background-color:var(--text-placeholder, rgba(0, 0, 0, .2));border-radius:20px}.TDesign-docsearch-cols__left{flex:0 0 36%;max-width:180px;padding:4px 8px 4px 4px}.TDesign-docsearch-cols__right{flex:1;min-width:0;padding:4px 4px 4px 8px}.TDesign-docsearch-cat-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}.TDesign-docsearch-cat{display:flex;align-items:center;justify-content:flex-end;gap:6px;padding:8px 10px;font-size:13px;line-height:20px;color:var(--text-secondary, rgba(0, 0, 0, .6));cursor:pointer;text-align:right;border-radius:var(--border-radius, 3px);transition:background-color .15s ease,color .15s ease}.TDesign-docsearch-cat:hover{color:var(--text-primary, rgba(0, 0, 0, .9));background:var(--bg-color-page, #f3f3f3)}.TDesign-docsearch-cat.is-active{color:var(--text-primary, rgba(0, 0, 0, .9));background:var(--bg-color-page, #f3f3f3);font-weight:500}.TDesign-docsearch-cat__title{flex:1;min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:break-word}.TDesign-docsearch-cat__badge{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 6px;box-sizing:border-box;font-size:11px;line-height:18px;text-align:center;color:var(--text-secondary, rgba(0, 0, 0, .6));background:var(--bg-color-component, rgba(0, 0, 0, .06));border-radius:999px;font-weight:400;transition:background-color .15s ease,color .15s ease}.TDesign-docsearch-cat:hover .TDesign-docsearch-cat__badge,.TDesign-docsearch-cat.is-active .TDesign-docsearch-cat__badge{color:var(--brand-main, #0052d9);background:var(--brand-main-light, rgba(0, 82, 217, .1))}.TDesign-docsearch-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}.TDesign-docsearch-hit{position:relative}.TDesign-docsearch-hit__link{display:block;padding:8px 12px;border-radius:var(--border-radius, 3px);text-decoration:none;color:var(--text-primary, rgba(0, 0, 0, .9));cursor:pointer;transition:background-color .15s ease}.TDesign-docsearch-hit__link:hover,.TDesign-docsearch-hit.is-active .TDesign-docsearch-hit__link{background:var(--bg-color-page, #f3f3f3)}.TDesign-docsearch-hit__title{display:block;font-size:14px;font-weight:600;line-height:22px;color:var(--text-primary, rgba(0, 0, 0, .9));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.TDesign-docsearch-hit__subtitle{display:block;margin-top:2px;font-size:12px;font-weight:400;line-height:18px;color:var(--text-placeholder, rgba(0, 0, 0, .4));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.TDesign-docsearch-section{padding:4px 4px 4px 8px}.TDesign-docsearch-section__title{padding:6px 12px;font-size:12px;font-weight:500;line-height:20px;color:var(--text-secondary, rgba(0, 0, 0, .6))}.TDesign-docsearch-hit__remove{all:unset;position:absolute;right:8px;top:50%;transform:translateY(-50%);width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;color:var(--text-placeholder, rgba(0, 0, 0, .4));opacity:0;transition:background-color .15s ease,color .15s ease,opacity .15s ease}.TDesign-docsearch-hit:hover .TDesign-docsearch-hit__remove,.TDesign-docsearch-hit.is-active .TDesign-docsearch-hit__remove{opacity:1}.TDesign-docsearch-hit__remove svg{width:14px;height:14px;fill:currentColor}.TDesign-docsearch-hit__remove:hover{color:#e34d59;background:var(--bg-color-container, #fff)}.TDesign-docsearch-mark{padding:0 2px;margin:0 1px;color:var(--brand-main, #0052d9);background:var(--brand-main-light, rgba(0, 82, 217, .1));border-radius:3px;font-weight:inherit;text-decoration:none}.TDesign-docsearch-empty{padding:24px 16px}.TDesign-docsearch-empty__title{font-size:13px;font-weight:500;line-height:20px;color:var(--text-primary, rgba(0, 0, 0, .9))}.TDesign-docsearch-empty__desc{margin-top:4px;font-size:12px;line-height:20px;color:var(--text-placeholder, rgba(0, 0, 0, .4))}@media (prefers-reduced-motion: reduce){.TDesign-docsearch-popover,.TDesign-docsearch-spinner,.TDesign-docsearch-hit__link{transition:none!important;animation:none!important}}@media screen and (max-width: 768px){.TDesign-docsearch-popover{width:calc(100vw - 16px);left:50%;transform:translate(-50%,-4px)}.TDesign-docsearch-popover.is-open{transform:translate(-50%)}.TDesign-docsearch-cols{flex-direction:column;min-height:0;max-height:60vh}.TDesign-docsearch-cols__left{flex:0 0 auto;width:100%;max-width:none;padding:4px;border-bottom:1px solid var(--component-stroke, #dcdcdc);overflow-x:auto;overflow-y:hidden}.TDesign-docsearch-cat-list{flex-direction:row;gap:4px;flex-wrap:nowrap}.TDesign-docsearch-cat{flex-shrink:0;justify-content:flex-start;text-align:left;padding:6px 10px;border-radius:999px}.TDesign-docsearch-cat__title{flex:0 1 auto}.TDesign-docsearch-cols__right{padding:4px}}";
3330
+ const I1 = ":host{display:inline-block;position:relative;font-family:PingFang SC,Microsoft YaHei,sans-serif;color:var(--text-primary, rgba(0, 0, 0, .9));text-align:left}.TDesign-docsearch-trigger{box-sizing:border-box;position:relative;display:inline-flex;align-items:center;gap:8px;width:200px;max-width:100%;height:32px;padding:0 10px 0 32px;background:var(--bg-color-container, #fff);border:1px solid var(--component-stroke, #dcdcdc);border-radius:var(--border-radius, 3px);transition:border-color .2s ease,box-shadow .2s ease}.TDesign-docsearch-trigger:hover{border-color:var(--brand-main-hover, #366ef4)}.TDesign-docsearch-trigger:focus-within{border-color:var(--brand-main, #0052d9);box-shadow:0 0 0 2px var(--brand-main-focus, rgba(0, 82, 217, .2))}.TDesign-docsearch-trigger__icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);display:inline-flex;width:16px;height:16px;color:var(--text-placeholder, rgba(0, 0, 0, .4));pointer-events:none}.TDesign-docsearch-trigger__icon svg{width:100%;height:100%;fill:currentColor}.TDesign-docsearch-trigger__input{flex:1;min-width:0;height:100%;padding:0;border:0;outline:0;background:transparent;font-family:inherit;font-size:14px;line-height:22px;color:var(--text-primary, rgba(0, 0, 0, .9))}.TDesign-docsearch-trigger__input::placeholder{color:var(--text-placeholder, rgba(0, 0, 0, .4))}.TDesign-docsearch-trigger__input::-webkit-search-cancel-button,.TDesign-docsearch-trigger__input::-webkit-search-decoration{-moz-appearance:none;appearance:none;-webkit-appearance:none}.TDesign-docsearch-trigger__suffix{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;flex-shrink:0;pointer-events:none}@media screen and (max-width: 768px){.TDesign-docsearch-trigger{width:100%;min-width:0}}.TDesign-docsearch-popover{position:absolute;top:calc(100% + 6px);left:0;z-index:1000;width:520px;max-width:calc(100vw - 32px);max-height:70vh;display:flex;flex-direction:column;background:var(--bg-color-container, #fff);border:1px solid var(--component-stroke, #dcdcdc);border-radius:6px;box-shadow:var(--shadow-2, 0 4px 16px rgba(0, 0, 0, .08));opacity:0;transform:translateY(-4px);pointer-events:none;transition:opacity .15s ease,transform .15s ease;overflow:hidden;text-align:left}.TDesign-docsearch-popover.is-open{opacity:1;transform:translateY(0);pointer-events:auto}:root[theme-mode=dark] .TDesign-docsearch-popover{border-color:var(--component-stroke, rgba(255, 255, 255, .12));box-shadow:0 4px 16px #00000080}.TDesign-docsearch-spinner{width:14px;height:14px;border:2px solid var(--component-stroke, #dcdcdc);border-top-color:var(--brand-main, #0052d9);border-radius:50%;animation:td-docsearch-spin .8s linear infinite}@keyframes td-docsearch-spin{to{transform:rotate(360deg)}}.TDesign-docsearch-popover__body{flex:1;overflow:hidden;padding:8px}.TDesign-docsearch-cols{display:flex;align-items:stretch;max-height:calc(70vh - 60px)}.TDesign-docsearch-cols__left,.TDesign-docsearch-cols__right{overflow-y:auto;max-height:calc(70vh - 60px);scrollbar-width:thin;scrollbar-color:var(--text-placeholder, rgba(0, 0, 0, .25)) transparent}.TDesign-docsearch-cols__left::-webkit-scrollbar,.TDesign-docsearch-cols__right::-webkit-scrollbar{width:6px}.TDesign-docsearch-cols__left::-webkit-scrollbar-track,.TDesign-docsearch-cols__right::-webkit-scrollbar-track{background:transparent}.TDesign-docsearch-cols__left::-webkit-scrollbar-thumb,.TDesign-docsearch-cols__right::-webkit-scrollbar-thumb{background-color:var(--text-placeholder, rgba(0, 0, 0, .2));border-radius:20px}.TDesign-docsearch-cols__left{flex:0 0 36%;max-width:180px;padding:4px 8px 4px 4px}.TDesign-docsearch-cols__right{flex:1;min-width:0;padding:4px 4px 4px 8px}.TDesign-docsearch-cat-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}.TDesign-docsearch-cat{display:flex;align-items:center;justify-content:flex-end;gap:6px;padding:8px 10px;font-size:13px;line-height:20px;color:var(--text-secondary, rgba(0, 0, 0, .6));cursor:pointer;text-align:right;border-radius:var(--border-radius, 3px);transition:background-color .15s ease,color .15s ease}.TDesign-docsearch-cat:hover{color:var(--text-primary, rgba(0, 0, 0, .9));background:var(--bg-color-page, #f3f3f3)}.TDesign-docsearch-cat.is-active{color:var(--text-primary, rgba(0, 0, 0, .9));background:var(--bg-color-page, #f3f3f3);font-weight:500}.TDesign-docsearch-cat__title{flex:1;min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:break-word}.TDesign-docsearch-cat__badge{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 6px;box-sizing:border-box;font-size:11px;line-height:18px;text-align:center;color:var(--text-secondary, rgba(0, 0, 0, .6));background:var(--bg-color-component, rgba(0, 0, 0, .06));border-radius:999px;font-weight:400;transition:background-color .15s ease,color .15s ease}.TDesign-docsearch-cat:hover .TDesign-docsearch-cat__badge,.TDesign-docsearch-cat.is-active .TDesign-docsearch-cat__badge{color:var(--brand-main, #0052d9);background:var(--brand-main-light, rgba(0, 82, 217, .1))}.TDesign-docsearch-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}.TDesign-docsearch-hit{position:relative}.TDesign-docsearch-hit__link{display:block;padding:8px 12px;border-radius:var(--border-radius, 3px);text-decoration:none;color:var(--text-primary, rgba(0, 0, 0, .9));cursor:pointer;transition:background-color .15s ease,color .15s ease}.TDesign-docsearch-hit__link:hover,.TDesign-docsearch-hit.is-active .TDesign-docsearch-hit__link{background:var(--bg-color-page, #f3f3f3)}.TDesign-docsearch-hit__title{display:block;font-size:14px;font-weight:600;line-height:22px;color:var(--text-primary, rgba(0, 0, 0, .9));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.TDesign-docsearch-hit__subtitle{display:block;margin-top:2px;font-size:12px;font-weight:400;line-height:18px;color:var(--text-placeholder, rgba(0, 0, 0, .4));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.TDesign-docsearch-section{padding:4px 4px 4px 8px}.TDesign-docsearch-section__title{padding:6px 12px;font-size:12px;font-weight:500;line-height:20px;color:var(--text-secondary, rgba(0, 0, 0, .6))}.TDesign-docsearch-hit__remove{position:absolute;right:8px;top:50%;translate:0 -50%;width:20px;height:20px;display:grid;place-content:center;box-sizing:border-box;padding:0;margin:0;border:none;background:transparent;font:inherit;cursor:pointer;color:var(--text-placeholder, rgba(0, 0, 0, .3));opacity:0;-moz-appearance:none;appearance:none;-webkit-appearance:none;transition:color .2s ease,opacity .15s ease,transform .15s ease}.TDesign-docsearch-hit:hover .TDesign-docsearch-hit__remove,.TDesign-docsearch-hit.is-active .TDesign-docsearch-hit__remove{opacity:1}.TDesign-docsearch-hit__remove svg{width:14px;height:14px;fill:currentColor}.TDesign-docsearch-hit__remove:hover{color:var(--text-primary, rgba(0, 0, 0, .7))}.TDesign-docsearch-mark{padding:0 2px;margin:0 1px;color:var(--brand-main, #0052d9);background:var(--brand-main-light, rgba(0, 82, 217, .1));border-radius:3px;font-weight:inherit;text-decoration:none}.TDesign-docsearch-empty{padding:24px 16px}.TDesign-docsearch-empty__title{font-size:13px;font-weight:500;line-height:20px;color:var(--text-primary, rgba(0, 0, 0, .9))}.TDesign-docsearch-empty__desc{margin-top:4px;font-size:12px;line-height:20px;color:var(--text-placeholder, rgba(0, 0, 0, .4))}@media (prefers-reduced-motion: reduce){.TDesign-docsearch-popover,.TDesign-docsearch-spinner,.TDesign-docsearch-hit__link{transition:none!important;animation:none!important}}@media screen and (max-width: 768px){.TDesign-docsearch-popover{width:calc(100vw - 16px);left:50%;transform:translate(-50%,-4px)}.TDesign-docsearch-popover.is-open{transform:translate(-50%)}.TDesign-docsearch-cols{flex-direction:column;min-height:0;max-height:60vh}.TDesign-docsearch-cols__left{flex:0 0 auto;width:100%;max-width:none;padding:4px;border-bottom:1px solid var(--component-stroke, #dcdcdc);overflow-x:auto;overflow-y:hidden}.TDesign-docsearch-cat-list{flex-direction:row;gap:4px;flex-wrap:nowrap}.TDesign-docsearch-cat{flex-shrink:0;justify-content:flex-start;text-align:left;padding:6px 10px;border-radius:999px}.TDesign-docsearch-cat__title{flex:0 1 auto}.TDesign-docsearch-cols__right{padding:4px}}";
3331
3331
  function ke(e) {
3332
3332
  if (e == null) return "";
3333
3333
  const t = String(e);
@@ -3533,10 +3533,12 @@ function si(e, t) {
3533
3533
  !t || t === e._activeKey || (e._activeKey = t, e._flatHits = ai(e._groups, e._activeKey), e._currentIndex = 0, li(e));
3534
3534
  }
3535
3535
  function yt(e) {
3536
- e._groups = [], e._activeKey = null, e._recent = ii(), e._flatHits = e._recent.map((t) => ({
3537
- url: t.url,
3538
- title: t.title,
3539
- breadcrumb: t.breadcrumb
3536
+ e._groups = [], e._activeKey = null;
3537
+ const t = ii(), n = e.urlFilter, o = n ? t.filter((r) => r.url && r.url.includes(n)) : t;
3538
+ e._recent = o, e._flatHits = o.map((r) => ({
3539
+ url: r.url,
3540
+ title: r.title,
3541
+ breadcrumb: r.breadcrumb
3540
3542
  })), e._currentIndex = 0;
3541
3543
  }
3542
3544
  function zo(e, t) {
package/lib/site.umd.js CHANGED
@@ -404,7 +404,7 @@ ${so(a,u.index)}`),x}}g.prevArgs=B}}const jt=new WeakMap;function $i(e,t,n=200){
404
404
  </div>
405
405
  </aside>
406
406
  <div class="TDesign-doc-aside-mask" onclick="${$o}"></div>
407
- `.css`${Q1}`}});const O1=":host{display:inline-block;position:relative;font-family:PingFang SC,Microsoft YaHei,sans-serif;color:var(--text-primary, rgba(0, 0, 0, .9));text-align:left}.TDesign-docsearch-trigger{box-sizing:border-box;position:relative;display:inline-flex;align-items:center;gap:8px;width:200px;max-width:100%;height:32px;padding:0 10px 0 32px;background:var(--bg-color-container, #fff);border:1px solid var(--component-stroke, #dcdcdc);border-radius:var(--border-radius, 3px);transition:border-color .2s ease,box-shadow .2s ease}.TDesign-docsearch-trigger:hover{border-color:var(--brand-main-hover, #366ef4)}.TDesign-docsearch-trigger:focus-within{border-color:var(--brand-main, #0052d9);box-shadow:0 0 0 2px var(--brand-main-focus, rgba(0, 82, 217, .2))}.TDesign-docsearch-trigger__icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);display:inline-flex;width:16px;height:16px;color:var(--text-placeholder, rgba(0, 0, 0, .4));pointer-events:none}.TDesign-docsearch-trigger__icon svg{width:100%;height:100%;fill:currentColor}.TDesign-docsearch-trigger__input{flex:1;min-width:0;height:100%;padding:0;border:0;outline:0;background:transparent;font-family:inherit;font-size:14px;line-height:22px;color:var(--text-primary, rgba(0, 0, 0, .9))}.TDesign-docsearch-trigger__input::placeholder{color:var(--text-placeholder, rgba(0, 0, 0, .4))}.TDesign-docsearch-trigger__input::-webkit-search-cancel-button,.TDesign-docsearch-trigger__input::-webkit-search-decoration{-moz-appearance:none;appearance:none;-webkit-appearance:none}.TDesign-docsearch-trigger__suffix{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;flex-shrink:0;pointer-events:none}@media screen and (max-width: 768px){.TDesign-docsearch-trigger{width:100%;min-width:0}}.TDesign-docsearch-popover{position:absolute;top:calc(100% + 6px);left:0;z-index:1000;width:520px;max-width:calc(100vw - 32px);max-height:70vh;display:flex;flex-direction:column;background:var(--bg-color-container, #fff);border:1px solid var(--component-stroke, #dcdcdc);border-radius:6px;box-shadow:var(--shadow-2, 0 4px 16px rgba(0, 0, 0, .08));opacity:0;transform:translateY(-4px);pointer-events:none;transition:opacity .15s ease,transform .15s ease;overflow:hidden;text-align:left}.TDesign-docsearch-popover.is-open{opacity:1;transform:translateY(0);pointer-events:auto}:root[theme-mode=dark] .TDesign-docsearch-popover{border-color:var(--component-stroke, rgba(255, 255, 255, .12));box-shadow:0 4px 16px #00000080}.TDesign-docsearch-spinner{width:14px;height:14px;border:2px solid var(--component-stroke, #dcdcdc);border-top-color:var(--brand-main, #0052d9);border-radius:50%;animation:td-docsearch-spin .8s linear infinite}@keyframes td-docsearch-spin{to{transform:rotate(360deg)}}.TDesign-docsearch-popover__body{flex:1;overflow:hidden;padding:8px}.TDesign-docsearch-cols{display:flex;align-items:stretch;max-height:calc(70vh - 60px)}.TDesign-docsearch-cols__left,.TDesign-docsearch-cols__right{overflow-y:auto;max-height:calc(70vh - 60px);scrollbar-width:thin;scrollbar-color:var(--text-placeholder, rgba(0, 0, 0, .25)) transparent}.TDesign-docsearch-cols__left::-webkit-scrollbar,.TDesign-docsearch-cols__right::-webkit-scrollbar{width:6px}.TDesign-docsearch-cols__left::-webkit-scrollbar-track,.TDesign-docsearch-cols__right::-webkit-scrollbar-track{background:transparent}.TDesign-docsearch-cols__left::-webkit-scrollbar-thumb,.TDesign-docsearch-cols__right::-webkit-scrollbar-thumb{background-color:var(--text-placeholder, rgba(0, 0, 0, .2));border-radius:20px}.TDesign-docsearch-cols__left{flex:0 0 36%;max-width:180px;padding:4px 8px 4px 4px}.TDesign-docsearch-cols__right{flex:1;min-width:0;padding:4px 4px 4px 8px}.TDesign-docsearch-cat-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}.TDesign-docsearch-cat{display:flex;align-items:center;justify-content:flex-end;gap:6px;padding:8px 10px;font-size:13px;line-height:20px;color:var(--text-secondary, rgba(0, 0, 0, .6));cursor:pointer;text-align:right;border-radius:var(--border-radius, 3px);transition:background-color .15s ease,color .15s ease}.TDesign-docsearch-cat:hover{color:var(--text-primary, rgba(0, 0, 0, .9));background:var(--bg-color-page, #f3f3f3)}.TDesign-docsearch-cat.is-active{color:var(--text-primary, rgba(0, 0, 0, .9));background:var(--bg-color-page, #f3f3f3);font-weight:500}.TDesign-docsearch-cat__title{flex:1;min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:break-word}.TDesign-docsearch-cat__badge{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 6px;box-sizing:border-box;font-size:11px;line-height:18px;text-align:center;color:var(--text-secondary, rgba(0, 0, 0, .6));background:var(--bg-color-component, rgba(0, 0, 0, .06));border-radius:999px;font-weight:400;transition:background-color .15s ease,color .15s ease}.TDesign-docsearch-cat:hover .TDesign-docsearch-cat__badge,.TDesign-docsearch-cat.is-active .TDesign-docsearch-cat__badge{color:var(--brand-main, #0052d9);background:var(--brand-main-light, rgba(0, 82, 217, .1))}.TDesign-docsearch-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}.TDesign-docsearch-hit{position:relative}.TDesign-docsearch-hit__link{display:block;padding:8px 12px;border-radius:var(--border-radius, 3px);text-decoration:none;color:var(--text-primary, rgba(0, 0, 0, .9));cursor:pointer;transition:background-color .15s ease}.TDesign-docsearch-hit__link:hover,.TDesign-docsearch-hit.is-active .TDesign-docsearch-hit__link{background:var(--bg-color-page, #f3f3f3)}.TDesign-docsearch-hit__title{display:block;font-size:14px;font-weight:600;line-height:22px;color:var(--text-primary, rgba(0, 0, 0, .9));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.TDesign-docsearch-hit__subtitle{display:block;margin-top:2px;font-size:12px;font-weight:400;line-height:18px;color:var(--text-placeholder, rgba(0, 0, 0, .4));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.TDesign-docsearch-section{padding:4px 4px 4px 8px}.TDesign-docsearch-section__title{padding:6px 12px;font-size:12px;font-weight:500;line-height:20px;color:var(--text-secondary, rgba(0, 0, 0, .6))}.TDesign-docsearch-hit__remove{all:unset;position:absolute;right:8px;top:50%;transform:translateY(-50%);width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;color:var(--text-placeholder, rgba(0, 0, 0, .4));opacity:0;transition:background-color .15s ease,color .15s ease,opacity .15s ease}.TDesign-docsearch-hit:hover .TDesign-docsearch-hit__remove,.TDesign-docsearch-hit.is-active .TDesign-docsearch-hit__remove{opacity:1}.TDesign-docsearch-hit__remove svg{width:14px;height:14px;fill:currentColor}.TDesign-docsearch-hit__remove:hover{color:#e34d59;background:var(--bg-color-container, #fff)}.TDesign-docsearch-mark{padding:0 2px;margin:0 1px;color:var(--brand-main, #0052d9);background:var(--brand-main-light, rgba(0, 82, 217, .1));border-radius:3px;font-weight:inherit;text-decoration:none}.TDesign-docsearch-empty{padding:24px 16px}.TDesign-docsearch-empty__title{font-size:13px;font-weight:500;line-height:20px;color:var(--text-primary, rgba(0, 0, 0, .9))}.TDesign-docsearch-empty__desc{margin-top:4px;font-size:12px;line-height:20px;color:var(--text-placeholder, rgba(0, 0, 0, .4))}@media (prefers-reduced-motion: reduce){.TDesign-docsearch-popover,.TDesign-docsearch-spinner,.TDesign-docsearch-hit__link{transition:none!important;animation:none!important}}@media screen and (max-width: 768px){.TDesign-docsearch-popover{width:calc(100vw - 16px);left:50%;transform:translate(-50%,-4px)}.TDesign-docsearch-popover.is-open{transform:translate(-50%)}.TDesign-docsearch-cols{flex-direction:column;min-height:0;max-height:60vh}.TDesign-docsearch-cols__left{flex:0 0 auto;width:100%;max-width:none;padding:4px;border-bottom:1px solid var(--component-stroke, #dcdcdc);overflow-x:auto;overflow-y:hidden}.TDesign-docsearch-cat-list{flex-direction:row;gap:4px;flex-wrap:nowrap}.TDesign-docsearch-cat{flex-shrink:0;justify-content:flex-start;text-align:left;padding:6px 10px;border-radius:999px}.TDesign-docsearch-cat__title{flex:0 1 auto}.TDesign-docsearch-cols__right{padding:4px}}";function Le(e){if(e==null)return"";const t=String(e);return t.indexOf("<")===-1&&t.indexOf("&")===-1?t:t.replace(/<[^>]*>/g,"").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'")}const er="ALGOLIA_APP_ID",tr="ALGOLIA_API_KEY",nr="tdesign.tencent.com",or=20;function rr(){try{const e=window.location.pathname.match(/^\/([^/]+)\//);return e?`/${e[1]}/`:"/"}catch{return"/"}}const M1='<mark class="TDesign-docsearch-mark">',I1="</mark>";async function L1({query:e,signal:t,appId:n=er,apiKey:o=tr,indexName:r=nr,urlFilter:i=rr(),hitsPerPage:a=or}={}){const s=(e||"").trim();if(!s)return[];const l=`https://${n}-dsn.algolia.net/1/indexes/${encodeURIComponent(r)}/query`,d={params:new URLSearchParams({query:s,hitsPerPage:String(a),attributesToRetrieve:JSON.stringify(["hierarchy","content","anchor","url","type"]),attributesToSnippet:JSON.stringify(["hierarchy.lvl1:10","hierarchy.lvl2:10","hierarchy.lvl3:10","hierarchy.lvl4:10","hierarchy.lvl5:10","hierarchy.lvl6:10","content:10"]),snippetEllipsisText:"…",highlightPreTag:M1,highlightPostTag:I1}).toString()};try{const c=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json","X-Algolia-Application-Id":n,"X-Algolia-API-Key":o},body:JSON.stringify(d),signal:t});if(!c.ok)throw new Error(`Algolia ${c.status}`);const f=await c.json(),C=Array.isArray(f==null?void 0:f.hits)?f.hits:[];return i?C.filter(b=>((b==null?void 0:b.url)||"").includes(i)):C}catch(c){if(c&&c.name==="AbortError")throw c;return console.warn("[td-doc-search] search failed:",c&&c.message),[]}}function z1(e=[]){var o,r,i;const t=new Map,n=new Map;for(const a of e){const s=(a==null?void 0:a.hierarchy)||{},l=s.lvl1?"lvl1":"lvl0",d=s[l]||"Other";t.has(d)||t.set(d,{key:d,title:d,items:[]});const c=t.get(d);if(a.__formatted=ir(a),c.items.push(a),!n.get(d)){const f=(i=(r=(o=a==null?void 0:a._highlightResult)==null?void 0:o.hierarchy)==null?void 0:r[l])==null?void 0:i.value;f&&f.indexOf("<mark")!==-1?(c.title=f,n.set(d,!0)):f&&c.title===d&&(c.title=f)}}return Array.from(t.values())}function ir(e){var f,C,b,A,v,w;if(!e)return{title:"",subtitle:"",breadcrumb:"",snippet:"",url:""};const t=e.hierarchy||{},n=((f=e._highlightResult)==null?void 0:f.hierarchy)||{},o=((C=e._snippetResult)==null?void 0:C.hierarchy)||{},r=((A=(b=e._snippetResult)==null?void 0:b.content)==null?void 0:A.value)||((w=(v=e._highlightResult)==null?void 0:v.content)==null?void 0:w.value)||e.content||"",i=["lvl0","lvl1","lvl2","lvl3","lvl4","lvl5","lvl6"],a=B=>{var p,g;return((p=n[B])==null?void 0:p.value)||((g=o[B])==null?void 0:g.value)||t[B]||""},s=i.filter(B=>!!t[B]);let l="",d="";if(e.type==="content"&&s.length){const B=s[s.length-1];l=a(B),d=r}else if(s.length>=2){const B=s[s.length-1],p=s[s.length-2];l=a(B),d=a(p)}else s.length===1&&(l=a(s[0]),d="");const c=[];for(const B of i){const p=t[B];if(p){if(p===Le(l))break;c.push(p)}}return{title:l,subtitle:d,breadcrumb:c.join(" › "),snippet:e.type==="content"?r:"",url:e.url||"",type:e.type||"content"}}const ar="td-docsearch:recent",sr=5;function rn(){try{if(typeof localStorage>"u")return[];const e=localStorage.getItem(ar);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function an(e){try{if(typeof localStorage>"u")return;localStorage.setItem(ar,JSON.stringify(e.slice(0,sr)))}catch{}}function lr(){const e=rn();let t=!1;const n=e.map(o=>{const r=Le(o==null?void 0:o.title),i=Le(o==null?void 0:o.breadcrumb);return(r!==(o==null?void 0:o.title)||i!==(o==null?void 0:o.breadcrumb))&&(t=!0),{...o,title:r,breadcrumb:i}});return t&&an(n),n}function R1(e){if(!e||!e.url)return;const t=rn(),n={query:Le(e.query),url:e.url,title:Le(e.title),breadcrumb:Le(e.breadcrumb),ts:Date.now()},o=[n,...t.filter(r=>r.url!==n.url)].slice(0,sr);return an(o),o}function j1(e){const n=rn().filter(o=>o.url!==e);return an(n),n}function X1(e){if(!e)return!1;const t=(e.tagName||"").toLowerCase();return!!(t==="input"||t==="textarea"||t==="select"||e.isContentEditable)}function F1({onOpen:e,onClose:t}){if(typeof window>"u")return()=>{};const n=o=>{if((o.metaKey||o.ctrlKey)&&(o.key==="k"||o.key==="K")){o.preventDefault(),e&&e();return}if(o.key==="/"&&!X1(document.activeElement)){o.preventDefault(),e&&e();return}o.key==="Escape"&&t&&t()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)}const N1=150,ie={INITIAL:"initial",RECENT:"recent",LOADING_RESULTS:"loading_results",LOADING_PLACEHOLDER:"loading_placeholder",RESULTS:"results",EMPTY:"empty"};function cr(e,t){return String(e).replace(/\{(\w+)\}/g,(n,o)=>t&&o in t?String(t[o]):"")}function dr(e,t){const n=t?e.filter(r=>r.key===t):e,o=[];for(const r of n)for(const i of r.items){const a=i.__formatted||ir(i);o.push({url:a.url,title:a.title,subtitle:a.subtitle,breadcrumb:a.breadcrumb})}return o}function S1({query:e,loading:t,groups:n,recent:o}){return t&&e?n&&n.length?ie.LOADING_RESULTS:ie.LOADING_PLACEHOLDER:e?n&&n.length?ie.RESULTS:ie.EMPTY:o&&o.length?ie.RECENT:ie.INITIAL}function gr(e,t){var n;e._groups=t||[],(!e._activeKey||!e._groups.some(o=>o.key===e._activeKey))&&(e._activeKey=((n=e._groups[0])==null?void 0:n.key)||null),e._flatHits=dr(e._groups,e._activeKey),e._currentIndex=0}function ur(e,t){!t||t===e._activeKey||(e._activeKey=t,e._flatHits=dr(e._groups,e._activeKey),e._currentIndex=0,fr(e))}function xt(e){e._groups=[],e._activeKey=null,e._recent=lr(),e._flatHits=e._recent.map(t=>({url:t.url,title:t.title,breadcrumb:t.breadcrumb})),e._currentIndex=0}function pr(e,t){const n=e._flatHits.length;n&&(e._currentIndex=(e._currentIndex+t+n)%n,fr(e))}function q1(e,t){const n=e._groups||[];if(n.length<2)return;const o=n.findIndex(i=>i.key===e._activeKey),r=n[(o+t+n.length)%n.length];r&&ur(e,r.key)}function fr(e){requestAnimationFrame(()=>{const t=e.shadowRoot;if(!t)return;const n=t.querySelector(".TDesign-docsearch-hit.is-active");n&&n.scrollIntoView({block:"nearest"})})}function G1(e,t){e._debounceTimer&&clearTimeout(e._debounceTimer),e._debounceTimer=setTimeout(()=>U1(e,t),N1)}async function U1(e,t){const n=(t||"").trim();if(!n){e._loading=!1,xt(e);return}e._abort&&e._abort.abort(),e._abort=new AbortController,e._loading=!0;try{const o=await L1({query:n,signal:e._abort.signal,appId:e.appId,apiKey:e.apiKey,indexName:e.indexName,urlFilter:e.urlFilter,hitsPerPage:e.hitsPerPage});if(e._abort.signal.aborted)return;e._loading=!1,gr(e,z1(o))}catch(o){if((o==null?void 0:o.name)==="AbortError")return;e._loading=!1,gr(e,[])}}const K1='<svg xmlns="http://www.w3.org/2000/svg" fill="none" view-box="0 0 16 16" width="1em" height="1em" class="t-icon t-icon-search"><path fill="currentColor" d="M9.51 10.22a4.76 4.76 0 11.7-.7l3.54 3.52-.7.71-3.54-3.53zm.77-3.7a3.76 3.76 0 10-7.53 0 3.76 3.76 0 007.53 0z" fill-opacity="0.9"></path></svg>',Y1='<svg xmlns="http://www.w3.org/2000/svg" fill="none" view-box="0 0 16 16" width="1em" height="1em" class="t-icon t-icon-close"><path fill="currentColor" d="M8 8.92L11.08 12l.92-.92L8.92 8 12 4.92 11.08 4 8 7.08 4.92 4 4 4.92 7.08 8 4 11.08l.92.92L8 8.92z" fill-opacity="0.9"></path></svg>';function V1(e,t){return D`
407
+ `.css`${Q1}`}});const O1=":host{display:inline-block;position:relative;font-family:PingFang SC,Microsoft YaHei,sans-serif;color:var(--text-primary, rgba(0, 0, 0, .9));text-align:left}.TDesign-docsearch-trigger{box-sizing:border-box;position:relative;display:inline-flex;align-items:center;gap:8px;width:200px;max-width:100%;height:32px;padding:0 10px 0 32px;background:var(--bg-color-container, #fff);border:1px solid var(--component-stroke, #dcdcdc);border-radius:var(--border-radius, 3px);transition:border-color .2s ease,box-shadow .2s ease}.TDesign-docsearch-trigger:hover{border-color:var(--brand-main-hover, #366ef4)}.TDesign-docsearch-trigger:focus-within{border-color:var(--brand-main, #0052d9);box-shadow:0 0 0 2px var(--brand-main-focus, rgba(0, 82, 217, .2))}.TDesign-docsearch-trigger__icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);display:inline-flex;width:16px;height:16px;color:var(--text-placeholder, rgba(0, 0, 0, .4));pointer-events:none}.TDesign-docsearch-trigger__icon svg{width:100%;height:100%;fill:currentColor}.TDesign-docsearch-trigger__input{flex:1;min-width:0;height:100%;padding:0;border:0;outline:0;background:transparent;font-family:inherit;font-size:14px;line-height:22px;color:var(--text-primary, rgba(0, 0, 0, .9))}.TDesign-docsearch-trigger__input::placeholder{color:var(--text-placeholder, rgba(0, 0, 0, .4))}.TDesign-docsearch-trigger__input::-webkit-search-cancel-button,.TDesign-docsearch-trigger__input::-webkit-search-decoration{-moz-appearance:none;appearance:none;-webkit-appearance:none}.TDesign-docsearch-trigger__suffix{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;flex-shrink:0;pointer-events:none}@media screen and (max-width: 768px){.TDesign-docsearch-trigger{width:100%;min-width:0}}.TDesign-docsearch-popover{position:absolute;top:calc(100% + 6px);left:0;z-index:1000;width:520px;max-width:calc(100vw - 32px);max-height:70vh;display:flex;flex-direction:column;background:var(--bg-color-container, #fff);border:1px solid var(--component-stroke, #dcdcdc);border-radius:6px;box-shadow:var(--shadow-2, 0 4px 16px rgba(0, 0, 0, .08));opacity:0;transform:translateY(-4px);pointer-events:none;transition:opacity .15s ease,transform .15s ease;overflow:hidden;text-align:left}.TDesign-docsearch-popover.is-open{opacity:1;transform:translateY(0);pointer-events:auto}:root[theme-mode=dark] .TDesign-docsearch-popover{border-color:var(--component-stroke, rgba(255, 255, 255, .12));box-shadow:0 4px 16px #00000080}.TDesign-docsearch-spinner{width:14px;height:14px;border:2px solid var(--component-stroke, #dcdcdc);border-top-color:var(--brand-main, #0052d9);border-radius:50%;animation:td-docsearch-spin .8s linear infinite}@keyframes td-docsearch-spin{to{transform:rotate(360deg)}}.TDesign-docsearch-popover__body{flex:1;overflow:hidden;padding:8px}.TDesign-docsearch-cols{display:flex;align-items:stretch;max-height:calc(70vh - 60px)}.TDesign-docsearch-cols__left,.TDesign-docsearch-cols__right{overflow-y:auto;max-height:calc(70vh - 60px);scrollbar-width:thin;scrollbar-color:var(--text-placeholder, rgba(0, 0, 0, .25)) transparent}.TDesign-docsearch-cols__left::-webkit-scrollbar,.TDesign-docsearch-cols__right::-webkit-scrollbar{width:6px}.TDesign-docsearch-cols__left::-webkit-scrollbar-track,.TDesign-docsearch-cols__right::-webkit-scrollbar-track{background:transparent}.TDesign-docsearch-cols__left::-webkit-scrollbar-thumb,.TDesign-docsearch-cols__right::-webkit-scrollbar-thumb{background-color:var(--text-placeholder, rgba(0, 0, 0, .2));border-radius:20px}.TDesign-docsearch-cols__left{flex:0 0 36%;max-width:180px;padding:4px 8px 4px 4px}.TDesign-docsearch-cols__right{flex:1;min-width:0;padding:4px 4px 4px 8px}.TDesign-docsearch-cat-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}.TDesign-docsearch-cat{display:flex;align-items:center;justify-content:flex-end;gap:6px;padding:8px 10px;font-size:13px;line-height:20px;color:var(--text-secondary, rgba(0, 0, 0, .6));cursor:pointer;text-align:right;border-radius:var(--border-radius, 3px);transition:background-color .15s ease,color .15s ease}.TDesign-docsearch-cat:hover{color:var(--text-primary, rgba(0, 0, 0, .9));background:var(--bg-color-page, #f3f3f3)}.TDesign-docsearch-cat.is-active{color:var(--text-primary, rgba(0, 0, 0, .9));background:var(--bg-color-page, #f3f3f3);font-weight:500}.TDesign-docsearch-cat__title{flex:1;min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:break-word}.TDesign-docsearch-cat__badge{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 6px;box-sizing:border-box;font-size:11px;line-height:18px;text-align:center;color:var(--text-secondary, rgba(0, 0, 0, .6));background:var(--bg-color-component, rgba(0, 0, 0, .06));border-radius:999px;font-weight:400;transition:background-color .15s ease,color .15s ease}.TDesign-docsearch-cat:hover .TDesign-docsearch-cat__badge,.TDesign-docsearch-cat.is-active .TDesign-docsearch-cat__badge{color:var(--brand-main, #0052d9);background:var(--brand-main-light, rgba(0, 82, 217, .1))}.TDesign-docsearch-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}.TDesign-docsearch-hit{position:relative}.TDesign-docsearch-hit__link{display:block;padding:8px 12px;border-radius:var(--border-radius, 3px);text-decoration:none;color:var(--text-primary, rgba(0, 0, 0, .9));cursor:pointer;transition:background-color .15s ease,color .15s ease}.TDesign-docsearch-hit__link:hover,.TDesign-docsearch-hit.is-active .TDesign-docsearch-hit__link{background:var(--bg-color-page, #f3f3f3)}.TDesign-docsearch-hit__title{display:block;font-size:14px;font-weight:600;line-height:22px;color:var(--text-primary, rgba(0, 0, 0, .9));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.TDesign-docsearch-hit__subtitle{display:block;margin-top:2px;font-size:12px;font-weight:400;line-height:18px;color:var(--text-placeholder, rgba(0, 0, 0, .4));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.TDesign-docsearch-section{padding:4px 4px 4px 8px}.TDesign-docsearch-section__title{padding:6px 12px;font-size:12px;font-weight:500;line-height:20px;color:var(--text-secondary, rgba(0, 0, 0, .6))}.TDesign-docsearch-hit__remove{position:absolute;right:8px;top:50%;translate:0 -50%;width:20px;height:20px;display:grid;place-content:center;box-sizing:border-box;padding:0;margin:0;border:none;background:transparent;font:inherit;cursor:pointer;color:var(--text-placeholder, rgba(0, 0, 0, .3));opacity:0;-moz-appearance:none;appearance:none;-webkit-appearance:none;transition:color .2s ease,opacity .15s ease,transform .15s ease}.TDesign-docsearch-hit:hover .TDesign-docsearch-hit__remove,.TDesign-docsearch-hit.is-active .TDesign-docsearch-hit__remove{opacity:1}.TDesign-docsearch-hit__remove svg{width:14px;height:14px;fill:currentColor}.TDesign-docsearch-hit__remove:hover{color:var(--text-primary, rgba(0, 0, 0, .7))}.TDesign-docsearch-mark{padding:0 2px;margin:0 1px;color:var(--brand-main, #0052d9);background:var(--brand-main-light, rgba(0, 82, 217, .1));border-radius:3px;font-weight:inherit;text-decoration:none}.TDesign-docsearch-empty{padding:24px 16px}.TDesign-docsearch-empty__title{font-size:13px;font-weight:500;line-height:20px;color:var(--text-primary, rgba(0, 0, 0, .9))}.TDesign-docsearch-empty__desc{margin-top:4px;font-size:12px;line-height:20px;color:var(--text-placeholder, rgba(0, 0, 0, .4))}@media (prefers-reduced-motion: reduce){.TDesign-docsearch-popover,.TDesign-docsearch-spinner,.TDesign-docsearch-hit__link{transition:none!important;animation:none!important}}@media screen and (max-width: 768px){.TDesign-docsearch-popover{width:calc(100vw - 16px);left:50%;transform:translate(-50%,-4px)}.TDesign-docsearch-popover.is-open{transform:translate(-50%)}.TDesign-docsearch-cols{flex-direction:column;min-height:0;max-height:60vh}.TDesign-docsearch-cols__left{flex:0 0 auto;width:100%;max-width:none;padding:4px;border-bottom:1px solid var(--component-stroke, #dcdcdc);overflow-x:auto;overflow-y:hidden}.TDesign-docsearch-cat-list{flex-direction:row;gap:4px;flex-wrap:nowrap}.TDesign-docsearch-cat{flex-shrink:0;justify-content:flex-start;text-align:left;padding:6px 10px;border-radius:999px}.TDesign-docsearch-cat__title{flex:0 1 auto}.TDesign-docsearch-cols__right{padding:4px}}";function Le(e){if(e==null)return"";const t=String(e);return t.indexOf("<")===-1&&t.indexOf("&")===-1?t:t.replace(/<[^>]*>/g,"").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'")}const er="ALGOLIA_APP_ID",tr="ALGOLIA_API_KEY",nr="tdesign.tencent.com",or=20;function rr(){try{const e=window.location.pathname.match(/^\/([^/]+)\//);return e?`/${e[1]}/`:"/"}catch{return"/"}}const M1='<mark class="TDesign-docsearch-mark">',I1="</mark>";async function L1({query:e,signal:t,appId:n=er,apiKey:o=tr,indexName:r=nr,urlFilter:i=rr(),hitsPerPage:a=or}={}){const s=(e||"").trim();if(!s)return[];const l=`https://${n}-dsn.algolia.net/1/indexes/${encodeURIComponent(r)}/query`,d={params:new URLSearchParams({query:s,hitsPerPage:String(a),attributesToRetrieve:JSON.stringify(["hierarchy","content","anchor","url","type"]),attributesToSnippet:JSON.stringify(["hierarchy.lvl1:10","hierarchy.lvl2:10","hierarchy.lvl3:10","hierarchy.lvl4:10","hierarchy.lvl5:10","hierarchy.lvl6:10","content:10"]),snippetEllipsisText:"…",highlightPreTag:M1,highlightPostTag:I1}).toString()};try{const c=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json","X-Algolia-Application-Id":n,"X-Algolia-API-Key":o},body:JSON.stringify(d),signal:t});if(!c.ok)throw new Error(`Algolia ${c.status}`);const f=await c.json(),C=Array.isArray(f==null?void 0:f.hits)?f.hits:[];return i?C.filter(b=>((b==null?void 0:b.url)||"").includes(i)):C}catch(c){if(c&&c.name==="AbortError")throw c;return console.warn("[td-doc-search] search failed:",c&&c.message),[]}}function z1(e=[]){var o,r,i;const t=new Map,n=new Map;for(const a of e){const s=(a==null?void 0:a.hierarchy)||{},l=s.lvl1?"lvl1":"lvl0",d=s[l]||"Other";t.has(d)||t.set(d,{key:d,title:d,items:[]});const c=t.get(d);if(a.__formatted=ir(a),c.items.push(a),!n.get(d)){const f=(i=(r=(o=a==null?void 0:a._highlightResult)==null?void 0:o.hierarchy)==null?void 0:r[l])==null?void 0:i.value;f&&f.indexOf("<mark")!==-1?(c.title=f,n.set(d,!0)):f&&c.title===d&&(c.title=f)}}return Array.from(t.values())}function ir(e){var f,C,b,A,v,w;if(!e)return{title:"",subtitle:"",breadcrumb:"",snippet:"",url:""};const t=e.hierarchy||{},n=((f=e._highlightResult)==null?void 0:f.hierarchy)||{},o=((C=e._snippetResult)==null?void 0:C.hierarchy)||{},r=((A=(b=e._snippetResult)==null?void 0:b.content)==null?void 0:A.value)||((w=(v=e._highlightResult)==null?void 0:v.content)==null?void 0:w.value)||e.content||"",i=["lvl0","lvl1","lvl2","lvl3","lvl4","lvl5","lvl6"],a=B=>{var p,g;return((p=n[B])==null?void 0:p.value)||((g=o[B])==null?void 0:g.value)||t[B]||""},s=i.filter(B=>!!t[B]);let l="",d="";if(e.type==="content"&&s.length){const B=s[s.length-1];l=a(B),d=r}else if(s.length>=2){const B=s[s.length-1],p=s[s.length-2];l=a(B),d=a(p)}else s.length===1&&(l=a(s[0]),d="");const c=[];for(const B of i){const p=t[B];if(p){if(p===Le(l))break;c.push(p)}}return{title:l,subtitle:d,breadcrumb:c.join(" › "),snippet:e.type==="content"?r:"",url:e.url||"",type:e.type||"content"}}const ar="td-docsearch:recent",sr=5;function rn(){try{if(typeof localStorage>"u")return[];const e=localStorage.getItem(ar);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function an(e){try{if(typeof localStorage>"u")return;localStorage.setItem(ar,JSON.stringify(e.slice(0,sr)))}catch{}}function lr(){const e=rn();let t=!1;const n=e.map(o=>{const r=Le(o==null?void 0:o.title),i=Le(o==null?void 0:o.breadcrumb);return(r!==(o==null?void 0:o.title)||i!==(o==null?void 0:o.breadcrumb))&&(t=!0),{...o,title:r,breadcrumb:i}});return t&&an(n),n}function R1(e){if(!e||!e.url)return;const t=rn(),n={query:Le(e.query),url:e.url,title:Le(e.title),breadcrumb:Le(e.breadcrumb),ts:Date.now()},o=[n,...t.filter(r=>r.url!==n.url)].slice(0,sr);return an(o),o}function j1(e){const n=rn().filter(o=>o.url!==e);return an(n),n}function X1(e){if(!e)return!1;const t=(e.tagName||"").toLowerCase();return!!(t==="input"||t==="textarea"||t==="select"||e.isContentEditable)}function F1({onOpen:e,onClose:t}){if(typeof window>"u")return()=>{};const n=o=>{if((o.metaKey||o.ctrlKey)&&(o.key==="k"||o.key==="K")){o.preventDefault(),e&&e();return}if(o.key==="/"&&!X1(document.activeElement)){o.preventDefault(),e&&e();return}o.key==="Escape"&&t&&t()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)}const N1=150,ie={INITIAL:"initial",RECENT:"recent",LOADING_RESULTS:"loading_results",LOADING_PLACEHOLDER:"loading_placeholder",RESULTS:"results",EMPTY:"empty"};function cr(e,t){return String(e).replace(/\{(\w+)\}/g,(n,o)=>t&&o in t?String(t[o]):"")}function dr(e,t){const n=t?e.filter(r=>r.key===t):e,o=[];for(const r of n)for(const i of r.items){const a=i.__formatted||ir(i);o.push({url:a.url,title:a.title,subtitle:a.subtitle,breadcrumb:a.breadcrumb})}return o}function S1({query:e,loading:t,groups:n,recent:o}){return t&&e?n&&n.length?ie.LOADING_RESULTS:ie.LOADING_PLACEHOLDER:e?n&&n.length?ie.RESULTS:ie.EMPTY:o&&o.length?ie.RECENT:ie.INITIAL}function gr(e,t){var n;e._groups=t||[],(!e._activeKey||!e._groups.some(o=>o.key===e._activeKey))&&(e._activeKey=((n=e._groups[0])==null?void 0:n.key)||null),e._flatHits=dr(e._groups,e._activeKey),e._currentIndex=0}function ur(e,t){!t||t===e._activeKey||(e._activeKey=t,e._flatHits=dr(e._groups,e._activeKey),e._currentIndex=0,fr(e))}function xt(e){e._groups=[],e._activeKey=null;const t=lr(),n=e.urlFilter,o=n?t.filter(r=>r.url&&r.url.includes(n)):t;e._recent=o,e._flatHits=o.map(r=>({url:r.url,title:r.title,breadcrumb:r.breadcrumb})),e._currentIndex=0}function pr(e,t){const n=e._flatHits.length;n&&(e._currentIndex=(e._currentIndex+t+n)%n,fr(e))}function q1(e,t){const n=e._groups||[];if(n.length<2)return;const o=n.findIndex(i=>i.key===e._activeKey),r=n[(o+t+n.length)%n.length];r&&ur(e,r.key)}function fr(e){requestAnimationFrame(()=>{const t=e.shadowRoot;if(!t)return;const n=t.querySelector(".TDesign-docsearch-hit.is-active");n&&n.scrollIntoView({block:"nearest"})})}function G1(e,t){e._debounceTimer&&clearTimeout(e._debounceTimer),e._debounceTimer=setTimeout(()=>U1(e,t),N1)}async function U1(e,t){const n=(t||"").trim();if(!n){e._loading=!1,xt(e);return}e._abort&&e._abort.abort(),e._abort=new AbortController,e._loading=!0;try{const o=await L1({query:n,signal:e._abort.signal,appId:e.appId,apiKey:e.apiKey,indexName:e.indexName,urlFilter:e.urlFilter,hitsPerPage:e.hitsPerPage});if(e._abort.signal.aborted)return;e._loading=!1,gr(e,z1(o))}catch(o){if((o==null?void 0:o.name)==="AbortError")return;e._loading=!1,gr(e,[])}}const K1='<svg xmlns="http://www.w3.org/2000/svg" fill="none" view-box="0 0 16 16" width="1em" height="1em" class="t-icon t-icon-search"><path fill="currentColor" d="M9.51 10.22a4.76 4.76 0 11.7-.7l3.54 3.52-.7.71-3.54-3.53zm.77-3.7a3.76 3.76 0 10-7.53 0 3.76 3.76 0 007.53 0z" fill-opacity="0.9"></path></svg>',Y1='<svg xmlns="http://www.w3.org/2000/svg" fill="none" view-box="0 0 16 16" width="1em" height="1em" class="t-icon t-icon-close"><path fill="currentColor" d="M8 8.92L11.08 12l.92-.92L8.92 8 12 4.92 11.08 4 8 7.08 4.92 4 4 4.92 7.08 8 4 11.08l.92.92L8 8.92z" fill-opacity="0.9"></path></svg>';function V1(e,t){return D`
408
408
  <div class="TDesign-docsearch-trigger">
409
409
  <span class="TDesign-docsearch-trigger__icon" innerHTML=${K1}></span>
410
410
  <input
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tdesign/site-components",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "license": "MIT",
5
5
  "main": "lib/site.es.js",
6
6
  "type": "module",