1import{Q as wn,h as T,R as _n,S as kn,T as On,U as $n,V as Je,y as fe,K as Mt,W as Cn,l as k,i as Ne,j as L,g as Z,o as $,q as D,C as Y,e as be,w as I,a as S,r as Se,s as W,c as B,t as X,X as Vt,N as Sn,d as nt,_ as ye,Y as Wt,Z as Nt,$ as Ft,a0 as Me,a1 as rt,a2 as qt,a3 as Tn,a4 as En,x as Ut,a5 as kt,m as ce,v as at,b as P,H as Ie,G as jn,k as ot,D as Dn,a6 as Bn,F as Ve,n as it,A as Gt,a7 as An,E as Pn,p as zn,f as Ln}from"./entry.B-oUbplU.js";import In from"./Icon.puJbyWLQ.js";const Rn=e=>e==="defer"||e===!1;function zo(...e){var p;const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);let[n,a,r={}]=e;if(typeof n!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof a!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const o=Mt(),c=()=>null,s=()=>o.isHydrating?o.payload.data[n]:o.static.data[n];r.server=r.server??!0,r.default=r.default??c,r.getCachedData=r.getCachedData??s,r.lazy=r.lazy??!1,r.immediate=r.immediate??!0,r.deep=r.deep??wn.deep,r.dedupe=r.dedupe??"cancel";const i=()=>![null,void 0].includes(r.getCachedData(n));if(!o._asyncData[n]||!r.immediate){(p=o.payload._errors)[n]??(p[n]=null);const g=r.deep?T:_n;o._asyncData[n]={data:g(r.getCachedData(n)??r.default()),pending:T(!i()),error:kn(o.payload._errors,n),status:T("idle")}}const l={...o._asyncData[n]};l.refresh=l.execute=(g={})=>{if(o._asyncDataPromises[n]){if(Rn(g.dedupe??r.dedupe))return o._asyncDataPromises[n];o._asyncDataPromises[n].cancelled=!0}if((g._initial||o.isHydrating&&g._initial!==!1)&&i())return Promise.resolve(r.getCachedData(n));l.pending.value=!0,l.status.value="pending";const d=new Promise((v,h)=>{try{v(a(o))}catch(w){h(w)}}).then(v=>{if(d.cancelled)return o._asyncDataPromises[n];let h=v;r.transform&&(h=r.transform(v)),r.pick&&(h=Hn(h,r.pick)),o.payload.data[n]=h,l.data.value=h,l.error.value=null,l.status.value="success"}).catch(v=>{if(d.cancelled)return o._asyncDataPromises[n];l.error.value=Cn(v),l.data.value=k(r.default()),l.status.value="error"}).finally(()=>{d.cancelled||(l.pending.value=!1,delete o._asyncDataPromises[n])});return o._asyncDataPromises[n]=d,o._asyncDataPromises[n]};const u=()=>l.refresh({_initial:!0}),f=r.server!==!1&&o.payload.serverRendered;{const g=On();if(g&&!g._nuxtOnBeforeMountCbs){g._nuxtOnBeforeMountCbs=[];const v=g._nuxtOnBeforeMountCbs;g&&($n(()=>{v.forEach(h=>{h()}),v.splice(0,v.length)}),Je(()=>v.splice(0,v.length)))}f&&o.isHydrating&&(l.error.value||i())?(l.pending.value=!1,l.status.value=l.error.value?"error":"success"):g&&(o.payload.serverRendered&&o.isHydrating||r.lazy)&&r.immediate?g._nuxtOnBeforeMountCbs.push(u):r.immediate&&u(),r.watch&&fe(r.watch,()=>l.refresh());const d=o.hook("app:data:refresh",async v=>{(!v||v.includes(n))&&await l.refresh()});g&&Je(d)}const m=Promise.resolve(o._asyncDataPromises[n]).then(()=>l);return Object.assign(m,l),m}function Hn(e,t){const n={};for(const a of t)n[a]=e[a];return n}const Mn=e=>{const t=Ne(),n=L(()=>e.includes("New")),a=L(()=>e.replace("New ","").replace("HSK ","").replace("-9","")),r=L(()=>{const c=n.value?"New ":"";return a.value==="7"?`${c}HSK 7-9`:`${c}HSK ${a.value}`}),o=L(()=>`/${t.locale.value}/hsk/${n.value?"new-level":"level"}${a.value}/`);return{name:r,level:a,link:o}},te=Z({__name:"BaseIcon",props:{name:{},size:{},filled:{type:Boolean}},setup(e){const t=e,n=L(()=>{switch(t.size){case"sm":return"16px";case"md":return"18px";case"lg":return"24px";default:return"18px"}});return(a,r)=>{const o=In;return $(),D(o,{class:Y(k(n)),size:k(n),name:a.name},null,8,["class","size","name"])}}}),Vn={class:"inline-flex"},Wn={key:0,class:"text-gray-600 mt-0.5"},Nn=Z({__name:"BaseButton",props:{href:{},outlined:{type:Boolean},to:{},disabled:{type:Boolean},rounded:{type:Boolean},color:{},tile:{type:Boolean},size:{default:"md"},height:{default:"md"},subtitle:{},icon:{}},emits:["click"],setup(e,{emit:t}){const n=t,a=e,r={sm:"p-1 text-sm",md:"py-2.5 px-5",lg:"py-3 px-6"},o=L(()=>{switch(a.height){case"sm":return"36px";case"md":return"40px";case"lg":return"48px";default:return}}),c=L(()=>{var m;const f=(m=a.color)!=null&&m.includes("bg-")?"":"bg-";return a.outlined?["border-1","border-gray-200","text-black","border-solid","hover:bg-gray-100"]:a.color?[`${f}${a.color}`]:["text-white","bg-black"]}),s=L(()=>a.tile?["rounded-2xl"]:a.rounded?["rounded-full"]:["rounded-3xl"]),i=L(()=>a.disabled?["opacity-30","cursor-not-allowed"]:[]),l=L(()=>[...c.value,...s.value,...i.value,r[a.size||"md"]]),u=L(()=>a.href?"a":a.to?be:"button");return(f,m)=>{const p=te;return $(),D(Sn(u.value),{ref:"button",href:f.href,to:f.to,class:Y(["w-fit text-center text-sm font-sans whitespace-nowrap transition-colors duration-300 flex flex-col items-center justify-center",l.value]),style:Vt({height:o.value}),disabled:f.disabled,onClick:m[0]||(m[0]=g=>n("click"))},{default:I(()=>[S("div",Vn,[Se(f.$slots,"icon",{},()=>
1[f.icon?($(),D(p,{key:0,size:f.size,name:f.icon,class:"mr-2"},null,8,["size","name"])):W("",!0)]),Se(f.$slots,"default")]),f.subtitle?($(),B("div",Wn,X(f.subtitle),1)):W("",!0)]),_:3},8,["href","to","style","class","disabled"])}}}),Fn={class:"text-black text-[15px] font-normal font-['Stolzl'] leading-[19px]"},qn={class:"text-black/55 text-[15px] font-normal font-['Stolzl'] leading-[19px]"},Lo=Z({__name:"HskLevelButton",props:{name:{},subtitle:{},isWhite:{type:Boolean},componentStyle:{}},setup(e){const t=T({1:"bg-hsk-100",2:"bg-hsk-200",3:"bg-hsk-300",4:"bg-hsk-400",5:"bg-hsk-500",6:"bg-hsk-600",7:"bg-hsk-700"}),n=T({1:"hover:bg-hsk-100",2:"hover:bg-hsk-200",3:"hover:bg-hsk-300",4:"hover:bg-hsk-400",5:"hover:bg-hsk-500",6:"hover:bg-hsk-600",7:"hover:bg-hsk-700"}),a=e,{level:r,link:o}=Mn(a.name);return(c,s)=>{const i=be,l=Nn;return c.componentStyle==="card"?($(),D(i,{key:0,to:k(o),class:Y([[k(n)[k(r)],c.isWhite?"bg-white":k(t)[k(r)]],"transition-colors min-w-[130px] h-[66px] p-3 bg-white rounded-xl border border-black border-opacity-10 flex-col justify-start items-start gap-1 inline-flex"])},{default:I(()=>[S("div",Fn,X(c.name),1),S("div",qn,X(c.subtitle),1)]),_:1},8,["to","class"])):($(),D(l,{key:1,color:c.isWhite?"white":k(t)[k(r)],class:Y(["transition-colors border-1 border-solid",[k(n)[k(r)],c.isWhite?"border-black/10":"border-transparent"]]),to:k(o),subtitle:c.subtitle},{default:I(()=>[nt(X(c.name),1)]),_:1},8,["color","class","to","subtitle"]))}}}),Un={},Gn={class:"border-gray-300 mt-2"};function Yn(e,t){return $(),B("hr",Gn)}const Xn=ye(Un,[["render",Yn]]),Kn={key:1,class:"flex flex-row items-center justify-between"},Yt=Z({__name:"ListItem",props:{active:{type:[Boolean,String]},divider:{type:Boolean},to:{}},setup(e){return(t,n)=>{const a=te,r=be,o=Xn;return $(),B("li",{class:Y(["cursor-pointer px-4 py-2 transition-colors hover:bg-gray-100 bg-white rounded",{"list-item-active":t.active}])},[t.to?($(),D(r,{key:0,class:"flex w-full h-full items-center justify-between",to:t.to},{default:I(()=>[t.active===!0||t.active==="left"?($(),D(a,{key:0,class:"mr-3",name:"ph:check-thin"})):W("",!0),Se(t.$slots,"default"),t.active==="right"?($(),D(a,{key:1,class:"mr-3",name:"ph:check-thin"})):W("",!0)]),_:3},8,["to"])):($(),B("div",Kn,[t.active===!0||t.active==="left"?($(),D(a,{key:0,class:"mr-3",name:"ph:check-thin"})):W("",!0),Se(t.$slots,"default"),t.active==="right"?($(),D(a,{key:1,class:"mr-3",name:"ph:check-thin"})):W("",!0)])),t.divider?($(),D(o,{key:2})):W("",!0)],2)}}}),Qn={},Zn={class:"rounded-2xl bg-white"};function Jn(e,t){return $(),B("ul",Zn,[Se(e.$slots,"default")])}const Xt=ye(Qn,[["render",Jn]]);var R="top",F="bottom",q="right",H="left",st="auto",je=[R,F,q,H],ve="start",Te="end",er="clippingParents",Kt="viewport",_e="popper",tr="reference",Ot=je.reduce(function(e,t){return e.concat([t+"-"+ve,t+"-"+Te])},[]),Qt=[].concat(je,[st]).reduce(function(e,t){return e.concat([t,t+"-"+ve,t+"-"+Te])},[]),nr="beforeRead",rr="read",ar="afterRead",or="beforeMain",ir="main",sr="afterMain",lr="beforeWrite",cr="write",ur="afterWrite",fr=[nr,rr,ar,or,ir,sr,lr,cr,ur];function Q(e){return e?(e.nodeName||"").toLowerCase():null}function V(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ue(e){var t=V(e).Element;return e instanceof t||e instanceof Element}function N(e){var t=V(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function lt(e){if(typeof ShadowRoot>"u")return!1;var t=V(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function dr(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var a=t.styles[n]||{},r=t.attributes[n]||{},o=t.elements[n];!N(o)||!Q(o)||(Object.assign(o.style,a),Object.keys(r).forEach(function(c){var s=r[c];s===!1?o.removeAttribute(c):o.setAttribute(c,s===!0?"":s)}))})}function pr(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEac
vendor: 14,299 bytes, line 1
1h(function(a){var r=t.elements[a],o=t.attributes[a]||{},c=Object.keys(t.styles.hasOwnProperty(a)?t.styles[a]:n[a]),s=c.reduce(function(i,l){return i[l]="",i},{});!N(r)||!Q(r)||(Object.assign(r.style,s),Object.keys(o).forEach(function(i){r.removeAttribute(i)}))})}}const vr={name:"applyStyles",enabled:!0,phase:"write",fn:dr,effect:pr,requires:["computeStyles"]};function K(e){return e.split("-")[0]}var le=Math.max,We=Math.min,he=Math.round;function et(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Zt(){return!/^((?!chrome|android).)*safari/i.test(et())}function me(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var a=e.getBoundingClientRect(),r=1,o=1;t&&N(e)&&(r=e.offsetWidth>0&&he(a.width)/e.offsetWidth||1,o=e.offsetHeight>0&&he(a.height)/e.offsetHeight||1);var c=ue(e)?V(e):window,s=c.visualViewport,i=!Zt()&&n,l=(a.left+(i&&s?s.offsetLeft:0))/r,u=(a.top+(i&&s?s.offsetTop:0))/o,f=a.width/r,m=a.height/o;return{width:f,height:m,top:u,right:l+f,bottom:u+m,left:l,x:l,y:u}}function ct(e){var t=me(e),n=e.offsetWidth,a=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-a)<=1&&(a=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:a}}function Jt(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&<(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function J(e){return V(e).getComputedStyle(e)}function hr(e){return["table","td","th"].indexOf(Q(e))>=0}function ne(e){return((ue(e)?e.ownerDocument:e.document)||window.document).documentElement}function Fe(e){return Q(e)==="html"?e:e.assignedSlot||e.parentNode||(lt(e)?e.host:null)||ne(e)}function $t(e){return!N(e)||J(e).position==="fixed"?null:e.offsetParent}function mr(e){var t=/firefox/i.test(et()),n=/Trident/i.test(et());if(n&&N(e)){var a=J(e);if(a.position==="fixed")return null}var r=Fe(e);for(lt(r)&&(r=r.host);N(r)&&["html","body"].indexOf(Q(r))<0;){var o=J(r);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return r;r=r.parentNode}return null}function De(e){for(var t=V(e),n=$t(e);n&&hr(n)&&J(n).position==="static";)n=$t(n);return n&&(Q(n)==="html"||Q(n)==="body"&&J(n).position==="static")?t:n||mr(e)||t}function ut(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function $e(e,t,n){return le(e,We(t,n))}function gr(e,t,n){var a=$e(e,t,n);return a>n?n:a}function en(){return{top:0,right:0,bottom:0,left:0}}function tn(e){return Object.assign({},en(),e)}function nn(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}var br=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,tn(typeof t!="number"?t:nn(t,je))};function yr(e){var t,n=e.state,a=e.name,r=e.options,o=n.elements.arrow,c=n.modifiersData.popperOffsets,s=K(n.placement),i=ut(s),l=[H,q].indexOf(s)>=0,u=l?"height":"width";if(!(!o||!c)){var f=br(r.padding,n),m=ct(o),p=i==="y"?R:H,g=i==="y"?F:q,d=n.rects.reference[u]+n.rects.reference[i]-c[i]-n.rects.popper[u],v=c[i]-n.rects.reference[i],h=De(o),w=h?i==="y"?h.clientHeight||0:h.clientWidth||0:0,O=d/2-v/2,y=f[p],x=w-m[u]-f[g],b=w/2-m[u]/2+O,_=$e(y,b,x),C=i;n.modifiersData[a]=(t={},t[C]=_,t.centerOffset=_-b,t)}}function xr(e){var t=e.state,n=e.options,a=n.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||Jt(t.elements.popper,r)&&(t.elements.arrow=r))}const wr={name:"arrow",enabled:!0,phase:"main",fn:yr,effect:xr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ge(e){return e.split("-")[1]}var _r={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kr(e,t){var n=e.x,a=e.y,r=t.devicePixelRatio||1;return{x:he(n*r)/r||0,y:he(a*r)/r||0}}function Ct(e){var t,n=e.popper,a=e.popperRect,r=e.placement,o=e.variation,c=e.offsets,s=e.position,i=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,f=e.isFixed,m=c.x,p=m===void 0?0:m,g=c.y,d=g===void 0?0:g,v=typeof u=="function"?u({x:p,y:d}):{x:p,y:d};p=v.x,d=v.y;var h=c.hasOwnProperty("x"),w=c.hasOwnProperty("y"),O=H,y=R,x=window;if(l){var b=De(n),_="clientHeight",C="clientWidth";if(b===V(n)&&(b=ne(n),J(b).position!=="static"&&s==="absolute"&&(_="scrollHeight",C="scrollWidth")),b=b,r===R||(r===H||r===q)&&o===Te){y=F;var E=f&&b===x&&x.visualViewport?x.visualViewport.height:b[_];d-=E-a.height,d*=i?1:-1}if(r===H||(r===R||r===F)&&o===Te){O=q;var j=f&&b===x&&x.visualViewport?x.visualViewport.width:b[C];p-=j-a.width,p*=i?1:-1}}var A=Object.assign({position:s},l&&_r),U=u===!0?kr({x:p,y:d},V(n)):{x:p,y:d};if(p=U.x,d=U.y,i){var z;return Object.assign({},A,(z={},z[y]=w?"0":"",z[O]=h?"0":"",z.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+d+"px)":"translate3d("+p+"px, "+d+"px, 0)",z))}return Object.assign({},A,(t={},t[y]=w?d+"px":"",t[O]=h?p+"px":"",t.transform="",t))}function Or(e){var t=e.state,n=e.options,a=n.gpuAcceleration,r=a===void 0?!0:a,o=n.adaptive,c=o===void 0?!0:o,s=n.roundOffsets,i=s===void 0?!0:s,l={placement:K(t.placement),variation:ge(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ct(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:i})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ct(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const $r={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Or,data:{}};var Re={passive:!0};function Cr(e){var t=e.state,n=e.instance,a=e.options,r=a.scroll,o=r===void 0?!0:r,c=a.resize,s=c===void 0?!0:c,i=V(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&l.forEach(function(u){u.addEventListener("scroll",n.update,Re)}),s&&i.addEventListener("resize",n.update,Re),function(){o&&l.forEach(function(u){u.removeEventListener("scroll",n.update,Re)}),s&&i.removeEventListener("resize",n.update,Re)}}const Sr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Cr,data:{}};var Tr={left:"right",right:"left",bottom:"top",top:"bottom"};function He(e){return e.replace(/left|right|bottom|top/g,function(t){return Tr[t]})}var Er={start:"end",end:"start"};function St(e){return e.replace(/start|end/g,function(t){return Er[t]})}function ft(e){var t=V(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function dt(e){return me(ne(e)).left+ft(e).scrollLeft}function jr(e,t){var n=V(e),a=ne(e),r=n.visualViewport,o=a.clientWidth,c=a.clientHeight,s=0,i=0;if(r){o=r.width,c=r.height;var l=Zt();(l||!l&&t==="fixed")&&(s=r.offsetLeft,i=r.offsetTop)}return{width:o,height:c,x:s+dt(e),y:i}}function Dr(e){var t,n=ne(e),a=ft(e),r=(t=e.ownerDocument)==null?void 0:t.body,o=le(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=le(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-a.scrollLeft+dt(e),i=-a.scrollTop;return J(r||n).direction==="rtl"&&(s+=le(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:c,x:s,y:i}}function pt(e){var t=J(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function rn(e){return["html","body","#document"].indexOf(Q(e))>=0?e.ownerDocument.body:N(e)&&pt(e)?e:rn(Fe(e))}function Ce(e,t){var n;t===void 0&&(t=[]);var a=rn(e),r=a===((n=e.ownerDocument)==null?void 0:n.body),o=V(a),c=r?[o].concat(o.visualViewport||[],pt(a)?a:[]):a,s=t.concat(c);return r?s:s.concat(Ce(Fe(c)))}function tt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Br(e,t){var n=me(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Tt(e,t,n){return t===Kt?tt(jr(e,n)):ue(t)?Br(t,n):tt(Dr(ne(e)))}function Ar(e){var t=Ce(Fe(e)),n=["absolute","fixed"].indexOf(J(e).position)>=0,a=n&&N(e)?De(e):e;return ue(a)?t.filter(function(r){return ue(r)&&Jt(r,a)&&Q(r)!=="body"}):[]}function Pr(e,t,n,a){var r=t==="clippingParents"?Ar(e):[].concat(t),o=[].concat(r,[n]),c=o[0],s=o.reduce(function(i,l){var u=Tt(e,l,a);return i.top=le(u.top,i.top),i.right=We(u.right,i.right),i.bottom=We(u.bottom,i.bottom),i.left=le(u.left,i.left),i},Tt(e,c,a));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function an(e){var t=e.reference,n=e.element,a=e.placement,r=a?K(a):null,o=a?ge(a):null,c=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,i;switch(r){case R:i={x:c,y:t.y-n.height};break;case F:i={x:c,y:t.y+t.height};break;case q:i={x:t.x+t.width,y:s};break;case H:i={x:t.x-n.width,y:s};break;default:i={x:t.x,y:t.y}}var l=r?ut(r):null;if(l!=null){var u=l==="y"?"height":"width";switch(o){case ve:i[l]=i[l]-(t[u]/2-n[u]/2);break;case Te:i[l]=i[l]+(t[u]/2-n[u]/2);break}}return i}function Ee(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=a===void 0?e.placement:a,o=n.strategy,c=o===void 0?e.strategy:o,s=n.boundary,i=s===void 0?er:s,l=n.rootBoundary,u=l===void 0?Kt:l,f=n.elementContext,m=f===void 0?_e:f,p=n.altBoundary,g=p===void 0?!1:p,d=n.padding,v=d===void 0?0:d,h=tn(typeof v!="number"?v:nn(v,je)),w=m===_e?tr:_e,O=e.rects.popper,y=e.elements[g?w:m],x=Pr(ue(y)?y:y.contextElement||ne(e.elements.popper),i,u,c),b=me(e.elements.reference),_=an({reference:b,element:O,strategy:"absolute",placement:r}),C=tt(Object.assign({},O,_)),E=m===_e?C:b,j={top:x.top-E.top+h.top,bottom:E.bottom-x.bottom+h.bottom,left:x.left-E.left+h.left,right:E.right-x.right+h.right},A=e.modifiersData.offset;if(m===_e&&A){var U=A[r];Object.keys(j).forEach(function(z){var re=[q,F].indexOf(z)>=0?1:-1,ae=[R,F].indexOf(z)>=0?"y":"x";j[z]+=U[ae]*re})}return j}function zr(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=n.boundary,o=n.rootBoundary,c=n.padding,s=n.flipVariations,i=n.allowedAutoPlacements,l=i===void 0?Qt:i,u=ge(a),f=u?s?Ot:Ot.filter(function(g){return ge(g)===u}):je,m=f.filter(function(g){return l.indexOf(g)>=0});m.length===0&&(m=f);var p=m.reduce(function(g,d){return g[d]=Ee(e,{placement:d,boundary:r,rootBoundary:o,padding:c})[K(d)],g},{});return Object.keys(p).sort(function(g,d){return p[g]-p[d]})}function Lr(e){if(K(e)===st)return[];var t=He(e);return[St(e),t,St(t)]}function Ir(e){var t=e.state,n=e.options,a=e.name;if(!t.modifiersData[a]._skip){for(var r=n.mainAxis,o=r===void 0?!0:r,c=n.altAxis,s=c===void 0?!0:c,i=n.fallbackPlacements,l=n.padding,u=n.boundary,f=n.rootBoundary,m=n.altBoundary,p=n.flipVariations,g=p===void 0?!0:p,d=n.allowedAutoPlacements,v=t.options.placement,h=K(v),w=h===v,O=i||(w||!g?[He(v)]:Lr(v)),y=[v].concat(O).reduce(function(de,ee){return de.concat(K(ee)===st?zr(t,{placement:ee,boundary:u,rootBoundary:f,padding:l,flipVariations:g,allowedAutoPlacements:d}):ee)},[]),x=t.rects.reference,b=t.rects.popper,_=new Map,C=!0,E=y[0],j=0;j<y.length;j++){var A=y[j],U=K(A),z=ge(A)===ve,re=[R,F].indexOf(U)>=0,ae=re?"width":"height",M=Ee(t,{placement:A,boundary:u,rootBoundary:f,altBoundary:m,padding:l}),G=re?z?q:H:z?F:R;x[ae]>b[ae]&&(G=He(G));var Be=He(G),oe=[];if(o&&oe.push(M[U]<=0),s&&oe.push(M[G]<=0,M[Be]<=0),oe.every(function(de){return de})){E=A,C=!1;break}_.set(A,oe)}if(C)for(var Ae=g?3:1,qe=function(ee){var we=y.find(function(ze){var ie=_.get(ze);if(ie)return ie.slice(0,ee).every(function(Ue){return Ue})});if(we)return E=we,"break"},xe=Ae;xe>0;xe--){var Pe=qe(xe);if(Pe==="break")break}t.placement!==E&&(t.modifiersData[a]._skip=!0,t.placement=E,t.reset=!0)}}const Rr={name:"flip",enabled:!0,phase:"main",fn:Ir,requiresIfExists:["offset"],data:{_skip:!1}};function Et(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function jt(e){return[R,q,F,H].some(function(t){return e[t]>=0})}function Hr(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,c=Ee(t,{elementContext:"reference"}),s=Ee(t,{altBoundary:!0}),i=Et(c,a),l=Et(s,r,o),u=jt(i),f=jt(l);t.modifiersData[n]={referenceClippingOffsets:i,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const Mr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Hr};function Vr(e,t,n){var a=K(e),r=[H,R].indexOf(a)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,c=o[0],s=o[1];return c=c||0,s=(s||0)*r,[H,q].indexOf(a)>=0?{x:s,y:c}:{x:c,y:s}}function Wr(e){var t=e.state,n=e.options,a=e.name,r=n.offset,o=r===void 0?[0,0]:r,c=Qt.reduce(function(u,f){return u[f]=Vr(f,t.rects,o),u},{}),s=c[t.placement],i=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=l),t.modifiersData[a]=c}const Nr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Wr};function Fr(e){var t=e.state,n=e.name;t.modifiersData[n]=an({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const qr={name:"popperOffsets",enabled:!0,phase:"read",fn:Fr,data:{}};function Ur(e){return e==="x"?"y":"x"}function Gr(e){var t=e.state,n=e.options,a=e.name,r=n.mainAxis,o=r===void 0?!0:r,c=n.altAxis,s=c===void 0?!1:c,i=n.boundary,l=n.rootBoundary,u=n.altBoundary,f=n.padding,m=n.tether,p=m===void 0?!0:m,g=n.tetherOffset,d=g===void 0?0:g,v=Ee(t,{boundary:i,rootBoundary:l,padding:f,altBoundary:u}),h=K(t.placement),w=ge(t.placement),O=!w,y=ut(h),x=Ur(y),b=t.modifiersData.popperOffsets,_=t.rects.reference,C=t.rects.popper,E=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,j=typeof E=="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,U={x:0,y:0};if(b){if(o){var z,re=y==="y"?R:H,ae=y==="y"?F:q,M=y==="y"?"height":"width",G=b[
1y],Be=G+v[re],oe=G-v[ae],Ae=p?-C[M]/2:0,qe=w===ve?_[M]:C[M],xe=w===ve?-C[M]:-_[M],Pe=t.elements.arrow,de=p&&Pe?ct(Pe):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:en(),we=ee[re],ze=ee[ae],ie=$e(0,_[M],de[M]),Ue=O?_[M]/2-Ae-ie-we-j.mainAxis:qe-ie-we-j.mainAxis,hn=O?-_[M]/2+Ae+ie+ze+j.mainAxis:xe+ie+ze+j.mainAxis,Ge=t.elements.arrow&&De(t.elements.arrow),mn=Ge?y==="y"?Ge.clientTop||0:Ge.clientLeft||0:0,vt=(z=A==null?void 0:A[y])!=null?z:0,gn=G+Ue-vt-mn,bn=G+hn-vt,ht=$e(p?We(Be,gn):Be,G,p?le(oe,bn):oe);b[y]=ht,U[y]=ht-G}if(s){var mt,yn=y==="x"?R:H,xn=y==="x"?F:q,se=b[x],Le=x==="y"?"height":"width",gt=se+v[yn],bt=se-v[xn],Ye=[R,H].indexOf(h)!==-1,yt=(mt=A==null?void 0:A[x])!=null?mt:0,xt=Ye?gt:se-_[Le]-C[Le]-yt+j.altAxis,wt=Ye?se+_[Le]+C[Le]-yt-j.altAxis:bt,_t=p&&Ye?gr(xt,se,wt):$e(p?xt:gt,se,p?wt:bt);b[x]=_t,U[x]=_t-se}t.modifiersData[a]=U}}const Yr={name:"preventOverflow",enabled:!0,phase:"main",fn:Gr,requiresIfExists:["offset"]};function Xr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Kr(e){return e===V(e)||!N(e)?ft(e):Xr(e)}function Qr(e){var t=e.getBoundingClientRect(),n=he(t.width)/e.offsetWidth||1,a=he(t.height)/e.offsetHeight||1;return n!==1||a!==1}function Zr(e,t,n){n===void 0&&(n=!1);var a=N(t),r=N(t)&&Qr(t),o=ne(t),c=me(e,r,n),s={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(a||!a&&!n)&&((Q(t)!=="body"||pt(o))&&(s=Kr(t)),N(t)?(i=me(t,!0),i.x+=t.clientLeft,i.y+=t.clientTop):o&&(i.x=dt(o))),{x:c.left+s.scrollLeft-i.x,y:c.top+s.scrollTop-i.y,width:c.width,height:c.height}}function Jr(e){var t=new Map,n=new Set,a=[];e.forEach(function(o){t.set(o.name,o)});function r(o){n.add(o.name);var c=[].concat(o.requires||[],o.requiresIfExists||[]);c.forEach(function(s){if(!n.has(s)){var i=t.get(s);i&&r(i)}}),a.push(o)}return e.forEach(function(o){n.has(o.name)||r(o)}),a}function ea(e){var t=Jr(e);return fr.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function ta(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function na(e){var t=e.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,n},{});return Object.keys(t).map(function(n){return t[n]})}var Dt={placement:"bottom",modifiers:[],strategy:"absolute"};function Bt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function ra(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,o=r===void 0?Dt:r;return function(s,i,l){l===void 0&&(l=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Dt,o),modifiersData:{},elements:{reference:s,popper:i},attributes:{},styles:{}},f=[],m=!1,p={state:u,setOptions:function(h){var w=typeof h=="function"?h(u.options):h;d(),u.options=Object.assign({},o,u.options,w),u.scrollParents={reference:ue(s)?Ce(s):s.contextElement?Ce(s.contextElement):[],popper:Ce(i)};var O=ea(na([].concat(a,u.options.modifiers)));return u.orderedModifiers=O.filter(function(y){return y.enabled}),g(),p.update()},forceUpdate:function(){if(!m){var h=u.elements,w=h.reference,O=h.popper;if(Bt(w,O)){u.rects={reference:Zr(w,De(O),u.options.strategy==="fixed"),popper:ct(O)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(j){return u.modifiersData[j.name]=Object.assign({},j.data)});for(var y=0;y<u.orderedModifiers.length;y++){if(u.reset===!0){u.reset=!1,y=-1;continue}var x=u.orderedModifiers[y],b=x.fn,_=x.options,C=_===void 0?{}:_,E=x.name;typeof b=="function"&&(u=b({state:u,options:C,name:E,instance:p})||u)}}}},update:ta(function(){return new Promise(function(v){p.forceUpdate(),v(u)})}),destroy:function(){d(),m=!0}};if(!Bt(s,i))return p;p.setOptions(l).then(function(v){!m&&l.onFirstUpdate&&l.onFirstUpdate(v)});function g(){u.orderedModifiers.forEach(function(v){var h=v.name,w=v.options,O=w===void 0?{}:w,y=v.effect;if(typeof y=="function"){var x=y({state:u,name:h,instance:p,options:O}),b=function(){};f.push(x||b)}})}function d(){f.forEach(function(v){return v()}),f=[]}return p}}var aa=[Sr,qr,$r,vr,Nr,Rr,Yr,wr,Mr],on=ra({defaultModifiers:aa});const Xe=new WeakMap;function Io(e,t,n={}){const{mode:a="replace",route:r=Wt(),router:o=Nt(),transform:c=f=>f}=n;Xe.has(o)||Xe.set(o,new Map);const s=Xe.get(o);let i=r.params[e];qt(()=>{i=void 0});let l;const u=Ft((f,m)=>(l=m,{get(){return f(),c(i!==void 0?i:Me(t))},set(p){i!==p&&(i=p,s.set(e,p),m(),rt(()=>{if(s.size===0)return;const g=Object.fromEntries(s.entries());s.clear();const{params:d,query:v,hash:h}=r;o[Me(a)]({params:{...d,...g},query:v,hash:h})}))}}));return fe(()=>r.params[e],f=>{i=f,l()},{flush:"sync"}),u}const Ke=new WeakMap;function oa(e,t,n={}){const{mode:a="replace",route:r=Wt(),router:o=Nt(),transform:c=f=>f}=n;Ke.has(o)||Ke.set(o,new Map);const s=Ke.get(o);let i=r.query[e];qt(()=>{i=void 0});let l;const u=Ft((f,m)=>(l=m,{get(){return f(),c(i!==void 0?i:Me(t))},set(p){i!==p&&(i=p,s.set(e,p),m(),rt(()=>{if(s.size===0)return;const g=Object.fromEntries(s.entries());s.clear();const{params:d,query:v,hash:h}=r;o[Me(a)]({params:d,query:{...v,...g},hash:h})}))}}));return fe(()=>r.query[e],f=>{i=f,l()},{flush:"sync"}),u}const ke="zh-Hans",pe="zh-Hant",ia=()=>{const e=Tn("hanzi-type",ke),t=oa("h",ke),n=L(()=>e.value===pe||t.value===pe?pe:ke),a=En("hanzi-type-switch-value");return a.value=(()=>{switch(n.value){case pe:return 1;case ke:default:return 0}})(),fe(()=>a.value,r=>{switch(r){case 1:e.value=pe,t.value=pe;break;case 0:default:e.value=ke,t.value=void 0;break}}),{hanziType:n,switchValue:a}}
1,sa=Z({name:"ClientOnly",inheritAttrs:!1,props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(e,{slots:t,attrs:n}){const a=T(!1);return Ut(()=>{a.value=!0}),r=>{var i;if(a.value)return(i=t.default)==null?void 0:i.call(t);const o=t.fallback||t.placeholder;if(o)return o();const c=r.fallback||r.placeholder||"",s=r.fallbackTag||r.placeholderTag||"span";return B(s,n,c)}}});var sn={exports:{}};(function(e){e.exports=function(t){var n={};function a(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,a),o.loaded=!0,o.exports}return a.m=t,a.c=n,a.p="",a(0)}([function(t,n,a){t.exports=a(1)},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var r=a(2);Object.defineProperty(n,"combineChunks",{enumerable:!0,get:function(){return r.combineChunks}}),Object.defineProperty(n,"fillInChunks",{enumerable:!0,get:function(){return r.fillInChunks}}),Object.defineProperty(n,"findAll",{enumerable:!0,get:function(){return r.findAll}}),Object.defineProperty(n,"findChunks",{enumerable:!0,get:function(){return r.findChunks}})},function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.findAll=function(l){var u=l.autoEscape,f=l.caseSensitive,m=f===void 0?!1:f,p=l.findChunks,g=p===void 0?r:p,d=l.sanitize,v=l.searchWords,h=l.textToHighlight;return o({chunksToHighlight:a({chunks:g({autoEscape:u,caseSensitive:m,sanitize:d,searchWords:v,textToHighlight:h})}),totalLength:h?h.length:0})};var a=n.combineChunks=function(l){var u=l.chunks;return u=u.sort(function(f,m){return f.start-m.start}).reduce(function(f,m){if(f.length===0)return[m];var p=f.pop();if(m.start<=p.end){var g=Math.max(p.end,m.end);f.push({highlight:!1,start:p.start,end:g})}else f.push(p,m);return f},[]),u},r=function(l){var u=l.autoEscape,f=l.caseSensitive,m=l.sanitize,p=m===void 0?c:m,g=l.searchWords,d=l.textToHighlight;return d=p(d),g.filter(function(v){return v}).reduce(function(v,h){h=p(h),u&&(h=s(h));for(var w=new RegExp(h,f?"g":"gi"),O=void 0;O=w.exec(d);){var y=O.index,x=w.lastIndex;x>y&&v.push({highlight:!1,start:y,end:x}),O.index===w.lastIndex&&w.lastIndex++}return v},[])};n.findChunks=r;var o=n.fillInChunks=function(l){var u=l.chunksToHighlight,f=l.totalLength,m=[],p=function(v,h,w){h-v>0&&m.push({start:v,end:h,highlight:w})};if(u.length===0)p(0,f,!1);else{var g=0;u.forEach(function(d){p(g,d.start,!1),p(d.start,d.end,!0),g=d.end}),p(g,f,!1)}return m};function c(i){return i}function s(i){return i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}}])})(sn);var la=sn.exports;const ln=(e,t)=>{const n=la.findAll({autoEscape:e.autoEscape,caseSensitive:e.caseSensitive,findChunks:e.findChunks,sanitize:e.sanitize,searchWords:e.searchWords,textToHighlight:e.textToHighlight}),a=ca(e,n),r=t.slots;return r.default?r.default&&r.default(a):kt("span",{...t.attrs},a.map(({chunk:o,text:c,attrs:s})=>o.highlight?kt("mark",s,[c]):c))},At={};function ca(e,t){let n=-1,a="",r={};const{textToHighlight:o,highlightClassName:c,highlightStyle:s=At,activeIndex:i,activeClassName:l,activeStyle:u=At}=e;return t.map((f,m)=>{const p=o.substr(f.start,f.end-f.start);if(f.highlight){n++;const g=n===+(i||-1);return a=`${c} ${g?l:""}`,r=g===!0&&u!=null?{...s,...u}:s,{chunk:f,text:p,attrs:{class:a,key:m,style:r,highlightIndex:n}}}else return{chunk:f,text:p}})}ln.props={activeClassName:String,activeIndex:Number,activeStyle:Object,autoEscape:Boolean,caseSensitive:{type:Boolean,defualt:!1},findChunks:Function,custom:{type:Boolean,default:!1},highlightClassName:String,highlightStyle:Object,sanitize:Function,searchWords:{type:Array,validator(e){return e.every(t=>typeof t=="string")},required:!0},textToHighlight:{type:String,required:!0}};const Qe=ln,ua={class:"lg:hidden z-40 fab fixed w-fit h-9 pl-[18px] pr-3 py-2.5 bg-indigo-200 rounded-[100px] shadow justify-end items-center gap-3 inline-flex"},fa=Z({__name:"FabButton",props:{title:{},to:{}},setup(e){const t=T(!1);return(n,a)=>{const r=be,o=te;return ce(($(),B("div",ua,[P(r,{href:n.to,class:"text-center text-black text-[13px] md:text-sm leading-none","aria-label":n.title},{default:I(()=>[nt(X(n.title),1)]),_:1},8,["href","aria-label"]),P(o,{name:"ph:x-light",class:"w-3.5 h-3.5 cursor-pointer",size:"md",onClick:a[0]||(a[0]=c=>t.value=!0)})],512)),[[at,!k(t)]])}}}),Ro=ye(fa,[["__scopeId","data-v-4e0e6d0c"]]);function da(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var cn=da,pa=typeof Ie=="object"&&Ie&&Ie.Object===Object&&Ie,va=pa,ha=va,ma=typeof self=="object"&&self&&self.Object===Object&&self,ga=ha||ma||Function("return this")(),un=ga,ba=un,ya=function(){return ba.Date.now()},xa=ya,wa=/\s/;function _a(e){for(var t=e.length;t--&&wa.test(e.charAt(t)););return t}var ka=_a,Oa=ka,$a=/^\s+/;function Ca(e){return e&&e.slice(0,Oa(e)+1).replace($a,"")}var Sa=Ca,Ta=un,Ea=Ta.Symbol,fn=Ea,Pt=fn,dn=Object.prototype,ja=dn.hasOwnProperty,Da=dn.toString,Oe=Pt?Pt.toStringTag:void 0;function Ba(e){var t=ja.call(e,Oe),n=e[Oe];try{e[Oe]=void 0;var a=!0}catch{}var r=Da.call(e);return a&&(t?e[Oe]=n:delete e[Oe]),r}var Aa=Ba,Pa=Object.prototype,za=Pa.toString;function La(e){return za.call(e)}var Ia=La,zt=fn,Ra=Aa,Ha=Ia,Ma="[object Null]",Va="[object Undef
1ined]",Lt=zt?zt.toStringTag:void 0;function Wa(e){return e==null?e===void 0?Va:Ma:Lt&&Lt in Object(e)?Ra(e):Ha(e)}var Na=Wa;function Fa(e){return e!=null&&typeof e=="object"}var qa=Fa,Ua=Na,Ga=qa,Ya="[object Symbol]";function Xa(e){return typeof e=="symbol"||Ga(e)&&Ua(e)==Ya}var Ka=Xa,Qa=Sa,It=cn,Za=Ka,Rt=NaN,Ja=/^[-+]0x[0-9a-f]+$/i,eo=/^0b[01]+$/i,to=/^0o[0-7]+$/i,no=parseInt;function ro(e){if(typeof e=="number")return e;if(Za(e))return Rt;if(It(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=It(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Qa(e);var n=eo.test(e);return n||to.test(e)?no(e.slice(2),n?2:8):Ja.test(e)?Rt:+e}var ao=ro,oo=cn,Ze=xa,Ht=ao,io="Expected a function",so=Math.max,lo=Math.min;function co(e,t,n){var a,r,o,c,s,i,l=0,u=!1,f=!1,m=!0;if(typeof e!="function")throw new TypeError(io);t=Ht(t)||0,oo(n)&&(u=!!n.leading,f="maxWait"in n,o=f?so(Ht(n.maxWait)||0,t):o,m="trailing"in n?!!n.trailing:m);function p(b){var _=a,C=r;return a=r=void 0,l=b,c=e.apply(C,_),c}function g(b){return l=b,s=setTimeout(h,t),u?p(b):c}function d(b){var _=b-i,C=b-l,E=t-_;return f?lo(E,o-C):E}function v(b){var _=b-i,C=b-l;return i===void 0||_>=t||_<0||f&&C>=o}function h(){var b=Ze();if(v(b))return w(b);s=setTimeout(h,d(b))}function w(b){return s=void 0,m&&a?p(b):(a=r=void 0,c)}function O(){s!==void 0&&clearTimeout(s),l=0,a=i=r=s=void 0}function y(){return s===void 0?c:w(Ze())}function x(){var b=Ze(),_=v(b);if(a=arguments,r=this,i=b,_){if(s===void 0)return g(i);if(f)return clearTimeout(s),s=setTimeout(h,t),p(i)}return s===void 0&&(s=setTimeout(h,t)),c}return x.cancel=O,x.flush=y,x}var uo=co;const fo=jn(uo),po={class:"search-input bg-white rounded-3xl h-[48px] flex items-center border"},vo=["placeholder"],ho={key:0,class:"results-container w-full"},mo=Z({__name:"SearchInput",emits:["focusChange"],setup(e,{emit:t}){const n=t,a=Ne(),r=T(""),o=T([]),c=T(!1),s=T(),i=T(0),l=fo(async()=>{r.value?o.value=await g():o.value=[]},300),u=()=>{var d;i.value=((d=s.value)==null?void 0:d.clientWidth)||0};Ut(()=>{window==null||window.addEventListener("resize",u)}),Je(()=>{window==null||window.removeEventListener("resize",u)});const f=()=>{c.value=!0,n("focusChange",c.value),rt(u)},m=()=>{c.value=!1,n("focusChange",c.value),p()},p=()=>{r.value="",o.value=[]};async function g(){const{$api:d}=Mt();try{return d.laoshi.setLanguage(a.locale.value),(await d.laoshi.searchWords({search:r.value})).data}catch(v){return console.error(v),[]}}return fe(o,d=>{d.length&&(document.querySelector(".search-input"),document.querySelector(".results-container"))}),(d,v)=>{const h=be,w=Yt,O=Xt,y=ot("click-outside");return $(),B(Ve,null,[S("div",{class:Y([{hidden:!c.value},"fixed top-0 bg-black opacity-20 left-0 right-0 bottom-0 z-10 w-full h-full"])},null,2),ce(($(),B("div",Dn({ref_key:"inputContainer",ref:s},d.$attrs,{class:"relative z-20"}),[S("div",{class:Y(["transition duration-300 p-3 rounded-3xl w-full",{"absolute bg-white":c.value}]),style:Vt({width:c.value?i.value+"px":void 0})},[S("div",po,[P(te,{filled:"",name:"ph:magnifying-glass-thin",size:"md",class:"ml-2 gray-500"}),ce(S("input",{"onUpdate:modelValue":v[0]||(v[0]=x=>r.value=x),type:"text",class:"flex-grow px-2 py-1 outline-none rounded-3xl",placeholder:d.$t("hanziClientSearchPlaceholder"),onFocus:f,onInput:v[1]||(v[1]=(...x)=>k(l)&&k(l)(...x))},null,40,vo),[[Bn,r.value]]),r.value?($(),D(te,{key:0,name:"ph:x-thin",size:"md",class:"mr-2 cursor-pointer",onClick:p})):W("",!0)]),o.value.length?($(),B("div",ho,[P(O,{class:"results bg-white p-2 border-0 h-[500px] overflow-y-auto"},{default:I(()=>[($(!0),B(Ve,null,it(o.value,(x,b)=>($(),D(w,{key:b,class:"py-1 px-2",divider:"",to:`/${d.$i18n.locale}/${x.word}`},{default:I(()=>[P(h,{class:"flex flex-col"},{default:I(()=>{var _;return[P(k(Qe),{class:"text-xl","highlight-class-name":"bg-gray-300 rounded mb-1","search-words":[r.value],"auto-escape":!0,"text-to-highlight":x.word},null,8,["search-words","text-to-highlight"]),P(k(Qe),{class:"text-base","highlight-class-name":"bg-gray-300 rounded mb-1","search-words":[r.value],"auto-escape":!0,"text-to-highlight":x.translations[d.$i18n.locale]},null,8,["search-words","text-to-highlight"]),P(k(Qe),{class:"text-base text-gray-600","highlight-class-name":"bg-gray-300 rounded mb-1","search-words":[r.value],"auto-escape":!0,"text-to-highlight":(_=x.transcriptions[0])==null?void 0:_.replaceAll("*","")},null,8,["search-words","text-to-highlight"])]}),_:2},1024)]),_:2},1032,["to"]))),128))]),_:1})])):W("",!0)],6)],16)),[[y,m]])],64)}}}),go=ye(mo,[["__scopeId","data-v-2faadfb8"]]),bo={class:"flex text-sm h-[40px]"},yo=Z({__name:"SegmentedButton",props:{modelValue:{},options:{},hideTextOnMobile:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,a=e,r=a.options||["first","second"],o=(l,u)=>{const f=[];return a.hideTextOnMobile?(f.push("p-2","md:px-4","md:py-2"),a.modelValue===l&&f.push("bg-white","text-black","md:bg-black","md:text-white","md:border-black"),a.modelValue===u&&f.push("bg-white","md:hover:bg-gray-100","text-black/20","md:text-black","md:border-black/10")):(f.push("px-4","py-2"),a.modelValue===l&&f.push("bg-black","text-white","border-black"),a.modelValue===u&&f.push("bg-white","hover:bg-gray-100","text-black","border-black/10")),f},c=L(()=>o(0,1)),s=L(()=>o(1,0)),i=l=>{n("update:modelValue",l)}
1;return(l,u)=>{const f=te;return $(),B("div",bo,[S("button",{class:Y(["segmented-button flex flex-grow items-center justify-center gap-2 border-solid hover:border-opacity-0 border-y-1 border-l-1 rounded-l-3xl",k(c)]),onClick:u[0]||(u[0]=m=>i(0))},[k(r)[0].icon?($(),D(f,{key:0,class:"transition-colors",name:k(r)[0].icon},null,8,["name"])):W("",!0),S("span",{class:Y(l.hideTextOnMobile?"hidden md:block":"")},X(k(r)[0].name),3)],2),S("button",{class:Y(["segmented-button flex flex-grow items-center justify-center gap-2 border-solid hover:border-opacity-0 border-y-1 border-r-1 rounded-r-3xl",k(s)]),onClick:u[1]||(u[1]=m=>i(1))},[k(r)[1].icon?($(),D(f,{key:0,class:"transition-colors",name:k(r)[1].icon},null,8,["name"])):W("",!0),S("span",{class:Y(l.hideTextOnMobile?"hidden md:block":"")},X(k(r)[1].name),3)],2)])}}}),xo=ye(yo,[["__scopeId","data-v-8929ed10"]]),wo=["aria-label"],_o=Z({__name:"OptionsMenu",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const{breakpoints:n}=Gt(),a=e,r=t,{switchValue:o}=ia(),c=Ne(),s=L(()=>{const h=c.availableLocales,w=c.locale;return h.map(y=>{const x=An();return{text:c.t(`hanziClientLanguage_${y}`),to:x(y),active:y===w.value?"right":!1}})}),i=T(null),l=T(null),u=T(),f=()=>{n.lg.value&&i.value&&l.value&&(u.value=on(i.value,l.value,{placement:"bottom",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,4]}}]}))},m=()=>{var h,w;(h=u.value)==null||h.destroy(),(w=l.value)==null||w.removeAttribute("style")},p=()=>{r("update:modelValue",!0),f(),window==null||window.addEventListener("keydown",d)},g=()=>{r("update:modelValue",!1),m(),window==null||window.removeEventListener("keydown",d)},d=h=>{h.key==="Escape"&&g()},v=()=>a.modelValue?g():p();return fe(()=>n.lg.value,h=>{a.modelValue&&(h?f():m())}),(h,w)=>{const O=te,y=xo,x=Yt,b=Xt,_=ot("click-outside");return ce(($(),B("div",null,[S("div",null,[S("button",{ref_key:"activatorEl",ref:i,class:"p-3 flex bg-white rounded-full relative h-[48px] border border-gray-300","aria-label":h.$t("hanziClientLanguageSettings"),onClick:v},[P(O,{name:"ph:globe-thin",size:"lg"})],8,wo)]),ce(S("div",null,[S("div",{class:"fixed lg:hidden inset-0 bg-black/30 z-40 w-full h-full",onClick:g}),S("div",{ref_key:"menuEl",ref:l,class:"fixed m-auto inset-x-0 bottom-0 z-50 w-[375px] max-h-full overflow-auto py-4 bg-white border border-black border-opacity-10 shadow rounded-t-[38px] lg:rounded-t-[24px] lg:rounded-b-[36px] inline-flex flex-col lg:flex-col-reverse justify-start items-start gap-2"},[P(y,{modelValue:k(o),"onUpdate:modelValue":w[0]||(w[0]=C=>Pn(o)?o.value=C:null),class:"w-full self-center h-[40px] px-[16px]",options:[{name:"ç®"},{name:"ç¹"}]},null,8,["modelValue"]),P(b,{class:"w-full py-0"},{default:I(()=>[($(!0),B(Ve,null,it(k(s),C=>($(),D(x,{key:C.to,to:C.to,active:C.active,class:"h-[56px]"},{default:I(()=>[nt(X(C.text),1)]),_:2},1032,["to","active"]))),128))]),_:1})],512)],512),[[at,h.modelValue]])])),[[_,g]])}}}),pn=""+globalThis.__publicAssetsURL("logo.svg"),vn=e=>(zn("data-v-79046900"),e=e(),Ln(),e),ko={class:"h-[165px] lg:h-[116px] pb-9 flex flex-col lg:flex-row lg:gap-4"},Oo=vn(()=>S("img",{alt:"laoshi logo",src:pn,class:"w-[152px] h-11"},null,-1)),$o={class:"flex flex-row grow justify-center order-2 lg:order-1"},Co={class:"flex justify-between lg:self-center order-1 lg:order-2 lg:block px-4 lg:px-0"},So=vn(()=>S("img",{alt:"laoshi logo",src:pn,class:"w-[152px] h-11"},null,-1)),To={class:"text-center text-black text-[17px] font-normal font-['Stolzl'] leading-snug"},Eo={class:"w-80 bg-white rounded-xl shadow border border-black border-opacity-10 overflow-hidden inline-flex flex-col justify-start items-start"},jo={class:"grow shrink basis-0 h-16 py-[22px] justify-start items-center gap-2.5 flex"},Do={class:"text-black text-[17px] font-normal font-['Stolzl'] leading-tight"},Bo=Z({__name:"HeaderButtons",setup(e){const{breakpoints:t}=Gt(),n=Ne(),a=T(null),r=T(null),o=T(!1),c=()=>{o.value=!0,r.value&&a.value&&on(r.value,a.value,{placement:"bottom",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,4]}}]}),window==null||window.addEventListener("keydown",i)},s=()=>{o.value=!1,window==null||window.removeEventListener("keydown",i)},i=d=>{d.key==="Escape"&&s()},l=()=>o.value?s():c(),u=T(!1),f=T(!1),m=T(!0),p=d=>{u.value=d,m.value=!d||t.greater("xl").value};fe(()=>t.greaterOrEqual("xl").value,d=>{u.value&&(m.value=d)});const g=T([{href:n.t("hanziClientGrammarLink"),text:n.t("hanziClientGrammarLinkTitle")},{href:n.t("hanziClientTeacherCabinetLink"),text:n.t("hanziClientTeacherCabinetLinkTitle")},{href:n.t("hanziClientChineseNameGeneratorLink"),text:n.t("hanziClientYourNameInChinese")}]);return(d,v)=>{const h=be,w=go,O=_o,y=sa,x=te,b=ot("click-outside");return $(),B("div",ko,[P(h,{to:`/${k(n).locale.value}`,"aria-label":d.$t("hanziClientHome"),class:"hidden lg:block self-center"},{default:I(()=>[Oo]),_:1},8,["to","aria-label"]),S("div",$o,[P(y,null,{default:I(()=>[P(w,{class:"max-w-[610px] grow mt-[4px]",onFocusChange:p}
1),k(m)?($(),D(O,{key:0,class:"self-center pr-3 lg:pr-0","model-value":k(f),"onUpdate:modelValue":v[0]||(v[0]=_=>{f.value=_})},null,8,["model-value"])):W("",!0)]),_:1})]),ce(($(),B("div",Co,[P(h,{to:`/${k(n).locale.value}`,"aria-label":d.$t("hanziClientHome"),class:"lg:hidden self-center"},{default:I(()=>[So]),_:1},8,["to","aria-label"]),S("div",null,[S("div",{ref_key:"btnRef",ref:r,class:"py-[13px] cursor-pointer rounded-xl justify-end items-center gap-2 flex",onClick:l},[S("div",To,X(d.$t("hanziClientOurServices")),1),P(x,{name:"ph:caret-down-light",class:"w-5 h-5 relative"})],512),ce(S("div",{ref_key:"menuRef",ref:a,class:"z-30"},[S("div",Eo,[($(!0),B(Ve,null,it(k(g),(_,C)=>($(),D(h,{key:C,href:_.href,to:_.to,"aria-label":_.text,class:"navigation__list-item"},{default:I(()=>[S("div",jo,[S("div",Do,X(_.text),1)])]),_:2},1032,["href","to","aria-label"]))),128))])],512),[[at,k(o)]])])])),[[b,s]])])}}}),Ho=ye(Bo,[["__scopeId","data-v-79046900"]]);export{ke as H,Qe as V,Nn as _,Yt as a,Xt as b,on as c,te as d,Xn as e,sa as f,Io as g,Ho as h,pe as i,Ro as j,zo as k,Lo as l,fo as m,xo as n,Mn as o,ia as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.