@blogmcp/community 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +243 -2
- package/dist/blogmcp-community.global.js +10 -0
- package/dist/chunks/mount-WadUnaTa.js +6436 -0
- package/dist/core/attrs.d.ts +99 -0
- package/dist/core/avatars.d.ts +16 -0
- package/dist/core/badge.d.ts +30 -0
- package/dist/core/centre.d.ts +28 -0
- package/dist/core/client.d.ts +27 -0
- package/dist/core/digest-token.d.ts +2 -0
- package/dist/core/discussion.d.ts +175 -0
- package/dist/core/download.d.ts +4 -0
- package/dist/core/format.d.ts +24 -0
- package/dist/core/i18n.d.ts +28 -0
- package/dist/core/names.d.ts +15 -0
- package/dist/core/notice.d.ts +50 -0
- package/dist/core/onboarding.d.ts +92 -0
- package/dist/core/outcomes.d.ts +29 -0
- package/dist/core/panel.d.ts +96 -0
- package/dist/core/profile.d.ts +40 -0
- package/dist/core/push.d.ts +63 -0
- package/dist/core/realtime.d.ts +35 -0
- package/dist/core/receipt.d.ts +5 -0
- package/dist/core/settings.d.ts +53 -0
- package/dist/core/text.d.ts +35 -0
- package/dist/core/turnstile.d.ts +33 -0
- package/dist/element.d.ts +47 -0
- package/dist/global.d.ts +11 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +45 -0
- package/dist/mount.d.ts +105 -0
- package/dist/react.d.ts +28 -0
- package/dist/react.js +55 -0
- package/dist/ui/AuthorAvatar.vue.d.ts +11 -0
- package/dist/ui/BadgeView.vue.d.ts +13 -0
- package/dist/ui/ConfirmDialog.vue.d.ts +20 -0
- package/dist/ui/DiscussionView.vue.d.ts +44 -0
- package/dist/ui/LinkedText.vue.d.ts +6 -0
- package/dist/ui/MemberSettingsView.vue.d.ts +13 -0
- package/dist/ui/MessageComposer.vue.d.ts +26 -0
- package/dist/ui/MessageItem.vue.d.ts +6 -0
- package/dist/ui/MessageMenu.vue.d.ts +10 -0
- package/dist/ui/MyCommunityView.vue.d.ts +16 -0
- package/dist/ui/NoticeFormView.vue.d.ts +26 -0
- package/dist/ui/NoticeStatusView.vue.d.ts +15 -0
- package/dist/ui/NotificationCentreView.vue.d.ts +12 -0
- package/dist/ui/OnboardingSteps.vue.d.ts +11 -0
- package/dist/ui/ProfileView.vue.d.ts +13 -0
- package/dist/ui/ReactionBar.vue.d.ts +13 -0
- package/dist/ui/ReportDialog.vue.d.ts +15 -0
- package/dist/ui/StatementView.vue.d.ts +15 -0
- package/dist/ui/WelcomeView.vue.d.ts +12 -0
- package/dist/ui/context.d.ts +21 -0
- package/dist/ui/discussion-context.d.ts +19 -0
- package/dist/ui/types.d.ts +7 -0
- package/dist/version.d.ts +1 -0
- package/dist/vue.d.ts +200 -0
- package/dist/vue.js +201 -0
- package/package.json +80 -4
- package/src/core/attrs.ts +186 -0
- package/src/core/avatars.ts +44 -0
- package/src/core/badge.ts +120 -0
- package/src/core/centre.ts +136 -0
- package/src/core/client.ts +54 -0
- package/src/core/digest-token.ts +26 -0
- package/src/core/discussion.ts +876 -0
- package/src/core/download.ts +21 -0
- package/src/core/format.ts +112 -0
- package/src/core/i18n.ts +49 -0
- package/src/core/names.ts +51 -0
- package/src/core/notice.ts +178 -0
- package/src/core/onboarding.ts +492 -0
- package/src/core/outcomes.ts +86 -0
- package/src/core/panel.ts +446 -0
- package/src/core/profile.ts +144 -0
- package/src/core/push.ts +174 -0
- package/src/core/realtime.ts +39 -0
- package/src/core/receipt.ts +28 -0
- package/src/core/settings.ts +363 -0
- package/src/core/text.ts +174 -0
- package/src/core/turnstile.ts +98 -0
- package/src/element.ts +165 -0
- package/src/global.ts +26 -0
- package/src/index.ts +70 -0
- package/src/mount.ts +234 -0
- package/src/react.ts +97 -0
- package/src/shims.d.ts +11 -0
- package/src/ui/AuthorAvatar.vue +26 -0
- package/src/ui/BadgeView.vue +51 -0
- package/src/ui/ConfirmDialog.vue +38 -0
- package/src/ui/DiscussionView.vue +334 -0
- package/src/ui/LinkedText.vue +24 -0
- package/src/ui/MemberSettingsView.vue +175 -0
- package/src/ui/MessageComposer.vue +141 -0
- package/src/ui/MessageItem.vue +223 -0
- package/src/ui/MessageMenu.vue +67 -0
- package/src/ui/MyCommunityView.vue +378 -0
- package/src/ui/NoticeFormView.vue +244 -0
- package/src/ui/NoticeStatusView.vue +82 -0
- package/src/ui/NotificationCentreView.vue +159 -0
- package/src/ui/OnboardingSteps.vue +174 -0
- package/src/ui/ProfileView.vue +91 -0
- package/src/ui/ReactionBar.vue +41 -0
- package/src/ui/ReportDialog.vue +88 -0
- package/src/ui/StatementView.vue +141 -0
- package/src/ui/WelcomeView.vue +72 -0
- package/src/ui/context.ts +75 -0
- package/src/ui/discussion-context.ts +30 -0
- package/src/ui/styles.css +259 -0
- package/src/ui/types.ts +7 -0
- package/src/version.ts +3 -0
- package/src/vue.ts +242 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var BlogmcpCommunity=(function(et){"use strict";function Ys(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const we={},dn=[],Qt=()=>{},ti=()=>!1,is=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Gs=e=>e.startsWith("onUpdate:"),qe=Object.assign,ni=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},wl=Object.prototype.hasOwnProperty,ge=(e,t)=>wl.call(e,t),le=Array.isArray,fn=e=>Rn(e)==="[object Map]",pn=e=>Rn(e)==="[object Set]",si=e=>Rn(e)==="[object Date]",be=e=>typeof e=="function",$e=e=>typeof e=="string",rt=e=>typeof e=="symbol",Ie=e=>e!==null&&typeof e=="object",oi=e=>(Ie(e)||be(e))&&be(e.then)&&be(e.catch),ii=Object.prototype.toString,Rn=e=>ii.call(e),xl=e=>Rn(e).slice(8,-1),rs=e=>Rn(e)==="[object Object]",Zs=e=>$e(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Nn=Ys(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),as=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Il=/-\w/g,Le=as(e=>e.replace(Il,t=>t.slice(1).toUpperCase())),Sl=/\B([A-Z])/g,Ye=as(e=>e.replace(Sl,"-$1").toLowerCase()),ls=as(e=>e.charAt(0).toUpperCase()+e.slice(1)),Js=as(e=>e?`on${ls(e)}`:""),zt=(e,t)=>!Object.is(e,t),cs=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ri=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},us=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ai=e=>{const t=$e(e)?Number(e):NaN;return isNaN(t)?e:t};let li;const ds=()=>li||(li=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function fs(e){if(le(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=$e(s)?Al(s):fs(s);if(o)for(const r in o)t[r]=o[r]}return t}else if($e(e)||Ie(e))return e}const $l=/;(?![^(]*\))/g,Cl=/:([^]+)/,Tl=/\/\*[^]*?\*\//g;function Al(e){const t={};return e.replace(Tl,"").split($l).forEach(n=>{if(n){const s=n.split(Cl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function at(e){let t="";if($e(e))t=e;else if(le(e))for(let n=0;n<e.length;n++){const s=at(e[n]);s&&(t+=s+" ")}else if(Ie(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Ol=Ys("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function ci(e){return!!e||e===""}function El(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=en(e[s],t[s]);return n}function en(e,t){if(e===t)return!0;let n=si(e),s=si(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=rt(e),s=rt(t),n||s)return e===t;if(n=le(e),s=le(t),n||s)return n&&s?El(e,t):!1;if(n=Ie(e),s=Ie(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 c=e.hasOwnProperty(a),l=t.hasOwnProperty(a);if(c&&!l||!c&&l||!en(e[a],t[a]))return!1}}return String(e)===String(t)}function Xs(e,t){return e.findIndex(n=>en(n,t))}const ui=e=>!!(e&&e.__v_isRef===!0),d=e=>$e(e)?e:e==null?"":le(e)||Ie(e)&&(e.toString===ii||!be(e.toString))?ui(e)?d(e.value):JSON.stringify(e,di,2):String(e),di=(e,t)=>ui(t)?di(e,t.value):fn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],r)=>(n[Qs(s,r)+" =>"]=o,n),{})}:pn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Qs(n))}:rt(t)?Qs(t):Ie(t)&&!le(t)&&!rs(t)?String(t):t,Qs=(e,t="")=>{var n;return rt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let Be;class Ml{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Be,!t&&Be&&(this.index=(Be.scopes||(Be.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=Be;try{return Be=this,t()}finally{Be=n}}}on(){++this._on===1&&(this.prevScope=Be,Be=this)}off(){this._on>0&&--this._on===0&&(Be=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 Rl(){return Be}let _e;const eo=new WeakSet;class fi{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,Be&&Be.active&&Be.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,eo.has(this)&&(eo.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||mi(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,vi(this),hi(this);const t=_e,n=lt;_e=this,lt=!0;try{return this.fn()}finally{bi(this),_e=t,lt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)oo(t);this.deps=this.depsTail=void 0,vi(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?eo.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){so(this)&&this.run()}get dirty(){return so(this)}}let pi=0,Pn,jn;function mi(e,t=!1){if(e.flags|=8,t){e.next=jn,jn=e;return}e.next=Pn,Pn=e}function to(){pi++}function no(){if(--pi>0)return;if(jn){let t=jn;for(jn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Pn;){let t=Pn;for(Pn=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 hi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function bi(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),oo(s),Nl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function so(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(gi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function gi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===zn)||(e.globalVersion=zn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!so(e))))return;e.flags|=2;const t=e.dep,n=_e,s=lt;_e=e,lt=!0;try{hi(e);const o=e.fn(e._value);(t.version===0||zt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{_e=n,lt=s,bi(e),e.flags&=-3}}function oo(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)oo(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Nl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let lt=!0;const yi=[];function It(){yi.push(lt),lt=!1}function St(){const e=yi.pop();lt=e===void 0?!0:e}function vi(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=_e;_e=void 0;try{t()}finally{_e=n}}}let zn=0;class Pl{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 io{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(!_e||!lt||_e===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==_e)n=this.activeLink=new Pl(_e,this),_e.deps?(n.prevDep=_e.depsTail,_e.depsTail.nextDep=n,_e.depsTail=n):_e.deps=_e.depsTail=n,_i(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=_e.depsTail,n.nextDep=void 0,_e.depsTail.nextDep=n,_e.depsTail=n,_e.deps===n&&(_e.deps=s)}return n}trigger(t){this.version++,zn++,this.notify(t)}notify(t){to();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{no()}}}function _i(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)_i(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ro=new WeakMap,tn=Symbol(""),ao=Symbol(""),Ln=Symbol("");function Ne(e,t,n){if(lt&&_e){let s=ro.get(e);s||ro.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new io),o.map=s,o.key=n),o.track()}}function $t(e,t,n,s,o,r){const a=ro.get(e);if(!a){zn++;return}const c=l=>{l&&l.trigger()};if(to(),t==="clear")a.forEach(c);else{const l=le(e),p=l&&Zs(n);if(l&&n==="length"){const u=Number(s);a.forEach((v,x)=>{(x==="length"||x===Ln||!rt(x)&&x>=u)&&c(v)})}else switch((n!==void 0||a.has(void 0))&&c(a.get(n)),p&&c(a.get(Ln)),t){case"add":l?p&&c(a.get("length")):(c(a.get(tn)),fn(e)&&c(a.get(ao)));break;case"delete":l||(c(a.get(tn)),fn(e)&&c(a.get(ao)));break;case"set":fn(e)&&c(a.get(tn));break}}no()}function mn(e){const t=fe(e);return t===e?t:(Ne(t,"iterate",Ln),tt(e)?t:t.map(ct))}function ps(e){return Ne(e=fe(e),"iterate",Ln),e}function Lt(e,t){return Tt(e)?nn(e)?hn(ct(t)):hn(t):ct(t)}const jl={__proto__:null,[Symbol.iterator](){return lo(this,Symbol.iterator,e=>Lt(this,e))},concat(...e){return mn(this).concat(...e.map(t=>le(t)?mn(t):t))},entries(){return lo(this,"entries",e=>(e[1]=Lt(this,e[1]),e))},every(e,t){return Ct(this,"every",e,t,void 0,arguments)},filter(e,t){return Ct(this,"filter",e,t,n=>n.map(s=>Lt(this,s)),arguments)},find(e,t){return Ct(this,"find",e,t,n=>Lt(this,n),arguments)},findIndex(e,t){return Ct(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ct(this,"findLast",e,t,n=>Lt(this,n),arguments)},findLastIndex(e,t){return Ct(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ct(this,"forEach",e,t,void 0,arguments)},includes(...e){return co(this,"includes",e)},indexOf(...e){return co(this,"indexOf",e)},join(e){return mn(this).join(e)},lastIndexOf(...e){return co(this,"lastIndexOf",e)},map(e,t){return Ct(this,"map",e,t,void 0,arguments)},pop(){return Dn(this,"pop")},push(...e){return Dn(this,"push",e)},reduce(e,...t){return ki(this,"reduce",e,t)},reduceRight(e,...t){return ki(this,"reduceRight",e,t)},shift(){return Dn(this,"shift")},some(e,t){return Ct(this,"some",e,t,void 0,arguments)},splice(...e){return Dn(this,"splice",e)},toReversed(){return mn(this).toReversed()},toSorted(e){return mn(this).toSorted(e)},toSpliced(...e){return mn(this).toSpliced(...e)},unshift(...e){return Dn(this,"unshift",e)},values(){return lo(this,"values",e=>Lt(this,e))}};function lo(e,t,n){const s=ps(e),o=s[t]();return s!==e&&!tt(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=n(r.value)),r}),o}const zl=Array.prototype;function Ct(e,t,n,s,o,r){const a=ps(e),c=a!==e&&!tt(e),l=a[t];if(l!==zl[t]){const v=l.apply(e,r);return c?ct(v):v}let p=n;a!==e&&(c?p=function(v,x){return n.call(this,Lt(e,v),x,e)}:n.length>2&&(p=function(v,x){return n.call(this,v,x,e)}));const u=l.call(a,p,s);return c&&o?o(u):u}function ki(e,t,n,s){const o=ps(e);let r=n;return o!==e&&(tt(e)?n.length>3&&(r=function(a,c,l){return n.call(this,a,c,l,e)}):r=function(a,c,l){return n.call(this,a,Lt(e,c),l,e)}),o[t](r,...s)}function co(e,t,n){const s=fe(e);Ne(s,"iterate",Ln);const o=s[t](...n);return(o===-1||o===!1)&&po(n[0])?(n[0]=fe(n[0]),s[t](...n)):o}function Dn(e,t,n=[]){It(),to();const s=fe(e)[t].apply(e,n);return no(),St(),s}const Ll=Ys("__proto__,__v_isRef,__isVue"),wi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(rt));function Dl(e){rt(e)||(e=String(e));const t=fe(this);return Ne(t,"has",e),t.hasOwnProperty(e)}class xi{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?Ai:Ti:r?Ci:$i).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const a=le(t);if(!o){let l;if(a&&(l=jl[n]))return l;if(n==="hasOwnProperty")return Dl}const c=Reflect.get(t,n,Pe(t)?t:s);if((rt(n)?wi.has(n):Ll(n))||(o||Ne(t,"get",n),r))return c;if(Pe(c)){const l=a&&Zs(n)?c:c.value;return o&&Ie(l)?fo(l):l}return Ie(c)?o?fo(c):He(c):c}}class Ii extends xi{constructor(t=!1){super(!1,t)}set(t,n,s,o){let r=t[n];const a=le(t)&&Zs(n);if(!this._isShallow){const p=Tt(r);if(!tt(s)&&!Tt(s)&&(r=fe(r),s=fe(s)),!a&&Pe(r)&&!Pe(s))return p||(r.value=s),!0}const c=a?Number(n)<t.length:ge(t,n),l=Reflect.set(t,n,s,Pe(t)?t:o);return t===fe(o)&&(c?zt(s,r)&&$t(t,"set",n,s):$t(t,"add",n,s)),l}deleteProperty(t,n){const s=ge(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&$t(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!rt(n)||!wi.has(n))&&Ne(t,"has",n),s}ownKeys(t){return Ne(t,"iterate",le(t)?"length":tn),Reflect.ownKeys(t)}}class Si extends xi{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Ul=new Ii,Fl=new Si,ql=new Ii(!0),Bl=new Si(!0),uo=e=>e,ms=e=>Reflect.getPrototypeOf(e);function Hl(e,t,n){return function(...s){const o=this.__v_raw,r=fe(o),a=fn(r),c=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,p=o[e](...s),u=n?uo:t?hn:ct;return!t&&Ne(r,"iterate",l?ao:tn),{next(){const{value:v,done:x}=p.next();return x?{value:v,done:x}:{value:c?[u(v[0]),u(v[1])]:u(v),done:x}},[Symbol.iterator](){return this}}}}function hs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Vl(e,t){const n={get(o){const r=this.__v_raw,a=fe(r),c=fe(o);e||(zt(o,c)&&Ne(a,"get",o),Ne(a,"get",c));const{has:l}=ms(a),p=t?uo:e?hn:ct;if(l.call(a,o))return p(r.get(o));if(l.call(a,c))return p(r.get(c));r!==a&&r.get(o)},get size(){const o=this.__v_raw;return!e&&Ne(fe(o),"iterate",tn),o.size},has(o){const r=this.__v_raw,a=fe(r),c=fe(o);return e||(zt(o,c)&&Ne(a,"has",o),Ne(a,"has",c)),o===c?r.has(o):r.has(o)||r.has(c)},forEach(o,r){const a=this,c=a.__v_raw,l=fe(c),p=t?uo:e?hn:ct;return!e&&Ne(l,"iterate",tn),c.forEach((u,v)=>o.call(r,p(u),p(v),a))}};return qe(n,e?{add:hs("add"),set:hs("set"),delete:hs("delete"),clear:hs("clear")}:{add(o){!t&&!tt(o)&&!Tt(o)&&(o=fe(o));const r=fe(this);return ms(r).has.call(r,o)||(r.add(o),$t(r,"add",o,o)),this},set(o,r){!t&&!tt(r)&&!Tt(r)&&(r=fe(r));const a=fe(this),{has:c,get:l}=ms(a);let p=c.call(a,o);p||(o=fe(o),p=c.call(a,o));const u=l.call(a,o);return a.set(o,r),p?zt(r,u)&&$t(a,"set",o,r):$t(a,"add",o,r),this},delete(o){const r=fe(this),{has:a,get:c}=ms(r);let l=a.call(r,o);l||(o=fe(o),l=a.call(r,o)),c&&c.call(r,o);const p=r.delete(o);return l&&$t(r,"delete",o,void 0),p},clear(){const o=fe(this),r=o.size!==0,a=o.clear();return r&&$t(o,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Hl(o,e,t)}),n}function bs(e,t){const n=Vl(e,t);return(s,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(ge(n,o)&&o in s?n:s,o,r)}const Wl={get:bs(!1,!1)},Kl={get:bs(!1,!0)},Yl={get:bs(!0,!1)},Gl={get:bs(!0,!0)},$i=new WeakMap,Ci=new WeakMap,Ti=new WeakMap,Ai=new WeakMap;function Zl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Jl(e){return e.__v_skip||!Object.isExtensible(e)?0:Zl(xl(e))}function He(e){return Tt(e)?e:gs(e,!1,Ul,Wl,$i)}function Xl(e){return gs(e,!1,ql,Kl,Ci)}function fo(e){return gs(e,!0,Fl,Yl,Ti)}function Wk(e){return gs(e,!0,Bl,Gl,Ai)}function gs(e,t,n,s,o){if(!Ie(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Jl(e);if(r===0)return e;const a=o.get(e);if(a)return a;const c=new Proxy(e,r===2?s:n);return o.set(e,c),c}function nn(e){return Tt(e)?nn(e.__v_raw):!!(e&&e.__v_isReactive)}function Tt(e){return!!(e&&e.__v_isReadonly)}function tt(e){return!!(e&&e.__v_isShallow)}function po(e){return e?!!e.__v_raw:!1}function fe(e){const t=e&&e.__v_raw;return t?fe(t):e}function Ql(e){return!ge(e,"__v_skip")&&Object.isExtensible(e)&&ri(e,"__v_skip",!0),e}const ct=e=>Ie(e)?He(e):e,hn=e=>Ie(e)?fo(e):e;function Pe(e){return e?e.__v_isRef===!0:!1}function he(e){return Oi(e,!1)}function ys(e){return Oi(e,!0)}function Oi(e,t){return Pe(e)?e:new ec(e,t)}class ec{constructor(t,n){this.dep=new io,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:fe(t),this._value=n?t:ct(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||tt(t)||Tt(t);t=s?t:fe(t),zt(t,n)&&(this._rawValue=t,this._value=s?t:ct(t),this.dep.trigger())}}function i(e){return Pe(e)?e.value:e}const tc={get:(e,t,n)=>t==="__v_raw"?e:i(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Pe(o)&&!Pe(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function Ei(e){return nn(e)?e:new Proxy(e,tc)}class nc{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new io(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=zn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&_e!==this)return mi(this,!0),!0}get value(){const t=this.dep.track();return gi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function sc(e,t,n=!1){let s,o;return be(e)?s=e:(s=e.get,o=e.set),new nc(s,o,n)}const vs={},_s=new WeakMap;let sn;function oc(e,t=!1,n=sn){if(n){let s=_s.get(n);s||_s.set(n,s=[]),s.push(e)}}function ic(e,t,n=we){const{immediate:s,deep:o,once:r,scheduler:a,augmentJob:c,call:l}=n,p=O=>o?O:tt(O)||o===!1||o===0?At(O,1):At(O);let u,v,x,_,$=!1,T=!1;if(Pe(e)?(v=()=>e.value,$=tt(e)):nn(e)?(v=()=>p(e),$=!0):le(e)?(T=!0,$=e.some(O=>nn(O)||tt(O)),v=()=>e.map(O=>{if(Pe(O))return O.value;if(nn(O))return p(O);if(be(O))return l?l(O,2):O()})):be(e)?t?v=l?()=>l(e,2):e:v=()=>{if(x){It();try{x()}finally{St()}}const O=sn;sn=u;try{return l?l(e,3,[_]):e(_)}finally{sn=O}}:v=Qt,t&&o){const O=v,E=o===!0?1/0:o;v=()=>At(O(),E)}const K=Rl(),j=()=>{u.stop(),K&&K.active&&ni(K.effects,u)};if(r&&t){const O=t;t=(...E)=>{O(...E),j()}}let I=T?new Array(e.length).fill(vs):vs;const k=O=>{if(!(!(u.flags&1)||!u.dirty&&!O))if(t){const E=u.run();if(o||$||(T?E.some((A,b)=>zt(A,I[b])):zt(E,I))){x&&x();const A=sn;sn=u;try{const b=[E,I===vs?void 0:T&&I[0]===vs?[]:I,_];I=E,l?l(t,3,b):t(...b)}finally{sn=A}}}else u.run()};return c&&c(k),u=new fi(v),u.scheduler=a?()=>a(k,!1):k,_=O=>oc(O,!1,u),x=u.onStop=()=>{const O=_s.get(u);if(O){if(l)l(O,4);else for(const E of O)E();_s.delete(u)}},t?s?k(!0):I=u.run():a?a(k.bind(null,!0),!0):u.run(),j.pause=u.pause.bind(u),j.resume=u.resume.bind(u),j.stop=j,j}function At(e,t=1/0,n){if(t<=0||!Ie(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Pe(e))At(e.value,t,n);else if(le(e))for(let s=0;s<e.length;s++)At(e[s],t,n);else if(pn(e)||fn(e))e.forEach(s=>{At(s,t,n)});else if(rs(e)){for(const s in e)At(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&At(e[s],t,n)}return e}const Un=[];let mo=!1;function Kk(e,...t){if(mo)return;mo=!0,It();const n=Un.length?Un[Un.length-1].component:null,s=n&&n.appContext.config.warnHandler,o=rc();if(s)bn(s,n,11,[e+t.map(r=>{var a,c;return(c=(a=r.toString)==null?void 0:a.call(r))!=null?c:JSON.stringify(r)}).join(""),n&&n.proxy,o.map(({vnode:r})=>`at <${mr(n,r.type)}>`).join(`
|
|
2
|
+
`),o]);else{const r=[`[Vue warn]: ${e}`,...t];o.length&&r.push(`
|
|
3
|
+
`,...ac(o)),console.warn(...r)}St(),mo=!1}function rc(){let e=Un[Un.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 ac(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
|
|
4
|
+
`],...lc(n))}),t}function lc({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,o=` at <${mr(e.component,e.type,s)}`,r=">"+n;return e.props?[o,...cc(e.props),r]:[o+r]}function cc(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Mi(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Mi(e,t,n){return $e(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Pe(t)?(t=Mi(e,fe(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):be(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=fe(t),n?t:[`${e}=`,t])}function bn(e,t,n,s){try{return s?e(...s):e()}catch(o){ks(o,t,n)}}function Ot(e,t,n,s){if(be(e)){const o=bn(e,t,n,s);return o&&oi(o)&&o.catch(r=>{ks(r,t,n)}),o}if(le(e)){const o=[];for(let r=0;r<e.length;r++)o.push(Ot(e[r],t,n,s));return o}}function ks(e,t,n,s=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||we;if(t){let c=t.parent;const l=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const u=c.ec;if(u){for(let v=0;v<u.length;v++)if(u[v](e,l,p)===!1)return}c=c.parent}if(r){It(),bn(r,null,10,[e,l,p]),St();return}}uc(e,n,o,s,a)}function uc(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const De=[];let ht=-1;const gn=[];let Dt=null,yn=0;const Ri=Promise.resolve();let ws=null;function Ue(e){const t=ws||Ri;return e?t.then(this?e.bind(this):e):t}function dc(e){let t=ht+1,n=De.length;for(;t<n;){const s=t+n>>>1,o=De[s],r=Fn(o);r<e||r===e&&o.flags&2?t=s+1:n=s}return t}function ho(e){if(!(e.flags&1)){const t=Fn(e),n=De[De.length-1];!n||!(e.flags&2)&&t>=Fn(n)?De.push(e):De.splice(dc(t),0,e),e.flags|=1,Ni()}}function Ni(){ws||(ws=Ri.then(zi))}function fc(e){le(e)?gn.push(...e):Dt&&e.id===-1?Dt.splice(yn+1,0,e):e.flags&1||(gn.push(e),e.flags|=1),Ni()}function Pi(e,t,n=ht+1){for(;n<De.length;n++){const s=De[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;De.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function ji(e){if(gn.length){const t=[...new Set(gn)].sort((n,s)=>Fn(n)-Fn(s));if(gn.length=0,Dt){Dt.push(...t);return}for(Dt=t,yn=0;yn<Dt.length;yn++){const n=Dt[yn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Dt=null,yn=0}}const Fn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function zi(e){try{for(ht=0;ht<De.length;ht++){const t=De[ht];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),bn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;ht<De.length;ht++){const t=De[ht];t&&(t.flags&=-2)}ht=-1,De.length=0,ji(),ws=null,(De.length||gn.length)&&zi()}}let Re=null,Li=null;function xs(e){const t=Re;return Re=e,Li=e&&e.type.__scopeId||null,t}function pc(e,t=Re,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&ir(-1);const r=xs(t);let a;try{a=e(...o)}finally{xs(r),s._d&&ir(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function xe(e,t){if(Re===null)return e;const n=As(Re),s=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,a,c,l=we]=t[o];r&&(be(r)&&(r={mounted:r,updated:r}),r.deep&&At(a),s.push({dir:r,instance:n,value:a,oldValue:void 0,arg:c,modifiers:l}))}return e}function on(e,t,n,s){const o=e.dirs,r=t&&t.dirs;for(let a=0;a<o.length;a++){const c=o[a];r&&(c.oldValue=r[a].value);let l=c.dir[s];l&&(It(),Ot(l,n,8,[e.el,c,e,t]),St())}}const mc=Symbol("_vte"),hc=e=>e.__isTeleport,bc=Symbol("_leaveCb");function bo(e,t){e.shapeFlag&6&&e.component?(e.transition=t,bo(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 Ce(e,t){return be(e)?qe({name:e.name},t,{setup:e}):e}function gc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Is=new WeakMap;function qn(e,t,n,s,o=!1){if(le(e)){e.forEach(($,T)=>qn($,t&&(le(t)?t[T]:t),n,s,o));return}if(vn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&qn(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?As(s.component):s.el,a=o?null:r,{i:c,r:l}=e,p=t&&t.r,u=c.refs===we?c.refs={}:c.refs,v=c.setupState,x=fe(v),_=v===we?ti:$=>ge(x,$);if(p!=null&&p!==l){if(Di(t),$e(p))u[p]=null,_(p)&&(v[p]=null);else if(Pe(p)){p.value=null;const $=t;$.k&&(u[$.k]=null)}}if(be(l))bn(l,c,12,[a,u]);else{const $=$e(l),T=Pe(l);if($||T){const K=()=>{if(e.f){const j=$?_(l)?v[l]:u[l]:l.value;if(o)le(j)&&ni(j,r);else if(le(j))j.includes(r)||j.push(r);else if($)u[l]=[r],_(l)&&(v[l]=u[l]);else{const I=[r];l.value=I,e.k&&(u[e.k]=I)}}else $?(u[l]=a,_(l)&&(v[l]=a)):T&&(l.value=a,e.k&&(u[e.k]=a))};if(a){const j=()=>{K(),Is.delete(e)};j.id=-1,Is.set(e,j),Ge(j,n)}else Di(e),K()}}}function Di(e){const t=Is.get(e);t&&(t.flags|=8,Is.delete(e))}ds().requestIdleCallback,ds().cancelIdleCallback;const vn=e=>!!e.type.__asyncLoader,yc=e=>e.type.__isKeepAlive;function vc(e,t,n=Ve,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...a)=>{It();const c=To(n),l=Ot(t,n,e,a);return c(),St(),l});return s?o.unshift(r):o.push(r),r}}const Ui=e=>(t,n=Ve)=>{(!Kn||e==="sp")&&vc(e,(...s)=>t(...s),n)},bt=Ui("m"),ut=Ui("bum"),_c="components";function kc(e,t){return xc(_c,e,!0,t)||e}const wc=Symbol.for("v-ndc");function xc(e,t,n=!0,s=!1){const o=Re||Ve;if(o){const r=o.type;{const c=pr(r,!1);if(c&&(c===t||c===Le(t)||c===ls(Le(t))))return r}const a=Fi(o[e]||r[e],t)||Fi(o.appContext[e],t);return!a&&s?r:a}}function Fi(e,t){return e&&(e[t]||e[Le(t)]||e[ls(Le(t))])}function ke(e,t,n,s){let o;const r=n,a=le(e);if(a||$e(e)){const c=a&&nn(e);let l=!1,p=!1;c&&(l=!tt(e),p=Tt(e),e=ps(e)),o=new Array(e.length);for(let u=0,v=e.length;u<v;u++)o[u]=t(l?p?hn(ct(e[u])):ct(e[u]):e[u],u,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let c=0;c<e;c++)o[c]=t(c+1,c,void 0,r)}else if(Ie(e))if(e[Symbol.iterator])o=Array.from(e,(c,l)=>t(c,l,void 0,r));else{const c=Object.keys(e);o=new Array(c.length);for(let l=0,p=c.length;l<p;l++){const u=c[l];o[l]=t(e[u],u,l,r)}}else o=[];return o}function Ic(e,t,n={},s,o){if(Re.ce||Re.parent&&vn(Re.parent)&&Re.parent.ce){const p=Object.keys(n).length>0;return n.name=t,m(),je(G,null,[Ee("slot",n,s)],p?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),m();const a=r&&qi(r(n)),c=n.key||a&&a.key,l=je(G,{key:(c&&!rt(c)?c:`_${t}`)+(!a&&s?"_fb":"")},a||[],a&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),r&&r._c&&(r._d=!0),l}function qi(e){return e.some(t=>So(t)?!(t.type===Et||t.type===G&&!qi(t.children)):!0)?e:null}const go=e=>e?ur(e)?As(e):go(e.parent):null,Bn=qe(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=>go(e.parent),$root:e=>go(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>{ho(e.update)}),$nextTick:e=>e.n||(e.n=Ue.bind(e.proxy)),$watch:e=>Qt}),yo=(e,t)=>e!==we&&!e.__isScriptSetup&&ge(e,t),Sc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:r,accessCache:a,type:c,appContext:l}=e;if(t[0]!=="$"){const x=a[t];if(x!==void 0)switch(x){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return r[t]}else{if(yo(s,t))return a[t]=1,s[t];if(ge(r,t))return a[t]=3,r[t];if(n!==we&&ge(n,t))return a[t]=4,n[t];a[t]=0}}const p=Bn[t];let u,v;if(p)return t==="$attrs"&&Ne(e.attrs,"get",""),p(e);if((u=c.__cssModules)&&(u=u[t]))return u;if(n!==we&&ge(n,t))return a[t]=4,n[t];if(v=l.config.globalProperties,ge(v,t))return v[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:r}=e;return yo(o,t)?(o[t]=n,!0):ge(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}},c){let l;return!!(n[c]||yo(t,c)||ge(r,c)||ge(s,c)||ge(Bn,c)||ge(o.config.globalProperties,c)||(l=a.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ge(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Bi(){return{app:null,config:{isNativeTag:ti,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 $c=0;function Cc(e,t){return function(s,o=null){be(s)||(s=qe({},s)),o!=null&&!Ie(o)&&(o=null);const r=Bi(),a=new WeakSet,c=[];let l=!1;const p=r.app={_uid:$c++,_component:s,_props:o,_container:null,_context:r,_instance:null,version:cu,get config(){return r.config},set config(u){},use(u,...v){return a.has(u)||(u&&be(u.install)?(a.add(u),u.install(p,...v)):be(u)&&(a.add(u),u(p,...v))),p},mixin(u){return p},component(u,v){return v?(r.components[u]=v,p):r.components[u]},directive(u,v){return v?(r.directives[u]=v,p):r.directives[u]},mount(u,v,x){if(!l){const _=p._ceVNode||Ee(s,o);return _.appContext=r,x===!0?x="svg":x===!1&&(x=void 0),e(_,u,x),l=!0,p._container=u,u.__vue_app__=p,As(_.component)}},onUnmount(u){c.push(u)},unmount(){l&&(Ot(c,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(u,v){return r.provides[u]=v,p},runWithContext(u){const v=_n;_n=p;try{return u()}finally{_n=v}}};return p}}let _n=null;function Hi(e,t){if(Ve){let n=Ve.provides;const s=Ve.parent&&Ve.parent.provides;s===n&&(n=Ve.provides=Object.create(s)),n[e]=t}}function vo(e,t,n=!1){const s=lr();if(s||_n){let o=_n?_n._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&&be(t)?t.call(s&&s.proxy):t}}const Tc=Symbol.for("v-scx"),Ac=()=>vo(Tc);function Fe(e,t,n){return Oc(e,t,n)}function Oc(e,t,n=we){const{immediate:s,deep:o,flush:r,once:a}=n,c=qe({},n),l=t&&s||!t&&r!=="post";let p;if(Kn){if(r==="sync"){const _=Ac();p=_.__watcherHandles||(_.__watcherHandles=[])}else if(!l){const _=()=>{};return _.stop=Qt,_.resume=Qt,_.pause=Qt,_}}const u=Ve;c.call=(_,$,T)=>Ot(_,u,$,T);let v=!1;r==="post"?c.scheduler=_=>{Ge(_,u&&u.suspense)}:r!=="sync"&&(v=!0,c.scheduler=(_,$)=>{$?_():ho(_)}),c.augmentJob=_=>{t&&(_.flags|=4),v&&(_.flags|=2,u&&(_.id=u.uid,_.i=u))};const x=ic(e,t,c);return Kn&&(p?p.push(x):l&&x()),x}const Ec=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Le(t)}Modifiers`]||e[`${Ye(t)}Modifiers`];function Mc(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||we;let o=n;const r=t.startsWith("update:"),a=r&&Ec(s,t.slice(7));a&&(a.trim&&(o=n.map(u=>$e(u)?u.trim():u)),a.number&&(o=n.map(us)));let c,l=s[c=Js(t)]||s[c=Js(Le(t))];!l&&r&&(l=s[c=Js(Ye(t))]),l&&Ot(l,e,6,o);const p=s[c+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Ot(p,e,6,o)}}function Rc(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?(le(r)?r.forEach(c=>a[c]=null):qe(a,r),Ie(e)&&s.set(e,a),a):(Ie(e)&&s.set(e,null),null)}function Ss(e,t){return!e||!is(t)?!1:(t=t.slice(2).replace(/Once$/,""),ge(e,t[0].toLowerCase()+t.slice(1))||ge(e,Ye(t))||ge(e,t))}function Yk(){}function Vi(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[r],slots:a,attrs:c,emit:l,render:p,renderCache:u,props:v,data:x,setupState:_,ctx:$,inheritAttrs:T}=e,K=xs(e);let j,I;try{if(n.shapeFlag&4){const O=o||s,E=O;j=gt(p.call(E,O,u,v,_,x,$)),I=c}else{const O=t;j=gt(O.length>1?O(v,{attrs:c,slots:a,emit:l}):O(v,null)),I=t.props?c:Nc(c)}}catch(O){Hn.length=0,ks(O,e,1),j=Ee(Et)}let k=j;if(I&&T!==!1){const O=Object.keys(I),{shapeFlag:E}=k;O.length&&E&7&&(r&&O.some(Gs)&&(I=Pc(I,r)),k=kn(k,I,!1,!0))}return n.dirs&&(k=kn(k,null,!1,!0),k.dirs=k.dirs?k.dirs.concat(n.dirs):n.dirs),n.transition&&bo(k,n.transition),j=k,xs(K),j}const Nc=e=>{let t;for(const n in e)(n==="class"||n==="style"||is(n))&&((t||(t={}))[n]=e[n]);return t},Pc=(e,t)=>{const n={};for(const s in e)(!Gs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function jc(e,t,n){const{props:s,children:o,component:r}=e,{props:a,children:c,patchFlag:l}=t,p=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?Wi(s,a,p):!!a;if(l&8){const u=t.dynamicProps;for(let v=0;v<u.length;v++){const x=u[v];if(a[x]!==s[x]&&!Ss(p,x))return!0}}}else return(o||c)&&(!c||!c.$stable)?!0:s===a?!1:s?a?Wi(s,a,p):!0:!!a;return!1}function Wi(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]&&!Ss(n,r))return!0}return!1}function zc({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 Ki={},Yi=()=>Object.create(Ki),Gi=e=>Object.getPrototypeOf(e)===Ki;function Lc(e,t,n,s=!1){const o={},r=Yi();e.propsDefaults=Object.create(null),Zi(e,t,o,r);for(const a in e.propsOptions[0])a in o||(o[a]=void 0);n?e.props=s?o:Xl(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function Dc(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:a}}=e,c=fe(o),[l]=e.propsOptions;let p=!1;if((s||a>0)&&!(a&16)){if(a&8){const u=e.vnode.dynamicProps;for(let v=0;v<u.length;v++){let x=u[v];if(Ss(e.emitsOptions,x))continue;const _=t[x];if(l)if(ge(r,x))_!==r[x]&&(r[x]=_,p=!0);else{const $=Le(x);o[$]=_o(l,c,$,_,e,!1)}else _!==r[x]&&(r[x]=_,p=!0)}}}else{Zi(e,t,o,r)&&(p=!0);let u;for(const v in c)(!t||!ge(t,v)&&((u=Ye(v))===v||!ge(t,u)))&&(l?n&&(n[v]!==void 0||n[u]!==void 0)&&(o[v]=_o(l,c,v,void 0,e,!0)):delete o[v]);if(r!==c)for(const v in r)(!t||!ge(t,v))&&(delete r[v],p=!0)}p&&$t(e.attrs,"set","")}function Zi(e,t,n,s){const[o,r]=e.propsOptions;let a=!1,c;if(t)for(let l in t){if(Nn(l))continue;const p=t[l];let u;o&&ge(o,u=Le(l))?!r||!r.includes(u)?n[u]=p:(c||(c={}))[u]=p:Ss(e.emitsOptions,l)||(!(l in s)||p!==s[l])&&(s[l]=p,a=!0)}if(r){const l=fe(n),p=c||we;for(let u=0;u<r.length;u++){const v=r[u];n[v]=_o(o,l,v,p[v],e,!ge(p,v))}}return a}function _o(e,t,n,s,o,r){const a=e[n];if(a!=null){const c=ge(a,"default");if(c&&s===void 0){const l=a.default;if(a.type!==Function&&!a.skipFactory&&be(l)){const{propsDefaults:p}=o;if(n in p)s=p[n];else{const u=To(o);s=p[n]=l.call(null,t),u()}}else s=l;o.ce&&o.ce._setProp(n,s)}a[0]&&(r&&!c?s=!1:a[1]&&(s===""||s===Ye(n))&&(s=!0))}return s}function Uc(e,t,n=!1){const s=t.propsCache,o=s.get(e);if(o)return o;const r=e.props,a={},c=[];if(!r)return Ie(e)&&s.set(e,dn),dn;if(le(r))for(let p=0;p<r.length;p++){const u=Le(r[p]);Ji(u)&&(a[u]=we)}else if(r)for(const p in r){const u=Le(p);if(Ji(u)){const v=r[p],x=a[u]=le(v)||be(v)?{type:v}:qe({},v),_=x.type;let $=!1,T=!0;if(le(_))for(let K=0;K<_.length;++K){const j=_[K],I=be(j)&&j.name;if(I==="Boolean"){$=!0;break}else I==="String"&&(T=!1)}else $=be(_)&&_.name==="Boolean";x[0]=$,x[1]=T,($||ge(x,"default"))&&c.push(u)}}const l=[a,c];return Ie(e)&&s.set(e,l),l}function Ji(e){return e[0]!=="$"&&!Nn(e)}const ko=e=>e==="_"||e==="_ctx"||e==="$stable",wo=e=>le(e)?e.map(gt):[gt(e)],Fc=(e,t,n)=>{if(t._n)return t;const s=pc((...o)=>wo(t(...o)),n);return s._c=!1,s},Xi=(e,t,n)=>{const s=e._ctx;for(const o in e){if(ko(o))continue;const r=e[o];if(be(r))t[o]=Fc(o,r,s);else if(r!=null){const a=wo(r);t[o]=()=>a}}},Qi=(e,t)=>{const n=wo(t);e.slots.default=()=>n},er=(e,t,n)=>{for(const s in t)(n||!ko(s))&&(e[s]=t[s])},qc=(e,t,n)=>{const s=e.slots=Yi();if(e.vnode.shapeFlag&32){const o=t._;o?(er(s,t,n),n&&ri(s,"_",o,!0)):Xi(t,s)}else t&&Qi(e,t)},Bc=(e,t,n)=>{const{vnode:s,slots:o}=e;let r=!0,a=we;if(s.shapeFlag&32){const c=t._;c?n&&c===1?r=!1:er(o,t,n):(r=!t.$stable,Xi(t,o)),a=t}else t&&(Qi(e,t),a={default:1});if(r)for(const c in o)!ko(c)&&a[c]==null&&delete o[c]},Ge=Yc;function Hc(e){return Vc(e)}function Vc(e,t){const n=ds();n.__VUE__=!0;const{insert:s,remove:o,patchProp:r,createElement:a,createText:c,createComment:l,setText:p,setElementText:u,parentNode:v,nextSibling:x,setScopeId:_=Qt,insertStaticContent:$}=e,T=(y,S,N,V=null,F=null,B=null,X=void 0,Z=null,Y=!!S.dynamicChildren)=>{if(y===S)return;y&&!Wn(y,S)&&(V=it(y),Q(y,F,B,!0),y=null),S.patchFlag===-2&&(Y=!1,S.dynamicChildren=null);const{type:q,ref:g,shapeFlag:w}=S;switch(q){case $s:K(y,S,N,V);break;case Et:j(y,S,N,V);break;case Io:y==null&&I(S,N,V,X);break;case G:se(y,S,N,V,F,B,X,Z,Y);break;default:w&1?E(y,S,N,V,F,B,X,Z,Y):w&6?oe(y,S,N,V,F,B,X,Z,Y):(w&64||w&128)&&q.process(y,S,N,V,F,B,X,Z,Y,Xt)}g!=null&&F?qn(g,y&&y.ref,B,S||y,!S):g==null&&y&&y.ref!=null&&qn(y.ref,null,B,y,!0)},K=(y,S,N,V)=>{if(y==null)s(S.el=c(S.children),N,V);else{const F=S.el=y.el;S.children!==y.children&&p(F,S.children)}},j=(y,S,N,V)=>{y==null?s(S.el=l(S.children||""),N,V):S.el=y.el},I=(y,S,N,V)=>{[y.el,y.anchor]=$(y.children,S,N,V,y.el,y.anchor)},k=({el:y,anchor:S},N,V)=>{let F;for(;y&&y!==S;)F=x(y),s(y,N,V),y=F;s(S,N,V)},O=({el:y,anchor:S})=>{let N;for(;y&&y!==S;)N=x(y),o(y),y=N;o(S)},E=(y,S,N,V,F,B,X,Z,Y)=>{if(S.type==="svg"?X="svg":S.type==="math"&&(X="mathml"),y==null)A(S,N,V,F,B,X,Z,Y);else{const q=y.el&&y.el._isVueCE?y.el:null;try{q&&q._beginPatch(),z(y,S,F,B,X,Z,Y)}finally{q&&q._endPatch()}}},A=(y,S,N,V,F,B,X,Z)=>{let Y,q;const{props:g,shapeFlag:w,transition:L,dirs:W}=y;if(Y=y.el=a(y.type,B,g&&g.is,g),w&8?u(Y,y.children):w&16&&C(y.children,Y,null,V,F,xo(y,B),X,Z),W&&on(y,null,V,"created"),b(Y,y,y.scopeId,X,V),g){for(const ue in g)ue!=="value"&&!Nn(ue)&&r(Y,ue,null,g[ue],B,V);"value"in g&&r(Y,"value",null,g.value,B),(q=g.onVnodeBeforeMount)&&yt(q,V,y)}W&&on(y,null,V,"beforeMount");const ne=Wc(F,L);ne&&L.beforeEnter(Y),s(Y,S,N),((q=g&&g.onVnodeMounted)||ne||W)&&Ge(()=>{q&&yt(q,V,y),ne&&L.enter(Y),W&&on(y,null,V,"mounted")},F)},b=(y,S,N,V,F)=>{if(N&&_(y,N),V)for(let B=0;B<V.length;B++)_(y,V[B]);if(F){let B=F.subTree;if(S===B||or(B.type)&&(B.ssContent===S||B.ssFallback===S)){const X=F.vnode;b(y,X,X.scopeId,X.slotScopeIds,F.parent)}}},C=(y,S,N,V,F,B,X,Z,Y=0)=>{for(let q=Y;q<y.length;q++){const g=y[q]=Z?Ft(y[q]):gt(y[q]);T(null,g,S,N,V,F,B,X,Z)}},z=(y,S,N,V,F,B,X)=>{const Z=S.el=y.el;let{patchFlag:Y,dynamicChildren:q,dirs:g}=S;Y|=y.patchFlag&16;const w=y.props||we,L=S.props||we;let W;if(N&&rn(N,!1),(W=L.onVnodeBeforeUpdate)&&yt(W,N,S,y),g&&on(S,y,N,"beforeUpdate"),N&&rn(N,!0),(w.innerHTML&&L.innerHTML==null||w.textContent&&L.textContent==null)&&u(Z,""),q?D(y.dynamicChildren,q,Z,N,V,xo(S,F),B):X||R(y,S,Z,null,N,V,xo(S,F),B,!1),Y>0){if(Y&16)J(Z,w,L,N,F);else if(Y&2&&w.class!==L.class&&r(Z,"class",null,L.class,F),Y&4&&r(Z,"style",w.style,L.style,F),Y&8){const ne=S.dynamicProps;for(let ue=0;ue<ne.length;ue++){const pe=ne[ue],Ae=w[pe],Oe=L[pe];(Oe!==Ae||pe==="value")&&r(Z,pe,Ae,Oe,F,N)}}Y&1&&y.children!==S.children&&u(Z,S.children)}else!X&&q==null&&J(Z,w,L,N,F);((W=L.onVnodeUpdated)||g)&&Ge(()=>{W&&yt(W,N,S,y),g&&on(S,y,N,"updated")},V)},D=(y,S,N,V,F,B,X)=>{for(let Z=0;Z<S.length;Z++){const Y=y[Z],q=S[Z],g=Y.el&&(Y.type===G||!Wn(Y,q)||Y.shapeFlag&198)?v(Y.el):N;T(Y,q,g,null,V,F,B,X,!0)}},J=(y,S,N,V,F)=>{if(S!==N){if(S!==we)for(const B in S)!Nn(B)&&!(B in N)&&r(y,B,S[B],null,F,V);for(const B in N){if(Nn(B))continue;const X=N[B],Z=S[B];X!==Z&&B!=="value"&&r(y,B,Z,X,F,V)}"value"in N&&r(y,"value",S.value,N.value,F)}},se=(y,S,N,V,F,B,X,Z,Y)=>{const q=S.el=y?y.el:c(""),g=S.anchor=y?y.anchor:c("");let{patchFlag:w,dynamicChildren:L,slotScopeIds:W}=S;W&&(Z=Z?Z.concat(W):W),y==null?(s(q,N,V),s(g,N,V),C(S.children||[],N,g,F,B,X,Z,Y)):w>0&&w&64&&L&&y.dynamicChildren?(D(y.dynamicChildren,L,N,F,B,X,Z),(S.key!=null||F&&S===F.subTree)&&tr(y,S,!0)):R(y,S,N,g,F,B,X,Z,Y)},oe=(y,S,N,V,F,B,X,Z,Y)=>{S.slotScopeIds=Z,y==null?S.shapeFlag&512?F.ctx.activate(S,N,V,X,Y):ae(S,N,V,F,B,X,Y):ve(y,S,Y)},ae=(y,S,N,V,F,B,X)=>{const Z=y.component=tu(y,V,F);if(yc(y)&&(Z.ctx.renderer=Xt),nu(Z,!1,X),Z.asyncDep){if(F&&F.registerDep(Z,de,X),!y.el){const Y=Z.subTree=Ee(Et);j(null,Y,S,N),y.placeholder=Y.el}}else de(Z,y,S,N,F,B,X)},ve=(y,S,N)=>{const V=S.component=y.component;if(jc(y,S,N))if(V.asyncDep&&!V.asyncResolved){U(V,S,N);return}else V.next=S,V.update();else S.el=y.el,V.vnode=S},de=(y,S,N,V,F,B,X)=>{const Z=()=>{if(y.isMounted){let{next:w,bu:L,u:W,parent:ne,vnode:ue}=y;{const wt=nr(y);if(wt){w&&(w.el=ue.el,U(y,w,X)),wt.asyncDep.then(()=>{y.isUnmounted||Z()});return}}let pe=w,Ae;rn(y,!1),w?(w.el=ue.el,U(y,w,X)):w=ue,L&&cs(L),(Ae=w.props&&w.props.onVnodeBeforeUpdate)&&yt(Ae,ne,w,ue),rn(y,!0);const Oe=Vi(y),Xe=y.subTree;y.subTree=Oe,T(Xe,Oe,v(Xe.el),it(Xe),y,F,B),w.el=Oe.el,pe===null&&zc(y,Oe.el),W&&Ge(W,F),(Ae=w.props&&w.props.onVnodeUpdated)&&Ge(()=>yt(Ae,ne,w,ue),F)}else{let w;const{el:L,props:W}=S,{bm:ne,m:ue,parent:pe,root:Ae,type:Oe}=y,Xe=vn(S);rn(y,!1),ne&&cs(ne),!Xe&&(w=W&&W.onVnodeBeforeMount)&&yt(w,pe,S),rn(y,!0);{Ae.ce&&Ae.ce._def.shadowRoot!==!1&&Ae.ce._injectChildStyle(Oe);const wt=y.subTree=Vi(y);T(null,wt,N,V,y,F,B),S.el=wt.el}if(ue&&Ge(ue,F),!Xe&&(w=W&&W.onVnodeMounted)){const wt=S;Ge(()=>yt(w,pe,wt),F)}(S.shapeFlag&256||pe&&vn(pe.vnode)&&pe.vnode.shapeFlag&256)&&y.a&&Ge(y.a,F),y.isMounted=!0,S=N=V=null}};y.scope.on();const Y=y.effect=new fi(Z);y.scope.off();const q=y.update=Y.run.bind(Y),g=y.job=Y.runIfDirty.bind(Y);g.i=y,g.id=y.uid,Y.scheduler=()=>ho(g),rn(y,!0),q()},U=(y,S,N)=>{S.component=y;const V=y.vnode.props;y.vnode=S,y.next=null,Dc(y,S.props,V,N),Bc(y,S.children,N),It(),Pi(y),St()},R=(y,S,N,V,F,B,X,Z,Y=!1)=>{const q=y&&y.children,g=y?y.shapeFlag:0,w=S.children,{patchFlag:L,shapeFlag:W}=S;if(L>0){if(L&128){Se(q,w,N,V,F,B,X,Z,Y);return}else if(L&256){P(q,w,N,V,F,B,X,Z,Y);return}}W&8?(g&16&&me(q,F,B),w!==q&&u(N,w)):g&16?W&16?Se(q,w,N,V,F,B,X,Z,Y):me(q,F,B,!0):(g&8&&u(N,""),W&16&&C(w,N,V,F,B,X,Z,Y))},P=(y,S,N,V,F,B,X,Z,Y)=>{y=y||dn,S=S||dn;const q=y.length,g=S.length,w=Math.min(q,g);let L;for(L=0;L<w;L++){const W=S[L]=Y?Ft(S[L]):gt(S[L]);T(y[L],W,N,null,F,B,X,Z,Y)}q>g?me(y,F,B,!0,!1,w):C(S,N,V,F,B,X,Z,Y,w)},Se=(y,S,N,V,F,B,X,Z,Y)=>{let q=0;const g=S.length;let w=y.length-1,L=g-1;for(;q<=w&&q<=L;){const W=y[q],ne=S[q]=Y?Ft(S[q]):gt(S[q]);if(Wn(W,ne))T(W,ne,N,null,F,B,X,Z,Y);else break;q++}for(;q<=w&&q<=L;){const W=y[w],ne=S[L]=Y?Ft(S[L]):gt(S[L]);if(Wn(W,ne))T(W,ne,N,null,F,B,X,Z,Y);else break;w--,L--}if(q>w){if(q<=L){const W=L+1,ne=W<g?S[W].el:V;for(;q<=L;)T(null,S[q]=Y?Ft(S[q]):gt(S[q]),N,ne,F,B,X,Z,Y),q++}}else if(q>L)for(;q<=w;)Q(y[q],F,B,!0),q++;else{const W=q,ne=q,ue=new Map;for(q=ne;q<=L;q++){const Qe=S[q]=Y?Ft(S[q]):gt(S[q]);Qe.key!=null&&ue.set(Qe.key,q)}let pe,Ae=0;const Oe=L-ne+1;let Xe=!1,wt=0;const os=new Array(Oe);for(q=0;q<Oe;q++)os[q]=0;for(q=W;q<=w;q++){const Qe=y[q];if(Ae>=Oe){Q(Qe,F,B,!0);continue}let xt;if(Qe.key!=null)xt=ue.get(Qe.key);else for(pe=ne;pe<=L;pe++)if(os[pe-ne]===0&&Wn(Qe,S[pe])){xt=pe;break}xt===void 0?Q(Qe,F,B,!0):(os[xt-ne]=q+1,xt>=wt?wt=xt:Xe=!0,T(Qe,S[xt],N,null,F,B,X,Z,Y),Ae++)}const vl=Xe?Kc(os):dn;for(pe=vl.length-1,q=Oe-1;q>=0;q--){const Qe=ne+q,xt=S[Qe],_l=S[Qe+1],kl=Qe+1<g?_l.el||_l.placeholder:V;os[q]===0?T(null,xt,N,kl,F,B,X,Z,Y):Xe&&(pe<0||q!==vl[pe]?te(xt,N,kl,2):pe--)}}},te=(y,S,N,V,F=null)=>{const{el:B,type:X,transition:Z,children:Y,shapeFlag:q}=y;if(q&6){te(y.component.subTree,S,N,V);return}if(q&128){y.suspense.move(S,N,V);return}if(q&64){X.move(y,S,N,Xt);return}if(X===G){s(B,S,N);for(let w=0;w<Y.length;w++)te(Y[w],S,N,V);s(y.anchor,S,N);return}if(X===Io){k(y,S,N);return}if(V!==2&&q&1&&Z)if(V===0)Z.beforeEnter(B),s(B,S,N),Ge(()=>Z.enter(B),F);else{const{leave:w,delayLeave:L,afterLeave:W}=Z,ne=()=>{y.ctx.isUnmounted?o(B):s(B,S,N)},ue=()=>{B._isLeaving&&B[bc](!0),w(B,()=>{ne(),W&&W()})};L?L(B,ne,ue):ue()}else s(B,S,N)},Q=(y,S,N,V=!1,F=!1)=>{const{type:B,props:X,ref:Z,children:Y,dynamicChildren:q,shapeFlag:g,patchFlag:w,dirs:L,cacheIndex:W}=y;if(w===-2&&(F=!1),Z!=null&&(It(),qn(Z,null,N,y,!0),St()),W!=null&&(S.renderCache[W]=void 0),g&256){S.ctx.deactivate(y);return}const ne=g&1&&L,ue=!vn(y);let pe;if(ue&&(pe=X&&X.onVnodeBeforeUnmount)&&yt(pe,S,y),g&6)ce(y.component,N,V);else{if(g&128){y.suspense.unmount(N,V);return}ne&&on(y,null,S,"beforeUnmount"),g&64?y.type.remove(y,S,N,Xt,V):q&&!q.hasOnce&&(B!==G||w>0&&w&64)?me(q,S,N,!1,!0):(B===G&&w&384||!F&&g&16)&&me(Y,S,N),V&&ot(y)}(ue&&(pe=X&&X.onVnodeUnmounted)||ne)&&Ge(()=>{pe&&yt(pe,S,y),ne&&on(y,null,S,"unmounted")},N)},ot=y=>{const{type:S,el:N,anchor:V,transition:F}=y;if(S===G){ee(N,V);return}if(S===Io){O(y);return}const B=()=>{o(N),F&&!F.persisted&&F.afterLeave&&F.afterLeave()};if(y.shapeFlag&1&&F&&!F.persisted){const{leave:X,delayLeave:Z}=F,Y=()=>X(N,B);Z?Z(y.el,B,Y):Y()}else B()},ee=(y,S)=>{let N;for(;y!==S;)N=x(y),o(y),y=N;o(S)},ce=(y,S,N)=>{const{bum:V,scope:F,job:B,subTree:X,um:Z,m:Y,a:q}=y;sr(Y),sr(q),V&&cs(V),F.stop(),B&&(B.flags|=8,Q(X,y,S,N)),Z&&Ge(Z,S),Ge(()=>{y.isUnmounted=!0},S)},me=(y,S,N,V=!1,F=!1,B=0)=>{for(let X=B;X<y.length;X++)Q(y[X],S,N,V,F)},it=y=>{if(y.shapeFlag&6)return it(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const S=x(y.anchor||y.el),N=S&&S[mc];return N?x(N):S};let un=!1;const Mn=(y,S,N)=>{y==null?S._vnode&&Q(S._vnode,null,null,!0):T(S._vnode||null,y,S,null,null,null,N),S._vnode=y,un||(un=!0,Pi(),ji(),un=!1)},Xt={p:T,um:Q,m:te,r:ot,mt:ae,mc:C,pc:R,pbc:D,n:it,o:e};return{render:Mn,hydrate:void 0,createApp:Cc(Mn)}}function xo({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 rn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Wc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function tr(e,t,n=!1){const s=e.children,o=t.children;if(le(s)&&le(o))for(let r=0;r<s.length;r++){const a=s[r];let c=o[r];c.shapeFlag&1&&!c.dynamicChildren&&((c.patchFlag<=0||c.patchFlag===32)&&(c=o[r]=Ft(o[r]),c.el=a.el),!n&&c.patchFlag!==-2&&tr(a,c)),c.type===$s&&c.patchFlag!==-1&&(c.el=a.el),c.type===Et&&!c.el&&(c.el=a.el)}}function Kc(e){const t=e.slice(),n=[0];let s,o,r,a,c;const l=e.length;for(s=0;s<l;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;)c=r+a>>1,e[n[c]]<p?r=c+1:a=c;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 nr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:nr(t)}function sr(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const or=e=>e.__isSuspense;function Yc(e,t){t&&t.pendingBranch?le(e)?t.effects.push(...e):t.effects.push(e):fc(e)}const G=Symbol.for("v-fgt"),$s=Symbol.for("v-txt"),Et=Symbol.for("v-cmt"),Io=Symbol.for("v-stc"),Hn=[];let Ze=null;function m(e=!1){Hn.push(Ze=e?null:[])}function Gc(){Hn.pop(),Ze=Hn[Hn.length-1]||null}let Vn=1;function ir(e,t=!1){Vn+=e,e<0&&Ze&&t&&(Ze.hasOnce=!0)}function rr(e){return e.dynamicChildren=Vn>0?Ze||dn:null,Gc(),Vn>0&&Ze&&Ze.push(e),e}function h(e,t,n,s,o,r){return rr(f(e,t,n,s,o,r,!0))}function je(e,t,n,s,o){return rr(Ee(e,t,n,s,o,!0))}function So(e){return e?e.__v_isVNode===!0:!1}function Wn(e,t){return e.type===t.type&&e.key===t.key}const ar=({key:e})=>e??null,Cs=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$e(e)||Pe(e)||be(e)?{i:Re,r:e,k:t,f:!!n}:e:null);function f(e,t=null,n=null,s=0,o=null,r=e===G?0:1,a=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ar(t),ref:t&&Cs(t),scopeId:Li,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:Re};return c?($o(l,n),r&128&&e.normalize(l)):n&&(l.shapeFlag|=$e(n)?8:16),Vn>0&&!a&&Ze&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&Ze.push(l),l}const Ee=Zc;function Zc(e,t=null,n=null,s=0,o=null,r=!1){if((!e||e===wc)&&(e=Et),So(e)){const c=kn(e,t,!0);return n&&$o(c,n),Vn>0&&!r&&Ze&&(c.shapeFlag&6?Ze[Ze.indexOf(e)]=c:Ze.push(c)),c.patchFlag=-2,c}if(lu(e)&&(e=e.__vccOpts),t){t=Jc(t);let{class:c,style:l}=t;c&&!$e(c)&&(t.class=at(c)),Ie(l)&&(po(l)&&!le(l)&&(l=qe({},l)),t.style=fs(l))}const a=$e(e)?1:or(e)?128:hc(e)?64:Ie(e)?4:be(e)?2:0;return f(e,t,n,s,o,a,r,!0)}function Jc(e){return e?po(e)||Gi(e)?qe({},e):e:null}function kn(e,t,n=!1,s=!1){const{props:o,ref:r,patchFlag:a,children:c,transition:l}=e,p=t?Xc(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&ar(p),ref:t&&t.ref?n&&r?le(r)?r.concat(Cs(t)):[r,Cs(t)]:Cs(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==G?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&kn(e.ssContent),ssFallback:e.ssFallback&&kn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&bo(u,l.clone(u)),u}function Ut(e=" ",t=0){return Ee($s,null,e,t)}function M(e="",t=!1){return t?(m(),je(Et,null,e)):Ee(Et,null,e)}function gt(e){return e==null||typeof e=="boolean"?Ee(Et):le(e)?Ee(G,null,e.slice()):So(e)?Ft(e):Ee($s,null,String(e))}function Ft(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:kn(e)}function $o(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(le(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),$o(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Gi(t)?t._ctx=Re:o===3&&Re&&(Re.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else be(t)?(t={default:t,_ctx:Re},n=32):(t=String(t),s&64?(n=16,t=[Ut(t)]):n=8);e.children=t,e.shapeFlag|=n}function Xc(...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=at([t.class,s.class]));else if(o==="style")t.style=fs([t.style,s.style]);else if(is(o)){const r=t[o],a=s[o];a&&r!==a&&!(le(r)&&r.includes(a))&&(t[o]=r?[].concat(r,a):a)}else o!==""&&(t[o]=s[o])}return t}function yt(e,t,n,s=null){Ot(e,t,7,[n,s])}const Qc=Bi();let eu=0;function tu(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||Qc,r={uid:eu++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ml(!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:Uc(s,o),emitsOptions:Rc(s,o),emit:null,emitted:null,propsDefaults:we,inheritAttrs:s.inheritAttrs,ctx:we,data:we,props:we,attrs:we,slots:we,refs:we,setupState:we,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=Mc.bind(null,r),e.ce&&e.ce(r),r}let Ve=null;const lr=()=>Ve||Re;let Ts,Co;{const e=ds(),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)}};Ts=t("__VUE_INSTANCE_SETTERS__",n=>Ve=n),Co=t("__VUE_SSR_SETTERS__",n=>Kn=n)}const To=e=>{const t=Ve;return Ts(e),e.scope.on(),()=>{e.scope.off(),Ts(t)}},cr=()=>{Ve&&Ve.scope.off(),Ts(null)};function ur(e){return e.vnode.shapeFlag&4}let Kn=!1;function nu(e,t=!1,n=!1){t&&Co(t);const{props:s,children:o}=e.vnode,r=ur(e);Lc(e,s,r,t),qc(e,o,n||t);const a=r?su(e,t):void 0;return t&&Co(!1),a}function su(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Sc);const{setup:s}=n;if(s){It();const o=e.setupContext=s.length>1?iu(e):null,r=To(e),a=bn(s,e,0,[e.props,o]),c=oi(a);if(St(),r(),(c||e.sp)&&!vn(e)&&gc(e),c){if(a.then(cr,cr),t)return a.then(l=>{dr(e,l)}).catch(l=>{ks(l,e,0)});e.asyncDep=a}else dr(e,a)}else fr(e)}function dr(e,t,n){be(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ie(t)&&(e.setupState=Ei(t)),fr(e)}function fr(e,t,n){const s=e.type;e.render||(e.render=s.render||Qt)}const ou={get(e,t){return Ne(e,"get",""),e[t]}};function iu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,ou),slots:e.slots,emit:e.emit,expose:t}}function As(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ei(Ql(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Bn)return Bn[n](e)},has(t,n){return n in t||n in Bn}})):e.proxy}const ru=/(?:^|[-_])\w/g,au=e=>e.replace(ru,t=>t.toUpperCase()).replace(/[-_]/g,"");function pr(e,t=!0){return be(e)?e.displayName||e.name:e.name||t&&e.__name}function mr(e,t,n=!1){let s=pr(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?au(s):n?"App":"Anonymous"}function lu(e){return be(e)&&"__vccOpts"in e}const H=(e,t)=>sc(e,t,Kn),cu="3.5.25";let Ao;const hr=typeof window<"u"&&window.trustedTypes;if(hr)try{Ao=hr.createPolicy("vue",{createHTML:e=>e})}catch{}const br=Ao?e=>Ao.createHTML(e):e=>e,uu="http://www.w3.org/2000/svg",du="http://www.w3.org/1998/Math/MathML",Mt=typeof document<"u"?document:null,gr=Mt&&Mt.createElement("template"),fu={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"?Mt.createElementNS(uu,e):t==="mathml"?Mt.createElementNS(du,e):n?Mt.createElement(e,{is:n}):Mt.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Mt.createTextNode(e),createComment:e=>Mt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Mt.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{gr.innerHTML=br(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const c=gr.content;if(s==="svg"||s==="mathml"){const l=c.firstChild;for(;l.firstChild;)c.appendChild(l.firstChild);c.removeChild(l)}t.insertBefore(c,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},pu=Symbol("_vtc");function mu(e,t,n){const s=e[pu];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const yr=Symbol("_vod"),hu=Symbol("_vsh"),bu=Symbol(""),gu=/(?:^|;)\s*display\s*:/;function yu(e,t,n){const s=e.style,o=$e(n);let r=!1;if(n&&!o){if(t)if($e(t))for(const a of t.split(";")){const c=a.slice(0,a.indexOf(":")).trim();n[c]==null&&Os(s,c,"")}else for(const a in t)n[a]==null&&Os(s,a,"");for(const a in n)a==="display"&&(r=!0),Os(s,a,n[a])}else if(o){if(t!==n){const a=s[bu];a&&(n+=";"+a),s.cssText=n,r=gu.test(n)}}else t&&e.removeAttribute("style");yr in e&&(e[yr]=r?s.display:"",e[hu]&&(s.display="none"))}const vr=/\s*!important$/;function Os(e,t,n){if(le(n))n.forEach(s=>Os(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=vu(e,t);vr.test(n)?e.setProperty(Ye(s),n.replace(vr,""),"important"):e[s]=n}}const _r=["Webkit","Moz","ms"],Oo={};function vu(e,t){const n=Oo[t];if(n)return n;let s=Le(t);if(s!=="filter"&&s in e)return Oo[t]=s;s=ls(s);for(let o=0;o<_r.length;o++){const r=_r[o]+s;if(r in e)return Oo[t]=r}return t}const kr="http://www.w3.org/1999/xlink";function wr(e,t,n,s,o,r=Ol(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(kr,t.slice(6,t.length)):e.setAttributeNS(kr,t,n):n==null||r&&!ci(n)?e.removeAttribute(t):e.setAttribute(t,r?"":rt(n)?String(n):n)}function xr(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?br(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const c=r==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(c!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let a=!1;if(n===""||n==null){const c=typeof e[t];c==="boolean"?n=ci(n):n==null&&c==="string"?(n="",a=!0):c==="number"&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(o||t)}function Rt(e,t,n,s){e.addEventListener(t,n,s)}function _u(e,t,n,s){e.removeEventListener(t,n,s)}const Ir=Symbol("_vei");function ku(e,t,n,s,o=null){const r=e[Ir]||(e[Ir]={}),a=r[t];if(s&&a)a.value=s;else{const[c,l]=wu(t);if(s){const p=r[t]=Su(s,o);Rt(e,c,p,l)}else a&&(_u(e,c,a,l),r[t]=void 0)}}const Sr=/(?:Once|Passive|Capture)$/;function wu(e){let t;if(Sr.test(e)){t={};let s;for(;s=e.match(Sr);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ye(e.slice(2)),t]}let Eo=0;const xu=Promise.resolve(),Iu=()=>Eo||(xu.then(()=>Eo=0),Eo=Date.now());function Su(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Ot($u(s,n.value),t,5,[s])};return n.value=e,n.attached=Iu(),n}function $u(e,t){if(le(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 $r=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Cu=(e,t,n,s,o,r)=>{const a=o==="svg";t==="class"?mu(e,s,a):t==="style"?yu(e,n,s):is(t)?Gs(t)||ku(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Tu(e,t,s,a))?(xr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&wr(e,t,s,a,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!$e(s))?xr(e,Le(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),wr(e,t,s,a))};function Tu(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&$r(t)&&be(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 $r(t)&&$e(n)?!1:t in e}const Cr={};function Au(e,t,n){let s=Ce(e,t);rs(s)&&(s=qe({},s,t));class o extends Mo{constructor(a){super(s,a,n)}}return o.def=s,o}const Ou=typeof HTMLElement<"u"?HTMLElement:class{};class Mo extends Ou{constructor(t,n={},s=jr){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!==jr?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(qe({},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 Mo){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,Ue(()=>{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 c;if(r&&!le(r))for(const l in r){const p=r[l];(p===Number||p&&p.type===Number)&&(l in this._props&&(this._props[l]=ai(this._props[l])),(c||(c=Object.create(null)))[Le(l)]=!0)}this._numberProps=c,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)ge(this,s)||Object.defineProperty(this,s,{get:()=>i(n[s])})}_resolveProps(t){const{props:n}=t,s=le(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(Le))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):Cr;const o=Le(t);n&&this._numberProps&&this._numberProps[o]&&(s=ai(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===Cr?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(Ye(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Ye(t),n+""):n||this.removeAttribute(Ye(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),zu(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=Ee(this._def,qe(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,rs(a[0])?qe({detail:a},a[0]):{detail:a}))};s.emit=(r,...a)=>{o(r,a),Ye(r)!==r&&o(Ye(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],c=o.parentNode;if(a)for(const l of a){if(n&&l.nodeType===1){const p=n+"-s",u=document.createTreeWalker(l,1);l.setAttribute(p,"");let v;for(;v=u.nextNode();)v.setAttribute(p,"")}c.insertBefore(l,o)}else for(;o.firstChild;)c.insertBefore(o.firstChild,o);c.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 Es(e){const t=lr(),n=t&&t.ce;return n||null}const qt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return le(t)?n=>cs(t,n):t};function Eu(e){e.target.composing=!0}function Tr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const nt=Symbol("_assign");function Ar(e,t,n){return t&&(e=e.trim()),n&&(e=us(e)),e}const dt={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e[nt]=qt(o);const r=s||o.props&&o.props.type==="number";Rt(e,t?"change":"input",a=>{a.target.composing||e[nt](Ar(e.value,n,r))}),(n||r)&&Rt(e,"change",()=>{e.value=Ar(e.value,n,r)}),t||(Rt(e,"compositionstart",Eu),Rt(e,"compositionend",Tr),Rt(e,"change",Tr))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:r}},a){if(e[nt]=qt(a),e.composing)return;const c=(r||e.type==="number")&&!/^0\d/.test(e.value)?us(e.value):e.value,l=t??"";c!==l&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===l)||(e.value=l))}},Ms={deep:!0,created(e,t,n){e[nt]=qt(n),Rt(e,"change",()=>{const s=e._modelValue,o=xn(e),r=e.checked,a=e[nt];if(le(s)){const c=Xs(s,o),l=c!==-1;if(r&&!l)a(s.concat(o));else if(!r&&l){const p=[...s];p.splice(c,1),a(p)}}else if(pn(s)){const c=new Set(s);r?c.add(o):c.delete(o),a(c)}else a(Rr(e,r))})},mounted:Or,beforeUpdate(e,t,n){e[nt]=qt(n),Or(e,t,n)}};function Or(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(le(t))o=Xs(t,s.props.value)>-1;else if(pn(t))o=t.has(s.props.value);else{if(t===n)return;o=en(t,Rr(e,!0))}e.checked!==o&&(e.checked=o)}const wn={created(e,{value:t},n){e.checked=en(t,n.props.value),e[nt]=qt(n),Rt(e,"change",()=>{e[nt](xn(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[nt]=qt(s),t!==n&&(e.checked=en(t,s.props.value))}},Er={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const o=pn(t);Rt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?us(xn(a)):xn(a));e[nt](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,Ue(()=>{e._assigning=!1})}),e[nt]=qt(s)},mounted(e,{value:t}){Mr(e,t)},beforeUpdate(e,t,n){e[nt]=qt(n)},updated(e,{value:t}){e._assigning||Mr(e,t)}};function Mr(e,t){const n=e.multiple,s=le(t);if(!(n&&!s&&!pn(t))){for(let o=0,r=e.options.length;o<r;o++){const a=e.options[o],c=xn(a);if(n)if(s){const l=typeof c;l==="string"||l==="number"?a.selected=t.some(p=>String(p)===String(c)):a.selected=Xs(t,c)>-1}else a.selected=t.has(c);else if(en(xn(a),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function xn(e){return"_value"in e?e._value:e.value}function Rr(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Mu=["ctrl","shift","alt","meta"],Ru={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)=>Mu.some(n=>e[`${n}Key`]&&!t.includes(n))},Bt=(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 c=Ru[t[a]];if(c&&c(o,t))return}return e(o,...r)}))},Nu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Pu=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(o=>{if(!("key"in o))return;const r=Ye(o.key);if(t.some(a=>a===r||Nu[a]===r))return e(o)}))},ju=qe({patchProp:Cu},fu);let Nr;function Pr(){return Nr||(Nr=Hc(ju))}const zu=((...e)=>{Pr().render(...e)}),jr=((...e)=>{const t=Pr().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Du(s);if(!o)return;const r=t._component;!be(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const a=n(o,!1,Lu(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),a},t});function Lu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Du(e){return $e(e)?document.querySelector(e):e}const Uu=["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","submit"];new Set(Uu);const zr=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",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"}),Lr=Object.freeze({METHOD:"method",ORIGIN:"origin",TOO_LARGE:"invalid",INVALID_JSON:"invalid"}),Dr=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function Fu(e){return typeof e!="string"||e===""?"submit":Dr(zr,e)?zr[e]:Dr(Lr,e)?Lr[e]:"submit"}const Ur=Symbol.for("@blogmcp/sdk/CommunityTransportError");function qu(e){return typeof e=="number"&&Number.isInteger(e)&&e>=100&&e<=599?e:null}function Bu(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?Math.ceil(e):null}class Fr extends Error{status;retryAfterS;constructor(t,n={}){super(t),this.name="CommunityTransportError",this.status=qu(n.status),this.retryAfterS=Bu(n.retryAfterS),Object.defineProperty(this,Ur,{value:!0})}}function Hu(e){return e instanceof Fr?!0:e instanceof Error&&e[Ur]===!0}function Vu(e){return Hu(e)&&e.retryAfterS!==null?{ok:!1,code:"unavailable",retryAfterS:e.retryAfterS}:{ok:!1,code:"unavailable"}}function Wu(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}),Ku=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"),"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")}),qr="/community";function Yu(e){return e.surface==="public"&&e.path.startsWith(`${qr}/`)?e.path.slice(qr.length):e.path}const In=4e3,Gu=2,Rs=1e3,an=4e3,Ro=4e3,Br=120,Zu=2,Hr=80,Yn=/^[a-z0-9][a-z0-9_]{2,29}$/,Vr=30,Ju=50,Xu="community_notice",Qu="good_faith";function No(){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 Sn=(e,t)=>typeof t=="string"&&e.includes(t),ed=Object.freeze(["visible","held","removed","deleted"]),td=e=>Sn(ed,e),nd=Object.freeze(["member","staff","system"]),Wr=e=>Sn(nd,e),sd=Object.freeze(["sign_in","onboarding","reconsent_rules","art9_consent"]),Gn=e=>Sn(sd,e),od=Object.freeze(["restriction","suspension","ban"]),id=e=>Sn(od,e),Kr=Object.freeze(["decision","appeal_resolved","erasure_scheduled","inactivity_warning","module_read_only","module_braked","reply","mention","module_push_reset","age_limit_changed"]),Yr=e=>Sn(Kr,e),rd=Object.freeze(["new","member","regular","trusted"]),Gr=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"]),ad="child_at_risk",ld=Object.freeze(["16_17","18_plus"]);function cd(e){return typeof e=="object"&&e!==null&&Wr(e.kind)}const ud=Object.freeze(["dark","live","read_only","braked"]),Ns=e=>Sn(ud,e),dd=e=>e==="split"?"split":"joint",fd=e=>e==="public_write"?"public_write":"read_only";function Ps(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:c}=s;typeof o!="string"||typeof r!="string"||typeof c!="string"||n.push(Object.freeze({id:o,title:r,summary:typeof a=="string"?a:null,anchor:c}))}return n}const pd=2;function md(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>=pd)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 hd=/^(?:\/[A-Za-z0-9_~-][A-Za-z0-9._~-]*)*\/?$/;function Zr(e){return typeof e=="string"&&e.startsWith("/")&&hd.test(e)&&!/(^|\/)\.\.?(\/|$)/.test(e)}function Jr(e){if(!Zr(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 bd(e,t){return`${e.replace(/\/+$/,"")}${Yu(t)}`}function gd(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 yd(e,t={}){const n=Jr(e),s=t.now??Date.now,o=t.fetch??(()=>globalThis.fetch);return async(r,a,c)=>{let l;try{l=await o()(bd(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:c})}catch{throw new Fr(c.aborted?"community request aborted or timed out":"community request failed")}let p=null;try{const v=await l.text();p=v===""?null:JSON.parse(v)}catch{p=null}const u=gd(l.headers.get("Retry-After"),s());return u===void 0?{status:l.status,body:p}:{status:l.status,body:p,retryAfterS:u}}}const Xr=1e4,vd=2147483647;let Qr=!1;function _d(e){if(e===void 0)return Xr;const t=typeof e=="number"?Math.floor(e):Number.NaN;return t>=1&&t<=vd?t:(Qr||(Qr=!0,console.warn("[community] timeoutMs is not a number of milliseconds from 1 to 2147483647 — the default 10 s is used.")),Xr)}const We=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),$n=e=>typeof e=="string",ln=Array.isArray,kd=Object.freeze({string:$n,number:e=>typeof e=="number",boolean:e=>typeof e=="boolean",array:ln,record:We}),re=e=>Object.freeze({...e}),wd=Object.freeze({"discussions.list":re({articleId:"string",messages:"array",viewer:"record"}),"discussions.head":re({heads:"array"}),"messages.post":re({message:"record",warnings:"array"}),"messages.edit":re({message:"record",warnings:"array"}),"messages.delete":re({message:"record"}),"messages.report":re({caseId:"string"}),"reactions.set":re({reactions:"record"}),"blocks.set":re({blocked:"boolean"}),"blocks.list":re({blocks:"array"}),"profile.get":re({author:"record"}),"me.get":re({needs:"array"}),"me.onboard":re({needs:"array"}),"me.updateProfile":re({profile:"record"}),"me.notifications.list":re({items:"array"}),"me.notifications.markRead":re({updated:"number"}),"me.notifications.unreadCount":re({count:"number"}),"me.settings.get":re({settings:"record"}),"me.settings.update":re({settings:"record"}),"me.settings.unsubscribeDigest":re({unsubscribed:"boolean"}),"me.mutes.set":re({muted:"boolean"}),"me.mutes.list":re({items:"array"}),"me.push.vapid":re({publicKey:"string",keyId:"string"}),"me.push.subscribe":re({subscribed:"boolean",keyId:"string"}),"me.push.unsubscribe":re({unsubscribed:"boolean"}),"me.push.status":re({subscribed:"boolean"}),"me.realtime.token":re({token:"string",url:"string",expiresInS:"number"}),"realtime.subscribeToken":re({token:"string"}),"me.decisions.list":re({items:"array"}),"me.decisions.get":re({decisionId:"string"}),"me.appeals.file":re({appealId:"string"}),"me.appeals.withdraw":re({appealId:"string"}),"me.appeals.list":re({items:"array"}),"me.reports.list":re({items:"array"}),"me.consents.withdraw":re({state:"string"}),"me.export":re({generatedAt:"string"}),"me.erase":re({purgeAfter:"string"}),"me.cancelErase":re({status:"string"}),"legal.current":re({textId:"string"}),"notices.submit":re({caseId:"string",receipt:"string"}),"notices.status":re({status:"string"}),"notices.appeal":re({appealId:"string"}),"notices.withdrawAppeal":re({appealId:"string"})}),xd=(e,t)=>Object.entries(wd[e]).every(([n,s])=>kd[s](t[n]));function ft(e,t){const n={};if(!We(e))return n;for(const s of t)e[s]!==void 0&&(n[s]=e[s]);return n}function ea(e){return We(e)?"conversationId"in e?ft(e,["conversationId","seq"]):"memberId"in e?ft(e,["memberId"]):"handle"in e?ft(e,["handle"]):ft(e,["articleId"]):e}const ta=/^[A-Za-z0-9_.:-]{1,64}$/,js=20;function Id(e){if(ln(e))return e.filter(t=>$n(t)&&ta.test(t)).slice(0,js)}function Sd(e){return ln(e)?e.filter(Gn).slice(0,js):void 0}function $d(e){return ln(e)?e.map(n=>We(n)?n.path:n).filter(n=>$n(n)&&n.length<=128).slice(0,js):void 0}function Cd(e){if(!ln(e))return;const t=e.map(n=>We(n)?n.code:void 0).filter(n=>$n(n)&&ta.test(n));return t.length>0?[...new Set(t)].slice(0,js):void 0}function zs(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?Math.ceil(e):void 0}function Td(e,t){const n={ok:!1,code:Fu(e.code)},s=zs(e.retryAfterS)??zs(t.retryAfterS);s!==void 0&&(n.retryAfterS=s);const o=Sd(e.needs);o&&(n.needs=o);const r=Id(e.codes);r&&(n.codes=r),$n(e.until)&&(n.until=e.until);const a=$d(e.issues);a&&(n.fields=a);const c=Cd(e.issues);return c&&(n.issueCodes=c),n}function Ad(e){Jr(e?.base);const t=e.transport??yd(e.base,e.now?{now:e.now}:{}),n=_d(e.timeoutMs),s=e.logger,o=(l,p,u,v)=>{if(!(!s||!Wu(p)))try{s({op:l,outcome:p,kbCode:u,status:v})}catch{}};async function r(l,p,u){const v=Ku[l],x=new AbortController,_=u?.signal,$=()=>x.abort();_?.aborted?x.abort():_?.addEventListener("abort",$,{once:!0});const T=setTimeout(()=>x.abort(),n);let K;try{K=await t(v,p,x.signal)}catch(O){const E=Vu(O);return _?.aborted||o(l,E.code,null,null),E}finally{clearTimeout(T),_?.removeEventListener("abort",$)}const j=typeof K?.status=="number"?K.status:0,I=K?.body;if(We(I)&&I.ok===!1&&$n(I.code)&&I.code!==""){const O=Td(I,K);return o(l,O.code,I.code.slice(0,64),j),O}if(j>=200&&j<300&&We(I)&&I.ok===!0){const{ok:O,...E}=I;return xd(l,E)?{ok:!0,value:E}:(o(l,"unavailable",null,j),{ok:!1,code:"unavailable"})}if(j===429){const O=zs(K.retryAfterS);return O===void 0?{ok:!1,code:"fast"}:{ok:!1,code:"fast",retryAfterS:O}}o(l,"unavailable",null,j);const k=j===503?zs(K.retryAfterS):void 0;return k===void 0?{ok:!1,code:"unavailable"}:{ok:!1,code:"unavailable",retryAfterS:k}}const a=(l,p)=>(u,v)=>r(l,ft(u,p),v),c=l=>p=>r(l,{},p);return{discussions:{list:a("discussions.list",["articleId","languageCode","cursor"]),head:(l,p)=>r("discussions.head",{articleIds:We(l)&&ln(l.articleIds)?[...l.articleIds]:[]},p)},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:(l,p)=>r("reactions.set",{target:ea(l?.target),emoji:l?.emoji??null},p)},blocks:{set:a("blocks.set",["memberId","blocked"]),list:c("blocks.list")},profile:{get:(l,p)=>r("profile.get",We(l)&&"handle"in l?ft(l,["handle"]):ft(l,["memberId"]),p)},me:{get:c("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:(l,p)=>r("me.notifications.markRead",We(l)&&"all"in l?{all:l.all}:{ids:We(l)&&ln(l.ids)?[...l.ids]:[]},p),unreadCount:c("me.notifications.unreadCount")},settings:{get:c("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:c("me.mutes.list")},push:{vapid:c("me.push.vapid"),subscribe:(l,p)=>r("me.push.subscribe",{...ft(l,["endpoint","userAgentClass"]),...We(l)&&We(l.keys)?{keys:ft(l.keys,["p256dh","auth"])}:{}},p),unsubscribe:a("me.push.unsubscribe",["endpoint"]),status:a("me.push.status",["endpoint"])},realtime:{token:c("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:c("me.appeals.list")},reports:{list:c("me.reports.list")},consents:{withdraw:(l,p)=>r("me.consents.withdraw",{kind:"art9_consent"},p)},export:c("me.export"),erase:c("me.erase"),cancelErase:c("me.cancelErase")},legal:{current:a("legal.current",["kind","locale"])},realtime:{subscribeToken:a("realtime.subscribeToken",["channel"])},notices:{submit:(l,p)=>{const u=ft(l,["category","target","description","ruleId","turnstileToken","confirmations"]);return u.target!==void 0&&(u.target=ea(u.target)),We(l?.notifier)?u.notifier=ft(l.notifier,["name","email","locale"]):l?.notifier===null&&(u.notifier=null),r("notices.submit",u,p)},status:a("notices.status",["receipt"]),appeal:a("notices.appeal",["receipt","body"]),withdrawAppeal:a("notices.withdrawAppeal",["receipt"])}}}const Od=/FBAN|FBAV|Instagram/;function Ed(e){const t=typeof e=="string"?e:typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:"";return Od.test(t)}const pt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ye=e=>typeof e=="string"?e:null,Zn=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>0,Ls=Object.freeze({counts:Object.freeze({}),mine:null});function Jn(e){if(!pt(e))return Ls;const t={};if(pt(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:ye(e.mine)})}const na=Object.freeze({kind:"member",memberId:null,handle:null,displayName:null,avatarPreset:null,deleted:!0}),Md=Object.freeze({kind:"system"});function sa(e){if(!pt(e)||!Wr(e.kind))return null;if(e.kind==="system")return Md;if(e.kind==="staff")return Object.freeze({kind:"staff",staffId:ye(e.staffId)??"",displayName:ye(e.displayName)??"",badge:ye(e.badge)??""});const t=ye(e.memberId),n=ye(e.handle),s=ye(e.displayName);return t===null||n===null||s===null||e.deleted===!0?na:Object.freeze({kind:"member",memberId:t,handle:n,displayName:s,avatarPreset:ye(e.avatarPreset)})}function oa(e){if(Array.isArray(e))return Object.freeze(e.filter(t=>typeof t=="string"))}function Xn(e,t){if(!pt(e))return null;const n=sa(e.author);if(n===null||!td(e.state))return null;const s=ye(e.conversationId),o=ye(e.id);if(s===null||o===null||!Zn(e.seq))return null;const r=ye(e.body),a=[];if(t&&Array.isArray(e.replies))for(const l of e.replies){const p=Xn(l,!1);p&&a.push(p)}const c=oa(e.notes);return Object.freeze({conversationId:s,seq:e.seq,id:o,rev:typeof e.rev=="number"?e.rev:0,replyToSeq:t?null:Zn(e.replyToSeq)?e.replyToSeq:null,author:n,state:e.state,body:r,displayBody:ye(e.displayBody)??r,displayLanguageCode:ye(e.displayLanguageCode),sourceLanguageCode:ye(e.sourceLanguageCode),isTranslated:e.isTranslated===!0,isEdited:e.isEdited===!0,createdAt:ye(e.createdAt)??"",editedAt:ye(e.editedAt),collapsed:e.collapsed===!0,reactions:Jn(e.reactions),translationVersionId:ye(e.translationVersionId),...c&&c.length>0?{notes:c}:{},...e.hiddenUntilConsent===!0&&e.state==="held"?{hiddenUntilConsent:!0}:{},replies:cn(a),...t&&e.repliesTruncated===!0?{repliesTruncated:!0}:{}})}function Rd(e){const t=pt(e)?e:{},n=Array.isArray(t.needs)?t.needs.filter(Gn):[],s=[];if(Array.isArray(t.restrictions))for(const o of t.restrictions)!pt(o)||!id(o.kind)||typeof o.decisionId!="string"||s.push(Object.freeze({kind:o.kind,scope:ye(o.scope)??"",endsAt:ye(o.endsAt),decisionId:o.decisionId}));return Object.freeze({memberId:ye(t.memberId),canPost:t.canPost===!0,needs:Object.freeze([...new Set(n)]),restrictions:Object.freeze(s)})}const Nd=Object.freeze({memberId:null,canPost:!1,needs:Object.freeze([]),restrictions:Object.freeze([])}),Po=Object.freeze({articleId:null,conversationId:null,count:0,lastSeq:0,lastChangeAt:null,messages:Object.freeze([]),nextCursor:null,articleReactions:Ls,reactionSet:Object.freeze([]),preset:null,viewer:Nd,loaded:!1,stale:!1}),Pd=(e,t)=>e===null?t:t===null?e:Date.parse(t)>Date.parse(e)?t:e;function cn(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 vt(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=vt(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 Ht(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 jo(e,t){return vt(e,n=>n.seq===t.seq?n.replyToSeq===null&&t.replyToSeq===null?Object.freeze({...t,replies:n.replies}):t:n)}function ia(e,t){if(Ht(e,s=>s.seq===t.seq))return jo(e,t);if(t.replyToSeq===null)return cn([...e,t]);const n=e.find(s=>s.seq===t.replyToSeq);return n?Object.freeze(e.map(s=>s===n?Object.freeze({...s,replies:cn([...s.replies,t])}):s)):e}const ra=e=>e.replyToSeq===null&&e.replies.length>0,aa=(e,t)=>e.toLowerCase()===t.toLowerCase(),la=e=>e.author.kind==="member"&&e.author.memberId!==null?e.author.memberId.toLowerCase():null,jd=256,ca=new WeakMap;function zd(){let e=Po;const t=new Set,n=new Map,s=new Set;let o=0,r=-1;const a=new Set,c=()=>{o+=1,a.clear();for(const b of n.keys())s.delete(b),s.add(b);n.clear();for(const b of s){if(s.size<=jd)break;s.delete(b)}},l=b=>{if(b!==e){e=Object.freeze(b);for(const C of[...t])try{C(e)}catch{}}};function p(b,C={}){if(!pt(b))return;const z=ye(b.articleId)?.toLowerCase()??null,D=e.articleId!==null&&z!==null&&z!==e.articleId,J=D?Po:e;D&&c();const se=typeof C.cursor=="number"&&Number.isFinite(C.cursor)?C.cursor:null,oe=se??0,ae=typeof b.nextCursor=="number"&&Number.isFinite(b.nextCursor)?b.nextCursor:null,ve=ae??Number.POSITIVE_INFINITY,de=new Map;for(const ee of Array.isArray(b.messages)?b.messages:[]){const ce=Xn(ee,!0);ce&&ce.seq>oe&&ce.seq<=ve&&de.set(ce.seq,ce)}for(const ee of de.values())for(const ce of[ee,...ee.replies]){const me=la(ce);me===null||ce.body===null||(ce.collapsed?a.add(me):a.delete(me))}const U=new Map;for(const ee of J.messages){const ce=[ee,...ee.replies];for(const me of ce)me.pending&&me.pending!=="post"&&me.clientMsgId&&U.set(me.seq,me)}const R=ee=>{const ce=U.get(ee.seq);if(!ce)return ee;const me=ce.clientMsgId?n.get(ce.clientMsgId):void 0;return me&&(me.before=ee),ce.replyToSeq===null?Object.freeze({...ce,replies:ee.replies}):ce},P=J.messages.filter(ee=>ee.seq<0||ee.seq<=oe||ee.seq>ve),Se=new Map;for(const ee of J.messages)for(const ce of ee.replies)ce.seq<0&&ce.replyToSeq!==null&&Se.set(ce.replyToSeq,[...Se.get(ce.replyToSeq)??[],ce]);const te=[...P.filter(ee=>!de.has(ee.seq)),...de.values()].map(ee=>{if(!de.has(ee.seq))return ee;const ce=R(ee),me=ce.replies.map(R),it=Se.get(ee.seq)??[];return me.some((un,Mn)=>un!==ce.replies[Mn])||it.length>0?Object.freeze({...ce,replies:cn([...me,...it])}):ce}),Q=J.loaded?J.nextCursor:0,ot=Q===null?null:oe>Q?Q:ae===null?null:Math.max(Q,ae);l({articleId:z??J.articleId,conversationId:ye(b.conversationId)??J.conversationId,count:typeof b.count=="number"&&b.count>=0?b.count:J.count,lastSeq:Math.max(typeof b.lastSeq=="number"?b.lastSeq:0,J.lastSeq),lastChangeAt:Pd(J.lastChangeAt,ye(b.lastChangeAt)),messages:cn(te),nextCursor:ot,articleReactions:Jn(b.articleReactions),reactionSet:Object.freeze(Array.isArray(b.reactionSet)?b.reactionSet.filter(ee=>typeof ee=="string"):[]),preset:ye(b.preset),viewer:Rd(b.viewer),loaded:!0,stale:se===null?!1:J.stale})}function u(b){if(n.has(b.clientMsgId))return;const C=Zn(b.replyToSeq)?b.replyToSeq:null;if(C!==null&&!e.messages.some(se=>se.seq===C))return;const z=sa(b.author)??na,D=Object.freeze({conversationId:e.conversationId??"",seq:r--,id:`pending:${b.clientMsgId}`,rev:0,replyToSeq:C,author:z,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:Ls,translationVersionId:null,replies:Object.freeze([]),pending:"post",clientMsgId:b.clientMsgId});n.set(b.clientMsgId,{type:"post",before:null});const J=C===null?cn([...e.messages,D]):Object.freeze(e.messages.map(se=>se.seq===C?Object.freeze({...se,replies:cn([...se.replies,D])}):se));l({...e,messages:J})}function v(b){if(n.has(b.clientMsgId))return;const C=Ht(e.messages,D=>D.seq===b.seq);if(!C||C.pending)return;n.set(b.clientMsgId,{type:b.type,before:C});const z=b.type==="edit"?Object.freeze({...C,body:b.body,displayBody:b.body,displayLanguageCode:C.sourceLanguageCode,isTranslated:!1,isEdited:!0,pending:"edit",clientMsgId:b.clientMsgId}):Object.freeze({...C,pending:"delete",clientMsgId:b.clientMsgId});l({...e,messages:vt(e.messages,D=>D===C?z:D)})}const x=b=>e.conversationId===null||aa(b.conversationId,e.conversationId);function _(b){const C=n.get(b.clientMsgId);if(!C&&s.has(b.clientMsgId))return;n.delete(b.clientMsgId);const z=Xn(b.message,b.message?.replyToSeq===null||b.message?.replyToSeq===void 0),D=z&&x(z)?z:null,J=vt(e.messages,U=>U.clientMsgId===b.clientMsgId&&U.pending==="post"?null:U.clientMsgId===b.clientMsgId?ua(U):U);if(!D){J!==e.messages&&l({...e,messages:J});return}const se=b.warnings?oa(b.warnings):void 0,oe=se&&se.length>0?Object.freeze({...D,warnings:se}):D,ae=Ht(J,U=>U.seq===oe.seq);let ve,de=e.count;if(oe.state==="deleted"||C?.type==="delete"){const U=ae??null,R=U?.state==="visible"&&U.body!==null;ve=vt(J,P=>P.seq!==oe.seq?P:ra(P)?Object.freeze({...oe,replies:P.replies}):null),R&&(de=Math.max(0,de-1))}else ve=ia(J,oe),!ae&&oe.state==="visible"&&(de+=1);l({...e,conversationId:e.conversationId??(C?oe.conversationId:null),lastSeq:Math.max(e.lastSeq,oe.seq),count:de,messages:ve})}function $(b){const C=n.get(b);if(!C)return;n.delete(b);const z=vt(e.messages,D=>{if(D.clientMsgId!==b)return D;if(C.type==="post")return null;const J=C.before;return J?D.replyToSeq===null?Object.freeze({...J,replies:D.replies}):J:ua(D)});z!==e.messages&&l({...e,messages:z})}function T(b){const C=Xn(b,b?.replyToSeq===null||b?.replyToSeq===void 0);!C||!Ht(e.messages,z=>z.seq===C.seq&&!z.pending&&aa(z.conversationId,C.conversationId))||l({...e,messages:jo(e.messages,C)})}function K(b){if(pt(b))switch(b.type){case"post":return u(b);case"edit":case"delete":return v(b);case"confirm":return _(b);case"rollback":return $(b.clientMsgId);case"server":return T(b.message)}}function j(b){if(!pt(b)||!e.loaded||e.articleId===null||ye(b.articleId)?.toLowerCase()!==e.articleId)return!1;if(e.stale)return!0;const C=typeof b.lastSeq=="number"&&b.lastSeq>e.lastSeq,z=typeof b.count=="number"&&b.count!==e.count,D=ye(b.lastChangeAt),J=D!==null&&(e.lastChangeAt===null||Date.parse(D)>Date.parse(e.lastChangeAt));return!C&&!z&&!J?!1:(l({...e,stale:!0}),!0)}function I(b,C){if(!pt(b))return;const z=Jn(C);if("articleId"in b){if(ye(b.articleId)?.toLowerCase()!==e.articleId)return;l({...e,articleReactions:z});return}const{conversationId:D,seq:J}=b;if(!Zn(J)||typeof D!="string")return;const se=D.toLowerCase(),oe=vt(e.messages,ae=>ae.seq===J&&ae.conversationId.toLowerCase()===se?Object.freeze({...ae,reactions:z}):ae);oe!==e.messages&&l({...e,messages:oe})}function k(b,C){if(typeof b!="string"||b==="")return;const z=b.toLowerCase();C?a.add(z):a.delete(z);const D=vt(e.messages,J=>J.author.kind==="member"&&J.author.memberId!==null&&J.author.memberId.toLowerCase()===z&&J.body!==null&&J.collapsed!==C?Object.freeze({...J,collapsed:C}):J);D!==e.messages&&l({...e,messages:D})}function O(b,C){const z=la(b),D=b.body!==null&&z!==null&&a.has(z),J=C?C.reactions.mine:null,se=J===b.reactions.mine?b.reactions:Object.freeze({counts:b.reactions.counts,mine:J}),oe=C?.repliesTruncated===!0&&b.replyToSeq===null,ae=C?.warnings;return D===b.collapsed&&se===b.reactions&&!oe&&!ae?b:Object.freeze({...b,collapsed:D,reactions:se,...oe?{repliesTruncated:!0}:{},...ae?{warnings:ae}:{}})}function E(b){if(!pt(b)||!e.loaded)return"dropped";const C=typeof b.rev=="number"&&Number.isSafeInteger(b.rev)&&b.rev>=0?b.rev:null;if(b.kind==="resync")return"resync";if(C===null)return"dropped";if(b.kind==="reaction"){if(b.seq===void 0){const te=Jn(b.reactions);return l({...e,articleReactions:Object.freeze({counts:te.counts,mine:e.articleReactions.mine})}),"applied"}if(!Zn(b.seq))return"dropped";const U=b.seq,R=Ht(e.messages,te=>te.seq===U);if(!R||R.pending||C<R.rev)return"dropped";if(C>R.rev)return"resync";const P=Jn(b.reactions),Se=Object.freeze({counts:P.counts,mine:R.reactions.mine});return l({...e,messages:vt(e.messages,te=>te===R?Object.freeze({...te,reactions:Se}):te)}),"applied"}if(b.kind!=="message"&&b.kind!=="edit"&&b.kind!=="delete")return"dropped";const z=b.message,D=Xn(z,z?.replyToSeq===null||z?.replyToSeq===void 0);if(!D||!x(D))return"dropped";const J=Ht(e.messages,U=>U.seq===D.seq);if(J?.pending)return"dropped";const se=J?.rev??0;if(b.kind==="delete"){if(!J||C<=se)return"dropped";const U=J.state==="visible"&&J.body!==null,R=vt(e.messages,P=>P.seq!==D.seq?P:ra(P)?Object.freeze({...D,replies:P.replies}):null);return l({...e,messages:R,count:U?Math.max(0,e.count-1):e.count,lastSeq:Math.max(e.lastSeq,D.seq)}),"applied"}const oe=D.author.kind==="member"&&D.author.memberId!==null&&D.author.memberId===e.viewer.memberId;if(!J&&oe&&[...n.values()].some(U=>U.type==="post")||C<=se)return"dropped";if(C>se+1||!J&&D.replyToSeq!==null&&!e.messages.some(U=>U.seq===D.replyToSeq))return"resync";const ae=O(D,J),ve=J?jo(e.messages,ae):ia(e.messages,ae),de=!J&&D.state==="visible"?e.count+1:e.count;return l({...e,messages:ve,count:de,lastSeq:Math.max(e.lastSeq,D.seq)}),"applied"}const A={getState:()=>e,subscribe(b){return t.add(b),()=>{t.delete(b)}},applyPage:p,applyMessage:K,applyHead:j,applyReaction:I,collapse:k,applyEvent:E,reset(){c(),l(Po)}};return ca.set(A,()=>o),A}function ua(e){const{pending:t,clientMsgId:n,...s}=e;return Object.freeze(s)}function Nt(e){const t="viewer"in e?e.viewer.needs:e.needs,n=new Set(t.filter(Gn)),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 Qn(e,t){return Ht(e.messages,n=>n.seq===t)}function Ld(e,t){return t.author.kind==="member"&&t.author.memberId!==null&&t.author.memberId===e.viewer.memberId}function Dd(e,t){if("articleId"in t)return e.articleReactions;const n=t.conversationId.toLowerCase();return Ht(e.messages,o=>o.seq===t.seq&&o.conversationId.toLowerCase()===n)?.reactions??Ls}function Ud(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 Fd=20;function da(e){const t=ca.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 qd=e=>typeof e=="number"&&Number.isFinite(e)?e:null;async function Bd(e,t,n,s){const o=e.getState(),r=o.loaded?o.nextCursor:0,a=da(e);let c=null;for(let l=0;l<Fd;l++){const p=await t.discussions.list({articleId:n.articleId,languageCode:n.languageCode??null,cursor:c},s);if(!p.ok)return p;if(a.moved())break;e.applyPage(p.value,{cursor:c}),a.mark();const u=qd(p.value.nextCursor);if(u===null||r!==null&&u>=r||c!==null&&u<=c)break;c=u}return{ok:!0,value:e.getState()}}async function Hd(e,t,n,s){const o=e.getState().nextCursor;if(o===null)return{ok:!0,value:e.getState()};const r=da(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 Vd=2e4,Wd=5*6e4,Kd=6e4,Yd=(e,t)=>e.lastSeq===t.lastSeq&&e.count===t.count&&e.lastChangeAt===t.lastChangeAt;function Gd(e,t,n){const s=Math.max(1e3,n.intervalMs??Vd),o=[...new Set((Array.isArray(t)?t:[]).filter(k=>typeof k=="string"&&k!==""))].slice(0,Ju),r=n.visible??(()=>typeof document>"u"||document.visibilityState!=="hidden"),a=new Map;let c=null,l=null,p=0,u=!1,v=!1;const x=k=>{v||(c&&clearTimeout(c),c=setTimeout(()=>{T()},k))},_=k=>{x(k),u=!0},$=()=>{!v&&!l&&!u&&x(0)};async function T(){if(c=null,u=!1,v||l)return;if(!r()){x(s);return}const k=new AbortController;l=k;const O={signal:k.signal},E=await e.discussions.head({articleIds:o},O);if(l=null,!v){if(E.ok){p=0;const A=[];for(const b of Array.isArray(E.value.heads)?E.value.heads:[]){if(typeof b?.articleId!="string")continue;const C=b.articleId.toLowerCase(),z=a.get(C);a.set(C,b),(!z||!Yd(z,b))&&A.push(b)}if(A.length>0)try{n.onChange(A)}catch{}x(s);return}try{n.onFailure?.(E)}catch{}if(E.code==="surfaceOff")return I();if(E.code==="fast"||E.code==="quota"){_(Math.max(s,E.retryAfterS!==void 0?E.retryAfterS*1e3:Kd));return}p=Math.min(Wd,(p||s)*2),_(p)}}const K=()=>{r()&&$()},j=()=>I();function I(){v||(v=!0,c&&clearTimeout(c),c=null,l?.abort(),l=null,typeof document<"u"&&document.removeEventListener("visibilitychange",K),n.signal?.removeEventListener("abort",j))}return o.length===0||n.signal?.aborted?(v=!0,{stop:()=>{},now:()=>{}}):(typeof document<"u"&&document.addEventListener("visibilitychange",K),n.signal?.addEventListener("abort",j,{once:!0}),x(s),{stop:I,now:$})}const Je=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"}),Zd=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,fa=/^kbnt_[A-Za-z0-9_-]{1,507}$/,pa="t";function Cn(e){return typeof e=="string"&&/^\/(?![/\\])/.test(e)&&!/[\s\\\u0000-\u001f\u007f]/.test(e)}function Ds(e,t){const n=e==null||e===""?Je.statement:e;return!Cn(n)||!n.includes("{id}")||/[{}]/.test(n.split("{id}").join(""))||typeof t!="string"||!Zd.test(t)?null:n.split("{id}").join(t.toLowerCase())}function ma(e,t){const n=e==null||e===""?Je.profile:e;if(!Cn(n)||!n.includes("{handle}")||/[{}]/.test(n.split("{handle}").join("")))return null;const s=typeof t=="string"?t.replace(/^@/,"").toLowerCase():"";return Yn.test(s)?n.split("{handle}").join(s):null}const ha="bcm-msg-",ba=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>0;function zo(e){return ba(e)?`${ha}${e}`:null}function Jd(e){const t=new RegExp(`^#${ha}([1-9][0-9]{0,14})$`).exec(typeof e=="string"?e:""),n=t?Number(t[1]):NaN;return ba(n)?n:null}function Xd(e,t,n){const s=e;if(!Cn(s)||s.includes("#")||!s.includes("{slug}")||/[{}]/.test(s.split("{slug}").join(""))||typeof t!="string"||t===""||t.length>512||t==="."||t===".."||/[\u0000-\u001f\u007f]/.test(t))return null;const o=zo(n);return o===null?null:`${s.split("{slug}").join(encodeURIComponent(t))}#${o}`}function Qd(e,t){const n=e==null||e===""?Je.notices:e;return!Cn(n)||n.includes("#")||typeof t!="string"||!fa.test(t)?null:`${n}#${pa}=${t}`}function Tn(e,t){return Cn(e)?e.includes("#")||!Cn(t)||t.includes("#")?e:`${e}#${t}`:null}function ga(e){const n=/^#t=([^&]*)/.exec(typeof e=="string"?e:"")?.[1]??"";return fa.test(n)?n:null}const Lo=new WeakMap;function Do(){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 ef(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function tf(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 ya(e,t,n){if(!ef(e))return e;let s=!1;const o={...e};for(const[r,a]of Object.entries(o)){if(typeof a!="string")continue;const c=tf(a,t,n);c!==a&&(o[r]=c,s=!0)}return s?o:e}function nf(e=Do()){const t=e.location.hash,n=ga(t),s=!Lo.has(e);return t.startsWith(`#${pa}=`)&&e.history.replaceState(ya(e.history.state,t,n),"",e.location.pathname+e.location.search),(s||n!==null)&&Lo.set(e,n),Lo.get(e)??null}const sf=/^kbun_[A-Za-z0-9_-]{64}$/,of="u";function va(e){const n=/^#u=([^&]*)/.exec(typeof e=="string"?e:"")?.[1]??"";return sf.test(n)?n:null}const Us=new WeakMap;function rf(e=Do()){const t=e.location.hash,n=va(t),s=!Us.has(e);return t.startsWith(`#${of}=`)&&e.history.replaceState(ya(e.history.state,t,n),"",e.location.pathname+e.location.search),(s||n!==null)&&Us.set(e,n),Us.get(e)??null}function af(e=Do()){Us.delete(e)}const lf=/(^|[^A-Za-z0-9_@./])@([A-Za-z0-9][A-Za-z0-9_]{2,29})(?![A-Za-z0-9_])/g;function _a(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(lf.source,"g"))){const o=s[2],r=o.toLowerCase();if(!Yn.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 ka(e){const t=[];for(const n of _a(e))n.kind==="mention"&&!t.includes(n.handle)&&t.push(n.handle);return t}const cf={"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.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","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.","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":"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.","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.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."},uf={"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.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","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.","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":"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.","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.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."},Uo=Object.freeze({cs:Object.freeze(cf),en:Object.freeze(uf)});function df(e){return(typeof e=="string"?e.toLowerCase().split("-")[0]:"")==="cs"?"cs":"en"}const Fo=new Map;function ff(e,t){if(!Fo.has(e)){let n=null;try{n=new Intl.PluralRules(e)}catch{}Fo.set(e,n)}return Fo.get(e)?.select(t)??"other"}function pf(e){const t=typeof e=="number"?e:typeof e=="string"&&e.trim()!==""?Number(e):Number.NaN;return Number.isFinite(t)?t:null}function es(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function mf(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 wa(e,t,n){const s=df(e),o=Uo[s];let r=es(o,t);if(r===void 0){const a=pf(n?.count),c=a===null?"other":ff(s,a);r=es(o,`${t}_${c}`)??es(o,`${t}_other`)}return r===void 0?String(t):mf(r,n)}function Fs(e){return typeof e!="string"?!1:es(Uo.en,e)!==void 0||es(Uo.en,`${e}_other`)!==void 0}function hf(e){return typeof e=="string"&&e.startsWith("identifier_")?"warning.identifier":e==="invisible_chars"?"warning.invisible_chars":"warning.other"}function bf(e){const t=`confirm.${e}`;return e!=="title"&&e!=="submit"&&e!=="other"&&Fs(t)?t:"confirm.other"}function gf(e){const t=`note.${e}`;return Fs(t)?t:null}function yf(e){return Kr.includes(e)?`notification.${e}`:null}function vf(e){const t=typeof e=="string"?rd.indexOf(e):-1;return t<0?null:`trust.${t}`}const _f=["statementPath","myCommunityPath","rulesPath","reportPath","noticesPath","consultationPath","profilePath","settingsPath","notificationsPath","welcomePath","discussionsPath","articlePath"];function qs(e){return typeof e=="string"&&/^\/(?![/\\])/.test(e)&&!/[\s\\\u0000-\u001f\u007f]/.test(e)}const xa=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Ia(e){if(typeof e!="string")return e;if(e.trim()==="")return null;try{return JSON.parse(e)}catch{return null}}function An(e){const t=Ia(e),n={};if(!xa(t))return n;for(const s of _f)qs(t[s])&&(n[s]=t[s]);return n}function kf(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 On(e,t,n=""){const s=o=>qs(o)?o:void 0;return{statementPath:e.statementPath??s(t?.statementPath)??`${n}${Je.statement}`,myCommunityPath:e.myCommunityPath??s(t?.myCommunityPath)??`${n}${Je.myCommunity}`,rulesPath:e.rulesPath??`${n}${Je.rules}`,reportPath:e.reportPath??`${n}${Je.report}`,noticesPath:e.noticesPath??`${n}${Je.notices}`,consultationPath:e.consultationPath??null,profilePath:e.profilePath??`${n}${Je.profile}`,settingsPath:e.settingsPath??`${n}${Je.settings}`,notificationsPath:e.notificationsPath??`${n}${Je.notifications}`,welcomePath:e.welcomePath??`${n}${Je.welcome}`,discussionsPath:e.discussionsPath??`${n}${Je.discussions}`,articlePath:e.articlePath??null}}const wf=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,xf=/^[a-z0-9][a-z0-9_]{2,29}$/,Bs=e=>typeof e=="string"&&wf.test(e),Sa=e=>typeof e=="number"&&Number.isSafeInteger(e)&&e>0;function Hs(e){const t=Ia(e);return xa(t)?"conversationId"in t?Bs(t.conversationId)&&Sa(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"&&xf.test(t.handle)?{handle:t.handle}:null:"articleId"in t&&Bs(t.articleId)?{articleId:t.articleId.toLowerCase()}:null:null}function If(e){return"conversationId"in e?"message":"articleId"in e?"article":"profile"}function Sf(e,t){return!qs(e)||e.includes("#")||!Bs(t.conversationId)||!Sa(t.seq)?null:`${e}#c=${t.conversationId.toLowerCase()}&s=${t.seq}`}function $f(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 Hs({conversationId:n,seq:Number(s)});const o=t.get("a");return o!==void 0?Hs({articleId:o}):null}const $a=6e4,Ca=99,Cf=e=>e>Ca?`${Ca}+`:String(e);function Tf(e){const{client:t}=e,n=typeof e.intervalMs=="number"&&Number.isFinite(e.intervalMs)?e.intervalMs:$a,s=n>0?Math.max(n,$a):0,o=e.visible??(()=>typeof document>"u"||document.visibilityState!=="hidden"),r=new AbortController,a={signal:r.signal},c=He({phase:"pending",count:0});let l=!1,p=!1,u=null,v=null;function x(){p=!1,u&&clearInterval(u),u=null,typeof document<"u"&&document.removeEventListener("visibilitychange",T)}function _(){c.phase="hidden",c.count=0,x()}function $(){return l||!p?Promise.resolve():(v??=(async()=>{const K=await t.me.notifications.unreadCount(a);if(!(l||!p)){if(K.ok){c.count=Math.max(0,Math.floor(K.value.count)),c.phase="shown";return}K.code==="signIn"&&_()}})().finally(()=>{v=null}),v)}function T(){o()&&$()}return{state:c,async start(){const K=await t.me.get(a);if(l)return;const j=K.ok?K.value.module?.state:void 0,I=j!==void 0&&(!Ns(j)||j==="dark");if(!K.ok||K.value.needs.includes("sign_in")||!K.value.member||I)return _();p=!0,typeof document<"u"&&document.addEventListener("visibilitychange",T),s>0&&(u=setInterval(()=>{o()&&$()},s)),o()&&await $()},refresh:$,dispose(){l||(l=!0,x(),r.abort())}}}const Af="/api/community",Ta=new Set;function Vt(e,t){Ta.has(e)||(Ta.add(e),console.warn(t))}function Wt(e){const t=kf(e);return t===null&&Vt("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 Kt(e,t,n=""){const s=e==null||e===""?`${n}${Af}`:e;if(!Zr(s))return Vt("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 Ad(t?{base:s,transport:t}:{base:s})}catch{return Vt("api-base","[blogmcp-community] api-base was refused by the community client"),null}}function _t(...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 Pt(){return typeof document>"u"?null:document.documentElement.lang||null}function Of(e){return(t,n)=>wa(e,t,n)}function mt(e){return Fs(e)?e:null}const Aa=Symbol("bcm-text");function Yt(e){const t=(s,o)=>wa(e.value,s,o),n={lang:e,t,text:s=>s?t(s.key,s.params):""};return Hi(Aa,n),n}function jt(){const e=vo(Aa,null);if(!e)throw new Error("[blogmcp-community] a component rendered outside its element");return e}let Oa=0;function Ke(e){return Oa+=1,`${e}-${Oa}`}function Ea(e,t,n){let s=null;const o=r=>{r.preventDefault(),t()};bt(()=>{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","")}),ut(()=>{const r=e.value;r?.removeEventListener("cancel",o),r?.open&&typeof r.close=="function"&&r.close();const a=s;Ue(()=>{(a&&a.isConnected?a:n?.()??null)?.focus()})})}const Ef=["lang","href","aria-label","title"],Mf={"aria-hidden":"true"},Rf=Ce({inheritAttrs:!1,__name:"BadgeView",props:{apiBase:{},siteBase:{},lang:{},routes:{},pollMs:{},transport:{type:Function}},setup(e){const t=e,n=he(_t(t.lang,Pt())),{t:s}=Yt(n),o=Wt(t.siteBase),r=o===null?null:Kt(t.apiBase,t.transport,o),a=r?Tf({client:r,...typeof t.pollMs=="number"?{intervalMs:t.pollMs}:{}}):null,c=a?.state??null,l=H(()=>On(An(t.routes),null,o??""));return bt(()=>{a?.start()}),ut(()=>a?.dispose()),(p,u)=>i(c)&&i(c).phase==="shown"&&i(c).count>0?(m(),h("a",{key:0,class:"bcm-badge-link",lang:n.value,href:l.value.notificationsPath,"aria-label":i(s)("badge.unread",{count:i(c).count}),title:i(s)("badge.unread",{count:i(c).count})},[f("span",Mf,d(i(Cf)(i(c).count)),1)],8,Ef)):M("",!0)}}),Ma=e=>e==="cs"?"cs-CZ":"en-GB",qo=new Map;function Nf(e,t){const n=`${e}:${t?"t":"d"}`;if(!qo.has(n)){let s=null;try{s=new Intl.DateTimeFormat(Ma(e),t?{dateStyle:"medium",timeStyle:"short"}:{dateStyle:"long"})}catch{}qo.set(n,s)}return qo.get(n)??null}function ze(e,t,n=!0){if(typeof t!="string"||t==="")return"";const s=Date.parse(t);return Number.isFinite(s)?Nf(e,n)?.format(new Date(s))??t:""}const Pf=new Map;function jf(e,t){if(typeof t!="string"||!/^\d{4}-(?:0[1-9]|1[0-2])$/.test(t))return"";const n=Bo(Pf,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,c)=>c!==o&&!(c===o+1&&s[c].type==="literal")).map(a=>a.value).join("").trim()||t}catch{return t}}function Ra(e,t=Date.now()){if(typeof e!="string")return!1;const n=Date.parse(e);return Number.isFinite(n)&&n<=t}const zf=/^[A-Z]{2}(?:,[A-Z]{2})*$/,Lf=new Map,Df=new Map;function Bo(e,t,n){if(!e.has(t)){let s=null;try{s=n(Ma(t))}catch{}e.set(t,s)}return e.get(t)??null}function Uf(e,t){try{return Bo(Lf,e,n=>new Intl.DisplayNames(n,{type:"region"}))?.of(t)||t}catch{return t}}function Ff(e,t){if(typeof t!="string")return"";const n=t.trim();if(n==="all")return Of(e)("statement.scopeAll");if(!zf.test(n))return n;const s=n.split(",").map(o=>Uf(e,o));try{return Bo(Df,e,o=>new Intl.ListFormat(o,{type:"conjunction"}))?.format(s)??s.join(", ")}catch{return s.join(", ")}}function Te(e,t){const n=e.until?ze(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 qf=Object.freeze({fast:3,quota:60});function Na(e,t){const n=qf[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 Pa=120,Bf=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",submit:"show"});function Hf(e){return Bf[e]??"show"}var Vs={},Me={},ja;function Vf(){return ja||(ja=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.BLANK_URL=Me.relativeFirstCharacters=Me.whitespaceEscapeCharsRegex=Me.urlSchemeRegex=Me.ctrlCharactersRegex=Me.htmlCtrlEntityRegex=Me.htmlEntitiesRegex=Me.invalidProtocolRegex=void 0,Me.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Me.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Me.htmlCtrlEntityRegex=/&(newline|tab);/gi,Me.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Me.urlSchemeRegex=/^.+(:|:)/gim,Me.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Me.relativeFirstCharacters=[".","/"],Me.BLANK_URL="about:blank"),Me}var za;function Wf(){if(za)return Vs;za=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.sanitizeUrl=r;var e=Vf();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function n(a){var c=a.replace(e.ctrlCharactersRegex,"");return c.replace(e.htmlEntitiesRegex,function(l,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 c,l=o(a.trim());do l=n(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=o(l),c=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(c&&c.length>0);var p=l;if(!p)return e.BLANK_URL;if(t(p))return p;var u=p.trimStart(),v=u.match(e.urlSchemeRegex);if(!v)return p;var x=v[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(x))return e.BLANK_URL;var _=u.replace(/\\/g,"/");if(x==="mailto:"||x.includes("://"))return _;if(x==="http:"||x==="https:"){if(!s(_))return e.BLANK_URL;var $=new URL(_);return $.protocol=$.protocol.toLowerCase(),$.hostname=$.hostname.toLowerCase(),$.toString()}return _}return Vs}var Kf=Wf();const Yf="nofollow ugc noopener noreferrer",Gf=/\b(?:https?:\/\/|www\.)[^\s<>"'`{}|\\^]+/gi,Zf=`.,;:!?…'"»”’]`;function Jf(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(!Zf.includes(n))break;t=t.slice(0,-1)}return t}function Xf(e){const t=/^www\./i.test(e)?`https://${e}`:e;if(/^https?:\/\/$/i.test(t))return null;const n=Kf.sanitizeUrl(t);return n!=="about:blank"&&/^https?:\/\//i.test(n)?n:null}function Qf(e){const t=[];if(typeof e!="string"||e==="")return t;let n=0;for(const s of e.matchAll(Gf)){const o=s.index??0;if(o<n)continue;const r=Jf(s[0]),a=r?Xf(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 ep(e,t){const n=Qf(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 _a(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 c=s[s.length-1];c&&c.kind==="text"?s[s.length-1]={kind:"text",text:c.text+r.text}:s.push({kind:"text",text:r.text})}}}return s}function kt(e){let t=0;for(const n of e)t++;return t}function st(e){return typeof e=="string"?e.normalize("NFC").trim():""}const tp=Object.freeze({amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ",ndash:"–",mdash:"—",hellip:"…",laquo:"«",raquo:"»",bdquo:"„",ldquo:"“",rdquo:"”",lsquo:"‘",rsquo:"’",sbquo:"‚",copy:"©",reg:"®",euro:"€",shy:""});function np(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 tp[n.toLowerCase()]??t})}const sp=/<\/(?:p|div|li|h[1-6]|section|article|blockquote|tr|ul|ol|dl|dt|dd|header|footer|table|pre|figure)\s*>/gi,op=/<(?:li|tr|dt|dd|h[1-6]|blockquote|pre|figure)\b[^>]*>/gi;function ip(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(sp,`
|
|
6
|
+
|
|
7
|
+
`).replace(op,`
|
|
8
|
+
|
|
9
|
+
`).replace(/<[^>]*>/g,"");return np(t).split(/\n{2,}/).map(n=>n.replace(/ *\n */g,`
|
|
10
|
+
`).replace(/[ ]{2,}/g," ").trim()).filter(n=>n!=="")}function Ws(e){return typeof e=="string"?e.normalize("NFKC").replace(/\s+/gu," ").trim():""}function La(e){const t=kt(Ws(e));return t>=Zu&&t<=Hr}const Da=3,Ks=30;function En(e){return typeof e=="string"?e.trim().toLowerCase():""}function Ua(e){const t=En(e);return t===""||Yn.test(t)}const rp=Object.freeze({ß:"ss",ł:"l",đ:"d",ð:"d",ø:"o",ħ:"h",ŧ:"t",ı:"i",æ:"ae",œ:"oe",þ:"th",ŀ:"l"});function ap(e){const s=Ws(e).toLowerCase().normalize("NFD").replace(new RegExp("\\p{M}+","gu"),"").normalize("NFC").replace(/[ßłđðøħŧıæœþŀ]/g,o=>rp[o]??o).split(/[^a-z0-9]+/).filter(o=>o!=="").join("_").slice(0,24).replace(/_+$/,"");return Yn.test(s)?s:null}const lp=new Set(["displayName","handle","avatarPreset"]),cp=new Set(["rulesTextId","art9TextId"]),up="art9_refusal_read_only",Fa=e=>e.code==="invalid"&&e.issueCodes?.includes(up)===!0;function dp(e,t){return Fa(e)?{key:"onboarding.art9RequiredToWrite"}:Te(e,t)}function fp(e,t,n){const s=[];e.member?.ageBand||s.push("age"),e.acceptances.rules!=="accepted"&&s.push("rules");const o=e.acceptances.art9Consent;return(t.includes("art9_consent")||n&&o!==null&&o!=="accepted")&&s.push("art9"),e.profile||s.push("profile"),s}function pp(e,t){if(!e)return[];const n=md(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 qa(e){const t=e.signal?{signal:e.signal}:{},n=e.offerArt9===!0,s=He({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}),o=k=>{s.failure=k,s.phase="failed"};async function r(k){const[O,E]=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 A of[O,E])if(A&&!A.ok)return o(A),null;return{rules:O?.ok?O.value:null,art9:E?.ok?E.value:null}}async function a(){const k=await e.client.me.get(t);if(!k.ok)return o(k),null;const O=k.value.needs.filter(Gn);if(O.includes("sign_in"))return e.onSignIn(),null;const E=fp(k.value,O,n),A=await r(E);return A?{me:k.value,steps:E,texts:A}:null}const c=()=>!n&&s.art9Refusal==="public_write";function l(k){k.texts.rules?.textId!==s.rulesText?.textId&&(s.rulesAccepted=!1);const O=dd(k.me.settings?.art9ConsentLayout),E=k.texts.art9!==null&&k.texts.art9.textId===s.art9Text?.textId;s.art9Controllers=pp(k.texts.art9,O).map((A,b)=>{const C=s.art9Controllers[b];return{...A,accepted:E&&C?.entity===A.entity&&C.accepted===!0}}),s.art9Layout=O,s.art9Refusal=fd(k.me.settings?.art9Refusal),(!E||!c())&&(s.art9Refused=!1),s.me=k.me,s.steps=k.steps,s.reconsent=k.me.acceptances.rules==="reconsent_required",s.rulesText=k.texts.rules,s.rules=k.texts.rules?Ps(k.texts.rules.bodyJson):[],s.art9Text=k.texts.art9,s.art9Paragraphs=k.texts.art9?ip(k.texts.art9.body):[]}async function p(){s.phase="loading",s.failure=null;const k=await a();if(k){if(l(k),s.index=0,k.steps.length===0){if(n){s.phase="done",e.onDone(k.me);return}return T()}s.phase="ready"}}const u=()=>s.steps[s.index]??null;function v(k){switch(k){case"age":return s.ageBand!==null;case"rules":return s.rulesAccepted&&s.rulesText!==null;case"art9":return s.art9Text!==null&&(s.art9Accepted||s.art9Refused&&c());case"profile":return La(s.displayName)&&Ua(s.handle)}}function x(){const k=u();return s.phase!=="ready"||k===null?!1:k==="art9"?s.art9Text!==null&&s.art9Accepted:v(k)}function _(k){const O=s.steps.indexOf(k);O>=0&&(s.index=O)}const $=()=>s.steps.findIndex(k=>!v(k));async function T(){const k=$();if(k>=0){s.index=k;return}s.phase="sending",s.failure=null,s.fields=[];const O={ageBand:s.ageBand??s.me?.member?.ageBand??"18_plus",rulesTextId:s.steps.includes("rules")&&s.rulesText?s.rulesText.textId:""};let E=!1;if(s.steps.includes("art9")&&s.art9Text&&(s.art9Accepted?O.art9TextId=s.art9Text.textId:s.art9Refused&&c()&&(O.art9Refused=!0,E=!0)),s.steps.includes("profile")){O.displayName=Ws(s.displayName);const b=En(s.handle);b!==""&&(O.handle=b),O.avatarPreset=s.avatarPreset}const A=await e.client.me.onboard(O,t);if(A.ok){s.art9RefusedSent=E,s.phase="done",e.onDone(A.value);return}switch(s.failure=A,s.phase="ready",A.code){case"age":s.minAge=18,s.phase="refused",e.onRefused?.(s.minAge);return;case"name":return s.fields=En(s.handle)!==""?["displayName","handle"]:["displayName"],_("profile");case"handle":return s.fields=["handle"],_("profile");case"invalid":return s.fields=A.fields??[],Fa(A)||s.fields.includes("art9Refused")?(s.art9Refused=!1,K(A)):s.fields.some(b=>lp.has(b))?_("profile"):s.fields.some(b=>cp.has(b))?K(A):s.fields.includes("ageBand")?_("age"):void 0;case"signIn":return e.onSignIn();default:return}}async function K(k){const O=[...s.fields];s.phase="sending";const E=await a();if(!E)return;l(E),O.includes("rulesTextId")&&(s.rulesAccepted=!1),O.includes("art9TextId")&&(s.art9Accepted=!1),s.failure=k,s.fields=O;const A=$();if(A>=0){s.index=A,s.phase="ready";return}if(E.me.needs.filter(Gn).length===0){s.phase="done",e.onDone(E.me);return}o(k)}async function j(){if(s.failure=null,s.index<s.steps.length-1){s.index+=1;return}await T()}const I=()=>s.phase==="ready"&&u()==="art9"&&s.art9Text!==null&&c();return{state:s,load:p,step:u,isLast:()=>s.index>=s.steps.length-1,canContinue:x,async next(){x()&&(u()==="art9"&&s.art9Accepted&&(s.art9Refused=!1),await j())},canRefuse:I,async refuse(){I()&&(s.art9Accepted=!1,s.art9Refused=!0,await j())},refusalOffered:c,back(){s.phase!=="ready"||s.index===0||(s.failure=null,s.index-=1,u()==="art9"&&(s.art9Refused=!1))},suggestedHandle:()=>En(s.handle)===""?ap(s.displayName):null,hasFieldError:k=>s.fields.includes(k)}}const Ho=(e="")=>({body:e,sending:!1,failure:null,confirm:null,waitUntil:null,clientMsgId:null}),Ba=()=>typeof document>"u"||document.visibilityState!=="hidden";function mp(e){const{client:t,lang:n}=e,s=e.articleId.toLowerCase(),o=e.now??Date.now,r=zd(),a=new AbortController,c={signal:a.signal},l=He({phase:"loading",failure:null,thread:r.getState(),loadingMore:!1,refreshing:!1,newMessages:!1,me:null,block:null,composer:Ho(),inline:null,report:null,announcement:null,announceId:0,clock:o(),busy:{},refusedAge:e.refusedAge??null,art9RefusedNote:!1,realtimeOff:!1}),p=r.subscribe(g=>{l.thread=g}),u=ys(null);let v=!1,x=null,_=null,$=!0,T=!1,K=0,j=null,I=null,k=null,O=null,E=null;const A=e.pollMs??2e4;function b(g){l.announcement=g,l.announceId+=1}function C(){l.phase="hidden",x?.stop(),x=null,_?.stop(),_=null}function z(g=!1){return l.me&&!g?Promise.resolve():(I??=t.me.get(c).then(w=>{I=null,!(!w.ok||T)&&(l.me=w.value,J())}),I)}function D(g){const w=g?.module;if(!w)return null;const L=w.brake?w.brake.until:Ns(w.state)&&w.state==="braked"?w.until:void 0,W=typeof L=="string"?Date.parse(L):NaN;return Number.isFinite(W)?W:null}function J(){if(O&&clearTimeout(O),O=null,T)return;const g=[];if(te()){const W=D(l.me);W!==null&&g.push(W)}if(l.block==="braked"&&E!==null&&g.push(E),g.length===0)return;const w=Math.max(...g)-o(),L=w>0?Math.min(w+1e3,2147e6):3e4;O=setTimeout(()=>{O=null,!T&&(se(),z(!0))},L)}function se(){l.block==="braked"&&(E!==null&&E>o()||(l.block=null,E=null))}function oe(){const g=r.getState();g.viewer.canPost||Nt(g).any||g.viewer.restrictions.length>0||z(l.block===null).then(()=>{const w=l.me;T||!w||r.getState().viewer.canPost||te()||(l.block=!w.member||w.member.status==="active"?"notMoved":"restricted")})}function ae(){const g=r.getState(),w=l.block==="braked"||te();g.viewer.canPost&&l.block!=="braked"&&(l.block=null),w&&se(),g.viewer.memberId!==null&&z(w),oe(),u.value&&!Nt(g).any&&u.value.state.phase!=="sending"&&(u.value=null)}function ve(g){if(g.code==="surfaceOff")return C();if(g.code==="notFound"&&l.phase!=="ready")return Vt("not-found","[blogmcp-community] the discussion of this article-id was not found (no such live article, or it is not readable here)"),C();(l.phase==="loading"||l.phase==="failed")&&(l.phase="failed",l.failure=g)}function de(){return T?Promise.resolve():(j??=(async()=>{l.refreshing=!0;const g=await Bd(r,t,{articleId:s,languageCode:n},c);l.refreshing=!1,!T&&(K=o(),g.ok?(l.phase="ready",l.failure=null,l.newMessages=!1,ae()):ve(g))})().finally(()=>{j=null}),j)}async function U(){if(l.loadingMore||l.thread.nextCursor===null)return;l.loadingMore=!0;const g=await Hd(r,t,{articleId:s,languageCode:n},c);if(l.loadingMore=!1,!(T||g.ok)){if(g.code==="surfaceOff")return C();b(Te(g,n))}}function R(g){for(const w of g){if(typeof w?.articleId!="string"||w.articleId.toLowerCase()!==s)continue;if(l.phase==="failed"){de();continue}const L=r.getState(),W=typeof w.lastSeq=="number"&&w.lastSeq>L.lastSeq;r.applyHead(w)&&(W&&L.loaded?l.newMessages=!0:de())}}function P(){x||A===0||T||l.phase==="hidden"||(x=Gd(t,[s],{intervalMs:A,visible:()=>Ba()&&$,onChange:R,onFailure:g=>{g.code==="surfaceOff"&&C()},signal:a.signal}))}async function Se(g){if(!(_||T||l.phase==="hidden")){if(Nt(r.getState()).signIn)return P();if(await z(),!(T||_||l.phase==="hidden")){if(l.me?.module&&l.me.module.features.realtime!==!0)return P();try{_=g({client:t,store:r,languageCode:n,visible:()=>Ba()&&$,...A>0?{pollIntervalMs:A}:{},onMode:w=>{T||(w==="polling"&&!l.realtimeOff?l.realtimeOff=!0:w==="live"&&l.realtimeOff&&(l.realtimeOff=!1))}})}catch{Vt("realtime","[blogmcp-community] the realtime property is not a session factory (createRealtimeSession of @blogmcp/sdk/community/realtime): the discussion polls"),_=null,P()}}}}function te(){const g=l.me?.module;return g?g.brake!==void 0||Ns(g.state)&&g.state==="braked":!1}function Q(){const g=l.thread,w=Nt(g);return w.signIn?"signIn":l.block==="notMoved"?"notMoved":l.block==="braked"||te()?"braked":!g.viewer.canPost&&g.viewer.restrictions.length>0?"sanction":w.any?l.refusedAge!==null&&!u.value?"ageRefused":"onboarding":u.value&&v?"onboarding":l.block==="restricted"?"restricted":g.viewer.canPost?"write":"pending"}function ot(){const g=l.me,w=g?.caps?.mentionsPerMessage,L=g?.module?.state;return!g?.member||typeof w!="number"||!Number.isSafeInteger(w)||w<0?null:L==="live"||L==="braked"?w:null}const ee=g=>{const w=ot();return w!==null&&ka(g).length>w},ce=g=>Ld(l.thread,g),me=g=>!g.pending&&g.seq>0,it=()=>Q()==="write";function un(){const g=l.me;if(g?.member&&g.profile)return{kind:"member",memberId:g.member.memberId,handle:g.profile.handle,displayName:g.profile.displayName,avatarPreset:g.profile.avatarPreset};const w=l.thread.viewer.memberId;if(w===null)return null;for(const L of l.thread.messages)for(const W of[L,...L.replies])if(W.author.kind==="member"&&W.author.memberId===w)return W.author;return null}function Mn(){l.clock=o(),!k&&(k=setInterval(()=>{l.clock=o();let g=!1;for(const w of[l.composer,l.inline])!w||w.waitUntil===null||(w.waitUntil<=l.clock?(w.waitUntil=null,w.failure&&(w.failure.code==="fast"||w.failure.code==="quota")&&(w.failure=null)):g=!0);!g&&k&&(clearInterval(k),k=null)},1e3))}const Xt=g=>g.waitUntil===null?0:Math.max(0,Math.ceil((g.waitUntil-Math.max(l.clock,o()))/1e3));function ss(g,w){switch(g&&(g.failure=w),Hf(w.code)){case"confirm":g&&w.codes&&w.codes.length>0&&(g.confirm={codes:[...w.codes],checked:[]});return;case"wait":g&&(g.waitUntil=Na(w,o()),g.waitUntil!==null&&Mn()),w.code==="braked"&&(l.block="braked",E=Na(w,o()),J(),z(!0));return;case"onboard":q(),de();return;case"reload":de();return;case"notMoved":l.block="notMoved";return;case"hide":return w.code==="realtimeOff"?void 0:C();default:return}}async function y(g,w,L){if(g.sending||Xt(g)>0||T)return;const W=st(g.body);if(W===""||kt(W)>In)return;const ne=Nt(l.thread);if(ne.signIn)return;if(ne.any)return q();const ue=w.kind==="new"?null:Qn(l.thread,w.seq);if(w.kind!=="new"&&(!ue||!me(ue)))return;if(ee(W)){g.failure={ok:!1,code:"mentionLimit"};return}g.sending=!0,g.failure=null;const pe=w.kind==="edit"?null:un(),Ae=w.kind==="edit"?No():g.clientMsgId??=No();w.kind==="edit"?r.applyMessage({type:"edit",clientMsgId:Ae,seq:w.seq,body:W}):pe&&r.applyMessage({type:"post",clientMsgId:Ae,body:W,replyToSeq:w.kind==="reply"?w.seq:null,author:pe,languageCode:n});const Oe=w.kind==="edit"?await t.messages.edit({conversationId:ue.conversationId,seq:w.seq,body:W,...L?{confirmations:L}:{}},c):await t.messages.post({articleId:s,body:W,replyToSeq:w.kind==="reply"?w.seq:null,clientMsgId:Ae,languageCode:n,...L?{confirmations:L}:{}},c);if(!T){if(g.sending=!1,Oe.ok){r.applyMessage({type:"confirm",clientMsgId:Ae,message:Oe.value.message,warnings:Oe.value.warnings});const Xe=Oe.value.message.state==="held";g.body="",g.clientMsgId=null,g.confirm=null,g.failure=null,w.kind!=="new"&&l.inline===g&&(l.inline=null),b({key:Xe?"composer.held":"composer.posted"}),w.kind!=="edit"&&e.onPosted?.(Xe?"held":"visible");return}r.applyMessage({type:"rollback",clientMsgId:Ae}),ss(g,Oe)}}function S(g,w,L){if(!g.confirm||!g.confirm.codes.includes(w))return;const W=g.confirm.checked.filter(ne=>ne!==w);g.confirm.checked=L?[...W,w]:W}async function N(g){const w=g.confirm;if(!w||!w.codes.every(W=>w.checked.includes(W)))return;const L=g===l.composer?{kind:"new"}:l.inline===g?{kind:l.inline.kind,seq:l.inline.seq}:{kind:"new"};await y(g,L,[...w.codes])}async function V(g){const w=Qn(l.thread,g),L=`delete:${g}`;if(!w||!me(w)||l.busy[L])return!1;l.busy[L]=!0;const W=No();r.applyMessage({type:"delete",clientMsgId:W,seq:g});const ne=await t.messages.delete({conversationId:w.conversationId,seq:g},c);return delete l.busy[L],T?!1:ne.ok?(r.applyMessage({type:"confirm",clientMsgId:W,message:ne.value.message}),!0):(r.applyMessage({type:"rollback",clientMsgId:W}),b(Te(ne,n)),ss(null,ne),!1)}const F=g=>"articleId"in g?"react:article":`react:${g.seq}`;async function B(g,w){const L=F(g);if(!it()||l.busy[L]||!l.thread.reactionSet.includes(w))return;const W=Dd(l.thread,g),ne=W.mine===w?null:w;l.busy[L]=!0,r.applyReaction(g,Ud(W,ne));const ue=await t.reactions.set({target:g,emoji:ne},c);if(delete l.busy[L],!T){if(ue.ok){r.applyReaction(g,ue.value.reactions);return}r.applyReaction(g,W),b(Te(ue,n)),ss(null,ue)}}async function X(g,w){const L=`block:${g}`;if(l.busy[L])return;l.busy[L]=!0;const W=await t.blocks.set({memberId:g,blocked:w},c);if(delete l.busy[L],!T){if(W.ok){r.collapse(g,W.value.blocked),b({key:W.value.blocked?"discussion.blocked":"discussion.unblocked"});return}b(Te(W,n)),ss(null,W)}}function Z(g){l.report={conversationId:g.conversationId,seq:g.seq,category:"",ruleId:"",note:"",rules:null,rulesFailed:!1,sending:!1,failure:null,done:!1};const w=l.report;t.legal.current({kind:"rules",locale:n},c).then(L=>{l.report===w&&(L.ok?w.rules=Ps(L.value.bodyJson):w.rulesFailed=!0)})}async function Y(){const g=l.report;if(!g||g.sending||g.done||g.category===""||g.category==="rules"&&g.ruleId==="")return;const w=st(g.note);if(kt(w)>Rs)return;g.sending=!0,g.failure=null;const L=await t.messages.report({conversationId:g.conversationId,seq:g.seq,category:g.category,ruleId:g.category==="rules"?g.ruleId:null,note:w===""?null:w},c);if(g.sending=!1,!T){if(L.ok){g.done=!0,b({key:"report.done"});return}g.failure=L,L.code==="surfaceOff"&&C()}}function q(g={}){if(u.value||T||l.refusedAge!==null)return;const w=g.offerArt9===!0;v=w;const L=qa({client:t,lang:n,signal:a.signal,...w?{offerArt9:!0}:{},onRefused:W=>{l.refusedAge=W,e.onAgeRefused?.(W)},onDone:W=>{l.me=W,u.value=null,l.art9RefusedNote=L.state.art9RefusedSent,w?W.acceptances.art9Consent==="accepted"&&b({key:"panel.art9Given"}):b({key:L.state.art9RefusedSent?"onboarding.art9RefusedDone":"onboarding.done"}),de()},onSignIn:()=>{u.value=null,de()}});u.value=L,L.load()}return{state:l,store:r,onboarding:u,async start(){await de(),e.realtime&&l.phase==="ready"?await Se(e.realtime):P()},refresh:de,loadMore:U,mode:Q,needs:()=>Nt(l.thread),isOwn:ce,canReply:g=>{if(!it()||!me(g)||g.state!=="visible"||g.body===null)return!1;if(g.replyToSeq===null)return!0;const w=Qn(l.thread,g.replyToSeq);return w!==null&&me(w)&&w.state==="visible"},canEdit:g=>it()&&ce(g)&&me(g)&&g.body!==null&&(g.state==="visible"||g.state==="held"),canDelete:g=>l.thread.viewer.memberId!==null&&Q()!=="braked"&&ce(g)&&me(g)&&g.body!==null&&g.state!=="deleted",canReact:it,mentionCap:ot,canReport:g=>!Nt(l.thread).signIn&&!ce(g)&&me(g)&&g.body!==null&&g.author.kind!=="system",canReportAsNotifier:g=>Nt(l.thread).signIn&&me(g)&&g.body!==null&&g.author.kind!=="system",canBlock:g=>!Nt(l.thread).signIn&&!ce(g)&&me(g)&&g.author.kind==="member"&&g.author.memberId!==null,setInView(g){const w=$;$=g,g&&!w&&x&&o()-K>=A&&x.now()},submit:()=>y(l.composer,{kind:"new"}),openReply(g,w=null){const L=Qn(l.thread,g);if(!L)return;const W=L.replyToSeq??L.seq;if(l.inline?.kind==="reply"&&l.inline.seq===W){l.inline.replyingTo=w;return}l.inline={...Ho(),kind:"reply",seq:W,replyingTo:w}},openEdit(g){const w=Qn(l.thread,g);!w||w.body===null||(l.inline={...Ho(w.body),kind:"edit",seq:g,replyingTo:null})},closeInline(){l.inline=null},async submitInline(){const g=l.inline;g&&await y(g,{kind:g.kind,seq:g.seq})},setConfirmed:S,sendConfirmed:N,remove:V,react:B,setBlocked:X,openReport:Z,closeReport(){l.report=null},submitReport:Y,beginOnboarding:q,cancelOnboarding(){u.value=null},waitLeft:Xt,dispose(){T||(T=!0,a.abort(),x?.stop(),x=null,_?.stop(),_=null,p(),k&&clearInterval(k),k=null,O&&clearTimeout(O),O=null,u.value=null)}}}const hp=["aria-labelledby","aria-describedby"],bp={class:"bcm-dialog-body"},gp=["id"],yp=["id"],vp={class:"bcm-row"},_p=["disabled"],kp=["disabled"],Vo=Ce({__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}=jt(),r=he(null),a=Ke("bcm-dialog");return Ea(r,()=>s("cancel"),n.fallbackFocus),(c,l)=>(m(),h("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",bp,[f("h3",{id:`${i(a)}-title`},d(i(o)(e.title)),9,gp),e.explain?(m(),h("p",{key:0,id:`${i(a)}-explain`},d(i(o)(e.explain,e.explainParams)),9,yp)):M("",!0),f("div",vp,[l[2]||(l[2]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn",disabled:e.busy,onClick:l[0]||(l[0]=p=>s("cancel"))},d(i(o)(e.cancel??"common.cancel")),9,_p),f("button",{type:"button",class:at(["bcm-btn bcm-primary",{"bcm-danger":e.danger}]),disabled:e.busy,onClick:l[1]||(l[1]=p=>s("confirm"))},d(i(o)(e.confirm)),11,kp)])])],8,hp))}}),wp=["for"],xp={key:0,class:"bcm-hint"},Ip=["id","placeholder","aria-describedby","aria-invalid","readonly"],Sp={class:"bcm-composer-foot"},$p=["id"],Cp={class:"bcm-sr","aria-live":"polite"},Tp=["disabled"],Ap=["disabled"],Op=["id"],Ep={key:0},Mp=["href"],Rp={key:1,class:"bcm-error"},Np={key:2,class:"bcm-error",role:"alert"},Pp={key:3,class:"bcm-warning",role:"status"},jp={key:4,class:"bcm-error",role:"alert"},zp={key:5,class:"bcm-confirm"},Lp={class:"bcm-label"},Dp=["checked","onChange"],Up={class:"bcm-row"},Fp=["disabled"],Wo=Ce({__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}=jt(),c=Ke("bcm-composer"),l=he(null),p=H(()=>kt(st(s.draft.body))),u=H(()=>p.value>In),v=H(()=>{const E=s.mentionsMax;return typeof E=="number"&&E>=0&&ka(st(s.draft.body)).length>E}),x=H(()=>!s.draft.sending&&p.value>0&&!u.value&&!v.value&&s.wait===0&&s.draft.confirm===null),_=H(()=>{const E=s.draft.confirm;return E!==null&&E.codes.every(A=>E.checked.includes(A))}),$=H(()=>r(s.kind==="reply"?"composer.replyLabel":s.kind==="edit"?"composer.editLabel":"composer.label")),T=typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.platform||navigator.userAgent)?"⌘ + Enter":"Ctrl + Enter",K=H(()=>{const E=s.draft.failure;if(!E||s.draft.confirm&&E.code==="confirm"||E.code==="mentionLimit"&&v.value||(E.code==="fast"||E.code==="quota")&&s.wait>0&&s.wait<=Pa)return"";const A=Te(E,a.value);return r(A.key,A.params)}),j=he("");let I=null;Fe(p,E=>{I&&clearTimeout(I),I=setTimeout(()=>{j.value=E>=In*.9?r("composer.counter",{length:E,max:In}):""},700)}),ut(()=>{I&&clearTimeout(I)}),Fe(()=>s.draft.body,()=>{const E=s.draft;E.confirm&&(E.confirm=null),E.failure&&E.failure.code!=="fast"&&E.failure.code!=="quota"&&(E.failure=null)});function k(E){E.key!=="Enter"||!(E.metaKey||E.ctrlKey)||(E.preventDefault(),x.value&&o("submit"))}function O(){x.value&&o("submit")}return t({focus:()=>l.value?.focus()}),(E,A)=>(m(),h("form",{class:"bcm-composer",onSubmit:Bt(O,["prevent"])},[f("label",{for:i(c),class:"bcm-label"},d($.value),9,wp),e.replyingTo?(m(),h("p",xp,d(i(r)("composer.replyingTo",{name:e.replyingTo})),1)):M("",!0),xe(f("textarea",{id:i(c),ref_key:"input",ref:l,"onUpdate:modelValue":A[0]||(A[0]=b=>e.draft.body=b),class:"bcm-input bcm-textarea",rows:"4",placeholder:i(r)("composer.placeholder"),"aria-describedby":`${i(c)}-counter ${i(c)}-hints`,"aria-invalid":u.value||v.value,readonly:e.draft.sending,onKeydown:k},null,40,Ip),[[dt,e.draft.body]]),f("div",Sp,[f("span",{id:`${i(c)}-counter`,class:at(["bcm-counter",{"bcm-counter-over":u.value}])},d(i(r)("composer.counter",{length:p.value,max:i(In)})),11,$p),f("span",Cp,d(j.value),1),A[3]||(A[3]=f("span",{class:"bcm-spacer"},null,-1)),e.kind!=="new"?(m(),h("button",{key:0,type:"button",class:"bcm-btn",disabled:e.draft.sending,onClick:A[1]||(A[1]=b=>o("cancel"))},d(i(r)("composer.cancel")),9,Tp)):M("",!0),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!x.value},d(e.draft.sending?i(r)("composer.sending"):e.kind==="edit"?i(r)("composer.save"):i(r)("composer.submit")),9,Ap)]),f("div",{id:`${i(c)}-hints`,class:"bcm-hint"},[f("p",null,d(i(r)("composer.linksNote",{count:i(Gu)})),1),f("p",null,d(i(r)("composer.shortcut",{keys:i(T)})),1),e.rulesHref?(m(),h("p",Ep,[f("a",{href:e.rulesHref,target:"_blank",rel:"noopener"},d(i(r)("onboarding.rulesTitle")),9,Mp)])):M("",!0)],8,Op),u.value?(m(),h("p",Rp,d(i(r)("composer.tooLong",{max:i(In)})),1)):M("",!0),v.value?(m(),h("p",Np,d(i(r)("error.mentionLimit")),1)):M("",!0),e.wait>0&&e.wait<=i(Pa)?(m(),h("p",Pp,d(i(r)("composer.cooldown",{count:e.wait})),1)):M("",!0),K.value?(m(),h("p",jp,d(K.value),1)):M("",!0),e.draft.confirm?(m(),h("fieldset",zp,[f("legend",Lp,d(i(r)("confirm.title")),1),f("p",null,d(i(r)("error.confirm")),1),(m(!0),h(G,null,ke(e.draft.confirm.codes,b=>(m(),h("label",{key:b,class:"bcm-check"},[f("input",{type:"checkbox",checked:e.draft.confirm.checked.includes(b),onChange:C=>o("confirm",b,C.target.checked)},null,40,Dp),f("span",null,d(i(r)(i(bf)(b))),1)]))),128)),f("div",Up,[f("button",{type:"button",class:"bcm-btn bcm-primary",disabled:!_.value||e.draft.sending||e.wait>0,onClick:A[2]||(A[2]=b=>o("confirmed"))},d(i(r)("confirm.submit")),9,Fp)])])):M("",!0)],32))}}),Ko=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:"⭐"})]),qp=new Map(Ko.map(e=>[e.id,e.emoji]));function Bp(e){return typeof e=="string"?qp.get(e)??null:null}function Ha(e){if(typeof e!="string")return"";for(const t of e.trim())return t.toLocaleUpperCase();return""}function Hp(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 Yo=Ce({__name:"AuthorAvatar",props:{author:{}},setup(e){const t=e,n=H(()=>t.author.kind==="member"?Bp(t.author.avatarPreset):null),s=H(()=>{const r=t.author;return r.kind==="member"||r.kind==="staff"?Ha(r.displayName):""}),o=H(()=>{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(${Hp(a)} 45% 42%)`});return(r,a)=>(m(),h("span",{class:at(["bcm-avatar",{"bcm-avatar-initial":!n.value&&s.value}]),style:fs(o.value?{background:o.value}:void 0),"aria-hidden":"true"},d(n.value??s.value),7))}}),Vp=["href","rel"],Wp=["href"],Va=Ce({__name:"LinkedText",props:{text:{},profilePath:{}},setup(e){const t=e,n=H(()=>{const s=t.profilePath;return ep(t.text??"",s?o=>ma(s,o):null)});return(s,o)=>(m(!0),h(G,null,ke(n.value,(r,a)=>(m(),h(G,{key:a},[r.kind==="link"?(m(),h("a",{key:0,href:r.href,rel:i(Yf),target:"_blank"},d(r.text),9,Vp)):r.kind==="mention"?(m(),h("a",{key:1,class:"bcm-mention",href:r.href},d(r.text),9,Wp)):(m(),h(G,{key:2},[Ut(d(r.text),1)],64))],64))),128))}}),Kp=["aria-expanded","aria-controls"],Yp=["id"],Gp=["href"],Zp=["onClick"],Jp=Ce({__name:"MessageMenu",props:{items:{}},emits:["select"],setup(e,{emit:t}){const n=t,{t:s}=jt(),o=he(!1),r=he(null),a=he(null),c=Ke("bcm-menu");function l(x){!a.value||x.composedPath().includes(a.value)||u(!1)}function p(x){o.value=x,x?(document.addEventListener("pointerdown",l,!0),Ue(()=>a.value?.querySelector(".bcm-menu-list button, .bcm-menu-list a")?.focus())):document.removeEventListener("pointerdown",l,!0)}function u(x=!0){p(!1),x&&r.value?.focus()}function v(x){u(!0),n("select",x)}return ut(()=>document.removeEventListener("pointerdown",l,!0)),(x,_)=>e.items.length?(m(),h("div",{key:0,ref_key:"root",ref:a,class:"bcm-menu",onKeydown:_[2]||(_[2]=Pu(Bt($=>u(!0),["stop"]),["esc"]))},[f("button",{ref_key:"toggle",ref:r,type:"button",class:"bcm-quiet","aria-expanded":o.value,"aria-controls":i(c),onClick:_[0]||(_[0]=$=>p(!o.value))},d(i(s)("discussion.menu")),9,Kp),o.value?(m(),h("div",{key:0,id:i(c),class:"bcm-menu-list"},[(m(!0),h(G,null,ke(e.items,$=>(m(),h(G,{key:$.id},[$.href?(m(),h("a",{key:0,href:$.href,class:at({"bcm-danger":$.danger}),onClick:_[1]||(_[1]=T=>u(!1))},d($.label),11,Gp)):(m(),h("button",{key:1,type:"button",class:at({"bcm-danger":$.danger}),onClick:T=>v($.id)},d($.label),11,Zp))],64))),128))],8,Yp)):M("",!0)],544)):M("",!0)}}),Xp=["aria-label"],Qp=["aria-pressed","disabled","title","onClick"],em={key:0,class:"bcm-sr"},tm={key:1,class:"bcm-react"},Wa=Ce({__name:"ReactionBar",props:{reactionSet:{},summary:{},interactive:{type:Boolean},busy:{type:Boolean}},emits:["react"],setup(e,{emit:t}){const n=e,s=t,{t:o}=jt(),r=H(()=>n.interactive?n.reactionSet:n.reactionSet.filter(a=>(n.summary.counts[a]??0)>0));return(a,c)=>r.value.length?(m(),h("div",{key:0,class:"bcm-reactions",role:"group","aria-label":i(o)("discussion.reactions")},[(m(!0),h(G,null,ke(r.value,l=>(m(),h(G,{key:l},[e.interactive?(m(),h("button",{key:0,type:"button",class:"bcm-react","aria-pressed":e.summary.mine===l,disabled:e.busy,title:e.summary.mine===l?i(o)("discussion.reactionRemove"):i(o)("discussion.reactionAdd"),onClick:p=>s("react",l)},[f("span",null,d(i(o)("discussion.reactionCount",{emoji:l,count:e.summary.counts[l]??0})),1),e.summary.mine===l?(m(),h("span",em,d(i(o)("discussion.reactionMine")),1)):M("",!0)],8,Qp)):(m(),h("span",tm,d(i(o)("discussion.reactionCount",{emoji:l,count:e.summary.counts[l]??0})),1))],64))),128))],8,Xp)):M("",!0)}}),Ka=Symbol("bcm-discussion");function nm(e){Hi(Ka,e)}function sm(){const e=vo(Ka,null);if(!e)throw new Error("[blogmcp-community] a discussion component rendered outside <blogmcp-discussion>");return e}const om=["id"],im=["aria-busy"],rm={class:"bcm-msg-main"},am={class:"bcm-meta"},lm={class:"bcm-author"},cm={key:0,class:"bcm-badge bcm-badge-team"},um={key:1,class:"bcm-handle"},dm=["datetime"],fm={key:3,class:"bcm-muted"},pm={key:4,class:"bcm-muted",role:"status"},mm={key:0,class:"bcm-placeholder"},hm={key:1,class:"bcm-muted"},bm={key:0,class:"bcm-own-state bcm-own-consent"},gm={class:"bcm-badge"},ym={class:"bcm-hint"},vm={key:1,class:"bcm-own-state"},_m={class:"bcm-badge"},km={class:"bcm-hint"},wm=["href"],xm={key:3,class:"bcm-text"},Im={key:4,class:"bcm-hint"},Sm=["href"],$m={key:3,class:"bcm-actions"},Cm={key:0,class:"bcm-replies"},Tm={key:2,class:"bcm-hint"},Am=3,Om=Ce({name:"MessageItem",__name:"MessageItem",props:{message:{}},setup(e){const t=e,{t:n,lang:s}=jt(),{ctl:o,routes:r,opened:a,originals:c,allReplies:l,deleteMessage:p}=sm(),u=H(()=>t.message),v=H(()=>u.value.replyToSeq!==null),x=H(()=>o.isOwn(u.value)),_=H(()=>u.value.body===null),$=H(()=>x.value&&u.value.state==="held"&&u.value.hiddenUntilConsent===!0),T=H(()=>o.state.me?.acceptances.art9Refused===!0),K=H(()=>$.value&&!o.onboarding.value&&o.state.refusedAge===null&&(o.mode()==="onboarding"&&o.needs().art9||T.value)),j=H(()=>{const te=u.value.author;return te.kind==="system"?n("author.system"):te.kind==="staff"?te.displayName:te.displayName??n("author.deleted")}),I=H(()=>u.value.author.kind==="member"?u.value.author.handle:null),k=H(()=>{const te=u.value.author;if(te.kind!=="staff")return null;const Q=`author.badge.${te.badge}`;return Fs(Q)?n(Q):null}),O=H(()=>u.value.state==="held"?"discussion.placeholderHeld":u.value.state==="removed"?"discussion.placeholderRemoved":"discussion.placeholderDeleted"),E=H(()=>u.value.pending?void 0:zo(u.value.seq)??void 0),A=H(()=>u.value.collapsed&&!a.has(u.value.seq)),b=H(()=>c.has(u.value.seq)),C=H(()=>(u.value.isTranslated&&!b.value?u.value.displayBody:u.value.body)??u.value.displayBody),z=H(()=>(x.value?u.value.notes??[]:[]).map(te=>gf(te)).filter(te=>te!==null)),D=H(()=>x.value?[...new Set((u.value.warnings??[]).map(te=>hf(te)))]:[]),J=H(()=>o.state.inline?.kind==="edit"&&o.state.inline.seq===u.value.seq),se=H(()=>!v.value&&o.state.inline?.kind==="reply"&&o.state.inline.seq===u.value.seq),oe=H(()=>l.has(u.value.seq)?u.value.replies:u.value.replies.slice(0,Am)),ae=H(()=>u.value.replies.length-oe.value.length),ve=H(()=>({conversationId:u.value.conversationId,seq:u.value.seq})),de=H(()=>o.needs().signIn?null:r.value.profilePath),U=H(()=>{const te=[],Q=u.value;if(o.canEdit(Q)&&te.push({id:"edit",label:n("discussion.edit")}),o.canDelete(Q)&&te.push({id:"delete",label:n("discussion.delete"),danger:!0}),o.canReport(Q))te.push({id:"report",label:n("discussion.report")});else if(o.canReportAsNotifier(Q)){const ot=Sf(r.value.reportPath,ve.value);ot&&te.push({id:"report",label:n("discussion.report"),href:ot})}return o.canBlock(Q)&&te.push({id:Q.collapsed?"unblock":"block",label:Q.collapsed?n("discussion.unblock"):n("discussion.block")}),te});function R(te){const Q=u.value;te==="edit"?o.openEdit(Q.seq):te==="delete"?p(Q.seq):te==="report"?o.openReport(Q):(te==="block"||te==="unblock")&&Q.author.kind==="member"&&Q.author.memberId&&o.setBlocked(Q.author.memberId,te==="block")}function P(){o.openReply(u.value.seq,v.value?j.value:null)}function Se(te){te.has(u.value.seq)?te.delete(u.value.seq):te.add(u.value.seq)}return(te,Q)=>{const ot=kc("MessageItem",!0);return m(),h("li",{id:E.value,class:"bcm-msg-item"},[f("article",{class:at(["bcm-msg",{"bcm-msg-pending":!!u.value.pending}]),"aria-busy":!!u.value.pending},[Ee(Yo,{author:u.value.author},null,8,["author"]),f("div",rm,[f("header",am,[f("span",lm,d(j.value),1),k.value?(m(),h("span",cm,d(k.value),1)):M("",!0),I.value?(m(),h("span",um,d(I.value),1)):M("",!0),u.value.createdAt?(m(),h("time",{key:2,class:"bcm-time",datetime:u.value.createdAt},d(i(ze)(i(s),u.value.createdAt)),9,dm)):M("",!0),u.value.isEdited&&!_.value?(m(),h("span",fm,d(i(n)("discussion.edited")),1)):M("",!0),u.value.pending?(m(),h("span",pm,d(i(n)("discussion.pending")),1)):M("",!0)]),_.value?(m(),h("p",mm,d(i(n)(O.value)),1)):A.value?(m(),h("p",hm,[Ut(d(i(n)("discussion.collapsed"))+" ",1),f("button",{type:"button",class:"bcm-link",onClick:Q[0]||(Q[0]=ee=>Se(i(a)))},d(i(n)("discussion.show")),1)])):(m(),h(G,{key:2},[$.value?(m(),h("div",bm,[f("span",gm,d(i(n)("state.hiddenUntilConsent")),1),f("p",ym,d(i(n)("discussion.hiddenUntilConsentNote")),1),K.value?(m(),h("button",{key:0,type:"button",class:"bcm-link",onClick:Q[1]||(Q[1]=ee=>i(o).beginOnboarding(T.value?{offerArt9:!0}:{}))},d(i(n)("discussion.giveConsent")),1)):M("",!0)])):x.value&&(u.value.state==="held"||u.value.state==="removed")?(m(),h("div",vm,[f("span",_m,d(u.value.state==="held"?i(n)("state.held"):i(n)("state.removed")),1),f("p",km,d(u.value.state==="held"?i(n)("discussion.heldNote"):i(n)("discussion.removedNote")),1),u.value.state==="removed"?(m(),h("a",{key:0,href:i(r).myCommunityPath},d(i(n)("discussion.why")),9,wm)):M("",!0)])):M("",!0),J.value&&i(o).state.inline?(m(),je(Wo,{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:Q[2]||(Q[2]=ee=>i(o).submitInline()),onCancel:Q[3]||(Q[3]=ee=>i(o).closeInline()),onConfirm:Q[4]||(Q[4]=(ee,ce)=>i(o).state.inline&&i(o).setConfirmed(i(o).state.inline,ee,ce)),onConfirmed:Q[5]||(Q[5]=ee=>i(o).state.inline&&i(o).sendConfirmed(i(o).state.inline))},null,8,["draft","wait","rules-href","mentions-max"])):(m(),h("p",xm,[Ee(Va,{text:C.value,"profile-path":de.value},null,8,["text","profile-path"])])),u.value.isTranslated&&!J.value?(m(),h("p",Im,[Ut(d(i(n)("discussion.translated"))+" ",1),f("button",{type:"button",class:"bcm-link",onClick:Q[6]||(Q[6]=ee=>Se(i(c)))},d(b.value?i(n)("discussion.showTranslation"):i(n)("discussion.showOriginal")),1)])):M("",!0),u.value.collapsed?(m(),h("button",{key:5,type:"button",class:"bcm-link",onClick:Q[7]||(Q[7]=ee=>Se(i(a)))},d(i(n)("discussion.hide")),1)):M("",!0),(m(!0),h(G,null,ke(z.value,ee=>(m(),h("p",{key:ee,class:"bcm-note"},[ee==="note.report_to_manufacturer"&&i(r).consultationPath?(m(),h("a",{key:0,href:i(r).consultationPath},d(i(n)(ee)),9,Sm)):(m(),h(G,{key:1},[Ut(d(i(n)(ee)),1)],64))]))),128)),(m(!0),h(G,null,ke(D.value,ee=>(m(),h("p",{key:ee,class:"bcm-warning"},d(i(n)(ee)),1))),128))],64)),!_.value&&!A.value&&!J.value?(m(),h("div",$m,[Ee(Wa,{"reaction-set":i(o).state.thread.reactionSet,summary:u.value.reactions,interactive:i(o).canReact()&&!u.value.pending&&u.value.seq>0&&u.value.state==="visible",busy:!!i(o).state.busy[`react:${u.value.seq}`],onReact:Q[8]||(Q[8]=ee=>i(o).react(ve.value,ee))},null,8,["reaction-set","summary","interactive","busy"]),i(o).canReply(u.value)?(m(),h("button",{key:0,type:"button",class:"bcm-quiet",onClick:P},d(i(n)("discussion.reply")),1)):M("",!0),Ee(Jp,{items:U.value,onSelect:R},null,8,["items"])])):M("",!0),v.value?M("",!0):(m(),h(G,{key:4},[u.value.replies.length?(m(),h("ol",Cm,[(m(!0),h(G,null,ke(oe.value,ee=>(m(),je(ot,{key:ee.id,message:ee},null,8,["message"]))),128))])):M("",!0),ae.value>0?(m(),h("button",{key:1,type:"button",class:"bcm-link",onClick:Q[9]||(Q[9]=ee=>i(l).add(u.value.seq))},d(i(n)("discussion.showReplies",{count:ae.value})),1)):M("",!0),u.value.repliesTruncated?(m(),h("p",Tm,d(i(n)("discussion.repliesTruncated")),1)):M("",!0),se.value&&i(o).state.inline?(m(),je(Wo,{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:Q[10]||(Q[10]=ee=>i(o).submitInline()),onCancel:Q[11]||(Q[11]=ee=>i(o).closeInline()),onConfirm:Q[12]||(Q[12]=(ee,ce)=>i(o).state.inline&&i(o).setConfirmed(i(o).state.inline,ee,ce)),onConfirmed:Q[13]||(Q[13]=ee=>i(o).state.inline&&i(o).sendConfirmed(i(o).state.inline))},null,8,["draft","wait","rules-href","mentions-max","replying-to"])):M("",!0)],64))])],10,im)],8,om)}}}),Em=["aria-labelledby"],Mm=["id"],Rm={key:0,class:"bcm-muted",role:"status"},Nm={class:"bcm-error",role:"alert"},Pm={class:"bcm-row"},jm={role:"alert"},zm={class:"bcm-row"},Lm={key:0,class:"bcm-hint"},Dm={key:1,class:"bcm-choices"},Um=["name","value"],Fm={class:"bcm-hint bcm-full"},qm={key:2,class:"bcm-section"},Bm={key:0,class:"bcm-rules"},Hm={key:0,class:"bcm-hint"},Vm=["href"],Wm={class:"bcm-check"},Km={key:3,class:"bcm-section"},Ym=["aria-label"],Gm={key:0,class:"bcm-fieldset"},Zm={class:"bcm-sr"},Jm=["onUpdate:modelValue"],Xm={key:1,class:"bcm-check"},Qm={key:4,class:"bcm-section"},eh={class:"bcm-field"},th=["for"],nh=["id","maxlength","aria-invalid","aria-describedby"],sh=["id"],oh={class:"bcm-field"},ih=["for"],rh=["id","maxlength","placeholder","aria-invalid","aria-describedby"],ah=["id"],lh={key:0,class:"bcm-hint"},ch={class:"bcm-choices"},uh={class:"bcm-choice"},dh=["name"],fh=["name","value"],ph={key:5,class:"bcm-error",role:"alert"},mh={class:"bcm-row"},hh=["disabled"],bh=["disabled"],gh=["disabled"],Ya=Ce({__name:"OnboardingSteps",props:{model:{},rulesHref:{}},emits:["cancel"],setup(e,{emit:t}){const n=e,s=t,{t:o,lang:r}=jt(),a=n.model.state,c=Ke("bcm-onboarding"),l=he(null),p=H(()=>n.model.step()),u=H(()=>a.steps.includes("profile")),v=H(()=>{const _=a.failure;if(!_)return"";const $=dp(_,r.value);return o($.key,$.params)}),x=_=>`onboarding.age.${_}`;return Fe(()=>[a.index,a.phase,a.steps.join()],([_,$,T],[K,,j])=>{(_!==K||T!==j||$==="refused"||$==="failed")&&Ue(()=>l.value?.focus())}),bt(()=>{Ue(()=>l.value?.focus())}),(_,$)=>(m(),h("section",{class:"bcm-card","aria-labelledby":`${i(c)}-title`},[f("h3",{id:`${i(c)}-title`,ref_key:"heading",ref:l,tabindex:"-1"},d(i(o)("onboarding.title")),9,Mm),i(a).phase==="loading"?(m(),h("p",Rm,d(i(o)("common.loading")),1)):i(a).phase==="failed"?(m(),h(G,{key:1},[f("p",Nm,d(v.value),1),f("div",Pm,[f("button",{type:"button",class:"bcm-btn",onClick:$[0]||($[0]=T=>s("cancel"))},d(i(o)("common.cancel")),1),f("button",{type:"button",class:"bcm-btn bcm-primary",onClick:$[1]||($[1]=T=>e.model.load())},d(i(o)("common.retry")),1)])],64)):i(a).phase==="refused"?(m(),h(G,{key:2},[f("p",jm,d(i(o)("onboarding.ageBelow",{min:i(a).minAge??18})),1),f("div",zm,[f("button",{type:"button",class:"bcm-btn",onClick:$[2]||($[2]=T=>s("cancel"))},d(i(o)("common.close")),1)])],64)):(m(),h("form",{key:3,class:"bcm-form",novalidate:"",onSubmit:$[13]||($[13]=Bt(T=>e.model.next(),["prevent"]))},[i(a).index===0&&u.value?(m(),h("p",Lm,d(i(o)("onboarding.lede")),1)):M("",!0),p.value==="age"?(m(),h("fieldset",Dm,[f("legend",null,d(i(o)("onboarding.ageTitle")),1),(m(!0),h(G,null,ke(i(ld),T=>(m(),h("label",{key:T,class:"bcm-choice"},[xe(f("input",{"onUpdate:modelValue":$[3]||($[3]=K=>i(a).ageBand=K),type:"radio",name:`${i(c)}-age`,value:T},null,8,Um),[[wn,i(a).ageBand]]),f("span",null,d(i(o)(x(T))),1)]))),128)),f("p",Fm,d(i(o)("onboarding.ageHint")),1)])):p.value==="rules"?(m(),h("div",qm,[f("h4",null,d(i(o)("onboarding.rulesTitle")),1),f("p",null,d(i(a).reconsent?i(o)("onboarding.rulesChanged"):i(o)("onboarding.rulesLede")),1),i(a).rules.length?(m(),h("ol",Bm,[(m(!0),h(G,null,ke(i(a).rules,T=>(m(),h("li",{key:T.id},[f("strong",null,d(T.title),1),T.summary?(m(),h("span",Hm,d(T.summary),1)):M("",!0)]))),128))])):M("",!0),f("p",null,[f("a",{href:e.rulesHref,target:"_blank",rel:"noopener"},d(i(o)("onboarding.rulesLink")),9,Vm)]),f("label",Wm,[xe(f("input",{"onUpdate:modelValue":$[4]||($[4]=T=>i(a).rulesAccepted=T),type:"checkbox"},null,512),[[Ms,i(a).rulesAccepted]]),f("span",null,d(i(o)("onboarding.rulesAccept")),1)])])):p.value==="art9"?(m(),h("div",Km,[f("h4",null,d(i(o)("onboarding.art9Title")),1),f("p",null,d(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")},[(m(!0),h(G,null,ke(i(a).art9Paragraphs,(T,K)=>(m(),h("p",{key:K,class:"bcm-text"},d(T),1))),128))],8,Ym),i(a).art9Controllers.length>1?(m(),h("fieldset",Gm,[f("legend",Zm,d(i(o)("onboarding.art9Title")),1),(m(!0),h(G,null,ke(i(a).art9Controllers,T=>(m(),h("label",{key:T.entity,class:"bcm-check"},[xe(f("input",{"onUpdate:modelValue":K=>T.accepted=K,type:"checkbox",required:""},null,8,Jm),[[Ms,T.accepted]]),f("span",null,d(i(o)("onboarding.art9Controller",{label:T.label})),1)]))),128))])):(m(),h("label",Xm,[xe(f("input",{"onUpdate:modelValue":$[5]||($[5]=T=>i(a).art9Accepted=T),type:"checkbox"},null,512),[[Ms,i(a).art9Accepted]]),f("span",null,d(i(o)("onboarding.art9Accept")),1)]))])):p.value==="profile"?(m(),h("div",Qm,[f("h4",null,d(i(o)("onboarding.profileTitle")),1),f("div",eh,[f("label",{for:`${i(c)}-name`},d(i(o)("onboarding.displayName")),9,th),xe(f("input",{id:`${i(c)}-name`,"onUpdate:modelValue":$[6]||($[6]=T=>i(a).displayName=T),class:"bcm-input",autocomplete:"nickname",maxlength:i(Hr)*2,"aria-invalid":e.model.hasFieldError("displayName"),"aria-describedby":`${i(c)}-name-hint`},null,8,nh),[[dt,i(a).displayName]]),f("p",{id:`${i(c)}-name-hint`,class:"bcm-hint"},d(i(o)("onboarding.displayNameHint")),9,sh)]),f("div",oh,[f("label",{for:`${i(c)}-handle`},d(i(o)("onboarding.handle")),9,ih),xe(f("input",{id:`${i(c)}-handle`,"onUpdate:modelValue":$[7]||($[7]=T=>i(a).handle=T),class:"bcm-input",autocomplete:"username",autocapitalize:"none",spellcheck:"false",maxlength:i(Ks),placeholder:e.model.suggestedHandle()??"","aria-invalid":e.model.hasFieldError("handle"),"aria-describedby":`${i(c)}-handle-hint`},null,8,rh),[[dt,i(a).handle]]),f("p",{id:`${i(c)}-handle-hint`,class:"bcm-hint"},d(i(o)("onboarding.handleHint",{min:i(Da),max:i(Ks),days:i(Vr)})),9,ah),e.model.suggestedHandle()?(m(),h("p",lh,d(i(o)("onboarding.handleSuggested",{handle:e.model.suggestedHandle()??""})),1)):M("",!0)]),f("fieldset",ch,[f("legend",null,d(i(o)("onboarding.avatar")),1),f("label",uh,[xe(f("input",{"onUpdate:modelValue":$[8]||($[8]=T=>i(a).avatarPreset=T),type:"radio",name:`${i(c)}-avatar`,value:null},null,8,dh),[[wn,i(a).avatarPreset]]),f("span",null,d(i(o)("onboarding.avatarNone")),1)]),(m(!0),h(G,null,ke(i(Ko),T=>(m(),h("label",{key:T.id,class:"bcm-choice"},[xe(f("input",{"onUpdate:modelValue":$[9]||($[9]=K=>i(a).avatarPreset=K),type:"radio",name:`${i(c)}-avatar`,value:T.id},null,8,fh),[[wn,i(a).avatarPreset]]),f("span",null,d(T.emoji),1)]))),128))])])):M("",!0),v.value?(m(),h("p",ph,d(v.value),1)):M("",!0),f("div",mh,[i(a).index>0?(m(),h("button",{key:0,type:"button",class:"bcm-btn",disabled:i(a).phase==="sending",onClick:$[10]||($[10]=T=>e.model.back())},d(i(o)("onboarding.back")),9,hh)):M("",!0),f("button",{type:"button",class:"bcm-btn",disabled:i(a).phase==="sending",onClick:$[11]||($[11]=T=>s("cancel"))},d(i(o)("common.cancel")),9,bh),$[14]||($[14]=f("span",{class:"bcm-spacer"},null,-1)),e.model.canRefuse()?(m(),h("button",{key:1,type:"button",class:"bcm-btn",onClick:$[12]||($[12]=T=>e.model.refuse())},d(i(o)("onboarding.art9Refuse")),1)):M("",!0),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!e.model.canContinue()},d(i(a).phase==="sending"?i(o)("composer.sending"):e.model.isLast()?i(o)("onboarding.submit"):i(o)("onboarding.continue")),9,gh)])],32))],8,Em))}}),yh=["aria-labelledby"],vh=["id"],_h={class:"bcm-hint"},kh={key:0},wh=["href"],xh={class:"bcm-choices"},Ih=["name","value"],Sh={key:1,class:"bcm-field"},$h=["for"],Ch={key:0,class:"bcm-error"},Th={key:1,class:"bcm-muted",role:"status"},Ah=["id"],Oh=["value"],Eh={class:"bcm-field"},Mh=["for"],Rh=["id","aria-describedby","aria-invalid"],Nh=["id"],Ph={key:2,class:"bcm-error",role:"alert"},jh={class:"bcm-row"},zh=["disabled"],Lh=["disabled"],Dh={role:"status"},Uh=["href"],Fh={class:"bcm-row"},qh=Ce({__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}=jt(),a=he(null),c=Ke("bcm-report");Ea(a,()=>s("close"),n.fallbackFocus);const l=x=>`category.${x}`,p=H(()=>kt(st(n.report.note))),u=H(()=>!n.report.sending&&n.report.category!==""&&(n.report.category!=="rules"||n.report.ruleId!=="")&&p.value<=Rs),v=H(()=>{const x=n.report.failure;if(!x)return"";const _=Te(x,r.value);return o(_.key,_.params)});return(x,_)=>(m(),h("dialog",{ref_key:"dialog",ref:a,class:"bcm-dialog","aria-labelledby":`${i(c)}-title`},[f("form",{class:"bcm-dialog-body",novalidate:"",onSubmit:_[5]||(_[5]=Bt($=>u.value&&s("submit"),["prevent"]))},[f("h3",{id:`${i(c)}-title`},d(i(o)("report.title")),9,vh),e.report.done?(m(),h(G,{key:1},[f("p",Dh,d(i(o)("report.done")),1),f("p",null,[f("a",{href:e.myCommunityHref},d(i(o)("panel.title")),9,Uh)]),f("div",Fh,[_[8]||(_[8]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn bcm-primary",onClick:_[4]||(_[4]=$=>s("close"))},d(i(o)("common.close")),1)])],64)):(m(),h(G,{key:0},[f("p",_h,d(i(o)("report.lede")),1),e.rulesHref?(m(),h("p",kh,[f("a",{href:e.rulesHref,target:"_blank",rel:"noopener"},d(i(o)("onboarding.rulesTitle")),9,wh)])):M("",!0),f("fieldset",xh,[f("legend",null,d(i(o)("report.category")),1),(m(!0),h(G,null,ke(i(Gr),$=>(m(),h("label",{key:$,class:"bcm-choice"},[xe(f("input",{"onUpdate:modelValue":_[0]||(_[0]=T=>e.report.category=T),type:"radio",name:`${i(c)}-category`,value:$},null,8,Ih),[[wn,e.report.category]]),f("span",null,d(i(o)(l($))),1)]))),128))]),e.report.category==="rules"?(m(),h("div",Sh,[f("label",{for:`${i(c)}-rule`},d(i(o)("report.rule")),9,$h),e.report.rulesFailed?(m(),h("p",Ch,d(i(o)("error.unavailable")),1)):e.report.rules===null?(m(),h("p",Th,d(i(o)("common.loading")),1)):xe((m(),h("select",{key:2,id:`${i(c)}-rule`,"onUpdate:modelValue":_[1]||(_[1]=$=>e.report.ruleId=$),class:"bcm-input",required:""},[_[6]||(_[6]=f("option",{value:"",disabled:""},null,-1)),(m(!0),h(G,null,ke(e.report.rules,$=>(m(),h("option",{key:$.id,value:$.id},d($.title),9,Oh))),128))],8,Ah)),[[Er,e.report.ruleId]])])):M("",!0),f("div",Eh,[f("label",{for:`${i(c)}-note`},d(i(o)("report.note")),9,Mh),xe(f("textarea",{id:`${i(c)}-note`,"onUpdate:modelValue":_[2]||(_[2]=$=>e.report.note=$),class:"bcm-input bcm-textarea",rows:"3","aria-describedby":`${i(c)}-note-hint`,"aria-invalid":p.value>i(Rs)},null,8,Rh),[[dt,e.report.note]]),f("p",{id:`${i(c)}-note-hint`,class:"bcm-hint"},d(i(o)("report.noteHint"))+" "+d(i(o)("report.counter",{length:p.value,max:i(Rs)})),9,Nh)]),v.value?(m(),h("p",Ph,d(v.value),1)):M("",!0),f("div",jh,[_[7]||(_[7]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn",disabled:e.report.sending,onClick:_[3]||(_[3]=$=>s("close"))},d(i(o)("report.cancel")),9,zh),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!u.value},d(e.report.sending?i(o)("report.sending"):i(o)("report.submit")),9,Lh)])],64))],32)],8,yh))}}),Bh=["lang","aria-labelledby"],Hh={class:"bcm-head"},Vh=["id"],Wh={key:0,class:"bcm-count"},Kh={key:0,class:"bcm-muted",role:"status"},Yh={key:1,class:"bcm-banner",role:"alert"},Gh={key:0,class:"bcm-banner",role:"status"},Zh=["disabled"],Jh={key:1,class:"bcm-hint",role:"status"},Xh={key:2,class:"bcm-muted"},Qh={key:3,class:"bcm-thread"},eb={key:4,class:"bcm-row"},tb=["disabled"],nb={class:"bcm-section"},sb={key:0,class:"bcm-hint"},ob={key:2,class:"bcm-row"},ib=["href"],rb={key:1,class:"bcm-row"},ab={key:4,class:"bcm-note"},lb={key:5,class:"bcm-section"},cb=["href"],ub={key:6,class:"bcm-note"},db={key:7,class:"bcm-note",role:"status"},fb={key:8,class:"bcm-note"},pb=["href"],mb={class:"bcm-sr","aria-live":"polite"},Ga=new WeakMap,hb=Ce({inheritAttrs:!1,__name:"DiscussionView",props:{articleId:{},apiBase:{},siteBase:{},lang:{},signInHref:{},routes:{},pollMs:{},transport:{type:Function},realtime:{type:Function}},setup(e){const t=e,n=Es(),s=he(_t(t.lang,Pt())),{t:o,text:r}=Yt(s);Fe(()=>t.lang,U=>{s.value=_t(U,Pt())});const a=Ke("bcm-discussion"),c=he(null),l=he(0),p=ys(null),u=H(()=>Wt(t.siteBase));function v(){const U=t.articleId?.trim();if(!U)return Vt("article-id","[blogmcp-community] <blogmcp-discussion> needs an article-id"),null;if(u.value===null)return null;const R=Kt(t.apiBase,t.transport,u.value);return R?mp({client:R,articleId:U,lang:s.value,pollMs:t.pollMs,realtime:typeof t.realtime=="function"?t.realtime:null,refusedAge:(n&&Ga.get(n))??null,onAgeRefused:P=>{n&&Ga.set(n,P)},onPosted:P=>n?.dispatchEvent(new CustomEvent("bcm-posted",{detail:{state:P},bubbles:!0,composed:!0}))}):null}const x=He(new Set),_=He(new Set),$=He(new Set),T=he(null),K=H(()=>An(t.routes)),j=H(()=>On(K.value,p.value?.state.me?.links,u.value??""));nm({get ctl(){return p.value},routes:j,opened:x,originals:_,allReplies:$,focusHeading:()=>c.value,deleteMessage:U=>{T.value=U}});let I=null;const k=he(null);let O=!1;async function E(){if(O||typeof location>"u")return;O=!0;const U=Jd(location.hash),R=U===null?null:zo(U);if(U===null||R===null)return;const P=C.value?.thread.messages.find(te=>te.replies.some(Q=>Q.seq===U));P&&$.add(P.seq),await Ue();const Se=k.value?.querySelector(`#${R}`);typeof Se?.scrollIntoView=="function"&&Se.scrollIntoView({block:"start"})}function A(){O=!1,p.value?.dispose(),x.clear(),_.clear(),$.clear(),T.value=null,p.value=v(),l.value+=1,p.value?.start()}bt(()=>{A(),n&&typeof IntersectionObserver<"u"&&(I=new IntersectionObserver(U=>{const R=U[U.length-1];R&&p.value?.setInView(R.isIntersecting)},{rootMargin:"200px"}),I.observe(n))}),Fe(()=>[t.articleId,t.apiBase,u.value,t.transport,t.realtime,t.pollMs,s.value],()=>A()),ut(()=>{I?.disconnect(),p.value?.dispose(),p.value=null});const b=H(()=>p.value),C=H(()=>p.value?.state??null);Fe(()=>C.value?.phase,U=>{U==="ready"&&E()});const z=H(()=>p.value?.mode()??"pending"),D=he(null);Fe(z,(U,R)=>{U==="write"&&R==="onboarding"&&Ue(()=>D.value?.focus()),U==="ageRefused"&&R==="onboarding"&&Ue(()=>c.value?.focus())});const J=H(()=>{const U=p.value?.needs();return U?.onboarding?"need.onboarding":U?.rules?"need.reconsent_rules":"need.art9_consent"});function se(){return Tn(t.signInHref,typeof location>"u"?null:location.pathname)}function oe(U){const R=U.endsAt?ze(s.value,U.endsAt):"";return U.kind==="ban"?o("sanction.ban"):U.kind==="suspension"?R?o("sanction.suspensionUntil",{date:R}):o("sanction.suspension"):R?o("sanction.restrictionUntil",{date:R}):o("sanction.restriction")}const ae=H(()=>{const U=C.value?.failure;if(!U)return"";const R=Te(U,s.value);return o(R.key,R.params)}),ve=he("");Fe(()=>C.value?.announceId,()=>{ve.value="";const U=r(C.value?.announcement);Ue(()=>{ve.value=U})});async function de(){const U=T.value;U===null||!p.value||(await p.value.remove(U),T.value=null)}return(U,R)=>b.value&&C.value&&C.value.phase!=="hidden"?(m(),h("section",{ref_key:"section",ref:k,key:l.value,class:"bcm bcm-discussion",lang:s.value,"aria-labelledby":i(a)},[f("header",Hh,[f("h2",{id:i(a),ref_key:"heading",ref:c,tabindex:"-1"},d(i(o)("discussion.title")),9,Vh),C.value.phase==="ready"?(m(),h("span",Wh,d(i(o)("discussion.count",{count:C.value.thread.count})),1)):M("",!0)]),C.value.phase==="loading"?(m(),h("p",Kh,d(i(o)("discussion.loading")),1)):C.value.phase==="failed"?(m(),h("div",Yh,[f("span",null,d(ae.value),1),f("button",{type:"button",class:"bcm-btn",onClick:R[0]||(R[0]=P=>b.value.refresh())},d(i(o)("common.retry")),1)])):(m(),h(G,{key:2},[Ee(Wa,{"reaction-set":C.value.thread.reactionSet,summary:C.value.thread.articleReactions,interactive:b.value.canReact(),busy:!!C.value.busy["react:article"],onReact:R[1]||(R[1]=P=>b.value&&b.value.react({articleId:C.value.thread.articleId??e.articleId??""},P))},null,8,["reaction-set","summary","interactive","busy"]),C.value.newMessages?(m(),h("div",Gh,[f("span",null,d(i(o)("discussion.newMessages")),1),f("button",{type:"button",class:"bcm-btn",disabled:C.value.refreshing,onClick:R[2]||(R[2]=P=>b.value.refresh())},d(i(o)("discussion.refresh")),9,Zh)])):M("",!0),C.value.realtimeOff?(m(),h("p",Jh,d(i(o)("realtime.off")),1)):M("",!0),C.value.thread.messages.length===0?(m(),h("p",Xh,d(i(o)("discussion.empty")),1)):(m(),h("ol",Qh,[(m(!0),h(G,null,ke(C.value.thread.messages,P=>(m(),je(Om,{key:P.id,message:P},null,8,["message"]))),128))])),C.value.thread.nextCursor!==null?(m(),h("div",eb,[f("button",{type:"button",class:"bcm-btn",disabled:C.value.loadingMore,onClick:R[3]||(R[3]=P=>b.value.loadMore())},d(i(o)("discussion.loadMore")),9,tb)])):M("",!0),f("div",nb,[z.value==="write"&&C.value.art9RefusedNote?(m(),h("p",sb,d(i(o)("onboarding.art9RefusedDone")),1)):M("",!0),z.value==="write"?(m(),je(Wo,{key:1,ref_key:"composer",ref:D,kind:"new",draft:C.value.composer,wait:b.value.waitLeft(C.value.composer),"rules-href":j.value.rulesPath,"mentions-max":b.value.mentionCap(),onSubmit:R[4]||(R[4]=P=>b.value.submit()),onConfirm:R[5]||(R[5]=(P,Se)=>b.value&&b.value.setConfirmed(C.value.composer,P,Se)),onConfirmed:R[6]||(R[6]=P=>b.value.sendConfirmed(C.value.composer))},null,8,["draft","wait","rules-href","mentions-max"])):z.value==="signIn"?(m(),h("div",ob,[f("p",null,d(i(o)("discussion.signInPrompt")),1),se()?(m(),h("a",{key:0,class:"bcm-btn bcm-primary",href:se()??void 0},d(i(o)("common.signIn")),9,ib)):M("",!0)])):z.value==="onboarding"?(m(),h(G,{key:3},[b.value.onboarding.value?(m(),je(Ya,{key:0,model:b.value.onboarding.value,"rules-href":j.value.rulesPath,onCancel:R[7]||(R[7]=P=>b.value.cancelOnboarding())},null,8,["model","rules-href"])):(m(),h("div",rb,[f("p",null,d(i(o)(J.value)),1),f("button",{type:"button",class:"bcm-btn bcm-primary",onClick:R[8]||(R[8]=P=>b.value.beginOnboarding())},d(i(o)("onboarding.continue")),1)]))],64)):z.value==="ageRefused"?(m(),h("p",ab,d(i(o)("onboarding.ageBelow",{min:C.value.refusedAge??18})),1)):z.value==="sanction"?(m(),h("div",lb,[(m(!0),h(G,null,ke(C.value.thread.viewer.restrictions,P=>(m(),h("p",{key:P.decisionId,class:"bcm-note"},[Ut(d(oe(P))+" ",1),i(Ds)(j.value.statementPath,P.decisionId)?(m(),h("a",{key:0,href:i(Ds)(j.value.statementPath,P.decisionId)??void 0},d(i(o)("sanction.statement")),9,cb)):M("",!0)]))),128))])):z.value==="notMoved"?(m(),h("p",ub,d(i(o)("error.notMoved")),1)):z.value==="braked"?(m(),h("p",db,d(i(o)("state.braked")),1)):z.value==="restricted"?(m(),h("p",fb,[Ut(d(i(o)("error.restricted"))+" ",1),f("a",{href:j.value.myCommunityPath},d(i(o)("panel.title")),9,pb)])):M("",!0)])],64)),f("p",mb,d(ve.value),1),C.value.report?(m(),je(qh,{key:3,report:C.value.report,"my-community-href":j.value.myCommunityPath,"rules-href":j.value.rulesPath,"fallback-focus":()=>c.value,onSubmit:R[9]||(R[9]=P=>b.value.submitReport()),onClose:R[10]||(R[10]=P=>b.value.closeReport())},null,8,["report","my-community-href","rules-href","fallback-focus"])):M("",!0),T.value!==null?(m(),je(Vo,{key:4,title:"discussion.deleteTitle",explain:"discussion.deleteExplain",confirm:"discussion.deleteConfirm",danger:"",busy:!!C.value.busy[`delete:${T.value}`],"fallback-focus":()=>c.value,onConfirm:R[11]||(R[11]=P=>de()),onCancel:R[12]||(R[12]=P=>T.value=null)},null,8,["busy","fallback-focus"])):M("",!0)],8,Bh)):M("",!0)}}),Go=new WeakMap;function bb(e){if(typeof location<"u"&&location.hash.startsWith("#u=")){const t=va(location.hash);return rf(),af(),e&&Go.set(e,t),t}return e&&Go.has(e)?Go.get(e)??null:null}const ts=()=>typeof navigator>"u"?null:navigator;function Zo(){const e=globalThis;return e.Notification&&typeof e.Notification.requestPermission=="function"?e.Notification:null}function Za(e=ts()){if(!e)return!1;const t=e.userAgent??"";return/iPhone|iPad|iPod/.test(t)||e.platform==="MacIntel"&&(e.maxTouchPoints??0)>1}function gb(e=ts()){if(!e)return"other";if(Za(e))return"ios";const t=e.userAgent??"";return/Android/.test(t)?"android":/Mobi|Tablet/.test(t)||t===""?"other":"desktop"}function yb(){const e=ts();if(!e)return"unsupported";if(Ed(e.userAgent??""))return"inApp";if(Za(e)&&e.standalone!==!0)return"iosInstall";const t=globalThis;return!e.serviceWorker||typeof e.serviceWorker.register!="function"||typeof t.PushManager>"u"||!Zo()?"unsupported":"supported"}function Ja(){return Zo()?.permission??"default"}async function vb(){const e=Zo();if(!e)return"denied";if(e.permission!=="default")return e.permission;try{return await e.requestPermission()}catch{return"denied"}}async function Xa(){const e=ts()?.serviceWorker;if(!e||typeof e.getRegistration!="function")return null;try{return await e.getRegistration()??null}catch{return null}}async function _b(e){const t=ts()?.serviceWorker;if(!t)throw new Error("[blogmcp-community] no service worker support");return t.register(e)}async function Jo(e){if(!e?.pushManager||typeof e.pushManager.getSubscription!="function")return null;try{return await e.pushManager.getSubscription()??null}catch{return null}}function kb(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 Qa(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 Xo="blogmcp-community:push-key-id";function wb(){try{const e=typeof localStorage>"u"?null:localStorage.getItem(Xo);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 el(e){try{if(typeof localStorage>"u")return;e===null?localStorage.removeItem(Xo):localStorage.setItem(Xo,JSON.stringify({memberId:e.memberId,keyId:e.keyId}))}catch{}}const xb=["notifyReply","notifyMention","notifyTopic","pushEnabled","digestEmail","quietHours"];function Ib(e){const{client:t,swPath:n}=e,s=e.digestToken,o=new AbortController,r={signal:o.signal};let a=!1,c=null,l=[];const p=He({phase:"idle",failure:null,module:null,settings:null,saving:{},push:{support:yb(),status:"checking",note:null,failure:null},digest:{offered:s!==null,sending:!1,outcome:null,failure:null},announcement:null,announceId:0}),u=A=>{p.announcement=A,p.announceId+=1},v=A=>({key:`error.${A.code}`}),x=()=>{const A=p.module?.state;return A===void 0||Ns(A)&&A!=="dark"},_=()=>p.phase==="ready"&&c!==null&&p.module?.features.push===!0;async function $(){const A=await t.me.get(r);return A.ok?(p.module=A.value.module??null,A.value.needs.includes("sign_in")?"signIn":(c=A.value.member?.memberId??null,c===null?"reader":"member")):A.code==="signIn"?"signIn":A}async function T(A){const b=Qa(A)?.endpoint;if(!b||c===null)return!1;const C=await t.me.push.status({endpoint:b},r);return C.ok&&C.value.subscribed===!0}async function K(){if(!_()||p.push.support!=="supported"){p.push.status="off";return}const A=await Jo(await Xa());if(a)return;const b=await t.me.notifications.list({unreadOnly:!0,codes:["module_push_reset"]},r);if(a)return;l=b.ok?b.value.items.filter(ae=>ae.code==="module_push_reset"&&ae.readAt===null).map(ae=>ae.id):[];const C=wb(),z=A!==null&&C!==null&&C.memberId===c;let D=!1,J=!1;if(z){const ae=await t.me.push.vapid(r);if(a)return;D=ae.ok&&ae.value.keyId!==C.keyId,J=ae.ok&&!D}const se=Ja();let oe=z&&J&&se==="granted";oe&&A&&(oe=await T(A),a)||(p.push.status=oe?"on":"off",p.push.note=D||l.length>0?"reset":se==="denied"?"denied":null)}async function j(){p.phase="loading",p.failure=null;const A=await $();if(a)return;if(A==="signIn"){p.phase="signIn";return}if(A!=="member"&&A!=="reader"){p.phase="failed",p.failure=A;return}if(!x()){p.phase="failed",p.failure={ok:!1,code:"unavailable"};return}const b=await t.me.settings.get(r);if(!a){if(!b.ok){p.phase=b.code==="signIn"?"signIn":"failed",p.failure=b;return}p.settings={...b.value.settings},p.phase="ready",await K()}}async function I(A,b){const C=p.settings;if(!C||p.saving[A]||C[A]===b)return;p.saving[A]=!0;const z=C[A];p.settings={...C,[A]:b};const D=await t.me.settings.update({[A]:b},r);if(delete p.saving[A],!a){if(!D.ok)return p.settings&&(p.settings={...p.settings,[A]:z}),u(v(D));if(p.settings={...D.value.settings},u({key:"settings.saved"}),A==="pushEnabled"){const J=await $();if(a||J!=="member"&&J!=="reader")return;await K()}}}async function k(){const A=p.push;if(!_()||A.support!=="supported"||A.status==="busy"||c===null)return;const b=c;A.status="busy",A.failure=null,A.note=null;const C=(z,D=null)=>{A.status="off",A.note=z,A.failure=D};try{if(await vb()!=="granted")return C("denied");if(a)return;const z=await _b(n);if(a)return;const D=await t.me.push.vapid(r);if(a)return;if(!D.ok)return C(D.code==="pushRefused"?"refused":null,D);const J=kb(D.value.publicKey);if(!J)return C(null,{ok:!1,code:"unavailable"});const se=await Jo(z);se&&await se.unsubscribe().catch(()=>!1);const oe=await z.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:J});if(a)return;const ae=Qa(oe);if(!ae)return await oe.unsubscribe().catch(()=>!1),C("refused");const ve=await t.me.push.subscribe({...ae,userAgentClass:gb()},r);if(a)return;if(!ve.ok)return await oe.unsubscribe().catch(()=>!1),C(ve.code==="pushRefused"?"refused":null,ve);if(el({memberId:b,keyId:ve.value.keyId}),A.status="on",u({key:"settings.saved"}),l.length>0){const de=l;l=[],t.me.notifications.markRead({ids:de},r)}}catch{a||C(Ja()==="denied"?"denied":"refused")}}async function O(){const A=p.push;if(A.status==="busy")return;A.status="busy",A.failure=null,A.note=null;let b=null;try{const C=await Jo(await Xa());b=C?.endpoint??null,await C?.unsubscribe()}catch{}if(!a){if(b){const C=await t.me.push.unsubscribe({endpoint:b},r);if(a)return;C.ok||(A.failure=C)}el(null),A.status="off",A.failure||u({key:"settings.saved"})}}async function E(){const A=p.digest;if(!s||A.sending||A.outcome==="unsubscribed")return;A.sending=!0,A.failure=null;const b=await t.me.settings.unsubscribeDigest({token:s},r);if(A.sending=!1,!a){if(b.ok){A.outcome="unsubscribed",p.settings&&(p.settings={...p.settings,digestEmail:!1}),u({key:"settings.digest.unsubscribed"});return}if(b.code==="invalid"){A.outcome="staleLink";return}A.failure=b}}return{state:p,load:j,toggle:I,pushShown:_,enablePush:k,disablePush:O,unsubscribeDigest:E,dispose(){a=!0,o.abort()}}}const Sb=["lang","aria-labelledby"],$b=["id"],Cb=["aria-labelledby"],Tb=["id"],Ab={key:0,role:"status"},Ob={key:1,class:"bcm-note",role:"alert"},Eb={key:0,class:"bcm-error",role:"alert"},Mb={class:"bcm-row"},Rb=["disabled"],Nb={key:1,class:"bcm-muted",role:"status"},Pb={key:2,class:"bcm-row"},jb=["href"],zb={key:3,class:"bcm-banner",role:"alert"},Lb={class:"bcm-switches"},Db={class:"bcm-check"},Ub=["name","checked","disabled","onChange"],Fb=["aria-labelledby"],qb=["id"],Bb={class:"bcm-hint"},Hb=["href"],Vb={class:"bcm-url"},Wb={key:1},Kb={key:2},Yb={key:0,class:"bcm-note"},Gb={key:1,class:"bcm-note",role:"alert"},Zb={key:2,class:"bcm-note",role:"alert"},Jb={key:3,class:"bcm-error",role:"alert"},Xb={class:"bcm-row"},Qb=["disabled"],eg={class:"bcm-sr","aria-live":"polite"},tg=Ce({inheritAttrs:!1,__name:"MemberSettingsView",props:{apiBase:{},siteBase:{},lang:{},swPath:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=he(_t(t.lang,Pt())),{t:s,text:o}=Yt(n),r=Ke("bcm-settings"),a=Es(),c=Wt(t.siteBase),l=c===null?null:Kt(t.apiBase,t.transport,c);function p(A){return A===void 0||A===""?`${c??""}/sw.js`:qs(A)?A:(Vt("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 u=bb(a),v=p(t.swPath),x=l&&v?Ib({client:l,swPath:v,digestToken:u}):null,_=x?.state??null;bt(()=>{x?.load()}),ut(()=>x?.dispose());const $=Object.freeze({notifyReply:"settings.notifyReply",notifyMention:"settings.notifyMention",notifyTopic:"settings.notifyTopic",pushEnabled:"settings.pushEnabled",digestEmail:"settings.digestEmail",quietHours:"settings.quietHours"}),T=H(()=>{const A=_?.failure;if(!A)return"";const b=Te(A,n.value);return s(b.key,b.params)}),K=H(()=>{const A=_?.push.failure;if(!A)return"";const b=Te(A,n.value);return s(b.key,b.params)}),j=H(()=>{const A=_?.digest.failure;if(!A)return"";const b=Te(A,n.value);return s(b.key,b.params)}),I=H(()=>typeof location>"u"?"":location.href);function k(){return Tn(t.signInHref,typeof location>"u"?null:location.pathname)}function O(A,b){x?.toggle(A,b.target.checked)}const E=he("");return Fe(()=>_?.announceId,()=>{E.value="";const A=o(_?.announcement);Ue(()=>{E.value=A})}),(A,b)=>i(x)&&i(_)?(m(),h("section",{key:0,class:"bcm bcm-settings",lang:n.value,"aria-labelledby":`${i(r)}-title`},[f("h2",{id:`${i(r)}-title`},d(i(s)("settings.title")),9,$b),i(_).digest.offered?(m(),h("section",{key:0,class:"bcm-card","aria-labelledby":`${i(r)}-digest`},[f("h3",{id:`${i(r)}-digest`},d(i(s)("settings.digestEmail")),9,Tb),i(_).digest.outcome==="unsubscribed"?(m(),h("p",Ab,d(i(s)("settings.digest.unsubscribed")),1)):i(_).digest.outcome==="staleLink"?(m(),h("p",Ob,d(i(s)("settings.digest.staleLink")),1)):(m(),h(G,{key:2},[f("p",null,d(i(s)("settings.digest.prompt")),1),j.value?(m(),h("p",Eb,d(j.value),1)):M("",!0),f("div",Mb,[f("button",{type:"button",class:"bcm-btn bcm-primary",disabled:i(_).digest.sending,onClick:b[0]||(b[0]=C=>i(x).unsubscribeDigest())},d(i(s)("settings.digest.confirm")),9,Rb)])],64))],8,Cb)):M("",!0),i(_).phase==="loading"||i(_).phase==="idle"?(m(),h("p",Nb,d(i(s)("common.loading")),1)):i(_).phase==="signIn"?(m(),h("div",Pb,[f("p",null,d(i(s)("settings.signIn")),1),k()?(m(),h("a",{key:0,class:"bcm-btn bcm-primary",href:k()??void 0},d(i(s)("common.signIn")),9,jb)):M("",!0)])):i(_).phase==="failed"?(m(),h("div",zb,[f("span",null,d(T.value),1),f("button",{type:"button",class:"bcm-btn",onClick:b[1]||(b[1]=C=>i(x).load())},d(i(s)("common.retry")),1)])):i(_).settings?(m(),h(G,{key:4},[f("ul",Lb,[(m(!0),h(G,null,ke(i(xb),C=>(m(),h("li",{key:C},[f("label",Db,[f("input",{type:"checkbox",name:C,checked:i(_).settings[C],disabled:!!i(_).saving[C],onChange:z=>O(C,z)},null,40,Ub),f("span",null,d(i(s)(i($)[C])),1)])]))),128))]),i(x).pushShown()?(m(),h("section",{key:0,class:"bcm-card","aria-labelledby":`${i(r)}-push`},[f("h3",{id:`${i(r)}-push`},d(i(s)("settings.pushEnabled")),9,qb),f("p",Bb,d(i(s)("settings.push.carries")),1),i(_).push.support==="inApp"?(m(),h(G,{key:0},[f("p",null,d(i(s)("settings.push.inAppExplain")),1),f("p",null,[f("a",{href:I.value,target:"_blank",rel:"noopener"},d(i(s)("settings.push.openInBrowser")),9,Hb)]),f("p",Vb,d(I.value),1)],64)):i(_).push.support==="iosInstall"?(m(),h("p",Wb,d(i(s)("settings.push.iosGuide")),1)):i(_).push.support==="unsupported"?(m(),h("p",Kb,d(i(s)("settings.push.unsupported")),1)):(m(),h(G,{key:3},[i(_).push.note==="reset"?(m(),h("p",Yb,d(i(s)("settings.push.reset")),1)):i(_).push.note==="denied"?(m(),h("p",Gb,d(i(s)("settings.push.denied")),1)):i(_).push.note==="refused"?(m(),h("p",Zb,d(i(s)("settings.push.refused")),1)):M("",!0),K.value&&i(_).push.note===null?(m(),h("p",Jb,d(K.value),1)):M("",!0),f("div",Xb,[i(_).push.status==="on"?(m(),h("button",{key:0,type:"button",class:"bcm-btn",onClick:b[2]||(b[2]=C=>i(x).disablePush())},d(i(s)("settings.push.disable")),1)):(m(),h("button",{key:1,type:"button",class:"bcm-btn bcm-primary",disabled:i(_).push.status==="busy"||i(_).push.status==="checking",onClick:b[3]||(b[3]=C=>i(x).enablePush())},d(i(s)("settings.push.enable")),9,Qb))])],64))],8,Fb)):M("",!0)],64)):M("",!0),f("p",eg,d(E.value),1)],8,Sb)):M("",!0)}});function ng(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 sg(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 Qo=()=>({body:"",sending:!1,failure:null});function og(e){const{client:t}=e,n=new AbortController,s={signal:n.signal},o=He({phase:"idle",failure:null,me:null,notifications:[],decisions:[],appeals:[],reports:[],blocks:[],statement:{phase:"idle",value:null,failure:null,appeal:Qo()},notice:{phase:"idle",value:null,failure:null,appeal:Qo()},profile:null,purgeAfter:null,exporting:!1,busy:{},announcement:null,announceId:0});let r=!1;const a=ys(null),c=I=>{o.announcement=I,o.announceId+=1},l=I=>({key:`error.${I.code}`});async function p(){o.phase="loading",o.failure=null;const I=await t.me.get(s);if(r)return;if(!I.ok){if(I.code==="signIn"){o.phase="signIn";return}o.phase="failed",o.failure=I;return}if(o.me=I.value,I.value.needs.includes("sign_in")){o.phase="signIn";return}if(!I.value.member){o.phase="ready";return}const[k,O,E,A,b]=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;k.ok&&(o.notifications=k.value.items.filter(z=>Yr(z.code))),O.ok&&(o.decisions=[...O.value.items]),E.ok&&(o.appeals=[...E.value.items]),A.ok&&(o.reports=[...A.value.items]),b.ok&&(o.blocks=[...b.value.blocks]);const C=[k,O,E,A,b].find(z=>!z.ok);C&&!C.ok&&c(l(C)),o.phase="ready"}let u=null,v=0;async function x(I){const k=++v;I!==u&&(u=I,o.statement.value=null,o.statement.appeal=Qo()),o.statement.phase="loading",o.statement.failure=null;const O=await t.me.decisions.get({decisionId:I},s);if(!(r||k!==v)){if(O.ok){o.statement.value=O.value,o.statement.phase="ready";return}o.statement.failure=O,o.statement.phase=O.code==="signIn"?"signIn":"failed"}}async function _(I){if(I===null){o.notice.phase="missing";return}o.notice.phase="loading",o.notice.failure=null;const k=await t.notices.status({receipt:I},s);if(!r){if(k.ok){o.notice.value=k.value,o.notice.phase="ready";return}o.notice.failure=k,o.notice.phase="failed"}}let $=null;const T=I=>kt(st(I.body)),K=I=>!I.sending&&T(I)>0&&T(I)<=an;function j(){if(a.value||r||!o.me?.member||o.me.acceptances.art9Refused!==!0)return;const I=qa({client:t,lang:_t(e.lang),signal:n.signal,offerArt9:!0,onDone:k=>{o.me=k,a.value=null,k.acceptances.art9Consent==="accepted"&&c({key:"panel.art9Given"})},onSignIn:()=>{a.value=null,o.phase="signIn"}});a.value=I,I.load()}return{state:o,consent:a,giveConsent:j,closeConsent(){a.value=null},loadMember:p,loadStatement:x,async loadNotice(I){$=I,await _(I)},unreadCount:()=>o.notifications.filter(I=>I.readAt===null).length,async markAllRead(){const I=o.notifications.filter(E=>E.readAt===null).map(E=>E.id);if(I.length===0||o.busy.markRead)return;o.busy.markRead=!0;const k=await t.me.notifications.markRead({ids:I},s);if(delete o.busy.markRead,r)return;if(!k.ok)return c(l(k));const O=new Date().toISOString();o.notifications=o.notifications.map(E=>I.includes(E.id)?{...E,readAt:O}:E)},async fileAppeal(){const I=o.statement,k=I.appeal;if(!I.value||!I.value.canAppeal||!K(k))return;const O=I.value.decisionId;k.sending=!0,k.failure=null;const E=await t.me.appeals.file({decisionId:O,body:st(k.body)},s);if(k.sending=!1,!(r||O!==u)){if(!E.ok){k.failure=E;return}k.body="",c({key:"statement.appealSent"}),await x(O)}},async withdrawAppeal(){const I=o.statement,k=I.value?.appeal;if(!I.value||!k||k.status!=="open"||o.busy.withdraw)return;const O=I.value.decisionId;o.busy.withdraw=!0;const E=await t.me.appeals.withdraw({appealId:k.appealId},s);if(delete o.busy.withdraw,!(r||O!==u)){if(!E.ok)return c(l(E));c({key:"statement.appealWithdrawn"}),await x(O)}},async fileNoticeAppeal(){const I=o.notice,k=I.appeal;if(!I.value||!I.value.appeal.canAppeal||$===null||!K(k))return;k.sending=!0,k.failure=null;const O=await t.notices.appeal({receipt:$,body:st(k.body)},s);if(k.sending=!1,!r){if(!O.ok){k.failure=O;return}k.body="",c({key:"notice.appealSent"}),await _($)}},async withdrawNoticeAppeal(){if(!o.notice.value?.appeal.open||$===null||o.busy.noticeWithdraw)return;o.busy.noticeWithdraw=!0;const I=await t.notices.withdrawAppeal({receipt:$},s);if(delete o.busy.noticeWithdraw,!r){if(!I.ok)return c(l(I));c({key:"statement.appealWithdrawn"}),await _($)}},async withdrawConsent(){if(o.busy.consent)return!1;o.busy.consent=!0;const I=await t.me.consents.withdraw({kind:"art9_consent"},s);return delete o.busy.consent,r?!1:I.ok?(o.me&&(o.me={...o.me,acceptances:{...o.me.acceptances,art9Consent:I.value.state}}),c({key:"panel.art9Withdrawn"}),!0):(c(l(I)),!1)},async unblock(I){const k=`block:${I}`;if(o.busy[k])return;o.busy[k]=!0;const O=await t.blocks.set({memberId:I,blocked:!1},s);if(delete o.busy[k],!r){if(!O.ok)return c(l(O));o.blocks=o.blocks.filter(E=>E.memberId!==I),c({key:"discussion.unblocked"})}},editProfile(){const I=o.me?.profile;I&&(o.profile={displayName:I.displayName,handle:I.handle,avatarPreset:I.avatarPreset,sending:!1,failure:null,fields:[]})},cancelProfile(){o.profile=null},async saveProfile(){const I=o.profile,k=o.me?.profile;if(!I||!k||I.sending||!La(I.displayName)||!Ua(I.handle)||En(I.handle)==="")return;const O={},E=Ws(I.displayName),A=En(I.handle);if(E!==k.displayName&&(O.displayName=E),A!==k.handle&&(O.handle=A),I.avatarPreset!==k.avatarPreset&&(O.avatarPreset=I.avatarPreset),Object.keys(O).length===0){o.profile=null;return}I.sending=!0,I.failure=null,I.fields=[];const b=await t.me.updateProfile(O,s);if(I.sending=!1,!r){if(!b.ok){I.failure=b,I.fields=b.code==="handle"?["handle"]:b.code==="name"?["displayName"]:b.fields??[];return}o.me&&(o.me={...o.me,profile:b.value.profile}),o.profile=null}},async exportData(I){if(o.exporting)return;o.exporting=!0;const k=await t.me.export(s);if(o.exporting=!1,!r){if(!k.ok)return c(l(k));I(k.value)}},async erase(){if(o.busy.erase)return!1;o.busy.erase=!0;const I=await t.me.erase(s);return delete o.busy.erase,r?!1:I.ok?(o.purgeAfter=I.value.purgeAfter,o.me?.member&&(o.me={...o.me,member:{...o.me.member,status:I.value.status}}),!0):(c(l(I)),!1)},async cancelErase(){if(o.busy.erase)return;o.busy.erase=!0;const I=await t.me.cancelErase(s);if(delete o.busy.erase,!r){if(!I.ok)return c(l(I));o.purgeAfter=null,o.me?.member&&(o.me={...o.me,member:{...o.me.member,status:I.value.status}}),c({key:"panel.eraseCancelled"})}},erasing:()=>o.me?.member?.status==="deletion_requested",appealLength:T,canAppealWith:K,dispose(){r=!0,n.abort(),a.value=null}}}const ei=new WeakMap;function ig(e){if(typeof location<"u"&&location.hash.startsWith("#t=")){const t=ga(location.hash);return nf(),e&&ei.set(e,t),t}return e&&ei.has(e)?ei.get(e)??null:void 0}const rg=["aria-labelledby"],ag=["id"],lg={class:"bcm-dl"},cg={class:"bcm-muted"},ug={key:0,class:"bcm-muted"},dg={class:"bcm-facts"},fg=["aria-labelledby"],pg=["id"],mg={class:"bcm-row"},hg=["disabled"],bg={key:0,class:"bcm-muted"},gg={class:"bcm-field"},yg=["for"],vg=["id","aria-describedby","aria-invalid"],_g=["id"],kg={key:0,class:"bcm-error",role:"alert"},wg={class:"bcm-row"},xg=["disabled"],Ig={key:2},Sg={key:3},$g=Ce({__name:"NoticeStatusView",props:{notice:{},appeal:{},withdrawing:{type:Boolean}},emits:["appeal","withdraw"],setup(e,{emit:t}){const n=e,s=t,{t:o,lang:r}=jt(),a=Ke("bcm-notice-status"),c=H(()=>n.notice),l=H(()=>mt(`category.${c.value.category}`)),p=H(()=>mt(`caseStatus.${c.value.status}`)),u=H(()=>kt(st(n.appeal.body))),v=H(()=>!n.appeal.sending&&u.value>0&&u.value<=an),x=H(()=>c.value.appeal.closesAt?Ra(c.value.appeal.closesAt):!1),_=H(()=>{const $=n.appeal.failure;if(!$)return"";const T=Te($,r.value);return o(T.key,T.params)});return($,T)=>(m(),h("section",{class:"bcm-section","aria-labelledby":`${i(a)}-title`},[f("h3",{id:`${i(a)}-title`},d(i(o)("notice.statusTitle")),9,ag),f("dl",lg,[l.value?(m(),h(G,{key:0},[f("dt",null,d(i(o)("notice.category")),1),f("dd",null,d(i(o)(l.value)),1)],64)):M("",!0),p.value?(m(),h(G,{key:1},[f("dt",null,d(i(o)("notice.statusTitle")),1),f("dd",null,d(i(o)(p.value)),1)],64)):M("",!0)]),f("p",cg,d(i(o)("notice.submittedAt",{date:i(ze)(i(r),c.value.submittedAt)})),1),c.value.decidedAt?(m(),h("p",ug,d(i(o)("notice.decidedAt",{date:i(ze)(i(r),c.value.decidedAt)})),1)):M("",!0),c.value.statement?(m(),h(G,{key:1},[f("h4",null,d(i(o)("notice.statement")),1),f("pre",dg,d(c.value.statement),1)],64)):M("",!0),c.value.decidedAt?(m(),h("section",{key:2,class:"bcm-card","aria-labelledby":`${i(a)}-appeal`},[f("h4",{id:`${i(a)}-appeal`},d(i(o)("notice.appealTitle")),9,pg),c.value.appeal.open?(m(),h(G,{key:0},[f("p",null,d(i(o)("notice.appealOpen")),1),f("div",mg,[f("button",{type:"button",class:"bcm-btn",disabled:e.withdrawing,onClick:T[0]||(T[0]=K=>s("withdraw"))},d(i(o)("notice.appealWithdraw")),9,hg)])],64)):c.value.appeal.canAppeal?(m(),h(G,{key:1},[f("p",null,d(i(o)("notice.appealLede")),1),c.value.appeal.closesAt?(m(),h("p",bg,d(i(o)("notice.appealUntil",{date:i(ze)(i(r),c.value.appeal.closesAt)})),1)):M("",!0),f("form",{class:"bcm-form",novalidate:"",onSubmit:T[2]||(T[2]=Bt(K=>v.value&&s("appeal"),["prevent"]))},[f("div",gg,[f("label",{for:`${i(a)}-body`},d(i(o)("notice.appealBody")),9,yg),xe(f("textarea",{id:`${i(a)}-body`,"onUpdate:modelValue":T[1]||(T[1]=K=>e.appeal.body=K),class:"bcm-input bcm-textarea",rows:"5","aria-describedby":`${i(a)}-counter`,"aria-invalid":u.value>i(an)},null,8,vg),[[dt,e.appeal.body]]),f("p",{id:`${i(a)}-counter`,class:"bcm-counter"},d(i(o)("statement.appealCounter",{length:u.value,max:i(an)})),9,_g)]),_.value?(m(),h("p",kg,d(_.value),1)):M("",!0),f("div",wg,[f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!v.value},d(e.appeal.sending?i(o)("statement.appealSending"):i(o)("notice.appealSubmit")),9,xg)])],32)],64)):x.value?(m(),h("p",Ig,d(i(o)("notice.appealClosed")),1)):(m(),h("p",Sg,d(i(o)("statement.appealUnavailable")),1))],8,fg)):M("",!0)],8,rg))}}),Cg=["aria-labelledby"],Tg=["id"],Ag={class:"bcm-muted"},Og={class:"bcm-dl"},Eg={key:0,class:"bcm-muted"},Mg={key:0},Rg={key:0,class:"bcm-text"},Ng={key:0,class:"bcm-text"},Pg={key:0,class:"bcm-note bcm-text"},jg={class:"bcm-facts"},zg={class:"bcm-text"},Lg={class:"bcm-facts"},Dg=["aria-labelledby"],Ug=["id"],Fg={key:0,class:"bcm-muted"},qg={class:"bcm-row"},Bg=["disabled"],Hg={class:"bcm-muted"},Vg={class:"bcm-field"},Wg=["for"],Kg=["id","aria-describedby","aria-invalid"],Yg=["id"],Gg={key:0,class:"bcm-error",role:"alert"},Zg={class:"bcm-row"},Jg=["disabled"],Xg={key:0,class:"bcm-muted"},Qg=Ce({__name:"StatementView",props:{statement:{},appeal:{},withdrawing:{type:Boolean}},emits:["appeal","withdraw"],setup(e,{emit:t}){const n=e,s=t,{t:o,lang:r}=jt(),a=Ke("bcm-statement"),c=H(()=>n.statement),l=H(()=>mt(`restriction.${c.value.restriction}`)),p=H(()=>mt(`basis.${c.value.basis}`)),u=H(()=>mt(`category.${c.value.category}`)),v=H(()=>Ff(r.value,c.value.territorialScope)),x=H(()=>c.value.appeal?mt(`appealStatus.${c.value.appeal.status}`):null),_=H(()=>c.value.subject.kind==="message"?"statement.subjectMessage":c.value.subject.kind==="article"?"statement.subjectArticle":"statement.subjectProfile"),$=H(()=>{const O=c.value.subject;return O.kind==="message"&&O.message?O.message.body??O.message.displayBody:null}),T=H(()=>c.value.appeal?.status==="open"),K=H(()=>Ra(c.value.appealWindowClosesAt)),j=H(()=>kt(st(n.appeal.body))),I=H(()=>!n.appeal.sending&&j.value>0&&j.value<=an),k=H(()=>{const O=n.appeal.failure;if(!O)return"";const E=Te(O,r.value);return o(E.key,E.params)});return(O,E)=>(m(),h("article",{class:"bcm-section","aria-labelledby":`${i(a)}-title`},[f("h3",{id:`${i(a)}-title`},d(i(o)("statement.title")),9,Tg),f("p",Ag,d(i(o)("statement.decidedAt",{date:i(ze)(i(r),c.value.decidedAt)})),1),f("p",null,d(i(o)("statement.provider",{entity:c.value.providerEntity})),1),f("dl",Og,[l.value?(m(),h(G,{key:0},[f("dt",null,d(i(o)("statement.restriction")),1),f("dd",null,[Ut(d(i(o)(l.value))+" ",1),c.value.restrictionUntil?(m(),h("span",Eg,d(i(o)("statement.until",{date:i(ze)(i(r),c.value.restrictionUntil)})),1)):M("",!0)])],64)):M("",!0),u.value?(m(),h(G,{key:1},[f("dt",null,d(i(o)("report.category")),1),f("dd",null,d(i(o)(u.value)),1)],64)):M("",!0),v.value?(m(),h(G,{key:2},[f("dt",null,d(i(o)("statement.scope")),1),f("dd",null,d(v.value),1)],64)):M("",!0),p.value?(m(),h(G,{key:3},[f("dt",null,d(i(o)("statement.basis")),1),f("dd",null,d(i(o)(p.value)),1)],64)):M("",!0),f("dt",null,d(i(o)("statement.automation")),1),f("dd",null,[c.value.automatedDetection?(m(),h("span",Mg,d(i(o)("statement.automatedDetection")),1)):M("",!0),f("span",null,d(c.value.automated?i(o)("statement.automatedDecision"):i(o)("statement.humanDecision")),1)]),c.value.legalGround?(m(),h(G,{key:4},[f("dt",null,d(i(o)("statement.legalGround")),1),f("dd",null,[f("p",null,d(c.value.legalGround),1),c.value.legalExplanation?(m(),h("p",Rg,d(c.value.legalExplanation),1)):M("",!0)])],64)):M("",!0),c.value.contractualGround?(m(),h(G,{key:5},[f("dt",null,d(i(o)("statement.contractualGround")),1),f("dd",null,[f("p",null,d(c.value.contractualGround),1),c.value.contractualExplanation?(m(),h("p",Ng,d(c.value.contractualExplanation),1)):M("",!0)])],64)):M("",!0),f("dt",null,d(i(o)("statement.subject")),1),f("dd",null,[f("p",null,d(i(o)(_.value)),1),$.value?(m(),h("p",Pg,[Ee(Va,{text:$.value},null,8,["text"])])):M("",!0)])]),f("h4",null,d(i(o)("statement.facts")),1),f("pre",jg,d(c.value.facts),1),f("h4",null,d(i(o)("statement.redress")),1),f("p",zg,d(c.value.redress),1),f("details",null,[f("summary",null,d(i(o)("statement.full")),1),f("pre",Lg,d(c.value.statement),1)]),f("section",{class:"bcm-card","aria-labelledby":`${i(a)}-appeal`},[f("h4",{id:`${i(a)}-appeal`},d(i(o)("statement.appealTitle")),9,Ug),T.value?(m(),h(G,{key:0},[f("p",null,d(i(o)("statement.appealOpen")),1),x.value?(m(),h("p",Fg,d(i(o)(x.value)),1)):M("",!0),f("div",qg,[f("button",{type:"button",class:"bcm-btn",disabled:e.withdrawing,onClick:E[0]||(E[0]=A=>s("withdraw"))},d(i(o)("statement.appealWithdraw")),9,Bg)])],64)):c.value.canAppeal?(m(),h(G,{key:1},[f("p",null,d(i(o)("statement.appealLede")),1),f("p",Hg,d(i(o)("statement.appealUntil",{date:i(ze)(i(r),c.value.appealWindowClosesAt)})),1),f("form",{class:"bcm-form",novalidate:"",onSubmit:E[2]||(E[2]=Bt(A=>I.value&&s("appeal"),["prevent"]))},[f("div",Vg,[f("label",{for:`${i(a)}-body`},d(i(o)("statement.appealBody")),9,Wg),xe(f("textarea",{id:`${i(a)}-body`,"onUpdate:modelValue":E[1]||(E[1]=A=>e.appeal.body=A),class:"bcm-input bcm-textarea",rows:"5","aria-describedby":`${i(a)}-counter`,"aria-invalid":j.value>i(an)},null,8,Kg),[[dt,e.appeal.body]]),f("p",{id:`${i(a)}-counter`,class:"bcm-counter"},d(i(o)("statement.appealCounter",{length:j.value,max:i(an)})),9,Yg)]),k.value?(m(),h("p",Gg,d(k.value),1)):M("",!0),f("div",Zg,[f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!I.value},d(e.appeal.sending?i(o)("statement.appealSending"):i(o)("statement.appealSubmit")),9,Jg)])],32)],64)):(m(),h(G,{key:2},[x.value?(m(),h("p",Xg,d(i(o)(x.value)),1)):M("",!0),f("p",null,d(K.value?i(o)("statement.appealClosed"):i(o)("statement.appealUnavailable")),1)],64))],8,Dg)],8,Cg))}}),ey=["lang","aria-labelledby"],ty=["id"],ny={key:0,class:"bcm-note",role:"alert"},sy={key:1,class:"bcm-muted",role:"status"},oy={key:2,class:"bcm-error",role:"alert"},iy={key:0,class:"bcm-muted",role:"status"},ry={key:1,class:"bcm-row"},ay=["href"],ly={key:2,class:"bcm-error",role:"alert"},cy=["href"],uy={key:0,class:"bcm-muted",role:"status"},dy={key:1,class:"bcm-row"},fy=["href"],py={key:2,class:"bcm-error",role:"alert"},my=["aria-labelledby"],hy=["id"],by={key:0,class:"bcm-msg"},gy={class:"bcm-msg-main"},yy={class:"bcm-author"},vy={class:"bcm-handle"},_y={class:"bcm-row"},ky={class:"bcm-field"},wy=["for"],xy=["id","aria-invalid"],Iy={class:"bcm-hint"},Sy={class:"bcm-field"},$y=["for"],Cy=["id","maxlength","aria-invalid"],Ty={class:"bcm-hint"},Ay={class:"bcm-choices"},Oy={class:"bcm-choice"},Ey=["name"],My=["name","value"],Ry={key:0,class:"bcm-error",role:"alert"},Ny={class:"bcm-row"},Py=["disabled"],jy=["disabled"],zy=["aria-labelledby"],Ly={class:"bcm-row"},Dy=["id"],Uy={key:0,class:"bcm-badge"},Fy=["disabled"],qy={key:0,class:"bcm-muted"},By={key:1,class:"bcm-list"},Hy={key:0},Vy=["datetime"],Wy=["href"],Ky=["aria-labelledby"],Yy=["id"],Gy={key:0,class:"bcm-muted"},Zy={key:1,class:"bcm-list"},Jy={key:0},Xy={key:1,class:"bcm-muted"},Qy={class:"bcm-muted"},ev={key:2,class:"bcm-muted"},tv={key:3,class:"bcm-muted"},nv=["href"],sv=["aria-labelledby"],ov=["id"],iv={key:0,class:"bcm-muted"},rv={key:1,class:"bcm-list"},av={key:0},lv={key:1},cv=["datetime"],uv={key:2,class:"bcm-muted"},dv=["aria-labelledby"],fv=["id"],pv={key:0,class:"bcm-muted"},mv={key:1,class:"bcm-list"},hv=["disabled","onClick"],bv=["aria-labelledby"],gv=["id"],yv={class:"bcm-row"},vv=["disabled"],_v={key:1,class:"bcm-row"},kv={key:2},wv=["aria-labelledby"],xv=["id"],Iv={class:"bcm-hint"},Sv={class:"bcm-row"},$v=["disabled"],Cv=["aria-labelledby"],Tv=["id"],Av={class:"bcm-row"},Ov=["disabled"],Ev={class:"bcm-hint"},Mv={class:"bcm-row"},Rv=["disabled"],Nv={class:"bcm-sr","aria-live":"polite"},Pv=Ce({inheritAttrs:!1,__name:"MyCommunityView",props:{apiBase:{},siteBase:{},lang:{},decisionId:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=he(_t(t.lang,Pt())),{t:s,text:o}=Yt(n),r=Ke("bcm-panel"),a=he(null),c=Wt(t.siteBase),l=c===null?null:Kt(t.apiBase,t.transport,c),p=l?og({client:l,lang:n.value}):null,u=p?.state??null,v=H(()=>On(An(t.routes),u?.me?.links,c??"")),x=H(()=>!!t.decisionId),_=he(!1),$=he(null),T=Es();bt(()=>{if(!p)return;const U=ig(T);U!==void 0&&(_.value=!0,p.loadNotice(U)),t.decisionId?p.loadStatement(t.decisionId):p.loadMember()}),Fe(()=>t.decisionId,(U,R)=>{!p||U===R||(U?p.loadStatement(U):u?.phase==="idle"&&p.loadMember())}),ut(()=>p?.dispose());const K=H(()=>{const U=u?.failure;if(!U)return"";const R=Te(U,n.value);return s(R.key,R.params)}),j=H(()=>{const U=u?.statement.failure;if(!U)return"";const R=Te(U,n.value);return s(R.key,R.params)}),I=H(()=>{const U=u?.notice.failure;if(!U)return"";const R=Te(U,n.value);return s(R.key,R.params)});function k(){return Tn(t.signInHref,typeof location>"u"?null:location.pathname)}const O=U=>Ds(v.value.statementPath,U),E=U=>mt(`notification.${U.code}`),A=U=>mt(`restriction.${U}`),b=U=>mt(`category.${U}`),C=U=>mt(`caseStatus.${U}`),z=U=>{const R=u?.appeals.find(P=>P.decisionId===U);return R?mt(`appealStatus.${R.status}`):null},D=H(()=>u?.me?.acceptances.art9Consent??null),J=H(()=>u?.me?.acceptances.art9Refused===!0),se=H(()=>u?.me?.member??null),oe=H(()=>u?.me?.profile??null);function ae(){p?.exportData(U=>ng(U,sg(s("panel.exportFileName"))))}async function ve(){p&&($.value==="consent"?await p.withdrawConsent():$.value==="erase"&&await p.erase(),$.value=null)}const de=he("");return Fe(()=>u?.announceId,()=>{de.value="";const U=o(u?.announcement);Ue(()=>{de.value=U})}),(U,R)=>i(p)&&i(u)?(m(),h("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"},d(x.value?i(s)("statement.title"):i(s)("panel.title")),9,ty),_.value?(m(),h(G,{key:0},[i(u).notice.phase==="missing"?(m(),h("p",ny,d(i(s)("notice.receiptMissing")),1)):i(u).notice.phase==="loading"?(m(),h("p",sy,d(i(s)("common.loading")),1)):i(u).notice.phase==="failed"?(m(),h("p",oy,d(I.value),1)):i(u).notice.value?(m(),je($g,{key:3,notice:i(u).notice.value,appeal:i(u).notice.appeal,withdrawing:!!i(u).busy.noticeWithdraw,onAppeal:R[0]||(R[0]=P=>i(p).fileNoticeAppeal()),onWithdraw:R[1]||(R[1]=P=>i(p).withdrawNoticeAppeal())},null,8,["notice","appeal","withdrawing"])):M("",!0)],64)):M("",!0),x.value?(m(),h(G,{key:1},[i(u).statement.phase==="loading"?(m(),h("p",iy,d(i(s)("common.loading")),1)):i(u).statement.phase==="signIn"?(m(),h("div",ry,[f("p",null,d(i(s)("panel.signIn")),1),k()?(m(),h("a",{key:0,class:"bcm-btn bcm-primary",href:k()??void 0},d(i(s)("common.signIn")),9,ay)):M("",!0)])):i(u).statement.phase==="failed"?(m(),h("p",ly,d(j.value),1)):i(u).statement.value?(m(),je(Qg,{key:3,statement:i(u).statement.value,appeal:i(u).statement.appeal,withdrawing:!!i(u).busy.withdraw,onAppeal:R[2]||(R[2]=P=>i(p).fileAppeal()),onWithdraw:R[3]||(R[3]=P=>i(p).withdrawAppeal())},null,8,["statement","appeal","withdrawing"])):M("",!0),f("p",null,[f("a",{href:v.value.myCommunityPath},d(i(s)("common.back")),9,cy)])],64)):(m(),h(G,{key:2},[i(u).phase==="loading"?(m(),h("p",uy,d(i(s)("common.loading")),1)):i(u).phase==="signIn"&&!_.value?(m(),h("div",dy,[f("p",null,d(i(s)("panel.signIn")),1),k()?(m(),h("a",{key:0,class:"bcm-btn bcm-primary",href:k()??void 0},d(i(s)("common.signIn")),9,fy)):M("",!0)])):i(u).phase==="failed"?(m(),h("p",py,d(K.value),1)):i(u).phase==="ready"?(m(),h(G,{key:3},[oe.value&&se.value?(m(),h("section",{key:0,class:"bcm-section","aria-labelledby":`${i(r)}-profile`},[f("h3",{id:`${i(r)}-profile`},d(i(s)("panel.profile")),9,hy),i(u).profile?(m(),h("form",{key:1,class:"bcm-form bcm-card",novalidate:"",onSubmit:R[10]||(R[10]=Bt(P=>i(p).saveProfile(),["prevent"]))},[f("div",ky,[f("label",{for:`${i(r)}-name`},d(i(s)("onboarding.displayName")),9,wy),xe(f("input",{id:`${i(r)}-name`,"onUpdate:modelValue":R[5]||(R[5]=P=>i(u).profile.displayName=P),class:"bcm-input",autocomplete:"nickname","aria-invalid":i(u).profile.fields.includes("displayName")},null,8,xy),[[dt,i(u).profile.displayName]]),f("p",Iy,d(i(s)("onboarding.displayNameHint")),1)]),f("div",Sy,[f("label",{for:`${i(r)}-handle`},d(i(s)("onboarding.handle")),9,$y),xe(f("input",{id:`${i(r)}-handle`,"onUpdate:modelValue":R[6]||(R[6]=P=>i(u).profile.handle=P),class:"bcm-input",autocomplete:"username",autocapitalize:"none",spellcheck:"false",maxlength:i(Ks),"aria-invalid":i(u).profile.fields.includes("handle")},null,8,Cy),[[dt,i(u).profile.handle]]),f("p",Ty,d(i(s)("onboarding.handleHint",{min:i(Da),max:i(Ks),days:i(Vr)})),1)]),f("fieldset",Ay,[f("legend",null,d(i(s)("onboarding.avatar")),1),f("label",Oy,[xe(f("input",{"onUpdate:modelValue":R[7]||(R[7]=P=>i(u).profile.avatarPreset=P),type:"radio",name:`${i(r)}-avatar`,value:null},null,8,Ey),[[wn,i(u).profile.avatarPreset]]),f("span",null,d(i(s)("onboarding.avatarNone")),1)]),(m(!0),h(G,null,ke(i(Ko),P=>(m(),h("label",{key:P.id,class:"bcm-choice"},[xe(f("input",{"onUpdate:modelValue":R[8]||(R[8]=Se=>i(u).profile.avatarPreset=Se),type:"radio",name:`${i(r)}-avatar`,value:P.id},null,8,My),[[wn,i(u).profile.avatarPreset]]),f("span",null,d(P.emoji),1)]))),128))]),i(u).profile.failure?(m(),h("p",Ry,d(i(o)(i(Te)(i(u).profile.failure,n.value))),1)):M("",!0),f("div",Ny,[R[22]||(R[22]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn",disabled:i(u).profile.sending,onClick:R[9]||(R[9]=P=>i(p).cancelProfile())},d(i(s)("composer.cancel")),9,Py),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:i(u).profile.sending},d(i(u).profile.sending?i(s)("composer.sending"):i(s)("composer.save")),9,jy)])],32)):(m(),h("div",by,[Ee(Yo,{author:{kind:"member",memberId:se.value.memberId,displayName:oe.value.displayName,avatarPreset:oe.value.avatarPreset}},null,8,["author"]),f("div",gy,[f("span",yy,d(oe.value.displayName),1),f("span",vy,d(oe.value.handle),1),f("div",_y,[f("button",{type:"button",class:"bcm-btn bcm-small",onClick:R[4]||(R[4]=P=>i(p).editProfile())},d(i(s)("panel.profileEdit")),1)])])]))],8,my)):M("",!0),f("section",{class:"bcm-section","aria-labelledby":`${i(r)}-notifications`},[f("div",Ly,[f("h3",{id:`${i(r)}-notifications`},d(i(s)("panel.notifications")),9,Dy),i(p).unreadCount()>0?(m(),h("span",Uy,d(i(s)("panel.unread",{count:i(p).unreadCount()})),1)):M("",!0),R[23]||(R[23]=f("span",{class:"bcm-spacer"},null,-1)),i(p).unreadCount()>0?(m(),h("button",{key:1,type:"button",class:"bcm-btn bcm-small",disabled:!!i(u).busy.markRead,onClick:R[11]||(R[11]=P=>i(p).markAllRead())},d(i(s)("panel.markRead")),9,Fy)):M("",!0)]),i(u).notifications.length===0?(m(),h("p",qy,d(i(s)("panel.notificationsEmpty")),1)):(m(),h("ul",By,[(m(!0),h(G,null,ke(i(u).notifications,P=>(m(),h("li",{key:P.id,class:at({"bcm-unread":P.readAt===null})},[E(P)?(m(),h("p",Hy,d(i(s)(E(P))),1)):M("",!0),f("time",{class:"bcm-time",datetime:P.createdAt},d(i(ze)(n.value,P.createdAt)),9,Vy),P.decisionId&&O(P.decisionId)?(m(),h("a",{key:1,href:O(P.decisionId)??void 0},d(i(s)("sanction.statement")),9,Wy)):M("",!0)],2))),128))]))],8,zy),f("section",{class:"bcm-section","aria-labelledby":`${i(r)}-statements`},[f("h3",{id:`${i(r)}-statements`},d(i(s)("panel.statements")),9,Yy),i(u).decisions.length===0?(m(),h("p",Gy,d(i(s)("panel.statementsEmpty")),1)):(m(),h("ul",Zy,[(m(!0),h(G,null,ke(i(u).decisions,P=>(m(),h("li",{key:P.decisionId},[A(P.restriction)?(m(),h("p",Jy,[f("strong",null,d(i(s)(A(P.restriction))),1)])):M("",!0),b(P.category)?(m(),h("p",Xy,d(i(s)(b(P.category))),1)):M("",!0),f("p",Qy,d(i(s)("statement.decidedAt",{date:i(ze)(n.value,P.decidedAt)})),1),z(P.decisionId)?(m(),h("p",ev,d(i(s)(z(P.decisionId))),1)):P.canAppeal?(m(),h("p",tv,d(i(s)("statement.appealUntil",{date:i(ze)(n.value,P.appealWindowClosesAt)})),1)):M("",!0),O(P.decisionId)?(m(),h("a",{key:4,href:O(P.decisionId)??void 0},d(i(s)("sanction.statement")),9,nv)):M("",!0)]))),128))]))],8,Ky),f("section",{class:"bcm-section","aria-labelledby":`${i(r)}-reports`},[f("h3",{id:`${i(r)}-reports`},d(i(s)("panel.reports")),9,ov),i(u).reports.length===0?(m(),h("p",iv,d(i(s)("panel.reportsEmpty")),1)):(m(),h("ul",rv,[(m(!0),h(G,null,ke(i(u).reports,P=>(m(),h("li",{key:P.caseId},[b(P.category)?(m(),h("p",av,[f("strong",null,d(i(s)(b(P.category))),1)])):M("",!0),C(P.status)?(m(),h("p",lv,d(i(s)(C(P.status))),1)):M("",!0),f("time",{class:"bcm-time",datetime:P.reportedAt},d(i(ze)(n.value,P.reportedAt)),9,cv),P.decidedAt?(m(),h("p",uv,d(i(s)("statement.decidedAt",{date:i(ze)(n.value,P.decidedAt)})),1)):M("",!0)]))),128))]))],8,sv),se.value?(m(),h("section",{key:1,class:"bcm-section","aria-labelledby":`${i(r)}-blocks`},[f("h3",{id:`${i(r)}-blocks`},d(i(s)("panel.blocks")),9,fv),i(u).blocks.length===0?(m(),h("p",pv,d(i(s)("panel.blocksEmpty")),1)):(m(),h("ul",mv,[(m(!0),h(G,null,ke(i(u).blocks,P=>(m(),h("li",{key:P.memberId,class:"bcm-row"},[f("span",null,d(P.author.kind==="member"&&"displayName"in P.author&&P.author.displayName?P.author.displayName:i(s)("author.deleted")),1),R[24]||(R[24]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"button",class:"bcm-btn bcm-small",disabled:!!i(u).busy[`block:${P.memberId}`],onClick:Se=>i(p).unblock(P.memberId)},d(i(s)("discussion.unblock")),9,hv)]))),128))]))],8,dv)):M("",!0),se.value&&D.value!==null?(m(),h("section",{key:2,class:"bcm-section","aria-labelledby":`${i(r)}-consents`},[f("h3",{id:`${i(r)}-consents`},d(i(s)("panel.consents")),9,gv),D.value==="accepted"?(m(),h(G,{key:0},[f("p",null,d(i(s)("panel.art9Given")),1),f("div",yv,[f("button",{type:"button",class:"bcm-btn",disabled:!!i(u).busy.consent,onClick:R[12]||(R[12]=P=>$.value="consent")},d(i(s)("panel.art9Withdraw")),9,vv)])],64)):J.value?(m(),h(G,{key:1},[f("p",null,d(i(s)("panel.art9Refused")),1),i(p).consent.value?(m(),je(Ya,{key:0,model:i(p).consent.value,"rules-href":v.value.rulesPath,onCancel:R[13]||(R[13]=P=>i(p).closeConsent())},null,8,["model","rules-href"])):(m(),h("div",_v,[f("button",{type:"button",class:"bcm-btn bcm-primary",onClick:R[14]||(R[14]=P=>i(p).giveConsent())},d(i(s)("discussion.giveConsent")),1)]))],64)):(m(),h("p",kv,d(i(s)("panel.art9NotGiven")),1))],8,bv)):M("",!0),se.value?(m(),h("section",{key:3,class:"bcm-section","aria-labelledby":`${i(r)}-export`},[f("h3",{id:`${i(r)}-export`},d(i(s)("panel.export")),9,xv),f("p",Iv,d(i(s)("panel.exportHint")),1),f("div",Sv,[f("button",{type:"button",class:"bcm-btn",disabled:i(u).exporting,onClick:R[15]||(R[15]=P=>ae())},d(i(u).exporting?i(s)("panel.exporting"):i(s)("panel.export")),9,$v)])],8,wv)):M("",!0),se.value?(m(),h("section",{key:4,class:"bcm-section","aria-labelledby":`${i(r)}-erase`},[f("h3",{id:`${i(r)}-erase`},d(i(s)("panel.erase")),9,Tv),i(p).erasing()?(m(),h(G,{key:0},[f("p",null,d(i(u).purgeAfter?i(s)("panel.eraseScheduled",{date:i(ze)(n.value,i(u).purgeAfter)}):i(s)("notification.erasure_scheduled")),1),f("div",Av,[f("button",{type:"button",class:"bcm-btn bcm-primary",disabled:!!i(u).busy.erase,onClick:R[16]||(R[16]=P=>i(p).cancelErase())},d(i(s)("panel.eraseCancel")),9,Ov)])],64)):(m(),h(G,{key:1},[f("p",Ev,d(i(s)("panel.eraseExplain")),1),f("div",Mv,[f("button",{type:"button",class:"bcm-btn bcm-danger",disabled:!!i(u).busy.erase,onClick:R[17]||(R[17]=P=>$.value="erase")},d(i(s)("panel.erase")),9,Rv)])],64))],8,Cv)):M("",!0)],64)):M("",!0)],64)),f("p",Nv,d(de.value),1),$.value==="consent"?(m(),je(Vo,{key:3,title:"panel.art9WithdrawTitle",explain:"panel.art9WithdrawExplain",confirm:"panel.art9WithdrawConfirm",cancel:"panel.art9WithdrawCancel",busy:!!i(u).busy.consent,"fallback-focus":()=>a.value,onConfirm:R[18]||(R[18]=P=>ve()),onCancel:R[19]||(R[19]=P=>$.value=null)},null,8,["busy","fallback-focus"])):M("",!0),$.value==="erase"?(m(),je(Vo,{key:4,title:"panel.eraseTitle",explain:"panel.eraseExplain",confirm:"panel.eraseConfirm",cancel:"panel.eraseKeep",danger:"",busy:!!i(u).busy.erase,"fallback-focus":()=>a.value,onConfirm:R[20]||(R[20]=P=>ve()),onCancel:R[21]||(R[21]=P=>$.value=null)},null,8,["busy","fallback-focus"])):M("",!0)],8,ey)):M("",!0)}});function jv(e){const t=new AbortController,n={signal:t.signal},s=He({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!==ad,a=()=>kt(st(s.description));function c(){const u=a();return!s.sending&&s.receipt===null&&s.target!==null&&s.category!==""&&u>0&&u<=Ro&&kt(s.name.trim())<=Br&&s.goodFaith&&(s.captcha==="off"||s.captcha==="ready"&&s.token!==null)}function l(){o||(o=!0,e.client.legal.current({kind:"rules",locale:e.lang},n).then(u=>{s.rules=u.ok?Ps(u.value.bodyJson):[]}))}async function p(){if(!c()||!s.target||s.category==="")return;s.sending=!0,s.failure=null;const u={category:s.category,target:s.target,description:st(s.description),confirmations:[Qu]};s.category==="rules"&&s.ruleId!==""&&(u.ruleId=s.ruleId);const v=s.name.trim(),x=s.email.trim();r()&&(v!==""||x!=="")&&(u.notifier={name:v||null,email:x||null,locale:e.lang}),s.token!==null&&(u.turnstileToken=s.token),s.token=null;const _=await e.client.notices.submit(u,n);if(s.sending=!1,_.ok){s.receipt=_.value,s.statusLink=Qd(e.noticesPath,_.value.receipt),e.onSubmitted?.({contactKept:_.value.contactKept});return}s.failure=_,s.captcha!=="off"&&(s.resetSignal+=1)}return{state:s,contactAllowed:r,canSubmit:c,descriptionLength:a,setCategory(u){s.category=u,u!=="rules"?s.ruleId="":l()},setToken(u){s.token=u,u!==null&&s.captcha==="loading"&&(s.captcha="ready")},setCaptcha(u){s.captcha!=="off"&&(s.captcha=u)},submit:p,dispose(){t.abort()}}}const zv="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit";let ns=null;function Lv(e){const t=window;return t.turnstile?Promise.resolve(t.turnstile):ns||(ns=new Promise((n,s)=>{const o=document.createElement("script");o.src=zv,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 ns=null,n}),ns)}async function Dv(e,t){const n=await Lv(t.nonce),s=n.render(e,{sitekey:t.siteKey,action:Xu,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 Uv=["lang","aria-labelledby"],Fv=["id"],qv={key:0},Bv=["href"],Hv=["value","aria-label"],Vv={key:2,class:"bcm-note"},Wv={class:"bcm-field"},Kv={class:"bcm-label"},Yv={class:"bcm-choices"},Gv=["name","value","checked","onChange"],Zv={key:0,class:"bcm-field"},Jv=["for"],Xv=["id"],Qv=["value"],e_={class:"bcm-field"},t_=["for"],n_=["id","aria-describedby","aria-invalid"],s_=["id"],o_={key:1,class:"bcm-fieldset"},i_={class:"bcm-hint"},r_={class:"bcm-field"},a_=["for"],l_=["id","maxlength"],c_={class:"bcm-field"},u_=["for"],d_=["id","aria-invalid"],f_={key:2,class:"bcm-note"},p_={key:3,class:"bcm-turnstile"},m_={key:0,class:"bcm-error",role:"alert"},h_={class:"bcm-check"},b_={key:4,class:"bcm-error",role:"alert"},g_={class:"bcm-row"},y_=["disabled"],v_=["lang","aria-labelledby"],__=["id"],k_=["href"],w_=Ce({inheritAttrs:!1,__name:"NoticeFormView",props:{apiBase:{},siteBase:{},lang:{},turnstileSiteKey:{},target:{},articleId:{},routes:{},transport:{type:Function}},setup(e){const t=e,n=Es(),s=he(_t(t.lang,Pt())),{t:o}=Yt(s),r=Ke("bcm-notice"),a=he(null),c=he(null);function l(){const C=Hs(t.target);return C||(t.articleId?Hs({articleId:t.articleId}):typeof location>"u"?null:$f(location.hash))}const p=Wt(t.siteBase),u=H(()=>On(An(t.routes),null,p??"")),v=ys(null),x=p===null?null:Kt(t.apiBase,t.transport,p),_=l(),$=!!x&&!_;$&&Vt("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"),x&&_&&(v.value=jv({client:x,lang:s.value,target:_,captcha:!!t.turnstileSiteKey,noticesPath:u.value.noticesPath,onSubmitted:C=>n?.dispatchEvent(new CustomEvent("bcm-notice-submitted",{detail:C,bubbles:!0,composed:!0}))}));const T=H(()=>v.value?.state??null),K=H(()=>T.value?.target?If(T.value.target):null),j=H(()=>K.value==="message"?o("notice.targetMessage"):K.value==="article"?o("notice.targetArticle"):o("notice.targetProfile")),I=C=>`category.${C}`,k=H(()=>{const C=T.value?.failure;if(!C)return"";const z=Te(C,s.value);return o(z.key,z.params)}),O=H(()=>{const C=T.value?.statusLink;return C&&typeof location<"u"?`${location.origin}${C}`:C??""});let E=null,A=null,b=!1;return bt(async()=>{const C=v.value;if(!(!C||!t.turnstileSiteKey||!n)){A=document.createElement("div"),A.slot="turnstile",n.appendChild(A);try{const z=n.nonce||n.getAttribute("nonce")||void 0,D=await Dv(A,{siteKey:t.turnstileSiteKey,language:s.value,onToken:J=>C.setToken(J),nonce:z});if(b){D.remove();return}E=D,C.setCaptcha("ready")}catch{C.setCaptcha("unavailable")}}}),Fe(()=>T.value?.resetSignal,(C,z)=>{C!==void 0&&z!==void 0&&C!==z&&E?.reset()}),Fe(()=>T.value?.receipt,C=>{C&&(E?.remove(),E=null,Ue(()=>c.value?.focus()))}),ut(()=>{b=!0,E?.remove(),E=null,A?.remove(),A=null,v.value?.dispose()}),(C,z)=>v.value&&T.value?(m(),h("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"},d(i(o)("notice.title")),9,Fv),T.value.receipt?(m(),h("div",{key:0,ref_key:"done",ref:c,class:"bcm-receipt",role:"status",tabindex:"-1"},[f("p",null,d(i(o)("notice.done")),1),f("p",null,d(i(o)("notice.receiptLede")),1),T.value.statusLink?(m(),h("p",qv,[f("a",{href:T.value.statusLink},d(i(o)("notice.statusLink")),9,Bv)])):M("",!0),O.value?(m(),h("input",{key:1,class:"bcm-input",readonly:"",value:O.value,"aria-label":i(o)("notice.statusLink"),onFocus:z[0]||(z[0]=D=>D.target.select())},null,40,Hv)):M("",!0),T.value.receipt.contactKept?M("",!0):(m(),h("p",Vv,d(i(o)("notice.noContactKept")),1))],512)):(m(),h("form",{key:1,class:"bcm-form",novalidate:"",onSubmit:z[6]||(z[6]=Bt(D=>v.value.submit(),["prevent"]))},[f("p",null,d(i(o)("notice.lede")),1),f("div",Wv,[f("span",Kv,d(i(o)("notice.target")),1),f("span",null,d(j.value),1)]),f("fieldset",Yv,[f("legend",null,d(i(o)("notice.category")),1),(m(!0),h(G,null,ke(i(Gr),D=>(m(),h("label",{key:D,class:"bcm-choice"},[f("input",{type:"radio",name:`${i(r)}-category`,value:D,checked:T.value.category===D,onChange:J=>v.value.setCategory(D)},null,40,Gv),f("span",null,d(i(o)(I(D))),1)]))),128))]),T.value.category==="rules"&&T.value.rules&&T.value.rules.length?(m(),h("div",Zv,[f("label",{for:`${i(r)}-rule`},d(i(o)("notice.rule")),9,Jv),xe(f("select",{id:`${i(r)}-rule`,"onUpdate:modelValue":z[1]||(z[1]=D=>T.value.ruleId=D),class:"bcm-input"},[z[7]||(z[7]=f("option",{value:""},null,-1)),(m(!0),h(G,null,ke(T.value.rules,D=>(m(),h("option",{key:D.id,value:D.id},d(D.title),9,Qv))),128))],8,Xv),[[Er,T.value.ruleId]])])):M("",!0),f("div",e_,[f("label",{for:`${i(r)}-description`},d(i(o)("notice.description")),9,t_),xe(f("textarea",{id:`${i(r)}-description`,"onUpdate:modelValue":z[2]||(z[2]=D=>T.value.description=D),class:"bcm-input bcm-textarea",rows:"5","aria-describedby":`${i(r)}-description-hint`,"aria-invalid":v.value.descriptionLength()>i(Ro)},null,8,n_),[[dt,T.value.description]]),f("p",{id:`${i(r)}-description-hint`,class:"bcm-hint"},d(i(o)("notice.descriptionHint"))+" "+d(i(o)("notice.counter",{length:v.value.descriptionLength(),max:i(Ro)})),9,s_)]),v.value.contactAllowed()?(m(),h("fieldset",o_,[f("legend",null,d(i(o)("notice.contactTitle")),1),f("p",i_,d(i(o)("notice.contactHint")),1),f("div",r_,[f("label",{for:`${i(r)}-name`},d(i(o)("notice.name")),9,a_),xe(f("input",{id:`${i(r)}-name`,"onUpdate:modelValue":z[3]||(z[3]=D=>T.value.name=D),class:"bcm-input",autocomplete:"name",maxlength:i(Br)},null,8,l_),[[dt,T.value.name]])]),f("div",c_,[f("label",{for:`${i(r)}-email`},d(i(o)("notice.email")),9,u_),xe(f("input",{id:`${i(r)}-email`,"onUpdate:modelValue":z[4]||(z[4]=D=>T.value.email=D),class:"bcm-input",type:"email",autocomplete:"email","aria-invalid":!!T.value.failure?.fields?.includes("notifier.email")},null,8,d_),[[dt,T.value.email]])])])):(m(),h("p",f_,d(i(o)("notice.childAtRisk")),1)),T.value.captcha!=="off"?(m(),h("div",p_,[Ic(C.$slots,"turnstile"),T.value.captcha==="unavailable"?(m(),h("p",m_,d(i(o)("notice.captchaUnavailable")),1)):M("",!0)])):M("",!0),f("label",h_,[xe(f("input",{"onUpdate:modelValue":z[5]||(z[5]=D=>T.value.goodFaith=D),type:"checkbox"},null,512),[[Ms,T.value.goodFaith]]),f("span",null,d(i(o)("confirm.good_faith")),1)]),k.value?(m(),h("p",b_,d(k.value),1)):M("",!0),f("div",g_,[z[8]||(z[8]=f("span",{class:"bcm-spacer"},null,-1)),f("button",{type:"submit",class:"bcm-btn bcm-primary",disabled:!v.value.canSubmit()},d(T.value.sending?i(o)("notice.sending"):i(o)("notice.submit")),9,y_)])],32))],8,Uv)):i($)?(m(),h("section",{key:1,class:"bcm bcm-notice",lang:s.value,"aria-labelledby":`${i(r)}-title`},[f("h2",{id:`${i(r)}-title`},d(i(o)("notice.title")),9,__),f("p",null,d(i(o)("notice.noTarget")),1),f("p",null,[f("a",{href:u.value.rulesPath},d(i(o)("onboarding.rulesTitle")),9,k_)])],8,v_)):M("",!0)}});function x_(e){const{client:t}=e,n=new AbortController,s={signal:n.signal};let o=!1,r=0;const a=He({phase:"idle",failure:null,items:[],nextCursor:null,unreadOnly:!1,loadingMore:!1,busy:{},announcement:null,announceId:0}),c=v=>{a.announcement=v,a.announceId+=1},l=v=>({key:`error.${v.code}`}),p=v=>v.filter(x=>Yr(x.code));async function u(){const v=++r;a.phase="loading",a.failure=null;const x=await t.me.notifications.list(a.unreadOnly?{unreadOnly:!0}:{},s);if(!(o||v!==r)){if(!x.ok){a.phase=x.code==="signIn"?"signIn":"failed",a.failure=x;return}a.items=p(x.value.items),a.nextCursor=x.value.nextCursor,a.phase="ready"}}return{state:a,load:u,async loadMore(){if(a.loadingMore||a.nextCursor===null||a.phase!=="ready")return;const v=r;a.loadingMore=!0;const x=await t.me.notifications.list({cursor:a.nextCursor,...a.unreadOnly?{unreadOnly:!0}:{}},s);if(a.loadingMore=!1,o||v!==r)return;if(!x.ok)return c(l(x));const _=new Set(a.items.map($=>$.id));a.items=[...a.items,...p(x.value.items).filter($=>!_.has($.id))],a.nextCursor=x.value.nextCursor},async setUnreadOnly(v){a.unreadOnly!==v&&(a.unreadOnly=v,await u())},async markRead(v){const x=`read:${v}`,_=a.items.find(K=>K.id===v);if(!_||_.readAt!==null||a.busy[x])return;a.busy[x]=!0;const $=await t.me.notifications.markRead({ids:[v]},s);if(delete a.busy[x],o)return;if(!$.ok)return c(l($));const T=new Date().toISOString();a.items=a.items.map(K=>K.id===v?{...K,readAt:T}:K)},async markAllRead(){if(a.busy.all||!a.items.some(_=>_.readAt===null)&&a.nextCursor===null)return;a.busy.all=!0;const v=await t.me.notifications.markRead({all:!0},s);if(delete a.busy.all,o)return;if(!v.ok)return c(l(v));const x=new Date().toISOString();a.items=a.unreadOnly?[]:a.items.map(_=>_.readAt===null?{..._,readAt:x}:_),a.unreadOnly&&(a.nextCursor=null)},unread:()=>a.items.filter(v=>v.readAt===null).length,dispose(){o=!0,n.abort()}}}const I_=["lang","aria-labelledby"],S_={class:"bcm-row"},$_=["id"],C_={key:0,class:"bcm-badge"},T_={key:0,class:"bcm-muted",role:"status"},A_={key:1,class:"bcm-row"},O_=["href"],E_={key:2,class:"bcm-banner",role:"alert"},M_={class:"bcm-row"},R_={class:"bcm-check"},N_=["checked"],P_=["disabled"],j_={key:0,class:"bcm-muted"},z_={key:1,class:"bcm-list"},L_=["id"],D_=["id","datetime"],U_={class:"bcm-row"},F_=["href"],q_=["aria-describedby","disabled","onClick"],B_={key:2,class:"bcm-row"},H_=["disabled"],V_=["href"],W_={class:"bcm-sr","aria-live":"polite"},K_=Ce({inheritAttrs:!1,__name:"NotificationCentreView",props:{apiBase:{},siteBase:{},lang:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=he(_t(t.lang,Pt())),{t:s,text:o}=Yt(n),r=Ke("bcm-centre"),a=Wt(t.siteBase),c=a===null?null:Kt(t.apiBase,t.transport,a),l=c?x_({client:c}):null,p=l?.state??null,u=H(()=>On(An(t.routes),null,a??""));bt(()=>{l?.load()}),ut(()=>l?.dispose());const v=H(()=>{const j=p?.failure;if(!j)return"";const I=Te(j,n.value);return s(I.key,I.params)});function x(){return Tn(t.signInHref,typeof location>"u"?null:location.pathname)}const _=j=>yf(j.code);function $(j){if(j.decisionId){const I=Ds(u.value.statementPath,j.decisionId);return I?{href:I,key:"sanction.statement"}:null}if(j.code==="reply"||j.code==="mention"){const I=Xd(u.value.articlePath,j.articleSlug,j.seq);return I?{href:I,key:"centre.openMessage"}:null}return j.code==="module_push_reset"?{href:u.value.settingsPath,key:"centre.settings"}:j.code==="module_read_only"||j.code==="module_braked"||j.code==="age_limit_changed"||j.code==="erasure_scheduled"||j.code==="inactivity_warning"?{href:u.value.myCommunityPath,key:"panel.title"}:null}function T(j){l?.setUnreadOnly(j.target.checked)}const K=he("");return Fe(()=>p?.announceId,()=>{K.value="";const j=o(p?.announcement);Ue(()=>{K.value=j})}),(j,I)=>i(l)&&i(p)?(m(),h("section",{key:0,class:"bcm bcm-centre",lang:n.value,"aria-labelledby":`${i(r)}-title`},[f("div",S_,[f("h2",{id:`${i(r)}-title`},d(i(s)("centre.title")),9,$_),i(p).phase==="ready"&&i(l).unread()>0?(m(),h("span",C_,d(i(s)("panel.unread",{count:i(l).unread()})),1)):M("",!0)]),i(p).phase==="loading"||i(p).phase==="idle"?(m(),h("p",T_,d(i(s)("common.loading")),1)):i(p).phase==="signIn"?(m(),h("div",A_,[f("p",null,d(i(s)("centre.signIn")),1),x()?(m(),h("a",{key:0,class:"bcm-btn bcm-primary",href:x()??void 0},d(i(s)("common.signIn")),9,O_)):M("",!0)])):i(p).phase==="failed"?(m(),h("div",E_,[f("span",null,d(v.value),1),f("button",{type:"button",class:"bcm-btn",onClick:I[0]||(I[0]=k=>i(l).load())},d(i(s)("common.retry")),1)])):(m(),h(G,{key:3},[f("div",M_,[f("label",R_,[f("input",{type:"checkbox",checked:i(p).unreadOnly,onChange:T},null,40,N_),f("span",null,d(i(s)("centre.unreadOnly")),1)]),I[3]||(I[3]=f("span",{class:"bcm-spacer"},null,-1)),i(l).unread()>0||i(p).nextCursor!==null?(m(),h("button",{key:0,type:"button",class:"bcm-btn bcm-small",disabled:!!i(p).busy.all,onClick:I[1]||(I[1]=k=>i(l).markAllRead())},d(i(s)("centre.markAllRead")),9,P_)):M("",!0)]),i(p).items.length===0?(m(),h("p",j_,d(i(s)("centre.empty")),1)):(m(),h("ul",z_,[(m(!0),h(G,null,ke(i(p).items,k=>(m(),h("li",{key:k.id,class:at({"bcm-unread":k.readAt===null})},[_(k)?(m(),h("p",{key:0,id:`${i(r)}-s-${k.id}`},d(i(s)(_(k))),9,L_)):M("",!0),f("time",{id:`${i(r)}-t-${k.id}`,class:"bcm-time",datetime:k.createdAt},d(i(ze)(n.value,k.createdAt)),9,D_),f("div",U_,[$(k)?(m(),h("a",{key:0,href:$(k).href},d(i(s)($(k).key)),9,F_)):M("",!0),I[4]||(I[4]=f("span",{class:"bcm-spacer"},null,-1)),k.readAt===null?(m(),h("button",{key:1,type:"button",class:"bcm-btn bcm-small","aria-describedby":_(k)?`${i(r)}-s-${k.id} ${i(r)}-t-${k.id}`:`${i(r)}-t-${k.id}`,disabled:!!i(p).busy[`read:${k.id}`],onClick:O=>i(l).markRead(k.id)},d(i(s)("panel.markRead")),9,q_)):M("",!0)])],2))),128))])),i(p).nextCursor!==null?(m(),h("div",B_,[f("button",{type:"button",class:"bcm-btn",disabled:i(p).loadingMore,onClick:I[2]||(I[2]=k=>i(l).loadMore())},d(i(s)("centre.loadMore")),9,H_)])):M("",!0),f("p",null,[f("a",{href:u.value.settingsPath},d(i(s)("centre.settings")),9,V_)])],64)),f("p",W_,d(K.value),1)],8,I_)):M("",!0)}});function tl(e){if(typeof e!="string")return null;const t=e.trim().replace(/^@/,"").toLowerCase();return Yn.test(t)?t:null}function Y_(e){const{client:t}=e,n=new AbortController,s={signal:n.signal};let o=!1,r=0;const a=He({phase:"idle",failure:null,author:null,memberSince:null,bio:null,trustKey:null});return{state:a,async load(c){const l=++r;a.failure=null,a.author=null,a.memberSince=null,a.bio=null,a.trustKey=null;const p=tl(c);if(p===null){a.phase="notFound";return}a.phase="loading";const u=await t.profile.get({handle:p},s);if(o||l!==r)return;if(!u.ok){a.phase=u.code==="signIn"?"signIn":u.code==="notFound"?"notFound":"failed",a.failure=u;return}const v=u.value;if(!cd(v.author)||v.author.kind!=="member"||v.author.memberId===null){a.phase="notFound";return}a.author=v.author,a.memberSince=typeof v.memberSince=="string"?v.memberSince:null,a.bio=typeof v.bio=="string"&&v.bio.trim()!==""?v.bio:null,a.trustKey=vf(v.trustLabel),a.phase="ready"},dispose(){o=!0,n.abort()}}}function G_(e){const{client:t}=e,n=new AbortController,s={signal:n.signal};let o=!1;const r=He({phase:"idle",rules:[],rulesFailed:!1,handle:null,visitor:!1});return{state:r,async load(){r.phase="loading";const[a,c]=await Promise.all([t.legal.current({kind:"rules",locale:e.lang},s),t.me.get(s)]);o||(a.ok?r.rules=Ps(a.value.bodyJson):r.rulesFailed=!0,c.ok?(r.visitor=c.value.needs.includes("sign_in"),r.handle=c.value.member?tl(c.value.profile?.handle):null):r.visitor=c.code==="signIn",r.phase="ready")},dispose(){o=!0,n.abort()}}}const Z_=["lang","aria-labelledby"],J_={key:0,class:"bcm-muted",role:"status"},X_=["id"],Q_={key:2,class:"bcm-row"},ek=["id"],tk=["href"],nk={key:3,class:"bcm-banner",role:"alert"},sk=["id"],ok={class:"bcm-profile-head"},ik={class:"bcm-msg-main"},rk=["id"],ak={class:"bcm-handle"},lk={key:0},ck={class:"bcm-badge"},uk={key:1,class:"bcm-muted"},dk=["aria-labelledby"],fk=["id"],pk={class:"bcm-text"},mk=Ce({inheritAttrs:!1,__name:"ProfileView",props:{handle:{},apiBase:{},siteBase:{},lang:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=he(_t(t.lang,Pt())),{t:s}=Yt(n),o=Ke("bcm-profile"),r=Wt(t.siteBase),a=r===null?null:Kt(t.apiBase,t.transport,r),c=a?Y_({client:a}):null,l=c?.state??null;bt(()=>{c?.load(t.handle??"")}),Fe(()=>t.handle,(x,_)=>{x!==_&&c?.load(x??"")}),ut(()=>c?.dispose());const p=H(()=>l?.memberSince?jf(n.value,l.memberSince):""),u=H(()=>{const x=l?.failure;if(!x)return"";const _=Te(x,n.value);return s(_.key,_.params)});function v(){return Tn(t.signInHref,typeof location>"u"?null:location.pathname)}return(x,_)=>i(c)&&i(l)?(m(),h("section",{key:0,class:"bcm bcm-profile",lang:n.value,"aria-labelledby":`${i(o)}-title`},[i(l).phase==="loading"||i(l).phase==="idle"?(m(),h("p",J_,d(i(s)("common.loading")),1)):i(l).phase==="notFound"?(m(),h("p",{key:1,id:`${i(o)}-title`,class:"bcm-note"},d(i(s)("profile.notFound")),9,X_)):i(l).phase==="signIn"?(m(),h("div",Q_,[f("p",{id:`${i(o)}-title`},d(i(s)("profile.signIn")),9,ek),v()?(m(),h("a",{key:0,class:"bcm-btn bcm-primary",href:v()??void 0},d(i(s)("common.signIn")),9,tk)):M("",!0)])):i(l).phase==="failed"?(m(),h("div",nk,[f("span",{id:`${i(o)}-title`},d(u.value),9,sk),f("button",{type:"button",class:"bcm-btn",onClick:_[0]||(_[0]=$=>i(c).load(t.handle??""))},d(i(s)("common.retry")),1)])):i(l).author&&i(l).author.kind==="member"?(m(),h(G,{key:4},[f("header",ok,[Ee(Yo,{author:i(l).author},null,8,["author"]),f("div",ik,[f("h2",{id:`${i(o)}-title`},d(i(l).author.displayName),9,rk),f("span",ak,d(i(l).author.handle),1)])]),i(l).trustKey?(m(),h("p",lk,[f("span",ck,d(i(s)(i(l).trustKey)),1)])):M("",!0),p.value?(m(),h("p",uk,d(i(s)("profile.memberSince",{date:p.value})),1)):M("",!0),i(l).bio?(m(),h("section",{key:2,class:"bcm-section","aria-labelledby":`${i(o)}-bio`},[f("h3",{id:`${i(o)}-bio`},d(i(s)("profile.bio")),9,fk),f("p",pk,d(i(l).bio),1)],8,dk)):M("",!0)],64)):M("",!0)],8,Z_)):M("",!0)}}),hk=["lang","aria-labelledby"],bk=["id"],gk={key:0,class:"bcm-muted",role:"status"},yk=["aria-labelledby"],vk=["id"],_k={key:0,class:"bcm-rules"},kk={key:0,class:"bcm-hint"},wk=["href"],xk={class:"bcm-links"},Ik=["href"],Sk=["href"],$k={key:0},Ck=["href"],Tk={key:1},Ak=["href"],Ok=Ce({inheritAttrs:!1,__name:"WelcomeView",props:{apiBase:{},siteBase:{},lang:{},routes:{},signInHref:{},transport:{type:Function}},setup(e){const t=e,n=he(_t(t.lang,Pt())),{t:s}=Yt(n),o=Ke("bcm-welcome"),r=Wt(t.siteBase),a=r===null?null:Kt(t.apiBase,t.transport,r),c=a?G_({client:a,lang:n.value}):null,l=c?.state??null,p=H(()=>On(An(t.routes),null,r??"")),u=H(()=>l?.handle?ma(p.value.profilePath,l.handle):null);bt(()=>{c?.load()}),ut(()=>c?.dispose());function v(){return Tn(t.signInHref,typeof location>"u"?null:location.pathname)}return(x,_)=>i(c)&&i(l)?(m(),h("section",{key:0,class:"bcm bcm-welcome",lang:n.value,"aria-labelledby":`${i(o)}-title`},[f("h2",{id:`${i(o)}-title`},d(i(s)("welcome.title")),9,bk),f("p",null,d(i(s)("welcome.lede")),1),i(l).phase!=="ready"?(m(),h("p",gk,d(i(s)("common.loading")),1)):(m(),h(G,{key:1},[f("section",{class:"bcm-section","aria-labelledby":`${i(o)}-rules`},[f("h3",{id:`${i(o)}-rules`},d(i(s)("welcome.rules")),9,vk),i(l).rules.length?(m(),h("ol",_k,[(m(!0),h(G,null,ke(i(l).rules,$=>(m(),h("li",{key:$.id},[f("strong",null,d($.title),1),$.summary?(m(),h("span",kk,d($.summary),1)):M("",!0)]))),128))])):M("",!0),f("p",null,[f("a",{href:p.value.rulesPath},d(i(s)("onboarding.rulesLink")),9,wk)])],8,yk),f("ul",xk,[f("li",null,[f("a",{class:"bcm-btn",href:p.value.discussionsPath},d(i(s)("welcome.discussions")),9,Ik)]),f("li",null,[f("a",{class:"bcm-btn",href:p.value.settingsPath},d(i(s)("welcome.settings")),9,Sk)]),u.value?(m(),h("li",$k,[f("a",{class:"bcm-btn",href:u.value},d(i(s)("welcome.profile")),9,Ck)])):i(l).visitor&&v()?(m(),h("li",Tk,[f("a",{class:"bcm-btn bcm-primary",href:v()??void 0},d(i(s)("common.signIn")),9,Ak)])):M("",!0)])],64))],8,hk)):M("",!0)}}),Ek=':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}}}';function Mk(){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 nl="blogmcp-discussion",sl="blogmcp-notice-form",ol="blogmcp-my-community",il="blogmcp-notification-centre",rl="blogmcp-badge",al="blogmcp-member-settings",ll="blogmcp-profile",cl="blogmcp-welcome";function Rk(e){const t=e.nonce;return typeof t=="string"&&t!==""?t:e.getAttribute("nonce")||void 0}function Nk(e,t){const n=Au(e);return class extends n{connectedCallback(){const o=Rk(this),r=t||o;r&&!o&&(this.nonce=r);const a=this.shadowRoot;if(a&&!a.querySelector("style[data-bcm]")){const c=document.createElement("style");c.setAttribute("data-bcm",""),r&&c.setAttribute("nonce",r),c.textContent=Ek,a.prepend(c)}super.connectedCallback()}}}function Gt(e,t,n){typeof customElements>"u"||customElements.get(e)||(Mk(),customElements.define(e,Nk(t,n)))}function ul(e={}){Gt(e.tag??nl,hb,e.nonce)}function dl(e={}){Gt(e.tag??sl,w_,e.nonce)}function fl(e={}){Gt(e.tag??ol,Pv,e.nonce)}function pl(e={}){Gt(e.tag??il,K_,e.nonce)}function ml(e={}){Gt(e.tag??rl,Rf,e.nonce)}function hl(e={}){Gt(e.tag??al,tg,e.nonce)}function bl(e={}){Gt(e.tag??ll,mk,e.nonce)}function gl(e={}){Gt(e.tag??cl,Ok,e.nonce)}function yl(e={}){ul({tag:e.tags?.discussion,nonce:e.nonce}),dl({tag:e.tags?.noticeForm,nonce:e.nonce}),fl({tag:e.tags?.myCommunity,nonce:e.nonce}),pl({tag:e.tags?.notificationCentre,nonce:e.nonce}),ml({tag:e.tags?.badge,nonce:e.nonce}),hl({tag:e.tags?.memberSettings,nonce:e.nonce}),bl({tag:e.tags?.profile,nonce:e.nonce}),gl({tag:e.tags?.welcome,nonce:e.nonce})}function Zt(e,t){for(const[n,s]of Object.entries(t))s!=null&&s!==""&&e.setAttribute(n,String(s))}function Jt(e,t){return t.transport&&(e.transport=t.transport),(t.container??document.body).appendChild(e),()=>e.remove()}function Pk(e){if(typeof document>"u")return()=>{};ul({nonce:e.nonce});const t=document.createElement(nl);return Zt(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),Jt(t,e)}function jk(e){if(typeof document>"u")return()=>{};dl({nonce:e.nonce});const t=document.createElement(sl);return Zt(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}),Jt(t,e)}function zk(e={}){if(typeof document>"u")return()=>{};fl({nonce:e.nonce});const t=document.createElement(ol);return Zt(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}),Jt(t,e)}function Lk(e={}){if(typeof document>"u")return()=>{};pl({nonce:e.nonce});const t=document.createElement(il);return Zt(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}),Jt(t,e)}function Dk(e={}){if(typeof document>"u")return()=>{};ml({nonce:e.nonce});const t=document.createElement(rl);return Zt(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}),Jt(t,e)}function Uk(e={}){if(typeof document>"u")return()=>{};hl({nonce:e.nonce});const t=document.createElement(al);return Zt(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}),Jt(t,e)}function Fk(e){if(typeof document>"u")return()=>{};bl({nonce:e.nonce});const t=document.createElement(ll);return Zt(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}),Jt(t,e)}function qk(e={}){if(typeof document>"u")return()=>{};gl({nonce:e.nonce});const t=document.createElement(cl);return Zt(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}),Jt(t,e)}const Bk="0.2.0",Hk=typeof document<"u"?document.currentScript:null;return yl({nonce:Hk?.nonce||void 0}),et.VERSION=Bk,et.defineCommunityElements=yl,et.mountBadge=Dk,et.mountDiscussion=Pk,et.mountMemberSettings=Uk,et.mountMyCommunity=zk,et.mountNoticeForm=jk,et.mountNotificationCentre=Lk,et.mountProfile=Fk,et.mountWelcome=qk,Object.defineProperty(et,Symbol.toStringTag,{value:"Module"}),et})({});
|