@blogmcp/community 0.1.0 → 0.3.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.
- package/README.md +162 -13
- package/dist/blogmcp-community.global.js +8 -8
- package/dist/chunks/mount--2_V2q3M.js +10063 -0
- package/dist/core/attrs.d.ts +42 -1
- package/dist/core/badge.d.ts +30 -0
- package/dist/core/centre.d.ts +28 -0
- package/dist/core/digest-token.d.ts +2 -0
- package/dist/core/discussion.d.ts +120 -15
- package/dist/core/follow.d.ts +26 -0
- package/dist/core/format.d.ts +7 -0
- package/dist/core/forum-category.d.ts +85 -0
- package/dist/core/forum-search.d.ts +35 -0
- package/dist/core/forum-state.d.ts +30 -0
- package/dist/core/forum-words.d.ts +8 -0
- package/dist/core/forum.d.ts +21 -0
- package/dist/core/moderation.d.ts +80 -0
- package/dist/core/onboarding.d.ts +49 -2
- package/dist/core/outcomes.d.ts +2 -1
- package/dist/core/panel.d.ts +17 -1
- package/dist/core/profile.d.ts +45 -0
- package/dist/core/push.d.ts +63 -0
- package/dist/core/realtime.d.ts +46 -0
- package/dist/core/settings.d.ts +53 -0
- package/dist/core/text.d.ts +13 -0
- package/dist/core/topic.d.ts +47 -0
- package/dist/element.d.ts +47 -1
- package/dist/global.d.ts +8 -4
- package/dist/index.d.ts +20 -3
- package/dist/index.js +62 -12
- package/dist/mount.d.ts +89 -0
- package/dist/react.d.ts +27 -3
- package/dist/react.js +48 -4
- package/dist/ui/BadgeView.vue.d.ts +13 -0
- package/dist/ui/DiscussionView.vue.d.ts +11 -0
- package/dist/ui/FollowButtonView.vue.d.ts +17 -0
- package/dist/ui/FollowToggle.vue.d.ts +6 -0
- package/dist/ui/ForumCategoryView.vue.d.ts +13 -0
- package/dist/ui/ForumModerationView.vue.d.ts +12 -0
- package/dist/ui/ForumNotices.vue.d.ts +7 -0
- package/dist/ui/ForumSearchView.vue.d.ts +11 -0
- package/dist/ui/ForumView.vue.d.ts +12 -0
- package/dist/ui/LinkedText.vue.d.ts +1 -0
- package/dist/ui/MemberSettingsView.vue.d.ts +13 -0
- package/dist/ui/MembersOnly.vue.d.ts +15 -0
- package/dist/ui/MessageComposer.vue.d.ts +8 -2
- package/dist/ui/MessageMenu.vue.d.ts +2 -0
- package/dist/ui/ModeratorDialog.vue.d.ts +11 -0
- package/dist/ui/NotificationCentreView.vue.d.ts +12 -0
- package/dist/ui/OnboardingSteps.vue.d.ts +1 -1
- package/dist/ui/ProfileView.vue.d.ts +13 -0
- package/dist/ui/TopicRow.vue.d.ts +10 -0
- package/dist/ui/TopicView.vue.d.ts +32 -0
- package/dist/ui/WelcomeView.vue.d.ts +12 -0
- package/dist/ui/context.d.ts +7 -1
- package/dist/ui/discussion-context.d.ts +11 -3
- package/dist/vue.d.ts +273 -3
- package/dist/vue.js +235 -5
- package/package.json +3 -3
- package/src/core/attrs.ts +61 -2
- package/src/core/badge.ts +120 -0
- package/src/core/centre.ts +136 -0
- package/src/core/digest-token.ts +26 -0
- package/src/core/discussion.ts +497 -46
- package/src/core/follow.ts +139 -0
- package/src/core/format.ts +22 -0
- package/src/core/forum-category.ts +323 -0
- package/src/core/forum-search.ts +153 -0
- package/src/core/forum-state.ts +59 -0
- package/src/core/forum-words.ts +38 -0
- package/src/core/forum.ts +83 -0
- package/src/core/moderation.ts +414 -0
- package/src/core/onboarding.ts +177 -18
- package/src/core/outcomes.ts +23 -1
- package/src/core/panel.ts +39 -4
- package/src/core/profile.ts +155 -0
- package/src/core/push.ts +174 -0
- package/src/core/realtime.ts +52 -0
- package/src/core/settings.ts +363 -0
- package/src/core/text.ts +32 -0
- package/src/core/topic.ts +234 -0
- package/src/element.ts +124 -6
- package/src/global.ts +40 -4
- package/src/index.ts +84 -2
- package/src/mount.ts +250 -1
- package/src/react.ts +90 -3
- package/src/ui/BadgeView.vue +51 -0
- package/src/ui/DiscussionView.vue +43 -3
- package/src/ui/FollowButtonView.vue +85 -0
- package/src/ui/FollowToggle.vue +39 -0
- package/src/ui/ForumCategoryView.vue +243 -0
- package/src/ui/ForumModerationView.vue +309 -0
- package/src/ui/ForumNotices.vue +23 -0
- package/src/ui/ForumSearchView.vue +171 -0
- package/src/ui/ForumView.vue +128 -0
- package/src/ui/LinkedText.vue +11 -5
- package/src/ui/MemberSettingsView.vue +175 -0
- package/src/ui/MembersOnly.vue +59 -0
- package/src/ui/MessageComposer.vue +64 -11
- package/src/ui/MessageItem.vue +36 -7
- package/src/ui/MessageMenu.vue +3 -2
- package/src/ui/ModeratorDialog.vue +102 -0
- package/src/ui/MyCommunityView.vue +12 -0
- package/src/ui/NoticeStatusView.vue +15 -2
- package/src/ui/NotificationCentreView.vue +193 -0
- package/src/ui/OnboardingSteps.vue +17 -6
- package/src/ui/ProfileView.vue +102 -0
- package/src/ui/TopicRow.vue +70 -0
- package/src/ui/TopicView.vue +395 -0
- package/src/ui/WelcomeView.vue +72 -0
- package/src/ui/context.ts +8 -3
- package/src/ui/discussion-context.ts +11 -3
- package/src/ui/styles.css +30 -0
- package/src/vue.ts +271 -3
- package/dist/chunks/mount-DzjwnHyx.js +0 -4597
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var BlogmcpCommunity=(function(zt){"use strict";function As(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const be={},Yt=[],Lt=()=>{},Fo=()=>!1,Fn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ts=e=>e.startsWith("onUpdate:"),je=Object.assign,qo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Oa=Object.prototype.hasOwnProperty,fe=(e,t)=>Oa.call(e,t),se=Array.isArray,Gt=e=>bn(e)==="[object Map]",Zt=e=>bn(e)==="[object Set]",Ho=e=>bn(e)==="[object Date]",ue=e=>typeof e=="function",xe=e=>typeof e=="string",Ge=e=>typeof e=="symbol",ye=e=>e!==null&&typeof e=="object",Vo=e=>(ye(e)||ue(e))&&ue(e.then)&&ue(e.catch),Bo=Object.prototype.toString,bn=e=>Bo.call(e),Ea=e=>bn(e).slice(8,-1),qn=e=>bn(e)==="[object Object]",$s=e=>xe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,gn=As(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Hn=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Ma=/-\w/g,Oe=Hn(e=>e.replace(Ma,t=>t.slice(1).toUpperCase())),Na=/\B([A-Z])/g,qe=Hn(e=>e.replace(Na,"-$1").toLowerCase()),Vn=Hn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Os=Hn(e=>e?`on${Vn(e)}`:""),Tt=(e,t)=>!Object.is(e,t),Bn=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Ko=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},Kn=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Wo=e=>{const t=xe(e)?Number(e):NaN;return isNaN(t)?e:t};let Yo;const Wn=()=>Yo||(Yo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Yn(e){if(se(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],s=xe(o)?za(o):Yn(o);if(s)for(const i in s)t[i]=s[i]}return t}else if(xe(e)||ye(e))return e}const Pa=/;(?![^(]*\))/g,Ra=/:([^]+)/,ja=/\/\*[^]*?\*\//g;function za(e){const t={};return e.replace(ja,"").split(Pa).forEach(n=>{if(n){const o=n.split(Ra);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function nt(e){let t="";if(xe(e))t=e;else if(se(e))for(let n=0;n<e.length;n++){const o=nt(e[n]);o&&(t+=o+" ")}else if(ye(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const La=As("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Go(e){return!!e||e===""}function Da(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=Dt(e[o],t[o]);return n}function Dt(e,t){if(e===t)return!0;let n=Ho(e),o=Ho(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=Ge(e),o=Ge(t),n||o)return e===t;if(n=se(e),o=se(t),n||o)return n&&o?Da(e,t):!1;if(n=ye(e),o=ye(t),n||o){if(!n||!o)return!1;const s=Object.keys(e).length,i=Object.keys(t).length;if(s!==i)return!1;for(const a in e){const l=e.hasOwnProperty(a),c=t.hasOwnProperty(a);if(l&&!c||!l&&c||!Dt(e[a],t[a]))return!1}}return String(e)===String(t)}function Es(e,t){return e.findIndex(n=>Dt(n,t))}const Zo=e=>!!(e&&e.__v_isRef===!0),p=e=>xe(e)?e:e==null?"":se(e)||ye(e)&&(e.toString===Bo||!ue(e.toString))?Zo(e)?p(e.value):JSON.stringify(e,Jo,2):String(e),Jo=(e,t)=>Zo(t)?Jo(e,t.value):Gt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,s],i)=>(n[Ms(o,i)+" =>"]=s,n),{})}:Zt(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ms(n))}:Ge(t)?Ms(t):ye(t)&&!se(t)&&!qn(t)?String(t):t,Ms=(e,t="")=>{var n;return Ge(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let ze;class Ua{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ze,!t&&ze&&(this.index=(ze.scopes||(ze.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=ze;try{return ze=this,t()}finally{ze=n}}}on(){++this._on===1&&(this.prevScope=ze,ze=this)}off(){this._on>0&&--this._on===0&&(ze=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(this.effects.length=0,n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Fa(){return ze}let me;const Ns=new WeakSet;class Xo{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ze&&ze.active&&ze.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ns.has(this)&&(Ns.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ei(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ii(this),ti(this);const t=me,n=Ze;me=this,Ze=!0;try{return this.fn()}finally{ni(this),me=t,Ze=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)zs(t);this.deps=this.depsTail=void 0,ii(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ns.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){js(this)&&this.run()}get dirty(){return js(this)}}let Qo=0,yn,vn;function ei(e,t=!1){if(e.flags|=8,t){e.next=vn,vn=e;return}e.next=yn,yn=e}function Ps(){Qo++}function Rs(){if(--Qo>0)return;if(vn){let t=vn;for(vn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;yn;){let t=yn;for(yn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function ti(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ni(e){let t,n=e.depsTail,o=n;for(;o;){const s=o.prevDep;o.version===-1?(o===n&&(n=s),zs(o),qa(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=s}e.deps=t,e.depsTail=n}function js(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(si(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function si(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===_n)||(e.globalVersion=_n,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!js(e))))return;e.flags|=2;const t=e.dep,n=me,o=Ze;me=e,Ze=!0;try{ti(e);const s=e.fn(e._value);(t.version===0||Tt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{me=n,Ze=o,ni(e),e.flags&=-3}}function zs(e,t=!1){const{dep:n,prevSub:o,nextSub:s}=e;if(o&&(o.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)zs(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function qa(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ze=!0;const oi=[];function pt(){oi.push(Ze),Ze=!1}function mt(){const e=oi.pop();Ze=e===void 0?!0:e}function ii(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=me;me=void 0;try{t()}finally{me=n}}}let _n=0;class Ha{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ls{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!me||!Ze||me===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==me)n=this.activeLink=new Ha(me,this),me.deps?(n.prevDep=me.depsTail,me.depsTail.nextDep=n,me.depsTail=n):me.deps=me.depsTail=n,ri(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=me.depsTail,n.nextDep=void 0,me.depsTail.nextDep=n,me.depsTail=n,me.deps===n&&(me.deps=o)}return n}trigger(t){this.version++,_n++,this.notify(t)}notify(t){Ps();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Rs()}}}function ri(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)ri(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ds=new WeakMap,Ut=Symbol(""),Us=Symbol(""),kn=Symbol("");function Ae(e,t,n){if(Ze&&me){let o=Ds.get(e);o||Ds.set(e,o=new Map);let s=o.get(n);s||(o.set(n,s=new Ls),s.map=o,s.key=n),s.track()}}function ht(e,t,n,o,s,i){const a=Ds.get(e);if(!a){_n++;return}const l=c=>{c&&c.trigger()};if(Ps(),t==="clear")a.forEach(l);else{const c=se(e),m=c&&$s(n);if(c&&n==="length"){const u=Number(o);a.forEach((_,T)=>{(T==="length"||T===kn||!Ge(T)&&T>=u)&&l(_)})}else switch((n!==void 0||a.has(void 0))&&l(a.get(n)),m&&l(a.get(kn)),t){case"add":c?m&&l(a.get("length")):(l(a.get(Ut)),Gt(e)&&l(a.get(Us)));break;case"delete":c||(l(a.get(Ut)),Gt(e)&&l(a.get(Us)));break;case"set":Gt(e)&&l(a.get(Ut));break}}Rs()}function Jt(e){const t=re(e);return t===e?t:(Ae(t,"iterate",kn),Ke(e)?t:t.map(Je))}function Gn(e){return Ae(e=re(e),"iterate",kn),e}function $t(e,t){return yt(e)?Ft(e)?Xt(Je(t)):Xt(t):Je(t)}const Va={__proto__:null,[Symbol.iterator](){return Fs(this,Symbol.iterator,e=>$t(this,e))},concat(...e){return Jt(this).concat(...e.map(t=>se(t)?Jt(t):t))},entries(){return Fs(this,"entries",e=>(e[1]=$t(this,e[1]),e))},every(e,t){return bt(this,"every",e,t,void 0,arguments)},filter(e,t){return bt(this,"filter",e,t,n=>n.map(o=>$t(this,o)),arguments)},find(e,t){return bt(this,"find",e,t,n=>$t(this,n),arguments)},findIndex(e,t){return bt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return bt(this,"findLast",e,t,n=>$t(this,n),arguments)},findLastIndex(e,t){return bt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return bt(this,"forEach",e,t,void 0,arguments)},includes(...e){return qs(this,"includes",e)},indexOf(...e){return qs(this,"indexOf",e)},join(e){return Jt(this).join(e)},lastIndexOf(...e){return qs(this,"lastIndexOf",e)},map(e,t){return bt(this,"map",e,t,void 0,arguments)},pop(){return wn(this,"pop")},push(...e){return wn(this,"push",e)},reduce(e,...t){return ai(this,"reduce",e,t)},reduceRight(e,...t){return ai(this,"reduceRight",e,t)},shift(){return wn(this,"shift")},some(e,t){return bt(this,"some",e,t,void 0,arguments)},splice(...e){return wn(this,"splice",e)},toReversed(){return Jt(this).toReversed()},toSorted(e){return Jt(this).toSorted(e)},toSpliced(...e){return Jt(this).toSpliced(...e)},unshift(...e){return wn(this,"unshift",e)},values(){return Fs(this,"values",e=>$t(this,e))}};function Fs(e,t,n){const o=Gn(e),s=o[t]();return o!==e&&!Ke(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const Ba=Array.prototype;function bt(e,t,n,o,s,i){const a=Gn(e),l=a!==e&&!Ke(e),c=a[t];if(c!==Ba[t]){const _=c.apply(e,i);return l?Je(_):_}let m=n;a!==e&&(l?m=function(_,T){return n.call(this,$t(e,_),T,e)}:n.length>2&&(m=function(_,T){return n.call(this,_,T,e)}));const u=c.call(a,m,o);return l&&s?s(u):u}function ai(e,t,n,o){const s=Gn(e);let i=n;return s!==e&&(Ke(e)?n.length>3&&(i=function(a,l,c){return n.call(this,a,l,c,e)}):i=function(a,l,c){return n.call(this,a,$t(e,l),c,e)}),s[t](i,...o)}function qs(e,t,n){const o=re(e);Ae(o,"iterate",kn);const s=o[t](...n);return(s===-1||s===!1)&&Bs(n[0])?(n[0]=re(n[0]),o[t](...n)):s}function wn(e,t,n=[]){pt(),Ps();const o=re(e)[t].apply(e,n);return Rs(),mt(),o}const Ka=As("__proto__,__v_isRef,__isVue"),li=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ge));function Wa(e){Ge(e)||(e=String(e));const t=re(this);return Ae(t,"has",e),t.hasOwnProperty(e)}class ci{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(s?i?hi:mi:i?pi:fi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const a=se(t);if(!s){let c;if(a&&(c=Va[n]))return c;if(n==="hasOwnProperty")return Wa}const l=Reflect.get(t,n,Te(t)?t:o);if((Ge(n)?li.has(n):Ka(n))||(s||Ae(t,"get",n),i))return l;if(Te(l)){const c=a&&$s(n)?l:l.value;return s&&ye(c)?Vs(c):c}return ye(l)?s?Vs(l):gt(l):l}}class ui extends ci{constructor(t=!1){super(!1,t)}set(t,n,o,s){let i=t[n];const a=se(t)&&$s(n);if(!this._isShallow){const m=yt(i);if(!Ke(o)&&!yt(o)&&(i=re(i),o=re(o)),!a&&Te(i)&&!Te(o))return m||(i.value=o),!0}const l=a?Number(n)<t.length:fe(t,n),c=Reflect.set(t,n,o,Te(t)?t:s);return t===re(s)&&(l?Tt(o,i)&&ht(t,"set",n,o):ht(t,"add",n,o)),c}deleteProperty(t,n){const o=fe(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&o&&ht(t,"delete",n,void 0),s}has(t,n){const o=Reflect.has(t,n);return(!Ge(n)||!li.has(n))&&Ae(t,"has",n),o}ownKeys(t){return Ae(t,"iterate",se(t)?"length":Ut),Reflect.ownKeys(t)}}class di extends ci{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Ya=new ui,Ga=new di,Za=new ui(!0),Ja=new di(!0),Hs=e=>e,Zn=e=>Reflect.getPrototypeOf(e);function Xa(e,t,n){return function(...o){const s=this.__v_raw,i=re(s),a=Gt(i),l=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,m=s[e](...o),u=n?Hs:t?Xt:Je;return!t&&Ae(i,"iterate",c?Us:Ut),{next(){const{value:_,done:T}=m.next();return T?{value:_,done:T}:{value:l?[u(_[0]),u(_[1])]:u(_),done:T}},[Symbol.iterator](){return this}}}}function Jn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Qa(e,t){const n={get(s){const i=this.__v_raw,a=re(i),l=re(s);e||(Tt(s,l)&&Ae(a,"get",s),Ae(a,"get",l));const{has:c}=Zn(a),m=t?Hs:e?Xt:Je;if(c.call(a,s))return m(i.get(s));if(c.call(a,l))return m(i.get(l));i!==a&&i.get(s)},get size(){const s=this.__v_raw;return!e&&Ae(re(s),"iterate",Ut),s.size},has(s){const i=this.__v_raw,a=re(i),l=re(s);return e||(Tt(s,l)&&Ae(a,"has",s),Ae(a,"has",l)),s===l?i.has(s):i.has(s)||i.has(l)},forEach(s,i){const a=this,l=a.__v_raw,c=re(l),m=t?Hs:e?Xt:Je;return!e&&Ae(c,"iterate",Ut),l.forEach((u,_)=>s.call(i,m(u),m(_),a))}};return je(n,e?{add:Jn("add"),set:Jn("set"),delete:Jn("delete"),clear:Jn("clear")}:{add(s){!t&&!Ke(s)&&!yt(s)&&(s=re(s));const i=re(this);return Zn(i).has.call(i,s)||(i.add(s),ht(i,"add",s,s)),this},set(s,i){!t&&!Ke(i)&&!yt(i)&&(i=re(i));const a=re(this),{has:l,get:c}=Zn(a);let m=l.call(a,s);m||(s=re(s),m=l.call(a,s));const u=c.call(a,s);return a.set(s,i),m?Tt(i,u)&&ht(a,"set",s,i):ht(a,"add",s,i),this},delete(s){const i=re(this),{has:a,get:l}=Zn(i);let c=a.call(i,s);c||(s=re(s),c=a.call(i,s)),l&&l.call(i,s);const m=i.delete(s);return c&&ht(i,"delete",s,void 0),m},clear(){const s=re(this),i=s.size!==0,a=s.clear();return i&&ht(s,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Xa(s,e,t)}),n}function Xn(e,t){const n=Qa(e,t);return(o,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?o:Reflect.get(fe(n,s)&&s in o?n:o,s,i)}const el={get:Xn(!1,!1)},tl={get:Xn(!1,!0)},nl={get:Xn(!0,!1)},sl={get:Xn(!0,!0)},fi=new WeakMap,pi=new WeakMap,mi=new WeakMap,hi=new WeakMap;function ol(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function il(e){return e.__v_skip||!Object.isExtensible(e)?0:ol(Ea(e))}function gt(e){return yt(e)?e:Qn(e,!1,Ya,el,fi)}function rl(e){return Qn(e,!1,Za,tl,pi)}function Vs(e){return Qn(e,!0,Ga,nl,mi)}function Ty(e){return Qn(e,!0,Ja,sl,hi)}function Qn(e,t,n,o,s){if(!ye(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=il(e);if(i===0)return e;const a=s.get(e);if(a)return a;const l=new Proxy(e,i===2?o:n);return s.set(e,l),l}function Ft(e){return yt(e)?Ft(e.__v_raw):!!(e&&e.__v_isReactive)}function yt(e){return!!(e&&e.__v_isReadonly)}function Ke(e){return!!(e&&e.__v_isShallow)}function Bs(e){return e?!!e.__v_raw:!1}function re(e){const t=e&&e.__v_raw;return t?re(t):e}function al(e){return!fe(e,"__v_skip")&&Object.isExtensible(e)&&Ko(e,"__v_skip",!0),e}const Je=e=>ye(e)?gt(e):e,Xt=e=>ye(e)?Vs(e):e;function Te(e){return e?e.__v_isRef===!0:!1}function ve(e){return bi(e,!1)}function Ks(e){return bi(e,!0)}function bi(e,t){return Te(e)?e:new ll(e,t)}class ll{constructor(t,n){this.dep=new Ls,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:re(t),this._value=n?t:Je(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||Ke(t)||yt(t);t=o?t:re(t),Tt(t,n)&&(this._rawValue=t,this._value=o?t:Je(t),this.dep.trigger())}}function r(e){return Te(e)?e.value:e}const cl={get:(e,t,n)=>t==="__v_raw"?e:r(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const s=e[t];return Te(s)&&!Te(n)?(s.value=n,!0):Reflect.set(e,t,n,o)}};function gi(e){return Ft(e)?e:new Proxy(e,cl)}class ul{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ls(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=_n-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&me!==this)return ei(this,!0),!0}get value(){const t=this.dep.track();return si(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function dl(e,t,n=!1){let o,s;return ue(e)?o=e:(o=e.get,s=e.set),new ul(o,s,n)}const es={},ts=new WeakMap;let qt;function fl(e,t=!1,n=qt){if(n){let o=ts.get(n);o||ts.set(n,o=[]),o.push(e)}}function pl(e,t,n=be){const{immediate:o,deep:s,once:i,scheduler:a,augmentJob:l,call:c}=n,m=b=>s?b:Ke(b)||s===!1||s===0?vt(b,1):vt(b);let u,_,T,S,A=!1,v=!1;if(Te(e)?(_=()=>e.value,A=Ke(e)):Ft(e)?(_=()=>m(e),A=!0):se(e)?(v=!0,A=e.some(b=>Ft(b)||Ke(b)),_=()=>e.map(b=>{if(Te(b))return b.value;if(Ft(b))return m(b);if(ue(b))return c?c(b,2):b()})):ue(e)?t?_=c?()=>c(e,2):e:_=()=>{if(T){pt();try{T()}finally{mt()}}const b=qt;qt=u;try{return c?c(e,3,[S]):e(S)}finally{qt=b}}:_=Lt,t&&s){const b=_,I=s===!0?1/0:s;_=()=>vt(b(),I)}const w=Fa(),C=()=>{u.stop(),w&&w.active&&qo(w.effects,u)};if(i&&t){const b=t;t=(...I)=>{b(...I),C()}}let E=v?new Array(e.length).fill(es):es;const j=b=>{if(!(!(u.flags&1)||!u.dirty&&!b))if(t){const I=u.run();if(s||A||(v?I.some((q,G)=>Tt(q,E[G])):Tt(I,E))){T&&T();const q=qt;qt=u;try{const G=[I,E===es?void 0:v&&E[0]===es?[]:E,S];E=I,c?c(t,3,G):t(...G)}finally{qt=q}}}else u.run()};return l&&l(j),u=new Xo(_),u.scheduler=a?()=>a(j,!1):j,S=b=>fl(b,!1,u),T=u.onStop=()=>{const b=ts.get(u);if(b){if(c)c(b,4);else for(const I of b)I();ts.delete(u)}},t?o?j(!0):E=u.run():a?a(j.bind(null,!0),!0):u.run(),C.pause=u.pause.bind(u),C.resume=u.resume.bind(u),C.stop=C,C}function vt(e,t=1/0,n){if(t<=0||!ye(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Te(e))vt(e.value,t,n);else if(se(e))for(let o=0;o<e.length;o++)vt(e[o],t,n);else if(Zt(e)||Gt(e))e.forEach(o=>{vt(o,t,n)});else if(qn(e)){for(const o in e)vt(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&vt(e[o],t,n)}return e}const xn=[];let Ws=!1;function $y(e,...t){if(Ws)return;Ws=!0,pt();const n=xn.length?xn[xn.length-1].component:null,o=n&&n.appContext.config.warnHandler,s=ml();if(o)Qt(o,n,11,[e+t.map(i=>{var a,l;return(l=(a=i.toString)==null?void 0:a.call(i))!=null?l:JSON.stringify(i)}).join(""),n&&n.proxy,s.map(({vnode:i})=>`at <${er(n,i.type)}>`).join(`
|
|
2
|
-
`),
|
|
3
|
-
`,...
|
|
4
|
-
`],...bl(n))}),t}function bl({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,s=` at <${er(e.component,e.type,o)}`,i=">"+n;return e.props?[s,...gl(e.props),i]:[s+i]}function gl(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...yi(o,e[o]))}),n.length>3&&t.push(" ..."),t}function yi(e,t,n){return xe(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Te(t)?(t=yi(e,re(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):ue(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=re(t),n?t:[`${e}=`,t])}function Qt(e,t,n,o){try{return o?e(...o):e()}catch(s){ns(s,t,n)}}function _t(e,t,n,o){if(ue(e)){const s=Qt(e,t,n,o);return s&&Vo(s)&&s.catch(i=>{ns(i,t,n)}),s}if(se(e)){const s=[];for(let i=0;i<e.length;i++)s.push(_t(e[i],t,n,o));return s}}function ns(e,t,n,o=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||be;if(t){let l=t.parent;const c=t.proxy,m=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const u=l.ec;if(u){for(let _=0;_<u.length;_++)if(u[_](e,c,m)===!1)return}l=l.parent}if(i){pt(),Qt(i,null,10,[e,c,m]),mt();return}}yl(e,n,s,o,a)}function yl(e,t,n,o=!0,s=!1){if(s)throw e;console.error(e)}const Ee=[];let st=-1;const en=[];let Ot=null,tn=0;const vi=Promise.resolve();let ss=null;function We(e){const t=ss||vi;return e?t.then(this?e.bind(this):e):t}function vl(e){let t=st+1,n=Ee.length;for(;t<n;){const o=t+n>>>1,s=Ee[o],i=Sn(s);i<e||i===e&&s.flags&2?t=o+1:n=o}return t}function Ys(e){if(!(e.flags&1)){const t=Sn(e),n=Ee[Ee.length-1];!n||!(e.flags&2)&&t>=Sn(n)?Ee.push(e):Ee.splice(vl(t),0,e),e.flags|=1,_i()}}function _i(){ss||(ss=vi.then(xi))}function _l(e){se(e)?en.push(...e):Ot&&e.id===-1?Ot.splice(tn+1,0,e):e.flags&1||(en.push(e),e.flags|=1),_i()}function ki(e,t,n=st+1){for(;n<Ee.length;n++){const o=Ee[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;Ee.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function wi(e){if(en.length){const t=[...new Set(en)].sort((n,o)=>Sn(n)-Sn(o));if(en.length=0,Ot){Ot.push(...t);return}for(Ot=t,tn=0;tn<Ot.length;tn++){const n=Ot[tn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Ot=null,tn=0}}const Sn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function xi(e){try{for(st=0;st<Ee.length;st++){const t=Ee[st];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Qt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;st<Ee.length;st++){const t=Ee[st];t&&(t.flags&=-2)}st=-1,Ee.length=0,wi(),ss=null,(Ee.length||en.length)&&xi()}}let Ce=null,Si=null;function os(e){const t=Ce;return Ce=e,Si=e&&e.type.__scopeId||null,t}function kl(e,t=Ce,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&Bi(-1);const i=os(t);let a;try{a=e(...s)}finally{os(i),o._d&&Bi(1)}return a};return o._n=!0,o._c=!0,o._d=!0,o}function _e(e,t){if(Ce===null)return e;const n=us(Ce),o=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,a,l,c=be]=t[s];i&&(ue(i)&&(i={mounted:i,updated:i}),i.deep&&vt(a),o.push({dir:i,instance:n,value:a,oldValue:void 0,arg:l,modifiers:c}))}return e}function Ht(e,t,n,o){const s=e.dirs,i=t&&t.dirs;for(let a=0;a<s.length;a++){const l=s[a];i&&(l.oldValue=i[a].value);let c=l.dir[o];c&&(pt(),_t(c,n,8,[e.el,l,e,t]),mt())}}const wl=Symbol("_vte"),xl=e=>e.__isTeleport,Sl=Symbol("_leaveCb");function Gs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Gs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Me(e,t){return ue(e)?je({name:e.name},t,{setup:e}):e}function Il(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const is=new WeakMap;function In(e,t,n,o,s=!1){if(se(e)){e.forEach((A,v)=>In(A,t&&(se(t)?t[v]:t),n,o,s));return}if(nn(o)&&!s){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&In(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?us(o.component):o.el,a=s?null:i,{i:l,r:c}=e,m=t&&t.r,u=l.refs===be?l.refs={}:l.refs,_=l.setupState,T=re(_),S=_===be?Fo:A=>fe(T,A);if(m!=null&&m!==c){if(Ii(t),xe(m))u[m]=null,S(m)&&(_[m]=null);else if(Te(m)){m.value=null;const A=t;A.k&&(u[A.k]=null)}}if(ue(c))Qt(c,l,12,[a,u]);else{const A=xe(c),v=Te(c);if(A||v){const w=()=>{if(e.f){const C=A?S(c)?_[c]:u[c]:c.value;if(s)se(C)&&qo(C,i);else if(se(C))C.includes(i)||C.push(i);else if(A)u[c]=[i],S(c)&&(_[c]=u[c]);else{const E=[i];c.value=E,e.k&&(u[e.k]=E)}}else A?(u[c]=a,S(c)&&(_[c]=a)):v&&(c.value=a,e.k&&(u[e.k]=a))};if(a){const C=()=>{w(),is.delete(e)};C.id=-1,is.set(e,C),He(C,n)}else Ii(e),w()}}}function Ii(e){const t=is.get(e);t&&(t.flags|=8,is.delete(e))}Wn().requestIdleCallback,Wn().cancelIdleCallback;const nn=e=>!!e.type.__asyncLoader,Cl=e=>e.type.__isKeepAlive;function Al(e,t,n=Le,o=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...a)=>{pt();const l=ao(n),c=_t(t,n,e,a);return l(),mt(),c});return o?s.unshift(i):s.push(i),i}}const Ci=e=>(t,n=Le)=>{(!En||e==="sp")&&Al(e,(...o)=>t(...o),n)},Cn=Ci("m"),sn=Ci("bum"),Tl="components";function $l(e,t){return El(Tl,e,!0,t)||e}const Ol=Symbol.for("v-ndc");function El(e,t,n=!0,o=!1){const s=Ce||Le;if(s){const i=s.type;{const l=Qi(i,!1);if(l&&(l===t||l===Oe(t)||l===Vn(Oe(t))))return i}const a=Ai(s[e]||i[e],t)||Ai(s.appContext[e],t);return!a&&o?i:a}}function Ai(e,t){return e&&(e[t]||e[Oe(t)]||e[Vn(Oe(t))])}function ke(e,t,n,o){let s;const i=n,a=se(e);if(a||xe(e)){const l=a&&Ft(e);let c=!1,m=!1;l&&(c=!Ke(e),m=yt(e),e=Gn(e)),s=new Array(e.length);for(let u=0,_=e.length;u<_;u++)s[u]=t(c?m?Xt(Je(e[u])):Je(e[u]):e[u],u,void 0,i)}else if(typeof e=="number"){s=new Array(e);for(let l=0;l<e;l++)s[l]=t(l+1,l,void 0,i)}else if(ye(e))if(e[Symbol.iterator])s=Array.from(e,(l,c)=>t(l,c,void 0,i));else{const l=Object.keys(e);s=new Array(l.length);for(let c=0,m=l.length;c<m;c++){const u=l[c];s[c]=t(e[u],u,c,i)}}else s=[];return s}function Ml(e,t,n={},o,s){if(Ce.ce||Ce.parent&&nn(Ce.parent)&&Ce.parent.ce){const m=Object.keys(n).length>0;return n.name=t,h(),Ne(K,null,[Ie("slot",n,o)],m?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),h();const a=i&&Ti(i(n)),l=n.key||a&&a.key,c=Ne(K,{key:(l&&!Ge(l)?l:`_${t}`)+(!a&&o?"_fb":"")},a||[],a&&e._===1?64:-2);return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),i&&i._c&&(i._d=!0),c}function Ti(e){return e.some(t=>oo(t)?!(t.type===kt||t.type===K&&!Ti(t.children)):!0)?e:null}const Zs=e=>e?Zi(e)?us(e):Zs(e.parent):null,An=je(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Zs(e.parent),$root:e=>Zs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>{Ys(e.update)}),$nextTick:e=>e.n||(e.n=We.bind(e.proxy)),$watch:e=>Lt}),Js=(e,t)=>e!==be&&!e.__isScriptSetup&&fe(e,t),Nl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:s,props:i,accessCache:a,type:l,appContext:c}=e;if(t[0]!=="$"){const T=a[t];if(T!==void 0)switch(T){case 1:return o[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(Js(o,t))return a[t]=1,o[t];if(fe(i,t))return a[t]=3,i[t];if(n!==be&&fe(n,t))return a[t]=4,n[t];a[t]=0}}const m=An[t];let u,_;if(m)return t==="$attrs"&&Ae(e.attrs,"get",""),m(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==be&&fe(n,t))return a[t]=4,n[t];if(_=c.config.globalProperties,fe(_,t))return _[t]},set({_:e},t,n){const{data:o,setupState:s,ctx:i}=e;return Js(s,t)?(s[t]=n,!0):fe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:s,props:i,type:a}},l){let c;return!!(n[l]||Js(t,l)||fe(i,l)||fe(o,l)||fe(An,l)||fe(s.config.globalProperties,l)||(c=a.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:fe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function $i(){return{app:null,config:{isNativeTag:Fo,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Pl=0;function Rl(e,t){return function(o,s=null){ue(o)||(o=je({},o)),s!=null&&!ye(s)&&(s=null);const i=$i(),a=new WeakSet,l=[];let c=!1;const m=i.app={_uid:Pl++,_component:o,_props:s,_container:null,_context:i,_instance:null,version:gc,get config(){return i.config},set config(u){},use(u,..._){return a.has(u)||(u&&ue(u.install)?(a.add(u),u.install(m,..._)):ue(u)&&(a.add(u),u(m,..._))),m},mixin(u){return m},component(u,_){return _?(i.components[u]=_,m):i.components[u]},directive(u,_){return _?(i.directives[u]=_,m):i.directives[u]},mount(u,_,T){if(!c){const S=m._ceVNode||Ie(o,s);return S.appContext=i,T===!0?T="svg":T===!1&&(T=void 0),e(S,u,T),c=!0,m._container=u,u.__vue_app__=m,us(S.component)}},onUnmount(u){l.push(u)},unmount(){c&&(_t(l,m._instance,16),e(null,m._container),delete m._container.__vue_app__)},provide(u,_){return i.provides[u]=_,m},runWithContext(u){const _=on;on=m;try{return u()}finally{on=_}}};return m}}let on=null;function Oi(e,t){if(Le){let n=Le.provides;const o=Le.parent&&Le.parent.provides;o===n&&(n=Le.provides=Object.create(o)),n[e]=t}}function Xs(e,t,n=!1){const o=Yi();if(o||on){let s=on?on._context.provides:o?o.parent==null||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&ue(t)?t.call(o&&o.proxy):t}}const jl=Symbol.for("v-scx"),zl=()=>Xs(jl);function Xe(e,t,n){return Ll(e,t,n)}function Ll(e,t,n=be){const{immediate:o,deep:s,flush:i,once:a}=n,l=je({},n),c=t&&o||!t&&i!=="post";let m;if(En){if(i==="sync"){const S=zl();m=S.__watcherHandles||(S.__watcherHandles=[])}else if(!c){const S=()=>{};return S.stop=Lt,S.resume=Lt,S.pause=Lt,S}}const u=Le;l.call=(S,A,v)=>_t(S,u,A,v);let _=!1;i==="post"?l.scheduler=S=>{He(S,u&&u.suspense)}:i!=="sync"&&(_=!0,l.scheduler=(S,A)=>{A?S():Ys(S)}),l.augmentJob=S=>{t&&(S.flags|=4),_&&(S.flags|=2,u&&(S.id=u.uid,S.i=u))};const T=pl(e,t,l);return En&&(m?m.push(T):c&&T()),T}const Dl=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Oe(t)}Modifiers`]||e[`${qe(t)}Modifiers`];function Ul(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||be;let s=n;const i=t.startsWith("update:"),a=i&&Dl(o,t.slice(7));a&&(a.trim&&(s=n.map(u=>xe(u)?u.trim():u)),a.number&&(s=n.map(Kn)));let l,c=o[l=Os(t)]||o[l=Os(Oe(t))];!c&&i&&(c=o[l=Os(qe(t))]),c&&_t(c,e,6,s);const m=o[l+"Once"];if(m){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,_t(m,e,6,s)}}function Fl(e,t,n=!1){const o=t.emitsCache,s=o.get(e);if(s!==void 0)return s;const i=e.emits;let a={};return i?(se(i)?i.forEach(l=>a[l]=null):je(a,i),ye(e)&&o.set(e,a),a):(ye(e)&&o.set(e,null),null)}function rs(e,t){return!e||!Fn(t)?!1:(t=t.slice(2).replace(/Once$/,""),fe(e,t[0].toLowerCase()+t.slice(1))||fe(e,qe(t))||fe(e,t))}function Oy(){}function Ei(e){const{type:t,vnode:n,proxy:o,withProxy:s,propsOptions:[i],slots:a,attrs:l,emit:c,render:m,renderCache:u,props:_,data:T,setupState:S,ctx:A,inheritAttrs:v}=e,w=os(e);let C,E;try{if(n.shapeFlag&4){const b=s||o,I=b;C=ot(m.call(I,b,u,_,S,T,A)),E=l}else{const b=t;C=ot(b.length>1?b(_,{attrs:l,slots:a,emit:c}):b(_,null)),E=t.props?l:ql(l)}}catch(b){Tn.length=0,ns(b,e,1),C=Ie(kt)}let j=C;if(E&&v!==!1){const b=Object.keys(E),{shapeFlag:I}=j;b.length&&I&7&&(i&&b.some(Ts)&&(E=Hl(E,i)),j=rn(j,E,!1,!0))}return n.dirs&&(j=rn(j,null,!1,!0),j.dirs=j.dirs?j.dirs.concat(n.dirs):n.dirs),n.transition&&Gs(j,n.transition),C=j,os(w),C}const ql=e=>{let t;for(const n in e)(n==="class"||n==="style"||Fn(n))&&((t||(t={}))[n]=e[n]);return t},Hl=(e,t)=>{const n={};for(const o in e)(!Ts(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Vl(e,t,n){const{props:o,children:s,component:i}=e,{props:a,children:l,patchFlag:c}=t,m=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return o?Mi(o,a,m):!!a;if(c&8){const u=t.dynamicProps;for(let _=0;_<u.length;_++){const T=u[_];if(a[T]!==o[T]&&!rs(m,T))return!0}}}else return(s||l)&&(!l||!l.$stable)?!0:o===a?!1:o?a?Mi(o,a,m):!0:!!a;return!1}function Mi(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let s=0;s<o.length;s++){const i=o[s];if(t[i]!==e[i]&&!rs(n,i))return!0}return!1}function Bl({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o===e)(e=t.vnode).el=n,t=t.parent;else break}}const Ni={},Pi=()=>Object.create(Ni),Ri=e=>Object.getPrototypeOf(e)===Ni;function Kl(e,t,n,o=!1){const s={},i=Pi();e.propsDefaults=Object.create(null),ji(e,t,s,i);for(const a in e.propsOptions[0])a in s||(s[a]=void 0);n?e.props=o?s:rl(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function Wl(e,t,n,o){const{props:s,attrs:i,vnode:{patchFlag:a}}=e,l=re(s),[c]=e.propsOptions;let m=!1;if((o||a>0)&&!(a&16)){if(a&8){const u=e.vnode.dynamicProps;for(let _=0;_<u.length;_++){let T=u[_];if(rs(e.emitsOptions,T))continue;const S=t[T];if(c)if(fe(i,T))S!==i[T]&&(i[T]=S,m=!0);else{const A=Oe(T);s[A]=Qs(c,l,A,S,e,!1)}else S!==i[T]&&(i[T]=S,m=!0)}}}else{ji(e,t,s,i)&&(m=!0);let u;for(const _ in l)(!t||!fe(t,_)&&((u=qe(_))===_||!fe(t,u)))&&(c?n&&(n[_]!==void 0||n[u]!==void 0)&&(s[_]=Qs(c,l,_,void 0,e,!0)):delete s[_]);if(i!==l)for(const _ in i)(!t||!fe(t,_))&&(delete i[_],m=!0)}m&&ht(e.attrs,"set","")}function ji(e,t,n,o){const[s,i]=e.propsOptions;let a=!1,l;if(t)for(let c in t){if(gn(c))continue;const m=t[c];let u;s&&fe(s,u=Oe(c))?!i||!i.includes(u)?n[u]=m:(l||(l={}))[u]=m:rs(e.emitsOptions,c)||(!(c in o)||m!==o[c])&&(o[c]=m,a=!0)}if(i){const c=re(n),m=l||be;for(let u=0;u<i.length;u++){const _=i[u];n[_]=Qs(s,c,_,m[_],e,!fe(m,_))}}return a}function Qs(e,t,n,o,s,i){const a=e[n];if(a!=null){const l=fe(a,"default");if(l&&o===void 0){const c=a.default;if(a.type!==Function&&!a.skipFactory&&ue(c)){const{propsDefaults:m}=s;if(n in m)o=m[n];else{const u=ao(s);o=m[n]=c.call(null,t),u()}}else o=c;s.ce&&s.ce._setProp(n,o)}a[0]&&(i&&!l?o=!1:a[1]&&(o===""||o===qe(n))&&(o=!0))}return o}function Yl(e,t,n=!1){const o=t.propsCache,s=o.get(e);if(s)return s;const i=e.props,a={},l=[];if(!i)return ye(e)&&o.set(e,Yt),Yt;if(se(i))for(let m=0;m<i.length;m++){const u=Oe(i[m]);zi(u)&&(a[u]=be)}else if(i)for(const m in i){const u=Oe(m);if(zi(u)){const _=i[m],T=a[u]=se(_)||ue(_)?{type:_}:je({},_),S=T.type;let A=!1,v=!0;if(se(S))for(let w=0;w<S.length;++w){const C=S[w],E=ue(C)&&C.name;if(E==="Boolean"){A=!0;break}else E==="String"&&(v=!1)}else A=ue(S)&&S.name==="Boolean";T[0]=A,T[1]=v,(A||fe(T,"default"))&&l.push(u)}}const c=[a,l];return ye(e)&&o.set(e,c),c}function zi(e){return e[0]!=="$"&&!gn(e)}const eo=e=>e==="_"||e==="_ctx"||e==="$stable",to=e=>se(e)?e.map(ot):[ot(e)],Gl=(e,t,n)=>{if(t._n)return t;const o=kl((...s)=>to(t(...s)),n);return o._c=!1,o},Li=(e,t,n)=>{const o=e._ctx;for(const s in e){if(eo(s))continue;const i=e[s];if(ue(i))t[s]=Gl(s,i,o);else if(i!=null){const a=to(i);t[s]=()=>a}}},Di=(e,t)=>{const n=to(t);e.slots.default=()=>n},Ui=(e,t,n)=>{for(const o in t)(n||!eo(o))&&(e[o]=t[o])},Zl=(e,t,n)=>{const o=e.slots=Pi();if(e.vnode.shapeFlag&32){const s=t._;s?(Ui(o,t,n),n&&Ko(o,"_",s,!0)):Li(t,o)}else t&&Di(e,t)},Jl=(e,t,n)=>{const{vnode:o,slots:s}=e;let i=!0,a=be;if(o.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:Ui(s,t,n):(i=!t.$stable,Li(t,s)),a=t}else t&&(Di(e,t),a={default:1});if(i)for(const l in s)!eo(l)&&a[l]==null&&delete s[l]},He=nc;function Xl(e){return Ql(e)}function Ql(e,t){const n=Wn();n.__VUE__=!0;const{insert:o,remove:s,patchProp:i,createElement:a,createText:l,createComment:c,setText:m,setElementText:u,parentNode:_,nextSibling:T,setScopeId:S=Lt,insertStaticContent:A}=e,v=(d,y,x,M=null,O=null,P=null,F=void 0,z=null,L=!!y.dynamicChildren)=>{if(d===y)return;d&&!On(d,y)&&(M=hn(d),oe(d,O,P,!0),d=null),y.patchFlag===-2&&(L=!1,y.dynamicChildren=null);const{type:R,ref:te,shapeFlag:B}=y;switch(R){case as:w(d,y,x,M);break;case kt:C(d,y,x,M);break;case so:d==null&&E(y,x,M,F);break;case K:ge(d,y,x,M,O,P,F,z,L);break;default:B&1?I(d,y,x,M,O,P,F,z,L):B&6?we(d,y,x,M,O,P,F,z,L):(B&64||B&128)&&R.process(d,y,x,M,O,P,F,z,L,At)}te!=null&&O?In(te,d&&d.ref,P,y||d,!y):te==null&&d&&d.ref!=null&&In(d.ref,null,P,d,!0)},w=(d,y,x,M)=>{if(d==null)o(y.el=l(y.children),x,M);else{const O=y.el=d.el;y.children!==d.children&&m(O,y.children)}},C=(d,y,x,M)=>{d==null?o(y.el=c(y.children||""),x,M):y.el=d.el},E=(d,y,x,M)=>{[d.el,d.anchor]=A(d.children,y,x,M,d.el,d.anchor)},j=({el:d,anchor:y},x,M)=>{let O;for(;d&&d!==y;)O=T(d),o(d,x,M),d=O;o(y,x,M)},b=({el:d,anchor:y})=>{let x;for(;d&&d!==y;)x=T(d),s(d),d=x;s(y)},I=(d,y,x,M,O,P,F,z,L)=>{if(y.type==="svg"?F="svg":y.type==="math"&&(F="mathml"),d==null)q(y,x,M,O,P,F,z,L);else{const R=d.el&&d.el._isVueCE?d.el:null;try{R&&R._beginPatch(),W(d,y,O,P,F,z,L)}finally{R&&R._endPatch()}}},q=(d,y,x,M,O,P,F,z)=>{let L,R;const{props:te,shapeFlag:B,transition:ee,dirs:ne}=d;if(L=d.el=a(d.type,P,te&&te.is,te),B&8?u(L,d.children):B&16&&D(d.children,L,null,M,O,no(d,P),F,z),ne&&Ht(d,null,M,"created"),G(L,d,d.scopeId,F,M),te){for(const he in te)he!=="value"&&!gn(he)&&i(L,he,null,te[he],P,M);"value"in te&&i(L,"value",null,te.value,P),(R=te.onVnodeBeforeMount)&&it(R,M,d)}ne&&Ht(d,null,M,"beforeMount");const ie=ec(O,ee);ie&&ee.beforeEnter(L),o(L,y,x),((R=te&&te.onVnodeMounted)||ie||ne)&&He(()=>{R&&it(R,M,d),ie&&ee.enter(L),ne&&Ht(d,null,M,"mounted")},O)},G=(d,y,x,M,O)=>{if(x&&S(d,x),M)for(let P=0;P<M.length;P++)S(d,M[P]);if(O){let P=O.subTree;if(y===P||Vi(P.type)&&(P.ssContent===y||P.ssFallback===y)){const F=O.vnode;G(d,F,F.scopeId,F.slotScopeIds,O.parent)}}},D=(d,y,x,M,O,P,F,z,L=0)=>{for(let R=L;R<d.length;R++){const te=d[R]=z?Mt(d[R]):ot(d[R]);v(null,te,y,x,M,O,P,F,z)}},W=(d,y,x,M,O,P,F)=>{const z=y.el=d.el;let{patchFlag:L,dynamicChildren:R,dirs:te}=y;L|=d.patchFlag&16;const B=d.props||be,ee=y.props||be;let ne;if(x&&Vt(x,!1),(ne=ee.onVnodeBeforeUpdate)&&it(ne,x,y,d),te&&Ht(y,d,x,"beforeUpdate"),x&&Vt(x,!0),(B.innerHTML&&ee.innerHTML==null||B.textContent&&ee.textContent==null)&&u(z,""),R?Q(d.dynamicChildren,R,z,x,M,no(y,O),P):F||$(d,y,z,null,x,M,no(y,O),P,!1),L>0){if(L&16)ae(z,B,ee,x,O);else if(L&2&&B.class!==ee.class&&i(z,"class",null,ee.class,O),L&4&&i(z,"style",B.style,ee.style,O),L&8){const ie=y.dynamicProps;for(let he=0;he<ie.length;he++){const de=ie[he],Ue=B[de],Fe=ee[de];(Fe!==Ue||de==="value")&&i(z,de,Ue,Fe,O,x)}}L&1&&d.children!==y.children&&u(z,y.children)}else!F&&R==null&&ae(z,B,ee,x,O);((ne=ee.onVnodeUpdated)||te)&&He(()=>{ne&&it(ne,x,y,d),te&&Ht(y,d,x,"updated")},M)},Q=(d,y,x,M,O,P,F)=>{for(let z=0;z<y.length;z++){const L=d[z],R=y[z],te=L.el&&(L.type===K||!On(L,R)||L.shapeFlag&198)?_(L.el):x;v(L,R,te,null,M,O,P,F,!0)}},ae=(d,y,x,M,O)=>{if(y!==x){if(y!==be)for(const P in y)!gn(P)&&!(P in x)&&i(d,P,y[P],null,O,M);for(const P in x){if(gn(P))continue;const F=x[P],z=y[P];F!==z&&P!=="value"&&i(d,P,z,F,O,M)}"value"in x&&i(d,"value",y.value,x.value,O)}},ge=(d,y,x,M,O,P,F,z,L)=>{const R=y.el=d?d.el:l(""),te=y.anchor=d?d.anchor:l("");let{patchFlag:B,dynamicChildren:ee,slotScopeIds:ne}=y;ne&&(z=z?z.concat(ne):ne),d==null?(o(R,x,M),o(te,x,M),D(y.children||[],x,te,O,P,F,z,L)):B>0&&B&64&&ee&&d.dynamicChildren?(Q(d.dynamicChildren,ee,x,O,P,F,z),(y.key!=null||O&&y===O.subTree)&&Fi(d,y,!0)):$(d,y,x,te,O,P,F,z,L)},we=(d,y,x,M,O,P,F,z,L)=>{y.slotScopeIds=z,d==null?y.shapeFlag&512?O.ctx.activate(y,x,M,F,L):X(y,x,M,O,P,F,L):Y(d,y,L)},X=(d,y,x,M,O,P,F)=>{const z=d.component=cc(d,M,O);if(Cl(d)&&(z.ctx.renderer=At),uc(z,!1,F),z.asyncDep){if(O&&O.registerDep(z,H,F),!d.el){const L=z.subTree=Ie(kt);C(null,L,y,x),d.placeholder=L.el}}else H(z,d,y,x,O,P,F)},Y=(d,y,x)=>{const M=y.component=d.component;if(Vl(d,y,x))if(M.asyncDep&&!M.asyncResolved){V(M,y,x);return}else M.next=y,M.update();else y.el=d.el,M.vnode=y},H=(d,y,x,M,O,P,F)=>{const z=()=>{if(d.isMounted){let{next:B,bu:ee,u:ne,parent:ie,vnode:he}=d;{const dt=qi(d);if(dt){B&&(B.el=he.el,V(d,B,F)),dt.asyncDep.then(()=>{d.isUnmounted||z()});return}}let de=B,Ue;Vt(d,!1),B?(B.el=he.el,V(d,B,F)):B=he,ee&&Bn(ee),(Ue=B.props&&B.props.onVnodeBeforeUpdate)&&it(Ue,ie,B,he),Vt(d,!0);const Fe=Ei(d),ut=d.subTree;d.subTree=Fe,v(ut,Fe,_(ut.el),hn(ut),d,O,P),B.el=Fe.el,de===null&&Bl(d,Fe.el),ne&&He(ne,O),(Ue=B.props&&B.props.onVnodeUpdated)&&He(()=>it(Ue,ie,B,he),O)}else{let B;const{el:ee,props:ne}=y,{bm:ie,m:he,parent:de,root:Ue,type:Fe}=d,ut=nn(y);Vt(d,!1),ie&&Bn(ie),!ut&&(B=ne&&ne.onVnodeBeforeMount)&&it(B,de,y),Vt(d,!0);{Ue.ce&&Ue.ce._def.shadowRoot!==!1&&Ue.ce._injectChildStyle(Fe);const dt=d.subTree=Ei(d);v(null,dt,x,M,d,O,P),y.el=dt.el}if(he&&He(he,O),!ut&&(B=ne&&ne.onVnodeMounted)){const dt=y;He(()=>it(B,de,dt),O)}(y.shapeFlag&256||de&&nn(de.vnode)&&de.vnode.shapeFlag&256)&&d.a&&He(d.a,O),d.isMounted=!0,y=x=M=null}};d.scope.on();const L=d.effect=new Xo(z);d.scope.off();const R=d.update=L.run.bind(L),te=d.job=L.runIfDirty.bind(L);te.i=d,te.id=d.uid,L.scheduler=()=>Ys(te),Vt(d,!0),R()},V=(d,y,x)=>{y.component=d;const M=d.vnode.props;d.vnode=y,d.next=null,Wl(d,y.props,M,x),Jl(d,y.children,x),pt(),ki(d),mt()},$=(d,y,x,M,O,P,F,z,L=!1)=>{const R=d&&d.children,te=d?d.shapeFlag:0,B=y.children,{patchFlag:ee,shapeFlag:ne}=y;if(ee>0){if(ee&128){De(R,B,x,M,O,P,F,z,L);return}else if(ee&256){J(R,B,x,M,O,P,F,z,L);return}}ne&8?(te&16&&Ct(R,O,P),B!==R&&u(x,B)):te&16?ne&16?De(R,B,x,M,O,P,F,z,L):Ct(R,O,P,!0):(te&8&&u(x,""),ne&16&&D(B,x,M,O,P,F,z,L))},J=(d,y,x,M,O,P,F,z,L)=>{d=d||Yt,y=y||Yt;const R=d.length,te=y.length,B=Math.min(R,te);let ee;for(ee=0;ee<B;ee++){const ne=y[ee]=L?Mt(y[ee]):ot(y[ee]);v(d[ee],ne,x,null,O,P,F,z,L)}R>te?Ct(d,O,P,!0,!1,B):D(y,x,M,O,P,F,z,L,B)},De=(d,y,x,M,O,P,F,z,L)=>{let R=0;const te=y.length;let B=d.length-1,ee=te-1;for(;R<=B&&R<=ee;){const ne=d[R],ie=y[R]=L?Mt(y[R]):ot(y[R]);if(On(ne,ie))v(ne,ie,x,null,O,P,F,z,L);else break;R++}for(;R<=B&&R<=ee;){const ne=d[B],ie=y[ee]=L?Mt(y[ee]):ot(y[ee]);if(On(ne,ie))v(ne,ie,x,null,O,P,F,z,L);else break;B--,ee--}if(R>B){if(R<=ee){const ne=ee+1,ie=ne<te?y[ne].el:M;for(;R<=ee;)v(null,y[R]=L?Mt(y[R]):ot(y[R]),x,ie,O,P,F,z,L),R++}}else if(R>ee)for(;R<=B;)oe(d[R],O,P,!0),R++;else{const ne=R,ie=R,he=new Map;for(R=ie;R<=ee;R++){const Be=y[R]=L?Mt(y[R]):ot(y[R]);Be.key!=null&&he.set(Be.key,R)}let de,Ue=0;const Fe=ee-ie+1;let ut=!1,dt=0;const Un=new Array(Fe);for(R=0;R<Fe;R++)Un[R]=0;for(R=ne;R<=B;R++){const Be=d[R];if(Ue>=Fe){oe(Be,O,P,!0);continue}let ft;if(Be.key!=null)ft=he.get(Be.key);else for(de=ie;de<=ee;de++)if(Un[de-ie]===0&&On(Be,y[de])){ft=de;break}ft===void 0?oe(Be,O,P,!0):(Un[ft-ie]=R+1,ft>=dt?dt=ft:ut=!0,v(Be,y[ft],x,null,O,P,F,z,L),Ue++)}const Aa=ut?tc(Un):Yt;for(de=Aa.length-1,R=Fe-1;R>=0;R--){const Be=ie+R,ft=y[Be],Ta=y[Be+1],$a=Be+1<te?Ta.el||Ta.placeholder:M;Un[R]===0?v(null,ft,x,$a,O,P,F,z,L):ut&&(de<0||R!==Aa[de]?Z(ft,x,$a,2):de--)}}},Z=(d,y,x,M,O=null)=>{const{el:P,type:F,transition:z,children:L,shapeFlag:R}=d;if(R&6){Z(d.component.subTree,y,x,M);return}if(R&128){d.suspense.move(y,x,M);return}if(R&64){F.move(d,y,x,At);return}if(F===K){o(P,y,x);for(let B=0;B<L.length;B++)Z(L[B],y,x,M);o(d.anchor,y,x);return}if(F===so){j(d,y,x);return}if(M!==2&&R&1&&z)if(M===0)z.beforeEnter(P),o(P,y,x),He(()=>z.enter(P),O);else{const{leave:B,delayLeave:ee,afterLeave:ne}=z,ie=()=>{d.ctx.isUnmounted?s(P):o(P,y,x)},he=()=>{P._isLeaving&&P[Sl](!0),B(P,()=>{ie(),ne&&ne()})};ee?ee(P,ie,he):he()}else o(P,y,x)},oe=(d,y,x,M=!1,O=!1)=>{const{type:P,props:F,ref:z,children:L,dynamicChildren:R,shapeFlag:te,patchFlag:B,dirs:ee,cacheIndex:ne}=d;if(B===-2&&(O=!1),z!=null&&(pt(),In(z,null,x,d,!0),mt()),ne!=null&&(y.renderCache[ne]=void 0),te&256){y.ctx.deactivate(d);return}const ie=te&1&&ee,he=!nn(d);let de;if(he&&(de=F&&F.onVnodeBeforeUnmount)&&it(de,y,d),te&6)Ln(d.component,x,M);else{if(te&128){d.suspense.unmount(x,M);return}ie&&Ht(d,null,y,"beforeUnmount"),te&64?d.type.remove(d,y,x,At,M):R&&!R.hasOnce&&(P!==K||B>0&&B&64)?Ct(R,y,x,!1,!0):(P===K&&B&384||!O&&te&16)&&Ct(L,y,x),M&&$e(d)}(he&&(de=F&&F.onVnodeUnmounted)||ie)&&He(()=>{de&&it(de,y,d),ie&&Ht(d,null,y,"unmounted")},x)},$e=d=>{const{type:y,el:x,anchor:M,transition:O}=d;if(y===K){mn(x,M);return}if(y===so){b(d);return}const P=()=>{s(x),O&&!O.persisted&&O.afterLeave&&O.afterLeave()};if(d.shapeFlag&1&&O&&!O.persisted){const{leave:F,delayLeave:z}=O,L=()=>F(x,P);z?z(d.el,P,L):L()}else P()},mn=(d,y)=>{let x;for(;d!==y;)x=T(d),s(d),d=x;s(y)},Ln=(d,y,x)=>{const{bum:M,scope:O,job:P,subTree:F,um:z,m:L,a:R}=d;Hi(L),Hi(R),M&&Bn(M),O.stop(),P&&(P.flags|=8,oe(F,d,y,x)),z&&He(z,y),He(()=>{d.isUnmounted=!0},y)},Ct=(d,y,x,M=!1,O=!1,P=0)=>{for(let F=P;F<d.length;F++)oe(d[F],y,x,M,O)},hn=d=>{if(d.shapeFlag&6)return hn(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const y=T(d.anchor||d.el),x=y&&y[wl];return x?T(x):y};let Dn=!1;const Cs=(d,y,x)=>{d==null?y._vnode&&oe(y._vnode,null,null,!0):v(y._vnode||null,d,y,null,null,null,x),y._vnode=d,Dn||(Dn=!0,ki(),wi(),Dn=!1)},At={p:v,um:oe,m:Z,r:$e,mt:X,mc:D,pc:$,pbc:Q,n:hn,o:e};return{render:Cs,hydrate:void 0,createApp:Rl(Cs)}}function no({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Vt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ec(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Fi(e,t,n=!1){const o=e.children,s=t.children;if(se(o)&&se(s))for(let i=0;i<o.length;i++){const a=o[i];let l=s[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=s[i]=Mt(s[i]),l.el=a.el),!n&&l.patchFlag!==-2&&Fi(a,l)),l.type===as&&l.patchFlag!==-1&&(l.el=a.el),l.type===kt&&!l.el&&(l.el=a.el)}}function tc(e){const t=e.slice(),n=[0];let o,s,i,a,l;const c=e.length;for(o=0;o<c;o++){const m=e[o];if(m!==0){if(s=n[n.length-1],e[s]<m){t[o]=s,n.push(o);continue}for(i=0,a=n.length-1;i<a;)l=i+a>>1,e[n[l]]<m?i=l+1:a=l;m<e[n[i]]&&(i>0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,a=n[i-1];i-- >0;)n[i]=a,a=t[a];return n}function qi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:qi(t)}function Hi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const Vi=e=>e.__isSuspense;function nc(e,t){t&&t.pendingBranch?se(e)?t.effects.push(...e):t.effects.push(e):_l(e)}const K=Symbol.for("v-fgt"),as=Symbol.for("v-txt"),kt=Symbol.for("v-cmt"),so=Symbol.for("v-stc"),Tn=[];let Ve=null;function h(e=!1){Tn.push(Ve=e?null:[])}function sc(){Tn.pop(),Ve=Tn[Tn.length-1]||null}let $n=1;function Bi(e,t=!1){$n+=e,e<0&&Ve&&t&&(Ve.hasOnce=!0)}function Ki(e){return e.dynamicChildren=$n>0?Ve||Yt:null,sc(),$n>0&&Ve&&Ve.push(e),e}function g(e,t,n,o,s,i){return Ki(f(e,t,n,o,s,i,!0))}function Ne(e,t,n,o,s){return Ki(Ie(e,t,n,o,s,!0))}function oo(e){return e?e.__v_isVNode===!0:!1}function On(e,t){return e.type===t.type&&e.key===t.key}const Wi=({key:e})=>e??null,ls=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?xe(e)||Te(e)||ue(e)?{i:Ce,r:e,k:t,f:!!n}:e:null);function f(e,t=null,n=null,o=0,s=null,i=e===K?0:1,a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Wi(t),ref:t&&ls(t),scopeId:Si,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Ce};return l?(io(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=xe(n)?8:16),$n>0&&!a&&Ve&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Ve.push(c),c}const Ie=oc;function oc(e,t=null,n=null,o=0,s=null,i=!1){if((!e||e===Ol)&&(e=kt),oo(e)){const l=rn(e,t,!0);return n&&io(l,n),$n>0&&!i&&Ve&&(l.shapeFlag&6?Ve[Ve.indexOf(e)]=l:Ve.push(l)),l.patchFlag=-2,l}if(bc(e)&&(e=e.__vccOpts),t){t=ic(t);let{class:l,style:c}=t;l&&!xe(l)&&(t.class=nt(l)),ye(c)&&(Bs(c)&&!se(c)&&(c=je({},c)),t.style=Yn(c))}const a=xe(e)?1:Vi(e)?128:xl(e)?64:ye(e)?4:ue(e)?2:0;return f(e,t,n,o,s,a,i,!0)}function ic(e){return e?Bs(e)||Ri(e)?je({},e):e:null}function rn(e,t,n=!1,o=!1){const{props:s,ref:i,patchFlag:a,children:l,transition:c}=e,m=t?rc(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:m,key:m&&Wi(m),ref:t&&t.ref?n&&i?se(i)?i.concat(ls(t)):[i,ls(t)]:ls(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==K?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&rn(e.ssContent),ssFallback:e.ssFallback&&rn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&o&&Gs(u,c.clone(u)),u}function Et(e=" ",t=0){return Ie(as,null,e,t)}function N(e="",t=!1){return t?(h(),Ne(kt,null,e)):Ie(kt,null,e)}function ot(e){return e==null||typeof e=="boolean"?Ie(kt):se(e)?Ie(K,null,e.slice()):oo(e)?Mt(e):Ie(as,null,String(e))}function Mt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:rn(e)}function io(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(se(t))n=16;else if(typeof t=="object")if(o&65){const s=t.default;s&&(s._c&&(s._d=!1),io(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Ri(t)?t._ctx=Ce:s===3&&Ce&&(Ce.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ue(t)?(t={default:t,_ctx:Ce},n=32):(t=String(t),o&64?(n=16,t=[Et(t)]):n=8);e.children=t,e.shapeFlag|=n}function rc(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const s in o)if(s==="class")t.class!==o.class&&(t.class=nt([t.class,o.class]));else if(s==="style")t.style=Yn([t.style,o.style]);else if(Fn(s)){const i=t[s],a=o[s];a&&i!==a&&!(se(i)&&i.includes(a))&&(t[s]=i?[].concat(i,a):a)}else s!==""&&(t[s]=o[s])}return t}function it(e,t,n,o=null){_t(e,t,7,[n,o])}const ac=$i();let lc=0;function cc(e,t,n){const o=e.type,s=(t?t.appContext:e.appContext)||ac,i={uid:lc++,vnode:e,type:o,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ua(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Yl(o,s),emitsOptions:Fl(o,s),emit:null,emitted:null,propsDefaults:be,inheritAttrs:o.inheritAttrs,ctx:be,data:be,props:be,attrs:be,slots:be,refs:be,setupState:be,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Ul.bind(null,i),e.ce&&e.ce(i),i}let Le=null;const Yi=()=>Le||Ce;let cs,ro;{const e=Wn(),t=(n,o)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(o),i=>{s.length>1?s.forEach(a=>a(i)):s[0](i)}};cs=t("__VUE_INSTANCE_SETTERS__",n=>Le=n),ro=t("__VUE_SSR_SETTERS__",n=>En=n)}const ao=e=>{const t=Le;return cs(e),e.scope.on(),()=>{e.scope.off(),cs(t)}},Gi=()=>{Le&&Le.scope.off(),cs(null)};function Zi(e){return e.vnode.shapeFlag&4}let En=!1;function uc(e,t=!1,n=!1){t&&ro(t);const{props:o,children:s}=e.vnode,i=Zi(e);Kl(e,o,i,t),Zl(e,s,n||t);const a=i?dc(e,t):void 0;return t&&ro(!1),a}function dc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Nl);const{setup:o}=n;if(o){pt();const s=e.setupContext=o.length>1?pc(e):null,i=ao(e),a=Qt(o,e,0,[e.props,s]),l=Vo(a);if(mt(),i(),(l||e.sp)&&!nn(e)&&Il(e),l){if(a.then(Gi,Gi),t)return a.then(c=>{Ji(e,c)}).catch(c=>{ns(c,e,0)});e.asyncDep=a}else Ji(e,a)}else Xi(e)}function Ji(e,t,n){ue(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ye(t)&&(e.setupState=gi(t)),Xi(e)}function Xi(e,t,n){const o=e.type;e.render||(e.render=o.render||Lt)}const fc={get(e,t){return Ae(e,"get",""),e[t]}};function pc(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,fc),slots:e.slots,emit:e.emit,expose:t}}function us(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(gi(al(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in An)return An[n](e)},has(t,n){return n in t||n in An}})):e.proxy}const mc=/(?:^|[-_])\w/g,hc=e=>e.replace(mc,t=>t.toUpperCase()).replace(/[-_]/g,"");function Qi(e,t=!0){return ue(e)?e.displayName||e.name:e.name||t&&e.__name}function er(e,t,n=!1){let o=Qi(t);if(!o&&t.__file){const s=t.__file.match(/([^/\\]+)\.\w+$/);s&&(o=s[1])}if(!o&&e){const s=i=>{for(const a in i)if(i[a]===t)return a};o=s(e.components)||e.parent&&s(e.parent.type.components)||s(e.appContext.components)}return o?hc(o):n?"App":"Anonymous"}function bc(e){return ue(e)&&"__vccOpts"in e}const U=(e,t)=>dl(e,t,En),gc="3.5.25";let lo;const tr=typeof window<"u"&&window.trustedTypes;if(tr)try{lo=tr.createPolicy("vue",{createHTML:e=>e})}catch{}const nr=lo?e=>lo.createHTML(e):e=>e,yc="http://www.w3.org/2000/svg",vc="http://www.w3.org/1998/Math/MathML",wt=typeof document<"u"?document:null,sr=wt&&wt.createElement("template"),_c={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const s=t==="svg"?wt.createElementNS(yc,e):t==="mathml"?wt.createElementNS(vc,e):n?wt.createElement(e,{is:n}):wt.createElement(e);return e==="select"&&o&&o.multiple!=null&&s.setAttribute("multiple",o.multiple),s},createText:e=>wt.createTextNode(e),createComment:e=>wt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>wt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,s,i){const a=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{sr.innerHTML=nr(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=sr.content;if(o==="svg"||o==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},kc=Symbol("_vtc");function wc(e,t,n){const o=e[kc];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const or=Symbol("_vod"),xc=Symbol("_vsh"),Sc=Symbol(""),Ic=/(?:^|;)\s*display\s*:/;function Cc(e,t,n){const o=e.style,s=xe(n);let i=!1;if(n&&!s){if(t)if(xe(t))for(const a of t.split(";")){const l=a.slice(0,a.indexOf(":")).trim();n[l]==null&&ds(o,l,"")}else for(const a in t)n[a]==null&&ds(o,a,"");for(const a in n)a==="display"&&(i=!0),ds(o,a,n[a])}else if(s){if(t!==n){const a=o[Sc];a&&(n+=";"+a),o.cssText=n,i=Ic.test(n)}}else t&&e.removeAttribute("style");or in e&&(e[or]=i?o.display:"",e[xc]&&(o.display="none"))}const ir=/\s*!important$/;function ds(e,t,n){if(se(n))n.forEach(o=>ds(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=Ac(e,t);ir.test(n)?e.setProperty(qe(o),n.replace(ir,""),"important"):e[o]=n}}const rr=["Webkit","Moz","ms"],co={};function Ac(e,t){const n=co[t];if(n)return n;let o=Oe(t);if(o!=="filter"&&o in e)return co[t]=o;o=Vn(o);for(let s=0;s<rr.length;s++){const i=rr[s]+o;if(i in e)return co[t]=i}return t}const ar="http://www.w3.org/1999/xlink";function lr(e,t,n,o,s,i=La(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ar,t.slice(6,t.length)):e.setAttributeNS(ar,t,n):n==null||i&&!Go(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Ge(n)?String(n):n)}function cr(e,t,n,o,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?nr(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const l=i==="OPTION"?e.getAttribute("value")||"":e.value,c=n==null?e.type==="checkbox"?"on":"":String(n);(l!==c||!("_value"in e))&&(e.value=c),n==null&&e.removeAttribute(t),e._value=n;return}let a=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=Go(n):n==null&&l==="string"?(n="",a=!0):l==="number"&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(s||t)}function xt(e,t,n,o){e.addEventListener(t,n,o)}function Tc(e,t,n,o){e.removeEventListener(t,n,o)}const ur=Symbol("_vei");function $c(e,t,n,o,s=null){const i=e[ur]||(e[ur]={}),a=i[t];if(o&&a)a.value=o;else{const[l,c]=Oc(t);if(o){const m=i[t]=Nc(o,s);xt(e,l,m,c)}else a&&(Tc(e,l,a,c),i[t]=void 0)}}const dr=/(?:Once|Passive|Capture)$/;function Oc(e){let t;if(dr.test(e)){t={};let o;for(;o=e.match(dr);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):qe(e.slice(2)),t]}let uo=0;const Ec=Promise.resolve(),Mc=()=>uo||(Ec.then(()=>uo=0),uo=Date.now());function Nc(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;_t(Pc(o,n.value),t,5,[o])};return n.value=e,n.attached=Mc(),n}function Pc(e,t){if(se(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>s=>!s._stopped&&o&&o(s))}else return t}const fr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Rc=(e,t,n,o,s,i)=>{const a=s==="svg";t==="class"?wc(e,o,a):t==="style"?Cc(e,n,o):Fn(t)?Ts(t)||$c(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):jc(e,t,o,a))?(cr(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&lr(e,t,o,a,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!xe(o))?cr(e,Oe(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),lr(e,t,o,a))};function jc(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&fr(t)&&ue(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return fr(t)&&xe(n)?!1:t in e}const pr={};function zc(e,t,n){let o=Me(e,t);qn(o)&&(o=je({},o,t));class s extends fo{constructor(a){super(o,a,n)}}return s.def=o,s}const Lc=typeof HTMLElement<"u"?HTMLElement:class{};class fo extends Lc{constructor(t,n={},o=wr){super(),this._def=t,this._props=n,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&o!==wr?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(je({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof fo){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,We(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o<this.attributes.length;o++)this._setAttr(this.attributes[o].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(o,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:a}=o;let l;if(i&&!se(i))for(const c in i){const m=i[c];(m===Number||m&&m.type===Number)&&(c in this._props&&(this._props[c]=Wo(this._props[c])),(l||(l=Object.create(null)))[Oe(c)]=!0)}this._numberProps=l,this._resolveProps(o),this.shadowRoot&&this._applyStyles(a),this._mount(o)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(o=>{o.configureApp=this._def.configureApp,t(this._def=o,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const o in n)fe(this,o)||Object.defineProperty(this,o,{get:()=>r(n[o])})}_resolveProps(t){const{props:n}=t,o=se(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&o.includes(s)&&this._setProp(s,this[s]);for(const s of o.map(Oe))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):pr;const s=Oe(t);n&&this._numberProps&&this._numberProps[s]&&(o=Wo(o)),this._setProp(s,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,s=!1){if(n!==this._props[t]&&(this._dirty=!0,n===pr?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),o)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),n===!0?this.setAttribute(qe(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(qe(t),n+""):n||this.removeAttribute(qe(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),Bc(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=Ie(this._def,je(t,this._props));return this._instance||(n.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0;const s=(i,a)=>{this.dispatchEvent(new CustomEvent(i,qn(a[0])?je({detail:a},a[0]):{detail:a}))};o.emit=(i,...a)=>{s(i,a),qe(i)!==i&&s(qe(i),a)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const o=this._nonce;for(let s=t.length-1;s>=0;s--){const i=document.createElement("style");o&&i.setAttribute("nonce",o),i.textContent=t[s],this.shadowRoot.prepend(i)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const o=n.nodeType===1&&n.getAttribute("slot")||"default";(t[o]||(t[o]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=this._getSlots(),n=this._instance.type.__scopeId;for(let o=0;o<t.length;o++){const s=t[o],i=s.getAttribute("name")||"default",a=this._slots[i],l=s.parentNode;if(a)for(const c of a){if(n&&c.nodeType===1){const m=n+"-s",u=document.createTreeWalker(c,1);c.setAttribute(m,"");let _;for(;_=u.nextNode();)_.setAttribute(m,"")}l.insertBefore(c,s)}else for(;s.firstChild;)l.insertBefore(s.firstChild,s);l.removeChild(s)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const n=new Set;for(const o of t){const s=o.querySelectorAll("slot");for(let i=0;i<s.length;i++)n.add(s[i])}return Array.from(n)}_injectChildStyle(t){this._applyStyles(t.styles,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(t){}}function po(e){const t=Yi(),n=t&&t.ce;return n||null}const Nt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return se(t)?n=>Bn(t,n):t};function Dc(e){e.target.composing=!0}function mr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ye=Symbol("_assign");function hr(e,t,n){return t&&(e=e.trim()),n&&(e=Kn(e)),e}const Qe={created(e,{modifiers:{lazy:t,trim:n,number:o}},s){e[Ye]=Nt(s);const i=o||s.props&&s.props.type==="number";xt(e,t?"change":"input",a=>{a.target.composing||e[Ye](hr(e.value,n,i))}),(n||i)&&xt(e,"change",()=>{e.value=hr(e.value,n,i)}),t||(xt(e,"compositionstart",Dc),xt(e,"compositionend",mr),xt(e,"change",mr))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:s,number:i}},a){if(e[Ye]=Nt(a),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Kn(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||s&&e.value.trim()===c)||(e.value=c))}},mo={deep:!0,created(e,t,n){e[Ye]=Nt(n),xt(e,"change",()=>{const o=e._modelValue,s=ln(e),i=e.checked,a=e[Ye];if(se(o)){const l=Es(o,s),c=l!==-1;if(i&&!c)a(o.concat(s));else if(!i&&c){const m=[...o];m.splice(l,1),a(m)}}else if(Zt(o)){const l=new Set(o);i?l.add(s):l.delete(s),a(l)}else a(vr(e,i))})},mounted:br,beforeUpdate(e,t,n){e[Ye]=Nt(n),br(e,t,n)}};function br(e,{value:t,oldValue:n},o){e._modelValue=t;let s;if(se(t))s=Es(t,o.props.value)>-1;else if(Zt(t))s=t.has(o.props.value);else{if(t===n)return;s=Dt(t,vr(e,!0))}e.checked!==s&&(e.checked=s)}const an={created(e,{value:t},n){e.checked=Dt(t,n.props.value),e[Ye]=Nt(n),xt(e,"change",()=>{e[Ye](ln(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[Ye]=Nt(o),t!==n&&(e.checked=Dt(t,o.props.value))}},gr={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const s=Zt(t);xt(e,"change",()=>{const i=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?Kn(ln(a)):ln(a));e[Ye](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,We(()=>{e._assigning=!1})}),e[Ye]=Nt(o)},mounted(e,{value:t}){yr(e,t)},beforeUpdate(e,t,n){e[Ye]=Nt(n)},updated(e,{value:t}){e._assigning||yr(e,t)}};function yr(e,t){const n=e.multiple,o=se(t);if(!(n&&!o&&!Zt(t))){for(let s=0,i=e.options.length;s<i;s++){const a=e.options[s],l=ln(a);if(n)if(o){const c=typeof l;c==="string"||c==="number"?a.selected=t.some(m=>String(m)===String(l)):a.selected=Es(t,l)>-1}else a.selected=t.has(l);else if(Dt(ln(a),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ln(e){return"_value"in e?e._value:e.value}function vr(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Uc=["ctrl","shift","alt","meta"],Fc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Uc.some(n=>e[`${n}Key`]&&!t.includes(n))},Pt=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=((s,...i)=>{for(let a=0;a<t.length;a++){const l=Fc[t[a]];if(l&&l(s,t))return}return e(s,...i)}))},qc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Hc=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=(s=>{if(!("key"in s))return;const i=qe(s.key);if(t.some(a=>a===i||qc[a]===i))return e(s)}))},Vc=je({patchProp:Rc},_c);let _r;function kr(){return _r||(_r=Xl(Vc))}const Bc=((...e)=>{kr().render(...e)}),wr=((...e)=>{const t=kr().createApp(...e),{mount:n}=t;return t.mount=o=>{const s=Wc(o);if(!s)return;const i=t._component;!ue(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const a=n(s,!1,Kc(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},t});function Kc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Wc(e){return xe(e)?document.querySelector(e):e}const Yc=["method","origin","unavailable","invalid","signIn","onboarding","age","name","handle","restricted","suspended","terminated","links","fast","blocked","confirm","removed","quota","captcha","notFound","surfaceOff","notMoved","ledger","submit"];new Set(Yc);const xr=Object.freeze({SURFACE_OFF:"surfaceOff",CUTOVER_NOT_MOVED:"notMoved",NOT_FOUND:"notFound",ONBOARDING_REQUIRED:"onboarding",AGE_BELOW_MINIMUM:"age",NAME_RESERVED:"name",NAME_BLOCKED:"name",HANDLE_TAKEN:"handle",HANDLE_RATE:"handle",POSTING_RESTRICTED:"restricted",ACCOUNT_SUSPENDED:"suspended",ACCOUNT_TERMINATED:"terminated",TOO_MANY_LINKS:"links",TOO_FAST:"fast",FILTER_BLOCKED:"blocked",CONFIRMATION_REQUIRED:"confirm",MESSAGE_REMOVED:"removed",REACTION_NOT_ALLOWED:"invalid",CAPTCHA_FAILED:"captcha",UNAUTHORIZED:"signIn",VALIDATION:"invalid",UNAVAILABLE:"unavailable",STALE_LEASE:"submit",STAFF_POSTING_OFF:"submit",PRESET_CONFLICT:"submit",INTERNAL:"unavailable",NOT_A_MEMBER_SESSION:"signIn",IDENTITY_NOT_ADMITTED:"signIn",ACCOUNT_NOT_ELIGIBLE:"signIn",MEMBER_READ_ONLY:"restricted",MEMBER_DELETION_REQUESTED:"restricted",PRIVATE_SPACE:"submit",WRONG_PROVIDER:"submit",CASE_CLOSED:"submit",NOTIFIER_NOT_ALLOWED:"invalid",UNSUPPORTED_RESTRICTION:"submit",LADDER_EXCEEDED:"submit",PERSON_REQUIRED:"submit",APPEAL_OPEN:"submit",APPEAL_WINDOW_CLOSED:"submit",APPEAL_NEEDS_ANOTHER_PERSON:"submit",GAG_PLATFORM_ONLY:"submit",ORDER_FINAL:"submit",BODY_JSON_INVALID:"invalid",AUDIT_DETAIL_NOT_CODE:"submit",LEDGER_UNAVAILABLE:"ledger",INVALID_INPUT:"invalid",LEGAL_HOLD:"submit",TEXT_MISSING:"unavailable",QUOTA_DAILY:"quota",QUOTA_IP_HOURLY:"quota"}),Sr=Object.freeze({METHOD:"method",ORIGIN:"origin",TOO_LARGE:"invalid",INVALID_JSON:"invalid"}),Ir=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function Gc(e){return typeof e!="string"||e===""?"submit":Ir(xr,e)?xr[e]:Ir(Sr,e)?Sr[e]:"submit"}const Cr=Symbol.for("@blogmcp/sdk/CommunityTransportError");function Zc(e){return typeof e=="number"&&Number.isInteger(e)&&e>=100&&e<=599?e:null}function Jc(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?Math.ceil(e):null}class Ar extends Error{status;retryAfterS;constructor(t,n={}){super(t),this.name="CommunityTransportError",this.status=Zc(n.status),this.retryAfterS=Jc(n.retryAfterS),Object.defineProperty(this,Cr,{value:!0})}}function Xc(e){return e instanceof Ar?!0:e instanceof Error&&e[Cr]===!0}function Qc(e){return Xc(e)&&e.retryAfterS!==null?{ok:!1,code:"unavailable",retryAfterS:e.retryAfterS}:{ok:!1,code:"unavailable"}}function eu(e){return e==="unavailable"||e==="submit"||e==="method"||e==="origin"||e==="invalid"||e==="ledger"}const le=(e,t,n)=>Object.freeze({name:e,method:"POST",path:n,surface:t}),tu=Object.freeze({"discussions.list":le("discussions.list","public","/community/v1/public/discussions/list"),"discussions.head":le("discussions.head","public","/community/v1/public/discussions/head"),"messages.post":le("messages.post","public","/community/v1/public/messages/post"),"messages.edit":le("messages.edit","public","/community/v1/public/messages/edit"),"messages.delete":le("messages.delete","public","/community/v1/public/messages/delete"),"messages.report":le("messages.report","public","/community/v1/public/messages/report"),"reactions.set":le("reactions.set","public","/community/v1/public/reactions/set"),"blocks.set":le("blocks.set","public","/community/v1/public/blocks/set"),"blocks.list":le("blocks.list","public","/community/v1/public/blocks/list"),"profile.get":le("profile.get","public","/community/v1/public/profile/get"),"me.get":le("me.get","public","/community/v1/public/me/get"),"me.onboard":le("me.onboard","public","/community/v1/public/me/onboard"),"me.updateProfile":le("me.updateProfile","public","/community/v1/public/me/profile/update"),"me.notifications.list":le("me.notifications.list","public","/community/v1/public/me/notifications/list"),"me.notifications.markRead":le("me.notifications.markRead","public","/community/v1/public/me/notifications/mark-read"),"me.decisions.list":le("me.decisions.list","public","/community/v1/public/me/decisions/list"),"me.decisions.get":le("me.decisions.get","public","/community/v1/public/me/decisions/get"),"me.appeals.file":le("me.appeals.file","public","/community/v1/public/me/appeals/file"),"me.appeals.withdraw":le("me.appeals.withdraw","public","/community/v1/public/me/appeals/withdraw"),"me.appeals.list":le("me.appeals.list","public","/community/v1/public/me/appeals/list"),"me.reports.list":le("me.reports.list","public","/community/v1/public/me/reports/list"),"me.consents.withdraw":le("me.consents.withdraw","public","/community/v1/public/me/consents/withdraw"),"me.export":le("me.export","public","/community/v1/public/me/export"),"me.erase":le("me.erase","public","/community/v1/public/me/erase"),"me.cancelErase":le("me.cancelErase","public","/community/v1/public/me/erase/cancel"),"legal.current":le("legal.current","public","/community/v1/public/legal/current"),"notices.submit":le("notices.submit","notice","/trust/v1/notices/submit"),"notices.status":le("notices.status","notice","/trust/v1/notices/status"),"notices.appeal":le("notices.appeal","notice","/trust/v1/notices/appeal"),"notices.withdrawAppeal":le("notices.withdrawAppeal","notice","/trust/v1/notices/appeal/withdraw")}),Tr="/community";function nu(e){return e.surface==="public"&&e.path.startsWith(`${Tr}/`)?e.path.slice(Tr.length):e.path}const cn=4e3,su=2,fs=1e3,Bt=4e3,ho=4e3,$r=120,ou=2,Or=80,Er=/^[a-z0-9][a-z0-9_]{2,29}$/,Mr=30,iu=50,ru="community_notice",au="good_faith";function bo(){const e=globalThis.crypto;if(typeof e?.randomUUID=="function")return e.randomUUID();const t=e.getRandomValues(new Uint8Array(16));t[6]=(t[6]??0)&15|64,t[8]=(t[8]??0)&63|128;const n=Array.from(t,o=>o.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}const Mn=(e,t)=>typeof t=="string"&&e.includes(t),lu=Object.freeze(["visible","held","removed","deleted"]),cu=e=>Mn(lu,e),uu=Object.freeze(["member","staff","system"]),du=e=>Mn(uu,e),fu=Object.freeze(["sign_in","onboarding","reconsent_rules","art9_consent"]),Nn=e=>Mn(fu,e),pu=Object.freeze(["restriction","suspension","ban"]),mu=e=>Mn(pu,e),hu=Object.freeze(["decision","appeal_resolved","erasure_scheduled","inactivity_warning"]),bu=e=>Mn(hu,e),Nr=Object.freeze(["fraud_spam","harassment","hate","threats","sexual_content","child_at_risk","self_harm","doxxing","copyright","terrorism","drugs","other_illegal","rules","adverse_event","third_party_health_data","suspected_minor"]),gu="child_at_risk",yu=Object.freeze(["16_17","18_plus"]);function go(e){const t=typeof e=="object"&&e!==null?e.rules:void 0;if(!Array.isArray(t))return[];const n=[];for(const o of t){if(typeof o!="object"||o===null)continue;const{id:s,title:i,summary:a,anchor:l}=o;typeof s!="string"||typeof i!="string"||typeof l!="string"||n.push(Object.freeze({id:s,title:i,summary:typeof a=="string"?a:null,anchor:l}))}return n}const vu=/^(?:\/[A-Za-z0-9_~-][A-Za-z0-9._~-]*)*\/?$/;function Pr(e){return typeof e=="string"&&e.startsWith("/")&&vu.test(e)&&!/(^|\/)\.\.?(\/|$)/.test(e)}function Rr(e){if(!Pr(e))throw new TypeError('[blogmcp-sdk] the community client takes a relative base on the page’s own origin (e.g. "/api/community"), never an absolute URL: kb-api’s community routes are reached only through the host’s proxy or BFF');return e.replace(/\/+$/,"")}function _u(e,t){return`${e.replace(/\/+$/,"")}${nu(t)}`}function ku(e,t){if(e===null||e.trim()==="")return;const n=e.trim();if(/^\d+$/.test(n))return Number(n);const o=Date.parse(n);return Number.isFinite(o)?Math.max(0,Math.ceil((o-t)/1e3)):void 0}function wu(e,t={}){const n=Rr(e),o=t.now??Date.now,s=t.fetch??(()=>globalThis.fetch);return async(i,a,l)=>{let c;try{c=await s()(_u(n,i),{method:i.method,headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a??{}),mode:"same-origin",credentials:"same-origin",cache:"no-store",redirect:"error",signal:l})}catch{throw new Ar(l.aborted?"community request aborted or timed out":"community request failed")}let m=null;try{const _=await c.text();m=_===""?null:JSON.parse(_)}catch{m=null}const u=ku(c.headers.get("Retry-After"),o());return u===void 0?{status:c.status,body:m}:{status:c.status,body:m,retryAfterS:u}}}const jr=1e4,xu=2147483647;let zr=!1;function Su(e){if(e===void 0)return jr;const t=typeof e=="number"?Math.floor(e):Number.NaN;return t>=1&&t<=xu?t:(zr||(zr=!0,console.warn("[community] timeoutMs is not a number of milliseconds from 1 to 2147483647 — the default 10 s is used.")),jr)}const rt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Pn=e=>typeof e=="string",un=Array.isArray,Iu=Object.freeze({string:Pn,number:e=>typeof e=="number",boolean:e=>typeof e=="boolean",array:un,record:rt}),ce=e=>Object.freeze({...e}),Cu=Object.freeze({"discussions.list":ce({articleId:"string",messages:"array",viewer:"record"}),"discussions.head":ce({heads:"array"}),"messages.post":ce({message:"record",warnings:"array"}),"messages.edit":ce({message:"record",warnings:"array"}),"messages.delete":ce({message:"record"}),"messages.report":ce({caseId:"string"}),"reactions.set":ce({reactions:"record"}),"blocks.set":ce({blocked:"boolean"}),"blocks.list":ce({blocks:"array"}),"profile.get":ce({author:"record"}),"me.get":ce({needs:"array"}),"me.onboard":ce({needs:"array"}),"me.updateProfile":ce({profile:"record"}),"me.notifications.list":ce({items:"array"}),"me.notifications.markRead":ce({updated:"number"}),"me.decisions.list":ce({items:"array"}),"me.decisions.get":ce({decisionId:"string"}),"me.appeals.file":ce({appealId:"string"}),"me.appeals.withdraw":ce({appealId:"string"}),"me.appeals.list":ce({items:"array"}),"me.reports.list":ce({items:"array"}),"me.consents.withdraw":ce({state:"string"}),"me.export":ce({generatedAt:"string"}),"me.erase":ce({purgeAfter:"string"}),"me.cancelErase":ce({status:"string"}),"legal.current":ce({textId:"string"}),"notices.submit":ce({caseId:"string",receipt:"string"}),"notices.status":ce({status:"string"}),"notices.appeal":ce({appealId:"string"}),"notices.withdrawAppeal":ce({appealId:"string"})}),Au=(e,t)=>Object.entries(Cu[e]).every(([n,o])=>Iu[o](t[n]));function St(e,t){const n={};if(!rt(e))return n;for(const o of t)e[o]!==void 0&&(n[o]=e[o]);return n}function Lr(e){return rt(e)?"conversationId"in e?St(e,["conversationId","seq"]):"memberId"in e?St(e,["memberId"]):"handle"in e?St(e,["handle"]):St(e,["articleId"]):e}const Tu=/^[A-Za-z0-9_.:-]{1,64}$/,yo=20;function $u(e){if(un(e))return e.filter(t=>Pn(t)&&Tu.test(t)).slice(0,yo)}function Ou(e){return un(e)?e.filter(Nn).slice(0,yo):void 0}function Eu(e){return un(e)?e.map(n=>rt(n)?n.path:n).filter(n=>Pn(n)&&n.length<=128).slice(0,yo):void 0}function ps(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?Math.ceil(e):void 0}function Mu(e,t){const n={ok:!1,code:Gc(e.code)},o=ps(e.retryAfterS)??ps(t.retryAfterS);o!==void 0&&(n.retryAfterS=o);const s=Ou(e.needs);s&&(n.needs=s);const i=$u(e.codes);i&&(n.codes=i),Pn(e.until)&&(n.until=e.until);const a=Eu(e.issues);return a&&(n.fields=a),n}function Nu(e){Rr(e?.base);const t=e.transport??wu(e.base,e.now?{now:e.now}:{}),n=Su(e.timeoutMs),o=e.logger,s=(c,m,u,_)=>{if(!(!o||!eu(m)))try{o({op:c,outcome:m,kbCode:u,status:_})}catch{}};async function i(c,m,u){const _=tu[c],T=new AbortController,S=u?.signal,A=()=>T.abort();S?.aborted?T.abort():S?.addEventListener("abort",A,{once:!0});const v=setTimeout(()=>T.abort(),n);let w;try{w=await t(_,m,T.signal)}catch(b){const I=Qc(b);return S?.aborted||s(c,I.code,null,null),I}finally{clearTimeout(v),S?.removeEventListener("abort",A)}const C=typeof w?.status=="number"?w.status:0,E=w?.body;if(rt(E)&&E.ok===!1&&Pn(E.code)&&E.code!==""){const b=Mu(E,w);return s(c,b.code,E.code.slice(0,64),C),b}if(C>=200&&C<300&&rt(E)&&E.ok===!0){const{ok:b,...I}=E;return Au(c,I)?{ok:!0,value:I}:(s(c,"unavailable",null,C),{ok:!1,code:"unavailable"})}if(C===429){const b=ps(w.retryAfterS);return b===void 0?{ok:!1,code:"fast"}:{ok:!1,code:"fast",retryAfterS:b}}s(c,"unavailable",null,C);const j=C===503?ps(w.retryAfterS):void 0;return j===void 0?{ok:!1,code:"unavailable"}:{ok:!1,code:"unavailable",retryAfterS:j}}const a=(c,m)=>(u,_)=>i(c,St(u,m),_),l=c=>m=>i(c,{},m);return{discussions:{list:a("discussions.list",["articleId","languageCode","cursor"]),head:(c,m)=>i("discussions.head",{articleIds:rt(c)&&un(c.articleIds)?[...c.articleIds]:[]},m)},messages:{post:a("messages.post",["articleId","body","replyToSeq","clientMsgId","languageCode","confirmations"]),edit:a("messages.edit",["conversationId","seq","body","confirmations"]),delete:a("messages.delete",["conversationId","seq"]),report:a("messages.report",["conversationId","seq","category","ruleId","note"])},reactions:{set:(c,m)=>i("reactions.set",{target:Lr(c?.target),emoji:c?.emoji??null},m)},blocks:{set:a("blocks.set",["memberId","blocked"]),list:l("blocks.list")},profile:{get:(c,m)=>i("profile.get",rt(c)&&"handle"in c?St(c,["handle"]):St(c,["memberId"]),m)},me:{get:l("me.get"),onboard:a("me.onboard",["ageBand","rulesTextId","art9TextId","displayName","handle","avatarPreset"]),updateProfile:a("me.updateProfile",["displayName","handle","avatarPreset","bio"]),notifications:{list:a("me.notifications.list",["cursor"]),markRead:(c,m)=>i("me.notifications.markRead",{ids:rt(c)&&un(c.ids)?[...c.ids]:[]},m)},decisions:{list:a("me.decisions.list",["cursor"]),get:a("me.decisions.get",["decisionId"])},appeals:{file:a("me.appeals.file",["decisionId","body"]),withdraw:a("me.appeals.withdraw",["appealId"]),list:l("me.appeals.list")},reports:{list:l("me.reports.list")},consents:{withdraw:(c,m)=>i("me.consents.withdraw",{kind:"art9_consent"},m)},export:l("me.export"),erase:l("me.erase"),cancelErase:l("me.cancelErase")},legal:{current:a("legal.current",["kind","locale"])},notices:{submit:(c,m)=>{const u=St(c,["category","target","description","ruleId","turnstileToken","confirmations"]);return u.target!==void 0&&(u.target=Lr(u.target)),rt(c?.notifier)?u.notifier=St(c.notifier,["name","email","locale"]):c?.notifier===null&&(u.notifier=null),i("notices.submit",u,m)},status:a("notices.status",["receipt"]),appeal:a("notices.appeal",["receipt","body"]),withdrawAppeal:a("notices.withdrawAppeal",["receipt"])}}}const at=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),pe=e=>typeof e=="string"?e:null,ms=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>0,hs=Object.freeze({counts:Object.freeze({}),mine:null});function vo(e){if(!at(e))return hs;const t={};if(at(e.counts))for(const[n,o]of Object.entries(e.counts))typeof o=="number"&&Number.isSafeInteger(o)&&o>0&&(t[n]=o);return Object.freeze({counts:Object.freeze(t),mine:pe(e.mine)})}const Dr=Object.freeze({kind:"member",memberId:null,handle:null,displayName:null,avatarPreset:null,deleted:!0}),Pu=Object.freeze({kind:"system"});function Ur(e){if(!at(e)||!du(e.kind))return null;if(e.kind==="system")return Pu;if(e.kind==="staff")return Object.freeze({kind:"staff",staffId:pe(e.staffId)??"",displayName:pe(e.displayName)??"",badge:pe(e.badge)??""});const t=pe(e.memberId),n=pe(e.handle),o=pe(e.displayName);return t===null||n===null||o===null||e.deleted===!0?Dr:Object.freeze({kind:"member",memberId:t,handle:n,displayName:o,avatarPreset:pe(e.avatarPreset)})}function Fr(e){if(Array.isArray(e))return Object.freeze(e.filter(t=>typeof t=="string"))}function bs(e,t){if(!at(e))return null;const n=Ur(e.author);if(n===null||!cu(e.state))return null;const o=pe(e.conversationId),s=pe(e.id);if(o===null||s===null||!ms(e.seq))return null;const i=pe(e.body),a=[];if(t&&Array.isArray(e.replies))for(const c of e.replies){const m=bs(c,!1);m&&a.push(m)}const l=Fr(e.notes);return Object.freeze({conversationId:o,seq:e.seq,id:s,rev:typeof e.rev=="number"?e.rev:0,replyToSeq:t?null:ms(e.replyToSeq)?e.replyToSeq:null,author:n,state:e.state,body:i,displayBody:pe(e.displayBody)??i,displayLanguageCode:pe(e.displayLanguageCode),sourceLanguageCode:pe(e.sourceLanguageCode),isTranslated:e.isTranslated===!0,isEdited:e.isEdited===!0,createdAt:pe(e.createdAt)??"",editedAt:pe(e.editedAt),collapsed:e.collapsed===!0,reactions:vo(e.reactions),translationVersionId:pe(e.translationVersionId),...l&&l.length>0?{notes:l}:{},...e.hiddenUntilConsent===!0&&e.state==="held"?{hiddenUntilConsent:!0}:{},replies:Kt(a),...t&&e.repliesTruncated===!0?{repliesTruncated:!0}:{}})}function Ru(e){const t=at(e)?e:{},n=Array.isArray(t.needs)?t.needs.filter(Nn):[],o=[];if(Array.isArray(t.restrictions))for(const s of t.restrictions)!at(s)||!mu(s.kind)||typeof s.decisionId!="string"||o.push(Object.freeze({kind:s.kind,scope:pe(s.scope)??"",endsAt:pe(s.endsAt),decisionId:s.decisionId}));return Object.freeze({memberId:pe(t.memberId),canPost:t.canPost===!0,needs:Object.freeze([...new Set(n)]),restrictions:Object.freeze(o)})}const ju=Object.freeze({memberId:null,canPost:!1,needs:Object.freeze([]),restrictions:Object.freeze([])}),_o=Object.freeze({articleId:null,conversationId:null,count:0,lastSeq:0,lastChangeAt:null,messages:Object.freeze([]),nextCursor:null,articleReactions:hs,reactionSet:Object.freeze([]),preset:null,viewer:ju,loaded:!1,stale:!1}),zu=(e,t)=>e===null?t:t===null?e:Date.parse(t)>Date.parse(e)?t:e;function Kt(e){const t=e.filter(o=>o.seq>0).sort((o,s)=>o.seq-s.seq),n=e.filter(o=>o.seq<0).sort((o,s)=>s.seq-o.seq);return Object.freeze([...t,...n])}function Rt(e,t){let n=!1;const o=[];for(const s of e){let i=t(s);if(i!==null&&i.replies.length>0){const a=Rt(i.replies,t);a!==i.replies&&(i=Object.freeze({...i,replies:a}))}i!==s&&(n=!0),i!==null&&o.push(i)}return n?Object.freeze(o):e}function dn(e,t){for(const n of e){if(t(n))return n;for(const o of n.replies)if(t(o))return o}return null}function qr(e,t){return Rt(e,n=>n.seq===t.seq?n.replyToSeq===null&&t.replyToSeq===null?Object.freeze({...t,replies:n.replies}):t:n)}function Lu(e,t){if(dn(e,o=>o.seq===t.seq))return qr(e,t);if(t.replyToSeq===null)return Kt([...e,t]);const n=e.find(o=>o.seq===t.replyToSeq);return n?Object.freeze(e.map(o=>o===n?Object.freeze({...o,replies:Kt([...o.replies,t])}):o)):e}const Du=e=>e.replyToSeq===null&&e.replies.length>0,Hr=(e,t)=>e.toLowerCase()===t.toLowerCase(),Uu=256,Vr=new WeakMap;function Fu(){let e=_o;const t=new Set,n=new Map,o=new Set;let s=0,i=-1;const a=()=>{s+=1;for(const b of n.keys())o.delete(b),o.add(b);n.clear();for(const b of o){if(o.size<=Uu)break;o.delete(b)}},l=b=>{if(b!==e){e=Object.freeze(b);for(const I of[...t])try{I(e)}catch{}}};function c(b,I={}){if(!at(b))return;const q=pe(b.articleId)?.toLowerCase()??null,G=e.articleId!==null&&q!==null&&q!==e.articleId,D=G?_o:e;G&&a();const W=typeof I.cursor=="number"&&Number.isFinite(I.cursor)?I.cursor:null,Q=W??0,ae=typeof b.nextCursor=="number"&&Number.isFinite(b.nextCursor)?b.nextCursor:null,ge=ae??Number.POSITIVE_INFINITY,we=new Map;for(const Z of Array.isArray(b.messages)?b.messages:[]){const oe=bs(Z,!0);oe&&oe.seq>Q&&oe.seq<=ge&&we.set(oe.seq,oe)}const X=new Map;for(const Z of D.messages){const oe=[Z,...Z.replies];for(const $e of oe)$e.pending&&$e.pending!=="post"&&$e.clientMsgId&&X.set($e.seq,$e)}const Y=Z=>{const oe=X.get(Z.seq);if(!oe)return Z;const $e=oe.clientMsgId?n.get(oe.clientMsgId):void 0;return $e&&($e.before=Z),oe.replyToSeq===null?Object.freeze({...oe,replies:Z.replies}):oe},H=D.messages.filter(Z=>Z.seq<0||Z.seq<=Q||Z.seq>ge),V=new Map;for(const Z of D.messages)for(const oe of Z.replies)oe.seq<0&&oe.replyToSeq!==null&&V.set(oe.replyToSeq,[...V.get(oe.replyToSeq)??[],oe]);const $=[...H.filter(Z=>!we.has(Z.seq)),...we.values()].map(Z=>{if(!we.has(Z.seq))return Z;const oe=Y(Z),$e=oe.replies.map(Y),mn=V.get(Z.seq)??[];return $e.some((Ln,Ct)=>Ln!==oe.replies[Ct])||mn.length>0?Object.freeze({...oe,replies:Kt([...$e,...mn])}):oe}),J=D.loaded?D.nextCursor:0,De=J===null?null:Q>J?J:ae===null?null:Math.max(J,ae);l({articleId:q??D.articleId,conversationId:pe(b.conversationId)??D.conversationId,count:typeof b.count=="number"&&b.count>=0?b.count:D.count,lastSeq:Math.max(typeof b.lastSeq=="number"?b.lastSeq:0,D.lastSeq),lastChangeAt:zu(D.lastChangeAt,pe(b.lastChangeAt)),messages:Kt($),nextCursor:De,articleReactions:vo(b.articleReactions),reactionSet:Object.freeze(Array.isArray(b.reactionSet)?b.reactionSet.filter(Z=>typeof Z=="string"):[]),preset:pe(b.preset),viewer:Ru(b.viewer),loaded:!0,stale:W===null?!1:D.stale})}function m(b){if(n.has(b.clientMsgId))return;const I=ms(b.replyToSeq)?b.replyToSeq:null;if(I!==null&&!e.messages.some(W=>W.seq===I))return;const q=Ur(b.author)??Dr,G=Object.freeze({conversationId:e.conversationId??"",seq:i--,id:`pending:${b.clientMsgId}`,rev:0,replyToSeq:I,author:q,state:"visible",body:b.body,displayBody:b.body,displayLanguageCode:b.languageCode??null,sourceLanguageCode:b.languageCode??null,isTranslated:!1,isEdited:!1,createdAt:b.createdAt??new Date().toISOString(),editedAt:null,collapsed:!1,reactions:hs,translationVersionId:null,replies:Object.freeze([]),pending:"post",clientMsgId:b.clientMsgId});n.set(b.clientMsgId,{type:"post",before:null});const D=I===null?Kt([...e.messages,G]):Object.freeze(e.messages.map(W=>W.seq===I?Object.freeze({...W,replies:Kt([...W.replies,G])}):W));l({...e,messages:D})}function u(b){if(n.has(b.clientMsgId))return;const I=dn(e.messages,G=>G.seq===b.seq);if(!I||I.pending)return;n.set(b.clientMsgId,{type:b.type,before:I});const q=b.type==="edit"?Object.freeze({...I,body:b.body,displayBody:b.body,displayLanguageCode:I.sourceLanguageCode,isTranslated:!1,isEdited:!0,pending:"edit",clientMsgId:b.clientMsgId}):Object.freeze({...I,pending:"delete",clientMsgId:b.clientMsgId});l({...e,messages:Rt(e.messages,G=>G===I?q:G)})}const _=b=>e.conversationId===null||Hr(b.conversationId,e.conversationId);function T(b){const I=n.get(b.clientMsgId);if(!I&&o.has(b.clientMsgId))return;n.delete(b.clientMsgId);const q=bs(b.message,b.message?.replyToSeq===null||b.message?.replyToSeq===void 0),G=q&&_(q)?q:null,D=Rt(e.messages,X=>X.clientMsgId===b.clientMsgId&&X.pending==="post"?null:X.clientMsgId===b.clientMsgId?Br(X):X);if(!G){D!==e.messages&&l({...e,messages:D});return}const W=b.warnings?Fr(b.warnings):void 0,Q=W&&W.length>0?Object.freeze({...G,warnings:W}):G,ae=dn(D,X=>X.seq===Q.seq);let ge,we=e.count;if(Q.state==="deleted"||I?.type==="delete"){const X=ae??null,Y=X?.state==="visible"&&X.body!==null;ge=Rt(D,H=>H.seq!==Q.seq?H:Du(H)?Object.freeze({...Q,replies:H.replies}):null),Y&&(we=Math.max(0,we-1))}else ge=Lu(D,Q),!ae&&Q.state==="visible"&&(we+=1);l({...e,conversationId:e.conversationId??(I?Q.conversationId:null),lastSeq:Math.max(e.lastSeq,Q.seq),count:we,messages:ge})}function S(b){const I=n.get(b);if(!I)return;n.delete(b);const q=Rt(e.messages,G=>{if(G.clientMsgId!==b)return G;if(I.type==="post")return null;const D=I.before;return D?G.replyToSeq===null?Object.freeze({...D,replies:G.replies}):D:Br(G)});q!==e.messages&&l({...e,messages:q})}function A(b){const I=bs(b,b?.replyToSeq===null||b?.replyToSeq===void 0);!I||!dn(e.messages,q=>q.seq===I.seq&&!q.pending&&Hr(q.conversationId,I.conversationId))||l({...e,messages:qr(e.messages,I)})}function v(b){if(at(b))switch(b.type){case"post":return m(b);case"edit":case"delete":return u(b);case"confirm":return T(b);case"rollback":return S(b.clientMsgId);case"server":return A(b.message)}}function w(b){if(!at(b)||!e.loaded||e.articleId===null||pe(b.articleId)?.toLowerCase()!==e.articleId)return!1;if(e.stale)return!0;const I=typeof b.lastSeq=="number"&&b.lastSeq>e.lastSeq,q=typeof b.count=="number"&&b.count!==e.count,G=pe(b.lastChangeAt),D=G!==null&&(e.lastChangeAt===null||Date.parse(G)>Date.parse(e.lastChangeAt));return!I&&!q&&!D?!1:(l({...e,stale:!0}),!0)}function C(b,I){if(!at(b))return;const q=vo(I);if("articleId"in b){if(pe(b.articleId)?.toLowerCase()!==e.articleId)return;l({...e,articleReactions:q});return}const{conversationId:G,seq:D}=b;if(!ms(D)||typeof G!="string")return;const W=G.toLowerCase(),Q=Rt(e.messages,ae=>ae.seq===D&&ae.conversationId.toLowerCase()===W?Object.freeze({...ae,reactions:q}):ae);Q!==e.messages&&l({...e,messages:Q})}function E(b,I){if(typeof b!="string"||b==="")return;const q=b.toLowerCase(),G=Rt(e.messages,D=>D.author.kind==="member"&&D.author.memberId!==null&&D.author.memberId.toLowerCase()===q&&D.body!==null&&D.collapsed!==I?Object.freeze({...D,collapsed:I}):D);G!==e.messages&&l({...e,messages:G})}const j={getState:()=>e,subscribe(b){return t.add(b),()=>{t.delete(b)}},applyPage:c,applyMessage:v,applyHead:w,applyReaction:C,collapse:E,reset(){a(),l(_o)}};return Vr.set(j,()=>s),j}function Br(e){const{pending:t,clientMsgId:n,...o}=e;return Object.freeze(o)}function jt(e){const t="viewer"in e?e.viewer.needs:e.needs,n=new Set(t.filter(Nn)),o=n.has("sign_in"),s=n.has("onboarding"),i=s||n.has("reconsent_rules"),a=n.has("art9_consent");return Object.freeze({signIn:o,onboarding:s,rules:i,art9:a,any:o||s||i||a})}function Rn(e,t){return dn(e.messages,n=>n.seq===t)}function qu(e,t){return t.author.kind==="member"&&t.author.memberId!==null&&t.author.memberId===e.viewer.memberId}function Hu(e,t){if("articleId"in t)return e.articleReactions;const n=t.conversationId.toLowerCase();return dn(e.messages,s=>s.seq===t.seq&&s.conversationId.toLowerCase()===n)?.reactions??hs}function Vu(e,t){const n={...e.counts},o=e.mine;if(o!==null){const s=(n[o]??0)-1;s>0?n[o]=s:delete n[o]}return t!==null&&(n[t]=(n[t]??0)+1),Object.freeze({counts:Object.freeze(n),mine:t})}const Bu=20;function Kr(e){const t=Vr.get(e);let n=t?.(),o=e.getState().articleId;return{moved:()=>t!==void 0&&t()!==n||e.getState().articleId!==o,mark(){n=t?.(),o=e.getState().articleId}}}const Ku=e=>typeof e=="number"&&Number.isFinite(e)?e:null;async function Wu(e,t,n,o){const s=e.getState(),i=s.loaded?s.nextCursor:0,a=Kr(e);let l=null;for(let c=0;c<Bu;c++){const m=await t.discussions.list({articleId:n.articleId,languageCode:n.languageCode??null,cursor:l},o);if(!m.ok)return m;if(a.moved())break;e.applyPage(m.value,{cursor:l}),a.mark();const u=Ku(m.value.nextCursor);if(u===null||i!==null&&u>=i||l!==null&&u<=l)break;l=u}return{ok:!0,value:e.getState()}}async function Yu(e,t,n,o){const s=e.getState().nextCursor;if(s===null)return{ok:!0,value:e.getState()};const i=Kr(e),a=await t.discussions.list({articleId:n.articleId,languageCode:n.languageCode??null,cursor:s},o);return a.ok?(i.moved()||e.applyPage(a.value,{cursor:s}),{ok:!0,value:e.getState()}):a}const Gu=2e4,Zu=5*6e4,Ju=6e4,Xu=(e,t)=>e.lastSeq===t.lastSeq&&e.count===t.count&&e.lastChangeAt===t.lastChangeAt;function Qu(e,t,n){const o=Math.max(1e3,n.intervalMs??Gu),s=[...new Set((Array.isArray(t)?t:[]).filter(j=>typeof j=="string"&&j!==""))].slice(0,iu),i=n.visible??(()=>typeof document>"u"||document.visibilityState!=="hidden"),a=new Map;let l=null,c=null,m=0,u=!1,_=!1;const T=j=>{_||(l&&clearTimeout(l),l=setTimeout(()=>{v()},j))},S=j=>{T(j),u=!0},A=()=>{!_&&!c&&!u&&T(0)};async function v(){if(l=null,u=!1,_||c)return;if(!i()){T(o);return}const j=new AbortController;c=j;const b={signal:j.signal},I=await e.discussions.head({articleIds:s},b);if(c=null,!_){if(I.ok){m=0;const q=[];for(const G of Array.isArray(I.value.heads)?I.value.heads:[]){if(typeof G?.articleId!="string")continue;const D=G.articleId.toLowerCase(),W=a.get(D);a.set(D,G),(!W||!Xu(W,G))&&q.push(G)}if(q.length>0)try{n.onChange(q)}catch{}T(o);return}try{n.onFailure?.(I)}catch{}if(I.code==="surfaceOff")return E();if(I.code==="fast"||I.code==="quota"){S(Math.max(o,I.retryAfterS!==void 0?I.retryAfterS*1e3:Ju));return}m=Math.min(Zu,(m||o)*2),S(m)}}const w=()=>{i()&&A()},C=()=>E();function E(){_||(_=!0,l&&clearTimeout(l),l=null,c?.abort(),c=null,typeof document<"u"&&document.removeEventListener("visibilitychange",w),n.signal?.removeEventListener("abort",C))}return s.length===0||n.signal?.aborted?(_=!0,{stop:()=>{},now:()=>{}}):(typeof document<"u"&&document.addEventListener("visibilitychange",w),n.signal?.addEventListener("abort",C,{once:!0}),T(o),{stop:E,now:A})}const Wt=Object.freeze({myCommunity:"/community",statement:"/community/statements/{id}",report:"/community/report",notices:"/community/notices",rules:"/community/rules"}),ed=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Wr=/^kbnt_[A-Za-z0-9_-]{1,507}$/,Yr="t";function gs(e){return typeof e=="string"&&/^\/(?![/\\])/.test(e)&&!/[\s\\\u0000-\u001f\u007f]/.test(e)}function ko(e,t){const n=e==null||e===""?Wt.statement:e;return!gs(n)||!n.includes("{id}")||/[{}]/.test(n.split("{id}").join(""))||typeof t!="string"||!ed.test(t)?null:n.split("{id}").join(t.toLowerCase())}function td(e,t){const n=e==null||e===""?Wt.notices:e;return!gs(n)||n.includes("#")||typeof t!="string"||!Wr.test(t)?null:`${n}#${Yr}=${t}`}function Gr(e,t){return gs(e)?e.includes("#")||!gs(t)||t.includes("#")?e:`${e}#${t}`:null}function Zr(e){const n=/^#t=([^&]*)/.exec(typeof e=="string"?e:"")?.[1]??"";return Wr.test(n)?n:null}const wo=new WeakMap;function nd(){if(typeof window>"u")throw new Error("[blogmcp-sdk] readReceiptFromHash reads the address bar — call it in the browser (onMounted / useEffect), never while rendering on the server");return window}function sd(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function od(e,t,n){let o=e;const s=t?o.indexOf(t):-1;if(s>=0&&(o=o.slice(0,s)),n!==null)for(let i=o.indexOf(n);i>=0;i=o.indexOf(n)){const a=o.lastIndexOf("#",i);o=a>=0?o.slice(0,a):o.slice(0,i)+o.slice(i+n.length)}return o}function id(e,t,n){if(!sd(e))return e;let o=!1;const s={...e};for(const[i,a]of Object.entries(s)){if(typeof a!="string")continue;const l=od(a,t,n);l!==a&&(s[i]=l,o=!0)}return o?s:e}function rd(e=nd()){const t=e.location.hash,n=Zr(t),o=!wo.has(e);return t.startsWith(`#${Yr}=`)&&e.history.replaceState(id(e.history.state,t,n),"",e.location.pathname+e.location.search),(o||n!==null)&&wo.set(e,n),wo.get(e)??null}const ad={"error.method":"Tohle se takhle spustit nedá. Obnovte prosím stránku.","error.origin":"Požadavek nepřišel z této stránky. Obnovte ji prosím a zkuste to znovu.","error.unavailable":"Teď se to nepodařilo načíst ani uložit. Zkuste to prosím za chvíli.","error.invalid":"Něco ve formuláři nesedí. Zkontrolujte ho prosím a zkuste to znovu.","error.signIn":"K tomu je potřeba přihlásit se čtenářským účtem.","error.onboarding":"Než začnete psát, dokončete prosím vstup do diskuse.","error.age":"Diskuse je otevřená od vyššího věku, zapojit se do ní zatím nejde.","error.name":"Tohle jméno použít nejde. Zkuste prosím jiné.","error.handle":"Tohle uživatelské jméno je obsazené, nebo jste ho nedávno měnili. Zkuste prosím jiné, nebo později.","error.restricted":"Psaní do diskuse máte teď omezené.","error.suspended":"Váš účet v diskusi je teď pozastavený.","error.terminated":"Váš účet v diskusi je zrušený.","error.links":"V komentáři je víc odkazů, než se vejde. Některé prosím uberte.","error.fast":"Jde to moc rychle za sebou. Chvilku počkejte a zkuste to znovu.","error.blocked":"Komentář v téhle podobě zveřejnit nejde. Zkuste ho prosím upravit.","error.confirm":"Než komentář odešlete, potvrďte prosím jednu věc.","error.removed":"Tahle zpráva byla odstraněna, upravit ji už nejde.","error.quota":"Posíláte toho hodně najednou. Zkuste to prosím později.","error.captcha":"Nepodařilo se ověřit, že nejste robot. Počkejte prosím na nové ověření a odešlete to znovu.","error.notFound":"Tohle jsme nenašli. Možná už není k dispozici.","error.surfaceOff":"Diskuse tu teď není k dispozici.","error.notMoved":"Diskusi teď připravujeme. Psát do ní půjde brzy.","error.ledger":"Teď se to nepodařilo uložit a všechno zůstalo, jak bylo. Zkuste to prosím znovu.","error.submit":"Nepovedlo se to. Obnovte prosím stránku a zkuste to znovu.","need.sign_in":"Do diskuse můžete psát po přihlášení.","need.onboarding":"Před prvním komentářem si nastavte jméno a potvrďte pravidla diskuse.","need.reconsent_rules":"Pravidla diskuse se změnila. Potvrďte prosím novou verzi.","need.art9_consent":"Pro psaní do diskuse potřebujeme váš souhlas se zpracováním.","state.visible":"Zveřejněno","state.held":"Čeká na kontrolu","state.removed":"Odstraněno","state.deleted":"Smazáno","state.hiddenUntilConsent":"Čeká na váš souhlas","note.identification_safety":"Podle fotky se houba spolehlivě určit nedá a o jedlosti tady nerozhodujeme. Při podezření na otravu volejte Toxikologické informační středisko: 224 919 293 (nonstop).","note.report_to_manufacturer":"Jde-li o nežádoucí účinek přípravku, dejte nám o něm prosím vědět také v poradně, ať ho můžeme prověřit.","category.fraud_spam":"Podvod nebo spam","category.harassment":"Obtěžování","category.hate":"Nenávistné projevy","category.threats":"Výhrůžky","category.sexual_content":"Sexuální obsah","category.child_at_risk":"Ohrožené dítě","category.self_harm":"Sebepoškozování","category.doxxing":"Zveřejnění cizích osobních údajů","category.copyright":"Porušení autorských práv","category.terrorism":"Terorismus","category.drugs":"Drogy","category.other_illegal":"Jiný nezákonný obsah","category.rules":"Porušení pravidel diskuse","category.adverse_event":"Nežádoucí účinek přípravku","category.third_party_health_data":"Cizí údaje o zdraví","category.suspected_minor":"Autor je nejspíš mladší, než pravidla dovolují","confirm.title":"Než to odešlete","confirm.about_self_or_consent":"Píšu o sobě, nebo mám souhlas člověka, o kterém píšu.","confirm.good_faith":"Potvrzuji, že podle mého nejlepšího vědomí je hlášení přesné a úplné.","confirm.other":"Rozumím upozornění a chci komentář odeslat.","confirm.submit":"Potvrdit a odeslat","warning.identifier":"V komentáři je nejspíš e-mail, telefon nebo číslo účtu. Pokud tam být nemá, komentář upravte.","warning.invisible_chars":"Z komentáře jsme odstranili neviditelné znaky.","warning.other":"Komentář je zveřejněný, ale pravidla diskuse u něj na něco upozorňují. Projděte si ho prosím.","author.deleted":"Smazaný uživatel","author.system":"Oznámení webu","author.badge.team":"Tým","discussion.title":"Diskuse","discussion.count_one":"{count} komentář","discussion.count_few":"{count} komentáře","discussion.count_many":"{count} komentáře","discussion.count_other":"{count} komentářů","discussion.empty":"Zatím tu nejsou komentáře. Začněte diskusi jako první.","discussion.loading":"Načítám diskusi…","discussion.loadMore":"Načíst další","discussion.newMessages":"V diskusi přibyly nové komentáře.","discussion.refresh":"Zobrazit","discussion.signInPrompt":"Přihlaste se a zapojte se do diskuse.","discussion.reply":"Odpovědět","discussion.edit":"Upravit","discussion.delete":"Smazat","discussion.deleteTitle":"Smazat komentář?","discussion.deleteExplain":"Komentář zmizí. Pokud na něj už někdo odpověděl, zůstane po něm prázdné místo.","discussion.deleteConfirm":"Ano, smazat","discussion.report":"Nahlásit","discussion.block":"Blokovat autora","discussion.unblock":"Odblokovat autora","discussion.blocked":"Autora jste zablokovali. Jeho komentáře uvidíte sbalené.","discussion.unblocked":"Autora jste odblokovali.","discussion.menu":"Další akce","discussion.collapsed":"Komentář autora, kterého jste zablokovali.","discussion.show":"Zobrazit","discussion.hide":"Skrýt","discussion.edited":"upraveno","discussion.translated":"Přeloženo automaticky","discussion.showOriginal":"Zobrazit originál","discussion.showTranslation":"Zobrazit překlad","discussion.showReplies_one":"Zobrazit {count} odpověď","discussion.showReplies_few":"Zobrazit {count} odpovědi","discussion.showReplies_many":"Zobrazit {count} odpovědi","discussion.showReplies_other":"Zobrazit {count} odpovědí","discussion.repliesTruncated":"Odpovědí je tu víc, než se dá zobrazit najednou.","discussion.heldNote":"Komentář čeká na kontrolu a zatím ho vidíte jen vy. Po kontrole se ukáže ostatním, nebo se v Moje komunita dozvíte, proč ne.","discussion.hiddenUntilConsentNote":"Komentář zatím vidíte jen vy. Ostatním se ukáže, až udělíte souhlas se zpracováním.","discussion.giveConsent":"Udělit souhlas","discussion.removedNote":"Tenhle komentář jsme odstranili a ostatní ho nevidí.","discussion.why":"Proč?","discussion.placeholderHeld":"Komentář čeká na kontrolu.","discussion.placeholderRemoved":"Komentář byl odstraněn.","discussion.placeholderDeleted":"Komentář byl smazán.","discussion.pending":"Odesílám…","discussion.reactions":"Reakce","discussion.reactionCount":"{emoji} {count}","discussion.reactionAdd":"Přidat reakci","discussion.reactionRemove":"Odebrat reakci","discussion.reactionMine":"Vaše reakce","composer.label":"Váš komentář","composer.replyLabel":"Vaše odpověď","composer.editLabel":"Úprava komentáře","composer.replyingTo":"Odpovídáte: {name}","composer.placeholder":"Napište komentář…","composer.counter":"{length} / {max} znaků","composer.tooLong":"Komentář je moc dlouhý. Zkraťte ho prosím nejvýš na {max} znaků.","composer.linksNote_one":"Do komentáře se vejde nejvýš {count} odkaz.","composer.linksNote_few":"Do komentáře se vejdou nejvýš {count} odkazy.","composer.linksNote_many":"Do komentáře se vejde nejvýš {count} odkazu.","composer.linksNote_other":"Do komentáře se vejde nejvýš {count} odkazů.","composer.shortcut":"Odeslat můžete i klávesami {keys}.","composer.submit":"Odeslat","composer.sending":"Odesílám…","composer.save":"Uložit","composer.cancel":"Zrušit","composer.posted":"Komentář je zveřejněný.","composer.held":"Komentář máme, teď čeká na kontrolu.","composer.cooldown_one":"Další komentář můžete poslat za {count} sekundu.","composer.cooldown_few":"Další komentář můžete poslat za {count} sekundy.","composer.cooldown_many":"Další komentář můžete poslat za {count} sekundy.","composer.cooldown_other":"Další komentář můžete poslat za {count} sekund.","sanction.restriction":"Psaní do diskuse máte omezené.","sanction.restrictionUntil":"Psaní do diskuse máte omezené do {date}.","sanction.suspension":"Váš účet v diskusi je pozastavený.","sanction.suspensionUntil":"Váš účet v diskusi je pozastavený do {date}.","sanction.ban":"Váš účet v diskusi je zrušený.","sanction.statement":"Zobrazit odůvodnění","onboarding.title":"Vítejte v diskusi","onboarding.lede":"Než napíšete první komentář, potřebujeme od vás pár věcí. Zabere to chvilku.","onboarding.ageTitle":"Kolik vám je let?","onboarding.age.16_17":"16–17 let","onboarding.age.18_plus":"18 let a víc","onboarding.ageHint":"Ptáme se jen jednou a uložíme si jen věkovou skupinu.","onboarding.ageBelow":"Diskuse je otevřená od {min} let. Číst ji ale můžete dál.","onboarding.rulesTitle":"Pravidla diskuse","onboarding.rulesLede":"Přečtěte si prosím, jak to v diskusi chodí.","onboarding.rulesLink":"Celá pravidla","onboarding.rulesAccept":"Souhlasím s pravidly diskuse.","onboarding.rulesChanged":"Pravidla diskuse se od vaší poslední návštěvy změnila. Přečtěte si prosím novou verzi a potvrďte ji.","onboarding.art9Title":"Souhlas se zpracováním","onboarding.art9Lede":"Pro psaní do diskuse potřebujeme váš souhlas podle textu níže.","onboarding.art9Accept":"Souhlasím se zpracováním podle textu výše.","onboarding.profileTitle":"Jak vás uvidí ostatní","onboarding.displayName":"Jméno v diskusi","onboarding.displayNameHint":"Může to být i přezdívka. Uvidí ho všichni čtenáři.","onboarding.handle":"Uživatelské jméno","onboarding.handleHint":"Malá písmena, číslice a podtržítko, {min} až {max} znaků. Změnit ho jde jednou za {days} dní.","onboarding.handleSuggested":"Navrhujeme: {handle}","onboarding.avatar":"Obrázek u jména","onboarding.avatarNone":"Bez obrázku","onboarding.continue":"Pokračovat","onboarding.back":"Zpět","onboarding.submit":"Hotovo","onboarding.done":"Hotovo, teď můžete psát.","report.title":"Nahlásit komentář","report.lede":"Hlášení posoudí tým webu. Výsledek uvidíte v Moje komunita.","report.category":"Co je na komentáři špatně?","report.rule":"Které pravidlo porušuje?","report.ruleOther":"Jiné pravidlo","report.note":"Poznámka pro tým (nepovinné)","report.noteHint":"Poznámku uvidí jen tým, který hlášení posuzuje.","report.counter":"{length} / {max} znaků","report.submit":"Nahlásit","report.sending":"Odesílám…","report.cancel":"Zrušit","report.done":"Díky, hlášení máme. Výsledek uvidíte v Moje komunita.","panel.title":"Moje komunita","panel.signIn":"Moje komunita je dostupná po přihlášení.","panel.profile":"Profil","panel.profileEdit":"Upravit profil","panel.statements":"Rozhodnutí o mém obsahu","panel.statementsEmpty":"Rozhodnutí o vašem obsahu uvidíte tady.","panel.reports":"Moje hlášení","panel.reportsEmpty":"Hlášení, která pošlete, uvidíte tady.","panel.notifications":"Oznámení","panel.notificationsEmpty":"Nová oznámení uvidíte tady.","panel.unread_one":"{count} nepřečtené oznámení","panel.unread_few":"{count} nepřečtená oznámení","panel.unread_many":"{count} nepřečteného oznámení","panel.unread_other":"{count} nepřečtených oznámení","panel.markRead":"Označit jako přečtené","panel.blocks":"Zablokovaní autoři","panel.blocksEmpty":"Autory, které zablokujete, uvidíte tady.","panel.consents":"Souhlasy","panel.art9Given":"Souhlas se zpracováním je udělený.","panel.art9NotGiven":"Souhlas se zpracováním jste zatím nedali.","panel.art9Withdraw":"Odvolat souhlas","panel.art9WithdrawTitle":"Odvolat souhlas se zpracováním?","panel.art9WithdrawExplain":"Diskusi můžete dál číst. Psát do ní půjde, až souhlas zase udělíte.","panel.art9WithdrawConfirm":"Ano, odvolat souhlas","panel.art9WithdrawCancel":"Ponechat souhlas","panel.art9Withdrawn":"Souhlas jste odvolali.","panel.export":"Stáhnout moje data","panel.exportHint":"Soubor JSON s tím, co o vás v diskusi máme uložené.","panel.exporting":"Připravuji soubor…","panel.exportFileName":"moje-komunita","panel.erase":"Smazat profil v diskusi","panel.eraseExplain":"Po ochranné lhůtě smažeme váš profil v diskusi, vaše komentáře a reakce, pokud je nemusíme ze zákona uchovat. Účet na webu zůstane. Během lhůty to můžete zrušit.","panel.eraseTitle":"Opravdu smazat profil v diskusi?","panel.eraseConfirm":"Ano, smazat profil","panel.eraseKeep":"Ponechat","panel.eraseScheduled":"Profil v diskusi smažeme {date}. Do té doby to můžete zrušit.","panel.eraseCancel":"Zrušit smazání","panel.eraseCancelled":"Smazání jsme zrušili, profil zůstává.","statement.title":"Odůvodnění rozhodnutí","statement.decidedAt":"Rozhodnuto {date}","statement.provider":"Rozhoduje: {entity}","statement.restriction":"Opatření","statement.until":"Do {date}","statement.scope":"Rozsah","statement.scopeAll":"Všude","statement.basis":"Podnět","statement.facts":"Skutečnosti a okolnosti","statement.automation":"Automatizace","statement.automatedDetection":"Zjištěno automaticky","statement.automatedDecision":"Rozhodnuto automaticky","statement.humanDecision":"Rozhodl člověk","statement.legalGround":"Právní důvod","statement.contractualGround":"Pravidlo","statement.redress":"Možnosti nápravy","statement.subject":"Týká se","statement.subjectMessage":"Komentáře","statement.subjectProfile":"Profilu","statement.subjectArticle":"Článku","statement.full":"Celé odůvodnění","statement.appealTitle":"Odvolání","statement.appealLede":"Nesouhlasíte s rozhodnutím? Napište nám proč. Odvolání posoudí, kde to jde, jiný člověk než ten, kdo rozhodoval.","statement.appealUntil":"Odvolat se můžete do {date}.","statement.appealBody":"Proč s rozhodnutím nesouhlasíte?","statement.appealCounter":"{length} / {max} znaků","statement.appealSubmit":"Odeslat odvolání","statement.appealSending":"Odesílám…","statement.appealSent":"Odvolání máme. Až ho posoudíme, dáme vám vědět.","statement.appealOpen":"Vaše odvolání se posuzuje.","statement.appealWithdraw":"Vzít odvolání zpět","statement.appealWithdrawn":"Odvolání jste vzali zpět.","statement.appealClosed":"Lhůta pro odvolání uplynula.","statement.appealUnavailable":"Proti tomuto rozhodnutí se už odvolat nejde.","restriction.no_action":"Bez opatření","restriction.warning":"Upozornění","restriction.removal":"Odstranění obsahu","restriction.visibility_restricted":"Omezená viditelnost","restriction.posting_restricted":"Omezené psaní","restriction.account_suspended":"Pozastavený účet","restriction.account_terminated":"Zrušený účet","basis.notice":"Hlášení","basis.own_initiative":"Vlastní kontrola","basis.order":"Úřední příkaz","caseStatus.open":"Posuzujeme","caseStatus.decided":"Rozhodnuto","caseStatus.appealed":"Probíhá odvolání","caseStatus.closed":"Uzavřeno","appealStatus.open":"Posuzujeme","appealStatus.upheld":"Rozhodnutí platí","appealStatus.reversed":"Rozhodnutí zrušeno","appealStatus.withdrawn":"Vzato zpět","notification.decision":"Máte nové rozhodnutí o svém obsahu.","notification.appeal_resolved":"Vaše odvolání je vyřízené.","notification.erasure_scheduled":"Smazání vašeho profilu v diskusi je naplánované.","notification.inactivity_warning":"Dlouho jste v diskusi nebyli. Bez další aktivity váš profil po čase smažeme.","notice.title":"Nahlásit obsah","notice.lede":"Nahlásit můžete komentář, profil nebo článek, i bez přihlášení.","notice.noTarget":"Hlášení otevřete přímo u obsahu, který chcete nahlásit: u komentáře zvolte „Nahlásit“.","notice.category":"Proč obsah hlásíte?","notice.target":"Co hlásíte","notice.targetMessage":"Komentář","notice.targetProfile":"Profil","notice.targetArticle":"Článek","notice.rule":"Které pravidlo obsah porušuje?","notice.description":"Popis","notice.descriptionHint":"Popište prosím, co je na obsahu špatně a proč.","notice.counter":"{length} / {max} znaků","notice.contactTitle":"Kontakt (nepovinné)","notice.contactHint":"Kontakt potřebujeme k potvrzení přijetí a k odeslání výsledku.","notice.name":"Jméno","notice.email":"E-mail","notice.childAtRisk":"Hlášení o ohroženém dítěti přijímáme bez jména a e-mailu.","notice.submit":"Odeslat hlášení","notice.sending":"Odesílám…","notice.done":"Díky, hlášení máme.","notice.receiptLede":"Uložte si odkaz níže. Podle něj zjistíte, jak jsme hlášení vyřídili.","notice.statusLink":"Stav hlášení","notice.noContactKept":"Kontakt u tohoto hlášení neukládáme, výsledek vám proto e-mailem nepřijde. Zjistíte ho přes odkaz výše.","notice.captchaUnavailable":"Ověření proti robotům se nenačetlo (možná ho blokuje rozšíření prohlížeče), takže formulář teď odeslat nejde. Zkuste prosím stránku obnovit.","notice.statusTitle":"Stav hlášení","notice.submittedAt":"Odesláno {date}","notice.decidedAt":"Rozhodnuto {date}","notice.statement":"Odůvodnění","notice.appealTitle":"Odvolání","notice.appealLede":"Nesouhlasíte s tím, jak jsme hlášení vyřídili? Napište nám proč.","notice.appealBody":"Proč s rozhodnutím nesouhlasíte?","notice.appealSubmit":"Odeslat odvolání","notice.appealSent":"Odvolání máme.","notice.appealOpen":"Vaše odvolání se posuzuje.","notice.appealWithdraw":"Vzít odvolání zpět","notice.appealUntil":"Odvolat se můžete do {date}.","notice.appealClosed":"Lhůta pro odvolání uplynula.","notice.receiptMissing":"V odkazu chybí číslo hlášení. Otevřete prosím celý odkaz z e-mailu.","common.signIn":"Přihlásit se","common.close":"Zavřít","common.cancel":"Zrušit","common.retry":"Zkusit znovu","common.loading":"Načítám…","common.back":"Zpět","common.optional":"nepovinné","common.needsJs":"Tahle část stránky potřebuje zapnutý JavaScript. Zapněte ho prosím a stránku obnovte."},ld={"error.method":"This can't be started this way. Please reload the page.","error.origin":"This request didn't come from this page. Please reload it and try again.","error.unavailable":"We couldn't load or save that just now. Please try again in a little while.","error.invalid":"Something in the form isn't right. Please check it and try again.","error.signIn":"You need to sign in with a reader account for this.","error.onboarding":"Before you write, please finish joining the discussion.","error.age":"The discussion is open to an older age group, so you can't join it yet.","error.name":"This name can't be used. Please try another one.","error.handle":"This username is taken, or you changed yours recently. Please try another one, or try later.","error.restricted":"Your posting in the discussion is restricted for now.","error.suspended":"Your discussion account is suspended for now.","error.terminated":"Your discussion account is closed.","error.links":"This comment has more links than fit. Please remove some of them.","error.fast":"That's a bit fast. Please wait a moment and try again.","error.blocked":"This comment can't be published as it is. Please try editing it.","error.confirm":"Before you send the comment, please confirm one thing.","error.removed":"This message was removed; it can't be edited any more.","error.quota":"That's a lot in a short time — please try again later.","error.captcha":"We couldn't check that you're not a robot. Please wait for a new check and send it again.","error.notFound":"We couldn't find this. It may not be available any more.","error.surfaceOff":"The discussion isn't available here right now.","error.notMoved":"We're preparing the discussion. You'll be able to write here soon.","error.ledger":"That couldn't be saved just now, and everything is as it was. Please try again.","error.submit":"That didn't work. Please reload the page and try again.","need.sign_in":"Sign in to write in the discussion.","need.onboarding":"Before your first comment, choose a name and confirm the discussion rules.","need.reconsent_rules":"The discussion rules have changed. Please confirm the new version.","need.art9_consent":"To write in the discussion, we need your consent to the processing.","state.visible":"Published","state.held":"Awaiting review","state.removed":"Removed","state.deleted":"Deleted","state.hiddenUntilConsent":"Awaiting your consent","note.identification_safety":"A mushroom can't be reliably identified from a photo, and edibility isn't decided here. If you suspect poisoning, call the Czech Toxicological Information Centre: +420 224 919 293 (24/7).","note.report_to_manufacturer":"If this is about a side effect of a product, please also tell us through the advice desk so we can look into it.","category.fraud_spam":"Fraud or spam","category.harassment":"Harassment","category.hate":"Hate speech","category.threats":"Threats","category.sexual_content":"Sexual content","category.child_at_risk":"A child at risk","category.self_harm":"Self-harm","category.doxxing":"Publishing someone else's personal data","category.copyright":"Copyright infringement","category.terrorism":"Terrorism","category.drugs":"Drugs","category.other_illegal":"Other illegal content","category.rules":"Breaks the discussion rules","category.adverse_event":"A side effect of a product","category.third_party_health_data":"Someone else's health information","category.suspected_minor":"The author seems younger than the rules allow","confirm.title":"Before you send it","confirm.about_self_or_consent":"I'm writing about myself, or I have the consent of the person I'm writing about.","confirm.good_faith":"I confirm that, to the best of my knowledge, this report is accurate and complete.","confirm.other":"I understand the notice and want to send the comment.","confirm.submit":"Confirm and send","warning.identifier":"The comment seems to contain an e-mail address, a phone number or an account number. If it shouldn't be there, edit the comment.","warning.invisible_chars":"We removed invisible characters from the comment.","warning.other":"The comment is published, but the discussion rules flag something in it. Please look it over.","author.deleted":"Deleted user","author.system":"Site notice","author.badge.team":"Team","discussion.title":"Discussion","discussion.count_one":"{count} comment","discussion.count_other":"{count} comments","discussion.empty":"There aren't any comments yet. Start the discussion.","discussion.loading":"Loading the discussion…","discussion.loadMore":"Load more","discussion.newMessages":"There are new comments in the discussion.","discussion.refresh":"Show","discussion.signInPrompt":"Sign in to join the discussion.","discussion.reply":"Reply","discussion.edit":"Edit","discussion.delete":"Delete","discussion.deleteTitle":"Delete the comment?","discussion.deleteExplain":"The comment disappears. If someone has replied to it, an empty placeholder stays in its place.","discussion.deleteConfirm":"Yes, delete","discussion.report":"Report","discussion.block":"Block the author","discussion.unblock":"Unblock the author","discussion.blocked":"You've blocked the author. Their comments will show collapsed.","discussion.unblocked":"You've unblocked the author.","discussion.menu":"More actions","discussion.collapsed":"A comment by an author you've blocked.","discussion.show":"Show","discussion.hide":"Hide","discussion.edited":"edited","discussion.translated":"Translated automatically","discussion.showOriginal":"Show the original","discussion.showTranslation":"Show the translation","discussion.showReplies_one":"Show {count} reply","discussion.showReplies_other":"Show {count} replies","discussion.repliesTruncated":"There are more replies than can be shown at once.","discussion.heldNote":"The comment is awaiting review and only you can see it for now. After the review it shows to others, or you'll find out why not in My community.","discussion.hiddenUntilConsentNote":"Only you can see this comment for now. Others will see it once you give your consent to the processing.","discussion.giveConsent":"Give consent","discussion.removedNote":"We removed this comment; others can't see it.","discussion.why":"Why?","discussion.placeholderHeld":"This comment is awaiting review.","discussion.placeholderRemoved":"This comment was removed.","discussion.placeholderDeleted":"This comment was deleted.","discussion.pending":"Sending…","discussion.reactions":"Reactions","discussion.reactionCount":"{emoji} {count}","discussion.reactionAdd":"Add a reaction","discussion.reactionRemove":"Remove the reaction","discussion.reactionMine":"Your reaction","composer.label":"Your comment","composer.replyLabel":"Your reply","composer.editLabel":"Editing the comment","composer.replyingTo":"Replying to: {name}","composer.placeholder":"Write a comment…","composer.counter":"{length} / {max} characters","composer.tooLong":"The comment is too long. Please shorten it to {max} characters at most.","composer.linksNote_one":"A comment can hold up to {count} link.","composer.linksNote_other":"A comment can hold up to {count} links.","composer.shortcut":"You can also send it with {keys}.","composer.submit":"Send","composer.sending":"Sending…","composer.save":"Save","composer.cancel":"Cancel","composer.posted":"The comment is published.","composer.held":"We've got the comment; it's awaiting review now.","composer.cooldown_one":"You can post again in {count} second.","composer.cooldown_other":"You can post again in {count} seconds.","sanction.restriction":"Your posting in the discussion is restricted.","sanction.restrictionUntil":"Your posting in the discussion is restricted until {date}.","sanction.suspension":"Your discussion account is suspended.","sanction.suspensionUntil":"Your discussion account is suspended until {date}.","sanction.ban":"Your discussion account is closed.","sanction.statement":"Show the statement of reasons","onboarding.title":"Welcome to the discussion","onboarding.lede":"Before your first comment, we need a few things from you. It takes a moment.","onboarding.ageTitle":"How old are you?","onboarding.age.16_17":"16–17","onboarding.age.18_plus":"18 or older","onboarding.ageHint":"We ask once and keep only the age group.","onboarding.ageBelow":"The discussion is open from the age of {min}. You can keep reading it, though.","onboarding.rulesTitle":"Discussion rules","onboarding.rulesLede":"Please read how the discussion works.","onboarding.rulesLink":"The full rules","onboarding.rulesAccept":"I agree to the discussion rules.","onboarding.rulesChanged":"The discussion rules have changed since your last visit. Please read the new version and confirm it.","onboarding.art9Title":"Consent to processing","onboarding.art9Lede":"To write in the discussion, we need your consent as described below.","onboarding.art9Accept":"I consent to the processing as described above.","onboarding.profileTitle":"How others will see you","onboarding.displayName":"Name in the discussion","onboarding.displayNameHint":"It can be a nickname. Every reader will see it.","onboarding.handle":"Username","onboarding.handleHint":"Lower-case letters, digits and the underscore, {min} to {max} characters. It can be changed once every {days} days.","onboarding.handleSuggested":"Suggested: {handle}","onboarding.avatar":"Picture next to your name","onboarding.avatarNone":"Without a picture","onboarding.continue":"Continue","onboarding.back":"Back","onboarding.submit":"Done","onboarding.done":"Done — you can write now.","report.title":"Report the comment","report.lede":"The site's team reviews the report. You'll see the outcome in My community.","report.category":"What's wrong with the comment?","report.rule":"Which rule does it break?","report.ruleOther":"Another rule","report.note":"A note for the team (optional)","report.noteHint":"Only the team that reviews the report sees the note.","report.counter":"{length} / {max} characters","report.submit":"Report","report.sending":"Sending…","report.cancel":"Cancel","report.done":"Thanks, we've got the report. You'll see the outcome in My community.","panel.title":"My community","panel.signIn":"My community is available after you sign in.","panel.profile":"Profile","panel.profileEdit":"Edit the profile","panel.statements":"Decisions about my content","panel.statementsEmpty":"Decisions about your content will show here.","panel.reports":"My reports","panel.reportsEmpty":"The reports you send will show here.","panel.notifications":"Notifications","panel.notificationsEmpty":"New notifications will show here.","panel.unread_one":"{count} unread notification","panel.unread_other":"{count} unread notifications","panel.markRead":"Mark as read","panel.blocks":"Blocked authors","panel.blocksEmpty":"Authors you block will show here.","panel.consents":"Consents","panel.art9Given":"Consent to the processing is given.","panel.art9NotGiven":"You haven't given consent to the processing yet.","panel.art9Withdraw":"Withdraw consent","panel.art9WithdrawTitle":"Withdraw your consent to the processing?","panel.art9WithdrawExplain":"You can keep reading the discussion. You'll be able to write again once you give the consent again.","panel.art9WithdrawConfirm":"Yes, withdraw consent","panel.art9WithdrawCancel":"Keep the consent","panel.art9Withdrawn":"You've withdrawn your consent.","panel.export":"Download my data","panel.exportHint":"A JSON file with what the discussion keeps about you.","panel.exporting":"Preparing the file…","panel.exportFileName":"my-community","panel.erase":"Delete my discussion profile","panel.eraseExplain":"After a grace period we delete your discussion profile, your comments and reactions, unless the law requires us to keep them. Your account on the site stays. You can cancel it during the grace period.","panel.eraseTitle":"Really delete your discussion profile?","panel.eraseConfirm":"Yes, delete the profile","panel.eraseKeep":"Keep it","panel.eraseScheduled":"We will delete your discussion profile on {date}. You can cancel it until then.","panel.eraseCancel":"Cancel the deletion","panel.eraseCancelled":"The deletion is cancelled; your profile stays.","statement.title":"Statement of reasons","statement.decidedAt":"Decided on {date}","statement.provider":"Decided by: {entity}","statement.restriction":"Measure","statement.until":"Until {date}","statement.scope":"Scope","statement.scopeAll":"Everywhere","statement.basis":"Prompted by","statement.facts":"Facts and circumstances","statement.automation":"Automation","statement.automatedDetection":"Detected automatically","statement.automatedDecision":"Decided automatically","statement.humanDecision":"Decided by a person","statement.legalGround":"Legal ground","statement.contractualGround":"Rule","statement.redress":"Redress","statement.subject":"Concerns","statement.subjectMessage":"A comment","statement.subjectProfile":"A profile","statement.subjectArticle":"An article","statement.full":"The full statement","statement.appealTitle":"Appeal","statement.appealLede":"Don't agree with the decision? Tell us why. Where possible, a different person from the one who decided reviews the appeal.","statement.appealUntil":"You can appeal until {date}.","statement.appealBody":"Why don't you agree with the decision?","statement.appealCounter":"{length} / {max} characters","statement.appealSubmit":"Send the appeal","statement.appealSending":"Sending…","statement.appealSent":"We've got the appeal. We'll let you know once it's reviewed.","statement.appealOpen":"Your appeal is being reviewed.","statement.appealWithdraw":"Withdraw the appeal","statement.appealWithdrawn":"You've withdrawn the appeal.","statement.appealClosed":"The time for an appeal has passed.","statement.appealUnavailable":"This decision can't be appealed any more.","restriction.no_action":"Left as it was","restriction.warning":"A warning","restriction.removal":"Content removed","restriction.visibility_restricted":"Visibility restricted","restriction.posting_restricted":"Posting restricted","restriction.account_suspended":"Account suspended","restriction.account_terminated":"Account closed","basis.notice":"A report","basis.own_initiative":"Our own review","basis.order":"An official order","caseStatus.open":"Under review","caseStatus.decided":"Decided","caseStatus.appealed":"Under appeal","caseStatus.closed":"Closed","appealStatus.open":"Under review","appealStatus.upheld":"The decision stands","appealStatus.reversed":"The decision was reversed","appealStatus.withdrawn":"Withdrawn","notification.decision":"There is a new decision about your content.","notification.appeal_resolved":"Your appeal has been resolved.","notification.erasure_scheduled":"The deletion of your discussion profile is scheduled.","notification.inactivity_warning":"You haven't been active in the discussion for a long time. Without further activity, we'll delete your profile after a while.","notice.title":"Report content","notice.lede":"You can report a comment, a profile or an article, even without signing in.","notice.noTarget":"Open a report from the content you want to report: on a comment, choose “Report”.","notice.category":"Why are you reporting the content?","notice.target":"What you're reporting","notice.targetMessage":"A comment","notice.targetProfile":"A profile","notice.targetArticle":"An article","notice.rule":"Which rule does the content break?","notice.description":"Description","notice.descriptionHint":"Please describe what's wrong with the content and why.","notice.counter":"{length} / {max} characters","notice.contactTitle":"Contact (optional)","notice.contactHint":"We need a contact to confirm that the report arrived and to send you the outcome.","notice.name":"Name","notice.email":"E-mail","notice.childAtRisk":"We take reports of a child at risk without a name or an e-mail address.","notice.submit":"Send the report","notice.sending":"Sending…","notice.done":"Thanks, we've got the report.","notice.receiptLede":"Keep the link below. It's how you'll find out how we handled the report.","notice.statusLink":"Report status","notice.noContactKept":"We don't keep a contact for this report, so the outcome won't come by e-mail. You'll find it through the link above.","notice.captchaUnavailable":"The robot check didn't load (a browser extension may be blocking it), so the form can't be sent right now. Please try reloading the page.","notice.statusTitle":"Report status","notice.submittedAt":"Sent on {date}","notice.decidedAt":"Decided on {date}","notice.statement":"Statement of reasons","notice.appealTitle":"Appeal","notice.appealLede":"Don't agree with how we handled the report? Tell us why.","notice.appealBody":"Why don't you agree with the decision?","notice.appealSubmit":"Send the appeal","notice.appealSent":"We've got the appeal.","notice.appealOpen":"Your appeal is being reviewed.","notice.appealWithdraw":"Withdraw the appeal","notice.appealUntil":"You can appeal until {date}.","notice.appealClosed":"The time for an appeal has passed.","notice.receiptMissing":"The link is missing the report number. Please open the whole link from the e-mail.","common.signIn":"Sign in","common.close":"Close","common.cancel":"Cancel","common.retry":"Try again","common.loading":"Loading…","common.back":"Back","common.optional":"optional","common.needsJs":"This part of the page needs JavaScript. Please turn it on and reload the page."},xo=Object.freeze({cs:Object.freeze(ad),en:Object.freeze(ld)});function cd(e){return(typeof e=="string"?e.toLowerCase().split("-")[0]:"")==="cs"?"cs":"en"}const So=new Map;function ud(e,t){if(!So.has(e)){let n=null;try{n=new Intl.PluralRules(e)}catch{}So.set(e,n)}return So.get(e)?.select(t)??"other"}function dd(e){const t=typeof e=="number"?e:typeof e=="string"&&e.trim()!==""?Number(e):Number.NaN;return Number.isFinite(t)?t:null}function jn(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function fd(e,t){return t?e.replace(/\{(\w+)\}/g,(n,o)=>Object.prototype.hasOwnProperty.call(t,o)&&t[o]!=null?String(t[o]):n):e}function Jr(e,t,n){const o=cd(e),s=xo[o];let i=jn(s,t);if(i===void 0){const a=dd(n?.count),l=a===null?"other":ud(o,a);i=jn(s,`${t}_${l}`)??jn(s,`${t}_other`)}return i===void 0?String(t):fd(i,n)}function ys(e){return typeof e!="string"?!1:jn(xo.en,e)!==void 0||jn(xo.en,`${e}_other`)!==void 0}function pd(e){return typeof e=="string"&&e.startsWith("identifier_")?"warning.identifier":e==="invisible_chars"?"warning.invisible_chars":"warning.other"}function md(e){const t=`confirm.${e}`;return e!=="title"&&e!=="submit"&&e!=="other"&&ys(t)?t:"confirm.other"}function hd(e){const t=`note.${e}`;return ys(t)?t:null}const bd=["statementPath","myCommunityPath","rulesPath","reportPath","noticesPath","consultationPath"];function Io(e){return typeof e=="string"&&/^\/(?![/\\])/.test(e)&&!/[\s\\\u0000-\u001f\u007f]/.test(e)}const Xr=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Qr(e){if(typeof e!="string")return e;if(e.trim()==="")return null;try{return JSON.parse(e)}catch{return null}}function Co(e){const t=Qr(e),n={};if(!Xr(t))return n;for(const o of bd)Io(t[o])&&(n[o]=t[o]);return n}function gd(e){if(e==null||e==="")return"";if(typeof e!="string")return null;const t=e.replace(/\/+$/,"");return t===""?e.startsWith("/")?"":null:/^(?:\/(?!\.{1,2}(?:\/|$))[A-Za-z0-9._~%-]+)+$/.test(t)?t:null}function Ao(e,t,n=""){const o=s=>Io(s)?s:void 0;return{statementPath:e.statementPath??o(t?.statementPath)??`${n}${Wt.statement}`,myCommunityPath:e.myCommunityPath??o(t?.myCommunityPath)??`${n}${Wt.myCommunity}`,rulesPath:e.rulesPath??`${n}${Wt.rules}`,reportPath:e.reportPath??`${n}${Wt.report}`,noticesPath:e.noticesPath??`${n}${Wt.notices}`,consultationPath:e.consultationPath??null}}const yd=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,vd=/^[a-z0-9][a-z0-9_]{2,29}$/,vs=e=>typeof e=="string"&&yd.test(e),ea=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>0;function _s(e){const t=Qr(e);return Xr(t)?"conversationId"in t?vs(t.conversationId)&&ea(t.seq)?{conversationId:t.conversationId.toLowerCase(),seq:t.seq}:null:"memberId"in t?vs(t.memberId)?{memberId:t.memberId.toLowerCase()}:null:"handle"in t?typeof t.handle=="string"&&vd.test(t.handle)?{handle:t.handle}:null:"articleId"in t&&vs(t.articleId)?{articleId:t.articleId.toLowerCase()}:null:null}function _d(e){return"conversationId"in e?"message":"articleId"in e?"article":"profile"}function kd(e,t){return!Io(e)||e.includes("#")||!vs(t.conversationId)||!ea(t.seq)?null:`${e}#c=${t.conversationId.toLowerCase()}&s=${t.seq}`}function wd(e){if(typeof e!="string"||!e.startsWith("#")||e.startsWith("#t="))return null;const t=new Map;for(const i of e.slice(1).split("&")){const a=i.indexOf("=");a>0&&t.set(i.slice(0,a),i.slice(a+1))}const n=t.get("c"),o=t.get("s");if(n!==void 0&&o!==void 0&&/^\d{1,15}$/.test(o))return _s({conversationId:n,seq:Number(o)});const s=t.get("a");return s!==void 0?_s({articleId:s}):null}const xd="/api/community",ta=new Set;function fn(e,t){ta.has(e)||(ta.add(e),console.warn(t))}function To(e){const t=gd(e);return t===null&&fn("site-base",'[blogmcp-community] site-base must be a path on this site (e.g. "/blog"), never a URL: the site’s pages and its proxy are found under it'),t}function $o(e,t,n=""){const o=e==null||e===""?`${n}${xd}`:e;if(!Pr(o))return fn("api-base",'[blogmcp-community] api-base must be a path on this site (e.g. "/api/community"), never a URL: the community API is reached through the site’s own proxy or BFF'),null;try{return Nu(t?{base:o,transport:t}:{base:o})}catch{return fn("api-base","[blogmcp-community] api-base was refused by the community client"),null}}var ks={},Se={},na;function Sd(){return na||(na=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.BLANK_URL=Se.relativeFirstCharacters=Se.whitespaceEscapeCharsRegex=Se.urlSchemeRegex=Se.ctrlCharactersRegex=Se.htmlCtrlEntityRegex=Se.htmlEntitiesRegex=Se.invalidProtocolRegex=void 0,Se.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Se.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Se.htmlCtrlEntityRegex=/&(newline|tab);/gi,Se.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Se.urlSchemeRegex=/^.+(:|:)/gim,Se.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Se.relativeFirstCharacters=[".","/"],Se.BLANK_URL="about:blank"),Se}var sa;function Id(){if(sa)return ks;sa=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.sanitizeUrl=i;var e=Sd();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function n(a){var l=a.replace(e.ctrlCharactersRegex,"");return l.replace(e.htmlEntitiesRegex,function(c,m){return String.fromCharCode(m)})}function o(a){return URL.canParse(a)}function s(a){try{return decodeURIComponent(a)}catch{return a}}function i(a){if(!a)return e.BLANK_URL;var l,c=s(a.trim());do c=n(c).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),c=s(c),l=c.match(e.ctrlCharactersRegex)||c.match(e.htmlEntitiesRegex)||c.match(e.htmlCtrlEntityRegex)||c.match(e.whitespaceEscapeCharsRegex);while(l&&l.length>0);var m=c;if(!m)return e.BLANK_URL;if(t(m))return m;var u=m.trimStart(),_=u.match(e.urlSchemeRegex);if(!_)return m;var T=_[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(T))return e.BLANK_URL;var S=u.replace(/\\/g,"/");if(T==="mailto:"||T.includes("://"))return S;if(T==="http:"||T==="https:"){if(!o(S))return e.BLANK_URL;var A=new URL(S);return A.protocol=A.protocol.toLowerCase(),A.hostname=A.hostname.toLowerCase(),A.toString()}return S}return ks}var Cd=Id();const Ad="nofollow ugc noopener noreferrer",Td=/\b(?:https?:\/\/|www\.)[^\s<>"'`{}|\\^]+/gi,$d=`.,;:!?…'"»”’]`;function Od(e){let t=e;for(;t.length>0;){const n=t[t.length-1];if(n===")"){const o=t.split("(").length-1;if(t.split(")").length-1<=o)break}else if(!$d.includes(n))break;t=t.slice(0,-1)}return t}function Ed(e){const t=/^www\./i.test(e)?`https://${e}`:e;if(/^https?:\/\/$/i.test(t))return null;const n=Cd.sanitizeUrl(t);return n!=="about:blank"&&/^https?:\/\//i.test(n)?n:null}function Md(e){const t=[];if(typeof e!="string"||e==="")return t;let n=0;for(const o of e.matchAll(Td)){const s=o.index??0;if(s<n)continue;const i=Od(o[0]),a=i?Ed(i):null;a&&(s>n&&t.push({kind:"text",text:e.slice(n,s)}),t.push({kind:"link",text:i,href:a}),n=s+i.length)}return n<e.length&&t.push({kind:"text",text:e.slice(n)}),t}function lt(e){let t=0;for(const n of e)t++;return t}function et(e){return typeof e=="string"?e.normalize("NFC").trim():""}const Nd=Object.freeze({amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ",ndash:"–",mdash:"—",hellip:"…",laquo:"«",raquo:"»",bdquo:"„",ldquo:"“",rdquo:"”",lsquo:"‘",rsquo:"’",sbquo:"‚",copy:"©",reg:"®",euro:"€",shy:""});function Pd(e){return e.replace(/&(#\d{1,7}|#x[0-9a-f]{1,6}|[a-z]{2,8});/gi,(t,n)=>{if(n[0]==="#"){const o=n[1]==="x"||n[1]==="X",s=Number.parseInt(n.slice(o?2:1),o?16:10);return s>0&&s<=1114111&&!(s>=55296&&s<=57343)?String.fromCodePoint(s):t}return Nd[n.toLowerCase()]??t})}const Rd=/<\/(?:p|div|li|h[1-6]|section|article|blockquote|tr|ul|ol|dl|dt|dd|header|footer|table|pre|figure)\s*>/gi,jd=/<(?:li|tr|dt|dd|h[1-6]|blockquote|pre|figure)\b[^>]*>/gi;function zd(e){if(typeof e!="string"||e==="")return[];const t=e.replace(/<!--[\s\S]*?-->/g,"").replace(/<(script|style|template|noscript|svg|math)\b[\s\S]*?<\/\1\s*>/gi,"").replace(/[\t\n\r\f ]+/g," ").replace(/<br\b[^>]*>/gi,`
|
|
5
|
-
`).replace(
|
|
1
|
+
var BlogmcpCommunity=(function(Ye){"use strict";function As(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Me={},Rn=[],gn=()=>{},Wi=()=>!1,Mo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Os=e=>e.startsWith("onUpdate:"),ut=Object.assign,Yi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Xc=Object.prototype.hasOwnProperty,Ce=(e,t)=>Xc.call(e,t),he=Array.isArray,Nn=e=>oo(e)==="[object Map]",jn=e=>oo(e)==="[object Set]",Gi=e=>oo(e)==="[object Date]",Te=e=>typeof e=="function",Be=e=>typeof e=="string",jt=e=>typeof e=="symbol",je=e=>e!==null&&typeof e=="object",Zi=e=>(je(e)||Te(e))&&Te(e.then)&&Te(e.catch),Ji=Object.prototype.toString,oo=e=>Ji.call(e),Qc=e=>oo(e).slice(8,-1),Po=e=>oo(e)==="[object Object]",Es=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,so=As(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ro=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},eu=/-\w/g,rt=Ro(e=>e.replace(eu,t=>t.slice(1).toUpperCase())),tu=/\B([A-Z])/g,wt=Ro(e=>e.replace(tu,"-$1").toLowerCase()),No=Ro(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ms=Ro(e=>e?`on${No(e)}`:""),ln=(e,t)=>!Object.is(e,t),jo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Xi=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},zo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Qi=e=>{const t=Be(e)?Number(e):NaN;return isNaN(t)?e:t};let er;const Lo=()=>er||(er=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Do(e){if(he(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=Be(s)?iu(s):Do(s);if(o)for(const r in o)t[r]=o[r]}return t}else if(Be(e)||je(e))return e}const nu=/;(?![^(]*\))/g,ou=/:([^]+)/,su=/\/\*[^]*?\*\//g;function iu(e){const t={};return e.replace(su,"").split(nu).forEach(n=>{if(n){const s=n.split(ou);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ve(e){let t="";if(Be(e))t=e;else if(he(e))for(let n=0;n<e.length;n++){const s=Ve(e[n]);s&&(t+=s+" ")}else if(je(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const ru=As("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function tr(e){return!!e||e===""}function au(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=vn(e[s],t[s]);return n}function vn(e,t){if(e===t)return!0;let n=Gi(e),s=Gi(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=jt(e),s=jt(t),n||s)return e===t;if(n=he(e),s=he(t),n||s)return n&&s?au(e,t):!1;if(n=je(e),s=je(t),n||s){if(!n||!s)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const a in e){const l=e.hasOwnProperty(a),c=t.hasOwnProperty(a);if(l&&!c||!l&&c||!vn(e[a],t[a]))return!1}}return String(e)===String(t)}function Ps(e,t){return e.findIndex(n=>vn(n,t))}const nr=e=>!!(e&&e.__v_isRef===!0),u=e=>Be(e)?e:e==null?"":he(e)||je(e)&&(e.toString===Ji||!Te(e.toString))?nr(e)?u(e.value):JSON.stringify(e,or,2):String(e),or=(e,t)=>nr(t)?or(e,t.value):Nn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],r)=>(n[Rs(s,r)+" =>"]=o,n),{})}:jn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Rs(n))}:jt(t)?Rs(t):je(t)&&!he(t)&&!Po(t)?String(t):t,Rs=(e,t="")=>{var n;return jt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let dt;class lu{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=dt,!t&&dt&&(this.index=(dt.scopes||(dt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=dt;try{return dt=this,t()}finally{dt=n}}}on(){++this._on===1&&(this.prevScope=dt,dt=this)}off(){this._on>0&&--this._on===0&&(dt=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function cu(){return dt}let Oe;const Ns=new WeakSet;class sr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,dt&&dt.active&&dt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ns.has(this)&&(Ns.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||rr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,dr(this),ar(this);const t=Oe,n=zt;Oe=this,zt=!0;try{return this.fn()}finally{lr(this),Oe=t,zt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ds(t);this.deps=this.depsTail=void 0,dr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ns.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ls(this)&&this.run()}get dirty(){return Ls(this)}}let ir=0,io,ro;function rr(e,t=!1){if(e.flags|=8,t){e.next=ro,ro=e;return}e.next=io,io=e}function js(){ir++}function zs(){if(--ir>0)return;if(ro){let t=ro;for(ro=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;io;){let t=io;for(io=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function ar(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function lr(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Ds(s),uu(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Ls(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(cr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function cr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ao)||(e.globalVersion=ao,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ls(e))))return;e.flags|=2;const t=e.dep,n=Oe,s=zt;Oe=e,zt=!0;try{ar(e);const o=e.fn(e._value);(t.version===0||ln(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Oe=n,zt=s,lr(e),e.flags&=-3}}function Ds(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)Ds(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function uu(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let zt=!0;const ur=[];function Jt(){ur.push(zt),zt=!1}function Xt(){const e=ur.pop();zt=e===void 0?!0:e}function dr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Oe;Oe=void 0;try{t()}finally{Oe=n}}}let ao=0;class du{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Fs{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Oe||!zt||Oe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Oe)n=this.activeLink=new du(Oe,this),Oe.deps?(n.prevDep=Oe.depsTail,Oe.depsTail.nextDep=n,Oe.depsTail=n):Oe.deps=Oe.depsTail=n,fr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Oe.depsTail,n.nextDep=void 0,Oe.depsTail.nextDep=n,Oe.depsTail=n,Oe.deps===n&&(Oe.deps=s)}return n}trigger(t){this.version++,ao++,this.notify(t)}notify(t){js();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{zs()}}}function fr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)fr(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Us=new WeakMap,yn=Symbol(""),qs=Symbol(""),lo=Symbol("");function et(e,t,n){if(zt&&Oe){let s=Us.get(e);s||Us.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Fs),o.map=s,o.key=n),o.track()}}function Qt(e,t,n,s,o,r){const a=Us.get(e);if(!a){ao++;return}const l=c=>{c&&c.trigger()};if(js(),t==="clear")a.forEach(l);else{const c=he(e),p=c&&Es(n);if(c&&n==="length"){const h=Number(s);a.forEach((b,_)=>{(_==="length"||_===lo||!jt(_)&&_>=h)&&l(b)})}else switch((n!==void 0||a.has(void 0))&&l(a.get(n)),p&&l(a.get(lo)),t){case"add":c?p&&l(a.get("length")):(l(a.get(yn)),Nn(e)&&l(a.get(qs)));break;case"delete":c||(l(a.get(yn)),Nn(e)&&l(a.get(qs)));break;case"set":Nn(e)&&l(a.get(yn));break}}zs()}function zn(e){const t=ke(e);return t===e?t:(et(t,"iterate",lo),Ct(e)?t:t.map(Lt))}function Fo(e){return et(e=ke(e),"iterate",lo),e}function cn(e,t){return tn(e)?_n(e)?Ln(Lt(t)):Ln(t):Lt(t)}const fu={__proto__:null,[Symbol.iterator](){return Bs(this,Symbol.iterator,e=>cn(this,e))},concat(...e){return zn(this).concat(...e.map(t=>he(t)?zn(t):t))},entries(){return Bs(this,"entries",e=>(e[1]=cn(this,e[1]),e))},every(e,t){return en(this,"every",e,t,void 0,arguments)},filter(e,t){return en(this,"filter",e,t,n=>n.map(s=>cn(this,s)),arguments)},find(e,t){return en(this,"find",e,t,n=>cn(this,n),arguments)},findIndex(e,t){return en(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return en(this,"findLast",e,t,n=>cn(this,n),arguments)},findLastIndex(e,t){return en(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return en(this,"forEach",e,t,void 0,arguments)},includes(...e){return Hs(this,"includes",e)},indexOf(...e){return Hs(this,"indexOf",e)},join(e){return zn(this).join(e)},lastIndexOf(...e){return Hs(this,"lastIndexOf",e)},map(e,t){return en(this,"map",e,t,void 0,arguments)},pop(){return co(this,"pop")},push(...e){return co(this,"push",e)},reduce(e,...t){return mr(this,"reduce",e,t)},reduceRight(e,...t){return mr(this,"reduceRight",e,t)},shift(){return co(this,"shift")},some(e,t){return en(this,"some",e,t,void 0,arguments)},splice(...e){return co(this,"splice",e)},toReversed(){return zn(this).toReversed()},toSorted(e){return zn(this).toSorted(e)},toSpliced(...e){return zn(this).toSpliced(...e)},unshift(...e){return co(this,"unshift",e)},values(){return Bs(this,"values",e=>cn(this,e))}};function Bs(e,t,n){const s=Fo(e),o=s[t]();return s!==e&&!Ct(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=n(r.value)),r}),o}const mu=Array.prototype;function en(e,t,n,s,o,r){const a=Fo(e),l=a!==e&&!Ct(e),c=a[t];if(c!==mu[t]){const b=c.apply(e,r);return l?Lt(b):b}let p=n;a!==e&&(l?p=function(b,_){return n.call(this,cn(e,b),_,e)}:n.length>2&&(p=function(b,_){return n.call(this,b,_,e)}));const h=c.call(a,p,s);return l&&o?o(h):h}function mr(e,t,n,s){const o=Fo(e);let r=n;return o!==e&&(Ct(e)?n.length>3&&(r=function(a,l,c){return n.call(this,a,l,c,e)}):r=function(a,l,c){return n.call(this,a,cn(e,l),c,e)}),o[t](r,...s)}function Hs(e,t,n){const s=ke(e);et(s,"iterate",lo);const o=s[t](...n);return(o===-1||o===!1)&&Ws(n[0])?(n[0]=ke(n[0]),s[t](...n)):o}function co(e,t,n=[]){Jt(),js();const s=ke(e)[t].apply(e,n);return zs(),Xt(),s}const pu=As("__proto__,__v_isRef,__isVue"),pr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(jt));function hu(e){jt(e)||(e=String(e));const t=ke(this);return et(t,"has",e),t.hasOwnProperty(e)}class hr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return r;if(n==="__v_raw")return s===(o?r?kr:_r:r?yr:vr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const a=he(t);if(!o){let c;if(a&&(c=fu[n]))return c;if(n==="hasOwnProperty")return hu}const l=Reflect.get(t,n,tt(t)?t:s);if((jt(n)?pr.has(n):pu(n))||(o||et(t,"get",n),r))return l;if(tt(l)){const c=a&&Es(n)?l:l.value;return o&&je(c)?Ks(c):c}return je(l)?o?Ks(l):Re(l):l}}class br extends hr{constructor(t=!1){super(!1,t)}set(t,n,s,o){let r=t[n];const a=he(t)&&Es(n);if(!this._isShallow){const p=tn(r);if(!Ct(s)&&!tn(s)&&(r=ke(r),s=ke(s)),!a&&tt(r)&&!tt(s))return p||(r.value=s),!0}const l=a?Number(n)<t.length:Ce(t,n),c=Reflect.set(t,n,s,tt(t)?t:o);return t===ke(o)&&(l?ln(s,r)&&Qt(t,"set",n,s):Qt(t,"add",n,s)),c}deleteProperty(t,n){const s=Ce(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&Qt(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!jt(n)||!pr.has(n))&&et(t,"has",n),s}ownKeys(t){return et(t,"iterate",he(t)?"length":yn),Reflect.ownKeys(t)}}class gr extends hr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const bu=new br,gu=new gr,vu=new br(!0),yu=new gr(!0),Vs=e=>e,Uo=e=>Reflect.getPrototypeOf(e);function _u(e,t,n){return function(...s){const o=this.__v_raw,r=ke(o),a=Nn(r),l=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,p=o[e](...s),h=n?Vs:t?Ln:Lt;return!t&&et(r,"iterate",c?qs:yn),{next(){const{value:b,done:_}=p.next();return _?{value:b,done:_}:{value:l?[h(b[0]),h(b[1])]:h(b),done:_}},[Symbol.iterator](){return this}}}}function qo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ku(e,t){const n={get(o){const r=this.__v_raw,a=ke(r),l=ke(o);e||(ln(o,l)&&et(a,"get",o),et(a,"get",l));const{has:c}=Uo(a),p=t?Vs:e?Ln:Lt;if(c.call(a,o))return p(r.get(o));if(c.call(a,l))return p(r.get(l));r!==a&&r.get(o)},get size(){const o=this.__v_raw;return!e&&et(ke(o),"iterate",yn),o.size},has(o){const r=this.__v_raw,a=ke(r),l=ke(o);return e||(ln(o,l)&&et(a,"has",o),et(a,"has",l)),o===l?r.has(o):r.has(o)||r.has(l)},forEach(o,r){const a=this,l=a.__v_raw,c=ke(l),p=t?Vs:e?Ln:Lt;return!e&&et(c,"iterate",yn),l.forEach((h,b)=>o.call(r,p(h),p(b),a))}};return ut(n,e?{add:qo("add"),set:qo("set"),delete:qo("delete"),clear:qo("clear")}:{add(o){!t&&!Ct(o)&&!tn(o)&&(o=ke(o));const r=ke(this);return Uo(r).has.call(r,o)||(r.add(o),Qt(r,"add",o,o)),this},set(o,r){!t&&!Ct(r)&&!tn(r)&&(r=ke(r));const a=ke(this),{has:l,get:c}=Uo(a);let p=l.call(a,o);p||(o=ke(o),p=l.call(a,o));const h=c.call(a,o);return a.set(o,r),p?ln(r,h)&&Qt(a,"set",o,r):Qt(a,"add",o,r),this},delete(o){const r=ke(this),{has:a,get:l}=Uo(r);let c=a.call(r,o);c||(o=ke(o),c=a.call(r,o)),l&&l.call(r,o);const p=r.delete(o);return c&&Qt(r,"delete",o,void 0),p},clear(){const o=ke(this),r=o.size!==0,a=o.clear();return r&&Qt(o,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=_u(o,e,t)}),n}function Bo(e,t){const n=ku(e,t);return(s,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(Ce(n,o)&&o in s?n:s,o,r)}const wu={get:Bo(!1,!1)},$u={get:Bo(!1,!0)},xu={get:Bo(!0,!1)},Iu={get:Bo(!0,!0)},vr=new WeakMap,yr=new WeakMap,_r=new WeakMap,kr=new WeakMap;function Tu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Cu(e){return e.__v_skip||!Object.isExtensible(e)?0:Tu(Qc(e))}function Re(e){return tn(e)?e:Ho(e,!1,bu,wu,vr)}function Su(e){return Ho(e,!1,vu,$u,yr)}function Ks(e){return Ho(e,!0,gu,xu,_r)}function kC(e){return Ho(e,!0,yu,Iu,kr)}function Ho(e,t,n,s,o){if(!je(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Cu(e);if(r===0)return e;const a=o.get(e);if(a)return a;const l=new Proxy(e,r===2?s:n);return o.set(e,l),l}function _n(e){return tn(e)?_n(e.__v_raw):!!(e&&e.__v_isReactive)}function tn(e){return!!(e&&e.__v_isReadonly)}function Ct(e){return!!(e&&e.__v_isShallow)}function Ws(e){return e?!!e.__v_raw:!1}function ke(e){const t=e&&e.__v_raw;return t?ke(t):e}function Au(e){return!Ce(e,"__v_skip")&&Object.isExtensible(e)&&Xi(e,"__v_skip",!0),e}const Lt=e=>je(e)?Re(e):e,Ln=e=>je(e)?Ks(e):e;function tt(e){return e?e.__v_isRef===!0:!1}function ue(e){return wr(e,!1)}function Bt(e){return wr(e,!0)}function wr(e,t){return tt(e)?e:new Ou(e,t)}class Ou{constructor(t,n){this.dep=new Fs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ke(t),this._value=n?t:Lt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Ct(t)||tn(t);t=s?t:ke(t),ln(t,n)&&(this._rawValue=t,this._value=s?t:Lt(t),this.dep.trigger())}}function i(e){return tt(e)?e.value:e}const Eu={get:(e,t,n)=>t==="__v_raw"?e:i(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return tt(o)&&!tt(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function $r(e){return _n(e)?e:new Proxy(e,Eu)}class Mu{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Fs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ao-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Oe!==this)return rr(this,!0),!0}get value(){const t=this.dep.track();return cr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Pu(e,t,n=!1){let s,o;return Te(e)?s=e:(s=e.get,o=e.set),new Mu(s,o,n)}const Vo={},Ko=new WeakMap;let kn;function Ru(e,t=!1,n=kn){if(n){let s=Ko.get(n);s||Ko.set(n,s=[]),s.push(e)}}function Nu(e,t,n=Me){const{immediate:s,deep:o,once:r,scheduler:a,augmentJob:l,call:c}=n,p=k=>o?k:Ct(k)||o===!1||o===0?nn(k,1):nn(k);let h,b,_,$,v=!1,I=!1;if(tt(e)?(b=()=>e.value,v=Ct(e)):_n(e)?(b=()=>p(e),v=!0):he(e)?(I=!0,v=e.some(k=>_n(k)||Ct(k)),b=()=>e.map(k=>{if(tt(k))return k.value;if(_n(k))return p(k);if(Te(k))return c?c(k,2):k()})):Te(e)?t?b=c?()=>c(e,2):e:b=()=>{if(_){Jt();try{_()}finally{Xt()}}const k=kn;kn=h;try{return c?c(e,3,[$]):e($)}finally{kn=k}}:b=gn,t&&o){const k=b,O=o===!0?1/0:o;b=()=>nn(k(),O)}const j=cu(),P=()=>{h.stop(),j&&j.active&&Yi(j.effects,h)};if(r&&t){const k=t;t=(...O)=>{k(...O),P()}}let T=I?new Array(e.length).fill(Vo):Vo;const g=k=>{if(!(!(h.flags&1)||!h.dirty&&!k))if(t){const O=h.run();if(o||v||(I?O.some((w,y)=>ln(w,T[y])):ln(O,T))){_&&_();const w=kn;kn=h;try{const y=[O,T===Vo?void 0:I&&T[0]===Vo?[]:T,$];T=O,c?c(t,3,y):t(...y)}finally{kn=w}}}else h.run()};return l&&l(g),h=new sr(b),h.scheduler=a?()=>a(g,!1):g,$=k=>Ru(k,!1,h),_=h.onStop=()=>{const k=Ko.get(h);if(k){if(c)c(k,4);else for(const O of k)O();Ko.delete(h)}},t?s?g(!0):T=h.run():a?a(g.bind(null,!0),!0):h.run(),P.pause=h.pause.bind(h),P.resume=h.resume.bind(h),P.stop=P,P}function nn(e,t=1/0,n){if(t<=0||!je(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,tt(e))nn(e.value,t,n);else if(he(e))for(let s=0;s<e.length;s++)nn(e[s],t,n);else if(jn(e)||Nn(e))e.forEach(s=>{nn(s,t,n)});else if(Po(e)){for(const s in e)nn(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&nn(e[s],t,n)}return e}const uo=[];let Ys=!1;function wC(e,...t){if(Ys)return;Ys=!0,Jt();const n=uo.length?uo[uo.length-1].component:null,s=n&&n.appContext.config.warnHandler,o=ju();if(s)Dn(s,n,11,[e+t.map(r=>{var a,l;return(l=(a=r.toString)==null?void 0:a.call(r))!=null?l:JSON.stringify(r)}).join(""),n&&n.proxy,o.map(({vnode:r})=>`at <${ra(n,r.type)}>`).join(`
|
|
2
|
+
`),o]);else{const r=[`[Vue warn]: ${e}`,...t];o.length&&r.push(`
|
|
3
|
+
`,...zu(o)),console.warn(...r)}Xt(),Ys=!1}function ju(){let e=uo[uo.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function zu(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
|
|
4
|
+
`],...Lu(n))}),t}function Lu({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,o=` at <${ra(e.component,e.type,s)}`,r=">"+n;return e.props?[o,...Du(e.props),r]:[o+r]}function Du(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...xr(s,e[s]))}),n.length>3&&t.push(" ..."),t}function xr(e,t,n){return Be(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:tt(t)?(t=xr(e,ke(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):Te(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ke(t),n?t:[`${e}=`,t])}function Dn(e,t,n,s){try{return s?e(...s):e()}catch(o){Wo(o,t,n)}}function on(e,t,n,s){if(Te(e)){const o=Dn(e,t,n,s);return o&&Zi(o)&&o.catch(r=>{Wo(r,t,n)}),o}if(he(e)){const o=[];for(let r=0;r<e.length;r++)o.push(on(e[r],t,n,s));return o}}function Wo(e,t,n,s=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||Me;if(t){let l=t.parent;const c=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const h=l.ec;if(h){for(let b=0;b<h.length;b++)if(h[b](e,c,p)===!1)return}l=l.parent}if(r){Jt(),Dn(r,null,10,[e,c,p]),Xt();return}}Fu(e,n,o,s,a)}function Fu(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const at=[];let Ht=-1;const Fn=[];let un=null,Un=0;const Ir=Promise.resolve();let Yo=null;function Fe(e){const t=Yo||Ir;return e?t.then(this?e.bind(this):e):t}function Uu(e){let t=Ht+1,n=at.length;for(;t<n;){const s=t+n>>>1,o=at[s],r=fo(o);r<e||r===e&&o.flags&2?t=s+1:n=s}return t}function Gs(e){if(!(e.flags&1)){const t=fo(e),n=at[at.length-1];!n||!(e.flags&2)&&t>=fo(n)?at.push(e):at.splice(Uu(t),0,e),e.flags|=1,Tr()}}function Tr(){Yo||(Yo=Ir.then(Ar))}function qu(e){he(e)?Fn.push(...e):un&&e.id===-1?un.splice(Un+1,0,e):e.flags&1||(Fn.push(e),e.flags|=1),Tr()}function Cr(e,t,n=Ht+1){for(;n<at.length;n++){const s=at[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;at.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Sr(e){if(Fn.length){const t=[...new Set(Fn)].sort((n,s)=>fo(n)-fo(s));if(Fn.length=0,un){un.push(...t);return}for(un=t,Un=0;Un<un.length;Un++){const n=un[Un];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}un=null,Un=0}}const fo=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Ar(e){try{for(Ht=0;Ht<at.length;Ht++){const t=at[Ht];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Dn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ht<at.length;Ht++){const t=at[Ht];t&&(t.flags&=-2)}Ht=-1,at.length=0,Sr(),Yo=null,(at.length||Fn.length)&&Ar()}}let Je=null,Or=null;function Go(e){const t=Je;return Je=e,Or=e&&e.type.__scopeId||null,t}function Bu(e,t=Je,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&Jr(-1);const r=Go(t);let a;try{a=e(...o)}finally{Go(r),s._d&&Jr(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function ge(e,t){if(Je===null)return e;const n=ts(Je),s=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,a,l,c=Me]=t[o];r&&(Te(r)&&(r={mounted:r,updated:r}),r.deep&&nn(a),s.push({dir:r,instance:n,value:a,oldValue:void 0,arg:l,modifiers:c}))}return e}function wn(e,t,n,s){const o=e.dirs,r=t&&t.dirs;for(let a=0;a<o.length;a++){const l=o[a];r&&(l.oldValue=r[a].value);let c=l.dir[s];c&&(Jt(),on(c,n,8,[e.el,l,e,t]),Xt())}}const Hu=Symbol("_vte"),Vu=e=>e.__isTeleport,Ku=Symbol("_leaveCb");function Zs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Zs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function $e(e,t){return Te(e)?ut({name:e.name},t,{setup:e}):e}function Wu(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Zo=new WeakMap;function mo(e,t,n,s,o=!1){if(he(e)){e.forEach((v,I)=>mo(v,t&&(he(t)?t[I]:t),n,s,o));return}if(qn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&mo(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?ts(s.component):s.el,a=o?null:r,{i:l,r:c}=e,p=t&&t.r,h=l.refs===Me?l.refs={}:l.refs,b=l.setupState,_=ke(b),$=b===Me?Wi:v=>Ce(_,v);if(p!=null&&p!==c){if(Er(t),Be(p))h[p]=null,$(p)&&(b[p]=null);else if(tt(p)){p.value=null;const v=t;v.k&&(h[v.k]=null)}}if(Te(c))Dn(c,l,12,[a,h]);else{const v=Be(c),I=tt(c);if(v||I){const j=()=>{if(e.f){const P=v?$(c)?b[c]:h[c]:c.value;if(o)he(P)&&Yi(P,r);else if(he(P))P.includes(r)||P.push(r);else if(v)h[c]=[r],$(c)&&(b[c]=h[c]);else{const T=[r];c.value=T,e.k&&(h[e.k]=T)}}else v?(h[c]=a,$(c)&&(b[c]=a)):I&&(c.value=a,e.k&&(h[e.k]=a))};if(a){const P=()=>{j(),Zo.delete(e)};P.id=-1,Zo.set(e,P),$t(P,n)}else Er(e),j()}}}function Er(e){const t=Zo.get(e);t&&(t.flags|=8,Zo.delete(e))}Lo().requestIdleCallback,Lo().cancelIdleCallback;const qn=e=>!!e.type.__asyncLoader,Yu=e=>e.type.__isKeepAlive;function Gu(e,t,n=ft,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...a)=>{Jt();const l=li(n),c=on(t,n,e,a);return l(),Xt(),c});return s?o.unshift(r):o.push(r),r}}const Mr=e=>(t,n=ft)=>{(!vo||e==="sp")&&Gu(e,(...s)=>t(...s),n)},nt=Mr("m"),Ge=Mr("bum"),Zu="components";function Ju(e,t){return Qu(Zu,e,!0,t)||e}const Xu=Symbol.for("v-ndc");function Qu(e,t,n=!0,s=!1){const o=Je||ft;if(o){const r=o.type;{const l=ia(r,!1);if(l&&(l===t||l===rt(t)||l===No(rt(t))))return r}const a=Pr(o[e]||r[e],t)||Pr(o.appContext[e],t);return!a&&s?r:a}}function Pr(e,t){return e&&(e[t]||e[rt(t)]||e[No(rt(t))])}function me(e,t,n,s){let o;const r=n,a=he(e);if(a||Be(e)){const l=a&&_n(e);let c=!1,p=!1;l&&(c=!Ct(e),p=tn(e),e=Fo(e)),o=new Array(e.length);for(let h=0,b=e.length;h<b;h++)o[h]=t(c?p?Ln(Lt(e[h])):Lt(e[h]):e[h],h,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let l=0;l<e;l++)o[l]=t(l+1,l,void 0,r)}else if(je(e))if(e[Symbol.iterator])o=Array.from(e,(l,c)=>t(l,c,void 0,r));else{const l=Object.keys(e);o=new Array(l.length);for(let c=0,p=l.length;c<p;c++){const h=l[c];o[c]=t(e[h],h,c,r)}}else o=[];return o}function ed(e,t,n={},s,o){if(Je.ce||Je.parent&&qn(Je.parent)&&Je.parent.ce){const p=Object.keys(n).length>0;return n.name=t,d(),_e(q,null,[Ee("slot",n,s)],p?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),d();const a=r&&Rr(r(n)),l=n.key||a&&a.key,c=_e(q,{key:(l&&!jt(l)?l:`_${t}`)+(!a&&s?"_fb":"")},a||[],a&&e._===1?64:-2);return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),r&&r._c&&(r._d=!0),c}function Rr(e){return e.some(t=>ii(t)?!(t.type===sn||t.type===q&&!Rr(t.children)):!0)?e:null}const Js=e=>e?na(e)?ts(e):Js(e.parent):null,po=ut(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Js(e.parent),$root:e=>Js(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>{Gs(e.update)}),$nextTick:e=>e.n||(e.n=Fe.bind(e.proxy)),$watch:e=>gn}),Xs=(e,t)=>e!==Me&&!e.__isScriptSetup&&Ce(e,t),td={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:r,accessCache:a,type:l,appContext:c}=e;if(t[0]!=="$"){const _=a[t];if(_!==void 0)switch(_){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return r[t]}else{if(Xs(s,t))return a[t]=1,s[t];if(Ce(r,t))return a[t]=3,r[t];if(n!==Me&&Ce(n,t))return a[t]=4,n[t];a[t]=0}}const p=po[t];let h,b;if(p)return t==="$attrs"&&et(e.attrs,"get",""),p(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==Me&&Ce(n,t))return a[t]=4,n[t];if(b=c.config.globalProperties,Ce(b,t))return b[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:r}=e;return Xs(o,t)?(o[t]=n,!0):Ce(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:r,type:a}},l){let c;return!!(n[l]||Xs(t,l)||Ce(r,l)||Ce(s,l)||Ce(po,l)||Ce(o.config.globalProperties,l)||(c=a.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ce(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Nr(){return{app:null,config:{isNativeTag:Wi,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let nd=0;function od(e,t){return function(s,o=null){Te(s)||(s=ut({},s)),o!=null&&!je(o)&&(o=null);const r=Nr(),a=new WeakSet,l=[];let c=!1;const p=r.app={_uid:nd++,_component:s,_props:o,_container:null,_context:r,_instance:null,version:Dd,get config(){return r.config},set config(h){},use(h,...b){return a.has(h)||(h&&Te(h.install)?(a.add(h),h.install(p,...b)):Te(h)&&(a.add(h),h(p,...b))),p},mixin(h){return p},component(h,b){return b?(r.components[h]=b,p):r.components[h]},directive(h,b){return b?(r.directives[h]=b,p):r.directives[h]},mount(h,b,_){if(!c){const $=p._ceVNode||Ee(s,o);return $.appContext=r,_===!0?_="svg":_===!1&&(_=void 0),e($,h,_),c=!0,p._container=h,h.__vue_app__=p,ts($.component)}},onUnmount(h){l.push(h)},unmount(){c&&(on(l,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(h,b){return r.provides[h]=b,p},runWithContext(h){const b=Bn;Bn=p;try{return h()}finally{Bn=b}}};return p}}let Bn=null;function jr(e,t){if(ft){let n=ft.provides;const s=ft.parent&&ft.parent.provides;s===n&&(n=ft.provides=Object.create(s)),n[e]=t}}function Qs(e,t,n=!1){const s=ea();if(s||Bn){let o=Bn?Bn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&Te(t)?t.call(s&&s.proxy):t}}const sd=Symbol.for("v-scx"),id=()=>Qs(sd);function ye(e,t,n){return rd(e,t,n)}function rd(e,t,n=Me){const{immediate:s,deep:o,flush:r,once:a}=n,l=ut({},n),c=t&&s||!t&&r!=="post";let p;if(vo){if(r==="sync"){const $=id();p=$.__watcherHandles||($.__watcherHandles=[])}else if(!c){const $=()=>{};return $.stop=gn,$.resume=gn,$.pause=gn,$}}const h=ft;l.call=($,v,I)=>on($,h,v,I);let b=!1;r==="post"?l.scheduler=$=>{$t($,h&&h.suspense)}:r!=="sync"&&(b=!0,l.scheduler=($,v)=>{v?$():Gs($)}),l.augmentJob=$=>{t&&($.flags|=4),b&&($.flags|=2,h&&($.id=h.uid,$.i=h))};const _=Nu(e,t,l);return vo&&(p?p.push(_):c&&_()),_}const ad=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${rt(t)}Modifiers`]||e[`${wt(t)}Modifiers`];function ld(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Me;let o=n;const r=t.startsWith("update:"),a=r&&ad(s,t.slice(7));a&&(a.trim&&(o=n.map(h=>Be(h)?h.trim():h)),a.number&&(o=n.map(zo)));let l,c=s[l=Ms(t)]||s[l=Ms(rt(t))];!c&&r&&(c=s[l=Ms(wt(t))]),c&&on(c,e,6,o);const p=s[l+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,on(p,e,6,o)}}function cd(e,t,n=!1){const s=t.emitsCache,o=s.get(e);if(o!==void 0)return o;const r=e.emits;let a={};return r?(he(r)?r.forEach(l=>a[l]=null):ut(a,r),je(e)&&s.set(e,a),a):(je(e)&&s.set(e,null),null)}function Jo(e,t){return!e||!Mo(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ce(e,t[0].toLowerCase()+t.slice(1))||Ce(e,wt(t))||Ce(e,t))}function $C(){}function zr(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[r],slots:a,attrs:l,emit:c,render:p,renderCache:h,props:b,data:_,setupState:$,ctx:v,inheritAttrs:I}=e,j=Go(e);let P,T;try{if(n.shapeFlag&4){const k=o||s,O=k;P=Vt(p.call(O,k,h,b,$,_,v)),T=l}else{const k=t;P=Vt(k.length>1?k(b,{attrs:l,slots:a,emit:c}):k(b,null)),T=t.props?l:ud(l)}}catch(k){ho.length=0,Wo(k,e,1),P=Ee(sn)}let g=P;if(T&&I!==!1){const k=Object.keys(T),{shapeFlag:O}=g;k.length&&O&7&&(r&&k.some(Os)&&(T=dd(T,r)),g=Hn(g,T,!1,!0))}return n.dirs&&(g=Hn(g,null,!1,!0),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&Zs(g,n.transition),P=g,Go(j),P}const ud=e=>{let t;for(const n in e)(n==="class"||n==="style"||Mo(n))&&((t||(t={}))[n]=e[n]);return t},dd=(e,t)=>{const n={};for(const s in e)(!Os(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function fd(e,t,n){const{props:s,children:o,component:r}=e,{props:a,children:l,patchFlag:c}=t,p=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Lr(s,a,p):!!a;if(c&8){const h=t.dynamicProps;for(let b=0;b<h.length;b++){const _=h[b];if(a[_]!==s[_]&&!Jo(p,_))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:s===a?!1:s?a?Lr(s,a,p):!0:!!a;return!1}function Lr(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;o<s.length;o++){const r=s[o];if(t[r]!==e[r]&&!Jo(n,r))return!0}return!1}function md({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s===e)(e=t.vnode).el=n,t=t.parent;else break}}const Dr={},Fr=()=>Object.create(Dr),Ur=e=>Object.getPrototypeOf(e)===Dr;function pd(e,t,n,s=!1){const o={},r=Fr();e.propsDefaults=Object.create(null),qr(e,t,o,r);for(const a in e.propsOptions[0])a in o||(o[a]=void 0);n?e.props=s?o:Su(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function hd(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:a}}=e,l=ke(o),[c]=e.propsOptions;let p=!1;if((s||a>0)&&!(a&16)){if(a&8){const h=e.vnode.dynamicProps;for(let b=0;b<h.length;b++){let _=h[b];if(Jo(e.emitsOptions,_))continue;const $=t[_];if(c)if(Ce(r,_))$!==r[_]&&(r[_]=$,p=!0);else{const v=rt(_);o[v]=ei(c,l,v,$,e,!1)}else $!==r[_]&&(r[_]=$,p=!0)}}}else{qr(e,t,o,r)&&(p=!0);let h;for(const b in l)(!t||!Ce(t,b)&&((h=wt(b))===b||!Ce(t,h)))&&(c?n&&(n[b]!==void 0||n[h]!==void 0)&&(o[b]=ei(c,l,b,void 0,e,!0)):delete o[b]);if(r!==l)for(const b in r)(!t||!Ce(t,b))&&(delete r[b],p=!0)}p&&Qt(e.attrs,"set","")}function qr(e,t,n,s){const[o,r]=e.propsOptions;let a=!1,l;if(t)for(let c in t){if(so(c))continue;const p=t[c];let h;o&&Ce(o,h=rt(c))?!r||!r.includes(h)?n[h]=p:(l||(l={}))[h]=p:Jo(e.emitsOptions,c)||(!(c in s)||p!==s[c])&&(s[c]=p,a=!0)}if(r){const c=ke(n),p=l||Me;for(let h=0;h<r.length;h++){const b=r[h];n[b]=ei(o,c,b,p[b],e,!Ce(p,b))}}return a}function ei(e,t,n,s,o,r){const a=e[n];if(a!=null){const l=Ce(a,"default");if(l&&s===void 0){const c=a.default;if(a.type!==Function&&!a.skipFactory&&Te(c)){const{propsDefaults:p}=o;if(n in p)s=p[n];else{const h=li(o);s=p[n]=c.call(null,t),h()}}else s=c;o.ce&&o.ce._setProp(n,s)}a[0]&&(r&&!l?s=!1:a[1]&&(s===""||s===wt(n))&&(s=!0))}return s}function bd(e,t,n=!1){const s=t.propsCache,o=s.get(e);if(o)return o;const r=e.props,a={},l=[];if(!r)return je(e)&&s.set(e,Rn),Rn;if(he(r))for(let p=0;p<r.length;p++){const h=rt(r[p]);Br(h)&&(a[h]=Me)}else if(r)for(const p in r){const h=rt(p);if(Br(h)){const b=r[p],_=a[h]=he(b)||Te(b)?{type:b}:ut({},b),$=_.type;let v=!1,I=!0;if(he($))for(let j=0;j<$.length;++j){const P=$[j],T=Te(P)&&P.name;if(T==="Boolean"){v=!0;break}else T==="String"&&(I=!1)}else v=Te($)&&$.name==="Boolean";_[0]=v,_[1]=I,(v||Ce(_,"default"))&&l.push(h)}}const c=[a,l];return je(e)&&s.set(e,c),c}function Br(e){return e[0]!=="$"&&!so(e)}const ti=e=>e==="_"||e==="_ctx"||e==="$stable",ni=e=>he(e)?e.map(Vt):[Vt(e)],gd=(e,t,n)=>{if(t._n)return t;const s=Bu((...o)=>ni(t(...o)),n);return s._c=!1,s},Hr=(e,t,n)=>{const s=e._ctx;for(const o in e){if(ti(o))continue;const r=e[o];if(Te(r))t[o]=gd(o,r,s);else if(r!=null){const a=ni(r);t[o]=()=>a}}},Vr=(e,t)=>{const n=ni(t);e.slots.default=()=>n},Kr=(e,t,n)=>{for(const s in t)(n||!ti(s))&&(e[s]=t[s])},vd=(e,t,n)=>{const s=e.slots=Fr();if(e.vnode.shapeFlag&32){const o=t._;o?(Kr(s,t,n),n&&Xi(s,"_",o,!0)):Hr(t,s)}else t&&Vr(e,t)},yd=(e,t,n)=>{const{vnode:s,slots:o}=e;let r=!0,a=Me;if(s.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:Kr(o,t,n):(r=!t.$stable,Hr(t,o)),a=t}else t&&(Vr(e,t),a={default:1});if(r)for(const l in o)!ti(l)&&a[l]==null&&delete o[l]},$t=xd;function _d(e){return kd(e)}function kd(e,t){const n=Lo();n.__VUE__=!0;const{insert:s,remove:o,patchProp:r,createElement:a,createText:l,createComment:c,setText:p,setElementText:h,parentNode:b,nextSibling:_,setScopeId:$=gn,insertStaticContent:v}=e,I=(S,R,F,G=null,V=null,H=null,te=void 0,Q=null,X=!!R.dynamicChildren)=>{if(S===R)return;S&&!go(S,R)&&(G=W(S),De(S,V,H,!0),S=null),R.patchFlag===-2&&(X=!1,R.dynamicChildren=null);const{type:Y,ref:ce,shapeFlag:ne}=R;switch(Y){case Xo:j(S,R,F,G);break;case sn:P(S,R,F,G);break;case si:S==null&&T(R,F,G,te);break;case q:B(S,R,F,G,V,H,te,Q,X);break;default:ne&1?O(S,R,F,G,V,H,te,Q,X):ne&6?ee(S,R,F,G,V,H,te,Q,X):(ne&64||ne&128)&&Y.process(S,R,F,G,V,H,te,Q,X,Pt)}ce!=null&&V?mo(ce,S&&S.ref,H,R||S,!R):ce==null&&S&&S.ref!=null&&mo(S.ref,null,H,S,!0)},j=(S,R,F,G)=>{if(S==null)s(R.el=l(R.children),F,G);else{const V=R.el=S.el;R.children!==S.children&&p(V,R.children)}},P=(S,R,F,G)=>{S==null?s(R.el=c(R.children||""),F,G):R.el=S.el},T=(S,R,F,G)=>{[S.el,S.anchor]=v(S.children,R,F,G,S.el,S.anchor)},g=({el:S,anchor:R},F,G)=>{let V;for(;S&&S!==R;)V=_(S),s(S,F,G),S=V;s(R,F,G)},k=({el:S,anchor:R})=>{let F;for(;S&&S!==R;)F=_(S),o(S),S=F;o(R)},O=(S,R,F,G,V,H,te,Q,X)=>{if(R.type==="svg"?te="svg":R.type==="math"&&(te="mathml"),S==null)w(R,F,G,V,H,te,Q,X);else{const Y=S.el&&S.el._isVueCE?S.el:null;try{Y&&Y._beginPatch(),N(S,R,V,H,te,Q,X)}finally{Y&&Y._endPatch()}}},w=(S,R,F,G,V,H,te,Q)=>{let X,Y;const{props:ce,shapeFlag:ne,transition:ae,dirs:de}=S;if(X=S.el=a(S.type,H,ce&&ce.is,ce),ne&8?h(X,S.children):ne&16&&x(S.children,X,null,G,V,oi(S,H),te,Q),de&&wn(S,null,G,"created"),y(X,S,S.scopeId,te,G),ce){for(const Se in ce)Se!=="value"&&!so(Se)&&r(X,Se,null,ce[Se],H,G);"value"in ce&&r(X,"value",null,ce.value,H),(Y=ce.onVnodeBeforeMount)&&Kt(Y,G,S)}de&&wn(S,null,G,"beforeMount");const ve=wd(V,ae);ve&&ae.beforeEnter(X),s(X,R,F),((Y=ce&&ce.onVnodeMounted)||ve||de)&&$t(()=>{Y&&Kt(Y,G,S),ve&&ae.enter(X),de&&wn(S,null,G,"mounted")},V)},y=(S,R,F,G,V)=>{if(F&&$(S,F),G)for(let H=0;H<G.length;H++)$(S,G[H]);if(V){let H=V.subTree;if(R===H||Zr(H.type)&&(H.ssContent===R||H.ssFallback===R)){const te=V.vnode;y(S,te,te.scopeId,te.slotScopeIds,V.parent)}}},x=(S,R,F,G,V,H,te,Q,X=0)=>{for(let Y=X;Y<S.length;Y++){const ce=S[Y]=Q?dn(S[Y]):Vt(S[Y]);I(null,ce,R,F,G,V,H,te,Q)}},N=(S,R,F,G,V,H,te)=>{const Q=R.el=S.el;let{patchFlag:X,dynamicChildren:Y,dirs:ce}=R;X|=S.patchFlag&16;const ne=S.props||Me,ae=R.props||Me;let de;if(F&&$n(F,!1),(de=ae.onVnodeBeforeUpdate)&&Kt(de,F,R,S),ce&&wn(R,S,F,"beforeUpdate"),F&&$n(F,!0),(ne.innerHTML&&ae.innerHTML==null||ne.textContent&&ae.textContent==null)&&h(Q,""),Y?M(S.dynamicChildren,Y,Q,F,G,oi(R,V),H):te||D(S,R,Q,null,F,G,oi(R,V),H,!1),X>0){if(X&16)E(Q,ne,ae,F,V);else if(X&2&&ne.class!==ae.class&&r(Q,"class",null,ae.class,V),X&4&&r(Q,"style",ne.style,ae.style,V),X&8){const ve=R.dynamicProps;for(let Se=0;Se<ve.length;Se++){const xe=ve[Se],st=ne[xe],it=ae[xe];(it!==st||xe==="value")&&r(Q,xe,st,it,V,F)}}X&1&&S.children!==R.children&&h(Q,R.children)}else!te&&Y==null&&E(Q,ne,ae,F,V);((de=ae.onVnodeUpdated)||ce)&&$t(()=>{de&&Kt(de,F,R,S),ce&&wn(R,S,F,"updated")},G)},M=(S,R,F,G,V,H,te)=>{for(let Q=0;Q<R.length;Q++){const X=S[Q],Y=R[Q],ce=X.el&&(X.type===q||!go(X,Y)||X.shapeFlag&198)?b(X.el):F;I(X,Y,ce,null,G,V,H,te,!0)}},E=(S,R,F,G,V)=>{if(R!==F){if(R!==Me)for(const H in R)!so(H)&&!(H in F)&&r(S,H,R[H],null,V,G);for(const H in F){if(so(H))continue;const te=F[H],Q=R[H];te!==Q&&H!=="value"&&r(S,H,Q,te,V,G)}"value"in F&&r(S,"value",R.value,F.value,V)}},B=(S,R,F,G,V,H,te,Q,X)=>{const Y=R.el=S?S.el:l(""),ce=R.anchor=S?S.anchor:l("");let{patchFlag:ne,dynamicChildren:ae,slotScopeIds:de}=R;de&&(Q=Q?Q.concat(de):de),S==null?(s(Y,F,G),s(ce,F,G),x(R.children||[],F,ce,V,H,te,Q,X)):ne>0&&ne&64&&ae&&S.dynamicChildren?(M(S.dynamicChildren,ae,F,V,H,te,Q),(R.key!=null||V&&R===V.subTree)&&Wr(S,R,!0)):D(S,R,F,ce,V,H,te,Q,X)},ee=(S,R,F,G,V,H,te,Q,X)=>{R.slotScopeIds=Q,S==null?R.shapeFlag&512?V.ctx.activate(R,F,G,te,X):re(R,F,G,V,H,te,X):be(S,R,X)},re=(S,R,F,G,V,H,te)=>{const Q=S.component=Ed(S,G,V);if(Yu(S)&&(Q.ctx.renderer=Pt),Md(Q,!1,te),Q.asyncDep){if(V&&V.registerDep(Q,we,te),!S.el){const X=Q.subTree=Ee(sn);P(null,X,R,F),S.placeholder=X.el}}else we(Q,S,R,F,V,H,te)},be=(S,R,F)=>{const G=R.component=S.component;if(fd(S,R,F))if(G.asyncDep&&!G.asyncResolved){K(G,R,F);return}else G.next=R,G.update();else R.el=S.el,G.vnode=R},we=(S,R,F,G,V,H,te)=>{const Q=()=>{if(S.isMounted){let{next:ne,bu:ae,u:de,parent:ve,vnode:Se}=S;{const Nt=Yr(S);if(Nt){ne&&(ne.el=Se.el,K(S,ne,te)),Nt.asyncDep.then(()=>{S.isUnmounted||Q()});return}}let xe=ne,st;$n(S,!1),ne?(ne.el=Se.el,K(S,ne,te)):ne=Se,ae&&jo(ae),(st=ne.props&&ne.props.onVnodeBeforeUpdate)&&Kt(st,ve,ne,Se),$n(S,!0);const it=zr(S),Rt=S.subTree;S.subTree=it,I(Rt,it,b(Rt.el),W(Rt),S,V,H),ne.el=it.el,xe===null&&md(S,it.el),de&&$t(de,V),(st=ne.props&&ne.props.onVnodeUpdated)&&$t(()=>Kt(st,ve,ne,Se),V)}else{let ne;const{el:ae,props:de}=R,{bm:ve,m:Se,parent:xe,root:st,type:it}=S,Rt=qn(R);$n(S,!1),ve&&jo(ve),!Rt&&(ne=de&&de.onVnodeBeforeMount)&&Kt(ne,xe,R),$n(S,!0);{st.ce&&st.ce._def.shadowRoot!==!1&&st.ce._injectChildStyle(it);const Nt=S.subTree=zr(S);I(null,Nt,F,G,S,V,H),R.el=Nt.el}if(Se&&$t(Se,V),!Rt&&(ne=de&&de.onVnodeMounted)){const Nt=R;$t(()=>Kt(ne,xe,Nt),V)}(R.shapeFlag&256||xe&&qn(xe.vnode)&&xe.vnode.shapeFlag&256)&&S.a&&$t(S.a,V),S.isMounted=!0,R=F=G=null}};S.scope.on();const X=S.effect=new sr(Q);S.scope.off();const Y=S.update=X.run.bind(X),ce=S.job=X.runIfDirty.bind(X);ce.i=S,ce.id=S.uid,X.scheduler=()=>Gs(ce),$n(S,!0),Y()},K=(S,R,F)=>{R.component=S;const G=S.vnode.props;S.vnode=R,S.next=null,hd(S,R.props,G,F),yd(S,R.children,F),Jt(),Cr(S),Xt()},D=(S,R,F,G,V,H,te,Q,X=!1)=>{const Y=S&&S.children,ce=S?S.shapeFlag:0,ne=R.children,{patchFlag:ae,shapeFlag:de}=R;if(ae>0){if(ae&128){Le(Y,ne,F,G,V,H,te,Q,X);return}else if(ae&256){U(Y,ne,F,G,V,H,te,Q,X);return}}de&8?(ce&16&&J(Y,V,H),ne!==Y&&h(F,ne)):ce&16?de&16?Le(Y,ne,F,G,V,H,te,Q,X):J(Y,V,H,!0):(ce&8&&h(F,""),de&16&&x(ne,F,G,V,H,te,Q,X))},U=(S,R,F,G,V,H,te,Q,X)=>{S=S||Rn,R=R||Rn;const Y=S.length,ce=R.length,ne=Math.min(Y,ce);let ae;for(ae=0;ae<ne;ae++){const de=R[ae]=X?dn(R[ae]):Vt(R[ae]);I(S[ae],de,F,null,V,H,te,Q,X)}Y>ce?J(S,V,H,!0,!1,ne):x(R,F,G,V,H,te,Q,X,ne)},Le=(S,R,F,G,V,H,te,Q,X)=>{let Y=0;const ce=R.length;let ne=S.length-1,ae=ce-1;for(;Y<=ne&&Y<=ae;){const de=S[Y],ve=R[Y]=X?dn(R[Y]):Vt(R[Y]);if(go(de,ve))I(de,ve,F,null,V,H,te,Q,X);else break;Y++}for(;Y<=ne&&Y<=ae;){const de=S[ne],ve=R[ae]=X?dn(R[ae]):Vt(R[ae]);if(go(de,ve))I(de,ve,F,null,V,H,te,Q,X);else break;ne--,ae--}if(Y>ne){if(Y<=ae){const de=ae+1,ve=de<ce?R[de].el:G;for(;Y<=ae;)I(null,R[Y]=X?dn(R[Y]):Vt(R[Y]),F,ve,V,H,te,Q,X),Y++}}else if(Y>ae)for(;Y<=ne;)De(S[Y],V,H,!0),Y++;else{const de=Y,ve=Y,Se=new Map;for(Y=ve;Y<=ae;Y++){const ct=R[Y]=X?dn(R[Y]):Vt(R[Y]);ct.key!=null&&Se.set(ct.key,Y)}let xe,st=0;const it=ae-ve+1;let Rt=!1,Nt=0;const Mn=new Array(it);for(Y=0;Y<it;Y++)Mn[Y]=0;for(Y=de;Y<=ne;Y++){const ct=S[Y];if(st>=it){De(ct,V,H,!0);continue}let Tt;if(ct.key!=null)Tt=Se.get(ct.key);else for(xe=ve;xe<=ae;xe++)if(Mn[xe-ve]===0&&go(ct,R[xe])){Tt=xe;break}Tt===void 0?De(ct,V,H,!0):(Mn[Tt-ve]=Y+1,Tt>=Nt?Nt=Tt:Rt=!0,I(ct,R[Tt],F,null,V,H,te,Q,X),st++)}const eo=Rt?$d(Mn):Rn;for(xe=eo.length-1,Y=it-1;Y>=0;Y--){const ct=ve+Y,Tt=R[ct],C=R[ct+1],L=ct+1<ce?C.el||C.placeholder:G;Mn[Y]===0?I(null,Tt,F,L,V,H,te,Q,X):Rt&&(xe<0||Y!==eo[xe]?Ne(Tt,F,L,2):xe--)}}},Ne=(S,R,F,G,V=null)=>{const{el:H,type:te,transition:Q,children:X,shapeFlag:Y}=S;if(Y&6){Ne(S.component.subTree,R,F,G);return}if(Y&128){S.suspense.move(R,F,G);return}if(Y&64){te.move(S,R,F,Pt);return}if(te===q){s(H,R,F);for(let ne=0;ne<X.length;ne++)Ne(X[ne],R,F,G);s(S.anchor,R,F);return}if(te===si){g(S,R,F);return}if(G!==2&&Y&1&&Q)if(G===0)Q.beforeEnter(H),s(H,R,F),$t(()=>Q.enter(H),V);else{const{leave:ne,delayLeave:ae,afterLeave:de}=Q,ve=()=>{S.ctx.isUnmounted?o(H):s(H,R,F)},Se=()=>{H._isLeaving&&H[Ku](!0),ne(H,()=>{ve(),de&&de()})};ae?ae(H,ve,Se):Se()}else s(H,R,F)},De=(S,R,F,G=!1,V=!1)=>{const{type:H,props:te,ref:Q,children:X,dynamicChildren:Y,shapeFlag:ce,patchFlag:ne,dirs:ae,cacheIndex:de}=S;if(ne===-2&&(V=!1),Q!=null&&(Jt(),mo(Q,null,F,S,!0),Xt()),de!=null&&(R.renderCache[de]=void 0),ce&256){R.ctx.deactivate(S);return}const ve=ce&1&&ae,Se=!qn(S);let xe;if(Se&&(xe=te&&te.onVnodeBeforeUnmount)&&Kt(xe,R,S),ce&6)Z(S.component,F,G);else{if(ce&128){S.suspense.unmount(F,G);return}ve&&wn(S,null,R,"beforeUnmount"),ce&64?S.type.remove(S,R,F,Pt,G):Y&&!Y.hasOnce&&(H!==q||ne>0&&ne&64)?J(Y,R,F,!1,!0):(H===q&&ne&384||!V&&ce&16)&&J(X,R,F),G&&Qe(S)}(Se&&(xe=te&&te.onVnodeUnmounted)||ve)&&$t(()=>{xe&&Kt(xe,R,S),ve&&wn(S,null,R,"unmounted")},F)},Qe=S=>{const{type:R,el:F,anchor:G,transition:V}=S;if(R===q){oe(F,G);return}if(R===si){k(S);return}const H=()=>{o(F),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(S.shapeFlag&1&&V&&!V.persisted){const{leave:te,delayLeave:Q}=V,X=()=>te(F,H);Q?Q(S.el,H,X):X()}else H()},oe=(S,R)=>{let F;for(;S!==R;)F=_(S),o(S),S=F;o(R)},Z=(S,R,F)=>{const{bum:G,scope:V,job:H,subTree:te,um:Q,m:X,a:Y}=S;Gr(X),Gr(Y),G&&jo(G),V.stop(),H&&(H.flags|=8,De(te,S,R,F)),Q&&$t(Q,R),$t(()=>{S.isUnmounted=!0},R)},J=(S,R,F,G=!1,V=!1,H=0)=>{for(let te=H;te<S.length;te++)De(S[te],R,F,G,V)},W=S=>{if(S.shapeFlag&6)return W(S.component.subTree);if(S.shapeFlag&128)return S.suspense.next();const R=_(S.anchor||S.el),F=R&&R[Hu];return F?_(F):R};let pe=!1;const qt=(S,R,F)=>{S==null?R._vnode&&De(R._vnode,null,null,!0):I(R._vnode||null,S,R,null,null,null,F),R._vnode=S,pe||(pe=!0,Cr(),Sr(),pe=!1)},Pt={p:I,um:De,m:Ne,r:Qe,mt:re,mc:x,pc:D,pbc:M,n:W,o:e};return{render:qt,hydrate:void 0,createApp:od(qt)}}function oi({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function $n({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function wd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Wr(e,t,n=!1){const s=e.children,o=t.children;if(he(s)&&he(o))for(let r=0;r<s.length;r++){const a=s[r];let l=o[r];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=o[r]=dn(o[r]),l.el=a.el),!n&&l.patchFlag!==-2&&Wr(a,l)),l.type===Xo&&l.patchFlag!==-1&&(l.el=a.el),l.type===sn&&!l.el&&(l.el=a.el)}}function $d(e){const t=e.slice(),n=[0];let s,o,r,a,l;const c=e.length;for(s=0;s<c;s++){const p=e[s];if(p!==0){if(o=n[n.length-1],e[o]<p){t[s]=o,n.push(s);continue}for(r=0,a=n.length-1;r<a;)l=r+a>>1,e[n[l]]<p?r=l+1:a=l;p<e[n[r]]&&(r>0&&(t[s]=n[r-1]),n[r]=s)}}for(r=n.length,a=n[r-1];r-- >0;)n[r]=a,a=t[a];return n}function Yr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Yr(t)}function Gr(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const Zr=e=>e.__isSuspense;function xd(e,t){t&&t.pendingBranch?he(e)?t.effects.push(...e):t.effects.push(e):qu(e)}const q=Symbol.for("v-fgt"),Xo=Symbol.for("v-txt"),sn=Symbol.for("v-cmt"),si=Symbol.for("v-stc"),ho=[];let xt=null;function d(e=!1){ho.push(xt=e?null:[])}function Id(){ho.pop(),xt=ho[ho.length-1]||null}let bo=1;function Jr(e,t=!1){bo+=e,e<0&&xt&&t&&(xt.hasOnce=!0)}function Xr(e){return e.dynamicChildren=bo>0?xt||Rn:null,Id(),bo>0&&xt&&xt.push(e),e}function m(e,t,n,s,o,r){return Xr(f(e,t,n,s,o,r,!0))}function _e(e,t,n,s,o){return Xr(Ee(e,t,n,s,o,!0))}function ii(e){return e?e.__v_isVNode===!0:!1}function go(e,t){return e.type===t.type&&e.key===t.key}const Qr=({key:e})=>e??null,Qo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Be(e)||tt(e)||Te(e)?{i:Je,r:e,k:t,f:!!n}:e:null);function f(e,t=null,n=null,s=0,o=null,r=e===q?0:1,a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Qr(t),ref:t&&Qo(t),scopeId:Or,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Je};return l?(ri(c,n),r&128&&e.normalize(c)):n&&(c.shapeFlag|=Be(n)?8:16),bo>0&&!a&&xt&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&xt.push(c),c}const Ee=Td;function Td(e,t=null,n=null,s=0,o=null,r=!1){if((!e||e===Xu)&&(e=sn),ii(e)){const l=Hn(e,t,!0);return n&&ri(l,n),bo>0&&!r&&xt&&(l.shapeFlag&6?xt[xt.indexOf(e)]=l:xt.push(l)),l.patchFlag=-2,l}if(Ld(e)&&(e=e.__vccOpts),t){t=Cd(t);let{class:l,style:c}=t;l&&!Be(l)&&(t.class=Ve(l)),je(c)&&(Ws(c)&&!he(c)&&(c=ut({},c)),t.style=Do(c))}const a=Be(e)?1:Zr(e)?128:Vu(e)?64:je(e)?4:Te(e)?2:0;return f(e,t,n,s,o,a,r,!0)}function Cd(e){return e?Ws(e)||Ur(e)?ut({},e):e:null}function Hn(e,t,n=!1,s=!1){const{props:o,ref:r,patchFlag:a,children:l,transition:c}=e,p=t?Sd(o||{},t):o,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&Qr(p),ref:t&&t.ref?n&&r?he(r)?r.concat(Qo(t)):[r,Qo(t)]:Qo(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==q?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Hn(e.ssContent),ssFallback:e.ssFallback&&Hn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Zs(h,c.clone(h)),h}function St(e=" ",t=0){return Ee(Xo,null,e,t)}function A(e="",t=!1){return t?(d(),_e(sn,null,e)):Ee(sn,null,e)}function Vt(e){return e==null||typeof e=="boolean"?Ee(sn):he(e)?Ee(q,null,e.slice()):ii(e)?dn(e):Ee(Xo,null,String(e))}function dn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Hn(e)}function ri(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(he(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),ri(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Ur(t)?t._ctx=Je:o===3&&Je&&(Je.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Te(t)?(t={default:t,_ctx:Je},n=32):(t=String(t),s&64?(n=16,t=[St(t)]):n=8);e.children=t,e.shapeFlag|=n}function Sd(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const o in s)if(o==="class")t.class!==s.class&&(t.class=Ve([t.class,s.class]));else if(o==="style")t.style=Do([t.style,s.style]);else if(Mo(o)){const r=t[o],a=s[o];a&&r!==a&&!(he(r)&&r.includes(a))&&(t[o]=r?[].concat(r,a):a)}else o!==""&&(t[o]=s[o])}return t}function Kt(e,t,n,s=null){on(e,t,7,[n,s])}const Ad=Nr();let Od=0;function Ed(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||Ad,r={uid:Od++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new lu(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:bd(s,o),emitsOptions:cd(s,o),emit:null,emitted:null,propsDefaults:Me,inheritAttrs:s.inheritAttrs,ctx:Me,data:Me,props:Me,attrs:Me,slots:Me,refs:Me,setupState:Me,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=ld.bind(null,r),e.ce&&e.ce(r),r}let ft=null;const ea=()=>ft||Je;let es,ai;{const e=Lo(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),r=>{o.length>1?o.forEach(a=>a(r)):o[0](r)}};es=t("__VUE_INSTANCE_SETTERS__",n=>ft=n),ai=t("__VUE_SSR_SETTERS__",n=>vo=n)}const li=e=>{const t=ft;return es(e),e.scope.on(),()=>{e.scope.off(),es(t)}},ta=()=>{ft&&ft.scope.off(),es(null)};function na(e){return e.vnode.shapeFlag&4}let vo=!1;function Md(e,t=!1,n=!1){t&&ai(t);const{props:s,children:o}=e.vnode,r=na(e);pd(e,s,r,t),vd(e,o,n||t);const a=r?Pd(e,t):void 0;return t&&ai(!1),a}function Pd(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,td);const{setup:s}=n;if(s){Jt();const o=e.setupContext=s.length>1?Nd(e):null,r=li(e),a=Dn(s,e,0,[e.props,o]),l=Zi(a);if(Xt(),r(),(l||e.sp)&&!qn(e)&&Wu(e),l){if(a.then(ta,ta),t)return a.then(c=>{oa(e,c)}).catch(c=>{Wo(c,e,0)});e.asyncDep=a}else oa(e,a)}else sa(e)}function oa(e,t,n){Te(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:je(t)&&(e.setupState=$r(t)),sa(e)}function sa(e,t,n){const s=e.type;e.render||(e.render=s.render||gn)}const Rd={get(e,t){return et(e,"get",""),e[t]}};function Nd(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Rd),slots:e.slots,emit:e.emit,expose:t}}function ts(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy($r(Au(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in po)return po[n](e)},has(t,n){return n in t||n in po}})):e.proxy}const jd=/(?:^|[-_])\w/g,zd=e=>e.replace(jd,t=>t.toUpperCase()).replace(/[-_]/g,"");function ia(e,t=!0){return Te(e)?e.displayName||e.name:e.name||t&&e.__name}function ra(e,t,n=!1){let s=ia(t);if(!s&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(s=o[1])}if(!s&&e){const o=r=>{for(const a in r)if(r[a]===t)return a};s=o(e.components)||e.parent&&o(e.parent.type.components)||o(e.appContext.components)}return s?zd(s):n?"App":"Anonymous"}function Ld(e){return Te(e)&&"__vccOpts"in e}const z=(e,t)=>Pu(e,t,vo),Dd="3.5.25";let ci;const aa=typeof window<"u"&&window.trustedTypes;if(aa)try{ci=aa.createPolicy("vue",{createHTML:e=>e})}catch{}const la=ci?e=>ci.createHTML(e):e=>e,Fd="http://www.w3.org/2000/svg",Ud="http://www.w3.org/1998/Math/MathML",rn=typeof document<"u"?document:null,ca=rn&&rn.createElement("template"),qd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?rn.createElementNS(Fd,e):t==="mathml"?rn.createElementNS(Ud,e):n?rn.createElement(e,{is:n}):rn.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>rn.createTextNode(e),createComment:e=>rn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>rn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,r){const a=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===r||!(o=o.nextSibling)););else{ca.innerHTML=la(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=ca.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Bd=Symbol("_vtc");function Hd(e,t,n){const s=e[Bd];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ua=Symbol("_vod"),Vd=Symbol("_vsh"),Kd=Symbol(""),Wd=/(?:^|;)\s*display\s*:/;function Yd(e,t,n){const s=e.style,o=Be(n);let r=!1;if(n&&!o){if(t)if(Be(t))for(const a of t.split(";")){const l=a.slice(0,a.indexOf(":")).trim();n[l]==null&&ns(s,l,"")}else for(const a in t)n[a]==null&&ns(s,a,"");for(const a in n)a==="display"&&(r=!0),ns(s,a,n[a])}else if(o){if(t!==n){const a=s[Kd];a&&(n+=";"+a),s.cssText=n,r=Wd.test(n)}}else t&&e.removeAttribute("style");ua in e&&(e[ua]=r?s.display:"",e[Vd]&&(s.display="none"))}const da=/\s*!important$/;function ns(e,t,n){if(he(n))n.forEach(s=>ns(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Gd(e,t);da.test(n)?e.setProperty(wt(s),n.replace(da,""),"important"):e[s]=n}}const fa=["Webkit","Moz","ms"],ui={};function Gd(e,t){const n=ui[t];if(n)return n;let s=rt(t);if(s!=="filter"&&s in e)return ui[t]=s;s=No(s);for(let o=0;o<fa.length;o++){const r=fa[o]+s;if(r in e)return ui[t]=r}return t}const ma="http://www.w3.org/1999/xlink";function pa(e,t,n,s,o,r=ru(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ma,t.slice(6,t.length)):e.setAttributeNS(ma,t,n):n==null||r&&!tr(n)?e.removeAttribute(t):e.setAttribute(t,r?"":jt(n)?String(n):n)}function ha(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?la(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,c=n==null?e.type==="checkbox"?"on":"":String(n);(l!==c||!("_value"in e))&&(e.value=c),n==null&&e.removeAttribute(t),e._value=n;return}let a=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=tr(n):n==null&&l==="string"?(n="",a=!0):l==="number"&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(o||t)}function an(e,t,n,s){e.addEventListener(t,n,s)}function Zd(e,t,n,s){e.removeEventListener(t,n,s)}const ba=Symbol("_vei");function Jd(e,t,n,s,o=null){const r=e[ba]||(e[ba]={}),a=r[t];if(s&&a)a.value=s;else{const[l,c]=Xd(t);if(s){const p=r[t]=tf(s,o);an(e,l,p,c)}else a&&(Zd(e,l,a,c),r[t]=void 0)}}const ga=/(?:Once|Passive|Capture)$/;function Xd(e){let t;if(ga.test(e)){t={};let s;for(;s=e.match(ga);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):wt(e.slice(2)),t]}let di=0;const Qd=Promise.resolve(),ef=()=>di||(Qd.then(()=>di=0),di=Date.now());function tf(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;on(nf(s,n.value),t,5,[s])};return n.value=e,n.attached=ef(),n}function nf(e,t){if(he(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>o=>!o._stopped&&s&&s(o))}else return t}const va=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,of=(e,t,n,s,o,r)=>{const a=o==="svg";t==="class"?Hd(e,s,a):t==="style"?Yd(e,n,s):Mo(t)?Os(t)||Jd(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):sf(e,t,s,a))?(ha(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&pa(e,t,s,a,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Be(s))?ha(e,rt(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),pa(e,t,s,a))};function sf(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&va(t)&&Te(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return va(t)&&Be(n)?!1:t in e}const ya={};function rf(e,t,n){let s=$e(e,t);Po(s)&&(s=ut({},s,t));class o extends fi{constructor(a){super(s,a,n)}}return o.def=s,o}const af=typeof HTMLElement<"u"?HTMLElement:class{};class fi extends af{constructor(t,n={},s=Ca){super(),this._def=t,this._props=n,this._createApp=s,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&s!==Ca?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(ut({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof fi){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,Fe(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let s=0;s<this.attributes.length;s++)this._setAttr(this.attributes[s].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(s,o=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:r,styles:a}=s;let l;if(r&&!he(r))for(const c in r){const p=r[c];(p===Number||p&&p.type===Number)&&(c in this._props&&(this._props[c]=Qi(this._props[c])),(l||(l=Object.create(null)))[rt(c)]=!0)}this._numberProps=l,this._resolveProps(s),this.shadowRoot&&this._applyStyles(a),this._mount(s)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(s=>{s.configureApp=this._def.configureApp,t(this._def=s,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const s in n)Ce(this,s)||Object.defineProperty(this,s,{get:()=>i(n[s])})}_resolveProps(t){const{props:n}=t,s=he(n)?n:Object.keys(n||{});for(const o of Object.keys(this))o[0]!=="_"&&s.includes(o)&&this._setProp(o,this[o]);for(const o of s.map(rt))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(r){this._setProp(o,r,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let s=n?this.getAttribute(t):ya;const o=rt(t);n&&this._numberProps&&this._numberProps[o]&&(s=Qi(s)),this._setProp(o,s,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,s=!0,o=!1){if(n!==this._props[t]&&(this._dirty=!0,n===ya?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),o&&this._instance&&this._update(),s)){const r=this._ob;r&&(this._processMutations(r.takeRecords()),r.disconnect()),n===!0?this.setAttribute(wt(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(wt(t),n+""):n||this.removeAttribute(wt(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),pf(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=Ee(this._def,ut(t,this._props));return this._instance||(n.ce=s=>{this._instance=s,s.ce=this,s.isCE=!0;const o=(r,a)=>{this.dispatchEvent(new CustomEvent(r,Po(a[0])?ut({detail:a},a[0]):{detail:a}))};s.emit=(r,...a)=>{o(r,a),wt(r)!==r&&o(wt(r),a)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce;for(let o=t.length-1;o>=0;o--){const r=document.createElement("style");s&&r.setAttribute("nonce",s),r.textContent=t[o],this.shadowRoot.prepend(r)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const s=n.nodeType===1&&n.getAttribute("slot")||"default";(t[s]||(t[s]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=this._getSlots(),n=this._instance.type.__scopeId;for(let s=0;s<t.length;s++){const o=t[s],r=o.getAttribute("name")||"default",a=this._slots[r],l=o.parentNode;if(a)for(const c of a){if(n&&c.nodeType===1){const p=n+"-s",h=document.createTreeWalker(c,1);c.setAttribute(p,"");let b;for(;b=h.nextNode();)b.setAttribute(p,"")}l.insertBefore(c,o)}else for(;o.firstChild;)l.insertBefore(o.firstChild,o);l.removeChild(o)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const n=new Set;for(const s of t){const o=s.querySelectorAll("slot");for(let r=0;r<o.length;r++)n.add(o[r])}return Array.from(n)}_injectChildStyle(t){this._applyStyles(t.styles,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(t){}}function Vn(e){const t=ea(),n=t&&t.ce;return n||null}const fn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return he(t)?n=>jo(t,n):t};function lf(e){e.target.composing=!0}function _a(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const At=Symbol("_assign");function ka(e,t,n){return t&&(e=e.trim()),n&&(e=zo(e)),e}const Xe={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e[At]=fn(o);const r=s||o.props&&o.props.type==="number";an(e,t?"change":"input",a=>{a.target.composing||e[At](ka(e.value,n,r))}),(n||r)&&an(e,"change",()=>{e.value=ka(e.value,n,r)}),t||(an(e,"compositionstart",lf),an(e,"compositionend",_a),an(e,"change",_a))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:r}},a){if(e[At]=fn(a),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?zo(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===c)||(e.value=c))}},os={deep:!0,created(e,t,n){e[At]=fn(n),an(e,"change",()=>{const s=e._modelValue,o=Kn(e),r=e.checked,a=e[At];if(he(s)){const l=Ps(s,o),c=l!==-1;if(r&&!c)a(s.concat(o));else if(!r&&c){const p=[...s];p.splice(l,1),a(p)}}else if(jn(s)){const l=new Set(s);r?l.add(o):l.delete(o),a(l)}else a(xa(e,r))})},mounted:wa,beforeUpdate(e,t,n){e[At]=fn(n),wa(e,t,n)}};function wa(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(he(t))o=Ps(t,s.props.value)>-1;else if(jn(t))o=t.has(s.props.value);else{if(t===n)return;o=vn(t,xa(e,!0))}e.checked!==o&&(e.checked=o)}const xn={created(e,{value:t},n){e.checked=vn(t,n.props.value),e[At]=fn(n),an(e,"change",()=>{e[At](Kn(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[At]=fn(s),t!==n&&(e.checked=vn(t,s.props.value))}},Wt={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const o=jn(t);an(e,"change",()=>{const r=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?zo(Kn(a)):Kn(a));e[At](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,Fe(()=>{e._assigning=!1})}),e[At]=fn(s)},mounted(e,{value:t}){$a(e,t)},beforeUpdate(e,t,n){e[At]=fn(n)},updated(e,{value:t}){e._assigning||$a(e,t)}};function $a(e,t){const n=e.multiple,s=he(t);if(!(n&&!s&&!jn(t))){for(let o=0,r=e.options.length;o<r;o++){const a=e.options[o],l=Kn(a);if(n)if(s){const c=typeof l;c==="string"||c==="number"?a.selected=t.some(p=>String(p)===String(l)):a.selected=Ps(t,l)>-1}else a.selected=t.has(l);else if(vn(Kn(a),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Kn(e){return"_value"in e?e._value:e.value}function xa(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const cf=["ctrl","shift","alt","meta"],uf={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>cf.some(n=>e[`${n}Key`]&&!t.includes(n))},mt=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((o,...r)=>{for(let a=0;a<t.length;a++){const l=uf[t[a]];if(l&&l(o,t))return}return e(o,...r)}))},df={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ff=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(o=>{if(!("key"in o))return;const r=wt(o.key);if(t.some(a=>a===r||df[a]===r))return e(o)}))},mf=ut({patchProp:of},qd);let Ia;function Ta(){return Ia||(Ia=_d(mf))}const pf=((...e)=>{Ta().render(...e)}),Ca=((...e)=>{const t=Ta().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=bf(s);if(!o)return;const r=t._component;!Te(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const a=n(o,!1,hf(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),a},t});function hf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function bf(e){return Be(e)?document.querySelector(e):e}const gf=["method","origin","unavailable","invalid","signIn","onboarding","age","name","handle","restricted","suspended","terminated","links","fast","blocked","confirm","removed","quota","captcha","notFound","surfaceOff","notMoved","ledger","readOnly","braked","mentionLimit","pushRefused","realtimeOff","membersOnly","topicLocked","topicCreationClosed","followLimit","submit"];new Set(gf);const Sa=Object.freeze({SURFACE_OFF:"surfaceOff",CUTOVER_NOT_MOVED:"notMoved",NOT_FOUND:"notFound",ONBOARDING_REQUIRED:"onboarding",AGE_BELOW_MINIMUM:"age",NAME_RESERVED:"name",NAME_BLOCKED:"name",HANDLE_TAKEN:"handle",HANDLE_RATE:"handle",POSTING_RESTRICTED:"restricted",ACCOUNT_SUSPENDED:"suspended",ACCOUNT_TERMINATED:"terminated",TOO_MANY_LINKS:"links",TOO_FAST:"fast",FILTER_BLOCKED:"blocked",CONFIRMATION_REQUIRED:"confirm",MESSAGE_REMOVED:"removed",REACTION_NOT_ALLOWED:"invalid",CAPTCHA_FAILED:"captcha",UNAUTHORIZED:"signIn",VALIDATION:"invalid",UNAVAILABLE:"unavailable",STALE_LEASE:"submit",STAFF_POSTING_OFF:"submit",PRESET_CONFLICT:"submit",INTERNAL:"unavailable",MODULE_DARK:"unavailable",MODULE_READ_ONLY:"readOnly",BRAKED:"braked",BRAKE_PLATFORM:"submit",MODULE_CONDITIONS:"submit",TRUST_LEVEL_INVALID:"invalid",MENTION_LIMIT:"mentionLimit",DIGEST_UNSUBSCRIBE_INVALID:"invalid",PUSH_ENDPOINT_REFUSED:"pushRefused",PUSH_LIMIT:"quota",REALTIME_OFF:"realtimeOff",BUSY:"submit",BRAKE_KIND_MISMATCH:"submit",MEMBERS_ONLY:"membersOnly",TOPIC_LOCKED:"topicLocked",TOPIC_CREATION_CLOSED:"topicCreationClosed",FOLLOW_LIMIT:"followLimit",BRAND_RESTRICTED:"submit",CATEGORY_NOT_EMPTY:"submit",SLUG_TAKEN:"submit",MODERATOR_NOT_ELIGIBLE:"submit",STALE_REVISION:"submit",CASE_UNDECIDED:"submit",NOT_A_MEMBER_SESSION:"signIn",IDENTITY_NOT_ADMITTED:"signIn",ACCOUNT_NOT_ELIGIBLE:"signIn",MEMBER_READ_ONLY:"restricted",MEMBER_DELETION_REQUESTED:"restricted",PRIVATE_SPACE:"submit",WRONG_PROVIDER:"submit",CASE_CLOSED:"submit",NOTIFIER_NOT_ALLOWED:"invalid",UNSUPPORTED_RESTRICTION:"submit",LADDER_EXCEEDED:"submit",PERSON_REQUIRED:"submit",APPEAL_OPEN:"submit",APPEAL_WINDOW_CLOSED:"submit",APPEAL_NEEDS_ANOTHER_PERSON:"submit",GAG_PLATFORM_ONLY:"submit",ORDER_FINAL:"submit",BODY_JSON_INVALID:"invalid",AUDIT_DETAIL_NOT_CODE:"submit",LEDGER_UNAVAILABLE:"ledger",INVALID_INPUT:"invalid",LEGAL_HOLD:"submit",TEXT_MISSING:"unavailable",AGE16_NOT_ALLOWED:"submit",QUOTA_DAILY:"quota",QUOTA_IP_HOURLY:"quota"}),Aa=Object.freeze({METHOD:"method",ORIGIN:"origin",TOO_LARGE:"invalid",INVALID_JSON:"invalid"}),Oa=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function vf(e){return typeof e!="string"||e===""?"submit":Oa(Sa,e)?Sa[e]:Oa(Aa,e)?Aa[e]:"submit"}const Ea=Symbol.for("@blogmcp/sdk/CommunityTransportError");function yf(e){return typeof e=="number"&&Number.isInteger(e)&&e>=100&&e<=599?e:null}function _f(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?Math.ceil(e):null}class Ma extends Error{status;retryAfterS;constructor(t,n={}){super(t),this.name="CommunityTransportError",this.status=yf(n.status),this.retryAfterS=_f(n.retryAfterS),Object.defineProperty(this,Ea,{value:!0})}}function kf(e){return e instanceof Ma?!0:e instanceof Error&&e[Ea]===!0}function wf(e){return kf(e)&&e.retryAfterS!==null?{ok:!1,code:"unavailable",retryAfterS:e.retryAfterS}:{ok:!1,code:"unavailable"}}function $f(e){return e==="unavailable"||e==="submit"||e==="method"||e==="origin"||e==="invalid"||e==="ledger"}const ie=(e,t,n)=>Object.freeze({name:e,method:"POST",path:n,surface:t}),xf=Object.freeze({"discussions.list":ie("discussions.list","public","/community/v1/public/discussions/list"),"discussions.head":ie("discussions.head","public","/community/v1/public/discussions/head"),"messages.post":ie("messages.post","public","/community/v1/public/messages/post"),"messages.edit":ie("messages.edit","public","/community/v1/public/messages/edit"),"messages.delete":ie("messages.delete","public","/community/v1/public/messages/delete"),"messages.report":ie("messages.report","public","/community/v1/public/messages/report"),"reactions.set":ie("reactions.set","public","/community/v1/public/reactions/set"),"blocks.set":ie("blocks.set","public","/community/v1/public/blocks/set"),"blocks.list":ie("blocks.list","public","/community/v1/public/blocks/list"),"profile.get":ie("profile.get","public","/community/v1/public/profile/get"),"me.get":ie("me.get","public","/community/v1/public/me/get"),"me.onboard":ie("me.onboard","public","/community/v1/public/me/onboard"),"me.updateProfile":ie("me.updateProfile","public","/community/v1/public/me/profile/update"),"me.notifications.list":ie("me.notifications.list","public","/community/v1/public/me/notifications/list"),"me.notifications.markRead":ie("me.notifications.markRead","public","/community/v1/public/me/notifications/mark-read"),"me.notifications.unreadCount":ie("me.notifications.unreadCount","public","/community/v1/public/me/notifications/unread-count"),"me.settings.get":ie("me.settings.get","public","/community/v1/public/me/settings/get"),"me.settings.update":ie("me.settings.update","public","/community/v1/public/me/settings/update"),"me.settings.unsubscribeDigest":ie("me.settings.unsubscribeDigest","public","/community/v1/public/me/settings/unsubscribe-digest"),"me.mutes.set":ie("me.mutes.set","public","/community/v1/public/me/mutes/set"),"me.mutes.list":ie("me.mutes.list","public","/community/v1/public/me/mutes/list"),"me.push.vapid":ie("me.push.vapid","public","/community/v1/public/me/push/vapid"),"me.push.subscribe":ie("me.push.subscribe","public","/community/v1/public/me/push/subscribe"),"me.push.unsubscribe":ie("me.push.unsubscribe","public","/community/v1/public/me/push/unsubscribe"),"me.push.status":ie("me.push.status","public","/community/v1/public/me/push/status"),"me.realtime.token":ie("me.realtime.token","public","/community/v1/public/me/realtime/token"),"realtime.subscribeToken":ie("realtime.subscribeToken","public","/community/v1/public/realtime/subscribe-token"),"me.decisions.list":ie("me.decisions.list","public","/community/v1/public/me/decisions/list"),"me.decisions.get":ie("me.decisions.get","public","/community/v1/public/me/decisions/get"),"me.appeals.file":ie("me.appeals.file","public","/community/v1/public/me/appeals/file"),"me.appeals.withdraw":ie("me.appeals.withdraw","public","/community/v1/public/me/appeals/withdraw"),"me.appeals.list":ie("me.appeals.list","public","/community/v1/public/me/appeals/list"),"me.reports.list":ie("me.reports.list","public","/community/v1/public/me/reports/list"),"me.consents.withdraw":ie("me.consents.withdraw","public","/community/v1/public/me/consents/withdraw"),"me.export":ie("me.export","public","/community/v1/public/me/export"),"me.erase":ie("me.erase","public","/community/v1/public/me/erase"),"me.cancelErase":ie("me.cancelErase","public","/community/v1/public/me/erase/cancel"),"legal.current":ie("legal.current","public","/community/v1/public/legal/current"),"forum.categories.list":ie("forum.categories.list","public","/community/v1/public/forum/categories/list"),"forum.topics.list":ie("forum.topics.list","public","/community/v1/public/forum/topics/list"),"forum.topics.get":ie("forum.topics.get","public","/community/v1/public/forum/topics/get"),"forum.topics.head":ie("forum.topics.head","public","/community/v1/public/forum/topics/head"),"forum.topics.create":ie("forum.topics.create","public","/community/v1/public/forum/topics/create"),"forum.search":ie("forum.search","public","/community/v1/public/forum/search"),"me.follows.set":ie("me.follows.set","public","/community/v1/public/me/follows/set"),"me.follows.list":ie("me.follows.list","public","/community/v1/public/me/follows/list"),"moderation.queue":ie("moderation.queue","public","/community/v1/public/moderation/queue"),"moderation.getCase":ie("moderation.getCase","public","/community/v1/public/moderation/cases/get"),"moderation.decide":ie("moderation.decide","public","/community/v1/public/moderation/decide"),"moderation.remove":ie("moderation.remove","public","/community/v1/public/moderation/remove"),"moderation.escalate":ie("moderation.escalate","public","/community/v1/public/moderation/escalate"),"moderation.setTopicState":ie("moderation.setTopicState","public","/community/v1/public/moderation/topics/set-state"),"moderation.moveTopic":ie("moderation.moveTopic","public","/community/v1/public/moderation/topics/move"),"moderation.pinTopic":ie("moderation.pinTopic","public","/community/v1/public/moderation/topics/pin"),"moderation.reviewPremod":ie("moderation.reviewPremod","public","/community/v1/public/moderation/premod/review"),"notices.submit":ie("notices.submit","notice","/trust/v1/notices/submit"),"notices.status":ie("notices.status","notice","/trust/v1/notices/status"),"notices.appeal":ie("notices.appeal","notice","/trust/v1/notices/appeal"),"notices.withdrawAppeal":ie("notices.withdrawAppeal","notice","/trust/v1/notices/appeal/withdraw")}),Pa="/community";function If(e){return e.surface==="public"&&e.path.startsWith(`${Pa}/`)?e.path.slice(Pa.length):e.path}const In=4e3,Tf=2,ss=1e3,Tn=4e3,mi=4e3,Ra=120,Cf=2,Na=80,yo=/^[a-z0-9][a-z0-9_]{2,29}$/,ja=30,Sf=50,is=200,za=30,Af=50,pi=2,rs=200,La=5,Of=500,Ef=/^[a-z0-9][a-z0-9-]{0,62}$/,Mf="community_notice",Pf="good_faith";function as(){const e=globalThis.crypto;if(typeof e?.randomUUID=="function")return e.randomUUID();const t=e.getRandomValues(new Uint8Array(16));t[6]=(t[6]??0)&15|64,t[8]=(t[8]??0)&63|128;const n=Array.from(t,s=>s.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}const mn=(e,t)=>typeof t=="string"&&e.includes(t),Rf=Object.freeze(["visible","held","removed","deleted"]),Nf=e=>mn(Rf,e),jf=Object.freeze(["member","staff","system"]),Da=e=>mn(jf,e),zf=Object.freeze(["sign_in","onboarding","reconsent_rules","art9_consent"]),Wn=e=>mn(zf,e),Lf=Object.freeze(["restriction","suspension","ban"]),Df=e=>mn(Lf,e),Fa=Object.freeze(["decision","appeal_resolved","erasure_scheduled","inactivity_warning","module_read_only","module_braked","reply","mention","module_push_reset","age_limit_changed","topic_update","category_topic"]),Ua=e=>mn(Fa,e),Ff=Object.freeze(["new","member","regular","trusted"]),hi=Object.freeze(["fraud_spam","harassment","hate","threats","sexual_content","child_at_risk","self_harm","doxxing","copyright","terrorism","drugs","other_illegal","rules","adverse_event","third_party_health_data","suspected_minor"]),Uf="child_at_risk",ls=Object.freeze(hi.filter(e=>e!=="rules"&&e!=="adverse_event"&&e!=="third_party_health_data"&&e!=="suspected_minor")),qf=Object.freeze(["recorded","reported_to_authority","not_adverse"]),Bf=Object.freeze(["16_17","18_plus"]);function Hf(e){return typeof e=="object"&&e!==null&&Da(e.kind)}const Vf=Object.freeze(["dark","live","read_only","braked"]),Yn=e=>mn(Vf,e),Kf=e=>e==="split"?"split":"joint",qa=e=>e==="public_write"?"public_write":"read_only";function Gn(e){const t=typeof e=="object"&&e!==null?e.rules:void 0;if(!Array.isArray(t))return[];const n=[];for(const s of t){if(typeof s!="object"||s===null)continue;const{id:o,title:r,summary:a,anchor:l}=s;typeof o!="string"||typeof r!="string"||typeof l!="string"||n.push(Object.freeze({id:o,title:r,summary:typeof a=="string"?a:null,anchor:l}))}return n}const Wf=2;function Yf(e){const t=typeof e=="object"&&e!==null?e.controllers:void 0;if(!Array.isArray(t))return[];const n=[];for(const s of t){if(n.length>=Wf)break;if(typeof s!="object"||s===null)continue;const{entity:o,label:r}=s;typeof o!="string"||typeof r!="string"||o.trim()===""||r.trim()===""||n.push(Object.freeze({entity:o,label:r.trim()}))}return n}const Gf=Object.freeze(["open","locked","archived"]),Zf=e=>mn(Gf,e),Jf=Object.freeze(["forum","article_discussions"]),Xf=e=>mn(Jf,e),Qf=Object.freeze(["no_action","visibility_restricted","removal"]),em=/^(?:\/[A-Za-z0-9_~-][A-Za-z0-9._~-]*)*\/?$/;function Ba(e){return typeof e=="string"&&e.startsWith("/")&&em.test(e)&&!/(^|\/)\.\.?(\/|$)/.test(e)}function Ha(e){if(!Ba(e))throw new TypeError('[blogmcp-sdk] the community client takes a relative base on the page’s own origin (e.g. "/api/community"), never an absolute URL: kb-api’s community routes are reached only through the host’s proxy or BFF');return e.replace(/\/+$/,"")}function tm(e,t){return`${e.replace(/\/+$/,"")}${If(t)}`}function nm(e,t){if(e===null||e.trim()==="")return;const n=e.trim();if(/^\d+$/.test(n))return Number(n);const s=Date.parse(n);return Number.isFinite(s)?Math.max(0,Math.ceil((s-t)/1e3)):void 0}function om(e,t={}){const n=Ha(e),s=t.now??Date.now,o=t.fetch??(()=>globalThis.fetch);return async(r,a,l)=>{let c;try{c=await o()(tm(n,r),{method:r.method,headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a??{}),mode:"same-origin",credentials:"same-origin",cache:"no-store",redirect:"error",signal:l})}catch{throw new Ma(l.aborted?"community request aborted or timed out":"community request failed")}let p=null;try{const b=await c.text();p=b===""?null:JSON.parse(b)}catch{p=null}const h=nm(c.headers.get("Retry-After"),s());return h===void 0?{status:c.status,body:p}:{status:c.status,body:p,retryAfterS:h}}}const Va=1e4,sm=2147483647;let Ka=!1;function im(e){if(e===void 0)return Va;const t=typeof e=="number"?Math.floor(e):Number.NaN;return t>=1&&t<=sm?t:(Ka||(Ka=!0,console.warn("[community] timeoutMs is not a number of milliseconds from 1 to 2147483647 — the default 10 s is used.")),Va)}const ot=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Cn=e=>typeof e=="string",pn=Array.isArray,rm=Object.freeze({string:Cn,number:e=>typeof e=="number",boolean:e=>typeof e=="boolean",array:pn,record:ot}),se=e=>Object.freeze({...e}),am=Object.freeze({"discussions.list":se({articleId:"string",messages:"array",viewer:"record"}),"discussions.head":se({heads:"array"}),"messages.post":se({message:"record",warnings:"array"}),"messages.edit":se({message:"record",warnings:"array"}),"messages.delete":se({message:"record"}),"messages.report":se({caseId:"string"}),"reactions.set":se({reactions:"record"}),"blocks.set":se({blocked:"boolean"}),"blocks.list":se({blocks:"array"}),"profile.get":se({author:"record"}),"me.get":se({needs:"array"}),"me.onboard":se({needs:"array"}),"me.updateProfile":se({profile:"record"}),"me.notifications.list":se({items:"array"}),"me.notifications.markRead":se({updated:"number"}),"me.notifications.unreadCount":se({count:"number"}),"me.settings.get":se({settings:"record"}),"me.settings.update":se({settings:"record"}),"me.settings.unsubscribeDigest":se({unsubscribed:"boolean"}),"me.mutes.set":se({muted:"boolean"}),"me.mutes.list":se({items:"array"}),"me.push.vapid":se({publicKey:"string",keyId:"string"}),"me.push.subscribe":se({subscribed:"boolean",keyId:"string"}),"me.push.unsubscribe":se({unsubscribed:"boolean"}),"me.push.status":se({subscribed:"boolean"}),"me.realtime.token":se({token:"string",url:"string",expiresInS:"number"}),"realtime.subscribeToken":se({token:"string"}),"me.decisions.list":se({items:"array"}),"me.decisions.get":se({decisionId:"string"}),"me.appeals.file":se({appealId:"string"}),"me.appeals.withdraw":se({appealId:"string"}),"me.appeals.list":se({items:"array"}),"me.reports.list":se({items:"array"}),"me.consents.withdraw":se({state:"string"}),"me.export":se({generatedAt:"string"}),"me.erase":se({purgeAfter:"string"}),"me.cancelErase":se({status:"string"}),"legal.current":se({textId:"string"}),"notices.submit":se({caseId:"string",receipt:"string"}),"notices.status":se({status:"string"}),"notices.appeal":se({appealId:"string"}),"notices.withdrawAppeal":se({appealId:"string"}),"forum.categories.list":se({categories:"array"}),"forum.topics.list":se({category:"record",items:"array"}),"forum.topics.get":se({topic:"record",messages:"array",viewer:"record"}),"forum.topics.head":se({heads:"array"}),"forum.topics.create":se({topic:"record",message:"record",warnings:"array"}),"forum.search":se({results:"array",page:"number",hasMore:"boolean"}),"me.follows.set":se({following:"boolean"}),"me.follows.list":se({follows:"array"}),"moderation.queue":se({items:"array"}),"moderation.getCase":se({case:"record"}),"moderation.decide":se({dryRun:"boolean",statement:"string"}),"moderation.remove":se({decision:"record",statement:"string"}),"moderation.escalate":se({}),"moderation.setTopicState":se({topic:"record"}),"moderation.moveTopic":se({topic:"record"}),"moderation.pinTopic":se({topic:"record"}),"moderation.reviewPremod":se({})}),lm=Object.freeze({"moderation.reviewPremod":Object.freeze([se({message:"record"}),se({decision:"record",statement:"string"})])}),Wa=(e,t)=>Object.entries(e).every(([n,s])=>rm[s](t[n])),cm=(e,t)=>{if(!Wa(am[e],t))return!1;const n=lm[e];return n===void 0||n.some(s=>Wa(s,t))};function pt(e,t){const n={};if(!ot(e))return n;for(const s of t)e[s]!==void 0&&(n[s]=e[s]);return n}function Ya(e){return ot(e)?"conversationId"in e?pt(e,["conversationId","seq"]):"memberId"in e?pt(e,["memberId"]):"handle"in e?pt(e,["handle"]):pt(e,["articleId"]):e}const Ga=/^[A-Za-z0-9_.:-]{1,64}$/,cs=20;function um(e){if(pn(e))return e.filter(t=>Cn(t)&&Ga.test(t)).slice(0,cs)}function dm(e){return pn(e)?e.filter(Wn).slice(0,cs):void 0}function fm(e){return pn(e)?e.map(n=>ot(n)?n.path:n).filter(n=>Cn(n)&&n.length<=128).slice(0,cs):void 0}function mm(e){if(!pn(e))return;const t=e.map(n=>ot(n)?n.code:void 0).filter(n=>Cn(n)&&Ga.test(n));return t.length>0?[...new Set(t)].slice(0,cs):void 0}const pm=/^[a-z][a-z0-9_]{0,63}$/;function hm(e){return Cn(e)&&pm.test(e)?e:void 0}function bm(e){return ot(e)?"conversationId"in e?pt(e,["conversationId"]):pt(e,["categoryId"]):e}function us(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?Math.ceil(e):void 0}function gm(e,t){const n={ok:!1,code:vf(e.code)},s=us(e.retryAfterS)??us(t.retryAfterS);s!==void 0&&(n.retryAfterS=s);const o=dm(e.needs);o&&(n.needs=o);const r=um(e.codes);r&&(n.codes=r),Cn(e.until)&&(n.until=e.until);const a=hm(e.surface);a!==void 0&&(n.surface=a);const l=fm(e.issues);l&&(n.fields=l);const c=mm(e.issues);return c&&(n.issueCodes=c),n}function vm(e){Ha(e?.base);const t=e.transport??om(e.base,e.now?{now:e.now}:{}),n=im(e.timeoutMs),s=e.logger,o=(c,p,h,b)=>{if(!(!s||!$f(p)))try{s({op:c,outcome:p,kbCode:h,status:b})}catch{}};async function r(c,p,h){const b=xf[c],_=new AbortController,$=h?.signal,v=()=>_.abort();$?.aborted?_.abort():$?.addEventListener("abort",v,{once:!0});const I=setTimeout(()=>_.abort(),n);let j;try{j=await t(b,p,_.signal)}catch(k){const O=wf(k);return $?.aborted||o(c,O.code,null,null),O}finally{clearTimeout(I),$?.removeEventListener("abort",v)}const P=typeof j?.status=="number"?j.status:0,T=j?.body;if(ot(T)&&T.ok===!1&&Cn(T.code)&&T.code!==""){const k=gm(T,j);return o(c,k.code,T.code.slice(0,64),P),k}if(P>=200&&P<300&&ot(T)&&T.ok===!0){const{ok:k,...O}=T;return cm(c,O)?{ok:!0,value:O}:(o(c,"unavailable",null,P),{ok:!1,code:"unavailable"})}if(P===429){const k=us(j.retryAfterS);return k===void 0?{ok:!1,code:"fast"}:{ok:!1,code:"fast",retryAfterS:k}}o(c,"unavailable",null,P);const g=P===503?us(j.retryAfterS):void 0;return g===void 0?{ok:!1,code:"unavailable"}:{ok:!1,code:"unavailable",retryAfterS:g}}const a=(c,p)=>(h,b)=>r(c,pt(h,p),b),l=c=>p=>r(c,{},p);return{discussions:{list:a("discussions.list",["articleId","languageCode","cursor"]),head:(c,p)=>r("discussions.head",{articleIds:ot(c)&&pn(c.articleIds)?[...c.articleIds]:[]},p)},messages:{post:a("messages.post",["articleId","conversationId","body","replyToSeq","clientMsgId","languageCode","confirmations"]),edit:a("messages.edit",["conversationId","seq","body","title","confirmations"]),delete:a("messages.delete",["conversationId","seq"]),report:a("messages.report",["conversationId","seq","category","ruleId","note"])},reactions:{set:(c,p)=>r("reactions.set",{target:Ya(c?.target),emoji:c?.emoji??null},p)},blocks:{set:a("blocks.set",["memberId","blocked"]),list:l("blocks.list")},profile:{get:(c,p)=>r("profile.get",ot(c)&&"handle"in c?pt(c,["handle"]):pt(c,["memberId"]),p)},me:{get:l("me.get"),onboard:a("me.onboard",["ageBand","rulesTextId","art9TextId","art9Refused","displayName","handle","avatarPreset"]),updateProfile:a("me.updateProfile",["displayName","handle","avatarPreset","bio"]),notifications:{list:a("me.notifications.list",["cursor","unreadOnly","codes"]),markRead:(c,p)=>r("me.notifications.markRead",ot(c)&&"all"in c?{all:c.all}:{ids:ot(c)&&pn(c.ids)?[...c.ids]:[]},p),unreadCount:l("me.notifications.unreadCount")},settings:{get:l("me.settings.get"),update:a("me.settings.update",["notifyReply","notifyMention","notifyTopic","pushEnabled","digestEmail","quietHours"]),unsubscribeDigest:a("me.settings.unsubscribeDigest",["token"])},mutes:{set:a("me.mutes.set",["targetKind","targetId","muted"]),list:l("me.mutes.list")},push:{vapid:l("me.push.vapid"),subscribe:(c,p)=>r("me.push.subscribe",{...pt(c,["endpoint","userAgentClass"]),...ot(c)&&ot(c.keys)?{keys:pt(c.keys,["p256dh","auth"])}:{}},p),unsubscribe:a("me.push.unsubscribe",["endpoint"]),status:a("me.push.status",["endpoint"])},realtime:{token:l("me.realtime.token")},decisions:{list:a("me.decisions.list",["cursor"]),get:a("me.decisions.get",["decisionId"])},appeals:{file:a("me.appeals.file",["decisionId","body"]),withdraw:a("me.appeals.withdraw",["appealId"]),list:l("me.appeals.list")},reports:{list:l("me.reports.list")},consents:{withdraw:(c,p)=>r("me.consents.withdraw",{kind:"art9_consent"},p)},follows:{set:(c,p)=>{const h=pt(c,["target","following"]);return h.target!==void 0&&(h.target=bm(h.target)),r("me.follows.set",h,p)},list:a("me.follows.list",["cursor"])},export:l("me.export"),erase:l("me.erase"),cancelErase:l("me.cancelErase")},legal:{current:a("legal.current",["kind","locale"])},realtime:{subscribeToken:a("realtime.subscribeToken",["channel"])},forum:{categories:{list:l("forum.categories.list")},topics:{list:a("forum.topics.list",["categoryId","categorySlug","sort","cursor","limit"]),get:a("forum.topics.get",["conversationId","languageCode","cursor"]),head:(c,p)=>r("forum.topics.head",{conversationIds:ot(c)&&pn(c.conversationIds)?[...c.conversationIds]:[]},p),create:a("forum.topics.create",["categoryId","title","body","clientMsgId","languageCode","confirmations"])},search:a("forum.search",["query","categoryId","space","page"])},moderation:{queue:a("moderation.queue",["categoryId","cursor"]),getCase:a("moderation.getCase",["caseId"]),decide:a("moderation.decide",["caseId","restriction","basis","facts","contractualGround","locale","dryRun"]),remove:a("moderation.remove",["conversationId","seq","ruleId","facts","locale"]),escalate:a("moderation.escalate",["conversationId","seq","category"]),setTopicState:a("moderation.setTopicState",["conversationId","state"]),moveTopic:a("moderation.moveTopic",["conversationId","categoryId"]),pinTopic:a("moderation.pinTopic",["conversationId","pinned"]),reviewPremod:a("moderation.reviewPremod",["conversationId","seq","rev","outcome","ruleId","facts","locale"])},notices:{submit:(c,p)=>{const h=pt(c,["category","target","description","ruleId","turnstileToken","confirmations"]);return h.target!==void 0&&(h.target=Ya(h.target)),ot(c?.notifier)?h.notifier=pt(c.notifier,["name","email","locale"]):c?.notifier===null&&(h.notifier=null),r("notices.submit",h,p)},status:a("notices.status",["receipt"]),appeal:a("notices.appeal",["receipt","body"]),withdrawAppeal:a("notices.withdrawAppeal",["receipt"])}}}const ym=/FBAN|FBAV|Instagram/;function _m(e){const t=typeof e=="string"?e:typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:"";return ym.test(t)}const Dt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ae=e=>typeof e=="string"?e:null,_o=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>0,ds=Object.freeze({counts:Object.freeze({}),mine:null});function ko(e){if(!Dt(e))return ds;const t={};if(Dt(e.counts))for(const[n,s]of Object.entries(e.counts))typeof s=="number"&&Number.isSafeInteger(s)&&s>0&&(t[n]=s);return Object.freeze({counts:Object.freeze(t),mine:Ae(e.mine)})}const Za=Object.freeze({kind:"member",memberId:null,handle:null,displayName:null,avatarPreset:null,deleted:!0}),km=Object.freeze({kind:"system"});function bi(e){if(!Dt(e)||!Da(e.kind))return null;if(e.kind==="system")return km;if(e.kind==="staff")return Object.freeze({kind:"staff",staffId:Ae(e.staffId)??"",displayName:Ae(e.displayName)??"",badge:Ae(e.badge)??""});const t=Ae(e.memberId),n=Ae(e.handle),s=Ae(e.displayName);return t===null||n===null||s===null||e.deleted===!0?Za:Object.freeze({kind:"member",memberId:t,handle:n,displayName:s,avatarPreset:Ae(e.avatarPreset),...e.moderator===!0?{moderator:!0}:{}})}function Ja(e){if(Array.isArray(e))return Object.freeze(e.filter(t=>typeof t=="string"))}function wo(e,t){if(!Dt(e))return null;const n=bi(e.author);if(n===null||!Nf(e.state))return null;const s=Ae(e.conversationId),o=Ae(e.id);if(s===null||o===null||!_o(e.seq))return null;const r=Ae(e.body),a=[];if(t&&Array.isArray(e.replies))for(const c of e.replies){const p=wo(c,!1);p&&a.push(p)}const l=Ja(e.notes);return Object.freeze({conversationId:s,seq:e.seq,id:o,rev:typeof e.rev=="number"?e.rev:0,replyToSeq:t?null:_o(e.replyToSeq)?e.replyToSeq:null,author:n,state:e.state,body:r,displayBody:Ae(e.displayBody)??r,displayLanguageCode:Ae(e.displayLanguageCode),sourceLanguageCode:Ae(e.sourceLanguageCode),isTranslated:e.isTranslated===!0,isEdited:e.isEdited===!0,createdAt:Ae(e.createdAt)??"",editedAt:Ae(e.editedAt),collapsed:e.collapsed===!0,reactions:ko(e.reactions),translationVersionId:Ae(e.translationVersionId),...l&&l.length>0?{notes:l}:{},...e.hiddenUntilConsent===!0&&e.state==="held"?{hiddenUntilConsent:!0}:{},...e.premoderated===!0&&e.state==="held"?{premoderated:!0}:{},replies:Sn(a),...t&&e.repliesTruncated===!0?{repliesTruncated:!0}:{}})}function wm(e){const t=Dt(e)?e:{},n=Array.isArray(t.needs)?t.needs.filter(Wn):[],s=[];if(Array.isArray(t.restrictions))for(const o of t.restrictions)!Dt(o)||!Df(o.kind)||typeof o.decisionId!="string"||s.push(Object.freeze({kind:o.kind,scope:Ae(o.scope)??"",endsAt:Ae(o.endsAt),decisionId:o.decisionId}));return Object.freeze({memberId:Ae(t.memberId),canPost:t.canPost===!0,needs:Object.freeze([...new Set(n)]),restrictions:Object.freeze(s)})}const $m=Object.freeze({memberId:null,canPost:!1,needs:Object.freeze([]),restrictions:Object.freeze([])}),gi=Object.freeze({articleId:null,conversationId:null,count:0,lastSeq:0,lastChangeAt:null,messages:Object.freeze([]),nextCursor:null,articleReactions:ds,reactionSet:Object.freeze([]),preset:null,viewer:$m,loaded:!1,stale:!1}),xm=(e,t)=>e===null?t:t===null?e:Date.parse(t)>Date.parse(e)?t:e;function Sn(e){const t=e.filter(s=>s.seq>0).sort((s,o)=>s.seq-o.seq),n=e.filter(s=>s.seq<0).sort((s,o)=>o.seq-s.seq);return Object.freeze([...t,...n])}function Yt(e,t){let n=!1;const s=[];for(const o of e){let r=t(o);if(r!==null&&r.replies.length>0){const a=Yt(r.replies,t);a!==r.replies&&(r=Object.freeze({...r,replies:a}))}r!==o&&(n=!0),r!==null&&s.push(r)}return n?Object.freeze(s):e}function hn(e,t){for(const n of e){if(t(n))return n;for(const s of n.replies)if(t(s))return s}return null}function vi(e,t){return Yt(e,n=>n.seq===t.seq?n.replyToSeq===null&&t.replyToSeq===null?Object.freeze({...t,replies:n.replies}):t:n)}function Xa(e,t){if(hn(e,s=>s.seq===t.seq))return vi(e,t);if(t.replyToSeq===null)return Sn([...e,t]);const n=e.find(s=>s.seq===t.replyToSeq);return n?Object.freeze(e.map(s=>s===n?Object.freeze({...s,replies:Sn([...s.replies,t])}):s)):e}const Qa=e=>e.replyToSeq===null&&e.replies.length>0,el=(e,t)=>e.toLowerCase()===t.toLowerCase(),tl=e=>e.author.kind==="member"&&e.author.memberId!==null?e.author.memberId.toLowerCase():null,Im=256,nl=new WeakMap;function ol(){let e=gi;const t=new Set,n=new Map,s=new Set;let o=0,r=-1;const a=new Set,l=()=>{o+=1,a.clear();for(const y of n.keys())s.delete(y),s.add(y);n.clear();for(const y of s){if(s.size<=Im)break;s.delete(y)}},c=y=>{if(y!==e){e=Object.freeze(y);for(const x of[...t])try{x(e)}catch{}}};function p(y,x={}){if(!Dt(y))return;const N=Ae(y.articleId)?.toLowerCase()??null,M=e.articleId!==null&&N!==null&&N!==e.articleId,E=M?gi:e;M&&l();const B=typeof x.cursor=="number"&&Number.isFinite(x.cursor)?x.cursor:null,ee=B??0,re=typeof y.nextCursor=="number"&&Number.isFinite(y.nextCursor)?y.nextCursor:null,be=re??Number.POSITIVE_INFINITY,we=new Map;for(const oe of Array.isArray(y.messages)?y.messages:[]){const Z=wo(oe,!0);Z&&Z.seq>ee&&Z.seq<=be&&we.set(Z.seq,Z)}for(const oe of we.values())for(const Z of[oe,...oe.replies]){const J=tl(Z);J===null||Z.body===null||(Z.collapsed?a.add(J):a.delete(J))}const K=new Map;for(const oe of E.messages){const Z=[oe,...oe.replies];for(const J of Z)J.pending&&J.pending!=="post"&&J.clientMsgId&&K.set(J.seq,J)}const D=oe=>{const Z=K.get(oe.seq);if(!Z)return oe;const J=Z.clientMsgId?n.get(Z.clientMsgId):void 0;return J&&(J.before=oe),Z.replyToSeq===null?Object.freeze({...Z,replies:oe.replies}):Z},U=E.messages.filter(oe=>oe.seq<0||oe.seq<=ee||oe.seq>be),Le=new Map;for(const oe of E.messages)for(const Z of oe.replies)Z.seq<0&&Z.replyToSeq!==null&&Le.set(Z.replyToSeq,[...Le.get(Z.replyToSeq)??[],Z]);const Ne=[...U.filter(oe=>!we.has(oe.seq)),...we.values()].map(oe=>{if(!we.has(oe.seq))return oe;const Z=D(oe),J=Z.replies.map(D),W=Le.get(oe.seq)??[];return J.some((pe,qt)=>pe!==Z.replies[qt])||W.length>0?Object.freeze({...Z,replies:Sn([...J,...W])}):Z}),De=E.loaded?E.nextCursor:0,Qe=De===null?null:ee>De?De:re===null?null:Math.max(De,re);c({articleId:N??E.articleId,conversationId:Ae(y.conversationId)??E.conversationId,count:typeof y.count=="number"&&y.count>=0?y.count:E.count,lastSeq:Math.max(typeof y.lastSeq=="number"?y.lastSeq:0,E.lastSeq),lastChangeAt:xm(E.lastChangeAt,Ae(y.lastChangeAt)),messages:Sn(Ne),nextCursor:Qe,articleReactions:ko(y.articleReactions),reactionSet:Object.freeze(Array.isArray(y.reactionSet)?y.reactionSet.filter(oe=>typeof oe=="string"):[]),preset:Ae(y.preset),viewer:wm(y.viewer),loaded:!0,stale:B===null?!1:E.stale})}function h(y){if(n.has(y.clientMsgId))return;const x=_o(y.replyToSeq)?y.replyToSeq:null;if(x!==null&&!e.messages.some(B=>B.seq===x))return;const N=bi(y.author)??Za,M=Object.freeze({conversationId:e.conversationId??"",seq:r--,id:`pending:${y.clientMsgId}`,rev:0,replyToSeq:x,author:N,state:"visible",body:y.body,displayBody:y.body,displayLanguageCode:y.languageCode??null,sourceLanguageCode:y.languageCode??null,isTranslated:!1,isEdited:!1,createdAt:y.createdAt??new Date().toISOString(),editedAt:null,collapsed:!1,reactions:ds,translationVersionId:null,replies:Object.freeze([]),pending:"post",clientMsgId:y.clientMsgId});n.set(y.clientMsgId,{type:"post",before:null});const E=x===null?Sn([...e.messages,M]):Object.freeze(e.messages.map(B=>B.seq===x?Object.freeze({...B,replies:Sn([...B.replies,M])}):B));c({...e,messages:E})}function b(y){if(n.has(y.clientMsgId))return;const x=hn(e.messages,M=>M.seq===y.seq);if(!x||x.pending)return;n.set(y.clientMsgId,{type:y.type,before:x});const N=y.type==="edit"?Object.freeze({...x,body:y.body,displayBody:y.body,displayLanguageCode:x.sourceLanguageCode,isTranslated:!1,isEdited:!0,pending:"edit",clientMsgId:y.clientMsgId}):Object.freeze({...x,pending:"delete",clientMsgId:y.clientMsgId});c({...e,messages:Yt(e.messages,M=>M===x?N:M)})}const _=y=>e.conversationId===null||el(y.conversationId,e.conversationId);function $(y){const x=n.get(y.clientMsgId);if(!x&&s.has(y.clientMsgId))return;n.delete(y.clientMsgId);const N=wo(y.message,y.message?.replyToSeq===null||y.message?.replyToSeq===void 0),M=N&&_(N)?N:null,E=Yt(e.messages,K=>K.clientMsgId===y.clientMsgId&&K.pending==="post"?null:K.clientMsgId===y.clientMsgId?sl(K):K);if(!M){E!==e.messages&&c({...e,messages:E});return}const B=y.warnings?Ja(y.warnings):void 0,ee=B&&B.length>0?Object.freeze({...M,warnings:B}):M,re=hn(E,K=>K.seq===ee.seq);let be,we=e.count;if(ee.state==="deleted"||x?.type==="delete"){const K=re??null,D=K?.state==="visible"&&K.body!==null;be=Yt(E,U=>U.seq!==ee.seq?U:Qa(U)?Object.freeze({...ee,replies:U.replies}):null),D&&(we=Math.max(0,we-1))}else be=Xa(E,ee),!re&&ee.state==="visible"&&(we+=1);c({...e,conversationId:e.conversationId??(x?ee.conversationId:null),lastSeq:Math.max(e.lastSeq,ee.seq),count:we,messages:be})}function v(y){const x=n.get(y);if(!x)return;n.delete(y);const N=Yt(e.messages,M=>{if(M.clientMsgId!==y)return M;if(x.type==="post")return null;const E=x.before;return E?M.replyToSeq===null?Object.freeze({...E,replies:M.replies}):E:sl(M)});N!==e.messages&&c({...e,messages:N})}function I(y){const x=wo(y,y?.replyToSeq===null||y?.replyToSeq===void 0);!x||!hn(e.messages,N=>N.seq===x.seq&&!N.pending&&el(N.conversationId,x.conversationId))||c({...e,messages:vi(e.messages,x)})}function j(y){if(Dt(y))switch(y.type){case"post":return h(y);case"edit":case"delete":return b(y);case"confirm":return $(y);case"rollback":return v(y.clientMsgId);case"server":return I(y.message)}}function P(y){if(!Dt(y)||!e.loaded||e.articleId===null||Ae(y.articleId)?.toLowerCase()!==e.articleId)return!1;if(e.stale)return!0;const x=typeof y.lastSeq=="number"&&y.lastSeq>e.lastSeq,N=typeof y.count=="number"&&y.count!==e.count,M=Ae(y.lastChangeAt),E=M!==null&&(e.lastChangeAt===null||Date.parse(M)>Date.parse(e.lastChangeAt));return!x&&!N&&!E?!1:(c({...e,stale:!0}),!0)}function T(y,x){if(!Dt(y))return;const N=ko(x);if("articleId"in y){if(Ae(y.articleId)?.toLowerCase()!==e.articleId)return;c({...e,articleReactions:N});return}const{conversationId:M,seq:E}=y;if(!_o(E)||typeof M!="string")return;const B=M.toLowerCase(),ee=Yt(e.messages,re=>re.seq===E&&re.conversationId.toLowerCase()===B?Object.freeze({...re,reactions:N}):re);ee!==e.messages&&c({...e,messages:ee})}function g(y,x){if(typeof y!="string"||y==="")return;const N=y.toLowerCase();x?a.add(N):a.delete(N);const M=Yt(e.messages,E=>E.author.kind==="member"&&E.author.memberId!==null&&E.author.memberId.toLowerCase()===N&&E.body!==null&&E.collapsed!==x?Object.freeze({...E,collapsed:x}):E);M!==e.messages&&c({...e,messages:M})}function k(y,x){const N=tl(y),M=y.body!==null&&N!==null&&a.has(N),E=x?x.reactions.mine:null,B=E===y.reactions.mine?y.reactions:Object.freeze({counts:y.reactions.counts,mine:E}),ee=x?.repliesTruncated===!0&&y.replyToSeq===null,re=x?.warnings;return M===y.collapsed&&B===y.reactions&&!ee&&!re?y:Object.freeze({...y,collapsed:M,reactions:B,...ee?{repliesTruncated:!0}:{},...re?{warnings:re}:{}})}function O(y){if(!Dt(y)||!e.loaded)return"dropped";const x=typeof y.rev=="number"&&Number.isSafeInteger(y.rev)&&y.rev>=0?y.rev:null;if(y.kind==="resync")return"resync";if(x===null)return"dropped";if(y.kind==="reaction"){if(y.seq===void 0){const Ne=ko(y.reactions);return c({...e,articleReactions:Object.freeze({counts:Ne.counts,mine:e.articleReactions.mine})}),"applied"}if(!_o(y.seq))return"dropped";const K=y.seq,D=hn(e.messages,Ne=>Ne.seq===K);if(!D||D.pending||x<D.rev)return"dropped";if(x>D.rev)return"resync";const U=ko(y.reactions),Le=Object.freeze({counts:U.counts,mine:D.reactions.mine});return c({...e,messages:Yt(e.messages,Ne=>Ne===D?Object.freeze({...Ne,reactions:Le}):Ne)}),"applied"}if(y.kind!=="message"&&y.kind!=="edit"&&y.kind!=="delete")return"dropped";const N=y.message,M=wo(N,N?.replyToSeq===null||N?.replyToSeq===void 0);if(!M||!_(M))return"dropped";const E=hn(e.messages,K=>K.seq===M.seq);if(E?.pending)return"dropped";const B=E?.rev??0;if(y.kind==="delete"){if(!E||x<=B)return"dropped";const K=E.state==="visible"&&E.body!==null,D=Yt(e.messages,U=>U.seq!==M.seq?U:Qa(U)?Object.freeze({...M,replies:U.replies}):null);return c({...e,messages:D,count:K?Math.max(0,e.count-1):e.count,lastSeq:Math.max(e.lastSeq,M.seq)}),"applied"}const ee=M.author.kind==="member"&&M.author.memberId!==null&&M.author.memberId===e.viewer.memberId;if(!E&&ee&&[...n.values()].some(K=>K.type==="post")||x<=B)return"dropped";if(x>B+1||!E&&M.replyToSeq!==null&&!e.messages.some(K=>K.seq===M.replyToSeq))return"resync";const re=k(M,E),be=E?vi(e.messages,re):Xa(e.messages,re),we=!E&&M.state==="visible"?e.count+1:e.count;return c({...e,messages:be,count:we,lastSeq:Math.max(e.lastSeq,M.seq)}),"applied"}const w={getState:()=>e,subscribe(y){return t.add(y),()=>{t.delete(y)}},applyPage:p,applyMessage:j,applyHead:P,applyReaction:T,collapse:g,applyEvent:O,reset(){l(),c(gi)}};return nl.set(w,()=>o),w}function sl(e){const{pending:t,clientMsgId:n,...s}=e;return Object.freeze(s)}function Gt(e){const t="viewer"in e?e.viewer.needs:e.needs,n=new Set(t.filter(Wn)),s=n.has("sign_in"),o=n.has("onboarding"),r=o||n.has("reconsent_rules"),a=n.has("art9_consent");return Object.freeze({signIn:s,onboarding:o,rules:r,art9:a,any:s||o||r||a})}function Zn(e,t){return hn(e.messages,n=>n.seq===t)}function Tm(e,t){return t.author.kind==="member"&&t.author.memberId!==null&&t.author.memberId===e.viewer.memberId}function Cm(e,t){if("articleId"in t)return e.articleReactions;const n=t.conversationId.toLowerCase();return hn(e.messages,o=>o.seq===t.seq&&o.conversationId.toLowerCase()===n)?.reactions??ds}function Sm(e,t){const n={...e.counts},s=e.mine;if(s!==null){const o=(n[s]??0)-1;o>0?n[s]=o:delete n[s]}return t!==null&&(n[t]=(n[t]??0)+1),Object.freeze({counts:Object.freeze(n),mine:t})}const Am=20;function yi(e){const t=nl.get(e);let n=t?.(),s=e.getState().articleId;return{moved:()=>t!==void 0&&t()!==n||e.getState().articleId!==s,mark(){n=t?.(),s=e.getState().articleId}}}const Om=e=>typeof e=="number"&&Number.isFinite(e)?e:null;async function Em(e,t,n,s){const o=e.getState(),r=o.loaded?o.nextCursor:0,a=yi(e);let l=null;for(let c=0;c<Am;c++){const p=await t.discussions.list({articleId:n.articleId,languageCode:n.languageCode??null,cursor:l},s);if(!p.ok)return p;if(a.moved())break;e.applyPage(p.value,{cursor:l}),a.mark();const h=Om(p.value.nextCursor);if(h===null||r!==null&&h>=r||l!==null&&h<=l)break;l=h}return{ok:!0,value:e.getState()}}async function Mm(e,t,n,s){const o=e.getState().nextCursor;if(o===null)return{ok:!0,value:e.getState()};const r=yi(e),a=await t.discussions.list({articleId:n.articleId,languageCode:n.languageCode??null,cursor:o},s);return a.ok?(r.moved()||e.applyPage(a.value,{cursor:o}),{ok:!0,value:e.getState()}):a}const Pm=2e4,Rm=5*6e4,Nm=6e4,jm=(e,t)=>e.lastSeq===t.lastSeq&&e.count===t.count&&e.lastChangeAt===t.lastChangeAt;function zm(e,t,n){return il({ask:(s,o)=>e.discussions.head({articleIds:s},o),keyOf:s=>typeof s?.articleId=="string"?s.articleId.toLowerCase():null,max:Sf,stopsOn:["surfaceOff"]},t,n)}function Lm(e,t,n){return il({ask:(s,o)=>e.forum.topics.head({conversationIds:s},o),keyOf:s=>typeof s?.conversationId=="string"?s.conversationId.toLowerCase():null,max:Af,stopsOn:["surfaceOff","membersOnly"]},t,n)}function il(e,t,n){const s=Math.max(1e3,n.intervalMs??Pm),o=[...new Set((Array.isArray(t)?t:[]).filter(g=>typeof g=="string"&&g!==""))].slice(0,e.max),r=n.visible??(()=>typeof document>"u"||document.visibilityState!=="hidden"),a=new Map;let l=null,c=null,p=0,h=!1,b=!1;const _=g=>{b||(l&&clearTimeout(l),l=setTimeout(()=>{I()},g))},$=g=>{_(g),h=!0},v=()=>{!b&&!c&&!h&&_(0)};async function I(){if(l=null,h=!1,b||c)return;if(!r()){_(s);return}const g=new AbortController;c=g;const k={signal:g.signal},O=await e.ask(o,k);if(c=null,!b){if(O.ok){p=0;const w=[];for(const y of Array.isArray(O.value.heads)?O.value.heads:[]){const x=e.keyOf(y);if(x===null)continue;const N=a.get(x);a.set(x,y),(!N||!jm(N,y))&&w.push(y)}if(w.length>0)try{n.onChange(w)}catch{}_(s);return}try{n.onFailure?.(O)}catch{}if(e.stopsOn.includes(O.code))return T();if(O.code==="fast"||O.code==="quota"){$(Math.max(s,O.retryAfterS!==void 0?O.retryAfterS*1e3:Nm));return}p=Math.min(Rm,(p||s)*2),$(p)}}const j=()=>{r()&&v()},P=()=>T();function T(){b||(b=!0,l&&clearTimeout(l),l=null,c?.abort(),c=null,typeof document<"u"&&document.removeEventListener("visibilitychange",j),n.signal?.removeEventListener("abort",P))}return o.length===0||n.signal?.aborted?(b=!0,{stop:()=>{},now:()=>{}}):(typeof document<"u"&&document.addEventListener("visibilitychange",j),n.signal?.addEventListener("abort",P,{once:!0}),_(s),{stop:T,now:v})}const It=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),An=e=>typeof e=="string"?e:null,Dm=Object.freeze({counts:Object.freeze({}),mine:null}),Fm=Object.freeze({kind:"member",memberId:null,handle:null,displayName:null,avatarPreset:null,deleted:!0});function Um(e){if(!It(e))return null;const t=An(e.id),n=An(e.slug),s=An(e.name);return t===null||n===null||s===null?null:Object.freeze({id:t,slug:n,name:s})}function rl(e){if(!It(e))return null;const t=An(e.conversationId);return t===null||t===""?null:Object.freeze({conversationId:t,category:Um(e.category),title:An(e.title),state:An(e.state)??"open",pinned:e.pinned===!0,createdAt:An(e.createdAt)??"",author:bi(e.author)??Fm,following:e.following===!0})}const qm=(e,t)=>e===t||e!==null&&t!==null&&e.id===t.id&&e.slug===t.slug&&e.name===t.name,Bm=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function al(e,t){return e===t?!0:e===null||t===null?!1:e.conversationId===t.conversationId&&e.title===t.title&&e.state===t.state&&e.pinned===t.pinned&&e.createdAt===t.createdAt&&e.following===t.following&&qm(e.category,t.category)&&Bm(e.author,t.author)}const fs=1,ll=new WeakMap;function Hm(){const e=ol();let t=null,n=!1,s=!1;const o=new Set;let r=null,a=null;const l=w=>{if(a&&a.from===w&&a.moderator===n)return a.viewer;const y=Object.freeze({...w,moderator:n});return a={from:w,moderator:n,viewer:y},y},c=()=>{const w=e.getState();if(r&&r.from===w&&r.header===t&&r.moderator===n&&r.openingDeleted===s)return r.state;const y=w.messages.find(N=>N.seq===fs),x=Object.freeze({conversationId:w.loaded?w.conversationId:null,topic:w.loaded?t:null,count:w.count,lastSeq:w.lastSeq,lastChangeAt:w.lastChangeAt,messages:w.messages,openingState:y?y.state:s&&w.loaded?"deleted":null,nextCursor:w.nextCursor,reactionSet:w.reactionSet,preset:w.preset,viewer:l(w.viewer),loaded:w.loaded,stale:w.stale});return r={from:w,header:t,moderator:n,openingDeleted:s,state:x},x};let p=c(),h=!1;const b=()=>{if(h)return;const w=c();if(w!==p){p=w;for(const y of[...o])try{y(w)}catch{}}};e.subscribe(b);const _=w=>{h=!0;try{return w()}finally{h=!1,b()}},$=()=>e.getState().articleId;function v(w,y={}){if(!It(w))return;const x=rl(w.topic);if(x===null)return;const N=x.conversationId.toLowerCase(),M={articleId:N,conversationId:x.conversationId,count:w.count,lastSeq:w.lastSeq,lastChangeAt:w.lastChangeAt,messages:w.messages,nextCursor:w.nextCursor,articleReactions:Dm,reactionSet:w.reactionSet,preset:w.preset,viewer:w.viewer};_(()=>{const E=$()!==N,B=Array.isArray(w.messages)&&w.messages.some(ee=>It(ee)&&ee.seq===fs);(E||B)&&(s=!1),al(t,x)||(t=x),n=It(w.viewer)&&w.viewer.moderator===!0,e.applyPage(M,y)})}function I(w){const y=rl(w),x=$();y===null||x===null||y.conversationId.toLowerCase()!==x||al(t,y)||(t=y,b())}function j(){s=!0,!(t===null||t.title===null)&&(t=Object.freeze({...t,title:null}))}function P(w){It(w)&&_(()=>{const y=e.getState();if(e.applyMessage(w),w.type!=="confirm"||e.getState()===y)return;const x=It(w.message)?w.message:null;x!==null&&x.seq===fs&&x.state==="deleted"&&j()})}function T(w){if(!It(w)||typeof w.conversationId!="string")return!1;const y={articleId:w.conversationId,count:w.count,lastSeq:w.lastSeq,lastChangeAt:w.lastChangeAt};return e.applyHead(y)}function g(w,y){!It(w)||typeof w.conversationId!="string"||e.applyReaction({conversationId:w.conversationId,seq:w.seq},y)}function k(w){if(!It(w)||w.kind==="reaction"&&w.seq===void 0)return"dropped";const y=_(()=>e.applyEvent(w)),x=It(w.message)?w.message:null,N=x!==null&&x.seq===fs&&(w.kind==="edit"||w.kind==="delete"||w.kind==="message");return y==="applied"&&N?"resync":y}const O={getState:c,subscribe(w){return o.add(w),()=>{o.delete(w)}},applyPage:v,applyTopic:I,applyMessage:P,applyHead:T,applyReaction:g,collapse:(w,y)=>e.collapse(w,y),applyEvent:k,reset(){_(()=>{t=null,n=!1,s=!1,e.reset()})}};return ll.set(O,e),O}function Vm(e){return e!=null&&Zf(e.state)&&e.state==="open"}const Km=Object.freeze({kind:"deleted"}),cl=Object.freeze({kind:"withheld"});function ul(e,t){return typeof e=="string"&&e.trim()!==""?Object.freeze({kind:"shown",text:e}):t==="deleted"?Km:cl}function ms(e){if(!It(e))return cl;if("messages"in e&&"topic"in e){const{topic:n,openingState:s}=e;return ul(It(n)?n.title:null,s)}const t=e;return ul(t.title,t.openingState)}const Wm=20;function dl(e){const t=ll.get(e);if(t)return yi(t);let n=e.getState().conversationId;return{moved:()=>e.getState().conversationId!==n,mark(){n=e.getState().conversationId}}}const Ym=e=>typeof e=="number"&&Number.isFinite(e)?e:null;async function fl(e,t,n,s){const o=e.getState(),r=o.loaded?o.nextCursor:0,a=dl(e);let l=null;for(let c=0;c<Wm;c++){const p=await t.forum.topics.get({conversationId:n.conversationId,languageCode:n.languageCode??null,cursor:l},s);if(!p.ok)return p;if(a.moved())break;e.applyPage(p.value,{cursor:l}),a.mark();const h=Ym(p.value.nextCursor);if(h===null||r!==null&&h>=r||l!==null&&h<=l)break;l=h}return{ok:!0,value:e.getState()}}async function Gm(e,t,n,s){const o=e.getState().nextCursor;if(o===null)return{ok:!0,value:e.getState()};const r=dl(e),a=await t.forum.topics.get({conversationId:n.conversationId,languageCode:n.languageCode??null,cursor:o},s);return a.ok?(r.moved()||e.applyPage(a.value,{cursor:o}),{ok:!0,value:e.getState()}):a}async function Zm(e,t,n,s,o){if(s.code!=="notFound")return s;const r=await fl(e,t,n,o);return r.ok?s:r}const Ot=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),_i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ml(e,t){if(typeof t!="string"||!_i.test(t))return null;const n=t.toLowerCase();return e==="conversation"?Object.freeze({conversationId:n}):e==="category"?Object.freeze({categoryId:n}):null}function Jm(e){if(!Ot(e))return null;const{conversationId:t,categoryId:n}=e;return typeof t=="string"&&n===void 0&&_i.test(t)?Object.freeze({kind:"conversation",id:t.toLowerCase()}):typeof n=="string"&&t===void 0&&_i.test(n)?Object.freeze({kind:"category",id:n.toLowerCase()}):null}function $o(e){if(!Ot(e))return null;if("targetKind"in e){const n=ml(e.targetKind,e.targetId);return n===null?null:$o(n)}const t=Jm(e);return t===null?null:`${t.kind}:${t.id}`}const pl=e=>e.replace(/\s+/gu," ").trim();function hl(e){if(typeof e!="string")return 0;const t=pl(e);return Math.max(t.length,[...t.normalize("NFC")].length)}function ki(e){if(typeof e!="string")return null;const t=pl(e),n=hl(t);return n>=1&&n<=is?t:null}function wi(e){if(typeof e!="string")return null;const t=e.replace(/\s+/gu," ").trim();return[...t].length>=pi&&t.length<=rs?t:null}function Xm(e){if(!Ot(e)||e.hasMore!==!0)return null;const t=e.page;return typeof t!="number"||!Number.isSafeInteger(t)||t<1||t>=La?null:t+1}function Qm(e){return!Ot(e)||typeof e.conversationId!="string"?!1:e.kind==="topic"?!0:e.kind==="article"&&typeof e.articleId=="string"}function $i(e){return Array.isArray(e)?e.filter(Qm):[]}const ep=Object.freeze({forum:"forum",article_discussions:"articleDiscussions"}),xi=e=>typeof e=="string"?e:"";function tp(e){if(!Ot(e))return null;const t=Ot(e.brake)&&typeof e.brake.until=="string"?e.brake:null;return Object.freeze({enabled:e.enabled===!0,brake:t===null?null:Object.freeze({kind:xi(t.kind),until:xi(t.until),reasonCode:xi(t.reasonCode)})})}function bl(e,t){return!Ot(e)||!Ot(e.surfaces)||!Xf(t)?null:tp(e.surfaces[ep[t]])}function np(e,t=Date.now()){if(!Ot(e)||!Ot(e.away))return null;const n=e.away.until;if(typeof n!="string")return null;const s=Date.parse(n);return Number.isFinite(s)&&s>t?Object.freeze({until:n}):null}function gl(e,t){if(!Ot(e)||!Ot(e.moderator)||typeof t!="string"||t==="")return!1;const n=e.moderator.categoryIds;if(!Array.isArray(n))return!1;const s=t.toLowerCase();return n.some(o=>typeof o=="string"&&o.toLowerCase()===s)}const Ke=Object.freeze({myCommunity:"/community",statement:"/community/statements/{id}",report:"/community/report",notices:"/community/notices",rules:"/community/rules",terms:"/community/terms",privacy:"/community/privacy",discussions:"/community/discussions",profile:"/community/u/{handle}",settings:"/community/settings",welcome:"/community/welcome",notifications:"/community/notifications",forum:"/community/forum",category:"/community/c/{slug}",topic:"/community/t/{id}",search:"/community/search"}),vl=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,yl=/^kbnt_[A-Za-z0-9_-]{1,507}$/,_l="t";function bn(e){return typeof e=="string"&&/^\/(?![/\\])/.test(e)&&!/[\s\\\u0000-\u001f\u007f]/.test(e)}function Jn(e,t){const n=e==null||e===""?Ke.statement:e;return!bn(n)||!n.includes("{id}")||/[{}]/.test(n.split("{id}").join(""))||typeof t!="string"||!vl.test(t)?null:n.split("{id}").join(t.toLowerCase())}function kl(e,t){const n=e==null||e===""?Ke.profile:e;if(!bn(n)||!n.includes("{handle}")||/[{}]/.test(n.split("{handle}").join("")))return null;const s=typeof t=="string"?t.replace(/^@/,"").toLowerCase():"";return yo.test(s)?n.split("{handle}").join(s):null}function On(e,t){const n=e==null||e===""?Ke.category:e;return!bn(n)||n.includes("#")||!n.includes("{slug}")||/[{}]/.test(n.split("{slug}").join(""))||typeof t!="string"||!Ef.test(t)?null:n.split("{slug}").join(t)}function xo(e,t){const n=e==null||e===""?Ke.topic:e;return!bn(n)||n.includes("#")||!n.includes("{id}")||/[{}]/.test(n.split("{id}").join(""))||typeof t!="string"||!vl.test(t)?null:n.split("{id}").join(t.toLowerCase())}function Ii(e,t,n){const s=xo(e,t),o=Io(n);return s===null||o===null?null:`${s}#${o}`}const wl="bcm-msg-",$l=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>0;function Io(e){return $l(e)?`${wl}${e}`:null}function xl(e){const t=new RegExp(`^#${wl}([1-9][0-9]{0,14})$`).exec(typeof e=="string"?e:""),n=t?Number(t[1]):NaN;return $l(n)?n:null}function Ti(e,t,n){const s=Il(e,t),o=Io(n);return s===null||o===null?null:`${s}#${o}`}function Il(e,t){const n=e;return!bn(n)||n.includes("#")||!n.includes("{slug}")||/[{}]/.test(n.split("{slug}").join(""))||typeof t!="string"||t===""||t.length>512||t==="."||t===".."||/[\u0000-\u001f\u007f]/.test(t)?null:n.split("{slug}").join(encodeURIComponent(t))}function op(e,t){const n=e==null||e===""?Ke.notices:e;return!bn(n)||n.includes("#")||typeof t!="string"||!yl.test(t)?null:`${n}#${_l}=${t}`}function En(e,t){return bn(e)?e.includes("#")||!bn(t)||t.includes("#")?e:`${e}#${t}`:null}function Tl(e){const n=/^#t=([^&]*)/.exec(typeof e=="string"?e:"")?.[1]??"";return yl.test(n)?n:null}const Ci=new WeakMap;function Si(){if(typeof window>"u")throw new Error("[blogmcp-sdk] readReceiptFromHash and readDigestTokenFromHash read the address bar — call them in the browser (onMounted / useEffect), never while rendering on the server");return window}function sp(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function ip(e,t,n){let s=e;const o=t?s.indexOf(t):-1;if(o>=0&&(s=s.slice(0,o)),n!==null)for(let r=s.indexOf(n);r>=0;r=s.indexOf(n)){const a=s.lastIndexOf("#",r);s=a>=0?s.slice(0,a):s.slice(0,r)+s.slice(r+n.length)}return s}function Cl(e,t,n){if(!sp(e))return e;let s=!1;const o={...e};for(const[r,a]of Object.entries(o)){if(typeof a!="string")continue;const l=ip(a,t,n);l!==a&&(o[r]=l,s=!0)}return s?o:e}function rp(e=Si()){const t=e.location.hash,n=Tl(t),s=!Ci.has(e);return t.startsWith(`#${_l}=`)&&e.history.replaceState(Cl(e.history.state,t,n),"",e.location.pathname+e.location.search),(s||n!==null)&&Ci.set(e,n),Ci.get(e)??null}const ap=/^kbun_[A-Za-z0-9_-]{64}$/,lp="u";function Sl(e){const n=/^#u=([^&]*)/.exec(typeof e=="string"?e:"")?.[1]??"";return ap.test(n)?n:null}const ps=new WeakMap;function cp(e=Si()){const t=e.location.hash,n=Sl(t),s=!ps.has(e);return t.startsWith(`#${lp}=`)&&e.history.replaceState(Cl(e.history.state,t,n),"",e.location.pathname+e.location.search),(s||n!==null)&&ps.set(e,n),ps.get(e)??null}function up(e=Si()){ps.delete(e)}const dp=/(^|[^A-Za-z0-9_@./])@([A-Za-z0-9][A-Za-z0-9_]{2,29})(?![A-Za-z0-9_])/g;function Al(e){if(typeof e!="string"||e==="")return[];if(!e.includes("@"))return[{kind:"text",text:e}];const t=[];let n=0;for(const s of e.matchAll(new RegExp(dp.source,"g"))){const o=s[2],r=o.toLowerCase();if(!yo.test(r))continue;const a=(s.index??0)+s[1].length;a>n&&t.push({kind:"text",text:e.slice(n,a)}),t.push({kind:"mention",text:`@${o}`,handle:r}),n=a+1+o.length}return n<e.length&&t.push({kind:"text",text:e.slice(n)}),t}function Ol(e){const t=[];for(const n of Al(e))n.kind==="mention"&&!t.includes(n.handle)&&t.push(n.handle);return t}const fp={"error.method":"Tohle se takhle spustit nedá. Obnovte prosím stránku.","error.origin":"Požadavek nepřišel z této stránky. Obnovte ji prosím a zkuste to znovu.","error.unavailable":"Teď se to nepodařilo načíst ani uložit. Zkuste to prosím za chvíli.","error.invalid":"Něco ve formuláři nesedí. Zkontrolujte ho prosím a zkuste to znovu.","error.signIn":"K tomu je potřeba přihlásit se čtenářským účtem.","error.onboarding":"Než začnete psát, dokončete prosím vstup do diskuse.","error.age":"Diskuse je otevřená od vyššího věku, zapojit se do ní zatím nejde.","error.name":"Tohle jméno použít nejde. Zkuste prosím jiné.","error.handle":"Tohle uživatelské jméno je obsazené, nebo jste ho nedávno měnili. Zkuste prosím jiné, nebo později.","error.restricted":"Psaní do diskuse máte teď omezené.","error.suspended":"Váš účet v diskusi je teď pozastavený.","error.terminated":"Váš účet v diskusi je zrušený.","error.links":"V komentáři je víc odkazů, než se vejde. Některé prosím uberte.","error.fast":"Jde to moc rychle za sebou. Chvilku počkejte a zkuste to znovu.","error.blocked":"Komentář v téhle podobě zveřejnit nejde. Zkuste ho prosím upravit.","error.confirm":"Než komentář odešlete, potvrďte prosím jednu věc.","error.removed":"Tahle zpráva byla odstraněna, upravit ji už nejde.","error.quota":"Posíláte toho hodně najednou. Zkuste to prosím později.","error.captcha":"Nepodařilo se ověřit, že nejste robot. Počkejte prosím na nové ověření a odešlete to znovu.","error.notFound":"Tohle jsme nenašli. Možná už není k dispozici.","error.surfaceOff":"Diskuse tu teď není k dispozici.","error.notMoved":"Diskusi teď připravujeme. Psát do ní půjde brzy.","error.ledger":"Teď se to nepodařilo uložit a všechno zůstalo, jak bylo. Zkuste to prosím znovu.","error.readOnly":"Tahle funkce komunity je teď vypnutá. Diskuse pod články běží dál.","error.braked":"Psaní je teď na chvíli pozastavené. Číst můžete dál, psát půjde zase brzy.","error.mentionLimit":"V jednom příspěvku jste zmínili víc lidí, než zatím jde. Některé zmínky odeberte a pošlete znovu.","error.pushRefused":"V tomhle prohlížeči upozornění zapnout nejde. Zkuste jiný prohlížeč, nebo sledujte stránku s upozorněními.","error.realtimeOff":"Nové příspěvky se tu teď neukazují hned. Diskuse se obnovuje sama každou chvíli.","error.membersOnly":"Fórum je otevřené členům komunity. Po přihlášení a vstupu do komunity ho uvidíte.","error.topicLocked":"Téma je uzavřené, psát do něj už nejde. Číst ho můžete dál.","error.topicCreationClosed":"V téhle kategorii nové téma založit nejde. Zkuste prosím jinou.","error.followLimit":"Sledujete toho už hodně. Něco prosím přestaňte sledovat a zkuste to znovu.","error.submit":"Nepovedlo se to. Obnovte prosím stránku a zkuste to znovu.","need.sign_in":"Do diskuse můžete psát po přihlášení.","need.onboarding":"Před prvním komentářem si nastavte jméno a potvrďte pravidla diskuse.","need.reconsent_rules":"Pravidla diskuse se změnila. Potvrďte prosím novou verzi.","need.art9_consent":"Pro psaní do diskuse potřebujeme váš souhlas se zpracováním.","state.visible":"Zveřejněno","state.held":"Čeká na kontrolu","state.removed":"Odstraněno","state.deleted":"Smazáno","state.hiddenUntilConsent":"Čeká na váš souhlas","note.identification_safety":"Podle fotky se houba spolehlivě určit nedá a o jedlosti tady nerozhodujeme. Při podezření na otravu volejte Toxikologické informační středisko: 224 919 293 (nonstop).","note.report_to_manufacturer":"Jde-li o nežádoucí účinek přípravku, dejte nám o něm prosím vědět také v poradně, ať ho můžeme prověřit.","category.fraud_spam":"Podvod nebo spam","category.harassment":"Obtěžování","category.hate":"Nenávistné projevy","category.threats":"Výhrůžky","category.sexual_content":"Sexuální obsah","category.child_at_risk":"Ohrožené dítě","category.self_harm":"Sebepoškozování","category.doxxing":"Zveřejnění cizích osobních údajů","category.copyright":"Porušení autorských práv","category.terrorism":"Terorismus","category.drugs":"Drogy","category.other_illegal":"Jiný nezákonný obsah","category.rules":"Porušení pravidel diskuse","category.adverse_event":"Nežádoucí účinek přípravku","category.third_party_health_data":"Cizí údaje o zdraví","category.suspected_minor":"Autor je nejspíš mladší, než pravidla dovolují","confirm.title":"Než to odešlete","confirm.about_self_or_consent":"Píšu o sobě, nebo mám souhlas člověka, o kterém píšu.","confirm.good_faith":"Potvrzuji, že podle mého nejlepšího vědomí je hlášení přesné a úplné.","confirm.other":"Rozumím upozornění a chci komentář odeslat.","confirm.submit":"Potvrdit a odeslat","warning.identifier":"V komentáři je nejspíš e-mail, telefon nebo číslo účtu. Pokud tam být nemá, komentář upravte.","warning.invisible_chars":"Z komentáře jsme odstranili neviditelné znaky.","warning.other":"Komentář je zveřejněný, ale pravidla diskuse u něj na něco upozorňují. Projděte si ho prosím.","author.deleted":"Smazaný uživatel","author.system":"Oznámení webu","author.badge.team":"Tým","discussion.title":"Diskuse","discussion.count_one":"{count} komentář","discussion.count_few":"{count} komentáře","discussion.count_many":"{count} komentáře","discussion.count_other":"{count} komentářů","discussion.empty":"Zatím tu nejsou komentáře. Začněte diskusi jako první.","discussion.loading":"Načítám diskusi…","discussion.loadMore":"Načíst další","discussion.newMessages":"V diskusi přibyly nové komentáře.","discussion.refresh":"Zobrazit","discussion.signInPrompt":"Přihlaste se a zapojte se do diskuse.","discussion.reply":"Odpovědět","discussion.edit":"Upravit","discussion.delete":"Smazat","discussion.deleteTitle":"Smazat komentář?","discussion.deleteExplain":"Komentář zmizí. Pokud na něj už někdo odpověděl, zůstane po něm prázdné místo.","discussion.deleteConfirm":"Ano, smazat","discussion.report":"Nahlásit","discussion.block":"Blokovat autora","discussion.unblock":"Odblokovat autora","discussion.blocked":"Autora jste zablokovali. Jeho komentáře uvidíte sbalené.","discussion.unblocked":"Autora jste odblokovali.","discussion.menu":"Další akce","discussion.collapsed":"Komentář autora, kterého jste zablokovali.","discussion.show":"Zobrazit","discussion.hide":"Skrýt","discussion.edited":"upraveno","discussion.translated":"Přeloženo automaticky","discussion.showOriginal":"Zobrazit originál","discussion.showTranslation":"Zobrazit překlad","discussion.showReplies_one":"Zobrazit {count} odpověď","discussion.showReplies_few":"Zobrazit {count} odpovědi","discussion.showReplies_many":"Zobrazit {count} odpovědi","discussion.showReplies_other":"Zobrazit {count} odpovědí","discussion.repliesTruncated":"Odpovědí je tu víc, než se dá zobrazit najednou.","discussion.heldNote":"Komentář čeká na kontrolu a zatím ho vidíte jen vy. Po kontrole se ukáže ostatním, nebo se v Moje komunita dozvíte, proč ne.","discussion.hiddenUntilConsentNote":"Komentář zatím vidíte jen vy. Ostatním se ukáže, až udělíte souhlas se zpracováním.","discussion.giveConsent":"Udělit souhlas","discussion.removedNote":"Tenhle komentář jsme odstranili a ostatní ho nevidí.","discussion.why":"Proč?","discussion.placeholderHeld":"Komentář čeká na kontrolu.","discussion.placeholderRemoved":"Komentář byl odstraněn.","discussion.placeholderDeleted":"Komentář byl smazán.","discussion.pending":"Odesílám…","discussion.reactions":"Reakce","discussion.reactionCount":"{emoji} {count}","discussion.reactionAdd":"Přidat reakci","discussion.reactionRemove":"Odebrat reakci","discussion.reactionMine":"Vaše reakce","composer.label":"Váš komentář","composer.replyLabel":"Vaše odpověď","composer.editLabel":"Úprava komentáře","composer.replyingTo":"Odpovídáte: {name}","composer.placeholder":"Napište komentář…","composer.counter":"{length} / {max} znaků","composer.tooLong":"Komentář je moc dlouhý. Zkraťte ho prosím nejvýš na {max} znaků.","composer.linksNote_one":"Do komentáře se vejde nejvýš {count} odkaz.","composer.linksNote_few":"Do komentáře se vejdou nejvýš {count} odkazy.","composer.linksNote_many":"Do komentáře se vejde nejvýš {count} odkazu.","composer.linksNote_other":"Do komentáře se vejde nejvýš {count} odkazů.","composer.shortcut":"Odeslat můžete i klávesami {keys}.","composer.submit":"Odeslat","composer.sending":"Odesílám…","composer.save":"Uložit","composer.cancel":"Zrušit","composer.posted":"Komentář je zveřejněný.","composer.held":"Komentář máme, teď čeká na kontrolu.","composer.cooldown_one":"Další komentář můžete poslat za {count} sekundu.","composer.cooldown_few":"Další komentář můžete poslat za {count} sekundy.","composer.cooldown_many":"Další komentář můžete poslat za {count} sekundy.","composer.cooldown_other":"Další komentář můžete poslat za {count} sekund.","sanction.restriction":"Psaní do diskuse máte omezené.","sanction.restrictionUntil":"Psaní do diskuse máte omezené do {date}.","sanction.suspension":"Váš účet v diskusi je pozastavený.","sanction.suspensionUntil":"Váš účet v diskusi je pozastavený do {date}.","sanction.ban":"Váš účet v diskusi je zrušený.","sanction.statement":"Zobrazit odůvodnění","onboarding.title":"Vítejte v diskusi","onboarding.lede":"Než napíšete první komentář, potřebujeme od vás pár věcí. Zabere to chvilku.","onboarding.ageTitle":"Kolik vám je let?","onboarding.age.16_17":"16–17 let","onboarding.age.18_plus":"18 let a víc","onboarding.ageHint":"Ptáme se jen jednou a uložíme si jen věkovou skupinu.","onboarding.ageBelow":"Diskuse je otevřená od {min} let. Číst ji ale můžete dál.","onboarding.rulesTitle":"Pravidla diskuse","onboarding.rulesLede":"Přečtěte si prosím, jak to v diskusi chodí.","onboarding.rulesLink":"Celá pravidla","onboarding.rulesAccept":"Souhlasím s pravidly diskuse.","onboarding.rulesChanged":"Pravidla diskuse se od vaší poslední návštěvy změnila. Přečtěte si prosím novou verzi a potvrďte ji.","onboarding.art9Title":"Souhlas se zpracováním","onboarding.art9Lede":"Pro psaní do diskuse potřebujeme váš souhlas podle textu níže.","onboarding.art9LedeOptional":"Prosíme o váš souhlas podle textu níže. Psát ve veřejné diskusi můžete i bez něj.","onboarding.art9Accept":"Souhlasím se zpracováním podle textu výše.","onboarding.art9Controller":"Souhlas pro {label}","onboarding.art9Refuse":"Nesouhlasím","onboarding.art9RefusedDone":"Bez tohoto souhlasu můžete psát ve veřejné diskusi.","onboarding.art9RequiredToWrite":"Bez souhlasu můžete diskusi jen číst.","onboarding.profileTitle":"Jak vás uvidí ostatní","onboarding.displayName":"Jméno v diskusi","onboarding.displayNameHint":"Může to být i přezdívka. Uvidí ho všichni čtenáři.","onboarding.handle":"Uživatelské jméno","onboarding.handleHint":"Malá písmena, číslice a podtržítko, {min} až {max} znaků. Změnit ho jde jednou za {days} dní.","onboarding.handleSuggested":"Navrhujeme: {handle}","onboarding.avatar":"Obrázek u jména","onboarding.avatarNone":"Bez obrázku","onboarding.continue":"Pokračovat","onboarding.back":"Zpět","onboarding.submit":"Hotovo","onboarding.done":"Hotovo, teď můžete psát.","report.title":"Nahlásit komentář","report.lede":"Hlášení posoudí tým webu. Výsledek uvidíte v Moje komunita.","report.category":"Co je na komentáři špatně?","report.rule":"Které pravidlo porušuje?","report.ruleOther":"Jiné pravidlo","report.note":"Poznámka pro tým (nepovinné)","report.noteHint":"Poznámku uvidí jen tým, který hlášení posuzuje.","report.counter":"{length} / {max} znaků","report.submit":"Nahlásit","report.sending":"Odesílám…","report.cancel":"Zrušit","report.done":"Díky, hlášení máme. Výsledek uvidíte v Moje komunita.","panel.title":"Moje komunita","panel.signIn":"Moje komunita je dostupná po přihlášení.","panel.profile":"Profil","panel.profileEdit":"Upravit profil","panel.statements":"Rozhodnutí o mém obsahu","panel.statementsEmpty":"Rozhodnutí o vašem obsahu uvidíte tady.","panel.reports":"Moje hlášení","panel.reportsEmpty":"Hlášení, která pošlete, uvidíte tady.","panel.notifications":"Upozornění","panel.notificationsEmpty":"Nová upozornění uvidíte tady.","panel.unread_one":"{count} nepřečtené oznámení","panel.unread_few":"{count} nepřečtená oznámení","panel.unread_many":"{count} nepřečteného oznámení","panel.unread_other":"{count} nepřečtených oznámení","panel.markRead":"Označit jako přečtené","panel.blocks":"Zablokovaní autoři","panel.blocksEmpty":"Autory, které zablokujete, uvidíte tady.","panel.consents":"Souhlasy","panel.art9Given":"Souhlas se zpracováním je udělený.","panel.art9NotGiven":"Souhlas se zpracováním jste zatím nedali.","panel.art9Refused":"Souhlas se zpracováním jste odmítli.","panel.art9Withdraw":"Odvolat souhlas","panel.art9WithdrawTitle":"Odvolat souhlas se zpracováním?","panel.art9WithdrawExplain":"Diskusi můžete dál číst. Jestli do ní půjde psát i bez souhlasu, nebo až ho zase udělíte, záleží na nastavení webu — řekne vám to před dalším komentářem.","panel.art9WithdrawConfirm":"Ano, odvolat souhlas","panel.art9WithdrawCancel":"Ponechat souhlas","panel.art9Withdrawn":"Souhlas jste odvolali.","panel.export":"Stáhnout moje data","panel.exportHint":"Soubor JSON s tím, co o vás v diskusi máme uložené.","panel.exporting":"Připravuji soubor…","panel.exportFileName":"moje-komunita","panel.erase":"Smazat profil v diskusi","panel.eraseExplain":"Po ochranné lhůtě smažeme váš profil v diskusi, vaše komentáře a reakce, pokud je nemusíme ze zákona uchovat. Účet na webu zůstane. Během lhůty to můžete zrušit.","panel.eraseTitle":"Opravdu smazat profil v diskusi?","panel.eraseConfirm":"Ano, smazat profil","panel.eraseKeep":"Ponechat","panel.eraseScheduled":"Profil v diskusi smažeme {date}. Do té doby to můžete zrušit.","panel.eraseCancel":"Zrušit smazání","panel.eraseCancelled":"Smazání jsme zrušili, profil zůstává.","statement.title":"Odůvodnění rozhodnutí","statement.decidedAt":"Rozhodnuto {date}","statement.provider":"Rozhoduje: {entity}","statement.restriction":"Opatření","statement.until":"Do {date}","statement.scope":"Rozsah","statement.scopeAll":"Všude","statement.basis":"Podnět","statement.facts":"Skutečnosti a okolnosti","statement.automation":"Automatizace","statement.automatedDetection":"Zjištěno automaticky","statement.automatedDecision":"Rozhodnuto automaticky","statement.humanDecision":"Rozhodl člověk","statement.legalGround":"Právní důvod","statement.contractualGround":"Pravidlo","statement.redress":"Možnosti nápravy","statement.subject":"Týká se","statement.subjectMessage":"Komentáře","statement.subjectProfile":"Profilu","statement.subjectArticle":"Článku","statement.full":"Celé odůvodnění","statement.appealTitle":"Odvolání","statement.appealLede":"Nesouhlasíte s rozhodnutím? Napište nám proč. Odvolání posoudí, kde to jde, jiný člověk než ten, kdo rozhodoval.","statement.appealUntil":"Odvolat se můžete do {date}.","statement.appealBody":"Proč s rozhodnutím nesouhlasíte?","statement.appealCounter":"{length} / {max} znaků","statement.appealSubmit":"Odeslat odvolání","statement.appealSending":"Odesílám…","statement.appealSent":"Odvolání máme. Až ho posoudíme, dáme vám vědět.","statement.appealOpen":"Vaše odvolání se posuzuje.","statement.appealWithdraw":"Vzít odvolání zpět","statement.appealWithdrawn":"Odvolání jste vzali zpět.","statement.appealClosed":"Lhůta pro odvolání uplynula.","statement.appealUnavailable":"Proti tomuto rozhodnutí se už odvolat nejde.","restriction.no_action":"Bez opatření","restriction.warning":"Upozornění","restriction.removal":"Odstranění obsahu","restriction.visibility_restricted":"Omezená viditelnost","restriction.posting_restricted":"Omezené psaní","restriction.account_suspended":"Pozastavený účet","restriction.account_terminated":"Zrušený účet","basis.notice":"Hlášení","basis.own_initiative":"Vlastní kontrola","basis.order":"Úřední příkaz","caseStatus.open":"Posuzujeme","caseStatus.decided":"Rozhodnuto","caseStatus.appealed":"Probíhá odvolání","caseStatus.closed":"Uzavřeno","appealStatus.open":"Posuzujeme","appealStatus.upheld":"Rozhodnutí platí","appealStatus.reversed":"Rozhodnutí zrušeno","appealStatus.withdrawn":"Vzato zpět","adverseOutcome.recorded":"Posouzeno jako možný nežádoucí účinek a zaznamenáno do evidence.","adverseOutcome.reported_to_authority":"Posouzeno jako možný nežádoucí účinek a ohlášeno příslušnému úřadu.","adverseOutcome.not_adverse":"Posouzeno: o nežádoucí účinek nejde.","notification.decision":"Máte nové rozhodnutí o svém obsahu.","notification.appeal_resolved":"Vaše odvolání je vyřízené.","notification.erasure_scheduled":"Smazání vašeho profilu v diskusi je naplánované.","notification.inactivity_warning":"Dlouho jste v diskusi nebyli. Bez další aktivity váš profil po čase smažeme.","notification.module_read_only":"Rozšířené funkce komunity jsou vypnuté. Diskuse pod články běží dál; co se pro vás mění, najdete na stránce Moje komunita.","notification.module_braked":"Psaní v komunitě je teď pozastavené. Číst můžete dál.","notification.reply":"Někdo odpověděl na váš příspěvek.","notification.mention":"Někdo vás zmínil v diskusi.","notification.module_push_reset":"Upozornění v prohlížeči je potřeba znovu zapnout v nastavení komunity.","notification.age_limit_changed":"Komunita je nově jen pro dospělé, váš profil je proto jen ke čtení. Podrobnosti najdete na stránce Moje komunita.","notification.topic_update":"V diskusi, kterou sledujete, přibyl nový příspěvek.","notification.category_topic":"V kategorii, kterou sledujete, je nové téma.","notification.category_topic.article":"V kategorii, kterou sledujete, je nová diskuse pod článkem.","centre.title":"Upozornění","centre.empty":"Nová upozornění uvidíte tady.","centre.markAllRead":"Označit vše jako přečtené","centre.settings":"Nastavení upozornění","centre.loadMore":"Načíst starší","centre.unreadOnly":"Jen nepřečtené","centre.signIn":"Upozornění uvidíte po přihlášení.","centre.openMessage":"Zobrazit příspěvek","badge.unread_one":"{count} nové upozornění","badge.unread_few":"{count} nová upozornění","badge.unread_many":"{count} nového upozornění","badge.unread_other":"{count} nových upozornění","settings.title":"Nastavení upozornění","settings.signIn":"Nastavení upozornění změníte po přihlášení.","settings.notifyReply":"Odpovědi na moje příspěvky","settings.notifyMention":"Když mě někdo zmíní","settings.notifyTopic":"Novinky v diskusích, které sleduji","settings.pushEnabled":"Upozornění v prohlížeči","settings.digestEmail":"Denní souhrn e-mailem","settings.quietHours":"Noční klid: mezi 22:00 a 7:00 počkají upozornění v prohlížeči do rána.","settings.saved":"Uloženo.","settings.push.enable":"Zapnout upozornění","settings.push.disable":"Vypnout upozornění","settings.push.carries":"Upozornění doručuje tento web. Samo upozornění nenese, co přišlo ani od koho.","settings.push.unsupported":"Tenhle prohlížeč upozornění neumí. Nové odpovědi a zmínky najdete na stránce s upozorněními.","settings.push.refused":"Upozornění se v tomhle prohlížeči zapnout nepodařilo. Zkuste to prosím později nebo v jiném prohlížeči.","settings.push.denied":"Upozornění má tenhle prohlížeč pro tento web zablokovaná. Povolit je můžete v nastavení prohlížeče.","settings.push.inAppExplain":"V aplikaci Facebooku nebo Instagramu upozornění zapnout nejdou. Otevřete stránku v prohlížeči.","settings.push.openInBrowser":"Otevřít v prohlížeči","settings.push.iosGuide":"Na iPhonu a iPadu fungují upozornění jen u webu přidaného na plochu: v Safari klepněte na Sdílet a zvolte „Přidat na plochu“. Pak web otevřete z plochy a upozornění zapněte.","settings.push.reset":"Zapněte si upozornění znovu: nastavení webu se změnilo a dřívější zapnutí přestalo platit.","settings.digest.prompt":"Chcete přestat dostávat denní souhrn e-mailem?","settings.digest.confirm":"Odhlásit denní souhrn","settings.digest.unsubscribed":"Denní souhrn e-mailem jsme vypnuli.","settings.digest.staleLink":"Odkaz na odhlášení souhrnu už neplatí. Po přihlášení ho vypnete přepínačem v nastavení.","profile.memberSince":"Členem od {date}","profile.bio":"O mně","profile.notFound":"Tenhle profil jsme nenašli.","profile.signIn":"Profily členů uvidíte po přihlášení.","trust.0":"Nový člen","trust.1":"Člen","trust.2":"Stálý člen","trust.3":"Důvěryhodný člen","role.moderator":"Moderátor","welcome.title":"Vítejte v komunitě","welcome.lede":"Tady je pár věcí, které se vám na začátku hodí.","welcome.rules":"Jak to v diskusi chodí","welcome.discussions":"Projít diskuse","welcome.settings":"Nastavit upozornění","welcome.profile":"Můj profil","realtime.off":"Živé aktualizace jsou teď vypnuté. Diskuse se sama obnovuje každou chvíli.","state.readOnly":"Rozšířené funkce komunity jsou teď vypnuté. Diskuse pod článkem běží dál.","state.braked":"Psaní je teď na chvíli pozastavené. Číst můžete dál.","state.away":"Tým je teď nepřítomen; nová témata počkají na kontrolu.","topic.deleted":"Smazané téma","topic.withheld":"Název tématu není k dispozici","follow.follow":"Sledovat","follow.following":"Sledujete","follow.followed":"Sledujete. Novinky uvidíte v upozorněních.","follow.unfollowed":"Už nesledujete.","follow.unavailable":"Tohle teď sledovat nejde.","forum.title":"Fórum","forum.loading":"Načítám fórum…","forum.empty":"Kategorie fóra tu zatím nejsou.","forum.topicCount_one":"{count} téma","forum.topicCount_few":"{count} témata","forum.topicCount_many":"{count} tématu","forum.topicCount_other":"{count} témat","forum.discussionCount_one":"{count} diskuse","forum.discussionCount_few":"{count} diskuse","forum.discussionCount_many":"{count} diskuse","forum.discussionCount_other":"{count} diskusí","forum.lastActivity":"Naposledy {date}","forum.latest":"Nejnovější témata","forum.allTopics":"Všechna témata","forum.allCategories":"Všechny kategorie","forum.search":"Hledat ve fóru","forum.searchSubmit":"Hledat","forum.modePre":"Nové příspěvky tu před zveřejněním čekají na kontrolu.","forum.teamTopics":"Témata tady zakládá tým.","forum.join":"Vstoupit do komunity","forum.back":"Zpět na fórum","state.forumBraked":"Psaní ve fóru je teď na chvíli pozastavené. Číst můžete dál.","forumCategory.notFound":"Tuhle kategorii jsme nenašli.","forumCategory.empty":"V téhle kategorii zatím nejsou témata.","forumCategory.articlesEmpty":"Diskuse pod články tu zatím nejsou.","forumCategory.sort":"Řazení","forumCategory.sortActivity":"Podle aktivity","forumCategory.sortNew":"Nejnovější","forumCategory.newTopic":"Nové téma","topic.loading":"Načítám téma…","topic.notFound":"Tohle téma jsme nenašli. Možná už není k dispozici.","topic.count_one":"{count} příspěvek","topic.count_few":"{count} příspěvky","topic.count_many":"{count} příspěvku","topic.count_other":"{count} příspěvků","topic.locked":"Uzavřené","topic.archived":"Archivované","topic.pinned":"Připnuté","topic.titleLabel":"Název tématu","topic.titleMissing":"Napište prosím název tématu.","topic.titleTooLong":"Název je moc dlouhý. Zkraťte ho prosím nejvýš na {max} znaků.","topic.bodyLabel":"Úvodní příspěvek","topic.create":"Založit téma","topic.created":"Téma je založené.","topic.createdHeld":"Téma máme, teď čeká na kontrolu.","topic.open":"Otevřít téma","forumText.composer.label":"Váš příspěvek","forumText.composer.editLabel":"Úprava příspěvku","forumText.composer.placeholder":"Napište příspěvek…","forumText.composer.tooLong":"Příspěvek je moc dlouhý. Zkraťte ho prosím nejvýš na {max} znaků.","forumText.composer.linksNote_one":"Do příspěvku se vejde nejvýš {count} odkaz.","forumText.composer.linksNote_few":"Do příspěvku se vejdou nejvýš {count} odkazy.","forumText.composer.linksNote_many":"Do příspěvku se vejde nejvýš {count} odkazu.","forumText.composer.linksNote_other":"Do příspěvku se vejde nejvýš {count} odkazů.","forumText.composer.posted":"Příspěvek je zveřejněný.","forumText.composer.held":"Příspěvek máme, teď čeká na kontrolu.","forumText.composer.cooldown_one":"Další příspěvek můžete poslat za {count} sekundu.","forumText.composer.cooldown_few":"Další příspěvek můžete poslat za {count} sekundy.","forumText.composer.cooldown_many":"Další příspěvek můžete poslat za {count} sekundy.","forumText.composer.cooldown_other":"Další příspěvek můžete poslat za {count} sekund.","forumText.discussion.empty":"Zatím tu nejsou odpovědi. Odpovězte jako první.","forumText.discussion.deleteTitle":"Smazat příspěvek?","forumText.discussion.deleteExplain":"Příspěvek zmizí. Pokud na něj už někdo odpověděl, zůstane po něm prázdné místo.","forumText.discussion.collapsed":"Příspěvek autora, kterého jste zablokovali.","forumText.discussion.heldNote":"Příspěvek čeká na kontrolu a zatím ho vidíte jen vy. Po kontrole se ukáže ostatním, nebo se v Moje komunita dozvíte, proč ne.","forumText.discussion.hiddenUntilConsentNote":"Příspěvek zatím vidíte jen vy. Ostatním se ukáže, až udělíte souhlas se zpracováním.","forumText.discussion.removedNote":"Tenhle příspěvek jsme odstranili a ostatní ho nevidí.","forumText.discussion.placeholderHeld":"Příspěvek čeká na kontrolu.","forumText.discussion.placeholderRemoved":"Příspěvek byl odstraněn.","forumText.discussion.placeholderDeleted":"Příspěvek byl smazán.","forumText.report.title":"Nahlásit příspěvek","forumText.report.category":"Co je na příspěvku špatně?","forumText.error.links":"V příspěvku je víc odkazů, než se vejde. Některé prosím uberte.","forumText.error.blocked":"Příspěvek v téhle podobě zveřejnit nejde. Zkuste ho prosím upravit.","forumText.error.confirm":"Než příspěvek odešlete, potvrďte prosím jednu věc.","forumText.confirm.other":"Rozumím upozornění a chci příspěvek odeslat.","forumText.warning.identifier":"V příspěvku je nejspíš e-mail, telefon nebo číslo účtu. Pokud tam být nemá, příspěvek upravte.","forumText.warning.other":"Příspěvek je zveřejněný, ale pravidla diskuse u něj na něco upozorňují. Projděte si ho prosím.","forumText.need.onboarding":"Před prvním příspěvkem si nastavte jméno a potvrďte pravidla diskuse.","forumText.need.art9_consent":"Pro psaní ve fóru potřebujeme váš souhlas se zpracováním.","search.title":"Hledání ve fóru","search.label":"Co hledáte?","search.submit":"Hledat","search.searching":"Hledám…","search.tooShort":"Napište prosím aspoň {min} znaky.","search.tooLong":"Hledaný text je moc dlouhý. Zkraťte ho prosím nejvýš na {max} znaků.","search.empty":"K tomu jsme nenašli výsledky. Zkuste jiná slova.","search.more":"Další výsledky","search.lastPage":"Další výsledky už nezobrazíme. Zkuste hledání upřesnit.","search.space":"Kde hledat","search.spaceAll":"Všude","search.spaceForum":"Ve fóru","search.spaceArticle":"V diskusích pod články","search.category":"Kategorie","search.topic":"Téma","search.message":"Příspěvek","search.inArticle":"Diskuse pod článkem","moderation.title":"Moderování","moderation.loading":"Načítám frontu…","moderation.empty":"Fronta je teď prázdná.","moderation.source.member_report":"Nahlásil člen","moderation.source.filter":"Zachytil filtr","moderation.source.staff":"Od týmu","moderation.premod":"Čeká na schválení","moderation.heldBySystem":"Zatím skryté automaticky","moderation.deadline":"Vyřídit do {date}","moderation.open":"Posoudit","moderation.package":"Obsah k posouzení","moderation.itemWithheld":"Tenhle příspěvek teď ostatní nevidí, a tak ho tu neukazujeme.","moderation.restriction":"Rozhodnutí","moderation.factsHint":"Popište, co jste u obsahu zjistili. Text bude součástí odůvodnění pro autora.","moderation.ruleRequired":"Vyberte prosím pravidlo, o které se rozhodnutí opírá.","moderation.preview":"Náhled odůvodnění","moderation.previewTitle":"Takhle odůvodnění uvidí autor","moderation.decide":"Rozhodnout","moderation.decided":"Rozhodnuto.","moderation.escalate":"Předat týmu","moderation.escalateLede":"Jde podle vás o protiprávní obsah? Předejte ho týmu webu, posoudí ho sám.","moderation.escalateCategory":"O co jde?","moderation.escalated":"Předáno týmu.","moderation.remove":"Odstranit jako moderátor","moderation.removeLede":"Příspěvek zmizí a autor dostane odůvodnění, proti kterému se může odvolat.","moderation.removed":"Odstraněno. Autor dostal odůvodnění.","moderation.approve":"Zveřejnit","moderation.approved":"Zveřejněno.","moderation.reject":"Zamítnout","moderation.rejected":"Zamítnuto. Autor dostal odůvodnění.","moderation.gone":"Tahle položka už ve frontě není.","moderation.textChanged":"Autor text mezitím upravil. Přečtěte si novou verzi a rozhodněte znovu.","moderation.lock":"Uzavřít téma","moderation.unlock":"Znovu otevřít téma","moderation.pin":"Připnout téma","moderation.unpin":"Odepnout téma","moderation.move":"Přesunout téma","moderation.moveTo":"Kam téma přesunout?","moderation.done":"Hotovo.","moderation.openTopic":"Zobrazit v tématu","profile.moderates":"V kategoriích","mention.limit":"V jednom příspěvku jste zmínili víc lidí, než zatím jde.","notice.title":"Nahlásit obsah","notice.lede":"Nahlásit můžete komentář, profil nebo článek, i bez přihlášení.","notice.noTarget":"Hlášení otevřete přímo u obsahu, který chcete nahlásit: u komentáře zvolte „Nahlásit“.","notice.category":"Proč obsah hlásíte?","notice.target":"Co hlásíte","notice.targetMessage":"Komentář","notice.targetProfile":"Profil","notice.targetArticle":"Článek","notice.rule":"Které pravidlo obsah porušuje?","notice.description":"Popis","notice.descriptionHint":"Popište prosím, co je na obsahu špatně a proč.","notice.counter":"{length} / {max} znaků","notice.contactTitle":"Kontakt (nepovinné)","notice.contactHint":"Kontakt potřebujeme k potvrzení přijetí a k odeslání výsledku.","notice.name":"Jméno","notice.email":"E-mail","notice.childAtRisk":"Hlášení o ohroženém dítěti přijímáme bez jména a e-mailu.","notice.submit":"Odeslat hlášení","notice.sending":"Odesílám…","notice.done":"Díky, hlášení máme.","notice.receiptLede":"Uložte si odkaz níže. Podle něj zjistíte, jak jsme hlášení vyřídili.","notice.statusLink":"Stav hlášení","notice.noContactKept":"Kontakt u tohoto hlášení neukládáme, výsledek vám proto e-mailem nepřijde. Zjistíte ho přes odkaz výše.","notice.captchaUnavailable":"Ověření proti robotům se nenačetlo (možná ho blokuje rozšíření prohlížeče), takže formulář teď odeslat nejde. Zkuste prosím stránku obnovit.","notice.statusTitle":"Stav hlášení","notice.submittedAt":"Odesláno {date}","notice.decidedAt":"Rozhodnuto {date}","notice.statement":"Odůvodnění","notice.outcome":"Výsledek","notice.redress":"Pokud s vyřízením nesouhlasíte, můžete se obrátit na soud nebo využít mimosoudní řešení sporu.","notice.appealTitle":"Odvolání","notice.appealLede":"Nesouhlasíte s tím, jak jsme hlášení vyřídili? Napište nám proč.","notice.appealBody":"Proč s rozhodnutím nesouhlasíte?","notice.appealSubmit":"Odeslat odvolání","notice.appealSent":"Odvolání máme.","notice.appealOpen":"Vaše odvolání se posuzuje.","notice.appealWithdraw":"Vzít odvolání zpět","notice.appealUntil":"Odvolat se můžete do {date}.","notice.appealClosed":"Lhůta pro odvolání uplynula.","notice.receiptMissing":"V odkazu chybí číslo hlášení. Otevřete prosím celý odkaz z e-mailu.","common.signIn":"Přihlásit se","common.close":"Zavřít","common.cancel":"Zrušit","common.retry":"Zkusit znovu","common.loading":"Načítám…","common.back":"Zpět","common.optional":"nepovinné","common.needsJs":"Tahle část stránky potřebuje zapnutý JavaScript. Zapněte ho prosím a stránku obnovte."},mp={"error.method":"This can't be started this way. Please reload the page.","error.origin":"This request didn't come from this page. Please reload it and try again.","error.unavailable":"We couldn't load or save that just now. Please try again in a little while.","error.invalid":"Something in the form isn't right. Please check it and try again.","error.signIn":"You need to sign in with a reader account for this.","error.onboarding":"Before you write, please finish joining the discussion.","error.age":"The discussion is open to an older age group, so you can't join it yet.","error.name":"This name can't be used. Please try another one.","error.handle":"This username is taken, or you changed yours recently. Please try another one, or try later.","error.restricted":"Your posting in the discussion is restricted for now.","error.suspended":"Your discussion account is suspended for now.","error.terminated":"Your discussion account is closed.","error.links":"This comment has more links than fit. Please remove some of them.","error.fast":"That's a bit fast. Please wait a moment and try again.","error.blocked":"This comment can't be published as it is. Please try editing it.","error.confirm":"Before you send the comment, please confirm one thing.","error.removed":"This message was removed; it can't be edited any more.","error.quota":"That's a lot in a short time — please try again later.","error.captcha":"We couldn't check that you're not a robot. Please wait for a new check and send it again.","error.notFound":"We couldn't find this. It may not be available any more.","error.surfaceOff":"The discussion isn't available here right now.","error.notMoved":"We're preparing the discussion. You'll be able to write here soon.","error.ledger":"That couldn't be saved just now, and everything is as it was. Please try again.","error.readOnly":"This community feature is switched off for now. The discussions under articles keep working.","error.braked":"Writing is paused for a while. You can keep reading, and writing will open again soon.","error.mentionLimit":"This post mentions more people than you can mention yet. Remove some of the mentions and send it again.","error.pushRefused":"Notifications cannot be switched on in this browser. Try another browser, or keep an eye on the notifications page.","error.realtimeOff":"New posts do not show up instantly here right now. The discussion refreshes itself every so often.","error.membersOnly":"The forum is open to community members. Sign in and join the community to see it.","error.topicLocked":"This topic is closed, so you can't post in it any more. You can still read it.","error.topicCreationClosed":"You can't start a new topic in this category. Please try another one.","error.followLimit":"You're already following a lot. Please unfollow something and try again.","error.submit":"That didn't work. Please reload the page and try again.","need.sign_in":"Sign in to write in the discussion.","need.onboarding":"Before your first comment, choose a name and confirm the discussion rules.","need.reconsent_rules":"The discussion rules have changed. Please confirm the new version.","need.art9_consent":"To write in the discussion, we need your consent to the processing.","state.visible":"Published","state.held":"Awaiting review","state.removed":"Removed","state.deleted":"Deleted","state.hiddenUntilConsent":"Awaiting your consent","note.identification_safety":"A mushroom can't be reliably identified from a photo, and edibility isn't decided here. If you suspect poisoning, call the Czech Toxicological Information Centre: +420 224 919 293 (24/7).","note.report_to_manufacturer":"If this is about a side effect of a product, please also tell us through the advice desk so we can look into it.","category.fraud_spam":"Fraud or spam","category.harassment":"Harassment","category.hate":"Hate speech","category.threats":"Threats","category.sexual_content":"Sexual content","category.child_at_risk":"A child at risk","category.self_harm":"Self-harm","category.doxxing":"Publishing someone else's personal data","category.copyright":"Copyright infringement","category.terrorism":"Terrorism","category.drugs":"Drugs","category.other_illegal":"Other illegal content","category.rules":"Breaks the discussion rules","category.adverse_event":"A side effect of a product","category.third_party_health_data":"Someone else's health information","category.suspected_minor":"The author seems younger than the rules allow","confirm.title":"Before you send it","confirm.about_self_or_consent":"I'm writing about myself, or I have the consent of the person I'm writing about.","confirm.good_faith":"I confirm that, to the best of my knowledge, this report is accurate and complete.","confirm.other":"I understand the notice and want to send the comment.","confirm.submit":"Confirm and send","warning.identifier":"The comment seems to contain an e-mail address, a phone number or an account number. If it shouldn't be there, edit the comment.","warning.invisible_chars":"We removed invisible characters from the comment.","warning.other":"The comment is published, but the discussion rules flag something in it. Please look it over.","author.deleted":"Deleted user","author.system":"Site notice","author.badge.team":"Team","discussion.title":"Discussion","discussion.count_one":"{count} comment","discussion.count_other":"{count} comments","discussion.empty":"There aren't any comments yet. Start the discussion.","discussion.loading":"Loading the discussion…","discussion.loadMore":"Load more","discussion.newMessages":"There are new comments in the discussion.","discussion.refresh":"Show","discussion.signInPrompt":"Sign in to join the discussion.","discussion.reply":"Reply","discussion.edit":"Edit","discussion.delete":"Delete","discussion.deleteTitle":"Delete the comment?","discussion.deleteExplain":"The comment disappears. If someone has replied to it, an empty placeholder stays in its place.","discussion.deleteConfirm":"Yes, delete","discussion.report":"Report","discussion.block":"Block the author","discussion.unblock":"Unblock the author","discussion.blocked":"You've blocked the author. Their comments will show collapsed.","discussion.unblocked":"You've unblocked the author.","discussion.menu":"More actions","discussion.collapsed":"A comment by an author you've blocked.","discussion.show":"Show","discussion.hide":"Hide","discussion.edited":"edited","discussion.translated":"Translated automatically","discussion.showOriginal":"Show the original","discussion.showTranslation":"Show the translation","discussion.showReplies_one":"Show {count} reply","discussion.showReplies_other":"Show {count} replies","discussion.repliesTruncated":"There are more replies than can be shown at once.","discussion.heldNote":"The comment is awaiting review and only you can see it for now. After the review it shows to others, or you'll find out why not in My community.","discussion.hiddenUntilConsentNote":"Only you can see this comment for now. Others will see it once you give your consent to the processing.","discussion.giveConsent":"Give consent","discussion.removedNote":"We removed this comment; others can't see it.","discussion.why":"Why?","discussion.placeholderHeld":"This comment is awaiting review.","discussion.placeholderRemoved":"This comment was removed.","discussion.placeholderDeleted":"This comment was deleted.","discussion.pending":"Sending…","discussion.reactions":"Reactions","discussion.reactionCount":"{emoji} {count}","discussion.reactionAdd":"Add a reaction","discussion.reactionRemove":"Remove the reaction","discussion.reactionMine":"Your reaction","composer.label":"Your comment","composer.replyLabel":"Your reply","composer.editLabel":"Editing the comment","composer.replyingTo":"Replying to: {name}","composer.placeholder":"Write a comment…","composer.counter":"{length} / {max} characters","composer.tooLong":"The comment is too long. Please shorten it to {max} characters at most.","composer.linksNote_one":"A comment can hold up to {count} link.","composer.linksNote_other":"A comment can hold up to {count} links.","composer.shortcut":"You can also send it with {keys}.","composer.submit":"Send","composer.sending":"Sending…","composer.save":"Save","composer.cancel":"Cancel","composer.posted":"The comment is published.","composer.held":"We've got the comment; it's awaiting review now.","composer.cooldown_one":"You can post again in {count} second.","composer.cooldown_other":"You can post again in {count} seconds.","sanction.restriction":"Your posting in the discussion is restricted.","sanction.restrictionUntil":"Your posting in the discussion is restricted until {date}.","sanction.suspension":"Your discussion account is suspended.","sanction.suspensionUntil":"Your discussion account is suspended until {date}.","sanction.ban":"Your discussion account is closed.","sanction.statement":"Show the statement of reasons","onboarding.title":"Welcome to the discussion","onboarding.lede":"Before your first comment, we need a few things from you. It takes a moment.","onboarding.ageTitle":"How old are you?","onboarding.age.16_17":"16–17","onboarding.age.18_plus":"18 or older","onboarding.ageHint":"We ask once and keep only the age group.","onboarding.ageBelow":"The discussion is open from the age of {min}. You can keep reading it, though.","onboarding.rulesTitle":"Discussion rules","onboarding.rulesLede":"Please read how the discussion works.","onboarding.rulesLink":"The full rules","onboarding.rulesAccept":"I agree to the discussion rules.","onboarding.rulesChanged":"The discussion rules have changed since your last visit. Please read the new version and confirm it.","onboarding.art9Title":"Consent to processing","onboarding.art9Lede":"To write in the discussion, we need your consent as described below.","onboarding.art9LedeOptional":"We ask for your consent as described below. You can write in the public discussion without it too.","onboarding.art9Accept":"I consent to the processing as described above.","onboarding.art9Controller":"Consent for {label}","onboarding.art9Refuse":"I do not consent","onboarding.art9RefusedDone":"You can write in the public discussion without this consent.","onboarding.art9RequiredToWrite":"Without the consent you can only read.","onboarding.profileTitle":"How others will see you","onboarding.displayName":"Name in the discussion","onboarding.displayNameHint":"It can be a nickname. Every reader will see it.","onboarding.handle":"Username","onboarding.handleHint":"Lower-case letters, digits and the underscore, {min} to {max} characters. It can be changed once every {days} days.","onboarding.handleSuggested":"Suggested: {handle}","onboarding.avatar":"Picture next to your name","onboarding.avatarNone":"Without a picture","onboarding.continue":"Continue","onboarding.back":"Back","onboarding.submit":"Done","onboarding.done":"Done — you can write now.","report.title":"Report the comment","report.lede":"The site's team reviews the report. You'll see the outcome in My community.","report.category":"What's wrong with the comment?","report.rule":"Which rule does it break?","report.ruleOther":"Another rule","report.note":"A note for the team (optional)","report.noteHint":"Only the team that reviews the report sees the note.","report.counter":"{length} / {max} characters","report.submit":"Report","report.sending":"Sending…","report.cancel":"Cancel","report.done":"Thanks, we've got the report. You'll see the outcome in My community.","panel.title":"My community","panel.signIn":"My community is available after you sign in.","panel.profile":"Profile","panel.profileEdit":"Edit the profile","panel.statements":"Decisions about my content","panel.statementsEmpty":"Decisions about your content will show here.","panel.reports":"My reports","panel.reportsEmpty":"The reports you send will show here.","panel.notifications":"Notifications","panel.notificationsEmpty":"New notifications will show here.","panel.unread_one":"{count} unread notification","panel.unread_other":"{count} unread notifications","panel.markRead":"Mark as read","panel.blocks":"Blocked authors","panel.blocksEmpty":"Authors you block will show here.","panel.consents":"Consents","panel.art9Given":"Consent to the processing is given.","panel.art9NotGiven":"You haven't given consent to the processing yet.","panel.art9Refused":"You declined the consent to the processing.","panel.art9Withdraw":"Withdraw consent","panel.art9WithdrawTitle":"Withdraw your consent to the processing?","panel.art9WithdrawExplain":"You can keep reading the discussion. Whether you can write without the consent, or only once you give it again, depends on the website's settings — it tells you before your next comment.","panel.art9WithdrawConfirm":"Yes, withdraw consent","panel.art9WithdrawCancel":"Keep the consent","panel.art9Withdrawn":"You've withdrawn your consent.","panel.export":"Download my data","panel.exportHint":"A JSON file with what the discussion keeps about you.","panel.exporting":"Preparing the file…","panel.exportFileName":"my-community","panel.erase":"Delete my discussion profile","panel.eraseExplain":"After a grace period we delete your discussion profile, your comments and reactions, unless the law requires us to keep them. Your account on the site stays. You can cancel it during the grace period.","panel.eraseTitle":"Really delete your discussion profile?","panel.eraseConfirm":"Yes, delete the profile","panel.eraseKeep":"Keep it","panel.eraseScheduled":"We will delete your discussion profile on {date}. You can cancel it until then.","panel.eraseCancel":"Cancel the deletion","panel.eraseCancelled":"The deletion is cancelled; your profile stays.","statement.title":"Statement of reasons","statement.decidedAt":"Decided on {date}","statement.provider":"Decided by: {entity}","statement.restriction":"Measure","statement.until":"Until {date}","statement.scope":"Scope","statement.scopeAll":"Everywhere","statement.basis":"Prompted by","statement.facts":"Facts and circumstances","statement.automation":"Automation","statement.automatedDetection":"Detected automatically","statement.automatedDecision":"Decided automatically","statement.humanDecision":"Decided by a person","statement.legalGround":"Legal ground","statement.contractualGround":"Rule","statement.redress":"Redress","statement.subject":"Concerns","statement.subjectMessage":"A comment","statement.subjectProfile":"A profile","statement.subjectArticle":"An article","statement.full":"The full statement","statement.appealTitle":"Appeal","statement.appealLede":"Don't agree with the decision? Tell us why. Where possible, a different person from the one who decided reviews the appeal.","statement.appealUntil":"You can appeal until {date}.","statement.appealBody":"Why don't you agree with the decision?","statement.appealCounter":"{length} / {max} characters","statement.appealSubmit":"Send the appeal","statement.appealSending":"Sending…","statement.appealSent":"We've got the appeal. We'll let you know once it's reviewed.","statement.appealOpen":"Your appeal is being reviewed.","statement.appealWithdraw":"Withdraw the appeal","statement.appealWithdrawn":"You've withdrawn the appeal.","statement.appealClosed":"The time for an appeal has passed.","statement.appealUnavailable":"This decision can't be appealed any more.","restriction.no_action":"Left as it was","restriction.warning":"A warning","restriction.removal":"Content removed","restriction.visibility_restricted":"Visibility restricted","restriction.posting_restricted":"Posting restricted","restriction.account_suspended":"Account suspended","restriction.account_terminated":"Account closed","basis.notice":"A report","basis.own_initiative":"Our own review","basis.order":"An official order","caseStatus.open":"Under review","caseStatus.decided":"Decided","caseStatus.appealed":"Under appeal","caseStatus.closed":"Closed","appealStatus.open":"Under review","appealStatus.upheld":"The decision stands","appealStatus.reversed":"The decision was reversed","appealStatus.withdrawn":"Withdrawn","adverseOutcome.recorded":"Assessed as a possible adverse reaction and recorded in the register.","adverseOutcome.reported_to_authority":"Assessed as a possible adverse reaction and reported to the competent authority.","adverseOutcome.not_adverse":"Assessed: it is not an adverse reaction.","notification.decision":"There is a new decision about your content.","notification.appeal_resolved":"Your appeal has been resolved.","notification.erasure_scheduled":"The deletion of your discussion profile is scheduled.","notification.inactivity_warning":"You haven't been active in the discussion for a long time. Without further activity, we'll delete your profile after a while.","notification.module_read_only":"The community's extra features are switched off. The discussions under articles go on; what changes for you is on the My community page.","notification.module_braked":"Writing in the community is paused for now. You can keep reading.","notification.reply":"Someone replied to your post.","notification.mention":"Someone mentioned you in a discussion.","notification.module_push_reset":"Browser notifications need to be switched on again in your community settings.","notification.age_limit_changed":"The community is now for adults only, so your profile is read-only. The details are on the My community page.","notification.topic_update":"A discussion you follow has a new post.","notification.category_topic":"A category you follow has a new topic.","notification.category_topic.article":"A category you follow has a new discussion under an article.","centre.title":"Notifications","centre.empty":"New notifications will show here.","centre.markAllRead":"Mark all as read","centre.settings":"Notification settings","centre.loadMore":"Load older","centre.unreadOnly":"Unread only","centre.signIn":"Sign in to see your notifications.","centre.openMessage":"Show the post","badge.unread_one":"{count} new notification","badge.unread_other":"{count} new notifications","settings.title":"Notification settings","settings.signIn":"Sign in to change your notification settings.","settings.notifyReply":"Replies to my posts","settings.notifyMention":"When someone mentions me","settings.notifyTopic":"News in discussions I follow","settings.pushEnabled":"Browser notifications","settings.digestEmail":"Daily e-mail summary","settings.quietHours":"Quiet hours: between 22:00 and 7:00, browser notifications wait until the morning.","settings.saved":"Saved.","settings.push.enable":"Turn on notifications","settings.push.disable":"Turn off notifications","settings.push.carries":"This website delivers the notifications. A notification doesn't say what arrived or who it's from.","settings.push.unsupported":"This browser can't show notifications. You'll find new replies and mentions on the notifications page.","settings.push.refused":"Notifications couldn't be turned on in this browser. Please try again later or in another browser.","settings.push.denied":"This browser blocks notifications for this site. You can allow them in the browser settings.","settings.push.inAppExplain":"Notifications can't be turned on inside the Facebook or Instagram app. Open the page in your browser.","settings.push.openInBrowser":"Open in browser","settings.push.iosGuide":"On an iPhone or iPad, notifications work only for a site added to the Home Screen: in Safari tap Share and choose “Add to Home Screen”. Then open the site from the Home Screen and turn notifications on.","settings.push.reset":"Turn notifications on again: a site setting changed, so the earlier setup no longer works.","settings.digest.prompt":"Do you want to stop receiving the daily e-mail summary?","settings.digest.confirm":"Stop the daily summary","settings.digest.unsubscribed":"We've switched off the daily e-mail summary.","settings.digest.staleLink":"This unsubscribe link is no longer valid. Sign in to switch the summary off in the settings.","profile.memberSince":"Member since {date}","profile.bio":"About me","profile.notFound":"We couldn't find this profile.","profile.signIn":"Sign in to see members' profiles.","trust.0":"New member","trust.1":"Member","trust.2":"Regular","trust.3":"Trusted member","role.moderator":"Moderator","welcome.title":"Welcome to the community","welcome.lede":"Here are a few things that help at the start.","welcome.rules":"How the discussion works","welcome.discussions":"Browse the discussions","welcome.settings":"Set up notifications","welcome.profile":"My profile","realtime.off":"Live updates are off right now. The discussion refreshes itself every so often.","state.readOnly":"The community's extra features are switched off for now. The discussion under the article goes on.","state.braked":"Writing is paused for a while. You can keep reading.","state.away":"The team is away for now; new topics will wait for review.","topic.deleted":"Deleted topic","topic.withheld":"Topic title unavailable","follow.follow":"Follow","follow.following":"Following","follow.followed":"You're following. You'll see what's new in your notifications.","follow.unfollowed":"You've stopped following.","follow.unavailable":"You can't follow this right now.","forum.title":"Forum","forum.loading":"Loading the forum…","forum.empty":"The forum has no categories yet.","forum.topicCount_one":"{count} topic","forum.topicCount_other":"{count} topics","forum.discussionCount_one":"{count} discussion","forum.discussionCount_other":"{count} discussions","forum.lastActivity":"Last activity {date}","forum.latest":"Latest topics","forum.allTopics":"All topics","forum.allCategories":"All categories","forum.search":"Search the forum","forum.searchSubmit":"Search","forum.modePre":"New posts here wait for review before they appear.","forum.teamTopics":"The team starts the topics here.","forum.join":"Join the community","forum.back":"Back to the forum","state.forumBraked":"Posting in the forum is paused for a while. You can keep reading.","forumCategory.notFound":"We couldn't find this category.","forumCategory.empty":"There are no topics in this category yet.","forumCategory.articlesEmpty":"There are no article discussions here yet.","forumCategory.sort":"Sort","forumCategory.sortActivity":"By activity","forumCategory.sortNew":"Newest","forumCategory.newTopic":"New topic","topic.loading":"Loading the topic…","topic.notFound":"We couldn't find this topic. It may no longer be available.","topic.count_one":"{count} post","topic.count_other":"{count} posts","topic.locked":"Closed","topic.archived":"Archived","topic.pinned":"Pinned","topic.titleLabel":"Topic title","topic.titleMissing":"Please give the topic a title.","topic.titleTooLong":"The title is too long. Please shorten it to {max} characters at most.","topic.bodyLabel":"Opening post","topic.create":"Start the topic","topic.created":"The topic is up.","topic.createdHeld":"We've got the topic; it's awaiting review now.","topic.open":"Open the topic","forumText.composer.label":"Your post","forumText.composer.editLabel":"Editing the post","forumText.composer.placeholder":"Write a post…","forumText.composer.tooLong":"The post is too long. Please shorten it to {max} characters at most.","forumText.composer.linksNote_one":"A post can hold up to {count} link.","forumText.composer.linksNote_other":"A post can hold up to {count} links.","forumText.composer.posted":"The post is published.","forumText.composer.held":"We've got the post; it's awaiting review now.","forumText.composer.cooldown_one":"You can post again in {count} second.","forumText.composer.cooldown_other":"You can post again in {count} seconds.","forumText.discussion.empty":"There aren't any replies yet. Be the first to reply.","forumText.discussion.deleteTitle":"Delete the post?","forumText.discussion.deleteExplain":"The post disappears. If someone has replied to it, an empty placeholder stays in its place.","forumText.discussion.collapsed":"A post by an author you've blocked.","forumText.discussion.heldNote":"The post is awaiting review and only you can see it for now. After the review it shows to others, or you'll find out why not in My community.","forumText.discussion.hiddenUntilConsentNote":"Only you can see this post for now. Others will see it once you give your consent to the processing.","forumText.discussion.removedNote":"We removed this post; others can't see it.","forumText.discussion.placeholderHeld":"This post is awaiting review.","forumText.discussion.placeholderRemoved":"This post was removed.","forumText.discussion.placeholderDeleted":"This post was deleted.","forumText.report.title":"Report the post","forumText.report.category":"What's wrong with the post?","forumText.error.links":"This post has more links than fit. Please remove some of them.","forumText.error.blocked":"This post can't be published as it is. Please try editing it.","forumText.error.confirm":"Before you send the post, please confirm one thing.","forumText.confirm.other":"I understand the notice and want to send the post.","forumText.warning.identifier":"The post seems to contain an e-mail address, a phone number or an account number. If it shouldn't be there, edit the post.","forumText.warning.other":"The post is published, but the discussion rules flag something in it. Please look it over.","forumText.need.onboarding":"Before your first post, choose a name and confirm the discussion rules.","forumText.need.art9_consent":"To write in the forum, we need your consent to the processing.","search.title":"Search the forum","search.label":"What are you looking for?","search.submit":"Search","search.searching":"Searching…","search.tooShort":"Please type at least {min} characters.","search.tooLong":"The search text is too long. Please shorten it to {max} characters at most.","search.empty":"We found no results for that. Try other words.","search.more":"More results","search.lastPage":"We don't show more results. Try narrowing the search.","search.space":"Where to search","search.spaceAll":"Everywhere","search.spaceForum":"In the forum","search.spaceArticle":"In article discussions","search.category":"Category","search.topic":"Topic","search.message":"Post","search.inArticle":"An article discussion","moderation.title":"Moderation","moderation.loading":"Loading the queue…","moderation.empty":"The queue is empty right now.","moderation.source.member_report":"Reported by a member","moderation.source.filter":"Caught by the filters","moderation.source.staff":"From the team","moderation.premod":"Awaiting approval","moderation.heldBySystem":"Hidden automatically for now","moderation.deadline":"Due by {date}","moderation.open":"Review","moderation.package":"Content to review","moderation.itemWithheld":"Others can't see this post now, so it isn't shown here.","moderation.restriction":"Decision","moderation.factsHint":"Describe what you found. The text becomes part of the statement of reasons for the author.","moderation.ruleRequired":"Please choose the rule the decision rests on.","moderation.preview":"Preview the statement","moderation.previewTitle":"This is the statement the author will see","moderation.decide":"Decide","moderation.decided":"Decided.","moderation.escalate":"Pass to the team","moderation.escalateLede":"Do you think it's illegal? Pass it to the site's team to assess.","moderation.escalateCategory":"What is it?","moderation.escalated":"Passed to the team.","moderation.remove":"Remove as a moderator","moderation.removeLede":"The post disappears and its author gets a statement of reasons they can appeal.","moderation.removed":"Removed. The author got a statement of reasons.","moderation.approve":"Publish","moderation.approved":"Published.","moderation.reject":"Reject","moderation.rejected":"Rejected. The author got a statement of reasons.","moderation.gone":"This item is no longer in the queue.","moderation.textChanged":"The author has edited the text since. Read the new version and decide again.","moderation.lock":"Close the topic","moderation.unlock":"Reopen the topic","moderation.pin":"Pin the topic","moderation.unpin":"Unpin the topic","moderation.move":"Move the topic","moderation.moveTo":"Where to move the topic?","moderation.done":"Done.","moderation.openTopic":"View in the topic","profile.moderates":"In the categories","mention.limit":"This post mentions more people than you can mention yet.","notice.title":"Report content","notice.lede":"You can report a comment, a profile or an article, even without signing in.","notice.noTarget":"Open a report from the content you want to report: on a comment, choose “Report”.","notice.category":"Why are you reporting the content?","notice.target":"What you're reporting","notice.targetMessage":"A comment","notice.targetProfile":"A profile","notice.targetArticle":"An article","notice.rule":"Which rule does the content break?","notice.description":"Description","notice.descriptionHint":"Please describe what's wrong with the content and why.","notice.counter":"{length} / {max} characters","notice.contactTitle":"Contact (optional)","notice.contactHint":"We need a contact to confirm that the report arrived and to send you the outcome.","notice.name":"Name","notice.email":"E-mail","notice.childAtRisk":"We take reports of a child at risk without a name or an e-mail address.","notice.submit":"Send the report","notice.sending":"Sending…","notice.done":"Thanks, we've got the report.","notice.receiptLede":"Keep the link below. It's how you'll find out how we handled the report.","notice.statusLink":"Report status","notice.noContactKept":"We don't keep a contact for this report, so the outcome won't come by e-mail. You'll find it through the link above.","notice.captchaUnavailable":"The robot check didn't load (a browser extension may be blocking it), so the form can't be sent right now. Please try reloading the page.","notice.statusTitle":"Report status","notice.submittedAt":"Sent on {date}","notice.decidedAt":"Decided on {date}","notice.statement":"Statement of reasons","notice.outcome":"Outcome","notice.redress":"If you disagree with how it was dealt with, you can turn to a court or use an out-of-court dispute settlement.","notice.appealTitle":"Appeal","notice.appealLede":"Don't agree with how we handled the report? Tell us why.","notice.appealBody":"Why don't you agree with the decision?","notice.appealSubmit":"Send the appeal","notice.appealSent":"We've got the appeal.","notice.appealOpen":"Your appeal is being reviewed.","notice.appealWithdraw":"Withdraw the appeal","notice.appealUntil":"You can appeal until {date}.","notice.appealClosed":"The time for an appeal has passed.","notice.receiptMissing":"The link is missing the report number. Please open the whole link from the e-mail.","common.signIn":"Sign in","common.close":"Close","common.cancel":"Cancel","common.retry":"Try again","common.loading":"Loading…","common.back":"Back","common.optional":"optional","common.needsJs":"This part of the page needs JavaScript. Please turn it on and reload the page."},Ai=Object.freeze({cs:Object.freeze(fp),en:Object.freeze(mp)});function pp(e){return(typeof e=="string"?e.toLowerCase().split("-")[0]:"")==="cs"?"cs":"en"}const Oi=new Map;function hp(e,t){if(!Oi.has(e)){let n=null;try{n=new Intl.PluralRules(e)}catch{}Oi.set(e,n)}return Oi.get(e)?.select(t)??"other"}function bp(e){const t=typeof e=="number"?e:typeof e=="string"&&e.trim()!==""?Number(e):Number.NaN;return Number.isFinite(t)?t:null}function To(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function gp(e,t){return t?e.replace(/\{(\w+)\}/g,(n,s)=>Object.prototype.hasOwnProperty.call(t,s)&&t[s]!=null?String(t[s]):n):e}function El(e,t,n){const s=pp(e),o=Ai[s];let r=To(o,t);if(r===void 0){const a=bp(n?.count),l=a===null?"other":hp(s,a);r=To(o,`${t}_${l}`)??To(o,`${t}_other`)}return r===void 0?String(t):gp(r,n)}function Xn(e){return typeof e!="string"?!1:To(Ai.en,e)!==void 0||To(Ai.en,`${e}_other`)!==void 0}function vp(e){return typeof e=="string"&&e.startsWith("identifier_")?"warning.identifier":e==="invisible_chars"?"warning.invisible_chars":"warning.other"}function yp(e){const t=`confirm.${e}`;return e!=="title"&&e!=="submit"&&e!=="other"&&Xn(t)?t:"confirm.other"}function _p(e){const t=`note.${e}`;return Xn(t)?t:null}function kp(e){return Fa.includes(e)?`notification.${e}`:null}function wp(e){const t=kp(e.code);return t==="notification.category_topic"&&typeof e.articleId=="string"&&e.articleId!==""?"notification.category_topic.article":t}function $p(e){const t=typeof e=="string"?Ff.indexOf(e):-1;return t<0?null:`trust.${t}`}function Ei(e){return typeof e=="string"&&qf.includes(e)?`adverseOutcome.${e}`:null}const xp=["statementPath","myCommunityPath","rulesPath","reportPath","noticesPath","consultationPath","profilePath","settingsPath","notificationsPath","welcomePath","discussionsPath","articlePath","forumPath","categoryPath","topicPath","searchPath"];function hs(e){return typeof e=="string"&&/^\/(?![/\\])/.test(e)&&!/[\s\\\u0000-\u001f\u007f]/.test(e)}const Ml=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Pl(e){if(typeof e!="string")return e;if(e.trim()==="")return null;try{return JSON.parse(e)}catch{return null}}function Et(e){const t=Pl(e),n={};if(!Ml(t))return n;for(const s of xp)hs(t[s])&&(n[s]=t[s]);return n}function Ip(e){if(e==null||e==="")return"";if(typeof e!="string")return null;const t=e.replace(/\/+$/,"");return t===""?e.startsWith("/")?"":null:/^(?:\/(?!\.{1,2}(?:\/|$))[A-Za-z0-9._~%-]+)+$/.test(t)?t:null}function Mt(e,t,n=""){const s=o=>hs(o)?o:void 0;return{statementPath:e.statementPath??s(t?.statementPath)??`${n}${Ke.statement}`,myCommunityPath:e.myCommunityPath??s(t?.myCommunityPath)??`${n}${Ke.myCommunity}`,rulesPath:e.rulesPath??`${n}${Ke.rules}`,reportPath:e.reportPath??`${n}${Ke.report}`,noticesPath:e.noticesPath??`${n}${Ke.notices}`,consultationPath:e.consultationPath??null,profilePath:e.profilePath??`${n}${Ke.profile}`,settingsPath:e.settingsPath??`${n}${Ke.settings}`,notificationsPath:e.notificationsPath??`${n}${Ke.notifications}`,welcomePath:e.welcomePath??`${n}${Ke.welcome}`,discussionsPath:e.discussionsPath??`${n}${Ke.discussions}`,articlePath:e.articlePath??null,forumPath:e.forumPath??`${n}${Ke.forum}`,categoryPath:e.categoryPath??`${n}${Ke.category}`,topicPath:e.topicPath??`${n}${Ke.topic}`,searchPath:e.searchPath??`${n}${Ke.search}`}}const Tp=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Cp=/^[a-z0-9][a-z0-9_]{2,29}$/,bs=e=>typeof e=="string"&&Tp.test(e),Rl=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>0;function gs(e){const t=Pl(e);return Ml(t)?"conversationId"in t?bs(t.conversationId)&&Rl(t.seq)?{conversationId:t.conversationId.toLowerCase(),seq:t.seq}:null:"memberId"in t?bs(t.memberId)?{memberId:t.memberId.toLowerCase()}:null:"handle"in t?typeof t.handle=="string"&&Cp.test(t.handle)?{handle:t.handle}:null:"articleId"in t&&bs(t.articleId)?{articleId:t.articleId.toLowerCase()}:null:null}function Sp(e){return"conversationId"in e?"message":"articleId"in e?"article":"profile"}function Ap(e,t){return!hs(e)||e.includes("#")||!bs(t.conversationId)||!Rl(t.seq)?null:`${e}#c=${t.conversationId.toLowerCase()}&s=${t.seq}`}function Op(e){if(typeof e!="string"||!e.startsWith("#")||e.startsWith("#t="))return null;const t=new Map;for(const r of e.slice(1).split("&")){const a=r.indexOf("=");a>0&&t.set(r.slice(0,a),r.slice(a+1))}const n=t.get("c"),s=t.get("s");if(n!==void 0&&s!==void 0&&/^\d{1,15}$/.test(s))return gs({conversationId:n,seq:Number(s)});const o=t.get("a");return o!==void 0?gs({articleId:o}):null}const Nl=6e4,jl=99,Ep=e=>e>jl?`${jl}+`:String(e);function Mp(e){const{client:t}=e,n=typeof e.intervalMs=="number"&&Number.isFinite(e.intervalMs)?e.intervalMs:Nl,s=n>0?Math.max(n,Nl):0,o=e.visible??(()=>typeof document>"u"||document.visibilityState!=="hidden"),r=new AbortController,a={signal:r.signal},l=Re({phase:"pending",count:0});let c=!1,p=!1,h=null,b=null;function _(){p=!1,h&&clearInterval(h),h=null,typeof document<"u"&&document.removeEventListener("visibilitychange",I)}function $(){l.phase="hidden",l.count=0,_()}function v(){return c||!p?Promise.resolve():(b??=(async()=>{const j=await t.me.notifications.unreadCount(a);if(!(c||!p)){if(j.ok){l.count=Math.max(0,Math.floor(j.value.count)),l.phase="shown";return}j.code==="signIn"&&$()}})().finally(()=>{b=null}),b)}function I(){o()&&v()}return{state:l,async start(){const j=await t.me.get(a);if(c)return;const P=j.ok?j.value.module?.state:void 0,T=P!==void 0&&(!Yn(P)||P==="dark");if(!j.ok||j.value.needs.includes("sign_in")||!j.value.member||T)return $();p=!0,typeof document<"u"&&document.addEventListener("visibilitychange",I),s>0&&(h=setInterval(()=>{o()&&v()},s)),o()&&await v()},refresh:v,dispose(){c||(c=!0,_(),r.abort())}}}const Pp="/api/community",zl=new Set;function Ft(e,t){zl.has(e)||(zl.add(e),console.warn(t))}function ht(e){const t=Ip(e);return t===null&&Ft("site-base",'[blogmcp-community] site-base must be a path on this site (e.g. "/blog"), never a URL: the site’s pages and its proxy are found under it'),t}function bt(e,t,n=""){const s=e==null||e===""?`${n}${Pp}`:e;if(!Ba(s))return Ft("api-base",'[blogmcp-community] api-base must be a path on this site (e.g. "/api/community"), never a URL: the community API is reached through the site’s own proxy or BFF'),null;try{return vm(t?{base:s,transport:t}:{base:s})}catch{return Ft("api-base","[blogmcp-community] api-base was refused by the community client"),null}}function ze(...e){for(const t of e){if(!t)continue;const n=t.toLowerCase();if(n.startsWith("cs")||n.startsWith("sk"))return"cs";if(n.startsWith("en"))return"en"}return"en"}function Ue(){return typeof document>"u"?null:document.documentElement.lang||null}function Rp(e){return(t,n)=>El(e,t,n)}function Ut(e){return Xn(e)?e:null}const Ll=Symbol("bcm-text");function gt(e,t){const n=(o,r)=>El(e.value,t?.[o]??o,r),s={lang:e,t:n,text:o=>o?n(o.key,o.params):""};return jr(Ll,s),s}function vt(){const e=Qs(Ll,null);if(!e)throw new Error("[blogmcp-community] a component rendered outside its element");return e}let Dl=0;function He(e){return Dl+=1,`${e}-${Dl}`}function Mi(e,t,n){let s=null;const o=r=>{r.preventDefault(),t()};nt(()=>{const r=e.value;if(!r)return;if(s=r.getRootNode().activeElement??null,r.addEventListener("cancel",o),typeof r.showModal=="function")try{r.showModal()}catch{r.setAttribute("open","")}else r.setAttribute("open","")}),Ge(()=>{const r=e.value;r?.removeEventListener("cancel",o),r?.open&&typeof r.close=="function"&&r.close();const a=s;Fe(()=>{(a&&a.isConnected?a:n?.()??null)?.focus()})})}const Np=["lang","href","aria-label","title"],jp={"aria-hidden":"true"},zp=$e({inheritAttrs:!1,__name:"BadgeView",props:{apiBase:{},siteBase:{},lang:{},routes:{},pollMs:{},transport:{type:Function}},setup(e){const t=e,n=ue(ze(t.lang,Ue())),{t:s}=gt(n),o=ht(t.siteBase),r=o===null?null:bt(t.apiBase,t.transport,o),a=r?Mp({client:r,...typeof t.pollMs=="number"?{intervalMs:t.pollMs}:{}}):null,l=a?.state??null,c=z(()=>Mt(Et(t.routes),null,o??""));return nt(()=>{a?.start()}),Ge(()=>a?.dispose()),(p,h)=>i(l)&&i(l).phase==="shown"&&i(l).count>0?(d(),m("a",{key:0,class:"bcm-badge-link",lang:n.value,href:c.value.notificationsPath,"aria-label":i(s)("badge.unread",{count:i(l).count}),title:i(s)("badge.unread",{count:i(l).count})},[f("span",jp,u(i(Ep)(i(l).count)),1)],8,Np)):A("",!0)}}),Fl=e=>e==="cs"?"cs-CZ":"en-GB",Pi=new Map;function Lp(e,t){const n=`${e}:${t?"t":"d"}`;if(!Pi.has(n)){let s=null;try{s=new Intl.DateTimeFormat(Fl(e),t?{dateStyle:"medium",timeStyle:"short"}:{dateStyle:"long"})}catch{}Pi.set(n,s)}return Pi.get(n)??null}function Pe(e,t,n=!0){if(typeof t!="string"||t==="")return"";const s=Date.parse(t);return Number.isFinite(s)?Lp(e,n)?.format(new Date(s))??t:""}const Dp=new Map;function Fp(e,t){if(typeof t!="string"||!/^\d{4}-(?:0[1-9]|1[0-2])$/.test(t))return"";const n=Ri(Dp,e,s=>new Intl.DateTimeFormat(s,{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}));try{const s=n?.formatToParts(new Date(`${t}-01T00:00:00.000Z`));if(!s)return t;const o=s.findIndex(a=>a.type==="day");return s.filter((a,l)=>l!==o&&!(l===o+1&&s[l].type==="literal")).map(a=>a.value).join("").trim()||t}catch{return t}}function Ul(e,t=Date.now()){if(typeof e!="string")return!1;const n=Date.parse(e);return Number.isFinite(n)&&n<=t}const Up=/^[A-Z]{2}(?:,[A-Z]{2})*$/,qp=new Map,Bp=new Map;function Ri(e,t,n){if(!e.has(t)){let s=null;try{s=n(Fl(t))}catch{}e.set(t,s)}return e.get(t)??null}function Hp(e,t){try{return Ri(qp,e,n=>new Intl.DisplayNames(n,{type:"region"}))?.of(t)||t}catch{return t}}function Vp(e,t){if(typeof t!="string")return"";const n=t.trim();if(n==="all")return Rp(e)("statement.scopeAll");if(!Up.test(n))return n;const s=n.split(",").map(o=>Hp(e,o));try{return Ri(Bp,e,o=>new Intl.ListFormat(o,{type:"conjunction"}))?.format(s)??s.join(", ")}catch{return s.join(", ")}}function Ie(e,t){const n=e.until?Pe(t,e.until):"";return e.code==="restricted"&&n?{key:"sanction.restrictionUntil",params:{date:n}}:e.code==="suspended"&&n?{key:"sanction.suspensionUntil",params:{date:n}}:{key:`error.${e.code}`}}const Kp=Object.freeze({fast:3,quota:60});function Ni(e,t){const n=Kp[e.code];if(n===void 0)return null;const s=typeof e.retryAfterS=="number"&&e.retryAfterS>0?e.retryAfterS:n;return t+s*1e3}const ql=120,Wp=Object.freeze({method:"show",origin:"show",unavailable:"retry",invalid:"show",signIn:"reload",onboarding:"onboard",age:"show",name:"show",handle:"show",restricted:"reload",suspended:"reload",terminated:"reload",links:"show",fast:"wait",blocked:"show",confirm:"confirm",removed:"reload",quota:"wait",captcha:"show",notFound:"reload",surfaceOff:"hide",notMoved:"notMoved",ledger:"retry",braked:"wait",readOnly:"reload",mentionLimit:"show",pushRefused:"show",realtimeOff:"hide",membersOnly:"reload",topicLocked:"reload",topicCreationClosed:"show",followLimit:"show",submit:"show"});function Bl(e){return Wp[e]??"show"}var vs={},We={},Hl;function Yp(){return Hl||(Hl=1,Object.defineProperty(We,"__esModule",{value:!0}),We.BLANK_URL=We.relativeFirstCharacters=We.whitespaceEscapeCharsRegex=We.urlSchemeRegex=We.ctrlCharactersRegex=We.htmlCtrlEntityRegex=We.htmlEntitiesRegex=We.invalidProtocolRegex=void 0,We.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,We.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,We.htmlCtrlEntityRegex=/&(newline|tab);/gi,We.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,We.urlSchemeRegex=/^.+(:|:)/gim,We.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,We.relativeFirstCharacters=[".","/"],We.BLANK_URL="about:blank"),We}var Vl;function Gp(){if(Vl)return vs;Vl=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.sanitizeUrl=r;var e=Yp();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function n(a){var l=a.replace(e.ctrlCharactersRegex,"");return l.replace(e.htmlEntitiesRegex,function(c,p){return String.fromCharCode(p)})}function s(a){return URL.canParse(a)}function o(a){try{return decodeURIComponent(a)}catch{return a}}function r(a){if(!a)return e.BLANK_URL;var l,c=o(a.trim());do c=n(c).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),c=o(c),l=c.match(e.ctrlCharactersRegex)||c.match(e.htmlEntitiesRegex)||c.match(e.htmlCtrlEntityRegex)||c.match(e.whitespaceEscapeCharsRegex);while(l&&l.length>0);var p=c;if(!p)return e.BLANK_URL;if(t(p))return p;var h=p.trimStart(),b=h.match(e.urlSchemeRegex);if(!b)return p;var _=b[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(_))return e.BLANK_URL;var $=h.replace(/\\/g,"/");if(_==="mailto:"||_.includes("://"))return $;if(_==="http:"||_==="https:"){if(!s($))return e.BLANK_URL;var v=new URL($);return v.protocol=v.protocol.toLowerCase(),v.hostname=v.hostname.toLowerCase(),v.toString()}return $}return vs}var Zp=Gp();const Jp="nofollow ugc noopener noreferrer",Xp=/\b(?:https?:\/\/|www\.)[^\s<>"'`{}|\\^]+/gi,Qp=`.,;:!?…'"»”’]`;function eh(e){let t=e;for(;t.length>0;){const n=t[t.length-1];if(n===")"){const s=t.split("(").length-1;if(t.split(")").length-1<=s)break}else if(!Qp.includes(n))break;t=t.slice(0,-1)}return t}function th(e){const t=/^www\./i.test(e)?`https://${e}`:e;if(/^https?:\/\/$/i.test(t))return null;const n=Zp.sanitizeUrl(t);return n!=="about:blank"&&/^https?:\/\//i.test(n)?n:null}function nh(e){const t=[];if(typeof e!="string"||e==="")return t;let n=0;for(const s of e.matchAll(Xp)){const o=s.index??0;if(o<n)continue;const r=eh(s[0]),a=r?th(r):null;a&&(o>n&&t.push({kind:"text",text:e.slice(n,o)}),t.push({kind:"link",text:r,href:a}),n=o+r.length)}return n<e.length&&t.push({kind:"text",text:e.slice(n)}),t}function oh(e,t){const n=nh(e);if(!t)return n;const s=[];for(const o of n){if(o.kind!=="text"||!o.text.includes("@")){s.push(o);continue}for(const r of Al(o.text)){const a=r.kind==="mention"?t(r.handle):null;if(r.kind==="mention"&&a)s.push({kind:"mention",text:r.text,href:a});else{const l=s[s.length-1];l&&l.kind==="text"?s[s.length-1]={kind:"text",text:l.text+r.text}:s.push({kind:"text",text:r.text})}}}return s}function lt(e){let t=0;for(const n of e)t++;return t}function Ze(e){return typeof e=="string"?e.normalize("NFC").trim():""}const sh=Object.freeze({amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ",ndash:"–",mdash:"—",hellip:"…",laquo:"«",raquo:"»",bdquo:"„",ldquo:"“",rdquo:"”",lsquo:"‘",rsquo:"’",sbquo:"‚",copy:"©",reg:"®",euro:"€",shy:""});function ih(e){return e.replace(/&(#\d{1,7}|#x[0-9a-f]{1,6}|[a-z]{2,8});/gi,(t,n)=>{if(n[0]==="#"){const s=n[1]==="x"||n[1]==="X",o=Number.parseInt(n.slice(s?2:1),s?16:10);return o>0&&o<=1114111&&!(o>=55296&&o<=57343)?String.fromCodePoint(o):t}return sh[n.toLowerCase()]??t})}const rh=/<\/(?:p|div|li|h[1-6]|section|article|blockquote|tr|ul|ol|dl|dt|dd|header|footer|table|pre|figure)\s*>/gi,ah=/<(?:li|tr|dt|dd|h[1-6]|blockquote|pre|figure)\b[^>]*>/gi;function lh(e){if(typeof e!="string"||e==="")return[];const t=e.replace(/<!--[\s\S]*?-->/g,"").replace(/<(script|style|template|noscript|svg|math)\b[\s\S]*?<\/\1\s*>/gi,"").replace(/[\t\n\r\f ]+/g," ").replace(/<br\b[^>]*>/gi,`
|
|
5
|
+
`).replace(rh,`
|
|
6
6
|
|
|
7
|
-
`).replace(
|
|
7
|
+
`).replace(ah,`
|
|
8
8
|
|
|
9
|
-
`).replace(/<[^>]*>/g,"");return
|
|
10
|
-
`).replace(/[ ]{2,}/g," ").trim()).filter(n=>n!=="")}function ws(e){return typeof e=="string"?e.normalize("NFKC").replace(/\s+/gu," ").trim():""}function oa(e){const t=lt(ws(e));return t>=ou&&t<=Or}const ia=3,xs=30;function pn(e){return typeof e=="string"?e.trim().toLowerCase():""}function ra(e){const t=pn(e);return t===""||Er.test(t)}const Ld=Object.freeze({ß:"ss",ł:"l",đ:"d",ð:"d",ø:"o",ħ:"h",ŧ:"t",ı:"i",æ:"ae",œ:"oe",þ:"th",ŀ:"l"});function Dd(e){const o=ws(e).toLowerCase().normalize("NFD").replace(new RegExp("\\p{M}+","gu"),"").normalize("NFC").replace(/[ßłđðøħŧıæœþŀ]/g,s=>Ld[s]??s).split(/[^a-z0-9]+/).filter(s=>s!=="").join("_").slice(0,24).replace(/_+$/,"");return Er.test(o)?o:null}const Ud=new Set(["displayName","handle","avatarPreset"]),Fd=new Set(["rulesTextId","art9TextId"]);function qd(e,t){const n=[];return e.member?.ageBand||n.push("age"),e.acceptances.rules!=="accepted"&&n.push("rules"),t.includes("art9_consent")&&n.push("art9"),e.profile||n.push("profile"),n}function Hd(e){const t=e.signal?{signal:e.signal}:{},n=gt({phase:"loading",steps:[],index:0,me:null,rulesText:null,rules:[],art9Text:null,art9Paragraphs:[],reconsent:!1,ageBand:null,rulesAccepted:!1,art9Accepted:!1,displayName:"",handle:"",avatarPreset:null,failure:null,fields:[],minAge:null}),o=v=>{n.failure=v,n.phase="failed"};async function s(v){const[w,C]=await Promise.all([v.includes("rules")?e.client.legal.current({kind:"rules",locale:e.lang},t):null,v.includes("art9")?e.client.legal.current({kind:"art9_consent",locale:e.lang},t):null]);for(const E of[w,C])if(E&&!E.ok)return o(E),null;return{rules:w?.ok?w.value:null,art9:C?.ok?C.value:null}}async function i(){const v=await e.client.me.get(t);if(!v.ok)return o(v),null;const w=v.value.needs.filter(Nn);if(w.includes("sign_in"))return e.onSignIn(),null;const C=qd(v.value,w),E=await s(C);return E?{me:v.value,steps:C,texts:E}:null}function a(v){v.texts.rules?.textId!==n.rulesText?.textId&&(n.rulesAccepted=!1),v.texts.art9?.textId!==n.art9Text?.textId&&(n.art9Accepted=!1),n.me=v.me,n.steps=v.steps,n.reconsent=v.me.acceptances.rules==="reconsent_required",n.rulesText=v.texts.rules,n.rules=v.texts.rules?go(v.texts.rules.bodyJson):[],n.art9Text=v.texts.art9,n.art9Paragraphs=v.texts.art9?zd(v.texts.art9.body):[]}async function l(){n.phase="loading",n.failure=null;const v=await i();if(v){if(a(v),n.index=0,v.steps.length===0)return S();n.phase="ready"}}const c=()=>n.steps[n.index]??null;function m(v){switch(v){case"age":return n.ageBand!==null;case"rules":return n.rulesAccepted&&n.rulesText!==null;case"art9":return n.art9Accepted&&n.art9Text!==null;case"profile":return oa(n.displayName)&&ra(n.handle)}}function u(){const v=c();return n.phase==="ready"&&v!==null&&m(v)}function _(v){const w=n.steps.indexOf(v);w>=0&&(n.index=w)}const T=()=>n.steps.findIndex(v=>!m(v));async function S(){const v=T();if(v>=0){n.index=v;return}n.phase="sending",n.failure=null,n.fields=[];const w={ageBand:n.ageBand??n.me?.member?.ageBand??"18_plus",rulesTextId:n.steps.includes("rules")&&n.rulesText?n.rulesText.textId:""};if(n.steps.includes("art9")&&n.art9Text&&(w.art9TextId=n.art9Text.textId),n.steps.includes("profile")){w.displayName=ws(n.displayName);const E=pn(n.handle);E!==""&&(w.handle=E),w.avatarPreset=n.avatarPreset}const C=await e.client.me.onboard(w,t);if(C.ok){n.phase="done",e.onDone(C.value);return}switch(n.failure=C,n.phase="ready",C.code){case"age":n.minAge=18,n.phase="refused",e.onRefused?.(n.minAge);return;case"name":return n.fields=pn(n.handle)!==""?["displayName","handle"]:["displayName"],_("profile");case"handle":return n.fields=["handle"],_("profile");case"invalid":return n.fields=C.fields??[],n.fields.some(E=>Ud.has(E))?_("profile"):n.fields.some(E=>Fd.has(E))?A(C):n.fields.includes("ageBand")?_("age"):void 0;case"signIn":return e.onSignIn();default:return}}async function A(v){const w=[...n.fields];n.phase="sending";const C=await i();if(!C)return;a(C),w.includes("rulesTextId")&&(n.rulesAccepted=!1),w.includes("art9TextId")&&(n.art9Accepted=!1),n.failure=v,n.fields=w;const E=T();if(E>=0){n.index=E,n.phase="ready";return}if(C.me.needs.filter(Nn).length===0){n.phase="done",e.onDone(C.me);return}o(v)}return{state:n,load:l,step:c,isLast:()=>n.index>=n.steps.length-1,canContinue:u,async next(){if(u()){if(n.failure=null,n.index<n.steps.length-1){n.index+=1;return}await S()}},back(){n.phase!=="ready"||n.index===0||(n.failure=null,n.index-=1)},suggestedHandle:()=>pn(n.handle)===""?Dd(n.displayName):null,hasFieldError:v=>n.fields.includes(v)}}function Ss(...e){for(const t of e){if(!t)continue;const n=t.toLowerCase();if(n.startsWith("cs")||n.startsWith("sk"))return"cs";if(n.startsWith("en"))return"en"}return"en"}function Is(){return typeof document>"u"?null:document.documentElement.lang||null}function Vd(e){return(t,n)=>Jr(e,t,n)}function tt(e){return ys(e)?e:null}const aa=e=>e==="cs"?"cs-CZ":"en-GB",Oo=new Map;function Bd(e,t){const n=`${e}:${t?"t":"d"}`;if(!Oo.has(n)){let o=null;try{o=new Intl.DateTimeFormat(aa(e),t?{dateStyle:"medium",timeStyle:"short"}:{dateStyle:"long"})}catch{}Oo.set(n,o)}return Oo.get(n)??null}function Pe(e,t,n=!0){if(typeof t!="string"||t==="")return"";const o=Date.parse(t);return Number.isFinite(o)?Bd(e,n)?.format(new Date(o))??t:""}function la(e,t=Date.now()){if(typeof e!="string")return!1;const n=Date.parse(e);return Number.isFinite(n)&&n<=t}const Kd=/^[A-Z]{2}(?:,[A-Z]{2})*$/,Wd=new Map,Yd=new Map;function ca(e,t,n){if(!e.has(t)){let o=null;try{o=n(aa(t))}catch{}e.set(t,o)}return e.get(t)??null}function Gd(e,t){try{return ca(Wd,e,n=>new Intl.DisplayNames(n,{type:"region"}))?.of(t)||t}catch{return t}}function Zd(e,t){if(typeof t!="string")return"";const n=t.trim();if(n==="all")return Vd(e)("statement.scopeAll");if(!Kd.test(n))return n;const o=n.split(",").map(s=>Gd(e,s));try{return ca(Yd,e,s=>new Intl.ListFormat(s,{type:"conjunction"}))?.format(o)??o.join(", ")}catch{return o.join(", ")}}function Re(e,t){const n=e.until?Pe(t,e.until):"";return e.code==="restricted"&&n?{key:"sanction.restrictionUntil",params:{date:n}}:e.code==="suspended"&&n?{key:"sanction.suspensionUntil",params:{date:n}}:{key:`error.${e.code}`}}const Jd=Object.freeze({fast:3,quota:60});function Xd(e,t){const n=Jd[e.code];if(n===void 0)return null;const o=typeof e.retryAfterS=="number"&&e.retryAfterS>0?e.retryAfterS:n;return t+o*1e3}const ua=120,Qd=Object.freeze({method:"show",origin:"show",unavailable:"retry",invalid:"show",signIn:"reload",onboarding:"onboard",age:"show",name:"show",handle:"show",restricted:"reload",suspended:"reload",terminated:"reload",links:"show",fast:"wait",blocked:"show",confirm:"confirm",removed:"reload",quota:"wait",captcha:"show",notFound:"reload",surfaceOff:"hide",notMoved:"notMoved",ledger:"retry",submit:"show"});function ef(e){return Qd[e]??"show"}const Eo=(e="")=>({body:e,sending:!1,failure:null,confirm:null,waitUntil:null,clientMsgId:null}),tf=()=>typeof document>"u"||document.visibilityState!=="hidden";function nf(e){const{client:t,lang:n}=e,o=e.articleId.toLowerCase(),s=e.now??Date.now,i=Fu(),a=new AbortController,l={signal:a.signal},c=gt({phase:"loading",failure:null,thread:i.getState(),loadingMore:!1,refreshing:!1,newMessages:!1,me:null,block:null,composer:Eo(),inline:null,report:null,announcement:null,announceId:0,clock:s(),busy:{},refusedAge:e.refusedAge??null}),m=i.subscribe(k=>{c.thread=k}),u=Ks(null);let _=null,T=!0,S=!1,A=0,v=null,w=null,C=null;const E=e.pollMs??2e4;function j(k){c.announcement=k,c.announceId+=1}function b(){c.phase="hidden",_?.stop(),_=null}function I(){return c.me?Promise.resolve():(w??=t.me.get(l).then(k=>{w=null,k.ok&&!S&&(c.me=k.value)}),w)}function q(){const k=i.getState();k.viewer.canPost||jt(k).any||k.viewer.restrictions.length>0||I().then(()=>{const d=c.me;S||!d||i.getState().viewer.canPost||(c.block=!d.member||d.member.status==="active"?"notMoved":"restricted")})}function G(){const k=i.getState();k.viewer.canPost&&(c.block=null),k.viewer.memberId!==null&&I(),q(),u.value&&!jt(k).any&&u.value.state.phase!=="sending"&&(u.value=null)}function D(k){if(k.code==="surfaceOff")return b();if(k.code==="notFound"&&c.phase!=="ready")return fn("not-found","[blogmcp-community] the discussion of this article-id was not found (no such live article, or it is not readable here)"),b();(c.phase==="loading"||c.phase==="failed")&&(c.phase="failed",c.failure=k)}function W(){return S?Promise.resolve():(v??=(async()=>{c.refreshing=!0;const k=await Wu(i,t,{articleId:o,languageCode:n},l);c.refreshing=!1,!S&&(A=s(),k.ok?(c.phase="ready",c.failure=null,c.newMessages=!1,G()):D(k))})().finally(()=>{v=null}),v)}async function Q(){if(c.loadingMore||c.thread.nextCursor===null)return;c.loadingMore=!0;const k=await Yu(i,t,{articleId:o,languageCode:n},l);if(c.loadingMore=!1,!(S||k.ok)){if(k.code==="surfaceOff")return b();j(Re(k,n))}}function ae(k){for(const d of k){if(typeof d?.articleId!="string"||d.articleId.toLowerCase()!==o)continue;if(c.phase==="failed"){W();continue}const y=i.getState(),x=typeof d.lastSeq=="number"&&d.lastSeq>y.lastSeq;i.applyHead(d)&&(x&&y.loaded?c.newMessages=!0:W())}}function ge(){_||E===0||S||c.phase==="hidden"||(_=Qu(t,[o],{intervalMs:E,visible:()=>tf()&&T,onChange:ae,onFailure:k=>{k.code==="surfaceOff"&&b()},signal:a.signal}))}function we(){const k=c.thread,d=jt(k);return d.signIn?"signIn":c.block==="notMoved"?"notMoved":!k.viewer.canPost&&k.viewer.restrictions.length>0?"sanction":d.any?c.refusedAge!==null&&!u.value?"ageRefused":"onboarding":c.block==="restricted"?"restricted":k.viewer.canPost?"write":"pending"}const X=k=>qu(c.thread,k),Y=k=>!k.pending&&k.seq>0,H=()=>we()==="write";function V(){const k=c.me;if(k?.member&&k.profile)return{kind:"member",memberId:k.member.memberId,handle:k.profile.handle,displayName:k.profile.displayName,avatarPreset:k.profile.avatarPreset};const d=c.thread.viewer.memberId;if(d===null)return null;for(const y of c.thread.messages)for(const x of[y,...y.replies])if(x.author.kind==="member"&&x.author.memberId===d)return x.author;return null}function $(){c.clock=s(),!C&&(C=setInterval(()=>{c.clock=s();let k=!1;for(const d of[c.composer,c.inline])!d||d.waitUntil===null||(d.waitUntil<=c.clock?(d.waitUntil=null,d.failure&&(d.failure.code==="fast"||d.failure.code==="quota")&&(d.failure=null)):k=!0);!k&&C&&(clearInterval(C),C=null)},1e3))}const J=k=>k.waitUntil===null?0:Math.max(0,Math.ceil((k.waitUntil-Math.max(c.clock,s()))/1e3));function De(k,d){switch(k&&(k.failure=d),ef(d.code)){case"confirm":k&&d.codes&&d.codes.length>0&&(k.confirm={codes:[...d.codes],checked:[]});return;case"wait":k&&(k.waitUntil=Xd(d,s()),$());return;case"onboard":At(),W();return;case"reload":W();return;case"notMoved":c.block="notMoved";return;case"hide":return b();default:return}}async function Z(k,d,y){if(k.sending||J(k)>0||S)return;const x=et(k.body);if(x===""||lt(x)>cn)return;const M=jt(c.thread);if(M.signIn)return;if(M.any)return At();const O=d.kind==="new"?null:Rn(c.thread,d.seq);if(d.kind!=="new"&&(!O||!Y(O)))return;k.sending=!0,k.failure=null;const P=d.kind==="edit"?null:V(),F=d.kind==="edit"?bo():k.clientMsgId??=bo();d.kind==="edit"?i.applyMessage({type:"edit",clientMsgId:F,seq:d.seq,body:x}):P&&i.applyMessage({type:"post",clientMsgId:F,body:x,replyToSeq:d.kind==="reply"?d.seq:null,author:P,languageCode:n});const z=d.kind==="edit"?await t.messages.edit({conversationId:O.conversationId,seq:d.seq,body:x,...y?{confirmations:y}:{}},l):await t.messages.post({articleId:o,body:x,replyToSeq:d.kind==="reply"?d.seq:null,clientMsgId:F,languageCode:n,...y?{confirmations:y}:{}},l);if(!S){if(k.sending=!1,z.ok){i.applyMessage({type:"confirm",clientMsgId:F,message:z.value.message,warnings:z.value.warnings});const L=z.value.message.state==="held";k.body="",k.clientMsgId=null,k.confirm=null,k.failure=null,d.kind!=="new"&&c.inline===k&&(c.inline=null),j({key:L?"composer.held":"composer.posted"}),d.kind!=="edit"&&e.onPosted?.(L?"held":"visible");return}i.applyMessage({type:"rollback",clientMsgId:F}),De(k,z)}}function oe(k,d,y){if(!k.confirm||!k.confirm.codes.includes(d))return;const x=k.confirm.checked.filter(M=>M!==d);k.confirm.checked=y?[...x,d]:x}async function $e(k){const d=k.confirm;if(!d||!d.codes.every(x=>d.checked.includes(x)))return;const y=k===c.composer?{kind:"new"}:c.inline===k?{kind:c.inline.kind,seq:c.inline.seq}:{kind:"new"};await Z(k,y,[...d.codes])}async function mn(k){const d=Rn(c.thread,k),y=`delete:${k}`;if(!d||!Y(d)||c.busy[y])return!1;c.busy[y]=!0;const x=bo();i.applyMessage({type:"delete",clientMsgId:x,seq:k});const M=await t.messages.delete({conversationId:d.conversationId,seq:k},l);return delete c.busy[y],S?!1:M.ok?(i.applyMessage({type:"confirm",clientMsgId:x,message:M.value.message}),!0):(i.applyMessage({type:"rollback",clientMsgId:x}),j(Re(M,n)),De(null,M),!1)}const Ln=k=>"articleId"in k?"react:article":`react:${k.seq}`;async function Ct(k,d){const y=Ln(k);if(!H()||c.busy[y]||!c.thread.reactionSet.includes(d))return;const x=Hu(c.thread,k),M=x.mine===d?null:d;c.busy[y]=!0,i.applyReaction(k,Vu(x,M));const O=await t.reactions.set({target:k,emoji:M},l);if(delete c.busy[y],!S){if(O.ok){i.applyReaction(k,O.value.reactions);return}i.applyReaction(k,x),j(Re(O,n)),De(null,O)}}async function hn(k,d){const y=`block:${k}`;if(c.busy[y])return;c.busy[y]=!0;const x=await t.blocks.set({memberId:k,blocked:d},l);if(delete c.busy[y],!S){if(x.ok){i.collapse(k,x.value.blocked),j({key:x.value.blocked?"discussion.blocked":"discussion.unblocked"});return}j(Re(x,n)),De(null,x)}}function Dn(k){c.report={conversationId:k.conversationId,seq:k.seq,category:"",ruleId:"",note:"",rules:null,rulesFailed:!1,sending:!1,failure:null,done:!1};const d=c.report;t.legal.current({kind:"rules",locale:n},l).then(y=>{c.report===d&&(y.ok?d.rules=go(y.value.bodyJson):d.rulesFailed=!0)})}async function Cs(){const k=c.report;if(!k||k.sending||k.done||k.category===""||k.category==="rules"&&k.ruleId==="")return;const d=et(k.note);if(lt(d)>fs)return;k.sending=!0,k.failure=null;const y=await t.messages.report({conversationId:k.conversationId,seq:k.seq,category:k.category,ruleId:k.category==="rules"?k.ruleId:null,note:d===""?null:d},l);if(k.sending=!1,!S){if(y.ok){k.done=!0,j({key:"report.done"});return}k.failure=y,y.code==="surfaceOff"&&b()}}function At(){if(u.value||S||c.refusedAge!==null)return;const k=Hd({client:t,lang:n,signal:a.signal,onRefused:d=>{c.refusedAge=d,e.onAgeRefused?.(d)},onDone:d=>{c.me=d,u.value=null,j({key:"onboarding.done"}),W()},onSignIn:()=>{u.value=null,W()}});u.value=k,k.load()}return{state:c,store:i,onboarding:u,async start(){await W(),ge()},refresh:W,loadMore:Q,mode:we,needs:()=>jt(c.thread),isOwn:X,canReply:k=>{if(!H()||!Y(k)||k.state!=="visible"||k.body===null)return!1;if(k.replyToSeq===null)return!0;const d=Rn(c.thread,k.replyToSeq);return d!==null&&Y(d)&&d.state==="visible"},canEdit:k=>H()&&X(k)&&Y(k)&&k.body!==null&&(k.state==="visible"||k.state==="held"),canDelete:k=>c.thread.viewer.memberId!==null&&X(k)&&Y(k)&&k.body!==null&&k.state!=="deleted",canReact:H,canReport:k=>!jt(c.thread).signIn&&!X(k)&&Y(k)&&k.body!==null&&k.author.kind!=="system",canReportAsNotifier:k=>jt(c.thread).signIn&&Y(k)&&k.body!==null&&k.author.kind!=="system",canBlock:k=>!jt(c.thread).signIn&&!X(k)&&Y(k)&&k.author.kind==="member"&&k.author.memberId!==null,setInView(k){const d=T;T=k,k&&!d&&_&&s()-A>=E&&_.now()},submit:()=>Z(c.composer,{kind:"new"}),openReply(k,d=null){const y=Rn(c.thread,k);if(!y)return;const x=y.replyToSeq??y.seq;if(c.inline?.kind==="reply"&&c.inline.seq===x){c.inline.replyingTo=d;return}c.inline={...Eo(),kind:"reply",seq:x,replyingTo:d}},openEdit(k){const d=Rn(c.thread,k);!d||d.body===null||(c.inline={...Eo(d.body),kind:"edit",seq:k,replyingTo:null})},closeInline(){c.inline=null},async submitInline(){const k=c.inline;k&&await Z(k,{kind:k.kind,seq:k.seq})},setConfirmed:oe,sendConfirmed:$e,remove:mn,react:Ct,setBlocked:hn,openReport:Dn,closeReport(){c.report=null},submitReport:Cs,beginOnboarding:At,cancelOnboarding(){u.value=null},waitLeft:J,dispose(){S||(S=!0,a.abort(),_?.stop(),_=null,m(),C&&clearInterval(C),C=null,u.value=null)}}}const da=Symbol("bcm-text");function Mo(e){const t=(o,s)=>Jr(e.value,o,s),n={lang:e,t,text:o=>o?t(o.key,o.params):""};return Oi(da,n),n}function It(){const e=Xs(da,null);if(!e)throw new Error("[blogmcp-community] a component rendered outside its element");return e}let fa=0;function ct(e){return fa+=1,`${e}-${fa}`}function pa(e,t,n){let o=null;const s=i=>{i.preventDefault(),t()};Cn(()=>{const i=e.value;if(!i)return;if(o=i.getRootNode().activeElement??null,i.addEventListener("cancel",s),typeof i.showModal=="function")try{i.showModal()}catch{i.setAttribute("open","")}else i.setAttribute("open","")}),sn(()=>{const i=e.value;i?.removeEventListener("cancel",s),i?.open&&typeof i.close=="function"&&i.close();const a=o;We(()=>{(a&&a.isConnected?a:n?.()??null)?.focus()})})}const sf=["aria-labelledby","aria-describedby"],of={class:"bcm-dialog-body"},rf=["id"],af=["id"],lf={class:"bcm-row"},cf=["disabled"],uf=["disabled"],No=Me({__name:"ConfirmDialog",props:{title:{},explain:{},explainParams:{},confirm:{},cancel:{},danger:{type:Boolean},busy:{type:Boolean},fallbackFocus:{type:Function}},emits:["confirm","cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=ve(null),a=ct("bcm-dialog");return pa(i,()=>o("cancel"),n.fallbackFocus),(l,c)=>(h(),g("dialog",{ref_key:"dialog",ref:i,class:"bcm-dialog","aria-labelledby":`${r(a)}-title`,"aria-describedby":e.explain?`${r(a)}-explain`:void 0},[f("div",of,[f("h3",{id:`${r(a)}-title`},p(r(s)(e.title)),9,rf),e.explain?(h(),g("p",{key:0,id:`${r(a)}-explain`},p(r(s)(e.explain,e.explainParams)),9,af)):N("",!0),f("div",lf,[c[2]||(c[2]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn",disabled:e.busy,onClick:c[0]||(c[0]=m=>o("cancel"))},p(r(s)(e.cancel??"common.cancel")),9,cf),f("button",{type:"button",class:nt(["bcm-btn bcm-primary",{"bcm-danger":e.danger}]),disabled:e.busy,onClick:c[1]||(c[1]=m=>o("confirm"))},p(r(s)(e.confirm)),11,uf)])])],8,sf))}}),df=["for"],ff={key:0,class:"bcm-hint"},pf=["id","placeholder","aria-describedby","aria-invalid","readonly"],mf={class:"bcm-composer-foot"},hf=["id"],bf={class:"bcm-sr","aria-live":"polite"},gf=["disabled"],yf=["disabled"],vf=["id"],_f={key:0},kf=["href"],wf={key:1,class:"bcm-error"},xf={key:2,class:"bcm-warning",role:"status"},Sf={key:3,class:"bcm-error",role:"alert"},If={key:4,class:"bcm-confirm"},Cf={class:"bcm-label"},Af=["checked","onChange"],Tf={class:"bcm-row"},$f=["disabled"],Po=Me({__name:"MessageComposer",props:{draft:{},kind:{},wait:{},replyingTo:{},rulesHref:{}},emits:["submit","cancel","confirmed","confirm"],setup(e,{expose:t,emit:n}){const o=e,s=n,{t:i,lang:a}=It(),l=ct("bcm-composer"),c=ve(null),m=U(()=>lt(et(o.draft.body))),u=U(()=>m.value>cn),_=U(()=>!o.draft.sending&&m.value>0&&!u.value&&o.wait===0&&o.draft.confirm===null),T=U(()=>{const b=o.draft.confirm;return b!==null&&b.codes.every(I=>b.checked.includes(I))}),S=U(()=>i(o.kind==="reply"?"composer.replyLabel":o.kind==="edit"?"composer.editLabel":"composer.label")),A=typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.platform||navigator.userAgent)?"⌘ + Enter":"Ctrl + Enter",v=U(()=>{const b=o.draft.failure;if(!b||o.draft.confirm&&b.code==="confirm"||(b.code==="fast"||b.code==="quota")&&o.wait>0&&o.wait<=ua)return"";const I=Re(b,a.value);return i(I.key,I.params)}),w=ve("");let C=null;Xe(m,b=>{C&&clearTimeout(C),C=setTimeout(()=>{w.value=b>=cn*.9?i("composer.counter",{length:b,max:cn}):""},700)}),sn(()=>{C&&clearTimeout(C)}),Xe(()=>o.draft.body,()=>{const b=o.draft;b.confirm&&(b.confirm=null),b.failure&&b.failure.code!=="fast"&&b.failure.code!=="quota"&&(b.failure=null)});function E(b){b.key!=="Enter"||!(b.metaKey||b.ctrlKey)||(b.preventDefault(),_.value&&s("submit"))}function j(){_.value&&s("submit")}return t({focus:()=>c.value?.focus()}),(b,I)=>(h(),g("form",{class:"bcm-composer",onSubmit:Pt(j,["prevent"])},[f("label",{for:r(l),class:"bcm-label"},p(S.value),9,df),e.replyingTo?(h(),g("p",ff,p(r(i)("composer.replyingTo",{name:e.replyingTo})),1)):N("",!0),_e(f("textarea",{id:r(l),ref_key:"input",ref:c,"onUpdate:modelValue":I[0]||(I[0]=q=>e.draft.body=q),class:"bcm-input bcm-textarea",rows:"4",placeholder:r(i)("composer.placeholder"),"aria-describedby":`${r(l)}-counter ${r(l)}-hints`,"aria-invalid":u.value,readonly:e.draft.sending,onKeydown:E},null,40,pf),[[Qe,e.draft.body]]),f("div",mf,[f("span",{id:`${r(l)}-counter`,class:nt(["bcm-counter",{"bcm-counter-over":u.value}])},p(r(i)("composer.counter",{length:m.value,max:r(cn)})),11,hf),f("span",bf,p(w.value),1),I[3]||(I[3]=f("span",{class:"bcm-spacer"},null,-1)),e.kind!=="new"?(h(),g("button",{key:0,type:"button",class:"bcm-btn",disabled:e.draft.sending,onClick:I[1]||(I[1]=q=>s("cancel"))},p(r(i)("composer.cancel")),9,gf)):N("",!0),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!_.value},p(e.draft.sending?r(i)("composer.sending"):e.kind==="edit"?r(i)("composer.save"):r(i)("composer.submit")),9,yf)]),f("div",{id:`${r(l)}-hints`,class:"bcm-hint"},[f("p",null,p(r(i)("composer.linksNote",{count:r(su)})),1),f("p",null,p(r(i)("composer.shortcut",{keys:r(A)})),1),e.rulesHref?(h(),g("p",_f,[f("a",{href:e.rulesHref,target:"_blank",rel:"noopener"},p(r(i)("onboarding.rulesTitle")),9,kf)])):N("",!0)],8,vf),u.value?(h(),g("p",wf,p(r(i)("composer.tooLong",{max:r(cn)})),1)):N("",!0),e.wait>0&&e.wait<=r(ua)?(h(),g("p",xf,p(r(i)("composer.cooldown",{count:e.wait})),1)):N("",!0),v.value?(h(),g("p",Sf,p(v.value),1)):N("",!0),e.draft.confirm?(h(),g("fieldset",If,[f("legend",Cf,p(r(i)("confirm.title")),1),f("p",null,p(r(i)("error.confirm")),1),(h(!0),g(K,null,ke(e.draft.confirm.codes,q=>(h(),g("label",{key:q,class:"bcm-check"},[f("input",{type:"checkbox",checked:e.draft.confirm.checked.includes(q),onChange:G=>s("confirm",q,G.target.checked)},null,40,Af),f("span",null,p(r(i)(r(md)(q))),1)]))),128)),f("div",Tf,[f("button",{type:"button",class:"bcm-btn bcm-primary",disabled:!T.value||e.draft.sending||e.wait>0,onClick:I[2]||(I[2]=q=>s("confirmed"))},p(r(i)("confirm.submit")),9,$f)])])):N("",!0)],32))}}),Ro=Object.freeze([Object.freeze({id:"fox",emoji:"🦊"}),Object.freeze({id:"owl",emoji:"🦉"}),Object.freeze({id:"bear",emoji:"🐻"}),Object.freeze({id:"hedgehog",emoji:"🦔"}),Object.freeze({id:"frog",emoji:"🐸"}),Object.freeze({id:"bee",emoji:"🐝"}),Object.freeze({id:"leaf",emoji:"🍃"}),Object.freeze({id:"flower",emoji:"🌼"}),Object.freeze({id:"tree",emoji:"🌲"}),Object.freeze({id:"star",emoji:"⭐"})]),Of=new Map(Ro.map(e=>[e.id,e.emoji]));function Ef(e){return typeof e=="string"?Of.get(e)??null:null}function ma(e){if(typeof e!="string")return"";for(const t of e.trim())return t.toLocaleUpperCase();return""}function Mf(e){if(typeof e!="string"||e==="")return 210;let t=0;for(let n=0;n<e.length;n++)t=(t*31+e.charCodeAt(n))%360;return t}const ha=Me({__name:"AuthorAvatar",props:{author:{}},setup(e){const t=e,n=U(()=>t.author.kind==="member"?Ef(t.author.avatarPreset):null),o=U(()=>{const i=t.author;return i.kind==="member"||i.kind==="staff"?ma(i.displayName):""}),s=U(()=>{const i=t.author;if(n.value||!o.value)return;const a=i.kind==="member"?i.memberId:i.kind==="staff"?i.staffId:null;return`hsl(${Mf(a)} 45% 42%)`});return(i,a)=>(h(),g("span",{class:nt(["bcm-avatar",{"bcm-avatar-initial":!n.value&&o.value}]),style:Yn(s.value?{background:s.value}:void 0),"aria-hidden":"true"},p(n.value??o.value),7))}}),Nf=["href","rel"],ba=Me({__name:"LinkedText",props:{text:{}},setup(e){const t=e,n=U(()=>Md(t.text??""));return(o,s)=>(h(!0),g(K,null,ke(n.value,(i,a)=>(h(),g(K,{key:a},[i.kind==="link"?(h(),g("a",{key:0,href:i.href,rel:r(Ad),target:"_blank"},p(i.text),9,Nf)):(h(),g(K,{key:1},[Et(p(i.text),1)],64))],64))),128))}}),Pf=["aria-expanded","aria-controls"],Rf=["id"],jf=["href"],zf=["onClick"],Lf=Me({__name:"MessageMenu",props:{items:{}},emits:["select"],setup(e,{emit:t}){const n=t,{t:o}=It(),s=ve(!1),i=ve(null),a=ve(null),l=ct("bcm-menu");function c(T){!a.value||T.composedPath().includes(a.value)||u(!1)}function m(T){s.value=T,T?(document.addEventListener("pointerdown",c,!0),We(()=>a.value?.querySelector(".bcm-menu-list button, .bcm-menu-list a")?.focus())):document.removeEventListener("pointerdown",c,!0)}function u(T=!0){m(!1),T&&i.value?.focus()}function _(T){u(!0),n("select",T)}return sn(()=>document.removeEventListener("pointerdown",c,!0)),(T,S)=>e.items.length?(h(),g("div",{key:0,ref_key:"root",ref:a,class:"bcm-menu",onKeydown:S[2]||(S[2]=Hc(Pt(A=>u(!0),["stop"]),["esc"]))},[f("button",{ref_key:"toggle",ref:i,type:"button",class:"bcm-quiet","aria-expanded":s.value,"aria-controls":r(l),onClick:S[0]||(S[0]=A=>m(!s.value))},p(r(o)("discussion.menu")),9,Pf),s.value?(h(),g("div",{key:0,id:r(l),class:"bcm-menu-list"},[(h(!0),g(K,null,ke(e.items,A=>(h(),g(K,{key:A.id},[A.href?(h(),g("a",{key:0,href:A.href,class:nt({"bcm-danger":A.danger}),onClick:S[1]||(S[1]=v=>u(!1))},p(A.label),11,jf)):(h(),g("button",{key:1,type:"button",class:nt({"bcm-danger":A.danger}),onClick:v=>_(A.id)},p(A.label),11,zf))],64))),128))],8,Rf)):N("",!0)],544)):N("",!0)}}),Df=["aria-label"],Uf=["aria-pressed","disabled","title","onClick"],Ff={key:0,class:"bcm-sr"},qf={key:1,class:"bcm-react"},ga=Me({__name:"ReactionBar",props:{reactionSet:{},summary:{},interactive:{type:Boolean},busy:{type:Boolean}},emits:["react"],setup(e,{emit:t}){const n=e,o=t,{t:s}=It(),i=U(()=>n.interactive?n.reactionSet:n.reactionSet.filter(a=>(n.summary.counts[a]??0)>0));return(a,l)=>i.value.length?(h(),g("div",{key:0,class:"bcm-reactions",role:"group","aria-label":r(s)("discussion.reactions")},[(h(!0),g(K,null,ke(i.value,c=>(h(),g(K,{key:c},[e.interactive?(h(),g("button",{key:0,type:"button",class:"bcm-react","aria-pressed":e.summary.mine===c,disabled:e.busy,title:e.summary.mine===c?r(s)("discussion.reactionRemove"):r(s)("discussion.reactionAdd"),onClick:m=>o("react",c)},[f("span",null,p(r(s)("discussion.reactionCount",{emoji:c,count:e.summary.counts[c]??0})),1),e.summary.mine===c?(h(),g("span",Ff,p(r(s)("discussion.reactionMine")),1)):N("",!0)],8,Uf)):(h(),g("span",qf,p(r(s)("discussion.reactionCount",{emoji:c,count:e.summary.counts[c]??0})),1))],64))),128))],8,Df)):N("",!0)}}),ya=Symbol("bcm-discussion");function Hf(e){Oi(ya,e)}function Vf(){const e=Xs(ya,null);if(!e)throw new Error("[blogmcp-community] a discussion component rendered outside <blogmcp-discussion>");return e}const Bf={class:"bcm-msg-item"},Kf=["aria-busy"],Wf={class:"bcm-msg-main"},Yf={class:"bcm-meta"},Gf={class:"bcm-author"},Zf={key:0,class:"bcm-badge bcm-badge-team"},Jf={key:1,class:"bcm-handle"},Xf=["datetime"],Qf={key:3,class:"bcm-muted"},ep={key:4,class:"bcm-muted",role:"status"},tp={key:0,class:"bcm-placeholder"},np={key:1,class:"bcm-muted"},sp={key:0,class:"bcm-own-state bcm-own-consent"},op={class:"bcm-badge"},ip={class:"bcm-hint"},rp={key:1,class:"bcm-own-state"},ap={class:"bcm-badge"},lp={class:"bcm-hint"},cp=["href"],up={key:3,class:"bcm-text"},dp={key:4,class:"bcm-hint"},fp=["href"],pp={key:3,class:"bcm-actions"},mp={key:0,class:"bcm-replies"},hp={key:2,class:"bcm-hint"},bp=3,gp=Me({name:"MessageItem",__name:"MessageItem",props:{message:{}},setup(e){const t=e,{t:n,lang:o}=It(),{ctl:s,routes:i,opened:a,originals:l,allReplies:c,deleteMessage:m}=Vf(),u=U(()=>t.message),_=U(()=>u.value.replyToSeq!==null),T=U(()=>s.isOwn(u.value)),S=U(()=>u.value.body===null),A=U(()=>T.value&&u.value.state==="held"&&u.value.hiddenUntilConsent===!0),v=U(()=>A.value&&s.mode()==="onboarding"&&s.needs().art9&&!s.onboarding.value&&s.state.refusedAge===null),w=U(()=>{const $=u.value.author;return $.kind==="system"?n("author.system"):$.kind==="staff"?$.displayName:$.displayName??n("author.deleted")}),C=U(()=>u.value.author.kind==="member"?u.value.author.handle:null),E=U(()=>{const $=u.value.author;if($.kind!=="staff")return null;const J=`author.badge.${$.badge}`;return ys(J)?n(J):null}),j=U(()=>u.value.state==="held"?"discussion.placeholderHeld":u.value.state==="removed"?"discussion.placeholderRemoved":"discussion.placeholderDeleted"),b=U(()=>u.value.collapsed&&!a.has(u.value.seq)),I=U(()=>l.has(u.value.seq)),q=U(()=>(u.value.isTranslated&&!I.value?u.value.displayBody:u.value.body)??u.value.displayBody),G=U(()=>(T.value?u.value.notes??[]:[]).map($=>hd($)).filter($=>$!==null)),D=U(()=>T.value?[...new Set((u.value.warnings??[]).map($=>pd($)))]:[]),W=U(()=>s.state.inline?.kind==="edit"&&s.state.inline.seq===u.value.seq),Q=U(()=>!_.value&&s.state.inline?.kind==="reply"&&s.state.inline.seq===u.value.seq),ae=U(()=>c.has(u.value.seq)?u.value.replies:u.value.replies.slice(0,bp)),ge=U(()=>u.value.replies.length-ae.value.length),we=U(()=>({conversationId:u.value.conversationId,seq:u.value.seq})),X=U(()=>{const $=[],J=u.value;if(s.canEdit(J)&&$.push({id:"edit",label:n("discussion.edit")}),s.canDelete(J)&&$.push({id:"delete",label:n("discussion.delete"),danger:!0}),s.canReport(J))$.push({id:"report",label:n("discussion.report")});else if(s.canReportAsNotifier(J)){const De=kd(i.value.reportPath,we.value);De&&$.push({id:"report",label:n("discussion.report"),href:De})}return s.canBlock(J)&&$.push({id:J.collapsed?"unblock":"block",label:J.collapsed?n("discussion.unblock"):n("discussion.block")}),$});function Y($){const J=u.value;$==="edit"?s.openEdit(J.seq):$==="delete"?m(J.seq):$==="report"?s.openReport(J):($==="block"||$==="unblock")&&J.author.kind==="member"&&J.author.memberId&&s.setBlocked(J.author.memberId,$==="block")}function H(){s.openReply(u.value.seq,_.value?w.value:null)}function V($){$.has(u.value.seq)?$.delete(u.value.seq):$.add(u.value.seq)}return($,J)=>{const De=$l("MessageItem",!0);return h(),g("li",Bf,[f("article",{class:nt(["bcm-msg",{"bcm-msg-pending":!!u.value.pending}]),"aria-busy":!!u.value.pending},[Ie(ha,{author:u.value.author},null,8,["author"]),f("div",Wf,[f("header",Yf,[f("span",Gf,p(w.value),1),E.value?(h(),g("span",Zf,p(E.value),1)):N("",!0),C.value?(h(),g("span",Jf,p(C.value),1)):N("",!0),u.value.createdAt?(h(),g("time",{key:2,class:"bcm-time",datetime:u.value.createdAt},p(r(Pe)(r(o),u.value.createdAt)),9,Xf)):N("",!0),u.value.isEdited&&!S.value?(h(),g("span",Qf,p(r(n)("discussion.edited")),1)):N("",!0),u.value.pending?(h(),g("span",ep,p(r(n)("discussion.pending")),1)):N("",!0)]),S.value?(h(),g("p",tp,p(r(n)(j.value)),1)):b.value?(h(),g("p",np,[Et(p(r(n)("discussion.collapsed"))+" ",1),f("button",{type:"button",class:"bcm-link",onClick:J[0]||(J[0]=Z=>V(r(a)))},p(r(n)("discussion.show")),1)])):(h(),g(K,{key:2},[A.value?(h(),g("div",sp,[f("span",op,p(r(n)("state.hiddenUntilConsent")),1),f("p",ip,p(r(n)("discussion.hiddenUntilConsentNote")),1),v.value?(h(),g("button",{key:0,type:"button",class:"bcm-link",onClick:J[1]||(J[1]=Z=>r(s).beginOnboarding())},p(r(n)("discussion.giveConsent")),1)):N("",!0)])):T.value&&(u.value.state==="held"||u.value.state==="removed")?(h(),g("div",rp,[f("span",ap,p(u.value.state==="held"?r(n)("state.held"):r(n)("state.removed")),1),f("p",lp,p(u.value.state==="held"?r(n)("discussion.heldNote"):r(n)("discussion.removedNote")),1),u.value.state==="removed"?(h(),g("a",{key:0,href:r(i).myCommunityPath},p(r(n)("discussion.why")),9,cp)):N("",!0)])):N("",!0),W.value&&r(s).state.inline?(h(),Ne(Po,{key:2,kind:"edit",draft:r(s).state.inline,wait:r(s).waitLeft(r(s).state.inline),"rules-href":r(i).rulesPath,onSubmit:J[2]||(J[2]=Z=>r(s).submitInline()),onCancel:J[3]||(J[3]=Z=>r(s).closeInline()),onConfirm:J[4]||(J[4]=(Z,oe)=>r(s).state.inline&&r(s).setConfirmed(r(s).state.inline,Z,oe)),onConfirmed:J[5]||(J[5]=Z=>r(s).state.inline&&r(s).sendConfirmed(r(s).state.inline))},null,8,["draft","wait","rules-href"])):(h(),g("p",up,[Ie(ba,{text:q.value},null,8,["text"])])),u.value.isTranslated&&!W.value?(h(),g("p",dp,[Et(p(r(n)("discussion.translated"))+" ",1),f("button",{type:"button",class:"bcm-link",onClick:J[6]||(J[6]=Z=>V(r(l)))},p(I.value?r(n)("discussion.showTranslation"):r(n)("discussion.showOriginal")),1)])):N("",!0),u.value.collapsed?(h(),g("button",{key:5,type:"button",class:"bcm-link",onClick:J[7]||(J[7]=Z=>V(r(a)))},p(r(n)("discussion.hide")),1)):N("",!0),(h(!0),g(K,null,ke(G.value,Z=>(h(),g("p",{key:Z,class:"bcm-note"},[Z==="note.report_to_manufacturer"&&r(i).consultationPath?(h(),g("a",{key:0,href:r(i).consultationPath},p(r(n)(Z)),9,fp)):(h(),g(K,{key:1},[Et(p(r(n)(Z)),1)],64))]))),128)),(h(!0),g(K,null,ke(D.value,Z=>(h(),g("p",{key:Z,class:"bcm-warning"},p(r(n)(Z)),1))),128))],64)),!S.value&&!b.value&&!W.value?(h(),g("div",pp,[Ie(ga,{"reaction-set":r(s).state.thread.reactionSet,summary:u.value.reactions,interactive:r(s).canReact()&&!u.value.pending&&u.value.seq>0&&u.value.state==="visible",busy:!!r(s).state.busy[`react:${u.value.seq}`],onReact:J[8]||(J[8]=Z=>r(s).react(we.value,Z))},null,8,["reaction-set","summary","interactive","busy"]),r(s).canReply(u.value)?(h(),g("button",{key:0,type:"button",class:"bcm-quiet",onClick:H},p(r(n)("discussion.reply")),1)):N("",!0),Ie(Lf,{items:X.value,onSelect:Y},null,8,["items"])])):N("",!0),_.value?N("",!0):(h(),g(K,{key:4},[u.value.replies.length?(h(),g("ol",mp,[(h(!0),g(K,null,ke(ae.value,Z=>(h(),Ne(De,{key:Z.id,message:Z},null,8,["message"]))),128))])):N("",!0),ge.value>0?(h(),g("button",{key:1,type:"button",class:"bcm-link",onClick:J[9]||(J[9]=Z=>r(c).add(u.value.seq))},p(r(n)("discussion.showReplies",{count:ge.value})),1)):N("",!0),u.value.repliesTruncated?(h(),g("p",hp,p(r(n)("discussion.repliesTruncated")),1)):N("",!0),Q.value&&r(s).state.inline?(h(),Ne(Po,{key:3,kind:"reply",draft:r(s).state.inline,wait:r(s).waitLeft(r(s).state.inline),"rules-href":r(i).rulesPath,"replying-to":r(s).state.inline.replyingTo,onSubmit:J[10]||(J[10]=Z=>r(s).submitInline()),onCancel:J[11]||(J[11]=Z=>r(s).closeInline()),onConfirm:J[12]||(J[12]=(Z,oe)=>r(s).state.inline&&r(s).setConfirmed(r(s).state.inline,Z,oe)),onConfirmed:J[13]||(J[13]=Z=>r(s).state.inline&&r(s).sendConfirmed(r(s).state.inline))},null,8,["draft","wait","rules-href","replying-to"])):N("",!0)],64))])],10,Kf)])}}}),yp=["aria-labelledby"],vp=["id"],_p={key:0,class:"bcm-muted",role:"status"},kp={class:"bcm-error",role:"alert"},wp={class:"bcm-row"},xp={role:"alert"},Sp={class:"bcm-row"},Ip={key:0,class:"bcm-hint"},Cp={key:1,class:"bcm-choices"},Ap=["name","value"],Tp={class:"bcm-hint bcm-full"},$p={key:2,class:"bcm-section"},Op={key:0,class:"bcm-rules"},Ep={key:0,class:"bcm-hint"},Mp=["href"],Np={class:"bcm-check"},Pp={key:3,class:"bcm-section"},Rp=["aria-label"],jp={class:"bcm-check"},zp={key:4,class:"bcm-section"},Lp={class:"bcm-field"},Dp=["for"],Up=["id","maxlength","aria-invalid","aria-describedby"],Fp=["id"],qp={class:"bcm-field"},Hp=["for"],Vp=["id","maxlength","placeholder","aria-invalid","aria-describedby"],Bp=["id"],Kp={key:0,class:"bcm-hint"},Wp={class:"bcm-choices"},Yp={class:"bcm-choice"},Gp=["name"],Zp=["name","value"],Jp={key:5,class:"bcm-error",role:"alert"},Xp={class:"bcm-row"},Qp=["disabled"],em=["disabled"],tm=["disabled"],nm=Me({__name:"OnboardingSteps",props:{model:{},rulesHref:{}},emits:["cancel"],setup(e,{emit:t}){const n=e,o=t,{t:s,lang:i}=It(),a=n.model.state,l=ct("bcm-onboarding"),c=ve(null),m=U(()=>n.model.step()),u=U(()=>a.steps.includes("profile")),_=U(()=>{const S=a.failure;if(!S)return"";const A=Re(S,i.value);return s(A.key,A.params)}),T=S=>`onboarding.age.${S}`;return Xe(()=>[a.index,a.phase,a.steps.join()],([S,A,v],[w,,C])=>{(S!==w||v!==C||A==="refused"||A==="failed")&&We(()=>c.value?.focus())}),Cn(()=>{We(()=>c.value?.focus())}),(S,A)=>(h(),g("section",{class:"bcm-card","aria-labelledby":`${r(l)}-title`},[f("h3",{id:`${r(l)}-title`,ref_key:"heading",ref:c,tabindex:"-1"},p(r(s)("onboarding.title")),9,vp),r(a).phase==="loading"?(h(),g("p",_p,p(r(s)("common.loading")),1)):r(a).phase==="failed"?(h(),g(K,{key:1},[f("p",kp,p(_.value),1),f("div",wp,[f("button",{type:"button",class:"bcm-btn",onClick:A[0]||(A[0]=v=>o("cancel"))},p(r(s)("common.cancel")),1),f("button",{type:"button",class:"bcm-btn bcm-primary",onClick:A[1]||(A[1]=v=>e.model.load())},p(r(s)("common.retry")),1)])],64)):r(a).phase==="refused"?(h(),g(K,{key:2},[f("p",xp,p(r(s)("onboarding.ageBelow",{min:r(a).minAge??18})),1),f("div",Sp,[f("button",{type:"button",class:"bcm-btn",onClick:A[2]||(A[2]=v=>o("cancel"))},p(r(s)("common.close")),1)])],64)):(h(),g("form",{key:3,class:"bcm-form",novalidate:"",onSubmit:A[12]||(A[12]=Pt(v=>e.model.next(),["prevent"]))},[r(a).index===0&&u.value?(h(),g("p",Ip,p(r(s)("onboarding.lede")),1)):N("",!0),m.value==="age"?(h(),g("fieldset",Cp,[f("legend",null,p(r(s)("onboarding.ageTitle")),1),(h(!0),g(K,null,ke(r(yu),v=>(h(),g("label",{key:v,class:"bcm-choice"},[_e(f("input",{"onUpdate:modelValue":A[3]||(A[3]=w=>r(a).ageBand=w),type:"radio",name:`${r(l)}-age`,value:v},null,8,Ap),[[an,r(a).ageBand]]),f("span",null,p(r(s)(T(v))),1)]))),128)),f("p",Tp,p(r(s)("onboarding.ageHint")),1)])):m.value==="rules"?(h(),g("div",$p,[f("h4",null,p(r(s)("onboarding.rulesTitle")),1),f("p",null,p(r(a).reconsent?r(s)("onboarding.rulesChanged"):r(s)("onboarding.rulesLede")),1),r(a).rules.length?(h(),g("ol",Op,[(h(!0),g(K,null,ke(r(a).rules,v=>(h(),g("li",{key:v.id},[f("strong",null,p(v.title),1),v.summary?(h(),g("span",Ep,p(v.summary),1)):N("",!0)]))),128))])):N("",!0),f("p",null,[f("a",{href:e.rulesHref,target:"_blank",rel:"noopener"},p(r(s)("onboarding.rulesLink")),9,Mp)]),f("label",Np,[_e(f("input",{"onUpdate:modelValue":A[4]||(A[4]=v=>r(a).rulesAccepted=v),type:"checkbox"},null,512),[[mo,r(a).rulesAccepted]]),f("span",null,p(r(s)("onboarding.rulesAccept")),1)])])):m.value==="art9"?(h(),g("div",Pp,[f("h4",null,p(r(s)("onboarding.art9Title")),1),f("p",null,p(r(s)("onboarding.art9Lede")),1),f("div",{class:"bcm-consent",tabindex:"0",role:"document","aria-label":r(s)("onboarding.art9Title")},[(h(!0),g(K,null,ke(r(a).art9Paragraphs,(v,w)=>(h(),g("p",{key:w,class:"bcm-text"},p(v),1))),128))],8,Rp),f("label",jp,[_e(f("input",{"onUpdate:modelValue":A[5]||(A[5]=v=>r(a).art9Accepted=v),type:"checkbox"},null,512),[[mo,r(a).art9Accepted]]),f("span",null,p(r(s)("onboarding.art9Accept")),1)])])):m.value==="profile"?(h(),g("div",zp,[f("h4",null,p(r(s)("onboarding.profileTitle")),1),f("div",Lp,[f("label",{for:`${r(l)}-name`},p(r(s)("onboarding.displayName")),9,Dp),_e(f("input",{id:`${r(l)}-name`,"onUpdate:modelValue":A[6]||(A[6]=v=>r(a).displayName=v),class:"bcm-input",autocomplete:"nickname",maxlength:r(Or)*2,"aria-invalid":e.model.hasFieldError("displayName"),"aria-describedby":`${r(l)}-name-hint`},null,8,Up),[[Qe,r(a).displayName]]),f("p",{id:`${r(l)}-name-hint`,class:"bcm-hint"},p(r(s)("onboarding.displayNameHint")),9,Fp)]),f("div",qp,[f("label",{for:`${r(l)}-handle`},p(r(s)("onboarding.handle")),9,Hp),_e(f("input",{id:`${r(l)}-handle`,"onUpdate:modelValue":A[7]||(A[7]=v=>r(a).handle=v),class:"bcm-input",autocomplete:"username",autocapitalize:"none",spellcheck:"false",maxlength:r(xs),placeholder:e.model.suggestedHandle()??"","aria-invalid":e.model.hasFieldError("handle"),"aria-describedby":`${r(l)}-handle-hint`},null,8,Vp),[[Qe,r(a).handle]]),f("p",{id:`${r(l)}-handle-hint`,class:"bcm-hint"},p(r(s)("onboarding.handleHint",{min:r(ia),max:r(xs),days:r(Mr)})),9,Bp),e.model.suggestedHandle()?(h(),g("p",Kp,p(r(s)("onboarding.handleSuggested",{handle:e.model.suggestedHandle()??""})),1)):N("",!0)]),f("fieldset",Wp,[f("legend",null,p(r(s)("onboarding.avatar")),1),f("label",Yp,[_e(f("input",{"onUpdate:modelValue":A[8]||(A[8]=v=>r(a).avatarPreset=v),type:"radio",name:`${r(l)}-avatar`,value:null},null,8,Gp),[[an,r(a).avatarPreset]]),f("span",null,p(r(s)("onboarding.avatarNone")),1)]),(h(!0),g(K,null,ke(r(Ro),v=>(h(),g("label",{key:v.id,class:"bcm-choice"},[_e(f("input",{"onUpdate:modelValue":A[9]||(A[9]=w=>r(a).avatarPreset=w),type:"radio",name:`${r(l)}-avatar`,value:v.id},null,8,Zp),[[an,r(a).avatarPreset]]),f("span",null,p(v.emoji),1)]))),128))])])):N("",!0),_.value?(h(),g("p",Jp,p(_.value),1)):N("",!0),f("div",Xp,[r(a).index>0?(h(),g("button",{key:0,type:"button",class:"bcm-btn",disabled:r(a).phase==="sending",onClick:A[10]||(A[10]=v=>e.model.back())},p(r(s)("onboarding.back")),9,Qp)):N("",!0),f("button",{type:"button",class:"bcm-btn",disabled:r(a).phase==="sending",onClick:A[11]||(A[11]=v=>o("cancel"))},p(r(s)("common.cancel")),9,em),A[13]||(A[13]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!e.model.canContinue()},p(r(a).phase==="sending"?r(s)("composer.sending"):e.model.isLast()?r(s)("onboarding.submit"):r(s)("onboarding.continue")),9,tm)])],32))],8,yp))}}),sm=["aria-labelledby"],om=["id"],im={class:"bcm-hint"},rm={key:0},am=["href"],lm={class:"bcm-choices"},cm=["name","value"],um={key:1,class:"bcm-field"},dm=["for"],fm={key:0,class:"bcm-error"},pm={key:1,class:"bcm-muted",role:"status"},mm=["id"],hm=["value"],bm={class:"bcm-field"},gm=["for"],ym=["id","aria-describedby","aria-invalid"],vm=["id"],_m={key:2,class:"bcm-error",role:"alert"},km={class:"bcm-row"},wm=["disabled"],xm=["disabled"],Sm={role:"status"},Im=["href"],Cm={class:"bcm-row"},Am=Me({__name:"ReportDialog",props:{report:{},myCommunityHref:{},rulesHref:{},fallbackFocus:{type:Function}},emits:["submit","close"],setup(e,{emit:t}){const n=e,o=t,{t:s,lang:i}=It(),a=ve(null),l=ct("bcm-report");pa(a,()=>o("close"),n.fallbackFocus);const c=T=>`category.${T}`,m=U(()=>lt(et(n.report.note))),u=U(()=>!n.report.sending&&n.report.category!==""&&(n.report.category!=="rules"||n.report.ruleId!=="")&&m.value<=fs),_=U(()=>{const T=n.report.failure;if(!T)return"";const S=Re(T,i.value);return s(S.key,S.params)});return(T,S)=>(h(),g("dialog",{ref_key:"dialog",ref:a,class:"bcm-dialog","aria-labelledby":`${r(l)}-title`},[f("form",{class:"bcm-dialog-body",novalidate:"",onSubmit:S[5]||(S[5]=Pt(A=>u.value&&o("submit"),["prevent"]))},[f("h3",{id:`${r(l)}-title`},p(r(s)("report.title")),9,om),e.report.done?(h(),g(K,{key:1},[f("p",Sm,p(r(s)("report.done")),1),f("p",null,[f("a",{href:e.myCommunityHref},p(r(s)("panel.title")),9,Im)]),f("div",Cm,[S[8]||(S[8]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn bcm-primary",onClick:S[4]||(S[4]=A=>o("close"))},p(r(s)("common.close")),1)])],64)):(h(),g(K,{key:0},[f("p",im,p(r(s)("report.lede")),1),e.rulesHref?(h(),g("p",rm,[f("a",{href:e.rulesHref,target:"_blank",rel:"noopener"},p(r(s)("onboarding.rulesTitle")),9,am)])):N("",!0),f("fieldset",lm,[f("legend",null,p(r(s)("report.category")),1),(h(!0),g(K,null,ke(r(Nr),A=>(h(),g("label",{key:A,class:"bcm-choice"},[_e(f("input",{"onUpdate:modelValue":S[0]||(S[0]=v=>e.report.category=v),type:"radio",name:`${r(l)}-category`,value:A},null,8,cm),[[an,e.report.category]]),f("span",null,p(r(s)(c(A))),1)]))),128))]),e.report.category==="rules"?(h(),g("div",um,[f("label",{for:`${r(l)}-rule`},p(r(s)("report.rule")),9,dm),e.report.rulesFailed?(h(),g("p",fm,p(r(s)("error.unavailable")),1)):e.report.rules===null?(h(),g("p",pm,p(r(s)("common.loading")),1)):_e((h(),g("select",{key:2,id:`${r(l)}-rule`,"onUpdate:modelValue":S[1]||(S[1]=A=>e.report.ruleId=A),class:"bcm-input",required:""},[S[6]||(S[6]=f("option",{value:"",disabled:""},null,-1)),(h(!0),g(K,null,ke(e.report.rules,A=>(h(),g("option",{key:A.id,value:A.id},p(A.title),9,hm))),128))],8,mm)),[[gr,e.report.ruleId]])])):N("",!0),f("div",bm,[f("label",{for:`${r(l)}-note`},p(r(s)("report.note")),9,gm),_e(f("textarea",{id:`${r(l)}-note`,"onUpdate:modelValue":S[2]||(S[2]=A=>e.report.note=A),class:"bcm-input bcm-textarea",rows:"3","aria-describedby":`${r(l)}-note-hint`,"aria-invalid":m.value>r(fs)},null,8,ym),[[Qe,e.report.note]]),f("p",{id:`${r(l)}-note-hint`,class:"bcm-hint"},p(r(s)("report.noteHint"))+" "+p(r(s)("report.counter",{length:m.value,max:r(fs)})),9,vm)]),_.value?(h(),g("p",_m,p(_.value),1)):N("",!0),f("div",km,[S[7]||(S[7]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn",disabled:e.report.sending,onClick:S[3]||(S[3]=A=>o("close"))},p(r(s)("report.cancel")),9,wm),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!u.value},p(e.report.sending?r(s)("report.sending"):r(s)("report.submit")),9,xm)])],64))],32)],8,sm))}}),Tm=["lang","aria-labelledby"],$m={class:"bcm-head"},Om=["id"],Em={key:0,class:"bcm-count"},Mm={key:0,class:"bcm-muted",role:"status"},Nm={key:1,class:"bcm-banner",role:"alert"},Pm={key:0,class:"bcm-banner",role:"status"},Rm=["disabled"],jm={key:1,class:"bcm-muted"},zm={key:2,class:"bcm-thread"},Lm={key:3,class:"bcm-row"},Dm=["disabled"],Um={class:"bcm-section"},Fm={key:1,class:"bcm-row"},qm=["href"],Hm={key:1,class:"bcm-row"},Vm={key:3,class:"bcm-note"},Bm={key:4,class:"bcm-section"},Km=["href"],Wm={key:5,class:"bcm-note"},Ym={key:6,class:"bcm-note"},Gm=["href"],Zm={class:"bcm-sr","aria-live":"polite"},va=new WeakMap,Jm=Me({inheritAttrs:!1,__name:"DiscussionView",props:{articleId:{},apiBase:{},siteBase:{},lang:{},signInHref:{},routes:{},pollMs:{},transport:{type:Function}},setup(e){const t=e,n=po(),o=ve(Ss(t.lang,Is())),{t:s,text:i}=Mo(o);Xe(()=>t.lang,X=>{o.value=Ss(X,Is())});const a=ct("bcm-discussion"),l=ve(null),c=ve(0),m=Ks(null),u=U(()=>To(t.siteBase));function _(){const X=t.articleId?.trim();if(!X)return fn("article-id","[blogmcp-community] <blogmcp-discussion> needs an article-id"),null;if(u.value===null)return null;const Y=$o(t.apiBase,t.transport,u.value);return Y?nf({client:Y,articleId:X,lang:o.value,pollMs:t.pollMs,refusedAge:(n&&va.get(n))??null,onAgeRefused:H=>{n&&va.set(n,H)},onPosted:H=>n?.dispatchEvent(new CustomEvent("bcm-posted",{detail:{state:H},bubbles:!0,composed:!0}))}):null}const T=gt(new Set),S=gt(new Set),A=gt(new Set),v=ve(null),w=U(()=>Co(t.routes)),C=U(()=>Ao(w.value,m.value?.state.me?.links,u.value??""));Hf({get ctl(){return m.value},routes:C,opened:T,originals:S,allReplies:A,focusHeading:()=>l.value,deleteMessage:X=>{v.value=X}});let E=null;function j(){m.value?.dispose(),T.clear(),S.clear(),A.clear(),v.value=null,m.value=_(),c.value+=1,m.value?.start()}Cn(()=>{j(),n&&typeof IntersectionObserver<"u"&&(E=new IntersectionObserver(X=>{const Y=X[X.length-1];Y&&m.value?.setInView(Y.isIntersecting)},{rootMargin:"200px"}),E.observe(n))}),Xe(()=>[t.articleId,t.apiBase,u.value,t.transport,t.pollMs,o.value],()=>j()),sn(()=>{E?.disconnect(),m.value?.dispose(),m.value=null});const b=U(()=>m.value),I=U(()=>m.value?.state??null),q=U(()=>m.value?.mode()??"pending"),G=ve(null);Xe(q,(X,Y)=>{X==="write"&&Y==="onboarding"&&We(()=>G.value?.focus()),X==="ageRefused"&&Y==="onboarding"&&We(()=>l.value?.focus())});const D=U(()=>{const X=m.value?.needs();return X?.onboarding?"need.onboarding":X?.rules?"need.reconsent_rules":"need.art9_consent"});function W(){return Gr(t.signInHref,typeof location>"u"?null:location.pathname)}function Q(X){const Y=X.endsAt?Pe(o.value,X.endsAt):"";return X.kind==="ban"?s("sanction.ban"):X.kind==="suspension"?Y?s("sanction.suspensionUntil",{date:Y}):s("sanction.suspension"):Y?s("sanction.restrictionUntil",{date:Y}):s("sanction.restriction")}const ae=U(()=>{const X=I.value?.failure;if(!X)return"";const Y=Re(X,o.value);return s(Y.key,Y.params)}),ge=ve("");Xe(()=>I.value?.announceId,()=>{ge.value="";const X=i(I.value?.announcement);We(()=>{ge.value=X})});async function we(){const X=v.value;X===null||!m.value||(await m.value.remove(X),v.value=null)}return(X,Y)=>b.value&&I.value&&I.value.phase!=="hidden"?(h(),g("section",{key:c.value,class:"bcm bcm-discussion",lang:o.value,"aria-labelledby":r(a)},[f("header",$m,[f("h2",{id:r(a),ref_key:"heading",ref:l,tabindex:"-1"},p(r(s)("discussion.title")),9,Om),I.value.phase==="ready"?(h(),g("span",Em,p(r(s)("discussion.count",{count:I.value.thread.count})),1)):N("",!0)]),I.value.phase==="loading"?(h(),g("p",Mm,p(r(s)("discussion.loading")),1)):I.value.phase==="failed"?(h(),g("div",Nm,[f("span",null,p(ae.value),1),f("button",{type:"button",class:"bcm-btn",onClick:Y[0]||(Y[0]=H=>b.value.refresh())},p(r(s)("common.retry")),1)])):(h(),g(K,{key:2},[Ie(ga,{"reaction-set":I.value.thread.reactionSet,summary:I.value.thread.articleReactions,interactive:b.value.canReact(),busy:!!I.value.busy["react:article"],onReact:Y[1]||(Y[1]=H=>b.value&&b.value.react({articleId:I.value.thread.articleId??e.articleId??""},H))},null,8,["reaction-set","summary","interactive","busy"]),I.value.newMessages?(h(),g("div",Pm,[f("span",null,p(r(s)("discussion.newMessages")),1),f("button",{type:"button",class:"bcm-btn",disabled:I.value.refreshing,onClick:Y[2]||(Y[2]=H=>b.value.refresh())},p(r(s)("discussion.refresh")),9,Rm)])):N("",!0),I.value.thread.messages.length===0?(h(),g("p",jm,p(r(s)("discussion.empty")),1)):(h(),g("ol",zm,[(h(!0),g(K,null,ke(I.value.thread.messages,H=>(h(),Ne(gp,{key:H.id,message:H},null,8,["message"]))),128))])),I.value.thread.nextCursor!==null?(h(),g("div",Lm,[f("button",{type:"button",class:"bcm-btn",disabled:I.value.loadingMore,onClick:Y[3]||(Y[3]=H=>b.value.loadMore())},p(r(s)("discussion.loadMore")),9,Dm)])):N("",!0),f("div",Um,[q.value==="write"?(h(),Ne(Po,{key:0,ref_key:"composer",ref:G,kind:"new",draft:I.value.composer,wait:b.value.waitLeft(I.value.composer),"rules-href":C.value.rulesPath,onSubmit:Y[4]||(Y[4]=H=>b.value.submit()),onConfirm:Y[5]||(Y[5]=(H,V)=>b.value&&b.value.setConfirmed(I.value.composer,H,V)),onConfirmed:Y[6]||(Y[6]=H=>b.value.sendConfirmed(I.value.composer))},null,8,["draft","wait","rules-href"])):q.value==="signIn"?(h(),g("div",Fm,[f("p",null,p(r(s)("discussion.signInPrompt")),1),W()?(h(),g("a",{key:0,class:"bcm-btn bcm-primary",href:W()??void 0},p(r(s)("common.signIn")),9,qm)):N("",!0)])):q.value==="onboarding"?(h(),g(K,{key:2},[b.value.onboarding.value?(h(),Ne(nm,{key:0,model:b.value.onboarding.value,"rules-href":C.value.rulesPath,onCancel:Y[7]||(Y[7]=H=>b.value.cancelOnboarding())},null,8,["model","rules-href"])):(h(),g("div",Hm,[f("p",null,p(r(s)(D.value)),1),f("button",{type:"button",class:"bcm-btn bcm-primary",onClick:Y[8]||(Y[8]=H=>b.value.beginOnboarding())},p(r(s)("onboarding.continue")),1)]))],64)):q.value==="ageRefused"?(h(),g("p",Vm,p(r(s)("onboarding.ageBelow",{min:I.value.refusedAge??18})),1)):q.value==="sanction"?(h(),g("div",Bm,[(h(!0),g(K,null,ke(I.value.thread.viewer.restrictions,H=>(h(),g("p",{key:H.decisionId,class:"bcm-note"},[Et(p(Q(H))+" ",1),r(ko)(C.value.statementPath,H.decisionId)?(h(),g("a",{key:0,href:r(ko)(C.value.statementPath,H.decisionId)??void 0},p(r(s)("sanction.statement")),9,Km)):N("",!0)]))),128))])):q.value==="notMoved"?(h(),g("p",Wm,p(r(s)("error.notMoved")),1)):q.value==="restricted"?(h(),g("p",Ym,[Et(p(r(s)("error.restricted"))+" ",1),f("a",{href:C.value.myCommunityPath},p(r(s)("panel.title")),9,Gm)])):N("",!0)])],64)),f("p",Zm,p(ge.value),1),I.value.report?(h(),Ne(Am,{key:3,report:I.value.report,"my-community-href":C.value.myCommunityPath,"rules-href":C.value.rulesPath,"fallback-focus":()=>l.value,onSubmit:Y[9]||(Y[9]=H=>b.value.submitReport()),onClose:Y[10]||(Y[10]=H=>b.value.closeReport())},null,8,["report","my-community-href","rules-href","fallback-focus"])):N("",!0),v.value!==null?(h(),Ne(No,{key:4,title:"discussion.deleteTitle",explain:"discussion.deleteExplain",confirm:"discussion.deleteConfirm",danger:"",busy:!!I.value.busy[`delete:${v.value}`],"fallback-focus":()=>l.value,onConfirm:Y[11]||(Y[11]=H=>we()),onCancel:Y[12]||(Y[12]=H=>v.value=null)},null,8,["busy","fallback-focus"])):N("",!0)],8,Tm)):N("",!0)}});function Xm(e,t){if(typeof document>"u"||typeof URL.createObjectURL!="function")return;const n=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),o=URL.createObjectURL(n),s=document.createElement("a");s.href=o,s.download=t,s.style.display="none",document.body.appendChild(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(o),1e3)}function Qm(e,t=new Date){const n=t.toISOString().slice(0,10);return`${e.replace(/[^\p{L}\p{N}_-]+/gu,"-").replace(/^-+|-+$/g,"")||"export"}-${n}.json`}const jo=()=>({body:"",sending:!1,failure:null});function eh(e){const{client:t}=e,n=new AbortController,o={signal:n.signal},s=gt({phase:"idle",failure:null,me:null,notifications:[],decisions:[],appeals:[],reports:[],blocks:[],statement:{phase:"idle",value:null,failure:null,appeal:jo()},notice:{phase:"idle",value:null,failure:null,appeal:jo()},profile:null,purgeAfter:null,exporting:!1,busy:{},announcement:null,announceId:0});let i=!1;const a=w=>{s.announcement=w,s.announceId+=1},l=w=>({key:`error.${w.code}`});async function c(){s.phase="loading",s.failure=null;const w=await t.me.get(o);if(i)return;if(!w.ok){if(w.code==="signIn"){s.phase="signIn";return}s.phase="failed",s.failure=w;return}if(s.me=w.value,w.value.needs.includes("sign_in")){s.phase="signIn";return}if(!w.value.member){s.phase="ready";return}const[C,E,j,b,I]=await Promise.all([t.me.notifications.list({},o),t.me.decisions.list({},o),t.me.appeals.list(o),t.me.reports.list(o),t.blocks.list(o)]);if(i)return;C.ok&&(s.notifications=C.value.items.filter(G=>bu(G.code))),E.ok&&(s.decisions=[...E.value.items]),j.ok&&(s.appeals=[...j.value.items]),b.ok&&(s.reports=[...b.value.items]),I.ok&&(s.blocks=[...I.value.blocks]);const q=[C,E,j,b,I].find(G=>!G.ok);q&&!q.ok&&a(l(q)),s.phase="ready"}let m=null,u=0;async function _(w){const C=++u;w!==m&&(m=w,s.statement.value=null,s.statement.appeal=jo()),s.statement.phase="loading",s.statement.failure=null;const E=await t.me.decisions.get({decisionId:w},o);if(!(i||C!==u)){if(E.ok){s.statement.value=E.value,s.statement.phase="ready";return}s.statement.failure=E,s.statement.phase=E.code==="signIn"?"signIn":"failed"}}async function T(w){if(w===null){s.notice.phase="missing";return}s.notice.phase="loading",s.notice.failure=null;const C=await t.notices.status({receipt:w},o);if(!i){if(C.ok){s.notice.value=C.value,s.notice.phase="ready";return}s.notice.failure=C,s.notice.phase="failed"}}let S=null;const A=w=>lt(et(w.body)),v=w=>!w.sending&&A(w)>0&&A(w)<=Bt;return{state:s,loadMember:c,loadStatement:_,async loadNotice(w){S=w,await T(w)},unreadCount:()=>s.notifications.filter(w=>w.readAt===null).length,async markAllRead(){const w=s.notifications.filter(j=>j.readAt===null).map(j=>j.id);if(w.length===0||s.busy.markRead)return;s.busy.markRead=!0;const C=await t.me.notifications.markRead({ids:w},o);if(delete s.busy.markRead,i)return;if(!C.ok)return a(l(C));const E=new Date().toISOString();s.notifications=s.notifications.map(j=>w.includes(j.id)?{...j,readAt:E}:j)},async fileAppeal(){const w=s.statement,C=w.appeal;if(!w.value||!w.value.canAppeal||!v(C))return;const E=w.value.decisionId;C.sending=!0,C.failure=null;const j=await t.me.appeals.file({decisionId:E,body:et(C.body)},o);if(C.sending=!1,!(i||E!==m)){if(!j.ok){C.failure=j;return}C.body="",a({key:"statement.appealSent"}),await _(E)}},async withdrawAppeal(){const w=s.statement,C=w.value?.appeal;if(!w.value||!C||C.status!=="open"||s.busy.withdraw)return;const E=w.value.decisionId;s.busy.withdraw=!0;const j=await t.me.appeals.withdraw({appealId:C.appealId},o);if(delete s.busy.withdraw,!(i||E!==m)){if(!j.ok)return a(l(j));a({key:"statement.appealWithdrawn"}),await _(E)}},async fileNoticeAppeal(){const w=s.notice,C=w.appeal;if(!w.value||!w.value.appeal.canAppeal||S===null||!v(C))return;C.sending=!0,C.failure=null;const E=await t.notices.appeal({receipt:S,body:et(C.body)},o);if(C.sending=!1,!i){if(!E.ok){C.failure=E;return}C.body="",a({key:"notice.appealSent"}),await T(S)}},async withdrawNoticeAppeal(){if(!s.notice.value?.appeal.open||S===null||s.busy.noticeWithdraw)return;s.busy.noticeWithdraw=!0;const w=await t.notices.withdrawAppeal({receipt:S},o);if(delete s.busy.noticeWithdraw,!i){if(!w.ok)return a(l(w));a({key:"statement.appealWithdrawn"}),await T(S)}},async withdrawConsent(){if(s.busy.consent)return!1;s.busy.consent=!0;const w=await t.me.consents.withdraw({kind:"art9_consent"},o);return delete s.busy.consent,i?!1:w.ok?(s.me&&(s.me={...s.me,acceptances:{...s.me.acceptances,art9Consent:w.value.state}}),a({key:"panel.art9Withdrawn"}),!0):(a(l(w)),!1)},async unblock(w){const C=`block:${w}`;if(s.busy[C])return;s.busy[C]=!0;const E=await t.blocks.set({memberId:w,blocked:!1},o);if(delete s.busy[C],!i){if(!E.ok)return a(l(E));s.blocks=s.blocks.filter(j=>j.memberId!==w),a({key:"discussion.unblocked"})}},editProfile(){const w=s.me?.profile;w&&(s.profile={displayName:w.displayName,handle:w.handle,avatarPreset:w.avatarPreset,sending:!1,failure:null,fields:[]})},cancelProfile(){s.profile=null},async saveProfile(){const w=s.profile,C=s.me?.profile;if(!w||!C||w.sending||!oa(w.displayName)||!ra(w.handle)||pn(w.handle)==="")return;const E={},j=ws(w.displayName),b=pn(w.handle);if(j!==C.displayName&&(E.displayName=j),b!==C.handle&&(E.handle=b),w.avatarPreset!==C.avatarPreset&&(E.avatarPreset=w.avatarPreset),Object.keys(E).length===0){s.profile=null;return}w.sending=!0,w.failure=null,w.fields=[];const I=await t.me.updateProfile(E,o);if(w.sending=!1,!i){if(!I.ok){w.failure=I,w.fields=I.code==="handle"?["handle"]:I.code==="name"?["displayName"]:I.fields??[];return}s.me&&(s.me={...s.me,profile:I.value.profile}),s.profile=null}},async exportData(w){if(s.exporting)return;s.exporting=!0;const C=await t.me.export(o);if(s.exporting=!1,!i){if(!C.ok)return a(l(C));w(C.value)}},async erase(){if(s.busy.erase)return!1;s.busy.erase=!0;const w=await t.me.erase(o);return delete s.busy.erase,i?!1:w.ok?(s.purgeAfter=w.value.purgeAfter,s.me?.member&&(s.me={...s.me,member:{...s.me.member,status:w.value.status}}),!0):(a(l(w)),!1)},async cancelErase(){if(s.busy.erase)return;s.busy.erase=!0;const w=await t.me.cancelErase(o);if(delete s.busy.erase,!i){if(!w.ok)return a(l(w));s.purgeAfter=null,s.me?.member&&(s.me={...s.me,member:{...s.me.member,status:w.value.status}}),a({key:"panel.eraseCancelled"})}},erasing:()=>s.me?.member?.status==="deletion_requested",appealLength:A,canAppealWith:v,dispose(){i=!0,n.abort()}}}const zo=new WeakMap;function th(e){if(typeof location<"u"&&location.hash.startsWith("#t=")){const t=Zr(location.hash);return rd(),e&&zo.set(e,t),t}return e&&zo.has(e)?zo.get(e)??null:void 0}const nh=["aria-labelledby"],sh=["id"],oh={class:"bcm-dl"},ih={class:"bcm-muted"},rh={key:0,class:"bcm-muted"},ah={class:"bcm-facts"},lh=["aria-labelledby"],ch=["id"],uh={class:"bcm-row"},dh=["disabled"],fh={key:0,class:"bcm-muted"},ph={class:"bcm-field"},mh=["for"],hh=["id","aria-describedby","aria-invalid"],bh=["id"],gh={key:0,class:"bcm-error",role:"alert"},yh={class:"bcm-row"},vh=["disabled"],_h={key:2},kh={key:3},wh=Me({__name:"NoticeStatusView",props:{notice:{},appeal:{},withdrawing:{type:Boolean}},emits:["appeal","withdraw"],setup(e,{emit:t}){const n=e,o=t,{t:s,lang:i}=It(),a=ct("bcm-notice-status"),l=U(()=>n.notice),c=U(()=>tt(`category.${l.value.category}`)),m=U(()=>tt(`caseStatus.${l.value.status}`)),u=U(()=>lt(et(n.appeal.body))),_=U(()=>!n.appeal.sending&&u.value>0&&u.value<=Bt),T=U(()=>l.value.appeal.closesAt?la(l.value.appeal.closesAt):!1),S=U(()=>{const A=n.appeal.failure;if(!A)return"";const v=Re(A,i.value);return s(v.key,v.params)});return(A,v)=>(h(),g("section",{class:"bcm-section","aria-labelledby":`${r(a)}-title`},[f("h3",{id:`${r(a)}-title`},p(r(s)("notice.statusTitle")),9,sh),f("dl",oh,[c.value?(h(),g(K,{key:0},[f("dt",null,p(r(s)("notice.category")),1),f("dd",null,p(r(s)(c.value)),1)],64)):N("",!0),m.value?(h(),g(K,{key:1},[f("dt",null,p(r(s)("notice.statusTitle")),1),f("dd",null,p(r(s)(m.value)),1)],64)):N("",!0)]),f("p",ih,p(r(s)("notice.submittedAt",{date:r(Pe)(r(i),l.value.submittedAt)})),1),l.value.decidedAt?(h(),g("p",rh,p(r(s)("notice.decidedAt",{date:r(Pe)(r(i),l.value.decidedAt)})),1)):N("",!0),l.value.statement?(h(),g(K,{key:1},[f("h4",null,p(r(s)("notice.statement")),1),f("pre",ah,p(l.value.statement),1)],64)):N("",!0),l.value.decidedAt?(h(),g("section",{key:2,class:"bcm-card","aria-labelledby":`${r(a)}-appeal`},[f("h4",{id:`${r(a)}-appeal`},p(r(s)("notice.appealTitle")),9,ch),l.value.appeal.open?(h(),g(K,{key:0},[f("p",null,p(r(s)("notice.appealOpen")),1),f("div",uh,[f("button",{type:"button",class:"bcm-btn",disabled:e.withdrawing,onClick:v[0]||(v[0]=w=>o("withdraw"))},p(r(s)("notice.appealWithdraw")),9,dh)])],64)):l.value.appeal.canAppeal?(h(),g(K,{key:1},[f("p",null,p(r(s)("notice.appealLede")),1),l.value.appeal.closesAt?(h(),g("p",fh,p(r(s)("notice.appealUntil",{date:r(Pe)(r(i),l.value.appeal.closesAt)})),1)):N("",!0),f("form",{class:"bcm-form",novalidate:"",onSubmit:v[2]||(v[2]=Pt(w=>_.value&&o("appeal"),["prevent"]))},[f("div",ph,[f("label",{for:`${r(a)}-body`},p(r(s)("notice.appealBody")),9,mh),_e(f("textarea",{id:`${r(a)}-body`,"onUpdate:modelValue":v[1]||(v[1]=w=>e.appeal.body=w),class:"bcm-input bcm-textarea",rows:"5","aria-describedby":`${r(a)}-counter`,"aria-invalid":u.value>r(Bt)},null,8,hh),[[Qe,e.appeal.body]]),f("p",{id:`${r(a)}-counter`,class:"bcm-counter"},p(r(s)("statement.appealCounter",{length:u.value,max:r(Bt)})),9,bh)]),S.value?(h(),g("p",gh,p(S.value),1)):N("",!0),f("div",yh,[f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!_.value},p(e.appeal.sending?r(s)("statement.appealSending"):r(s)("notice.appealSubmit")),9,vh)])],32)],64)):T.value?(h(),g("p",_h,p(r(s)("notice.appealClosed")),1)):(h(),g("p",kh,p(r(s)("statement.appealUnavailable")),1))],8,lh)):N("",!0)],8,nh))}}),xh=["aria-labelledby"],Sh=["id"],Ih={class:"bcm-muted"},Ch={class:"bcm-dl"},Ah={key:0,class:"bcm-muted"},Th={key:0},$h={key:0,class:"bcm-text"},Oh={key:0,class:"bcm-text"},Eh={key:0,class:"bcm-note bcm-text"},Mh={class:"bcm-facts"},Nh={class:"bcm-text"},Ph={class:"bcm-facts"},Rh=["aria-labelledby"],jh=["id"],zh={key:0,class:"bcm-muted"},Lh={class:"bcm-row"},Dh=["disabled"],Uh={class:"bcm-muted"},Fh={class:"bcm-field"},qh=["for"],Hh=["id","aria-describedby","aria-invalid"],Vh=["id"],Bh={key:0,class:"bcm-error",role:"alert"},Kh={class:"bcm-row"},Wh=["disabled"],Yh={key:0,class:"bcm-muted"},Gh=Me({__name:"StatementView",props:{statement:{},appeal:{},withdrawing:{type:Boolean}},emits:["appeal","withdraw"],setup(e,{emit:t}){const n=e,o=t,{t:s,lang:i}=It(),a=ct("bcm-statement"),l=U(()=>n.statement),c=U(()=>tt(`restriction.${l.value.restriction}`)),m=U(()=>tt(`basis.${l.value.basis}`)),u=U(()=>tt(`category.${l.value.category}`)),_=U(()=>Zd(i.value,l.value.territorialScope)),T=U(()=>l.value.appeal?tt(`appealStatus.${l.value.appeal.status}`):null),S=U(()=>l.value.subject.kind==="message"?"statement.subjectMessage":l.value.subject.kind==="article"?"statement.subjectArticle":"statement.subjectProfile"),A=U(()=>{const b=l.value.subject;return b.kind==="message"&&b.message?b.message.body??b.message.displayBody:null}),v=U(()=>l.value.appeal?.status==="open"),w=U(()=>la(l.value.appealWindowClosesAt)),C=U(()=>lt(et(n.appeal.body))),E=U(()=>!n.appeal.sending&&C.value>0&&C.value<=Bt),j=U(()=>{const b=n.appeal.failure;if(!b)return"";const I=Re(b,i.value);return s(I.key,I.params)});return(b,I)=>(h(),g("article",{class:"bcm-section","aria-labelledby":`${r(a)}-title`},[f("h3",{id:`${r(a)}-title`},p(r(s)("statement.title")),9,Sh),f("p",Ih,p(r(s)("statement.decidedAt",{date:r(Pe)(r(i),l.value.decidedAt)})),1),f("p",null,p(r(s)("statement.provider",{entity:l.value.providerEntity})),1),f("dl",Ch,[c.value?(h(),g(K,{key:0},[f("dt",null,p(r(s)("statement.restriction")),1),f("dd",null,[Et(p(r(s)(c.value))+" ",1),l.value.restrictionUntil?(h(),g("span",Ah,p(r(s)("statement.until",{date:r(Pe)(r(i),l.value.restrictionUntil)})),1)):N("",!0)])],64)):N("",!0),u.value?(h(),g(K,{key:1},[f("dt",null,p(r(s)("report.category")),1),f("dd",null,p(r(s)(u.value)),1)],64)):N("",!0),_.value?(h(),g(K,{key:2},[f("dt",null,p(r(s)("statement.scope")),1),f("dd",null,p(_.value),1)],64)):N("",!0),m.value?(h(),g(K,{key:3},[f("dt",null,p(r(s)("statement.basis")),1),f("dd",null,p(r(s)(m.value)),1)],64)):N("",!0),f("dt",null,p(r(s)("statement.automation")),1),f("dd",null,[l.value.automatedDetection?(h(),g("span",Th,p(r(s)("statement.automatedDetection")),1)):N("",!0),f("span",null,p(l.value.automated?r(s)("statement.automatedDecision"):r(s)("statement.humanDecision")),1)]),l.value.legalGround?(h(),g(K,{key:4},[f("dt",null,p(r(s)("statement.legalGround")),1),f("dd",null,[f("p",null,p(l.value.legalGround),1),l.value.legalExplanation?(h(),g("p",$h,p(l.value.legalExplanation),1)):N("",!0)])],64)):N("",!0),l.value.contractualGround?(h(),g(K,{key:5},[f("dt",null,p(r(s)("statement.contractualGround")),1),f("dd",null,[f("p",null,p(l.value.contractualGround),1),l.value.contractualExplanation?(h(),g("p",Oh,p(l.value.contractualExplanation),1)):N("",!0)])],64)):N("",!0),f("dt",null,p(r(s)("statement.subject")),1),f("dd",null,[f("p",null,p(r(s)(S.value)),1),A.value?(h(),g("p",Eh,[Ie(ba,{text:A.value},null,8,["text"])])):N("",!0)])]),f("h4",null,p(r(s)("statement.facts")),1),f("pre",Mh,p(l.value.facts),1),f("h4",null,p(r(s)("statement.redress")),1),f("p",Nh,p(l.value.redress),1),f("details",null,[f("summary",null,p(r(s)("statement.full")),1),f("pre",Ph,p(l.value.statement),1)]),f("section",{class:"bcm-card","aria-labelledby":`${r(a)}-appeal`},[f("h4",{id:`${r(a)}-appeal`},p(r(s)("statement.appealTitle")),9,jh),v.value?(h(),g(K,{key:0},[f("p",null,p(r(s)("statement.appealOpen")),1),T.value?(h(),g("p",zh,p(r(s)(T.value)),1)):N("",!0),f("div",Lh,[f("button",{type:"button",class:"bcm-btn",disabled:e.withdrawing,onClick:I[0]||(I[0]=q=>o("withdraw"))},p(r(s)("statement.appealWithdraw")),9,Dh)])],64)):l.value.canAppeal?(h(),g(K,{key:1},[f("p",null,p(r(s)("statement.appealLede")),1),f("p",Uh,p(r(s)("statement.appealUntil",{date:r(Pe)(r(i),l.value.appealWindowClosesAt)})),1),f("form",{class:"bcm-form",novalidate:"",onSubmit:I[2]||(I[2]=Pt(q=>E.value&&o("appeal"),["prevent"]))},[f("div",Fh,[f("label",{for:`${r(a)}-body`},p(r(s)("statement.appealBody")),9,qh),_e(f("textarea",{id:`${r(a)}-body`,"onUpdate:modelValue":I[1]||(I[1]=q=>e.appeal.body=q),class:"bcm-input bcm-textarea",rows:"5","aria-describedby":`${r(a)}-counter`,"aria-invalid":C.value>r(Bt)},null,8,Hh),[[Qe,e.appeal.body]]),f("p",{id:`${r(a)}-counter`,class:"bcm-counter"},p(r(s)("statement.appealCounter",{length:C.value,max:r(Bt)})),9,Vh)]),j.value?(h(),g("p",Bh,p(j.value),1)):N("",!0),f("div",Kh,[f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!E.value},p(e.appeal.sending?r(s)("statement.appealSending"):r(s)("statement.appealSubmit")),9,Wh)])],32)],64)):(h(),g(K,{key:2},[T.value?(h(),g("p",Yh,p(r(s)(T.value)),1)):N("",!0),f("p",null,p(w.value?r(s)("statement.appealClosed"):r(s)("statement.appealUnavailable")),1)],64))],8,Rh)],8,xh))}}),Zh=["lang","aria-labelledby"],Jh=["id"],Xh={key:0,class:"bcm-note",role:"alert"},Qh={key:1,class:"bcm-muted",role:"status"},eb={key:2,class:"bcm-error",role:"alert"},tb={key:0,class:"bcm-muted",role:"status"},nb={key:1,class:"bcm-row"},sb=["href"],ob={key:2,class:"bcm-error",role:"alert"},ib=["href"],rb={key:0,class:"bcm-muted",role:"status"},ab={key:1,class:"bcm-row"},lb=["href"],cb={key:2,class:"bcm-error",role:"alert"},ub=["aria-labelledby"],db=["id"],fb={key:0,class:"bcm-msg"},pb={class:"bcm-msg-main"},mb={class:"bcm-author"},hb={class:"bcm-handle"},bb={class:"bcm-row"},gb={class:"bcm-field"},yb=["for"],vb=["id","aria-invalid"],_b={class:"bcm-hint"},kb={class:"bcm-field"},wb=["for"],xb=["id","maxlength","aria-invalid"],Sb={class:"bcm-hint"},Ib={class:"bcm-choices"},Cb={class:"bcm-choice"},Ab=["name"],Tb=["name","value"],$b={key:0,class:"bcm-error",role:"alert"},Ob={class:"bcm-row"},Eb=["disabled"],Mb=["disabled"],Nb=["aria-labelledby"],Pb={class:"bcm-row"},Rb=["id"],jb={key:0,class:"bcm-badge"},zb=["disabled"],Lb={key:0,class:"bcm-muted"},Db={key:1,class:"bcm-list"},Ub={key:0},Fb=["datetime"],qb=["href"],Hb=["aria-labelledby"],Vb=["id"],Bb={key:0,class:"bcm-muted"},Kb={key:1,class:"bcm-list"},Wb={key:0},Yb={key:1,class:"bcm-muted"},Gb={class:"bcm-muted"},Zb={key:2,class:"bcm-muted"},Jb={key:3,class:"bcm-muted"},Xb=["href"],Qb=["aria-labelledby"],eg=["id"],tg={key:0,class:"bcm-muted"},ng={key:1,class:"bcm-list"},sg={key:0},og={key:1},ig=["datetime"],rg={key:2,class:"bcm-muted"},ag=["aria-labelledby"],lg=["id"],cg={key:0,class:"bcm-muted"},ug={key:1,class:"bcm-list"},dg=["disabled","onClick"],fg=["aria-labelledby"],pg=["id"],mg={class:"bcm-row"},hg=["disabled"],bg={key:1},gg=["aria-labelledby"],yg=["id"],vg={class:"bcm-hint"},_g={class:"bcm-row"},kg=["disabled"],wg=["aria-labelledby"],xg=["id"],Sg={class:"bcm-row"},Ig=["disabled"],Cg={class:"bcm-hint"},Ag={class:"bcm-row"},Tg=["disabled"],$g={class:"bcm-sr","aria-live":"polite"},Og=Me({inheritAttrs:!1,__name:"MyCommunityView",props:{apiBase:{},siteBase:{},lang:{},decisionId:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=ve(Ss(t.lang,Is())),{t:o,text:s}=Mo(n),i=ct("bcm-panel"),a=ve(null),l=To(t.siteBase),c=l===null?null:$o(t.apiBase,t.transport,l),m=c?eh({client:c,lang:n.value}):null,u=m?.state??null,_=U(()=>Ao(Co(t.routes),u?.me?.links,l??"")),T=U(()=>!!t.decisionId),S=ve(!1),A=ve(null),v=po();Cn(()=>{if(!m)return;const H=th(v);H!==void 0&&(S.value=!0,m.loadNotice(H)),t.decisionId?m.loadStatement(t.decisionId):m.loadMember()}),Xe(()=>t.decisionId,(H,V)=>{!m||H===V||(H?m.loadStatement(H):u?.phase==="idle"&&m.loadMember())}),sn(()=>m?.dispose());const w=U(()=>{const H=u?.failure;if(!H)return"";const V=Re(H,n.value);return o(V.key,V.params)}),C=U(()=>{const H=u?.statement.failure;if(!H)return"";const V=Re(H,n.value);return o(V.key,V.params)}),E=U(()=>{const H=u?.notice.failure;if(!H)return"";const V=Re(H,n.value);return o(V.key,V.params)});function j(){return Gr(t.signInHref,typeof location>"u"?null:location.pathname)}const b=H=>ko(_.value.statementPath,H),I=H=>tt(`notification.${H.code}`),q=H=>tt(`restriction.${H}`),G=H=>tt(`category.${H}`),D=H=>tt(`caseStatus.${H}`),W=H=>{const V=u?.appeals.find($=>$.decisionId===H);return V?tt(`appealStatus.${V.status}`):null},Q=U(()=>u?.me?.acceptances.art9Consent??null),ae=U(()=>u?.me?.member??null),ge=U(()=>u?.me?.profile??null);function we(){m?.exportData(H=>Xm(H,Qm(o("panel.exportFileName"))))}async function X(){m&&(A.value==="consent"?await m.withdrawConsent():A.value==="erase"&&await m.erase(),A.value=null)}const Y=ve("");return Xe(()=>u?.announceId,()=>{Y.value="";const H=s(u?.announcement);We(()=>{Y.value=H})}),(H,V)=>r(m)&&r(u)?(h(),g("section",{key:0,class:"bcm bcm-panel",lang:n.value,"aria-labelledby":`${r(i)}-title`},[f("h2",{id:`${r(i)}-title`,ref_key:"heading",ref:a,tabindex:"-1"},p(T.value?r(o)("statement.title"):r(o)("panel.title")),9,Jh),S.value?(h(),g(K,{key:0},[r(u).notice.phase==="missing"?(h(),g("p",Xh,p(r(o)("notice.receiptMissing")),1)):r(u).notice.phase==="loading"?(h(),g("p",Qh,p(r(o)("common.loading")),1)):r(u).notice.phase==="failed"?(h(),g("p",eb,p(E.value),1)):r(u).notice.value?(h(),Ne(wh,{key:3,notice:r(u).notice.value,appeal:r(u).notice.appeal,withdrawing:!!r(u).busy.noticeWithdraw,onAppeal:V[0]||(V[0]=$=>r(m).fileNoticeAppeal()),onWithdraw:V[1]||(V[1]=$=>r(m).withdrawNoticeAppeal())},null,8,["notice","appeal","withdrawing"])):N("",!0)],64)):N("",!0),T.value?(h(),g(K,{key:1},[r(u).statement.phase==="loading"?(h(),g("p",tb,p(r(o)("common.loading")),1)):r(u).statement.phase==="signIn"?(h(),g("div",nb,[f("p",null,p(r(o)("panel.signIn")),1),j()?(h(),g("a",{key:0,class:"bcm-btn bcm-primary",href:j()??void 0},p(r(o)("common.signIn")),9,sb)):N("",!0)])):r(u).statement.phase==="failed"?(h(),g("p",ob,p(C.value),1)):r(u).statement.value?(h(),Ne(Gh,{key:3,statement:r(u).statement.value,appeal:r(u).statement.appeal,withdrawing:!!r(u).busy.withdraw,onAppeal:V[2]||(V[2]=$=>r(m).fileAppeal()),onWithdraw:V[3]||(V[3]=$=>r(m).withdrawAppeal())},null,8,["statement","appeal","withdrawing"])):N("",!0),f("p",null,[f("a",{href:_.value.myCommunityPath},p(r(o)("common.back")),9,ib)])],64)):(h(),g(K,{key:2},[r(u).phase==="loading"?(h(),g("p",rb,p(r(o)("common.loading")),1)):r(u).phase==="signIn"&&!S.value?(h(),g("div",ab,[f("p",null,p(r(o)("panel.signIn")),1),j()?(h(),g("a",{key:0,class:"bcm-btn bcm-primary",href:j()??void 0},p(r(o)("common.signIn")),9,lb)):N("",!0)])):r(u).phase==="failed"?(h(),g("p",cb,p(w.value),1)):r(u).phase==="ready"?(h(),g(K,{key:3},[ge.value&&ae.value?(h(),g("section",{key:0,class:"bcm-section","aria-labelledby":`${r(i)}-profile`},[f("h3",{id:`${r(i)}-profile`},p(r(o)("panel.profile")),9,db),r(u).profile?(h(),g("form",{key:1,class:"bcm-form bcm-card",novalidate:"",onSubmit:V[10]||(V[10]=Pt($=>r(m).saveProfile(),["prevent"]))},[f("div",gb,[f("label",{for:`${r(i)}-name`},p(r(o)("onboarding.displayName")),9,yb),_e(f("input",{id:`${r(i)}-name`,"onUpdate:modelValue":V[5]||(V[5]=$=>r(u).profile.displayName=$),class:"bcm-input",autocomplete:"nickname","aria-invalid":r(u).profile.fields.includes("displayName")},null,8,vb),[[Qe,r(u).profile.displayName]]),f("p",_b,p(r(o)("onboarding.displayNameHint")),1)]),f("div",kb,[f("label",{for:`${r(i)}-handle`},p(r(o)("onboarding.handle")),9,wb),_e(f("input",{id:`${r(i)}-handle`,"onUpdate:modelValue":V[6]||(V[6]=$=>r(u).profile.handle=$),class:"bcm-input",autocomplete:"username",autocapitalize:"none",spellcheck:"false",maxlength:r(xs),"aria-invalid":r(u).profile.fields.includes("handle")},null,8,xb),[[Qe,r(u).profile.handle]]),f("p",Sb,p(r(o)("onboarding.handleHint",{min:r(ia),max:r(xs),days:r(Mr)})),1)]),f("fieldset",Ib,[f("legend",null,p(r(o)("onboarding.avatar")),1),f("label",Cb,[_e(f("input",{"onUpdate:modelValue":V[7]||(V[7]=$=>r(u).profile.avatarPreset=$),type:"radio",name:`${r(i)}-avatar`,value:null},null,8,Ab),[[an,r(u).profile.avatarPreset]]),f("span",null,p(r(o)("onboarding.avatarNone")),1)]),(h(!0),g(K,null,ke(r(Ro),$=>(h(),g("label",{key:$.id,class:"bcm-choice"},[_e(f("input",{"onUpdate:modelValue":V[8]||(V[8]=J=>r(u).profile.avatarPreset=J),type:"radio",name:`${r(i)}-avatar`,value:$.id},null,8,Tb),[[an,r(u).profile.avatarPreset]]),f("span",null,p($.emoji),1)]))),128))]),r(u).profile.failure?(h(),g("p",$b,p(r(s)(r(Re)(r(u).profile.failure,n.value))),1)):N("",!0),f("div",Ob,[V[20]||(V[20]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn",disabled:r(u).profile.sending,onClick:V[9]||(V[9]=$=>r(m).cancelProfile())},p(r(o)("composer.cancel")),9,Eb),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:r(u).profile.sending},p(r(u).profile.sending?r(o)("composer.sending"):r(o)("composer.save")),9,Mb)])],32)):(h(),g("div",fb,[Ie(ha,{author:{kind:"member",memberId:ae.value.memberId,displayName:ge.value.displayName,avatarPreset:ge.value.avatarPreset}},null,8,["author"]),f("div",pb,[f("span",mb,p(ge.value.displayName),1),f("span",hb,p(ge.value.handle),1),f("div",bb,[f("button",{type:"button",class:"bcm-btn bcm-small",onClick:V[4]||(V[4]=$=>r(m).editProfile())},p(r(o)("panel.profileEdit")),1)])])]))],8,ub)):N("",!0),f("section",{class:"bcm-section","aria-labelledby":`${r(i)}-notifications`},[f("div",Pb,[f("h3",{id:`${r(i)}-notifications`},p(r(o)("panel.notifications")),9,Rb),r(m).unreadCount()>0?(h(),g("span",jb,p(r(o)("panel.unread",{count:r(m).unreadCount()})),1)):N("",!0),V[21]||(V[21]=f("span",{class:"bcm-spacer"},null,-1)),r(m).unreadCount()>0?(h(),g("button",{key:1,type:"button",class:"bcm-btn bcm-small",disabled:!!r(u).busy.markRead,onClick:V[11]||(V[11]=$=>r(m).markAllRead())},p(r(o)("panel.markRead")),9,zb)):N("",!0)]),r(u).notifications.length===0?(h(),g("p",Lb,p(r(o)("panel.notificationsEmpty")),1)):(h(),g("ul",Db,[(h(!0),g(K,null,ke(r(u).notifications,$=>(h(),g("li",{key:$.id,class:nt({"bcm-unread":$.readAt===null})},[I($)?(h(),g("p",Ub,p(r(o)(I($))),1)):N("",!0),f("time",{class:"bcm-time",datetime:$.createdAt},p(r(Pe)(n.value,$.createdAt)),9,Fb),$.decisionId&&b($.decisionId)?(h(),g("a",{key:1,href:b($.decisionId)??void 0},p(r(o)("sanction.statement")),9,qb)):N("",!0)],2))),128))]))],8,Nb),f("section",{class:"bcm-section","aria-labelledby":`${r(i)}-statements`},[f("h3",{id:`${r(i)}-statements`},p(r(o)("panel.statements")),9,Vb),r(u).decisions.length===0?(h(),g("p",Bb,p(r(o)("panel.statementsEmpty")),1)):(h(),g("ul",Kb,[(h(!0),g(K,null,ke(r(u).decisions,$=>(h(),g("li",{key:$.decisionId},[q($.restriction)?(h(),g("p",Wb,[f("strong",null,p(r(o)(q($.restriction))),1)])):N("",!0),G($.category)?(h(),g("p",Yb,p(r(o)(G($.category))),1)):N("",!0),f("p",Gb,p(r(o)("statement.decidedAt",{date:r(Pe)(n.value,$.decidedAt)})),1),W($.decisionId)?(h(),g("p",Zb,p(r(o)(W($.decisionId))),1)):$.canAppeal?(h(),g("p",Jb,p(r(o)("statement.appealUntil",{date:r(Pe)(n.value,$.appealWindowClosesAt)})),1)):N("",!0),b($.decisionId)?(h(),g("a",{key:4,href:b($.decisionId)??void 0},p(r(o)("sanction.statement")),9,Xb)):N("",!0)]))),128))]))],8,Hb),f("section",{class:"bcm-section","aria-labelledby":`${r(i)}-reports`},[f("h3",{id:`${r(i)}-reports`},p(r(o)("panel.reports")),9,eg),r(u).reports.length===0?(h(),g("p",tg,p(r(o)("panel.reportsEmpty")),1)):(h(),g("ul",ng,[(h(!0),g(K,null,ke(r(u).reports,$=>(h(),g("li",{key:$.caseId},[G($.category)?(h(),g("p",sg,[f("strong",null,p(r(o)(G($.category))),1)])):N("",!0),D($.status)?(h(),g("p",og,p(r(o)(D($.status))),1)):N("",!0),f("time",{class:"bcm-time",datetime:$.reportedAt},p(r(Pe)(n.value,$.reportedAt)),9,ig),$.decidedAt?(h(),g("p",rg,p(r(o)("statement.decidedAt",{date:r(Pe)(n.value,$.decidedAt)})),1)):N("",!0)]))),128))]))],8,Qb),ae.value?(h(),g("section",{key:1,class:"bcm-section","aria-labelledby":`${r(i)}-blocks`},[f("h3",{id:`${r(i)}-blocks`},p(r(o)("panel.blocks")),9,lg),r(u).blocks.length===0?(h(),g("p",cg,p(r(o)("panel.blocksEmpty")),1)):(h(),g("ul",ug,[(h(!0),g(K,null,ke(r(u).blocks,$=>(h(),g("li",{key:$.memberId,class:"bcm-row"},[f("span",null,p($.author.kind==="member"&&"displayName"in $.author&&$.author.displayName?$.author.displayName:r(o)("author.deleted")),1),V[22]||(V[22]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn bcm-small",disabled:!!r(u).busy[`block:${$.memberId}`],onClick:J=>r(m).unblock($.memberId)},p(r(o)("discussion.unblock")),9,dg)]))),128))]))],8,ag)):N("",!0),ae.value&&Q.value!==null?(h(),g("section",{key:2,class:"bcm-section","aria-labelledby":`${r(i)}-consents`},[f("h3",{id:`${r(i)}-consents`},p(r(o)("panel.consents")),9,pg),Q.value==="accepted"?(h(),g(K,{key:0},[f("p",null,p(r(o)("panel.art9Given")),1),f("div",mg,[f("button",{type:"button",class:"bcm-btn",disabled:!!r(u).busy.consent,onClick:V[12]||(V[12]=$=>A.value="consent")},p(r(o)("panel.art9Withdraw")),9,hg)])],64)):(h(),g("p",bg,p(r(o)("panel.art9NotGiven")),1))],8,fg)):N("",!0),ae.value?(h(),g("section",{key:3,class:"bcm-section","aria-labelledby":`${r(i)}-export`},[f("h3",{id:`${r(i)}-export`},p(r(o)("panel.export")),9,yg),f("p",vg,p(r(o)("panel.exportHint")),1),f("div",_g,[f("button",{type:"button",class:"bcm-btn",disabled:r(u).exporting,onClick:V[13]||(V[13]=$=>we())},p(r(u).exporting?r(o)("panel.exporting"):r(o)("panel.export")),9,kg)])],8,gg)):N("",!0),ae.value?(h(),g("section",{key:4,class:"bcm-section","aria-labelledby":`${r(i)}-erase`},[f("h3",{id:`${r(i)}-erase`},p(r(o)("panel.erase")),9,xg),r(m).erasing()?(h(),g(K,{key:0},[f("p",null,p(r(u).purgeAfter?r(o)("panel.eraseScheduled",{date:r(Pe)(n.value,r(u).purgeAfter)}):r(o)("notification.erasure_scheduled")),1),f("div",Sg,[f("button",{type:"button",class:"bcm-btn bcm-primary",disabled:!!r(u).busy.erase,onClick:V[14]||(V[14]=$=>r(m).cancelErase())},p(r(o)("panel.eraseCancel")),9,Ig)])],64)):(h(),g(K,{key:1},[f("p",Cg,p(r(o)("panel.eraseExplain")),1),f("div",Ag,[f("button",{type:"button",class:"bcm-btn bcm-danger",disabled:!!r(u).busy.erase,onClick:V[15]||(V[15]=$=>A.value="erase")},p(r(o)("panel.erase")),9,Tg)])],64))],8,wg)):N("",!0)],64)):N("",!0)],64)),f("p",$g,p(Y.value),1),A.value==="consent"?(h(),Ne(No,{key:3,title:"panel.art9WithdrawTitle",explain:"panel.art9WithdrawExplain",confirm:"panel.art9WithdrawConfirm",cancel:"panel.art9WithdrawCancel",busy:!!r(u).busy.consent,"fallback-focus":()=>a.value,onConfirm:V[16]||(V[16]=$=>X()),onCancel:V[17]||(V[17]=$=>A.value=null)},null,8,["busy","fallback-focus"])):N("",!0),A.value==="erase"?(h(),Ne(No,{key:4,title:"panel.eraseTitle",explain:"panel.eraseExplain",confirm:"panel.eraseConfirm",cancel:"panel.eraseKeep",danger:"",busy:!!r(u).busy.erase,"fallback-focus":()=>a.value,onConfirm:V[18]||(V[18]=$=>X()),onCancel:V[19]||(V[19]=$=>A.value=null)},null,8,["busy","fallback-focus"])):N("",!0)],8,Zh)):N("",!0)}});function Eg(e){const t=new AbortController,n={signal:t.signal},o=gt({target:e.target,category:"",ruleId:"",rules:null,description:"",name:"",email:"",goodFaith:!1,captcha:e.captcha?"loading":"off",token:null,resetSignal:0,sending:!1,failure:null,receipt:null,statusLink:null});let s=!1;const i=()=>o.category!==gu,a=()=>lt(et(o.description));function l(){const u=a();return!o.sending&&o.receipt===null&&o.target!==null&&o.category!==""&&u>0&&u<=ho&<(o.name.trim())<=$r&&o.goodFaith&&(o.captcha==="off"||o.captcha==="ready"&&o.token!==null)}function c(){s||(s=!0,e.client.legal.current({kind:"rules",locale:e.lang},n).then(u=>{o.rules=u.ok?go(u.value.bodyJson):[]}))}async function m(){if(!l()||!o.target||o.category==="")return;o.sending=!0,o.failure=null;const u={category:o.category,target:o.target,description:et(o.description),confirmations:[au]};o.category==="rules"&&o.ruleId!==""&&(u.ruleId=o.ruleId);const _=o.name.trim(),T=o.email.trim();i()&&(_!==""||T!=="")&&(u.notifier={name:_||null,email:T||null,locale:e.lang}),o.token!==null&&(u.turnstileToken=o.token),o.token=null;const S=await e.client.notices.submit(u,n);if(o.sending=!1,S.ok){o.receipt=S.value,o.statusLink=td(e.noticesPath,S.value.receipt),e.onSubmitted?.({contactKept:S.value.contactKept});return}o.failure=S,o.captcha!=="off"&&(o.resetSignal+=1)}return{state:o,contactAllowed:i,canSubmit:l,descriptionLength:a,setCategory(u){o.category=u,u!=="rules"?o.ruleId="":c()},setToken(u){o.token=u,u!==null&&o.captcha==="loading"&&(o.captcha="ready")},setCaptcha(u){o.captcha!=="off"&&(o.captcha=u)},submit:m,dispose(){t.abort()}}}const Mg="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit";let zn=null;function Ng(e){const t=window;return t.turnstile?Promise.resolve(t.turnstile):zn||(zn=new Promise((n,o)=>{const s=document.createElement("script");s.src=Mg,s.async=!0,s.defer=!0,e&&(s.nonce=e),s.onload=()=>t.turnstile?n(t.turnstile):o(new Error("[blogmcp-community] the Turnstile script loaded without its API")),s.onerror=()=>o(new Error("[blogmcp-community] the Turnstile script failed to load")),document.head.appendChild(s)}).catch(n=>{throw zn=null,n}),zn)}async function Pg(e,t){const n=await Ng(t.nonce),o=n.render(e,{sitekey:t.siteKey,action:ru,language:t.language,appearance:"interaction-only",callback:i=>t.onToken(i),"expired-callback":()=>t.onToken(null),"error-callback":()=>t.onToken(null),"timeout-callback":()=>t.onToken(null)});let s=!1;return{reset(){s||(t.onToken(null),n.reset(o))},remove(){s||(s=!0,n.remove(o))}}}const Rg=["lang","aria-labelledby"],jg=["id"],zg={key:0},Lg=["href"],Dg=["value","aria-label"],Ug={key:2,class:"bcm-note"},Fg={class:"bcm-field"},qg={class:"bcm-label"},Hg={class:"bcm-choices"},Vg=["name","value","checked","onChange"],Bg={key:0,class:"bcm-field"},Kg=["for"],Wg=["id"],Yg=["value"],Gg={class:"bcm-field"},Zg=["for"],Jg=["id","aria-describedby","aria-invalid"],Xg=["id"],Qg={key:1,class:"bcm-fieldset"},ey={class:"bcm-hint"},ty={class:"bcm-field"},ny=["for"],sy=["id","maxlength"],oy={class:"bcm-field"},iy=["for"],ry=["id","aria-invalid"],ay={key:2,class:"bcm-note"},ly={key:3,class:"bcm-turnstile"},cy={key:0,class:"bcm-error",role:"alert"},uy={class:"bcm-check"},dy={key:4,class:"bcm-error",role:"alert"},fy={class:"bcm-row"},py=["disabled"],my=["lang","aria-labelledby"],hy=["id"],by=["href"],gy=Me({inheritAttrs:!1,__name:"NoticeFormView",props:{apiBase:{},siteBase:{},lang:{},turnstileSiteKey:{},target:{},articleId:{},routes:{},transport:{type:Function}},setup(e){const t=e,n=po(),o=ve(Ss(t.lang,Is())),{t:s}=Mo(o),i=ct("bcm-notice"),a=ve(null),l=ve(null);function c(){const D=_s(t.target);return D||(t.articleId?_s({articleId:t.articleId}):typeof location>"u"?null:wd(location.hash))}const m=To(t.siteBase),u=U(()=>Ao(Co(t.routes),null,m??"")),_=Ks(null),T=m===null?null:$o(t.apiBase,t.transport,m),S=c(),A=!!T&&!S;A&&fn("notice-target","[blogmcp-community] <blogmcp-notice-form> has no target (a target, an article-id or the report link’s #c=…&s= fragment): it shows where a report starts instead of the form"),T&&S&&(_.value=Eg({client:T,lang:o.value,target:S,captcha:!!t.turnstileSiteKey,noticesPath:u.value.noticesPath,onSubmitted:D=>n?.dispatchEvent(new CustomEvent("bcm-notice-submitted",{detail:D,bubbles:!0,composed:!0}))}));const v=U(()=>_.value?.state??null),w=U(()=>v.value?.target?_d(v.value.target):null),C=U(()=>w.value==="message"?s("notice.targetMessage"):w.value==="article"?s("notice.targetArticle"):s("notice.targetProfile")),E=D=>`category.${D}`,j=U(()=>{const D=v.value?.failure;if(!D)return"";const W=Re(D,o.value);return s(W.key,W.params)}),b=U(()=>{const D=v.value?.statusLink;return D&&typeof location<"u"?`${location.origin}${D}`:D??""});let I=null,q=null,G=!1;return Cn(async()=>{const D=_.value;if(!(!D||!t.turnstileSiteKey||!n)){q=document.createElement("div"),q.slot="turnstile",n.appendChild(q);try{const W=n.nonce||n.getAttribute("nonce")||void 0,Q=await Pg(q,{siteKey:t.turnstileSiteKey,language:o.value,onToken:ae=>D.setToken(ae),nonce:W});if(G){Q.remove();return}I=Q,D.setCaptcha("ready")}catch{D.setCaptcha("unavailable")}}}),Xe(()=>v.value?.resetSignal,(D,W)=>{D!==void 0&&W!==void 0&&D!==W&&I?.reset()}),Xe(()=>v.value?.receipt,D=>{D&&(I?.remove(),I=null,We(()=>l.value?.focus()))}),sn(()=>{G=!0,I?.remove(),I=null,q?.remove(),q=null,_.value?.dispose()}),(D,W)=>_.value&&v.value?(h(),g("section",{key:0,class:"bcm bcm-notice",lang:o.value,"aria-labelledby":`${r(i)}-title`},[f("h2",{id:`${r(i)}-title`,ref_key:"heading",ref:a,tabindex:"-1"},p(r(s)("notice.title")),9,jg),v.value.receipt?(h(),g("div",{key:0,ref_key:"done",ref:l,class:"bcm-receipt",role:"status",tabindex:"-1"},[f("p",null,p(r(s)("notice.done")),1),f("p",null,p(r(s)("notice.receiptLede")),1),v.value.statusLink?(h(),g("p",zg,[f("a",{href:v.value.statusLink},p(r(s)("notice.statusLink")),9,Lg)])):N("",!0),b.value?(h(),g("input",{key:1,class:"bcm-input",readonly:"",value:b.value,"aria-label":r(s)("notice.statusLink"),onFocus:W[0]||(W[0]=Q=>Q.target.select())},null,40,Dg)):N("",!0),v.value.receipt.contactKept?N("",!0):(h(),g("p",Ug,p(r(s)("notice.noContactKept")),1))],512)):(h(),g("form",{key:1,class:"bcm-form",novalidate:"",onSubmit:W[6]||(W[6]=Pt(Q=>_.value.submit(),["prevent"]))},[f("p",null,p(r(s)("notice.lede")),1),f("div",Fg,[f("span",qg,p(r(s)("notice.target")),1),f("span",null,p(C.value),1)]),f("fieldset",Hg,[f("legend",null,p(r(s)("notice.category")),1),(h(!0),g(K,null,ke(r(Nr),Q=>(h(),g("label",{key:Q,class:"bcm-choice"},[f("input",{type:"radio",name:`${r(i)}-category`,value:Q,checked:v.value.category===Q,onChange:ae=>_.value.setCategory(Q)},null,40,Vg),f("span",null,p(r(s)(E(Q))),1)]))),128))]),v.value.category==="rules"&&v.value.rules&&v.value.rules.length?(h(),g("div",Bg,[f("label",{for:`${r(i)}-rule`},p(r(s)("notice.rule")),9,Kg),_e(f("select",{id:`${r(i)}-rule`,"onUpdate:modelValue":W[1]||(W[1]=Q=>v.value.ruleId=Q),class:"bcm-input"},[W[7]||(W[7]=f("option",{value:""},null,-1)),(h(!0),g(K,null,ke(v.value.rules,Q=>(h(),g("option",{key:Q.id,value:Q.id},p(Q.title),9,Yg))),128))],8,Wg),[[gr,v.value.ruleId]])])):N("",!0),f("div",Gg,[f("label",{for:`${r(i)}-description`},p(r(s)("notice.description")),9,Zg),_e(f("textarea",{id:`${r(i)}-description`,"onUpdate:modelValue":W[2]||(W[2]=Q=>v.value.description=Q),class:"bcm-input bcm-textarea",rows:"5","aria-describedby":`${r(i)}-description-hint`,"aria-invalid":_.value.descriptionLength()>r(ho)},null,8,Jg),[[Qe,v.value.description]]),f("p",{id:`${r(i)}-description-hint`,class:"bcm-hint"},p(r(s)("notice.descriptionHint"))+" "+p(r(s)("notice.counter",{length:_.value.descriptionLength(),max:r(ho)})),9,Xg)]),_.value.contactAllowed()?(h(),g("fieldset",Qg,[f("legend",null,p(r(s)("notice.contactTitle")),1),f("p",ey,p(r(s)("notice.contactHint")),1),f("div",ty,[f("label",{for:`${r(i)}-name`},p(r(s)("notice.name")),9,ny),_e(f("input",{id:`${r(i)}-name`,"onUpdate:modelValue":W[3]||(W[3]=Q=>v.value.name=Q),class:"bcm-input",autocomplete:"name",maxlength:r($r)},null,8,sy),[[Qe,v.value.name]])]),f("div",oy,[f("label",{for:`${r(i)}-email`},p(r(s)("notice.email")),9,iy),_e(f("input",{id:`${r(i)}-email`,"onUpdate:modelValue":W[4]||(W[4]=Q=>v.value.email=Q),class:"bcm-input",type:"email",autocomplete:"email","aria-invalid":!!v.value.failure?.fields?.includes("notifier.email")},null,8,ry),[[Qe,v.value.email]])])])):(h(),g("p",ay,p(r(s)("notice.childAtRisk")),1)),v.value.captcha!=="off"?(h(),g("div",ly,[Ml(D.$slots,"turnstile"),v.value.captcha==="unavailable"?(h(),g("p",cy,p(r(s)("notice.captchaUnavailable")),1)):N("",!0)])):N("",!0),f("label",uy,[_e(f("input",{"onUpdate:modelValue":W[5]||(W[5]=Q=>v.value.goodFaith=Q),type:"checkbox"},null,512),[[mo,v.value.goodFaith]]),f("span",null,p(r(s)("confirm.good_faith")),1)]),j.value?(h(),g("p",dy,p(j.value),1)):N("",!0),f("div",fy,[W[8]||(W[8]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!_.value.canSubmit()},p(v.value.sending?r(s)("notice.sending"):r(s)("notice.submit")),9,py)])],32))],8,Rg)):r(A)?(h(),g("section",{key:1,class:"bcm bcm-notice",lang:o.value,"aria-labelledby":`${r(i)}-title`},[f("h2",{id:`${r(i)}-title`},p(r(s)("notice.title")),9,hy),f("p",null,p(r(s)("notice.noTarget")),1),f("p",null,[f("a",{href:u.value.rulesPath},p(r(s)("onboarding.rulesTitle")),9,by)])],8,my)):N("",!0)}}),yy=':host{all:initial;display:block;--bcm-bg: #ffffff;--bcm-fg: #1d1f23;--bcm-muted: #5f6672;--bcm-line: #dfe2e7;--bcm-soft: #f4f5f7;--bcm-accent: #2457d6;--bcm-accent-fg: #ffffff;--bcm-danger: #b42318;--bcm-ok: #1f7a3f;--bcm-warn-bg: #fff6d6;--bcm-shadow: 0 8px 28px rgba(16, 24, 40, .18);--bcm-z: 20;color-scheme:light dark;font:var(--bcm-font-size, 16px) / 1.5 var(--bcm-font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);color:var(--bcm-fg)}:host([hidden]){display:none}@media(prefers-color-scheme:dark){:host{--bcm-bg: #1c1f24;--bcm-fg: #eceef1;--bcm-muted: #a4abb6;--bcm-line: #343943;--bcm-soft: #262a31;--bcm-accent: #6d93ff;--bcm-accent-fg: #0d1117;--bcm-danger: #ff8a7a;--bcm-ok: #6fd08e;--bcm-warn-bg: #3a3420;--bcm-shadow: 0 8px 28px rgba(0, 0, 0, .5)}}*{box-sizing:border-box}h2,h3,h4{margin:0;font-weight:650;line-height:1.3}h2{font-size:1.25em}h3{font-size:1.05em}h4{font-size:1em}p{margin:0}ul,ol{margin:0;padding:0}a{color:var(--bcm-accent)}.bcm{background:var(--bcm-bg);color:var(--bcm-fg);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:16px;max-width:100%;overflow-wrap:anywhere}.bcm-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.bcm-btn{font:inherit;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:6px 14px;border-radius:8px;border:1px solid var(--bcm-line);background:var(--bcm-bg);color:var(--bcm-fg);cursor:pointer;text-decoration:none}.bcm-btn:hover:not(:disabled){background:var(--bcm-soft)}.bcm-btn:disabled{opacity:.55;cursor:default}.bcm-primary{background:var(--bcm-accent);border-color:var(--bcm-accent);color:var(--bcm-accent-fg)}.bcm-primary:hover:not(:disabled){background:var(--bcm-accent);filter:brightness(1.08)}.bcm-danger{color:var(--bcm-danger)}.bcm-primary.bcm-danger{background:var(--bcm-danger);border-color:var(--bcm-danger);color:var(--bcm-bg)}.bcm-small{min-height:30px;padding:2px 10px;font-size:.875em}.bcm-link{font:inherit;border:0;background:none;padding:0;color:var(--bcm-accent);cursor:pointer;text-align:left;text-decoration:underline}.bcm-quiet{font:inherit;border:0;background:none;padding:4px 6px;color:var(--bcm-muted);cursor:pointer;border-radius:6px;min-height:30px}.bcm-quiet:hover:not(:disabled){background:var(--bcm-soft);color:var(--bcm-fg)}.bcm-btn:focus-visible,.bcm-link:focus-visible,.bcm-quiet:focus-visible,.bcm-input:focus-visible,.bcm-react:focus-visible,a:focus-visible,.bcm-choice input:focus-visible+span{outline:2px solid var(--bcm-accent);outline-offset:2px}.bcm-input{font:inherit;width:100%;padding:8px 10px;border-radius:8px;border:1px solid var(--bcm-line);background:var(--bcm-bg);color:var(--bcm-fg)}.bcm-input[aria-invalid=true]{border-color:var(--bcm-danger);border-width:2px}.bcm-textarea{resize:vertical;min-height:96px}.bcm-field{display:flex;flex-direction:column;gap:4px}.bcm-field>label,.bcm-label{font-weight:600}.bcm-check{display:flex;gap:8px;align-items:flex-start}.bcm-check input{margin-top:.3em;width:18px;height:18px;flex:none}.bcm-choices{display:flex;flex-wrap:wrap;gap:8px;border:0;margin:0;padding:0;min-width:0}.bcm-choices legend,.bcm-fieldset legend{font-weight:600;padding:0;margin-bottom:6px}.bcm-fieldset{border:0;margin:0;padding:0;min-width:0;display:flex;flex-direction:column;gap:8px}.bcm-choice{position:relative;display:inline-flex}.bcm-choice input{position:absolute;opacity:0;width:1px;height:1px}.bcm-choice span{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;min-width:40px;padding:6px 12px;border:1px solid var(--bcm-line);border-radius:999px;cursor:pointer;background:var(--bcm-bg)}.bcm-choice input:checked+span{border:2px solid var(--bcm-accent);font-weight:650}.bcm-choice input:checked+span:before{content:"✓"}.bcm-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.bcm-spacer{flex:1}.bcm-full{flex-basis:100%}.bcm-muted,.bcm-hint{color:var(--bcm-muted);font-size:.875em}.bcm-error{color:var(--bcm-danger)}.bcm-ok{color:var(--bcm-ok)}.bcm-note{background:var(--bcm-soft);border-radius:8px;padding:8px 12px;font-size:.9375em}.bcm-warning{background:var(--bcm-warn-bg);border-radius:8px;padding:8px 12px;font-size:.9375em}.bcm-banner{background:var(--bcm-warn-bg);border-radius:10px;padding:10px 12px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.bcm-text{white-space:pre-wrap;overflow-wrap:anywhere}.bcm-facts{font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;background:var(--bcm-soft);border-radius:8px;padding:10px 12px}.bcm-badge{display:inline-flex;align-items:center;gap:4px;border:1px solid currentColor;border-radius:999px;padding:0 8px;font-size:.8125em;line-height:1.6}.bcm-badge-team{color:var(--bcm-accent);font-weight:650}.bcm-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}.bcm-count{color:var(--bcm-muted)}.bcm-thread,.bcm-replies{list-style:none;display:flex;flex-direction:column;gap:12px}.bcm-replies{margin-top:12px;padding-left:20px;border-left:2px solid var(--bcm-line)}.bcm-msg{display:flex;gap:10px;align-items:flex-start}.bcm-msg-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}.bcm-msg-pending{opacity:.65}.bcm-meta{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;font-size:.875em}.bcm-author{font-weight:650}.bcm-handle,.bcm-time{color:var(--bcm-muted)}.bcm-handle:before{content:"@"}.bcm-placeholder{color:var(--bcm-muted);font-style:italic}.bcm-own-state{border-left:3px solid var(--bcm-line);padding-left:10px;display:flex;flex-direction:column;gap:4px}.bcm-actions{display:flex;align-items:center;flex-wrap:wrap;gap:2px 6px}.bcm-avatar{flex:none;width:36px;height:36px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:var(--bcm-soft);font-size:20px;line-height:1;-webkit-user-select:none;user-select:none}.bcm-avatar-initial{color:#fff;font-size:16px;font-weight:650}.bcm-reactions{display:flex;flex-wrap:wrap;gap:6px}.bcm-react{font:inherit;display:inline-flex;align-items:center;gap:4px;min-height:32px;padding:2px 10px;border-radius:999px;border:1px solid var(--bcm-line);background:var(--bcm-bg);color:var(--bcm-fg);cursor:pointer}button.bcm-react:hover:not(:disabled){background:var(--bcm-soft)}.bcm-react[aria-pressed=true]{border:2px solid var(--bcm-accent);font-weight:700}span.bcm-react{cursor:default}.bcm-menu{position:relative;display:inline-flex}.bcm-menu-list{position:absolute;right:0;top:calc(100% + 4px);z-index:var(--bcm-z);min-width:200px;display:flex;flex-direction:column;padding:4px;background:var(--bcm-bg);border:1px solid var(--bcm-line);border-radius:10px;box-shadow:var(--bcm-shadow)}.bcm-menu-list button,.bcm-menu-list a{font:inherit;text-align:left;border:0;background:none;color:var(--bcm-fg);padding:8px 10px;border-radius:6px;cursor:pointer;text-decoration:none;min-height:36px}.bcm-menu-list button:hover,.bcm-menu-list a:hover{background:var(--bcm-soft)}.bcm-composer{display:flex;flex-direction:column;gap:8px}.bcm-composer-foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.bcm-counter{color:var(--bcm-muted);font-size:.8125em;font-variant-numeric:tabular-nums}.bcm-counter-over{color:var(--bcm-danger);font-weight:650}.bcm-confirm{border:2px solid var(--bcm-accent);border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:10px}.bcm-card{border:1px solid var(--bcm-line);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:12px}.bcm-steps{color:var(--bcm-muted);font-size:.875em}.bcm-rules{list-style:none;display:flex;flex-direction:column;gap:8px}.bcm-rules li{display:flex;flex-direction:column;gap:2px}.bcm-consent{max-height:260px;overflow:auto;border:1px solid var(--bcm-line);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:8px}.bcm-form{display:flex;flex-direction:column;gap:14px}.bcm-section{display:flex;flex-direction:column;gap:10px}.bcm-list{list-style:none;display:flex;flex-direction:column;gap:8px}.bcm-list>li{border:1px solid var(--bcm-line);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:4px}.bcm-unread{border-left:4px solid var(--bcm-accent)!important}.bcm-dl{display:grid;grid-template-columns:minmax(120px,max-content) 1fr;gap:6px 14px;margin:0}.bcm-dl dt{font-weight:600}.bcm-dl dd{margin:0}.bcm-receipt{display:flex;flex-direction:column;gap:8px}.bcm-turnstile{min-height:0}.bcm-dialog{border:1px solid var(--bcm-line);border-radius:14px;padding:0;width:min(520px,calc(100vw - 32px));max-height:calc(100vh - 32px);background:var(--bcm-bg);color:var(--bcm-fg);box-shadow:var(--bcm-shadow)}.bcm-dialog::backdrop{background:#0a0c1073}.bcm-dialog-body{padding:16px;display:flex;flex-direction:column;gap:12px}@media(max-width:480px){.bcm{padding:12px;border-radius:0}.bcm-replies{padding-left:12px}.bcm-avatar{width:30px;height:30px;font-size:17px}.bcm-dl{grid-template-columns:1fr}.bcm-dialog{width:100vw;max-width:100vw;margin:auto 0 0;border-radius:16px 16px 0 0}}@media(prefers-reduced-motion:no-preference){.bcm-dialog[open]{animation:bcm-in .14s ease-out}@keyframes bcm-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}}';function vy(){const e=globalThis,t={__VUE_OPTIONS_API__:!0,__VUE_PROD_DEVTOOLS__:!1,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__:!1};for(const[n,o]of Object.entries(t))typeof e[n]>"u"&&(e[n]=o)}const _a="blogmcp-discussion",ka="blogmcp-notice-form",wa="blogmcp-my-community";function _y(e){const t=e.nonce;return typeof t=="string"&&t!==""?t:e.getAttribute("nonce")||void 0}function ky(e,t){const n=zc(e);return class extends n{connectedCallback(){const s=_y(this),i=t||s;i&&!s&&(this.nonce=i);const a=this.shadowRoot;if(a&&!a.querySelector("style[data-bcm]")){const l=document.createElement("style");l.setAttribute("data-bcm",""),i&&l.setAttribute("nonce",i),l.textContent=yy,a.prepend(l)}super.connectedCallback()}}}function Lo(e,t,n){typeof customElements>"u"||customElements.get(e)||(vy(),customElements.define(e,ky(t,n)))}function xa(e={}){Lo(e.tag??_a,Jm,e.nonce)}function Sa(e={}){Lo(e.tag??ka,gy,e.nonce)}function Ia(e={}){Lo(e.tag??wa,Og,e.nonce)}function Ca(e={}){xa({tag:e.tags?.discussion,nonce:e.nonce}),Sa({tag:e.tags?.noticeForm,nonce:e.nonce}),Ia({tag:e.tags?.myCommunity,nonce:e.nonce})}function Do(e,t){for(const[n,o]of Object.entries(t))o!=null&&o!==""&&e.setAttribute(n,String(o))}function Uo(e,t){return t.transport&&(e.transport=t.transport),(t.container??document.body).appendChild(e),()=>e.remove()}function wy(e){if(typeof document>"u")return()=>{};xa({nonce:e.nonce});const t=document.createElement(_a);return Do(t,{"article-id":e.articleId,"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,"sign-in-href":e.signInHref,routes:e.routes?JSON.stringify(e.routes):void 0,"poll-ms":e.pollMs,nonce:e.nonce}),Uo(t,e)}function xy(e){if(typeof document>"u")return()=>{};Sa({nonce:e.nonce});const t=document.createElement(ka);return Do(t,{"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,"turnstile-site-key":e.turnstileSiteKey,target:e.target?JSON.stringify(e.target):void 0,"article-id":e.articleId,routes:e.routes?JSON.stringify(e.routes):void 0,nonce:e.nonce}),Uo(t,e)}function Sy(e={}){if(typeof document>"u")return()=>{};Ia({nonce:e.nonce});const t=document.createElement(wa);return Do(t,{"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,"decision-id":e.decisionId,routes:e.routes?JSON.stringify(e.routes):void 0,"sign-in-href":e.signInHref,nonce:e.nonce}),Uo(t,e)}const Iy="0.1.0",Cy=typeof document<"u"?document.currentScript:null;return Ca({nonce:Cy?.nonce||void 0}),zt.VERSION=Iy,zt.defineCommunityElements=Ca,zt.mountDiscussion=wy,zt.mountMyCommunity=Sy,zt.mountNoticeForm=xy,Object.defineProperty(zt,Symbol.toStringTag,{value:"Module"}),zt})({});
|
|
9
|
+
`).replace(/<[^>]*>/g,"");return ih(t).split(/\n{2,}/).map(n=>n.replace(/ *\n */g,`
|
|
10
|
+
`).replace(/[ ]{2,}/g," ").trim()).filter(n=>n!=="")}function ys(e){return typeof e=="string"?e.normalize("NFKC").replace(/\s+/gu," ").trim():""}function Kl(e){const t=lt(ys(e));return t>=Cf&&t<=Na}const Wl=3,_s=30;function Qn(e){return typeof e=="string"?e.trim().toLowerCase():""}function Yl(e){const t=Qn(e);return t===""||yo.test(t)}const ch=Object.freeze({ß:"ss",ł:"l",đ:"d",ð:"d",ø:"o",ħ:"h",ŧ:"t",ı:"i",æ:"ae",œ:"oe",þ:"th",ŀ:"l"});function uh(e){const s=ys(e).toLowerCase().normalize("NFD").replace(new RegExp("\\p{M}+","gu"),"").normalize("NFC").replace(/[ßłđðøħŧıæœþŀ]/g,o=>ch[o]??o).split(/[^a-z0-9]+/).filter(o=>o!=="").join("_").slice(0,24).replace(/_+$/,"");return yo.test(s)?s:null}const dh=new Set(["displayName","handle","avatarPreset"]),fh=new Set(["rulesTextId","art9TextId"]),mh="art9_refusal_read_only",Gl=e=>e.code==="invalid"&&e.issueCodes?.includes(mh)===!0;function ph(e,t){return Gl(e)?{key:"onboarding.art9RequiredToWrite"}:Ie(e,t)}function hh(e,t,n,s){const o=[];e.member?.ageBand||o.push("age"),e.acceptances.rules!=="accepted"&&o.push("rules");const r=e.acceptances.art9Consent,a=e.acceptances.art9Refused===!0&&qa(e.settings?.art9Refusal)==="public_write",l=s&&r!=="accepted"&&!a;return(t.includes("art9_consent")||n&&r!==null&&r!=="accepted"||l)&&o.push("art9"),e.profile||o.push("profile"),o}function bh(e,t){if(!e)return[];const n=Yf(e.bodyJson);return t==="split"&&n.length>1?n.map(s=>({entity:s.entity,label:s.label})):[{entity:n[0]?.entity??"",label:n.length>1?"":n[0]?.label??""}]}function ks(e){const t=e.signal?{signal:e.signal}:{},n=e.offerArt9===!0,s=e.forceArt9===!0&&!n,o=Re({phase:"loading",steps:[],index:0,me:null,rulesText:null,rules:[],art9Text:null,art9Paragraphs:[],art9Layout:"joint",art9Refusal:"read_only",art9Controllers:[],art9Refused:!1,art9RefusedSent:!1,reconsent:!1,ageBand:null,rulesAccepted:!1,get art9Accepted(){return this.art9Controllers.length>0&&this.art9Controllers.every(k=>k.accepted)},set art9Accepted(k){for(const O of this.art9Controllers)O.accepted=k},displayName:"",handle:"",avatarPreset:null,failure:null,fields:[],minAge:null}),r=k=>{o.failure=k,o.phase="failed"};async function a(k){const[O,w]=await Promise.all([k.includes("rules")?e.client.legal.current({kind:"rules",locale:e.lang},t):null,k.includes("art9")?e.client.legal.current({kind:"art9_consent",locale:e.lang},t):null]);for(const y of[O,w])if(y&&!y.ok)return r(y),null;return{rules:O?.ok?O.value:null,art9:w?.ok?w.value:null}}async function l(){const k=await e.client.me.get(t);if(!k.ok)return r(k),null;const O=k.value.needs.filter(Wn);if(O.includes("sign_in"))return e.onSignIn(),null;const w=hh(k.value,O,n,s),y=await a(w);return y?{me:k.value,steps:w,texts:y}:null}const c=()=>!n&&o.art9Refusal==="public_write";function p(k){k.texts.rules?.textId!==o.rulesText?.textId&&(o.rulesAccepted=!1);const O=Kf(k.me.settings?.art9ConsentLayout),w=k.texts.art9!==null&&k.texts.art9.textId===o.art9Text?.textId;o.art9Controllers=bh(k.texts.art9,O).map((y,x)=>{const N=o.art9Controllers[x];return{...y,accepted:w&&N?.entity===y.entity&&N.accepted===!0}}),o.art9Layout=O,o.art9Refusal=qa(k.me.settings?.art9Refusal),(!w||!c())&&(o.art9Refused=!1),o.me=k.me,o.steps=k.steps,o.reconsent=k.me.acceptances.rules==="reconsent_required",o.rulesText=k.texts.rules,o.rules=k.texts.rules?Gn(k.texts.rules.bodyJson):[],o.art9Text=k.texts.art9,o.art9Paragraphs=k.texts.art9?lh(k.texts.art9.body):[]}async function h(){o.phase="loading",o.failure=null;const k=await l();if(k){if(p(k),o.index=0,k.steps.length===0){if(n){o.phase="done",e.onDone(k.me);return}return j()}o.phase="ready"}}const b=()=>o.steps[o.index]??null;function _(k){switch(k){case"age":return o.ageBand!==null;case"rules":return o.rulesAccepted&&o.rulesText!==null;case"art9":return o.art9Text!==null&&(o.art9Accepted||o.art9Refused&&c());case"profile":return Kl(o.displayName)&&Yl(o.handle)}}function $(){const k=b();return o.phase!=="ready"||k===null?!1:k==="art9"?o.art9Text!==null&&o.art9Accepted:_(k)}function v(k){const O=o.steps.indexOf(k);O>=0&&(o.index=O)}const I=()=>o.steps.findIndex(k=>!_(k));async function j(){const k=I();if(k>=0){o.index=k;return}o.phase="sending",o.failure=null,o.fields=[];const O={ageBand:o.ageBand??o.me?.member?.ageBand??"18_plus",rulesTextId:o.steps.includes("rules")&&o.rulesText?o.rulesText.textId:""};let w=!1;if(o.steps.includes("art9")&&o.art9Text&&(o.art9Accepted?O.art9TextId=o.art9Text.textId:o.art9Refused&&c()&&(O.art9Refused=!0,w=!0)),o.steps.includes("profile")){O.displayName=ys(o.displayName);const x=Qn(o.handle);x!==""&&(O.handle=x),O.avatarPreset=o.avatarPreset}const y=await e.client.me.onboard(O,t);if(y.ok){o.art9RefusedSent=w,o.phase="done",e.onDone(y.value);return}switch(o.failure=y,o.phase="ready",y.code){case"age":o.minAge=18,o.phase="refused",e.onRefused?.(o.minAge);return;case"name":return o.fields=Qn(o.handle)!==""?["displayName","handle"]:["displayName"],v("profile");case"handle":return o.fields=["handle"],v("profile");case"invalid":return o.fields=y.fields??[],Gl(y)||o.fields.includes("art9Refused")?(o.art9Refused=!1,P(y)):o.fields.some(x=>dh.has(x))?v("profile"):o.fields.some(x=>fh.has(x))?P(y):o.fields.includes("ageBand")?v("age"):void 0;case"signIn":return e.onSignIn();default:return}}async function P(k){const O=[...o.fields];o.phase="sending";const w=await l();if(!w)return;p(w),O.includes("rulesTextId")&&(o.rulesAccepted=!1),O.includes("art9TextId")&&(o.art9Accepted=!1),o.failure=k,o.fields=O;const y=I();if(y>=0){o.index=y,o.phase="ready";return}if(w.me.needs.filter(Wn).length===0){o.phase="done",e.onDone(w.me);return}r(k)}async function T(){if(o.failure=null,o.index<o.steps.length-1){o.index+=1;return}await j()}const g=()=>o.phase==="ready"&&b()==="art9"&&o.art9Text!==null&&c();return{state:o,load:h,step:b,isLast:()=>o.index>=o.steps.length-1,canContinue:$,async next(){$()&&(b()==="art9"&&o.art9Accepted&&(o.art9Refused=!1),await T())},canRefuse:g,async refuse(){g()&&(o.art9Accepted=!1,o.art9Refused=!0,await T())},refusalOffered:c,back(){o.phase!=="ready"||o.index===0||(o.failure=null,o.index-=1,b()==="art9"&&(o.art9Refused=!1))},suggestedHandle:()=>Qn(o.handle)===""?uh(o.displayName):null,hasFieldError:k=>o.fields.includes(k)}}const ji=(e="")=>({body:e,sending:!1,failure:null,confirm:null,waitUntil:null,clientMsgId:null}),Zl=Object.freeze({counts:Object.freeze({}),mine:null}),Jl=()=>typeof document>"u"||document.visibilityState!=="hidden",gh=1;function vh(e){return Xl(e,{kind:"article",id:e.articleId.toLowerCase()},e.realtime??null)}function yh(e){return Xl(e,{kind:"topic",id:e.conversationId.toLowerCase()},e.realtime??null)}function Xl(e,t,n){const{client:s,lang:o}=e,r=t.kind==="topic",a=t.id,l=r?"forum":"article_discussions",c=e.now??Date.now,p=r?null:ol(),h=r?Hm():null,b=p??h,_=new AbortController,$={signal:_.signal},v=Re({phase:"loading",failure:null,thread:b.getState(),loadingMore:!1,refreshing:!1,newMessages:!1,me:null,block:null,composer:ji(),inline:null,report:null,announcement:null,announceId:0,clock:c(),busy:{},refusedAge:e.refusedAge??null,art9RefusedNote:!1,realtimeOff:!1}),I=b.subscribe(C=>{v.thread=C}),j=Bt(null);let P=!1,T=null,g=null,k=!0,O=!1,w=0,y=null,x=null,N=null,M=null,E=null;const B=e.pollMs??2e4;function ee(C){v.announcement=C,v.announceId+=1}function re(){v.phase="hidden",T?.stop(),T=null,g?.stop(),g=null}function be(C=!1){return v.me&&!C?Promise.resolve():(x??=s.me.get($).then(L=>{x=null,!(!L.ok||O)&&(v.me=L.value,D())}),x)}const we=C=>bl(C?.module,l)?.brake??null;function K(C){const L=C?.module;if(!L)return null;const le=L.brake?L.brake.until:Yn(L.state)&&L.state==="braked"?L.until:void 0,fe=typeof le=="string"?Date.parse(le):NaN,qe=we(C),Zt=qe?Date.parse(qe.until):NaN,to=[fe,Zt].filter(Ss=>Number.isFinite(Ss));return to.length>0?Math.max(...to):null}function D(){if(M&&clearTimeout(M),M=null,O)return;const C=[];if(S()){const fe=K(v.me);fe!==null&&C.push(fe)}if(v.block==="braked"&&E!==null&&C.push(E),C.length===0)return;const L=Math.max(...C)-c(),le=L>0?Math.min(L+1e3,2147e6):3e4;M=setTimeout(()=>{M=null,!O&&(U(),be(!0))},le)}function U(){v.block==="braked"&&(E!==null&&E>c()||(v.block=null,E=null))}function Le(){const C=b.getState();C.viewer.canPost||Gt(C).any||C.viewer.restrictions.length>0||r&&(C.viewer.memberId===null||!Ne())||be(v.block===null).then(()=>{const L=v.me;if(!(O||!L||b.getState().viewer.canPost)&&!S()){if(r){v.block=Yn(L.module?.state)&&L.module?.state==="read_only"?"readOnly":L.member&&L.member.status!=="active"?"restricted":null;return}v.block=!L.member||L.member.status==="active"?"notMoved":"restricted"}})}const Ne=()=>!r||Vm(h.getState().topic);function De(){const C=b.getState(),L=v.block==="braked"||S();C.viewer.canPost&&v.block!=="braked"&&(v.block=null),L&&U(),C.viewer.memberId!==null&&be(L),Le(),j.value&&!Gt(C).any&&j.value.state.phase!=="sending"&&(j.value=null)}function Qe(C){if(C.code==="surfaceOff")return re();if(r&&(C.code==="membersOnly"||C.code==="notFound")){T?.stop(),T=null,g?.stop(),g=null,v.phase=C.code,v.failure=C;return}if(C.code==="notFound"&&v.phase!=="ready")return Ft("not-found","[blogmcp-community] the discussion of this article-id was not found (no such live article, or it is not readable here)"),re();(v.phase==="loading"||v.phase==="failed")&&(v.phase="failed",v.failure=C)}const oe=C=>r?(C?Gm:fl)(h,s,{conversationId:a,languageCode:o},$):(C?Mm:Em)(p,s,{articleId:a,languageCode:o},$);function Z(){return O?Promise.resolve():(y??=(async()=>{v.refreshing=!0;const C=await oe(!1);v.refreshing=!1,!O&&(w=c(),C.ok?(v.phase="ready",v.failure=null,v.newMessages=!1,De()):Qe(C))})().finally(()=>{y=null}),y)}async function J(){if(v.loadingMore||v.thread.nextCursor===null)return;v.loadingMore=!0;const C=await oe(!0);if(v.loadingMore=!1,!(O||C.ok)){if(C.code==="surfaceOff")return re();if(r&&(C.code==="membersOnly"||C.code==="notFound"))return Qe(C);ee(Ie(C,o))}}const W=C=>{const L=r?C?.conversationId:C?.articleId;return typeof L=="string"?L.toLowerCase():null},pe=C=>r?h.applyHead(C):p.applyHead(C);function qt(C){for(const L of C){if(W(L)!==a)continue;if(v.phase==="failed"){Z();continue}const le=b.getState(),fe=typeof L.lastSeq=="number"&&L.lastSeq>le.lastSeq;pe(L)&&(fe&&le.loaded?v.newMessages=!0:Z())}}function Pt(){if(T||B===0||O||v.phase==="hidden")return;const C={intervalMs:B,visible:()=>Jl()&&k,onChange:qt,onFailure:L=>{L.code==="surfaceOff"?re():r&&L.code==="membersOnly"&&Qe(L)},signal:_.signal};T=r?Lm(s,[a],C):zm(s,[a],C)}async function Cs(C){if(!(g||O||v.phase==="hidden")){if(Gt(b.getState()).signIn)return Pt();if(await be(),!(O||g||v.phase==="hidden")){if(v.me?.module&&v.me.module.features.realtime!==!0)return Pt();try{g=C({client:s,store:p??h,languageCode:o,visible:()=>Jl()&&k,...B>0?{pollIntervalMs:B}:{},onMode:L=>{O||(L==="polling"&&!v.realtimeOff?v.realtimeOff=!0:L==="live"&&v.realtimeOff&&(v.realtimeOff=!1))}})}catch{Ft("realtime","[blogmcp-community] the realtime property is not a session factory (createRealtimeSession of @blogmcp/sdk/community/realtime): the discussion polls"),g=null,Pt()}}}}function S(){const C=v.me?.module;return C?C.brake!==void 0||Yn(C.state)&&C.state==="braked"||we(v.me)!==null:!1}function R(){const C=v.thread,L=Gt(C);if(L.signIn)return"signIn";if(r){if(C.viewer.memberId===null)return"none";if(!Ne())return"locked";if(v.block==="readOnly")return"readOnly"}return v.block==="notMoved"?"notMoved":v.block==="braked"||S()?"braked":!C.viewer.canPost&&C.viewer.restrictions.length>0?"sanction":L.any?v.refusedAge!==null&&!j.value?"ageRefused":"onboarding":j.value&&P?"onboarding":v.block==="restricted"?"restricted":C.viewer.canPost?"write":"pending"}function F(){const C=v.me,L=C?.caps?.mentionsPerMessage,le=C?.module?.state;return!C?.member||typeof L!="number"||!Number.isSafeInteger(L)||L<0?null:le==="live"||le==="braked"?L:null}const G=C=>{const L=F();return L!==null&&Ol(C).length>L},V=C=>Tm(v.thread,C),H=C=>!C.pending&&C.seq>0,te=()=>R()==="write";function Q(){const C=v.me;if(C?.member&&C.profile)return{kind:"member",memberId:C.member.memberId,handle:C.profile.handle,displayName:C.profile.displayName,avatarPreset:C.profile.avatarPreset};const L=v.thread.viewer.memberId;if(L===null)return null;for(const le of v.thread.messages)for(const fe of[le,...le.replies])if(fe.author.kind==="member"&&fe.author.memberId===L)return fe.author;return null}function X(){v.clock=c(),!N&&(N=setInterval(()=>{v.clock=c();let C=!1;for(const L of[v.composer,v.inline])!L||L.waitUntil===null||(L.waitUntil<=v.clock?(L.waitUntil=null,L.failure&&(L.failure.code==="fast"||L.failure.code==="quota")&&(L.failure=null)):C=!0);!C&&N&&(clearInterval(N),N=null)},1e3))}const Y=C=>C.waitUntil===null?0:Math.max(0,Math.ceil((C.waitUntil-Math.max(v.clock,c()))/1e3));async function ce(C,L){const le=await Zm(h,s,{conversationId:a,languageCode:o},L,$);if(!O){if(le===L){De();return}C&&C.failure===L&&(C.failure=le),Qe(le)}}function ne(C,L){if(C&&(C.failure=L),r&&L.code==="notFound"){ce(C,L);return}switch(Bl(L.code)){case"confirm":C&&L.codes&&L.codes.length>0&&(C.confirm={codes:[...L.codes],checked:[]});return;case"wait":C&&(C.waitUntil=Ni(L,c()),C.waitUntil!==null&&X()),L.code==="braked"&&(v.block="braked",E=Ni(L,c()),D(),be(!0));return;case"onboard":eo(L.needs?.includes("art9_consent")?{forceArt9:!0}:{}),Z();return;case"reload":Z();return;case"notMoved":v.block="notMoved";return;case"hide":return L.code==="realtimeOff"?void 0:re();default:return}}async function ae(C,L,le){if(C.sending||Y(C)>0||O)return;const fe=Ze(C.body);if(fe===""||lt(fe)>In)return;const qe=Gt(v.thread);if(qe.signIn)return;if(qe.any)return eo();const Zt=L.kind==="new"?null:Zn(v.thread,L.seq);if(L.kind!=="new"&&(!Zt||!H(Zt)))return;if(G(fe)){C.failure={ok:!1,code:"mentionLimit"};return}let to;const Ss=L.kind==="edit"&&v.inline===C?v.inline.title:null;if(Ss!==null){const no=ki(Ss);if(no===null)return;no!==h?.getState().topic?.title&&(to=no)}C.sending=!0,C.failure=null;const Jc=L.kind==="edit"?null:Q(),Eo=L.kind==="edit"?as():C.clientMsgId??=as();L.kind==="edit"?b.applyMessage({type:"edit",clientMsgId:Eo,seq:L.seq,body:fe}):Jc&&b.applyMessage({type:"post",clientMsgId:Eo,body:fe,replyToSeq:L.kind==="reply"?L.seq:null,author:Jc,languageCode:o});const yC=r?{conversationId:a}:{articleId:a},Pn=L.kind==="edit"?await s.messages.edit({conversationId:Zt.conversationId,seq:L.seq,body:fe,...to!==void 0?{title:to}:{},...le?{confirmations:le}:{}},$):await s.messages.post({...yC,body:fe,replyToSeq:L.kind==="reply"?L.seq:null,clientMsgId:Eo,languageCode:o,...le?{confirmations:le}:{}},$);if(!O){if(C.sending=!1,Pn.ok){b.applyMessage({type:"confirm",clientMsgId:Eo,message:Pn.value.message,warnings:Pn.value.warnings}),Pn.value.topic&&h&&h.applyTopic(Pn.value.topic);const no=Pn.value.message.state==="held";C.body="",C.clientMsgId=null,C.confirm=null,C.failure=null,L.kind!=="new"&&v.inline===C&&(v.inline=null),ee({key:no?"composer.held":"composer.posted"}),L.kind!=="edit"&&e.onPosted?.(no?"held":"visible");return}b.applyMessage({type:"rollback",clientMsgId:Eo}),ne(C,Pn)}}function de(C,L,le){if(!C.confirm||!C.confirm.codes.includes(L))return;const fe=C.confirm.checked.filter(qe=>qe!==L);C.confirm.checked=le?[...fe,L]:fe}async function ve(C){const L=C.confirm;if(!L||!L.codes.every(fe=>L.checked.includes(fe)))return;const le=C===v.composer?{kind:"new"}:v.inline===C?{kind:v.inline.kind,seq:v.inline.seq}:{kind:"new"};await ae(C,le,[...L.codes])}async function Se(C){const L=Zn(v.thread,C),le=`delete:${C}`;if(!L||!H(L)||v.busy[le])return!1;v.busy[le]=!0;const fe=as();b.applyMessage({type:"delete",clientMsgId:fe,seq:C});const qe=await s.messages.delete({conversationId:L.conversationId,seq:C},$);return delete v.busy[le],O?!1:qe.ok?(b.applyMessage({type:"confirm",clientMsgId:fe,message:qe.value.message}),!0):(b.applyMessage({type:"rollback",clientMsgId:fe}),ee(Ie(qe,o)),ne(null,qe),!1)}const xe=C=>"articleId"in C?"react:article":`react:${C.seq}`,st=C=>r?"articleId"in C?Zl:Zn(v.thread,C.seq)?.reactions??Zl:Cm(v.thread,C);async function it(C,L){const le=xe(C);if(r&&"articleId"in C||!te()||v.busy[le]||!v.thread.reactionSet.includes(L))return;const fe=st(C),qe=fe.mine===L?null:L;v.busy[le]=!0,b.applyReaction(C,Sm(fe,qe));const Zt=await s.reactions.set({target:C,emoji:qe},$);if(delete v.busy[le],!O){if(Zt.ok){b.applyReaction(C,Zt.value.reactions);return}b.applyReaction(C,fe),ee(Ie(Zt,o)),ne(null,Zt)}}async function Rt(C,L){const le=`block:${C}`;if(v.busy[le])return;v.busy[le]=!0;const fe=await s.blocks.set({memberId:C,blocked:L},$);if(delete v.busy[le],!O){if(fe.ok){b.collapse(C,fe.value.blocked),ee({key:fe.value.blocked?"discussion.blocked":"discussion.unblocked"});return}ee(Ie(fe,o)),ne(null,fe)}}function Nt(C){v.report={conversationId:C.conversationId,seq:C.seq,category:"",ruleId:"",note:"",rules:null,rulesFailed:!1,sending:!1,failure:null,done:!1};const L=v.report;s.legal.current({kind:"rules",locale:o},$).then(le=>{v.report===L&&(le.ok?L.rules=Gn(le.value.bodyJson):L.rulesFailed=!0)})}async function Mn(){const C=v.report;if(!C||C.sending||C.done||C.category===""||C.category==="rules"&&C.ruleId==="")return;const L=Ze(C.note);if(lt(L)>ss)return;C.sending=!0,C.failure=null;const le=await s.messages.report({conversationId:C.conversationId,seq:C.seq,category:C.category,ruleId:C.category==="rules"?C.ruleId:null,note:L===""?null:L},$);if(C.sending=!1,!O){if(le.ok){C.done=!0,ee({key:"report.done"});return}C.failure=le,le.code==="surfaceOff"&&re()}}function eo(C={}){if(j.value||O||v.refusedAge!==null)return;const L=C.offerArt9===!0,le=!L&&(C.forceArt9===!0||r&&C.toRead!==!0);P=L;const fe=ks({client:s,lang:o,signal:_.signal,...L?{offerArt9:!0}:{},...le?{forceArt9:!0}:{},onRefused:qe=>{v.refusedAge=qe,e.onAgeRefused?.(qe)},onDone:qe=>{v.me=qe,j.value=null,v.art9RefusedNote=fe.state.art9RefusedSent,L?qe.acceptances.art9Consent==="accepted"&&ee({key:"panel.art9Given"}):ee({key:fe.state.art9RefusedSent?"onboarding.art9RefusedDone":"onboarding.done"}),Z()},onSignIn:()=>{j.value=null,Z()}});j.value=fe,fe.load()}const ct=()=>{const C=R();if(C==="write")return!0;if(!r||C!=="locked")return!1;const L=v.thread;return L.viewer.memberId!==null&&!Gt(L).any&&L.viewer.restrictions.length===0&&!S()&&v.block===null},Tt=C=>r&&C.seq===gh&&V(C);return{state:v,store:b,onboarding:j,async start(){await Z(),n&&v.phase==="ready"?await Cs(n):Pt()},refresh:Z,loadMore:J,mode:R,needs:()=>Gt(v.thread),isOwn:V,canReply:C=>{if(!te()||!H(C)||C.state!=="visible"||C.body===null)return!1;if(C.replyToSeq===null)return!0;const L=Zn(v.thread,C.replyToSeq);return L!==null&&H(L)&&L.state==="visible"},canEdit:C=>te()&&V(C)&&H(C)&&C.body!==null&&(C.state==="visible"||C.state==="held"),canDelete:C=>v.thread.viewer.memberId!==null&&R()!=="braked"&&V(C)&&H(C)&&C.body!==null&&C.state!=="deleted",canReact:ct,mentionCap:F,editsTitle:Tt,canReport:C=>!Gt(v.thread).signIn&&!V(C)&&H(C)&&C.body!==null&&C.author.kind!=="system",canReportAsNotifier:C=>Gt(v.thread).signIn&&H(C)&&C.body!==null&&C.author.kind!=="system",canBlock:C=>!Gt(v.thread).signIn&&!V(C)&&H(C)&&C.author.kind==="member"&&C.author.memberId!==null,setInView(C){const L=k;k=C,C&&!L&&T&&c()-w>=B&&T.now()},submit:()=>ae(v.composer,{kind:"new"}),openReply(C,L=null){const le=Zn(v.thread,C);if(!le)return;const fe=le.replyToSeq??le.seq;if(v.inline?.kind==="reply"&&v.inline.seq===fe){v.inline.replyingTo=L;return}v.inline={...ji(),kind:"reply",seq:fe,replyingTo:L,title:null}},openEdit(C){const L=Zn(v.thread,C);if(!L||L.body===null)return;const le=Tt(L)?h?.getState().topic?.title??"":null;v.inline={...ji(L.body),kind:"edit",seq:C,replyingTo:null,title:le}},closeInline(){v.inline=null},async submitInline(){const C=v.inline;C&&await ae(C,{kind:C.kind,seq:C.seq})},setConfirmed:de,sendConfirmed:ve,remove:Se,react:it,setBlocked:Rt,openReport:Nt,closeReport(){v.report=null},submitReport:Mn,beginOnboarding:eo,cancelOnboarding(){j.value=null},waitLeft:Y,dispose(){O||(O=!0,_.abort(),T?.stop(),T=null,g?.stop(),g=null,I(),N&&clearInterval(N),N=null,M&&clearTimeout(M),M=null,j.value=null)}}}const _h=["aria-labelledby","aria-describedby"],kh={class:"bcm-dialog-body"},wh=["id"],$h=["id"],xh={class:"bcm-row"},Ih=["disabled"],Th=["disabled"],ws=$e({__name:"ConfirmDialog",props:{title:{},explain:{},explainParams:{},confirm:{},cancel:{},danger:{type:Boolean},busy:{type:Boolean},fallbackFocus:{type:Function}},emits:["confirm","cancel"],setup(e,{emit:t}){const n=e,s=t,{t:o}=vt(),r=ue(null),a=He("bcm-dialog");return Mi(r,()=>s("cancel"),n.fallbackFocus),(l,c)=>(d(),m("dialog",{ref_key:"dialog",ref:r,class:"bcm-dialog","aria-labelledby":`${i(a)}-title`,"aria-describedby":e.explain?`${i(a)}-explain`:void 0},[f("div",kh,[f("h3",{id:`${i(a)}-title`},u(i(o)(e.title)),9,wh),e.explain?(d(),m("p",{key:0,id:`${i(a)}-explain`},u(i(o)(e.explain,e.explainParams)),9,$h)):A("",!0),f("div",xh,[c[2]||(c[2]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn",disabled:e.busy,onClick:c[0]||(c[0]=p=>s("cancel"))},u(i(o)(e.cancel??"common.cancel")),9,Ih),f("button",{type:"button",class:Ve(["bcm-btn bcm-primary",{"bcm-danger":e.danger}]),disabled:e.busy,onClick:c[1]||(c[1]=p=>s("confirm"))},u(i(o)(e.confirm)),11,Th)])])],8,_h))}}),Ch=["for"],Sh=["id","aria-describedby","aria-invalid","readonly"],Ah=["id"],Oh={key:0,class:"bcm-error"},Eh={key:1,class:"bcm-hint"},Mh=["for"],Ph={key:1,class:"bcm-hint"},Rh=["id","placeholder","aria-describedby","aria-invalid","readonly"],Nh={class:"bcm-composer-foot"},jh=["id"],zh={class:"bcm-sr","aria-live":"polite"},Lh=["disabled"],Dh=["disabled"],Fh=["id"],Uh={key:0},qh=["href"],Bh={key:2,class:"bcm-error"},Hh={key:3,class:"bcm-error",role:"alert"},Vh={key:4,class:"bcm-warning",role:"status"},Kh={key:5,class:"bcm-error",role:"alert"},Wh={key:6,class:"bcm-confirm"},Yh={class:"bcm-label"},Gh=["checked","onChange"],Zh={class:"bcm-row"},Jh=["disabled"],Co=$e({__name:"MessageComposer",props:{draft:{},kind:{},wait:{},replyingTo:{},rulesHref:{},mentionsMax:{}},emits:["submit","cancel","confirmed","confirm"],setup(e,{expose:t,emit:n}){const s=e,o=n,{t:r,lang:a}=vt(),l=He("bcm-composer"),c=ue(null),p=z(()=>lt(Ze(s.draft.body))),h=z(()=>p.value>In),b=z(()=>{const M=s.mentionsMax;return typeof M=="number"&&M>=0&&Ol(Ze(s.draft.body)).length>M}),_=z(()=>typeof s.draft.title=="string"),$=z(()=>hl(s.draft.title)),v=z(()=>_.value&&$.value>is),I=z(()=>!_.value||ki(s.draft.title)!==null),j=z(()=>_.value&&!v.value&&!I.value&&p.value>0),P=z(()=>!s.draft.sending&&p.value>0&&!h.value&&!b.value&&I.value&&s.wait===0&&s.draft.confirm===null),T=z(()=>{const M=s.draft.confirm;return M!==null&&M.codes.every(E=>M.checked.includes(E))}),g=z(()=>r(s.kind==="reply"?"composer.replyLabel":s.kind==="edit"?"composer.editLabel":s.kind==="topic"?"topic.bodyLabel":"composer.label")),k=typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.platform||navigator.userAgent)?"⌘ + Enter":"Ctrl + Enter",O=z(()=>{const M=s.draft.failure;if(!M||s.draft.confirm&&M.code==="confirm"||M.code==="mentionLimit"&&b.value||(M.code==="fast"||M.code==="quota")&&s.wait>0&&s.wait<=ql)return"";const E=Ie(M,a.value);return r(E.key,E.params)}),w=ue("");let y=null;ye(p,M=>{y&&clearTimeout(y),y=setTimeout(()=>{w.value=M>=In*.9?r("composer.counter",{length:M,max:In}):""},700)}),Ge(()=>{y&&clearTimeout(y)}),ye(()=>[s.draft.body,s.draft.title],()=>{const M=s.draft;M.confirm&&(M.confirm=null),M.failure&&M.failure.code!=="fast"&&M.failure.code!=="quota"&&(M.failure=null)});function x(M){M.key!=="Enter"||!(M.metaKey||M.ctrlKey)||(M.preventDefault(),P.value&&o("submit"))}function N(){P.value&&o("submit")}return t({focus:()=>c.value?.focus()}),(M,E)=>(d(),m("form",{class:"bcm-composer",onSubmit:mt(N,["prevent"])},[_.value?(d(),m(q,{key:0},[f("label",{for:`${i(l)}-title`,class:"bcm-label"},u(i(r)("topic.titleLabel")),9,Ch),ge(f("input",{id:`${i(l)}-title`,"onUpdate:modelValue":E[0]||(E[0]=B=>e.draft.title=B),class:"bcm-input",type:"text",autocomplete:"off","aria-describedby":`${i(l)}-title-counter`,"aria-invalid":v.value,readonly:e.draft.sending,onKeydown:x},null,40,Sh),[[Xe,e.draft.title]]),f("span",{id:`${i(l)}-title-counter`,class:Ve(["bcm-counter",{"bcm-counter-over":v.value}])},u(i(r)("composer.counter",{length:$.value,max:i(is)})),11,Ah),v.value?(d(),m("p",Oh,u(i(r)("topic.titleTooLong",{max:i(is)})),1)):j.value?(d(),m("p",Eh,u(i(r)("topic.titleMissing")),1)):A("",!0)],64)):A("",!0),f("label",{for:i(l),class:"bcm-label"},u(g.value),9,Mh),e.replyingTo?(d(),m("p",Ph,u(i(r)("composer.replyingTo",{name:e.replyingTo})),1)):A("",!0),ge(f("textarea",{id:i(l),ref_key:"input",ref:c,"onUpdate:modelValue":E[1]||(E[1]=B=>e.draft.body=B),class:"bcm-input bcm-textarea",rows:"4",placeholder:i(r)("composer.placeholder"),"aria-describedby":`${i(l)}-counter ${i(l)}-hints`,"aria-invalid":h.value||b.value,readonly:e.draft.sending,onKeydown:x},null,40,Rh),[[Xe,e.draft.body]]),f("div",Nh,[f("span",{id:`${i(l)}-counter`,class:Ve(["bcm-counter",{"bcm-counter-over":h.value}])},u(i(r)("composer.counter",{length:p.value,max:i(In)})),11,jh),f("span",zh,u(w.value),1),E[4]||(E[4]=f("span",{class:"bcm-spacer"},null,-1)),e.kind!=="new"&&e.kind!=="topic"?(d(),m("button",{key:0,type:"button",class:"bcm-btn",disabled:e.draft.sending,onClick:E[2]||(E[2]=B=>o("cancel"))},u(i(r)("composer.cancel")),9,Lh)):A("",!0),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!P.value},u(e.draft.sending?i(r)("composer.sending"):e.kind==="edit"?i(r)("composer.save"):e.kind==="topic"?i(r)("topic.create"):i(r)("composer.submit")),9,Dh)]),f("div",{id:`${i(l)}-hints`,class:"bcm-hint"},[f("p",null,u(i(r)("composer.linksNote",{count:i(Tf)})),1),f("p",null,u(i(r)("composer.shortcut",{keys:i(k)})),1),e.rulesHref?(d(),m("p",Uh,[f("a",{href:e.rulesHref,target:"_blank",rel:"noopener"},u(i(r)("onboarding.rulesTitle")),9,qh)])):A("",!0)],8,Fh),h.value?(d(),m("p",Bh,u(i(r)("composer.tooLong",{max:i(In)})),1)):A("",!0),b.value?(d(),m("p",Hh,u(i(r)("error.mentionLimit")),1)):A("",!0),e.wait>0&&e.wait<=i(ql)?(d(),m("p",Vh,u(i(r)("composer.cooldown",{count:e.wait})),1)):A("",!0),O.value?(d(),m("p",Kh,u(O.value),1)):A("",!0),e.draft.confirm?(d(),m("fieldset",Wh,[f("legend",Yh,u(i(r)("confirm.title")),1),f("p",null,u(i(r)("error.confirm")),1),(d(!0),m(q,null,me(e.draft.confirm.codes,B=>(d(),m("label",{key:B,class:"bcm-check"},[f("input",{type:"checkbox",checked:e.draft.confirm.checked.includes(B),onChange:ee=>o("confirm",B,ee.target.checked)},null,40,Gh),f("span",null,u(i(r)(i(yp)(B))),1)]))),128)),f("div",Zh,[f("button",{type:"button",class:"bcm-btn bcm-primary",disabled:!T.value||e.draft.sending||e.wait>0,onClick:E[3]||(E[3]=B=>o("confirmed"))},u(i(r)("confirm.submit")),9,Jh)])])):A("",!0)],32))}}),zi=Object.freeze([Object.freeze({id:"fox",emoji:"🦊"}),Object.freeze({id:"owl",emoji:"🦉"}),Object.freeze({id:"bear",emoji:"🐻"}),Object.freeze({id:"hedgehog",emoji:"🦔"}),Object.freeze({id:"frog",emoji:"🐸"}),Object.freeze({id:"bee",emoji:"🐝"}),Object.freeze({id:"leaf",emoji:"🍃"}),Object.freeze({id:"flower",emoji:"🌼"}),Object.freeze({id:"tree",emoji:"🌲"}),Object.freeze({id:"star",emoji:"⭐"})]),Xh=new Map(zi.map(e=>[e.id,e.emoji]));function Qh(e){return typeof e=="string"?Xh.get(e)??null:null}function Ql(e){if(typeof e!="string")return"";for(const t of e.trim())return t.toLocaleUpperCase();return""}function eb(e){if(typeof e!="string"||e==="")return 210;let t=0;for(let n=0;n<e.length;n++)t=(t*31+e.charCodeAt(n))%360;return t}const Li=$e({__name:"AuthorAvatar",props:{author:{}},setup(e){const t=e,n=z(()=>t.author.kind==="member"?Qh(t.author.avatarPreset):null),s=z(()=>{const r=t.author;return r.kind==="member"||r.kind==="staff"?Ql(r.displayName):""}),o=z(()=>{const r=t.author;if(n.value||!s.value)return;const a=r.kind==="member"?r.memberId:r.kind==="staff"?r.staffId:null;return`hsl(${eb(a)} 45% 42%)`});return(r,a)=>(d(),m("span",{class:Ve(["bcm-avatar",{"bcm-avatar-initial":!n.value&&s.value}]),style:Do(o.value?{background:o.value}:void 0),"aria-hidden":"true"},u(n.value??s.value),7))}}),tb=["href","rel"],nb=["href"],ec=$e({__name:"LinkedText",props:{text:{},profilePath:{}},setup(e){const t=e,n=z(()=>{const s=t.profilePath;return oh(t.text??"",s?o=>kl(s,o):null)});return(s,o)=>(d(!0),m(q,null,me(n.value,(r,a)=>(d(),m(q,{key:a},[r.kind==="link"?(d(),m("a",{key:0,href:r.href,rel:i(Jp),target:"_blank"},u(r.text),9,tb)):r.kind==="mention"?(d(),m("a",{key:1,class:"bcm-mention",href:r.href},u(r.text),9,nb)):(d(),m(q,{key:2},[St(u(r.text),1)],64))],64))),128))}}),ob=["aria-expanded","aria-controls"],sb=["id"],ib=["href"],rb=["onClick"],tc=$e({__name:"MessageMenu",props:{items:{},label:{}},emits:["select"],setup(e,{emit:t}){const n=t,{t:s}=vt(),o=ue(!1),r=ue(null),a=ue(null),l=He("bcm-menu");function c(_){!a.value||_.composedPath().includes(a.value)||h(!1)}function p(_){o.value=_,_?(document.addEventListener("pointerdown",c,!0),Fe(()=>a.value?.querySelector(".bcm-menu-list button, .bcm-menu-list a")?.focus())):document.removeEventListener("pointerdown",c,!0)}function h(_=!0){p(!1),_&&r.value?.focus()}function b(_){h(!0),n("select",_)}return Ge(()=>document.removeEventListener("pointerdown",c,!0)),(_,$)=>e.items.length?(d(),m("div",{key:0,ref_key:"root",ref:a,class:"bcm-menu",onKeydown:$[2]||($[2]=ff(mt(v=>h(!0),["stop"]),["esc"]))},[f("button",{ref_key:"toggle",ref:r,type:"button",class:"bcm-quiet","aria-expanded":o.value,"aria-controls":i(l),onClick:$[0]||($[0]=v=>p(!o.value))},u(e.label??i(s)("discussion.menu")),9,ob),o.value?(d(),m("div",{key:0,id:i(l),class:"bcm-menu-list"},[(d(!0),m(q,null,me(e.items,v=>(d(),m(q,{key:v.id},[v.href?(d(),m("a",{key:0,href:v.href,class:Ve({"bcm-danger":v.danger}),onClick:$[1]||($[1]=I=>h(!1))},u(v.label),11,ib)):(d(),m("button",{key:1,type:"button",class:Ve({"bcm-danger":v.danger}),onClick:I=>b(v.id)},u(v.label),11,rb))],64))),128))],8,sb)):A("",!0)],544)):A("",!0)}}),ab=["aria-label"],lb=["aria-pressed","disabled","title","onClick"],cb={key:0,class:"bcm-sr"},ub={key:1,class:"bcm-react"},nc=$e({__name:"ReactionBar",props:{reactionSet:{},summary:{},interactive:{type:Boolean},busy:{type:Boolean}},emits:["react"],setup(e,{emit:t}){const n=e,s=t,{t:o}=vt(),r=z(()=>n.interactive?n.reactionSet:n.reactionSet.filter(a=>(n.summary.counts[a]??0)>0));return(a,l)=>r.value.length?(d(),m("div",{key:0,class:"bcm-reactions",role:"group","aria-label":i(o)("discussion.reactions")},[(d(!0),m(q,null,me(r.value,c=>(d(),m(q,{key:c},[e.interactive?(d(),m("button",{key:0,type:"button",class:"bcm-react","aria-pressed":e.summary.mine===c,disabled:e.busy,title:e.summary.mine===c?i(o)("discussion.reactionRemove"):i(o)("discussion.reactionAdd"),onClick:p=>s("react",c)},[f("span",null,u(i(o)("discussion.reactionCount",{emoji:c,count:e.summary.counts[c]??0})),1),e.summary.mine===c?(d(),m("span",cb,u(i(o)("discussion.reactionMine")),1)):A("",!0)],8,lb)):(d(),m("span",ub,u(i(o)("discussion.reactionCount",{emoji:c,count:e.summary.counts[c]??0})),1))],64))),128))],8,ab)):A("",!0)}}),oc=Symbol("bcm-discussion");function sc(e){jr(oc,e)}function db(){const e=Qs(oc,null);if(!e)throw new Error("[blogmcp-community] a discussion component rendered outside <blogmcp-discussion>");return e}const fb=["id"],mb=["aria-busy"],pb={class:"bcm-msg-main"},hb={class:"bcm-meta"},bb={class:"bcm-author"},gb={key:0,class:"bcm-badge bcm-badge-team"},vb={key:1,class:"bcm-badge bcm-badge-team"},yb={key:2,class:"bcm-handle"},_b=["datetime"],kb={key:4,class:"bcm-muted"},wb={key:5,class:"bcm-muted",role:"status"},$b={key:0,class:"bcm-placeholder"},xb={key:1,class:"bcm-muted"},Ib={key:0,class:"bcm-own-state bcm-own-consent"},Tb={class:"bcm-badge"},Cb={class:"bcm-hint"},Sb={key:1,class:"bcm-own-state"},Ab={class:"bcm-badge"},Ob={class:"bcm-hint"},Eb=["href"],Mb={key:3,class:"bcm-text"},Pb={key:4,class:"bcm-hint"},Rb=["href"],Nb={key:3,class:"bcm-actions"},jb={key:0,class:"bcm-replies"},zb={key:2,class:"bcm-hint"},Lb=3,ic=$e({name:"MessageItem",__name:"MessageItem",props:{message:{}},setup(e){const t=e,{t:n,lang:s}=vt(),{ctl:o,routes:r,opened:a,originals:l,allReplies:c,deleteMessage:p,extraMenu:h,onExtraMenu:b}=db(),_=z(()=>t.message),$=z(()=>_.value.replyToSeq!==null),v=z(()=>o.isOwn(_.value)),I=z(()=>_.value.body===null),j=z(()=>v.value&&_.value.state==="held"&&_.value.hiddenUntilConsent===!0),P=z(()=>o.state.me?.acceptances.art9Refused===!0),T=z(()=>j.value&&!o.onboarding.value&&o.state.refusedAge===null&&(o.mode()==="onboarding"&&o.needs().art9||P.value)),g=z(()=>{const oe=_.value.author;return oe.kind==="system"?n("author.system"):oe.kind==="staff"?oe.displayName:oe.displayName??n("author.deleted")}),k=z(()=>_.value.author.kind==="member"?_.value.author.handle:null),O=z(()=>_.value.author.kind==="member"&&"moderator"in _.value.author&&_.value.author.moderator===!0),w=z(()=>{const oe=_.value.author;if(oe.kind!=="staff")return null;const Z=`author.badge.${oe.badge}`;return Xn(Z)?n(Z):null}),y=z(()=>_.value.state==="held"?"discussion.placeholderHeld":_.value.state==="removed"?"discussion.placeholderRemoved":"discussion.placeholderDeleted"),x=z(()=>_.value.pending?void 0:Io(_.value.seq)??void 0),N=z(()=>_.value.collapsed&&!a.has(_.value.seq)),M=z(()=>l.has(_.value.seq)),E=z(()=>(_.value.isTranslated&&!M.value?_.value.displayBody:_.value.body)??_.value.displayBody),B=z(()=>(v.value?_.value.notes??[]:[]).map(oe=>_p(oe)).filter(oe=>oe!==null)),ee=z(()=>v.value?[...new Set((_.value.warnings??[]).map(oe=>vp(oe)))]:[]),re=z(()=>o.state.inline?.kind==="edit"&&o.state.inline.seq===_.value.seq),be=z(()=>!$.value&&o.state.inline?.kind==="reply"&&o.state.inline.seq===_.value.seq),we=z(()=>c.has(_.value.seq)?_.value.replies:_.value.replies.slice(0,Lb)),K=z(()=>_.value.replies.length-we.value.length),D=z(()=>({conversationId:_.value.conversationId,seq:_.value.seq})),U=z(()=>o.needs().signIn?null:r.value.profilePath),Le=z(()=>{const oe=[],Z=_.value;if(o.canEdit(Z)&&oe.push({id:"edit",label:n("discussion.edit")}),o.canDelete(Z)&&oe.push({id:"delete",label:n("discussion.delete"),danger:!0}),o.canReport(Z))oe.push({id:"report",label:n("discussion.report")});else if(o.canReportAsNotifier(Z)){const J=Ap(r.value.reportPath,D.value);J&&oe.push({id:"report",label:n("discussion.report"),href:J})}return o.canBlock(Z)&&oe.push({id:Z.collapsed?"unblock":"block",label:Z.collapsed?n("discussion.unblock"):n("discussion.block")}),h&&oe.push(...h(Z)),oe});function Ne(oe){const Z=_.value;oe==="edit"?o.openEdit(Z.seq):oe==="delete"?p(Z.seq):oe==="report"?o.openReport(Z):(oe==="block"||oe==="unblock")&&Z.author.kind==="member"&&Z.author.memberId?o.setBlocked(Z.author.memberId,oe==="block"):b?.(oe,Z)}function De(){o.openReply(_.value.seq,$.value?g.value:null)}function Qe(oe){oe.has(_.value.seq)?oe.delete(_.value.seq):oe.add(_.value.seq)}return(oe,Z)=>{const J=Ju("MessageItem",!0);return d(),m("li",{id:x.value,class:"bcm-msg-item"},[f("article",{class:Ve(["bcm-msg",{"bcm-msg-pending":!!_.value.pending}]),"aria-busy":!!_.value.pending},[Ee(Li,{author:_.value.author},null,8,["author"]),f("div",pb,[f("header",hb,[f("span",bb,u(g.value),1),w.value?(d(),m("span",gb,u(w.value),1)):A("",!0),O.value?(d(),m("span",vb,u(i(n)("role.moderator")),1)):A("",!0),k.value?(d(),m("span",yb,u(k.value),1)):A("",!0),_.value.createdAt?(d(),m("time",{key:3,class:"bcm-time",datetime:_.value.createdAt},u(i(Pe)(i(s),_.value.createdAt)),9,_b)):A("",!0),_.value.isEdited&&!I.value?(d(),m("span",kb,u(i(n)("discussion.edited")),1)):A("",!0),_.value.pending?(d(),m("span",wb,u(i(n)("discussion.pending")),1)):A("",!0)]),I.value?(d(),m("p",$b,u(i(n)(y.value)),1)):N.value?(d(),m("p",xb,[St(u(i(n)("discussion.collapsed"))+" ",1),f("button",{type:"button",class:"bcm-link",onClick:Z[0]||(Z[0]=W=>Qe(i(a)))},u(i(n)("discussion.show")),1)])):(d(),m(q,{key:2},[j.value?(d(),m("div",Ib,[f("span",Tb,u(i(n)("state.hiddenUntilConsent")),1),f("p",Cb,u(i(n)("discussion.hiddenUntilConsentNote")),1),T.value?(d(),m("button",{key:0,type:"button",class:"bcm-link",onClick:Z[1]||(Z[1]=W=>i(o).beginOnboarding(P.value?{offerArt9:!0}:{}))},u(i(n)("discussion.giveConsent")),1)):A("",!0)])):v.value&&(_.value.state==="held"||_.value.state==="removed")?(d(),m("div",Sb,[f("span",Ab,u(_.value.state==="held"?i(n)("state.held"):i(n)("state.removed")),1),f("p",Ob,u(_.value.state==="held"?i(n)("discussion.heldNote"):i(n)("discussion.removedNote")),1),_.value.state==="removed"?(d(),m("a",{key:0,href:i(r).myCommunityPath},u(i(n)("discussion.why")),9,Eb)):A("",!0)])):A("",!0),re.value&&i(o).state.inline?(d(),_e(Co,{key:2,kind:"edit",draft:i(o).state.inline,wait:i(o).waitLeft(i(o).state.inline),"rules-href":i(r).rulesPath,"mentions-max":i(o).mentionCap(),onSubmit:Z[2]||(Z[2]=W=>i(o).submitInline()),onCancel:Z[3]||(Z[3]=W=>i(o).closeInline()),onConfirm:Z[4]||(Z[4]=(W,pe)=>i(o).state.inline&&i(o).setConfirmed(i(o).state.inline,W,pe)),onConfirmed:Z[5]||(Z[5]=W=>i(o).state.inline&&i(o).sendConfirmed(i(o).state.inline))},null,8,["draft","wait","rules-href","mentions-max"])):(d(),m("p",Mb,[Ee(ec,{text:E.value,"profile-path":U.value},null,8,["text","profile-path"])])),_.value.isTranslated&&!re.value?(d(),m("p",Pb,[St(u(i(n)("discussion.translated"))+" ",1),f("button",{type:"button",class:"bcm-link",onClick:Z[6]||(Z[6]=W=>Qe(i(l)))},u(M.value?i(n)("discussion.showTranslation"):i(n)("discussion.showOriginal")),1)])):A("",!0),_.value.collapsed?(d(),m("button",{key:5,type:"button",class:"bcm-link",onClick:Z[7]||(Z[7]=W=>Qe(i(a)))},u(i(n)("discussion.hide")),1)):A("",!0),(d(!0),m(q,null,me(B.value,W=>(d(),m("p",{key:W,class:"bcm-note"},[W==="note.report_to_manufacturer"&&i(r).consultationPath?(d(),m("a",{key:0,href:i(r).consultationPath},u(i(n)(W)),9,Rb)):(d(),m(q,{key:1},[St(u(i(n)(W)),1)],64))]))),128)),(d(!0),m(q,null,me(ee.value,W=>(d(),m("p",{key:W,class:"bcm-warning"},u(i(n)(W)),1))),128))],64)),!I.value&&!N.value&&!re.value?(d(),m("div",Nb,[Ee(nc,{"reaction-set":i(o).state.thread.reactionSet,summary:_.value.reactions,interactive:i(o).canReact()&&!_.value.pending&&_.value.seq>0&&_.value.state==="visible",busy:!!i(o).state.busy[`react:${_.value.seq}`],onReact:Z[8]||(Z[8]=W=>i(o).react(D.value,W))},null,8,["reaction-set","summary","interactive","busy"]),i(o).canReply(_.value)?(d(),m("button",{key:0,type:"button",class:"bcm-quiet",onClick:De},u(i(n)("discussion.reply")),1)):A("",!0),Ee(tc,{items:Le.value,onSelect:Ne},null,8,["items"])])):A("",!0),$.value?A("",!0):(d(),m(q,{key:4},[_.value.replies.length?(d(),m("ol",jb,[(d(!0),m(q,null,me(we.value,W=>(d(),_e(J,{key:W.id,message:W},null,8,["message"]))),128))])):A("",!0),K.value>0?(d(),m("button",{key:1,type:"button",class:"bcm-link",onClick:Z[9]||(Z[9]=W=>i(c).add(_.value.seq))},u(i(n)("discussion.showReplies",{count:K.value})),1)):A("",!0),_.value.repliesTruncated?(d(),m("p",zb,u(i(n)("discussion.repliesTruncated")),1)):A("",!0),be.value&&i(o).state.inline?(d(),_e(Co,{key:3,kind:"reply",draft:i(o).state.inline,wait:i(o).waitLeft(i(o).state.inline),"rules-href":i(r).rulesPath,"mentions-max":i(o).mentionCap(),"replying-to":i(o).state.inline.replyingTo,onSubmit:Z[10]||(Z[10]=W=>i(o).submitInline()),onCancel:Z[11]||(Z[11]=W=>i(o).closeInline()),onConfirm:Z[12]||(Z[12]=(W,pe)=>i(o).state.inline&&i(o).setConfirmed(i(o).state.inline,W,pe)),onConfirmed:Z[13]||(Z[13]=W=>i(o).state.inline&&i(o).sendConfirmed(i(o).state.inline))},null,8,["draft","wait","rules-href","mentions-max","replying-to"])):A("",!0)],64))])],10,mb)],8,fb)}}}),Db=["aria-labelledby"],Fb=["id"],Ub={key:0,class:"bcm-muted",role:"status"},qb={class:"bcm-error",role:"alert"},Bb={class:"bcm-row"},Hb={role:"alert"},Vb={class:"bcm-row"},Kb={key:0,class:"bcm-hint"},Wb={key:1,class:"bcm-choices"},Yb=["name","value"],Gb={class:"bcm-hint bcm-full"},Zb={key:2,class:"bcm-section"},Jb={key:0,class:"bcm-rules"},Xb={key:0,class:"bcm-hint"},Qb=["href"],eg={class:"bcm-check"},tg={key:3,class:"bcm-section"},ng=["aria-label"],og={key:0,class:"bcm-fieldset"},sg={class:"bcm-sr"},ig=["onUpdate:modelValue"],rg={key:1,class:"bcm-check"},ag={key:4,class:"bcm-section"},lg={class:"bcm-field"},cg=["for"],ug=["id","maxlength","aria-invalid","aria-describedby"],dg=["id"],fg={class:"bcm-field"},mg=["for"],pg=["id","maxlength","placeholder","aria-invalid","aria-describedby"],hg=["id"],bg={key:0,class:"bcm-hint"},gg={class:"bcm-choices"},vg={class:"bcm-choice"},yg=["name"],_g=["name","value"],kg={key:5,class:"bcm-error",role:"alert"},wg={class:"bcm-row"},$g=["disabled"],xg=["disabled"],Ig=["disabled"],So=$e({__name:"OnboardingSteps",props:{model:{},rulesHref:{}},emits:["cancel"],setup(e,{emit:t}){const n=e,s=t,{t:o,lang:r}=vt(),a=n.model.state,l=He("bcm-onboarding"),c=ue(null),p=z(()=>n.model.step()),h=z(()=>a.steps.includes("profile")),b=z(()=>{const $=a.failure;if(!$)return"";const v=ph($,r.value);return o(v.key,v.params)}),_=$=>`onboarding.age.${$}`;return ye(()=>[a.index,a.phase,a.steps.join()],([$,v,I],[j,,P])=>{($!==j||I!==P||v==="refused"||v==="failed")&&Fe(()=>c.value?.focus())}),nt(()=>{Fe(()=>c.value?.focus())}),($,v)=>(d(),m("section",{class:"bcm-card","aria-labelledby":`${i(l)}-title`},[f("h3",{id:`${i(l)}-title`,ref_key:"heading",ref:c,tabindex:"-1"},u(i(o)("onboarding.title")),9,Fb),i(a).phase==="loading"?(d(),m("p",Ub,u(i(o)("common.loading")),1)):i(a).phase==="failed"?(d(),m(q,{key:1},[f("p",qb,u(b.value),1),f("div",Bb,[f("button",{type:"button",class:"bcm-btn",onClick:v[0]||(v[0]=I=>s("cancel"))},u(i(o)("common.cancel")),1),f("button",{type:"button",class:"bcm-btn bcm-primary",onClick:v[1]||(v[1]=I=>e.model.load())},u(i(o)("common.retry")),1)])],64)):i(a).phase==="refused"?(d(),m(q,{key:2},[f("p",Hb,u(i(o)("onboarding.ageBelow",{min:i(a).minAge??18})),1),f("div",Vb,[f("button",{type:"button",class:"bcm-btn",onClick:v[2]||(v[2]=I=>s("cancel"))},u(i(o)("common.close")),1)])],64)):(d(),m("form",{key:3,class:"bcm-form",novalidate:"",onSubmit:v[13]||(v[13]=mt(I=>e.model.next(),["prevent"]))},[i(a).index===0&&h.value?(d(),m("p",Kb,u(i(o)("onboarding.lede")),1)):A("",!0),p.value==="age"?(d(),m("fieldset",Wb,[f("legend",null,u(i(o)("onboarding.ageTitle")),1),(d(!0),m(q,null,me(i(Bf),I=>(d(),m("label",{key:I,class:"bcm-choice"},[ge(f("input",{"onUpdate:modelValue":v[3]||(v[3]=j=>i(a).ageBand=j),type:"radio",name:`${i(l)}-age`,value:I},null,8,Yb),[[xn,i(a).ageBand]]),f("span",null,u(i(o)(_(I))),1)]))),128)),f("p",Gb,u(i(o)("onboarding.ageHint")),1)])):p.value==="rules"?(d(),m("div",Zb,[f("h4",null,u(i(o)("onboarding.rulesTitle")),1),f("p",null,u(i(a).reconsent?i(o)("onboarding.rulesChanged"):i(o)("onboarding.rulesLede")),1),i(a).rules.length?(d(),m("ol",Jb,[(d(!0),m(q,null,me(i(a).rules,I=>(d(),m("li",{key:I.id},[f("strong",null,u(I.title),1),I.summary?(d(),m("span",Xb,u(I.summary),1)):A("",!0)]))),128))])):A("",!0),f("p",null,[f("a",{href:e.rulesHref,target:"_blank",rel:"noopener"},u(i(o)("onboarding.rulesLink")),9,Qb)]),f("label",eg,[ge(f("input",{"onUpdate:modelValue":v[4]||(v[4]=I=>i(a).rulesAccepted=I),type:"checkbox"},null,512),[[os,i(a).rulesAccepted]]),f("span",null,u(i(o)("onboarding.rulesAccept")),1)])])):p.value==="art9"?(d(),m("div",tg,[f("h4",null,u(i(o)("onboarding.art9Title")),1),f("p",null,u(e.model.refusalOffered()?i(o)("onboarding.art9LedeOptional"):i(o)("onboarding.art9Lede")),1),f("div",{class:"bcm-consent",tabindex:"0",role:"document","aria-label":i(o)("onboarding.art9Title")},[(d(!0),m(q,null,me(i(a).art9Paragraphs,(I,j)=>(d(),m("p",{key:j,class:"bcm-text"},u(I),1))),128))],8,ng),i(a).art9Controllers.length>1?(d(),m("fieldset",og,[f("legend",sg,u(i(o)("onboarding.art9Title")),1),(d(!0),m(q,null,me(i(a).art9Controllers,I=>(d(),m("label",{key:I.entity,class:"bcm-check"},[ge(f("input",{"onUpdate:modelValue":j=>I.accepted=j,type:"checkbox",required:""},null,8,ig),[[os,I.accepted]]),f("span",null,u(i(o)("onboarding.art9Controller",{label:I.label})),1)]))),128))])):(d(),m("label",rg,[ge(f("input",{"onUpdate:modelValue":v[5]||(v[5]=I=>i(a).art9Accepted=I),type:"checkbox"},null,512),[[os,i(a).art9Accepted]]),f("span",null,u(i(o)("onboarding.art9Accept")),1)]))])):p.value==="profile"?(d(),m("div",ag,[f("h4",null,u(i(o)("onboarding.profileTitle")),1),f("div",lg,[f("label",{for:`${i(l)}-name`},u(i(o)("onboarding.displayName")),9,cg),ge(f("input",{id:`${i(l)}-name`,"onUpdate:modelValue":v[6]||(v[6]=I=>i(a).displayName=I),class:"bcm-input",autocomplete:"nickname",maxlength:i(Na)*2,"aria-invalid":e.model.hasFieldError("displayName"),"aria-describedby":`${i(l)}-name-hint`},null,8,ug),[[Xe,i(a).displayName]]),f("p",{id:`${i(l)}-name-hint`,class:"bcm-hint"},u(i(o)("onboarding.displayNameHint")),9,dg)]),f("div",fg,[f("label",{for:`${i(l)}-handle`},u(i(o)("onboarding.handle")),9,mg),ge(f("input",{id:`${i(l)}-handle`,"onUpdate:modelValue":v[7]||(v[7]=I=>i(a).handle=I),class:"bcm-input",autocomplete:"username",autocapitalize:"none",spellcheck:"false",maxlength:i(_s),placeholder:e.model.suggestedHandle()??"","aria-invalid":e.model.hasFieldError("handle"),"aria-describedby":`${i(l)}-handle-hint`},null,8,pg),[[Xe,i(a).handle]]),f("p",{id:`${i(l)}-handle-hint`,class:"bcm-hint"},u(i(o)("onboarding.handleHint",{min:i(Wl),max:i(_s),days:i(ja)})),9,hg),e.model.suggestedHandle()?(d(),m("p",bg,u(i(o)("onboarding.handleSuggested",{handle:e.model.suggestedHandle()??""})),1)):A("",!0)]),f("fieldset",gg,[f("legend",null,u(i(o)("onboarding.avatar")),1),f("label",vg,[ge(f("input",{"onUpdate:modelValue":v[8]||(v[8]=I=>i(a).avatarPreset=I),type:"radio",name:`${i(l)}-avatar`,value:null},null,8,yg),[[xn,i(a).avatarPreset]]),f("span",null,u(i(o)("onboarding.avatarNone")),1)]),(d(!0),m(q,null,me(i(zi),I=>(d(),m("label",{key:I.id,class:"bcm-choice"},[ge(f("input",{"onUpdate:modelValue":v[9]||(v[9]=j=>i(a).avatarPreset=j),type:"radio",name:`${i(l)}-avatar`,value:I.id},null,8,_g),[[xn,i(a).avatarPreset]]),f("span",null,u(I.emoji),1)]))),128))])])):A("",!0),b.value?(d(),m("p",kg,u(b.value),1)):A("",!0),f("div",wg,[i(a).index>0?(d(),m("button",{key:0,type:"button",class:"bcm-btn",disabled:i(a).phase==="sending",onClick:v[10]||(v[10]=I=>e.model.back())},u(i(o)("onboarding.back")),9,$g)):A("",!0),f("button",{type:"button",class:"bcm-btn",disabled:i(a).phase==="sending",onClick:v[11]||(v[11]=I=>s("cancel"))},u(i(o)("common.cancel")),9,xg),v[14]||(v[14]=f("span",{class:"bcm-spacer"},null,-1)),e.model.canRefuse()?(d(),m("button",{key:1,type:"button",class:"bcm-btn",onClick:v[12]||(v[12]=I=>e.model.refuse())},u(i(o)("onboarding.art9Refuse")),1)):A("",!0),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!e.model.canContinue()},u(i(a).phase==="sending"?i(o)("composer.sending"):e.model.isLast()?i(o)("onboarding.submit"):i(o)("onboarding.continue")),9,Ig)])],32))],8,Db))}}),Tg=["aria-labelledby"],Cg=["id"],Sg={class:"bcm-hint"},Ag={key:0},Og=["href"],Eg={class:"bcm-choices"},Mg=["name","value"],Pg={key:1,class:"bcm-field"},Rg=["for"],Ng={key:0,class:"bcm-error"},jg={key:1,class:"bcm-muted",role:"status"},zg=["id"],Lg=["value"],Dg={class:"bcm-field"},Fg=["for"],Ug=["id","aria-describedby","aria-invalid"],qg=["id"],Bg={key:2,class:"bcm-error",role:"alert"},Hg={class:"bcm-row"},Vg=["disabled"],Kg=["disabled"],Wg={role:"status"},Yg=["href"],Gg={class:"bcm-row"},rc=$e({__name:"ReportDialog",props:{report:{},myCommunityHref:{},rulesHref:{},fallbackFocus:{type:Function}},emits:["submit","close"],setup(e,{emit:t}){const n=e,s=t,{t:o,lang:r}=vt(),a=ue(null),l=He("bcm-report");Mi(a,()=>s("close"),n.fallbackFocus);const c=_=>`category.${_}`,p=z(()=>lt(Ze(n.report.note))),h=z(()=>!n.report.sending&&n.report.category!==""&&(n.report.category!=="rules"||n.report.ruleId!=="")&&p.value<=ss),b=z(()=>{const _=n.report.failure;if(!_)return"";const $=Ie(_,r.value);return o($.key,$.params)});return(_,$)=>(d(),m("dialog",{ref_key:"dialog",ref:a,class:"bcm-dialog","aria-labelledby":`${i(l)}-title`},[f("form",{class:"bcm-dialog-body",novalidate:"",onSubmit:$[5]||($[5]=mt(v=>h.value&&s("submit"),["prevent"]))},[f("h3",{id:`${i(l)}-title`},u(i(o)("report.title")),9,Cg),e.report.done?(d(),m(q,{key:1},[f("p",Wg,u(i(o)("report.done")),1),f("p",null,[f("a",{href:e.myCommunityHref},u(i(o)("panel.title")),9,Yg)]),f("div",Gg,[$[8]||($[8]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn bcm-primary",onClick:$[4]||($[4]=v=>s("close"))},u(i(o)("common.close")),1)])],64)):(d(),m(q,{key:0},[f("p",Sg,u(i(o)("report.lede")),1),e.rulesHref?(d(),m("p",Ag,[f("a",{href:e.rulesHref,target:"_blank",rel:"noopener"},u(i(o)("onboarding.rulesTitle")),9,Og)])):A("",!0),f("fieldset",Eg,[f("legend",null,u(i(o)("report.category")),1),(d(!0),m(q,null,me(i(hi),v=>(d(),m("label",{key:v,class:"bcm-choice"},[ge(f("input",{"onUpdate:modelValue":$[0]||($[0]=I=>e.report.category=I),type:"radio",name:`${i(l)}-category`,value:v},null,8,Mg),[[xn,e.report.category]]),f("span",null,u(i(o)(c(v))),1)]))),128))]),e.report.category==="rules"?(d(),m("div",Pg,[f("label",{for:`${i(l)}-rule`},u(i(o)("report.rule")),9,Rg),e.report.rulesFailed?(d(),m("p",Ng,u(i(o)("error.unavailable")),1)):e.report.rules===null?(d(),m("p",jg,u(i(o)("common.loading")),1)):ge((d(),m("select",{key:2,id:`${i(l)}-rule`,"onUpdate:modelValue":$[1]||($[1]=v=>e.report.ruleId=v),class:"bcm-input",required:""},[$[6]||($[6]=f("option",{value:"",disabled:""},null,-1)),(d(!0),m(q,null,me(e.report.rules,v=>(d(),m("option",{key:v.id,value:v.id},u(v.title),9,Lg))),128))],8,zg)),[[Wt,e.report.ruleId]])])):A("",!0),f("div",Dg,[f("label",{for:`${i(l)}-note`},u(i(o)("report.note")),9,Fg),ge(f("textarea",{id:`${i(l)}-note`,"onUpdate:modelValue":$[2]||($[2]=v=>e.report.note=v),class:"bcm-input bcm-textarea",rows:"3","aria-describedby":`${i(l)}-note-hint`,"aria-invalid":p.value>i(ss)},null,8,Ug),[[Xe,e.report.note]]),f("p",{id:`${i(l)}-note-hint`,class:"bcm-hint"},u(i(o)("report.noteHint"))+" "+u(i(o)("report.counter",{length:p.value,max:i(ss)})),9,qg)]),b.value?(d(),m("p",Bg,u(b.value),1)):A("",!0),f("div",Hg,[$[7]||($[7]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn",disabled:e.report.sending,onClick:$[3]||($[3]=v=>s("close"))},u(i(o)("report.cancel")),9,Vg),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!h.value},u(e.report.sending?i(o)("report.sending"):i(o)("report.submit")),9,Kg)])],64))],32)],8,Tg))}}),Zg=["lang","aria-labelledby"],Jg={class:"bcm-head"},Xg=["id"],Qg={key:0,class:"bcm-count"},ev={key:0,class:"bcm-muted",role:"status"},tv={key:1,class:"bcm-banner",role:"alert"},nv={key:0,class:"bcm-banner",role:"status"},ov=["disabled"],sv={key:1,class:"bcm-hint",role:"status"},iv={key:2,class:"bcm-muted"},rv={key:3,class:"bcm-thread"},av={key:4,class:"bcm-row"},lv=["disabled"],cv={class:"bcm-section"},uv={key:0,class:"bcm-hint"},dv={key:2,class:"bcm-row"},fv=["href"],mv={key:1,class:"bcm-row"},pv={key:4,class:"bcm-note"},hv={key:5,class:"bcm-section"},bv=["href"],gv={key:6,class:"bcm-note"},vv={key:7,class:"bcm-note",role:"status"},yv={key:8,class:"bcm-note"},_v=["href"],kv={class:"bcm-sr","aria-live":"polite"},ac=new WeakMap,wv=$e({inheritAttrs:!1,__name:"DiscussionView",props:{articleId:{},apiBase:{},siteBase:{},lang:{},signInHref:{},routes:{},pollMs:{},transport:{type:Function},realtime:{type:Function}},setup(e){const t=e,n=Vn(),s=ue(ze(t.lang,Ue())),{t:o,text:r}=gt(s);ye(()=>t.lang,K=>{s.value=ze(K,Ue())});const a=He("bcm-discussion"),l=ue(null),c=ue(0),p=Bt(null),h=z(()=>ht(t.siteBase));function b(){const K=t.articleId?.trim();if(!K)return Ft("article-id","[blogmcp-community] <blogmcp-discussion> needs an article-id"),null;if(h.value===null)return null;const D=bt(t.apiBase,t.transport,h.value);return D?vh({client:D,articleId:K,lang:s.value,pollMs:t.pollMs,realtime:typeof t.realtime=="function"?t.realtime:null,refusedAge:(n&&ac.get(n))??null,onAgeRefused:U=>{n&&ac.set(n,U)},onPosted:U=>n?.dispatchEvent(new CustomEvent("bcm-posted",{detail:{state:U},bubbles:!0,composed:!0}))}):null}const _=Re(new Set),$=Re(new Set),v=Re(new Set),I=ue(null),j=z(()=>Et(t.routes)),P=z(()=>Mt(j.value,p.value?.state.me?.links,h.value??""));sc({get ctl(){return p.value},routes:P,opened:_,originals:$,allReplies:v,focusHeading:()=>l.value,deleteMessage:K=>{I.value=K}});let T=null;const g=ue(null);let k=!1;async function O(){if(k||typeof location>"u")return;k=!0;const K=xl(location.hash),D=K===null?null:Io(K);if(K===null||D===null)return;const U=x.value?.thread.messages.find(Ne=>Ne.replies.some(De=>De.seq===K));U&&v.add(U.seq),await Fe();const Le=g.value?.querySelector(`#${D}`);typeof Le?.scrollIntoView=="function"&&Le.scrollIntoView({block:"start"})}function w(){k=!1,p.value?.dispose(),_.clear(),$.clear(),v.clear(),I.value=null,p.value=b(),c.value+=1,p.value?.start()}nt(()=>{w(),n&&typeof IntersectionObserver<"u"&&(T=new IntersectionObserver(K=>{const D=K[K.length-1];D&&p.value?.setInView(D.isIntersecting)},{rootMargin:"200px"}),T.observe(n))}),ye(()=>[t.articleId,t.apiBase,h.value,t.transport,t.realtime,t.pollMs,s.value],()=>w()),Ge(()=>{T?.disconnect(),p.value?.dispose(),p.value=null});const y=z(()=>p.value),x=z(()=>p.value?.state??null);ye(()=>x.value?.phase,K=>{K==="ready"&&O()});const N=z(()=>p.value?.mode()??"pending"),M=ue(null);ye(N,(K,D)=>{K==="write"&&D==="onboarding"&&Fe(()=>M.value?.focus()),K==="ageRefused"&&D==="onboarding"&&Fe(()=>l.value?.focus())});const E=z(()=>{const K=p.value?.needs();return K?.onboarding?"need.onboarding":K?.rules?"need.reconsent_rules":"need.art9_consent"});function B(){return En(t.signInHref,typeof location>"u"?null:location.pathname)}function ee(K){const D=K.endsAt?Pe(s.value,K.endsAt):"";return K.kind==="ban"?o("sanction.ban"):K.kind==="suspension"?D?o("sanction.suspensionUntil",{date:D}):o("sanction.suspension"):D?o("sanction.restrictionUntil",{date:D}):o("sanction.restriction")}const re=z(()=>{const K=x.value?.failure;if(!K)return"";const D=Ie(K,s.value);return o(D.key,D.params)}),be=ue("");ye(()=>x.value?.announceId,()=>{be.value="";const K=r(x.value?.announcement);Fe(()=>{be.value=K})});async function we(){const K=I.value;K===null||!p.value||(await p.value.remove(K),I.value=null)}return(K,D)=>y.value&&x.value&&x.value.phase!=="hidden"?(d(),m("section",{ref_key:"section",ref:g,key:c.value,class:"bcm bcm-discussion",lang:s.value,"aria-labelledby":i(a)},[f("header",Jg,[f("h2",{id:i(a),ref_key:"heading",ref:l,tabindex:"-1"},u(i(o)("discussion.title")),9,Xg),x.value.phase==="ready"?(d(),m("span",Qg,u(i(o)("discussion.count",{count:x.value.thread.count})),1)):A("",!0)]),x.value.phase==="loading"?(d(),m("p",ev,u(i(o)("discussion.loading")),1)):x.value.phase==="failed"?(d(),m("div",tv,[f("span",null,u(re.value),1),f("button",{type:"button",class:"bcm-btn",onClick:D[0]||(D[0]=U=>y.value.refresh())},u(i(o)("common.retry")),1)])):(d(),m(q,{key:2},[Ee(nc,{"reaction-set":x.value.thread.reactionSet,summary:x.value.thread.articleReactions,interactive:y.value.canReact(),busy:!!x.value.busy["react:article"],onReact:D[1]||(D[1]=U=>y.value&&y.value.react({articleId:x.value.thread.articleId??e.articleId??""},U))},null,8,["reaction-set","summary","interactive","busy"]),x.value.newMessages?(d(),m("div",nv,[f("span",null,u(i(o)("discussion.newMessages")),1),f("button",{type:"button",class:"bcm-btn",disabled:x.value.refreshing,onClick:D[2]||(D[2]=U=>y.value.refresh())},u(i(o)("discussion.refresh")),9,ov)])):A("",!0),x.value.realtimeOff?(d(),m("p",sv,u(i(o)("realtime.off")),1)):A("",!0),x.value.thread.messages.length===0?(d(),m("p",iv,u(i(o)("discussion.empty")),1)):(d(),m("ol",rv,[(d(!0),m(q,null,me(x.value.thread.messages,U=>(d(),_e(ic,{key:U.id,message:U},null,8,["message"]))),128))])),x.value.thread.nextCursor!==null?(d(),m("div",av,[f("button",{type:"button",class:"bcm-btn",disabled:x.value.loadingMore,onClick:D[3]||(D[3]=U=>y.value.loadMore())},u(i(o)("discussion.loadMore")),9,lv)])):A("",!0),f("div",cv,[N.value==="write"&&x.value.art9RefusedNote?(d(),m("p",uv,u(i(o)("onboarding.art9RefusedDone")),1)):A("",!0),N.value==="write"?(d(),_e(Co,{key:1,ref_key:"composer",ref:M,kind:"new",draft:x.value.composer,wait:y.value.waitLeft(x.value.composer),"rules-href":P.value.rulesPath,"mentions-max":y.value.mentionCap(),onSubmit:D[4]||(D[4]=U=>y.value.submit()),onConfirm:D[5]||(D[5]=(U,Le)=>y.value&&y.value.setConfirmed(x.value.composer,U,Le)),onConfirmed:D[6]||(D[6]=U=>y.value.sendConfirmed(x.value.composer))},null,8,["draft","wait","rules-href","mentions-max"])):N.value==="signIn"?(d(),m("div",dv,[f("p",null,u(i(o)("discussion.signInPrompt")),1),B()?(d(),m("a",{key:0,class:"bcm-btn bcm-primary",href:B()??void 0},u(i(o)("common.signIn")),9,fv)):A("",!0)])):N.value==="onboarding"?(d(),m(q,{key:3},[y.value.onboarding.value?(d(),_e(So,{key:0,model:y.value.onboarding.value,"rules-href":P.value.rulesPath,onCancel:D[7]||(D[7]=U=>y.value.cancelOnboarding())},null,8,["model","rules-href"])):(d(),m("div",mv,[f("p",null,u(i(o)(E.value)),1),f("button",{type:"button",class:"bcm-btn bcm-primary",onClick:D[8]||(D[8]=U=>y.value.beginOnboarding())},u(i(o)("onboarding.continue")),1)]))],64)):N.value==="ageRefused"?(d(),m("p",pv,u(i(o)("onboarding.ageBelow",{min:x.value.refusedAge??18})),1)):N.value==="sanction"?(d(),m("div",hv,[(d(!0),m(q,null,me(x.value.thread.viewer.restrictions,U=>(d(),m("p",{key:U.decisionId,class:"bcm-note"},[St(u(ee(U))+" ",1),i(Jn)(P.value.statementPath,U.decisionId)?(d(),m("a",{key:0,href:i(Jn)(P.value.statementPath,U.decisionId)??void 0},u(i(o)("sanction.statement")),9,bv)):A("",!0)]))),128))])):N.value==="notMoved"?(d(),m("p",gv,u(i(o)("error.notMoved")),1)):N.value==="braked"?(d(),m("p",vv,u(i(o)("state.braked")),1)):N.value==="restricted"?(d(),m("p",yv,[St(u(i(o)("error.restricted"))+" ",1),f("a",{href:P.value.myCommunityPath},u(i(o)("panel.title")),9,_v)])):A("",!0)])],64)),f("p",kv,u(be.value),1),x.value.report?(d(),_e(rc,{key:3,report:x.value.report,"my-community-href":P.value.myCommunityPath,"rules-href":P.value.rulesPath,"fallback-focus":()=>l.value,onSubmit:D[9]||(D[9]=U=>y.value.submitReport()),onClose:D[10]||(D[10]=U=>y.value.closeReport())},null,8,["report","my-community-href","rules-href","fallback-focus"])):A("",!0),I.value!==null?(d(),_e(ws,{key:4,title:"discussion.deleteTitle",explain:"discussion.deleteExplain",confirm:"discussion.deleteConfirm",danger:"",busy:!!x.value.busy[`delete:${I.value}`],"fallback-focus":()=>l.value,onConfirm:D[11]||(D[11]=U=>we()),onCancel:D[12]||(D[12]=U=>I.value=null)},null,8,["busy","fallback-focus"])):A("",!0)],8,Zg)):A("",!0)}}),$v=25;function $s(e){const{client:t,target:n,lang:s}=e,o=$o(n),r=new AbortController,a={signal:r.signal};let l=!1;const c=Re({phase:"idle",following:!1,busy:!1,failure:null,announcement:null,announceId:0}),p=b=>{c.announcement=b,c.announceId+=1};async function h(){let b=null,_=0;for(let $=0;$<$v;$++){const v=await t.me.follows.list(b===null?{}:{cursor:b},a);if(!v.ok)return v;for(const I of v.value.follows)if($o(I)===o)return!0;if(_+=v.value.follows.length,b=v.value.nextCursor,b===null||_>=Of)return!1}return!1}return{state:c,async load(b){if(c.failure=null,o===null){c.phase="unavailable";return}if(typeof b=="boolean"){c.following=b,c.phase="ready";return}c.phase="loading";const _=await h();if(!l){if(typeof _=="boolean"){c.following=_,c.phase="ready";return}c.phase=_.code==="signIn"?"signIn":"failed",c.failure=_}},sync(b){!c.busy&&c.phase==="ready"&&(c.following=b)},async toggle(){if(c.busy||c.phase!=="ready"||o===null)return;const b=!c.following;c.busy=!0,c.failure=null;const _=await t.me.follows.set({target:n,following:b},a);if(c.busy=!1,!l){if(_.ok){c.following=_.value.following,p({key:_.value.following?"follow.followed":"follow.unfollowed"});return}if(b&&_.code==="notFound"){c.phase="unavailable",p({key:"follow.unavailable"});return}if(_.code==="signIn"){c.phase="signIn";return}c.failure=_,p(Ie(_,s))}},dispose(){l=!0,r.abort()}}}const xv={class:"bcm-follow"},Iv=["aria-pressed","disabled"],Tv={key:1,class:"bcm-muted"},Cv={class:"bcm-sr","aria-live":"polite"},xs=$e({__name:"FollowToggle",props:{ctl:{}},setup(e){const t=e,{t:n,text:s}=vt(),o=ue("");return ye(()=>t.ctl.state.announceId,()=>{o.value=s(t.ctl.state.announcement)}),(r,a)=>(d(),m("span",xv,[e.ctl.state.phase==="ready"?(d(),m("button",{key:0,type:"button",class:"bcm-btn bcm-small","aria-pressed":e.ctl.state.following,disabled:e.ctl.state.busy,onClick:a[0]||(a[0]=l=>e.ctl.toggle())},u(e.ctl.state.following?i(n)("follow.following"):i(n)("follow.follow")),9,Iv)):e.ctl.state.phase==="unavailable"?(d(),m("span",Tv,u(i(n)("follow.unavailable")),1)):A("",!0),f("span",Cv,u(o.value),1)]))}}),Sv=["lang"],Av=$e({inheritAttrs:!1,__name:"FollowButtonView",props:{targetKind:{},targetId:{},following:{type:[String,Boolean],default:void 0},apiBase:{},siteBase:{},lang:{},transport:{}},setup(e){const t=e,n=ue(ze(t.lang,Ue()));gt(n);const s=Bt(null);function o(){const a=t.following;return a===!0||a==="true"||a===""?!0:a===!1||a==="false"?!1:null}function r(){s.value?.dispose(),s.value=null;const a=ml(t.targetKind,t.targetId);if(a===null){Ft("follow-target",'[blogmcp-community] <blogmcp-follow-button> needs target-kind ("conversation" or "category") and a target-id');return}const l=ht(t.siteBase),c=l===null?null:bt(t.apiBase,t.transport,l);c&&(s.value=$s({client:c,target:a,lang:n.value}),s.value.load(o()))}return nt(r),ye(()=>[t.targetKind,t.targetId,t.apiBase,t.siteBase,t.transport],r),ye(()=>t.following,()=>{const a=o();a!==null&&s.value?.sync(a)}),ye(()=>t.lang,a=>{n.value=ze(a,Ue())}),Ge(()=>s.value?.dispose()),(a,l)=>s.value&&(s.value.state.phase==="ready"||s.value.state.phase==="unavailable")?(d(),m("div",{key:0,class:"bcm-follow-host",lang:n.value},[Ee(xs,{ctl:s.value},null,8,["ctl"])],8,Sv)):A("",!0)}});function Is(e,t=Date.now()){const n=e?.module;if(!n)return{away:!1,paused:null,readOnly:!1};const s=Yn(n.state)?n.state:"dark",o=bl(n,"forum")?.brake??null,r=o!==null&&Date.parse(o.until)>t;return{away:np(n,t)!==null,paused:n.brake!==void 0||s==="braked"?"module":r?"forum":null,readOnly:s==="read_only"}}const Di=e=>e==="module"?"state.braked":e==="forum"?"state.forumBraked":null;function Ov(e){const t=(e?.needs??[]).filter(Wn);return!t.includes("sign_in")&&(t.includes("onboarding")||t.includes("reconsent_rules"))?"join":"signIn"}const lc=e=>!!e?.member&&!e.needs.includes("sign_in"),cc=()=>({title:"",body:"",sending:!1,failure:null,confirm:null,waitUntil:null,clientMsgId:null});function Ev(e){const{client:t,lang:n}=e,s=e.slug.trim().toLowerCase(),o=e.now??Date.now,r=new AbortController,a={signal:r.signal};let l=!1,c=0,p=null;const h=Bt(null),b=Re({phase:"loading",failure:null,me:null,category:null,header:null,items:[],nextCursor:null,sort:"activity",loadingMore:!1,sorting:!1,composer:cc(),created:null,creationClosed:!1,brakedBy:null,clock:o(),announcement:null,announceId:0}),_=y=>{b.announcement=y,b.announceId+=1};function $(y){b.failure=y,y.code==="surfaceOff"?b.phase="hidden":y.code==="membersOnly"?b.phase="membersOnly":y.code==="notFound"?b.phase="notFound":b.phase!=="ready"?b.phase="failed":_(Ie(y,n))}async function v(y){const x=await t.forum.topics.list({categorySlug:s,sort:b.sort,limit:za},a);return l||y!==c?!1:x.ok?(b.header={...x.value.category},b.items=$i(x.value.items),b.nextCursor=x.value.nextCursor,!0):($(x),!1)}async function I(){const y=++c;b.phase="loading",b.failure=null;const[x,N,M]=await Promise.all([t.me.get(a),t.forum.categories.list(a),v(y)]);l||y!==c||(x.ok&&(b.me=x.value),N.ok&&(b.category=N.value.categories.find(E=>E.slug===s)??null),b.brakedBy=null,M&&(b.phase="ready"))}function j(){b.clock=o(),!p&&(p=setInterval(()=>{b.clock=o();const y=b.composer;y.waitUntil!==null&&y.waitUntil<=b.clock&&(y.waitUntil=null,y.failure&&(y.failure.code==="fast"||y.failure.code==="quota")&&(y.failure=null)),y.waitUntil===null&&p&&(clearInterval(p),p=null)},1e3))}const P=()=>{const y=b.composer;return y.waitUntil===null?0:Math.max(0,Math.ceil((y.waitUntil-Math.max(b.clock,o()))/1e3))},T=()=>(b.category?.kind??b.header?.kind)==="topics";function g(){if(!T()||!lc(b.me))return null;if(b.category?.topicCreation!=="members"||b.creationClosed)return"team";const y=Is(b.me,o());return b.brakedBy!==null||y.paused!==null?"paused":y.readOnly?"readOnly":null}const k=()=>b.phase==="ready"&&T()&&lc(b.me)&&b.category?.topicCreation==="members"&&g()===null;function O(y={}){if(h.value||l)return;const x=ks({client:t,lang:n,signal:r.signal,forceArt9:y.forceArt9!==!1,onDone:N=>{b.me=N,h.value=null,_({key:x.state.art9RefusedSent?"onboarding.art9RefusedDone":"onboarding.done"})},onSignIn:()=>{h.value=null,I()}});h.value=x,x.load()}async function w(y){const x=b.composer;if(x.sending||P()>0||l||!b.category)return;const N=ki(x.title),M=Ze(x.body);if(N===null||M===""||lt(M)>In)return;x.sending=!0,x.failure=null;const E=x.clientMsgId??=as(),B=await t.forum.topics.create({categoryId:b.category.id,title:N,body:M,clientMsgId:E,languageCode:n,...y?{confirmations:y}:{}},a);if(!l){if(x.sending=!1,B.ok){const ee=B.value.message.state==="held";b.composer=cc(),b.created={conversationId:B.value.topic.conversationId,held:ee},_({key:ee?"topic.createdHeld":"topic.created"}),e.onCreated?.(b.created);const re=++c;await v(re);return}switch(x.failure=B,Bl(B.code)){case"confirm":B.codes&&B.codes.length>0&&(x.confirm={codes:[...B.codes],checked:[]});return;case"wait":x.waitUntil=Ni(B,o()),x.waitUntil!==null&&j(),B.code==="braked"&&(b.brakedBy=B.surface==="forum"?"forum":"module");return;case"onboard":O({forceArt9:!0});return;default:if(B.code==="topicCreationClosed")b.creationClosed=!0;else if(B.code==="membersOnly"||B.code==="surfaceOff"||B.code==="notFound")$(B);else if(B.code==="readOnly"||B.code==="signIn"||B.code==="restricted"||B.code==="suspended"||B.code==="terminated"){const ee=await t.me.get(a);!l&&ee.ok&&(b.me=ee.value)}}}}return{state:b,onboarding:h,load:I,async loadMore(){if(b.loadingMore||b.nextCursor===null||b.phase!=="ready")return;const y=c;b.loadingMore=!0;const x=await t.forum.topics.list({categorySlug:s,sort:b.sort,cursor:b.nextCursor,limit:za},a);if(b.loadingMore=!1,l||y!==c)return;if(!x.ok)return $(x);const N=new Set(b.items.map(M=>M.conversationId));b.items=[...b.items,...$i(x.value.items).filter(M=>!N.has(M.conversationId))],b.nextCursor=x.value.nextCursor},async setSort(y){if(b.sort===y||b.phase!=="ready")return;b.sort=y;const x=++c;b.sorting=!0,await v(x),x===c&&(b.sorting=!1)},canCreate:k,notCreating:g,create:()=>w(),setConfirmed(y,x){const N=b.composer.confirm;if(!N||!N.codes.includes(y))return;const M=N.checked.filter(E=>E!==y);N.checked=x?[...M,y]:M},async sendConfirmed(){const y=b.composer.confirm;!y||!y.codes.every(x=>y.checked.includes(x))||await w([...y.codes])},beginOnboarding:O,cancelOnboarding(){h.value=null},waitLeft:P,dispose(){l=!0,r.abort(),p&&clearInterval(p),p=null,h.value=null}}}const uc=Object.freeze({"composer.label":"forumText.composer.label","composer.editLabel":"forumText.composer.editLabel","composer.placeholder":"forumText.composer.placeholder","composer.tooLong":"forumText.composer.tooLong","composer.linksNote":"forumText.composer.linksNote","composer.posted":"forumText.composer.posted","composer.held":"forumText.composer.held","composer.cooldown":"forumText.composer.cooldown","discussion.empty":"forumText.discussion.empty","discussion.deleteTitle":"forumText.discussion.deleteTitle","discussion.deleteExplain":"forumText.discussion.deleteExplain","discussion.collapsed":"forumText.discussion.collapsed","discussion.heldNote":"forumText.discussion.heldNote","discussion.hiddenUntilConsentNote":"forumText.discussion.hiddenUntilConsentNote","discussion.removedNote":"forumText.discussion.removedNote","discussion.placeholderHeld":"forumText.discussion.placeholderHeld","discussion.placeholderRemoved":"forumText.discussion.placeholderRemoved","discussion.placeholderDeleted":"forumText.discussion.placeholderDeleted","report.title":"forumText.report.title","report.category":"forumText.report.category","error.links":"forumText.error.links","error.blocked":"forumText.error.blocked","error.confirm":"forumText.error.confirm","confirm.other":"forumText.confirm.other","warning.identifier":"forumText.warning.identifier","warning.other":"forumText.warning.other","need.onboarding":"forumText.need.onboarding","need.art9_consent":"forumText.need.art9_consent"}),Mv={key:0,class:"bcm-note",role:"status"},Pv={key:1,class:"bcm-note",role:"status"},Rv={key:2,class:"bcm-note",role:"status"},Fi=$e({__name:"ForumNotices",props:{me:{},now:{}},setup(e){const t=e,{t:n}=vt(),s=z(()=>Is(t.me,t.now)),o=z(()=>Di(s.value.paused));return(r,a)=>(d(),m(q,null,[o.value?(d(),m("p",Mv,u(i(n)(o.value)),1)):s.value.readOnly?(d(),m("p",Pv,u(i(n)("error.readOnly")),1)):A("",!0),s.value.away?(d(),m("p",Rv,u(i(n)("state.away")),1)):A("",!0)],64))}}),Nv={class:"bcm-section"},jv={class:"bcm-note"},zv={key:1,class:"bcm-row"},Lv={key:2,class:"bcm-row"},Dv=["href"],Ts=$e({__name:"MembersOnly",props:{failure:{},client:{},lang:{},signInHref:{},rulesHref:{}},emits:["joined"],setup(e,{emit:t}){const n=e,s=t,{t:o}=vt(),r=z(()=>Ov(n.failure)),a=Bt(null),l=new AbortController;Ge(()=>l.abort());function c(){return En(n.signInHref,typeof location>"u"?null:location.pathname)}function p(){if(a.value)return;const h=ks({client:n.client,lang:n.lang,signal:l.signal,onDone:()=>{a.value=null,s("joined")},onSignIn:()=>{a.value=null}});a.value=h,h.load()}return(h,b)=>(d(),m("div",Nv,[f("p",jv,u(i(o)("error.membersOnly")),1),a.value?(d(),_e(So,{key:0,model:a.value,"rules-href":e.rulesHref,onCancel:b[0]||(b[0]=_=>a.value=null)},null,8,["model","rules-href"])):r.value==="join"?(d(),m("div",zv,[f("button",{type:"button",class:"bcm-btn bcm-primary",onClick:p},u(i(o)("forum.join")),1)])):c()?(d(),m("div",Lv,[f("a",{class:"bcm-btn bcm-primary",href:c()??void 0},u(i(o)("common.signIn")),9,Dv)])):A("",!0)]))}}),Fv={class:"bcm-topic-row"},Uv={class:"bcm-topic-title"},qv=["href"],Bv={class:"bcm-row bcm-muted"},Hv={key:0,class:"bcm-badge"},Vv={key:1,class:"bcm-badge"},Kv={key:2,class:"bcm-badge"},Wv={key:3},Yv=["datetime"],Gv={class:"bcm-topic-title"},Zv=["href"],Jv={key:1},Xv={class:"bcm-row bcm-muted"},Qv=["datetime"],dc=$e({__name:"TopicRow",props:{item:{},topicHref:{},articleHref:{},follow:{}},setup(e){const t=e,{t:n,lang:s}=vt(),o=z(()=>t.item.kind==="topic"?ms(t.item):null),r=z(()=>{const h=o.value;return h?h.kind==="shown"?h.text:n(h.kind==="deleted"?"topic.deleted":"topic.withheld"):""}),a=z(()=>t.item.kind==="topic"?xo(t.topicHref,t.item.conversationId):null),l=z(()=>t.item.kind==="article"?Il(t.articleHref,t.item.articleSlug):null),c=z(()=>t.item.kind!=="topic"?null:t.item.state==="locked"?"topic.locked":t.item.state==="archived"?"topic.archived":null),p=z(()=>{if(t.item.kind!=="topic")return null;const h=t.item.author;return h.kind==="member"?"displayName"in h&&h.displayName?h.displayName:n("author.deleted"):h.kind==="staff"&&"displayName"in h?h.displayName:null});return(h,b)=>(d(),m("li",Fv,[e.item.kind==="topic"?(d(),m(q,{key:0},[f("p",Uv,[a.value?(d(),m("a",{key:0,href:a.value,class:Ve({"bcm-placeholder":o.value?.kind!=="shown"})},u(r.value),11,qv)):(d(),m("span",{key:1,class:Ve({"bcm-placeholder":o.value?.kind!=="shown"})},u(r.value),3))]),f("p",Bv,[e.item.pinned?(d(),m("span",Hv,u(i(n)("topic.pinned")),1)):A("",!0),c.value?(d(),m("span",Vv,u(i(n)(c.value)),1)):A("",!0),e.item.openingState==="held"&&o.value?.kind==="shown"?(d(),m("span",Kv,u(i(n)("state.held")),1)):A("",!0),p.value?(d(),m("span",Wv,u(p.value),1)):A("",!0),f("span",null,u(i(n)("topic.count",{count:e.item.count})),1),f("time",{datetime:e.item.lastActivityAt},u(i(n)("forum.lastActivity",{date:i(Pe)(i(s),e.item.lastActivityAt)})),9,Yv)])],64)):(d(),m(q,{key:1},[f("p",Gv,[l.value?(d(),m("a",{key:0,href:l.value},u(e.item.articleTitle??i(n)("search.inArticle")),9,Zv)):(d(),m("span",Jv,u(e.item.articleTitle??i(n)("search.inArticle")),1))]),f("p",Xv,[f("span",null,u(i(n)("discussion.count",{count:e.item.count})),1),f("time",{datetime:e.item.lastActivityAt},u(i(n)("forum.lastActivity",{date:i(Pe)(i(s),e.item.lastActivityAt)})),9,Qv),e.follow?(d(),_e(xs,{key:0,ctl:e.follow},null,8,["ctl"])):A("",!0)])],64))]))}}),ey=["lang","aria-labelledby"],ty={class:"bcm-row"},ny=["href"],oy=["id"],sy=["id"],iy=["id"],ry={key:3,class:"bcm-banner",role:"alert"},ay=["id"],ly={class:"bcm-head"},cy=["id"],uy={key:0,class:"bcm-text"},dy={key:1,class:"bcm-hint"},fy={key:2,class:"bcm-row"},my=["for"],py=["id","value","disabled"],hy={value:"activity"},by={value:"new"},gy={key:3,class:"bcm-muted"},vy=["aria-busy"],yy={key:5,class:"bcm-row"},_y=["disabled"],ky=["aria-labelledby"],wy={key:0,class:"bcm-note"},$y=["href"],xy={key:1,class:"bcm-new-topic"},Iy=["id"],Ty={key:2,class:"bcm-hint"},Cy={key:3,class:"bcm-note",role:"status"},Sy={class:"bcm-sr","aria-live":"polite"},Ay=$e({inheritAttrs:!1,__name:"ForumCategoryView",props:{slug:{},apiBase:{},siteBase:{},lang:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=Vn(),s=ue(ze(t.lang,Ue())),{t:o,text:r}=gt(s,uc),a=He("bcm-category"),l=ht(t.siteBase),c=l===null?null:bt(t.apiBase,t.transport,l);function p(){const E=t.slug?.trim();return E?c?Ev({client:c,slug:E,lang:s.value,onCreated:B=>n?.dispatchEvent(new CustomEvent("bcm-topic-created",{detail:{conversationId:B.conversationId,state:B.held?"held":"visible"},bubbles:!0,composed:!0}))}):null:(Ft("category-slug","[blogmcp-community] <blogmcp-forum-category> needs a slug"),null)}const h=Bt(null),b=z(()=>h.value?.state??null),_=z(()=>Mt(Et(t.routes),b.value?.me?.links,l??"")),$=Bt(null),v=new Map;function I(){$.value?.dispose(),$.value=null;for(const E of v.values())E.dispose();v.clear()}function j(){h.value?.dispose(),I(),h.value=p(),h.value?.load()}nt(j),ye(()=>[t.slug,s.value],j),ye(()=>t.lang,E=>{s.value=ze(E,Ue())}),Ge(()=>{h.value?.dispose(),I()}),ye(()=>b.value?.category,E=>{!E||!c||($.value||($.value=$s({client:c,target:{categoryId:E.id},lang:s.value})),$.value.state.phase==="idle"?$.value.load(E.following):$.value.sync(E.following))}),ye(()=>b.value?.items,E=>{if(!(!E||!c))for(const B of E){if(B.kind!=="article")continue;const ee=$o({conversationId:B.conversationId});if(ee===null||v.has(ee))continue;const re=$s({client:c,target:{conversationId:B.conversationId},lang:s.value});v.set(ee,re),re.load(B.following)}});function P(E){if(E.kind!=="article")return null;const B=$o({conversationId:E.conversationId});return B===null?null:v.get(B)??null}const T=z(()=>b.value?.category?.name??b.value?.header?.name??""),g=z(()=>(b.value?.category?.kind??b.value?.header?.kind)==="article_discussions"),k=z(()=>h.value?.notCreating()??null),O=z(()=>b.value&&Is(b.value.me).paused===null?Di(b.value.brakedBy):null),w=z(()=>b.value?.created?xo(_.value.topicPath,b.value.created.conversationId):null),y=z(()=>{const E=b.value?.failure;if(!E)return"";const B=Ie(E,s.value);return o(B.key,B.params)});function x(E){h.value?.setSort(E.target.value)}const N=ue(null),M=ue("");return ye(()=>b.value?.announceId,()=>{M.value="";const E=r(b.value?.announcement);Fe(()=>{M.value=E})}),(E,B)=>h.value&&b.value&&b.value.phase!=="hidden"?(d(),m("section",{key:0,class:"bcm bcm-forum-category",lang:s.value,"aria-labelledby":`${i(a)}-title`},[f("nav",ty,[f("a",{href:_.value.forumPath},u(i(o)("forum.back")),9,ny)]),b.value.phase==="loading"?(d(),m("p",{key:0,id:`${i(a)}-title`,class:"bcm-muted",role:"status"},u(i(o)("forum.loading")),9,oy)):b.value.phase==="membersOnly"&&i(c)?(d(),m("div",{key:1,id:`${i(a)}-title`},[Ee(Ts,{failure:b.value.failure,client:i(c),lang:s.value,"sign-in-href":e.signInHref,"rules-href":_.value.rulesPath,onJoined:B[0]||(B[0]=ee=>h.value.load())},null,8,["failure","client","lang","sign-in-href","rules-href"])],8,sy)):b.value.phase==="notFound"?(d(),m("p",{key:2,id:`${i(a)}-title`,class:"bcm-note"},u(i(o)("forumCategory.notFound")),9,iy)):b.value.phase==="failed"?(d(),m("div",ry,[f("span",{id:`${i(a)}-title`},u(y.value),9,ay),f("button",{type:"button",class:"bcm-btn",onClick:B[1]||(B[1]=ee=>h.value.load())},u(i(o)("common.retry")),1)])):b.value.phase==="ready"?(d(),m(q,{key:4},[f("header",ly,[f("h2",{id:`${i(a)}-title`},u(T.value),9,cy),$.value?(d(),_e(xs,{key:0,ctl:$.value},null,8,["ctl"])):A("",!0)]),b.value.category?.description?(d(),m("p",uy,u(b.value.category.description),1)):A("",!0),Ee(Fi,{me:b.value.me},null,8,["me"]),b.value.category?.mode==="pre"?(d(),m("p",dy,u(i(o)("forum.modePre")),1)):A("",!0),g.value?A("",!0):(d(),m("div",fy,[f("label",{for:`${i(a)}-sort`},u(i(o)("forumCategory.sort")),9,my),f("select",{id:`${i(a)}-sort`,class:"bcm-input bcm-select",value:b.value.sort,disabled:b.value.sorting,onChange:x},[f("option",hy,u(i(o)("forumCategory.sortActivity")),1),f("option",by,u(i(o)("forumCategory.sortNew")),1)],40,py)])),b.value.items.length===0?(d(),m("p",gy,u(g.value?i(o)("forumCategory.articlesEmpty"):i(o)("forumCategory.empty")),1)):(d(),m("ul",{key:4,class:"bcm-topics","aria-busy":b.value.sorting},[(d(!0),m(q,null,me(b.value.items,ee=>(d(),_e(dc,{key:ee.conversationId,item:ee,"topic-href":_.value.topicPath,"article-href":_.value.articlePath,follow:P(ee)},null,8,["item","topic-href","article-href","follow"]))),128))],8,vy)),b.value.nextCursor!==null?(d(),m("div",yy,[f("button",{type:"button",class:"bcm-btn",disabled:b.value.loadingMore,onClick:B[2]||(B[2]=ee=>h.value.loadMore())},u(i(o)("discussion.loadMore")),9,_y)])):A("",!0),g.value?A("",!0):(d(),m("section",{key:6,class:"bcm-section","aria-labelledby":`${i(a)}-new`},[b.value.created?(d(),m("p",wy,[St(u(b.value.created.held?i(o)("topic.createdHeld"):i(o)("topic.created"))+" ",1),w.value?(d(),m("a",{key:0,href:w.value},u(i(o)("topic.open")),9,$y)):A("",!0)])):A("",!0),h.value.canCreate()?(d(),m("div",xy,[f("h3",{id:`${i(a)}-new`},u(i(o)("forumCategory.newTopic")),9,Iy),h.value.onboarding.value?(d(),_e(So,{key:0,model:h.value.onboarding.value,"rules-href":_.value.rulesPath,onCancel:B[3]||(B[3]=ee=>h.value.cancelOnboarding())},null,8,["model","rules-href"])):(d(),_e(Co,{key:1,ref_key:"composerRef",ref:N,kind:"topic",draft:b.value.composer,wait:h.value.waitLeft(),"rules-href":_.value.rulesPath,onSubmit:B[4]||(B[4]=ee=>h.value.create()),onConfirm:B[5]||(B[5]=(ee,re)=>h.value&&h.value.setConfirmed(ee,re)),onConfirmed:B[6]||(B[6]=ee=>h.value.sendConfirmed())},null,8,["draft","wait","rules-href"]))])):k.value==="team"?(d(),m("p",Ty,u(i(o)("forum.teamTopics")),1)):k.value==="paused"&&O.value?(d(),m("p",Cy,u(i(o)(O.value)),1)):A("",!0)],8,ky))],64)):A("",!0),f("p",Sy,u(M.value),1)],8,ey)):A("",!0)}}),fc=4e3,Oy=20;function Ey(e){const{client:t,lang:n}=e,s=new AbortController,o={signal:s.signal};let r=!1,a=0;const l=Re({phase:"loading",failure:null,me:null,categoryId:e.categoryId?.toLowerCase()??"",categories:[],items:[],nextCursor:null,loadingMore:!1,rules:null,open:null,review:null,announcement:null,announceId:0}),c=g=>{l.announcement=g,l.announceId+=1},p=()=>[...l.me?.moderator?.categoryIds??[]].map(g=>g.toLowerCase());function h(g){l.items=l.items.filter(k=>k!==g),c({key:"moderation.gone"})}const b=g=>({...l.categoryId!==""?{categoryId:l.categoryId}:{},...g?{cursor:g}:{}});async function _(g){const k=await t.moderation.queue(b(null),o);if(!(r||g!==a)){if(!k.ok){l.failure=k,l.phase=k.code==="notFound"?"none":k.code==="surfaceOff"?"hidden":k.code==="membersOnly"?"membersOnly":"failed";return}l.items=[...k.value.items],l.nextCursor=k.value.nextCursor,l.phase="ready"}}async function $(){if(l.rules!==null)return;const g=await t.legal.current({kind:"rules",locale:n},o);!r&&g.ok&&(l.rules=Gn(g.value.bodyJson))}async function v(){const g=++a;l.phase="loading",l.failure=null;const k=await t.me.get(o);if(r||g!==a)return;if(!k.ok){l.failure=k,l.phase="failed";return}if(l.me=k.value,p().length===0){l.phase="none";return}const O=await t.forum.categories.list(o);r||g!==a||(O.ok&&(l.categories=O.value.categories.filter(w=>p().includes(w.id.toLowerCase()))),$(),l.categoryId!==""&&!p().includes(l.categoryId)&&(l.categoryId=""),await _(g))}const I=g=>{const k=l.open;return{caseId:k.item.caseId,restriction:k.restriction,basis:k.item.source==="member_report"?"notice":"own_initiative",facts:Ze(k.facts),...k.ground!==""?{contractualGround:k.ground}:{},locale:n,dryRun:g}};function j(){const g=l.open;if(!g||!g.kase||g.restriction===""||g.previewing||g.deciding||g.decided)return!1;const k=Ze(g.facts);return k===""||lt(k)>fc?!1:g.restriction==="no_action"||g.ground!==""||g.kase.ruleId!==null&&!g.needsRule}async function P(g){const k=w=>w.kind==="premod"&&w.conversationId===g.item.conversationId&&w.seq===g.item.seq;let O=null;for(let w=0;w<Oy;w++){const y=await t.moderation.queue(b(O),o);if(r||l.review!==g||!y.ok)return;const x=y.value.items.find(k);if(x){if(x.rev===g.item.rev)return;l.items=l.items.map(N=>k(N)?x:N),g.item=x,g.failure=null,g.changed=!0,c({key:"moderation.textChanged"});return}if(O=y.value.nextCursor,O===null)break}l.review=null,h(g.item)}function T(g,k){if(g.failure=k,k.code==="invalid"&&k.fields?.includes("contractualGround")){g.needsRule=!0,$();return}k.code==="notFound"&&(l.open=null,h(g.item))}return{state:l,load:v,async loadMore(){if(l.loadingMore||l.nextCursor===null||l.phase!=="ready")return;const g=a;l.loadingMore=!0;const k=await t.moderation.queue(b(l.nextCursor),o);if(l.loadingMore=!1,!(r||g!==a)){if(!k.ok)return c(Ie(k,n));l.items=[...l.items,...k.value.items],l.nextCursor=k.value.nextCursor}},async setCategory(g){const k=g.toLowerCase();if(k===l.categoryId||k!==""&&!p().includes(k))return;l.categoryId=k;const O=++a;await _(O)},async openCase(g){if(g.kind!=="case"||!g.caseId)return;l.review=null,l.open={item:g,kase:null,loading:!0,restriction:"",facts:"",ground:"",needsRule:!1,preview:null,previewing:!1,deciding:!1,failure:null,decided:!1,escalation:null};const k=l.open;$();const O=await t.moderation.getCase({caseId:g.caseId},o);r||l.open!==k||(k.loading=!1,O.ok?k.kase=O.value.case:T(k,O))},closeCase(){l.open=null},canPreview:j,async preview(){const g=l.open;if(!g||!j())return;g.previewing=!0,g.failure=null;const k=await t.moderation.decide(I(!0),o);g.previewing=!1,!(r||l.open!==g)&&(k.ok?g.preview=k.value.statement:T(g,k))},async decide(){const g=l.open;if(!g||g.preview===null||g.deciding||g.decided)return;g.deciding=!0,g.failure=null;const k=await t.moderation.decide(I(!1),o);if(g.deciding=!1,!(r||l.open!==g)){if(!k.ok)return T(g,k);g.decided=!0,g.preview=k.value.statement,l.items=l.items.filter(O=>O!==g.item),c({key:"moderation.decided"})}},startEscalation(){const g=l.open;g&&!g.escalation&&(g.escalation={category:"",sending:!1,failure:null,done:!1})},async escalate(){const g=l.open,k=g?.escalation;if(!g||!k||k.sending||k.done||k.category===""||!ls.includes(k.category))return;k.sending=!0,k.failure=null;const O=await t.moderation.escalate({conversationId:g.item.conversationId,seq:g.item.seq,category:k.category},o);if(k.sending=!1,!(r||l.open!==g)){if(O.ok){k.done=!0,c({key:"moderation.escalated"});return}k.failure=O,O.code==="notFound"&&(l.open=null,h(g.item))}},openReview(g,k){g.kind==="premod"&&(l.open=null,l.review={item:g,outcome:k,ruleId:"",facts:"",sending:!1,failure:null,statement:null,done:null,changed:!1},k==="reject"&&$())},closeReview(){l.review=null},async review(){const g=l.review;if(!g||g.sending||g.done||g.outcome==="")return;const k=Ze(g.facts);if(g.outcome==="reject"&&(g.ruleId===""||k===""||lt(k)>fc))return;g.sending=!0,g.failure=null,g.changed=!1;const O={conversationId:g.item.conversationId,seq:g.item.seq,rev:g.item.rev??1},w=g.outcome==="approve"?await t.moderation.reviewPremod({...O,outcome:"approve"},o):await t.moderation.reviewPremod({...O,outcome:"reject",ruleId:g.ruleId,facts:k,locale:n},o);if(g.sending=!1,!(r||l.review!==g)){if(!w.ok){if(g.failure=w,w.code==="notFound"){l.review=null,h(g.item);return}await P(g);return}g.done=g.outcome==="approve"?"approved":"rejected","statement"in w.value&&(g.statement=w.value.statement),l.items=l.items.filter(y=>y!==g.item),c({key:g.done==="approved"?"moderation.approved":"moderation.rejected"})}},dispose(){r=!0,s.abort()}}}const My=["lang","aria-labelledby"],Py={class:"bcm-head"},Ry=["id"],Ny={key:0,class:"bcm-muted",role:"status"},jy={key:1,class:"bcm-banner",role:"alert"},zy={key:0,class:"bcm-row"},Ly=["for"],Dy=["id","value"],Fy={value:""},Uy=["value"],qy={key:1,class:"bcm-muted"},By={key:2,class:"bcm-list"},Hy={class:"bcm-row"},Vy={class:"bcm-badge"},Ky={key:0},Wy={key:1,class:"bcm-muted"},Yy={key:0,class:"bcm-hint"},Gy={key:0,class:"bcm-topic-title"},Zy={key:1,class:"bcm-text"},Jy={key:2,class:"bcm-muted"},Xy={class:"bcm-row bcm-muted"},Qy=["datetime"],e_={key:0},t_={class:"bcm-row"},n_=["href"],o_=["onClick"],s_=["onClick"],i_=["onClick"],r_={key:3,class:"bcm-row"},a_=["disabled"],l_=["aria-labelledby"],c_=["id"],u_={key:0,class:"bcm-muted",role:"status"},d_={key:1,class:"bcm-list"},f_={key:0,class:"bcm-topic-title"},m_={key:1,class:"bcm-topic-title bcm-placeholder"},p_={key:2,class:"bcm-text"},h_={key:3,class:"bcm-placeholder"},b_={key:4,class:"bcm-row bcm-muted"},g_={key:0,class:"bcm-handle"},v_=["datetime"],y_={class:"bcm-fieldset"},__=["value"],k_={class:"bcm-field"},w_=["for"],$_=["id","aria-describedby"],x_=["id"],I_={key:0,class:"bcm-field"},T_=["for"],C_=["id","aria-invalid"],S_={value:"",disabled:""},A_=["value"],O_={key:1,class:"bcm-error",role:"alert"},E_={class:"bcm-facts"},M_={class:"bcm-row"},P_=["disabled"],R_=["disabled"],N_={class:"bcm-facts"},j_={class:"bcm-row"},z_={key:4,class:"bcm-section"},L_={class:"bcm-field"},D_=["for"],F_=["id"],U_={value:"",disabled:""},q_=["value"],B_={key:0,class:"bcm-error",role:"alert"},H_={class:"bcm-row"},V_=["disabled"],K_={key:2},W_=["aria-labelledby"],Y_=["id"],G_={key:0,class:"bcm-facts"},Z_={class:"bcm-row"},J_={key:0,class:"bcm-banner",role:"alert"},X_={key:1,class:"bcm-topic-title"},Q_={key:2,class:"bcm-text"},ek={class:"bcm-field"},tk=["for"],nk=["id"],ok={value:"",disabled:""},sk=["value"],ik={class:"bcm-field"},rk=["for"],ak=["id","aria-describedby"],lk=["id"],ck={key:4,class:"bcm-error",role:"alert"},uk={class:"bcm-row"},dk=["disabled"],fk=["disabled"],mk={class:"bcm-sr","aria-live":"polite"},pk=$e({inheritAttrs:!1,__name:"ForumModerationView",props:{categoryId:{},apiBase:{},siteBase:{},lang:{},routes:{},transport:{type:Function}},setup(e){const t=e,n=ue(ze(t.lang,Ue())),{t:s,text:o}=gt(n),r=He("bcm-moderation");ye(()=>t.lang,N=>{n.value=ze(N,Ue())});const a=ht(t.siteBase),l=a===null?null:bt(t.apiBase,t.transport,a),c=l?Ey({client:l,lang:n.value,categoryId:t.categoryId??null}):null,p=c?.state??null,h=z(()=>Mt(Et(t.routes),p?.me?.links,a??""));function b(N){const M=ms({title:N.title??null,openingState:N.openingState});return M.kind==="shown"?M.text:s(M.kind==="deleted"?"topic.deleted":"topic.withheld")}nt(()=>{c?.load()}),Ge(()=>c?.dispose());const _=Qf,$=N=>`restriction.${N}`,v=N=>`category.${N}`,I=N=>{const M=N===null?null:`category.${N}`;return M!==null&&Xn(M)?s(M):""},j=N=>{const M=N.source===null?null:`moderation.source.${N.source}`;return M!==null&&Xn(M)?s(M):""},P=N=>p?.categories.find(M=>M.id.toLowerCase()===N.toLowerCase())?.name??"",T=N=>N===null?"":p?.rules?.find(M=>M.id===N)?.title??N,g=N=>Ii(h.value.topicPath,N.conversationId,N.seq),k=N=>{if(!N)return"";const M=Ie(N,n.value);return s(M.key,M.params)},O=z(()=>p?.open??null),w=z(()=>p?.review??null),y=z(()=>{const N=O.value;return!!N&&N.restriction!==""&&N.restriction!=="no_action"&&(N.needsRule||N.kase?.ruleId===null)});ye(()=>[O.value?.restriction,O.value?.facts,O.value?.ground],()=>{const N=O.value;N&&!N.decided&&(N.preview=null)});const x=ue("");return ye(()=>p?.announceId,()=>{x.value="";const N=o(p?.announcement);Fe(()=>{x.value=N})}),(N,M)=>i(c)&&i(p)&&i(p).phase!=="none"&&i(p).phase!=="hidden"&&i(p).phase!=="membersOnly"?(d(),m("section",{key:0,class:"bcm bcm-forum-moderation",lang:n.value,"aria-labelledby":`${i(r)}-title`},[f("header",Py,[f("h2",{id:`${i(r)}-title`},u(i(s)("moderation.title")),9,Ry)]),i(p).phase==="loading"?(d(),m("p",Ny,u(i(s)("moderation.loading")),1)):i(p).phase==="failed"?(d(),m("div",jy,[f("span",null,u(k(i(p).failure)),1),f("button",{type:"button",class:"bcm-btn",onClick:M[0]||(M[0]=E=>i(c).load())},u(i(s)("common.retry")),1)])):(d(),m(q,{key:2},[i(p).categories.length>1?(d(),m("div",zy,[f("label",{for:`${i(r)}-category`},u(i(s)("search.category")),9,Ly),f("select",{id:`${i(r)}-category`,class:"bcm-input bcm-select",value:i(p).categoryId,onChange:M[1]||(M[1]=E=>i(c).setCategory(E.target.value))},[f("option",Fy,u(i(s)("forum.allCategories")),1),(d(!0),m(q,null,me(i(p).categories,E=>(d(),m("option",{key:E.id,value:E.id},u(E.name),9,Uy))),128))],40,Dy)])):A("",!0),i(p).items.length===0?(d(),m("p",qy,u(i(s)("moderation.empty")),1)):(d(),m("ul",By,[(d(!0),m(q,null,me(i(p).items,E=>(d(),m("li",{key:`${E.kind}:${E.caseId??""}:${E.conversationId}:${E.seq}`},[f("p",Hy,[f("span",Vy,u(E.kind==="premod"?i(s)("moderation.premod"):j(E)),1),E.kind==="case"&&I(E.caseCategory)?(d(),m("strong",Ky,u(I(E.caseCategory)),1)):A("",!0),P(E.categoryId)?(d(),m("span",Wy,u(P(E.categoryId)),1)):A("",!0)]),E.caseStatus==="decided"?(d(),m("p",Yy,u(i(s)("moderation.heldBySystem")),1)):A("",!0),E.kind==="premod"?(d(),m(q,{key:1},[E.title?(d(),m("p",Gy,u(E.title),1)):A("",!0),E.body!==null?(d(),m("p",Zy,u(E.body),1)):A("",!0)],64)):A("",!0),E.ruleId?(d(),m("p",Jy,u(i(s)("statement.contractualGround"))+": "+u(T(E.ruleId)),1)):A("",!0),f("p",Xy,[f("time",{datetime:E.createdAt},u(i(Pe)(n.value,E.createdAt)),9,Qy),E.deadlineAt?(d(),m("span",e_,u(i(s)("moderation.deadline",{date:i(Pe)(n.value,E.deadlineAt)})),1)):A("",!0)]),f("div",t_,[g(E)?(d(),m("a",{key:0,href:g(E)??void 0},u(i(s)("moderation.openTopic")),9,n_)):A("",!0),M[17]||(M[17]=f("span",{class:"bcm-spacer"},null,-1)),E.kind==="case"?(d(),m("button",{key:1,type:"button",class:"bcm-btn bcm-small",onClick:B=>i(c).openCase(E)},u(i(s)("moderation.open")),9,o_)):(d(),m(q,{key:2},[f("button",{type:"button",class:"bcm-btn bcm-small",onClick:B=>i(c).openReview(E,"approve")},u(i(s)("moderation.approve")),9,s_),f("button",{type:"button",class:"bcm-btn bcm-small bcm-danger",onClick:B=>i(c).openReview(E,"reject")},u(i(s)("moderation.reject")),9,i_)],64))])]))),128))])),i(p).nextCursor!==null?(d(),m("div",r_,[f("button",{type:"button",class:"bcm-btn",disabled:i(p).loadingMore,onClick:M[2]||(M[2]=E=>i(c).loadMore())},u(i(s)("discussion.loadMore")),9,a_)])):A("",!0),O.value?(d(),m("section",{key:4,class:"bcm-card","aria-labelledby":`${i(r)}-case`},[f("h3",{id:`${i(r)}-case`},u(i(s)("moderation.package")),9,c_),O.value.loading?(d(),m("p",u_,u(i(s)("common.loading")),1)):O.value.kase?(d(),m("ol",d_,[(d(!0),m(q,null,me(O.value.kase.items,E=>(d(),m("li",{key:E.itemNo},[E.title?(d(),m("p",f_,u(E.title),1)):E.title===null?(d(),m("p",m_,u(b(E)),1)):A("",!0),E.body!==null?(d(),m("p",p_,u(E.body),1)):(d(),m("p",h_,u(i(s)("moderation.itemWithheld")),1)),E.authorHandle||E.createdAt?(d(),m("p",b_,[E.authorHandle?(d(),m("span",g_,u(E.authorHandle),1)):A("",!0),E.createdAt?(d(),m("time",{key:1,datetime:E.createdAt},u(i(Pe)(n.value,E.createdAt)),9,v_)):A("",!0)])):A("",!0)]))),128))])):A("",!0),O.value.kase&&!O.value.decided?(d(),m("form",{key:2,class:"bcm-form",novalidate:"",onSubmit:M[7]||(M[7]=mt(E=>O.value.preview===null?i(c).preview():i(c).decide(),["prevent"]))},[f("fieldset",y_,[f("legend",null,u(i(s)("moderation.restriction")),1),(d(!0),m(q,null,me(i(_),E=>(d(),m("label",{key:E,class:"bcm-check"},[ge(f("input",{"onUpdate:modelValue":M[3]||(M[3]=B=>O.value.restriction=B),type:"radio",value:E},null,8,__),[[xn,O.value.restriction]]),f("span",null,u(i(s)($(E))),1)]))),128))]),f("div",k_,[f("label",{for:`${i(r)}-facts`},u(i(s)("statement.facts")),9,w_),ge(f("textarea",{id:`${i(r)}-facts`,"onUpdate:modelValue":M[4]||(M[4]=E=>O.value.facts=E),class:"bcm-input bcm-textarea",rows:"4","aria-describedby":`${i(r)}-facts-hint`},null,8,$_),[[Xe,O.value.facts]]),f("p",{id:`${i(r)}-facts-hint`,class:"bcm-hint"},u(i(s)("moderation.factsHint")),9,x_)]),y.value||O.value.ground!==""?(d(),m("div",I_,[f("label",{for:`${i(r)}-ground`},u(i(s)("statement.contractualGround")),9,T_),ge(f("select",{id:`${i(r)}-ground`,"onUpdate:modelValue":M[5]||(M[5]=E=>O.value.ground=E),class:"bcm-input bcm-select","aria-invalid":O.value.needsRule&&O.value.ground===""},[f("option",S_,u(i(s)("moderation.ruleRequired")),1),(d(!0),m(q,null,me(i(p).rules??[],E=>(d(),m("option",{key:E.id,value:E.id},u(E.title),9,A_))),128))],8,C_),[[Wt,O.value.ground]])])):A("",!0),O.value.failure?(d(),m("p",O_,u(O.value.needsRule?i(s)("moderation.ruleRequired"):k(O.value.failure)),1)):A("",!0),O.value.preview!==null?(d(),m(q,{key:2},[f("h4",null,u(i(s)("moderation.previewTitle")),1),f("pre",E_,u(O.value.preview),1)],64)):A("",!0),f("div",M_,[f("button",{type:"button",class:"bcm-btn",onClick:M[6]||(M[6]=E=>i(c).closeCase())},u(i(s)("common.close")),1),M[18]||(M[18]=f("span",{class:"bcm-spacer"},null,-1)),O.value.preview===null?(d(),m("button",{key:0,type:"submit",class:"bcm-btn",disabled:!i(c).canPreview()},u(i(s)("moderation.preview")),9,P_)):(d(),m("button",{key:1,type:"submit",class:"bcm-btn bcm-primary",disabled:O.value.deciding},u(i(s)("moderation.decide")),9,R_))])],32)):O.value.decided?(d(),m(q,{key:3},[f("p",null,u(i(s)("moderation.decided")),1),f("h4",null,u(i(s)("statement.title")),1),f("pre",N_,u(O.value.preview),1),f("div",j_,[f("button",{type:"button",class:"bcm-btn",onClick:M[8]||(M[8]=E=>i(c).closeCase())},u(i(s)("common.close")),1)])],64)):A("",!0),O.value.kase&&!O.value.decided?(d(),m("div",z_,[O.value.escalation?O.value.escalation.done?(d(),m("p",K_,u(i(s)("moderation.escalated")),1)):(d(),m("form",{key:1,class:"bcm-form",novalidate:"",onSubmit:M[11]||(M[11]=mt(E=>i(c).escalate(),["prevent"]))},[f("p",null,u(i(s)("moderation.escalateLede")),1),f("div",L_,[f("label",{for:`${i(r)}-escalate`},u(i(s)("moderation.escalateCategory")),9,D_),ge(f("select",{id:`${i(r)}-escalate`,"onUpdate:modelValue":M[10]||(M[10]=E=>O.value.escalation.category=E),class:"bcm-input bcm-select"},[f("option",U_,u(i(s)("moderation.escalateCategory")),1),(d(!0),m(q,null,me(i(ls),E=>(d(),m("option",{key:E,value:E},u(i(s)(v(E))),9,q_))),128))],8,F_),[[Wt,O.value.escalation.category]])]),O.value.escalation.failure?(d(),m("p",B_,u(k(O.value.escalation.failure)),1)):A("",!0),f("div",H_,[f("button",{type:"submit",class:"bcm-btn",disabled:O.value.escalation.category===""||O.value.escalation.sending},u(i(s)("moderation.escalate")),9,V_)])],32)):(d(),m("button",{key:0,type:"button",class:"bcm-link",onClick:M[9]||(M[9]=E=>i(c).startEscalation())},u(i(s)("moderation.escalate")),1))])):A("",!0)],8,l_)):A("",!0),w.value?(d(),m("section",{key:5,class:"bcm-card","aria-labelledby":`${i(r)}-review`},[f("h3",{id:`${i(r)}-review`},u(w.value.outcome==="approve"?i(s)("moderation.approve"):i(s)("moderation.reject")),9,Y_),w.value.done?(d(),m(q,{key:0},[f("p",null,u(w.value.done==="approved"?i(s)("moderation.approved"):i(s)("moderation.rejected")),1),w.value.statement?(d(),m("pre",G_,u(w.value.statement),1)):A("",!0),f("div",Z_,[f("button",{type:"button",class:"bcm-btn",onClick:M[12]||(M[12]=E=>i(c).closeReview())},u(i(s)("common.close")),1)])],64)):(d(),m("form",{key:1,class:"bcm-form",novalidate:"",onSubmit:M[16]||(M[16]=mt(E=>i(c).review(),["prevent"]))},[w.value.changed?(d(),m("p",J_,u(i(s)("moderation.textChanged")),1)):A("",!0),w.value.item.title?(d(),m("p",X_,u(w.value.item.title),1)):A("",!0),w.value.item.body!==null?(d(),m("p",Q_,u(w.value.item.body),1)):A("",!0),w.value.outcome==="reject"?(d(),m(q,{key:3},[f("div",ek,[f("label",{for:`${i(r)}-review-rule`},u(i(s)("statement.contractualGround")),9,tk),ge(f("select",{id:`${i(r)}-review-rule`,"onUpdate:modelValue":M[13]||(M[13]=E=>w.value.ruleId=E),class:"bcm-input bcm-select"},[f("option",ok,u(i(s)("moderation.ruleRequired")),1),(d(!0),m(q,null,me(i(p).rules??[],E=>(d(),m("option",{key:E.id,value:E.id},u(E.title),9,sk))),128))],8,nk),[[Wt,w.value.ruleId]])]),f("div",ik,[f("label",{for:`${i(r)}-review-facts`},u(i(s)("statement.facts")),9,rk),ge(f("textarea",{id:`${i(r)}-review-facts`,"onUpdate:modelValue":M[14]||(M[14]=E=>w.value.facts=E),class:"bcm-input bcm-textarea",rows:"4","aria-describedby":`${i(r)}-review-hint`},null,8,ak),[[Xe,w.value.facts]]),f("p",{id:`${i(r)}-review-hint`,class:"bcm-hint"},u(i(s)("moderation.factsHint")),9,lk)])],64)):A("",!0),w.value.failure?(d(),m("p",ck,u(k(w.value.failure)),1)):A("",!0),f("div",uk,[f("button",{type:"button",class:"bcm-btn",disabled:w.value.sending,onClick:M[15]||(M[15]=E=>i(c).closeReview())},u(i(s)("common.cancel")),9,dk),M[19]||(M[19]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"submit",class:Ve(["bcm-btn bcm-primary",{"bcm-danger":w.value.outcome==="reject"}]),disabled:w.value.sending||w.value.outcome==="reject"&&(w.value.ruleId===""||w.value.facts.trim()==="")},u(w.value.outcome==="approve"?i(s)("moderation.approve"):i(s)("moderation.reject")),11,fk)])],32))],8,W_)):A("",!0)],64)),f("p",mk,u(x.value),1)],8,My)):A("",!0)}});function mc(e){if(typeof e!="string"||!e.startsWith("#"))return null;for(const t of e.slice(1).split("&"))if(t.startsWith("q="))try{const n=decodeURIComponent(t.slice(2).replace(/\+/g," "));return n.length<=rs*2?n:null}catch{return null}return null}function hk(e,t){const n=wi(t);return n===null||e.includes("#")?null:`${e}#q=${encodeURIComponent(n)}`}function bk(e){const{client:t}=e,n=new AbortController,s={signal:n.signal};let o=!1,r=0;const a=Re({phase:"idle",failure:null,query:e.query??"",space:"",categoryId:"",categories:[],invalid:null,results:[],page:0,hasMore:!1,loadingMore:!1}),l=h=>{a.failure=h,a.phase=h.code==="surfaceOff"?"hidden":h.code==="membersOnly"?"membersOnly":"failed"};let c=null;async function p(){const h=wi(a.query);if(h===null){a.invalid=a.query.trim().length>rs?"long":"short";return}a.invalid=null;const b=++r;a.phase="searching",a.failure=null;const _={query:h,...a.categoryId!==""?{categoryId:a.categoryId}:{},...a.space!==""?{space:a.space}:{}};c=_;const $=await t.forum.search({..._,page:1},s);if(!(o||b!==r)){if(!$.ok)return l($);a.results=[...$.value.results],a.page=$.value.page,a.hasMore=$.value.hasMore,a.phase="ready"}}return{state:a,async load(){const h=await t.forum.categories.list(s);o||(h.ok?a.categories=h.value.categories.filter(b=>b.kind==="topics"):(h.code==="membersOnly"||h.code==="surfaceOff")&&l(h),wi(a.query)!==null&&a.phase==="idle"&&await p())},search:p,async more(){const h=Xm({page:a.page,hasMore:a.hasMore});if(h===null||c===null||a.loadingMore||a.phase!=="ready")return;const b=r;a.loadingMore=!0;const _=await t.forum.search({...c,page:h},s);if(a.loadingMore=!1,!(o||b!==r)){if(!_.ok){a.failure=_;return}a.results=[...a.results,..._.value.results],a.page=_.value.page,a.hasMore=_.value.hasMore}},dispose(){o=!0,n.abort()}}}const gk=["lang","aria-labelledby"],vk={class:"bcm-head"},yk=["id"],_k={key:1,class:"bcm-search-body"},kk={class:"bcm-field"},wk=["for"],$k=["id","aria-invalid","aria-describedby"],xk=["id"],Ik={class:"bcm-row"},Tk=["for"],Ck=["id"],Sk={value:""},Ak={value:"forum"},Ok={value:"article"},Ek=["for"],Mk=["id"],Pk={value:""},Rk=["value"],Nk=["disabled"],jk={key:0,class:"bcm-muted",role:"status"},zk={key:1,class:"bcm-banner",role:"alert"},Lk={key:0,class:"bcm-muted",role:"status"},Dk={key:1,class:"bcm-list"},Fk={class:"bcm-row bcm-muted"},Uk={class:"bcm-badge"},qk=["datetime"],Bk={class:"bcm-topic-title"},Hk=["href"],Vk={key:0,class:"bcm-text"},Kk={key:2,class:"bcm-error",role:"alert"},Wk={key:3,class:"bcm-row"},Yk=["disabled"],Gk={key:4,class:"bcm-hint"},Zk=$e({inheritAttrs:!1,__name:"ForumSearchView",props:{apiBase:{},siteBase:{},lang:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=ue(ze(t.lang,Ue())),{t:s}=gt(n),o=He("bcm-search");ye(()=>t.lang,I=>{n.value=ze(I,Ue())});const r=ht(t.siteBase),a=r===null?null:bt(t.apiBase,t.transport,r),l=a?bk({client:a,query:mc(typeof location>"u"?null:location.hash)}):null,c=l?.state??null,p=z(()=>Mt(Et(t.routes),null,r??""));function h(){const I=mc(location.hash);!l||!c||I===null||I===c.query||(c.query=I,l.search())}nt(()=>{l?.load(),typeof window<"u"&&window.addEventListener("hashchange",h)}),Ge(()=>{typeof window<"u"&&window.removeEventListener("hashchange",h),l?.dispose()});function b(I){return I.space==="article"?Ti(p.value.articlePath,I.articleSlug,I.seq):I.space!=="forum"?null:I.seq!==null&&I.kind==="message"?Ii(p.value.topicPath,I.conversationId,I.seq):xo(p.value.topicPath,I.conversationId)}function _(I){if(I.space==="forum"){const j=ms(I);return j.kind==="shown"?j.text:s(j.kind==="deleted"?"topic.deleted":"topic.withheld")}return I.title!==null&&I.title.trim()!==""?I.title:s("search.inArticle")}const $=z(()=>{const I=c?.failure;if(!I)return"";const j=Ie(I,n.value);return s(j.key,j.params)}),v=z(()=>!!c&&c.phase==="ready"&&c.page>=La&&c.results.length>0);return(I,j)=>i(l)&&i(c)&&i(c).phase!=="hidden"?(d(),m("section",{key:0,class:"bcm bcm-forum-search",lang:n.value,"aria-labelledby":`${i(o)}-title`},[f("header",vk,[f("h2",{id:`${i(o)}-title`},u(i(s)("search.title")),9,yk)]),i(c).phase==="membersOnly"&&i(a)?(d(),_e(Ts,{key:0,failure:i(c).failure,client:i(a),lang:n.value,"sign-in-href":e.signInHref,"rules-href":p.value.rulesPath,onJoined:j[0]||(j[0]=P=>i(l).load())},null,8,["failure","client","lang","sign-in-href","rules-href"])):(d(),m("div",_k,[f("form",{class:"bcm-form",role:"search",novalidate:"",onSubmit:j[4]||(j[4]=mt(P=>i(l).search(),["prevent"]))},[f("div",kk,[f("label",{for:`${i(o)}-q`},u(i(s)("search.label")),9,wk),ge(f("input",{id:`${i(o)}-q`,"onUpdate:modelValue":j[1]||(j[1]=P=>i(c).query=P),class:"bcm-input",type:"search","aria-invalid":i(c).invalid!==null,"aria-describedby":`${i(o)}-q-error`},null,8,$k),[[Xe,i(c).query]]),i(c).invalid?(d(),m("p",{key:0,id:`${i(o)}-q-error`,class:"bcm-error",role:"alert"},u(i(c).invalid==="short"?i(s)("search.tooShort",{min:i(pi)}):i(s)("search.tooLong",{max:i(rs)})),9,xk)):A("",!0)]),f("div",Ik,[f("label",{for:`${i(o)}-space`},u(i(s)("search.space")),9,Tk),ge(f("select",{id:`${i(o)}-space`,"onUpdate:modelValue":j[2]||(j[2]=P=>i(c).space=P),class:"bcm-input bcm-select"},[f("option",Sk,u(i(s)("search.spaceAll")),1),f("option",Ak,u(i(s)("search.spaceForum")),1),f("option",Ok,u(i(s)("search.spaceArticle")),1)],8,Ck),[[Wt,i(c).space]]),i(c).categories.length>0&&i(c).space!=="article"?(d(),m(q,{key:0},[f("label",{for:`${i(o)}-category`},u(i(s)("search.category")),9,Ek),ge(f("select",{id:`${i(o)}-category`,"onUpdate:modelValue":j[3]||(j[3]=P=>i(c).categoryId=P),class:"bcm-input bcm-select"},[f("option",Pk,u(i(s)("forum.allCategories")),1),(d(!0),m(q,null,me(i(c).categories,P=>(d(),m("option",{key:P.id,value:P.id},u(P.name),9,Rk))),128))],8,Mk),[[Wt,i(c).categoryId]])],64)):A("",!0),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:i(c).phase==="searching"},u(i(s)("search.submit")),9,Nk)])],32),i(c).phase==="searching"?(d(),m("p",jk,u(i(s)("search.searching")),1)):i(c).phase==="failed"?(d(),m("div",zk,[f("span",null,u($.value),1)])):i(c).phase==="ready"?(d(),m(q,{key:2},[i(c).results.length===0?(d(),m("p",Lk,u(i(s)("search.empty")),1)):(d(),m("ol",Dk,[(d(!0),m(q,null,me(i(c).results,(P,T)=>(d(),m("li",{key:`${P.conversationId}:${P.seq??0}:${T}`},[f("p",Fk,[f("span",Uk,u(P.kind==="topic"?i(s)("search.topic"):i(s)("search.message")),1),f("time",{datetime:P.createdAt},u(i(Pe)(n.value,P.createdAt)),9,qk)]),f("p",Bk,[b(P)?(d(),m("a",{key:0,href:b(P)??void 0,class:Ve({"bcm-placeholder":P.title===null})},u(_(P)),11,Hk)):(d(),m("span",{key:1,class:Ve({"bcm-placeholder":P.title===null})},u(_(P)),3))]),P.snippet?(d(),m("p",Vk,u(P.snippet),1)):A("",!0)]))),128))])),i(c).failure?(d(),m("p",Kk,u($.value),1)):A("",!0),i(c).hasMore?(d(),m("div",Wk,[f("button",{type:"button",class:"bcm-btn",disabled:i(c).loadingMore,onClick:j[5]||(j[5]=P=>i(l).more())},u(i(s)("search.more")),9,Yk)])):v.value?(d(),m("p",Gk,u(i(s)("search.lastPage")),1)):A("",!0)],64)):A("",!0)]))],8,gk)):A("",!0)}}),Jk=10,pc=3;function Xk(e){const{client:t}=e,n=new AbortController,s={signal:n.signal};let o=!1,r=0;const a=Re({phase:"loading",failure:null,me:null,categories:[],latest:{}});async function l(){const c=++r;a.phase="loading",a.failure=null;const[p,h]=await Promise.all([t.me.get(s),t.forum.categories.list(s)]);if(o||c!==r)return;if(p.ok&&(a.me=p.value),!h.ok){a.failure=h,a.phase=h.code==="surfaceOff"?"hidden":h.code==="membersOnly"?"membersOnly":"failed";return}a.categories=[...h.value.categories].sort((v,I)=>v.position-I.position),a.latest={},a.phase="ready";const b=a.categories.slice(0,Jk),_=await Promise.all(b.map(v=>t.forum.topics.list({categoryId:v.id,sort:"activity",limit:pc},s)));if(o||c!==r)return;const $={};b.forEach((v,I)=>{const j=_[I];j?.ok&&($[v.id]=$i(j.value.items).slice(0,pc))}),a.latest=$}return{state:a,load:l,dispose(){o=!0,n.abort()}}}const Qk=["lang","aria-labelledby"],ew={class:"bcm-head"},tw=["id"],nw={key:0,class:"bcm-muted",role:"status"},ow={key:2,class:"bcm-banner",role:"alert"},sw={key:3,class:"bcm-forum-body"},iw=["for"],rw=["id","placeholder"],aw={type:"submit",class:"bcm-btn"},lw={key:0,class:"bcm-error bcm-full",role:"alert"},cw={key:0,class:"bcm-muted"},uw={key:1,class:"bcm-list"},dw=["href"],fw={key:0,class:"bcm-text"},mw={class:"bcm-row bcm-muted"},pw=["datetime"],hw={key:1,class:"bcm-hint"},bw=["aria-label"],gw={key:3},vw=["href"],yw=$e({inheritAttrs:!1,__name:"ForumView",props:{apiBase:{},siteBase:{},lang:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=ue(ze(t.lang,Ue())),{t:s}=gt(n),o=He("bcm-forum"),r=ht(t.siteBase),a=r===null?null:bt(t.apiBase,t.transport,r),l=a?Xk({client:a}):null,c=l?.state??null,p=z(()=>Mt(Et(t.routes),c?.me?.links,r??""));nt(()=>{l?.load()}),Ge(()=>l?.dispose()),ye(()=>t.lang,I=>{n.value=ze(I,Ue())});const h=ue(""),b=ue(!1);function _(){const I=hk(p.value.searchPath,h.value);b.value=I===null,I!==null&&typeof location<"u"&&location.assign(I)}const $=z(()=>{const I=c?.failure;if(!I)return"";const j=Ie(I,n.value);return s(j.key,j.params)}),v=I=>I.kind==="article_discussions"?s("forum.discussionCount",{count:I.topicCount}):s("forum.topicCount",{count:I.topicCount});return(I,j)=>i(l)&&i(c)&&i(c).phase!=="hidden"?(d(),m("section",{key:0,class:"bcm bcm-forum",lang:n.value,"aria-labelledby":`${i(o)}-title`},[f("header",ew,[f("h2",{id:`${i(o)}-title`},u(i(s)("forum.title")),9,tw)]),i(c).phase==="loading"?(d(),m("p",nw,u(i(s)("forum.loading")),1)):i(c).phase==="membersOnly"&&i(a)?(d(),_e(Ts,{key:1,failure:i(c).failure,client:i(a),lang:n.value,"sign-in-href":e.signInHref,"rules-href":p.value.rulesPath,onJoined:j[0]||(j[0]=P=>i(l).load())},null,8,["failure","client","lang","sign-in-href","rules-href"])):i(c).phase==="failed"?(d(),m("div",ow,[f("span",null,u($.value),1),f("button",{type:"button",class:"bcm-btn",onClick:j[1]||(j[1]=P=>i(l).load())},u(i(s)("common.retry")),1)])):i(c).phase==="ready"?(d(),m("div",sw,[Ee(Fi,{me:i(c).me},null,8,["me"]),f("form",{class:"bcm-row",role:"search",onSubmit:mt(_,["prevent"])},[f("label",{for:`${i(o)}-q`,class:"bcm-sr"},u(i(s)("forum.search")),9,iw),ge(f("input",{id:`${i(o)}-q`,"onUpdate:modelValue":j[2]||(j[2]=P=>h.value=P),class:"bcm-input bcm-grow",type:"search",placeholder:i(s)("forum.search")},null,8,rw),[[Xe,h.value]]),f("button",aw,u(i(s)("forum.searchSubmit")),1),b.value?(d(),m("p",lw,u(i(s)("search.tooShort",{min:i(pi)})),1)):A("",!0)],32),i(c).categories.length===0?(d(),m("p",cw,u(i(s)("forum.empty")),1)):(d(),m("ul",uw,[(d(!0),m(q,null,me(i(c).categories,P=>(d(),m("li",{key:P.id,class:"bcm-category"},[f("h3",null,[i(On)(p.value.categoryPath,P.slug)?(d(),m("a",{key:0,href:i(On)(p.value.categoryPath,P.slug)??void 0},u(P.name),9,dw)):(d(),m(q,{key:1},[St(u(P.name),1)],64))]),P.description?(d(),m("p",fw,u(P.description),1)):A("",!0),f("p",mw,[f("span",null,u(v(P)),1),P.lastActivityAt?(d(),m("time",{key:0,datetime:P.lastActivityAt},u(i(s)("forum.lastActivity",{date:i(Pe)(n.value,P.lastActivityAt)})),9,pw)):A("",!0)]),P.mode==="pre"?(d(),m("p",hw,u(i(s)("forum.modePre")),1)):A("",!0),i(c).latest[P.id]?.length?(d(),m("ul",{key:2,class:"bcm-topics","aria-label":i(s)("forum.latest")},[(d(!0),m(q,null,me(i(c).latest[P.id],T=>(d(),_e(dc,{key:T.conversationId,item:T,"topic-href":p.value.topicPath,"article-href":p.value.articlePath},null,8,["item","topic-href","article-href"]))),128))],8,bw)):A("",!0),i(On)(p.value.categoryPath,P.slug)?(d(),m("p",gw,[f("a",{href:i(On)(p.value.categoryPath,P.slug)??void 0},u(i(s)("forum.allTopics")),9,vw)])):A("",!0)]))),128))]))])):A("",!0)],8,Qk)):A("",!0)}}),Ui=new WeakMap;function _w(e){if(typeof location<"u"&&location.hash.startsWith("#u=")){const t=Sl(location.hash);return cp(),up(),e&&Ui.set(e,t),t}return e&&Ui.has(e)?Ui.get(e)??null:null}const Ao=()=>typeof navigator>"u"?null:navigator;function qi(){const e=globalThis;return e.Notification&&typeof e.Notification.requestPermission=="function"?e.Notification:null}function hc(e=Ao()){if(!e)return!1;const t=e.userAgent??"";return/iPhone|iPad|iPod/.test(t)||e.platform==="MacIntel"&&(e.maxTouchPoints??0)>1}function kw(e=Ao()){if(!e)return"other";if(hc(e))return"ios";const t=e.userAgent??"";return/Android/.test(t)?"android":/Mobi|Tablet/.test(t)||t===""?"other":"desktop"}function ww(){const e=Ao();if(!e)return"unsupported";if(_m(e.userAgent??""))return"inApp";if(hc(e)&&e.standalone!==!0)return"iosInstall";const t=globalThis;return!e.serviceWorker||typeof e.serviceWorker.register!="function"||typeof t.PushManager>"u"||!qi()?"unsupported":"supported"}function bc(){return qi()?.permission??"default"}async function $w(){const e=qi();if(!e)return"denied";if(e.permission!=="default")return e.permission;try{return await e.requestPermission()}catch{return"denied"}}async function gc(){const e=Ao()?.serviceWorker;if(!e||typeof e.getRegistration!="function")return null;try{return await e.getRegistration()??null}catch{return null}}async function xw(e){const t=Ao()?.serviceWorker;if(!t)throw new Error("[blogmcp-community] no service worker support");return t.register(e)}async function Bi(e){if(!e?.pushManager||typeof e.pushManager.getSubscription!="function")return null;try{return await e.pushManager.getSubscription()??null}catch{return null}}function Iw(e){if(typeof e!="string"||!/^[A-Za-z0-9_-]+={0,2}$/.test(e))return null;const t=e.replace(/=+$/,"").replace(/-/g,"+").replace(/_/g,"/"),n=t+"=".repeat((4-t.length%4)%4);try{const s=atob(n),o=new Uint8Array(s.length);for(let r=0;r<s.length;r++)o[r]=s.charCodeAt(r);return o}catch{return null}}function vc(e){const t=typeof e.toJSON=="function"?e.toJSON():null,n=t?.endpoint??e.endpoint,s=t?.keys?.p256dh,o=t?.keys?.auth;return typeof n!="string"||typeof s!="string"||typeof o!="string"?null:{endpoint:n,keys:{p256dh:s,auth:o}}}const Hi="blogmcp-community:push-key-id";function Tw(){try{const e=typeof localStorage>"u"?null:localStorage.getItem(Hi);if(e===null)return null;const t=JSON.parse(e);return t&&typeof t.memberId=="string"&&typeof t.keyId=="string"?{memberId:t.memberId,keyId:t.keyId}:null}catch{return null}}function yc(e){try{if(typeof localStorage>"u")return;e===null?localStorage.removeItem(Hi):localStorage.setItem(Hi,JSON.stringify({memberId:e.memberId,keyId:e.keyId}))}catch{}}const Cw=["notifyReply","notifyMention","notifyTopic","pushEnabled","digestEmail","quietHours"];function Sw(e){const{client:t,swPath:n}=e,s=e.digestToken,o=new AbortController,r={signal:o.signal};let a=!1,l=null,c=[];const p=Re({phase:"idle",failure:null,module:null,settings:null,saving:{},push:{support:ww(),status:"checking",note:null,failure:null},digest:{offered:s!==null,sending:!1,outcome:null,failure:null},announcement:null,announceId:0}),h=w=>{p.announcement=w,p.announceId+=1},b=w=>({key:`error.${w.code}`}),_=()=>{const w=p.module?.state;return w===void 0||Yn(w)&&w!=="dark"},$=()=>p.phase==="ready"&&l!==null&&p.module?.features.push===!0;async function v(){const w=await t.me.get(r);return w.ok?(p.module=w.value.module??null,w.value.needs.includes("sign_in")?"signIn":(l=w.value.member?.memberId??null,l===null?"reader":"member")):w.code==="signIn"?"signIn":w}async function I(w){const y=vc(w)?.endpoint;if(!y||l===null)return!1;const x=await t.me.push.status({endpoint:y},r);return x.ok&&x.value.subscribed===!0}async function j(){if(!$()||p.push.support!=="supported"){p.push.status="off";return}const w=await Bi(await gc());if(a)return;const y=await t.me.notifications.list({unreadOnly:!0,codes:["module_push_reset"]},r);if(a)return;c=y.ok?y.value.items.filter(re=>re.code==="module_push_reset"&&re.readAt===null).map(re=>re.id):[];const x=Tw(),N=w!==null&&x!==null&&x.memberId===l;let M=!1,E=!1;if(N){const re=await t.me.push.vapid(r);if(a)return;M=re.ok&&re.value.keyId!==x.keyId,E=re.ok&&!M}const B=bc();let ee=N&&E&&B==="granted";ee&&w&&(ee=await I(w),a)||(p.push.status=ee?"on":"off",p.push.note=M||c.length>0?"reset":B==="denied"?"denied":null)}async function P(){p.phase="loading",p.failure=null;const w=await v();if(a)return;if(w==="signIn"){p.phase="signIn";return}if(w!=="member"&&w!=="reader"){p.phase="failed",p.failure=w;return}if(!_()){p.phase="failed",p.failure={ok:!1,code:"unavailable"};return}const y=await t.me.settings.get(r);if(!a){if(!y.ok){p.phase=y.code==="signIn"?"signIn":"failed",p.failure=y;return}p.settings={...y.value.settings},p.phase="ready",await j()}}async function T(w,y){const x=p.settings;if(!x||p.saving[w]||x[w]===y)return;p.saving[w]=!0;const N=x[w];p.settings={...x,[w]:y};const M=await t.me.settings.update({[w]:y},r);if(delete p.saving[w],!a){if(!M.ok)return p.settings&&(p.settings={...p.settings,[w]:N}),h(b(M));if(p.settings={...M.value.settings},h({key:"settings.saved"}),w==="pushEnabled"){const E=await v();if(a||E!=="member"&&E!=="reader")return;await j()}}}async function g(){const w=p.push;if(!$()||w.support!=="supported"||w.status==="busy"||l===null)return;const y=l;w.status="busy",w.failure=null,w.note=null;const x=(N,M=null)=>{w.status="off",w.note=N,w.failure=M};try{if(await $w()!=="granted")return x("denied");if(a)return;const N=await xw(n);if(a)return;const M=await t.me.push.vapid(r);if(a)return;if(!M.ok)return x(M.code==="pushRefused"?"refused":null,M);const E=Iw(M.value.publicKey);if(!E)return x(null,{ok:!1,code:"unavailable"});const B=await Bi(N);B&&await B.unsubscribe().catch(()=>!1);const ee=await N.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:E});if(a)return;const re=vc(ee);if(!re)return await ee.unsubscribe().catch(()=>!1),x("refused");const be=await t.me.push.subscribe({...re,userAgentClass:kw()},r);if(a)return;if(!be.ok)return await ee.unsubscribe().catch(()=>!1),x(be.code==="pushRefused"?"refused":null,be);if(yc({memberId:y,keyId:be.value.keyId}),w.status="on",h({key:"settings.saved"}),c.length>0){const we=c;c=[],t.me.notifications.markRead({ids:we},r)}}catch{a||x(bc()==="denied"?"denied":"refused")}}async function k(){const w=p.push;if(w.status==="busy")return;w.status="busy",w.failure=null,w.note=null;let y=null;try{const x=await Bi(await gc());y=x?.endpoint??null,await x?.unsubscribe()}catch{}if(!a){if(y){const x=await t.me.push.unsubscribe({endpoint:y},r);if(a)return;x.ok||(w.failure=x)}yc(null),w.status="off",w.failure||h({key:"settings.saved"})}}async function O(){const w=p.digest;if(!s||w.sending||w.outcome==="unsubscribed")return;w.sending=!0,w.failure=null;const y=await t.me.settings.unsubscribeDigest({token:s},r);if(w.sending=!1,!a){if(y.ok){w.outcome="unsubscribed",p.settings&&(p.settings={...p.settings,digestEmail:!1}),h({key:"settings.digest.unsubscribed"});return}if(y.code==="invalid"){w.outcome="staleLink";return}w.failure=y}}return{state:p,load:P,toggle:T,pushShown:$,enablePush:g,disablePush:k,unsubscribeDigest:O,dispose(){a=!0,o.abort()}}}const Aw=["lang","aria-labelledby"],Ow=["id"],Ew=["aria-labelledby"],Mw=["id"],Pw={key:0,role:"status"},Rw={key:1,class:"bcm-note",role:"alert"},Nw={key:0,class:"bcm-error",role:"alert"},jw={class:"bcm-row"},zw=["disabled"],Lw={key:1,class:"bcm-muted",role:"status"},Dw={key:2,class:"bcm-row"},Fw=["href"],Uw={key:3,class:"bcm-banner",role:"alert"},qw={class:"bcm-switches"},Bw={class:"bcm-check"},Hw=["name","checked","disabled","onChange"],Vw=["aria-labelledby"],Kw=["id"],Ww={class:"bcm-hint"},Yw=["href"],Gw={class:"bcm-url"},Zw={key:1},Jw={key:2},Xw={key:0,class:"bcm-note"},Qw={key:1,class:"bcm-note",role:"alert"},e1={key:2,class:"bcm-note",role:"alert"},t1={key:3,class:"bcm-error",role:"alert"},n1={class:"bcm-row"},o1=["disabled"],s1={class:"bcm-sr","aria-live":"polite"},i1=$e({inheritAttrs:!1,__name:"MemberSettingsView",props:{apiBase:{},siteBase:{},lang:{},swPath:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=ue(ze(t.lang,Ue())),{t:s,text:o}=gt(n),r=He("bcm-settings"),a=Vn(),l=ht(t.siteBase),c=l===null?null:bt(t.apiBase,t.transport,l);function p(w){return w===void 0||w===""?`${l??""}/sw.js`:hs(w)?w:(Ft("sw-path",'[blogmcp-community] sw-path must be a path on this site (e.g. "/blog/sw.js"): the service worker is the site’s own'),null)}const h=_w(a),b=p(t.swPath),_=c&&b?Sw({client:c,swPath:b,digestToken:h}):null,$=_?.state??null;nt(()=>{_?.load()}),Ge(()=>_?.dispose());const v=Object.freeze({notifyReply:"settings.notifyReply",notifyMention:"settings.notifyMention",notifyTopic:"settings.notifyTopic",pushEnabled:"settings.pushEnabled",digestEmail:"settings.digestEmail",quietHours:"settings.quietHours"}),I=z(()=>{const w=$?.failure;if(!w)return"";const y=Ie(w,n.value);return s(y.key,y.params)}),j=z(()=>{const w=$?.push.failure;if(!w)return"";const y=Ie(w,n.value);return s(y.key,y.params)}),P=z(()=>{const w=$?.digest.failure;if(!w)return"";const y=Ie(w,n.value);return s(y.key,y.params)}),T=z(()=>typeof location>"u"?"":location.href);function g(){return En(t.signInHref,typeof location>"u"?null:location.pathname)}function k(w,y){_?.toggle(w,y.target.checked)}const O=ue("");return ye(()=>$?.announceId,()=>{O.value="";const w=o($?.announcement);Fe(()=>{O.value=w})}),(w,y)=>i(_)&&i($)?(d(),m("section",{key:0,class:"bcm bcm-settings",lang:n.value,"aria-labelledby":`${i(r)}-title`},[f("h2",{id:`${i(r)}-title`},u(i(s)("settings.title")),9,Ow),i($).digest.offered?(d(),m("section",{key:0,class:"bcm-card","aria-labelledby":`${i(r)}-digest`},[f("h3",{id:`${i(r)}-digest`},u(i(s)("settings.digestEmail")),9,Mw),i($).digest.outcome==="unsubscribed"?(d(),m("p",Pw,u(i(s)("settings.digest.unsubscribed")),1)):i($).digest.outcome==="staleLink"?(d(),m("p",Rw,u(i(s)("settings.digest.staleLink")),1)):(d(),m(q,{key:2},[f("p",null,u(i(s)("settings.digest.prompt")),1),P.value?(d(),m("p",Nw,u(P.value),1)):A("",!0),f("div",jw,[f("button",{type:"button",class:"bcm-btn bcm-primary",disabled:i($).digest.sending,onClick:y[0]||(y[0]=x=>i(_).unsubscribeDigest())},u(i(s)("settings.digest.confirm")),9,zw)])],64))],8,Ew)):A("",!0),i($).phase==="loading"||i($).phase==="idle"?(d(),m("p",Lw,u(i(s)("common.loading")),1)):i($).phase==="signIn"?(d(),m("div",Dw,[f("p",null,u(i(s)("settings.signIn")),1),g()?(d(),m("a",{key:0,class:"bcm-btn bcm-primary",href:g()??void 0},u(i(s)("common.signIn")),9,Fw)):A("",!0)])):i($).phase==="failed"?(d(),m("div",Uw,[f("span",null,u(I.value),1),f("button",{type:"button",class:"bcm-btn",onClick:y[1]||(y[1]=x=>i(_).load())},u(i(s)("common.retry")),1)])):i($).settings?(d(),m(q,{key:4},[f("ul",qw,[(d(!0),m(q,null,me(i(Cw),x=>(d(),m("li",{key:x},[f("label",Bw,[f("input",{type:"checkbox",name:x,checked:i($).settings[x],disabled:!!i($).saving[x],onChange:N=>k(x,N)},null,40,Hw),f("span",null,u(i(s)(i(v)[x])),1)])]))),128))]),i(_).pushShown()?(d(),m("section",{key:0,class:"bcm-card","aria-labelledby":`${i(r)}-push`},[f("h3",{id:`${i(r)}-push`},u(i(s)("settings.pushEnabled")),9,Kw),f("p",Ww,u(i(s)("settings.push.carries")),1),i($).push.support==="inApp"?(d(),m(q,{key:0},[f("p",null,u(i(s)("settings.push.inAppExplain")),1),f("p",null,[f("a",{href:T.value,target:"_blank",rel:"noopener"},u(i(s)("settings.push.openInBrowser")),9,Yw)]),f("p",Gw,u(T.value),1)],64)):i($).push.support==="iosInstall"?(d(),m("p",Zw,u(i(s)("settings.push.iosGuide")),1)):i($).push.support==="unsupported"?(d(),m("p",Jw,u(i(s)("settings.push.unsupported")),1)):(d(),m(q,{key:3},[i($).push.note==="reset"?(d(),m("p",Xw,u(i(s)("settings.push.reset")),1)):i($).push.note==="denied"?(d(),m("p",Qw,u(i(s)("settings.push.denied")),1)):i($).push.note==="refused"?(d(),m("p",e1,u(i(s)("settings.push.refused")),1)):A("",!0),j.value&&i($).push.note===null?(d(),m("p",t1,u(j.value),1)):A("",!0),f("div",n1,[i($).push.status==="on"?(d(),m("button",{key:0,type:"button",class:"bcm-btn",onClick:y[2]||(y[2]=x=>i(_).disablePush())},u(i(s)("settings.push.disable")),1)):(d(),m("button",{key:1,type:"button",class:"bcm-btn bcm-primary",disabled:i($).push.status==="busy"||i($).push.status==="checking",onClick:y[3]||(y[3]=x=>i(_).enablePush())},u(i(s)("settings.push.enable")),9,o1))])],64))],8,Vw)):A("",!0)],64)):A("",!0),f("p",s1,u(O.value),1)],8,Aw)):A("",!0)}});function r1(e,t){if(typeof document>"u"||typeof URL.createObjectURL!="function")return;const n=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),s=URL.createObjectURL(n),o=document.createElement("a");o.href=s,o.download=t,o.style.display="none",document.body.appendChild(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(s),1e3)}function a1(e,t=new Date){const n=t.toISOString().slice(0,10);return`${e.replace(/[^\p{L}\p{N}_-]+/gu,"-").replace(/^-+|-+$/g,"")||"export"}-${n}.json`}const Vi=()=>({body:"",sending:!1,failure:null});function l1(e){const{client:t}=e,n=new AbortController,s={signal:n.signal},o=Re({phase:"idle",failure:null,me:null,notifications:[],decisions:[],appeals:[],reports:[],blocks:[],statement:{phase:"idle",value:null,failure:null,appeal:Vi()},notice:{phase:"idle",value:null,failure:null,appeal:Vi()},profile:null,purgeAfter:null,exporting:!1,busy:{},announcement:null,announceId:0});let r=!1;const a=Bt(null),l=T=>{o.announcement=T,o.announceId+=1},c=T=>({key:`error.${T.code}`});async function p(){o.phase="loading",o.failure=null;const T=await t.me.get(s);if(r)return;if(!T.ok){if(T.code==="signIn"){o.phase="signIn";return}o.phase="failed",o.failure=T;return}if(o.me=T.value,T.value.needs.includes("sign_in")){o.phase="signIn";return}if(!T.value.member){o.phase="ready";return}const[g,k,O,w,y]=await Promise.all([t.me.notifications.list({},s),t.me.decisions.list({},s),t.me.appeals.list(s),t.me.reports.list(s),t.blocks.list(s)]);if(r)return;g.ok&&(o.notifications=g.value.items.filter(N=>Ua(N.code))),k.ok&&(o.decisions=[...k.value.items]),O.ok&&(o.appeals=[...O.value.items]),w.ok&&(o.reports=[...w.value.items]),y.ok&&(o.blocks=[...y.value.blocks]);const x=[g,k,O,w,y].find(N=>!N.ok);x&&!x.ok&&l(c(x)),o.phase="ready"}let h=null,b=0;async function _(T){const g=++b;T!==h&&(h=T,o.statement.value=null,o.statement.appeal=Vi()),o.statement.phase="loading",o.statement.failure=null;const k=await t.me.decisions.get({decisionId:T},s);if(!(r||g!==b)){if(k.ok){o.statement.value=k.value,o.statement.phase="ready";return}o.statement.failure=k,o.statement.phase=k.code==="signIn"?"signIn":"failed"}}async function $(T){if(T===null){o.notice.phase="missing";return}o.notice.phase="loading",o.notice.failure=null;const g=await t.notices.status({receipt:T},s);if(!r){if(g.ok){o.notice.value=g.value,o.notice.phase="ready";return}o.notice.failure=g,o.notice.phase="failed"}}let v=null;const I=T=>lt(Ze(T.body)),j=T=>!T.sending&&I(T)>0&&I(T)<=Tn;function P(){if(a.value||r||!o.me?.member||o.me.acceptances.art9Refused!==!0)return;const T=ks({client:t,lang:ze(e.lang),signal:n.signal,offerArt9:!0,onDone:g=>{o.me=g,a.value=null,g.acceptances.art9Consent==="accepted"&&l({key:"panel.art9Given"})},onSignIn:()=>{a.value=null,o.phase="signIn"}});a.value=T,T.load()}return{state:o,consent:a,giveConsent:P,closeConsent(){a.value=null},loadMember:p,loadStatement:_,async loadNotice(T){v=T,await $(T)},unreadCount:()=>o.notifications.filter(T=>T.readAt===null).length,async markAllRead(){const T=o.notifications.filter(O=>O.readAt===null).map(O=>O.id);if(T.length===0||o.busy.markRead)return;o.busy.markRead=!0;const g=await t.me.notifications.markRead({ids:T},s);if(delete o.busy.markRead,r)return;if(!g.ok)return l(c(g));const k=new Date().toISOString();o.notifications=o.notifications.map(O=>T.includes(O.id)?{...O,readAt:k}:O)},async fileAppeal(){const T=o.statement,g=T.appeal;if(!T.value||!T.value.canAppeal||!j(g))return;const k=T.value.decisionId;g.sending=!0,g.failure=null;const O=await t.me.appeals.file({decisionId:k,body:Ze(g.body)},s);if(g.sending=!1,!(r||k!==h)){if(!O.ok){g.failure=O;return}g.body="",l({key:"statement.appealSent"}),await _(k)}},async withdrawAppeal(){const T=o.statement,g=T.value?.appeal;if(!T.value||!g||g.status!=="open"||o.busy.withdraw)return;const k=T.value.decisionId;o.busy.withdraw=!0;const O=await t.me.appeals.withdraw({appealId:g.appealId},s);if(delete o.busy.withdraw,!(r||k!==h)){if(!O.ok)return l(c(O));l({key:"statement.appealWithdrawn"}),await _(k)}},async fileNoticeAppeal(){const T=o.notice,g=T.appeal;if(!T.value||!T.value.appeal.canAppeal||v===null||!j(g))return;g.sending=!0,g.failure=null;const k=await t.notices.appeal({receipt:v,body:Ze(g.body)},s);if(g.sending=!1,!r){if(!k.ok){g.failure=k;return}g.body="",l({key:"notice.appealSent"}),await $(v)}},async withdrawNoticeAppeal(){if(!o.notice.value?.appeal.open||v===null||o.busy.noticeWithdraw)return;o.busy.noticeWithdraw=!0;const T=await t.notices.withdrawAppeal({receipt:v},s);if(delete o.busy.noticeWithdraw,!r){if(!T.ok)return l(c(T));l({key:"statement.appealWithdrawn"}),await $(v)}},async withdrawConsent(){if(o.busy.consent)return!1;o.busy.consent=!0;const T=await t.me.consents.withdraw({kind:"art9_consent"},s);return delete o.busy.consent,r?!1:T.ok?(o.me&&(o.me={...o.me,acceptances:{...o.me.acceptances,art9Consent:T.value.state}}),l({key:"panel.art9Withdrawn"}),!0):(l(c(T)),!1)},async unblock(T){const g=`block:${T}`;if(o.busy[g])return;o.busy[g]=!0;const k=await t.blocks.set({memberId:T,blocked:!1},s);if(delete o.busy[g],!r){if(!k.ok)return l(c(k));o.blocks=o.blocks.filter(O=>O.memberId!==T),l({key:"discussion.unblocked"})}},editProfile(){const T=o.me?.profile;T&&(o.profile={displayName:T.displayName,handle:T.handle,avatarPreset:T.avatarPreset,sending:!1,failure:null,fields:[]})},cancelProfile(){o.profile=null},async saveProfile(){const T=o.profile,g=o.me?.profile;if(!T||!g||T.sending||!Kl(T.displayName)||!Yl(T.handle)||Qn(T.handle)==="")return;const k={},O=ys(T.displayName),w=Qn(T.handle);if(O!==g.displayName&&(k.displayName=O),w!==g.handle&&(k.handle=w),T.avatarPreset!==g.avatarPreset&&(k.avatarPreset=T.avatarPreset),Object.keys(k).length===0){o.profile=null;return}T.sending=!0,T.failure=null,T.fields=[];const y=await t.me.updateProfile(k,s);if(T.sending=!1,!r){if(!y.ok){T.failure=y,T.fields=y.code==="handle"?["handle"]:y.code==="name"?["displayName"]:y.fields??[];return}o.me&&(o.me={...o.me,profile:y.value.profile}),o.profile=null}},async exportData(T){if(o.exporting)return;o.exporting=!0;const g=await t.me.export(s);if(o.exporting=!1,!r){if(!g.ok)return l(c(g));T(g.value)}},async erase(){if(o.busy.erase)return!1;o.busy.erase=!0;const T=await t.me.erase(s);return delete o.busy.erase,r?!1:T.ok?(o.purgeAfter=T.value.purgeAfter,o.me?.member&&(o.me={...o.me,member:{...o.me.member,status:T.value.status}}),!0):(l(c(T)),!1)},async cancelErase(){if(o.busy.erase)return;o.busy.erase=!0;const T=await t.me.cancelErase(s);if(delete o.busy.erase,!r){if(!T.ok)return l(c(T));o.purgeAfter=null,o.me?.member&&(o.me={...o.me,member:{...o.me.member,status:T.value.status}}),l({key:"panel.eraseCancelled"})}},erasing:()=>o.me?.member?.status==="deletion_requested",appealLength:I,canAppealWith:j,dispose(){r=!0,n.abort(),a.value=null}}}const Ki=new WeakMap;function c1(e){if(typeof location<"u"&&location.hash.startsWith("#t=")){const t=Tl(location.hash);return rp(),e&&Ki.set(e,t),t}return e&&Ki.has(e)?Ki.get(e)??null:void 0}const u1=["aria-labelledby"],d1=["id"],f1={class:"bcm-dl"},m1={class:"bcm-muted"},p1={key:0,class:"bcm-muted"},h1={key:0},b1={class:"bcm-facts"},g1=["aria-labelledby"],v1=["id"],y1={class:"bcm-row"},_1=["disabled"],k1={key:0,class:"bcm-muted"},w1={class:"bcm-field"},$1=["for"],x1=["id","aria-describedby","aria-invalid"],I1=["id"],T1={key:0,class:"bcm-error",role:"alert"},C1={class:"bcm-row"},S1=["disabled"],A1={key:2},O1={key:3},E1=$e({__name:"NoticeStatusView",props:{notice:{},appeal:{},withdrawing:{type:Boolean}},emits:["appeal","withdraw"],setup(e,{emit:t}){const n=e,s=t,{t:o,lang:r}=vt(),a=He("bcm-notice-status"),l=z(()=>n.notice),c=z(()=>Ut(`category.${l.value.category}`)),p=z(()=>Ut(`caseStatus.${l.value.status}`)),h=z(()=>Ei(l.value.outcome)),b=z(()=>h.value!==null&&l.value.statement===null&&!l.value.appeal.canAppeal&&!l.value.appeal.open),_=z(()=>lt(Ze(n.appeal.body))),$=z(()=>!n.appeal.sending&&_.value>0&&_.value<=Tn),v=z(()=>l.value.appeal.closesAt?Ul(l.value.appeal.closesAt):!1),I=z(()=>{const j=n.appeal.failure;if(!j)return"";const P=Ie(j,r.value);return o(P.key,P.params)});return(j,P)=>(d(),m("section",{class:"bcm-section","aria-labelledby":`${i(a)}-title`},[f("h3",{id:`${i(a)}-title`},u(i(o)("notice.statusTitle")),9,d1),f("dl",f1,[c.value?(d(),m(q,{key:0},[f("dt",null,u(i(o)("notice.category")),1),f("dd",null,u(i(o)(c.value)),1)],64)):A("",!0),p.value?(d(),m(q,{key:1},[f("dt",null,u(i(o)("notice.statusTitle")),1),f("dd",null,u(i(o)(p.value)),1)],64)):A("",!0)]),f("p",m1,u(i(o)("notice.submittedAt",{date:i(Pe)(i(r),l.value.submittedAt)})),1),l.value.decidedAt?(d(),m("p",p1,u(i(o)("notice.decidedAt",{date:i(Pe)(i(r),l.value.decidedAt)})),1)):A("",!0),h.value?(d(),m(q,{key:1},[f("h4",null,u(i(o)("notice.outcome")),1),f("p",null,u(i(o)(h.value)),1),b.value?(d(),m("p",h1,u(i(o)("notice.redress")),1)):A("",!0)],64)):A("",!0),l.value.statement?(d(),m(q,{key:2},[f("h4",null,u(i(o)("notice.statement")),1),f("pre",b1,u(l.value.statement),1)],64)):A("",!0),l.value.decidedAt&&!b.value?(d(),m("section",{key:3,class:"bcm-card","aria-labelledby":`${i(a)}-appeal`},[f("h4",{id:`${i(a)}-appeal`},u(i(o)("notice.appealTitle")),9,v1),l.value.appeal.open?(d(),m(q,{key:0},[f("p",null,u(i(o)("notice.appealOpen")),1),f("div",y1,[f("button",{type:"button",class:"bcm-btn",disabled:e.withdrawing,onClick:P[0]||(P[0]=T=>s("withdraw"))},u(i(o)("notice.appealWithdraw")),9,_1)])],64)):l.value.appeal.canAppeal?(d(),m(q,{key:1},[f("p",null,u(i(o)("notice.appealLede")),1),l.value.appeal.closesAt?(d(),m("p",k1,u(i(o)("notice.appealUntil",{date:i(Pe)(i(r),l.value.appeal.closesAt)})),1)):A("",!0),f("form",{class:"bcm-form",novalidate:"",onSubmit:P[2]||(P[2]=mt(T=>$.value&&s("appeal"),["prevent"]))},[f("div",w1,[f("label",{for:`${i(a)}-body`},u(i(o)("notice.appealBody")),9,$1),ge(f("textarea",{id:`${i(a)}-body`,"onUpdate:modelValue":P[1]||(P[1]=T=>e.appeal.body=T),class:"bcm-input bcm-textarea",rows:"5","aria-describedby":`${i(a)}-counter`,"aria-invalid":_.value>i(Tn)},null,8,x1),[[Xe,e.appeal.body]]),f("p",{id:`${i(a)}-counter`,class:"bcm-counter"},u(i(o)("statement.appealCounter",{length:_.value,max:i(Tn)})),9,I1)]),I.value?(d(),m("p",T1,u(I.value),1)):A("",!0),f("div",C1,[f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!$.value},u(e.appeal.sending?i(o)("statement.appealSending"):i(o)("notice.appealSubmit")),9,S1)])],32)],64)):v.value?(d(),m("p",A1,u(i(o)("notice.appealClosed")),1)):(d(),m("p",O1,u(i(o)("statement.appealUnavailable")),1))],8,g1)):A("",!0)],8,u1))}}),M1=["aria-labelledby"],P1=["id"],R1={class:"bcm-muted"},N1={class:"bcm-dl"},j1={key:0,class:"bcm-muted"},z1={key:0},L1={key:0,class:"bcm-text"},D1={key:0,class:"bcm-text"},F1={key:0,class:"bcm-note bcm-text"},U1={class:"bcm-facts"},q1={class:"bcm-text"},B1={class:"bcm-facts"},H1=["aria-labelledby"],V1=["id"],K1={key:0,class:"bcm-muted"},W1={class:"bcm-row"},Y1=["disabled"],G1={class:"bcm-muted"},Z1={class:"bcm-field"},J1=["for"],X1=["id","aria-describedby","aria-invalid"],Q1=["id"],e$={key:0,class:"bcm-error",role:"alert"},t$={class:"bcm-row"},n$=["disabled"],o$={key:0,class:"bcm-muted"},s$=$e({__name:"StatementView",props:{statement:{},appeal:{},withdrawing:{type:Boolean}},emits:["appeal","withdraw"],setup(e,{emit:t}){const n=e,s=t,{t:o,lang:r}=vt(),a=He("bcm-statement"),l=z(()=>n.statement),c=z(()=>Ut(`restriction.${l.value.restriction}`)),p=z(()=>Ut(`basis.${l.value.basis}`)),h=z(()=>Ut(`category.${l.value.category}`)),b=z(()=>Vp(r.value,l.value.territorialScope)),_=z(()=>l.value.appeal?Ut(`appealStatus.${l.value.appeal.status}`):null),$=z(()=>l.value.subject.kind==="message"?"statement.subjectMessage":l.value.subject.kind==="article"?"statement.subjectArticle":"statement.subjectProfile"),v=z(()=>{const k=l.value.subject;return k.kind==="message"&&k.message?k.message.body??k.message.displayBody:null}),I=z(()=>l.value.appeal?.status==="open"),j=z(()=>Ul(l.value.appealWindowClosesAt)),P=z(()=>lt(Ze(n.appeal.body))),T=z(()=>!n.appeal.sending&&P.value>0&&P.value<=Tn),g=z(()=>{const k=n.appeal.failure;if(!k)return"";const O=Ie(k,r.value);return o(O.key,O.params)});return(k,O)=>(d(),m("article",{class:"bcm-section","aria-labelledby":`${i(a)}-title`},[f("h3",{id:`${i(a)}-title`},u(i(o)("statement.title")),9,P1),f("p",R1,u(i(o)("statement.decidedAt",{date:i(Pe)(i(r),l.value.decidedAt)})),1),f("p",null,u(i(o)("statement.provider",{entity:l.value.providerEntity})),1),f("dl",N1,[c.value?(d(),m(q,{key:0},[f("dt",null,u(i(o)("statement.restriction")),1),f("dd",null,[St(u(i(o)(c.value))+" ",1),l.value.restrictionUntil?(d(),m("span",j1,u(i(o)("statement.until",{date:i(Pe)(i(r),l.value.restrictionUntil)})),1)):A("",!0)])],64)):A("",!0),h.value?(d(),m(q,{key:1},[f("dt",null,u(i(o)("report.category")),1),f("dd",null,u(i(o)(h.value)),1)],64)):A("",!0),b.value?(d(),m(q,{key:2},[f("dt",null,u(i(o)("statement.scope")),1),f("dd",null,u(b.value),1)],64)):A("",!0),p.value?(d(),m(q,{key:3},[f("dt",null,u(i(o)("statement.basis")),1),f("dd",null,u(i(o)(p.value)),1)],64)):A("",!0),f("dt",null,u(i(o)("statement.automation")),1),f("dd",null,[l.value.automatedDetection?(d(),m("span",z1,u(i(o)("statement.automatedDetection")),1)):A("",!0),f("span",null,u(l.value.automated?i(o)("statement.automatedDecision"):i(o)("statement.humanDecision")),1)]),l.value.legalGround?(d(),m(q,{key:4},[f("dt",null,u(i(o)("statement.legalGround")),1),f("dd",null,[f("p",null,u(l.value.legalGround),1),l.value.legalExplanation?(d(),m("p",L1,u(l.value.legalExplanation),1)):A("",!0)])],64)):A("",!0),l.value.contractualGround?(d(),m(q,{key:5},[f("dt",null,u(i(o)("statement.contractualGround")),1),f("dd",null,[f("p",null,u(l.value.contractualGround),1),l.value.contractualExplanation?(d(),m("p",D1,u(l.value.contractualExplanation),1)):A("",!0)])],64)):A("",!0),f("dt",null,u(i(o)("statement.subject")),1),f("dd",null,[f("p",null,u(i(o)($.value)),1),v.value?(d(),m("p",F1,[Ee(ec,{text:v.value},null,8,["text"])])):A("",!0)])]),f("h4",null,u(i(o)("statement.facts")),1),f("pre",U1,u(l.value.facts),1),f("h4",null,u(i(o)("statement.redress")),1),f("p",q1,u(l.value.redress),1),f("details",null,[f("summary",null,u(i(o)("statement.full")),1),f("pre",B1,u(l.value.statement),1)]),f("section",{class:"bcm-card","aria-labelledby":`${i(a)}-appeal`},[f("h4",{id:`${i(a)}-appeal`},u(i(o)("statement.appealTitle")),9,V1),I.value?(d(),m(q,{key:0},[f("p",null,u(i(o)("statement.appealOpen")),1),_.value?(d(),m("p",K1,u(i(o)(_.value)),1)):A("",!0),f("div",W1,[f("button",{type:"button",class:"bcm-btn",disabled:e.withdrawing,onClick:O[0]||(O[0]=w=>s("withdraw"))},u(i(o)("statement.appealWithdraw")),9,Y1)])],64)):l.value.canAppeal?(d(),m(q,{key:1},[f("p",null,u(i(o)("statement.appealLede")),1),f("p",G1,u(i(o)("statement.appealUntil",{date:i(Pe)(i(r),l.value.appealWindowClosesAt)})),1),f("form",{class:"bcm-form",novalidate:"",onSubmit:O[2]||(O[2]=mt(w=>T.value&&s("appeal"),["prevent"]))},[f("div",Z1,[f("label",{for:`${i(a)}-body`},u(i(o)("statement.appealBody")),9,J1),ge(f("textarea",{id:`${i(a)}-body`,"onUpdate:modelValue":O[1]||(O[1]=w=>e.appeal.body=w),class:"bcm-input bcm-textarea",rows:"5","aria-describedby":`${i(a)}-counter`,"aria-invalid":P.value>i(Tn)},null,8,X1),[[Xe,e.appeal.body]]),f("p",{id:`${i(a)}-counter`,class:"bcm-counter"},u(i(o)("statement.appealCounter",{length:P.value,max:i(Tn)})),9,Q1)]),g.value?(d(),m("p",e$,u(g.value),1)):A("",!0),f("div",t$,[f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!T.value},u(e.appeal.sending?i(o)("statement.appealSending"):i(o)("statement.appealSubmit")),9,n$)])],32)],64)):(d(),m(q,{key:2},[_.value?(d(),m("p",o$,u(i(o)(_.value)),1)):A("",!0),f("p",null,u(j.value?i(o)("statement.appealClosed"):i(o)("statement.appealUnavailable")),1)],64))],8,H1)],8,M1))}}),i$=["lang","aria-labelledby"],r$=["id"],a$={key:0,class:"bcm-note",role:"alert"},l$={key:1,class:"bcm-muted",role:"status"},c$={key:2,class:"bcm-error",role:"alert"},u$={key:0,class:"bcm-muted",role:"status"},d$={key:1,class:"bcm-row"},f$=["href"],m$={key:2,class:"bcm-error",role:"alert"},p$=["href"],h$={key:0,class:"bcm-muted",role:"status"},b$={key:1,class:"bcm-row"},g$=["href"],v$={key:2,class:"bcm-error",role:"alert"},y$=["aria-labelledby"],_$=["id"],k$={key:0,class:"bcm-msg"},w$={class:"bcm-msg-main"},$$={class:"bcm-author"},x$={class:"bcm-handle"},I$={class:"bcm-row"},T$={class:"bcm-field"},C$=["for"],S$=["id","aria-invalid"],A$={class:"bcm-hint"},O$={class:"bcm-field"},E$=["for"],M$=["id","maxlength","aria-invalid"],P$={class:"bcm-hint"},R$={class:"bcm-choices"},N$={class:"bcm-choice"},j$=["name"],z$=["name","value"],L$={key:0,class:"bcm-error",role:"alert"},D$={class:"bcm-row"},F$=["disabled"],U$=["disabled"],q$=["aria-labelledby"],B$={class:"bcm-row"},H$=["id"],V$={key:0,class:"bcm-badge"},K$=["disabled"],W$={key:0,class:"bcm-muted"},Y$={key:1,class:"bcm-list"},G$={key:0},Z$=["datetime"],J$=["href"],X$=["aria-labelledby"],Q$=["id"],e0={key:0,class:"bcm-muted"},t0={key:1,class:"bcm-list"},n0={key:0},o0={key:1,class:"bcm-muted"},s0={class:"bcm-muted"},i0={key:2,class:"bcm-muted"},r0={key:3,class:"bcm-muted"},a0=["href"],l0=["aria-labelledby"],c0=["id"],u0={key:0,class:"bcm-muted"},d0={key:1,class:"bcm-list"},f0={key:0},m0={key:1},p0={key:2},h0=["datetime"],b0={key:3,class:"bcm-muted"},g0=["aria-labelledby"],v0=["id"],y0={key:0,class:"bcm-muted"},_0={key:1,class:"bcm-list"},k0=["disabled","onClick"],w0=["aria-labelledby"],$0=["id"],x0={class:"bcm-row"},I0=["disabled"],T0={key:1,class:"bcm-row"},C0={key:2},S0=["aria-labelledby"],A0=["id"],O0={class:"bcm-hint"},E0={class:"bcm-row"},M0=["disabled"],P0=["aria-labelledby"],R0=["id"],N0={class:"bcm-row"},j0=["disabled"],z0={class:"bcm-hint"},L0={class:"bcm-row"},D0=["disabled"],F0={class:"bcm-sr","aria-live":"polite"},U0=$e({inheritAttrs:!1,__name:"MyCommunityView",props:{apiBase:{},siteBase:{},lang:{},decisionId:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=ue(ze(t.lang,Ue())),{t:s,text:o}=gt(n),r=He("bcm-panel"),a=ue(null),l=ht(t.siteBase),c=l===null?null:bt(t.apiBase,t.transport,l),p=c?l1({client:c,lang:n.value}):null,h=p?.state??null,b=z(()=>Mt(Et(t.routes),h?.me?.links,l??"")),_=z(()=>!!t.decisionId),$=ue(!1),v=ue(null),I=Vn();nt(()=>{if(!p)return;const K=c1(I);K!==void 0&&($.value=!0,p.loadNotice(K)),t.decisionId?p.loadStatement(t.decisionId):p.loadMember()}),ye(()=>t.decisionId,(K,D)=>{!p||K===D||(K?p.loadStatement(K):h?.phase==="idle"&&p.loadMember())}),Ge(()=>p?.dispose());const j=z(()=>{const K=h?.failure;if(!K)return"";const D=Ie(K,n.value);return s(D.key,D.params)}),P=z(()=>{const K=h?.statement.failure;if(!K)return"";const D=Ie(K,n.value);return s(D.key,D.params)}),T=z(()=>{const K=h?.notice.failure;if(!K)return"";const D=Ie(K,n.value);return s(D.key,D.params)});function g(){return En(t.signInHref,typeof location>"u"?null:location.pathname)}const k=K=>Jn(b.value.statementPath,K),O=K=>Ut(`notification.${K.code}`),w=K=>Ut(`restriction.${K}`),y=K=>Ut(`category.${K}`),x=K=>Ut(`caseStatus.${K}`),N=K=>{const D=h?.appeals.find(U=>U.decisionId===K);return D?Ut(`appealStatus.${D.status}`):null},M=z(()=>h?.me?.acceptances.art9Consent??null),E=z(()=>h?.me?.acceptances.art9Refused===!0),B=z(()=>h?.me?.member??null),ee=z(()=>h?.me?.profile??null);function re(){p?.exportData(K=>r1(K,a1(s("panel.exportFileName"))))}async function be(){p&&(v.value==="consent"?await p.withdrawConsent():v.value==="erase"&&await p.erase(),v.value=null)}const we=ue("");return ye(()=>h?.announceId,()=>{we.value="";const K=o(h?.announcement);Fe(()=>{we.value=K})}),(K,D)=>i(p)&&i(h)?(d(),m("section",{key:0,class:"bcm bcm-panel",lang:n.value,"aria-labelledby":`${i(r)}-title`},[f("h2",{id:`${i(r)}-title`,ref_key:"heading",ref:a,tabindex:"-1"},u(_.value?i(s)("statement.title"):i(s)("panel.title")),9,r$),$.value?(d(),m(q,{key:0},[i(h).notice.phase==="missing"?(d(),m("p",a$,u(i(s)("notice.receiptMissing")),1)):i(h).notice.phase==="loading"?(d(),m("p",l$,u(i(s)("common.loading")),1)):i(h).notice.phase==="failed"?(d(),m("p",c$,u(T.value),1)):i(h).notice.value?(d(),_e(E1,{key:3,notice:i(h).notice.value,appeal:i(h).notice.appeal,withdrawing:!!i(h).busy.noticeWithdraw,onAppeal:D[0]||(D[0]=U=>i(p).fileNoticeAppeal()),onWithdraw:D[1]||(D[1]=U=>i(p).withdrawNoticeAppeal())},null,8,["notice","appeal","withdrawing"])):A("",!0)],64)):A("",!0),_.value?(d(),m(q,{key:1},[i(h).statement.phase==="loading"?(d(),m("p",u$,u(i(s)("common.loading")),1)):i(h).statement.phase==="signIn"?(d(),m("div",d$,[f("p",null,u(i(s)("panel.signIn")),1),g()?(d(),m("a",{key:0,class:"bcm-btn bcm-primary",href:g()??void 0},u(i(s)("common.signIn")),9,f$)):A("",!0)])):i(h).statement.phase==="failed"?(d(),m("p",m$,u(P.value),1)):i(h).statement.value?(d(),_e(s$,{key:3,statement:i(h).statement.value,appeal:i(h).statement.appeal,withdrawing:!!i(h).busy.withdraw,onAppeal:D[2]||(D[2]=U=>i(p).fileAppeal()),onWithdraw:D[3]||(D[3]=U=>i(p).withdrawAppeal())},null,8,["statement","appeal","withdrawing"])):A("",!0),f("p",null,[f("a",{href:b.value.myCommunityPath},u(i(s)("common.back")),9,p$)])],64)):(d(),m(q,{key:2},[i(h).phase==="loading"?(d(),m("p",h$,u(i(s)("common.loading")),1)):i(h).phase==="signIn"&&!$.value?(d(),m("div",b$,[f("p",null,u(i(s)("panel.signIn")),1),g()?(d(),m("a",{key:0,class:"bcm-btn bcm-primary",href:g()??void 0},u(i(s)("common.signIn")),9,g$)):A("",!0)])):i(h).phase==="failed"?(d(),m("p",v$,u(j.value),1)):i(h).phase==="ready"?(d(),m(q,{key:3},[ee.value&&B.value?(d(),m("section",{key:0,class:"bcm-section","aria-labelledby":`${i(r)}-profile`},[f("h3",{id:`${i(r)}-profile`},u(i(s)("panel.profile")),9,_$),i(h).profile?(d(),m("form",{key:1,class:"bcm-form bcm-card",novalidate:"",onSubmit:D[10]||(D[10]=mt(U=>i(p).saveProfile(),["prevent"]))},[f("div",T$,[f("label",{for:`${i(r)}-name`},u(i(s)("onboarding.displayName")),9,C$),ge(f("input",{id:`${i(r)}-name`,"onUpdate:modelValue":D[5]||(D[5]=U=>i(h).profile.displayName=U),class:"bcm-input",autocomplete:"nickname","aria-invalid":i(h).profile.fields.includes("displayName")},null,8,S$),[[Xe,i(h).profile.displayName]]),f("p",A$,u(i(s)("onboarding.displayNameHint")),1)]),f("div",O$,[f("label",{for:`${i(r)}-handle`},u(i(s)("onboarding.handle")),9,E$),ge(f("input",{id:`${i(r)}-handle`,"onUpdate:modelValue":D[6]||(D[6]=U=>i(h).profile.handle=U),class:"bcm-input",autocomplete:"username",autocapitalize:"none",spellcheck:"false",maxlength:i(_s),"aria-invalid":i(h).profile.fields.includes("handle")},null,8,M$),[[Xe,i(h).profile.handle]]),f("p",P$,u(i(s)("onboarding.handleHint",{min:i(Wl),max:i(_s),days:i(ja)})),1)]),f("fieldset",R$,[f("legend",null,u(i(s)("onboarding.avatar")),1),f("label",N$,[ge(f("input",{"onUpdate:modelValue":D[7]||(D[7]=U=>i(h).profile.avatarPreset=U),type:"radio",name:`${i(r)}-avatar`,value:null},null,8,j$),[[xn,i(h).profile.avatarPreset]]),f("span",null,u(i(s)("onboarding.avatarNone")),1)]),(d(!0),m(q,null,me(i(zi),U=>(d(),m("label",{key:U.id,class:"bcm-choice"},[ge(f("input",{"onUpdate:modelValue":D[8]||(D[8]=Le=>i(h).profile.avatarPreset=Le),type:"radio",name:`${i(r)}-avatar`,value:U.id},null,8,z$),[[xn,i(h).profile.avatarPreset]]),f("span",null,u(U.emoji),1)]))),128))]),i(h).profile.failure?(d(),m("p",L$,u(i(o)(i(Ie)(i(h).profile.failure,n.value))),1)):A("",!0),f("div",D$,[D[22]||(D[22]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn",disabled:i(h).profile.sending,onClick:D[9]||(D[9]=U=>i(p).cancelProfile())},u(i(s)("composer.cancel")),9,F$),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:i(h).profile.sending},u(i(h).profile.sending?i(s)("composer.sending"):i(s)("composer.save")),9,U$)])],32)):(d(),m("div",k$,[Ee(Li,{author:{kind:"member",memberId:B.value.memberId,displayName:ee.value.displayName,avatarPreset:ee.value.avatarPreset}},null,8,["author"]),f("div",w$,[f("span",$$,u(ee.value.displayName),1),f("span",x$,u(ee.value.handle),1),f("div",I$,[f("button",{type:"button",class:"bcm-btn bcm-small",onClick:D[4]||(D[4]=U=>i(p).editProfile())},u(i(s)("panel.profileEdit")),1)])])]))],8,y$)):A("",!0),f("section",{class:"bcm-section","aria-labelledby":`${i(r)}-notifications`},[f("div",B$,[f("h3",{id:`${i(r)}-notifications`},u(i(s)("panel.notifications")),9,H$),i(p).unreadCount()>0?(d(),m("span",V$,u(i(s)("panel.unread",{count:i(p).unreadCount()})),1)):A("",!0),D[23]||(D[23]=f("span",{class:"bcm-spacer"},null,-1)),i(p).unreadCount()>0?(d(),m("button",{key:1,type:"button",class:"bcm-btn bcm-small",disabled:!!i(h).busy.markRead,onClick:D[11]||(D[11]=U=>i(p).markAllRead())},u(i(s)("panel.markRead")),9,K$)):A("",!0)]),i(h).notifications.length===0?(d(),m("p",W$,u(i(s)("panel.notificationsEmpty")),1)):(d(),m("ul",Y$,[(d(!0),m(q,null,me(i(h).notifications,U=>(d(),m("li",{key:U.id,class:Ve({"bcm-unread":U.readAt===null})},[O(U)?(d(),m("p",G$,u(i(s)(O(U))),1)):A("",!0),f("time",{class:"bcm-time",datetime:U.createdAt},u(i(Pe)(n.value,U.createdAt)),9,Z$),U.decisionId&&k(U.decisionId)?(d(),m("a",{key:1,href:k(U.decisionId)??void 0},u(i(s)("sanction.statement")),9,J$)):A("",!0)],2))),128))]))],8,q$),f("section",{class:"bcm-section","aria-labelledby":`${i(r)}-statements`},[f("h3",{id:`${i(r)}-statements`},u(i(s)("panel.statements")),9,Q$),i(h).decisions.length===0?(d(),m("p",e0,u(i(s)("panel.statementsEmpty")),1)):(d(),m("ul",t0,[(d(!0),m(q,null,me(i(h).decisions,U=>(d(),m("li",{key:U.decisionId},[w(U.restriction)?(d(),m("p",n0,[f("strong",null,u(i(s)(w(U.restriction))),1)])):A("",!0),y(U.category)?(d(),m("p",o0,u(i(s)(y(U.category))),1)):A("",!0),f("p",s0,u(i(s)("statement.decidedAt",{date:i(Pe)(n.value,U.decidedAt)})),1),N(U.decisionId)?(d(),m("p",i0,u(i(s)(N(U.decisionId))),1)):U.canAppeal?(d(),m("p",r0,u(i(s)("statement.appealUntil",{date:i(Pe)(n.value,U.appealWindowClosesAt)})),1)):A("",!0),k(U.decisionId)?(d(),m("a",{key:4,href:k(U.decisionId)??void 0},u(i(s)("sanction.statement")),9,a0)):A("",!0)]))),128))]))],8,X$),f("section",{class:"bcm-section","aria-labelledby":`${i(r)}-reports`},[f("h3",{id:`${i(r)}-reports`},u(i(s)("panel.reports")),9,c0),i(h).reports.length===0?(d(),m("p",u0,u(i(s)("panel.reportsEmpty")),1)):(d(),m("ul",d0,[(d(!0),m(q,null,me(i(h).reports,U=>(d(),m("li",{key:U.caseId},[y(U.category)?(d(),m("p",f0,[f("strong",null,u(i(s)(y(U.category))),1)])):A("",!0),x(U.status)?(d(),m("p",m0,u(i(s)(x(U.status))),1)):A("",!0),i(Ei)(U.outcome)?(d(),m("p",p0,u(i(s)(i(Ei)(U.outcome))),1)):A("",!0),f("time",{class:"bcm-time",datetime:U.reportedAt},u(i(Pe)(n.value,U.reportedAt)),9,h0),U.decidedAt?(d(),m("p",b0,u(i(s)("statement.decidedAt",{date:i(Pe)(n.value,U.decidedAt)})),1)):A("",!0)]))),128))]))],8,l0),B.value?(d(),m("section",{key:1,class:"bcm-section","aria-labelledby":`${i(r)}-blocks`},[f("h3",{id:`${i(r)}-blocks`},u(i(s)("panel.blocks")),9,v0),i(h).blocks.length===0?(d(),m("p",y0,u(i(s)("panel.blocksEmpty")),1)):(d(),m("ul",_0,[(d(!0),m(q,null,me(i(h).blocks,U=>(d(),m("li",{key:U.memberId,class:"bcm-row"},[f("span",null,u(U.author.kind==="member"&&"displayName"in U.author&&U.author.displayName?U.author.displayName:i(s)("author.deleted")),1),D[24]||(D[24]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn bcm-small",disabled:!!i(h).busy[`block:${U.memberId}`],onClick:Le=>i(p).unblock(U.memberId)},u(i(s)("discussion.unblock")),9,k0)]))),128))]))],8,g0)):A("",!0),B.value&&M.value!==null?(d(),m("section",{key:2,class:"bcm-section","aria-labelledby":`${i(r)}-consents`},[f("h3",{id:`${i(r)}-consents`},u(i(s)("panel.consents")),9,$0),M.value==="accepted"?(d(),m(q,{key:0},[f("p",null,u(i(s)("panel.art9Given")),1),f("div",x0,[f("button",{type:"button",class:"bcm-btn",disabled:!!i(h).busy.consent,onClick:D[12]||(D[12]=U=>v.value="consent")},u(i(s)("panel.art9Withdraw")),9,I0)])],64)):E.value?(d(),m(q,{key:1},[f("p",null,u(i(s)("panel.art9Refused")),1),i(p).consent.value?(d(),_e(So,{key:0,model:i(p).consent.value,"rules-href":b.value.rulesPath,onCancel:D[13]||(D[13]=U=>i(p).closeConsent())},null,8,["model","rules-href"])):(d(),m("div",T0,[f("button",{type:"button",class:"bcm-btn bcm-primary",onClick:D[14]||(D[14]=U=>i(p).giveConsent())},u(i(s)("discussion.giveConsent")),1)]))],64)):(d(),m("p",C0,u(i(s)("panel.art9NotGiven")),1))],8,w0)):A("",!0),B.value?(d(),m("section",{key:3,class:"bcm-section","aria-labelledby":`${i(r)}-export`},[f("h3",{id:`${i(r)}-export`},u(i(s)("panel.export")),9,A0),f("p",O0,u(i(s)("panel.exportHint")),1),f("div",E0,[f("button",{type:"button",class:"bcm-btn",disabled:i(h).exporting,onClick:D[15]||(D[15]=U=>re())},u(i(h).exporting?i(s)("panel.exporting"):i(s)("panel.export")),9,M0)])],8,S0)):A("",!0),B.value?(d(),m("section",{key:4,class:"bcm-section","aria-labelledby":`${i(r)}-erase`},[f("h3",{id:`${i(r)}-erase`},u(i(s)("panel.erase")),9,R0),i(p).erasing()?(d(),m(q,{key:0},[f("p",null,u(i(h).purgeAfter?i(s)("panel.eraseScheduled",{date:i(Pe)(n.value,i(h).purgeAfter)}):i(s)("notification.erasure_scheduled")),1),f("div",N0,[f("button",{type:"button",class:"bcm-btn bcm-primary",disabled:!!i(h).busy.erase,onClick:D[16]||(D[16]=U=>i(p).cancelErase())},u(i(s)("panel.eraseCancel")),9,j0)])],64)):(d(),m(q,{key:1},[f("p",z0,u(i(s)("panel.eraseExplain")),1),f("div",L0,[f("button",{type:"button",class:"bcm-btn bcm-danger",disabled:!!i(h).busy.erase,onClick:D[17]||(D[17]=U=>v.value="erase")},u(i(s)("panel.erase")),9,D0)])],64))],8,P0)):A("",!0)],64)):A("",!0)],64)),f("p",F0,u(we.value),1),v.value==="consent"?(d(),_e(ws,{key:3,title:"panel.art9WithdrawTitle",explain:"panel.art9WithdrawExplain",confirm:"panel.art9WithdrawConfirm",cancel:"panel.art9WithdrawCancel",busy:!!i(h).busy.consent,"fallback-focus":()=>a.value,onConfirm:D[18]||(D[18]=U=>be()),onCancel:D[19]||(D[19]=U=>v.value=null)},null,8,["busy","fallback-focus"])):A("",!0),v.value==="erase"?(d(),_e(ws,{key:4,title:"panel.eraseTitle",explain:"panel.eraseExplain",confirm:"panel.eraseConfirm",cancel:"panel.eraseKeep",danger:"",busy:!!i(h).busy.erase,"fallback-focus":()=>a.value,onConfirm:D[20]||(D[20]=U=>be()),onCancel:D[21]||(D[21]=U=>v.value=null)},null,8,["busy","fallback-focus"])):A("",!0)],8,i$)):A("",!0)}});function q0(e){const t=new AbortController,n={signal:t.signal},s=Re({target:e.target,category:"",ruleId:"",rules:null,description:"",name:"",email:"",goodFaith:!1,captcha:e.captcha?"loading":"off",token:null,resetSignal:0,sending:!1,failure:null,receipt:null,statusLink:null});let o=!1;const r=()=>s.category!==Uf,a=()=>lt(Ze(s.description));function l(){const h=a();return!s.sending&&s.receipt===null&&s.target!==null&&s.category!==""&&h>0&&h<=mi&<(s.name.trim())<=Ra&&s.goodFaith&&(s.captcha==="off"||s.captcha==="ready"&&s.token!==null)}function c(){o||(o=!0,e.client.legal.current({kind:"rules",locale:e.lang},n).then(h=>{s.rules=h.ok?Gn(h.value.bodyJson):[]}))}async function p(){if(!l()||!s.target||s.category==="")return;s.sending=!0,s.failure=null;const h={category:s.category,target:s.target,description:Ze(s.description),confirmations:[Pf]};s.category==="rules"&&s.ruleId!==""&&(h.ruleId=s.ruleId);const b=s.name.trim(),_=s.email.trim();r()&&(b!==""||_!=="")&&(h.notifier={name:b||null,email:_||null,locale:e.lang}),s.token!==null&&(h.turnstileToken=s.token),s.token=null;const $=await e.client.notices.submit(h,n);if(s.sending=!1,$.ok){s.receipt=$.value,s.statusLink=op(e.noticesPath,$.value.receipt),e.onSubmitted?.({contactKept:$.value.contactKept});return}s.failure=$,s.captcha!=="off"&&(s.resetSignal+=1)}return{state:s,contactAllowed:r,canSubmit:l,descriptionLength:a,setCategory(h){s.category=h,h!=="rules"?s.ruleId="":c()},setToken(h){s.token=h,h!==null&&s.captcha==="loading"&&(s.captcha="ready")},setCaptcha(h){s.captcha!=="off"&&(s.captcha=h)},submit:p,dispose(){t.abort()}}}const B0="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit";let Oo=null;function H0(e){const t=window;return t.turnstile?Promise.resolve(t.turnstile):Oo||(Oo=new Promise((n,s)=>{const o=document.createElement("script");o.src=B0,o.async=!0,o.defer=!0,e&&(o.nonce=e),o.onload=()=>t.turnstile?n(t.turnstile):s(new Error("[blogmcp-community] the Turnstile script loaded without its API")),o.onerror=()=>s(new Error("[blogmcp-community] the Turnstile script failed to load")),document.head.appendChild(o)}).catch(n=>{throw Oo=null,n}),Oo)}async function V0(e,t){const n=await H0(t.nonce),s=n.render(e,{sitekey:t.siteKey,action:Mf,language:t.language,appearance:"interaction-only",callback:r=>t.onToken(r),"expired-callback":()=>t.onToken(null),"error-callback":()=>t.onToken(null),"timeout-callback":()=>t.onToken(null)});let o=!1;return{reset(){o||(t.onToken(null),n.reset(s))},remove(){o||(o=!0,n.remove(s))}}}const K0=["lang","aria-labelledby"],W0=["id"],Y0={key:0},G0=["href"],Z0=["value","aria-label"],J0={key:2,class:"bcm-note"},X0={class:"bcm-field"},Q0={class:"bcm-label"},ex={class:"bcm-choices"},tx=["name","value","checked","onChange"],nx={key:0,class:"bcm-field"},ox=["for"],sx=["id"],ix=["value"],rx={class:"bcm-field"},ax=["for"],lx=["id","aria-describedby","aria-invalid"],cx=["id"],ux={key:1,class:"bcm-fieldset"},dx={class:"bcm-hint"},fx={class:"bcm-field"},mx=["for"],px=["id","maxlength"],hx={class:"bcm-field"},bx=["for"],gx=["id","aria-invalid"],vx={key:2,class:"bcm-note"},yx={key:3,class:"bcm-turnstile"},_x={key:0,class:"bcm-error",role:"alert"},kx={class:"bcm-check"},wx={key:4,class:"bcm-error",role:"alert"},$x={class:"bcm-row"},xx=["disabled"],Ix=["lang","aria-labelledby"],Tx=["id"],Cx=["href"],Sx=$e({inheritAttrs:!1,__name:"NoticeFormView",props:{apiBase:{},siteBase:{},lang:{},turnstileSiteKey:{},target:{},articleId:{},routes:{},transport:{type:Function}},setup(e){const t=e,n=Vn(),s=ue(ze(t.lang,Ue())),{t:o}=gt(s),r=He("bcm-notice"),a=ue(null),l=ue(null);function c(){const x=gs(t.target);return x||(t.articleId?gs({articleId:t.articleId}):typeof location>"u"?null:Op(location.hash))}const p=ht(t.siteBase),h=z(()=>Mt(Et(t.routes),null,p??"")),b=Bt(null),_=p===null?null:bt(t.apiBase,t.transport,p),$=c(),v=!!_&&!$;v&&Ft("notice-target","[blogmcp-community] <blogmcp-notice-form> has no target (a target, an article-id or the report link’s #c=…&s= fragment): it shows where a report starts instead of the form"),_&&$&&(b.value=q0({client:_,lang:s.value,target:$,captcha:!!t.turnstileSiteKey,noticesPath:h.value.noticesPath,onSubmitted:x=>n?.dispatchEvent(new CustomEvent("bcm-notice-submitted",{detail:x,bubbles:!0,composed:!0}))}));const I=z(()=>b.value?.state??null),j=z(()=>I.value?.target?Sp(I.value.target):null),P=z(()=>j.value==="message"?o("notice.targetMessage"):j.value==="article"?o("notice.targetArticle"):o("notice.targetProfile")),T=x=>`category.${x}`,g=z(()=>{const x=I.value?.failure;if(!x)return"";const N=Ie(x,s.value);return o(N.key,N.params)}),k=z(()=>{const x=I.value?.statusLink;return x&&typeof location<"u"?`${location.origin}${x}`:x??""});let O=null,w=null,y=!1;return nt(async()=>{const x=b.value;if(!(!x||!t.turnstileSiteKey||!n)){w=document.createElement("div"),w.slot="turnstile",n.appendChild(w);try{const N=n.nonce||n.getAttribute("nonce")||void 0,M=await V0(w,{siteKey:t.turnstileSiteKey,language:s.value,onToken:E=>x.setToken(E),nonce:N});if(y){M.remove();return}O=M,x.setCaptcha("ready")}catch{x.setCaptcha("unavailable")}}}),ye(()=>I.value?.resetSignal,(x,N)=>{x!==void 0&&N!==void 0&&x!==N&&O?.reset()}),ye(()=>I.value?.receipt,x=>{x&&(O?.remove(),O=null,Fe(()=>l.value?.focus()))}),Ge(()=>{y=!0,O?.remove(),O=null,w?.remove(),w=null,b.value?.dispose()}),(x,N)=>b.value&&I.value?(d(),m("section",{key:0,class:"bcm bcm-notice",lang:s.value,"aria-labelledby":`${i(r)}-title`},[f("h2",{id:`${i(r)}-title`,ref_key:"heading",ref:a,tabindex:"-1"},u(i(o)("notice.title")),9,W0),I.value.receipt?(d(),m("div",{key:0,ref_key:"done",ref:l,class:"bcm-receipt",role:"status",tabindex:"-1"},[f("p",null,u(i(o)("notice.done")),1),f("p",null,u(i(o)("notice.receiptLede")),1),I.value.statusLink?(d(),m("p",Y0,[f("a",{href:I.value.statusLink},u(i(o)("notice.statusLink")),9,G0)])):A("",!0),k.value?(d(),m("input",{key:1,class:"bcm-input",readonly:"",value:k.value,"aria-label":i(o)("notice.statusLink"),onFocus:N[0]||(N[0]=M=>M.target.select())},null,40,Z0)):A("",!0),I.value.receipt.contactKept?A("",!0):(d(),m("p",J0,u(i(o)("notice.noContactKept")),1))],512)):(d(),m("form",{key:1,class:"bcm-form",novalidate:"",onSubmit:N[6]||(N[6]=mt(M=>b.value.submit(),["prevent"]))},[f("p",null,u(i(o)("notice.lede")),1),f("div",X0,[f("span",Q0,u(i(o)("notice.target")),1),f("span",null,u(P.value),1)]),f("fieldset",ex,[f("legend",null,u(i(o)("notice.category")),1),(d(!0),m(q,null,me(i(hi),M=>(d(),m("label",{key:M,class:"bcm-choice"},[f("input",{type:"radio",name:`${i(r)}-category`,value:M,checked:I.value.category===M,onChange:E=>b.value.setCategory(M)},null,40,tx),f("span",null,u(i(o)(T(M))),1)]))),128))]),I.value.category==="rules"&&I.value.rules&&I.value.rules.length?(d(),m("div",nx,[f("label",{for:`${i(r)}-rule`},u(i(o)("notice.rule")),9,ox),ge(f("select",{id:`${i(r)}-rule`,"onUpdate:modelValue":N[1]||(N[1]=M=>I.value.ruleId=M),class:"bcm-input"},[N[7]||(N[7]=f("option",{value:""},null,-1)),(d(!0),m(q,null,me(I.value.rules,M=>(d(),m("option",{key:M.id,value:M.id},u(M.title),9,ix))),128))],8,sx),[[Wt,I.value.ruleId]])])):A("",!0),f("div",rx,[f("label",{for:`${i(r)}-description`},u(i(o)("notice.description")),9,ax),ge(f("textarea",{id:`${i(r)}-description`,"onUpdate:modelValue":N[2]||(N[2]=M=>I.value.description=M),class:"bcm-input bcm-textarea",rows:"5","aria-describedby":`${i(r)}-description-hint`,"aria-invalid":b.value.descriptionLength()>i(mi)},null,8,lx),[[Xe,I.value.description]]),f("p",{id:`${i(r)}-description-hint`,class:"bcm-hint"},u(i(o)("notice.descriptionHint"))+" "+u(i(o)("notice.counter",{length:b.value.descriptionLength(),max:i(mi)})),9,cx)]),b.value.contactAllowed()?(d(),m("fieldset",ux,[f("legend",null,u(i(o)("notice.contactTitle")),1),f("p",dx,u(i(o)("notice.contactHint")),1),f("div",fx,[f("label",{for:`${i(r)}-name`},u(i(o)("notice.name")),9,mx),ge(f("input",{id:`${i(r)}-name`,"onUpdate:modelValue":N[3]||(N[3]=M=>I.value.name=M),class:"bcm-input",autocomplete:"name",maxlength:i(Ra)},null,8,px),[[Xe,I.value.name]])]),f("div",hx,[f("label",{for:`${i(r)}-email`},u(i(o)("notice.email")),9,bx),ge(f("input",{id:`${i(r)}-email`,"onUpdate:modelValue":N[4]||(N[4]=M=>I.value.email=M),class:"bcm-input",type:"email",autocomplete:"email","aria-invalid":!!I.value.failure?.fields?.includes("notifier.email")},null,8,gx),[[Xe,I.value.email]])])])):(d(),m("p",vx,u(i(o)("notice.childAtRisk")),1)),I.value.captcha!=="off"?(d(),m("div",yx,[ed(x.$slots,"turnstile"),I.value.captcha==="unavailable"?(d(),m("p",_x,u(i(o)("notice.captchaUnavailable")),1)):A("",!0)])):A("",!0),f("label",kx,[ge(f("input",{"onUpdate:modelValue":N[5]||(N[5]=M=>I.value.goodFaith=M),type:"checkbox"},null,512),[[os,I.value.goodFaith]]),f("span",null,u(i(o)("confirm.good_faith")),1)]),g.value?(d(),m("p",wx,u(g.value),1)):A("",!0),f("div",$x,[N[8]||(N[8]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!b.value.canSubmit()},u(I.value.sending?i(o)("notice.sending"):i(o)("notice.submit")),9,xx)])],32))],8,K0)):i(v)?(d(),m("section",{key:1,class:"bcm bcm-notice",lang:s.value,"aria-labelledby":`${i(r)}-title`},[f("h2",{id:`${i(r)}-title`},u(i(o)("notice.title")),9,Tx),f("p",null,u(i(o)("notice.noTarget")),1),f("p",null,[f("a",{href:h.value.rulesPath},u(i(o)("onboarding.rulesTitle")),9,Cx)])],8,Ix)):A("",!0)}});function Ax(e){const{client:t}=e,n=new AbortController,s={signal:n.signal};let o=!1,r=0;const a=Re({phase:"idle",failure:null,items:[],nextCursor:null,unreadOnly:!1,loadingMore:!1,busy:{},announcement:null,announceId:0}),l=b=>{a.announcement=b,a.announceId+=1},c=b=>({key:`error.${b.code}`}),p=b=>b.filter(_=>Ua(_.code));async function h(){const b=++r;a.phase="loading",a.failure=null;const _=await t.me.notifications.list(a.unreadOnly?{unreadOnly:!0}:{},s);if(!(o||b!==r)){if(!_.ok){a.phase=_.code==="signIn"?"signIn":"failed",a.failure=_;return}a.items=p(_.value.items),a.nextCursor=_.value.nextCursor,a.phase="ready"}}return{state:a,load:h,async loadMore(){if(a.loadingMore||a.nextCursor===null||a.phase!=="ready")return;const b=r;a.loadingMore=!0;const _=await t.me.notifications.list({cursor:a.nextCursor,...a.unreadOnly?{unreadOnly:!0}:{}},s);if(a.loadingMore=!1,o||b!==r)return;if(!_.ok)return l(c(_));const $=new Set(a.items.map(v=>v.id));a.items=[...a.items,...p(_.value.items).filter(v=>!$.has(v.id))],a.nextCursor=_.value.nextCursor},async setUnreadOnly(b){a.unreadOnly!==b&&(a.unreadOnly=b,await h())},async markRead(b){const _=`read:${b}`,$=a.items.find(j=>j.id===b);if(!$||$.readAt!==null||a.busy[_])return;a.busy[_]=!0;const v=await t.me.notifications.markRead({ids:[b]},s);if(delete a.busy[_],o)return;if(!v.ok)return l(c(v));const I=new Date().toISOString();a.items=a.items.map(j=>j.id===b?{...j,readAt:I}:j)},async markAllRead(){if(a.busy.all||!a.items.some($=>$.readAt===null)&&a.nextCursor===null)return;a.busy.all=!0;const b=await t.me.notifications.markRead({all:!0},s);if(delete a.busy.all,o)return;if(!b.ok)return l(c(b));const _=new Date().toISOString();a.items=a.unreadOnly?[]:a.items.map($=>$.readAt===null?{...$,readAt:_}:$),a.unreadOnly&&(a.nextCursor=null)},unread:()=>a.items.filter(b=>b.readAt===null).length,dispose(){o=!0,n.abort()}}}const Ox=["lang","aria-labelledby"],Ex={class:"bcm-row"},Mx=["id"],Px={key:0,class:"bcm-badge"},Rx={key:0,class:"bcm-muted",role:"status"},Nx={key:1,class:"bcm-row"},jx=["href"],zx={key:2,class:"bcm-banner",role:"alert"},Lx={class:"bcm-row"},Dx={class:"bcm-check"},Fx=["checked"],Ux=["disabled"],qx={key:0,class:"bcm-muted"},Bx={key:1,class:"bcm-list"},Hx=["id"],Vx=["id","datetime"],Kx={class:"bcm-row"},Wx=["href"],Yx=["aria-describedby","disabled","onClick"],Gx={key:2,class:"bcm-row"},Zx=["disabled"],Jx=["href"],Xx={class:"bcm-sr","aria-live":"polite"},Qx=$e({inheritAttrs:!1,__name:"NotificationCentreView",props:{apiBase:{},siteBase:{},lang:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=ue(ze(t.lang,Ue())),{t:s,text:o}=gt(n),r=He("bcm-centre"),a=ht(t.siteBase),l=a===null?null:bt(t.apiBase,t.transport,a),c=l?Ax({client:l}):null,p=c?.state??null,h=z(()=>Mt(Et(t.routes),null,a??""));nt(()=>{c?.load()}),Ge(()=>c?.dispose());const b=z(()=>{const P=p?.failure;if(!P)return"";const T=Ie(P,n.value);return s(T.key,T.params)});function _(){return En(t.signInHref,typeof location>"u"?null:location.pathname)}const $=P=>P.code==="category_topic"&&P.conversationKind==="article"?"notification.category_topic.article":wp(P);function v(P){if(P.decisionId){const T=Jn(h.value.statementPath,P.decisionId);return T?{href:T,key:"sanction.statement"}:null}if(P.code==="category_topic"){if(P.articleId||P.conversationKind==="article"){const g=Ti(h.value.articlePath,P.articleSlug,P.seq);return g?{href:g,key:"centre.openMessage"}:null}const T=typeof P.conversationId=="string"?xo(h.value.topicPath,P.conversationId):null;return T?{href:T,key:"topic.open"}:null}if(P.code==="reply"||P.code==="mention"||P.code==="topic_update"){if(P.conversationKind==="topic"){const g=typeof P.conversationId=="string"&&typeof P.seq=="number"?Ii(h.value.topicPath,P.conversationId,P.seq):null;return g?{href:g,key:"centre.openMessage"}:null}const T=Ti(h.value.articlePath,P.articleSlug,P.seq);return T?{href:T,key:"centre.openMessage"}:null}return P.code==="module_push_reset"?{href:h.value.settingsPath,key:"centre.settings"}:P.code==="module_read_only"||P.code==="module_braked"||P.code==="age_limit_changed"||P.code==="erasure_scheduled"||P.code==="inactivity_warning"?{href:h.value.myCommunityPath,key:"panel.title"}:null}function I(P){c?.setUnreadOnly(P.target.checked)}const j=ue("");return ye(()=>p?.announceId,()=>{j.value="";const P=o(p?.announcement);Fe(()=>{j.value=P})}),(P,T)=>i(c)&&i(p)?(d(),m("section",{key:0,class:"bcm bcm-centre",lang:n.value,"aria-labelledby":`${i(r)}-title`},[f("div",Ex,[f("h2",{id:`${i(r)}-title`},u(i(s)("centre.title")),9,Mx),i(p).phase==="ready"&&i(c).unread()>0?(d(),m("span",Px,u(i(s)("panel.unread",{count:i(c).unread()})),1)):A("",!0)]),i(p).phase==="loading"||i(p).phase==="idle"?(d(),m("p",Rx,u(i(s)("common.loading")),1)):i(p).phase==="signIn"?(d(),m("div",Nx,[f("p",null,u(i(s)("centre.signIn")),1),_()?(d(),m("a",{key:0,class:"bcm-btn bcm-primary",href:_()??void 0},u(i(s)("common.signIn")),9,jx)):A("",!0)])):i(p).phase==="failed"?(d(),m("div",zx,[f("span",null,u(b.value),1),f("button",{type:"button",class:"bcm-btn",onClick:T[0]||(T[0]=g=>i(c).load())},u(i(s)("common.retry")),1)])):(d(),m(q,{key:3},[f("div",Lx,[f("label",Dx,[f("input",{type:"checkbox",checked:i(p).unreadOnly,onChange:I},null,40,Fx),f("span",null,u(i(s)("centre.unreadOnly")),1)]),T[3]||(T[3]=f("span",{class:"bcm-spacer"},null,-1)),i(c).unread()>0||i(p).nextCursor!==null?(d(),m("button",{key:0,type:"button",class:"bcm-btn bcm-small",disabled:!!i(p).busy.all,onClick:T[1]||(T[1]=g=>i(c).markAllRead())},u(i(s)("centre.markAllRead")),9,Ux)):A("",!0)]),i(p).items.length===0?(d(),m("p",qx,u(i(s)("centre.empty")),1)):(d(),m("ul",Bx,[(d(!0),m(q,null,me(i(p).items,g=>(d(),m("li",{key:g.id,class:Ve({"bcm-unread":g.readAt===null})},[$(g)?(d(),m("p",{key:0,id:`${i(r)}-s-${g.id}`},u(i(s)($(g))),9,Hx)):A("",!0),f("time",{id:`${i(r)}-t-${g.id}`,class:"bcm-time",datetime:g.createdAt},u(i(Pe)(n.value,g.createdAt)),9,Vx),f("div",Kx,[v(g)?(d(),m("a",{key:0,href:v(g).href},u(i(s)(v(g).key)),9,Wx)):A("",!0),T[4]||(T[4]=f("span",{class:"bcm-spacer"},null,-1)),g.readAt===null?(d(),m("button",{key:1,type:"button",class:"bcm-btn bcm-small","aria-describedby":$(g)?`${i(r)}-s-${g.id} ${i(r)}-t-${g.id}`:`${i(r)}-t-${g.id}`,disabled:!!i(p).busy[`read:${g.id}`],onClick:k=>i(c).markRead(g.id)},u(i(s)("panel.markRead")),9,Yx)):A("",!0)])],2))),128))])),i(p).nextCursor!==null?(d(),m("div",Gx,[f("button",{type:"button",class:"bcm-btn",disabled:i(p).loadingMore,onClick:T[2]||(T[2]=g=>i(c).loadMore())},u(i(s)("centre.loadMore")),9,Zx)])):A("",!0),f("p",null,[f("a",{href:h.value.settingsPath},u(i(s)("centre.settings")),9,Jx)])],64)),f("p",Xx,u(j.value),1)],8,Ox)):A("",!0)}});function _c(e){if(typeof e!="string")return null;const t=e.trim().replace(/^@/,"").toLowerCase();return yo.test(t)?t:null}function eI(e){const{client:t}=e,n=new AbortController,s={signal:n.signal};let o=!1,r=0;const a=Re({phase:"idle",failure:null,author:null,memberSince:null,bio:null,trustKey:null,moderates:[]});return{state:a,async load(l){const c=++r;a.failure=null,a.author=null,a.memberSince=null,a.bio=null,a.trustKey=null,a.moderates=[];const p=_c(l);if(p===null){a.phase="notFound";return}a.phase="loading";const h=await t.profile.get({handle:p},s);if(o||c!==r)return;if(!h.ok){a.phase=h.code==="signIn"?"signIn":h.code==="notFound"?"notFound":"failed",a.failure=h;return}const b=h.value;if(!Hf(b.author)||b.author.kind!=="member"||b.author.memberId===null){a.phase="notFound";return}a.author=b.author,a.memberSince=typeof b.memberSince=="string"?b.memberSince:null,a.bio=typeof b.bio=="string"&&b.bio.trim()!==""?b.bio:null,a.trustKey=$p(b.trustLabel),a.moderates=Array.isArray(b.moderates)?b.moderates.filter(_=>typeof _?.slug=="string"&&typeof _?.name=="string").map(_=>({slug:_.slug,name:_.name})):[],a.phase="ready"},dispose(){o=!0,n.abort()}}}function tI(e){const{client:t}=e,n=new AbortController,s={signal:n.signal};let o=!1;const r=Re({phase:"idle",rules:[],rulesFailed:!1,handle:null,visitor:!1});return{state:r,async load(){r.phase="loading";const[a,l]=await Promise.all([t.legal.current({kind:"rules",locale:e.lang},s),t.me.get(s)]);o||(a.ok?r.rules=Gn(a.value.bodyJson):r.rulesFailed=!0,l.ok?(r.visitor=l.value.needs.includes("sign_in"),r.handle=l.value.member?_c(l.value.profile?.handle):null):r.visitor=l.code==="signIn",r.phase="ready")},dispose(){o=!0,n.abort()}}}const nI=["lang","aria-labelledby"],oI={key:0,class:"bcm-muted",role:"status"},sI=["id"],iI={key:2,class:"bcm-row"},rI=["id"],aI=["href"],lI={key:3,class:"bcm-banner",role:"alert"},cI=["id"],uI={class:"bcm-profile-head"},dI={class:"bcm-msg-main"},fI=["id"],mI={class:"bcm-handle"},pI={key:0},hI={class:"bcm-badge"},bI={key:1,class:"bcm-row"},gI={class:"bcm-badge bcm-badge-team"},vI=["href"],yI={key:1},_I={key:2,class:"bcm-muted"},kI=["aria-labelledby"],wI=["id"],$I={class:"bcm-text"},xI=$e({inheritAttrs:!1,__name:"ProfileView",props:{handle:{},apiBase:{},siteBase:{},lang:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=ue(ze(t.lang,Ue())),{t:s}=gt(n),o=He("bcm-profile"),r=ht(t.siteBase),a=r===null?null:bt(t.apiBase,t.transport,r),l=a?eI({client:a}):null,c=l?.state??null;nt(()=>{l?.load(t.handle??"")}),ye(()=>t.handle,($,v)=>{$!==v&&l?.load($??"")}),Ge(()=>l?.dispose());const p=z(()=>c?.memberSince?Fp(n.value,c.memberSince):""),h=z(()=>Mt(Et(t.routes),null,r??"")),b=z(()=>{const $=c?.failure;if(!$)return"";const v=Ie($,n.value);return s(v.key,v.params)});function _(){return En(t.signInHref,typeof location>"u"?null:location.pathname)}return($,v)=>i(l)&&i(c)?(d(),m("section",{key:0,class:"bcm bcm-profile",lang:n.value,"aria-labelledby":`${i(o)}-title`},[i(c).phase==="loading"||i(c).phase==="idle"?(d(),m("p",oI,u(i(s)("common.loading")),1)):i(c).phase==="notFound"?(d(),m("p",{key:1,id:`${i(o)}-title`,class:"bcm-note"},u(i(s)("profile.notFound")),9,sI)):i(c).phase==="signIn"?(d(),m("div",iI,[f("p",{id:`${i(o)}-title`},u(i(s)("profile.signIn")),9,rI),_()?(d(),m("a",{key:0,class:"bcm-btn bcm-primary",href:_()??void 0},u(i(s)("common.signIn")),9,aI)):A("",!0)])):i(c).phase==="failed"?(d(),m("div",lI,[f("span",{id:`${i(o)}-title`},u(b.value),9,cI),f("button",{type:"button",class:"bcm-btn",onClick:v[0]||(v[0]=I=>i(l).load(t.handle??""))},u(i(s)("common.retry")),1)])):i(c).author&&i(c).author.kind==="member"?(d(),m(q,{key:4},[f("header",uI,[Ee(Li,{author:i(c).author},null,8,["author"]),f("div",dI,[f("h2",{id:`${i(o)}-title`},u(i(c).author.displayName),9,fI),f("span",mI,u(i(c).author.handle),1)])]),i(c).trustKey?(d(),m("p",pI,[f("span",hI,u(i(s)(i(c).trustKey)),1)])):A("",!0),i(c).moderates.length>0?(d(),m("p",bI,[f("span",gI,u(i(s)("role.moderator")),1),f("span",null,u(i(s)("profile.moderates")),1),(d(!0),m(q,null,me(i(c).moderates,I=>(d(),m(q,{key:I.slug},[i(On)(h.value.categoryPath,I.slug)?(d(),m("a",{key:0,href:i(On)(h.value.categoryPath,I.slug)??void 0},u(I.name),9,vI)):(d(),m("span",yI,u(I.name),1))],64))),128))])):A("",!0),p.value?(d(),m("p",_I,u(i(s)("profile.memberSince",{date:p.value})),1)):A("",!0),i(c).bio?(d(),m("section",{key:3,class:"bcm-section","aria-labelledby":`${i(o)}-bio`},[f("h3",{id:`${i(o)}-bio`},u(i(s)("profile.bio")),9,wI),f("p",$I,u(i(c).bio),1)],8,kI)):A("",!0)],64)):A("",!0)],8,nI)):A("",!0)}}),II=4e3;function TI(e){const{client:t,lang:n}=e,s=e.conversationId.toLowerCase(),o=yh(e),r=new AbortController,a={signal:r.signal};let l=!1;const c=$s({client:t,target:{conversationId:s},lang:n}),p=Re({rules:null,moveTargets:null,dialog:null,busy:{},announcement:null,announceId:0}),h=g=>{p.announcement=g,p.announceId+=1},b=()=>o.state.thread.topic;let _=null;const $=o.store.subscribe(g=>{const k=g.topic?.following;typeof k!="boolean"||k===_||(_===null&&c&&c.state.phase==="idle"?c.load(k):c?.sync(k),_=k)});function v(){const g=b();return g?.category?o.state.thread.viewer.moderator===!0||o.state.me!==null&&gl(o.state.me,g.category.id):!1}const I=g=>v()&&!o.isOwn(g)&&!g.pending&&g.seq>0&&g.body!==null&&g.state!=="deleted"&&g.author.kind==="member";async function j(g,k){if(p.busy[g])return;p.busy[g]=!0;const O=await k();if(delete p.busy[g],!l){if(O.ok){o.store.applyTopic(O.value.topic),h({key:"moderation.done"});return}h(Ie(O,n)),O.code==="notFound"&&o.refresh()}}async function P(){if(p.rules!==null)return;const g=await t.legal.current({kind:"rules",locale:n},a);!l&&g.ok&&(p.rules=Gn(g.value.bodyJson))}async function T(){if(p.moveTargets!==null)return;const g=await t.forum.categories.list(a);if(l||!g.ok)return;const k=b()?.category?.id,O=o.state.me;p.moveTargets=g.value.categories.filter(w=>w.kind==="topics"&&w.id!==k&&O!==null&&gl(O,w.id))}return{thread:o,follow:c,extras:p,async start(){await o.start()},isModerator:v,canModerate:I,setState:g=>j(`state:${g}`,()=>t.moderation.setTopicState({conversationId:s,state:g},a)),setPinned:g=>j(`pin:${g}`,()=>t.moderation.pinTopic({conversationId:s,pinned:g},a)),openDialog(g,k=null){p.dialog={kind:g,seq:k,ruleId:"",facts:"",category:"",categoryId:"",sending:!1,failure:null,statement:null,done:!1},g==="remove"&&P(),g==="move"&&T()},closeDialog(){p.dialog=null},async submitDialog(){const g=p.dialog;if(!g||g.sending||g.done)return;if(g.kind==="move"){if(g.categoryId==="")return;g.sending=!0;const y=await t.moderation.moveTopic({conversationId:s,categoryId:g.categoryId},a);if(g.sending=!1,l)return;if(y.ok){o.store.applyTopic(y.value.topic),p.dialog=null,p.moveTargets=null,h({key:"moderation.done"});return}g.failure=y;return}const k=g.seq===null?null:o.state.thread.messages.flatMap(y=>[y,...y.replies]).find(y=>y.seq===g.seq);if(!k)return;if(g.kind==="escalate"){if(g.category===""||!ls.includes(g.category))return;g.sending=!0;const y=await t.moderation.escalate({conversationId:s,seq:k.seq,category:g.category},a);if(g.sending=!1,l)return;if(y.ok){g.done=!0,h({key:"moderation.escalated"});return}g.failure=y,y.code==="notFound"&&o.refresh();return}const O=Ze(g.facts);if(g.ruleId===""||O===""||lt(O)>II)return;g.sending=!0;const w=await t.moderation.remove({conversationId:s,seq:k.seq,ruleId:g.ruleId,facts:O,locale:n},a);if(g.sending=!1,!l){if(w.ok){g.done=!0,g.statement=w.value.statement,h({key:"moderation.removed"}),o.refresh();return}g.failure=w,w.code==="notFound"&&o.refresh()}},dispose(){l||(l=!0,r.abort(),$(),c?.dispose(),o.dispose())}}}const CI=["aria-labelledby"],SI=["id"],AI={class:"bcm-field"},OI=["for"],EI=["id"],MI={value:"",disabled:""},PI=["value"],RI={class:"bcm-field"},NI=["for"],jI=["id","aria-describedby"],zI=["id"],LI={role:"status"},DI={class:"bcm-facts"},FI={class:"bcm-field"},UI=["for"],qI=["id"],BI={value:"",disabled:""},HI=["value"],VI={key:1,role:"status"},KI={key:2,class:"bcm-field"},WI=["for"],YI=["id"],GI={value:"",disabled:""},ZI=["value"],JI={key:3,class:"bcm-error",role:"alert"},XI={class:"bcm-row"},QI=["disabled"],eT=["disabled"],tT=$e({__name:"ModeratorDialog",props:{ctl:{},fallbackFocus:{type:Function}},emits:["close"],setup(e,{emit:t}){const n=e,s=t,{t:o,lang:r}=vt(),a=ue(null),l=He("bcm-moderator");Mi(a,()=>s("close"),n.fallbackFocus);const c=z(()=>n.ctl.extras.dialog),p=z(()=>c.value?.kind==="remove"?"moderation.remove":c.value?.kind==="escalate"?"moderation.escalate":"moderation.move"),h=$=>`category.${$}`,b=z(()=>{const $=c.value?.failure;if(!$)return"";const v=Ie($,r.value);return o(v.key,v.params)}),_=z(()=>{const $=c.value;if(!$||$.sending||$.done)return!1;if($.kind==="move")return $.categoryId!=="";if($.kind==="escalate")return $.category!=="";const v=Ze($.facts);return $.ruleId!==""&&v!==""&<(v)<=4e3});return($,v)=>(d(),m("dialog",{ref_key:"dialog",ref:a,class:"bcm-dialog","aria-labelledby":`${i(l)}-title`},[c.value?(d(),m("form",{key:0,class:"bcm-dialog-body bcm-form",novalidate:"",onSubmit:v[5]||(v[5]=mt(I=>_.value&&e.ctl.submitDialog(),["prevent"]))},[f("h3",{id:`${i(l)}-title`},u(i(o)(p.value)),9,SI),c.value.kind==="remove"?(d(),m(q,{key:0},[c.value.done?(d(),m(q,{key:1},[f("p",LI,u(i(o)("moderation.removed")),1),f("h4",null,u(i(o)("statement.title")),1),f("pre",DI,u(c.value.statement),1)],64)):(d(),m(q,{key:0},[f("p",null,u(i(o)("moderation.removeLede")),1),f("div",AI,[f("label",{for:`${i(l)}-rule`},u(i(o)("statement.contractualGround")),9,OI),ge(f("select",{id:`${i(l)}-rule`,"onUpdate:modelValue":v[0]||(v[0]=I=>c.value.ruleId=I),class:"bcm-input bcm-select",required:""},[f("option",MI,u(i(o)("moderation.ruleRequired")),1),(d(!0),m(q,null,me(e.ctl.extras.rules??[],I=>(d(),m("option",{key:I.id,value:I.id},u(I.title),9,PI))),128))],8,EI),[[Wt,c.value.ruleId]])]),f("div",RI,[f("label",{for:`${i(l)}-facts`},u(i(o)("statement.facts")),9,NI),ge(f("textarea",{id:`${i(l)}-facts`,"onUpdate:modelValue":v[1]||(v[1]=I=>c.value.facts=I),class:"bcm-input bcm-textarea",rows:"4","aria-describedby":`${i(l)}-facts-hint`},null,8,jI),[[Xe,c.value.facts]]),f("p",{id:`${i(l)}-facts-hint`,class:"bcm-hint"},u(i(o)("moderation.factsHint")),9,zI)])],64))],64)):c.value.kind==="escalate"?(d(),m(q,{key:1},[c.value.done?(d(),m("p",VI,u(i(o)("moderation.escalated")),1)):(d(),m(q,{key:0},[f("p",null,u(i(o)("moderation.escalateLede")),1),f("div",FI,[f("label",{for:`${i(l)}-category`},u(i(o)("moderation.escalateCategory")),9,UI),ge(f("select",{id:`${i(l)}-category`,"onUpdate:modelValue":v[2]||(v[2]=I=>c.value.category=I),class:"bcm-input bcm-select",required:""},[f("option",BI,u(i(o)("moderation.escalateCategory")),1),(d(!0),m(q,null,me(i(ls),I=>(d(),m("option",{key:I,value:I},u(i(o)(h(I))),9,HI))),128))],8,qI),[[Wt,c.value.category]])])],64))],64)):(d(),m("div",KI,[f("label",{for:`${i(l)}-target`},u(i(o)("moderation.moveTo")),9,WI),ge(f("select",{id:`${i(l)}-target`,"onUpdate:modelValue":v[3]||(v[3]=I=>c.value.categoryId=I),class:"bcm-input bcm-select",required:""},[f("option",GI,u(i(o)("moderation.moveTo")),1),(d(!0),m(q,null,me(e.ctl.extras.moveTargets??[],I=>(d(),m("option",{key:I.id,value:I.id},u(I.name),9,ZI))),128))],8,YI),[[Wt,c.value.categoryId]])])),b.value?(d(),m("p",JI,u(b.value),1)):A("",!0),f("div",XI,[v[6]||(v[6]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn",disabled:c.value.sending,onClick:v[4]||(v[4]=I=>s("close"))},u(c.value.done?i(o)("common.close"):i(o)("common.cancel")),9,QI),c.value.done?A("",!0):(d(),m("button",{key:0,type:"submit",class:Ve(["bcm-btn bcm-primary",{"bcm-danger":c.value.kind==="remove"}]),disabled:!_.value},u(i(o)(p.value)),11,eT))])],32)):A("",!0)],8,CI))}}),nT=["lang","aria-labelledby"],oT={class:"bcm-row"},sT=["href"],iT=["href"],rT=["id"],aT=["id"],lT=["id"],cT={key:3,class:"bcm-banner",role:"alert"},uT=["id"],dT={class:"bcm-head"},fT=["id"],mT={key:0,class:"bcm-badge"},pT={key:1,class:"bcm-badge"},hT={key:2,class:"bcm-badge"},bT={class:"bcm-count"},gT={key:0,class:"bcm-banner",role:"status"},vT=["disabled"],yT={key:1,class:"bcm-hint",role:"status"},_T={class:"bcm-thread"},kT={key:2,class:"bcm-muted"},wT={key:3,class:"bcm-row"},$T=["disabled"],xT={class:"bcm-section"},IT={key:0,class:"bcm-hint"},TT={key:2,class:"bcm-note"},CT={key:3,class:"bcm-note"},ST={key:1,class:"bcm-row"},AT={key:5,class:"bcm-note"},OT={key:6,class:"bcm-section"},ET=["href"],MT={key:7,class:"bcm-note",role:"status"},PT={key:8,class:"bcm-note"},RT=["href"],NT={class:"bcm-sr","aria-live":"polite"},kc=new WeakMap,jT=$e({inheritAttrs:!1,__name:"TopicView",props:{conversationId:{},apiBase:{},siteBase:{},lang:{},signInHref:{},routes:{},pollMs:{},transport:{type:Function},realtime:{type:Function}},setup(e){const t=e,n=Vn(),s=ue(ze(t.lang,Ue())),{t:o,text:r}=gt(s,uc);ye(()=>t.lang,J=>{s.value=ze(J,Ue())});const a=He("bcm-topic"),l=ue(null),c=ue(0),p=Bt(null),h=z(()=>ht(t.siteBase)),b=z(()=>h.value===null?null:bt(t.apiBase,t.transport,h.value));function _(){const J=t.conversationId?.trim();return J?b.value?TI({client:b.value,conversationId:J,lang:s.value,pollMs:t.pollMs,realtime:typeof t.realtime=="function"?t.realtime:null,refusedAge:(n&&kc.get(n))??null,onAgeRefused:W=>{n&&kc.set(n,W)},onPosted:W=>n?.dispatchEvent(new CustomEvent("bcm-posted",{detail:{state:W},bubbles:!0,composed:!0}))}):null:(Ft("conversation-id","[blogmcp-community] <blogmcp-topic> needs a conversation-id"),null)}const $=Re(new Set),v=Re(new Set),I=Re(new Set),j=ue(null),P=z(()=>p.value),T=z(()=>p.value?.thread??null),g=z(()=>p.value?.thread.state??null),k=z(()=>Mt(Et(t.routes),g.value?.me?.links,h.value??""));function O(J){return p.value?.canModerate(J)?[{id:"mod-remove",label:o("moderation.remove"),danger:!0},{id:"mod-escalate",label:o("moderation.escalate")}]:[]}sc({get ctl(){return p.value.thread},routes:k,opened:$,originals:v,allReplies:I,focusHeading:()=>l.value,deleteMessage:J=>{j.value=J},extraMenu:O,onExtraMenu:(J,W)=>{J==="mod-remove"?p.value?.openDialog("remove",W.seq):J==="mod-escalate"&&p.value?.openDialog("escalate",W.seq)}});let w=null;const y=ue(null);let x=!1;async function N(){if(x||typeof location>"u")return;x=!0;const J=xl(location.hash),W=J===null?null:Io(J);if(J===null||W===null)return;const pe=g.value?.thread.messages.find(Pt=>Pt.replies.some(Cs=>Cs.seq===J));pe&&I.add(pe.seq),await Fe();const qt=y.value?.querySelector(`#${W}`);typeof qt?.scrollIntoView=="function"&&qt.scrollIntoView({block:"start"})}function M(){x=!1,p.value?.dispose(),$.clear(),v.clear(),I.clear(),j.value=null,p.value=_(),c.value+=1,p.value?.start()}nt(()=>{M(),n&&typeof IntersectionObserver<"u"&&(w=new IntersectionObserver(J=>{const W=J[J.length-1];W&&p.value?.thread.setInView(W.isIntersecting)},{rootMargin:"200px"}),w.observe(n))}),ye(()=>[t.conversationId,t.apiBase,h.value,t.transport,t.realtime,t.pollMs,s.value],()=>M()),Ge(()=>{w?.disconnect(),p.value?.dispose(),p.value=null}),ye(()=>g.value?.phase,J=>{J==="ready"&&N()});const E=z(()=>g.value?.thread.topic??null),B=z(()=>g.value?ms(g.value.thread):null),ee=z(()=>{const J=B.value;return J?J.kind==="shown"?J.text:o(J.kind==="deleted"?"topic.deleted":"topic.withheld"):""}),re=z(()=>E.value?.category?On(k.value.categoryPath,E.value.category.slug):null),be=z(()=>T.value?.mode()??"pending"),we=z(()=>{const J=Is(g.value?.me??null);return Di(J.paused??"forum")}),K=ue(null);ye(be,(J,W)=>{J==="write"&&W==="onboarding"&&Fe(()=>K.value?.focus()),J==="ageRefused"&&W==="onboarding"&&Fe(()=>l.value?.focus())});const D=z(()=>{const J=T.value?.needs();return J?.onboarding?"need.onboarding":J?.rules?"need.reconsent_rules":"need.art9_consent"}),U=z(()=>{const J=p.value,W=E.value;if(!J||!W||!J.isModerator())return[];const pe=[];return W.state==="open"?pe.push({id:"lock",label:o("moderation.lock")}):W.state==="locked"&&pe.push({id:"unlock",label:o("moderation.unlock")}),pe.push(W.pinned?{id:"unpin",label:o("moderation.unpin")}:{id:"pin",label:o("moderation.pin")}),pe.push({id:"move",label:o("moderation.move")}),pe});function Le(J){const W=p.value;W&&(J==="lock"||J==="unlock"?W.setState(J==="lock"?"locked":"open"):J==="pin"||J==="unpin"?W.setPinned(J==="pin"):J==="move"&&W.openDialog("move"))}function Ne(J){const W=J.endsAt?Pe(s.value,J.endsAt):"";return J.kind==="ban"?o("sanction.ban"):J.kind==="suspension"?W?o("sanction.suspensionUntil",{date:W}):o("sanction.suspension"):W?o("sanction.restrictionUntil",{date:W}):o("sanction.restriction")}const De=z(()=>{const J=g.value?.failure;if(!J)return"";const W=Ie(J,s.value);return o(W.key,W.params)}),Qe=ue("");function oe(J){Qe.value="",Fe(()=>{Qe.value=J})}ye(()=>g.value?.announceId,()=>oe(r(g.value?.announcement))),ye(()=>p.value?.extras.announceId,()=>oe(r(p.value?.extras.announcement)));async function Z(){const J=j.value;J===null||!T.value||(await T.value.remove(J),j.value=null)}return(J,W)=>P.value&&T.value&&g.value&&g.value.phase!=="hidden"?(d(),m("section",{ref_key:"section",ref:y,key:c.value,class:"bcm bcm-topic",lang:s.value,"aria-labelledby":i(a)},[f("nav",oT,[re.value&&E.value?.category?(d(),m("a",{key:0,href:re.value},u(E.value.category.name),9,sT)):(d(),m("a",{key:1,href:k.value.forumPath},u(i(o)("forum.back")),9,iT))]),g.value.phase==="loading"?(d(),m("p",{key:0,id:i(a),class:"bcm-muted",role:"status"},u(i(o)("topic.loading")),9,rT)):g.value.phase==="membersOnly"&&b.value?(d(),m("div",{key:1,id:i(a)},[Ee(Ts,{failure:g.value.failure,client:b.value,lang:s.value,"sign-in-href":e.signInHref,"rules-href":k.value.rulesPath,onJoined:W[0]||(W[0]=pe=>T.value.refresh())},null,8,["failure","client","lang","sign-in-href","rules-href"])],8,aT)):g.value.phase==="notFound"?(d(),m("p",{key:2,id:i(a),class:"bcm-note"},u(i(o)("topic.notFound")),9,lT)):g.value.phase==="failed"?(d(),m("div",cT,[f("span",{id:i(a)},u(De.value),9,uT),f("button",{type:"button",class:"bcm-btn",onClick:W[1]||(W[1]=pe=>T.value.refresh())},u(i(o)("common.retry")),1)])):(d(),m(q,{key:4},[f("header",dT,[f("h2",{id:i(a),ref_key:"heading",ref:l,tabindex:"-1",class:Ve({"bcm-placeholder":B.value?.kind!=="shown"})},u(ee.value),11,fT),E.value?.pinned?(d(),m("span",mT,u(i(o)("topic.pinned")),1)):A("",!0),E.value?.state==="locked"?(d(),m("span",pT,u(i(o)("topic.locked")),1)):E.value?.state==="archived"?(d(),m("span",hT,u(i(o)("topic.archived")),1)):A("",!0),f("span",bT,u(i(o)("topic.count",{count:g.value.thread.count})),1),W[14]||(W[14]=f("span",{class:"bcm-spacer"},null,-1)),P.value.follow&&g.value.thread.viewer.memberId!==null?(d(),_e(xs,{key:3,ctl:P.value.follow},null,8,["ctl"])):A("",!0),U.value.length?(d(),_e(tc,{key:4,items:U.value,label:i(o)("moderation.title"),onSelect:Le},null,8,["items","label"])):A("",!0)]),Ee(Fi,{me:g.value.me},null,8,["me"]),g.value.newMessages?(d(),m("div",gT,[f("span",null,u(i(o)("discussion.newMessages")),1),f("button",{type:"button",class:"bcm-btn",disabled:g.value.refreshing,onClick:W[2]||(W[2]=pe=>T.value.refresh())},u(i(o)("discussion.refresh")),9,vT)])):A("",!0),g.value.realtimeOff?(d(),m("p",yT,u(i(o)("realtime.off")),1)):A("",!0),f("ol",_T,[(d(!0),m(q,null,me(g.value.thread.messages,pe=>(d(),_e(ic,{key:pe.id,message:pe},null,8,["message"]))),128))]),g.value.thread.messages.length<=1?(d(),m("p",kT,u(i(o)("discussion.empty")),1)):A("",!0),g.value.thread.nextCursor!==null?(d(),m("div",wT,[f("button",{type:"button",class:"bcm-btn",disabled:g.value.loadingMore,onClick:W[3]||(W[3]=pe=>T.value.loadMore())},u(i(o)("discussion.loadMore")),9,$T)])):A("",!0),f("div",xT,[be.value==="write"&&g.value.art9RefusedNote?(d(),m("p",IT,u(i(o)("onboarding.art9RefusedDone")),1)):A("",!0),be.value==="write"?(d(),_e(Co,{key:1,ref_key:"composer",ref:K,kind:"new",draft:g.value.composer,wait:T.value.waitLeft(g.value.composer),"rules-href":k.value.rulesPath,"mentions-max":T.value.mentionCap(),onSubmit:W[4]||(W[4]=pe=>T.value.submit()),onConfirm:W[5]||(W[5]=(pe,qt)=>T.value&&T.value.setConfirmed(g.value.composer,pe,qt)),onConfirmed:W[6]||(W[6]=pe=>T.value.sendConfirmed(g.value.composer))},null,8,["draft","wait","rules-href","mentions-max"])):be.value==="locked"?(d(),m("p",TT,u(i(o)("error.topicLocked")),1)):be.value==="readOnly"?(d(),m("p",CT,u(i(o)("error.readOnly")),1)):be.value==="onboarding"?(d(),m(q,{key:4},[T.value.onboarding.value?(d(),_e(So,{key:0,model:T.value.onboarding.value,"rules-href":k.value.rulesPath,onCancel:W[7]||(W[7]=pe=>T.value.cancelOnboarding())},null,8,["model","rules-href"])):(d(),m("div",ST,[f("p",null,u(i(o)(D.value)),1),f("button",{type:"button",class:"bcm-btn bcm-primary",onClick:W[8]||(W[8]=pe=>T.value.beginOnboarding())},u(i(o)("onboarding.continue")),1)]))],64)):be.value==="ageRefused"?(d(),m("p",AT,u(i(o)("onboarding.ageBelow",{min:g.value.refusedAge??18})),1)):be.value==="sanction"?(d(),m("div",OT,[(d(!0),m(q,null,me(g.value.thread.viewer.restrictions,pe=>(d(),m("p",{key:pe.decisionId,class:"bcm-note"},[St(u(Ne(pe))+" ",1),i(Jn)(k.value.statementPath,pe.decisionId)?(d(),m("a",{key:0,href:i(Jn)(k.value.statementPath,pe.decisionId)??void 0},u(i(o)("sanction.statement")),9,ET)):A("",!0)]))),128))])):be.value==="braked"&&we.value?(d(),m("p",MT,u(i(o)(we.value)),1)):be.value==="restricted"?(d(),m("p",PT,[St(u(i(o)("error.restricted"))+" ",1),f("a",{href:k.value.myCommunityPath},u(i(o)("panel.title")),9,RT)])):A("",!0)])],64)),f("p",NT,u(Qe.value),1),g.value.report?(d(),_e(rc,{key:5,report:g.value.report,"my-community-href":k.value.myCommunityPath,"rules-href":k.value.rulesPath,"fallback-focus":()=>l.value,onSubmit:W[9]||(W[9]=pe=>T.value.submitReport()),onClose:W[10]||(W[10]=pe=>T.value.closeReport())},null,8,["report","my-community-href","rules-href","fallback-focus"])):A("",!0),j.value!==null?(d(),_e(ws,{key:6,title:"discussion.deleteTitle",explain:"discussion.deleteExplain",confirm:"discussion.deleteConfirm",danger:"",busy:!!g.value.busy[`delete:${j.value}`],"fallback-focus":()=>l.value,onConfirm:W[11]||(W[11]=pe=>Z()),onCancel:W[12]||(W[12]=pe=>j.value=null)},null,8,["busy","fallback-focus"])):A("",!0),P.value.extras.dialog?(d(),_e(tT,{key:7,ctl:P.value,"fallback-focus":()=>l.value,onClose:W[13]||(W[13]=pe=>P.value.closeDialog())},null,8,["ctl","fallback-focus"])):A("",!0)],8,nT)):A("",!0)}}),zT=["lang","aria-labelledby"],LT=["id"],DT={key:0,class:"bcm-muted",role:"status"},FT=["aria-labelledby"],UT=["id"],qT={key:0,class:"bcm-rules"},BT={key:0,class:"bcm-hint"},HT=["href"],VT={class:"bcm-links"},KT=["href"],WT=["href"],YT={key:0},GT=["href"],ZT={key:1},JT=["href"],XT=$e({inheritAttrs:!1,__name:"WelcomeView",props:{apiBase:{},siteBase:{},lang:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=ue(ze(t.lang,Ue())),{t:s}=gt(n),o=He("bcm-welcome"),r=ht(t.siteBase),a=r===null?null:bt(t.apiBase,t.transport,r),l=a?tI({client:a,lang:n.value}):null,c=l?.state??null,p=z(()=>Mt(Et(t.routes),null,r??"")),h=z(()=>c?.handle?kl(p.value.profilePath,c.handle):null);nt(()=>{l?.load()}),Ge(()=>l?.dispose());function b(){return En(t.signInHref,typeof location>"u"?null:location.pathname)}return(_,$)=>i(l)&&i(c)?(d(),m("section",{key:0,class:"bcm bcm-welcome",lang:n.value,"aria-labelledby":`${i(o)}-title`},[f("h2",{id:`${i(o)}-title`},u(i(s)("welcome.title")),9,LT),f("p",null,u(i(s)("welcome.lede")),1),i(c).phase!=="ready"?(d(),m("p",DT,u(i(s)("common.loading")),1)):(d(),m(q,{key:1},[f("section",{class:"bcm-section","aria-labelledby":`${i(o)}-rules`},[f("h3",{id:`${i(o)}-rules`},u(i(s)("welcome.rules")),9,UT),i(c).rules.length?(d(),m("ol",qT,[(d(!0),m(q,null,me(i(c).rules,v=>(d(),m("li",{key:v.id},[f("strong",null,u(v.title),1),v.summary?(d(),m("span",BT,u(v.summary),1)):A("",!0)]))),128))])):A("",!0),f("p",null,[f("a",{href:p.value.rulesPath},u(i(s)("onboarding.rulesLink")),9,HT)])],8,FT),f("ul",VT,[f("li",null,[f("a",{class:"bcm-btn",href:p.value.discussionsPath},u(i(s)("welcome.discussions")),9,KT)]),f("li",null,[f("a",{class:"bcm-btn",href:p.value.settingsPath},u(i(s)("welcome.settings")),9,WT)]),h.value?(d(),m("li",YT,[f("a",{class:"bcm-btn",href:h.value},u(i(s)("welcome.profile")),9,GT)])):i(c).visitor&&b()?(d(),m("li",ZT,[f("a",{class:"bcm-btn bcm-primary",href:b()??void 0},u(i(s)("common.signIn")),9,JT)])):A("",!0)])],64))],8,zT)):A("",!0)}}),QT=':host{all:initial;display:block;--bcm-bg: #ffffff;--bcm-fg: #1d1f23;--bcm-muted: #5f6672;--bcm-line: #dfe2e7;--bcm-soft: #f4f5f7;--bcm-accent: #2457d6;--bcm-accent-fg: #ffffff;--bcm-danger: #b42318;--bcm-ok: #1f7a3f;--bcm-warn-bg: #fff6d6;--bcm-shadow: 0 8px 28px rgba(16, 24, 40, .18);--bcm-z: 20;color-scheme:light dark;font:var(--bcm-font-size, 16px) / 1.5 var(--bcm-font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);color:var(--bcm-fg)}:host([hidden]){display:none}@media(prefers-color-scheme:dark){:host{--bcm-bg: #1c1f24;--bcm-fg: #eceef1;--bcm-muted: #a4abb6;--bcm-line: #343943;--bcm-soft: #262a31;--bcm-accent: #6d93ff;--bcm-accent-fg: #0d1117;--bcm-danger: #ff8a7a;--bcm-ok: #6fd08e;--bcm-warn-bg: #3a3420;--bcm-shadow: 0 8px 28px rgba(0, 0, 0, .5)}}*{box-sizing:border-box}h2,h3,h4{margin:0;font-weight:650;line-height:1.3}h2{font-size:1.25em}h3{font-size:1.05em}h4{font-size:1em}p{margin:0}ul,ol{margin:0;padding:0}a{color:var(--bcm-accent)}.bcm{background:var(--bcm-bg);color:var(--bcm-fg);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:16px;max-width:100%;overflow-wrap:anywhere}.bcm-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.bcm-btn{font:inherit;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:6px 14px;border-radius:8px;border:1px solid var(--bcm-line);background:var(--bcm-bg);color:var(--bcm-fg);cursor:pointer;text-decoration:none}.bcm-btn:hover:not(:disabled){background:var(--bcm-soft)}.bcm-btn:disabled{opacity:.55;cursor:default}.bcm-primary{background:var(--bcm-accent);border-color:var(--bcm-accent);color:var(--bcm-accent-fg)}.bcm-primary:hover:not(:disabled){background:var(--bcm-accent);filter:brightness(1.08)}.bcm-danger{color:var(--bcm-danger)}.bcm-primary.bcm-danger{background:var(--bcm-danger);border-color:var(--bcm-danger);color:var(--bcm-bg)}.bcm-small{min-height:30px;padding:2px 10px;font-size:.875em}.bcm-link{font:inherit;border:0;background:none;padding:0;color:var(--bcm-accent);cursor:pointer;text-align:left;text-decoration:underline}.bcm-quiet{font:inherit;border:0;background:none;padding:4px 6px;color:var(--bcm-muted);cursor:pointer;border-radius:6px;min-height:30px}.bcm-quiet:hover:not(:disabled){background:var(--bcm-soft);color:var(--bcm-fg)}.bcm-btn:focus-visible,.bcm-link:focus-visible,.bcm-quiet:focus-visible,.bcm-input:focus-visible,.bcm-react:focus-visible,a:focus-visible,.bcm-choice input:focus-visible+span{outline:2px solid var(--bcm-accent);outline-offset:2px}.bcm-input{font:inherit;width:100%;padding:8px 10px;border-radius:8px;border:1px solid var(--bcm-line);background:var(--bcm-bg);color:var(--bcm-fg)}.bcm-input[aria-invalid=true]{border-color:var(--bcm-danger);border-width:2px}.bcm-textarea{resize:vertical;min-height:96px}.bcm-field{display:flex;flex-direction:column;gap:4px}.bcm-field>label,.bcm-label{font-weight:600}.bcm-check{display:flex;gap:8px;align-items:flex-start}.bcm-check input{margin-top:.3em;width:18px;height:18px;flex:none}.bcm-choices{display:flex;flex-wrap:wrap;gap:8px;border:0;margin:0;padding:0;min-width:0}.bcm-choices legend,.bcm-fieldset legend{font-weight:600;padding:0;margin-bottom:6px}.bcm-fieldset{border:0;margin:0;padding:0;min-width:0;display:flex;flex-direction:column;gap:8px}.bcm-choice{position:relative;display:inline-flex}.bcm-choice input{position:absolute;opacity:0;width:1px;height:1px}.bcm-choice span{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;min-width:40px;padding:6px 12px;border:1px solid var(--bcm-line);border-radius:999px;cursor:pointer;background:var(--bcm-bg)}.bcm-choice input:checked+span{border:2px solid var(--bcm-accent);font-weight:650}.bcm-choice input:checked+span:before{content:"✓"}.bcm-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.bcm-spacer{flex:1}.bcm-full{flex-basis:100%}.bcm-muted,.bcm-hint{color:var(--bcm-muted);font-size:.875em}.bcm-error{color:var(--bcm-danger)}.bcm-ok{color:var(--bcm-ok)}.bcm-note{background:var(--bcm-soft);border-radius:8px;padding:8px 12px;font-size:.9375em}.bcm-warning{background:var(--bcm-warn-bg);border-radius:8px;padding:8px 12px;font-size:.9375em}.bcm-banner{background:var(--bcm-warn-bg);border-radius:10px;padding:10px 12px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.bcm-text{white-space:pre-wrap;overflow-wrap:anywhere}.bcm-facts{font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;background:var(--bcm-soft);border-radius:8px;padding:10px 12px}.bcm-badge{display:inline-flex;align-items:center;gap:4px;border:1px solid currentColor;border-radius:999px;padding:0 8px;font-size:.8125em;line-height:1.6}.bcm-badge-team{color:var(--bcm-accent);font-weight:650}.bcm-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}.bcm-count{color:var(--bcm-muted)}.bcm-thread,.bcm-replies{list-style:none;display:flex;flex-direction:column;gap:12px}.bcm-replies{margin-top:12px;padding-left:20px;border-left:2px solid var(--bcm-line)}.bcm-msg{display:flex;gap:10px;align-items:flex-start}.bcm-msg-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}.bcm-msg-pending{opacity:.65}.bcm-meta{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;font-size:.875em}.bcm-author{font-weight:650}.bcm-handle,.bcm-time{color:var(--bcm-muted)}.bcm-handle:before{content:"@"}.bcm-placeholder{color:var(--bcm-muted);font-style:italic}.bcm-own-state{border-left:3px solid var(--bcm-line);padding-left:10px;display:flex;flex-direction:column;gap:4px}.bcm-actions{display:flex;align-items:center;flex-wrap:wrap;gap:2px 6px}.bcm-avatar{flex:none;width:36px;height:36px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:var(--bcm-soft);font-size:20px;line-height:1;-webkit-user-select:none;user-select:none}.bcm-avatar-initial{color:#fff;font-size:16px;font-weight:650}.bcm-reactions{display:flex;flex-wrap:wrap;gap:6px}.bcm-react{font:inherit;display:inline-flex;align-items:center;gap:4px;min-height:32px;padding:2px 10px;border-radius:999px;border:1px solid var(--bcm-line);background:var(--bcm-bg);color:var(--bcm-fg);cursor:pointer}button.bcm-react:hover:not(:disabled){background:var(--bcm-soft)}.bcm-react[aria-pressed=true]{border:2px solid var(--bcm-accent);font-weight:700}span.bcm-react{cursor:default}.bcm-menu{position:relative;display:inline-flex}.bcm-menu-list{position:absolute;right:0;top:calc(100% + 4px);z-index:var(--bcm-z);min-width:200px;display:flex;flex-direction:column;padding:4px;background:var(--bcm-bg);border:1px solid var(--bcm-line);border-radius:10px;box-shadow:var(--bcm-shadow)}.bcm-menu-list button,.bcm-menu-list a{font:inherit;text-align:left;border:0;background:none;color:var(--bcm-fg);padding:8px 10px;border-radius:6px;cursor:pointer;text-decoration:none;min-height:36px}.bcm-menu-list button:hover,.bcm-menu-list a:hover{background:var(--bcm-soft)}.bcm-composer{display:flex;flex-direction:column;gap:8px}.bcm-composer-foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.bcm-counter{color:var(--bcm-muted);font-size:.8125em;font-variant-numeric:tabular-nums}.bcm-counter-over{color:var(--bcm-danger);font-weight:650}.bcm-confirm{border:2px solid var(--bcm-accent);border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:10px}.bcm-card{border:1px solid var(--bcm-line);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:12px}.bcm-steps{color:var(--bcm-muted);font-size:.875em}.bcm-rules{list-style:none;display:flex;flex-direction:column;gap:8px}.bcm-rules li{display:flex;flex-direction:column;gap:2px}.bcm-consent{max-height:260px;overflow:auto;border:1px solid var(--bcm-line);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:8px}.bcm-form{display:flex;flex-direction:column;gap:14px}.bcm-section{display:flex;flex-direction:column;gap:10px}.bcm-list{list-style:none;display:flex;flex-direction:column;gap:8px}.bcm-list>li{border:1px solid var(--bcm-line);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:4px}.bcm-unread{border-left:4px solid var(--bcm-accent)!important}.bcm-dl{display:grid;grid-template-columns:minmax(120px,max-content) 1fr;gap:6px 14px;margin:0}.bcm-dl dt{font-weight:600}.bcm-dl dd{margin:0}.bcm-receipt{display:flex;flex-direction:column;gap:8px}.bcm-turnstile{min-height:0}.bcm-mention{color:var(--bcm-accent);font-weight:600;text-decoration:none}.bcm-mention:hover{text-decoration:underline}:host(blogmcp-badge){display:inline-block}.bcm-badge-link{display:inline-flex;align-items:center;justify-content:center;min-width:1.5em;height:1.5em;padding:0 6px;border-radius:999px;background:var(--bcm-accent);color:var(--bcm-accent-fg);font-size:.8125em;font-weight:700;line-height:1;text-decoration:none;font-variant-numeric:tabular-nums}.bcm-switches{list-style:none;display:flex;flex-direction:column;gap:10px}.bcm-switches li{display:flex;flex-direction:column;gap:2px}.bcm-profile-head{display:flex;align-items:center;gap:12px}.bcm-profile-head .bcm-avatar{width:48px;height:48px;font-size:26px}.bcm-links{list-style:none;display:flex;flex-direction:column;gap:8px}.bcm-url{overflow-wrap:anywhere;font-family:ui-monospace,monospace;font-size:.875em}.bcm-dialog{border:1px solid var(--bcm-line);border-radius:14px;padding:0;width:min(520px,calc(100vw - 32px));max-height:calc(100vh - 32px);background:var(--bcm-bg);color:var(--bcm-fg);box-shadow:var(--bcm-shadow)}.bcm-dialog::backdrop{background:#0a0c1073}.bcm-dialog-body{padding:16px;display:flex;flex-direction:column;gap:12px}@media(max-width:480px){.bcm{padding:12px;border-radius:0}.bcm-replies{padding-left:12px}.bcm-avatar{width:30px;height:30px;font-size:17px}.bcm-dl{grid-template-columns:1fr}.bcm-dialog{width:100vw;max-width:100vw;margin:auto 0 0;border-radius:16px 16px 0 0}}@media(prefers-reduced-motion:no-preference){.bcm-dialog[open]{animation:bcm-in .14s ease-out}@keyframes bcm-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}}:host(blogmcp-follow-button){display:inline-block}.bcm-follow-host{display:inline-flex}.bcm-follow{display:inline-flex;align-items:center;gap:6px}.bcm-follow .bcm-btn[aria-pressed=true]{border:2px solid var(--bcm-accent);font-weight:650}.bcm-grow{flex:1;min-width:0}.bcm-select{width:auto;max-width:100%}.bcm-category{gap:8px}.bcm-topics{list-style:none;display:flex;flex-direction:column}.bcm-topic-row{border-bottom:1px solid var(--bcm-line);padding:8px 0;display:flex;flex-direction:column;gap:4px}.bcm-topic-row:last-child{border-bottom:0}.bcm-topic-title{font-weight:650}';function eC(){const e=globalThis,t={__VUE_OPTIONS_API__:!0,__VUE_PROD_DEVTOOLS__:!1,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__:!1};for(const[n,s]of Object.entries(t))typeof e[n]>"u"&&(e[n]=s)}const wc="blogmcp-discussion",$c="blogmcp-notice-form",xc="blogmcp-my-community",Ic="blogmcp-notification-centre",Tc="blogmcp-badge",Cc="blogmcp-member-settings",Sc="blogmcp-profile",Ac="blogmcp-welcome",Oc="blogmcp-forum",Ec="blogmcp-forum-category",Mc="blogmcp-topic",Pc="blogmcp-forum-search",Rc="blogmcp-follow-button",Nc="blogmcp-forum-moderation";function tC(e){const t=e.nonce;return typeof t=="string"&&t!==""?t:e.getAttribute("nonce")||void 0}function nC(e,t){const n=rf(e);return class extends n{connectedCallback(){const o=tC(this),r=t||o;r&&!o&&(this.nonce=r);const a=this.shadowRoot;if(a&&!a.querySelector("style[data-bcm]")){const l=document.createElement("style");l.setAttribute("data-bcm",""),r&&l.setAttribute("nonce",r),l.textContent=QT,a.prepend(l)}super.connectedCallback()}}}function yt(e,t,n){typeof customElements>"u"||customElements.get(e)||(eC(),customElements.define(e,nC(t,n)))}function jc(e={}){yt(e.tag??wc,wv,e.nonce)}function zc(e={}){yt(e.tag??$c,Sx,e.nonce)}function Lc(e={}){yt(e.tag??xc,U0,e.nonce)}function Dc(e={}){yt(e.tag??Ic,Qx,e.nonce)}function Fc(e={}){yt(e.tag??Tc,zp,e.nonce)}function Uc(e={}){yt(e.tag??Cc,i1,e.nonce)}function qc(e={}){yt(e.tag??Sc,xI,e.nonce)}function Bc(e={}){yt(e.tag??Ac,XT,e.nonce)}function Hc(e={}){yt(e.tag??Oc,yw,e.nonce)}function Vc(e={}){yt(e.tag??Ec,Ay,e.nonce)}function Kc(e={}){yt(e.tag??Mc,jT,e.nonce)}function Wc(e={}){yt(e.tag??Pc,Zk,e.nonce)}function Yc(e={}){yt(e.tag??Rc,Av,e.nonce)}function Gc(e={}){yt(e.tag??Nc,pk,e.nonce)}function Zc(e={}){jc({tag:e.tags?.discussion,nonce:e.nonce}),zc({tag:e.tags?.noticeForm,nonce:e.nonce}),Lc({tag:e.tags?.myCommunity,nonce:e.nonce}),Dc({tag:e.tags?.notificationCentre,nonce:e.nonce}),Fc({tag:e.tags?.badge,nonce:e.nonce}),Uc({tag:e.tags?.memberSettings,nonce:e.nonce}),qc({tag:e.tags?.profile,nonce:e.nonce}),Bc({tag:e.tags?.welcome,nonce:e.nonce}),Hc({tag:e.tags?.forum,nonce:e.nonce}),Vc({tag:e.tags?.forumCategory,nonce:e.nonce}),Kc({tag:e.tags?.topic,nonce:e.nonce}),Wc({tag:e.tags?.forumSearch,nonce:e.nonce}),Yc({tag:e.tags?.followButton,nonce:e.nonce}),Gc({tag:e.tags?.forumModeration,nonce:e.nonce})}function _t(e,t){for(const[n,s]of Object.entries(t))s!=null&&s!==""&&e.setAttribute(n,String(s))}function kt(e,t){return t.transport&&(e.transport=t.transport),(t.container??document.body).appendChild(e),()=>e.remove()}function oC(e){if(typeof document>"u")return()=>{};jc({nonce:e.nonce});const t=document.createElement(wc);return _t(t,{"article-id":e.articleId,"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,"sign-in-href":e.signInHref,routes:e.routes?JSON.stringify(e.routes):void 0,"poll-ms":e.pollMs,nonce:e.nonce}),e.realtime&&(t.realtime=e.realtime),kt(t,e)}function sC(e){if(typeof document>"u")return()=>{};zc({nonce:e.nonce});const t=document.createElement($c);return _t(t,{"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,"turnstile-site-key":e.turnstileSiteKey,target:e.target?JSON.stringify(e.target):void 0,"article-id":e.articleId,routes:e.routes?JSON.stringify(e.routes):void 0,nonce:e.nonce}),kt(t,e)}function iC(e={}){if(typeof document>"u")return()=>{};Lc({nonce:e.nonce});const t=document.createElement(xc);return _t(t,{"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,"decision-id":e.decisionId,routes:e.routes?JSON.stringify(e.routes):void 0,"sign-in-href":e.signInHref,nonce:e.nonce}),kt(t,e)}function rC(e={}){if(typeof document>"u")return()=>{};Dc({nonce:e.nonce});const t=document.createElement(Ic);return _t(t,{"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,routes:e.routes?JSON.stringify(e.routes):void 0,"sign-in-href":e.signInHref,nonce:e.nonce}),kt(t,e)}function aC(e={}){if(typeof document>"u")return()=>{};Fc({nonce:e.nonce});const t=document.createElement(Tc);return _t(t,{"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,routes:e.routes?JSON.stringify(e.routes):void 0,"poll-ms":e.pollMs,nonce:e.nonce}),kt(t,e)}function lC(e={}){if(typeof document>"u")return()=>{};Uc({nonce:e.nonce});const t=document.createElement(Cc);return _t(t,{"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,"sw-path":e.swPath,routes:e.routes?JSON.stringify(e.routes):void 0,"sign-in-href":e.signInHref,nonce:e.nonce}),kt(t,e)}function cC(e){if(typeof document>"u")return()=>{};qc({nonce:e.nonce});const t=document.createElement(Sc);return _t(t,{handle:e.handle,"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,routes:e.routes?JSON.stringify(e.routes):void 0,"sign-in-href":e.signInHref,nonce:e.nonce}),kt(t,e)}function uC(e={}){if(typeof document>"u")return()=>{};Bc({nonce:e.nonce});const t=document.createElement(Ac);return _t(t,{"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,routes:e.routes?JSON.stringify(e.routes):void 0,"sign-in-href":e.signInHref,nonce:e.nonce}),kt(t,e)}function dC(e={}){if(typeof document>"u")return()=>{};Hc({nonce:e.nonce});const t=document.createElement(Oc);return _t(t,{"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,routes:e.routes?JSON.stringify(e.routes):void 0,"sign-in-href":e.signInHref,nonce:e.nonce}),kt(t,e)}function fC(e){if(typeof document>"u")return()=>{};Vc({nonce:e.nonce});const t=document.createElement(Ec);return _t(t,{slug:e.slug,"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,routes:e.routes?JSON.stringify(e.routes):void 0,"sign-in-href":e.signInHref,nonce:e.nonce}),kt(t,e)}function mC(e){if(typeof document>"u")return()=>{};Kc({nonce:e.nonce});const t=document.createElement(Mc);return _t(t,{"conversation-id":e.conversationId,"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,routes:e.routes?JSON.stringify(e.routes):void 0,"sign-in-href":e.signInHref,"poll-ms":e.pollMs,nonce:e.nonce}),e.realtime&&(t.realtime=e.realtime),kt(t,e)}function pC(e={}){if(typeof document>"u")return()=>{};Wc({nonce:e.nonce});const t=document.createElement(Pc);return _t(t,{"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,routes:e.routes?JSON.stringify(e.routes):void 0,"sign-in-href":e.signInHref,nonce:e.nonce}),kt(t,e)}function hC(e){if(typeof document>"u")return()=>{};Yc({nonce:e.nonce});const t=document.createElement(Rc);return _t(t,{"target-kind":e.targetKind,"target-id":e.targetId,following:typeof e.following=="boolean"?String(e.following):void 0,"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,nonce:e.nonce}),kt(t,e)}function bC(e={}){if(typeof document>"u")return()=>{};Gc({nonce:e.nonce});const t=document.createElement(Nc);return _t(t,{"category-id":e.categoryId,"api-base":e.apiBase,"site-base":e.siteBase,lang:e.lang,routes:e.routes?JSON.stringify(e.routes):void 0,nonce:e.nonce}),kt(t,e)}const gC="0.3.0",vC=typeof document<"u"?document.currentScript:null;return Zc({nonce:vC?.nonce||void 0}),Ye.VERSION=gC,Ye.defineCommunityElements=Zc,Ye.mountBadge=aC,Ye.mountDiscussion=oC,Ye.mountFollowButton=hC,Ye.mountForum=dC,Ye.mountForumCategory=fC,Ye.mountForumModeration=bC,Ye.mountForumSearch=pC,Ye.mountMemberSettings=lC,Ye.mountMyCommunity=iC,Ye.mountNoticeForm=sC,Ye.mountNotificationCentre=rC,Ye.mountProfile=cC,Ye.mountTopic=mC,Ye.mountWelcome=uC,Object.defineProperty(Ye,Symbol.toStringTag,{value:"Module"}),Ye})({});
|