@moubing/bing-ui 0.8.2 → 0.9.0

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.
@@ -1,6 +1,6 @@
1
1
  (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue"),require("gsap")):typeof define==`function`&&define.amd?define([`exports`,`vue`,`gsap`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.BingUI={},e.Vue,e.gsap))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),u=(e,t)=>{let n={};for(var r in e)i(n,r,{get:e[r],enumerable:!0});return t||i(n,Symbol.toStringTag,{value:`Module`}),n},d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:r(s(e)),d(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)),p,m,h=typeof Symbol==`function`?Symbol():`_split`,g,_=()=>g||I.register(window.gsap),v=typeof Intl<`u`&&`Segmenter`in Intl?new Intl.Segmenter:0,y=e=>e?typeof e==`string`?y(document.querySelectorAll(e)):`length`in e?Array.from(e).reduce((e,t)=>(typeof t==`string`?e.push(...y(t)):e.push(t),e),[]):[e]:[],b=e=>y(e).filter(e=>e&&e.nodeType===1),x=[],S=function(){},C={add:e=>e()},w=/\s+/g,T=RegExp(`\\p{RI}\\p{RI}|\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(\\u{200D}\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*|.`,`gu`),E={left:0,top:0,width:0,height:0},D=(e,t)=>{for(;++t<e.length&&e[t]===E;);return e[t]||E},O=({element:e,html:t,ariaL:n,ariaH:r})=>{e.innerHTML=t,n?e.setAttribute(`aria-label`,n):e.removeAttribute(`aria-label`),r?e.setAttribute(`aria-hidden`,r):e.removeAttribute(`aria-hidden`)},k=(e,t)=>{if(t){let n=new Set(e.join(``).match(t)||x),r=e.length,i,a,o,s;if(n.size)for(;--r>-1;){a=e[r];for(o of n)if(o.startsWith(a)&&o.length>a.length){for(i=0,s=a;o.startsWith(s+=e[r+ ++i])&&s.length<o.length;);if(i&&s.length===o.length){e[r]=o,e.splice(r+1,i);break}}}}return e},A=e=>window.getComputedStyle(e).display===`inline`&&(e.style.display=`inline-block`),j=(e,t,n)=>t.insertBefore(typeof e==`string`?document.createTextNode(e):e,n),M=(e,t,n)=>{let r=t[e+`sClass`]||``,{tag:i=`div`,aria:a=`auto`,propIndex:o=!1}=t,s=e===`line`?`block`:`inline-block`,c=r.indexOf(`++`)>-1,l=t=>{let l=document.createElement(i),u=n.length+1;return r&&(l.className=r+(c?` `+r+u:``)),o&&l.style.setProperty(`--`+e,u+``),a!==`none`&&l.setAttribute(`aria-hidden`,`true`),i!==`span`&&(l.style.position=`relative`,l.style.display=s),l.textContent=t,n.push(l),l};return c&&(r=r.replace(`++`,``)),l.collection=n,l},N=(e,t,n,r)=>{let i=M(`line`,n,r),a=window.getComputedStyle(e).textAlign||`left`;return(n,r)=>{let o=i(``);for(o.style.textAlign=a,e.insertBefore(o,t[n]);n<r;n++)o.appendChild(t[n]);o.normalize()}},P=(e,t,n,r,i,a,o,s,c,l)=>{var u;let d=Array.from(e.childNodes),f=0,{wordDelimiter:p,reduceWhiteSpace:m=!0,prepareText:h}=t,g=e.getBoundingClientRect(),_=g,y=!m&&window.getComputedStyle(e).whiteSpace.substring(0,3)===`pre`,b=0,S=n.collection,C,T,E,D,O,M,N,F,I,L,R,z,B,V,H,U,ee,W;for(typeof p==`object`?(E=p.delimiter||p,T=p.replaceWith||``):T=p===``?``:p||` `,C=T!==` `;f<d.length;f++)if(D=d[f],D.nodeType===3){for(H=D.textContent||``,m?H=H.replace(w,` `):y&&(H=H.replace(/\n/g,T+`
2
2
  `)),h&&(H=h(H,e)),D.textContent=H,O=T||E?H.split(E||T):H.match(s)||x,ee=O[O.length-1],F=C?ee.slice(-1)===` `:!ee,ee||O.pop(),_=g,N=C?O[0].charAt(0)===` `:!O[0],N&&j(` `,e,D),O[0]||O.shift(),k(O,c),a&&l||(D.textContent=``),I=1;I<=O.length;I++)if(U=O[I-1],!m&&y&&U.charAt(0)===`
3
- `&&((u=D.previousSibling)==null||u.remove(),j(document.createElement(`br`),e,D),U=U.slice(1)),!m&&U===``)j(T,e,D);else if(U===` `)e.insertBefore(document.createTextNode(` `),D);else{if(C&&U.charAt(0)===` `&&j(` `,e,D),b&&I===1&&!N&&S.indexOf(b.parentNode)>-1?(M=S[S.length-1],M.appendChild(document.createTextNode(r?``:U))):(M=n(r?``:U),j(M,e,D),b&&I===1&&!N&&M.insertBefore(b,M.firstChild)),r)for(R=v?k([...v.segment(U)].map(e=>e.segment),c):U.match(s)||x,W=0;W<R.length;W++)M.appendChild(R[W]===` `?document.createTextNode(` `):r(R[W]));if(a&&l){if(H=D.textContent=H.substring(U.length+1,H.length),L=M.getBoundingClientRect(),L.top>_.top&&L.left<=_.left){for(z=e.cloneNode(),B=e.childNodes[0];B&&B!==M;)V=B,B=B.nextSibling,z.appendChild(V);e.parentNode.insertBefore(z,e),i&&A(z)}_=L}(I<O.length||F)&&j(I>=O.length?` `:C&&U.slice(-1)===` `?` `+T:T,e,D)}e.removeChild(D),b=0}else D.nodeType===1&&(o&&o.indexOf(D)>-1?(S.indexOf(D.previousSibling)>-1&&S[S.length-1].appendChild(D),b=D):(P(D,t,n,r,i,a,o,s,c,!0),b=0),i&&A(D))},F=class e{constructor(e,t){this.isSplit=!1,_(),this.elements=b(e),this.chars=[],this.words=[],this.lines=[],this.masks=[],this.vars=t,this.elements.forEach(e=>{var n;t.overwrite!==!1&&((n=e[h])==null||n._data.orig.filter(({element:t})=>t===e).forEach(O)),e[h]=this}),this._split=()=>this.isSplit&&this.split(this.vars);let n=[],r,i=()=>{let e=n.length,t;for(;e--;){t=n[e];let r=t.element.offsetWidth;if(r!==t.width){t.width=r,this._split();return}}};this._data={orig:n,obs:typeof ResizeObserver<`u`&&new ResizeObserver(()=>{clearTimeout(r),r=setTimeout(i,200)})},S(this),this.split(t)}split(e){return(this._ctx||C).add(()=>{this.isSplit&&this.revert(),this.vars=e=e||this.vars||{};let{type:t=`chars,words,lines`,aria:n=`auto`,deepSlice:r=!0,smartWrap:i,onSplit:a,autoSplit:o=!1,specialChars:s,mask:c}=this.vars,l=t.indexOf(`lines`)>-1,u=t.indexOf(`chars`)>-1,d=t.indexOf(`words`)>-1,f=u&&!d&&!l,p=s&&(`push`in s?RegExp(`(?:`+s.join(`|`)+`)`,`gu`):s),h=p?RegExp(p.source+`|`+T.source,`gu`):T,g=!!e.ignore&&b(e.ignore),{orig:_,animTime:v,obs:x}=this._data,S;(u||d||l)&&(this.elements.forEach((t,a)=>{_[a]={element:t,html:t.innerHTML,ariaL:t.getAttribute(`aria-label`),ariaH:t.getAttribute(`aria-hidden`)},n===`auto`?t.setAttribute(`aria-label`,(t.textContent||``).trim()):n===`hidden`&&t.setAttribute(`aria-hidden`,`true`);let o=[],s=[],c=[],m=u?M(`char`,e,o):null,v=M(`word`,e,s),b,x,S,C;if(P(t,e,v,m,f,r&&(l||f),g,h,p,!1),l){let n=y(t.childNodes),r=N(t,n,e,c),i,a=[],o=0,s=n.map(e=>e.nodeType===1?e.getBoundingClientRect():E),l=E,u;for(b=0;b<n.length;b++)i=n[b],i.nodeType===1&&(i.nodeName===`BR`?((!b||n[b-1].nodeName!==`BR`)&&(a.push(i),r(o,b+1)),o=b+1,l=D(s,b)):(u=s[b],b&&u.top>l.top&&u.left<l.left+l.width-1&&(r(o,b),o=b),l=u));o<b&&r(o,b),a.forEach(e=>e.parentNode?.removeChild(e))}if(!d){for(b=0;b<s.length;b++)if(x=s[b],u||!x.nextSibling||x.nextSibling.nodeType!==3)if(i&&!l){for(S=document.createElement(`span`),S.style.whiteSpace=`nowrap`;x.firstChild;)S.appendChild(x.firstChild);x.replaceWith(S)}else x.replaceWith(...x.childNodes);else C=x.nextSibling,C&&C.nodeType===3&&(C.textContent=(x.textContent||``)+(C.textContent||``),x.remove());s.length=0,t.normalize()}this.lines.push(...c),this.words.push(...s),this.chars.push(...o)}),c&&this[c]&&this.masks.push(...this[c].map(e=>{let t=e.cloneNode();return e.replaceWith(t),t.appendChild(e),e.className&&(t.className=e.className.trim().split(` `).map(e=>e+`-mask`).join(` `)),t.style.overflow=`clip`,t}))),this.isSplit=!0,m&&l&&o&&m.addEventListener(`loadingdone`,this._split),(S=a&&a(this))&&S.totalTime&&(this._data.anim=v?S.totalTime(v):S),l&&o&&this.elements.forEach((e,t)=>{_[t].width=e.offsetWidth,x&&x.observe(e)})}),this}kill(){let{obs:e}=this._data;e&&e.disconnect(),m?.removeEventListener(`loadingdone`,this._split)}revert(){var e,t;if(this.isSplit){let{orig:n,anim:r}=this._data;this.kill(),n.forEach(O),this.chars.length=this.words.length=this.lines.length=n.length=this.masks.length=0,this.isSplit=!1,r&&(this._data.animTime=r.totalTime(),r.revert()),(t=(e=this.vars).onRevert)==null||t.call(e,this)}return this}static create(t,n){return new e(t,n)}static register(e){p=p||e||window.gsap,p&&(y=p.utils.toArray,S=p.core.context||S),!g&&window.innerWidth>0&&(m=document.fonts,g=!0)}};F.version=`3.15.0`;var I=F,L=(0,t.defineComponent)({__name:`BingAnimatedText`,props:{effect:{default:`none`},trigger:{default:`always`},disabled:{type:Boolean,default:!1},shineColor:{default:void 0},shineBaseColor:{default:void 0},shineSpeed:{default:3},shineDelay:{default:0},shineInterval:{default:1.6},shineDirection:{default:`left`},shineAngle:{default:120},jumpY:{default:-6},jumpStagger:{default:.035},jumpDuration:{default:.34},jumpEase:{default:`power2.out`},jumpReturnEase:{default:`back.out(2.4)`},jumpRepeatDelay:{default:1.2}},setup(e){let r=!1,i=e,a=(0,t.ref)(null),o=(0,t.ref)(null),s=(0,t.ref)(null),c,l,u,d,f,p=!1,m=!1,h=!1,g=``,_,v=(0,t.computed)(()=>i.effect!==`none`&&!i.disabled),y=(0,t.computed)(()=>v.value&&i.effect===`shine`),b=(0,t.computed)(()=>v.value&&i.effect===`jump`),x=(0,t.computed)(()=>[`bing-animated-text`,`bing-animated-text--${i.effect}`,{"is-disabled":i.disabled,"is-shine-active":y.value,[`bing-animated-text--shine-${i.trigger}`]:y.value,[`bing-animated-text--shine-direction-${i.shineDirection}`]:y.value,[`bing-animated-text--jump-${i.trigger}`]:b.value}]),S=(0,t.computed)(()=>{let e={};return b.value&&(e[`--animated-text-jump-room`]=`${Math.max(2,Math.abs(Math.min(0,i.jumpY))+2)}px`),y.value?(e[`--animated-text-shine-angle`]=`${i.shineAngle}deg`,i.shineColor&&(e[`--animated-text-shine-color`]=i.shineColor),i.shineBaseColor&&(e[`--animated-text-shine-base-color`]=i.shineBaseColor),e):e});function C(){return typeof window<`u`&&typeof document<`u`}function w(){return C()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function T(){r||=(n.gsap.registerPlugin(I),!0)}function E(){p=!1,a.value?.removeAttribute(`data-jump-playing`),a.value?.removeAttribute(`data-jump-ready`),u?.kill(),u=void 0,c?.revert(),c=void 0,l?.revert(),l=void 0,s.value?.replaceChildren()}function D(){return i.shineDirection===`left`?{start:`150% 0`,end:`-150% 0`}:{start:`-150% 0`,end:`150% 0`}}function O(){m=!1,a.value?.removeAttribute(`data-shine-playing`),d?.kill(),d=void 0,f?.kill(),f=void 0,o.value&&n.gsap.set(o.value,{clearProps:`backgroundPosition`})}function k(){i.trigger!==`always`||!y.value||w()||(f?.kill(),f=n.gsap.delayedCall(Math.max(0,i.shineInterval),()=>{f=void 0,A(0)}))}function A(e=i.shineDelay){let t=o.value;if(m||f||!t||!y.value||w())return;let r=D();m=!0,a.value?.setAttribute(`data-shine-playing`,`true`),n.gsap.set(t,{backgroundPosition:r.start}),d=n.gsap.to(t,{backgroundPosition:r.end,duration:Math.max(.1,i.shineSpeed),delay:Math.max(0,e),ease:`none`,overwrite:!0,onComplete:()=>{n.gsap.set(t,{backgroundPosition:r.start}),m=!1,d=void 0,a.value?.removeAttribute(`data-shine-playing`),k()}})}function j(){O(),!(!y.value||!o.value||w())&&(n.gsap.set(o.value,{backgroundPosition:D().start}),(i.trigger===`always`||i.trigger===`once`)&&A())}function M(){if(p||!c?.chars.length||!b.value||w())return;let e=Math.max(.1,i.jumpDuration),t=i.trigger===`always`;p=!0,a.value?.setAttribute(`data-jump-playing`,`true`),u=n.gsap.timeline({repeat:t?-1:0,repeatDelay:Math.max(0,i.jumpRepeatDelay),onComplete:()=>{p=!1,u=void 0,a.value?.removeAttribute(`data-jump-playing`)}}),u.fromTo(c.chars,{y:0},{keyframes:[{y:i.jumpY,duration:e*.45,ease:i.jumpEase},{y:0,duration:e*.55,ease:i.jumpReturnEase}],stagger:Math.max(0,i.jumpStagger),overwrite:!0})}function N(){E();let e=o.value,t=s.value,r=a.value;g=e?.innerHTML??``,!(!b.value||!e||!t||!r||w())&&(T(),t.innerHTML=g,t.querySelectorAll(`[id]`).forEach(e=>e.removeAttribute(`id`)),l=n.gsap.context(()=>{c=I.create(t,{type:`words, chars`,tag:`span`,aria:`hidden`,wordsClass:`bing-animated-text__word`,charsClass:`bing-animated-text__char`}),c.words.forEach(e=>{/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}]/u.test(e.textContent??``)&&e.classList.add(`bing-animated-text__word--breakable`)}),n.gsap.set(c.chars,{display:`inline-block`,transformOrigin:`50% 100%`,willChange:`transform`}),r.setAttribute(`data-jump-ready`,`true`),(i.trigger===`always`||i.trigger===`once`)&&M()},r))}function P(){!C()||h||(h=!0,(0,t.nextTick)(()=>{h=!1,a.value&&N()}))}function F(){C()&&(0,t.nextTick)(()=>{j()})}function L(){i.trigger===`hover`&&(y.value&&A(),b.value&&M())}(0,t.watch)(()=>[i.effect,i.trigger,i.disabled,i.shineSpeed,i.shineDelay,i.shineInterval,i.shineDirection,i.shineAngle,i.shineColor,i.shineBaseColor],F,{flush:`post`}),(0,t.watch)(()=>[i.effect,i.trigger,i.disabled,i.jumpY,i.jumpStagger,i.jumpDuration,i.jumpEase,i.jumpReturnEase,i.jumpRepeatDelay],P,{flush:`post`}),(0,t.onMounted)(()=>{_=window.matchMedia?.(`(prefers-reduced-motion: reduce)`),_?.addEventListener(`change`,R),F(),P()}),(0,t.onUpdated)(()=>{o.value?.innerHTML!==g&&P()}),(0,t.onUnmounted)(()=>{_?.removeEventListener(`change`,R),O(),E()});function R(){F(),P()}return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{ref_key:`rootRef`,ref:a,class:(0,t.normalizeClass)(x.value),style:(0,t.normalizeStyle)(S.value),onMouseenter:L},[(0,t.createElementVNode)(`span`,{ref_key:`contentRef`,ref:o,class:`bing-animated-text__content`},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],512),(0,t.createElementVNode)(`span`,{ref_key:`jumpContentRef`,ref:s,class:`bing-animated-text__jump-layer`,"aria-hidden":`true`,inert:``},null,512)],38))}}),R=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},z=R(L,[[`__scopeId`,`data-v-f9925891`]]);function B(e,t){return e===`top`?{x:0,y:t}:e===`bottom`?{x:0,y:-t}:e===`left`?{x:t,y:0}:{x:-t,y:0}}function V(e,t){return e===`left`||e===`right`?{scaleX:t}:{scaleY:t}}function H(e,t){let n=t===`middle`?`50%`:t===`end`?`100%`:`0%`;return e===`top`?`${n} 100%`:e===`bottom`?`${n} 0%`:e===`left`?`100% ${n}`:`0% ${n}`}function U(e,t){return t.getBoundingClientRect().left<e.getBoundingClientRect().left?8:-8}function ee({panel:e,items:t,actionRail:r,actionButtons:i,placement:a,align:o,scale:s=!0,onComplete:c}){let l=a===`left`||a===`right`?6:-6,u=s?{}:{force3D:!1},d=n.gsap.timeline({defaults:{duration:.22,ease:`power3.out`,overwrite:!0},onComplete:c});if(d.fromTo(e,{autoAlpha:0,...B(a,8),...V(a,s?.96:1),...u,transformOrigin:H(a,o)},{autoAlpha:1,x:0,y:0,...V(a,1),duration:.24,ease:`power3.out`},0),t.length&&d.fromTo(t,{autoAlpha:0,...B(a,l),scale:s?.98:1,...u},{autoAlpha:1,x:0,y:0,scale:1,duration:.22,stagger:.022},.06),r){let t=U(e,r);n.gsap.set(r,{autoAlpha:1}),d.fromTo(i,{autoAlpha:0,x:t,scale:.72,transformOrigin:`50% 50%`},{autoAlpha:1,x:0,scale:1,duration:.26,ease:`back.out(1.8)`,stagger:.055},.08)}return d}function W({panel:e,items:t,actionRail:r,actionButtons:i,placement:a,scale:o=!0,onComplete:s}){let c=n.gsap.timeline({defaults:{duration:.16,ease:`power2.in`,overwrite:!0},onComplete:s});return t.length&&c.to(t,{autoAlpha:0,...B(a,4),duration:.1,stagger:{each:.01,from:`end`}},0),c.to(e,{autoAlpha:0,...B(a,6),...V(a,o?.97:1),duration:.16},0),r&&(c.to(i,{autoAlpha:0,x:U(e,r),scale:.72,duration:.14,ease:`power2.in`,stagger:{each:.045,from:`end`}},0),c.set(r,{autoAlpha:0},`>`)),c}function G(e){let t=window.devicePixelRatio||1;return Math.round(e*t)/t}function te(e){if(!e||(Number(n.gsap.getProperty(e,`autoAlpha`))||0)<=.01)return;let t=e.getBoundingClientRect();if(!(t.width<=0||t.height<=0))return{height:t.height,left:t.left,top:t.top,width:t.width}}function ne({panel:e,content:t,getTarget:r,animateContent:i=!1,previousSnapshot:a,reducedMotion:o=!1,onComplete:s}){if(!e)return;let c=!!e.style.height;c&&!a&&(a=te(e)),(a||c)&&(n.gsap.killTweensOf(e),n.gsap.set(e,{clearProps:`width,height,overflow`}));let l=r();if(!l)return;let u=Number(n.gsap.getProperty(e,`autoAlpha`))||0,d=u>.01||!!a,f=e.getBoundingClientRect(),p=a??f,m={height:f.height,width:f.width},h=!!a&&d&&(i||c)&&m.width>0&&m.height>0&&(Math.abs((a?.width??0)-m.width)>.5||Math.abs((a?.height??0)-m.height)>.5),g=d?G(p.left-l.x):l.placement===`right`?-8:8,_=d?G(p.top-l.y):0,v=h?.32:d?.26:.22,y=h?`power2.out`:d?`power3.out`:`back.out(1.5)`;return n.gsap.killTweensOf(e),e.style.left=`${l.x}px`,e.style.top=`${l.y}px`,o?(n.gsap.set(e,{autoAlpha:1,clearProps:`transform,width,height,overflow`,willChange:`auto`}),t&&(n.gsap.killTweensOf(t),n.gsap.set(t,{clearProps:`transform,opacity,visibility`})),s?.(),l):(n.gsap.set(e,{autoAlpha:d?u:0,scale:d?1:.96,x:g,y:_,...h&&a?{height:a.height,overflow:`hidden`,width:a.width}:{},willChange:h?`opacity, transform, width, height`:`opacity, transform`}),n.gsap.to(e,{autoAlpha:1,scale:1,x:0,y:0,...h?{height:m.height,width:m.width}:{},duration:v,ease:y,overwrite:!0,onComplete:()=>{n.gsap.set(e,{clearProps:`transform,width,height,overflow`,willChange:`auto`}),s?.()}}),i&&t&&(n.gsap.killTweensOf(t),n.gsap.fromTo(t,{autoAlpha:.72,y:3},{autoAlpha:1,y:0,duration:.18,ease:`power2.out`,overwrite:!0,clearProps:`transform,opacity,visibility`})),l)}var re=`transform,opacity,visibility,willChange`;function ie(e){return n.gsap.killTweensOf(e),e.style.willChange=`transform, opacity`,n.gsap.fromTo(e,{autoAlpha:0,scale:.08},{autoAlpha:1,scale:1,duration:.38,ease:`expo.out`,overwrite:!0})}function ae(e){return n.gsap.to(e,{autoAlpha:0,scale:1.04,duration:.2,ease:`power2.out`,overwrite:!0,clearProps:re})}function K(e){n.gsap.killTweensOf(e),n.gsap.set(e,{clearProps:re})}function oe(e,t,n){let r=e.getBoundingClientRect();if(!r.width||!r.height)return;let i=Math.max(0,Math.min(e.clientWidth,(n.clientX-r.left)*e.offsetWidth/r.width-e.clientLeft)),a=Math.max(0,Math.min(e.clientHeight,(n.clientY-r.top)*e.offsetHeight/r.height-e.clientTop));t.style.setProperty(`--bing-liquid-x`,`${i}px`),t.style.setProperty(`--bing-liquid-y`,`${a}px`),t.style.transformOrigin=`${i}px ${a}px`}var se=12,ce=3;function le(){let e=new Set;function t(){for(let t of e)t()}function r(t,r){let i=t.ownerDocument,a=i.defaultView;if(!a||!t.isConnected)return;let o=a.matchMedia?.(`(prefers-reduced-motion: reduce)`);if(o?.matches)return;let s=t.getBoundingClientRect();if(!s.width||!s.height)return;let c=a.getComputedStyle(t),l=c.getPropertyValue(`--bing-click-particle-color`).trim(),u=!l||l.toLowerCase()===`currentcolor`?c.color:l,d=r,f=Number.isFinite(d.clientX)&&(d.detail>0||!!d.pointerType),p=f?Math.max(s.left,Math.min(s.right,d.clientX)):s.left+s.width/2,m=f?Math.max(s.top,Math.min(s.bottom,d.clientY)):s.top+s.height/2;e.size>=ce&&e.values().next().value?.();let h=i.createElement(`span`);h.className=`bing-click-particles`,h.setAttribute(`aria-hidden`,`true`),h.inert=!0,h.style.color=u;let g=Array.from({length:se},(e,t)=>{let n=i.createElement(`span`);return n.className=`bing-click-particles__shard`,n.style.left=`${p}px`,n.style.top=`${m}px`,n.style.width=`${3+t%3}px`,n.style.height=`${t%3==0?6:3}px`,h.append(n),n});i.body.append(h);let _,v=()=>{_?.kill(),h.remove(),e.delete(v),i.removeEventListener(`scroll`,v,!0),a.removeEventListener(`resize`,v),a.removeEventListener(`pagehide`,v),i.removeEventListener(`visibilitychange`,v),o?.removeEventListener(`change`,v)};e.add(v),i.addEventListener(`scroll`,v,{capture:!0,passive:!0}),a.addEventListener(`resize`,v,{passive:!0}),a.addEventListener(`pagehide`,v),i.addEventListener(`visibilitychange`,v),o?.addEventListener(`change`,v);let y=g.map((e,t)=>{let n=(t+(Math.random()-.5)*.45)/se*Math.PI*2,r=28+Math.random()*30;return{x:Math.cos(n)*r,y:Math.sin(n)*r,rotation:(Math.random()-.5)*240}});n.gsap.set(g,{xPercent:-50,yPercent:-50,rotation:e=>e*37,autoAlpha:.95}),_=n.gsap.timeline({defaults:{ease:`power3.out`},onComplete:v}).to(g,{x:e=>y[e].x,y:e=>y[e].y,rotation:e=>y[e].rotation,duration:.54},0).to(g,{autoAlpha:0,scale:.35,duration:.3,ease:`power2.in`},.2)}return{play:r,clear:t}}var ue=new WeakMap,q=new WeakSet;function de(){let e=(0,t.getCurrentInstance)().appContext.app,n=ue.get(e);if(!n){n=new Map,ue.set(e,n);let t=n;e.onUnmount(()=>{for(let e of t.values())e.clear();t.clear(),ue.delete(e)})}function r(e,t=e.currentTarget){if(!t?.isConnected||q.has(e)||t.matches(`:disabled, [aria-disabled="true"]`)||t.closest(`[inert]`)||e.target instanceof Element&&e.target.closest(`.bing-checkbox:not(.is-decorative), .bing-radio`)&&!t.matches(`.bing-checkbox__control, .bing-radio__control`))return;q.add(e);let r=t.ownerDocument,i=n.get(r);i||(i=le(),n.set(r,i)),i.play(t,e)}let i=new WeakMap;return{playClickFeedback:r,vClickFeedback:{mounted(e,t){let n={enabled:t.value!==!1,click(t){n.enabled&&!t.defaultPrevented&&t.button===0&&r(t,e)}};i.set(e,n),e.addEventListener(`click`,n.click)},updated(e,t){let n=i.get(e);n&&(n.enabled=t.value!==!1)},beforeUnmount(e){let t=i.get(e);t&&e.removeEventListener(`click`,t.click),i.delete(e)}}}}var fe=Symbol(`BingFormContext`),pe=Symbol(`BingFormItemContext`);function me(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,[...t]]))}function he(e,n={}){let r=(0,t.inject)(pe,null),i=(0,t.inject)(fe,null),a=`bing-control-${(0,t.useId)()}`,o=n.register===!1?void 0:r?.nextControlId?.(a)??r?.controlId.value,s=(0,t.computed)(()=>e.id??o??a),c=(0,t.computed)(()=>e.size??r?.size.value??i?.size.value??`md`),l=(0,t.computed)(()=>e.disabled??r?.disabled.value??i?.disabled.value??!1),u=(0,t.computed)(()=>e.status??r?.status.value??`default`),d=(0,t.computed)(()=>[...new Set([e.ariaDescribedby,r?.ariaDescribedby.value].filter(Boolean))].join(` `)||void 0),f=(0,t.computed)(()=>n.group?r?.labelId?.value:void 0);return n.register!==!1&&r?.registerControl&&(0,t.onBeforeUnmount)(r.registerControl({id:s,group:n.group??!1})),{formItem:r,resolvedId:s,resolvedSize:c,resolvedDisabled:l,resolvedStatus:u,resolvedAriaDescribedby:d,resolvedAriaLabelledby:f}}function ge(){(0,t.provide)(pe,null),(0,t.provide)(fe,null)}var _e=[`type`,`disabled`,`aria-busy`,`aria-label`],ve={class:`bing-button__content`},ye={key:0,class:`bing-button__loading-indicator`,"aria-hidden":`true`},be={class:`bing-button__resting-content`},xe={key:0,class:`bing-button__icon bing-button__icon--prefix`},Se={key:1,class:`bing-button__label`},Ce={key:2,class:`bing-button__icon bing-button__icon--suffix`},J=R((0,t.defineComponent)({__name:`BingButton`,props:{variant:{default:`primary`},size:{default:void 0},rounded:{default:`md`},htmlType:{default:`button`},disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1},throttle:{type:Boolean,default:!1},throttleDelay:{default:600},textEffect:{},textEffectTrigger:{},textShine:{},shineColor:{default:void 0},shineBaseColor:{default:void 0},shineSpeed:{default:3},shineDelay:{default:0},shineInterval:{default:1.6},shineDirection:{default:`left`},shineAngle:{default:120},textJumpY:{default:-6},textJumpStagger:{default:.035},textJumpDuration:{default:.34},textJumpEase:{default:`power2.out`},textJumpReturnEase:{default:`back.out(2.4)`},textJumpRepeatDelay:{default:1.2},ariaLabel:{default:void 0}},emits:[`click`,`throttled`,`focus`,`blur`],setup(e,{emit:n}){let r=e,i=n,{resolvedSize:a,resolvedDisabled:o}=he(r,{register:!1}),s=(0,t.useSlots)(),c=(0,t.ref)(0),l=(0,t.ref)(null),u=!1,{playClickFeedback:d}=de(),f=(0,t.computed)(()=>o.value||r.loading),p=(0,t.computed)(()=>Math.max(0,r.throttleDelay)),m=(0,t.computed)(()=>!!s.default),h=(0,t.computed)(()=>!!s.prefix),g=(0,t.computed)(()=>!!s.suffix),_=(0,t.computed)(()=>r.textShine??(r.variant===`primary`?`always`:`none`)),v=(0,t.computed)(()=>r.loading&&m.value?`jump`:r.textEffect?r.textEffect:_.value===`none`?`none`:`shine`),y=(0,t.computed)(()=>r.loading&&m.value?`always`:r.textEffectTrigger?r.textEffectTrigger:v.value===`jump`||_.value===`hover`?`hover`:`always`),b=(0,t.computed)(()=>v.value===`shine`),x=(0,t.computed)(()=>v.value!==`none`),S=(0,t.computed)(()=>[`bing-button`,`bing-button--${r.variant}`,`bing-button--${a.value}`,`bing-button--rounded-${r.rounded}`,{"is-block":r.block,"is-disabled":o.value,"is-loading":r.loading,"is-icon-only":!m.value&&(h.value||g.value),[`bing-button--text-${v.value}`]:x.value,[`bing-button--text-trigger-${y.value}`]:x.value,[`bing-button--shine-${y.value}`]:b.value,[`bing-button--shine-direction-${r.shineDirection}`]:b.value}]),C=(0,t.computed)(()=>{let e={};return b.value?(e[`--animated-text-shine-angle`]=`${r.shineAngle}deg`,r.shineColor&&(e[`--animated-text-shine-color`]=r.shineColor),r.shineBaseColor&&(e[`--animated-text-shine-base-color`]=r.shineBaseColor),e):e});function w(e){if(e.defaultPrevented)return;if(f.value){e.preventDefault();return}let t=Date.now(),n=p.value,a=t-c.value;if(r.throttle&&n>0&&c.value>0&&a<n){e.preventDefault(),i(`throttled`,{event:e,remaining:n-a});return}c.value=t,d(e),i(`click`,e)}function T(e){i(`focus`,e)}function E(e){i(`blur`,e)}function D(){u=!1,l.value&&K(l.value)}function O(){return window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function k(e){let t=l.value;if(!t||f.value||e.pointerType===`touch`)return;if(O()){D();return}let n=e.currentTarget,r=n.getBoundingClientRect();if(!r.width||!r.height)return;let i=(e.clientX-r.left)*(n.offsetWidth/r.width)-n.clientLeft,a=(e.clientY-r.top)*(n.offsetHeight/r.height)-n.clientTop,o=Math.max(0,Math.min(n.clientWidth,i)),s=Math.max(0,Math.min(n.clientHeight,a));t.style.setProperty(`--button-liquid-x`,`${o}px`),t.style.setProperty(`--button-liquid-y`,`${s}px`),t.style.transformOrigin=`${o}px ${s}px`,u||(u=!0,ie(t))}function A(){!u||!l.value||(u=!1,O()?D():ae(l.value))}return(0,t.watch)([f,()=>r.variant],([e,t])=>{(e||t===`primary`)&&D()}),(0,t.onBeforeUnmount)(()=>{D()}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{type:e.htmlType,class:(0,t.normalizeClass)(S.value),style:(0,t.normalizeStyle)(C.value),disabled:f.value,"aria-busy":e.loading||void 0,"aria-label":e.ariaLabel,onClick:w,onFocus:T,onBlur:E,onPointerenter:k,onPointermove:k,onPointerleave:A,onPointercancel:D},[e.variant===`primary`?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`liquidRef`,ref:l,class:`bing-button__liquid`,"aria-hidden":`true`},null,512)),(0,t.createElementVNode)(`span`,ve,[m.value?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,ye,[...r[0]||=[(0,t.createElementVNode)(`span`,{class:`bing-button__spinner`},null,-1)]])),(0,t.createElementVNode)(`span`,be,[h.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,xe,[(0,t.renderSlot)(n.$slots,`prefix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),m.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Se,[(0,t.createVNode)(z,{class:`bing-button__animated-text`,effect:v.value,trigger:y.value,disabled:(0,t.unref)(o),"shine-speed":e.shineSpeed,"shine-delay":e.shineDelay,"shine-interval":e.shineInterval,"shine-direction":e.shineDirection,"shine-angle":e.shineAngle,"jump-y":e.textJumpY,"jump-stagger":e.textJumpStagger,"jump-duration":e.textJumpDuration,"jump-ease":e.textJumpEase,"jump-return-ease":e.textJumpReturnEase,"jump-repeat-delay":e.textJumpRepeatDelay},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),_:3},8,[`effect`,`trigger`,`disabled`,`shine-speed`,`shine-delay`,`shine-interval`,`shine-direction`,`shine-angle`,`jump-y`,`jump-stagger`,`jump-duration`,`jump-ease`,`jump-return-ease`,`jump-repeat-delay`])])):(0,t.createCommentVNode)(``,!0),g.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ce,[(0,t.renderSlot)(n.$slots,`suffix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])])],46,_e))}}),[[`__scopeId`,`data-v-845f9077`]]),Y=new Set([`role`,`readonly`,`required`,`form`,`maxlength`,`minlength`,`pattern`,`inputmode`,`autofocus`,`enterkeyhint`,`tabindex`,`list`,`autocapitalize`,`autocorrect`,`dirname`,`wrap`,`cols`,`onChange`,`onBeforeinput`,`onCompositionstart`,`onCompositionupdate`,`onCompositionend`,`onSelect`,`onInvalid`]);function we(){let e=(0,t.useAttrs)(),n=e=>Y.has(e)||e.startsWith(`aria-`);return{rootAttrs:()=>Object.fromEntries(Object.entries(e).filter(([e])=>!n(e))),controlAttrs:()=>Object.fromEntries(Object.entries(e).filter(([e])=>n(e)))}}var Te=`(prefers-reduced-motion: reduce), (forced-colors: active), (pointer: coarse)`,Ee=new Set([`text`,`search`,`tel`,`url`]),De=/[\u0590-\u08ff\u200e\u200f\u202a-\u202e\u2066-\u2069\ufb1d-\ufdff\ufe70-\ufeff]/u,Oe=[`fontFamily`,`fontSize`,`fontWeight`,`fontStyle`,`fontStretch`,`fontVariant`,`fontKerning`,`fontFeatureSettings`,`fontVariationSettings`,`letterSpacing`,`wordSpacing`,`textTransform`];function ke(e,r,i,a){let o=()=>{},s=()=>{};(0,t.onUpdated)(()=>o()),(0,t.onBeforeUnmount)(()=>s()),(0,t.onMounted)(()=>{let t=e.value,c=r.value,l=i.value;if(!t||!c||!l)return;let u=t.ownerDocument,d=u.defaultView,f=d.matchMedia(Te),p=!1,m=!1,h=!1,g=!1,_=!1,v=!1,y=0,b=!1,x=!1,S,C,w,T=``,E=NaN,D=0,O=0,k,A,j=u.createRange();function M(){v&&(t.removeAttribute(`data-smooth-caret`),l.removeAttribute(`data-active`)),v=!1,l.classList.contains(`is-idle`)&&l.classList.remove(`is-idle`),clearTimeout(S),A?.tween.pause()}function N(){clearTimeout(S),l.classList.remove(`is-idle`),S=setTimeout(()=>{v&&!_&&l.classList.add(`is-idle`)},600)}function P(){y=0;let e=b,r=x;if(b=x=!1,_)return;let i=m&&t.selectionDirection!==`backward`?t.selectionEnd:t.selectionStart;if(!p||!a()||t.disabled||t.readOnly||h||g||f.matches||u.hidden||!u.hasFocus()||u.activeElement!==t||!Ee.has(t.type)||i===null||!m&&i!==t.selectionEnd||De.test(t.value)){M(),w&&!Ee.has(t.type)&&(w.data=``);return}let o=d.getComputedStyle(t);if(o.direction!==`ltr`||o.writingMode!==`horizontal-tb`||![`start`,`left`].includes(o.textAlign)||parseFloat(o.textIndent)!==0||!t.clientWidth){M();return}C||(C=u.createElement(`span`),C.setAttribute(`aria-hidden`,`true`),C.style.cssText=`position:absolute;left:0;top:0;visibility:hidden;white-space:pre;width:max-content;pointer-events:none;`,w=u.createTextNode(``),C.append(w),c.append(C));let s=Oe.map(e=>o[e]).join(`|`);T!==s&&(Oe.forEach(e=>{C.style[e]=o[e]}),T=s);let S=t.value||`​`;w.data!==S&&(w.data=S),j.setStart(w,i),j.collapse(!0);let P=j.getClientRects();if(!P.length){M();return}let F=C.getBoundingClientRect(),I=c.getBoundingClientRect().width/c.clientWidth||1,L=parseFloat(o.paddingLeft)||0,R=t.offsetLeft+L+(P[0].left-F.left)/I-t.scrollLeft;if(R<t.offsetLeft-1||R>t.offsetLeft+t.clientWidth+1){M();return}let z=Math.max(t.offsetLeft,Math.min(t.offsetLeft+t.clientWidth-2,R)),B=Math.min(t.clientHeight,parseFloat(o.fontSize)*1.2),V=t.offsetTop+(t.clientHeight-B)/2,H=!v||Math.abs(E-z)>.1,U=D!==t.scrollLeft||O!==t.clientWidth;A||(k=n.gsap.context(()=>{A=n.gsap.quickTo(l,`x`,{duration:.09,ease:`power2.out`})},c)),!v||e||U?(A(z,z),A.tween.progress(1).pause()):H&&A(z),l.style.height!==`${B}px`&&(l.style.height=`${B}px`),l.style.top!==`${V}px`&&(l.style.top=`${V}px`),l.style.color!==o.color&&(l.style.color=o.color),v||(l.setAttribute(`data-active`,``),t.setAttribute(`data-smooth-caret`,``)),v=!0,E=z,D=t.scrollLeft,O=t.clientWidth,(H||r)&&N()}function F(e=!1,t=!1){_||!p||(b||=e,x||=t,y||=d.requestAnimationFrame(P))}let I=()=>F(),L=()=>F(!0),R=()=>F(!1,!0),z=()=>M(),B=()=>u.hidden?M():F(!0),V=()=>{h=!1,F(!0,!0)},H=new ResizeObserver(L);function U(){p||(p=!0,u.addEventListener(`selectionchange`,I),u.addEventListener(`pointerup`,V),u.addEventListener(`pointercancel`,V),u.addEventListener(`visibilitychange`,B),d.addEventListener(`blur`,z),d.addEventListener(`focus`,L),d.addEventListener(`resize`,L),f.addEventListener(`change`,L),u.fonts?.addEventListener(`loadingdone`,L),H.observe(t),F(!0,!0))}function ee(){p=m=h=g=!1,M(),d.cancelAnimationFrame(y),y=0,b=x=!1,u.removeEventListener(`selectionchange`,I),u.removeEventListener(`pointerup`,V),u.removeEventListener(`pointercancel`,V),u.removeEventListener(`visibilitychange`,B),d.removeEventListener(`blur`,z),d.removeEventListener(`focus`,L),d.removeEventListener(`resize`,L),f.removeEventListener(`change`,L),u.fonts?.removeEventListener(`loadingdone`,L),H.disconnect(),k?.revert(),k=A=void 0,C?.remove(),C=w=void 0,T=``}let W={focus:U,blur:ee,input:R,keydown:R,keyup:I,select:I,scroll:L,pointerdown:e=>{h=!0,g||=e.pointerType===`touch`,M()},compositionstart:()=>{m=!0,F(!1,!0)},compositionupdate:R,compositionend:()=>{m=!1,F(!1,!0)}};for(let[e,n]of Object.entries(W))t.addEventListener(e,n);o=()=>F(),s=()=>{_=!0,ee();for(let[e,n]of Object.entries(W))t.removeEventListener(e,n);o=()=>{}},u.activeElement===t&&U()})}var X=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ae=e=>e===``,je=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Me=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Ne=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Pe=e=>{let t=Ne(e);return t.charAt(0).toUpperCase()+t.slice(1)},Fe={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Ie=({name:e,iconNode:n,absoluteStrokeWidth:r,"absolute-stroke-width":i,strokeWidth:a,"stroke-width":o,size:s=Fe.width,color:c=Fe.stroke,...l},{slots:u})=>(0,t.h)(`svg`,{...Fe,...l,width:s,height:s,stroke:c,"stroke-width":Ae(r)||Ae(i)||r===!0||i===!0?Number(a||o||Fe[`stroke-width`])*24/Number(s):a||o||Fe[`stroke-width`],class:je(`lucide`,l.class,...e?[`lucide-${Me(Pe(e))}-icon`,`lucide-${Me(e)}`]:[`lucide-icon`]),...!u.default&&!X(l)&&{"aria-hidden":`true`}},[...n.map(e=>(0,t.h)(...e)),...u.default?[u.default()]:[]]),Z=(e,n)=>(r,{slots:i,attrs:a})=>(0,t.h)(Ie,{...a,...r,iconNode:n,name:e},i),Le=Z(`arrow-down-left`,[[`path`,{d:`M17 7 7 17`,key:`15tmo1`}],[`path`,{d:`M17 17H7V7`,key:`1org7z`}]]),Re=Z(`arrow-down-right`,[[`path`,{d:`m7 7 10 10`,key:`1fmybs`}],[`path`,{d:`M17 7v10H7`,key:`6fjiku`}]]),ze=Z(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Be=Z(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),Ve=Z(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),He=Z(`arrow-up-left`,[[`path`,{d:`M7 17V7h10`,key:`11bw93`}],[`path`,{d:`M17 17 7 7`,key:`2786uv`}]]),Ue=Z(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),We=Z(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Ge=Z(`calendar-days`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M16 14h.01`,key:`1gbofw`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M16 18h.01`,key:`kzsmim`}]]),Ke=Z(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),qe=Z(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Je=Z(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Ye=Z(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Xe=Z(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Ze=Z(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Qe=Z(`chevrons-left`,[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]),$e=Z(`chevrons-right`,[[`path`,{d:`m6 17 5-5-5-5`,key:`xnjwq`}],[`path`,{d:`m13 17 5-5-5-5`,key:`17xmmf`}]]),et=Z(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),tt=Z(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),nt=Z(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),rt=Z(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),it=Z(`columns-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),at=Z(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),ot=Z(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),st=Z(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ct=Z(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),lt=Z(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ut=Z(`file-braces`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),dt=Z(`file-image`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),ft=Z(`file-question-mark`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]]),pt=Z(`file-spreadsheet`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),mt=Z(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),ht=Z(`file-type`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M11 18h2`,key:`12mj7e`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5`,key:`qbrxap`}]]),gt=Z(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),_t=Z(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),vt=Z(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),yt=Z(`list-collapse`,[[`path`,{d:`M10 5h11`,key:`1hkqpe`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 19h11`,key:`14g2nv`}],[`path`,{d:`m3 10 3-3-3-3`,key:`i7pm08`}],[`path`,{d:`m3 20 3-3-3-3`,key:`20gx1n`}]]),bt=Z(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),xt=Z(`list-x`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`m15.5 9.5 5 5`,key:`ytk86i`}],[`path`,{d:`m20.5 9.5-5 5`,key:`17o44f`}]]),St=Z(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Ct=Z(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),wt=Z(`presentation`,[[`path`,{d:`M2 3h20`,key:`91anmk`}],[`path`,{d:`M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3`,key:`2k9sn8`}],[`path`,{d:`m7 21 5-5 5 5`,key:`bip4we`}]]),Tt=Z(`refresh-ccw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),Et=Z(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Dt=Z(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Ot=Z(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),kt=Z(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),At=Z(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),jt=Z(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Mt=Z(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Nt=Z(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Q=R((0,t.defineComponent)({__name:`BingIcon`,props:{icon:{},size:{default:`md`},tone:{default:`inherit`},strokeWidth:{default:1.75},decorative:{type:Boolean,default:!0},label:{default:void 0}},setup(e){let n=e,r={xs:`14px`,sm:`16px`,md:`20px`,lg:`24px`,xl:`32px`};function i(e){return typeof e==`string`&&e in r}let a=(0,t.computed)(()=>typeof n.size==`number`?`${n.size}px`:i(n.size)?r[n.size]:n.size),o=(0,t.computed)(()=>[`bing-icon`,`bing-icon--${n.tone}`]),s=(0,t.computed)(()=>n.decorative||!n.label);return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon),{class:(0,t.normalizeClass)(o.value),style:(0,t.normalizeStyle)({width:a.value,height:a.value,strokeWidth:e.strokeWidth}),"aria-hidden":s.value||void 0,"aria-label":s.value?void 0:e.label,role:s.value?void 0:`img`},null,8,[`class`,`style`,`aria-hidden`,`aria-label`,`role`]))}}),[[`__scopeId`,`data-v-43788c95`]]),Pt={key:0,class:`bing-input__icon`},Ft={class:`bing-input__content`},It=[`id`,`value`,`type`,`min`,`max`,`step`,`placeholder`,`disabled`,`readonly`,`name`,`autocomplete`,`spellcheck`,`aria-label`,`aria-describedby`,`aria-invalid`],Lt={key:1,class:`bing-input__actions`},Rt={key:0,class:`bing-input__stepper`},zt=[`disabled`],Bt=[`disabled`],Vt=R((0,t.defineComponent)({inheritAttrs:!1,__name:`BingInput`,props:{id:{default:void 0},modelValue:{default:``},type:{default:`text`},min:{},max:{},step:{},placeholder:{default:void 0},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:void 0},smoothCaret:{type:Boolean,default:!0},icon:{default:void 0},iconLabel:{default:void 0},size:{default:void 0},block:{type:Boolean,default:!1},debounceDelay:{default:180},clearAriaLabel:{default:`清空输入`},ariaLabel:{default:void 0},ariaDescribedby:{default:void 0},status:{default:void 0},name:{default:void 0},autocomplete:{default:`off`},spellcheck:{type:[Boolean,String],default:void 0}},emits:[`update:modelValue`,`input`,`debounced-input`,`clear`,`focus`,`blur`,`keydown`],setup(e,{expose:n,emit:r}){let i=e,a=r,{playClickFeedback:o}=de(),{rootAttrs:s,controlAttrs:c}=we(),{formItem:l,resolvedId:u,resolvedSize:d,resolvedDisabled:f,resolvedStatus:p,resolvedAriaDescribedby:m}=he(i),h=(0,t.useSlots)(),g=(0,t.ref)(null),_=(0,t.ref)(null),v=(0,t.ref)(null),y=(0,t.ref)(null);ke(_,v,y,()=>i.smoothCaret);let b=(0,t.ref)(!1),x=(0,t.ref)(``),S=``,C,w=!1,T=0,E,D,O,k=(0,t.computed)(()=>Math.max(0,Math.floor(i.debounceDelay))),A=(0,t.computed)(()=>!!(i.icon||h.icon)),j=(0,t.computed)(()=>i.modelValue!==null&&String(i.modelValue).length>0),M=(0,t.computed)(()=>(i.clearable??i.type===`search`)&&!i.readonly&&!f.value&&j.value),N=(0,t.computed)(()=>i.type===`number`),P=(0,t.computed)(()=>[`bing-input`,`bing-input--${d.value}`,`bing-input--status-${p.value}`,{"is-block":i.block,"is-disabled":f.value,"is-invalid":p.value===`error`,"has-icon":A.value,"has-value":j.value,"can-clear":M.value,"has-actions":M.value||N.value}]);function F(){E!==void 0&&(clearTimeout(E),E=void 0)}function I(e){if(F(),k.value===0){a(`debounced-input`,e);return}E=setTimeout(()=>{E=void 0,a(`debounced-input`,e)},k.value)}function L(e,t){let n=e===``?NaN:Number(e);a(`update:modelValue`,i.type===`number`&&Number.isFinite(n)?n:e),a(`input`,e,t),I(e),l?.handleControlChange()}function R(e){let t=e.target.value;if(b.value||e.isComposing){x.value=t;return}let n=C===t;C=void 0,!n&&L(t,e)}function z(e){S=e.target.value,x.value=S,C=void 0,b.value=!0,w=E!==void 0,F()}function B(e){if(!b.value)return;let t=e.target.value;b.value=!1,C=t,t===S?w&&I(t):L(t,e),w=!1}function V(e){!b.value&&!e.isComposing&&e.keyCode!==229&&(C=void 0),a(`keydown`,e)}function H(e){let t=_.value;if(!t||!N.value||i.readonly||f.value)return!1;let n=t.value;if(t.step.toLowerCase()===`any`){let n=t.valueAsNumber,r=t.min.trim()===``||!Number.isFinite(Number(t.min))?-1/0:Number(t.min),i=t.max.trim()===``||!Number.isFinite(Number(t.max))?1/0:Number(t.max),a=Math.min(i,Math.max(r,(Number.isFinite(n)?n:0)+e));r<=i&&Number.isFinite(a)&&(!Number.isFinite(n)||(a-n)*e>0)&&(t.valueAsNumber=a)}else t.stepUp(e);return t.value===n?!1:(t.dispatchEvent(new Event(`input`,{bubbles:!0})),t.dispatchEvent(new Event(`change`,{bubbles:!0})),!0)}function U(){clearTimeout(D),clearInterval(O),D=void 0,O=void 0,typeof window<`u`&&(window.removeEventListener(`pointerup`,U),window.removeEventListener(`pointercancel`,U),window.removeEventListener(`blur`,U))}function ee(e,t){t.button!==0||i.readonly||f.value||(t.preventDefault(),U(),_.value?.focus(),H(e)&&(o(t),window.addEventListener(`pointerup`,U),window.addEventListener(`pointercancel`,U),window.addEventListener(`blur`,U),D=setTimeout(()=>{O=setInterval(()=>{H(e)||U()},80)},400)))}function W(e,t){t.detail===0&&!t.pointerType&&(_.value?.focus(),H(e)&&o(t))}function G(){M.value&&(b.value=!1,C=void 0,w=!1,F(),a(`update:modelValue`,``),a(`clear`),a(`debounced-input`,``),l?.handleControlChange(),_.value?.focus())}function te(e){a(`focus`,e)}function ne(e){B(e),a(`blur`,e)}function re(){T+=1}async function ie(e){let n=g.value;if(!n||e.relatedTarget instanceof Node&&n.contains(e.relatedTarget))return;let r=++T;await(0,t.nextTick)(),!(r!==T||g.value!==n||n.contains(n.ownerDocument.activeElement))&&l?.handleControlBlur()}function ae(){_.value?.focus()}function K(){_.value?.blur()}function oe(){_.value?.select()}return(0,t.onBeforeUnmount)(()=>{T+=1,F(),U()}),(0,t.watch)([f,()=>i.readonly,()=>i.type],U),(0,t.watch)(()=>i.modelValue,e=>{!b.value&&String(e??``)!==C&&(C=void 0)}),n({get input(){return _.value},focus:ae,blur:K,select:oe}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)((0,t.unref)(s)(),{ref_key:`rootRef`,ref:g,class:P.value,onClick:ae,onFocusin:re,onFocusout:ie}),[A.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Pt,[(0,t.renderSlot)(e.$slots,`icon`,{},()=>[i.icon?((0,t.openBlock)(),(0,t.createBlock)(Q,{key:0,icon:i.icon,size:`sm`,"stroke-width":1.75,decorative:!i.iconLabel,label:i.iconLabel},null,8,[`icon`,`decorative`,`label`])):(0,t.createCommentVNode)(``,!0)],!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,Ft,[(0,t.createElementVNode)(`input`,(0,t.mergeProps)((0,t.unref)(c)(),{ref_key:`inputRef`,ref:_,class:`bing-input__field`,id:(0,t.unref)(u),value:b.value?x.value:i.modelValue,type:i.type,min:i.min,max:i.max,step:i.step,placeholder:i.placeholder,disabled:(0,t.unref)(f),readonly:i.readonly,name:i.name,autocomplete:i.autocomplete,spellcheck:i.spellcheck,"aria-label":i.ariaLabel||void 0,"aria-describedby":(0,t.unref)(m),"aria-invalid":(0,t.unref)(p)===`error`||void 0,onInput:R,onCompositionstart:z,onCompositionend:B,onFocus:te,onBlur:ne,onKeydown:V}),null,16,It),(0,t.createElementVNode)(`span`,{ref_key:`caretLayerRef`,ref:v,class:`bing-input__caret-layer`,"aria-hidden":`true`},[(0,t.createElementVNode)(`span`,{ref_key:`caretRef`,ref:y,class:`bing-input__caret`},null,512)],512)]),M.value||N.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Lt,[N.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Rt,[(0,t.createElementVNode)(`button`,{type:`button`,class:`bing-input__step`,tabindex:`-1`,"aria-label":`增加数值`,disabled:(0,t.unref)(f)||i.readonly,onPointerdown:n[0]||=e=>ee(1,e),onPointerleave:U,onClick:n[1]||=(0,t.withModifiers)(e=>W(1,e),[`stop`])},[(0,t.createVNode)(Q,{icon:(0,t.unref)(Ze),size:`xs`,"stroke-width":1.75},null,8,[`icon`])],40,zt),(0,t.createElementVNode)(`button`,{type:`button`,class:`bing-input__step`,tabindex:`-1`,"aria-label":`减少数值`,disabled:(0,t.unref)(f)||i.readonly,onPointerdown:n[2]||=e=>ee(-1,e),onPointerleave:U,onClick:n[3]||=(0,t.withModifiers)(e=>W(-1,e),[`stop`])},[(0,t.createVNode)(Q,{icon:(0,t.unref)(Je),size:`xs`,"stroke-width":1.75},null,8,[`icon`])],40,Bt)])):(0,t.createCommentVNode)(``,!0),M.value?((0,t.openBlock)(),(0,t.createBlock)(J,{key:1,variant:`ghost`,size:`xs`,rounded:`sm`,throttle:!1,class:`bing-input__clear`,"aria-label":i.clearAriaLabel,onMousedown:n[4]||=(0,t.withModifiers)(()=>{},[`prevent`]),onClick:(0,t.withModifiers)(G,[`stop`])},{prefix:(0,t.withCtx)(()=>[(0,t.createVNode)(Q,{icon:(0,t.unref)(jt),size:`xs`,"stroke-width":1.75},null,8,[`icon`])]),_:1},8,[`aria-label`])):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)],16))}}),[[`__scopeId`,`data-v-0e642a76`]]),Ht=/^(auto|scroll|overlay)$/,Ut=[`button`,`input`,`select`,`textarea`,`video`,`audio`,`[contenteditable="true"]`,`[role="textbox"]`].join(`,`),Wt=Object.freeze({duration:400,stepSize:100,pulseScale:4,accelerationDelta:50,accelerationMax:3,keyboardStep:50,keyboard:!0,smoothTouchpad:!1,respectReducedMotion:!0}),Gt=Object.freeze({duration:280,stepSize:72,pulseScale:4,accelerationDelta:50,accelerationMax:2,keyboard:!1,smoothTouchpad:!1,respectReducedMotion:!0});function Kt(e,t={},n={}){return e===!1?!1:{...t,...typeof e==`object`?e:{},...n}}function qt(e,t,n){return Number.isFinite(e)?Math.max(n,e):t}function Jt(e){return{duration:qt(e?.duration,Wt.duration,0),stepSize:qt(e?.stepSize,Wt.stepSize,0),pulseScale:qt(e?.pulseScale,Wt.pulseScale,.1),accelerationDelta:qt(e?.accelerationDelta,Wt.accelerationDelta,0),accelerationMax:qt(e?.accelerationMax,Wt.accelerationMax,1),keyboardStep:qt(e?.keyboardStep,Wt.keyboardStep,0),keyboard:e?.keyboard??Wt.keyboard,smoothTouchpad:e?.smoothTouchpad??Wt.smoothTouchpad,respectReducedMotion:e?.respectReducedMotion??Wt.respectReducedMotion}}function Yt(e,t){let n=e*t;if(n<1)return n-(1-Math.exp(-n));let r=Math.exp(-1);return r+(1-Math.exp(-(n-1)))*(1-r)}function Xt(e,t=Wt.pulseScale){if(e<=0)return 0;if(e>=1)return 1;let n=Math.max(.1,t);return Yt(e,n)/Yt(1,n)}function Zt(){return typeof window<`u`&&typeof document<`u`}function Qt(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}function $t(e,t,n){return Math.min(n,Math.max(t,e))}function en(e){return e===0?0:e>0?1:-1}function tn(e,t,n){if(n===0)return!1;if(t===`x`){let t=Math.max(0,e.scrollWidth-e.clientWidth);return t>0&&(n<0?e.scrollLeft>0:e.scrollLeft<t-.5)}let r=Math.max(0,e.scrollHeight-e.clientHeight);return r>0&&(n<0?e.scrollTop>0:e.scrollTop<r-.5)}function nn(e){let t=e.composedPath?.()[0]??e.target;return t instanceof Element?t:null}function rn(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode?.();return t&&`host`in t&&t.host instanceof Element?t.host:null}function an(e,t,n,r){let i=nn(e);for(;i&&i!==t;){if(i instanceof HTMLElement){let e=n!==0&&tn(i,`x`,n),t=r!==0&&tn(i,`y`,r);if(!e&&!t){i=rn(i);continue}let a=window.getComputedStyle(i),o=a.overflowX||i.style.overflowX||i.style.overflow,s=a.overflowY||i.style.overflowY||i.style.overflow,c=e&&Ht.test(o),l=t&&Ht.test(s);if(c||l)return!0}i=rn(i)}return!1}function on(){return!!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function sn(e,t,n){let r=e,i=e.deltaX||-Number(r.wheelDeltaX||0),a=e.deltaY||-Number(r.wheelDeltaY||0);return!i&&!a&&(a=-Number(r.wheelDelta||0)),e.deltaMode===WheelEvent.DOM_DELTA_LINE?(i*=40,a*=40):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=Math.max(1,t.clientWidth),a*=Math.max(1,t.clientHeight)),e.shiftKey&&n.horizontal&&Math.abs(a)>Math.abs(i)&&(i=a,a=0),n.horizontal||(i=0),n.vertical||(a=0),{x:i,y:a}}function cn(e,t){return Math.abs(e)>1.2?t/120*e:e}function ln(e){let t=nn(e);return t instanceof HTMLElement&&!!t.closest(Ut)}function un(e){let t=[],n,r=0,i=0,a=0,o=[],s=0,c=0;function l(){return Jt(e.getOptions?.())}function u(){return e.getAxes?.()??{horizontal:!0,vertical:!0}}function d(){return e.isEnabled?.()??!0}function f(){!Zt()||n===void 0||(window.cancelAnimationFrame(n),n=void 0)}function p(){f(),t=[],r=0,i=0,a=0,s=0,c=0}function m(e,t,n){if(t!==0||s!==0){let n=Math.max(0,e.scrollWidth-e.clientWidth),r=$t(e.scrollLeft+t+s,0,n);e.scrollLeft=r,s=r-e.scrollLeft}if(n!==0||c!==0){let t=Math.max(0,e.scrollHeight-e.clientHeight),r=$t(e.scrollTop+n+c,0,t);e.scrollTop=r,c=r-e.scrollTop}}function h(){n=void 0;let r=e.getElement();if(!r||!d()){p();return}let o=Qt(),l=0,u=0;if(t.forEach(e=>{let t=o-e.start,n=e.duration===0||t>=e.duration?1:Xt(t/e.duration,e.pulseScale),r=e.x*n,i=e.y*n;l+=r-e.lastX,u+=i-e.lastY,e.lastX=r,e.lastY=i}),t=t.filter(e=>o-e.start<e.duration),m(r,l,u),t.length>0){n=window.requestAnimationFrame(h);return}i=0,a=0,s=0,c=0}function g(){if(!(!Zt()||n!==void 0)){if(typeof window.requestAnimationFrame!=`function`){h();return}n=window.requestAnimationFrame(h)}}function _(n,o){let s=e.getElement();if(!s||!n&&!o)return!1;let c=l(),u=en(n),d=en(o);(u!==0&&i!==0&&u!==i||d!==0&&a!==0&&d!==a)&&p();let f=Qt(),h=r?f-r:1/0,_=1;c.accelerationDelta>0&&h<c.accelerationDelta&&(_=Math.min((1+c.accelerationDelta/Math.max(1,h))/2,c.accelerationMax));let v=n*_,y=o*_;return i=en(v)||i,a=en(y)||a,r=f,c.duration===0||!Zt()||typeof window.requestAnimationFrame!=`function`?(m(s,v,y),!0):(t.push({x:v,y,lastX:0,lastY:0,start:f,duration:c.duration,pulseScale:c.pulseScale}),g(),!0)}function v(e){return o.length===3&&o.every(t=>t%e===0)}function y(e,t){if(e.deltaMode!==WheelEvent.DOM_DELTA_PIXEL)return!1;let n=e,r=n.wheelDeltaX||0,i=n.wheelDeltaY||0,a=Math.abs((Math.abs(i)>=Math.abs(r)?i:r)||n.wheelDelta||t);if(!a)return!1;o.length===0&&(o=[a,a,a]),o.push(a),o.shift();let s=a>120&&v(a);return!v(120)&&!v(100)&&!s}function b(t){let n=e.getElement();if(!n)return null;let r=l(),i=sn(t,n,u()),a=Math.abs(i.y)>=Math.abs(i.x)?i.y:i.x;if(!r.smoothTouchpad&&y(t,a))return null;let o=cn(i.x,r.stepSize),s=cn(i.y,r.stepSize);return o&&!tn(n,`x`,o)&&(o=0),s&&!tn(n,`y`,s)&&(s=0),!o&&!s||an(t,n,o,s)?null:{x:o,y:s}}function x(e){if(!Zt()||!d()||e.defaultPrevented||e.ctrlKey||l().respectReducedMotion&&on())return!1;let t=b(e);return t?(e.preventDefault(),_(t.x,t.y)):(e.defaultPrevented||p(),!1)}function S(t){let n=e.getElement(),r=l();if(!Zt()||!n||!d()||!r.keyboard||t.defaultPrevented||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey&&t.key!==` `||ln(t)||r.respectReducedMotion&&on())return!1;let i=u(),a=0,o=0;switch(t.key){case`ArrowUp`:o=i.vertical?-r.keyboardStep:0;break;case`ArrowDown`:o=i.vertical?r.keyboardStep:0;break;case`ArrowLeft`:a=i.horizontal?-r.keyboardStep:0;break;case`ArrowRight`:a=i.horizontal?r.keyboardStep:0;break;case`PageUp`:o=i.vertical?-n.clientHeight*.9:0;break;case`PageDown`:case` `:o=i.vertical?n.clientHeight*(t.shiftKey?-.9:.9):0;break;case`Home`:o=i.vertical?-n.scrollTop:0,a=!i.vertical&&i.horizontal?-n.scrollLeft:0;break;case`End`:o=i.vertical?Math.max(0,n.scrollHeight-n.clientHeight-n.scrollTop):0,a=!i.vertical&&i.horizontal?Math.max(0,n.scrollWidth-n.clientWidth-n.scrollLeft):0;break;default:return!1}return a&&!tn(n,`x`,a)&&(a=0),o&&!tn(n,`y`,o)&&(o=0),!a&&!o?!1:(t.preventDefault(),_(a,o))}return{cancel:p,handleKeydown:S,handleWheel:x,isAnimating:()=>n!==void 0||t.length>0}}var dn=[`tabindex`,`role`,`aria-label`],fn=R((0,t.defineComponent)({__name:`BingScrollbar`,props:{height:{default:void 0},maxHeight:{default:void 0},minThumbSize:{default:28},overflowTolerance:{default:1},vertical:{type:Boolean,default:!0},horizontal:{type:Boolean,default:!1},always:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},focusable:{type:Boolean,default:!0},ariaLabel:{default:void 0},smooth:{type:[Boolean,Object],default:!0}},emits:[`scroll`],setup(e,{expose:n,emit:r}){let i=e,a=r,o=(0,t.useSlots)(),s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(null),p=(0,t.ref)(!1),m=(0,t.ref)(!1),h=(0,t.ref)(0),g=(0,t.ref)(0),_=(0,t.ref)(!1),v=(0,t.ref)(null),y=(0,t.ref)(!1),b,x,S,C,w,T,E,D=0,O=0,k=0,A=0,j=0,M=0,N=0,P=0,F=0,I=(0,t.computed)(()=>[`bing-scrollbar`,{"has-overflow":p.value||m.value,"has-vertical-overflow":p.value,"has-horizontal-overflow":m.value,"is-vertical":i.vertical,"is-horizontal":i.horizontal,"is-always-visible":i.always,"is-disabled":i.disabled,"is-dragging":!!v.value,"is-dragging-vertical":v.value===`vertical`,"is-dragging-horizontal":v.value===`horizontal`,"is-hovering":_.value,"is-scrolling":y.value,"is-smooth":!!i.smooth}]),L=(0,t.computed)(()=>({height:G(i.height),maxHeight:G(i.maxHeight)}));function R(){return{height:`${h.value}px`,transform:`translate(-50%, ${P}px)`}}function z(){return{width:`${g.value}px`,transform:`translate(${F}px, -50%)`}}let B=(0,t.computed)(()=>Math.max(1,i.overflowTolerance)),V=(0,t.computed)(()=>(p.value||m.value)&&i.focusable&&!i.disabled),H=(0,t.computed)(()=>i.ariaLabel??(V.value?`可滚动内容`:void 0));function U(e){s.value=e instanceof HTMLElement?e:null}let ee={class:`bing-scrollbar__custom-viewport`,onScroll:he,onWheel:ge,onKeydown:_e,onInput:de};function W(){return typeof window<`u`&&typeof document<`u`}function G(e){return typeof e==`number`?`${e}px`:e}function te(){!W()||S===void 0||(window.clearTimeout(S),S=void 0)}function ne(){!W()||C===void 0||(window.cancelAnimationFrame(C),C=void 0)}function re(){!W()||w===void 0||(window.cancelAnimationFrame(w),w=void 0)}function ie(){re(),T=void 0}function ae(){ie(),E?.cancel()}function K(){return typeof i.smooth==`object`?i.smooth:void 0}function oe(){return!!i.smooth&&!i.disabled}function se(){let e=s.value;if(!e)return;let t=e.clientHeight,n=e.scrollHeight,r=e.clientWidth,a=e.scrollWidth,o=Math.max(0,n-t),c=Math.max(0,a-r),d=i.vertical&&!i.disabled&&o>B.value,f=i.horizontal&&!i.disabled&&c>B.value;if(p.value=d,m.value=f,A=d?o:0,j=f?c:0,!d||!l.value)h.value=0,ce(0),M=0;else{let r=l.value.clientHeight,a=n>0?t/n*r:r,s=Math.min(r,Math.max(Math.max(12,i.minThumbSize),a));M=Math.max(0,r-s);let c=o>0?e.scrollTop/o:0;h.value=s,ce(M*c)}if(!f||!u.value)g.value=0,le(0),N=0;else{let t=u.value.clientWidth,n=a>0?r/a*t:t,o=Math.min(t,Math.max(Math.max(12,i.minThumbSize),n));N=Math.max(0,t-o);let s=c>0?e.scrollLeft/c:0;g.value=o,le(N*s)}}function ce(e){P=e,d.value&&(d.value.style.transform=`translate(-50%, ${e}px)`)}function le(e){F=e,f.value&&(f.value.style.transform=`translate(${e}px, -50%)`)}function ue(){let e=s.value;if(e){if(p.value){let t=A>0?e.scrollTop/A:0;ce(M*t)}if(m.value){let t=j>0?e.scrollLeft/j:0;le(N*t)}}}function q(){if(!W()||typeof window.requestAnimationFrame!=`function`){se();return}C===void 0&&(C=window.requestAnimationFrame(()=>{C=void 0,se()}))}function de(){(0,t.nextTick)(q)}function fe(){W()&&(te(),y.value=!0,S=window.setTimeout(()=>{S=void 0,y.value=!1},720))}function pe(e){let t=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;return e.deltaMode===1?t*16:e.deltaMode===2?t*(s.value?.clientWidth??1):t}function me(){return W()&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function he(e){ue(),fe(),a(`scroll`,e)}function ge(e){if(e.defaultPrevented)return!1;if(oe())return ie(),E?.handleWheel(e)??!1;if(i.disabled||!i.horizontal)return!1;if(!e.shiftKey)return ie(),!1;let t=s.value;if(!t)return!1;let n=j||Math.max(0,t.scrollWidth-t.clientWidth),r=T??t.scrollLeft,a=be(r+pe(e),0,n);return a===r&&a===t.scrollLeft?!1:(e.preventDefault(),T=a,J(),!0)}function _e(e){oe()&&E?.handleKeydown(e)}function ve(e){let t=s.value,n=e===`vertical`?l.value:u.value;return!t||!n?null:{maxScroll:e===`vertical`?Math.max(0,t.scrollHeight-t.clientHeight):Math.max(0,t.scrollWidth-t.clientWidth),thumbTravel:e===`vertical`?Math.max(0,n.clientHeight-h.value):Math.max(0,n.clientWidth-g.value)}}function ye(e){let t=s.value;if(!t)return;let n=A||Math.max(0,t.scrollHeight-t.clientHeight);t.scrollTop=Math.min(n,Math.max(0,e)),ue(),fe()}function be(e,t,n){return Math.min(n,Math.max(t,e))}function xe(e){let t=s.value;if(!t)return;let n=j||Math.max(0,t.scrollWidth-t.clientWidth);t.scrollLeft=Math.min(n,Math.max(0,e)),ue(),fe()}function Se(){w=void 0;let e=s.value;if(!e||T===void 0){T=void 0;return}let t=T-e.scrollLeft;if(Math.abs(t)<.5){xe(T),T=void 0;return}xe(e.scrollLeft+t*.42),Ce()}function Ce(){!W()||w!==void 0||typeof window.requestAnimationFrame!=`function`||(w=window.requestAnimationFrame(Se))}function J(){if(T!==void 0){if(!W()||typeof window.requestAnimationFrame!=`function`||me()){xe(T),T=void 0;return}w===void 0&&Se()}}function Y(e,t){if(i.disabled||(e===`vertical`?!p.value:!m.value)||t.button!==0||t.target!==t.currentTarget)return;let n=e===`vertical`?l.value:u.value,r=ve(e);if(!n||!r||r.thumbTravel<=0)return;t.preventDefault(),ae();let a=n.getBoundingClientRect(),o=e===`vertical`?t.clientY-a.top-h.value/2:t.clientX-a.left-g.value/2,s=Math.min(1,Math.max(0,o/r.thumbTravel));if(e===`vertical`){ye(s*r.maxScroll);return}xe(s*r.maxScroll)}function we(){W()&&(window.addEventListener(`pointermove`,De),window.addEventListener(`pointerup`,Oe),window.addEventListener(`pointercancel`,Oe))}function Te(){W()&&(window.removeEventListener(`pointermove`,De),window.removeEventListener(`pointerup`,Oe),window.removeEventListener(`pointercancel`,Oe))}function Ee(e,t){if(!(i.disabled||(e===`vertical`?!p.value:!m.value)||t.button!==0)){t.preventDefault(),t.stopPropagation(),ae(),D=e===`vertical`?t.clientY:t.clientX,O=s.value?.scrollTop??0,k=s.value?.scrollLeft??0,v.value=e,we();try{t.currentTarget?.setPointerCapture?.(t.pointerId)}catch{}}}function De(e){let t=v.value;if(!t)return;let n=ve(t);if(!n||n.thumbTravel<=0)return;e.preventDefault();let r=((t===`vertical`?e.clientY:e.clientX)-D)*(n.maxScroll/n.thumbTravel);if(t===`vertical`){ye(O+r);return}xe(k+r)}function Oe(){v.value&&(v.value=null,Te())}function ke(e){let t=s.value;if(t){if(typeof e==`number`){ae(),ye(e);return}ae(),t.scrollTo(e),q()}}function X(e){let t=s.value;if(t){if(typeof e==`number`){ae(),ye(t.scrollTop+e);return}ae(),t.scrollBy(e),q()}}function Ae(){if(b?.disconnect(),b=void 0,x?.disconnect(),x=void 0,W()){if(o.viewport&&s.value&&typeof MutationObserver<`u`&&(x=new MutationObserver(de),x.observe(s.value,{childList:!0,subtree:!0,characterData:!0})),typeof ResizeObserver>`u`){window.addEventListener(`resize`,de),de();return}b=new ResizeObserver(de),s.value&&b.observe(s.value),c.value&&b.observe(c.value),l.value&&b.observe(l.value),u.value&&b.observe(u.value),de()}}return(0,t.watch)(s,()=>{ae(),Te(),Ae()},{flush:`post`}),(0,t.watch)(()=>[i.height,i.maxHeight,i.minThumbSize,i.overflowTolerance,i.disabled,i.vertical,i.horizontal],de),(0,t.watch)(()=>[i.disabled,i.smooth],()=>{oe()||E?.cancel()},{deep:!0}),(0,t.onMounted)(()=>{E=un({getElement:()=>s.value,getOptions:K,getAxes:()=>({horizontal:i.horizontal,vertical:i.vertical}),isEnabled:oe}),Ae()}),(0,t.onBeforeUnmount)(()=>{te(),ne(),ae(),E=void 0,Te(),b?.disconnect(),b=void 0,x?.disconnect(),x=void 0,W()&&window.removeEventListener(`resize`,de)}),n({handleWheel:ge,scrollBy:X,scrollTo:ke,stop:ae,update:se,get viewport(){return s.value}}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)(I.value),style:(0,t.normalizeStyle)(L.value),onMouseenter:n[4]||=e=>_.value=!0,onMouseleave:n[5]||=e=>_.value=!1},[(0,t.renderSlot)(e.$slots,`viewport`,{viewportRef:U,viewportAttrs:ee},()=>[(0,t.createElementVNode)(`div`,{ref_key:`viewportRef`,ref:s,class:`bing-scrollbar__viewport`,tabindex:V.value?0:void 0,role:H.value?`region`:void 0,"aria-label":H.value,onScroll:he,onWheel:ge,onKeydown:_e},[(0,t.createElementVNode)(`div`,{ref_key:`contentRef`,ref:c,class:`bing-scrollbar__content`},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],512)],40,dn)],!0),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`verticalRailRef`,ref:l,class:`bing-scrollbar__rail bing-scrollbar__rail--vertical`,"aria-hidden":`true`,onPointerdown:n[1]||=e=>Y(`vertical`,e)},[(0,t.createElementVNode)(`div`,{ref_key:`verticalThumbRef`,ref:d,class:`bing-scrollbar__thumb bing-scrollbar__thumb--vertical`,style:(0,t.normalizeStyle)(R()),onPointerdown:n[0]||=e=>Ee(`vertical`,e)},null,36)],544),[[t.vShow,p.value]]),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`horizontalRailRef`,ref:u,class:`bing-scrollbar__rail bing-scrollbar__rail--horizontal`,"aria-hidden":`true`,onPointerdown:n[3]||=e=>Y(`horizontal`,e)},[(0,t.createElementVNode)(`div`,{ref_key:`horizontalThumbRef`,ref:f,class:`bing-scrollbar__thumb bing-scrollbar__thumb--horizontal`,style:(0,t.normalizeStyle)(z()),onPointerdown:n[2]||=e=>Ee(`horizontal`,e)},null,36)],544),[[t.vShow,m.value]])],38))}}),[[`__scopeId`,`data-v-7a3e643e`]]),pn=Symbol(`BingOverlay`),mn=new WeakMap,hn=new WeakMap;function gn(e,t){let n=hn.get(e);return n||(n=new Set,hn.set(e,n)),n.add(t),()=>{n.delete(t),n.size||hn.delete(e)}}var _n=`a[href],button,input,select,textarea,[tabindex],[contenteditable="true"]`;function vn(e,t){return e===t||!!(e.parent&&vn(e.parent,t))}function yn(e){let n=[],r=new WeakMap,i=()=>n.at(-1),a=()=>[...n].reverse().find(e=>e.modal),o=(e,t)=>!!t&&n.some(n=>vn(n,e)&&n.elements().some(e=>e?.contains(t)));function s(){let e=0;for(let t of n)t.zIndex.value=Math.max(t.minimumZIndex(),e+2),e=t.zIndex.value}function c(t){let r=n.filter(e=>vn(e,t)).flatMap(e=>e.elements());return[...new Set(r.flatMap(e=>e?[e,...e.querySelectorAll(_n)]:[]))].filter(t=>t.matches(_n)&&t.tabIndex>=0&&!t.matches(`:disabled`)&&!t.closest(`[inert]`)&&t.getClientRects().length>0&&e.defaultView?.getComputedStyle(t).visibility!==`hidden`)}function l(e){(c(e)[0]??e.elements().find(Boolean))?.focus({preventScroll:!0})}function u(t){r.set(t,i());let n=a();if(t.key!==`Tab`||!n)return;let o=c(n),s=o.indexOf(e.activeElement);(!o.length||s<0||(t.shiftKey?s===0:s===o.length-1))&&(t.preventDefault(),o.length?o[t.shiftKey?o.length-1:0]?.focus():l(n))}function d(e){let t=r.get(e);e.key===`Escape`&&!e.defaultPrevented&&t?.closeOnEscape()&&(e.preventDefault(),r.set(e,void 0),t.onEscape?.(e))}function f(e){let t=a();t&&!o(t,e.target)&&l(t)}return{contains:o,allowsFocus:e=>!i()||o(i(),e),isTop:(e,t)=>(t&&r.has(t)?r.get(t):i())===e,add(r){if(n.includes(r)){s();return}r.previousFocus=e.activeElement,n.push(r),s(),hn.get(e)?.forEach(e=>e()),n.length===1&&(e.defaultView?.addEventListener(`keydown`,u,!0),e.defaultView?.addEventListener(`keydown`,d),e.addEventListener(`focusin`,f)),r.modal&&(0,t.nextTick)(()=>{a()===r&&!o(r,e.activeElement)&&l(r)})},remove(r){let i=n.indexOf(r);if(i<0)return;let s=a()===r;n.splice(i,1),s&&(0,t.nextTick)(()=>{let e=a(),t=r.previousFocus;t?.isConnected&&(!e||o(e,t))?t.focus({preventScroll:!0}):e&&l(e)}),n.length||(e.defaultView?.removeEventListener(`keydown`,u,!0),e.defaultView?.removeEventListener(`keydown`,d),e.removeEventListener(`focusin`,f),mn.delete(e)),hn.get(e)?.forEach(e=>e())}}}function bn(e){return mn.get(e.ownerDocument)?.allowsFocus(e)??!0}function xn(e){let n={parent:(0,t.inject)(pn,null),elements:e.elements,modal:e.modal??!1,minimumZIndex:e.zIndex,zIndex:(0,t.ref)(e.zIndex()),closeOnEscape:e.closeOnEscape??(()=>!0),onEscape:e.onEscape,previousFocus:null};(0,t.provide)(pn,n);let r;return(0,t.watch)([e.open,e.zIndex],([e])=>{typeof document>`u`||(e?(r=mn.get(document),r||(r=yn(document),mn.set(document,r)),r.add(n)):r?.remove(n))},{immediate:!0,flush:`post`}),(0,t.onBeforeUnmount)(()=>r?.remove(n)),{zIndex:(0,t.computed)(()=>Math.max(e.zIndex(),n.zIndex.value)),isTop:e=>r?.isTop(n,e)??!1,contains:e=>r?.contains(n,e)??!1}}function Sn(){let e=(0,t.ref)(!1);return(0,t.onMounted)(()=>{e.value=!0}),e}var Cn={key:0,class:`bing-autocomplete__header`},wn=[`aria-label`,`aria-busy`],Tn=[`id`,`aria-selected`,`aria-disabled`,`aria-label`,`data-autocomplete-index`,`onMouseenter`,`onMousemove`,`onClick`],En={class:`bing-autocomplete__option-main`},Dn={key:1,class:`bing-autocomplete__state`,role:`status`},On={key:2,class:`bing-autocomplete__state`,role:`alert`},kn={key:3,class:`bing-autocomplete__state`,role:`status`},An={key:4,class:`bing-autocomplete__footer`},jn={key:0},Mn={key:1},Nn={key:0},Pn={key:1},Fn=R((0,t.defineComponent)({inheritAttrs:!1,__name:`BingAutocomplete`,props:{id:{},modelValue:{default:``},options:{default:()=>[]},filter:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},error:{default:``},disabled:{type:Boolean,default:void 0},clearable:{type:Boolean,default:!0},placeholder:{},emptyText:{default:`没有匹配的候选`},ariaLabel:{},ariaDescribedby:{},size:{},status:{},icon:{},block:{type:Boolean,default:!1},panelWidth:{},panelMaxHeight:{default:360},completeOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0}},emits:[`update:modelValue`,`select`,`open`,`close`,`clear`],setup(e,{expose:r,emit:i}){let a=e,o=i,s=(0,t.useSlots)(),{rootAttrs:c,controlAttrs:l}=we(),{formItem:u,resolvedId:d,resolvedSize:f,resolvedDisabled:p,resolvedStatus:m,resolvedAriaDescribedby:h}=he(a);ge();let g=Sn(),_=`bing-autocomplete-${(0,t.useId)()}`,v=(0,t.ref)(null),y=(0,t.ref)(null),b=(0,t.ref)(null),x=(0,t.ref)(null),S=(0,t.shallowRef)(),C=(0,t.ref)(`right`),w=(0,t.ref)(null),T=(0,t.ref)(null),E=(0,t.ref)(null),D=(0,t.ref)(!1),O=(0,t.ref)(!1),k=(0,t.ref)(-1),A=(0,t.ref)({left:0,top:0,width:320,height:360,detailHeight:360,inline:!0,placement:`bottom`}),j=0,M=0,N=0,P=0,F=!1,I,L,R=!1,z,B=!1,V,H,U,G,re=!1,K=(0,t.computed)(()=>{if(!a.filter)return a.options;let e=a.modelValue.trim().toLocaleLowerCase();return a.options.filter(t=>t.label.toLocaleLowerCase().includes(e))}),se=(0,t.computed)(()=>!a.loading&&!a.error),ce=(0,t.computed)(()=>se.value?K.value[k.value]:void 0),le=(0,t.computed)(()=>Object.entries(S.value?.meta??{}).filter(([,e])=>e!=null&&e!==``)),ue=(0,t.computed)(()=>A.value.inline&&S.value?Math.min(184,A.value.height/2):0),q=xn({open:()=>D.value,elements:()=>[v.value,y.value,b.value],zIndex:()=>3e3,closeOnEscape:()=>!O.value,onEscape:()=>{Ae(),re=!0,w.value?.input?.focus({preventScroll:!0}),re=!1}}),de=(0,t.computed)(()=>({position:`fixed`,left:`${A.value.left}px`,top:`${A.value.top}px`,width:`${A.value.width}px`,zIndex:q.zIndex.value})),fe=(0,t.computed)(()=>A.value.inline?{}:{zIndex:q.zIndex.value+1});function pe(){return window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function me(e){U?U.add(e):e()}function _e(e=k.value){return document.getElementById(`${_}-${e}`)}function ve(){clearTimeout(I),I=void 0}function ye(){let e=_e(),t=b.value;if(!D.value||!e||!t||A.value.inline)return null;let n=e.getBoundingClientRect(),r=window.visualViewport,i=(r?.offsetLeft??0)+12,a=(r?.offsetTop??0)+12,o=i+(r?.width??innerWidth)-24,s=a+(r?.height??innerHeight)-24,c=t.offsetWidth,l=t.offsetHeight,u=A.value.left+A.value.width+12,d=A.value.left-c-12,f=u+c<=o?`right`:`left`;return{x:Math.max(i,Math.min(f===`right`?u:d,o-c)),y:Math.max(a,Math.min(n.top+n.height/2-l/2,s-l)),placement:f}}function be(e=!1,t){cancelAnimationFrame(N),!(!D.value||!S.value)&&(N=requestAnimationFrame(()=>{N=0,!(B||!D.value||!b.value||A.value.inline)&&me(()=>{let n=ne({panel:b.value,content:x.value,getTarget:ye,animateContent:e,previousSnapshot:t,reducedMotion:pe(),onComplete:()=>E.value?.update()});n&&(C.value=n.placement)})}))}function xe(){F=!1,ve(),clearTimeout(L);let e=ce.value;if(!D.value||!e||e.disabled||!(s[`option-detail`]||e.detail?.trim()||e.description?.trim()||Object.values(e.meta??{}).some(e=>e!=null&&e!==``))){Se(!0);return}let r=S.value!==e,i=r?te(b.value):void 0;b.value&&n.gsap.killTweensOf(b.value),S.value=e;let a=++P;(0,t.nextTick)(()=>{B||a!==P||!D.value||be(r,i)})}function Se(e=!1){F=!0,ve(),cancelAnimationFrame(N),N=0;let t=++P,r=b.value;n.gsap.killTweensOf([r,x.value].filter(Boolean));let i=()=>{t===P&&(S.value=void 0,F=!1)};if(!r||e||A.value.inline||pe()){i();return}me(()=>{n.gsap.to(r,{autoAlpha:0,scale:.96,x:`+=${C.value===`right`?-6:6}`,duration:.14,ease:`power2.out`,overwrite:!0,onComplete:i})})}function Ce(){ve(),I=setTimeout(()=>Se(),120)}function J(e,t){let n=!z||e.clientX!==z.x||e.clientY!==z.y;if(z={x:e.clientX,y:e.clientY},R&&(e.type!==`mousemove`||!n))return;if(R=!1,ve(),K.value[t]?.disabled){Se(!0);return}let r=k.value!==t;k.value=t,(r||!S.value||F)&&xe();let i=e.currentTarget,a=i.querySelector(`.bing-autocomplete__option-liquid`);!a||pe()||(oe(i,a,e),i.classList.contains(`is-liquid-active`)||(i.classList.add(`is-liquid-active`),me(()=>{ie(a)})))}function Y(e){let t=e.currentTarget;t.classList.remove(`is-liquid-active`);let n=t.querySelector(`.bing-autocomplete__option-liquid`);n&&!pe()&&me(()=>{ae(n)})}function Te(){if(R){be();return}Se(!0),clearTimeout(L),L=setTimeout(()=>{if(!D.value||R||!z)return;let e=document.elementFromPoint(z.x,z.y)?.closest(`[data-autocomplete-index]`);!e||!y.value?.contains(e)||(k.value=Number(e.dataset.autocompleteIndex),xe())},150)}function Ee(e,t,r){if(B){t();return}V?.kill(),H=r?void 0:t;let i=e,a=Array.from(i.querySelectorAll(`.bing-autocomplete__option`)),o=i.querySelectorAll(`.bing-autocomplete__option-liquid`);if(n.gsap.killTweensOf([i,...a,...o]),i.inert=!r,r?(Oe(),G?.observe(i)):G?.unobserve(i),pe()){n.gsap.set([i,...a],{autoAlpha:+!!r,clearProps:`transform`}),H=void 0,t();return}me(()=>{let e=r?ee:W,n=i.getBoundingClientRect();V=e({panel:i,items:a.filter(e=>e.getBoundingClientRect().top<n.bottom),actionRail:null,actionButtons:[],placement:A.value.placement,align:`start`,onComplete:()=>{V=void 0,H=void 0,t(),r&&be()}})})}function De(){V?.kill(),V=void 0}function Oe(){if(j=0,!D.value||!v.value)return;let e=v.value.getBoundingClientRect(),r=window.visualViewport,i=(r?.offsetLeft??0)+8,o=(r?.offsetTop??0)+8,s=i+(r?.width??window.innerWidth)-16,c=o+(r?.height??window.innerHeight)-16,l=Math.min(Math.max(e.width,a.panelWidth??320),s-i),u=Math.max(i,Math.min(e.left,s-l)),d=c-e.bottom-10,f=e.top-o-10,p=d>=Math.min(a.panelMaxHeight,200)||d>=f,m=Math.max(0,Math.min(a.panelMaxHeight,(p?d:f)-10)),h=Math.min(y.value?.offsetHeight??m+10,m+10),g=p?Math.min(c,e.bottom+10):Math.max(o,e.top-10-h),_=s-u-l<260&&u-i<260;A.value.inline!==_&&n.gsap.killTweensOf([b.value,x.value].filter(Boolean));let S={left:u,top:g,width:l,height:m,inline:_,detailHeight:Math.max(0,c-o-32),placement:p?`bottom`:`top`};Object.keys(S).some(e=>S[e]!==A.value[e])&&(A.value=S,(0,t.nextTick)(()=>be()))}function ke(){D.value&&!j&&(j=requestAnimationFrame(Oe))}function X(){p.value||D.value||re||(D.value=!0,R=!1,k.value=K.value.findIndex(e=>!e.disabled),Oe(),o(`open`),(0,t.nextTick)(()=>{D.value&&Oe()}))}function Ae(){D.value&&(D.value=!1,R=!1,clearTimeout(L),Se(),y.value&&G?.unobserve(y.value),o(`close`))}function je(){w.value?.focus(),X()}function Me(e){o(`update:modelValue`,String(e)),u?.handleControlChange(),X()}function Ne(e){!se.value||e.disabled||p.value||O.value||(a.completeOnSelect&&Me(e.label),o(`select`,e),a.closeOnSelect&&Ae())}function Pe(){(0,t.nextTick)(()=>{let e=T.value?.viewport,t=document.getElementById(`${_}-${k.value}`);if(!D.value||!e||!t)return;T.value?.stop();let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();r.top<n.top?e.scrollTop+=r.top-n.top:r.bottom>n.bottom&&(e.scrollTop+=r.bottom-n.bottom),xe()})}function Fe(e){if(!(e.isComposing||O.value||e.keyCode===229||p.value))if(e.key===`Escape`&&D.value)e.preventDefault(),e.stopPropagation(),Ae();else if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),!D.value){X(),R=!0,Pe();return}if(!se.value)return;R=!0;let t=e.key===`ArrowDown`?1:-1;for(let e=1;e<=K.value.length;e++){let n=(k.value+t*e+K.value.length)%K.value.length;if(!K.value[n]?.disabled){k.value=n,Pe();break}}}else e.key===`Enter`&&D.value&&ce.value&&(e.preventDefault(),Ne(ce.value))}function Ie(e){return!!(e&&([v.value,y.value,b.value].some(t=>t?.contains(e))||q.contains(e)))}function Z(e){D.value&&e.target instanceof Node&&!Ie(e.target)&&Ae()}function Le(e){let t=e.relatedTarget instanceof Node&&Ie(e.relatedTarget);cancelAnimationFrame(M),M=requestAnimationFrame(()=>{M=0;let n=!e.relatedTarget&&e.target instanceof Node&&!e.target.isConnected||t&&e.relatedTarget instanceof Node&&!e.relatedTarget.isConnected;if(D.value&&n&&document.activeElement===document.body){w.value?.input?.focus({preventScroll:!0});return}Ie(document.activeElement)||(Ae(),u?.handleControlBlur())})}return(0,t.watch)([K,se],()=>{let e=typeof document>`u`?null:document.activeElement,n=Ie(e);k.value=K.value.findIndex(e=>!e.disabled),D.value&&(ke(),R&&ce.value?Pe():Se(!0)),(0,t.nextTick)(()=>{D.value&&n&&e&&!e.isConnected&&document.activeElement===document.body&&w.value?.input?.focus({preventScroll:!0})})}),(0,t.watch)(p,e=>{e&&Ae()}),(0,t.watch)([()=>a.panelWidth,()=>a.panelMaxHeight],ke),(0,t.watch)(ue,()=>{R&&Pe()}),(0,t.watch)(x,(e,t)=>{t&&G?.unobserve(t),e&&G?.observe(e)}),(0,t.onMounted)(()=>{U=n.gsap.context(()=>{},v.value),G=new ResizeObserver(e=>{e.some(e=>e.target!==x.value)&&ke(),e.some(e=>e.target===x.value)&&!N&&b.value&&!n.gsap.isTweening(b.value)&&be()}),v.value&&G.observe(v.value),window.addEventListener(`resize`,ke),window.addEventListener(`scroll`,ke,!0),window.visualViewport?.addEventListener(`resize`,ke),window.visualViewport?.addEventListener(`scroll`,ke),document.addEventListener(`pointerdown`,Z,!0),document.addEventListener(`focusin`,Z)}),(0,t.onBeforeUnmount)(()=>{B=!0,P++,ve(),clearTimeout(L),cancelAnimationFrame(N),De(),H?.(),H=void 0,U?.revert(),cancelAnimationFrame(j),cancelAnimationFrame(M),G?.disconnect(),window.removeEventListener(`resize`,ke),window.removeEventListener(`scroll`,ke,!0),window.visualViewport?.removeEventListener(`resize`,ke),window.visualViewport?.removeEventListener(`scroll`,ke),document.removeEventListener(`pointerdown`,Z,!0),document.removeEventListener(`focusin`,Z)}),r({focus:je,close:Ae,get input(){return w.value?.input??null}}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)((0,t.unref)(c)(),{ref_key:`root`,ref:v,class:[`bing-autocomplete`,{"is-block":e.block}],onFocusout:Le}),[(0,t.createVNode)(Vt,(0,t.mergeProps)((0,t.unref)(l)(),{id:(0,t.unref)(d),ref_key:`input`,ref:w,"model-value":e.modelValue,disabled:(0,t.unref)(p),size:(0,t.unref)(f),status:(0,t.unref)(m),placeholder:e.placeholder,clearable:e.clearable,icon:e.icon,block:``,"aria-label":e.ariaLabel,"aria-describedby":(0,t.unref)(h),role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":D.value,"aria-controls":D.value?_:void 0,"aria-activedescendant":D.value&&ce.value?`${_}-${k.value}`:void 0,spellcheck:!1,"onUpdate:modelValue":Me,onFocus:X,onClick:X,onKeydown:Fe,onCompositionstart:r[0]||=e=>O.value=!0,onCompositionend:r[1]||=e=>O.value=!1,onClear:r[2]||=e=>o(`clear`)}),(0,t.createSlots)({_:2},[s.icon?{name:`icon`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`icon`,{},void 0,!0)]),key:`0`}:void 0]),1040,[`id`,`model-value`,`disabled`,`size`,`status`,`placeholder`,`clearable`,`icon`,`aria-label`,`aria-describedby`,`aria-expanded`,`aria-controls`,`aria-activedescendant`]),(0,t.unref)(g)?((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{key:0,to:`body`},[(0,t.createVNode)(t.Transition,{css:!1,onEnter:r[5]||=(e,t)=>Ee(e,t,!0),onLeave:r[6]||=(e,t)=>Ee(e,t,!1),onEnterCancelled:De,onLeaveCancelled:De},{default:(0,t.withCtx)(()=>[D.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref_key:`panel`,ref:y,class:`bing-autocomplete__panel`,style:(0,t.normalizeStyle)(de.value),onFocusout:Le},[(0,t.createVNode)(fn,{ref_key:`scrollbar`,ref:T,"max-height":A.value.height-ue.value,focusable:!1,onScroll:Te},{default:(0,t.withCtx)(()=>[s.header?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Cn,[(0,t.renderSlot)(n.$slots,`header`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,{id:_,role:`listbox`,"aria-label":e.ariaLabel||`搜索候选`,"aria-busy":e.loading,onMouseenter:ve,onMouseleave:Ce},[se.value?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(K.value,(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{id:`${_}-${i}`,key:e.value,role:`option`,class:(0,t.normalizeClass)([`bing-autocomplete__option`,{"is-active":k.value===i,"is-disabled":e.disabled}]),"aria-selected":k.value===i,"aria-disabled":e.disabled||void 0,"aria-label":e.label,"data-autocomplete-index":i,onMousedown:r[3]||=(0,t.withModifiers)(()=>{},[`prevent`]),onMouseenter:e=>J(e,i),onMousemove:e=>J(e,i),onMouseleave:Y,onClick:t=>Ne(e)},[r[10]||=(0,t.createElementVNode)(`span`,{class:`bing-autocomplete__option-liquid`,"aria-hidden":`true`},null,-1),(0,t.createElementVNode)(`span`,En,[(0,t.renderSlot)(n.$slots,`option`,{option:e,active:k.value===i},()=>[(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(e.label),1)],!0)])],42,Tn))),128)):(0,t.createCommentVNode)(``,!0)],40,wn),e.loading?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Dn,[(0,t.renderSlot)(n.$slots,`loading`,{},()=>[r[11]||=(0,t.createTextVNode)(`正在加载…`,-1)],!0)])):e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,On,[(0,t.renderSlot)(n.$slots,`error`,{error:e.error},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.error),1)],!0)])):K.value.length?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,kn,[(0,t.renderSlot)(n.$slots,`empty`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.emptyText),1)],!0)])),s.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,An,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]),_:3},8,[`max-height`]),A.value.inline&&S.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`bing-autocomplete__detail is-inline`,"aria-hidden":`true`,onMouseenter:ve,onMouseleave:Ce,onMousedown:r[4]||=(0,t.withModifiers)(()=>{},[`prevent`])},[(0,t.createVNode)(fn,{"max-height":Math.max(0,ue.value-28),focusable:!1},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`option-detail`,{option:S.value},()=>[(0,t.createElementVNode)(`strong`,null,(0,t.toDisplayString)(S.value.label),1),S.value.detail||S.value.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,jn,(0,t.toDisplayString)(S.value.detail||S.value.description),1)):(0,t.createCommentVNode)(``,!0),le.value.length?((0,t.openBlock)(),(0,t.createElementBlock)(`dl`,Mn,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(le.value,([e,n])=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e},[(0,t.createElementVNode)(`dt`,null,(0,t.toDisplayString)(e),1),(0,t.createElementVNode)(`dd`,null,(0,t.toDisplayString)(n),1)]))),128))])):(0,t.createCommentVNode)(``,!0)],!0)]),_:3},8,[`max-height`])],32)):(0,t.createCommentVNode)(``,!0)],36)):(0,t.createCommentVNode)(``,!0)]),_:3}),!A.value.inline&&S.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref_key:`detail`,ref:b,class:`bing-autocomplete__detail`,style:(0,t.normalizeStyle)(fe.value),"aria-hidden":`true`,onMouseenter:ve,onMouseleave:Ce,onMousedown:r[7]||=(0,t.withModifiers)(()=>{},[`prevent`]),onPointerdown:r[8]||=(0,t.withModifiers)(()=>{},[`stop`]),onClick:r[9]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createVNode)(fn,{ref_key:`detailScrollbar`,ref:E,"max-height":A.value.detailHeight,focusable:!1},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,{ref_key:`detailContent`,ref:x,class:`bing-autocomplete__detail-content`},[(0,t.renderSlot)(n.$slots,`option-detail`,{option:S.value},()=>[(0,t.createElementVNode)(`strong`,null,(0,t.toDisplayString)(S.value.label),1),S.value.detail||S.value.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,Nn,(0,t.toDisplayString)(S.value.detail||S.value.description),1)):(0,t.createCommentVNode)(``,!0),le.value.length?((0,t.openBlock)(),(0,t.createElementBlock)(`dl`,Pn,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(le.value,([e,n])=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e},[(0,t.createElementVNode)(`dt`,null,(0,t.toDisplayString)(e),1),(0,t.createElementVNode)(`dd`,null,(0,t.toDisplayString)(n),1)]))),128))])):(0,t.createCommentVNode)(``,!0)],!0)],512)]),_:3},8,[`max-height`])],36)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)],16))}}),[[`__scopeId`,`data-v-b951f6c7`]]),In={duration:{fast:.18,normal:.32,slow:.62},ease:{smooth:`power3.out`,press:`back.out(2.2)`,glide:`expo.out`}};function Ln(){return typeof window<`u`}function Rn(){return Ln()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}var zn=[`aria-label`],Bn=[`aria-selected`,`aria-disabled`,`aria-label`,`disabled`,`tabindex`,`onClick`,`onKeydown`,`onFocus`,`onBlur`],Vn={class:`bing-tabs__tab-surface`},Hn={class:`bing-tabs__tab-content`},Un=R((0,t.defineComponent)({inheritAttrs:!1,__name:`BingTabs`,props:{modelValue:{default:void 0},items:{default:()=>[]},size:{default:`md`},variant:{default:`pill`},activation:{default:`auto`},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1},loop:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},respectReducedMotion:{type:Boolean,default:!0},smoothScroll:{type:[Boolean,Object],default:!0},ariaLabel:{default:`标签页`}},emits:[`update:modelValue`,`change`,`focus`,`blur`],setup(e,{emit:r}){let{playClickFeedback:i}=de(),a=e,o=r,s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)([]),d=(0,t.ref)(void 0),f=(0,t.ref)(-1),p=(0,t.ref)(!1),m,h,g=0,_=(0,t.computed)(()=>a.modelValue!==void 0),v=(0,t.computed)(()=>a.items.filter(e=>!e.disabled)),y=(0,t.computed)(()=>v.value[0]),b=(0,t.computed)(()=>_.value?a.modelValue:d.value??y.value?.value),x=(0,t.computed)(()=>a.items.findIndex(e=>Object.is(e.value,b.value))),S=(0,t.computed)(()=>[`bing-tabs`,`bing-tabs--${a.variant}`,`bing-tabs--${a.size}`,{"is-block":a.block,"is-disabled":a.disabled,"is-indicator-ready":p.value}]),C=(0,t.computed)(()=>Kt(a.smoothScroll,Gt,{keyboard:!1,smoothTouchpad:!1,respectReducedMotion:!0}));function w(){return typeof window<`u`}function T(){return!a.animated||a.respectReducedMotion&&w()&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function E(e,t){let n=t===`left`?`borderLeftWidth`:`borderTopWidth`,r=Number.parseFloat(window.getComputedStyle(e)[n]);return Number.isFinite(r)?r:t===`left`?e.clientLeft:e.clientTop}function D(e){return a.disabled||!!e.disabled}function O(e,t){e instanceof HTMLButtonElement&&(u.value[t]=e)}function k(e){return e.querySelector(`.bing-tabs__tab-surface`)??e}function A(e){return D(a.items[e])?-1:f.value>=0?f.value===e?0:-1:x.value===e?0:-1}function j(e,t){let n=a.items.length;if(n===0)return-1;let r=e;for(let e=0;e<n;e+=1){if(r+=t,a.loop)r=(r+n)%n;else if(r<0||r>=n)return-1;let e=a.items[r];if(e&&!D(e))return r}return-1}function M(e){let t=(e===`first`?a.items:[...a.items].reverse()).findIndex(e=>!D(e));return t<0?-1:e===`first`?t:a.items.length-1-t}function N(e){return a.items.find(t=>Object.is(t.value,e))}function P(){return w()&&!!s.value?.contains(document.activeElement)}function F(e=!1){if(a.activation!==`auto`||x.value<0)return;let t=a.items[x.value];!t||D(t)||(f.value=x.value,e&&P()&&R(x.value))}function I(e,t){if(D(e)){t.preventDefault();return}i(t,u.value[a.items.indexOf(e)]);let n=b.value;if(Object.is(n,e.value))return;_.value||(d.value=e.value);let r={value:e.value,previousValue:n,item:e,previousItem:N(n),event:t};o(`update:modelValue`,e.value),o(`change`,r)}function L(e,t,n){n.defaultPrevented||(f.value=t,I(e,n))}function R(e){let t=u.value[e];t&&(c.value?.stop(),f.value=e,t.focus())}function z(e,n){let r=a.items[e];!r||D(r)||(n.preventDefault(),R(e),a.activation===`auto`&&(I(r,n),(0,t.nextTick)().then(()=>{Object.is(b.value,r.value)||F(!0)})))}function B(e,t){if(t.key===`ArrowRight`||t.key===`ArrowDown`){z(j(e,1),t);return}if(t.key===`ArrowLeft`||t.key===`ArrowUp`){z(j(e,-1),t);return}if(t.key===`Home`){z(M(`first`),t);return}if(t.key===`End`){z(M(`last`),t);return}if(t.key===`Enter`||t.key===` `){let n=a.items[e];if(!n)return;t.preventDefault(),I(n,t)}}function V(e,t,n){c.value?.stop(),f.value=t,o(`focus`,{value:e.value,item:e,event:n})}function H(e,t){s.value?.contains(t.relatedTarget)||(f.value=-1),o(`blur`,{value:e.value,item:e,event:t})}function U(e){if(C.value!==!1&&(c.value?.handleWheel(e)??!1)||e.defaultPrevented||!s.value)return;let t=e.deltaX||(e.shiftKey?e.deltaY:0),n=Math.max(0,s.value.scrollWidth-s.value.clientWidth);n>.5&&(t<0?s.value.scrollLeft>.5:t>0&&s.value.scrollLeft<n-.5)&&e.stopPropagation()}function ee(e=!0){w()&&(g&&window.cancelAnimationFrame(g),g=window.requestAnimationFrame(()=>{g=0,W(e)}))}function W(e=!0){let t=s.value,r=l.value,i=u.value[x.value];if(!t||!r||!i||x.value<0){r&&n.gsap.set(r,{autoAlpha:0}),p.value=!1;return}let a=t.getBoundingClientRect(),o=k(i).getBoundingClientRect(),c=r.getBoundingClientRect(),d=E(t,`left`),f=E(t,`top`),h=Math.max(1,o.width),g=Math.max(1,o.height),_=o.left-a.left-d+t.scrollLeft,v=o.top-a.top-f,y=p.value&&c.width>0&&c.height>0,b=y?c.left-a.left-d+t.scrollLeft:_,S=y?c.top-a.top-f:v,C=y?c.width/h:1,w=y?c.height/g:1,D=e&&y&&!T();m?.kill(),n.gsap.set(r,{width:h,height:g,transformOrigin:`0 0`,willChange:`transform, opacity`}),D?m=n.gsap.fromTo(r,{x:b,y:S,scaleX:C,scaleY:w,autoAlpha:1},{x:_,y:v,scaleX:1,scaleY:1,autoAlpha:1,duration:.42,ease:`power3.out`,overwrite:`auto`,force3D:!0,onComplete:()=>{m=void 0}}):n.gsap.set(r,{x:_,y:v,scaleX:1,scaleY:1,autoAlpha:1,force3D:!0}),p.value=!0}return(0,t.onBeforeUpdate)(()=>{u.value=[]}),(0,t.onMounted)(()=>{(0,t.nextTick)().then(()=>{W(!1)}),typeof ResizeObserver<`u`&&s.value&&(h=new ResizeObserver(()=>{ee(!1)}),h.observe(s.value))}),(0,t.onBeforeUnmount)(()=>{m?.kill(),c.value?.stop(),g&&w()&&window.cancelAnimationFrame(g),h?.disconnect()}),(0,t.watch)(()=>a.smoothScroll,()=>c.value?.stop(),{deep:!0}),(0,t.watch)(()=>[b.value,a.items.length,a.size,a.variant,a.block],()=>{(0,t.nextTick)().then(()=>{W(!0)})}),(0,t.watch)(x,()=>{f.value<0||!P()||(0,t.nextTick)().then(()=>{F(!0)})}),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)(fn,{ref_key:`scrollbarRef`,ref:c,class:(0,t.normalizeClass)([`bing-tabs__scroll`,{"is-block":e.block}]),vertical:!1,horizontal:``,focusable:!1,smooth:C.value},{viewport:(0,t.withCtx)(({viewportRef:r,viewportAttrs:i})=>[(0,t.createElementVNode)(`div`,(0,t.mergeProps)((0,t.mergeProps)(n.$attrs,{...i,onWheel:U}),{ref:e=>{s.value=e,r(e)},class:S.value,role:`tablist`,"aria-orientation":`horizontal`,"aria-label":e.ariaLabel}),[(0,t.createElementVNode)(`span`,{ref_key:`indicatorRef`,ref:l,class:`bing-tabs__indicator`,"aria-hidden":`true`},null,512),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:String(e.value),ref_for:!0,ref:e=>O(e,r),class:(0,t.normalizeClass)([`bing-tabs__tab`,{"is-active":Object.is(e.value,b.value),"is-disabled":D(e)}]),type:`button`,role:`tab`,"aria-selected":Object.is(e.value,b.value),"aria-disabled":D(e)||void 0,"aria-label":e.ariaLabel,disabled:D(e),tabindex:A(r),onClick:t=>L(e,r,t),onKeydown:e=>B(r,e),onFocus:t=>V(e,r,t),onBlur:t=>H(e,t)},[(0,t.createElementVNode)(`span`,Vn,[(0,t.createElementVNode)(`span`,Hn,[(0,t.renderSlot)(n.$slots,`item`,{item:e,active:Object.is(e.value,b.value),disabled:D(e)},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)])])],42,Bn))),128))],16,zn)]),_:3},8,[`class`,`smooth`]))}}),[[`__scopeId`,`data-v-e740be89`]]),Wn=[`aria-hidden`],Gn=R((0,t.defineComponent)({__name:`BingAppSwitcherTransition`,props:{modelValue:{default:void 0},items:{default:()=>[]},disabled:{type:Boolean,default:!1},respectReducedMotion:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTabs:{type:Boolean,default:!0},ariaLabel:{default:`应用切换面板`}},emits:[`update:modelValue`,`change`],setup(e,{emit:r}){let i=e,a=r,o=(0,t.ref)([]),s=(0,t.ref)(null),c=(0,t.ref)(!1),l=(0,t.ref)(void 0),u,d=0,f,p,m=(0,t.computed)(()=>i.items.filter(e=>!e.disabled)),h=(0,t.computed)(()=>m.value[0]),g=(0,t.computed)(()=>i.modelValue!==void 0),_=(0,t.computed)(()=>g.value?i.modelValue:l.value??h.value?.value),v=(0,t.computed)(()=>{let e=i.items.findIndex(e=>Object.is(e.value,_.value));return e>=0?e:0}),y=(0,t.computed)(()=>i.items.map(e=>({...e,value:e.value,label:e.label,disabled:i.disabled||e.disabled})));function b(){return typeof window<`u`}function x(){return i.disabled||i.respectReducedMotion&&Rn()}function S(e){let t=i.items.length;return t===0?0:i.loop?(e+t)%t:Math.min(Math.max(e,0),t-1)}function C(e,t){let n=e-t,r=i.items.length;return r===0?0:(n>r/2&&(n-=r),n<r/-2&&(n+=r),n)}function w(e,t,n=t){let r=C(e,t),i=Math.abs(r),a=e===n;return{xPercent:r*58,y:30+i*3,scale:a?.68:.6,rotation:r*-1.4,opacity:a?.98:Math.max(.46,.66-i*.1),zIndex:a?18:10-i,force3D:!0}}function T(e,t){let n=C(e,t),r=Math.abs(n);return{xPercent:n*116,y:r===0?0:22,scale:r===0?1:.78,rotation:n*-1.4,opacity:+(r===0),zIndex:r===0?24:5-r,force3D:!0}}function E(e,t){e instanceof HTMLElement&&(o.value[t]=e)}function D(e){let t=i.items[e];if(!t||i.disabled||t.disabled||Object.is(t.value,_.value))return!1;let n=_.value,r=i.items.find(e=>Object.is(e.value,n));return p=t.value,g.value||(l.value=t.value),a(`update:modelValue`,t.value),a(`change`,{value:t.value,previousValue:n,item:t,previousItem:r}),!0}function O(e=v.value,t=!1){let r=t||x()?0:.32;u?.kill(),u=n.gsap.timeline({defaults:{duration:r,ease:`power3.out`,overwrite:`auto`},onStart:()=>{c.value=!0},onComplete:()=>{c.value=!1,u=void 0},onInterrupt:()=>{c.value=!1}}),o.value.forEach((t,n)=>{u?.to(t,T(n,e),0)})}function k(e,t){let r=C(e,t)>=0?1:-1;if(x()){O(e,!0);return}u?.kill(),c.value=!0,u=n.gsap.timeline({defaults:{overwrite:`auto`},onComplete:()=>{c.value=!1,u=void 0},onInterrupt:()=>{c.value=!1}}),s.value&&u.to(s.value,{x:r*-10,scale:.996,duration:.16,ease:`power2.out`,force3D:!0},0).to(s.value,{x:0,scale:1,duration:.5,ease:`expo.out`,force3D:!0},.18),o.value.forEach((e,n)=>{u?.to(e,{...w(n,t,t),duration:.2,ease:`power3.out`},0)}),o.value.forEach((t,n)=>{u?.to(t,{...w(n,e,e),duration:.34,ease:`power3.inOut`},.1)}),o.value.forEach((t,n)=>{let r=T(n,e),i=n===e;u?.to(t,{...r,duration:i?.48:.32,ease:i?`expo.out`:`power3.out`},i?.3:.34)})}function A(e){let t=S(e),n=v.value;t===v.value||c.value||!D(t)||k(t,n)}function j(e){A(i.items.findIndex(t=>Object.is(t.value,e)))}function M(e){e.defaultPrevented||i.disabled||Math.abs(e.deltaX)<=Math.abs(e.deltaY)||(e.preventDefault(),!(c.value||!b())&&(d+=e.deltaX,f&&window.clearTimeout(f),f=window.setTimeout(()=>{let e=d>0?1:-1,t=Math.abs(d)>34;d=0,f=void 0,t&&A(v.value+e)},58)))}return(0,t.onBeforeUpdate)(()=>{o.value=[]}),(0,t.onMounted)(()=>{(0,t.nextTick)().then(()=>{o.value.forEach(e=>{n.gsap.set(e,{transformOrigin:`50% 50%`,willChange:`transform, opacity`,force3D:!0})}),O(v.value,!0)})}),(0,t.onBeforeUnmount)(()=>{u?.kill(),n.gsap.killTweensOf(o.value),s.value&&n.gsap.killTweensOf(s.value),f&&b()&&window.clearTimeout(f)}),(0,t.watch)(_,(e,n)=>{if(e===void 0)return;if(Object.is(e,p)){p=void 0;return}let r=i.items.findIndex(t=>Object.is(t.value,e));if(r<0)return;let a=i.items.findIndex(e=>Object.is(e.value,n));(0,t.nextTick)().then(()=>{if(a<0){O(r,!0);return}k(r,a)})}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`section`,{class:(0,t.normalizeClass)([`bing-app-switcher-transition`,{"is-disabled":e.disabled}]),onWheel:M},[(0,t.createElementVNode)(`div`,{ref_key:`stageRef`,ref:s,class:`bing-app-switcher-transition__stage`},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`article`,{key:String(e.value),ref_for:!0,ref:e=>E(e,r),class:(0,t.normalizeClass)([`bing-app-switcher-transition__card`,{"is-active":Object.is(_.value,e.value)}]),"aria-hidden":!Object.is(_.value,e.value)},[(0,t.renderSlot)(n.$slots,`default`,{item:e,index:r,active:Object.is(_.value,e.value),isAnimating:c.value},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)],10,Wn))),128))],512),e.showTabs?((0,t.openBlock)(),(0,t.createBlock)(Un,{key:0,items:y.value,"model-value":_.value,variant:`glass`,size:`md`,block:``,disabled:e.disabled,loop:e.loop,"respect-reduced-motion":e.respectReducedMotion,"aria-label":e.ariaLabel,"onUpdate:modelValue":j},null,8,[`items`,`model-value`,`disabled`,`loop`,`respect-reduced-motion`,`aria-label`])):(0,t.createCommentVNode)(``,!0)],34))}}),[[`__scopeId`,`data-v-bacda41f`]]),Kn={glass:!0,glassBlur:16,glassOpacity:.85,glassSaturation:1.28};function qn(e,t,n){return Math.min(n,Math.max(t,e))}function Jn(e){if(typeof e==`number`)return`${Math.max(0,e)}px`;let t=e.trim();return/^-?\d+(\.\d+)?$/.test(t)?`${Math.max(0,Number(t))}px`:e}function Yn(e,t){let n=t.glass!==!1,r=n?t.glassBlur===void 0?`var(--bing-glass-blur, 16px)`:Jn(t.glassBlur):`0px`,i=n?t.glassOpacity===void 0?`var(--bing-glass-opacity, 0.85)`:qn(t.glassOpacity,0,1):1,a=n?t.glassSaturation===void 0?`var(--bing-glass-saturation, 1.05)`:Math.max(0,t.glassSaturation):1;return{[`--${e}-glass-blur`]:r,[`--${e}-glass-opacity`]:String(i),[`--${e}-glass-saturation`]:String(a)}}var Xn={class:`bing-card__face bing-card__front`},Zn={key:1,class:`bing-card__media`},Qn={class:`bing-card__content`},$n={key:0,class:`bing-card__header`},er={class:`bing-card__heading`},tr={key:0,class:`bing-card__title`},nr={key:1,class:`bing-card__description`},rr={key:1,class:`bing-card__body`},ir={key:2,class:`bing-card__footer`},ar={class:`bing-card__face bing-card__back`,"aria-hidden":`true`},or=10,sr=R((0,t.defineComponent)({__name:`BingCard`,props:{title:{default:void 0},description:{default:void 0},variant:{default:`soft`},padding:{default:`md`},rounded:{default:`md`},glass:{type:Boolean,default:!0},interactive:{type:Boolean,default:!0},tilt:{type:Boolean,default:!0},tiltMax:{default:8},tiltScale:{default:1.015},glare:{type:Boolean,default:!0},entrance:{default:`fade-up`},entranceOnce:{type:Boolean,default:!0},entranceDelay:{default:0},entranceDuration:{default:.72},flipAxis:{default:`x`},flipTurns:{default:2.5},flipEase:{default:`power4.out`},flipTrigger:{default:`press`},longPressDelay:{default:560},longPressRelease:{default:`restore`},disabled:{type:Boolean,default:!1},glassBlur:{default:void 0},glassOpacity:{default:void 0},glassSaturation:{default:void 0}},emits:[`enter`,`long-press`,`flip`],setup(e,{emit:r}){let{playClickFeedback:i}=de(),a=e,o=r,s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(!1),p=(0,t.ref)(!1),m=(0,t.ref)(!1),h,g,_,v,y,b=!1,x=!1,S=0,C=0,w=!1,T=(0,t.computed)(()=>a.flipAxis===`z`?`y`:a.flipAxis),E=(0,t.computed)(()=>a.disabled?`none`:a.flipTrigger),D=(0,t.computed)(()=>[`bing-card`,`bing-card--${a.variant}`,`bing-card--padding-${a.padding}`,`bing-card--rounded-${a.rounded}`,`bing-card--back-axis-${T.value}`,{"is-glass":a.glass,"is-interactive":a.interactive,"is-tilt":a.tilt,"is-glare":a.glare,"is-flipped":p.value,"is-pressing":m.value,"is-long-press-enabled":E.value===`press`,"is-click-flip-enabled":E.value===`click`,"is-disabled":a.disabled,"has-entered":f.value}]),O=(0,t.computed)(()=>({...Yn(`bing-card`,{glass:a.glass,glassBlur:a.glassBlur,glassOpacity:a.glassOpacity,glassSaturation:a.glassSaturation}),"--bing-card-tilt-max":`${a.tiltMax}deg`})),k=(0,t.computed)(()=>!!(a.title||a.description));function A(){return typeof window<`u`&&typeof document<`u`}function j(){return A()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function M(e,t,n){return Math.min(n,Math.max(t,e))}function N(e){return e===`x`?`rotationX`:e===`y`?`rotationY`:`rotation`}function P(){return{rotationX:0,rotationY:0,rotation:0,[N(T.value)]:p.value?180:0}}function F(e,t){return p.value?T.value===`x`?{rotationX:180+e,rotationY:t,rotation:0}:{rotationX:e,rotationY:180+t,rotation:0}:{rotationX:e,rotationY:t,rotation:0}}function I(){return a.interactive&&a.tilt&&!a.disabled&&!j()&&!x&&!b&&c.value}function L(e){if(G(e),!I())return;let t=s.value,r=c.value;if(!t||!r)return;let i=t.getBoundingClientRect();if(i.width===0||i.height===0)return;let o=M((e.clientX-i.left)/i.width,0,1),u=M((e.clientY-i.top)/i.height,0,1),d=Math.max(0,a.tiltMax),f=(o-.5)*d*2,p=(.5-u)*d*2;n.gsap.to(r,{...F(p,f),scale:Math.max(1,a.tiltScale),transformPerspective:900,transformOrigin:`50% 50%`,duration:.34,ease:`power3.out`,overwrite:!0,force3D:!0}),a.glare&&l.value&&n.gsap.to(l.value,{"--bing-card-glare-x":`${o*100}%`,"--bing-card-glare-y":`${u*100}%`,opacity:1,duration:.24,ease:`power2.out`,overwrite:!0})}function R(){if(x)return;let e=c.value;e&&n.gsap.to(e,{...P(),scale:1,duration:.48,ease:`elastic.out(1, 0.72)`,overwrite:!0,force3D:!0}),l.value&&n.gsap.to(l.value,{opacity:0,duration:.26,ease:`power2.out`,overwrite:!0})}function z(){let e=N(a.flipAxis),t=-360*Math.max(1,a.flipTurns);return{from:{autoAlpha:0,y:34,z:a.flipAxis===`z`?0:-120,[e]:t,scale:.96,transformPerspective:900,transformOrigin:`50% 50%`},to:{autoAlpha:1,y:0,z:0,rotationX:0,rotationY:0,rotation:0,scale:1,ease:a.flipEase}}}function B(){switch(a.entrance){case`bubble`:return{from:{autoAlpha:0,y:18,scale:.78},to:{autoAlpha:1,y:0,scale:1,ease:`elastic.out(1, 0.64)`}};case`rotate-up`:return z();case`soft-pop`:return{from:{autoAlpha:0,y:10,scale:.92,filter:`blur(10px)`},to:{autoAlpha:1,y:0,scale:1,filter:`blur(0px)`,ease:`power3.out`}};default:return{from:{autoAlpha:0,y:26,scale:.98},to:{autoAlpha:1,y:0,scale:1,ease:`power3.out`}}}}function V(){_?.kill(),_=void 0,m.value=!1,u.value&&(n.gsap.killTweensOf(u.value),n.gsap.set(u.value,{"--bing-card-press-progress":0,"--bing-card-press-ring-scale":.78,autoAlpha:0})),d.value&&(n.gsap.killTweensOf(d.value),n.gsap.set(d.value,{autoAlpha:0,scale:.98}))}function H(){m.value=!1,u.value&&(n.gsap.killTweensOf(u.value),n.gsap.timeline().to(u.value,{"--bing-card-press-ring-scale":.96,autoAlpha:.82,duration:.1,ease:`power2.out`}).to(u.value,{"--bing-card-press-ring-scale":1.08,autoAlpha:0,duration:.38,ease:`power3.out`},.06)),d.value&&(n.gsap.killTweensOf(d.value),n.gsap.timeline().to(d.value,{autoAlpha:.18,scale:1,duration:.1,ease:`power2.out`}).to(d.value,{autoAlpha:0,scale:1.015,duration:.38,ease:`power3.out`},.06))}function U(e=!p.value){let t=c.value;if(!t||a.disabled||x||p.value===e)return;p.value=e;let r=n.gsap.to(t,{...P(),scale:1,transformPerspective:900,transformOrigin:`50% 50%`,duration:.68,ease:`power3.inOut`,overwrite:!0,force3D:!0,onComplete:()=>{v===r&&(b=!1)},onInterrupt:()=>{v===r&&(b=!1)}});v=r,b=!0,o(`flip`,e?`back`:`front`)}function ee(e){if(!A()||E.value!==`press`||x||e.button!==0)return;V(),w=!1,S=e.clientX,C=e.clientY,m.value=!0;let t=s.value?.getBoundingClientRect(),r=t&&t.width>0?`${M((e.clientX-t.left)/t.width*100,0,100)}%`:`50%`,i=t&&t.height>0?`${M((e.clientY-t.top)/t.height*100,0,100)}%`:`50%`;try{e.currentTarget?.setPointerCapture?.(e.pointerId)}catch{}u.value&&(n.gsap.set(u.value,{"--bing-card-press-progress":0,"--bing-card-press-x":r,"--bing-card-press-y":i,"--bing-card-press-ring-scale":.78,autoAlpha:1}),_=n.gsap.to(u.value,{"--bing-card-press-progress":1,"--bing-card-press-ring-scale":.98,duration:Math.max(120,a.longPressDelay)/1e3,ease:`none`,overwrite:!0,onComplete:()=>{if(_=void 0,w=!0,o(`long-press`),H(),a.longPressRelease===`restore`){U(!0);return}U()}})),d.value&&n.gsap.fromTo(d.value,{autoAlpha:0,scale:.98},{autoAlpha:1,scale:1,duration:Math.min(.24,Math.max(120,a.longPressDelay)/2e3),ease:`power2.out`,overwrite:!0})}function W(e){e.defaultPrevented||a.disabled||E.value!==`click`||x||e.target instanceof Element&&e.target.closest(`button,a[href],input,label,select,textarea,[role="button"],[role="tab"],[contenteditable]:not([contenteditable="false"])`)||(i(e),U())}function G(e){if(!_)return;let t=e.clientX-S,n=e.clientY-C;Math.hypot(t,n)>or&&V()}function te(){V(),w&&a.longPressRelease===`restore`&&U(!1),w=!1}function ne(){w||V(),!b&&R()}function re(){let e=s.value,t=c.value;if(!e||!t||a.disabled||f.value&&a.entranceOnce)return;if(f.value=!0,e.classList.add(`has-entered`),o(`enter`),y?.kill(),y=void 0,x=!1,h?.revert(),h=void 0,a.entrance===`none`||j()){n.gsap.set(t,{autoAlpha:1,clearProps:`transform,filter`});return}let r=B();h=n.gsap.context(()=>{let e=n.gsap.fromTo(t,r.from,{...r.to,duration:Math.max(.1,a.entranceDuration),delay:Math.max(0,a.entranceDelay),clearProps:`filter`,onComplete:()=>{y===e&&(y=void 0,x=!1)},onInterrupt:()=>{y===e&&(y=void 0,x=!1)}});y=e,x=!0},e)}function ie(){if(g?.disconnect(),g=void 0,!A()){re();return}if(a.entrance===`none`||j()){re();return}if(!(`IntersectionObserver`in window)){re();return}let e=s.value;e&&(g=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(re(),a.entranceOnce&&(g?.disconnect(),g=void 0))},{threshold:.18,rootMargin:`0px 0px -8% 0px`}),g.observe(e))}return(0,t.watch)(()=>[a.entrance,a.entranceOnce,a.entranceDelay,a.entranceDuration,a.flipAxis,a.flipTurns,a.flipEase,a.flipTrigger,a.disabled],()=>{V(),f.value=!1,(0,t.nextTick)(ie)},{flush:`post`}),(0,t.onMounted)(()=>{(0,t.nextTick)(ie)}),(0,t.onBeforeUnmount)(()=>{V(),y?.kill(),y=void 0,x=!1,v?.kill(),v=void 0,b=!1,g?.disconnect(),g=void 0,h?.revert(),h=void 0,n.gsap.killTweensOf([c.value,l.value,u.value,d.value].filter(Boolean))}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`article`,{ref_key:`rootRef`,ref:s,class:(0,t.normalizeClass)(D.value),style:(0,t.normalizeStyle)(O.value),onPointerdown:ee,onPointermove:L,onPointerup:te,onPointerleave:ne,onPointercancel:te,onLostpointercapture:te,onClick:W},[(0,t.createElementVNode)(`div`,{ref_key:`surfaceRef`,ref:c,class:`bing-card__surface`},[(0,t.createElementVNode)(`div`,Xn,[e.glare?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`glareRef`,ref:l,class:`bing-card__glare`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0),n.$slots.media?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Zn,[(0,t.renderSlot)(n.$slots,`media`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Qn,[n.$slots.header||k.value?((0,t.openBlock)(),(0,t.createElementBlock)(`header`,$n,[(0,t.renderSlot)(n.$slots,`header`,{},()=>[(0,t.createElementVNode)(`div`,er,[e.title?((0,t.openBlock)(),(0,t.createElementBlock)(`h3`,tr,(0,t.toDisplayString)(e.title),1)):(0,t.createCommentVNode)(``,!0),e.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,nr,(0,t.toDisplayString)(e.description),1)):(0,t.createCommentVNode)(``,!0)])],!0)])):(0,t.createCommentVNode)(``,!0),n.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,rr,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),n.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,ir,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])]),(0,t.createElementVNode)(`div`,ar,[(0,t.renderSlot)(n.$slots,`back`,{},()=>[r[0]||=(0,t.createElementVNode)(`div`,{class:`bing-card__back-mark`},`Bing UI`,-1),r[1]||=(0,t.createElementVNode)(`div`,{class:`bing-card__back-text`},`交互卡片`,-1)],!0)]),E.value===`press`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`pressAmbienceRef`,ref:d,class:`bing-card__press-ambience`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0),E.value===`press`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:1,ref_key:`pressFeedbackRef`,ref:u,class:`bing-card__press-feedback`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0)],512)],38))}}),[[`__scopeId`,`data-v-42286b35`]]),cr=Symbol(`BingCheckboxGroupContext`),lr=[`id`,`checked`,`indeterminate`,`disabled`,`name`,`value`,`aria-label`,`aria-describedby`,`aria-invalid`],ur={class:`bing-checkbox__control`,"aria-hidden":`true`},dr={key:1,class:`bing-checkbox__label`},fr=R((0,t.defineComponent)({__name:`BingCheckbox`,props:{id:{default:void 0},modelValue:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},size:{default:void 0},shape:{default:`rounded`},tone:{default:`primary`},label:{default:void 0},ariaLabel:{default:void 0},ariaDescribedby:{default:void 0},status:{default:void 0},name:{default:void 0},value:{default:void 0},decorative:{type:Boolean,default:!1}},emits:[`update:modelValue`,`change`,`focus`,`blur`],setup(e,{emit:r}){let i=e,a=r,{playClickFeedback:o}=de(),s=(0,t.useSlots)(),c=(0,t.inject)(cr,null),{formItem:l,resolvedSize:u,resolvedDisabled:d,resolvedStatus:f,resolvedId:p,resolvedAriaDescribedby:m}=he({get id(){return i.id},get size(){return i.size??c?.size.value},get disabled(){return c?.disabled.value||i.disabled},get status(){return i.status??c?.status.value},get ariaDescribedby(){return i.ariaDescribedby}},{register:!c}),h=(0,t.ref)(null),g=(0,t.ref)(null),_=(0,t.ref)(!1),v=null,y=(0,t.computed)(()=>!!(i.label||s.default)),b=(0,t.computed)(()=>i.name??c?.name.value),x=(0,t.computed)(()=>c?c.modelValue.value.some(e=>e===i.value):i.modelValue),S=(0,t.computed)(()=>[`bing-checkbox`,typeof u.value==`string`?`bing-checkbox--${u.value}`:void 0,`bing-checkbox--${i.shape}`,`bing-checkbox--${i.tone}`,`bing-checkbox--status-${f.value}`,{"is-checked":x.value,"is-indeterminate":i.indeterminate,"is-disabled":d.value,"is-invalid":f.value===`error`,"is-decorative":i.decorative,"is-check-exiting":_.value,"has-label":y.value&&!i.decorative}]),C=(0,t.computed)(()=>{if(typeof u.value==`number`)return{"--bing-checkbox-size":`${u.value}px`,"--bing-checkbox-radius":i.shape===`circle`?`50%`:`${Math.max(2,Math.round(u.value*.22))}px`}});function w(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function T(){n.gsap.killTweensOf([h.value,g.value].filter(e=>!!e))}function E(e,t,r,i){if(w()){_.value=!1;return}let a=h.value,o=g.value;if(!a||!o)return;let s=e&&!t,c=r&&!i;T(),_.value=!1,s?n.gsap.fromTo(a,{autoAlpha:0,rotation:-18,scale:.18},{autoAlpha:1,rotation:0,scale:1,duration:.28,ease:`back.out(3.4)`,clearProps:`transform,opacity,visibility`,overwrite:!0}):c&&(_.value=!0,n.gsap.fromTo(a,{autoAlpha:1,rotation:0,scale:1},{autoAlpha:0,rotation:0,scale:.32,duration:.18,ease:`power2.in`,clearProps:`transform,opacity,visibility`,overwrite:!0,onComplete:()=>{_.value=!1}})),t?n.gsap.fromTo(o,{autoAlpha:0,scaleX:.2},{autoAlpha:1,scaleX:1,duration:.2,ease:`back.out(2.4)`,clearProps:`transform,opacity,visibility`,overwrite:!0}):i&&n.gsap.fromTo(o,{autoAlpha:1,scaleX:1},{autoAlpha:0,scaleX:.2,duration:.12,ease:`power2.in`,clearProps:`transform,opacity,visibility`,overwrite:!0})}function D(e){if(e.defaultPrevented||d.value||i.decorative)return;let t=e.currentTarget.parentElement?.querySelector(`.bing-checkbox__control`);o(e,t)}function O(e){let t=e.target.checked;if(v={checked:t,indeterminate:i.indeterminate},E(t,i.indeterminate,x.value,i.indeterminate),c&&i.value!==void 0){c.updateValue(i.value,t,e);return}a(`update:modelValue`,t),a(`change`,t,e),l?.handleControlChange()}function k(e){a(`blur`,e),c?.handleCheckboxBlur(e),c||l?.handleControlBlur()}return(0,t.watch)(()=>[x.value,i.indeterminate],([e,t],[n,r])=>{if(v?.checked===e&&v.indeterminate===t){v=null;return}v=null,E(e,t,n,r)},{flush:`post`}),(0,t.onBeforeUnmount)(T),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.decorative?`span`:`label`),{class:(0,t.normalizeClass)(S.value),style:(0,t.normalizeStyle)(C.value),"aria-hidden":e.decorative||void 0},{default:(0,t.withCtx)(()=>[e.decorative?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`input`,{key:0,class:`bing-checkbox__input`,id:(0,t.unref)(p),type:`checkbox`,checked:x.value,indeterminate:e.indeterminate,disabled:(0,t.unref)(d),name:b.value,value:e.value,"aria-label":e.ariaLabel||void 0,"aria-describedby":(0,t.unref)(m),"aria-invalid":(0,t.unref)(f)===`error`||void 0,onChange:O,onClick:D,onFocus:r[0]||=e=>a(`focus`,e),onBlur:k},null,40,lr)),(0,t.createElementVNode)(`span`,ur,[(0,t.createElementVNode)(`span`,{ref_key:`checkRef`,ref:h,class:`bing-checkbox__check`},[(0,t.createVNode)(Q,{icon:(0,t.unref)(qe),size:`xs`,"stroke-width":2.25},null,8,[`icon`])],512),(0,t.createElementVNode)(`span`,{ref_key:`mixedRef`,ref:g,class:`bing-checkbox__mixed`},null,512)]),!e.decorative&&y.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,dr,[(0,t.renderSlot)(n.$slots,`default`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)])):(0,t.createCommentVNode)(``,!0)]),_:3},8,[`class`,`style`,`aria-hidden`]))}}),[[`__scopeId`,`data-v-7d6ea319`]]),pr=[`aria-label`],mr={class:`bing-resizable__content`},hr={key:0,class:`bing-resizable__size`,"aria-hidden":`true`},gr=[`aria-label`,`disabled`,`onPointerdown`,`onKeydown`],_r={class:`bing-resizable__handle-mark`,"aria-hidden":`true`},vr=R((0,t.defineComponent)({__name:`BingResizable`,props:{size:{default:void 0},defaultSize:{default:()=>({width:320,height:220})},position:{default:void 0},defaultPosition:{default:()=>({x:0,y:0})},minWidth:{default:80},minHeight:{default:80},maxWidth:{default:void 0},maxHeight:{default:void 0},mode:{default:`fixed`},snapMode:{default:`live`},directions:{default:()=>[`right`,`bottom`,`bottom-right`]},step:{default:1},disabled:{type:Boolean,default:!1},lockAspectRatio:{type:Boolean,default:!1},contain:{type:Boolean,default:!1},showSize:{type:Boolean,default:!1},handleSize:{default:12},ariaLabel:{default:void 0}},emits:[`update:size`,`update:position`,`resize-start`,`resize`,`resize-end`],setup(e,{expose:r,emit:i}){let a=[`top`,`right`,`bottom`,`left`,`top-left`,`top-right`,`bottom-left`,`bottom-right`],o={top:Ve,right:Be,bottom:Ve,left:Be,"top-left":He,"top-right":Ue,"bottom-left":Le,"bottom-right":Re},s=e,c=i,l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(R(s.defaultSize)),p=(0,t.ref)(R(s.defaultSize)),m=(0,t.ref)(z(s.defaultPosition)),h=(0,t.ref)(z(s.defaultPosition)),g=(0,t.ref)(!1),_=(0,t.ref)(!1),v=(0,t.ref)(!1),y=(0,t.ref)(null),b,x={x:0,y:0},S=``,C=``,w=``,T=``,E=!1,D=(0,t.computed)(()=>[`bing-resizable`,`bing-resizable--${s.mode}`,{"is-disabled":s.disabled,"is-resizing":v.value,"is-contain":s.contain,"is-ratio-locked":s.lockAspectRatio}]),O=(0,t.computed)(()=>v.value?p.value:s.size?s.size:g.value?f.value:s.defaultSize),k=(0,t.computed)(()=>v.value?h.value:s.position?z(s.position):_.value?m.value:z(s.defaultPosition)),A=(0,t.computed)(()=>R(O.value)),j=(0,t.computed)(()=>{let e=k.value;return{width:I(O.value.width),height:I(O.value.height),minWidth:I(s.minWidth),minHeight:I(s.minHeight),maxWidth:I(s.maxWidth),maxHeight:I(s.maxHeight),left:`${e.x}px`,top:`${e.y}px`,"--bing-resizable-handle-size":`${Math.max(6,s.handleSize)}px`}}),M=(0,t.computed)(()=>s.directions.filter(e=>a.includes(e))),N=(0,t.computed)(()=>{let e=v.value?p.value:A.value;return`${Math.round(e.width)} × ${Math.round(e.height)}`});function P(){return typeof window<`u`&&typeof document<`u`}function F(){return P()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function I(e){return typeof e==`number`?`${e}px`:e}function L(e,t){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Number.parseFloat(e);if(Number.isFinite(t))return t}return t}function R(e){return{width:Math.max(0,L(e?.width,320)),height:Math.max(0,L(e?.height,220))}}function z(e){return{x:L(e?.x,0),y:L(e?.y,0)}}function B(e){return Math.round(e*1e3)/1e3}function V(e,t,n){return Math.min(n,Math.max(t,e))}function H(e,t){return!Number.isFinite(t)||t<=1?e:Math.round(e/t)*t}function U(e,t){return Math.abs(e.width-t.width)<.001&&Math.abs(e.height-t.height)<.001}function ee(e,t){return Math.abs(e.x-t.x)<.001&&Math.abs(e.y-t.y)<.001}function W(){if(typeof s.step==`number`){let e=Math.max(1,s.step);return{x:e,y:e}}return{x:Math.max(1,s.step.x??1),y:Math.max(1,s.step.y??1)}}function G(e){return{top:e.includes(`top`),right:e.includes(`right`),bottom:e.includes(`bottom`),left:e.includes(`left`)}}function te(e){return e===`top`||e===`bottom`?`ns-resize`:e===`left`||e===`right`?`ew-resize`:e===`top-left`||e===`bottom-right`?`nwse-resize`:`nesw-resize`}function ne(e){return[`ew-resize`,`ns-resize`,`nwse-resize`,`nesw-resize`].includes(e)}function re(e){let t=G(e);return`${t.left?`100%`:t.right?`0%`:`50%`} ${t.top?`100%`:t.bottom?`0%`:`50%`}`}function ie(e){return`调整${{top:`上边`,right:`右边`,bottom:`下边`,left:`左边`,"top-left":`左上角`,"top-right":`右上角`,"bottom-left":`左下角`,"bottom-right":`右下角`}[e]}尺寸`}function ae(){let e=l.value?.getBoundingClientRect();return{width:e?.width?e.width:L(O.value.width,A.value.width),height:e?.height?e.height:L(O.value.height,A.value.height)}}function K(){if(!s.contain)return null;let e=l.value?.parentElement,t=e?.getBoundingClientRect();if(!e||!t?.width||!t?.height)return null;let n=window.getComputedStyle(e),r=L(n.paddingLeft,0)+L(n.paddingRight,0)+L(n.borderLeftWidth,0)+L(n.borderRightWidth,0),i=L(n.paddingTop,0)+L(n.paddingBottom,0)+L(n.borderTopWidth,0)+L(n.borderBottomWidth,0);return{width:Math.max(0,t.width-r),height:Math.max(0,t.height-i)}}function oe(){return{minWidth:Math.max(0,L(s.minWidth,0)),minHeight:Math.max(0,L(s.minHeight,0)),maxWidth:Math.max(0,L(s.maxWidth,1/0)),maxHeight:Math.max(0,L(s.maxHeight,1/0))}}function se(e,t,n){let r=oe();if(s.lockAspectRatio&&n&&n.aspectRatio>0){let i=n.aspectRatio,a=V(le(e,t,n.direction,n)===`width`?e:t*i,Math.max(r.minWidth,r.minHeight*i),Math.min(r.maxWidth,r.maxHeight*i));return{width:a,height:a/i}}return{width:V(e,r.minWidth,r.maxWidth),height:V(t,r.minHeight,r.maxHeight)}}function ce(e,t,n,r){if(!s.lockAspectRatio||r.aspectRatio<=0)return{width:e,height:t};let i=G(n),a=r.aspectRatio;return(i.left||i.right)&&!(i.top||i.bottom)?{width:e,height:e/a}:(i.top||i.bottom)&&!(i.left||i.right)?{width:t*a,height:t}:Math.abs(e-r.startSize.width)>=Math.abs(t-r.startSize.height)?{width:e,height:e/a}:{width:t*a,height:t}}function le(e,t,n,r){let i=G(n);return(i.left||i.right)&&!(i.top||i.bottom)?`width`:(i.top||i.bottom)&&!(i.left||i.right)?`height`:Math.abs(e-r.startSize.width)>=Math.abs(t-r.startSize.height)?`width`:`height`}function ue(e,t,n,r){let i=W();if(s.lockAspectRatio&&r.aspectRatio>0){if(le(e,t,n,r)===`width`){let t=H(e,i.x);return{width:t,height:t/r.aspectRatio}}let a=H(t,i.y);return{width:a*r.aspectRatio,height:a}}return{width:H(e,i.x),height:H(t,i.y)}}function q(e,t){let n=G(t.direction);if(t.mode===`mirror`){let n=Math.abs(e.width-t.startSize.width)>.001,r=Math.abs(e.height-t.startSize.height)>.001;return{x:n?t.startPosition.x+(t.startSize.width-e.width)/2:t.startPosition.x,y:r?t.startPosition.y+(t.startSize.height-e.height)/2:t.startPosition.y}}return{x:n.left?t.startPosition.x+t.startSize.width-e.width:t.startPosition.x,y:n.top?t.startPosition.y+t.startSize.height-e.height:t.startPosition.y}}function de(e,t,n){if(!n.parentSize)return{size:e,position:t};let r=e.width,i=e.height,a=t.x,o=t.y;return a<0&&(r+=a,a=0),o<0&&(i+=o,o=0),a+r>n.parentSize.width&&(r=n.parentSize.width-a),o+i>n.parentSize.height&&(i=n.parentSize.height-o),{size:se(r,i),position:{x:a,y:o}}}function fe(e,t,n,r=e.snapMode===`live`){let i=G(e.direction),a=e.mode===`mirror`?2:1,o=e.startSize.width+((i.right?t:0)-(i.left?t:0))*a,s=e.startSize.height+((i.bottom?n:0)-(i.top?n:0))*a,c=ce(o,s,e.direction,e);if(o=c.width,s=c.height,r){let t=ue(o,s,e.direction,e);o=t.width,s=t.height}let l=se(o,s,e),u=q(l,e),d=de(l,u,e);return l=d.size,u=d.position,{size:{width:B(l.width),height:B(l.height)},position:{x:B(u.x),y:B(u.y)}}}function pe(e,t,n){let r=ae();return{direction:e,startClientX:t,startClientY:n,startSize:r,startPosition:k.value,aspectRatio:r.height>0?r.width/r.height:1,mode:s.mode,snapMode:s.snapMode,parentSize:K()}}function me(e,t,n){return{direction:e,size:p.value,position:h.value,delta:t,event:n}}function he(){s.size||(f.value=p.value,g.value=!0),s.position||(m.value=h.value,_.value=!0),c(`update:size`,p.value),c(`update:position`,h.value)}function ge(e){if(!P()||E)return;let t=te(e);S=ne(document.documentElement.style.cursor)?``:document.documentElement.style.cursor,C=ne(document.body?.style.cursor??``)?``:document.body?.style.cursor??``,w=document.documentElement.style.userSelect,T=document.body?.style.userSelect??``,document.documentElement.style.cursor=t,document.body.style.cursor=t,document.documentElement.style.userSelect=`none`,document.body.style.userSelect=`none`,E=!0}function _e(){!P()||!E||(document.documentElement.style.cursor=S,document.body.style.cursor=C,document.documentElement.style.userSelect=w,document.body.style.userSelect=T,S=``,C=``,w=``,T=``,E=!1)}function ve(){if(P()){window.addEventListener(`pointermove`,Ce),window.addEventListener(`pointerup`,Y),window.addEventListener(`pointercancel`,Y),window.addEventListener(`pointerout`,Te),window.addEventListener(`blur`,we),window.addEventListener(`keydown`,De),document.addEventListener(`visibilitychange`,Ee);try{window.parent&&window.parent!==window&&(window.parent.addEventListener(`pointerup`,Y),window.parent.addEventListener(`pointercancel`,Y),window.parent.addEventListener(`blur`,we))}catch{}}}function ye(){if(P()){window.removeEventListener(`pointermove`,Ce),window.removeEventListener(`pointerup`,Y),window.removeEventListener(`pointercancel`,Y),window.removeEventListener(`pointerout`,Te),window.removeEventListener(`blur`,we),window.removeEventListener(`keydown`,De),document.removeEventListener(`visibilitychange`,Ee);try{window.parent&&window.parent!==window&&(window.parent.removeEventListener(`pointerup`,Y),window.parent.removeEventListener(`pointercancel`,Y),window.parent.removeEventListener(`blur`,we))}catch{}}}function be(e){F()||(u.value&&n.gsap.to(u.value,{scale:1.006,transformOrigin:re(e),duration:.16,ease:`power2.out`,overwrite:!0,force3D:!0}),d.value&&n.gsap.fromTo(d.value,{autoAlpha:0,scale:.985},{autoAlpha:1,scale:1,transformOrigin:re(e),duration:.18,ease:`power2.out`,overwrite:!0,force3D:!0}))}function xe(e){F()||(u.value&&n.gsap.to(u.value,{scale:1,transformOrigin:re(e),duration:.42,ease:`elastic.out(1, 0.78)`,overwrite:!0,force3D:!0}),d.value&&n.gsap.to(d.value,{autoAlpha:0,scale:1.018,transformOrigin:re(e),duration:.28,ease:`power3.out`,overwrite:!0,force3D:!0}))}function Se(e,t){if(!(s.disabled||t.button!==0)){t.preventDefault(),b=pe(e,t.clientX,t.clientY),x={x:0,y:0},p.value=b.startSize,h.value=b.startPosition,y.value=e,v.value=!0,ge(e),ve(),be(e);try{t.currentTarget?.setPointerCapture?.(t.pointerId)}catch{}c(`resize-start`,me(e,x,t))}}function Ce(e){if(!b)return;e.preventDefault(),x={x:e.clientX-b.startClientX,y:e.clientY-b.startClientY};let t=fe(b,x.x,x.y);U(t.size,p.value)&&ee(t.position,h.value)||(p.value=t.size,h.value=t.position,he(),c(`resize`,me(b.direction,x,e)))}function J(e,t=!0){let n=b;if(ye(),_e(),!n)return;let r=n.direction;if(n.snapMode===`end`){let e=fe(n,x.x,x.y,!0);p.value=e.size,h.value=e.position}he(),e&&t&&c(`resize-end`,me(r,x,e)),xe(r),b=void 0,y.value=null,v.value=!1}function Y(e){J(e)}function we(){J(void 0,!1)}function Te(e){e.relatedTarget||(e.clientX<=0||e.clientY<=0||e.clientX>=window.innerWidth||e.clientY>=window.innerHeight)&&we()}function Ee(){document.visibilityState===`hidden`&&we()}function De(e){e.key===`Escape`&&J(e)}function Oe(e,t){let n=G(e),r=W(),i=t.shiftKey?4:1,a=r.x*i,o=r.y*i;return t.key===`ArrowLeft`&&(n.left||n.right)?{x:-a,y:0}:t.key===`ArrowRight`&&(n.left||n.right)?{x:a,y:0}:t.key===`ArrowUp`&&(n.top||n.bottom)?{x:0,y:-o}:t.key===`ArrowDown`&&(n.top||n.bottom)?{x:0,y:o}:null}function ke(e,t){if(s.disabled)return;let n=Oe(e,t);if(!n)return;t.preventDefault();let r=fe(pe(e,0,0),n.x,n.y,!0);p.value=r.size,h.value=r.position,y.value=e,v.value=!0,c(`resize-start`,me(e,{x:0,y:0},t)),he(),c(`resize`,me(e,n,t)),c(`resize-end`,me(e,n,t)),be(e),xe(e),y.value=null,v.value=!1}function X(){p.value=R(s.defaultSize),h.value=z(s.defaultPosition),f.value=p.value,m.value=h.value,g.value=!0,_.value=!0,c(`update:size`,p.value),c(`update:position`,h.value)}function Ae(){return v.value?p.value:R(O.value)}function je(){return k.value}return(0,t.onBeforeUnmount)(()=>{ye(),_e(),n.gsap.killTweensOf([u.value,d.value].filter(Boolean))}),r({reset:X,getSize:Ae,getPosition:je}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`rootRef`,ref:l,class:(0,t.normalizeClass)(D.value),style:(0,t.normalizeStyle)(j.value),role:`group`,"aria-label":e.ariaLabel},[(0,t.createElementVNode)(`div`,{ref_key:`surfaceRef`,ref:u,class:`bing-resizable__surface`},[(0,t.createElementVNode)(`div`,mr,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),(0,t.createElementVNode)(`span`,{ref_key:`feedbackRef`,ref:d,class:`bing-resizable__feedback`,"aria-hidden":`true`},null,512),e.showSize?((0,t.openBlock)(),(0,t.createElementBlock)(`output`,hr,(0,t.toDisplayString)(N.value),1)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(M.value,i=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:i,type:`button`,class:(0,t.normalizeClass)([`bing-resizable__handle`,[`bing-resizable__handle--${i}`,{"is-active":y.value===i}]]),"aria-label":ie(i),disabled:e.disabled,onPointerdown:e=>Se(i,e),onKeydown:e=>ke(i,e)},[(0,t.renderSlot)(n.$slots,`handle`,{direction:i,active:y.value===i},()=>[(0,t.createElementVNode)(`span`,_r,[r[0]||=(0,t.createElementVNode)(`span`,{class:`bing-resizable__handle-line`},null,-1),(0,t.createVNode)(Q,{class:`bing-resizable__handle-icon`,icon:o[i],size:i.includes(`-`)?13:14,"stroke-width":1.75},null,8,[`icon`,`size`])])],!0)],42,gr))),128))],512)],14,pr))}}),[[`__scopeId`,`data-v-0cb888b5`]]),yr=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function br(e){return xr(e)}function xr(e){return Array.isArray(e)?Sr(e):e instanceof RegExp?e:typeof e==`object`?Cr(e):e}function Sr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=xr(e[n]);return t}function Cr(e){let t={};for(let n in e)t[n]=xr(e[n]);return t}function wr(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Tr(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Tr(e.substring(0,e.length-1)):e.substr(~t+1)}var Er=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Dr=class{static hasCaptures(e){return e===null?!1:(Er.lastIndex=0,Er.test(e))}static replaceCaptures(e,t,n){return e.replace(Er,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Or(e,t){return e<t?-1:+(e>t)}function kr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Or(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Ar(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function jr(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Mr=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Nr=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Rr(e),t)}static createFromParsedTheme(e,t){return Vr(e,t)}_cachedMatchRoot=new Mr(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Fr(e.parent,t.parentScopes));return n?new Lr(n.fontStyle,n.foreground,n.background):null}},Pr=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Fr(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Ir(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Ir(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Lr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Rr(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&Ar(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Ar(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new zr(l,u,e,o,s,c)}}return n}var zr=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Br=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(Br||{});function Vr(e,t){e.sort((e,t)=>{let n=Or(e.scope,t.scope);return n!==0||(n=kr(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Hr(t),o=new Lr(n,a.getId(r),a.getId(i)),s=new Gr(new Wr(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Nr(a,o,s)}var Hr=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Ur=Object.freeze([]),Wr=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Ur,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Gr=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Wr.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(kr(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Wr(e,t,n,r,i))}},Kr=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Jr(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function qr(e){return e}function Jr(e){return e}function Yr(e,t){let n=[],r=Zr(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(Xr(i)){let e=[];do e.push(i),i=r.next();while(Xr(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function Xr(e){return!!e&&!!e.match(/[\w\.:]+/)}function Zr(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Qr(e){typeof e.dispose==`function`&&e.dispose()}var $r=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},ei=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},ti=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},ni=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new $r(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new ti;for(let n of e)ri(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof $r){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function ri(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof $r?ai({baseGrammar:a,selfGrammar:i},r):ii(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new $r(e))}function ii(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];oi([r],t,n)}}function ai(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&oi(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&oi(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function oi(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?wr({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&oi(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=fi(i);switch(a.kind){case 0:ai({...t,selfGrammar:t.baseGrammar},n);break;case 1:ai(t,n);break;case 2:ii(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?ii(a.ruleName,i,n):ai(i,n)}else a.kind===4?n.add(new ei(a.scopeName,a.ruleName)):n.add(new $r(a.scopeName));break}}}var si=class{kind=0},ci=class{kind=1},li=class{constructor(e){this.ruleName=e}kind=2},ui=class{constructor(e){this.scopeName=e}kind=3},di=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function fi(e){if(e===`$base`)return new si;if(e===`$self`)return new ci;let t=e.indexOf(`#`);return t===-1?new ui(e):t===0?new li(e.substring(1)):new di(e.substring(0,t),e.substring(t+1))}var pi=/\\(\d+)/,mi=/\\(\d+)/g,hi=-1,gi=-2;function _i(e){return e}function vi(e){return e}var yi=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Dr.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Dr.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Tr(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Dr.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Dr.replaceCaptures(this._contentName,e,t)}},bi=class extends yi{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},xi=class extends yi{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Ei(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Di,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Si=class extends yi{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Di,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ci=class extends yi{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Ei(i,this.id),this.beginCaptures=a,this._end=new Ei(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Di;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},wi=class extends yi{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Ei(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Ei(o,gi),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Di;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Di,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},Ti=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new bi(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new xi(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=wr({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Si(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new wi(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Ci(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=fi(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Si||e instanceof Ci||e instanceof wi)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Ei=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=pi.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return mi.lastIndex=0,this.source.replace(mi,(e,t)=>jr(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Di=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Oi(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Oi(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Oi=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
3
+ `&&((u=D.previousSibling)==null||u.remove(),j(document.createElement(`br`),e,D),U=U.slice(1)),!m&&U===``)j(T,e,D);else if(U===` `)e.insertBefore(document.createTextNode(` `),D);else{if(C&&U.charAt(0)===` `&&j(` `,e,D),b&&I===1&&!N&&S.indexOf(b.parentNode)>-1?(M=S[S.length-1],M.appendChild(document.createTextNode(r?``:U))):(M=n(r?``:U),j(M,e,D),b&&I===1&&!N&&M.insertBefore(b,M.firstChild)),r)for(R=v?k([...v.segment(U)].map(e=>e.segment),c):U.match(s)||x,W=0;W<R.length;W++)M.appendChild(R[W]===` `?document.createTextNode(` `):r(R[W]));if(a&&l){if(H=D.textContent=H.substring(U.length+1,H.length),L=M.getBoundingClientRect(),L.top>_.top&&L.left<=_.left){for(z=e.cloneNode(),B=e.childNodes[0];B&&B!==M;)V=B,B=B.nextSibling,z.appendChild(V);e.parentNode.insertBefore(z,e),i&&A(z)}_=L}(I<O.length||F)&&j(I>=O.length?` `:C&&U.slice(-1)===` `?` `+T:T,e,D)}e.removeChild(D),b=0}else D.nodeType===1&&(o&&o.indexOf(D)>-1?(S.indexOf(D.previousSibling)>-1&&S[S.length-1].appendChild(D),b=D):(P(D,t,n,r,i,a,o,s,c,!0),b=0),i&&A(D))},F=class e{constructor(e,t){this.isSplit=!1,_(),this.elements=b(e),this.chars=[],this.words=[],this.lines=[],this.masks=[],this.vars=t,this.elements.forEach(e=>{var n;t.overwrite!==!1&&((n=e[h])==null||n._data.orig.filter(({element:t})=>t===e).forEach(O)),e[h]=this}),this._split=()=>this.isSplit&&this.split(this.vars);let n=[],r,i=()=>{let e=n.length,t;for(;e--;){t=n[e];let r=t.element.offsetWidth;if(r!==t.width){t.width=r,this._split();return}}};this._data={orig:n,obs:typeof ResizeObserver<`u`&&new ResizeObserver(()=>{clearTimeout(r),r=setTimeout(i,200)})},S(this),this.split(t)}split(e){return(this._ctx||C).add(()=>{this.isSplit&&this.revert(),this.vars=e=e||this.vars||{};let{type:t=`chars,words,lines`,aria:n=`auto`,deepSlice:r=!0,smartWrap:i,onSplit:a,autoSplit:o=!1,specialChars:s,mask:c}=this.vars,l=t.indexOf(`lines`)>-1,u=t.indexOf(`chars`)>-1,d=t.indexOf(`words`)>-1,f=u&&!d&&!l,p=s&&(`push`in s?RegExp(`(?:`+s.join(`|`)+`)`,`gu`):s),h=p?RegExp(p.source+`|`+T.source,`gu`):T,g=!!e.ignore&&b(e.ignore),{orig:_,animTime:v,obs:x}=this._data,S;(u||d||l)&&(this.elements.forEach((t,a)=>{_[a]={element:t,html:t.innerHTML,ariaL:t.getAttribute(`aria-label`),ariaH:t.getAttribute(`aria-hidden`)},n===`auto`?t.setAttribute(`aria-label`,(t.textContent||``).trim()):n===`hidden`&&t.setAttribute(`aria-hidden`,`true`);let o=[],s=[],c=[],m=u?M(`char`,e,o):null,v=M(`word`,e,s),b,x,S,C;if(P(t,e,v,m,f,r&&(l||f),g,h,p,!1),l){let n=y(t.childNodes),r=N(t,n,e,c),i,a=[],o=0,s=n.map(e=>e.nodeType===1?e.getBoundingClientRect():E),l=E,u;for(b=0;b<n.length;b++)i=n[b],i.nodeType===1&&(i.nodeName===`BR`?((!b||n[b-1].nodeName!==`BR`)&&(a.push(i),r(o,b+1)),o=b+1,l=D(s,b)):(u=s[b],b&&u.top>l.top&&u.left<l.left+l.width-1&&(r(o,b),o=b),l=u));o<b&&r(o,b),a.forEach(e=>e.parentNode?.removeChild(e))}if(!d){for(b=0;b<s.length;b++)if(x=s[b],u||!x.nextSibling||x.nextSibling.nodeType!==3)if(i&&!l){for(S=document.createElement(`span`),S.style.whiteSpace=`nowrap`;x.firstChild;)S.appendChild(x.firstChild);x.replaceWith(S)}else x.replaceWith(...x.childNodes);else C=x.nextSibling,C&&C.nodeType===3&&(C.textContent=(x.textContent||``)+(C.textContent||``),x.remove());s.length=0,t.normalize()}this.lines.push(...c),this.words.push(...s),this.chars.push(...o)}),c&&this[c]&&this.masks.push(...this[c].map(e=>{let t=e.cloneNode();return e.replaceWith(t),t.appendChild(e),e.className&&(t.className=e.className.trim().split(` `).map(e=>e+`-mask`).join(` `)),t.style.overflow=`clip`,t}))),this.isSplit=!0,m&&l&&o&&m.addEventListener(`loadingdone`,this._split),(S=a&&a(this))&&S.totalTime&&(this._data.anim=v?S.totalTime(v):S),l&&o&&this.elements.forEach((e,t)=>{_[t].width=e.offsetWidth,x&&x.observe(e)})}),this}kill(){let{obs:e}=this._data;e&&e.disconnect(),m?.removeEventListener(`loadingdone`,this._split)}revert(){var e,t;if(this.isSplit){let{orig:n,anim:r}=this._data;this.kill(),n.forEach(O),this.chars.length=this.words.length=this.lines.length=n.length=this.masks.length=0,this.isSplit=!1,r&&(this._data.animTime=r.totalTime(),r.revert()),(t=(e=this.vars).onRevert)==null||t.call(e,this)}return this}static create(t,n){return new e(t,n)}static register(e){p=p||e||window.gsap,p&&(y=p.utils.toArray,S=p.core.context||S),!g&&window.innerWidth>0&&(m=document.fonts,g=!0)}};F.version=`3.15.0`;var I=F,L=(0,t.defineComponent)({__name:`BingAnimatedText`,props:{effect:{default:`none`},trigger:{default:`always`},disabled:{type:Boolean,default:!1},shineColor:{default:void 0},shineBaseColor:{default:void 0},shineSpeed:{default:3},shineDelay:{default:0},shineInterval:{default:1.6},shineDirection:{default:`left`},shineAngle:{default:120},jumpY:{default:-6},jumpStagger:{default:.035},jumpDuration:{default:.34},jumpEase:{default:`power2.out`},jumpReturnEase:{default:`back.out(2.4)`},jumpRepeatDelay:{default:1.2}},setup(e){let r=!1,i=e,a=(0,t.ref)(null),o=(0,t.ref)(null),s=(0,t.ref)(null),c,l,u,d,f,p=!1,m=!1,h=!1,g=``,_,v=(0,t.computed)(()=>i.effect!==`none`&&!i.disabled),y=(0,t.computed)(()=>v.value&&i.effect===`shine`),b=(0,t.computed)(()=>v.value&&i.effect===`jump`),x=(0,t.computed)(()=>[`bing-animated-text`,`bing-animated-text--${i.effect}`,{"is-disabled":i.disabled,"is-shine-active":y.value,[`bing-animated-text--shine-${i.trigger}`]:y.value,[`bing-animated-text--shine-direction-${i.shineDirection}`]:y.value,[`bing-animated-text--jump-${i.trigger}`]:b.value}]),S=(0,t.computed)(()=>{let e={};return b.value&&(e[`--animated-text-jump-room`]=`${Math.max(2,Math.abs(Math.min(0,i.jumpY))+2)}px`),y.value?(e[`--animated-text-shine-angle`]=`${i.shineAngle}deg`,i.shineColor&&(e[`--animated-text-shine-color`]=i.shineColor),i.shineBaseColor&&(e[`--animated-text-shine-base-color`]=i.shineBaseColor),e):e});function C(){return typeof window<`u`&&typeof document<`u`}function w(){return C()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function T(){r||=(n.gsap.registerPlugin(I),!0)}function E(){p=!1,a.value?.removeAttribute(`data-jump-playing`),a.value?.removeAttribute(`data-jump-ready`),u?.kill(),u=void 0,c?.revert(),c=void 0,l?.revert(),l=void 0,s.value?.replaceChildren()}function D(){return i.shineDirection===`left`?{start:`150% 0`,end:`-150% 0`}:{start:`-150% 0`,end:`150% 0`}}function O(){m=!1,a.value?.removeAttribute(`data-shine-playing`),d?.kill(),d=void 0,f?.kill(),f=void 0,o.value&&n.gsap.set(o.value,{clearProps:`backgroundPosition`})}function k(){i.trigger!==`always`||!y.value||w()||(f?.kill(),f=n.gsap.delayedCall(Math.max(0,i.shineInterval),()=>{f=void 0,A(0)}))}function A(e=i.shineDelay){let t=o.value;if(m||f||!t||!y.value||w())return;let r=D();m=!0,a.value?.setAttribute(`data-shine-playing`,`true`),n.gsap.set(t,{backgroundPosition:r.start}),d=n.gsap.to(t,{backgroundPosition:r.end,duration:Math.max(.1,i.shineSpeed),delay:Math.max(0,e),ease:`none`,overwrite:!0,onComplete:()=>{n.gsap.set(t,{backgroundPosition:r.start}),m=!1,d=void 0,a.value?.removeAttribute(`data-shine-playing`),k()}})}function j(){O(),!(!y.value||!o.value||w())&&(n.gsap.set(o.value,{backgroundPosition:D().start}),(i.trigger===`always`||i.trigger===`once`)&&A())}function M(){if(p||!c?.chars.length||!b.value||w())return;let e=Math.max(.1,i.jumpDuration),t=i.trigger===`always`;p=!0,a.value?.setAttribute(`data-jump-playing`,`true`),u=n.gsap.timeline({repeat:t?-1:0,repeatDelay:Math.max(0,i.jumpRepeatDelay),onComplete:()=>{p=!1,u=void 0,a.value?.removeAttribute(`data-jump-playing`)}}),u.fromTo(c.chars,{y:0},{keyframes:[{y:i.jumpY,duration:e*.45,ease:i.jumpEase},{y:0,duration:e*.55,ease:i.jumpReturnEase}],stagger:Math.max(0,i.jumpStagger),overwrite:!0})}function N(){E();let e=o.value,t=s.value,r=a.value;g=e?.innerHTML??``,!(!b.value||!e||!t||!r||w())&&(T(),t.innerHTML=g,t.querySelectorAll(`[id]`).forEach(e=>e.removeAttribute(`id`)),l=n.gsap.context(()=>{c=I.create(t,{type:`words, chars`,tag:`span`,aria:`hidden`,wordsClass:`bing-animated-text__word`,charsClass:`bing-animated-text__char`}),c.words.forEach(e=>{/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}]/u.test(e.textContent??``)&&e.classList.add(`bing-animated-text__word--breakable`)}),n.gsap.set(c.chars,{display:`inline-block`,transformOrigin:`50% 100%`,willChange:`transform`}),r.setAttribute(`data-jump-ready`,`true`),(i.trigger===`always`||i.trigger===`once`)&&M()},r))}function P(){!C()||h||(h=!0,(0,t.nextTick)(()=>{h=!1,a.value&&N()}))}function F(){C()&&(0,t.nextTick)(()=>{j()})}function L(){i.trigger===`hover`&&(y.value&&A(),b.value&&M())}(0,t.watch)(()=>[i.effect,i.trigger,i.disabled,i.shineSpeed,i.shineDelay,i.shineInterval,i.shineDirection,i.shineAngle,i.shineColor,i.shineBaseColor],F,{flush:`post`}),(0,t.watch)(()=>[i.effect,i.trigger,i.disabled,i.jumpY,i.jumpStagger,i.jumpDuration,i.jumpEase,i.jumpReturnEase,i.jumpRepeatDelay],P,{flush:`post`}),(0,t.onMounted)(()=>{_=window.matchMedia?.(`(prefers-reduced-motion: reduce)`),_?.addEventListener(`change`,R),F(),P()}),(0,t.onUpdated)(()=>{o.value?.innerHTML!==g&&P()}),(0,t.onUnmounted)(()=>{_?.removeEventListener(`change`,R),O(),E()});function R(){F(),P()}return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{ref_key:`rootRef`,ref:a,class:(0,t.normalizeClass)(x.value),style:(0,t.normalizeStyle)(S.value),onMouseenter:L},[(0,t.createElementVNode)(`span`,{ref_key:`contentRef`,ref:o,class:`bing-animated-text__content`},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],512),(0,t.createElementVNode)(`span`,{ref_key:`jumpContentRef`,ref:s,class:`bing-animated-text__jump-layer`,"aria-hidden":`true`,inert:``},null,512)],38))}}),R=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},z=R(L,[[`__scopeId`,`data-v-f9925891`]]);function B(e,t){return e===`top`?{x:0,y:t}:e===`bottom`?{x:0,y:-t}:e===`left`?{x:t,y:0}:{x:-t,y:0}}function V(e,t){return e===`left`||e===`right`?{scaleX:t}:{scaleY:t}}function H(e,t){let n=t===`middle`?`50%`:t===`end`?`100%`:`0%`;return e===`top`?`${n} 100%`:e===`bottom`?`${n} 0%`:e===`left`?`100% ${n}`:`0% ${n}`}function U(e,t){return t.getBoundingClientRect().left<e.getBoundingClientRect().left?8:-8}function ee({panel:e,items:t,actionRail:r,actionButtons:i,placement:a,align:o,scale:s=!0,onComplete:c}){let l=a===`left`||a===`right`?6:-6,u=s?{}:{force3D:!1},d=n.gsap.timeline({defaults:{duration:.22,ease:`power3.out`,overwrite:!0},onComplete:c});if(d.fromTo(e,{autoAlpha:0,...B(a,8),...V(a,s?.96:1),...u,transformOrigin:H(a,o)},{autoAlpha:1,x:0,y:0,...V(a,1),duration:.24,ease:`power3.out`},0),t.length&&d.fromTo(t,{autoAlpha:0,...B(a,l),scale:s?.98:1,...u},{autoAlpha:1,x:0,y:0,scale:1,duration:.22,stagger:.022},.06),r){let t=U(e,r);n.gsap.set(r,{autoAlpha:1}),d.fromTo(i,{autoAlpha:0,x:t,scale:.72,transformOrigin:`50% 50%`},{autoAlpha:1,x:0,scale:1,duration:.26,ease:`back.out(1.8)`,stagger:.055},.08)}return d}function W({panel:e,items:t,actionRail:r,actionButtons:i,placement:a,scale:o=!0,onComplete:s}){let c=n.gsap.timeline({defaults:{duration:.16,ease:`power2.in`,overwrite:!0},onComplete:s});return t.length&&c.to(t,{autoAlpha:0,...B(a,4),duration:.1,stagger:{each:.01,from:`end`}},0),c.to(e,{autoAlpha:0,...B(a,6),...V(a,o?.97:1),duration:.16},0),r&&(c.to(i,{autoAlpha:0,x:U(e,r),scale:.72,duration:.14,ease:`power2.in`,stagger:{each:.045,from:`end`}},0),c.set(r,{autoAlpha:0},`>`)),c}function G(e){let t=window.devicePixelRatio||1;return Math.round(e*t)/t}function te(e){if(!e||(Number(n.gsap.getProperty(e,`autoAlpha`))||0)<=.01)return;let t=e.getBoundingClientRect();if(!(t.width<=0||t.height<=0))return{height:t.height,left:t.left,top:t.top,width:t.width}}function ne({panel:e,content:t,getTarget:r,animateContent:i=!1,previousSnapshot:a,reducedMotion:o=!1,onComplete:s}){if(!e)return;let c=!!e.style.height;c&&!a&&(a=te(e)),(a||c)&&(n.gsap.killTweensOf(e),n.gsap.set(e,{clearProps:`width,height,overflow`}));let l=r();if(!l)return;let u=Number(n.gsap.getProperty(e,`autoAlpha`))||0,d=u>.01||!!a,f=e.getBoundingClientRect(),p=a??f,m={height:f.height,width:f.width},h=!!a&&d&&(i||c)&&m.width>0&&m.height>0&&(Math.abs((a?.width??0)-m.width)>.5||Math.abs((a?.height??0)-m.height)>.5),g=d?G(p.left-l.x):l.placement===`right`?-8:8,_=d?G(p.top-l.y):0,v=h?.32:d?.26:.22,y=h?`power2.out`:d?`power3.out`:`back.out(1.5)`;return n.gsap.killTweensOf(e),e.style.left=`${l.x}px`,e.style.top=`${l.y}px`,o?(n.gsap.set(e,{autoAlpha:1,clearProps:`transform,width,height,overflow`,willChange:`auto`}),t&&(n.gsap.killTweensOf(t),n.gsap.set(t,{clearProps:`transform,opacity,visibility`})),s?.(),l):(n.gsap.set(e,{autoAlpha:d?u:0,scale:d?1:.96,x:g,y:_,...h&&a?{height:a.height,overflow:`hidden`,width:a.width}:{},willChange:h?`opacity, transform, width, height`:`opacity, transform`}),n.gsap.to(e,{autoAlpha:1,scale:1,x:0,y:0,...h?{height:m.height,width:m.width}:{},duration:v,ease:y,overwrite:!0,onComplete:()=>{n.gsap.set(e,{clearProps:`transform,width,height,overflow`,willChange:`auto`}),s?.()}}),i&&t&&(n.gsap.killTweensOf(t),n.gsap.fromTo(t,{autoAlpha:.72,y:3},{autoAlpha:1,y:0,duration:.18,ease:`power2.out`,overwrite:!0,clearProps:`transform,opacity,visibility`})),l)}var re=`transform,opacity,visibility,willChange`;function ie(e){return n.gsap.killTweensOf(e),e.style.willChange=`transform, opacity`,n.gsap.fromTo(e,{autoAlpha:0,scale:.08},{autoAlpha:1,scale:1,duration:.38,ease:`expo.out`,overwrite:!0})}function ae(e){return n.gsap.to(e,{autoAlpha:0,scale:1.04,duration:.2,ease:`power2.out`,overwrite:!0,clearProps:re})}function K(e){n.gsap.killTweensOf(e),n.gsap.set(e,{clearProps:re})}function oe(e,t,n){let r=e.getBoundingClientRect();if(!r.width||!r.height)return;let i=Math.max(0,Math.min(e.clientWidth,(n.clientX-r.left)*e.offsetWidth/r.width-e.clientLeft)),a=Math.max(0,Math.min(e.clientHeight,(n.clientY-r.top)*e.offsetHeight/r.height-e.clientTop));t.style.setProperty(`--bing-liquid-x`,`${i}px`),t.style.setProperty(`--bing-liquid-y`,`${a}px`),t.style.transformOrigin=`${i}px ${a}px`}var se=12,ce=3;function le(){let e=new Set;function t(){for(let t of e)t()}function r(t,r){let i=t.ownerDocument,a=i.defaultView;if(!a||!t.isConnected)return;let o=a.matchMedia?.(`(prefers-reduced-motion: reduce)`);if(o?.matches)return;let s=t.getBoundingClientRect();if(!s.width||!s.height)return;let c=a.getComputedStyle(t),l=c.getPropertyValue(`--bing-click-particle-color`).trim(),u=!l||l.toLowerCase()===`currentcolor`?c.color:l,d=r,f=Number.isFinite(d.clientX)&&(d.detail>0||!!d.pointerType),p=f?Math.max(s.left,Math.min(s.right,d.clientX)):s.left+s.width/2,m=f?Math.max(s.top,Math.min(s.bottom,d.clientY)):s.top+s.height/2;e.size>=ce&&e.values().next().value?.();let h=i.createElement(`span`);h.className=`bing-click-particles`,h.setAttribute(`aria-hidden`,`true`),h.inert=!0,h.style.color=u;let g=Array.from({length:se},(e,t)=>{let n=i.createElement(`span`);return n.className=`bing-click-particles__shard`,n.style.left=`${p}px`,n.style.top=`${m}px`,n.style.width=`${3+t%3}px`,n.style.height=`${t%3==0?6:3}px`,h.append(n),n});i.body.append(h);let _,v=()=>{_?.kill(),h.remove(),e.delete(v),i.removeEventListener(`scroll`,v,!0),a.removeEventListener(`resize`,v),a.removeEventListener(`pagehide`,v),i.removeEventListener(`visibilitychange`,v),o?.removeEventListener(`change`,v)};e.add(v),i.addEventListener(`scroll`,v,{capture:!0,passive:!0}),a.addEventListener(`resize`,v,{passive:!0}),a.addEventListener(`pagehide`,v),i.addEventListener(`visibilitychange`,v),o?.addEventListener(`change`,v);let y=g.map((e,t)=>{let n=(t+(Math.random()-.5)*.45)/se*Math.PI*2,r=28+Math.random()*30;return{x:Math.cos(n)*r,y:Math.sin(n)*r,rotation:(Math.random()-.5)*240}});n.gsap.set(g,{xPercent:-50,yPercent:-50,rotation:e=>e*37,autoAlpha:.95}),_=n.gsap.timeline({defaults:{ease:`power3.out`},onComplete:v}).to(g,{x:e=>y[e].x,y:e=>y[e].y,rotation:e=>y[e].rotation,duration:.54},0).to(g,{autoAlpha:0,scale:.35,duration:.3,ease:`power2.in`},.2)}return{play:r,clear:t}}var ue=new WeakMap,q=new WeakSet;function de(){let e=(0,t.getCurrentInstance)().appContext.app,n=ue.get(e);if(!n){n=new Map,ue.set(e,n);let t=n;e.onUnmount(()=>{for(let e of t.values())e.clear();t.clear(),ue.delete(e)})}function r(e,t=e.currentTarget){if(!t?.isConnected||q.has(e)||t.matches(`:disabled, [aria-disabled="true"]`)||t.closest(`[inert]`)||e.target instanceof Element&&e.target.closest(`.bing-checkbox:not(.is-decorative), .bing-radio`)&&!t.matches(`.bing-checkbox__control, .bing-radio__control`))return;q.add(e);let r=t.ownerDocument,i=n.get(r);i||(i=le(),n.set(r,i)),i.play(t,e)}let i=new WeakMap;return{playClickFeedback:r,vClickFeedback:{mounted(e,t){let n={enabled:t.value!==!1,click(t){n.enabled&&!t.defaultPrevented&&t.button===0&&r(t,e)}};i.set(e,n),e.addEventListener(`click`,n.click)},updated(e,t){let n=i.get(e);n&&(n.enabled=t.value!==!1)},beforeUnmount(e){let t=i.get(e);t&&e.removeEventListener(`click`,t.click),i.delete(e)}}}}var fe=Symbol(`BingFormContext`),pe=Symbol(`BingFormItemContext`);function me(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,[...t]]))}function he(e,n={}){let r=(0,t.inject)(pe,null),i=(0,t.inject)(fe,null),a=`bing-control-${(0,t.useId)()}`,o=n.register===!1?void 0:r?.nextControlId?.(a)??r?.controlId.value,s=(0,t.computed)(()=>e.id??o??a),c=(0,t.computed)(()=>e.size??r?.size.value??i?.size.value??`md`),l=(0,t.computed)(()=>e.disabled??r?.disabled.value??i?.disabled.value??!1),u=(0,t.computed)(()=>e.status??r?.status.value??`default`),d=(0,t.computed)(()=>[...new Set([e.ariaDescribedby,r?.ariaDescribedby.value].filter(Boolean))].join(` `)||void 0),f=(0,t.computed)(()=>n.group?r?.labelId?.value:void 0);return n.register!==!1&&r?.registerControl&&(0,t.onBeforeUnmount)(r.registerControl({id:s,group:n.group??!1})),{formItem:r,resolvedId:s,resolvedSize:c,resolvedDisabled:l,resolvedStatus:u,resolvedAriaDescribedby:d,resolvedAriaLabelledby:f}}function ge(){(0,t.provide)(pe,null),(0,t.provide)(fe,null)}var _e=[`type`,`disabled`,`aria-busy`,`aria-label`],ve={class:`bing-button__content`},ye={key:0,class:`bing-button__loading-indicator`,"aria-hidden":`true`},be={class:`bing-button__resting-content`},xe={key:0,class:`bing-button__icon bing-button__icon--prefix`},Se={key:1,class:`bing-button__label`},Ce={key:2,class:`bing-button__icon bing-button__icon--suffix`},J=R((0,t.defineComponent)({__name:`BingButton`,props:{variant:{default:`primary`},size:{default:void 0},rounded:{default:`md`},htmlType:{default:`button`},disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1},throttle:{type:Boolean,default:!1},throttleDelay:{default:600},textEffect:{},textEffectTrigger:{},textShine:{},shineColor:{default:void 0},shineBaseColor:{default:void 0},shineSpeed:{default:3},shineDelay:{default:0},shineInterval:{default:1.6},shineDirection:{default:`left`},shineAngle:{default:120},textJumpY:{default:-6},textJumpStagger:{default:.035},textJumpDuration:{default:.34},textJumpEase:{default:`power2.out`},textJumpReturnEase:{default:`back.out(2.4)`},textJumpRepeatDelay:{default:1.2},ariaLabel:{default:void 0}},emits:[`click`,`throttled`,`focus`,`blur`],setup(e,{emit:n}){let r=e,i=n,{resolvedSize:a,resolvedDisabled:o}=he(r,{register:!1}),s=(0,t.useSlots)(),c=(0,t.ref)(0),l=(0,t.ref)(null),u=!1,{playClickFeedback:d}=de(),f=(0,t.computed)(()=>o.value||r.loading),p=(0,t.computed)(()=>Math.max(0,r.throttleDelay)),m=(0,t.computed)(()=>!!s.default),h=(0,t.computed)(()=>!!s.prefix),g=(0,t.computed)(()=>!!s.suffix),_=(0,t.computed)(()=>r.textShine??(r.variant===`primary`?`always`:`none`)),v=(0,t.computed)(()=>r.loading&&m.value?`jump`:r.textEffect?r.textEffect:_.value===`none`?`none`:`shine`),y=(0,t.computed)(()=>r.loading&&m.value?`always`:r.textEffectTrigger?r.textEffectTrigger:v.value===`jump`||_.value===`hover`?`hover`:`always`),b=(0,t.computed)(()=>v.value===`shine`),x=(0,t.computed)(()=>v.value!==`none`),S=(0,t.computed)(()=>[`bing-button`,`bing-button--${r.variant}`,`bing-button--${a.value}`,`bing-button--rounded-${r.rounded}`,{"is-block":r.block,"is-disabled":o.value,"is-loading":r.loading,"is-icon-only":!m.value&&(h.value||g.value),[`bing-button--text-${v.value}`]:x.value,[`bing-button--text-trigger-${y.value}`]:x.value,[`bing-button--shine-${y.value}`]:b.value,[`bing-button--shine-direction-${r.shineDirection}`]:b.value}]),C=(0,t.computed)(()=>{let e={};return b.value?(e[`--animated-text-shine-angle`]=`${r.shineAngle}deg`,r.shineColor&&(e[`--animated-text-shine-color`]=r.shineColor),r.shineBaseColor&&(e[`--animated-text-shine-base-color`]=r.shineBaseColor),e):e});function w(e){if(e.defaultPrevented)return;if(f.value){e.preventDefault();return}let t=Date.now(),n=p.value,a=t-c.value;if(r.throttle&&n>0&&c.value>0&&a<n){e.preventDefault(),i(`throttled`,{event:e,remaining:n-a});return}c.value=t,d(e),i(`click`,e)}function T(e){i(`focus`,e)}function E(e){i(`blur`,e)}function D(){u=!1,l.value&&K(l.value)}function O(){return window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function k(e){let t=l.value;if(!t||f.value||e.pointerType===`touch`)return;if(O()){D();return}let n=e.currentTarget,r=n.getBoundingClientRect();if(!r.width||!r.height)return;let i=(e.clientX-r.left)*(n.offsetWidth/r.width)-n.clientLeft,a=(e.clientY-r.top)*(n.offsetHeight/r.height)-n.clientTop,o=Math.max(0,Math.min(n.clientWidth,i)),s=Math.max(0,Math.min(n.clientHeight,a));t.style.setProperty(`--button-liquid-x`,`${o}px`),t.style.setProperty(`--button-liquid-y`,`${s}px`),t.style.transformOrigin=`${o}px ${s}px`,u||(u=!0,ie(t))}function A(){!u||!l.value||(u=!1,O()?D():ae(l.value))}return(0,t.watch)([f,()=>r.variant],([e,t])=>{(e||t===`primary`)&&D()}),(0,t.onBeforeUnmount)(()=>{D()}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{type:e.htmlType,class:(0,t.normalizeClass)(S.value),style:(0,t.normalizeStyle)(C.value),disabled:f.value,"aria-busy":e.loading||void 0,"aria-label":e.ariaLabel,onClick:w,onFocus:T,onBlur:E,onPointerenter:k,onPointermove:k,onPointerleave:A,onPointercancel:D},[e.variant===`primary`?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`liquidRef`,ref:l,class:`bing-button__liquid`,"aria-hidden":`true`},null,512)),(0,t.createElementVNode)(`span`,ve,[m.value?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,ye,[...r[0]||=[(0,t.createElementVNode)(`span`,{class:`bing-button__spinner`},null,-1)]])),(0,t.createElementVNode)(`span`,be,[h.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,xe,[(0,t.renderSlot)(n.$slots,`prefix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),m.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Se,[(0,t.createVNode)(z,{class:`bing-button__animated-text`,effect:v.value,trigger:y.value,disabled:(0,t.unref)(o),"shine-speed":e.shineSpeed,"shine-delay":e.shineDelay,"shine-interval":e.shineInterval,"shine-direction":e.shineDirection,"shine-angle":e.shineAngle,"jump-y":e.textJumpY,"jump-stagger":e.textJumpStagger,"jump-duration":e.textJumpDuration,"jump-ease":e.textJumpEase,"jump-return-ease":e.textJumpReturnEase,"jump-repeat-delay":e.textJumpRepeatDelay},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),_:3},8,[`effect`,`trigger`,`disabled`,`shine-speed`,`shine-delay`,`shine-interval`,`shine-direction`,`shine-angle`,`jump-y`,`jump-stagger`,`jump-duration`,`jump-ease`,`jump-return-ease`,`jump-repeat-delay`])])):(0,t.createCommentVNode)(``,!0),g.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ce,[(0,t.renderSlot)(n.$slots,`suffix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])])],46,_e))}}),[[`__scopeId`,`data-v-845f9077`]]),Y=new Set([`role`,`readonly`,`required`,`form`,`maxlength`,`minlength`,`pattern`,`inputmode`,`autofocus`,`enterkeyhint`,`tabindex`,`list`,`autocapitalize`,`autocorrect`,`dirname`,`wrap`,`cols`,`onChange`,`onBeforeinput`,`onCompositionstart`,`onCompositionupdate`,`onCompositionend`,`onSelect`,`onInvalid`]);function we(){let e=(0,t.useAttrs)(),n=e=>Y.has(e)||e.startsWith(`aria-`);return{rootAttrs:()=>Object.fromEntries(Object.entries(e).filter(([e])=>!n(e))),controlAttrs:()=>Object.fromEntries(Object.entries(e).filter(([e])=>n(e)))}}var Te=`(prefers-reduced-motion: reduce), (forced-colors: active), (pointer: coarse)`,Ee=new Set([`text`,`search`,`tel`,`url`]),De=/[\u0590-\u08ff\u200e\u200f\u202a-\u202e\u2066-\u2069\ufb1d-\ufdff\ufe70-\ufeff]/u,Oe=[`fontFamily`,`fontSize`,`fontWeight`,`fontStyle`,`fontStretch`,`fontVariant`,`fontKerning`,`fontFeatureSettings`,`fontVariationSettings`,`letterSpacing`,`wordSpacing`,`textTransform`];function ke(e,r,i,a){let o=()=>{},s=()=>{};(0,t.onUpdated)(()=>o()),(0,t.onBeforeUnmount)(()=>s()),(0,t.onMounted)(()=>{let t=e.value,c=r.value,l=i.value;if(!t||!c||!l)return;let u=t.ownerDocument,d=u.defaultView,f=d.matchMedia(Te),p=!1,m=!1,h=!1,g=!1,_=!1,v=0,y=!1,b=!1,x,S,C,w=``,T=NaN,E=0,D=0,O,k,A=u.createRange();function j(){_&&(t.removeAttribute(`data-smooth-caret`),l.removeAttribute(`data-active`)),_=!1,l.classList.contains(`is-idle`)&&l.classList.remove(`is-idle`),clearTimeout(x),k?.tween.pause()}function M(){clearTimeout(x),l.classList.remove(`is-idle`),x=setTimeout(()=>{_&&!g&&l.classList.add(`is-idle`)},600)}function N(){v=0;let e=y,r=b;if(y=b=!1,g)return;let i=m&&t.selectionDirection!==`backward`?t.selectionEnd:t.selectionStart;if(!p||!a()||t.disabled||t.readOnly||h||f.matches||u.hidden||!u.hasFocus()||u.activeElement!==t||!Ee.has(t.type)||i===null||!m&&i!==t.selectionEnd||De.test(t.value)){j(),C&&!Ee.has(t.type)&&(C.data=``);return}let o=d.getComputedStyle(t);if(o.direction!==`ltr`||o.writingMode!==`horizontal-tb`||![`start`,`left`].includes(o.textAlign)||parseFloat(o.textIndent)!==0||!t.clientWidth){j();return}S||(S=u.createElement(`span`),S.setAttribute(`aria-hidden`,`true`),S.style.cssText=`position:absolute;left:0;top:0;visibility:hidden;white-space:pre;width:max-content;pointer-events:none;`,C=u.createTextNode(``),S.append(C),c.append(S));let s=Oe.map(e=>o[e]).join(`|`);w!==s&&(Oe.forEach(e=>{S.style[e]=o[e]}),w=s);let x=t.value||`​`;C.data!==x&&(C.data=x),A.setStart(C,i),A.collapse(!0);let N=A.getClientRects();if(!N.length){j();return}let P=S.getBoundingClientRect(),F=c.getBoundingClientRect().width/c.clientWidth||1,I=parseFloat(o.paddingLeft)||0,L=t.offsetLeft+I+(N[0].left-P.left)/F-t.scrollLeft;if(L<t.offsetLeft-1||L>t.offsetLeft+t.clientWidth+1){j();return}let R=Math.max(t.offsetLeft,Math.min(t.offsetLeft+t.clientWidth-2,L)),z=Math.min(t.clientHeight,parseFloat(o.fontSize)*1.2),B=t.offsetTop+(t.clientHeight-z)/2,V=!_||Math.abs(T-R)>.1,H=E!==t.scrollLeft||D!==t.clientWidth;k||(O=n.gsap.context(()=>{k=n.gsap.quickTo(l,`x`,{duration:.09,ease:`power2.out`})},c)),!_||e||H?(k(R,R),k.tween.progress(1).pause()):V&&k(R),l.style.height!==`${z}px`&&(l.style.height=`${z}px`),l.style.top!==`${B}px`&&(l.style.top=`${B}px`),l.style.color!==o.color&&(l.style.color=o.color),_||(l.setAttribute(`data-active`,``),t.setAttribute(`data-smooth-caret`,``)),_=!0,T=R,E=t.scrollLeft,D=t.clientWidth,(V||r)&&M()}function P(e=!1,t=!1){g||!p||(y||=e,b||=t,v||=d.requestAnimationFrame(N))}function F(){g||!p||(d.cancelAnimationFrame(v),y=b=!0,N())}let I=()=>P(),L=()=>P(!0),R=()=>P(!1,!0),z=()=>j(),B=()=>u.hidden?j():P(!0),V=()=>F(),H=new ResizeObserver(L);function U(){p||(p=!0,u.addEventListener(`selectionchange`,I),u.addEventListener(`pointerup`,V),u.addEventListener(`pointercancel`,V),u.addEventListener(`visibilitychange`,B),d.addEventListener(`blur`,z),d.addEventListener(`focus`,L),d.addEventListener(`resize`,L),f.addEventListener(`change`,L),u.fonts?.addEventListener(`loadingdone`,L),H.observe(t),F(),P(!0,!0))}function ee(){p=m=h=!1,j(),d.cancelAnimationFrame(v),v=0,y=b=!1,u.removeEventListener(`selectionchange`,I),u.removeEventListener(`pointerup`,V),u.removeEventListener(`pointercancel`,V),u.removeEventListener(`visibilitychange`,B),d.removeEventListener(`blur`,z),d.removeEventListener(`focus`,L),d.removeEventListener(`resize`,L),f.removeEventListener(`change`,L),u.fonts?.removeEventListener(`loadingdone`,L),H.disconnect(),O?.revert(),O=k=void 0,S?.remove(),S=C=void 0,w=``}let W={focus:U,blur:ee,input:R,keydown:R,keyup:I,select:I,scroll:L,pointerdown:e=>{h||=e.pointerType===`touch`,h?j():P(!0,!0)},compositionstart:()=>{m=!0,P(!1,!0)},compositionupdate:R,compositionend:()=>{m=!1,P(!1,!0)}};for(let[e,n]of Object.entries(W))t.addEventListener(e,n);o=()=>P(),s=()=>{g=!0,ee();for(let[e,n]of Object.entries(W))t.removeEventListener(e,n);o=()=>{}},u.activeElement===t&&U()})}var X=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ae=e=>e===``,je=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Me=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Ne=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Pe=e=>{let t=Ne(e);return t.charAt(0).toUpperCase()+t.slice(1)},Fe={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Ie=({name:e,iconNode:n,absoluteStrokeWidth:r,"absolute-stroke-width":i,strokeWidth:a,"stroke-width":o,size:s=Fe.width,color:c=Fe.stroke,...l},{slots:u})=>(0,t.h)(`svg`,{...Fe,...l,width:s,height:s,stroke:c,"stroke-width":Ae(r)||Ae(i)||r===!0||i===!0?Number(a||o||Fe[`stroke-width`])*24/Number(s):a||o||Fe[`stroke-width`],class:je(`lucide`,l.class,...e?[`lucide-${Me(Pe(e))}-icon`,`lucide-${Me(e)}`]:[`lucide-icon`]),...!u.default&&!X(l)&&{"aria-hidden":`true`}},[...n.map(e=>(0,t.h)(...e)),...u.default?[u.default()]:[]]),Z=(e,n)=>(r,{slots:i,attrs:a})=>(0,t.h)(Ie,{...a,...r,iconNode:n,name:e},i),Le=Z(`arrow-down-left`,[[`path`,{d:`M17 7 7 17`,key:`15tmo1`}],[`path`,{d:`M17 17H7V7`,key:`1org7z`}]]),Re=Z(`arrow-down-right`,[[`path`,{d:`m7 7 10 10`,key:`1fmybs`}],[`path`,{d:`M17 7v10H7`,key:`6fjiku`}]]),ze=Z(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Be=Z(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),Ve=Z(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),He=Z(`arrow-up-left`,[[`path`,{d:`M7 17V7h10`,key:`11bw93`}],[`path`,{d:`M17 17 7 7`,key:`2786uv`}]]),Ue=Z(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),We=Z(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Ge=Z(`calendar-days`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M16 14h.01`,key:`1gbofw`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M16 18h.01`,key:`kzsmim`}]]),Ke=Z(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),qe=Z(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Je=Z(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Ye=Z(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Xe=Z(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Ze=Z(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Qe=Z(`chevrons-left`,[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]),$e=Z(`chevrons-right`,[[`path`,{d:`m6 17 5-5-5-5`,key:`xnjwq`}],[`path`,{d:`m13 17 5-5-5-5`,key:`17xmmf`}]]),et=Z(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),tt=Z(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),nt=Z(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),rt=Z(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),it=Z(`columns-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),at=Z(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),ot=Z(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),st=Z(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ct=Z(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),lt=Z(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ut=Z(`file-braces`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),dt=Z(`file-image`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),ft=Z(`file-question-mark`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]]),pt=Z(`file-spreadsheet`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),mt=Z(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),ht=Z(`file-type`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M11 18h2`,key:`12mj7e`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5`,key:`qbrxap`}]]),gt=Z(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),_t=Z(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),vt=Z(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),yt=Z(`list-collapse`,[[`path`,{d:`M10 5h11`,key:`1hkqpe`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 19h11`,key:`14g2nv`}],[`path`,{d:`m3 10 3-3-3-3`,key:`i7pm08`}],[`path`,{d:`m3 20 3-3-3-3`,key:`20gx1n`}]]),bt=Z(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),xt=Z(`list-x`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`m15.5 9.5 5 5`,key:`ytk86i`}],[`path`,{d:`m20.5 9.5-5 5`,key:`17o44f`}]]),St=Z(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Ct=Z(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),wt=Z(`presentation`,[[`path`,{d:`M2 3h20`,key:`91anmk`}],[`path`,{d:`M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3`,key:`2k9sn8`}],[`path`,{d:`m7 21 5-5 5 5`,key:`bip4we`}]]),Tt=Z(`refresh-ccw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),Et=Z(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Dt=Z(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Ot=Z(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),kt=Z(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),At=Z(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),jt=Z(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Mt=Z(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Nt=Z(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Q=R((0,t.defineComponent)({__name:`BingIcon`,props:{icon:{},size:{default:`md`},tone:{default:`inherit`},strokeWidth:{default:1.75},decorative:{type:Boolean,default:!0},label:{default:void 0}},setup(e){let n=e,r={xs:`14px`,sm:`16px`,md:`20px`,lg:`24px`,xl:`32px`};function i(e){return typeof e==`string`&&e in r}let a=(0,t.computed)(()=>typeof n.size==`number`?`${n.size}px`:i(n.size)?r[n.size]:n.size),o=(0,t.computed)(()=>[`bing-icon`,`bing-icon--${n.tone}`]),s=(0,t.computed)(()=>n.decorative||!n.label);return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon),{class:(0,t.normalizeClass)(o.value),style:(0,t.normalizeStyle)({width:a.value,height:a.value,strokeWidth:e.strokeWidth}),"aria-hidden":s.value||void 0,"aria-label":s.value?void 0:e.label,role:s.value?void 0:`img`},null,8,[`class`,`style`,`aria-hidden`,`aria-label`,`role`]))}}),[[`__scopeId`,`data-v-43788c95`]]),Pt={key:0,class:`bing-input__icon`},Ft={class:`bing-input__content`},It=[`id`,`value`,`type`,`min`,`max`,`step`,`placeholder`,`disabled`,`readonly`,`name`,`autocomplete`,`spellcheck`,`aria-label`,`aria-describedby`,`aria-invalid`],Lt={key:1,class:`bing-input__actions`},Rt={key:0,class:`bing-input__stepper`},zt=[`disabled`],Bt=[`disabled`],Vt=R((0,t.defineComponent)({inheritAttrs:!1,__name:`BingInput`,props:{id:{default:void 0},modelValue:{default:``},type:{default:`text`},min:{},max:{},step:{},placeholder:{default:void 0},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:void 0},smoothCaret:{type:Boolean,default:!0},icon:{default:void 0},iconLabel:{default:void 0},size:{default:void 0},block:{type:Boolean,default:!1},debounceDelay:{default:180},clearAriaLabel:{default:`清空输入`},ariaLabel:{default:void 0},ariaDescribedby:{default:void 0},status:{default:void 0},name:{default:void 0},autocomplete:{default:`off`},spellcheck:{type:[Boolean,String],default:void 0}},emits:[`update:modelValue`,`input`,`debounced-input`,`clear`,`focus`,`blur`,`keydown`],setup(e,{expose:n,emit:r}){let i=e,a=r,{playClickFeedback:o}=de(),{rootAttrs:s,controlAttrs:c}=we(),{formItem:l,resolvedId:u,resolvedSize:d,resolvedDisabled:f,resolvedStatus:p,resolvedAriaDescribedby:m}=he(i),h=(0,t.useSlots)(),g=(0,t.ref)(null),_=(0,t.ref)(null),v=(0,t.ref)(null),y=(0,t.ref)(null);ke(_,v,y,()=>i.smoothCaret);let b=(0,t.ref)(!1),x=(0,t.ref)(``),S=``,C,w=!1,T=0,E,D,O,k=(0,t.computed)(()=>Math.max(0,Math.floor(i.debounceDelay))),A=(0,t.computed)(()=>!!(i.icon||h.icon)),j=(0,t.computed)(()=>i.modelValue!==null&&String(i.modelValue).length>0),M=(0,t.computed)(()=>(i.clearable??i.type===`search`)&&!i.readonly&&!f.value&&j.value),N=(0,t.computed)(()=>i.type===`number`),P=(0,t.computed)(()=>[`bing-input`,`bing-input--${d.value}`,`bing-input--status-${p.value}`,{"is-block":i.block,"is-disabled":f.value,"is-invalid":p.value===`error`,"has-icon":A.value,"has-value":j.value,"can-clear":M.value,"has-actions":M.value||N.value}]);function F(){E!==void 0&&(clearTimeout(E),E=void 0)}function I(e){if(F(),k.value===0){a(`debounced-input`,e);return}E=setTimeout(()=>{E=void 0,a(`debounced-input`,e)},k.value)}function L(e,t){let n=e===``?NaN:Number(e);a(`update:modelValue`,i.type===`number`&&Number.isFinite(n)?n:e),a(`input`,e,t),I(e),l?.handleControlChange()}function R(e){let t=e.target.value;if(b.value||e.isComposing){x.value=t;return}let n=C===t;C=void 0,!n&&L(t,e)}function z(e){S=e.target.value,x.value=S,C=void 0,b.value=!0,w=E!==void 0,F()}function B(e){if(!b.value)return;let t=e.target.value;b.value=!1,C=t,t===S?w&&I(t):L(t,e),w=!1}function V(e){!b.value&&!e.isComposing&&e.keyCode!==229&&(C=void 0),a(`keydown`,e)}function H(e){let t=_.value;if(!t||!N.value||i.readonly||f.value)return!1;let n=t.value;if(t.step.toLowerCase()===`any`){let n=t.valueAsNumber,r=t.min.trim()===``||!Number.isFinite(Number(t.min))?-1/0:Number(t.min),i=t.max.trim()===``||!Number.isFinite(Number(t.max))?1/0:Number(t.max),a=Math.min(i,Math.max(r,(Number.isFinite(n)?n:0)+e));r<=i&&Number.isFinite(a)&&(!Number.isFinite(n)||(a-n)*e>0)&&(t.valueAsNumber=a)}else t.stepUp(e);return t.value===n?!1:(t.dispatchEvent(new Event(`input`,{bubbles:!0})),t.dispatchEvent(new Event(`change`,{bubbles:!0})),!0)}function U(){clearTimeout(D),clearInterval(O),D=void 0,O=void 0,typeof window<`u`&&(window.removeEventListener(`pointerup`,U),window.removeEventListener(`pointercancel`,U),window.removeEventListener(`blur`,U))}function ee(e,t){t.button!==0||i.readonly||f.value||(t.preventDefault(),U(),_.value?.focus(),H(e)&&(o(t),window.addEventListener(`pointerup`,U),window.addEventListener(`pointercancel`,U),window.addEventListener(`blur`,U),D=setTimeout(()=>{O=setInterval(()=>{H(e)||U()},80)},400)))}function W(e,t){t.detail===0&&!t.pointerType&&(_.value?.focus(),H(e)&&o(t))}function G(){M.value&&(b.value=!1,C=void 0,w=!1,F(),a(`update:modelValue`,``),a(`clear`),a(`debounced-input`,``),l?.handleControlChange(),_.value?.focus())}function te(e){a(`focus`,e)}function ne(e){B(e),a(`blur`,e)}function re(){T+=1}async function ie(e){let n=g.value;if(!n||e.relatedTarget instanceof Node&&n.contains(e.relatedTarget))return;let r=++T;await(0,t.nextTick)(),!(r!==T||g.value!==n||n.contains(n.ownerDocument.activeElement))&&l?.handleControlBlur()}function ae(){_.value?.focus()}function K(){_.value?.blur()}function oe(){_.value?.select()}return(0,t.onBeforeUnmount)(()=>{T+=1,F(),U()}),(0,t.watch)([f,()=>i.readonly,()=>i.type],U),(0,t.watch)(()=>i.modelValue,e=>{!b.value&&String(e??``)!==C&&(C=void 0)}),n({get input(){return _.value},focus:ae,blur:K,select:oe}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)((0,t.unref)(s)(),{ref_key:`rootRef`,ref:g,class:P.value,onClick:ae,onFocusin:re,onFocusout:ie}),[A.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Pt,[(0,t.renderSlot)(e.$slots,`icon`,{},()=>[i.icon?((0,t.openBlock)(),(0,t.createBlock)(Q,{key:0,icon:i.icon,size:`sm`,"stroke-width":1.75,decorative:!i.iconLabel,label:i.iconLabel},null,8,[`icon`,`decorative`,`label`])):(0,t.createCommentVNode)(``,!0)],!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,Ft,[(0,t.createElementVNode)(`input`,(0,t.mergeProps)((0,t.unref)(c)(),{ref_key:`inputRef`,ref:_,class:`bing-input__field`,id:(0,t.unref)(u),value:b.value?x.value:i.modelValue,type:i.type,min:i.min,max:i.max,step:i.step,placeholder:i.placeholder,disabled:(0,t.unref)(f),readonly:i.readonly,name:i.name,autocomplete:i.autocomplete,spellcheck:i.spellcheck,"aria-label":i.ariaLabel||void 0,"aria-describedby":(0,t.unref)(m),"aria-invalid":(0,t.unref)(p)===`error`||void 0,onInput:R,onCompositionstart:z,onCompositionend:B,onFocus:te,onBlur:ne,onKeydown:V}),null,16,It),(0,t.createElementVNode)(`span`,{ref_key:`caretLayerRef`,ref:v,class:`bing-input__caret-layer`,"aria-hidden":`true`},[(0,t.createElementVNode)(`span`,{ref_key:`caretRef`,ref:y,class:`bing-input__caret`},null,512)],512)]),M.value||N.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Lt,[N.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Rt,[(0,t.createElementVNode)(`button`,{type:`button`,class:`bing-input__step`,tabindex:`-1`,"aria-label":`增加数值`,disabled:(0,t.unref)(f)||i.readonly,onPointerdown:n[0]||=e=>ee(1,e),onPointerleave:U,onClick:n[1]||=(0,t.withModifiers)(e=>W(1,e),[`stop`])},[(0,t.createVNode)(Q,{icon:(0,t.unref)(Ze),size:`xs`,"stroke-width":1.75},null,8,[`icon`])],40,zt),(0,t.createElementVNode)(`button`,{type:`button`,class:`bing-input__step`,tabindex:`-1`,"aria-label":`减少数值`,disabled:(0,t.unref)(f)||i.readonly,onPointerdown:n[2]||=e=>ee(-1,e),onPointerleave:U,onClick:n[3]||=(0,t.withModifiers)(e=>W(-1,e),[`stop`])},[(0,t.createVNode)(Q,{icon:(0,t.unref)(Je),size:`xs`,"stroke-width":1.75},null,8,[`icon`])],40,Bt)])):(0,t.createCommentVNode)(``,!0),M.value?((0,t.openBlock)(),(0,t.createBlock)(J,{key:1,variant:`ghost`,size:`xs`,rounded:`sm`,throttle:!1,class:`bing-input__clear`,"aria-label":i.clearAriaLabel,onMousedown:n[4]||=(0,t.withModifiers)(()=>{},[`prevent`]),onClick:(0,t.withModifiers)(G,[`stop`])},{prefix:(0,t.withCtx)(()=>[(0,t.createVNode)(Q,{icon:(0,t.unref)(jt),size:`xs`,"stroke-width":1.75},null,8,[`icon`])]),_:1},8,[`aria-label`])):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)],16))}}),[[`__scopeId`,`data-v-0e642a76`]]),Ht=/^(auto|scroll|overlay)$/,Ut=[`button`,`input`,`select`,`textarea`,`video`,`audio`,`[contenteditable="true"]`,`[role="textbox"]`].join(`,`),Wt=Object.freeze({duration:400,stepSize:100,pulseScale:4,accelerationDelta:50,accelerationMax:3,keyboardStep:50,keyboard:!0,smoothTouchpad:!1,respectReducedMotion:!0}),Gt=Object.freeze({duration:280,stepSize:72,pulseScale:4,accelerationDelta:50,accelerationMax:2,keyboard:!1,smoothTouchpad:!1,respectReducedMotion:!0});function Kt(e,t={},n={}){return e===!1?!1:{...t,...typeof e==`object`?e:{},...n}}function qt(e,t,n){return Number.isFinite(e)?Math.max(n,e):t}function Jt(e){return{duration:qt(e?.duration,Wt.duration,0),stepSize:qt(e?.stepSize,Wt.stepSize,0),pulseScale:qt(e?.pulseScale,Wt.pulseScale,.1),accelerationDelta:qt(e?.accelerationDelta,Wt.accelerationDelta,0),accelerationMax:qt(e?.accelerationMax,Wt.accelerationMax,1),keyboardStep:qt(e?.keyboardStep,Wt.keyboardStep,0),keyboard:e?.keyboard??Wt.keyboard,smoothTouchpad:e?.smoothTouchpad??Wt.smoothTouchpad,respectReducedMotion:e?.respectReducedMotion??Wt.respectReducedMotion}}function Yt(e,t){let n=e*t;if(n<1)return n-(1-Math.exp(-n));let r=Math.exp(-1);return r+(1-Math.exp(-(n-1)))*(1-r)}function Xt(e,t=Wt.pulseScale){if(e<=0)return 0;if(e>=1)return 1;let n=Math.max(.1,t);return Yt(e,n)/Yt(1,n)}function Zt(){return typeof window<`u`&&typeof document<`u`}function Qt(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}function $t(e,t,n){return Math.min(n,Math.max(t,e))}function en(e){return e===0?0:e>0?1:-1}function tn(e,t,n){if(n===0)return!1;if(t===`x`){let t=Math.max(0,e.scrollWidth-e.clientWidth);return t>0&&(n<0?e.scrollLeft>0:e.scrollLeft<t-.5)}let r=Math.max(0,e.scrollHeight-e.clientHeight);return r>0&&(n<0?e.scrollTop>0:e.scrollTop<r-.5)}function nn(e){let t=e.composedPath?.()[0]??e.target;return t instanceof Element?t:null}function rn(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode?.();return t&&`host`in t&&t.host instanceof Element?t.host:null}function an(e,t,n,r){let i=nn(e);for(;i&&i!==t;){if(i instanceof HTMLElement){let e=n!==0&&tn(i,`x`,n),t=r!==0&&tn(i,`y`,r);if(!e&&!t){i=rn(i);continue}let a=window.getComputedStyle(i),o=a.overflowX||i.style.overflowX||i.style.overflow,s=a.overflowY||i.style.overflowY||i.style.overflow,c=e&&Ht.test(o),l=t&&Ht.test(s);if(c||l)return!0}i=rn(i)}return!1}function on(){return!!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function sn(e,t,n){let r=e,i=e.deltaX||-Number(r.wheelDeltaX||0),a=e.deltaY||-Number(r.wheelDeltaY||0);return!i&&!a&&(a=-Number(r.wheelDelta||0)),e.deltaMode===WheelEvent.DOM_DELTA_LINE?(i*=40,a*=40):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=Math.max(1,t.clientWidth),a*=Math.max(1,t.clientHeight)),e.shiftKey&&n.horizontal&&Math.abs(a)>Math.abs(i)&&(i=a,a=0),n.horizontal||(i=0),n.vertical||(a=0),{x:i,y:a}}function cn(e,t){return Math.abs(e)>1.2?t/120*e:e}function ln(e){let t=nn(e);return t instanceof HTMLElement&&!!t.closest(Ut)}function un(e){let t=[],n,r=0,i=0,a=0,o=[],s=0,c=0;function l(){return Jt(e.getOptions?.())}function u(){return e.getAxes?.()??{horizontal:!0,vertical:!0}}function d(){return e.isEnabled?.()??!0}function f(){!Zt()||n===void 0||(window.cancelAnimationFrame(n),n=void 0)}function p(){f(),t=[],r=0,i=0,a=0,s=0,c=0}function m(e,t,n){if(t!==0||s!==0){let n=Math.max(0,e.scrollWidth-e.clientWidth),r=$t(e.scrollLeft+t+s,0,n);e.scrollLeft=r,s=r-e.scrollLeft}if(n!==0||c!==0){let t=Math.max(0,e.scrollHeight-e.clientHeight),r=$t(e.scrollTop+n+c,0,t);e.scrollTop=r,c=r-e.scrollTop}}function h(){n=void 0;let r=e.getElement();if(!r||!d()){p();return}let o=Qt(),l=0,u=0;if(t.forEach(e=>{let t=o-e.start,n=e.duration===0||t>=e.duration?1:Xt(t/e.duration,e.pulseScale),r=e.x*n,i=e.y*n;l+=r-e.lastX,u+=i-e.lastY,e.lastX=r,e.lastY=i}),t=t.filter(e=>o-e.start<e.duration),m(r,l,u),t.length>0){n=window.requestAnimationFrame(h);return}i=0,a=0,s=0,c=0}function g(){if(!(!Zt()||n!==void 0)){if(typeof window.requestAnimationFrame!=`function`){h();return}n=window.requestAnimationFrame(h)}}function _(n,o){let s=e.getElement();if(!s||!n&&!o)return!1;let c=l(),u=en(n),d=en(o);(u!==0&&i!==0&&u!==i||d!==0&&a!==0&&d!==a)&&p();let f=Qt(),h=r?f-r:1/0,_=1;c.accelerationDelta>0&&h<c.accelerationDelta&&(_=Math.min((1+c.accelerationDelta/Math.max(1,h))/2,c.accelerationMax));let v=n*_,y=o*_;return i=en(v)||i,a=en(y)||a,r=f,c.duration===0||!Zt()||typeof window.requestAnimationFrame!=`function`?(m(s,v,y),!0):(t.push({x:v,y,lastX:0,lastY:0,start:f,duration:c.duration,pulseScale:c.pulseScale}),g(),!0)}function v(e){return o.length===3&&o.every(t=>t%e===0)}function y(e,t){if(e.deltaMode!==WheelEvent.DOM_DELTA_PIXEL)return!1;let n=e,r=n.wheelDeltaX||0,i=n.wheelDeltaY||0,a=Math.abs((Math.abs(i)>=Math.abs(r)?i:r)||n.wheelDelta||t);if(!a)return!1;o.length===0&&(o=[a,a,a]),o.push(a),o.shift();let s=a>120&&v(a);return!v(120)&&!v(100)&&!s}function b(t){let n=e.getElement();if(!n)return null;let r=l(),i=sn(t,n,u()),a=Math.abs(i.y)>=Math.abs(i.x)?i.y:i.x;if(!r.smoothTouchpad&&y(t,a))return null;let o=cn(i.x,r.stepSize),s=cn(i.y,r.stepSize);return o&&!tn(n,`x`,o)&&(o=0),s&&!tn(n,`y`,s)&&(s=0),!o&&!s||an(t,n,o,s)?null:{x:o,y:s}}function x(e){if(!Zt()||!d()||e.defaultPrevented||e.ctrlKey||l().respectReducedMotion&&on())return!1;let t=b(e);return t?(e.preventDefault(),_(t.x,t.y)):(e.defaultPrevented||p(),!1)}function S(t){let n=e.getElement(),r=l();if(!Zt()||!n||!d()||!r.keyboard||t.defaultPrevented||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey&&t.key!==` `||ln(t)||r.respectReducedMotion&&on())return!1;let i=u(),a=0,o=0;switch(t.key){case`ArrowUp`:o=i.vertical?-r.keyboardStep:0;break;case`ArrowDown`:o=i.vertical?r.keyboardStep:0;break;case`ArrowLeft`:a=i.horizontal?-r.keyboardStep:0;break;case`ArrowRight`:a=i.horizontal?r.keyboardStep:0;break;case`PageUp`:o=i.vertical?-n.clientHeight*.9:0;break;case`PageDown`:case` `:o=i.vertical?n.clientHeight*(t.shiftKey?-.9:.9):0;break;case`Home`:o=i.vertical?-n.scrollTop:0,a=!i.vertical&&i.horizontal?-n.scrollLeft:0;break;case`End`:o=i.vertical?Math.max(0,n.scrollHeight-n.clientHeight-n.scrollTop):0,a=!i.vertical&&i.horizontal?Math.max(0,n.scrollWidth-n.clientWidth-n.scrollLeft):0;break;default:return!1}return a&&!tn(n,`x`,a)&&(a=0),o&&!tn(n,`y`,o)&&(o=0),!a&&!o?!1:(t.preventDefault(),_(a,o))}return{cancel:p,handleKeydown:S,handleWheel:x,isAnimating:()=>n!==void 0||t.length>0}}var dn=[`tabindex`,`role`,`aria-label`],fn=R((0,t.defineComponent)({__name:`BingScrollbar`,props:{height:{default:void 0},maxHeight:{default:void 0},minThumbSize:{default:28},overflowTolerance:{default:1},vertical:{type:Boolean,default:!0},horizontal:{type:Boolean,default:!1},always:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},focusable:{type:Boolean,default:!0},ariaLabel:{default:void 0},smooth:{type:[Boolean,Object],default:!0}},emits:[`scroll`],setup(e,{expose:n,emit:r}){let i=e,a=r,o=(0,t.useSlots)(),s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(null),p=(0,t.ref)(!1),m=(0,t.ref)(!1),h=(0,t.ref)(0),g=(0,t.ref)(0),_=(0,t.ref)(!1),v=(0,t.ref)(null),y=(0,t.ref)(!1),b,x,S,C,w,T,E,D=0,O=0,k=0,A=0,j=0,M=0,N=0,P=0,F=0,I=(0,t.computed)(()=>[`bing-scrollbar`,{"has-overflow":p.value||m.value,"has-vertical-overflow":p.value,"has-horizontal-overflow":m.value,"is-vertical":i.vertical,"is-horizontal":i.horizontal,"is-always-visible":i.always,"is-disabled":i.disabled,"is-dragging":!!v.value,"is-dragging-vertical":v.value===`vertical`,"is-dragging-horizontal":v.value===`horizontal`,"is-hovering":_.value,"is-scrolling":y.value,"is-smooth":!!i.smooth}]),L=(0,t.computed)(()=>({height:G(i.height),maxHeight:G(i.maxHeight)}));function R(){return{height:`${h.value}px`,transform:`translate(-50%, ${P}px)`}}function z(){return{width:`${g.value}px`,transform:`translate(${F}px, -50%)`}}let B=(0,t.computed)(()=>Math.max(1,i.overflowTolerance)),V=(0,t.computed)(()=>(p.value||m.value)&&i.focusable&&!i.disabled),H=(0,t.computed)(()=>i.ariaLabel??(V.value?`可滚动内容`:void 0));function U(e){s.value=e instanceof HTMLElement?e:null}let ee={class:`bing-scrollbar__custom-viewport`,onScroll:he,onWheel:ge,onKeydown:_e,onInput:de};function W(){return typeof window<`u`&&typeof document<`u`}function G(e){return typeof e==`number`?`${e}px`:e}function te(){!W()||S===void 0||(window.clearTimeout(S),S=void 0)}function ne(){!W()||C===void 0||(window.cancelAnimationFrame(C),C=void 0)}function re(){!W()||w===void 0||(window.cancelAnimationFrame(w),w=void 0)}function ie(){re(),T=void 0}function ae(){ie(),E?.cancel()}function K(){return typeof i.smooth==`object`?i.smooth:void 0}function oe(){return!!i.smooth&&!i.disabled}function se(){let e=s.value;if(!e)return;let t=e.clientHeight,n=e.scrollHeight,r=e.clientWidth,a=e.scrollWidth,o=Math.max(0,n-t),c=Math.max(0,a-r),d=i.vertical&&!i.disabled&&o>B.value,f=i.horizontal&&!i.disabled&&c>B.value;if(p.value=d,m.value=f,A=d?o:0,j=f?c:0,!d||!l.value)h.value=0,ce(0),M=0;else{let r=l.value.clientHeight,a=n>0?t/n*r:r,s=Math.min(r,Math.max(Math.max(12,i.minThumbSize),a));M=Math.max(0,r-s);let c=o>0?e.scrollTop/o:0;h.value=s,ce(M*c)}if(!f||!u.value)g.value=0,le(0),N=0;else{let t=u.value.clientWidth,n=a>0?r/a*t:t,o=Math.min(t,Math.max(Math.max(12,i.minThumbSize),n));N=Math.max(0,t-o);let s=c>0?e.scrollLeft/c:0;g.value=o,le(N*s)}}function ce(e){P=e,d.value&&(d.value.style.transform=`translate(-50%, ${e}px)`)}function le(e){F=e,f.value&&(f.value.style.transform=`translate(${e}px, -50%)`)}function ue(){let e=s.value;if(e){if(p.value){let t=A>0?e.scrollTop/A:0;ce(M*t)}if(m.value){let t=j>0?e.scrollLeft/j:0;le(N*t)}}}function q(){if(!W()||typeof window.requestAnimationFrame!=`function`){se();return}C===void 0&&(C=window.requestAnimationFrame(()=>{C=void 0,se()}))}function de(){(0,t.nextTick)(q)}function fe(){W()&&(te(),y.value=!0,S=window.setTimeout(()=>{S=void 0,y.value=!1},720))}function pe(e){let t=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;return e.deltaMode===1?t*16:e.deltaMode===2?t*(s.value?.clientWidth??1):t}function me(){return W()&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function he(e){ue(),fe(),a(`scroll`,e)}function ge(e){if(e.defaultPrevented)return!1;if(oe())return ie(),E?.handleWheel(e)??!1;if(i.disabled||!i.horizontal)return!1;if(!e.shiftKey)return ie(),!1;let t=s.value;if(!t)return!1;let n=j||Math.max(0,t.scrollWidth-t.clientWidth),r=T??t.scrollLeft,a=be(r+pe(e),0,n);return a===r&&a===t.scrollLeft?!1:(e.preventDefault(),T=a,J(),!0)}function _e(e){oe()&&E?.handleKeydown(e)}function ve(e){let t=s.value,n=e===`vertical`?l.value:u.value;return!t||!n?null:{maxScroll:e===`vertical`?Math.max(0,t.scrollHeight-t.clientHeight):Math.max(0,t.scrollWidth-t.clientWidth),thumbTravel:e===`vertical`?Math.max(0,n.clientHeight-h.value):Math.max(0,n.clientWidth-g.value)}}function ye(e){let t=s.value;if(!t)return;let n=A||Math.max(0,t.scrollHeight-t.clientHeight);t.scrollTop=Math.min(n,Math.max(0,e)),ue(),fe()}function be(e,t,n){return Math.min(n,Math.max(t,e))}function xe(e){let t=s.value;if(!t)return;let n=j||Math.max(0,t.scrollWidth-t.clientWidth);t.scrollLeft=Math.min(n,Math.max(0,e)),ue(),fe()}function Se(){w=void 0;let e=s.value;if(!e||T===void 0){T=void 0;return}let t=T-e.scrollLeft;if(Math.abs(t)<.5){xe(T),T=void 0;return}xe(e.scrollLeft+t*.42),Ce()}function Ce(){!W()||w!==void 0||typeof window.requestAnimationFrame!=`function`||(w=window.requestAnimationFrame(Se))}function J(){if(T!==void 0){if(!W()||typeof window.requestAnimationFrame!=`function`||me()){xe(T),T=void 0;return}w===void 0&&Se()}}function Y(e,t){if(i.disabled||(e===`vertical`?!p.value:!m.value)||t.button!==0||t.target!==t.currentTarget)return;let n=e===`vertical`?l.value:u.value,r=ve(e);if(!n||!r||r.thumbTravel<=0)return;t.preventDefault(),ae();let a=n.getBoundingClientRect(),o=e===`vertical`?t.clientY-a.top-h.value/2:t.clientX-a.left-g.value/2,s=Math.min(1,Math.max(0,o/r.thumbTravel));if(e===`vertical`){ye(s*r.maxScroll);return}xe(s*r.maxScroll)}function we(){W()&&(window.addEventListener(`pointermove`,De),window.addEventListener(`pointerup`,Oe),window.addEventListener(`pointercancel`,Oe))}function Te(){W()&&(window.removeEventListener(`pointermove`,De),window.removeEventListener(`pointerup`,Oe),window.removeEventListener(`pointercancel`,Oe))}function Ee(e,t){if(!(i.disabled||(e===`vertical`?!p.value:!m.value)||t.button!==0)){t.preventDefault(),t.stopPropagation(),ae(),D=e===`vertical`?t.clientY:t.clientX,O=s.value?.scrollTop??0,k=s.value?.scrollLeft??0,v.value=e,we();try{t.currentTarget?.setPointerCapture?.(t.pointerId)}catch{}}}function De(e){let t=v.value;if(!t)return;let n=ve(t);if(!n||n.thumbTravel<=0)return;e.preventDefault();let r=((t===`vertical`?e.clientY:e.clientX)-D)*(n.maxScroll/n.thumbTravel);if(t===`vertical`){ye(O+r);return}xe(k+r)}function Oe(){v.value&&(v.value=null,Te())}function ke(e){let t=s.value;if(t){if(typeof e==`number`){ae(),ye(e);return}ae(),t.scrollTo(e),q()}}function X(e){let t=s.value;if(t){if(typeof e==`number`){ae(),ye(t.scrollTop+e);return}ae(),t.scrollBy(e),q()}}function Ae(){if(b?.disconnect(),b=void 0,x?.disconnect(),x=void 0,W()){if(o.viewport&&s.value&&typeof MutationObserver<`u`&&(x=new MutationObserver(de),x.observe(s.value,{childList:!0,subtree:!0,characterData:!0})),typeof ResizeObserver>`u`){window.addEventListener(`resize`,de),de();return}b=new ResizeObserver(de),s.value&&b.observe(s.value),c.value&&b.observe(c.value),l.value&&b.observe(l.value),u.value&&b.observe(u.value),de()}}return(0,t.watch)(s,()=>{ae(),Te(),Ae()},{flush:`post`}),(0,t.watch)(()=>[i.height,i.maxHeight,i.minThumbSize,i.overflowTolerance,i.disabled,i.vertical,i.horizontal],de),(0,t.watch)(()=>[i.disabled,i.smooth],()=>{oe()||E?.cancel()},{deep:!0}),(0,t.onMounted)(()=>{E=un({getElement:()=>s.value,getOptions:K,getAxes:()=>({horizontal:i.horizontal,vertical:i.vertical}),isEnabled:oe}),Ae()}),(0,t.onBeforeUnmount)(()=>{te(),ne(),ae(),E=void 0,Te(),b?.disconnect(),b=void 0,x?.disconnect(),x=void 0,W()&&window.removeEventListener(`resize`,de)}),n({handleWheel:ge,scrollBy:X,scrollTo:ke,stop:ae,update:se,get viewport(){return s.value}}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)(I.value),style:(0,t.normalizeStyle)(L.value),onMouseenter:n[4]||=e=>_.value=!0,onMouseleave:n[5]||=e=>_.value=!1},[(0,t.renderSlot)(e.$slots,`viewport`,{viewportRef:U,viewportAttrs:ee},()=>[(0,t.createElementVNode)(`div`,{ref_key:`viewportRef`,ref:s,class:`bing-scrollbar__viewport`,tabindex:V.value?0:void 0,role:H.value?`region`:void 0,"aria-label":H.value,onScroll:he,onWheel:ge,onKeydown:_e},[(0,t.createElementVNode)(`div`,{ref_key:`contentRef`,ref:c,class:`bing-scrollbar__content`},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],512)],40,dn)],!0),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`verticalRailRef`,ref:l,class:`bing-scrollbar__rail bing-scrollbar__rail--vertical`,"aria-hidden":`true`,onPointerdown:n[1]||=e=>Y(`vertical`,e)},[(0,t.createElementVNode)(`div`,{ref_key:`verticalThumbRef`,ref:d,class:`bing-scrollbar__thumb bing-scrollbar__thumb--vertical`,style:(0,t.normalizeStyle)(R()),onPointerdown:n[0]||=e=>Ee(`vertical`,e)},null,36)],544),[[t.vShow,p.value]]),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`horizontalRailRef`,ref:u,class:`bing-scrollbar__rail bing-scrollbar__rail--horizontal`,"aria-hidden":`true`,onPointerdown:n[3]||=e=>Y(`horizontal`,e)},[(0,t.createElementVNode)(`div`,{ref_key:`horizontalThumbRef`,ref:f,class:`bing-scrollbar__thumb bing-scrollbar__thumb--horizontal`,style:(0,t.normalizeStyle)(z()),onPointerdown:n[2]||=e=>Ee(`horizontal`,e)},null,36)],544),[[t.vShow,m.value]])],38))}}),[[`__scopeId`,`data-v-7a3e643e`]]),pn=Symbol(`BingOverlay`),mn=new WeakMap,hn=new WeakMap;function gn(e,t){let n=hn.get(e);return n||(n=new Set,hn.set(e,n)),n.add(t),()=>{n.delete(t),n.size||hn.delete(e)}}var _n=`a[href],button,input,select,textarea,[tabindex],[contenteditable="true"]`;function vn(e,t){return e===t||!!(e.parent&&vn(e.parent,t))}function yn(e){let n=[],r=new WeakMap,i=()=>n.at(-1),a=()=>[...n].reverse().find(e=>e.modal),o=(e,t)=>!!t&&n.some(n=>vn(n,e)&&n.elements().some(e=>e?.contains(t)));function s(){let e=0;for(let t of n)t.zIndex.value=Math.max(t.minimumZIndex(),e+2),e=t.zIndex.value}function c(t){let r=n.filter(e=>vn(e,t)).flatMap(e=>e.elements());return[...new Set(r.flatMap(e=>e?[e,...e.querySelectorAll(_n)]:[]))].filter(t=>t.matches(_n)&&t.tabIndex>=0&&!t.matches(`:disabled`)&&!t.closest(`[inert]`)&&t.getClientRects().length>0&&e.defaultView?.getComputedStyle(t).visibility!==`hidden`)}function l(e){(c(e)[0]??e.elements().find(Boolean))?.focus({preventScroll:!0})}function u(t){r.set(t,i());let n=a();if(t.key!==`Tab`||!n)return;let o=c(n),s=o.indexOf(e.activeElement);(!o.length||s<0||(t.shiftKey?s===0:s===o.length-1))&&(t.preventDefault(),o.length?o[t.shiftKey?o.length-1:0]?.focus():l(n))}function d(e){let t=r.get(e);e.key===`Escape`&&!e.defaultPrevented&&t?.closeOnEscape()&&(e.preventDefault(),r.set(e,void 0),t.onEscape?.(e))}function f(e){let t=a();t&&!o(t,e.target)&&l(t)}return{contains:o,allowsFocus:e=>!i()||o(i(),e),isTop:(e,t)=>(t&&r.has(t)?r.get(t):i())===e,add(r){if(n.includes(r)){s();return}r.previousFocus=e.activeElement,n.push(r),s(),hn.get(e)?.forEach(e=>e()),n.length===1&&(e.defaultView?.addEventListener(`keydown`,u,!0),e.defaultView?.addEventListener(`keydown`,d),e.addEventListener(`focusin`,f)),r.modal&&(0,t.nextTick)(()=>{a()===r&&!o(r,e.activeElement)&&l(r)})},remove(r){let i=n.indexOf(r);if(i<0)return;let s=a()===r;n.splice(i,1),s&&(0,t.nextTick)(()=>{let e=a(),t=r.previousFocus;t?.isConnected&&(!e||o(e,t))?t.focus({preventScroll:!0}):e&&l(e)}),n.length||(e.defaultView?.removeEventListener(`keydown`,u,!0),e.defaultView?.removeEventListener(`keydown`,d),e.removeEventListener(`focusin`,f),mn.delete(e)),hn.get(e)?.forEach(e=>e())}}}function bn(e){return mn.get(e.ownerDocument)?.allowsFocus(e)??!0}function xn(e){let n={parent:(0,t.inject)(pn,null),elements:e.elements,modal:e.modal??!1,minimumZIndex:e.zIndex,zIndex:(0,t.ref)(e.zIndex()),closeOnEscape:e.closeOnEscape??(()=>!0),onEscape:e.onEscape,previousFocus:null};(0,t.provide)(pn,n);let r;return(0,t.watch)([e.open,e.zIndex],([e])=>{typeof document>`u`||(e?(r=mn.get(document),r||(r=yn(document),mn.set(document,r)),r.add(n)):r?.remove(n))},{immediate:!0,flush:`post`}),(0,t.onBeforeUnmount)(()=>r?.remove(n)),{zIndex:(0,t.computed)(()=>Math.max(e.zIndex(),n.zIndex.value)),isTop:e=>r?.isTop(n,e)??!1,contains:e=>r?.contains(n,e)??!1}}function Sn(){let e=(0,t.ref)(!1);return(0,t.onMounted)(()=>{e.value=!0}),e}var Cn={key:0,class:`bing-autocomplete__header`},wn=[`aria-label`,`aria-busy`],Tn=[`id`,`aria-selected`,`aria-disabled`,`aria-label`,`data-autocomplete-index`,`onMouseenter`,`onMousemove`,`onClick`],En={class:`bing-autocomplete__option-main`},Dn={key:1,class:`bing-autocomplete__state`,role:`status`},On={key:2,class:`bing-autocomplete__state`,role:`alert`},kn={key:3,class:`bing-autocomplete__state`,role:`status`},An={key:4,class:`bing-autocomplete__footer`},jn={key:0},Mn={key:1},Nn={key:0},Pn={key:1},Fn=R((0,t.defineComponent)({inheritAttrs:!1,__name:`BingAutocomplete`,props:{id:{},modelValue:{default:``},options:{default:()=>[]},filter:{type:Boolean,default:!0},openOnEmpty:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},error:{default:``},disabled:{type:Boolean,default:void 0},clearable:{type:Boolean,default:!0},placeholder:{},emptyText:{default:`没有匹配的候选`},ariaLabel:{},ariaDescribedby:{},size:{},status:{},icon:{},block:{type:Boolean,default:!1},panelWidth:{},panelMaxHeight:{default:360},completeOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0}},emits:[`update:modelValue`,`select`,`open`,`close`,`clear`],setup(e,{expose:r,emit:i}){let a=e,o=i,s=(0,t.useSlots)(),{rootAttrs:c,controlAttrs:l}=we(),{formItem:u,resolvedId:d,resolvedSize:f,resolvedDisabled:p,resolvedStatus:m,resolvedAriaDescribedby:h}=he(a);ge();let g=Sn(),_=`bing-autocomplete-${(0,t.useId)()}`,v=(0,t.ref)(null),y=(0,t.ref)(null),b=(0,t.ref)(null),x=(0,t.ref)(null),S=(0,t.shallowRef)(),C=(0,t.ref)(`right`),w=(0,t.ref)(null),T=(0,t.ref)(null),E=(0,t.ref)(null),D=(0,t.ref)(!1),O=(0,t.ref)(!1),k=(0,t.ref)(-1),A=(0,t.ref)({left:0,top:0,width:320,height:360,detailHeight:360,inline:!0,placement:`bottom`}),j=0,M=0,N=0,P=0,F=!1,I,L,R=!1,z,B=!1,V,H,U,G,re=!1,K=(0,t.computed)(()=>{if(!a.filter)return a.options;let e=a.modelValue.trim().toLocaleLowerCase();return a.options.filter(t=>t.label.toLocaleLowerCase().includes(e))}),se=(0,t.computed)(()=>!a.loading&&!a.error),ce=(0,t.computed)(()=>se.value?K.value[k.value]:void 0),le=(0,t.computed)(()=>Object.entries(S.value?.meta??{}).filter(([,e])=>e!=null&&e!==``)),ue=(0,t.computed)(()=>A.value.inline&&S.value?Math.min(184,A.value.height/2):0),q=xn({open:()=>D.value,elements:()=>[v.value,y.value,b.value],zIndex:()=>3e3,closeOnEscape:()=>!O.value,onEscape:()=>{je(),re=!0,w.value?.input?.focus({preventScroll:!0}),re=!1}}),de=(0,t.computed)(()=>({position:`fixed`,left:`${A.value.left}px`,top:`${A.value.top}px`,width:`${A.value.width}px`,zIndex:q.zIndex.value})),fe=(0,t.computed)(()=>A.value.inline?{}:{zIndex:q.zIndex.value+1});function pe(){return window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function me(e){U?U.add(e):e()}function _e(e=k.value){return document.getElementById(`${_}-${e}`)}function ve(){clearTimeout(I),I=void 0}function ye(){let e=_e(),t=b.value;if(!D.value||!e||!t||A.value.inline)return null;let n=e.getBoundingClientRect(),r=window.visualViewport,i=(r?.offsetLeft??0)+12,a=(r?.offsetTop??0)+12,o=i+(r?.width??innerWidth)-24,s=a+(r?.height??innerHeight)-24,c=t.offsetWidth,l=t.offsetHeight,u=A.value.left+A.value.width+12,d=A.value.left-c-12,f=u+c<=o?`right`:`left`;return{x:Math.max(i,Math.min(f===`right`?u:d,o-c)),y:Math.max(a,Math.min(n.top+n.height/2-l/2,s-l)),placement:f}}function be(e=!1,t){cancelAnimationFrame(N),!(!D.value||!S.value)&&(N=requestAnimationFrame(()=>{N=0,!(B||!D.value||!b.value||A.value.inline)&&me(()=>{let n=ne({panel:b.value,content:x.value,getTarget:ye,animateContent:e,previousSnapshot:t,reducedMotion:pe(),onComplete:()=>E.value?.update()});n&&(C.value=n.placement)})}))}function xe(){F=!1,ve(),clearTimeout(L);let e=ce.value;if(!D.value||!e||e.disabled||!(s[`option-detail`]||e.detail?.trim()||e.description?.trim()||Object.values(e.meta??{}).some(e=>e!=null&&e!==``))){Se(!0);return}let r=S.value!==e,i=r?te(b.value):void 0;b.value&&n.gsap.killTweensOf(b.value),S.value=e;let a=++P;(0,t.nextTick)(()=>{B||a!==P||!D.value||be(r,i)})}function Se(e=!1){F=!0,ve(),cancelAnimationFrame(N),N=0;let t=++P,r=b.value;n.gsap.killTweensOf([r,x.value].filter(Boolean));let i=()=>{t===P&&(S.value=void 0,F=!1)};if(!r||e||A.value.inline||pe()){i();return}me(()=>{n.gsap.to(r,{autoAlpha:0,scale:.96,x:`+=${C.value===`right`?-6:6}`,duration:.14,ease:`power2.out`,overwrite:!0,onComplete:i})})}function Ce(){ve(),I=setTimeout(()=>Se(),120)}function J(e,t){let n=!z||e.clientX!==z.x||e.clientY!==z.y;if(z={x:e.clientX,y:e.clientY},R&&(e.type!==`mousemove`||!n))return;if(R=!1,ve(),K.value[t]?.disabled){Se(!0);return}let r=k.value!==t;k.value=t,(r||!S.value||F)&&xe();let i=e.currentTarget,a=i.querySelector(`.bing-autocomplete__option-liquid`);!a||pe()||(oe(i,a,e),i.classList.contains(`is-liquid-active`)||(i.classList.add(`is-liquid-active`),me(()=>{ie(a)})))}function Y(e){let t=e.currentTarget;t.classList.remove(`is-liquid-active`);let n=t.querySelector(`.bing-autocomplete__option-liquid`);n&&!pe()&&me(()=>{ae(n)})}function Te(){if(R){be();return}Se(!0),clearTimeout(L),L=setTimeout(()=>{if(!D.value||R||!z)return;let e=document.elementFromPoint(z.x,z.y)?.closest(`[data-autocomplete-index]`);!e||!y.value?.contains(e)||(k.value=Number(e.dataset.autocompleteIndex),xe())},150)}function Ee(e,t,r){if(B){t();return}V?.kill(),H=r?void 0:t;let i=e,a=Array.from(i.querySelectorAll(`.bing-autocomplete__option`)),o=i.querySelectorAll(`.bing-autocomplete__option-liquid`);if(n.gsap.killTweensOf([i,...a,...o]),i.inert=!r,r?(Oe(),G?.observe(i)):G?.unobserve(i),pe()){n.gsap.set([i,...a],{autoAlpha:+!!r,clearProps:`transform`}),H=void 0,t();return}me(()=>{let e=r?ee:W,n=i.getBoundingClientRect(),o=a.filter(e=>{let t=e.getBoundingClientRect();return t.top<n.bottom&&t.bottom>n.top});o.forEach(e=>{e.style.willChange=`transform, opacity`}),V=e({panel:i,items:o,actionRail:null,actionButtons:[],placement:A.value.placement,align:`start`,onComplete:()=>{V=void 0,H=void 0,t(),r&&be()}})})}function De(){V?.kill(),V=void 0}function Oe(){if(j=0,!D.value||!v.value)return;let e=v.value.getBoundingClientRect(),r=window.visualViewport,i=(r?.offsetLeft??0)+8,o=(r?.offsetTop??0)+8,s=i+(r?.width??window.innerWidth)-16,c=o+(r?.height??window.innerHeight)-16,l=Math.min(Math.max(e.width,a.panelWidth??320),s-i),u=Math.max(i,Math.min(e.left,s-l)),d=c-e.bottom-10,f=e.top-o-10,p=d>=Math.min(a.panelMaxHeight,200)||d>=f,m=Math.max(0,Math.min(a.panelMaxHeight,(p?d:f)-10)),h=Math.min(y.value?.offsetHeight??m+10,m+10),g=p?Math.min(c,e.bottom+10):Math.max(o,e.top-10-h),_=s-u-l<260&&u-i<260;A.value.inline!==_&&n.gsap.killTweensOf([b.value,x.value].filter(Boolean));let S={left:u,top:g,width:l,height:m,inline:_,detailHeight:Math.max(0,c-o-32),placement:p?`bottom`:`top`};Object.keys(S).some(e=>S[e]!==A.value[e])&&(A.value=S,(0,t.nextTick)(()=>be()))}function ke(){D.value&&!j&&(j=requestAnimationFrame(Oe))}function X(e=a.modelValue){return a.openOnEmpty||!!e.trim()}function Ae(e=a.modelValue){p.value||D.value||re||!X(e)||(D.value=!0,R=!1,k.value=K.value.findIndex(e=>!e.disabled),Oe(),o(`open`),(0,t.nextTick)(()=>{D.value&&Oe()}))}function je(){D.value&&(D.value=!1,R=!1,clearTimeout(L),Se(),y.value&&G?.unobserve(y.value),o(`close`))}function Me(){w.value?.focus(),Ae()}function Ne(e){o(`update:modelValue`,String(e)),u?.handleControlChange(),X(String(e))?Ae(String(e)):je()}function Pe(e){!se.value||e.disabled||p.value||O.value||(a.completeOnSelect&&Ne(e.label),o(`select`,e),a.closeOnSelect&&je())}function Fe(){(0,t.nextTick)(()=>{let e=T.value?.viewport,t=document.getElementById(`${_}-${k.value}`);if(!D.value||!e||!t)return;T.value?.stop();let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();r.top<n.top?e.scrollTop+=r.top-n.top:r.bottom>n.bottom&&(e.scrollTop+=r.bottom-n.bottom),xe()})}function Ie(e){if(!(e.isComposing||O.value||e.keyCode===229||p.value))if(e.key===`Escape`&&D.value)e.preventDefault(),e.stopPropagation(),je();else if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),!D.value){Ae(),R=!0,Fe();return}if(!se.value)return;R=!0;let t=e.key===`ArrowDown`?1:-1;for(let e=1;e<=K.value.length;e++){let n=(k.value+t*e+K.value.length)%K.value.length;if(!K.value[n]?.disabled){k.value=n,Fe();break}}}else e.key===`Enter`&&D.value&&ce.value&&(e.preventDefault(),Pe(ce.value))}function Z(e){return!!(e&&([v.value,y.value,b.value].some(t=>t?.contains(e))||q.contains(e)))}function Le(e){D.value&&e.target instanceof Node&&!Z(e.target)&&je()}function Re(e){let t=e.relatedTarget instanceof Node&&Z(e.relatedTarget);cancelAnimationFrame(M),M=requestAnimationFrame(()=>{M=0;let n=!e.relatedTarget&&e.target instanceof Node&&!e.target.isConnected||t&&e.relatedTarget instanceof Node&&!e.relatedTarget.isConnected;if(D.value&&n&&document.activeElement===document.body){w.value?.input?.focus({preventScroll:!0});return}Z(document.activeElement)||(je(),u?.handleControlBlur())})}return(0,t.watch)([K,se],()=>{let e=typeof document>`u`?null:document.activeElement,n=Z(e);k.value=K.value.findIndex(e=>!e.disabled),D.value&&(ke(),R&&ce.value?Fe():Se(!0)),(0,t.nextTick)(()=>{D.value&&n&&e&&!e.isConnected&&document.activeElement===document.body&&w.value?.input?.focus({preventScroll:!0})})}),(0,t.watch)(p,e=>{e&&je()}),(0,t.watch)([()=>a.modelValue,()=>a.openOnEmpty],()=>{X()||je()}),(0,t.watch)([()=>a.panelWidth,()=>a.panelMaxHeight],ke),(0,t.watch)(ue,()=>{R&&Fe()}),(0,t.watch)(x,(e,t)=>{t&&G?.unobserve(t),e&&G?.observe(e)}),(0,t.onMounted)(()=>{U=n.gsap.context(()=>{},v.value),G=new ResizeObserver(e=>{e.some(e=>e.target!==x.value)&&ke(),e.some(e=>e.target===x.value)&&!N&&b.value&&!n.gsap.isTweening(b.value)&&be()}),v.value&&G.observe(v.value),window.addEventListener(`resize`,ke),window.addEventListener(`scroll`,ke,!0),window.visualViewport?.addEventListener(`resize`,ke),window.visualViewport?.addEventListener(`scroll`,ke),document.addEventListener(`pointerdown`,Le,!0),document.addEventListener(`focusin`,Le)}),(0,t.onBeforeUnmount)(()=>{B=!0,P++,ve(),clearTimeout(L),cancelAnimationFrame(N),De(),H?.(),H=void 0,U?.revert(),cancelAnimationFrame(j),cancelAnimationFrame(M),G?.disconnect(),window.removeEventListener(`resize`,ke),window.removeEventListener(`scroll`,ke,!0),window.visualViewport?.removeEventListener(`resize`,ke),window.visualViewport?.removeEventListener(`scroll`,ke),document.removeEventListener(`pointerdown`,Le,!0),document.removeEventListener(`focusin`,Le)}),r({focus:Me,close:je,get input(){return w.value?.input??null}}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)((0,t.unref)(c)(),{ref_key:`root`,ref:v,class:[`bing-autocomplete`,{"is-block":e.block}],onFocusout:Re}),[(0,t.createVNode)(Vt,(0,t.mergeProps)((0,t.unref)(l)(),{id:(0,t.unref)(d),ref_key:`input`,ref:w,"model-value":e.modelValue,disabled:(0,t.unref)(p),size:(0,t.unref)(f),status:(0,t.unref)(m),placeholder:e.placeholder,clearable:e.clearable,icon:e.icon,block:``,"aria-label":e.ariaLabel,"aria-describedby":(0,t.unref)(h),role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":D.value,"aria-controls":D.value?_:void 0,"aria-activedescendant":D.value&&ce.value?`${_}-${k.value}`:void 0,spellcheck:!1,"onUpdate:modelValue":Ne,onFocus:r[0]||=e=>Ae(),onClick:r[1]||=e=>Ae(),onKeydown:Ie,onCompositionstart:r[2]||=e=>O.value=!0,onCompositionend:r[3]||=e=>O.value=!1,onClear:r[4]||=e=>o(`clear`)}),(0,t.createSlots)({_:2},[s.icon?{name:`icon`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`icon`,{},void 0,!0)]),key:`0`}:void 0]),1040,[`id`,`model-value`,`disabled`,`size`,`status`,`placeholder`,`clearable`,`icon`,`aria-label`,`aria-describedby`,`aria-expanded`,`aria-controls`,`aria-activedescendant`]),(0,t.unref)(g)?((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{key:0,to:`body`},[(0,t.createVNode)(t.Transition,{css:!1,onEnter:r[7]||=(e,t)=>Ee(e,t,!0),onLeave:r[8]||=(e,t)=>Ee(e,t,!1),onEnterCancelled:De,onLeaveCancelled:De},{default:(0,t.withCtx)(()=>[D.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref_key:`panel`,ref:y,class:`bing-autocomplete__panel`,style:(0,t.normalizeStyle)(de.value),onFocusout:Re},[(0,t.createVNode)(fn,{ref_key:`scrollbar`,ref:T,"max-height":A.value.height-ue.value,focusable:!1,onScroll:Te},{default:(0,t.withCtx)(()=>[s.header?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Cn,[(0,t.renderSlot)(n.$slots,`header`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,{id:_,role:`listbox`,"aria-label":e.ariaLabel||`搜索候选`,"aria-busy":e.loading,onMouseenter:ve,onMouseleave:Ce},[se.value?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(K.value,(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{id:`${_}-${i}`,key:e.value,role:`option`,class:(0,t.normalizeClass)([`bing-autocomplete__option`,{"is-active":k.value===i,"is-disabled":e.disabled}]),"aria-selected":k.value===i,"aria-disabled":e.disabled||void 0,"aria-label":e.label,"data-autocomplete-index":i,onMousedown:r[5]||=(0,t.withModifiers)(()=>{},[`prevent`]),onMouseenter:e=>J(e,i),onMousemove:e=>J(e,i),onMouseleave:Y,onClick:t=>Pe(e)},[r[12]||=(0,t.createElementVNode)(`span`,{class:`bing-autocomplete__option-liquid`,"aria-hidden":`true`},null,-1),(0,t.createElementVNode)(`span`,En,[(0,t.renderSlot)(n.$slots,`option`,{option:e,active:k.value===i},()=>[(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(e.label),1)],!0)])],42,Tn))),128)):(0,t.createCommentVNode)(``,!0)],40,wn),e.loading?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Dn,[(0,t.renderSlot)(n.$slots,`loading`,{},()=>[r[13]||=(0,t.createTextVNode)(`正在加载…`,-1)],!0)])):e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,On,[(0,t.renderSlot)(n.$slots,`error`,{error:e.error},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.error),1)],!0)])):K.value.length?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,kn,[(0,t.renderSlot)(n.$slots,`empty`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.emptyText),1)],!0)])),s.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,An,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]),_:3},8,[`max-height`]),A.value.inline&&S.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`bing-autocomplete__detail is-inline`,"aria-hidden":`true`,onMouseenter:ve,onMouseleave:Ce,onMousedown:r[6]||=(0,t.withModifiers)(()=>{},[`prevent`])},[(0,t.createVNode)(fn,{"max-height":Math.max(0,ue.value-28),focusable:!1},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`option-detail`,{option:S.value},()=>[(0,t.createElementVNode)(`strong`,null,(0,t.toDisplayString)(S.value.label),1),S.value.detail||S.value.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,jn,(0,t.toDisplayString)(S.value.detail||S.value.description),1)):(0,t.createCommentVNode)(``,!0),le.value.length?((0,t.openBlock)(),(0,t.createElementBlock)(`dl`,Mn,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(le.value,([e,n])=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e},[(0,t.createElementVNode)(`dt`,null,(0,t.toDisplayString)(e),1),(0,t.createElementVNode)(`dd`,null,(0,t.toDisplayString)(n),1)]))),128))])):(0,t.createCommentVNode)(``,!0)],!0)]),_:3},8,[`max-height`])],32)):(0,t.createCommentVNode)(``,!0)],36)):(0,t.createCommentVNode)(``,!0)]),_:3}),!A.value.inline&&S.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref_key:`detail`,ref:b,class:`bing-autocomplete__detail`,style:(0,t.normalizeStyle)(fe.value),"aria-hidden":`true`,onMouseenter:ve,onMouseleave:Ce,onMousedown:r[9]||=(0,t.withModifiers)(()=>{},[`prevent`]),onPointerdown:r[10]||=(0,t.withModifiers)(()=>{},[`stop`]),onClick:r[11]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createVNode)(fn,{ref_key:`detailScrollbar`,ref:E,"max-height":A.value.detailHeight,focusable:!1},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,{ref_key:`detailContent`,ref:x,class:`bing-autocomplete__detail-content`},[(0,t.renderSlot)(n.$slots,`option-detail`,{option:S.value},()=>[(0,t.createElementVNode)(`strong`,null,(0,t.toDisplayString)(S.value.label),1),S.value.detail||S.value.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,Nn,(0,t.toDisplayString)(S.value.detail||S.value.description),1)):(0,t.createCommentVNode)(``,!0),le.value.length?((0,t.openBlock)(),(0,t.createElementBlock)(`dl`,Pn,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(le.value,([e,n])=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e},[(0,t.createElementVNode)(`dt`,null,(0,t.toDisplayString)(e),1),(0,t.createElementVNode)(`dd`,null,(0,t.toDisplayString)(n),1)]))),128))])):(0,t.createCommentVNode)(``,!0)],!0)],512)]),_:3},8,[`max-height`])],36)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)],16))}}),[[`__scopeId`,`data-v-5fa956b3`]]),In={duration:{fast:.18,normal:.32,slow:.62},ease:{smooth:`power3.out`,press:`back.out(2.2)`,glide:`expo.out`}};function Ln(){return typeof window<`u`}function Rn(){return Ln()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}var zn=[`aria-label`],Bn=[`aria-selected`,`aria-disabled`,`aria-label`,`disabled`,`tabindex`,`onClick`,`onKeydown`,`onFocus`,`onBlur`],Vn={class:`bing-tabs__tab-surface`},Hn={class:`bing-tabs__tab-content`},Un=R((0,t.defineComponent)({inheritAttrs:!1,__name:`BingTabs`,props:{modelValue:{default:void 0},items:{default:()=>[]},size:{default:`md`},variant:{default:`pill`},activation:{default:`auto`},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1},loop:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},respectReducedMotion:{type:Boolean,default:!0},smoothScroll:{type:[Boolean,Object],default:!0},ariaLabel:{default:`标签页`}},emits:[`update:modelValue`,`change`,`focus`,`blur`],setup(e,{emit:r}){let{playClickFeedback:i}=de(),a=e,o=r,s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)([]),d=(0,t.ref)(void 0),f=(0,t.ref)(-1),p=(0,t.ref)(!1),m,h,g=0,_=(0,t.computed)(()=>a.modelValue!==void 0),v=(0,t.computed)(()=>a.items.filter(e=>!e.disabled)),y=(0,t.computed)(()=>v.value[0]),b=(0,t.computed)(()=>_.value?a.modelValue:d.value??y.value?.value),x=(0,t.computed)(()=>a.items.findIndex(e=>Object.is(e.value,b.value))),S=(0,t.computed)(()=>[`bing-tabs`,`bing-tabs--${a.variant}`,`bing-tabs--${a.size}`,{"is-block":a.block,"is-disabled":a.disabled,"is-indicator-ready":p.value}]),C=(0,t.computed)(()=>Kt(a.smoothScroll,Gt,{keyboard:!1,smoothTouchpad:!1,respectReducedMotion:!0}));function w(){return typeof window<`u`}function T(){return!a.animated||a.respectReducedMotion&&w()&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function E(e,t){let n=t===`left`?`borderLeftWidth`:`borderTopWidth`,r=Number.parseFloat(window.getComputedStyle(e)[n]);return Number.isFinite(r)?r:t===`left`?e.clientLeft:e.clientTop}function D(e){return a.disabled||!!e.disabled}function O(e,t){e instanceof HTMLButtonElement&&(u.value[t]=e)}function k(e){return e.querySelector(`.bing-tabs__tab-surface`)??e}function A(e){return D(a.items[e])?-1:f.value>=0?f.value===e?0:-1:x.value===e?0:-1}function j(e,t){let n=a.items.length;if(n===0)return-1;let r=e;for(let e=0;e<n;e+=1){if(r+=t,a.loop)r=(r+n)%n;else if(r<0||r>=n)return-1;let e=a.items[r];if(e&&!D(e))return r}return-1}function M(e){let t=(e===`first`?a.items:[...a.items].reverse()).findIndex(e=>!D(e));return t<0?-1:e===`first`?t:a.items.length-1-t}function N(e){return a.items.find(t=>Object.is(t.value,e))}function P(){return w()&&!!s.value?.contains(document.activeElement)}function F(e=!1){if(a.activation!==`auto`||x.value<0)return;let t=a.items[x.value];!t||D(t)||(f.value=x.value,e&&P()&&R(x.value))}function I(e,t){if(D(e)){t.preventDefault();return}i(t,u.value[a.items.indexOf(e)]);let n=b.value;if(Object.is(n,e.value))return;_.value||(d.value=e.value);let r={value:e.value,previousValue:n,item:e,previousItem:N(n),event:t};o(`update:modelValue`,e.value),o(`change`,r)}function L(e,t,n){n.defaultPrevented||(f.value=t,I(e,n))}function R(e){let t=u.value[e];t&&(c.value?.stop(),f.value=e,t.focus())}function z(e,n){let r=a.items[e];!r||D(r)||(n.preventDefault(),R(e),a.activation===`auto`&&(I(r,n),(0,t.nextTick)().then(()=>{Object.is(b.value,r.value)||F(!0)})))}function B(e,t){if(t.key===`ArrowRight`||t.key===`ArrowDown`){z(j(e,1),t);return}if(t.key===`ArrowLeft`||t.key===`ArrowUp`){z(j(e,-1),t);return}if(t.key===`Home`){z(M(`first`),t);return}if(t.key===`End`){z(M(`last`),t);return}if(t.key===`Enter`||t.key===` `){let n=a.items[e];if(!n)return;t.preventDefault(),I(n,t)}}function V(e,t,n){c.value?.stop(),f.value=t,o(`focus`,{value:e.value,item:e,event:n})}function H(e,t){s.value?.contains(t.relatedTarget)||(f.value=-1),o(`blur`,{value:e.value,item:e,event:t})}function U(e){if(C.value!==!1&&(c.value?.handleWheel(e)??!1)||e.defaultPrevented||!s.value)return;let t=e.deltaX||(e.shiftKey?e.deltaY:0),n=Math.max(0,s.value.scrollWidth-s.value.clientWidth);n>.5&&(t<0?s.value.scrollLeft>.5:t>0&&s.value.scrollLeft<n-.5)&&e.stopPropagation()}function ee(e=!0){w()&&(g&&window.cancelAnimationFrame(g),g=window.requestAnimationFrame(()=>{g=0,W(e)}))}function W(e=!0){let t=s.value,r=l.value,i=u.value[x.value];if(!t||!r||!i||x.value<0){r&&n.gsap.set(r,{autoAlpha:0}),p.value=!1;return}let a=t.getBoundingClientRect(),o=k(i).getBoundingClientRect(),c=r.getBoundingClientRect(),d=E(t,`left`),f=E(t,`top`),h=Math.max(1,o.width),g=Math.max(1,o.height),_=o.left-a.left-d+t.scrollLeft,v=o.top-a.top-f,y=p.value&&c.width>0&&c.height>0,b=y?c.left-a.left-d+t.scrollLeft:_,S=y?c.top-a.top-f:v,C=y?c.width/h:1,w=y?c.height/g:1,D=e&&y&&!T();m?.kill(),n.gsap.set(r,{width:h,height:g,transformOrigin:`0 0`,willChange:`transform, opacity`}),D?m=n.gsap.fromTo(r,{x:b,y:S,scaleX:C,scaleY:w,autoAlpha:1},{x:_,y:v,scaleX:1,scaleY:1,autoAlpha:1,duration:.42,ease:`power3.out`,overwrite:`auto`,force3D:!0,onComplete:()=>{m=void 0}}):n.gsap.set(r,{x:_,y:v,scaleX:1,scaleY:1,autoAlpha:1,force3D:!0}),p.value=!0}return(0,t.onBeforeUpdate)(()=>{u.value=[]}),(0,t.onMounted)(()=>{(0,t.nextTick)().then(()=>{W(!1)}),typeof ResizeObserver<`u`&&s.value&&(h=new ResizeObserver(()=>{ee(!1)}),h.observe(s.value))}),(0,t.onBeforeUnmount)(()=>{m?.kill(),c.value?.stop(),g&&w()&&window.cancelAnimationFrame(g),h?.disconnect()}),(0,t.watch)(()=>a.smoothScroll,()=>c.value?.stop(),{deep:!0}),(0,t.watch)(()=>[b.value,a.items.length,a.size,a.variant,a.block],()=>{(0,t.nextTick)().then(()=>{W(!0)})}),(0,t.watch)(x,()=>{f.value<0||!P()||(0,t.nextTick)().then(()=>{F(!0)})}),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)(fn,{ref_key:`scrollbarRef`,ref:c,class:(0,t.normalizeClass)([`bing-tabs__scroll`,{"is-block":e.block}]),vertical:!1,horizontal:``,focusable:!1,smooth:C.value},{viewport:(0,t.withCtx)(({viewportRef:r,viewportAttrs:i})=>[(0,t.createElementVNode)(`div`,(0,t.mergeProps)((0,t.mergeProps)(n.$attrs,{...i,onWheel:U}),{ref:e=>{s.value=e,r(e)},class:S.value,role:`tablist`,"aria-orientation":`horizontal`,"aria-label":e.ariaLabel}),[(0,t.createElementVNode)(`span`,{ref_key:`indicatorRef`,ref:l,class:`bing-tabs__indicator`,"aria-hidden":`true`},null,512),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:String(e.value),ref_for:!0,ref:e=>O(e,r),class:(0,t.normalizeClass)([`bing-tabs__tab`,{"is-active":Object.is(e.value,b.value),"is-disabled":D(e)}]),type:`button`,role:`tab`,"aria-selected":Object.is(e.value,b.value),"aria-disabled":D(e)||void 0,"aria-label":e.ariaLabel,disabled:D(e),tabindex:A(r),onClick:t=>L(e,r,t),onKeydown:e=>B(r,e),onFocus:t=>V(e,r,t),onBlur:t=>H(e,t)},[(0,t.createElementVNode)(`span`,Vn,[(0,t.createElementVNode)(`span`,Hn,[(0,t.renderSlot)(n.$slots,`item`,{item:e,active:Object.is(e.value,b.value),disabled:D(e)},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)])])],42,Bn))),128))],16,zn)]),_:3},8,[`class`,`smooth`]))}}),[[`__scopeId`,`data-v-e740be89`]]),Wn=[`aria-hidden`],Gn=R((0,t.defineComponent)({__name:`BingAppSwitcherTransition`,props:{modelValue:{default:void 0},items:{default:()=>[]},disabled:{type:Boolean,default:!1},respectReducedMotion:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTabs:{type:Boolean,default:!0},ariaLabel:{default:`应用切换面板`}},emits:[`update:modelValue`,`change`],setup(e,{emit:r}){let i=e,a=r,o=(0,t.ref)([]),s=(0,t.ref)(null),c=(0,t.ref)(!1),l=(0,t.ref)(void 0),u,d=0,f,p,m=(0,t.computed)(()=>i.items.filter(e=>!e.disabled)),h=(0,t.computed)(()=>m.value[0]),g=(0,t.computed)(()=>i.modelValue!==void 0),_=(0,t.computed)(()=>g.value?i.modelValue:l.value??h.value?.value),v=(0,t.computed)(()=>{let e=i.items.findIndex(e=>Object.is(e.value,_.value));return e>=0?e:0}),y=(0,t.computed)(()=>i.items.map(e=>({...e,value:e.value,label:e.label,disabled:i.disabled||e.disabled})));function b(){return typeof window<`u`}function x(){return i.disabled||i.respectReducedMotion&&Rn()}function S(e){let t=i.items.length;return t===0?0:i.loop?(e+t)%t:Math.min(Math.max(e,0),t-1)}function C(e,t){let n=e-t,r=i.items.length;return r===0?0:(n>r/2&&(n-=r),n<r/-2&&(n+=r),n)}function w(e,t,n=t){let r=C(e,t),i=Math.abs(r),a=e===n;return{xPercent:r*58,y:30+i*3,scale:a?.68:.6,rotation:r*-1.4,opacity:a?.98:Math.max(.46,.66-i*.1),zIndex:a?18:10-i,force3D:!0}}function T(e,t){let n=C(e,t),r=Math.abs(n);return{xPercent:n*116,y:r===0?0:22,scale:r===0?1:.78,rotation:n*-1.4,opacity:+(r===0),zIndex:r===0?24:5-r,force3D:!0}}function E(e,t){e instanceof HTMLElement&&(o.value[t]=e)}function D(e){let t=i.items[e];if(!t||i.disabled||t.disabled||Object.is(t.value,_.value))return!1;let n=_.value,r=i.items.find(e=>Object.is(e.value,n));return p=t.value,g.value||(l.value=t.value),a(`update:modelValue`,t.value),a(`change`,{value:t.value,previousValue:n,item:t,previousItem:r}),!0}function O(e=v.value,t=!1){let r=t||x()?0:.32;u?.kill(),u=n.gsap.timeline({defaults:{duration:r,ease:`power3.out`,overwrite:`auto`},onStart:()=>{c.value=!0},onComplete:()=>{c.value=!1,u=void 0},onInterrupt:()=>{c.value=!1}}),o.value.forEach((t,n)=>{u?.to(t,T(n,e),0)})}function k(e,t){let r=C(e,t)>=0?1:-1;if(x()){O(e,!0);return}u?.kill(),c.value=!0,u=n.gsap.timeline({defaults:{overwrite:`auto`},onComplete:()=>{c.value=!1,u=void 0},onInterrupt:()=>{c.value=!1}}),s.value&&u.to(s.value,{x:r*-10,scale:.996,duration:.16,ease:`power2.out`,force3D:!0},0).to(s.value,{x:0,scale:1,duration:.5,ease:`expo.out`,force3D:!0},.18),o.value.forEach((e,n)=>{u?.to(e,{...w(n,t,t),duration:.2,ease:`power3.out`},0)}),o.value.forEach((t,n)=>{u?.to(t,{...w(n,e,e),duration:.34,ease:`power3.inOut`},.1)}),o.value.forEach((t,n)=>{let r=T(n,e),i=n===e;u?.to(t,{...r,duration:i?.48:.32,ease:i?`expo.out`:`power3.out`},i?.3:.34)})}function A(e){let t=S(e),n=v.value;t===v.value||c.value||!D(t)||k(t,n)}function j(e){A(i.items.findIndex(t=>Object.is(t.value,e)))}function M(e){e.defaultPrevented||i.disabled||Math.abs(e.deltaX)<=Math.abs(e.deltaY)||(e.preventDefault(),!(c.value||!b())&&(d+=e.deltaX,f&&window.clearTimeout(f),f=window.setTimeout(()=>{let e=d>0?1:-1,t=Math.abs(d)>34;d=0,f=void 0,t&&A(v.value+e)},58)))}return(0,t.onBeforeUpdate)(()=>{o.value=[]}),(0,t.onMounted)(()=>{(0,t.nextTick)().then(()=>{o.value.forEach(e=>{n.gsap.set(e,{transformOrigin:`50% 50%`,willChange:`transform, opacity`,force3D:!0})}),O(v.value,!0)})}),(0,t.onBeforeUnmount)(()=>{u?.kill(),n.gsap.killTweensOf(o.value),s.value&&n.gsap.killTweensOf(s.value),f&&b()&&window.clearTimeout(f)}),(0,t.watch)(_,(e,n)=>{if(e===void 0)return;if(Object.is(e,p)){p=void 0;return}let r=i.items.findIndex(t=>Object.is(t.value,e));if(r<0)return;let a=i.items.findIndex(e=>Object.is(e.value,n));(0,t.nextTick)().then(()=>{if(a<0){O(r,!0);return}k(r,a)})}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`section`,{class:(0,t.normalizeClass)([`bing-app-switcher-transition`,{"is-disabled":e.disabled}]),onWheel:M},[(0,t.createElementVNode)(`div`,{ref_key:`stageRef`,ref:s,class:`bing-app-switcher-transition__stage`},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`article`,{key:String(e.value),ref_for:!0,ref:e=>E(e,r),class:(0,t.normalizeClass)([`bing-app-switcher-transition__card`,{"is-active":Object.is(_.value,e.value)}]),"aria-hidden":!Object.is(_.value,e.value)},[(0,t.renderSlot)(n.$slots,`default`,{item:e,index:r,active:Object.is(_.value,e.value),isAnimating:c.value},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)],10,Wn))),128))],512),e.showTabs?((0,t.openBlock)(),(0,t.createBlock)(Un,{key:0,items:y.value,"model-value":_.value,variant:`glass`,size:`md`,block:``,disabled:e.disabled,loop:e.loop,"respect-reduced-motion":e.respectReducedMotion,"aria-label":e.ariaLabel,"onUpdate:modelValue":j},null,8,[`items`,`model-value`,`disabled`,`loop`,`respect-reduced-motion`,`aria-label`])):(0,t.createCommentVNode)(``,!0)],34))}}),[[`__scopeId`,`data-v-bacda41f`]]),Kn={glass:!0,glassBlur:16,glassOpacity:.85,glassSaturation:1.28};function qn(e,t,n){return Math.min(n,Math.max(t,e))}function Jn(e){if(typeof e==`number`)return`${Math.max(0,e)}px`;let t=e.trim();return/^-?\d+(\.\d+)?$/.test(t)?`${Math.max(0,Number(t))}px`:e}function Yn(e,t){let n=t.glass!==!1,r=n?t.glassBlur===void 0?`var(--bing-glass-blur, 16px)`:Jn(t.glassBlur):`0px`,i=n?t.glassOpacity===void 0?`var(--bing-glass-opacity, 0.85)`:qn(t.glassOpacity,0,1):1,a=n?t.glassSaturation===void 0?`var(--bing-glass-saturation, 1.05)`:Math.max(0,t.glassSaturation):1;return{[`--${e}-glass-blur`]:r,[`--${e}-glass-opacity`]:String(i),[`--${e}-glass-saturation`]:String(a)}}var Xn={class:`bing-card__face bing-card__front`},Zn={key:1,class:`bing-card__media`},Qn={class:`bing-card__content`},$n={key:0,class:`bing-card__header`},er={class:`bing-card__heading`},tr={key:0,class:`bing-card__title`},nr={key:1,class:`bing-card__description`},rr={key:1,class:`bing-card__body`},ir={key:2,class:`bing-card__footer`},ar={class:`bing-card__face bing-card__back`,"aria-hidden":`true`},or=10,sr=R((0,t.defineComponent)({__name:`BingCard`,props:{title:{default:void 0},description:{default:void 0},variant:{default:`soft`},padding:{default:`md`},rounded:{default:`md`},glass:{type:Boolean,default:!0},interactive:{type:Boolean,default:!0},tilt:{type:Boolean,default:!0},tiltMax:{default:8},tiltScale:{default:1.015},glare:{type:Boolean,default:!0},entrance:{default:`fade-up`},entranceOnce:{type:Boolean,default:!0},entranceDelay:{default:0},entranceDuration:{default:.72},flipAxis:{default:`x`},flipTurns:{default:2.5},flipEase:{default:`power4.out`},flipTrigger:{default:`press`},longPressDelay:{default:560},longPressRelease:{default:`restore`},disabled:{type:Boolean,default:!1},glassBlur:{default:void 0},glassOpacity:{default:void 0},glassSaturation:{default:void 0}},emits:[`enter`,`long-press`,`flip`],setup(e,{emit:r}){let{playClickFeedback:i}=de(),a=e,o=r,s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(!1),p=(0,t.ref)(!1),m=(0,t.ref)(!1),h,g,_,v,y,b=!1,x=!1,S=0,C=0,w=!1,T=(0,t.computed)(()=>a.flipAxis===`z`?`y`:a.flipAxis),E=(0,t.computed)(()=>a.disabled?`none`:a.flipTrigger),D=(0,t.computed)(()=>[`bing-card`,`bing-card--${a.variant}`,`bing-card--padding-${a.padding}`,`bing-card--rounded-${a.rounded}`,`bing-card--back-axis-${T.value}`,{"is-glass":a.glass,"is-interactive":a.interactive,"is-tilt":a.tilt,"is-glare":a.glare,"is-flipped":p.value,"is-pressing":m.value,"is-long-press-enabled":E.value===`press`,"is-click-flip-enabled":E.value===`click`,"is-disabled":a.disabled,"has-entered":f.value}]),O=(0,t.computed)(()=>({...Yn(`bing-card`,{glass:a.glass,glassBlur:a.glassBlur,glassOpacity:a.glassOpacity,glassSaturation:a.glassSaturation}),"--bing-card-tilt-max":`${a.tiltMax}deg`})),k=(0,t.computed)(()=>!!(a.title||a.description));function A(){return typeof window<`u`&&typeof document<`u`}function j(){return A()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function M(e,t,n){return Math.min(n,Math.max(t,e))}function N(e){return e===`x`?`rotationX`:e===`y`?`rotationY`:`rotation`}function P(){return{rotationX:0,rotationY:0,rotation:0,[N(T.value)]:p.value?180:0}}function F(e,t){return p.value?T.value===`x`?{rotationX:180+e,rotationY:t,rotation:0}:{rotationX:e,rotationY:180+t,rotation:0}:{rotationX:e,rotationY:t,rotation:0}}function I(){return a.interactive&&a.tilt&&!a.disabled&&!j()&&!x&&!b&&c.value}function L(e){if(G(e),!I())return;let t=s.value,r=c.value;if(!t||!r)return;let i=t.getBoundingClientRect();if(i.width===0||i.height===0)return;let o=M((e.clientX-i.left)/i.width,0,1),u=M((e.clientY-i.top)/i.height,0,1),d=Math.max(0,a.tiltMax),f=(o-.5)*d*2,p=(.5-u)*d*2;n.gsap.to(r,{...F(p,f),scale:Math.max(1,a.tiltScale),transformPerspective:900,transformOrigin:`50% 50%`,duration:.34,ease:`power3.out`,overwrite:!0,force3D:!0}),a.glare&&l.value&&n.gsap.to(l.value,{"--bing-card-glare-x":`${o*100}%`,"--bing-card-glare-y":`${u*100}%`,opacity:1,duration:.24,ease:`power2.out`,overwrite:!0})}function R(){if(x)return;let e=c.value;e&&n.gsap.to(e,{...P(),scale:1,duration:.48,ease:`elastic.out(1, 0.72)`,overwrite:!0,force3D:!0}),l.value&&n.gsap.to(l.value,{opacity:0,duration:.26,ease:`power2.out`,overwrite:!0})}function z(){let e=N(a.flipAxis),t=-360*Math.max(1,a.flipTurns);return{from:{autoAlpha:0,y:34,z:a.flipAxis===`z`?0:-120,[e]:t,scale:.96,transformPerspective:900,transformOrigin:`50% 50%`},to:{autoAlpha:1,y:0,z:0,rotationX:0,rotationY:0,rotation:0,scale:1,ease:a.flipEase}}}function B(){switch(a.entrance){case`bubble`:return{from:{autoAlpha:0,y:18,scale:.78},to:{autoAlpha:1,y:0,scale:1,ease:`elastic.out(1, 0.64)`}};case`rotate-up`:return z();case`soft-pop`:return{from:{autoAlpha:0,y:10,scale:.92,filter:`blur(10px)`},to:{autoAlpha:1,y:0,scale:1,filter:`blur(0px)`,ease:`power3.out`}};default:return{from:{autoAlpha:0,y:26,scale:.98},to:{autoAlpha:1,y:0,scale:1,ease:`power3.out`}}}}function V(){_?.kill(),_=void 0,m.value=!1,u.value&&(n.gsap.killTweensOf(u.value),n.gsap.set(u.value,{"--bing-card-press-progress":0,"--bing-card-press-ring-scale":.78,autoAlpha:0})),d.value&&(n.gsap.killTweensOf(d.value),n.gsap.set(d.value,{autoAlpha:0,scale:.98}))}function H(){m.value=!1,u.value&&(n.gsap.killTweensOf(u.value),n.gsap.timeline().to(u.value,{"--bing-card-press-ring-scale":.96,autoAlpha:.82,duration:.1,ease:`power2.out`}).to(u.value,{"--bing-card-press-ring-scale":1.08,autoAlpha:0,duration:.38,ease:`power3.out`},.06)),d.value&&(n.gsap.killTweensOf(d.value),n.gsap.timeline().to(d.value,{autoAlpha:.18,scale:1,duration:.1,ease:`power2.out`}).to(d.value,{autoAlpha:0,scale:1.015,duration:.38,ease:`power3.out`},.06))}function U(e=!p.value){let t=c.value;if(!t||a.disabled||x||p.value===e)return;p.value=e;let r=n.gsap.to(t,{...P(),scale:1,transformPerspective:900,transformOrigin:`50% 50%`,duration:.68,ease:`power3.inOut`,overwrite:!0,force3D:!0,onComplete:()=>{v===r&&(b=!1)},onInterrupt:()=>{v===r&&(b=!1)}});v=r,b=!0,o(`flip`,e?`back`:`front`)}function ee(e){if(!A()||E.value!==`press`||x||e.button!==0)return;V(),w=!1,S=e.clientX,C=e.clientY,m.value=!0;let t=s.value?.getBoundingClientRect(),r=t&&t.width>0?`${M((e.clientX-t.left)/t.width*100,0,100)}%`:`50%`,i=t&&t.height>0?`${M((e.clientY-t.top)/t.height*100,0,100)}%`:`50%`;try{e.currentTarget?.setPointerCapture?.(e.pointerId)}catch{}u.value&&(n.gsap.set(u.value,{"--bing-card-press-progress":0,"--bing-card-press-x":r,"--bing-card-press-y":i,"--bing-card-press-ring-scale":.78,autoAlpha:1}),_=n.gsap.to(u.value,{"--bing-card-press-progress":1,"--bing-card-press-ring-scale":.98,duration:Math.max(120,a.longPressDelay)/1e3,ease:`none`,overwrite:!0,onComplete:()=>{if(_=void 0,w=!0,o(`long-press`),H(),a.longPressRelease===`restore`){U(!0);return}U()}})),d.value&&n.gsap.fromTo(d.value,{autoAlpha:0,scale:.98},{autoAlpha:1,scale:1,duration:Math.min(.24,Math.max(120,a.longPressDelay)/2e3),ease:`power2.out`,overwrite:!0})}function W(e){e.defaultPrevented||a.disabled||E.value!==`click`||x||e.target instanceof Element&&e.target.closest(`button,a[href],input,label,select,textarea,[role="button"],[role="tab"],[contenteditable]:not([contenteditable="false"])`)||(i(e),U())}function G(e){if(!_)return;let t=e.clientX-S,n=e.clientY-C;Math.hypot(t,n)>or&&V()}function te(){V(),w&&a.longPressRelease===`restore`&&U(!1),w=!1}function ne(){w||V(),!b&&R()}function re(){let e=s.value,t=c.value;if(!e||!t||a.disabled||f.value&&a.entranceOnce)return;if(f.value=!0,e.classList.add(`has-entered`),o(`enter`),y?.kill(),y=void 0,x=!1,h?.revert(),h=void 0,a.entrance===`none`||j()){n.gsap.set(t,{autoAlpha:1,clearProps:`transform,filter`});return}let r=B();h=n.gsap.context(()=>{let e=n.gsap.fromTo(t,r.from,{...r.to,duration:Math.max(.1,a.entranceDuration),delay:Math.max(0,a.entranceDelay),clearProps:`filter`,onComplete:()=>{y===e&&(y=void 0,x=!1)},onInterrupt:()=>{y===e&&(y=void 0,x=!1)}});y=e,x=!0},e)}function ie(){if(g?.disconnect(),g=void 0,!A()){re();return}if(a.entrance===`none`||j()){re();return}if(!(`IntersectionObserver`in window)){re();return}let e=s.value;e&&(g=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(re(),a.entranceOnce&&(g?.disconnect(),g=void 0))},{threshold:.18,rootMargin:`0px 0px -8% 0px`}),g.observe(e))}return(0,t.watch)(()=>[a.entrance,a.entranceOnce,a.entranceDelay,a.entranceDuration,a.flipAxis,a.flipTurns,a.flipEase,a.flipTrigger,a.disabled],()=>{V(),f.value=!1,(0,t.nextTick)(ie)},{flush:`post`}),(0,t.onMounted)(()=>{(0,t.nextTick)(ie)}),(0,t.onBeforeUnmount)(()=>{V(),y?.kill(),y=void 0,x=!1,v?.kill(),v=void 0,b=!1,g?.disconnect(),g=void 0,h?.revert(),h=void 0,n.gsap.killTweensOf([c.value,l.value,u.value,d.value].filter(Boolean))}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`article`,{ref_key:`rootRef`,ref:s,class:(0,t.normalizeClass)(D.value),style:(0,t.normalizeStyle)(O.value),onPointerdown:ee,onPointermove:L,onPointerup:te,onPointerleave:ne,onPointercancel:te,onLostpointercapture:te,onClick:W},[(0,t.createElementVNode)(`div`,{ref_key:`surfaceRef`,ref:c,class:`bing-card__surface`},[(0,t.createElementVNode)(`div`,Xn,[e.glare?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`glareRef`,ref:l,class:`bing-card__glare`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0),n.$slots.media?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Zn,[(0,t.renderSlot)(n.$slots,`media`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Qn,[n.$slots.header||k.value?((0,t.openBlock)(),(0,t.createElementBlock)(`header`,$n,[(0,t.renderSlot)(n.$slots,`header`,{},()=>[(0,t.createElementVNode)(`div`,er,[e.title?((0,t.openBlock)(),(0,t.createElementBlock)(`h3`,tr,(0,t.toDisplayString)(e.title),1)):(0,t.createCommentVNode)(``,!0),e.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,nr,(0,t.toDisplayString)(e.description),1)):(0,t.createCommentVNode)(``,!0)])],!0)])):(0,t.createCommentVNode)(``,!0),n.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,rr,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),n.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,ir,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])]),(0,t.createElementVNode)(`div`,ar,[(0,t.renderSlot)(n.$slots,`back`,{},()=>[r[0]||=(0,t.createElementVNode)(`div`,{class:`bing-card__back-mark`},`Bing UI`,-1),r[1]||=(0,t.createElementVNode)(`div`,{class:`bing-card__back-text`},`交互卡片`,-1)],!0)]),E.value===`press`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`pressAmbienceRef`,ref:d,class:`bing-card__press-ambience`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0),E.value===`press`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:1,ref_key:`pressFeedbackRef`,ref:u,class:`bing-card__press-feedback`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0)],512)],38))}}),[[`__scopeId`,`data-v-42286b35`]]),cr=Symbol(`BingCheckboxGroupContext`),lr=[`id`,`checked`,`indeterminate`,`disabled`,`name`,`value`,`aria-label`,`aria-describedby`,`aria-invalid`],ur={class:`bing-checkbox__control`,"aria-hidden":`true`},dr={key:1,class:`bing-checkbox__label`},fr=R((0,t.defineComponent)({__name:`BingCheckbox`,props:{id:{default:void 0},modelValue:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},size:{default:void 0},shape:{default:`rounded`},tone:{default:`primary`},label:{default:void 0},ariaLabel:{default:void 0},ariaDescribedby:{default:void 0},status:{default:void 0},name:{default:void 0},value:{default:void 0},decorative:{type:Boolean,default:!1}},emits:[`update:modelValue`,`change`,`focus`,`blur`],setup(e,{emit:r}){let i=e,a=r,{playClickFeedback:o}=de(),s=(0,t.useSlots)(),c=(0,t.inject)(cr,null),{formItem:l,resolvedSize:u,resolvedDisabled:d,resolvedStatus:f,resolvedId:p,resolvedAriaDescribedby:m}=he({get id(){return i.id},get size(){return i.size??c?.size.value},get disabled(){return c?.disabled.value||i.disabled},get status(){return i.status??c?.status.value},get ariaDescribedby(){return i.ariaDescribedby}},{register:!c}),h=(0,t.ref)(null),g=(0,t.ref)(null),_=(0,t.ref)(!1),v=null,y=(0,t.computed)(()=>!!(i.label||s.default)),b=(0,t.computed)(()=>i.name??c?.name.value),x=(0,t.computed)(()=>c?c.modelValue.value.some(e=>e===i.value):i.modelValue),S=(0,t.computed)(()=>[`bing-checkbox`,typeof u.value==`string`?`bing-checkbox--${u.value}`:void 0,`bing-checkbox--${i.shape}`,`bing-checkbox--${i.tone}`,`bing-checkbox--status-${f.value}`,{"is-checked":x.value,"is-indeterminate":i.indeterminate,"is-disabled":d.value,"is-invalid":f.value===`error`,"is-decorative":i.decorative,"is-check-exiting":_.value,"has-label":y.value&&!i.decorative}]),C=(0,t.computed)(()=>{if(typeof u.value==`number`)return{"--bing-checkbox-size":`${u.value}px`,"--bing-checkbox-radius":i.shape===`circle`?`50%`:`${Math.max(2,Math.round(u.value*.22))}px`}});function w(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function T(){n.gsap.killTweensOf([h.value,g.value].filter(e=>!!e))}function E(e,t,r,i){if(w()){_.value=!1;return}let a=h.value,o=g.value;if(!a||!o)return;let s=e&&!t,c=r&&!i;T(),_.value=!1,s?n.gsap.fromTo(a,{autoAlpha:0,rotation:-18,scale:.18},{autoAlpha:1,rotation:0,scale:1,duration:.28,ease:`back.out(3.4)`,clearProps:`transform,opacity,visibility`,overwrite:!0}):c&&(_.value=!0,n.gsap.fromTo(a,{autoAlpha:1,rotation:0,scale:1},{autoAlpha:0,rotation:0,scale:.32,duration:.18,ease:`power2.in`,clearProps:`transform,opacity,visibility`,overwrite:!0,onComplete:()=>{_.value=!1}})),t?n.gsap.fromTo(o,{autoAlpha:0,scaleX:.2},{autoAlpha:1,scaleX:1,duration:.2,ease:`back.out(2.4)`,clearProps:`transform,opacity,visibility`,overwrite:!0}):i&&n.gsap.fromTo(o,{autoAlpha:1,scaleX:1},{autoAlpha:0,scaleX:.2,duration:.12,ease:`power2.in`,clearProps:`transform,opacity,visibility`,overwrite:!0})}function D(e){if(e.defaultPrevented||d.value||i.decorative)return;let t=e.currentTarget.parentElement?.querySelector(`.bing-checkbox__control`);o(e,t)}function O(e){let t=e.target.checked;if(v={checked:t,indeterminate:i.indeterminate},E(t,i.indeterminate,x.value,i.indeterminate),c&&i.value!==void 0){c.updateValue(i.value,t,e);return}a(`update:modelValue`,t),a(`change`,t,e),l?.handleControlChange()}function k(e){a(`blur`,e),c?.handleCheckboxBlur(e),c||l?.handleControlBlur()}return(0,t.watch)(()=>[x.value,i.indeterminate],([e,t],[n,r])=>{if(v?.checked===e&&v.indeterminate===t){v=null;return}v=null,E(e,t,n,r)},{flush:`post`}),(0,t.onBeforeUnmount)(T),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.decorative?`span`:`label`),{class:(0,t.normalizeClass)(S.value),style:(0,t.normalizeStyle)(C.value),"aria-hidden":e.decorative||void 0},{default:(0,t.withCtx)(()=>[e.decorative?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`input`,{key:0,class:`bing-checkbox__input`,id:(0,t.unref)(p),type:`checkbox`,checked:x.value,indeterminate:e.indeterminate,disabled:(0,t.unref)(d),name:b.value,value:e.value,"aria-label":e.ariaLabel||void 0,"aria-describedby":(0,t.unref)(m),"aria-invalid":(0,t.unref)(f)===`error`||void 0,onChange:O,onClick:D,onFocus:r[0]||=e=>a(`focus`,e),onBlur:k},null,40,lr)),(0,t.createElementVNode)(`span`,ur,[(0,t.createElementVNode)(`span`,{ref_key:`checkRef`,ref:h,class:`bing-checkbox__check`},[(0,t.createVNode)(Q,{icon:(0,t.unref)(qe),size:`xs`,"stroke-width":2.25},null,8,[`icon`])],512),(0,t.createElementVNode)(`span`,{ref_key:`mixedRef`,ref:g,class:`bing-checkbox__mixed`},null,512)]),!e.decorative&&y.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,dr,[(0,t.renderSlot)(n.$slots,`default`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)])):(0,t.createCommentVNode)(``,!0)]),_:3},8,[`class`,`style`,`aria-hidden`]))}}),[[`__scopeId`,`data-v-7d6ea319`]]),pr=[`aria-label`],mr={class:`bing-resizable__content`},hr={key:0,class:`bing-resizable__size`,"aria-hidden":`true`},gr=[`aria-label`,`disabled`,`onPointerdown`,`onKeydown`],_r={class:`bing-resizable__handle-mark`,"aria-hidden":`true`},vr=R((0,t.defineComponent)({__name:`BingResizable`,props:{size:{default:void 0},defaultSize:{default:()=>({width:320,height:220})},position:{default:void 0},defaultPosition:{default:()=>({x:0,y:0})},minWidth:{default:80},minHeight:{default:80},maxWidth:{default:void 0},maxHeight:{default:void 0},mode:{default:`fixed`},snapMode:{default:`live`},directions:{default:()=>[`right`,`bottom`,`bottom-right`]},step:{default:1},disabled:{type:Boolean,default:!1},lockAspectRatio:{type:Boolean,default:!1},contain:{type:Boolean,default:!1},showSize:{type:Boolean,default:!1},handleSize:{default:12},ariaLabel:{default:void 0}},emits:[`update:size`,`update:position`,`resize-start`,`resize`,`resize-end`],setup(e,{expose:r,emit:i}){let a=[`top`,`right`,`bottom`,`left`,`top-left`,`top-right`,`bottom-left`,`bottom-right`],o={top:Ve,right:Be,bottom:Ve,left:Be,"top-left":He,"top-right":Ue,"bottom-left":Le,"bottom-right":Re},s=e,c=i,l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(R(s.defaultSize)),p=(0,t.ref)(R(s.defaultSize)),m=(0,t.ref)(z(s.defaultPosition)),h=(0,t.ref)(z(s.defaultPosition)),g=(0,t.ref)(!1),_=(0,t.ref)(!1),v=(0,t.ref)(!1),y=(0,t.ref)(null),b,x={x:0,y:0},S=``,C=``,w=``,T=``,E=!1,D=(0,t.computed)(()=>[`bing-resizable`,`bing-resizable--${s.mode}`,{"is-disabled":s.disabled,"is-resizing":v.value,"is-contain":s.contain,"is-ratio-locked":s.lockAspectRatio}]),O=(0,t.computed)(()=>v.value?p.value:s.size?s.size:g.value?f.value:s.defaultSize),k=(0,t.computed)(()=>v.value?h.value:s.position?z(s.position):_.value?m.value:z(s.defaultPosition)),A=(0,t.computed)(()=>R(O.value)),j=(0,t.computed)(()=>{let e=k.value;return{width:I(O.value.width),height:I(O.value.height),minWidth:I(s.minWidth),minHeight:I(s.minHeight),maxWidth:I(s.maxWidth),maxHeight:I(s.maxHeight),left:`${e.x}px`,top:`${e.y}px`,"--bing-resizable-handle-size":`${Math.max(6,s.handleSize)}px`}}),M=(0,t.computed)(()=>s.directions.filter(e=>a.includes(e))),N=(0,t.computed)(()=>{let e=v.value?p.value:A.value;return`${Math.round(e.width)} × ${Math.round(e.height)}`});function P(){return typeof window<`u`&&typeof document<`u`}function F(){return P()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function I(e){return typeof e==`number`?`${e}px`:e}function L(e,t){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Number.parseFloat(e);if(Number.isFinite(t))return t}return t}function R(e){return{width:Math.max(0,L(e?.width,320)),height:Math.max(0,L(e?.height,220))}}function z(e){return{x:L(e?.x,0),y:L(e?.y,0)}}function B(e){return Math.round(e*1e3)/1e3}function V(e,t,n){return Math.min(n,Math.max(t,e))}function H(e,t){return!Number.isFinite(t)||t<=1?e:Math.round(e/t)*t}function U(e,t){return Math.abs(e.width-t.width)<.001&&Math.abs(e.height-t.height)<.001}function ee(e,t){return Math.abs(e.x-t.x)<.001&&Math.abs(e.y-t.y)<.001}function W(){if(typeof s.step==`number`){let e=Math.max(1,s.step);return{x:e,y:e}}return{x:Math.max(1,s.step.x??1),y:Math.max(1,s.step.y??1)}}function G(e){return{top:e.includes(`top`),right:e.includes(`right`),bottom:e.includes(`bottom`),left:e.includes(`left`)}}function te(e){return e===`top`||e===`bottom`?`ns-resize`:e===`left`||e===`right`?`ew-resize`:e===`top-left`||e===`bottom-right`?`nwse-resize`:`nesw-resize`}function ne(e){return[`ew-resize`,`ns-resize`,`nwse-resize`,`nesw-resize`].includes(e)}function re(e){let t=G(e);return`${t.left?`100%`:t.right?`0%`:`50%`} ${t.top?`100%`:t.bottom?`0%`:`50%`}`}function ie(e){return`调整${{top:`上边`,right:`右边`,bottom:`下边`,left:`左边`,"top-left":`左上角`,"top-right":`右上角`,"bottom-left":`左下角`,"bottom-right":`右下角`}[e]}尺寸`}function ae(){let e=l.value?.getBoundingClientRect();return{width:e?.width?e.width:L(O.value.width,A.value.width),height:e?.height?e.height:L(O.value.height,A.value.height)}}function K(){if(!s.contain)return null;let e=l.value?.parentElement,t=e?.getBoundingClientRect();if(!e||!t?.width||!t?.height)return null;let n=window.getComputedStyle(e),r=L(n.paddingLeft,0)+L(n.paddingRight,0)+L(n.borderLeftWidth,0)+L(n.borderRightWidth,0),i=L(n.paddingTop,0)+L(n.paddingBottom,0)+L(n.borderTopWidth,0)+L(n.borderBottomWidth,0);return{width:Math.max(0,t.width-r),height:Math.max(0,t.height-i)}}function oe(){return{minWidth:Math.max(0,L(s.minWidth,0)),minHeight:Math.max(0,L(s.minHeight,0)),maxWidth:Math.max(0,L(s.maxWidth,1/0)),maxHeight:Math.max(0,L(s.maxHeight,1/0))}}function se(e,t,n){let r=oe();if(s.lockAspectRatio&&n&&n.aspectRatio>0){let i=n.aspectRatio,a=V(le(e,t,n.direction,n)===`width`?e:t*i,Math.max(r.minWidth,r.minHeight*i),Math.min(r.maxWidth,r.maxHeight*i));return{width:a,height:a/i}}return{width:V(e,r.minWidth,r.maxWidth),height:V(t,r.minHeight,r.maxHeight)}}function ce(e,t,n,r){if(!s.lockAspectRatio||r.aspectRatio<=0)return{width:e,height:t};let i=G(n),a=r.aspectRatio;return(i.left||i.right)&&!(i.top||i.bottom)?{width:e,height:e/a}:(i.top||i.bottom)&&!(i.left||i.right)?{width:t*a,height:t}:Math.abs(e-r.startSize.width)>=Math.abs(t-r.startSize.height)?{width:e,height:e/a}:{width:t*a,height:t}}function le(e,t,n,r){let i=G(n);return(i.left||i.right)&&!(i.top||i.bottom)?`width`:(i.top||i.bottom)&&!(i.left||i.right)?`height`:Math.abs(e-r.startSize.width)>=Math.abs(t-r.startSize.height)?`width`:`height`}function ue(e,t,n,r){let i=W();if(s.lockAspectRatio&&r.aspectRatio>0){if(le(e,t,n,r)===`width`){let t=H(e,i.x);return{width:t,height:t/r.aspectRatio}}let a=H(t,i.y);return{width:a*r.aspectRatio,height:a}}return{width:H(e,i.x),height:H(t,i.y)}}function q(e,t){let n=G(t.direction);if(t.mode===`mirror`){let n=Math.abs(e.width-t.startSize.width)>.001,r=Math.abs(e.height-t.startSize.height)>.001;return{x:n?t.startPosition.x+(t.startSize.width-e.width)/2:t.startPosition.x,y:r?t.startPosition.y+(t.startSize.height-e.height)/2:t.startPosition.y}}return{x:n.left?t.startPosition.x+t.startSize.width-e.width:t.startPosition.x,y:n.top?t.startPosition.y+t.startSize.height-e.height:t.startPosition.y}}function de(e,t,n){if(!n.parentSize)return{size:e,position:t};let r=e.width,i=e.height,a=t.x,o=t.y;return a<0&&(r+=a,a=0),o<0&&(i+=o,o=0),a+r>n.parentSize.width&&(r=n.parentSize.width-a),o+i>n.parentSize.height&&(i=n.parentSize.height-o),{size:se(r,i),position:{x:a,y:o}}}function fe(e,t,n,r=e.snapMode===`live`){let i=G(e.direction),a=e.mode===`mirror`?2:1,o=e.startSize.width+((i.right?t:0)-(i.left?t:0))*a,s=e.startSize.height+((i.bottom?n:0)-(i.top?n:0))*a,c=ce(o,s,e.direction,e);if(o=c.width,s=c.height,r){let t=ue(o,s,e.direction,e);o=t.width,s=t.height}let l=se(o,s,e),u=q(l,e),d=de(l,u,e);return l=d.size,u=d.position,{size:{width:B(l.width),height:B(l.height)},position:{x:B(u.x),y:B(u.y)}}}function pe(e,t,n){let r=ae();return{direction:e,startClientX:t,startClientY:n,startSize:r,startPosition:k.value,aspectRatio:r.height>0?r.width/r.height:1,mode:s.mode,snapMode:s.snapMode,parentSize:K()}}function me(e,t,n){return{direction:e,size:p.value,position:h.value,delta:t,event:n}}function he(){s.size||(f.value=p.value,g.value=!0),s.position||(m.value=h.value,_.value=!0),c(`update:size`,p.value),c(`update:position`,h.value)}function ge(e){if(!P()||E)return;let t=te(e);S=ne(document.documentElement.style.cursor)?``:document.documentElement.style.cursor,C=ne(document.body?.style.cursor??``)?``:document.body?.style.cursor??``,w=document.documentElement.style.userSelect,T=document.body?.style.userSelect??``,document.documentElement.style.cursor=t,document.body.style.cursor=t,document.documentElement.style.userSelect=`none`,document.body.style.userSelect=`none`,E=!0}function _e(){!P()||!E||(document.documentElement.style.cursor=S,document.body.style.cursor=C,document.documentElement.style.userSelect=w,document.body.style.userSelect=T,S=``,C=``,w=``,T=``,E=!1)}function ve(){if(P()){window.addEventListener(`pointermove`,Ce),window.addEventListener(`pointerup`,Y),window.addEventListener(`pointercancel`,Y),window.addEventListener(`pointerout`,Te),window.addEventListener(`blur`,we),window.addEventListener(`keydown`,De),document.addEventListener(`visibilitychange`,Ee);try{window.parent&&window.parent!==window&&(window.parent.addEventListener(`pointerup`,Y),window.parent.addEventListener(`pointercancel`,Y),window.parent.addEventListener(`blur`,we))}catch{}}}function ye(){if(P()){window.removeEventListener(`pointermove`,Ce),window.removeEventListener(`pointerup`,Y),window.removeEventListener(`pointercancel`,Y),window.removeEventListener(`pointerout`,Te),window.removeEventListener(`blur`,we),window.removeEventListener(`keydown`,De),document.removeEventListener(`visibilitychange`,Ee);try{window.parent&&window.parent!==window&&(window.parent.removeEventListener(`pointerup`,Y),window.parent.removeEventListener(`pointercancel`,Y),window.parent.removeEventListener(`blur`,we))}catch{}}}function be(e){F()||(u.value&&n.gsap.to(u.value,{scale:1.006,transformOrigin:re(e),duration:.16,ease:`power2.out`,overwrite:!0,force3D:!0}),d.value&&n.gsap.fromTo(d.value,{autoAlpha:0,scale:.985},{autoAlpha:1,scale:1,transformOrigin:re(e),duration:.18,ease:`power2.out`,overwrite:!0,force3D:!0}))}function xe(e){F()||(u.value&&n.gsap.to(u.value,{scale:1,transformOrigin:re(e),duration:.42,ease:`elastic.out(1, 0.78)`,overwrite:!0,force3D:!0}),d.value&&n.gsap.to(d.value,{autoAlpha:0,scale:1.018,transformOrigin:re(e),duration:.28,ease:`power3.out`,overwrite:!0,force3D:!0}))}function Se(e,t){if(!(s.disabled||t.button!==0)){t.preventDefault(),b=pe(e,t.clientX,t.clientY),x={x:0,y:0},p.value=b.startSize,h.value=b.startPosition,y.value=e,v.value=!0,ge(e),ve(),be(e);try{t.currentTarget?.setPointerCapture?.(t.pointerId)}catch{}c(`resize-start`,me(e,x,t))}}function Ce(e){if(!b)return;e.preventDefault(),x={x:e.clientX-b.startClientX,y:e.clientY-b.startClientY};let t=fe(b,x.x,x.y);U(t.size,p.value)&&ee(t.position,h.value)||(p.value=t.size,h.value=t.position,he(),c(`resize`,me(b.direction,x,e)))}function J(e,t=!0){let n=b;if(ye(),_e(),!n)return;let r=n.direction;if(n.snapMode===`end`){let e=fe(n,x.x,x.y,!0);p.value=e.size,h.value=e.position}he(),e&&t&&c(`resize-end`,me(r,x,e)),xe(r),b=void 0,y.value=null,v.value=!1}function Y(e){J(e)}function we(){J(void 0,!1)}function Te(e){e.relatedTarget||(e.clientX<=0||e.clientY<=0||e.clientX>=window.innerWidth||e.clientY>=window.innerHeight)&&we()}function Ee(){document.visibilityState===`hidden`&&we()}function De(e){e.key===`Escape`&&J(e)}function Oe(e,t){let n=G(e),r=W(),i=t.shiftKey?4:1,a=r.x*i,o=r.y*i;return t.key===`ArrowLeft`&&(n.left||n.right)?{x:-a,y:0}:t.key===`ArrowRight`&&(n.left||n.right)?{x:a,y:0}:t.key===`ArrowUp`&&(n.top||n.bottom)?{x:0,y:-o}:t.key===`ArrowDown`&&(n.top||n.bottom)?{x:0,y:o}:null}function ke(e,t){if(s.disabled)return;let n=Oe(e,t);if(!n)return;t.preventDefault();let r=fe(pe(e,0,0),n.x,n.y,!0);p.value=r.size,h.value=r.position,y.value=e,v.value=!0,c(`resize-start`,me(e,{x:0,y:0},t)),he(),c(`resize`,me(e,n,t)),c(`resize-end`,me(e,n,t)),be(e),xe(e),y.value=null,v.value=!1}function X(){p.value=R(s.defaultSize),h.value=z(s.defaultPosition),f.value=p.value,m.value=h.value,g.value=!0,_.value=!0,c(`update:size`,p.value),c(`update:position`,h.value)}function Ae(){return v.value?p.value:R(O.value)}function je(){return k.value}return(0,t.onBeforeUnmount)(()=>{ye(),_e(),n.gsap.killTweensOf([u.value,d.value].filter(Boolean))}),r({reset:X,getSize:Ae,getPosition:je}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`rootRef`,ref:l,class:(0,t.normalizeClass)(D.value),style:(0,t.normalizeStyle)(j.value),role:`group`,"aria-label":e.ariaLabel},[(0,t.createElementVNode)(`div`,{ref_key:`surfaceRef`,ref:u,class:`bing-resizable__surface`},[(0,t.createElementVNode)(`div`,mr,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),(0,t.createElementVNode)(`span`,{ref_key:`feedbackRef`,ref:d,class:`bing-resizable__feedback`,"aria-hidden":`true`},null,512),e.showSize?((0,t.openBlock)(),(0,t.createElementBlock)(`output`,hr,(0,t.toDisplayString)(N.value),1)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(M.value,i=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:i,type:`button`,class:(0,t.normalizeClass)([`bing-resizable__handle`,[`bing-resizable__handle--${i}`,{"is-active":y.value===i}]]),"aria-label":ie(i),disabled:e.disabled,onPointerdown:e=>Se(i,e),onKeydown:e=>ke(i,e)},[(0,t.renderSlot)(n.$slots,`handle`,{direction:i,active:y.value===i},()=>[(0,t.createElementVNode)(`span`,_r,[r[0]||=(0,t.createElementVNode)(`span`,{class:`bing-resizable__handle-line`},null,-1),(0,t.createVNode)(Q,{class:`bing-resizable__handle-icon`,icon:o[i],size:i.includes(`-`)?13:14,"stroke-width":1.75},null,8,[`icon`,`size`])])],!0)],42,gr))),128))],512)],14,pr))}}),[[`__scopeId`,`data-v-0cb888b5`]]),yr=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function br(e){return xr(e)}function xr(e){return Array.isArray(e)?Sr(e):e instanceof RegExp?e:typeof e==`object`?Cr(e):e}function Sr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=xr(e[n]);return t}function Cr(e){let t={};for(let n in e)t[n]=xr(e[n]);return t}function wr(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Tr(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Tr(e.substring(0,e.length-1)):e.substr(~t+1)}var Er=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Dr=class{static hasCaptures(e){return e===null?!1:(Er.lastIndex=0,Er.test(e))}static replaceCaptures(e,t,n){return e.replace(Er,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Or(e,t){return e<t?-1:+(e>t)}function kr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Or(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Ar(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function jr(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Mr=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Nr=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Rr(e),t)}static createFromParsedTheme(e,t){return Vr(e,t)}_cachedMatchRoot=new Mr(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Fr(e.parent,t.parentScopes));return n?new Lr(n.fontStyle,n.foreground,n.background):null}},Pr=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Fr(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Ir(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Ir(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Lr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Rr(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&Ar(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Ar(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new zr(l,u,e,o,s,c)}}return n}var zr=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Br=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(Br||{});function Vr(e,t){e.sort((e,t)=>{let n=Or(e.scope,t.scope);return n!==0||(n=kr(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Hr(t),o=new Lr(n,a.getId(r),a.getId(i)),s=new Gr(new Wr(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Nr(a,o,s)}var Hr=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Ur=Object.freeze([]),Wr=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Ur,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Gr=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Wr.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(kr(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Wr(e,t,n,r,i))}},Kr=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Jr(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function qr(e){return e}function Jr(e){return e}function Yr(e,t){let n=[],r=Zr(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(Xr(i)){let e=[];do e.push(i),i=r.next();while(Xr(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function Xr(e){return!!e&&!!e.match(/[\w\.:]+/)}function Zr(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Qr(e){typeof e.dispose==`function`&&e.dispose()}var $r=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},ei=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},ti=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},ni=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new $r(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new ti;for(let n of e)ri(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof $r){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function ri(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof $r?ai({baseGrammar:a,selfGrammar:i},r):ii(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new $r(e))}function ii(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];oi([r],t,n)}}function ai(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&oi(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&oi(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function oi(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?wr({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&oi(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=fi(i);switch(a.kind){case 0:ai({...t,selfGrammar:t.baseGrammar},n);break;case 1:ai(t,n);break;case 2:ii(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?ii(a.ruleName,i,n):ai(i,n)}else a.kind===4?n.add(new ei(a.scopeName,a.ruleName)):n.add(new $r(a.scopeName));break}}}var si=class{kind=0},ci=class{kind=1},li=class{constructor(e){this.ruleName=e}kind=2},ui=class{constructor(e){this.scopeName=e}kind=3},di=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function fi(e){if(e===`$base`)return new si;if(e===`$self`)return new ci;let t=e.indexOf(`#`);return t===-1?new ui(e):t===0?new li(e.substring(1)):new di(e.substring(0,t),e.substring(t+1))}var pi=/\\(\d+)/,mi=/\\(\d+)/g,hi=-1,gi=-2;function _i(e){return e}function vi(e){return e}var yi=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Dr.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Dr.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Tr(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Dr.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Dr.replaceCaptures(this._contentName,e,t)}},bi=class extends yi{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},xi=class extends yi{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Ei(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Di,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Si=class extends yi{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Di,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ci=class extends yi{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Ei(i,this.id),this.beginCaptures=a,this._end=new Ei(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Di;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},wi=class extends yi{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Ei(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Ei(o,gi),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Di;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Di,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},Ti=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new bi(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new xi(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=wr({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Si(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new wi(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Ci(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=fi(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Si||e instanceof Ci||e instanceof wi)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Ei=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=pi.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return mi.lastIndex=0,this.source.replace(mi,(e,t)=>jr(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Di=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Oi(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Oi(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Oi=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
4
4
  `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},ki=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Ai=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new ki(e,8),this._embeddedLanguagesMatcher=new ji(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new ki(0,0);_getBasicScopeAttributes=new Mr(e=>new ki(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},ji=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>jr(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&process.env.VSCODE_TEXTMATE_DEBUG;var Mi=!1,Ni=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Pi(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Fi(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Ni(i,!0);f()}return new Ni(i,!1);function f(){let o=Ii(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===hi){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),Hi(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Ci){let r=o;Hi(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof wi){let r=o;Hi(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(Hi(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Fi(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof wi&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Bi(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==gi){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),Hi(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Ii(e,t,n,r,i,a){let o=Li(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Ri(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function Li(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=zi(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Ri(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=zi(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function zi(e,t,n,r,i){return Mi?{ruleScanner:e.compile(t,n),findOptions:Vi(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Bi(e,t,n,r,i){return Mi?{ruleScanner:e.compileWhile(t,n),findOptions:Vi(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Vi(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function Hi(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Pi(e,p,n&&d.start===0,d.start,f,i,!1,0),Qr(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new Ui(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Ui=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Wi(e,t,n,r,i,a,o,s){return new Ji(e,t,n,r,i,a,o,s)}function Gi(e,t,n,r,i){let a=Yr(t,Ki),o=Ti.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Ki(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(qi(t[r],e))return n=r+1,!0;return!1})}function qi(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var Ji=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Ai(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Yi(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Yr(e,Ki);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)Gi(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&Gi(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(_i(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[vi(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Yi(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Ti.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Zi.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Kr.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Xi.createRootAndLookUpScopeName(a,r,this):Xi.createRoot(`unknown`,r),t=new Zi(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
5
5
  `;let a=this.createOnigString(e),o=a.content.length,s=new $i(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Pi(this,a,i,0,t,s,!0,r);return Qr(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Yi(e,t){return e=br(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Xi=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Pr.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Pr(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Pr(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Kr.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Zi=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Xi.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:vi(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Xi.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,_i(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Xi.fromExtension(r,n.contentNameScopesList))}},Qi=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Yr(e,Ki).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Yr(e,Ki).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},$i=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Kr.set(n,0,qr(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Kr.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},ea=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Wi(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},ta=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new ea(Nr.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Nr.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new Qi(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new ni(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},na=Zi.NULL;function ra(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function ia(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function aa(e){return Array.isArray(e)?e:[e]}async function oa(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function sa(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function ca(e){return e===`ansi`||sa(e)}function la(e){return e===`none`}function ua(e){return la(e)}var da=/(\r?\n)/g;function fa(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(da),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var pa={light:`#333333`,dark:`#bbbbbb`},ma={light:`#fffffe`,dark:`#1e1e1e`},ha=`__shiki_resolved`;function ga(e){if(e?.[ha])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?pa.light:pa.dark,n||=t.type===`light`?ma.light:ma.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,ha,{enumerable:!1,writable:!1,value:!0}),t}async function _a(e){return[...new Set((await Promise.all(e.filter(e=>!ca(e)).map(async e=>await oa(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function va(e){return(await Promise.all(e.map(async e=>ua(e)?null:ga(await oa(e))))).filter(e=>!!e)}function ya(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new yr(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var ba=class extends ta{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=ga(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Nr.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=ya(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new yr(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},xa=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},Sa=0;function Ca(e){Sa+=1,e.warnings!==!1&&Sa>=10&&Sa%10==0&&console.warn(`[Shiki] ${Sa} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new yr("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(ga),i=new ba(new xa(e.engine,n),r,n,e.langAlias),a;function o(t){return ya(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new yr(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new yr(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await _a(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await va(e))}function g(){if(t)throw new yr(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Sa)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function wa(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([va(e.themes||[]),_a(e.langs||[]),e.engine]);return Ca({...e,themes:t,langs:n,engine:r})}var Ta=new WeakMap;function Ea(e,t){Ta.set(e,t)}function Da(e){return Ta.get(e)}var Oa=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(aa(n).map(e=>[e,na])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return ka(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ka(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function Aa(e,t){if(!(e instanceof Oa))throw new yr(`Invalid grammar state`);return e.getInternalStack(t)}var ja=/,/,Ma=/ /;function Na(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(sa(e.resolveLangAlias(n.lang||`text`))||la(r))return fa(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new yr(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new yr(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Fa(t,o,i,a,n)}function Pa(...e){if(e.length===2)return Da(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(sa(i)||la(a))throw new yr(`Plain language does not have grammar state`);if(i===`ansi`)throw new yr(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new Oa(Ia(n,c,o,s,r).stateStack,c.name,o.name)}function Fa(e,t,n,r,i){let a=Ia(e,t,n,r,i),o=new Oa(a.stateStack,t.name,n.name);return Ea(a.tokens,o),a.tokens}function Ia(e,t,n,r,i){let a=ra(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=fa(e),l=i.grammarState?Aa(i.grammarState,n.name)??na:i.grammarContextCode==null?na:Ia(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=ia(r[Kr.getForeground(s)],a),l=Kr.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(ja).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(Ma))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?La(t.scopes):Ra(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function La(e){return e.map(e=>({scopeName:e}))}function Ra(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Va(e,i,t.slice(0,r))}}return n}function za(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Ba(e,t,n){if(!za(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)za(e[r],n[i])&&--r,--i;return r===-1}function Va(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Ba(e,t,n)){r.push(a);break}return r}function Ha(e,t,n,r=Na){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:Da(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=Ua(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new Oa(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Ea(s,c),s}function Ua(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var Wa=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Ga=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Ga.prototype.normal={},Ga.prototype.property={},Ga.prototype.space=void 0;function Ka(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Ga(n,r,t)}function qa(e){return e.toLowerCase()}var Ja=class{constructor(e,t){this.attribute=t,this.property=e}};Ja.prototype.attribute=``,Ja.prototype.booleanish=!1,Ja.prototype.boolean=!1,Ja.prototype.commaOrSpaceSeparated=!1,Ja.prototype.commaSeparated=!1,Ja.prototype.defined=!1,Ja.prototype.mustUseProperty=!1,Ja.prototype.number=!1,Ja.prototype.overloadedBoolean=!1,Ja.prototype.property=``,Ja.prototype.spaceSeparated=!1,Ja.prototype.space=void 0;var Ya=u({boolean:()=>Za,booleanish:()=>Qa,commaOrSpaceSeparated:()=>no,commaSeparated:()=>to,number:()=>$,overloadedBoolean:()=>$a,spaceSeparated:()=>eo}),Xa=0,Za=ro(),Qa=ro(),$a=ro(),$=ro(),eo=ro(),to=ro(),no=ro();function ro(){return 2**++Xa}var io=Object.keys(Ya),ao=class extends Ja{constructor(e,t,n,r){let i=-1;if(super(e,t),oo(this,`space`,r),typeof n==`number`)for(;++i<io.length;){let e=io[i];oo(this,io[i],(n&Ya[e])===Ya[e])}}};ao.prototype.defined=!0;function oo(e,t,n){n&&(e[t]=n)}function so(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ao(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[qa(r)]=r,n[qa(a.attribute)]=r}return new Ga(t,n,e.space)}var co=so({properties:{ariaActiveDescendant:null,ariaAtomic:Qa,ariaAutoComplete:null,ariaBusy:Qa,ariaChecked:Qa,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:eo,ariaCurrent:null,ariaDescribedBy:eo,ariaDetails:null,ariaDisabled:Qa,ariaDropEffect:eo,ariaErrorMessage:null,ariaExpanded:Qa,ariaFlowTo:eo,ariaGrabbed:Qa,ariaHasPopup:null,ariaHidden:Qa,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:eo,ariaLevel:$,ariaLive:null,ariaModal:Qa,ariaMultiLine:Qa,ariaMultiSelectable:Qa,ariaOrientation:null,ariaOwns:eo,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Qa,ariaReadOnly:Qa,ariaRelevant:null,ariaRequired:Qa,ariaRoleDescription:eo,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Qa,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function lo(e,t){return t in e?e[t]:t}function uo(e,t){return lo(e,t.toLowerCase())}var fo=so({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:to,acceptCharset:eo,accessKey:eo,action:null,allow:null,allowFullScreen:Za,allowPaymentRequest:Za,allowUserMedia:Za,alpha:Za,alt:null,as:null,async:Za,autoCapitalize:null,autoComplete:eo,autoFocus:Za,autoPlay:Za,blocking:eo,capture:null,charSet:null,checked:Za,cite:null,className:eo,closedBy:null,colorSpace:null,cols:$,colSpan:$,command:null,commandFor:null,content:null,contentEditable:Qa,controls:Za,controlsList:eo,coords:$|to,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Za,defer:Za,dir:null,dirName:null,disabled:Za,download:$a,draggable:Qa,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Za,formTarget:null,headers:eo,height:$,hidden:$a,high:$,href:null,hrefLang:null,htmlFor:eo,httpEquiv:eo,id:null,imageSizes:null,imageSrcSet:null,inert:Za,inputMode:null,integrity:null,is:null,isMap:Za,itemId:null,itemProp:eo,itemRef:eo,itemScope:Za,itemType:eo,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Za,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:Za,muted:Za,name:null,nonce:null,noModule:Za,noValidate:Za,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Za,optimum:$,pattern:null,ping:eo,placeholder:null,playsInline:Za,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Za,referrerPolicy:null,rel:eo,required:Za,reversed:Za,rows:$,rowSpan:$,sandbox:eo,scope:null,scoped:Za,seamless:Za,selected:Za,shadowRootClonable:Za,shadowRootCustomElementRegistry:Za,shadowRootDelegatesFocus:Za,shadowRootMode:null,shadowRootSerializable:Za,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Qa,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:Za,useMap:null,value:Qa,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:eo,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Za,declare:Za,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:Za,noHref:Za,noShade:Za,noWrap:Za,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Qa,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Za,disablePictureInPicture:Za,disableRemotePlayback:Za,exportParts:to,part:eo,prefix:null,property:null,results:$,security:null,unselectable:null},space:`html`,transform:uo}),po=so({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:no,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:eo,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:Za,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:to,g2:to,glyphName:to,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:no,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:eo,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:no,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:no,rev:no,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:no,requiredFeatures:no,requiredFonts:no,requiredFormats:no,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:no,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:no,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:no,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:lo}),mo=so({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ho=so({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:uo}),go=so({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),_o=/[A-Z]/g,vo=/-[a-z]/g,yo=/^data[-\w.:]+$/i;function bo(e,t){let n=qa(t),r=t,i=Ja;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&yo.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(vo,So);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!vo.test(e)){let n=e.replace(_o,xo);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ao}return new i(r,t)}function xo(e){return`-`+e.toLowerCase()}function So(e){return e.charAt(1).toUpperCase()}var Co=Ka([co,fo,mo,ho,go],`html`),wo=Ka([co,po,mo,ho,go],`svg`),To={}.hasOwnProperty;function Eo(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&To.call(t,e)){let n=String(t[e]);i=To.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Do=/["&'<>`]/g,Oo=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ko=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Ao=/[|\\{}()[\]^$+*?.]/g,jo=new WeakMap;function Mo(e,t){if(e=e.replace(t.subset?No(t.subset):Do,r),t.subset||t.escapeOnly)return e;return e.replace(Oo,n).replace(ko,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function No(e){let t=jo.get(e);return t||(t=Po(e),jo.set(e,t)),t}function Po(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Ao,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Fo=/[\dA-Fa-f]/;function Io(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Fo.test(String.fromCharCode(t))?r:r+`;`}var Lo=/\d/;function Ro(e,t,n){let r=`&#`+String(e);return n&&t&&!Lo.test(String.fromCharCode(t))?r:r+`;`}var zo=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),Bo={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},Vo=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Ho={}.hasOwnProperty,Uo={},Wo;for(Wo in Bo)Ho.call(Bo,Wo)&&(Uo[Bo[Wo]]=Wo);var Go=/[^\dA-Za-z]/;function Ko(e,t,n,r){let i=String.fromCharCode(e);if(Ho.call(Uo,i)){let e=Uo[i],a=`&`+e;return n&&zo.includes(e)&&!Vo.includes(e)&&(!r||t&&t!==61&&Go.test(String.fromCharCode(t)))?a:a+`;`}return``}function qo(e,t,n){let r=Io(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Ko(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=Ro(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Jo(e,t){return Mo(e,Object.assign({format:qo},t))}var Yo=/^>|^->|<!--|-->|--!>|<!-$/g,Xo=[`>`],Zo=[`<`,`>`];function Qo(e,t,n,r){return r.settings.bogusComments?`<?`+Jo(e.value,Object.assign({},r.settings.characterReferences,{subset:Xo}))+`>`:`<!--`+e.value.replace(Yo,i)+`-->`;function i(e){return Jo(e,Object.assign({},r.settings.characterReferences,{subset:Zo}))}}function $o(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function es(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ts(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function ns(e){return e.join(` `).trim()}var rs=/[ \t\n\f\r]/g;function is(e){return typeof e==`object`?e.type===`text`?as(e.value):!1:as(e)}function as(e){return e.replace(rs,``)===``}var os=ls(1),ss=ls(-1),cs=[];function ls(e){return t;function t(t,n,r){let i=t?t.children:cs,a=(n||0)+e,o=i[a];if(!r)for(;o&&is(o);)a+=e,o=i[a];return o}}var us={}.hasOwnProperty;function ds(e){return t;function t(t,n,r){return us.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var fs=ds({body:hs,caption:ps,colgroup:ps,dd:ys,dt:vs,head:ps,html:ms,li:_s,optgroup:xs,option:Ss,p:gs,rp:bs,rt:bs,tbody:ws,td:Ds,tfoot:Ts,th:Ds,thead:Cs,tr:Es});function ps(e,t,n){let r=os(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&is(r.value.charAt(0)))}function ms(e,t,n){let r=os(n,t);return!r||r.type!==`comment`}function hs(e,t,n){let r=os(n,t);return!r||r.type!==`comment`}function gs(e,t,n){let r=os(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function _s(e,t,n){let r=os(n,t);return!r||r.type===`element`&&r.tagName===`li`}function vs(e,t,n){let r=os(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function ys(e,t,n){let r=os(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function bs(e,t,n){let r=os(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function xs(e,t,n){let r=os(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Ss(e,t,n){let r=os(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Cs(e,t,n){let r=os(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function ws(e,t,n){let r=os(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Ts(e,t,n){return!os(n,t)}function Es(e,t,n){let r=os(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Ds(e,t,n){let r=os(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Os=ds({body:js,colgroup:Ms,head:As,html:ks,tbody:Ns});function ks(e){let t=os(e,-1);return!t||t.type!==`comment`}function As(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function js(e){let t=os(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&is(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function Ms(e,t,n){let r=ss(n,t),i=os(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&fs(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Ns(e,t,n){let r=ss(n,t),i=os(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&fs(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Ps={name:[[`
6
6
  \f\r &/=>`.split(``),`