import{V as T,R as q,_ as H,D as A,ag as E,r as R,i as I,j as Q,m as _,n as N,ah as z,ai as F,aj as V,ak as Z,al as G,am as W,an as X,ao as $}from"./entry.3193a679.js";import{m as k}from"./commentapi.c5bf6183.js";const P=globalThis.requestIdleCallback||(e=>{const t=Date.now(),n={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))};return setTimeout(()=>{e(n)},1)}),J=globalThis.cancelIdleCallback||(e=>{clearTimeout(e)}),K=e=>{const t=T();t.isHydrating?t.hooks.hookOnce("app:suspense:resolve",()=>{P(e)}):P(e)};async function j(e,t=q()){const{path:n,matched:r}=t.resolve(e);if(!r.length||(t._routePreloaded||(t._routePreloaded=new Set),t._routePreloaded.has(n)))return;const s=t._preloadPromises=t._preloadPromises||[];if(s.length>4)return Promise.all(s).then(()=>j(e,t));t._routePreloaded.add(n);const i=r.map(l=>{var f;return(f=l.components)==null?void 0:f.default}).filter(l=>typeof l=="function");for(const l of i){const f=Promise.resolve(l()).catch(()=>{}).finally(()=>s.splice(s.indexOf(f)));s.push(f)}await Promise.all(s)}const ee=(...e)=>e.find(t=>t!==void 0),te="noopener noreferrer";/*! @__NO_SIDE_EFFECTS__ */function re(e){const t=e.componentName||"NuxtLink",n=(r,s)=>{if(!r||e.trailingSlash!=="append"&&e.trailingSlash!=="remove")return r;const i=e.trailingSlash==="append"?V:Z;if(typeof r=="string")return i(r,!0);const l="path"in r?r.path:s(r).path;return{...r,name:void 0,path:i(l,!0)}};return H({name:t,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},setup(r,{slots:s}){const i=q(),l=A(()=>{const u=r.to||r.href||"";return n(u,i.resolve)}),f=A(()=>r.external||r.target&&r.target!=="_self"?!0:typeof l.value=="object"?!1:l.value===""||E(l.value,{acceptRelative:!0})),o=R(!1),v=R(null),S=u=>{var m;v.value=r.custom?(m=u==null?void 0:u.$el)==null?void 0:m.nextElementSibling:u==null?void 0:u.$el};if(r.prefetch!==!1&&r.noPrefetch!==!0&&r.target!=="_blank"&&!ne()){const m=T();let g,h=null;I(()=>{const a=ae();K(()=>{g=P(()=>{var c;(c=v==null?void 0:v.value)!=null&&c.tagName&&(h=a.observe(v.value,async()=>{h==null||h(),h=null;const d=typeof l.value=="string"?l.value:i.resolve(l.value).fullPath;await Promise.all([m.hooks.callHook("link:prefetch",d).catch(()=>{}),!f.value&&j(l.value,i).catch(()=>{})]),o.value=!0}))})})}),Q(()=>{g&&J(g),h==null||h(),h=null})}return()=>{var a,c;if(!f.value){const d={ref:S,to:l.value,activeClass:r.activeClass||e.activeClass,exactActiveClass:r.exactActiveClass||e.exactActiveClass,replace:r.replace,ariaCurrentValue:r.ariaCurrentValue,custom:r.custom};return r.custom||(o.value&&(d.class=r.prefetchedClass||e.prefetchedClass),d.rel=r.rel),_(N("RouterLink"),d,s.default)}const u=typeof l.value=="object"?((a=i.resolve(l.value))==null?void 0:a.href)??null:l.value||null,m=r.target||null,g=r.noRel?null:ee(r.rel,e.externalRelAttribute,u?te:"")||null,h=()=>G(u,{replace:r.replace});return r.custom?s.default?s.default({href:u,navigate:h,get route(){if(!u)return;const d=z(u);return{path:d.pathname,fullPath:d.pathname,get query(){return F(d.search)},hash:d.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:u}},rel:g,target:m,isExternal:f.value,isActive:!1,isExactActive:!1}):null:_("a",{ref:v,href:u,rel:g,target:m},(c=s.default)==null?void 0:c.call(s))}}})}const Se=re({componentName:"NuxtLink"});function ae(){const e=T();if(e._observer)return e._observer;let t=null;const n=new Map,r=(i,l)=>(t||(t=new IntersectionObserver(f=>{for(const o of f){const v=n.get(o.target);(o.isIntersecting||o.intersectionRatio>0)&&v&&v()}})),n.set(i,l),t.observe(i),()=>{n.delete(i),t.unobserve(i),n.size===0&&(t.disconnect(),t=null)});return e._observer={observe:r}}function ne(){const e=navigator.connection;return!!(e&&(e.saveData||/2g/.test(e.effectiveType)))}function se(e){return e!==""?e:k.defaultAvatarURL}function ie(){const e=k.navigation;return Array.isArray(e)?e:[]}let b=(()=>{let e=new Map;const t=k.queryParams;if(typeof t=="object")for(let[n,r]of Object.entries(t))e.set(n.toLowerCase(),r);return e})();function oe(e){return typeof e=="string"&&e!=""?b.has(e.toLowerCase()):!1}function le(e){let t={};if(typeof e=="object"){let n=e.name,r=e.query;for(let[s,i]of Object.entries(r))if(s=s.toLowerCase(),oe(s))switch(s){case"sortby":he(n,i)&&(t[s]=i);break;case"sortorder":me(i)&&(t[s]=i);break;case"q":t[s]=i;break;case"resulttype":t[s]=i;break;default:t[s]=Number(i)}}return t}function ue(e){let t={};for(let[n,r]of b.entries())switch(n){case"sortby":if(!M(e))continue;t[n]=r[e][0].name,e==="index"&&(t[n]=r[e][1].name),e==="one-question"&&(t[n]=r[e][2].name);break;case"sortorder":t[n]=r[0].name;break;case"q":e==="search"&&(t[n]=r);break;case"resulttype":e==="search"&&(t[n]=r);break;default:t[n]=Number(r)}return t}function fe(e){let t=le(e);if(typeof e=="object"){let n=e.name;const r=ue(n);for(let[s,i]of Object.entries(r)){if(t[s]===void 0){t[s]=r[s];continue}switch(s){case"page":t[s]<i&&(t[s]=i);break;case"pagesize":t[s]>i&&(t[s]=i);break}}}return t}function ce(){let e=new Set,t=b.get("sortby");for(let n of Object.keys(t))e.add(n);return e}function M(e){if(typeof e=="string"&&e!="")return ce().has(e)}function Y(e){return typeof e=="string"&&e!=""&&M(e)?b.get("sortby")[e]:[]}function de(e){let t=new Set;const n=Y(e);return Array.isArray(n)&&n.forEach(r=>{t.add(r.name)}),t}function he(e,t){return typeof t=="string"&&t!=""?de(e).has(t.toLowerCase()):!1}function B(){return b.get("sortorder")}function ve(){let e=new Set;const t=B();return Array.isArray(t)&&t.forEach(n=>{e.add(n.name)}),e}function me(e){return typeof e=="string"&&e!=""?ve().has(e.toLowerCase()):!1}const $e=Object.freeze(Object.defineProperty({__proto__:null,cleanQueryParamsObjectForRoute:fe,fixAvatarURL:se,getNavigationArray:ie,getSortByArrayByRouteName:Y,getSortOrderArray:B},Symbol.toStringTag,{value:"Module"}));function Ce(e,t,n){e.addOrUpdateQueryByRouteName({routeName:n.name,queryParams:t.cleanQueryParamsObjectForRoute(n)})}var L={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(W,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(i,l,f){var o=l.prototype;f.utc=function(a){var c={date:a,utc:!0,args:arguments};return new l(c)},o.utc=function(a){var c=f(this.toDate(),{locale:this.$L,utc:!0});return a?c.add(this.utcOffset(),n):c},o.local=function(){return f(this.toDate(),{locale:this.$L,utc:!1})};var v=o.parse;o.parse=function(a){a.utc&&(this.$u=!0),this.$utils().u(a.$offset)||(this.$offset=a.$offset),v.call(this,a)};var S=o.init;o.init=function(){if(this.$u){var a=this.$d;this.$y=a.getUTCFullYear(),this.$M=a.getUTCMonth(),this.$D=a.getUTCDate(),this.$W=a.getUTCDay(),this.$H=a.getUTCHours(),this.$m=a.getUTCMinutes(),this.$s=a.getUTCSeconds(),this.$ms=a.getUTCMilliseconds()}else S.call(this)};var u=o.utcOffset;o.utcOffset=function(a,c){var d=this.$utils().u;if(d(a))return this.$u?0:d(this.$offset)?u.call(this):this.$offset;if(typeof a=="string"&&(a=function(C){C===void 0&&(C="");var O=C.match(r);if(!O)return null;var x=(""+O[0]).match(s)||["-",0,0],U=x[0],w=60*+x[1]+ +x[2];return w===0?0:U==="+"?w:-w}(a),a===null))return this;var p=Math.abs(a)<=16?60*a:a,y=this;if(c)return y.$offset=p,y.$u=a===0,y;if(a!==0){var D=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(y=this.local().add(p+D,n)).$offset=p,y.$x.$localOffset=D}else y=this.utc();return y};var m=o.format;o.format=function(a){var c=a||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return m.call(this,c)},o.valueOf=function(){var a=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*a},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var g=o.toDate;o.toDate=function(a){return a==="s"&&this.$offset?f(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var h=o.diff;o.diff=function(a,c,d){if(a&&this.$u===a.$u)return h.call(this,a,c,d);var p=this.local(),y=f(a).local();return h.call(p,y,c,d)}}})})(L);var ye=L.exports;const ge=X(ye);function xe(e){if(Number.isInteger(e))return $.unix(e).format("YYYY-MM-DD HH:mm:ss");if(typeof e=="string"&&e!==""&&e.includes("T")&&e.includes("Z"))return $.extend(ge),$.utc(e).format("YYYY-MM-DD HH:mm:ss");if(typeof e=="string"&&e!==""&&e.includes("T")&&!e.includes("+"))return e+="+08:00",$(e).format("YYYY-MM-DD HH:mm:ss")}export{Se as _,se as a,B as b,Ce as c,xe as f,Y as g,$e as p};
