@ai-hero/cookout 0.1.1 → 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.
@@ -0,0 +1,82 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function u(e){return typeof e.parent.closedAt!=`string`}function d(e){return e.filter(e=>u(e))}function f({items:e,parent:t}){let n=!1;for(let[r,i]of e)i.parent.id===t.id&&(e.set(r,{...i,parent:t}),n=!0);return n}function p(e,t){return t===null?e:`${e}/${String(t)}`}function m(e){return e.kind===`reply`?p(e.channel,e.replyTo):p(e.channel,null)}function h(e){return[...e].toSorted((e,t)=>e.message.id-t.message.id)}var g=0,_=1;function v(e,t){let n=e.get(m(t))??null;return n!==null&&t.id<=n}function y(e){return e.reasons.includes(`reaction`)}function b(e,t){let{message:n}=t;return m(n)===p(e.channel,e.thread)&&n.id<=e.messageId}function x({acked:e,positions:t},n){return y(n)?e.some(e=>b(e,n)):v(t,n.message)}function S(e,t){let n=p(t.channel,t.thread);(e.get(n)??t.messageId)<=t.messageId&&e.set(n,t.messageId)}function C(e,t){let n=[];for(let[r,i]of t){let t=e.get(r)??null;t!==null&&n.push({...i,messageId:t})}return n}function w({moves:e,positions:t},{channel:n,messageId:r,thread:i}){let a=p(n,i);t.delete(a),r!==null&&t.set(a,r),e.set(a,(e.get(a)??g)+_)}function T({acked:e,all:t,items:n,onRead:r,places:i,positions:a}){for(let e of t)S(a,e),i.set(p(e.channel,e.thread),{channel:e.channel,thread:e.thread});for(let[t,i]of n)x({acked:e,positions:a},i)&&(n.delete(t),r(i))}function E({addAll:e,items:t,onRead:n,places:r,positions:i},a){return a.type===`inbox-item`?(e([a.item]),!0):a.type===`read-position`?(T({acked:[a.readPosition],all:[a.readPosition],items:t,onRead:n,places:r,positions:i}),!0):a.type===`thread`&&f({items:t,parent:a.parent})}function ee(){let e=new Map,t=new Map,n=new Map,r={moves:new Map,positions:t};function i(e){return v(t,e)}function a(t){for(let n of t)(y(n)||!i(n.message))&&e.set(n.message.id,n)}function o(r,i){T({acked:[],all:r,items:e,onRead:i,places:n,positions:t})}return{addAll:a,has:t=>e.has(t),inbox:()=>d(h(e.values())),isRead:i,list:()=>h(e.values()),moveBack:e=>{n.set(p(e.channel,e.thread),{channel:e.channel,thread:e.thread}),w(r,e)},movesBack:(e,t)=>r.moves.get(p(e,t))??g,readAll:o,readPosition:(e,n)=>t.get(p(e,n))??null,readPositions:()=>C(t,n),receive:(r,i)=>E({addAll:a,items:e,onRead:i,places:n,positions:t},r)}}function te(e){let{inbox:t,items:n,onAlerts:r,onDeactivatedQuietAgents:i,onDeactivationOffers:a,onNudges:o}=e;n.addAll(t.items),r(t.alerts),o(t.nudges),a(t.deactivationOffers),i(t.deactivatedQuietAgents)}async function D(e){let{client:t,items:n,onRead:r}=e,[i,{readPositions:a}]=await Promise.all([t.inbox(),t.readPositions()]);n.readAll(a,r),te({...e,inbox:i})}function ne({channel:e,thread:t}){return`${e}/${String(t)}`}function re(e){return new Map(e.map(e=>[ne(e),e.messageId]))}function O({before:e,now:t},n){return(e.get(n)??null)===(t.get(n)??null)}function ie(e,t){return e===null||e<t}function ae(e,t){let n=[];for(let{channel:r,messageId:i,thread:a}of t){let t=ne({channel:r,thread:a}),o=e.server.get(t)??null;O(e,t)&&ie(o,i)&&n.push({channel:r,messageId:o,thread:a})}return n}async function oe(e){let{items:t}=e,n=re(t.readPositions()),[r,{readPositions:i}]=await Promise.all([e.client.inbox(),e.client.readPositions()]),a=t.readPositions(),o={before:n,now:re(a),server:re(i)};for(let t of ae(o,a))e.moveBack(t);let s=i.filter(e=>O(o,ne(e)));t.readAll(s,e.onRead),te({...e,inbox:r})}function k(e){let t=Promise.resolve();async function n(t){await t,await Promise.allSettled([oe(e)]),e.onChange()}return()=>{t=n(t)}}function se(e){let t=new Set,n=e;return{current:()=>n,publish:e=>{n=e;for(let e of t)e()},subscribe:e=>(t.add(e),()=>{t.delete(e)})}}var ce={limit:1};function le(e){return[...e].toSorted((e,t)=>t.id-e.id)}function ue(e,t){let n=new Map,r=!1;function i(){return le(n.values()).filter(({read:e})=>!e)}function a(a){for(let e of a)n.set(e.id,e);r&&e.publish({alerts:le(n.values()),status:`loaded`}),t(i())}return{addAll:a,historyRead:()=>{r=!0},unread:i}}function de(e){let[t=null]=e;return t===null?null:t.id}function fe({client:e,onChange:t}){let n=se({status:`loading`}),r=ue(n,t),i=null,a=Promise.resolve();async function o(){try{let{alerts:t}=await e.inboxHistory(ce);r.historyRead(),r.addAll(t)}catch{n.publish({status:`failed`})}}async function s(t,n){await t;try{let{alert:t}=await e.markOfflineAlertRead(n);r.addAll([t])}catch{r.addAll([])}}return{addAll:r.addAll,markRead:e=>{a=s(a,e)},newestUnread:()=>de(r.unread()),receive:e=>e.type===`offline-alert`&&(r.addAll([e.alert]),!0),snapshot:n.current,subscribe:e=>(i??=o(),n.subscribe(e)),unread:r.unread}}var pe=M,me={anyOf:[{type:`object`,properties:{status:{type:`string`,enum:[`pending`]}},required:[`status`],additionalProperties:!0},{type:`object`,properties:{agentSession:{type:`object`,properties:{agentSessionToken:{$ref:`#/$defs/Token`},created:{type:`boolean`},expiresAt:{$ref:`#/$defs/IsoTime`},identity:{$ref:`#/$defs/IdentityName`},issuedAt:{$ref:`#/$defs/IsoTime`}},required:[`agentSessionToken`,`created`,`expiresAt`,`identity`,`issuedAt`],additionalProperties:!0},status:{type:`string`,enum:[`approved`]}},required:[`agentSession`,`status`],additionalProperties:!0}],$defs:{Token:{type:`string`,pattern:`^cookout_[A-Za-z0-9_-]+$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`}}},he=RegExp(`^cookout_[A-Za-z0-9_-]+$`,`u`),A=RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`,`u`),j=RegExp(`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`,`u`);function M(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=M.evaluated;c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0);let l=s,u=!1,d=s;if(s===d){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.status===void 0&&(n=`status`)){let e={instancePath:t,schemaPath:`#/anyOf/0/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else if(e.status!==void 0){let n=e.status;if(typeof n!=`string`){let e={instancePath:t+`/status`,schemaPath:`#/anyOf/0/properties/status/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`pending`){let e={instancePath:t+`/status`,schemaPath:`#/anyOf/0/properties/status/enum`,keyword:`enum`,params:{allowedValues:me.anyOf[0].properties.status.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}}}else{let e={instancePath:t,schemaPath:`#/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var f=d===s;if(u||=f,f)var p=!0;let m=s;if(s===m){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.agentSession===void 0&&(n=`agentSession`)||e.status===void 0&&(n=`status`)){let e={instancePath:t,schemaPath:`#/anyOf/1/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.agentSession!==void 0){let n=e.agentSession,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.agentSessionToken===void 0&&(e=`agentSessionToken`)||n.created===void 0&&(e=`created`)||n.expiresAt===void 0&&(e=`expiresAt`)||n.identity===void 0&&(e=`identity`)||n.issuedAt===void 0&&(e=`issuedAt`)){let n={instancePath:t+`/agentSession`,schemaPath:`#/anyOf/1/properties/agentSession/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.agentSessionToken!==void 0){let e=n.agentSessionToken,r=s;if(s===s){if(typeof e==`string`){if(!he.test(e)){let e={instancePath:t+`/agentSession/agentSessionToken`,schemaPath:`#/$defs/Token/pattern`,keyword:`pattern`,params:{pattern:`^cookout_[A-Za-z0-9_-]+$`},message:`must match pattern "^cookout_[A-Za-z0-9_-]+$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/agentSession/agentSessionToken`,schemaPath:`#/$defs/Token/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=r===s}else var h=!0;if(h){if(n.created!==void 0){let e=s;if(typeof n.created!=`boolean`){let e={instancePath:t+`/agentSession/created`,schemaPath:`#/anyOf/1/properties/agentSession/properties/created/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var h=e===s}else var h=!0;if(h){if(n.expiresAt!==void 0){let e=n.expiresAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/agentSession/expiresAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/agentSession/expiresAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=r===s}else var h=!0;if(h){if(n.identity!==void 0){let e=n.identity,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/agentSession/identity`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/agentSession/identity`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=r===s}else var h=!0;if(h){if(n.issuedAt!==void 0){let e=n.issuedAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/agentSession/issuedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/agentSession/issuedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=r===s}else var h=!0}}}}}}else{let e={instancePath:t+`/agentSession`,schemaPath:`#/anyOf/1/properties/agentSession/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var g=r===s}else var g=!0;if(g){if(e.status!==void 0){let n=e.status,r=s;if(typeof n!=`string`){let e={instancePath:t+`/status`,schemaPath:`#/anyOf/1/properties/status/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`approved`){let e={instancePath:t+`/status`,schemaPath:`#/anyOf/1/properties/status/enum`,keyword:`enum`,params:{allowedValues:me.anyOf[1].properties.status.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var g=r===s}else var g=!0}}}else{let e={instancePath:t,schemaPath:`#/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var f=m===s;if(u||=f,f&&p!==!0&&(p=!0),u)s=l,o!==null&&(l?o.length=l:o=null);else{let e={instancePath:t,schemaPath:`#/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,M.errors=o,!1}return M.errors=o,c.props=p,s===0}M.evaluated={dynamicProps:!0,dynamicItems:!1};var ge=ye,_e=RegExp(`^[1-9]\\d{0,6}[smhd]$`,`u`),ve=RegExp(`^[A-Z0-9]{4}-[A-Z0-9]{4}$`,`u`);function ye(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=ye.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.agentJoinRequest===void 0&&(n=`agentJoinRequest`))return ye.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.agentJoinRequest!==void 0){let n=e.agentJoinRequest;if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.approved===void 0&&(e=`approved`)||n.as===void 0&&(e=`as`)||n.creates===void 0&&(e=`creates`)||n.expiresAt===void 0&&(e=`expiresAt`)||n.host===void 0&&(e=`host`)||n.idleExpiry===void 0&&(e=`idleExpiry`)||n.joins===void 0&&(e=`joins`)||n.userCode===void 0&&(e=`userCode`))return ye.errors=[{instancePath:t+`/agentJoinRequest`,schemaPath:`#/properties/agentJoinRequest/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.approved!==void 0){if(typeof n.approved!=`boolean`)return ye.errors=[{instancePath:t+`/agentJoinRequest/approved`,schemaPath:`#/properties/agentJoinRequest/properties/approved/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0}else var s=!0;if(s){if(n.as!==void 0){if(typeof n.as!=`string`)return ye.errors=[{instancePath:t+`/agentJoinRequest/as`,schemaPath:`#/properties/agentJoinRequest/properties/as/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.creates!==void 0){if(typeof n.creates!=`boolean`)return ye.errors=[{instancePath:t+`/agentJoinRequest/creates`,schemaPath:`#/properties/agentJoinRequest/properties/creates/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0}else var s=!0;if(s){if(n.expiresAt!==void 0){let e=n.expiresAt;if(typeof e==`string`){if(!A.test(e))return ye.errors=[{instancePath:t+`/agentJoinRequest/expiresAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return ye.errors=[{instancePath:t+`/agentJoinRequest/expiresAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.host!==void 0){let e=n.host;if(typeof e==`string`){if(e.length>253)return ye.errors=[{instancePath:t+`/agentJoinRequest/host`,schemaPath:`#/properties/agentJoinRequest/properties/host/maxLength`,keyword:`maxLength`,params:{limit:253},message:`must NOT have more than 253 characters`}],!1;if(e.length<1)return ye.errors=[{instancePath:t+`/agentJoinRequest/host`,schemaPath:`#/properties/agentJoinRequest/properties/host/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return ye.errors=[{instancePath:t+`/agentJoinRequest/host`,schemaPath:`#/properties/agentJoinRequest/properties/host/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.idleExpiry!==void 0){let e=n.idleExpiry;if(typeof e==`string`){if(!_e.test(e))return ye.errors=[{instancePath:t+`/agentJoinRequest/idleExpiry`,schemaPath:`#/properties/agentJoinRequest/properties/idleExpiry/pattern`,keyword:`pattern`,params:{pattern:`^[1-9]\\d{0,6}[smhd]$`},message:`must match pattern "^[1-9]\\d{0,6}[smhd]$"`}],!1}else return ye.errors=[{instancePath:t+`/agentJoinRequest/idleExpiry`,schemaPath:`#/properties/agentJoinRequest/properties/idleExpiry/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.joins!==void 0){let e=n.joins;if(typeof e==`string`){if(!j.test(e))return ye.errors=[{instancePath:t+`/agentJoinRequest/joins`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return ye.errors=[{instancePath:t+`/agentJoinRequest/joins`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.liveSessionExpiresAt!==void 0){let e=n.liveSessionExpiresAt;if(typeof e==`string`){if(!A.test(e))return ye.errors=[{instancePath:t+`/agentJoinRequest/liveSessionExpiresAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return ye.errors=[{instancePath:t+`/agentJoinRequest/liveSessionExpiresAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.userCode!==void 0){let e=n.userCode;if(typeof e==`string`){if(!ve.test(e))return ye.errors=[{instancePath:t+`/agentJoinRequest/userCode`,schemaPath:`#/properties/agentJoinRequest/properties/userCode/pattern`,keyword:`pattern`,params:{pattern:`^[A-Z0-9]{4}-[A-Z0-9]{4}$`},message:`must match pattern "^[A-Z0-9]{4}-[A-Z0-9]{4}$"`}],!1}else return ye.errors=[{instancePath:t+`/agentJoinRequest/userCode`,schemaPath:`#/properties/agentJoinRequest/properties/userCode/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}}}}}}}else return ye.errors=[{instancePath:t+`/agentJoinRequest`,schemaPath:`#/properties/agentJoinRequest/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return ye.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return ye.errors=null,!0}ye.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var be=xe;function xe(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=xe.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.approvalPath===void 0&&(n=`approvalPath`)||e.expiresAt===void 0&&(n=`expiresAt`)||e.requestId===void 0&&(n=`requestId`)||e.userCode===void 0&&(n=`userCode`))return xe.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.approvalPath!==void 0){if(typeof e.approvalPath!=`string`)return xe.errors=[{instancePath:t+`/approvalPath`,schemaPath:`#/properties/approvalPath/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.expiresAt!==void 0){let n=e.expiresAt;if(typeof n==`string`){if(!A.test(n))return xe.errors=[{instancePath:t+`/expiresAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return xe.errors=[{instancePath:t+`/expiresAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.requestId!==void 0){let n=e.requestId;if(typeof n==`string`){if(!he.test(n))return xe.errors=[{instancePath:t+`/requestId`,schemaPath:`#/$defs/Token/pattern`,keyword:`pattern`,params:{pattern:`^cookout_[A-Za-z0-9_-]+$`},message:`must match pattern "^cookout_[A-Za-z0-9_-]+$"`}],!1}else return xe.errors=[{instancePath:t+`/requestId`,schemaPath:`#/$defs/Token/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.userCode!==void 0){let n=e.userCode;if(typeof n==`string`){if(!ve.test(n))return xe.errors=[{instancePath:t+`/userCode`,schemaPath:`#/properties/userCode/pattern`,keyword:`pattern`,params:{pattern:`^[A-Z0-9]{4}-[A-Z0-9]{4}$`},message:`must match pattern "^[A-Z0-9]{4}-[A-Z0-9]{4}$"`}],!1}else return xe.errors=[{instancePath:t+`/userCode`,schemaPath:`#/properties/userCode/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}}else return xe.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return xe.errors=null,!0}xe.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Se=Ce;function Ce(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=Ce.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.agentSessionToken===void 0&&(n=`agentSessionToken`)||e.created===void 0&&(n=`created`)||e.expiresAt===void 0&&(n=`expiresAt`)||e.identity===void 0&&(n=`identity`)||e.issuedAt===void 0&&(n=`issuedAt`))return Ce.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.agentSessionToken!==void 0){let n=e.agentSessionToken;if(typeof n==`string`){if(!he.test(n))return Ce.errors=[{instancePath:t+`/agentSessionToken`,schemaPath:`#/$defs/Token/pattern`,keyword:`pattern`,params:{pattern:`^cookout_[A-Za-z0-9_-]+$`},message:`must match pattern "^cookout_[A-Za-z0-9_-]+$"`}],!1}else return Ce.errors=[{instancePath:t+`/agentSessionToken`,schemaPath:`#/$defs/Token/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.created!==void 0){if(typeof e.created!=`boolean`)return Ce.errors=[{instancePath:t+`/created`,schemaPath:`#/properties/created/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0}else var s=!0;if(s){if(e.expiresAt!==void 0){let n=e.expiresAt;if(typeof n==`string`){if(!A.test(n))return Ce.errors=[{instancePath:t+`/expiresAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Ce.errors=[{instancePath:t+`/expiresAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.identity!==void 0){let n=e.identity;if(typeof n==`string`){if(!j.test(n))return Ce.errors=[{instancePath:t+`/identity`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return Ce.errors=[{instancePath:t+`/identity`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.issuedAt!==void 0){let n=e.issuedAt;if(typeof n==`string`){if(!A.test(n))return Ce.errors=[{instancePath:t+`/issuedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Ce.errors=[{instancePath:t+`/issuedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}}}else return Ce.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return Ce.errors=null,!0}Ce.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var we=Ee,Te={type:`object`,properties:{expiresAt:{$ref:`#/$defs/IsoTime`},identity:{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0},joinCode:{$ref:`#/$defs/Token`}},required:[`expiresAt`,`identity`,`joinCode`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},Token:{type:`string`,pattern:`^cookout_[A-Za-z0-9_-]+$`}}},N=RegExp(`^\\S[\\s\\S]*\\S$|^\\S$|^$`,`u`),P=RegExp(`^[a-z0-9-]{1,64}$`,`u`);function Ee(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=Ee.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.expiresAt===void 0&&(n=`expiresAt`)||e.identity===void 0&&(n=`identity`)||e.joinCode===void 0&&(n=`joinCode`))return Ee.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.expiresAt!==void 0){let n=e.expiresAt;if(typeof n==`string`){if(!A.test(n))return Ee.errors=[{instancePath:t+`/expiresAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Ee.errors=[{instancePath:t+`/expiresAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.identity!==void 0){let n=e.identity;if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)||n.owner===void 0&&(e=`owner`))return Ee.errors=[{instancePath:t+`/identity`,schemaPath:`#/properties/identity/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.admin!==void 0){if(typeof n.admin!=`boolean`)return Ee.errors=[{instancePath:t+`/identity/admin`,schemaPath:`#/properties/identity/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var c=!0}else var c=!0;if(c){if(n.createdAt!==void 0){let e=n.createdAt;if(typeof e==`string`){if(!A.test(e))return Ee.errors=[{instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Ee.errors=[{instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var c=!0}else var c=!0;if(c){if(n.deactivated!==void 0){let e=n.deactivated;if(typeof e!=`boolean`)return Ee.errors=[{instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;if(e!==!0)return Ee.errors=[{instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:Te.properties.identity.properties.deactivated.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0}else var c=!0;if(c){if(n.description!==void 0){let e=n.description;if(typeof e==`string`){if(e.length>500)return Ee.errors=[{instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(e.length<1)return Ee.errors=[{instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1;if(!N.test(e))return Ee.errors=[{instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`}],!1}else return Ee.errors=[{instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var c=!0}else var c=!0;if(c){if(n.displayName!==void 0){let e=n.displayName;if(typeof e==`string`){if(e.length>80)return Ee.errors=[{instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`}],!1;if(e.length<1)return Ee.errors=[{instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1;if(!N.test(e))return Ee.errors=[{instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`}],!1}else return Ee.errors=[{instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var c=!0}else var c=!0;if(c){if(n.handler!==void 0){let e=n.handler;if(typeof e!=`boolean`)return Ee.errors=[{instancePath:t+`/identity/handler`,schemaPath:`#/properties/identity/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;if(e!==!0)return Ee.errors=[{instancePath:t+`/identity/handler`,schemaPath:`#/properties/identity/properties/handler/enum`,keyword:`enum`,params:{allowedValues:Te.properties.identity.properties.handler.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0}else var c=!0;if(c){if(n.kind!==void 0){let e=n.kind;if(typeof e!=`string`)return Ee.errors=[{instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`agent`)return Ee.errors=[{instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Te.properties.identity.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0}else var c=!0;if(c){if(n.name!==void 0){let e=n.name;if(typeof e==`string`){if(!j.test(e))return Ee.errors=[{instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return Ee.errors=[{instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var c=!0}else var c=!0;if(c){if(n.owner!==void 0){let e=n.owner;if(typeof e==`string`){if(!P.test(e))return Ee.errors=[{instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return Ee.errors=[{instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var c=!0}else var c=!0}}}}}}}}}else return Ee.errors=[{instancePath:t+`/identity`,schemaPath:`#/properties/identity/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var s=!0}else var s=!0;if(s){if(e.joinCode!==void 0){let n=e.joinCode;if(typeof n==`string`){if(!he.test(n))return Ee.errors=[{instancePath:t+`/joinCode`,schemaPath:`#/$defs/Token/pattern`,keyword:`pattern`,params:{pattern:`^cookout_[A-Za-z0-9_-]+$`},message:`must match pattern "^cookout_[A-Za-z0-9_-]+$"`}],!1}else return Ee.errors=[{instancePath:t+`/joinCode`,schemaPath:`#/$defs/Token/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}else return Ee.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return Ee.errors=null,!0}Ee.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var De=ke,Oe={type:`object`,properties:{revoked:{type:`boolean`,enum:[!0]}},required:[`revoked`],additionalProperties:!0,$defs:{}};function ke(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=ke.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.revoked===void 0&&(n=`revoked`))return ke.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.revoked!==void 0){let n=e.revoked;if(typeof n!=`boolean`)return ke.errors=[{instancePath:t+`/revoked`,schemaPath:`#/properties/revoked/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;if(n!==!0)return ke.errors=[{instancePath:t+`/revoked`,schemaPath:`#/properties/revoked/enum`,keyword:`enum`,params:{allowedValues:Oe.properties.revoked.enum},message:`must be equal to one of the allowed values`}],!1}}else return ke.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return ke.errors=null,!0}ke.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Ae=je;function je(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=je.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.agentSessions===void 0&&(n=`agentSessions`))return je.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.agentSessions!==void 0){let n=e.agentSessions;if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r];if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.expiresAt===void 0&&(n=`expiresAt`)||e.issuedAt===void 0&&(n=`issuedAt`))return je.errors=[{instancePath:t+`/agentSessions/`+r,schemaPath:`#/properties/agentSessions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.expiresAt!==void 0){let n=e.expiresAt;if(typeof n==`string`){if(!A.test(n))return je.errors=[{instancePath:t+`/agentSessions/`+r+`/expiresAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return je.errors=[{instancePath:t+`/agentSessions/`+r+`/expiresAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.host!==void 0){let n=e.host;if(typeof n==`string`){if(n.length>253)return je.errors=[{instancePath:t+`/agentSessions/`+r+`/host`,schemaPath:`#/properties/agentSessions/items/properties/host/maxLength`,keyword:`maxLength`,params:{limit:253},message:`must NOT have more than 253 characters`}],!1;if(n.length<1)return je.errors=[{instancePath:t+`/agentSessions/`+r+`/host`,schemaPath:`#/properties/agentSessions/items/properties/host/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return je.errors=[{instancePath:t+`/agentSessions/`+r+`/host`,schemaPath:`#/properties/agentSessions/items/properties/host/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.issuedAt!==void 0){let n=e.issuedAt;if(typeof n==`string`){if(!A.test(n))return je.errors=[{instancePath:t+`/agentSessions/`+r+`/issuedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return je.errors=[{instancePath:t+`/agentSessions/`+r+`/issuedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.lastUsedAt!==void 0){let n=e.lastUsedAt;if(typeof n==`string`){if(!A.test(n))return je.errors=[{instancePath:t+`/agentSessions/`+r+`/lastUsedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return je.errors=[{instancePath:t+`/agentSessions/`+r+`/lastUsedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}}else return je.errors=[{instancePath:t+`/agentSessions/`+r,schemaPath:`#/properties/agentSessions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return je.errors=[{instancePath:t+`/agentSessions`,schemaPath:`#/properties/agentSessions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}}else return je.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return je.errors=null,!0}je.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Me=Ne;function Ne(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=Ne.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.revoked===void 0&&(n=`revoked`))return Ne.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.revoked!==void 0&&typeof e.revoked!=`boolean`)return Ne.errors=[{instancePath:t+`/revoked`,schemaPath:`#/properties/revoked/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1}else return Ne.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return Ne.errors=null,!0}Ne.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Pe=Fe,F=RegExp(`^[a-z0-9-]{1,80}$`,`u`);function Fe(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=Fe.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.channel===void 0&&(n=`channel`))return Fe.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.channel!==void 0){let n=e.channel;if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.createdAt===void 0&&(e=`createdAt`)||n.name===void 0&&(e=`name`))return Fe.errors=[{instancePath:t+`/channel`,schemaPath:`#/properties/channel/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.createdAt!==void 0){let e=n.createdAt;if(typeof e==`string`){if(!A.test(e))return Fe.errors=[{instancePath:t+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Fe.errors=[{instancePath:t+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.description!==void 0){let e=n.description;if(typeof e==`string`){if(e.length>500)return Fe.errors=[{instancePath:t+`/channel/description`,schemaPath:`#/properties/channel/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(e.length<1)return Fe.errors=[{instancePath:t+`/channel/description`,schemaPath:`#/properties/channel/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return Fe.errors=[{instancePath:t+`/channel/description`,schemaPath:`#/properties/channel/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.name!==void 0){let e=n.name;if(typeof e==`string`){if(!F.test(e))return Fe.errors=[{instancePath:t+`/channel/name`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return Fe.errors=[{instancePath:t+`/channel/name`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}else return Fe.errors=[{instancePath:t+`/channel`,schemaPath:`#/properties/channel/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return Fe.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return Fe.errors=null,!0}Fe.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Ie=Le;function Le(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=Le.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.channels===void 0&&(n=`channels`))return Le.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.channels!==void 0){let n=e.channels;if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r];if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.createdAt===void 0&&(n=`createdAt`)||e.name===void 0&&(n=`name`))return Le.errors=[{instancePath:t+`/channels/`+r,schemaPath:`#/properties/channels/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.createdAt!==void 0){let n=e.createdAt;if(typeof n==`string`){if(!A.test(n))return Le.errors=[{instancePath:t+`/channels/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Le.errors=[{instancePath:t+`/channels/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.description!==void 0){let n=e.description;if(typeof n==`string`){if(n.length>500)return Le.errors=[{instancePath:t+`/channels/`+r+`/description`,schemaPath:`#/properties/channels/items/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(n.length<1)return Le.errors=[{instancePath:t+`/channels/`+r+`/description`,schemaPath:`#/properties/channels/items/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return Le.errors=[{instancePath:t+`/channels/`+r+`/description`,schemaPath:`#/properties/channels/items/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.name!==void 0){let n=e.name;if(typeof n==`string`){if(!F.test(n))return Le.errors=[{instancePath:t+`/channels/`+r+`/name`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return Le.errors=[{instancePath:t+`/channels/`+r+`/name`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}else return Le.errors=[{instancePath:t+`/channels/`+r,schemaPath:`#/properties/channels/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return Le.errors=[{instancePath:t+`/channels`,schemaPath:`#/properties/channels/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}}else return Le.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return Le.errors=null,!0}Le.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Re=ze;function ze(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=ze.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.messageId===void 0&&(n=`messageId`)||e.threadId===void 0&&(n=`threadId`))return ze.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.messageId!==void 0){let n=e.messageId;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return ze.errors=[{instancePath:t+`/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return ze.errors=[{instancePath:t+`/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return ze.errors=[{instancePath:t+`/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var s=!0}else var s=!0;if(s){if(e.threadId!==void 0){let n=e.threadId;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return ze.errors=[{instancePath:t+`/threadId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return ze.errors=[{instancePath:t+`/threadId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return ze.errors=[{instancePath:t+`/threadId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var s=!0}else var s=!0}}else return ze.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return ze.errors=null,!0}ze.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Be=He,Ve=RegExp(`^hmac_[A-Za-z0-9_-]+$`,`u`);function He(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=He.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.command===void 0&&(n=`command`)||e.secret===void 0&&(n=`secret`))return He.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.command!==void 0){let n=e.command;if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.createdAt===void 0&&(e=`createdAt`)||n.handler===void 0&&(e=`handler`)||n.name===void 0&&(e=`name`)||n.schema===void 0&&(e=`schema`)||n.url===void 0&&(e=`url`))return He.errors=[{instancePath:t+`/command`,schemaPath:`#/properties/command/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.createdAt!==void 0){let e=n.createdAt;if(typeof e==`string`){if(!A.test(e))return He.errors=[{instancePath:t+`/command/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return He.errors=[{instancePath:t+`/command/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.description!==void 0){let e=n.description;if(typeof e==`string`){if(e.length>500)return He.errors=[{instancePath:t+`/command/description`,schemaPath:`#/properties/command/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(e.length<1)return He.errors=[{instancePath:t+`/command/description`,schemaPath:`#/properties/command/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return He.errors=[{instancePath:t+`/command/description`,schemaPath:`#/properties/command/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.handler!==void 0){let e=n.handler;if(typeof e==`string`){if(!j.test(e))return He.errors=[{instancePath:t+`/command/handler`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return He.errors=[{instancePath:t+`/command/handler`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.name!==void 0){let e=n.name;if(typeof e==`string`){if(!P.test(e))return He.errors=[{instancePath:t+`/command/name`,schemaPath:`#/$defs/CommandName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return He.errors=[{instancePath:t+`/command/name`,schemaPath:`#/$defs/CommandName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.schema!==void 0){let e=n.schema;if(!e||typeof e!=`object`||Array.isArray(e))return He.errors=[{instancePath:t+`/command/schema`,schemaPath:`#/properties/command/properties/schema/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var s=!0}else var s=!0;if(s){if(n.url!==void 0){if(typeof n.url!=`string`)return He.errors=[{instancePath:t+`/command/url`,schemaPath:`#/properties/command/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}}}}else return He.errors=[{instancePath:t+`/command`,schemaPath:`#/properties/command/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0}else var c=!0;if(c){if(e.secret!==void 0){let n=e.secret;if(typeof n==`string`){if(!Ve.test(n))return He.errors=[{instancePath:t+`/secret`,schemaPath:`#/$defs/CommandSecret/pattern`,keyword:`pattern`,params:{pattern:`^hmac_[A-Za-z0-9_-]+$`},message:`must match pattern "^hmac_[A-Za-z0-9_-]+$"`}],!1}else return He.errors=[{instancePath:t+`/secret`,schemaPath:`#/$defs/CommandSecret/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var c=!0}else var c=!0}}else return He.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return He.errors=null,!0}He.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Ue=Ge,We={type:`object`,properties:{commands:{type:`array`,items:{anyOf:[{type:`object`,properties:{createdAt:{$ref:`#/$defs/IsoTime`},description:{type:`string`,minLength:1,maxLength:500},handler:{$ref:`#/$defs/IdentityName`},name:{$ref:`#/$defs/CommandName`},schema:{type:`object`},url:{type:`string`}},required:[`createdAt`,`handler`,`name`,`schema`,`url`],additionalProperties:!0},{type:`object`,properties:{createdAt:{$ref:`#/$defs/IsoTime`},description:{type:`string`,minLength:1,maxLength:500},handler:{$ref:`#/$defs/IdentityName`},name:{$ref:`#/$defs/CommandName`},schema:{type:`object`},builtIn:{type:`boolean`,enum:[!0]}},required:[`createdAt`,`handler`,`name`,`schema`,`builtIn`],additionalProperties:!0}]}}},required:[`commands`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},CommandName:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`}}};function Ge(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=Ge.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.commands===void 0&&(n=`commands`))return Ge.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.commands!==void 0){let n=e.commands;if(s===s){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s,a=s,c=!1,p=s;if(s===p){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.createdAt===void 0&&(n=`createdAt`)||e.handler===void 0&&(n=`handler`)||e.name===void 0&&(n=`name`)||e.schema===void 0&&(n=`schema`)||e.url===void 0&&(n=`url`)){let e={instancePath:t+`/commands/`+r,schemaPath:`#/properties/commands/items/anyOf/0/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.createdAt!==void 0){let n=e.createdAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/commands/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/commands/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=i===s}else var l=!0;if(l){if(e.description!==void 0){let n=e.description,i=s;if(s===i){if(typeof n==`string`){if(n.length>500){let e={instancePath:t+`/commands/`+r+`/description`,schemaPath:`#/properties/commands/items/anyOf/0/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/commands/`+r+`/description`,schemaPath:`#/properties/commands/items/anyOf/0/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/commands/`+r+`/description`,schemaPath:`#/properties/commands/items/anyOf/0/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=i===s}else var l=!0;if(l){if(e.handler!==void 0){let n=e.handler,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/commands/`+r+`/handler`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/commands/`+r+`/handler`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=i===s}else var l=!0;if(l){if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/commands/`+r+`/name`,schemaPath:`#/$defs/CommandName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/commands/`+r+`/name`,schemaPath:`#/$defs/CommandName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=i===s}else var l=!0;if(l){if(e.schema!==void 0){let n=e.schema,i=s;if(!n||typeof n!=`object`||Array.isArray(n)){let e={instancePath:t+`/commands/`+r+`/schema`,schemaPath:`#/properties/commands/items/anyOf/0/properties/schema/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}var l=i===s}else var l=!0;if(l){if(e.url!==void 0){let n=s;if(typeof e.url!=`string`){let e={instancePath:t+`/commands/`+r+`/url`,schemaPath:`#/properties/commands/items/anyOf/0/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}var l=n===s}else var l=!0}}}}}}}else{let e={instancePath:t+`/commands/`+r,schemaPath:`#/properties/commands/items/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=p===s;if(c||=u,u)var d=!0;let m=s;if(s===m){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.createdAt===void 0&&(n=`createdAt`)||e.handler===void 0&&(n=`handler`)||e.name===void 0&&(n=`name`)||e.schema===void 0&&(n=`schema`)||e.builtIn===void 0&&(n=`builtIn`)){let e={instancePath:t+`/commands/`+r,schemaPath:`#/properties/commands/items/anyOf/1/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.createdAt!==void 0){let n=e.createdAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/commands/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/commands/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0;if(f){if(e.description!==void 0){let n=e.description,i=s;if(s===i){if(typeof n==`string`){if(n.length>500){let e={instancePath:t+`/commands/`+r+`/description`,schemaPath:`#/properties/commands/items/anyOf/1/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/commands/`+r+`/description`,schemaPath:`#/properties/commands/items/anyOf/1/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/commands/`+r+`/description`,schemaPath:`#/properties/commands/items/anyOf/1/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0;if(f){if(e.handler!==void 0){let n=e.handler,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/commands/`+r+`/handler`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/commands/`+r+`/handler`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0;if(f){if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/commands/`+r+`/name`,schemaPath:`#/$defs/CommandName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/commands/`+r+`/name`,schemaPath:`#/$defs/CommandName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0;if(f){if(e.schema!==void 0){let n=e.schema,i=s;if(!n||typeof n!=`object`||Array.isArray(n)){let e={instancePath:t+`/commands/`+r+`/schema`,schemaPath:`#/properties/commands/items/anyOf/1/properties/schema/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}var f=i===s}else var f=!0;if(f){if(e.builtIn!==void 0){let n=e.builtIn,i=s;if(typeof n!=`boolean`){let e={instancePath:t+`/commands/`+r+`/builtIn`,schemaPath:`#/properties/commands/items/anyOf/1/properties/builtIn/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/commands/`+r+`/builtIn`,schemaPath:`#/properties/commands/items/anyOf/1/properties/builtIn/enum`,keyword:`enum`,params:{allowedValues:We.properties.commands.items.anyOf[1].properties.builtIn.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=i===s}else var f=!0}}}}}}}else{let e={instancePath:t+`/commands/`+r,schemaPath:`#/properties/commands/items/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=m===s;if(c||=u,u&&d!==!0&&(d=!0),c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/commands/`+r,schemaPath:`#/properties/commands/items/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,Ge.errors=o,!1}if(i!==s)break}}else return Ge.errors=[{instancePath:t+`/commands`,schemaPath:`#/properties/commands/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}}}else return Ge.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return Ge.errors=o,s===0}Ge.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Ke=Je,qe={type:`object`,properties:{agent:{$ref:`#/$defs/IdentityName`},type:{type:`string`,enum:[`agent-session`]}},required:[`agent`,`type`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`}}};function Je(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=Je.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.agent===void 0&&(n=`agent`)||e.type===void 0&&(n=`type`))return Je.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.agent!==void 0){let n=e.agent;if(typeof n==`string`){if(!j.test(n))return Je.errors=[{instancePath:t+`/agent`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return Je.errors=[{instancePath:t+`/agent`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.type!==void 0){let n=e.type;if(typeof n!=`string`)return Je.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`agent-session`)return Je.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:qe.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0}else var s=!0}}else return Je.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return Je.errors=null,!0}Je.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Ye=Ze,Xe={type:`object`,properties:{channel:{type:`object`,properties:{createdAt:{$ref:`#/$defs/IsoTime`},description:{type:`string`,minLength:1,maxLength:500},name:{$ref:`#/$defs/ChannelName`}},required:[`createdAt`,`name`],additionalProperties:!0},type:{type:`string`,enum:[`channel-deleted`]}},required:[`channel`,`type`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`}}};function Ze(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=Ze.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.channel===void 0&&(n=`channel`)||e.type===void 0&&(n=`type`))return Ze.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.channel!==void 0){let n=e.channel;if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.createdAt===void 0&&(e=`createdAt`)||n.name===void 0&&(e=`name`))return Ze.errors=[{instancePath:t+`/channel`,schemaPath:`#/properties/channel/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.createdAt!==void 0){let e=n.createdAt;if(typeof e==`string`){if(!A.test(e))return Ze.errors=[{instancePath:t+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Ze.errors=[{instancePath:t+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.description!==void 0){let e=n.description;if(typeof e==`string`){if(e.length>500)return Ze.errors=[{instancePath:t+`/channel/description`,schemaPath:`#/properties/channel/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(e.length<1)return Ze.errors=[{instancePath:t+`/channel/description`,schemaPath:`#/properties/channel/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return Ze.errors=[{instancePath:t+`/channel/description`,schemaPath:`#/properties/channel/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.name!==void 0){let e=n.name;if(typeof e==`string`){if(!F.test(e))return Ze.errors=[{instancePath:t+`/channel/name`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return Ze.errors=[{instancePath:t+`/channel/name`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}else return Ze.errors=[{instancePath:t+`/channel`,schemaPath:`#/properties/channel/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0}else var c=!0;if(c){if(e.type!==void 0){let n=e.type;if(typeof n!=`string`)return Ze.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`channel-deleted`)return Ze.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:Xe.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0}else var c=!0}}else return Ze.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return Ze.errors=null,!0}Ze.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Qe=et,$e={type:`object`,properties:{channel:{type:`object`,properties:{createdAt:{$ref:`#/$defs/IsoTime`},description:{type:`string`,minLength:1,maxLength:500},name:{$ref:`#/$defs/ChannelName`}},required:[`createdAt`,`name`],additionalProperties:!0},type:{type:`string`,enum:[`channel`]}},required:[`channel`,`type`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`}}};function et(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=et.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.channel===void 0&&(n=`channel`)||e.type===void 0&&(n=`type`))return et.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.channel!==void 0){let n=e.channel;if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.createdAt===void 0&&(e=`createdAt`)||n.name===void 0&&(e=`name`))return et.errors=[{instancePath:t+`/channel`,schemaPath:`#/properties/channel/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.createdAt!==void 0){let e=n.createdAt;if(typeof e==`string`){if(!A.test(e))return et.errors=[{instancePath:t+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return et.errors=[{instancePath:t+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.description!==void 0){let e=n.description;if(typeof e==`string`){if(e.length>500)return et.errors=[{instancePath:t+`/channel/description`,schemaPath:`#/properties/channel/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(e.length<1)return et.errors=[{instancePath:t+`/channel/description`,schemaPath:`#/properties/channel/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return et.errors=[{instancePath:t+`/channel/description`,schemaPath:`#/properties/channel/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.name!==void 0){let e=n.name;if(typeof e==`string`){if(!F.test(e))return et.errors=[{instancePath:t+`/channel/name`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return et.errors=[{instancePath:t+`/channel/name`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}else return et.errors=[{instancePath:t+`/channel`,schemaPath:`#/properties/channel/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0}else var c=!0;if(c){if(e.type!==void 0){let n=e.type;if(typeof n!=`string`)return et.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`channel`)return et.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:$e.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0}else var c=!0}}else return et.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return et.errors=null,!0}et.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var tt=rt,nt={type:`object`,properties:{closed:{type:`boolean`,enum:[!0]}},required:[`closed`],additionalProperties:!0,$defs:{}};function rt(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=rt.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.closed===void 0&&(n=`closed`))return rt.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.closed!==void 0){let n=e.closed;if(typeof n!=`boolean`)return rt.errors=[{instancePath:t+`/closed`,schemaPath:`#/properties/closed/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;if(n!==!0)return rt.errors=[{instancePath:t+`/closed`,schemaPath:`#/properties/closed/enum`,keyword:`enum`,params:{allowedValues:nt.properties.closed.enum},message:`must be equal to one of the allowed values`}],!1}}else return rt.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return rt.errors=null,!0}rt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var it=ot,at={type:`object`,properties:{command:{type:`object`,properties:{createdAt:{$ref:`#/$defs/IsoTime`},description:{type:`string`,minLength:1,maxLength:500},handler:{$ref:`#/$defs/IdentityName`},name:{$ref:`#/$defs/CommandName`},schema:{type:`object`},url:{type:`string`}},required:[`createdAt`,`handler`,`name`,`schema`,`url`],additionalProperties:!0},type:{type:`string`,enum:[`command`]}},required:[`command`,`type`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},CommandName:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`}}};function ot(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=ot.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.command===void 0&&(n=`command`)||e.type===void 0&&(n=`type`))return ot.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.command!==void 0){let n=e.command;if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.createdAt===void 0&&(e=`createdAt`)||n.handler===void 0&&(e=`handler`)||n.name===void 0&&(e=`name`)||n.schema===void 0&&(e=`schema`)||n.url===void 0&&(e=`url`))return ot.errors=[{instancePath:t+`/command`,schemaPath:`#/properties/command/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.createdAt!==void 0){let e=n.createdAt;if(typeof e==`string`){if(!A.test(e))return ot.errors=[{instancePath:t+`/command/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return ot.errors=[{instancePath:t+`/command/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.description!==void 0){let e=n.description;if(typeof e==`string`){if(e.length>500)return ot.errors=[{instancePath:t+`/command/description`,schemaPath:`#/properties/command/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(e.length<1)return ot.errors=[{instancePath:t+`/command/description`,schemaPath:`#/properties/command/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return ot.errors=[{instancePath:t+`/command/description`,schemaPath:`#/properties/command/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.handler!==void 0){let e=n.handler;if(typeof e==`string`){if(!j.test(e))return ot.errors=[{instancePath:t+`/command/handler`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return ot.errors=[{instancePath:t+`/command/handler`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.name!==void 0){let e=n.name;if(typeof e==`string`){if(!P.test(e))return ot.errors=[{instancePath:t+`/command/name`,schemaPath:`#/$defs/CommandName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return ot.errors=[{instancePath:t+`/command/name`,schemaPath:`#/$defs/CommandName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.schema!==void 0){let e=n.schema;if(!e||typeof e!=`object`||Array.isArray(e))return ot.errors=[{instancePath:t+`/command/schema`,schemaPath:`#/properties/command/properties/schema/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var s=!0}else var s=!0;if(s){if(n.url!==void 0){if(typeof n.url!=`string`)return ot.errors=[{instancePath:t+`/command/url`,schemaPath:`#/properties/command/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}}}}else return ot.errors=[{instancePath:t+`/command`,schemaPath:`#/properties/command/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0}else var c=!0;if(c){if(e.type!==void 0){let n=e.type;if(typeof n!=`string`)return ot.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`command`)return ot.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:at.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0}else var c=!0}}else return ot.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return ot.errors=null,!0}ot.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var st=lt,ct={type:`object`,properties:{connectionId:{$ref:`#/$defs/LiveConnectionId`},latestMessageId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},type:{type:`string`,enum:[`connected`]}},required:[`latestMessageId`,`type`],additionalProperties:!0,$defs:{LiveConnectionId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}};function lt(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=lt.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.latestMessageId===void 0&&(n=`latestMessageId`)||e.type===void 0&&(n=`type`))return lt.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.connectionId!==void 0){let n=e.connectionId,r=s,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return lt.errors=[{instancePath:t+`/connectionId`,schemaPath:`#/$defs/LiveConnectionId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return lt.errors=[{instancePath:t+`/connectionId`,schemaPath:`#/$defs/LiveConnectionId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<-9007199254740991||isNaN(n))return lt.errors=[{instancePath:t+`/connectionId`,schemaPath:`#/$defs/LiveConnectionId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var l=r===s}else var l=!0;if(l){if(e.latestMessageId!==void 0){let n=e.latestMessageId,r=s,i=s,a=!1,c=s,d=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/latestMessageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===d&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/latestMessageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<1||isNaN(n)){let e={instancePath:t+`/latestMessageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var u=c===s;a||=u;let f=s;if(n!==null){let e={instancePath:t+`/latestMessageId`,schemaPath:`#/properties/latestMessageId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var u=f===s;if(a||=u,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/latestMessageId`,schemaPath:`#/properties/latestMessageId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,lt.errors=o,!1}var l=r===s}else var l=!0;if(l){if(e.type!==void 0){let n=e.type,r=s;if(typeof n!=`string`)return lt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`connected`)return lt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:ct.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var l=r===s}else var l=!0}}}else return lt.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return lt.errors=o,s===0}lt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var ut=ft,dt={type:`object`,properties:{deactivatedQuietAgent:{type:`object`,properties:{deactivatedAt:{$ref:`#/$defs/IsoTime`},id:{$ref:`#/$defs/DeactivatedQuietAgentId`},identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]},read:{type:`boolean`},text:{type:`string`}},required:[`deactivatedAt`,`id`,`identity`,`read`,`text`],additionalProperties:!0},type:{type:`string`,enum:[`deactivated-quiet-agent`]}},required:[`deactivatedQuietAgent`,`type`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},DeactivatedQuietAgentId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`}}};function ft(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=ft.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.deactivatedQuietAgent===void 0&&(n=`deactivatedQuietAgent`)||e.type===void 0&&(n=`type`))return ft.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.deactivatedQuietAgent!==void 0){let n=e.deactivatedQuietAgent,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.deactivatedAt===void 0&&(e=`deactivatedAt`)||n.id===void 0&&(e=`id`)||n.identity===void 0&&(e=`identity`)||n.read===void 0&&(e=`read`)||n.text===void 0&&(e=`text`))return ft.errors=[{instancePath:t+`/deactivatedQuietAgent`,schemaPath:`#/properties/deactivatedQuietAgent/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.deactivatedAt!==void 0){let e=n.deactivatedAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return ft.errors=[{instancePath:t+`/deactivatedQuietAgent/deactivatedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return ft.errors=[{instancePath:t+`/deactivatedQuietAgent/deactivatedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(n.id!==void 0){let e=n.id,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return ft.errors=[{instancePath:t+`/deactivatedQuietAgent/id`,schemaPath:`#/$defs/DeactivatedQuietAgentId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return ft.errors=[{instancePath:t+`/deactivatedQuietAgent/id`,schemaPath:`#/$defs/DeactivatedQuietAgentId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<-9007199254740991||isNaN(e))return ft.errors=[{instancePath:t+`/deactivatedQuietAgent/id`,schemaPath:`#/$defs/DeactivatedQuietAgentId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var l=r===s}else var l=!0;if(l){if(n.identity!==void 0){let e=n.identity,r=s,i=s,a=!1,c=s;if(s===c){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.admin===void 0&&(n=`admin`)||e.createdAt===void 0&&(n=`createdAt`)||e.kind===void 0&&(n=`kind`)||e.name===void 0&&(n=`name`)){let e={instancePath:t+`/deactivatedQuietAgent/identity`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.admin!==void 0){let n=s;if(typeof e.admin!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgent/identity/admin`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var u=n===s}else var u=!0;if(u){if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(e.deactivated!==void 0){let n=e.deactivated,r=s;if(typeof n!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgent/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/deactivatedQuietAgent/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:dt.properties.deactivatedQuietAgent.properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(e.displayName!==void 0){let n=e.displayName,r=s;if(s===s){if(typeof n==`string`){if(n.length>80){let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(e.kind!==void 0){let n=e.kind,r=s;if(typeof n!=`string`){let e={instancePath:t+`/deactivatedQuietAgent/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`human`){let e={instancePath:t+`/deactivatedQuietAgent/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:dt.properties.deactivatedQuietAgent.properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0}}}}}}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var d=c===s;if(a||=d,d)var f=!0;let m=s;if(s===m){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.admin===void 0&&(n=`admin`)||e.createdAt===void 0&&(n=`createdAt`)||e.kind===void 0&&(n=`kind`)||e.name===void 0&&(n=`name`)||e.owner===void 0&&(n=`owner`)){let e={instancePath:t+`/deactivatedQuietAgent/identity`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.admin!==void 0){let n=s;if(typeof e.admin!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgent/identity/admin`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var p=n===s}else var p=!0;if(p){if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.deactivated!==void 0){let n=e.deactivated,r=s;if(typeof n!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgent/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/deactivatedQuietAgent/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:dt.properties.deactivatedQuietAgent.properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(e.description!==void 0){let n=e.description,r=s;if(s===s){if(typeof n==`string`){if(n.length>500){let e={instancePath:t+`/deactivatedQuietAgent/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/deactivatedQuietAgent/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.displayName!==void 0){let n=e.displayName,r=s;if(s===s){if(typeof n==`string`){if(n.length>80){let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.handler!==void 0){let n=e.handler,r=s;if(typeof n!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgent/identity/handler`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/deactivatedQuietAgent/identity/handler`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:dt.properties.deactivatedQuietAgent.properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(e.kind!==void 0){let n=e.kind,r=s;if(typeof n!=`string`){let e={instancePath:t+`/deactivatedQuietAgent/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`agent`){let e={instancePath:t+`/deactivatedQuietAgent/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:dt.properties.deactivatedQuietAgent.properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.owner!==void 0){let n=e.owner,r=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0}}}}}}}}}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var d=m===s;if(a||=d,d&&f!==!0&&(f=!0),a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/deactivatedQuietAgent/identity`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,ft.errors=o,!1}var l=r===s}else var l=!0;if(l){if(n.read!==void 0){let e=s;if(typeof n.read!=`boolean`)return ft.errors=[{instancePath:t+`/deactivatedQuietAgent/read`,schemaPath:`#/properties/deactivatedQuietAgent/properties/read/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var l=e===s}else var l=!0;if(l){if(n.text!==void 0){let e=s;if(typeof n.text!=`string`)return ft.errors=[{instancePath:t+`/deactivatedQuietAgent/text`,schemaPath:`#/properties/deactivatedQuietAgent/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=e===s}else var l=!0}}}}}else return ft.errors=[{instancePath:t+`/deactivatedQuietAgent`,schemaPath:`#/properties/deactivatedQuietAgent/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var m=r===s}else var m=!0;if(m){if(e.type!==void 0){let n=e.type,r=s;if(typeof n!=`string`)return ft.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`deactivated-quiet-agent`)return ft.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:dt.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var m=r===s}else var m=!0}}else return ft.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return ft.errors=o,s===0}ft.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var pt=ht,mt={type:`object`,properties:{deactivationOffer:{type:`object`,properties:{cleared:{type:`boolean`},id:{$ref:`#/$defs/DeactivationOfferId`},identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]},quietDays:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},raisedAt:{$ref:`#/$defs/IsoTime`},text:{type:`string`}},required:[`cleared`,`id`,`identity`,`quietDays`,`raisedAt`,`text`],additionalProperties:!0},type:{type:`string`,enum:[`deactivation-offer`]}},required:[`deactivationOffer`,`type`],additionalProperties:!0,$defs:{DeactivationOfferId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`}}};function ht(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=ht.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.deactivationOffer===void 0&&(n=`deactivationOffer`)||e.type===void 0&&(n=`type`))return ht.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.deactivationOffer!==void 0){let n=e.deactivationOffer,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.cleared===void 0&&(e=`cleared`)||n.id===void 0&&(e=`id`)||n.identity===void 0&&(e=`identity`)||n.quietDays===void 0&&(e=`quietDays`)||n.raisedAt===void 0&&(e=`raisedAt`)||n.text===void 0&&(e=`text`))return ht.errors=[{instancePath:t+`/deactivationOffer`,schemaPath:`#/properties/deactivationOffer/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.cleared!==void 0){let e=s;if(typeof n.cleared!=`boolean`)return ht.errors=[{instancePath:t+`/deactivationOffer/cleared`,schemaPath:`#/properties/deactivationOffer/properties/cleared/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var l=e===s}else var l=!0;if(l){if(n.id!==void 0){let e=n.id,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return ht.errors=[{instancePath:t+`/deactivationOffer/id`,schemaPath:`#/$defs/DeactivationOfferId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return ht.errors=[{instancePath:t+`/deactivationOffer/id`,schemaPath:`#/$defs/DeactivationOfferId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<-9007199254740991||isNaN(e))return ht.errors=[{instancePath:t+`/deactivationOffer/id`,schemaPath:`#/$defs/DeactivationOfferId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var l=r===s}else var l=!0;if(l){if(n.identity!==void 0){let e=n.identity,r=s,i=s,a=!1,c=s;if(s===c){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.admin===void 0&&(n=`admin`)||e.createdAt===void 0&&(n=`createdAt`)||e.kind===void 0&&(n=`kind`)||e.name===void 0&&(n=`name`)){let e={instancePath:t+`/deactivationOffer/identity`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.admin!==void 0){let n=s;if(typeof e.admin!=`boolean`){let e={instancePath:t+`/deactivationOffer/identity/admin`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var u=n===s}else var u=!0;if(u){if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/deactivationOffer/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(e.deactivated!==void 0){let n=e.deactivated,r=s;if(typeof n!=`boolean`){let e={instancePath:t+`/deactivationOffer/identity/deactivated`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/deactivationOffer/identity/deactivated`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:mt.properties.deactivationOffer.properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(e.displayName!==void 0){let n=e.displayName,r=s;if(s===s){if(typeof n==`string`){if(n.length>80){let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(e.kind!==void 0){let n=e.kind,r=s;if(typeof n!=`string`){let e={instancePath:t+`/deactivationOffer/identity/kind`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`human`){let e={instancePath:t+`/deactivationOffer/identity/kind`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:mt.properties.deactivationOffer.properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/deactivationOffer/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0}}}}}}}else{let e={instancePath:t+`/deactivationOffer/identity`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var d=c===s;if(a||=d,d)var f=!0;let m=s;if(s===m){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.admin===void 0&&(n=`admin`)||e.createdAt===void 0&&(n=`createdAt`)||e.kind===void 0&&(n=`kind`)||e.name===void 0&&(n=`name`)||e.owner===void 0&&(n=`owner`)){let e={instancePath:t+`/deactivationOffer/identity`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.admin!==void 0){let n=s;if(typeof e.admin!=`boolean`){let e={instancePath:t+`/deactivationOffer/identity/admin`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var p=n===s}else var p=!0;if(p){if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/deactivationOffer/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.deactivated!==void 0){let n=e.deactivated,r=s;if(typeof n!=`boolean`){let e={instancePath:t+`/deactivationOffer/identity/deactivated`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/deactivationOffer/identity/deactivated`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:mt.properties.deactivationOffer.properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(e.description!==void 0){let n=e.description,r=s;if(s===s){if(typeof n==`string`){if(n.length>500){let e={instancePath:t+`/deactivationOffer/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/deactivationOffer/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/deactivationOffer/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.displayName!==void 0){let n=e.displayName,r=s;if(s===s){if(typeof n==`string`){if(n.length>80){let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.handler!==void 0){let n=e.handler,r=s;if(typeof n!=`boolean`){let e={instancePath:t+`/deactivationOffer/identity/handler`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/deactivationOffer/identity/handler`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:mt.properties.deactivationOffer.properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(e.kind!==void 0){let n=e.kind,r=s;if(typeof n!=`string`){let e={instancePath:t+`/deactivationOffer/identity/kind`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`agent`){let e={instancePath:t+`/deactivationOffer/identity/kind`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:mt.properties.deactivationOffer.properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/deactivationOffer/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.owner!==void 0){let n=e.owner,r=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/deactivationOffer/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0}}}}}}}}}}else{let e={instancePath:t+`/deactivationOffer/identity`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var d=m===s;if(a||=d,d&&f!==!0&&(f=!0),a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/deactivationOffer/identity`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,ht.errors=o,!1}var l=r===s}else var l=!0;if(l){if(n.quietDays!==void 0){let e=n.quietDays,r=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return ht.errors=[{instancePath:t+`/deactivationOffer/quietDays`,schemaPath:`#/properties/deactivationOffer/properties/quietDays/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===r&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return ht.errors=[{instancePath:t+`/deactivationOffer/quietDays`,schemaPath:`#/properties/deactivationOffer/properties/quietDays/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<-9007199254740991||isNaN(e))return ht.errors=[{instancePath:t+`/deactivationOffer/quietDays`,schemaPath:`#/properties/deactivationOffer/properties/quietDays/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var l=r===s}else var l=!0;if(l){if(n.raisedAt!==void 0){let e=n.raisedAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return ht.errors=[{instancePath:t+`/deactivationOffer/raisedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return ht.errors=[{instancePath:t+`/deactivationOffer/raisedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(n.text!==void 0){let e=s;if(typeof n.text!=`string`)return ht.errors=[{instancePath:t+`/deactivationOffer/text`,schemaPath:`#/properties/deactivationOffer/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=e===s}else var l=!0}}}}}}else return ht.errors=[{instancePath:t+`/deactivationOffer`,schemaPath:`#/properties/deactivationOffer/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var m=r===s}else var m=!0;if(m){if(e.type!==void 0){let n=e.type,r=s;if(typeof n!=`string`)return ht.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`deactivation-offer`)return ht.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:mt.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var m=r===s}else var m=!0}}else return ht.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return ht.errors=o,s===0}ht.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var gt=vt,_t={type:`object`,properties:{identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]},type:{type:`string`,enum:[`identity-deleted`]}},required:[`identity`,`type`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`}}};function vt(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=vt.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.identity===void 0&&(n=`identity`)||e.type===void 0&&(n=`type`))return vt.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.identity!==void 0){let n=e.identity,r=s,i=s,a=!1,c=s;if(s===c){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)){let n={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/identity/admin`,schemaPath:`#/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var l=e===s}else var l=!0;if(l){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0;if(l){if(n.deactivated!==void 0){let e=n.deactivated,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:_t.properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var l=r===s}else var l=!0;if(l){if(n.displayName!==void 0){let e=n.displayName,r=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0;if(l){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`human`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:_t.properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var l=r===s}else var l=!0;if(l){if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0}}}}}}}else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=c===s;if(a||=u,u)var d=!0;let m=s;if(s===m){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)||n.owner===void 0&&(e=`owner`)){let n={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/identity/admin`,schemaPath:`#/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var f=e===s}else var f=!0;if(f){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.deactivated!==void 0){let e=n.deactivated,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:_t.properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(n.description!==void 0){let e=n.description,r=s;if(s===s){if(typeof e==`string`){if(e.length>500){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.displayName!==void 0){let e=n.displayName,r=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.handler!==void 0){let e=n.handler,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/handler`,schemaPath:`#/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/handler`,schemaPath:`#/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:_t.properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`agent`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:_t.properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.owner!==void 0){let e=n.owner,r=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0}}}}}}}}}}else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=m===s;if(a||=u,u&&d!==!0&&(d=!0),a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,vt.errors=o,!1}var p=r===s}else var p=!0;if(p){if(e.type!==void 0){let n=e.type,r=s;if(typeof n!=`string`)return vt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`identity-deleted`)return vt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:_t.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var p=r===s}else var p=!0}}else return vt.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return vt.errors=o,s===0}vt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var yt=xt,bt={type:`object`,properties:{identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]},type:{type:`string`,enum:[`identity`]}},required:[`identity`,`type`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`}}};function xt(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=xt.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.identity===void 0&&(n=`identity`)||e.type===void 0&&(n=`type`))return xt.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.identity!==void 0){let n=e.identity,r=s,i=s,a=!1,c=s;if(s===c){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)){let n={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/identity/admin`,schemaPath:`#/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var l=e===s}else var l=!0;if(l){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0;if(l){if(n.deactivated!==void 0){let e=n.deactivated,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:bt.properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var l=r===s}else var l=!0;if(l){if(n.displayName!==void 0){let e=n.displayName,r=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0;if(l){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`human`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:bt.properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var l=r===s}else var l=!0;if(l){if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0}}}}}}}else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=c===s;if(a||=u,u)var d=!0;let m=s;if(s===m){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)||n.owner===void 0&&(e=`owner`)){let n={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/identity/admin`,schemaPath:`#/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var f=e===s}else var f=!0;if(f){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.deactivated!==void 0){let e=n.deactivated,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:bt.properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(n.description!==void 0){let e=n.description,r=s;if(s===s){if(typeof e==`string`){if(e.length>500){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.displayName!==void 0){let e=n.displayName,r=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.handler!==void 0){let e=n.handler,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/handler`,schemaPath:`#/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/handler`,schemaPath:`#/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:bt.properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`agent`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:bt.properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.owner!==void 0){let e=n.owner,r=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0}}}}}}}}}}else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=m===s;if(a||=u,u&&d!==!0&&(d=!0),a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,xt.errors=o,!1}var p=r===s}else var p=!0;if(p){if(e.type!==void 0){let n=e.type,r=s;if(typeof n!=`string`)return xt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`identity`)return xt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:bt.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var p=r===s}else var p=!0}}else return xt.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return xt.errors=o,s===0}xt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var St=I,Ct={type:`object`,properties:{item:{type:`object`,properties:{channel:{type:`object`,properties:{createdAt:{$ref:`#/$defs/IsoTime`},description:{type:`string`,minLength:1,maxLength:500},name:{$ref:`#/$defs/ChannelName`}},required:[`createdAt`,`name`],additionalProperties:!0},message:{anyOf:[{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName_1`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName_1`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},kind:{type:`string`,enum:[`reply`]},replyTo:{$ref:`#/$defs/MessageId`}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`replyTo`],additionalProperties:!0}]},newReactions:{type:`array`,items:{type:`object`,properties:{identity:{$ref:`#/$defs/IdentityName`},messageId:{$ref:`#/$defs/MessageId`},reactedAt:{$ref:`#/$defs/IsoTime`},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`identity`,`messageId`,`reactedAt`,`reaction`],additionalProperties:!0}},parent:{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName_1`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},reasons:{type:`array`,items:{type:`string`,enum:[`followed-thread`,`mention`,`reaction`,`subscribed-channel`]}}},required:[`channel`,`message`,`parent`,`reasons`],additionalProperties:!0},type:{type:`string`,enum:[`inbox-item`]}},required:[`item`,`type`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},ChannelName_1:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},Harness:{type:`string`,pattern:`^[a-z0-9-]{1,40}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}},wt=RegExp(`^[a-z0-9-]{1,40}$`,`u`);function I(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=I.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.item===void 0&&(n=`item`)||e.type===void 0&&(n=`type`))return I.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.item!==void 0){let n=e.item,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.channel===void 0&&(e=`channel`)||n.message===void 0&&(e=`message`)||n.parent===void 0&&(e=`parent`)||n.reasons===void 0&&(e=`reasons`))return I.errors=[{instancePath:t+`/item`,schemaPath:`#/properties/item/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.channel!==void 0){let e=n.channel,r=s;if(s===r){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.createdAt===void 0&&(n=`createdAt`)||e.name===void 0&&(n=`name`))return I.errors=[{instancePath:t+`/item/channel`,schemaPath:`#/properties/item/properties/channel/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return I.errors=[{instancePath:t+`/item/channel/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return I.errors=[{instancePath:t+`/item/channel/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(e.description!==void 0){let n=e.description,r=s;if(s===r){if(typeof n==`string`){if(n.length>500)return I.errors=[{instancePath:t+`/item/channel/description`,schemaPath:`#/properties/item/properties/channel/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(n.length<1)return I.errors=[{instancePath:t+`/item/channel/description`,schemaPath:`#/properties/item/properties/channel/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return I.errors=[{instancePath:t+`/item/channel/description`,schemaPath:`#/properties/item/properties/channel/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!F.test(n))return I.errors=[{instancePath:t+`/item/channel/name`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return I.errors=[{instancePath:t+`/item/channel/name`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0}}}else return I.errors=[{instancePath:t+`/item/channel`,schemaPath:`#/properties/item/properties/channel/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var u=r===s}else var u=!0;if(u){if(n.message!==void 0){let e=n.message,r=s,i=s,a=!1,c=s;if(s===c){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.author===void 0&&(n=`author`)||e.channel===void 0&&(n=`channel`)||e.createdAt===void 0&&(n=`createdAt`)||e.id===void 0&&(n=`id`)||e.mentions===void 0&&(n=`mentions`)||e.text===void 0&&(n=`text`)||e.kind===void 0&&(n=`kind`)||e.latestReplyAt===void 0&&(n=`latestReplyAt`)||e.latestReplyId===void 0&&(n=`latestReplyId`)||e.repliers===void 0&&(n=`repliers`)||e.replyCount===void 0&&(n=`replyCount`)){let e={instancePath:t+`/item/message`,schemaPath:`#/properties/item/properties/message/anyOf/0/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.author!==void 0){let n=e.author,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`)){let n={instancePath:t+`/item/message/author`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/author/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/item/message/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var d=r===s}else var d=!0;if(d){if(n.owner!==void 0){let e=n.owner,r=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/item/message/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var d=r===s}else var d=!0}}}else{let e={instancePath:t+`/item/message/author`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(e.channel!==void 0){let n=e.channel,r=s;if(s===s){if(typeof n==`string`){if(!F.test(n)){let e={instancePath:t+`/item/message/channel`,schemaPath:`#/$defs/ChannelName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/channel`,schemaPath:`#/$defs/ChannelName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/item/message/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(e.harness!==void 0){let n=e.harness,r=s;if(s===s){if(typeof n==`string`){if(!wt.test(n)){let e={instancePath:t+`/item/message/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(e.id!==void 0){let n=e.id,r=s,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/item/message/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/item/message/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<1||isNaN(n)){let e={instancePath:t+`/item/message/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(e.mentions!==void 0){let n=e.mentions,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/item/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}else{let e={instancePath:t+`/item/message/mentions`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(e.reactions!==void 0){let n=e.reactions,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.by===void 0&&(n=`by`)||e.count===void 0&&(n=`count`)||e.reaction===void 0&&(n=`reaction`)){let e={instancePath:t+`/item/message/reactions/`+r,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.by!==void 0){let n=e.by,i=s;if(s===i){if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/item/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/item/message/reactions/`+r+`/by`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var p=i===s}else var p=!0;if(p){if(e.count!==void 0){let n=e.count,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/item/message/reactions/`+r+`/count`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/item/message/reactions/`+r+`/count`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<1||isNaN(n)){let e={instancePath:t+`/item/message/reactions/`+r+`/count`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var p=i===s}else var p=!0;if(p){if(e.reaction!==void 0){let n=e.reaction,i=s;if(typeof n!=`string`){let e={instancePath:t+`/item/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`thumbs_up`&&n!==`thumbs_down`){let e={instancePath:t+`/item/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Ct.properties.item.properties.message.anyOf[0].properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=i===s}else var p=!0}}}}else{let e={instancePath:t+`/item/message/reactions/`+r,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}else{let e={instancePath:t+`/item/message/reactions`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(e.text!==void 0){let n=e.text,r=s;if(s===r){if(typeof n==`string`){if(n.length>4e4){let e={instancePath:t+`/item/message/text`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/item/message/text`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/text`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(e.closedAt!==void 0){let n=e.closedAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/item/message/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(e.closedBy!==void 0){let n=e.closedBy,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/item/message/closedBy`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/closedBy`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(e.kind!==void 0){let n=e.kind,r=s;if(typeof n!=`string`){let e={instancePath:t+`/item/message/kind`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`top-level`){let e={instancePath:t+`/item/message/kind`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Ct.properties.item.properties.message.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(e.latestReplyAt!==void 0){let n=e.latestReplyAt,r=s,i=s,a=!1,c=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/item/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var m=c===s;a||=m;let l=s;if(n!==null){let e={instancePath:t+`/item/message/latestReplyAt`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var m=l===s;if(a||=m,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/item/message/latestReplyAt`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(e.latestReplyId!==void 0){let n=e.latestReplyId,r=s,i=s,a=!1,c=s,l=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/item/message/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===l&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/item/message/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<1||isNaN(n)){let e={instancePath:t+`/item/message/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var h=c===s;a||=h;let u=s;if(n!==null){let e={instancePath:t+`/item/message/latestReplyId`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var h=u===s;if(a||=h,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/item/message/latestReplyId`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(e.repliers!==void 0){let n=e.repliers,r=s;if(s===r){if(Array.isArray(n)){if(n.length>4){let e={instancePath:t+`/item/message/repliers`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`};o===null?o=[e]:o.push(e),s++}else{let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`)){let e={instancePath:t+`/item/message/repliers/`+r,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/item/message/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var g=i===s}else var g=!0;if(g){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/item/message/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var g=i===s}else var g=!0}}}else{let e={instancePath:t+`/item/message/repliers/`+r,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}}else{let e={instancePath:t+`/item/message/repliers`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(e.replyCount!==void 0){let n=e.replyCount,r=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/item/message/replyCount`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===r&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/item/message/replyCount`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<0||isNaN(n)){let e={instancePath:t+`/item/message/replyCount`,schemaPath:`#/properties/item/properties/message/anyOf/0/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0}}}}}}}}}}}}}}}}else{let e={instancePath:t+`/item/message`,schemaPath:`#/properties/item/properties/message/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var _=c===s;if(a||=_,_)var v=!0;let l=s;if(s===l){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.author===void 0&&(n=`author`)||e.channel===void 0&&(n=`channel`)||e.createdAt===void 0&&(n=`createdAt`)||e.id===void 0&&(n=`id`)||e.mentions===void 0&&(n=`mentions`)||e.text===void 0&&(n=`text`)||e.kind===void 0&&(n=`kind`)||e.replyTo===void 0&&(n=`replyTo`)){let e={instancePath:t+`/item/message`,schemaPath:`#/properties/item/properties/message/anyOf/1/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.author!==void 0){let n=e.author,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`)){let n={instancePath:t+`/item/message/author`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/author/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/item/message/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var y=r===s}else var y=!0;if(y){if(n.owner!==void 0){let e=n.owner,r=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/item/message/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var y=r===s}else var y=!0}}}else{let e={instancePath:t+`/item/message/author`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var b=r===s}else var b=!0;if(b){if(e.channel!==void 0){let n=e.channel,r=s;if(s===s){if(typeof n==`string`){if(!F.test(n)){let e={instancePath:t+`/item/message/channel`,schemaPath:`#/$defs/ChannelName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/channel`,schemaPath:`#/$defs/ChannelName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=r===s}else var b=!0;if(b){if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/item/message/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=r===s}else var b=!0;if(b){if(e.harness!==void 0){let n=e.harness,r=s;if(s===s){if(typeof n==`string`){if(!wt.test(n)){let e={instancePath:t+`/item/message/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=r===s}else var b=!0;if(b){if(e.id!==void 0){let n=e.id,r=s,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/item/message/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/item/message/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<1||isNaN(n)){let e={instancePath:t+`/item/message/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var b=r===s}else var b=!0;if(b){if(e.mentions!==void 0){let n=e.mentions,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/item/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}else{let e={instancePath:t+`/item/message/mentions`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var b=r===s}else var b=!0;if(b){if(e.reactions!==void 0){let n=e.reactions,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.by===void 0&&(n=`by`)||e.count===void 0&&(n=`count`)||e.reaction===void 0&&(n=`reaction`)){let e={instancePath:t+`/item/message/reactions/`+r,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.by!==void 0){let n=e.by,i=s;if(s===i){if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/item/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/item/message/reactions/`+r+`/by`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var x=i===s}else var x=!0;if(x){if(e.count!==void 0){let n=e.count,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/item/message/reactions/`+r+`/count`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/item/message/reactions/`+r+`/count`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<1||isNaN(n)){let e={instancePath:t+`/item/message/reactions/`+r+`/count`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var x=i===s}else var x=!0;if(x){if(e.reaction!==void 0){let n=e.reaction,i=s;if(typeof n!=`string`){let e={instancePath:t+`/item/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`thumbs_up`&&n!==`thumbs_down`){let e={instancePath:t+`/item/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Ct.properties.item.properties.message.anyOf[1].properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var x=i===s}else var x=!0}}}}else{let e={instancePath:t+`/item/message/reactions/`+r,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}else{let e={instancePath:t+`/item/message/reactions`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var b=r===s}else var b=!0;if(b){if(e.text!==void 0){let n=e.text,r=s;if(s===r){if(typeof n==`string`){if(n.length>4e4){let e={instancePath:t+`/item/message/text`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/item/message/text`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/message/text`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=r===s}else var b=!0;if(b){if(e.kind!==void 0){let n=e.kind,r=s;if(typeof n!=`string`){let e={instancePath:t+`/item/message/kind`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`reply`){let e={instancePath:t+`/item/message/kind`,schemaPath:`#/properties/item/properties/message/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Ct.properties.item.properties.message.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var b=r===s}else var b=!0;if(b){if(e.replyTo!==void 0){let n=e.replyTo,r=s,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/item/message/replyTo`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/item/message/replyTo`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<1||isNaN(n)){let e={instancePath:t+`/item/message/replyTo`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var b=r===s}else var b=!0}}}}}}}}}}}else{let e={instancePath:t+`/item/message`,schemaPath:`#/properties/item/properties/message/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var _=l===s;if(a||=_,_&&v!==!0&&(v=!0),a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/item/message`,schemaPath:`#/properties/item/properties/message/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,I.errors=o,!1}var u=r===s}else var u=!0;if(u){if(n.newReactions!==void 0){let e=n.newReactions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.identity===void 0&&(e=`identity`)||n.messageId===void 0&&(e=`messageId`)||n.reactedAt===void 0&&(e=`reactedAt`)||n.reaction===void 0&&(e=`reaction`))return I.errors=[{instancePath:t+`/item/newReactions/`+r,schemaPath:`#/properties/item/properties/newReactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.identity!==void 0){let e=n.identity,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return I.errors=[{instancePath:t+`/item/newReactions/`+r+`/identity`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return I.errors=[{instancePath:t+`/item/newReactions/`+r+`/identity`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var S=i===s}else var S=!0;if(S){if(n.messageId!==void 0){let e=n.messageId,i=s,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return I.errors=[{instancePath:t+`/item/newReactions/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return I.errors=[{instancePath:t+`/item/newReactions/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return I.errors=[{instancePath:t+`/item/newReactions/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var S=i===s}else var S=!0;if(S){if(n.reactedAt!==void 0){let e=n.reactedAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return I.errors=[{instancePath:t+`/item/newReactions/`+r+`/reactedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return I.errors=[{instancePath:t+`/item/newReactions/`+r+`/reactedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var S=i===s}else var S=!0;if(S){if(n.reaction!==void 0){let e=n.reaction,i=s;if(typeof e!=`string`)return I.errors=[{instancePath:t+`/item/newReactions/`+r+`/reaction`,schemaPath:`#/properties/item/properties/newReactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`thumbs_up`&&e!==`thumbs_down`)return I.errors=[{instancePath:t+`/item/newReactions/`+r+`/reaction`,schemaPath:`#/properties/item/properties/newReactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Ct.properties.item.properties.newReactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var S=i===s}else var S=!0}}}}else return I.errors=[{instancePath:t+`/item/newReactions/`+r,schemaPath:`#/properties/item/properties/newReactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return I.errors=[{instancePath:t+`/item/newReactions`,schemaPath:`#/properties/item/properties/newReactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(n.parent!==void 0){let e=n.parent,r=s;if(s===r){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.author===void 0&&(n=`author`)||e.channel===void 0&&(n=`channel`)||e.createdAt===void 0&&(n=`createdAt`)||e.id===void 0&&(n=`id`)||e.mentions===void 0&&(n=`mentions`)||e.text===void 0&&(n=`text`)||e.kind===void 0&&(n=`kind`)||e.latestReplyAt===void 0&&(n=`latestReplyAt`)||e.latestReplyId===void 0&&(n=`latestReplyId`)||e.repliers===void 0&&(n=`repliers`)||e.replyCount===void 0&&(n=`replyCount`))return I.errors=[{instancePath:t+`/item/parent`,schemaPath:`#/properties/item/properties/parent/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.author!==void 0){let n=e.author,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`))return I.errors=[{instancePath:t+`/item/parent/author`,schemaPath:`#/properties/item/properties/parent/properties/author/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return I.errors=[{instancePath:t+`/item/parent/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return I.errors=[{instancePath:t+`/item/parent/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var C=r===s}else var C=!0;if(C){if(n.owner!==void 0){let e=n.owner,r=s;if(s===s){if(typeof e==`string`){if(!P.test(e))return I.errors=[{instancePath:t+`/item/parent/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return I.errors=[{instancePath:t+`/item/parent/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var C=r===s}else var C=!0}}else return I.errors=[{instancePath:t+`/item/parent/author`,schemaPath:`#/properties/item/properties/parent/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var w=r===s}else var w=!0;if(w){if(e.channel!==void 0){let n=e.channel,r=s;if(s===s){if(typeof n==`string`){if(!F.test(n))return I.errors=[{instancePath:t+`/item/parent/channel`,schemaPath:`#/$defs/ChannelName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return I.errors=[{instancePath:t+`/item/parent/channel`,schemaPath:`#/$defs/ChannelName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var w=r===s}else var w=!0;if(w){if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return I.errors=[{instancePath:t+`/item/parent/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return I.errors=[{instancePath:t+`/item/parent/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var w=r===s}else var w=!0;if(w){if(e.harness!==void 0){let n=e.harness,r=s;if(s===s){if(typeof n==`string`){if(!wt.test(n))return I.errors=[{instancePath:t+`/item/parent/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`}],!1}else return I.errors=[{instancePath:t+`/item/parent/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var w=r===s}else var w=!0;if(w){if(e.id!==void 0){let n=e.id,r=s,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return I.errors=[{instancePath:t+`/item/parent/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return I.errors=[{instancePath:t+`/item/parent/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return I.errors=[{instancePath:t+`/item/parent/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var w=r===s}else var w=!0;if(w){if(e.mentions!==void 0){let n=e.mentions,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return I.errors=[{instancePath:t+`/item/parent/mentions/`+r,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return I.errors=[{instancePath:t+`/item/parent/mentions/`+r,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(i!==s)break}}else return I.errors=[{instancePath:t+`/item/parent/mentions`,schemaPath:`#/properties/item/properties/parent/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var w=r===s}else var w=!0;if(w){if(e.reactions!==void 0){let n=e.reactions,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.by===void 0&&(n=`by`)||e.count===void 0&&(n=`count`)||e.reaction===void 0&&(n=`reaction`))return I.errors=[{instancePath:t+`/item/parent/reactions/`+r,schemaPath:`#/properties/item/properties/parent/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.by!==void 0){let n=e.by,i=s;if(s===i){if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return I.errors=[{instancePath:t+`/item/parent/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return I.errors=[{instancePath:t+`/item/parent/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(a!==s)break}}else return I.errors=[{instancePath:t+`/item/parent/reactions/`+r+`/by`,schemaPath:`#/properties/item/properties/parent/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var T=i===s}else var T=!0;if(T){if(e.count!==void 0){let n=e.count,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return I.errors=[{instancePath:t+`/item/parent/reactions/`+r+`/count`,schemaPath:`#/properties/item/properties/parent/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return I.errors=[{instancePath:t+`/item/parent/reactions/`+r+`/count`,schemaPath:`#/properties/item/properties/parent/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return I.errors=[{instancePath:t+`/item/parent/reactions/`+r+`/count`,schemaPath:`#/properties/item/properties/parent/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var T=i===s}else var T=!0;if(T){if(e.reaction!==void 0){let n=e.reaction,i=s;if(typeof n!=`string`)return I.errors=[{instancePath:t+`/item/parent/reactions/`+r+`/reaction`,schemaPath:`#/properties/item/properties/parent/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`thumbs_up`&&n!==`thumbs_down`)return I.errors=[{instancePath:t+`/item/parent/reactions/`+r+`/reaction`,schemaPath:`#/properties/item/properties/parent/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Ct.properties.item.properties.parent.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var T=i===s}else var T=!0}}}else return I.errors=[{instancePath:t+`/item/parent/reactions/`+r,schemaPath:`#/properties/item/properties/parent/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return I.errors=[{instancePath:t+`/item/parent/reactions`,schemaPath:`#/properties/item/properties/parent/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var w=r===s}else var w=!0;if(w){if(e.text!==void 0){let n=e.text,r=s;if(s===r){if(typeof n==`string`){if(n.length>4e4)return I.errors=[{instancePath:t+`/item/parent/text`,schemaPath:`#/properties/item/properties/parent/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`}],!1;if(n.length<1)return I.errors=[{instancePath:t+`/item/parent/text`,schemaPath:`#/properties/item/properties/parent/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return I.errors=[{instancePath:t+`/item/parent/text`,schemaPath:`#/properties/item/properties/parent/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var w=r===s}else var w=!0;if(w){if(e.closedAt!==void 0){let n=e.closedAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return I.errors=[{instancePath:t+`/item/parent/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return I.errors=[{instancePath:t+`/item/parent/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var w=r===s}else var w=!0;if(w){if(e.closedBy!==void 0){let n=e.closedBy,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return I.errors=[{instancePath:t+`/item/parent/closedBy`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return I.errors=[{instancePath:t+`/item/parent/closedBy`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var w=r===s}else var w=!0;if(w){if(e.kind!==void 0){let n=e.kind,r=s;if(typeof n!=`string`)return I.errors=[{instancePath:t+`/item/parent/kind`,schemaPath:`#/properties/item/properties/parent/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`top-level`)return I.errors=[{instancePath:t+`/item/parent/kind`,schemaPath:`#/properties/item/properties/parent/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Ct.properties.item.properties.parent.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var w=r===s}else var w=!0;if(w){if(e.latestReplyAt!==void 0){let n=e.latestReplyAt,r=s,i=s,a=!1,c=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/item/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/item/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var E=c===s;a||=E;let l=s;if(n!==null){let e={instancePath:t+`/item/parent/latestReplyAt`,schemaPath:`#/properties/item/properties/parent/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var E=l===s;if(a||=E,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/item/parent/latestReplyAt`,schemaPath:`#/properties/item/properties/parent/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,I.errors=o,!1}var w=r===s}else var w=!0;if(w){if(e.latestReplyId!==void 0){let n=e.latestReplyId,r=s,i=s,a=!1,c=s,l=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/item/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===l&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/item/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<1||isNaN(n)){let e={instancePath:t+`/item/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var ee=c===s;a||=ee;let u=s;if(n!==null){let e={instancePath:t+`/item/parent/latestReplyId`,schemaPath:`#/properties/item/properties/parent/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var ee=u===s;if(a||=ee,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/item/parent/latestReplyId`,schemaPath:`#/properties/item/properties/parent/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,I.errors=o,!1}var w=r===s}else var w=!0;if(w){if(e.repliers!==void 0){let n=e.repliers,r=s;if(s===r){if(Array.isArray(n)){if(n.length>4)return I.errors=[{instancePath:t+`/item/parent/repliers`,schemaPath:`#/properties/item/properties/parent/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`}],!1;{let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`))return I.errors=[{instancePath:t+`/item/parent/repliers/`+r,schemaPath:`#/properties/item/properties/parent/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return I.errors=[{instancePath:t+`/item/parent/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return I.errors=[{instancePath:t+`/item/parent/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var te=i===s}else var te=!0;if(te){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n))return I.errors=[{instancePath:t+`/item/parent/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return I.errors=[{instancePath:t+`/item/parent/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var te=i===s}else var te=!0}}else return I.errors=[{instancePath:t+`/item/parent/repliers/`+r,schemaPath:`#/properties/item/properties/parent/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}}else return I.errors=[{instancePath:t+`/item/parent/repliers`,schemaPath:`#/properties/item/properties/parent/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var w=r===s}else var w=!0;if(w){if(e.replyCount!==void 0){let n=e.replyCount,r=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return I.errors=[{instancePath:t+`/item/parent/replyCount`,schemaPath:`#/properties/item/properties/parent/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===r&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return I.errors=[{instancePath:t+`/item/parent/replyCount`,schemaPath:`#/properties/item/properties/parent/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<0||isNaN(n))return I.errors=[{instancePath:t+`/item/parent/replyCount`,schemaPath:`#/properties/item/properties/parent/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`}],!1}var w=r===s}else var w=!0}}}}}}}}}}}}}}}else return I.errors=[{instancePath:t+`/item/parent`,schemaPath:`#/properties/item/properties/parent/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var u=r===s}else var u=!0;if(u){if(n.reasons!==void 0){let e=n.reasons,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(typeof n!=`string`)return I.errors=[{instancePath:t+`/item/reasons/`+r,schemaPath:`#/properties/item/properties/reasons/items/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`followed-thread`&&n!==`mention`&&n!==`reaction`&&n!==`subscribed-channel`)return I.errors=[{instancePath:t+`/item/reasons/`+r,schemaPath:`#/properties/item/properties/reasons/items/enum`,keyword:`enum`,params:{allowedValues:Ct.properties.item.properties.reasons.items.enum},message:`must be equal to one of the allowed values`}],!1;if(i!==s)break}}else return I.errors=[{instancePath:t+`/item/reasons`,schemaPath:`#/properties/item/properties/reasons/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0}}}}}else return I.errors=[{instancePath:t+`/item`,schemaPath:`#/properties/item/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var D=r===s}else var D=!0;if(D){if(e.type!==void 0){let n=e.type,r=s;if(typeof n!=`string`)return I.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`inbox-item`)return I.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:Ct.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var D=r===s}else var D=!0}}else return I.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return I.errors=o,s===0}I.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Tt=Dt,Et={type:`object`,properties:{message:{anyOf:[{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},kind:{type:`string`,enum:[`reply`]},replyTo:{$ref:`#/$defs/MessageId`}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`replyTo`],additionalProperties:!0}]},type:{type:`string`,enum:[`message`]}},required:[`message`,`type`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},Harness:{type:`string`,pattern:`^[a-z0-9-]{1,40}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}};function Dt(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=Dt.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.message===void 0&&(n=`message`)||e.type===void 0&&(n=`type`))return Dt.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.message!==void 0){let n=e.message,r=s,i=s,a=!1,c=s;if(s===c){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.latestReplyAt===void 0&&(e=`latestReplyAt`)||n.latestReplyId===void 0&&(e=`latestReplyId`)||n.repliers===void 0&&(e=`repliers`)||n.replyCount===void 0&&(e=`replyCount`)){let n={instancePath:t+`/message`,schemaPath:`#/properties/message/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.author!==void 0){let e=n.author,r=s;if(s===r){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`)){let e={instancePath:t+`/message/author`,schemaPath:`#/properties/message/anyOf/0/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/message/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0;if(l){if(e.owner!==void 0){let n=e.owner,r=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/message/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0}}}else{let e={instancePath:t+`/message/author`,schemaPath:`#/properties/message/anyOf/0/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.channel!==void 0){let e=n.channel,r=s;if(s===s){if(typeof e==`string`){if(!F.test(e)){let e={instancePath:t+`/message/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.harness!==void 0){let e=n.harness,r=s;if(s===s){if(typeof e==`string`){if(!wt.test(e)){let e={instancePath:t+`/message/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.id!==void 0){let e=n.id,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.mentions!==void 0){let e=n.mentions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}else{let e={instancePath:t+`/message/mentions`,schemaPath:`#/properties/message/anyOf/0/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.reactions!==void 0){let e=n.reactions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`)){let n={instancePath:t+`/message/reactions/`+r,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.by!==void 0){let e=n.by,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/message/reactions/`+r+`/by`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var d=i===s}else var d=!0;if(d){if(n.count!==void 0){let e=n.count,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var d=i===s}else var d=!0;if(d){if(n.reaction!==void 0){let e=n.reaction,i=s;if(typeof e!=`string`){let e={instancePath:t+`/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`thumbs_up`&&e!==`thumbs_down`){let e={instancePath:t+`/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Et.properties.message.anyOf[0].properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var d=i===s}else var d=!0}}}}else{let e={instancePath:t+`/message/reactions/`+r,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}else{let e={instancePath:t+`/message/reactions`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.text!==void 0){let e=n.text,r=s;if(s===r){if(typeof e==`string`){if(e.length>4e4){let e={instancePath:t+`/message/text`,schemaPath:`#/properties/message/anyOf/0/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/message/text`,schemaPath:`#/properties/message/anyOf/0/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/text`,schemaPath:`#/properties/message/anyOf/0/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.closedAt!==void 0){let e=n.closedAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/message/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.closedBy!==void 0){let e=n.closedBy,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/message/closedBy`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/closedBy`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/message/kind`,schemaPath:`#/properties/message/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`top-level`){let e={instancePath:t+`/message/kind`,schemaPath:`#/properties/message/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Et.properties.message.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(n.latestReplyAt!==void 0){let e=n.latestReplyAt,r=s,i=s,a=!1,c=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=c===s;a||=f;let l=s;if(e!==null){let e={instancePath:t+`/message/latestReplyAt`,schemaPath:`#/properties/message/anyOf/0/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var f=l===s;if(a||=f,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/message/latestReplyAt`,schemaPath:`#/properties/message/anyOf/0/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(n.latestReplyId!==void 0){let e=n.latestReplyId,r=s,i=s,a=!1,c=s,l=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===l&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var p=c===s;a||=p;let d=s;if(e!==null){let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/properties/message/anyOf/0/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var p=d===s;if(a||=p,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/properties/message/anyOf/0/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(n.repliers!==void 0){let e=n.repliers,r=s;if(s===r){if(Array.isArray(e)){if(e.length>4){let e={instancePath:t+`/message/repliers`,schemaPath:`#/properties/message/anyOf/0/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`};o===null?o=[e]:o.push(e),s++}else{let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`)){let n={instancePath:t+`/message/repliers/`+r,schemaPath:`#/properties/message/anyOf/0/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/message/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var m=i===s}else var m=!0;if(m){if(n.owner!==void 0){let e=n.owner,i=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/message/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var m=i===s}else var m=!0}}}else{let e={instancePath:t+`/message/repliers/`+r,schemaPath:`#/properties/message/anyOf/0/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}}else{let e={instancePath:t+`/message/repliers`,schemaPath:`#/properties/message/anyOf/0/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.replyCount!==void 0){let e=n.replyCount,r=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/replyCount`,schemaPath:`#/properties/message/anyOf/0/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===r&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/replyCount`,schemaPath:`#/properties/message/anyOf/0/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<0||isNaN(e)){let e={instancePath:t+`/message/replyCount`,schemaPath:`#/properties/message/anyOf/0/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0}}}}}}}}}}}}}}}}else{let e={instancePath:t+`/message`,schemaPath:`#/properties/message/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var h=c===s;if(a||=h,h)var g=!0;let x=s;if(s===x){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.replyTo===void 0&&(e=`replyTo`)){let n={instancePath:t+`/message`,schemaPath:`#/properties/message/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.author!==void 0){let e=n.author,r=s;if(s===r){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`)){let e={instancePath:t+`/message/author`,schemaPath:`#/properties/message/anyOf/1/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/message/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var _=r===s}else var _=!0;if(_){if(e.owner!==void 0){let n=e.owner,r=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/message/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var _=r===s}else var _=!0}}}else{let e={instancePath:t+`/message/author`,schemaPath:`#/properties/message/anyOf/1/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.channel!==void 0){let e=n.channel,r=s;if(s===s){if(typeof e==`string`){if(!F.test(e)){let e={instancePath:t+`/message/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.harness!==void 0){let e=n.harness,r=s;if(s===s){if(typeof e==`string`){if(!wt.test(e)){let e={instancePath:t+`/message/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.id!==void 0){let e=n.id,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.mentions!==void 0){let e=n.mentions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}else{let e={instancePath:t+`/message/mentions`,schemaPath:`#/properties/message/anyOf/1/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.reactions!==void 0){let e=n.reactions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`)){let n={instancePath:t+`/message/reactions/`+r,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.by!==void 0){let e=n.by,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/message/reactions/`+r+`/by`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var y=i===s}else var y=!0;if(y){if(n.count!==void 0){let e=n.count,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var y=i===s}else var y=!0;if(y){if(n.reaction!==void 0){let e=n.reaction,i=s;if(typeof e!=`string`){let e={instancePath:t+`/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`thumbs_up`&&e!==`thumbs_down`){let e={instancePath:t+`/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Et.properties.message.anyOf[1].properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var y=i===s}else var y=!0}}}}else{let e={instancePath:t+`/message/reactions/`+r,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}else{let e={instancePath:t+`/message/reactions`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.text!==void 0){let e=n.text,r=s;if(s===r){if(typeof e==`string`){if(e.length>4e4){let e={instancePath:t+`/message/text`,schemaPath:`#/properties/message/anyOf/1/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/message/text`,schemaPath:`#/properties/message/anyOf/1/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/text`,schemaPath:`#/properties/message/anyOf/1/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/message/kind`,schemaPath:`#/properties/message/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`reply`){let e={instancePath:t+`/message/kind`,schemaPath:`#/properties/message/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Et.properties.message.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var v=r===s}else var v=!0;if(v){if(n.replyTo!==void 0){let e=n.replyTo,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/replyTo`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/replyTo`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/message/replyTo`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0}}}}}}}}}}}else{let e={instancePath:t+`/message`,schemaPath:`#/properties/message/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var h=x===s;if(a||=h,h&&g!==!0&&(g=!0),a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/message`,schemaPath:`#/properties/message/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,Dt.errors=o,!1}var b=r===s}else var b=!0;if(b){if(e.type!==void 0){let n=e.type,r=s;if(typeof n!=`string`)return Dt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`message`)return Dt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:Et.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var b=r===s}else var b=!0}}else return Dt.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return Dt.errors=o,s===0}Dt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Ot=L,kt={type:`object`,properties:{nudge:{type:`object`,properties:{channel:{type:`object`,properties:{createdAt:{$ref:`#/$defs/IsoTime`},description:{type:`string`,minLength:1,maxLength:500},name:{$ref:`#/$defs/ChannelName`}},required:[`createdAt`,`name`],additionalProperties:!0},id:{$ref:`#/$defs/NudgeId`},kind:{type:`string`,enum:[`first`,`second`]},parent:{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName_1`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},raisedAt:{$ref:`#/$defs/IsoTime`},text:{type:`string`}},required:[`channel`,`id`,`kind`,`parent`,`raisedAt`,`text`],additionalProperties:!0},type:{type:`string`,enum:[`nudge`]}},required:[`nudge`,`type`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},NudgeId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},ChannelName_1:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},Harness:{type:`string`,pattern:`^[a-z0-9-]{1,40}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}};function L(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=L.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.nudge===void 0&&(n=`nudge`)||e.type===void 0&&(n=`type`))return L.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.nudge!==void 0){let n=e.nudge,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.channel===void 0&&(e=`channel`)||n.id===void 0&&(e=`id`)||n.kind===void 0&&(e=`kind`)||n.parent===void 0&&(e=`parent`)||n.raisedAt===void 0&&(e=`raisedAt`)||n.text===void 0&&(e=`text`))return L.errors=[{instancePath:t+`/nudge`,schemaPath:`#/properties/nudge/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.channel!==void 0){let e=n.channel,r=s;if(s===r){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.createdAt===void 0&&(n=`createdAt`)||e.name===void 0&&(n=`name`))return L.errors=[{instancePath:t+`/nudge/channel`,schemaPath:`#/properties/nudge/properties/channel/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return L.errors=[{instancePath:t+`/nudge/channel/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/channel/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(e.description!==void 0){let n=e.description,r=s;if(s===r){if(typeof n==`string`){if(n.length>500)return L.errors=[{instancePath:t+`/nudge/channel/description`,schemaPath:`#/properties/nudge/properties/channel/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(n.length<1)return L.errors=[{instancePath:t+`/nudge/channel/description`,schemaPath:`#/properties/nudge/properties/channel/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return L.errors=[{instancePath:t+`/nudge/channel/description`,schemaPath:`#/properties/nudge/properties/channel/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!F.test(n))return L.errors=[{instancePath:t+`/nudge/channel/name`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/channel/name`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0}}}else return L.errors=[{instancePath:t+`/nudge/channel`,schemaPath:`#/properties/nudge/properties/channel/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var u=r===s}else var u=!0;if(u){if(n.id!==void 0){let e=n.id,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return L.errors=[{instancePath:t+`/nudge/id`,schemaPath:`#/$defs/NudgeId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return L.errors=[{instancePath:t+`/nudge/id`,schemaPath:`#/$defs/NudgeId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<-9007199254740991||isNaN(e))return L.errors=[{instancePath:t+`/nudge/id`,schemaPath:`#/$defs/NudgeId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var u=r===s}else var u=!0;if(u){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`)return L.errors=[{instancePath:t+`/nudge/kind`,schemaPath:`#/properties/nudge/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`first`&&e!==`second`)return L.errors=[{instancePath:t+`/nudge/kind`,schemaPath:`#/properties/nudge/properties/kind/enum`,keyword:`enum`,params:{allowedValues:kt.properties.nudge.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var u=r===s}else var u=!0;if(u){if(n.parent!==void 0){let e=n.parent,r=s;if(s===r){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.author===void 0&&(n=`author`)||e.channel===void 0&&(n=`channel`)||e.createdAt===void 0&&(n=`createdAt`)||e.id===void 0&&(n=`id`)||e.mentions===void 0&&(n=`mentions`)||e.text===void 0&&(n=`text`)||e.kind===void 0&&(n=`kind`)||e.latestReplyAt===void 0&&(n=`latestReplyAt`)||e.latestReplyId===void 0&&(n=`latestReplyId`)||e.repliers===void 0&&(n=`repliers`)||e.replyCount===void 0&&(n=`replyCount`))return L.errors=[{instancePath:t+`/nudge/parent`,schemaPath:`#/properties/nudge/properties/parent/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.author!==void 0){let n=e.author,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`))return L.errors=[{instancePath:t+`/nudge/parent/author`,schemaPath:`#/properties/nudge/properties/parent/properties/author/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return L.errors=[{instancePath:t+`/nudge/parent/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/parent/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=r===s}else var d=!0;if(d){if(n.owner!==void 0){let e=n.owner,r=s;if(s===s){if(typeof e==`string`){if(!P.test(e))return L.errors=[{instancePath:t+`/nudge/parent/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/parent/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=r===s}else var d=!0}}else return L.errors=[{instancePath:t+`/nudge/parent/author`,schemaPath:`#/properties/nudge/properties/parent/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var f=r===s}else var f=!0;if(f){if(e.channel!==void 0){let n=e.channel,r=s;if(s===s){if(typeof n==`string`){if(!F.test(n))return L.errors=[{instancePath:t+`/nudge/parent/channel`,schemaPath:`#/$defs/ChannelName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/parent/channel`,schemaPath:`#/$defs/ChannelName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return L.errors=[{instancePath:t+`/nudge/parent/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/parent/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(e.harness!==void 0){let n=e.harness,r=s;if(s===s){if(typeof n==`string`){if(!wt.test(n))return L.errors=[{instancePath:t+`/nudge/parent/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/parent/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(e.id!==void 0){let n=e.id,r=s,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return L.errors=[{instancePath:t+`/nudge/parent/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return L.errors=[{instancePath:t+`/nudge/parent/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return L.errors=[{instancePath:t+`/nudge/parent/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var f=r===s}else var f=!0;if(f){if(e.mentions!==void 0){let n=e.mentions,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return L.errors=[{instancePath:t+`/nudge/parent/mentions/`+r,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/parent/mentions/`+r,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(i!==s)break}}else return L.errors=[{instancePath:t+`/nudge/parent/mentions`,schemaPath:`#/properties/nudge/properties/parent/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var f=r===s}else var f=!0;if(f){if(e.reactions!==void 0){let n=e.reactions,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.by===void 0&&(n=`by`)||e.count===void 0&&(n=`count`)||e.reaction===void 0&&(n=`reaction`))return L.errors=[{instancePath:t+`/nudge/parent/reactions/`+r,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.by!==void 0){let n=e.by,i=s;if(s===i){if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return L.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(a!==s)break}}else return L.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/by`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var p=i===s}else var p=!0;if(p){if(e.count!==void 0){let n=e.count,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return L.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/count`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return L.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/count`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return L.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/count`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var p=i===s}else var p=!0;if(p){if(e.reaction!==void 0){let n=e.reaction,i=s;if(typeof n!=`string`)return L.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/reaction`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`thumbs_up`&&n!==`thumbs_down`)return L.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/reaction`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:kt.properties.nudge.properties.parent.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var p=i===s}else var p=!0}}}else return L.errors=[{instancePath:t+`/nudge/parent/reactions/`+r,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return L.errors=[{instancePath:t+`/nudge/parent/reactions`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var f=r===s}else var f=!0;if(f){if(e.text!==void 0){let n=e.text,r=s;if(s===r){if(typeof n==`string`){if(n.length>4e4)return L.errors=[{instancePath:t+`/nudge/parent/text`,schemaPath:`#/properties/nudge/properties/parent/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`}],!1;if(n.length<1)return L.errors=[{instancePath:t+`/nudge/parent/text`,schemaPath:`#/properties/nudge/properties/parent/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return L.errors=[{instancePath:t+`/nudge/parent/text`,schemaPath:`#/properties/nudge/properties/parent/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(e.closedAt!==void 0){let n=e.closedAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return L.errors=[{instancePath:t+`/nudge/parent/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/parent/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(e.closedBy!==void 0){let n=e.closedBy,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return L.errors=[{instancePath:t+`/nudge/parent/closedBy`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/parent/closedBy`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(e.kind!==void 0){let n=e.kind,r=s;if(typeof n!=`string`)return L.errors=[{instancePath:t+`/nudge/parent/kind`,schemaPath:`#/properties/nudge/properties/parent/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`top-level`)return L.errors=[{instancePath:t+`/nudge/parent/kind`,schemaPath:`#/properties/nudge/properties/parent/properties/kind/enum`,keyword:`enum`,params:{allowedValues:kt.properties.nudge.properties.parent.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var f=r===s}else var f=!0;if(f){if(e.latestReplyAt!==void 0){let n=e.latestReplyAt,r=s,i=s,a=!1,c=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/nudge/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/nudge/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var m=c===s;a||=m;let l=s;if(n!==null){let e={instancePath:t+`/nudge/parent/latestReplyAt`,schemaPath:`#/properties/nudge/properties/parent/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var m=l===s;if(a||=m,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/nudge/parent/latestReplyAt`,schemaPath:`#/properties/nudge/properties/parent/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,L.errors=o,!1}var f=r===s}else var f=!0;if(f){if(e.latestReplyId!==void 0){let n=e.latestReplyId,r=s,i=s,a=!1,c=s,l=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/nudge/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===l&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/nudge/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<1||isNaN(n)){let e={instancePath:t+`/nudge/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var h=c===s;a||=h;let u=s;if(n!==null){let e={instancePath:t+`/nudge/parent/latestReplyId`,schemaPath:`#/properties/nudge/properties/parent/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var h=u===s;if(a||=h,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/nudge/parent/latestReplyId`,schemaPath:`#/properties/nudge/properties/parent/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,L.errors=o,!1}var f=r===s}else var f=!0;if(f){if(e.repliers!==void 0){let n=e.repliers,r=s;if(s===r){if(Array.isArray(n)){if(n.length>4)return L.errors=[{instancePath:t+`/nudge/parent/repliers`,schemaPath:`#/properties/nudge/properties/parent/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`}],!1;{let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`))return L.errors=[{instancePath:t+`/nudge/parent/repliers/`+r,schemaPath:`#/properties/nudge/properties/parent/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return L.errors=[{instancePath:t+`/nudge/parent/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/parent/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var g=i===s}else var g=!0;if(g){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n))return L.errors=[{instancePath:t+`/nudge/parent/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/parent/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var g=i===s}else var g=!0}}else return L.errors=[{instancePath:t+`/nudge/parent/repliers/`+r,schemaPath:`#/properties/nudge/properties/parent/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}}else return L.errors=[{instancePath:t+`/nudge/parent/repliers`,schemaPath:`#/properties/nudge/properties/parent/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var f=r===s}else var f=!0;if(f){if(e.replyCount!==void 0){let n=e.replyCount,r=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return L.errors=[{instancePath:t+`/nudge/parent/replyCount`,schemaPath:`#/properties/nudge/properties/parent/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===r&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return L.errors=[{instancePath:t+`/nudge/parent/replyCount`,schemaPath:`#/properties/nudge/properties/parent/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<0||isNaN(n))return L.errors=[{instancePath:t+`/nudge/parent/replyCount`,schemaPath:`#/properties/nudge/properties/parent/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`}],!1}var f=r===s}else var f=!0}}}}}}}}}}}}}}}else return L.errors=[{instancePath:t+`/nudge/parent`,schemaPath:`#/properties/nudge/properties/parent/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var u=r===s}else var u=!0;if(u){if(n.raisedAt!==void 0){let e=n.raisedAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return L.errors=[{instancePath:t+`/nudge/raisedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return L.errors=[{instancePath:t+`/nudge/raisedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.text!==void 0){let e=s;if(typeof n.text!=`string`)return L.errors=[{instancePath:t+`/nudge/text`,schemaPath:`#/properties/nudge/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var u=e===s}else var u=!0}}}}}}else return L.errors=[{instancePath:t+`/nudge`,schemaPath:`#/properties/nudge/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var _=r===s}else var _=!0;if(_){if(e.type!==void 0){let n=e.type,r=s;if(typeof n!=`string`)return L.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`nudge`)return L.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:kt.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var _=r===s}else var _=!0}}else return L.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return L.errors=o,s===0}L.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var At=Mt,jt={type:`object`,properties:{nudgeIds:{type:`array`,items:{$ref:`#/$defs/NudgeId`}},type:{type:`string`,enum:[`nudge-read`]}},required:[`nudgeIds`,`type`],additionalProperties:!0,$defs:{NudgeId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991}}};function Mt(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=Mt.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.nudgeIds===void 0&&(n=`nudgeIds`)||e.type===void 0&&(n=`type`))return Mt.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.nudgeIds!==void 0){let n=e.nudgeIds;if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r];if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return Mt.errors=[{instancePath:t+`/nudgeIds/`+r,schemaPath:`#/$defs/NudgeId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return Mt.errors=[{instancePath:t+`/nudgeIds/`+r,schemaPath:`#/$defs/NudgeId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<-9007199254740991||isNaN(e))return Mt.errors=[{instancePath:t+`/nudgeIds/`+r,schemaPath:`#/$defs/NudgeId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}}}else return Mt.errors=[{instancePath:t+`/nudgeIds`,schemaPath:`#/properties/nudgeIds/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var s=!0}else var s=!0;if(s){if(e.type!==void 0){let n=e.type;if(typeof n!=`string`)return Mt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`nudge-read`)return Mt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:jt.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0}else var s=!0}}else return Mt.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return Mt.errors=null,!0}Mt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Nt=Ft,Pt={type:`object`,properties:{alert:{type:`object`,properties:{agent:{$ref:`#/$defs/IdentityName`},backOnlineAt:{$ref:`#/$defs/IsoTime`},id:{$ref:`#/$defs/OfflineAlertId`},offlineReason:{type:`string`,enum:[`left`,`session revoked`,`session expired`,`token rotated`,`deactivated`,`connection lost`]},raisedAt:{$ref:`#/$defs/IsoTime`},read:{type:`boolean`}},required:[`agent`,`id`,`offlineReason`,`raisedAt`,`read`],additionalProperties:!0},type:{type:`string`,enum:[`offline-alert`]}},required:[`alert`,`type`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},OfflineAlertId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991}}};function Ft(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=Ft.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.alert===void 0&&(n=`alert`)||e.type===void 0&&(n=`type`))return Ft.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.alert!==void 0){let n=e.alert;if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.agent===void 0&&(e=`agent`)||n.id===void 0&&(e=`id`)||n.offlineReason===void 0&&(e=`offlineReason`)||n.raisedAt===void 0&&(e=`raisedAt`)||n.read===void 0&&(e=`read`))return Ft.errors=[{instancePath:t+`/alert`,schemaPath:`#/properties/alert/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.agent!==void 0){let e=n.agent;if(typeof e==`string`){if(!j.test(e))return Ft.errors=[{instancePath:t+`/alert/agent`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return Ft.errors=[{instancePath:t+`/alert/agent`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.backOnlineAt!==void 0){let e=n.backOnlineAt;if(typeof e==`string`){if(!A.test(e))return Ft.errors=[{instancePath:t+`/alert/backOnlineAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Ft.errors=[{instancePath:t+`/alert/backOnlineAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.id!==void 0){let e=n.id;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return Ft.errors=[{instancePath:t+`/alert/id`,schemaPath:`#/$defs/OfflineAlertId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return Ft.errors=[{instancePath:t+`/alert/id`,schemaPath:`#/$defs/OfflineAlertId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<-9007199254740991||isNaN(e))return Ft.errors=[{instancePath:t+`/alert/id`,schemaPath:`#/$defs/OfflineAlertId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var s=!0}else var s=!0;if(s){if(n.offlineReason!==void 0){let e=n.offlineReason;if(typeof e!=`string`)return Ft.errors=[{instancePath:t+`/alert/offlineReason`,schemaPath:`#/properties/alert/properties/offlineReason/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`left`&&e!==`session revoked`&&e!==`session expired`&&e!==`token rotated`&&e!==`deactivated`&&e!==`connection lost`)return Ft.errors=[{instancePath:t+`/alert/offlineReason`,schemaPath:`#/properties/alert/properties/offlineReason/enum`,keyword:`enum`,params:{allowedValues:Pt.properties.alert.properties.offlineReason.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0}else var s=!0;if(s){if(n.raisedAt!==void 0){let e=n.raisedAt;if(typeof e==`string`){if(!A.test(e))return Ft.errors=[{instancePath:t+`/alert/raisedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Ft.errors=[{instancePath:t+`/alert/raisedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.read!==void 0){if(typeof n.read!=`boolean`)return Ft.errors=[{instancePath:t+`/alert/read`,schemaPath:`#/properties/alert/properties/read/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0}else var s=!0}}}}}}else return Ft.errors=[{instancePath:t+`/alert`,schemaPath:`#/properties/alert/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0}else var c=!0;if(c){if(e.type!==void 0){let n=e.type;if(typeof n!=`string`)return Ft.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`offline-alert`)return Ft.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:Pt.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0}else var c=!0}}else return Ft.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return Ft.errors=null,!0}Ft.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var It=Rt,Lt={type:`object`,properties:{presence:{type:`object`,properties:{connection:{anyOf:[{type:`object`,properties:{host:{type:`string`},via:{type:`string`,enum:[`watch`]}},required:[`via`],additionalProperties:!0},{type:`object`,properties:{via:{type:`string`,enum:[`web`]}},required:[`via`],additionalProperties:!0}]},identity:{$ref:`#/$defs/IdentityName`},lastSeenAt:{$ref:`#/$defs/IsoTime`},offlineReason:{type:`string`,enum:[`left`,`session revoked`,`session expired`,`token rotated`,`deactivated`,`connection lost`]},online:{type:`boolean`},warning:{type:`boolean`,enum:[!0]}},required:[`identity`,`online`],additionalProperties:!0},type:{type:`string`,enum:[`presence`]}},required:[`presence`,`type`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`}}};function Rt(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=Rt.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.presence===void 0&&(n=`presence`)||e.type===void 0&&(n=`type`))return Rt.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.presence!==void 0){let n=e.presence,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.identity===void 0&&(e=`identity`)||n.online===void 0&&(e=`online`))return Rt.errors=[{instancePath:t+`/presence`,schemaPath:`#/properties/presence/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.connection!==void 0){let e=n.connection,r=s,i=s,a=!1,c=s;if(s===c){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.via===void 0&&(n=`via`)){let e={instancePath:t+`/presence/connection`,schemaPath:`#/properties/presence/properties/connection/anyOf/0/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.host!==void 0){let n=s;if(typeof e.host!=`string`){let e={instancePath:t+`/presence/connection/host`,schemaPath:`#/properties/presence/properties/connection/anyOf/0/properties/host/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}var l=n===s}else var l=!0;if(l){if(e.via!==void 0){let n=e.via,r=s;if(typeof n!=`string`){let e={instancePath:t+`/presence/connection/via`,schemaPath:`#/properties/presence/properties/connection/anyOf/0/properties/via/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`watch`){let e={instancePath:t+`/presence/connection/via`,schemaPath:`#/properties/presence/properties/connection/anyOf/0/properties/via/enum`,keyword:`enum`,params:{allowedValues:Lt.properties.presence.properties.connection.anyOf[0].properties.via.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var l=r===s}else var l=!0}}}else{let e={instancePath:t+`/presence/connection`,schemaPath:`#/properties/presence/properties/connection/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=c===s;if(a||=u,u)var d=!0;let p=s;if(s===p){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.via===void 0&&(n=`via`)){let e={instancePath:t+`/presence/connection`,schemaPath:`#/properties/presence/properties/connection/anyOf/1/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else if(e.via!==void 0){let n=e.via;if(typeof n!=`string`){let e={instancePath:t+`/presence/connection/via`,schemaPath:`#/properties/presence/properties/connection/anyOf/1/properties/via/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`web`){let e={instancePath:t+`/presence/connection/via`,schemaPath:`#/properties/presence/properties/connection/anyOf/1/properties/via/enum`,keyword:`enum`,params:{allowedValues:Lt.properties.presence.properties.connection.anyOf[1].properties.via.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}}}else{let e={instancePath:t+`/presence/connection`,schemaPath:`#/properties/presence/properties/connection/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=p===s;if(a||=u,u&&d!==!0&&(d=!0),a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/presence/connection`,schemaPath:`#/properties/presence/properties/connection/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,Rt.errors=o,!1}var f=r===s}else var f=!0;if(f){if(n.identity!==void 0){let e=n.identity,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return Rt.errors=[{instancePath:t+`/presence/identity`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return Rt.errors=[{instancePath:t+`/presence/identity`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(n.lastSeenAt!==void 0){let e=n.lastSeenAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return Rt.errors=[{instancePath:t+`/presence/lastSeenAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Rt.errors=[{instancePath:t+`/presence/lastSeenAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(n.offlineReason!==void 0){let e=n.offlineReason,r=s;if(typeof e!=`string`)return Rt.errors=[{instancePath:t+`/presence/offlineReason`,schemaPath:`#/properties/presence/properties/offlineReason/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`left`&&e!==`session revoked`&&e!==`session expired`&&e!==`token rotated`&&e!==`deactivated`&&e!==`connection lost`)return Rt.errors=[{instancePath:t+`/presence/offlineReason`,schemaPath:`#/properties/presence/properties/offlineReason/enum`,keyword:`enum`,params:{allowedValues:Lt.properties.presence.properties.offlineReason.enum},message:`must be equal to one of the allowed values`}],!1;var f=r===s}else var f=!0;if(f){if(n.online!==void 0){let e=s;if(typeof n.online!=`boolean`)return Rt.errors=[{instancePath:t+`/presence/online`,schemaPath:`#/properties/presence/properties/online/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var f=e===s}else var f=!0;if(f){if(n.warning!==void 0){let e=n.warning,r=s;if(typeof e!=`boolean`)return Rt.errors=[{instancePath:t+`/presence/warning`,schemaPath:`#/properties/presence/properties/warning/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;if(e!==!0)return Rt.errors=[{instancePath:t+`/presence/warning`,schemaPath:`#/properties/presence/properties/warning/enum`,keyword:`enum`,params:{allowedValues:Lt.properties.presence.properties.warning.enum},message:`must be equal to one of the allowed values`}],!1;var f=r===s}else var f=!0}}}}}}else return Rt.errors=[{instancePath:t+`/presence`,schemaPath:`#/properties/presence/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var p=r===s}else var p=!0;if(p){if(e.type!==void 0){let n=e.type,r=s;if(typeof n!=`string`)return Rt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`presence`)return Rt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:Lt.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var p=r===s}else var p=!0}}else return Rt.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return Rt.errors=o,s===0}Rt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var zt=Vt,Bt={type:`object`,properties:{presence:{type:`array`,items:{type:`object`,properties:{connection:{anyOf:[{type:`object`,properties:{host:{type:`string`},via:{type:`string`,enum:[`watch`]}},required:[`via`],additionalProperties:!0},{type:`object`,properties:{via:{type:`string`,enum:[`web`]}},required:[`via`],additionalProperties:!0}]},identity:{$ref:`#/$defs/IdentityName`},lastSeenAt:{$ref:`#/$defs/IsoTime`},offlineReason:{type:`string`,enum:[`left`,`session revoked`,`session expired`,`token rotated`,`deactivated`,`connection lost`]},online:{type:`boolean`},warning:{type:`boolean`,enum:[!0]}},required:[`identity`,`online`],additionalProperties:!0}}},required:[`presence`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`}}};function Vt(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=Vt.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.presence===void 0&&(n=`presence`))return Vt.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.presence!==void 0){let n=e.presence;if(s===s){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.identity===void 0&&(n=`identity`)||e.online===void 0&&(n=`online`))return Vt.errors=[{instancePath:t+`/presence/`+r,schemaPath:`#/properties/presence/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.connection!==void 0){let n=e.connection,i=s,a=s,c=!1,p=s;if(s===p){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.via===void 0&&(e=`via`)){let n={instancePath:t+`/presence/`+r+`/connection`,schemaPath:`#/properties/presence/items/properties/connection/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.host!==void 0){let e=s;if(typeof n.host!=`string`){let e={instancePath:t+`/presence/`+r+`/connection/host`,schemaPath:`#/properties/presence/items/properties/connection/anyOf/0/properties/host/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}var l=e===s}else var l=!0;if(l){if(n.via!==void 0){let e=n.via,i=s;if(typeof e!=`string`){let e={instancePath:t+`/presence/`+r+`/connection/via`,schemaPath:`#/properties/presence/items/properties/connection/anyOf/0/properties/via/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`watch`){let e={instancePath:t+`/presence/`+r+`/connection/via`,schemaPath:`#/properties/presence/items/properties/connection/anyOf/0/properties/via/enum`,keyword:`enum`,params:{allowedValues:Bt.properties.presence.items.properties.connection.anyOf[0].properties.via.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var l=i===s}else var l=!0}}}else{let e={instancePath:t+`/presence/`+r+`/connection`,schemaPath:`#/properties/presence/items/properties/connection/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=p===s;if(c||=u,u)var d=!0;let m=s;if(s===m){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.via===void 0&&(e=`via`)){let n={instancePath:t+`/presence/`+r+`/connection`,schemaPath:`#/properties/presence/items/properties/connection/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else if(n.via!==void 0){let e=n.via;if(typeof e!=`string`){let e={instancePath:t+`/presence/`+r+`/connection/via`,schemaPath:`#/properties/presence/items/properties/connection/anyOf/1/properties/via/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`web`){let e={instancePath:t+`/presence/`+r+`/connection/via`,schemaPath:`#/properties/presence/items/properties/connection/anyOf/1/properties/via/enum`,keyword:`enum`,params:{allowedValues:Bt.properties.presence.items.properties.connection.anyOf[1].properties.via.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}}}else{let e={instancePath:t+`/presence/`+r+`/connection`,schemaPath:`#/properties/presence/items/properties/connection/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=m===s;if(c||=u,u&&d!==!0&&(d=!0),c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/presence/`+r+`/connection`,schemaPath:`#/properties/presence/items/properties/connection/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,Vt.errors=o,!1}var f=i===s}else var f=!0;if(f){if(e.identity!==void 0){let n=e.identity,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return Vt.errors=[{instancePath:t+`/presence/`+r+`/identity`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return Vt.errors=[{instancePath:t+`/presence/`+r+`/identity`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=i===s}else var f=!0;if(f){if(e.lastSeenAt!==void 0){let n=e.lastSeenAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return Vt.errors=[{instancePath:t+`/presence/`+r+`/lastSeenAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Vt.errors=[{instancePath:t+`/presence/`+r+`/lastSeenAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=i===s}else var f=!0;if(f){if(e.offlineReason!==void 0){let n=e.offlineReason,i=s;if(typeof n!=`string`)return Vt.errors=[{instancePath:t+`/presence/`+r+`/offlineReason`,schemaPath:`#/properties/presence/items/properties/offlineReason/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`left`&&n!==`session revoked`&&n!==`session expired`&&n!==`token rotated`&&n!==`deactivated`&&n!==`connection lost`)return Vt.errors=[{instancePath:t+`/presence/`+r+`/offlineReason`,schemaPath:`#/properties/presence/items/properties/offlineReason/enum`,keyword:`enum`,params:{allowedValues:Bt.properties.presence.items.properties.offlineReason.enum},message:`must be equal to one of the allowed values`}],!1;var f=i===s}else var f=!0;if(f){if(e.online!==void 0){let n=s;if(typeof e.online!=`boolean`)return Vt.errors=[{instancePath:t+`/presence/`+r+`/online`,schemaPath:`#/properties/presence/items/properties/online/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var f=n===s}else var f=!0;if(f){if(e.warning!==void 0){let n=e.warning,i=s;if(typeof n!=`boolean`)return Vt.errors=[{instancePath:t+`/presence/`+r+`/warning`,schemaPath:`#/properties/presence/items/properties/warning/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;if(n!==!0)return Vt.errors=[{instancePath:t+`/presence/`+r+`/warning`,schemaPath:`#/properties/presence/items/properties/warning/enum`,keyword:`enum`,params:{allowedValues:Bt.properties.presence.items.properties.warning.enum},message:`must be equal to one of the allowed values`}],!1;var f=i===s}else var f=!0}}}}}}else return Vt.errors=[{instancePath:t+`/presence/`+r,schemaPath:`#/properties/presence/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return Vt.errors=[{instancePath:t+`/presence`,schemaPath:`#/properties/presence/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}}}else return Vt.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return Vt.errors=o,s===0}Vt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Ht=R,Ut={type:`object`,properties:{channel:{$ref:`#/$defs/ChannelName`},messageId:{$ref:`#/$defs/MessageId`},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},type:{type:`string`,enum:[`reaction`]}},required:[`channel`,`messageId`,`reactions`,`type`],additionalProperties:!0,$defs:{ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`}}};function R(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=R.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.channel===void 0&&(n=`channel`)||e.messageId===void 0&&(n=`messageId`)||e.reactions===void 0&&(n=`reactions`)||e.type===void 0&&(n=`type`))return R.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.channel!==void 0){let n=e.channel;if(typeof n==`string`){if(!F.test(n))return R.errors=[{instancePath:t+`/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return R.errors=[{instancePath:t+`/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.messageId!==void 0){let n=e.messageId;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return R.errors=[{instancePath:t+`/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return R.errors=[{instancePath:t+`/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return R.errors=[{instancePath:t+`/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var s=!0}else var s=!0;if(s){if(e.reactions!==void 0){let n=e.reactions;if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r];if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.by===void 0&&(n=`by`)||e.count===void 0&&(n=`count`)||e.reaction===void 0&&(n=`reaction`))return R.errors=[{instancePath:t+`/reactions/`+r,schemaPath:`#/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.by!==void 0){let n=e.by;if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i];if(typeof e==`string`){if(!j.test(e))return R.errors=[{instancePath:t+`/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return R.errors=[{instancePath:t+`/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}}else return R.errors=[{instancePath:t+`/reactions/`+r+`/by`,schemaPath:`#/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var c=!0}else var c=!0;if(c){if(e.count!==void 0){let n=e.count;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return R.errors=[{instancePath:t+`/reactions/`+r+`/count`,schemaPath:`#/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return R.errors=[{instancePath:t+`/reactions/`+r+`/count`,schemaPath:`#/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return R.errors=[{instancePath:t+`/reactions/`+r+`/count`,schemaPath:`#/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var c=!0}else var c=!0;if(c){if(e.reaction!==void 0){let n=e.reaction;if(typeof n!=`string`)return R.errors=[{instancePath:t+`/reactions/`+r+`/reaction`,schemaPath:`#/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`thumbs_up`&&n!==`thumbs_down`)return R.errors=[{instancePath:t+`/reactions/`+r+`/reaction`,schemaPath:`#/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Ut.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0}else var c=!0}}}else return R.errors=[{instancePath:t+`/reactions/`+r,schemaPath:`#/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return R.errors=[{instancePath:t+`/reactions`,schemaPath:`#/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var s=!0}else var s=!0;if(s){if(e.type!==void 0){let n=e.type;if(typeof n!=`string`)return R.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`reaction`)return R.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:Ut.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0}else var s=!0}}}}else return R.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return R.errors=null,!0}R.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Wt=Kt,Gt={type:`object`,properties:{readPosition:{type:`object`,properties:{channel:{$ref:`#/$defs/ChannelName`},messageId:{$ref:`#/$defs/MessageId`},thread:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]}},required:[`channel`,`messageId`,`thread`],additionalProperties:!0},type:{type:`string`,enum:[`read-position`]}},required:[`readPosition`,`type`],additionalProperties:!0,$defs:{ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}};function Kt(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=Kt.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.readPosition===void 0&&(n=`readPosition`)||e.type===void 0&&(n=`type`))return Kt.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.readPosition!==void 0){let n=e.readPosition,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.channel===void 0&&(e=`channel`)||n.messageId===void 0&&(e=`messageId`)||n.thread===void 0&&(e=`thread`))return Kt.errors=[{instancePath:t+`/readPosition`,schemaPath:`#/properties/readPosition/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.channel!==void 0){let e=n.channel,r=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return Kt.errors=[{instancePath:t+`/readPosition/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return Kt.errors=[{instancePath:t+`/readPosition/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(n.messageId!==void 0){let e=n.messageId,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return Kt.errors=[{instancePath:t+`/readPosition/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return Kt.errors=[{instancePath:t+`/readPosition/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return Kt.errors=[{instancePath:t+`/readPosition/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var l=r===s}else var l=!0;if(l){if(n.thread!==void 0){let e=n.thread,r=s,i=s,a=!1,c=s,d=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===d&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var u=c===s;a||=u;let f=s;if(e!==null){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/properties/readPosition/properties/thread/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var u=f===s;if(a||=u,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/properties/readPosition/properties/thread/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,Kt.errors=o,!1}var l=r===s}else var l=!0}}}else return Kt.errors=[{instancePath:t+`/readPosition`,schemaPath:`#/properties/readPosition/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var d=r===s}else var d=!0;if(d){if(e.type!==void 0){let n=e.type,r=s;if(typeof n!=`string`)return Kt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`read-position`)return Kt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:Gt.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var d=r===s}else var d=!0}}else return Kt.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return Kt.errors=o,s===0}Kt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var qt=Yt,Jt={type:`object`,properties:{readPosition:{type:`object`,properties:{channel:{$ref:`#/$defs/ChannelName`},messageId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},thread:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]}},required:[`channel`,`messageId`,`thread`],additionalProperties:!0},type:{type:`string`,enum:[`read-position-moved-back`]}},required:[`readPosition`,`type`],additionalProperties:!0,$defs:{ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}};function Yt(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=Yt.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.readPosition===void 0&&(n=`readPosition`)||e.type===void 0&&(n=`type`))return Yt.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.readPosition!==void 0){let n=e.readPosition,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.channel===void 0&&(e=`channel`)||n.messageId===void 0&&(e=`messageId`)||n.thread===void 0&&(e=`thread`))return Yt.errors=[{instancePath:t+`/readPosition`,schemaPath:`#/properties/readPosition/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.channel!==void 0){let e=n.channel,r=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return Yt.errors=[{instancePath:t+`/readPosition/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return Yt.errors=[{instancePath:t+`/readPosition/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(n.messageId!==void 0){let e=n.messageId,r=s,i=s,a=!1,c=s,d=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/readPosition/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===d&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/readPosition/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/readPosition/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var u=c===s;a||=u;let f=s;if(e!==null){let e={instancePath:t+`/readPosition/messageId`,schemaPath:`#/properties/readPosition/properties/messageId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var u=f===s;if(a||=u,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/readPosition/messageId`,schemaPath:`#/properties/readPosition/properties/messageId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,Yt.errors=o,!1}var l=r===s}else var l=!0;if(l){if(n.thread!==void 0){let e=n.thread,r=s,i=s,a=!1,c=s,u=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===u&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var d=c===s;a||=d;let f=s;if(e!==null){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/properties/readPosition/properties/thread/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var d=f===s;if(a||=d,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/properties/readPosition/properties/thread/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,Yt.errors=o,!1}var l=r===s}else var l=!0}}}else return Yt.errors=[{instancePath:t+`/readPosition`,schemaPath:`#/properties/readPosition/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var f=r===s}else var f=!0;if(f){if(e.type!==void 0){let n=e.type,r=s;if(typeof n!=`string`)return Yt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`read-position-moved-back`)return Yt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:Jt.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var f=r===s}else var f=!0}}else return Yt.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return Yt.errors=o,s===0}Yt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Xt=Qt,Zt={type:`object`,properties:{receipt:{type:`object`,properties:{identity:{$ref:`#/$defs/IdentityName`},messageId:{$ref:`#/$defs/MessageId`},seen:{type:`boolean`},seenAt:{$ref:`#/$defs/IsoTime`}},required:[`identity`,`messageId`,`seen`],additionalProperties:!0},type:{type:`string`,enum:[`read-receipt`]}},required:[`receipt`,`type`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`}}};function Qt(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=Qt.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.receipt===void 0&&(n=`receipt`)||e.type===void 0&&(n=`type`))return Qt.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.receipt!==void 0){let n=e.receipt;if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.identity===void 0&&(e=`identity`)||n.messageId===void 0&&(e=`messageId`)||n.seen===void 0&&(e=`seen`))return Qt.errors=[{instancePath:t+`/receipt`,schemaPath:`#/properties/receipt/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.identity!==void 0){let e=n.identity;if(typeof e==`string`){if(!j.test(e))return Qt.errors=[{instancePath:t+`/receipt/identity`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return Qt.errors=[{instancePath:t+`/receipt/identity`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.messageId!==void 0){let e=n.messageId;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return Qt.errors=[{instancePath:t+`/receipt/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return Qt.errors=[{instancePath:t+`/receipt/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return Qt.errors=[{instancePath:t+`/receipt/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var s=!0}else var s=!0;if(s){if(n.seen!==void 0){if(typeof n.seen!=`boolean`)return Qt.errors=[{instancePath:t+`/receipt/seen`,schemaPath:`#/properties/receipt/properties/seen/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0}else var s=!0;if(s){if(n.seenAt!==void 0){let e=n.seenAt;if(typeof e==`string`){if(!A.test(e))return Qt.errors=[{instancePath:t+`/receipt/seenAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Qt.errors=[{instancePath:t+`/receipt/seenAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}}else return Qt.errors=[{instancePath:t+`/receipt`,schemaPath:`#/properties/receipt/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0}else var c=!0;if(c){if(e.type!==void 0){let n=e.type;if(typeof n!=`string`)return Qt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`read-receipt`)return Qt.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:Zt.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0}else var c=!0}}else return Qt.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return Qt.errors=null,!0}Qt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var $t=tn,en={type:`object`,properties:{subscription:{type:`object`,properties:{channel:{$ref:`#/$defs/ChannelName`},subscribed:{type:`boolean`}},required:[`channel`,`subscribed`],additionalProperties:!0},type:{type:`string`,enum:[`subscription`]}},required:[`subscription`,`type`],additionalProperties:!0,$defs:{ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`}}};function tn(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=tn.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.subscription===void 0&&(n=`subscription`)||e.type===void 0&&(n=`type`))return tn.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.subscription!==void 0){let n=e.subscription;if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.channel===void 0&&(e=`channel`)||n.subscribed===void 0&&(e=`subscribed`))return tn.errors=[{instancePath:t+`/subscription`,schemaPath:`#/properties/subscription/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.channel!==void 0){let e=n.channel;if(typeof e==`string`){if(!F.test(e))return tn.errors=[{instancePath:t+`/subscription/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return tn.errors=[{instancePath:t+`/subscription/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.subscribed!==void 0){if(typeof n.subscribed!=`boolean`)return tn.errors=[{instancePath:t+`/subscription/subscribed`,schemaPath:`#/properties/subscription/properties/subscribed/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0}else var s=!0}}else return tn.errors=[{instancePath:t+`/subscription`,schemaPath:`#/properties/subscription/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0}else var c=!0;if(c){if(e.type!==void 0){let n=e.type;if(typeof n!=`string`)return tn.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`subscription`)return tn.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:en.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0}else var c=!0}}else return tn.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return tn.errors=null,!0}tn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var nn=z,rn={type:`object`,properties:{parent:{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},type:{type:`string`,enum:[`thread`]}},required:[`parent`,`type`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},Harness:{type:`string`,pattern:`^[a-z0-9-]{1,40}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}};function z(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=z.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.parent===void 0&&(n=`parent`)||e.type===void 0&&(n=`type`))return z.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.parent!==void 0){let n=e.parent,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.latestReplyAt===void 0&&(e=`latestReplyAt`)||n.latestReplyId===void 0&&(e=`latestReplyId`)||n.repliers===void 0&&(e=`repliers`)||n.replyCount===void 0&&(e=`replyCount`))return z.errors=[{instancePath:t+`/parent`,schemaPath:`#/properties/parent/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.author!==void 0){let e=n.author,r=s;if(s===r){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`))return z.errors=[{instancePath:t+`/parent/author`,schemaPath:`#/properties/parent/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return z.errors=[{instancePath:t+`/parent/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return z.errors=[{instancePath:t+`/parent/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(e.owner!==void 0){let n=e.owner,r=s;if(s===s){if(typeof n==`string`){if(!P.test(n))return z.errors=[{instancePath:t+`/parent/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return z.errors=[{instancePath:t+`/parent/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0}}else return z.errors=[{instancePath:t+`/parent/author`,schemaPath:`#/properties/parent/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var u=r===s}else var u=!0;if(u){if(n.channel!==void 0){let e=n.channel,r=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return z.errors=[{instancePath:t+`/parent/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return z.errors=[{instancePath:t+`/parent/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return z.errors=[{instancePath:t+`/parent/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return z.errors=[{instancePath:t+`/parent/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.harness!==void 0){let e=n.harness,r=s;if(s===s){if(typeof e==`string`){if(!wt.test(e))return z.errors=[{instancePath:t+`/parent/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`}],!1}else return z.errors=[{instancePath:t+`/parent/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.id!==void 0){let e=n.id,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return z.errors=[{instancePath:t+`/parent/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return z.errors=[{instancePath:t+`/parent/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return z.errors=[{instancePath:t+`/parent/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var u=r===s}else var u=!0;if(u){if(n.mentions!==void 0){let e=n.mentions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return z.errors=[{instancePath:t+`/parent/mentions/`+r,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return z.errors=[{instancePath:t+`/parent/mentions/`+r,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(i!==s)break}}else return z.errors=[{instancePath:t+`/parent/mentions`,schemaPath:`#/properties/parent/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(n.reactions!==void 0){let e=n.reactions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`))return z.errors=[{instancePath:t+`/parent/reactions/`+r,schemaPath:`#/properties/parent/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.by!==void 0){let e=n.by,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return z.errors=[{instancePath:t+`/parent/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return z.errors=[{instancePath:t+`/parent/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(a!==s)break}}else return z.errors=[{instancePath:t+`/parent/reactions/`+r+`/by`,schemaPath:`#/properties/parent/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var d=i===s}else var d=!0;if(d){if(n.count!==void 0){let e=n.count,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return z.errors=[{instancePath:t+`/parent/reactions/`+r+`/count`,schemaPath:`#/properties/parent/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return z.errors=[{instancePath:t+`/parent/reactions/`+r+`/count`,schemaPath:`#/properties/parent/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return z.errors=[{instancePath:t+`/parent/reactions/`+r+`/count`,schemaPath:`#/properties/parent/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var d=i===s}else var d=!0;if(d){if(n.reaction!==void 0){let e=n.reaction,i=s;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/parent/reactions/`+r+`/reaction`,schemaPath:`#/properties/parent/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`thumbs_up`&&e!==`thumbs_down`)return z.errors=[{instancePath:t+`/parent/reactions/`+r+`/reaction`,schemaPath:`#/properties/parent/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:rn.properties.parent.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var d=i===s}else var d=!0}}}else return z.errors=[{instancePath:t+`/parent/reactions/`+r,schemaPath:`#/properties/parent/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return z.errors=[{instancePath:t+`/parent/reactions`,schemaPath:`#/properties/parent/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(n.text!==void 0){let e=n.text,r=s;if(s===r){if(typeof e==`string`){if(e.length>4e4)return z.errors=[{instancePath:t+`/parent/text`,schemaPath:`#/properties/parent/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`}],!1;if(e.length<1)return z.errors=[{instancePath:t+`/parent/text`,schemaPath:`#/properties/parent/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return z.errors=[{instancePath:t+`/parent/text`,schemaPath:`#/properties/parent/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.closedAt!==void 0){let e=n.closedAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return z.errors=[{instancePath:t+`/parent/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return z.errors=[{instancePath:t+`/parent/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.closedBy!==void 0){let e=n.closedBy,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return z.errors=[{instancePath:t+`/parent/closedBy`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return z.errors=[{instancePath:t+`/parent/closedBy`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`)return z.errors=[{instancePath:t+`/parent/kind`,schemaPath:`#/properties/parent/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`top-level`)return z.errors=[{instancePath:t+`/parent/kind`,schemaPath:`#/properties/parent/properties/kind/enum`,keyword:`enum`,params:{allowedValues:rn.properties.parent.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var u=r===s}else var u=!0;if(u){if(n.latestReplyAt!==void 0){let e=n.latestReplyAt,r=s,i=s,a=!1,c=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=c===s;a||=f;let l=s;if(e!==null){let e={instancePath:t+`/parent/latestReplyAt`,schemaPath:`#/properties/parent/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var f=l===s;if(a||=f,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/parent/latestReplyAt`,schemaPath:`#/properties/parent/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,z.errors=o,!1}var u=r===s}else var u=!0;if(u){if(n.latestReplyId!==void 0){let e=n.latestReplyId,r=s,i=s,a=!1,c=s,l=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===l&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var p=c===s;a||=p;let d=s;if(e!==null){let e={instancePath:t+`/parent/latestReplyId`,schemaPath:`#/properties/parent/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var p=d===s;if(a||=p,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/parent/latestReplyId`,schemaPath:`#/properties/parent/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,z.errors=o,!1}var u=r===s}else var u=!0;if(u){if(n.repliers!==void 0){let e=n.repliers,r=s;if(s===r){if(Array.isArray(e)){if(e.length>4)return z.errors=[{instancePath:t+`/parent/repliers`,schemaPath:`#/properties/parent/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`}],!1;{let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`))return z.errors=[{instancePath:t+`/parent/repliers/`+r,schemaPath:`#/properties/parent/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return z.errors=[{instancePath:t+`/parent/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return z.errors=[{instancePath:t+`/parent/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var m=i===s}else var m=!0;if(m){if(n.owner!==void 0){let e=n.owner,i=s;if(s===s){if(typeof e==`string`){if(!P.test(e))return z.errors=[{instancePath:t+`/parent/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return z.errors=[{instancePath:t+`/parent/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var m=i===s}else var m=!0}}else return z.errors=[{instancePath:t+`/parent/repliers/`+r,schemaPath:`#/properties/parent/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}}else return z.errors=[{instancePath:t+`/parent/repliers`,schemaPath:`#/properties/parent/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(n.replyCount!==void 0){let e=n.replyCount,r=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return z.errors=[{instancePath:t+`/parent/replyCount`,schemaPath:`#/properties/parent/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===r&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return z.errors=[{instancePath:t+`/parent/replyCount`,schemaPath:`#/properties/parent/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<0||isNaN(e))return z.errors=[{instancePath:t+`/parent/replyCount`,schemaPath:`#/properties/parent/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`}],!1}var u=r===s}else var u=!0}}}}}}}}}}}}}}}else return z.errors=[{instancePath:t+`/parent`,schemaPath:`#/properties/parent/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var h=r===s}else var h=!0;if(h){if(e.type!==void 0){let n=e.type,r=s;if(typeof n!=`string`)return z.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`thread`)return z.errors=[{instancePath:t+`/type`,schemaPath:`#/properties/type/enum`,keyword:`enum`,params:{allowedValues:rn.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;var h=r===s}else var h=!0}}else return z.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return z.errors=o,s===0}z.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var an=on;function on(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=on.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.error===void 0&&(n=`error`))return on.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.error!==void 0){let n=e.error;if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.code===void 0&&(e=`code`)||n.message===void 0&&(e=`message`))return on.errors=[{instancePath:t+`/error`,schemaPath:`#/properties/error/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.code!==void 0){let e=n.code;if(typeof e==`string`){if(e.length<1)return on.errors=[{instancePath:t+`/error/code`,schemaPath:`#/properties/error/properties/code/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return on.errors=[{instancePath:t+`/error/code`,schemaPath:`#/properties/error/properties/code/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.message!==void 0){if(typeof n.message!=`string`)return on.errors=[{instancePath:t+`/error/message`,schemaPath:`#/properties/error/properties/message/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}else return on.errors=[{instancePath:t+`/error`,schemaPath:`#/properties/error/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return on.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return on.errors=null,!0}on.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var sn=ln,cn={type:`object`,properties:{status:{type:`string`,enum:[`ok`]},time:{$ref:`#/$defs/IsoTime`}},required:[`status`,`time`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`}}};function ln(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=ln.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.status===void 0&&(n=`status`)||e.time===void 0&&(n=`time`))return ln.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.status!==void 0){let n=e.status;if(typeof n!=`string`)return ln.errors=[{instancePath:t+`/status`,schemaPath:`#/properties/status/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`ok`)return ln.errors=[{instancePath:t+`/status`,schemaPath:`#/properties/status/enum`,keyword:`enum`,params:{allowedValues:cn.properties.status.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0}else var s=!0;if(s){if(e.time!==void 0){let n=e.time;if(typeof n==`string`){if(!A.test(n))return ln.errors=[{instancePath:t+`/time`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return ln.errors=[{instancePath:t+`/time`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}else return ln.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return ln.errors=null,!0}ln.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var un=dn;function dn(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=dn.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.message===void 0&&(e=`message`)||n.path===void 0&&(e=`path`))return dn.errors=[{instancePath:t+`/`+r,schemaPath:`#/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.message!==void 0){let e=s;if(typeof n.message!=`string`)return dn.errors=[{instancePath:t+`/`+r+`/message`,schemaPath:`#/items/properties/message/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=e===s}else var l=!0;if(l){if(n.path!==void 0){let e=n.path,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s,c=s,l=!1,d=s;if(typeof n!=`string`){let e={instancePath:t+`/`+r+`/path/`+i,schemaPath:`#/items/properties/path/items/anyOf/0/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}var u=d===s;l||=u;let f=s;if(!(typeof n==`number`&&isFinite(n))){let e={instancePath:t+`/`+r+`/path/`+i,schemaPath:`#/items/properties/path/items/anyOf/1/type`,keyword:`type`,params:{type:`number`},message:`must be number`};o===null?o=[e]:o.push(e),s++}var u=f===s;if(l||=u,l)s=c,o!==null&&(c?o.length=c:o=null);else{let e={instancePath:t+`/`+r+`/path/`+i,schemaPath:`#/items/properties/path/items/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,dn.errors=o,!1}if(a!==s)break}}else return dn.errors=[{instancePath:t+`/`+r+`/path`,schemaPath:`#/items/properties/path/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var l=i===s}else var l=!0}}else return dn.errors=[{instancePath:t+`/`+r,schemaPath:`#/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return dn.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}return dn.errors=o,s===0}dn.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};var fn=mn,pn={type:`object`,properties:{agents:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]}},required:[`agents`,`identity`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`}}};function mn(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=mn.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.agents===void 0&&(n=`agents`)||e.identity===void 0&&(n=`identity`))return mn.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.agents!==void 0){let n=e.agents,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return mn.errors=[{instancePath:t+`/agents/`+r,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return mn.errors=[{instancePath:t+`/agents/`+r,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(i!==s)break}}else return mn.errors=[{instancePath:t+`/agents`,schemaPath:`#/properties/agents/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var l=r===s}else var l=!0;if(l){if(e.identity!==void 0){let n=e.identity,r=s,i=s,a=!1,c=s;if(s===c){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)){let n={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/identity/admin`,schemaPath:`#/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var u=e===s}else var u=!0;if(u){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.deactivated!==void 0){let e=n.deactivated,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:pn.properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(n.displayName!==void 0){let e=n.displayName,r=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`human`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:pn.properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0}}}}}}}else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var d=c===s;if(a||=d,d)var f=!0;let m=s;if(s===m){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)||n.owner===void 0&&(e=`owner`)){let n={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/identity/admin`,schemaPath:`#/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var p=e===s}else var p=!0;if(p){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(n.deactivated!==void 0){let e=n.deactivated,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:pn.properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(n.description!==void 0){let e=n.description,r=s;if(s===s){if(typeof e==`string`){if(e.length>500){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(n.displayName!==void 0){let e=n.displayName,r=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(n.handler!==void 0){let e=n.handler,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/handler`,schemaPath:`#/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/handler`,schemaPath:`#/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:pn.properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`agent`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:pn.properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(n.owner!==void 0){let e=n.owner,r=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0}}}}}}}}}}else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var d=m===s;if(a||=d,d&&f!==!0&&(f=!0),a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,mn.errors=o,!1}var l=r===s}else var l=!0}}else return mn.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return mn.errors=o,s===0}mn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var hn=gn;function gn(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=gn.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.messages===void 0&&(n=`messages`))return gn.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.messages!==void 0){let n=e.messages;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return gn.errors=[{instancePath:t+`/messages`,schemaPath:`#/properties/messages/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return gn.errors=[{instancePath:t+`/messages`,schemaPath:`#/properties/messages/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<0||isNaN(n))return gn.errors=[{instancePath:t+`/messages`,schemaPath:`#/properties/messages/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`}],!1}}}else return gn.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return gn.errors=null,!0}gn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var _n=yn,vn={type:`object`,properties:{identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]}},required:[`identity`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`}}};function yn(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=yn.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.identity===void 0&&(n=`identity`))return yn.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.identity!==void 0){let n=e.identity,r=s,i=!1,a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)){let n={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/identity/admin`,schemaPath:`#/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var l=e===s}else var l=!0;if(l){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0;if(l){if(n.deactivated!==void 0){let e=n.deactivated,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:vn.properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var l=r===s}else var l=!0;if(l){if(n.displayName!==void 0){let e=n.displayName,r=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0;if(l){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`human`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:vn.properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var l=r===s}else var l=!0;if(l){if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0}}}}}}}else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=a===s;if(i||=u,u)var d=!0;let c=s;if(s===c){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)||n.owner===void 0&&(e=`owner`)){let n={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/identity/admin`,schemaPath:`#/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var f=e===s}else var f=!0;if(f){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.deactivated!==void 0){let e=n.deactivated,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:vn.properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(n.description!==void 0){let e=n.description,r=s;if(s===s){if(typeof e==`string`){if(e.length>500){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.displayName!==void 0){let e=n.displayName,r=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.handler!==void 0){let e=n.handler,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/handler`,schemaPath:`#/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/handler`,schemaPath:`#/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:vn.properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`agent`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:vn.properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.owner!==void 0){let e=n.owner,r=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0}}}}}}}}}}else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=c===s;if(i||=u,u&&d!==!0&&(d=!0),i)s=r,o!==null&&(r?o.length=r:o=null);else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,yn.errors=o,!1}}}else return yn.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return yn.errors=o,s===0}yn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var bn=Sn,xn={type:`object`,properties:{identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]},token:{$ref:`#/$defs/Token`}},required:[`identity`,`token`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},Token:{type:`string`,pattern:`^cookout_[A-Za-z0-9_-]+$`}}};function Sn(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=Sn.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.identity===void 0&&(n=`identity`)||e.token===void 0&&(n=`token`))return Sn.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.identity!==void 0){let n=e.identity,r=s,i=s,a=!1,c=s;if(s===c){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)){let n={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/identity/admin`,schemaPath:`#/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var l=e===s}else var l=!0;if(l){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0;if(l){if(n.deactivated!==void 0){let e=n.deactivated,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:xn.properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var l=r===s}else var l=!0;if(l){if(n.displayName!==void 0){let e=n.displayName,r=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0;if(l){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`human`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:xn.properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var l=r===s}else var l=!0;if(l){if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0}}}}}}}else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=c===s;if(a||=u,u)var d=!0;let m=s;if(s===m){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)||n.owner===void 0&&(e=`owner`)){let n={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/identity/admin`,schemaPath:`#/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var f=e===s}else var f=!0;if(f){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.deactivated!==void 0){let e=n.deactivated,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:xn.properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(n.description!==void 0){let e=n.description,r=s;if(s===s){if(typeof e==`string`){if(e.length>500){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.displayName!==void 0){let e=n.displayName,r=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.handler!==void 0){let e=n.handler,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/handler`,schemaPath:`#/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/handler`,schemaPath:`#/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:xn.properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`agent`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:xn.properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=r===s}else var f=!0;if(f){if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0;if(f){if(n.owner!==void 0){let e=n.owner,r=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=r===s}else var f=!0}}}}}}}}}}else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=m===s;if(a||=u,u&&d!==!0&&(d=!0),a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/identity`,schemaPath:`#/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,Sn.errors=o,!1}var p=r===s}else var p=!0;if(p){if(e.token!==void 0){let n=e.token,r=s;if(s===s){if(typeof n==`string`){if(!he.test(n))return Sn.errors=[{instancePath:t+`/token`,schemaPath:`#/$defs/Token/pattern`,keyword:`pattern`,params:{pattern:`^cookout_[A-Za-z0-9_-]+$`},message:`must match pattern "^cookout_[A-Za-z0-9_-]+$"`}],!1}else return Sn.errors=[{instancePath:t+`/token`,schemaPath:`#/$defs/Token/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var p=r===s}else var p=!0}}else return Sn.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return Sn.errors=o,s===0}Sn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Cn=Tn,wn={type:`object`,properties:{identities:{type:`array`,items:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]}}},required:[`identities`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`}}};function Tn(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=Tn.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.identities===void 0&&(n=`identities`))return Tn.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.identities!==void 0){let n=e.identities;if(s===s){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s,a=s,c=!1,p=s;if(s===p){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.admin===void 0&&(n=`admin`)||e.createdAt===void 0&&(n=`createdAt`)||e.kind===void 0&&(n=`kind`)||e.name===void 0&&(n=`name`)){let e={instancePath:t+`/identities/`+r,schemaPath:`#/properties/identities/items/anyOf/0/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.admin!==void 0){let n=s;if(typeof e.admin!=`boolean`){let e={instancePath:t+`/identities/`+r+`/admin`,schemaPath:`#/properties/identities/items/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var l=n===s}else var l=!0;if(l){if(e.createdAt!==void 0){let n=e.createdAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/identities/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identities/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=i===s}else var l=!0;if(l){if(e.deactivated!==void 0){let n=e.deactivated,i=s;if(typeof n!=`boolean`){let e={instancePath:t+`/identities/`+r+`/deactivated`,schemaPath:`#/properties/identities/items/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/identities/`+r+`/deactivated`,schemaPath:`#/properties/identities/items/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:wn.properties.identities.items.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var l=i===s}else var l=!0;if(l){if(e.displayName!==void 0){let n=e.displayName,i=s;if(s===s){if(typeof n==`string`){if(n.length>80){let e={instancePath:t+`/identities/`+r+`/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/identities/`+r+`/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/identities/`+r+`/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identities/`+r+`/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=i===s}else var l=!0;if(l){if(e.kind!==void 0){let n=e.kind,i=s;if(typeof n!=`string`){let e={instancePath:t+`/identities/`+r+`/kind`,schemaPath:`#/properties/identities/items/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`human`){let e={instancePath:t+`/identities/`+r+`/kind`,schemaPath:`#/properties/identities/items/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:wn.properties.identities.items.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var l=i===s}else var l=!0;if(l){if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/identities/`+r+`/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identities/`+r+`/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=i===s}else var l=!0}}}}}}}else{let e={instancePath:t+`/identities/`+r,schemaPath:`#/properties/identities/items/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=p===s;if(c||=u,u)var d=!0;let m=s;if(s===m){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.admin===void 0&&(n=`admin`)||e.createdAt===void 0&&(n=`createdAt`)||e.kind===void 0&&(n=`kind`)||e.name===void 0&&(n=`name`)||e.owner===void 0&&(n=`owner`)){let e={instancePath:t+`/identities/`+r,schemaPath:`#/properties/identities/items/anyOf/1/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.admin!==void 0){let n=s;if(typeof e.admin!=`boolean`){let e={instancePath:t+`/identities/`+r+`/admin`,schemaPath:`#/properties/identities/items/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var f=n===s}else var f=!0;if(f){if(e.createdAt!==void 0){let n=e.createdAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/identities/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identities/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0;if(f){if(e.deactivated!==void 0){let n=e.deactivated,i=s;if(typeof n!=`boolean`){let e={instancePath:t+`/identities/`+r+`/deactivated`,schemaPath:`#/properties/identities/items/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/identities/`+r+`/deactivated`,schemaPath:`#/properties/identities/items/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:wn.properties.identities.items.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=i===s}else var f=!0;if(f){if(e.description!==void 0){let n=e.description,i=s;if(s===s){if(typeof n==`string`){if(n.length>500){let e={instancePath:t+`/identities/`+r+`/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/identities/`+r+`/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/identities/`+r+`/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identities/`+r+`/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0;if(f){if(e.displayName!==void 0){let n=e.displayName,i=s;if(s===s){if(typeof n==`string`){if(n.length>80){let e={instancePath:t+`/identities/`+r+`/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/identities/`+r+`/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/identities/`+r+`/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identities/`+r+`/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0;if(f){if(e.handler!==void 0){let n=e.handler,i=s;if(typeof n!=`boolean`){let e={instancePath:t+`/identities/`+r+`/handler`,schemaPath:`#/properties/identities/items/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/identities/`+r+`/handler`,schemaPath:`#/properties/identities/items/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:wn.properties.identities.items.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=i===s}else var f=!0;if(f){if(e.kind!==void 0){let n=e.kind,i=s;if(typeof n!=`string`){let e={instancePath:t+`/identities/`+r+`/kind`,schemaPath:`#/properties/identities/items/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`agent`){let e={instancePath:t+`/identities/`+r+`/kind`,schemaPath:`#/properties/identities/items/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:wn.properties.identities.items.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=i===s}else var f=!0;if(f){if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/identities/`+r+`/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identities/`+r+`/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0;if(f){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/identities/`+r+`/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identities/`+r+`/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0}}}}}}}}}}else{let e={instancePath:t+`/identities/`+r,schemaPath:`#/properties/identities/items/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=m===s;if(c||=u,u&&d!==!0&&(d=!0),c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/identities/`+r,schemaPath:`#/properties/identities/items/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,Tn.errors=o,!1}if(i!==s)break}}else return Tn.errors=[{instancePath:t+`/identities`,schemaPath:`#/properties/identities/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}}}else return Tn.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return Tn.errors=o,s===0}Tn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var En=On,Dn={type:`object`,properties:{alerts:{type:`array`,items:{type:`object`,properties:{agent:{$ref:`#/$defs/IdentityName`},backOnlineAt:{$ref:`#/$defs/IsoTime`},id:{$ref:`#/$defs/OfflineAlertId`},offlineReason:{type:`string`,enum:[`left`,`session revoked`,`session expired`,`token rotated`,`deactivated`,`connection lost`]},raisedAt:{$ref:`#/$defs/IsoTime`},read:{type:`boolean`}},required:[`agent`,`id`,`offlineReason`,`raisedAt`,`read`],additionalProperties:!0}},readPositions:{type:`array`,items:{type:`object`,properties:{channel:{$ref:`#/$defs/ChannelName`},messageId:{$ref:`#/$defs/MessageId`},thread:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]}},required:[`channel`,`messageId`,`thread`],additionalProperties:!0}}},required:[`alerts`,`readPositions`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},OfflineAlertId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}};function On(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=On.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.alerts===void 0&&(n=`alerts`)||e.readPositions===void 0&&(n=`readPositions`))return On.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.alerts!==void 0){let n=e.alerts,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.agent===void 0&&(n=`agent`)||e.id===void 0&&(n=`id`)||e.offlineReason===void 0&&(n=`offlineReason`)||e.raisedAt===void 0&&(n=`raisedAt`)||e.read===void 0&&(n=`read`))return On.errors=[{instancePath:t+`/alerts/`+r,schemaPath:`#/properties/alerts/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.agent!==void 0){let n=e.agent,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return On.errors=[{instancePath:t+`/alerts/`+r+`/agent`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return On.errors=[{instancePath:t+`/alerts/`+r+`/agent`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=i===s}else var l=!0;if(l){if(e.backOnlineAt!==void 0){let n=e.backOnlineAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return On.errors=[{instancePath:t+`/alerts/`+r+`/backOnlineAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return On.errors=[{instancePath:t+`/alerts/`+r+`/backOnlineAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=i===s}else var l=!0;if(l){if(e.id!==void 0){let n=e.id,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return On.errors=[{instancePath:t+`/alerts/`+r+`/id`,schemaPath:`#/$defs/OfflineAlertId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return On.errors=[{instancePath:t+`/alerts/`+r+`/id`,schemaPath:`#/$defs/OfflineAlertId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<-9007199254740991||isNaN(n))return On.errors=[{instancePath:t+`/alerts/`+r+`/id`,schemaPath:`#/$defs/OfflineAlertId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var l=i===s}else var l=!0;if(l){if(e.offlineReason!==void 0){let n=e.offlineReason,i=s;if(typeof n!=`string`)return On.errors=[{instancePath:t+`/alerts/`+r+`/offlineReason`,schemaPath:`#/properties/alerts/items/properties/offlineReason/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`left`&&n!==`session revoked`&&n!==`session expired`&&n!==`token rotated`&&n!==`deactivated`&&n!==`connection lost`)return On.errors=[{instancePath:t+`/alerts/`+r+`/offlineReason`,schemaPath:`#/properties/alerts/items/properties/offlineReason/enum`,keyword:`enum`,params:{allowedValues:Dn.properties.alerts.items.properties.offlineReason.enum},message:`must be equal to one of the allowed values`}],!1;var l=i===s}else var l=!0;if(l){if(e.raisedAt!==void 0){let n=e.raisedAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return On.errors=[{instancePath:t+`/alerts/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return On.errors=[{instancePath:t+`/alerts/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=i===s}else var l=!0;if(l){if(e.read!==void 0){let n=s;if(typeof e.read!=`boolean`)return On.errors=[{instancePath:t+`/alerts/`+r+`/read`,schemaPath:`#/properties/alerts/items/properties/read/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var l=n===s}else var l=!0}}}}}}else return On.errors=[{instancePath:t+`/alerts/`+r,schemaPath:`#/properties/alerts/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return On.errors=[{instancePath:t+`/alerts`,schemaPath:`#/properties/alerts/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(e.readPositions!==void 0){let n=e.readPositions,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.channel===void 0&&(n=`channel`)||e.messageId===void 0&&(n=`messageId`)||e.thread===void 0&&(n=`thread`))return On.errors=[{instancePath:t+`/readPositions/`+r,schemaPath:`#/properties/readPositions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.channel!==void 0){let n=e.channel,i=s;if(s===s){if(typeof n==`string`){if(!F.test(n))return On.errors=[{instancePath:t+`/readPositions/`+r+`/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return On.errors=[{instancePath:t+`/readPositions/`+r+`/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=i===s}else var d=!0;if(d){if(e.messageId!==void 0){let n=e.messageId,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return On.errors=[{instancePath:t+`/readPositions/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return On.errors=[{instancePath:t+`/readPositions/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return On.errors=[{instancePath:t+`/readPositions/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var d=i===s}else var d=!0;if(d){if(e.thread!==void 0){let n=e.thread,i=s,a=s,c=!1,l=s,u=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/readPositions/`+r+`/thread`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===u&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/readPositions/`+r+`/thread`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<1||isNaN(n)){let e={instancePath:t+`/readPositions/`+r+`/thread`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var f=l===s;c||=f;let p=s;if(n!==null){let e={instancePath:t+`/readPositions/`+r+`/thread`,schemaPath:`#/properties/readPositions/items/properties/thread/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var f=p===s;if(c||=f,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/readPositions/`+r+`/thread`,schemaPath:`#/properties/readPositions/items/properties/thread/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,On.errors=o,!1}var d=i===s}else var d=!0}}}else return On.errors=[{instancePath:t+`/readPositions/`+r,schemaPath:`#/properties/readPositions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return On.errors=[{instancePath:t+`/readPositions`,schemaPath:`#/properties/readPositions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0}}else return On.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return On.errors=o,s===0}On.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var kn=An;function An(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=An.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.readPosition===void 0&&(n=`readPosition`))return An.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.readPosition!==void 0){let n=e.readPosition;if(s===s){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.channel===void 0&&(e=`channel`)||n.messageId===void 0&&(e=`messageId`)||n.thread===void 0&&(e=`thread`))return An.errors=[{instancePath:t+`/readPosition`,schemaPath:`#/properties/readPosition/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.channel!==void 0){let e=n.channel,r=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return An.errors=[{instancePath:t+`/readPosition/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return An.errors=[{instancePath:t+`/readPosition/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(n.messageId!==void 0){let e=n.messageId,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return An.errors=[{instancePath:t+`/readPosition/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return An.errors=[{instancePath:t+`/readPosition/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return An.errors=[{instancePath:t+`/readPosition/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var l=r===s}else var l=!0;if(l){if(n.thread!==void 0){let e=n.thread,r=s,i=s,a=!1,c=s,d=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===d&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var u=c===s;a||=u;let f=s;if(e!==null){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/properties/readPosition/properties/thread/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var u=f===s;if(a||=u,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/properties/readPosition/properties/thread/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,An.errors=o,!1}var l=r===s}else var l=!0}}}else return An.errors=[{instancePath:t+`/readPosition`,schemaPath:`#/properties/readPosition/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}}else return An.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return An.errors=o,s===0}An.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var jn=Nn,Mn={type:`object`,properties:{deactivatedQuietAgent:{type:`object`,properties:{deactivatedAt:{$ref:`#/$defs/IsoTime`},id:{$ref:`#/$defs/DeactivatedQuietAgentId`},identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]},read:{type:`boolean`},text:{type:`string`}},required:[`deactivatedAt`,`id`,`identity`,`read`,`text`],additionalProperties:!0}},required:[`deactivatedQuietAgent`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},DeactivatedQuietAgentId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`}}};function Nn(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=Nn.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.deactivatedQuietAgent===void 0&&(n=`deactivatedQuietAgent`))return Nn.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.deactivatedQuietAgent!==void 0){let n=e.deactivatedQuietAgent;if(s===s){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.deactivatedAt===void 0&&(e=`deactivatedAt`)||n.id===void 0&&(e=`id`)||n.identity===void 0&&(e=`identity`)||n.read===void 0&&(e=`read`)||n.text===void 0&&(e=`text`))return Nn.errors=[{instancePath:t+`/deactivatedQuietAgent`,schemaPath:`#/properties/deactivatedQuietAgent/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.deactivatedAt!==void 0){let e=n.deactivatedAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return Nn.errors=[{instancePath:t+`/deactivatedQuietAgent/deactivatedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Nn.errors=[{instancePath:t+`/deactivatedQuietAgent/deactivatedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(n.id!==void 0){let e=n.id,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return Nn.errors=[{instancePath:t+`/deactivatedQuietAgent/id`,schemaPath:`#/$defs/DeactivatedQuietAgentId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return Nn.errors=[{instancePath:t+`/deactivatedQuietAgent/id`,schemaPath:`#/$defs/DeactivatedQuietAgentId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<-9007199254740991||isNaN(e))return Nn.errors=[{instancePath:t+`/deactivatedQuietAgent/id`,schemaPath:`#/$defs/DeactivatedQuietAgentId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var l=r===s}else var l=!0;if(l){if(n.identity!==void 0){let e=n.identity,r=s,i=s,a=!1,c=s;if(s===c){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.admin===void 0&&(n=`admin`)||e.createdAt===void 0&&(n=`createdAt`)||e.kind===void 0&&(n=`kind`)||e.name===void 0&&(n=`name`)){let e={instancePath:t+`/deactivatedQuietAgent/identity`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.admin!==void 0){let n=s;if(typeof e.admin!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgent/identity/admin`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var u=n===s}else var u=!0;if(u){if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(e.deactivated!==void 0){let n=e.deactivated,r=s;if(typeof n!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgent/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/deactivatedQuietAgent/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:Mn.properties.deactivatedQuietAgent.properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(e.displayName!==void 0){let n=e.displayName,r=s;if(s===s){if(typeof n==`string`){if(n.length>80){let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(e.kind!==void 0){let n=e.kind,r=s;if(typeof n!=`string`){let e={instancePath:t+`/deactivatedQuietAgent/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`human`){let e={instancePath:t+`/deactivatedQuietAgent/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Mn.properties.deactivatedQuietAgent.properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0}}}}}}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var d=c===s;if(a||=d,d)var f=!0;let m=s;if(s===m){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.admin===void 0&&(n=`admin`)||e.createdAt===void 0&&(n=`createdAt`)||e.kind===void 0&&(n=`kind`)||e.name===void 0&&(n=`name`)||e.owner===void 0&&(n=`owner`)){let e={instancePath:t+`/deactivatedQuietAgent/identity`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.admin!==void 0){let n=s;if(typeof e.admin!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgent/identity/admin`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var p=n===s}else var p=!0;if(p){if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.deactivated!==void 0){let n=e.deactivated,r=s;if(typeof n!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgent/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/deactivatedQuietAgent/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:Mn.properties.deactivatedQuietAgent.properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(e.description!==void 0){let n=e.description,r=s;if(s===s){if(typeof n==`string`){if(n.length>500){let e={instancePath:t+`/deactivatedQuietAgent/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/deactivatedQuietAgent/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.displayName!==void 0){let n=e.displayName,r=s;if(s===s){if(typeof n==`string`){if(n.length>80){let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.handler!==void 0){let n=e.handler,r=s;if(typeof n!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgent/identity/handler`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/deactivatedQuietAgent/identity/handler`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:Mn.properties.deactivatedQuietAgent.properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(e.kind!==void 0){let n=e.kind,r=s;if(typeof n!=`string`){let e={instancePath:t+`/deactivatedQuietAgent/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`agent`){let e={instancePath:t+`/deactivatedQuietAgent/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Mn.properties.deactivatedQuietAgent.properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.owner!==void 0){let n=e.owner,r=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/deactivatedQuietAgent/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0}}}}}}}}}}else{let e={instancePath:t+`/deactivatedQuietAgent/identity`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var d=m===s;if(a||=d,d&&f!==!0&&(f=!0),a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/deactivatedQuietAgent/identity`,schemaPath:`#/properties/deactivatedQuietAgent/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,Nn.errors=o,!1}var l=r===s}else var l=!0;if(l){if(n.read!==void 0){let e=s;if(typeof n.read!=`boolean`)return Nn.errors=[{instancePath:t+`/deactivatedQuietAgent/read`,schemaPath:`#/properties/deactivatedQuietAgent/properties/read/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var l=e===s}else var l=!0;if(l){if(n.text!==void 0){let e=s;if(typeof n.text!=`string`)return Nn.errors=[{instancePath:t+`/deactivatedQuietAgent/text`,schemaPath:`#/properties/deactivatedQuietAgent/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=e===s}else var l=!0}}}}}else return Nn.errors=[{instancePath:t+`/deactivatedQuietAgent`,schemaPath:`#/properties/deactivatedQuietAgent/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}}else return Nn.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return Nn.errors=o,s===0}Nn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Pn=In,Fn={type:`object`,properties:{deactivationOffer:{type:`object`,properties:{cleared:{type:`boolean`},id:{$ref:`#/$defs/DeactivationOfferId`},identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]},quietDays:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},raisedAt:{$ref:`#/$defs/IsoTime`},text:{type:`string`}},required:[`cleared`,`id`,`identity`,`quietDays`,`raisedAt`,`text`],additionalProperties:!0}},required:[`deactivationOffer`],additionalProperties:!0,$defs:{DeactivationOfferId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`}}};function In(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=In.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.deactivationOffer===void 0&&(n=`deactivationOffer`))return In.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.deactivationOffer!==void 0){let n=e.deactivationOffer;if(s===s){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.cleared===void 0&&(e=`cleared`)||n.id===void 0&&(e=`id`)||n.identity===void 0&&(e=`identity`)||n.quietDays===void 0&&(e=`quietDays`)||n.raisedAt===void 0&&(e=`raisedAt`)||n.text===void 0&&(e=`text`))return In.errors=[{instancePath:t+`/deactivationOffer`,schemaPath:`#/properties/deactivationOffer/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.cleared!==void 0){let e=s;if(typeof n.cleared!=`boolean`)return In.errors=[{instancePath:t+`/deactivationOffer/cleared`,schemaPath:`#/properties/deactivationOffer/properties/cleared/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var l=e===s}else var l=!0;if(l){if(n.id!==void 0){let e=n.id,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return In.errors=[{instancePath:t+`/deactivationOffer/id`,schemaPath:`#/$defs/DeactivationOfferId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return In.errors=[{instancePath:t+`/deactivationOffer/id`,schemaPath:`#/$defs/DeactivationOfferId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<-9007199254740991||isNaN(e))return In.errors=[{instancePath:t+`/deactivationOffer/id`,schemaPath:`#/$defs/DeactivationOfferId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var l=r===s}else var l=!0;if(l){if(n.identity!==void 0){let e=n.identity,r=s,i=s,a=!1,c=s;if(s===c){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.admin===void 0&&(n=`admin`)||e.createdAt===void 0&&(n=`createdAt`)||e.kind===void 0&&(n=`kind`)||e.name===void 0&&(n=`name`)){let e={instancePath:t+`/deactivationOffer/identity`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.admin!==void 0){let n=s;if(typeof e.admin!=`boolean`){let e={instancePath:t+`/deactivationOffer/identity/admin`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var u=n===s}else var u=!0;if(u){if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/deactivationOffer/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(e.deactivated!==void 0){let n=e.deactivated,r=s;if(typeof n!=`boolean`){let e={instancePath:t+`/deactivationOffer/identity/deactivated`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/deactivationOffer/identity/deactivated`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:Fn.properties.deactivationOffer.properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(e.displayName!==void 0){let n=e.displayName,r=s;if(s===s){if(typeof n==`string`){if(n.length>80){let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(e.kind!==void 0){let n=e.kind,r=s;if(typeof n!=`string`){let e={instancePath:t+`/deactivationOffer/identity/kind`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`human`){let e={instancePath:t+`/deactivationOffer/identity/kind`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Fn.properties.deactivationOffer.properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/deactivationOffer/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0}}}}}}}else{let e={instancePath:t+`/deactivationOffer/identity`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var d=c===s;if(a||=d,d)var f=!0;let m=s;if(s===m){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.admin===void 0&&(n=`admin`)||e.createdAt===void 0&&(n=`createdAt`)||e.kind===void 0&&(n=`kind`)||e.name===void 0&&(n=`name`)||e.owner===void 0&&(n=`owner`)){let e={instancePath:t+`/deactivationOffer/identity`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.admin!==void 0){let n=s;if(typeof e.admin!=`boolean`){let e={instancePath:t+`/deactivationOffer/identity/admin`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var p=n===s}else var p=!0;if(p){if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/deactivationOffer/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.deactivated!==void 0){let n=e.deactivated,r=s;if(typeof n!=`boolean`){let e={instancePath:t+`/deactivationOffer/identity/deactivated`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/deactivationOffer/identity/deactivated`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:Fn.properties.deactivationOffer.properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(e.description!==void 0){let n=e.description,r=s;if(s===s){if(typeof n==`string`){if(n.length>500){let e={instancePath:t+`/deactivationOffer/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/deactivationOffer/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/deactivationOffer/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.displayName!==void 0){let n=e.displayName,r=s;if(s===s){if(typeof n==`string`){if(n.length>80){let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(n.length<1){let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(n)){let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.handler!==void 0){let n=e.handler,r=s;if(typeof n!=`boolean`){let e={instancePath:t+`/deactivationOffer/identity/handler`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(n!==!0){let e={instancePath:t+`/deactivationOffer/identity/handler`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:Fn.properties.deactivationOffer.properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(e.kind!==void 0){let n=e.kind,r=s;if(typeof n!=`string`){let e={instancePath:t+`/deactivationOffer/identity/kind`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`agent`){let e={instancePath:t+`/deactivationOffer/identity/kind`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Fn.properties.deactivationOffer.properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var p=r===s}else var p=!0;if(p){if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/deactivationOffer/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0;if(p){if(e.owner!==void 0){let n=e.owner,r=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/deactivationOffer/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffer/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=r===s}else var p=!0}}}}}}}}}}else{let e={instancePath:t+`/deactivationOffer/identity`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var d=m===s;if(a||=d,d&&f!==!0&&(f=!0),a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/deactivationOffer/identity`,schemaPath:`#/properties/deactivationOffer/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,In.errors=o,!1}var l=r===s}else var l=!0;if(l){if(n.quietDays!==void 0){let e=n.quietDays,r=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return In.errors=[{instancePath:t+`/deactivationOffer/quietDays`,schemaPath:`#/properties/deactivationOffer/properties/quietDays/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===r&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return In.errors=[{instancePath:t+`/deactivationOffer/quietDays`,schemaPath:`#/properties/deactivationOffer/properties/quietDays/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<-9007199254740991||isNaN(e))return In.errors=[{instancePath:t+`/deactivationOffer/quietDays`,schemaPath:`#/properties/deactivationOffer/properties/quietDays/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var l=r===s}else var l=!0;if(l){if(n.raisedAt!==void 0){let e=n.raisedAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return In.errors=[{instancePath:t+`/deactivationOffer/raisedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return In.errors=[{instancePath:t+`/deactivationOffer/raisedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(n.text!==void 0){let e=s;if(typeof n.text!=`string`)return In.errors=[{instancePath:t+`/deactivationOffer/text`,schemaPath:`#/properties/deactivationOffer/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=e===s}else var l=!0}}}}}}else return In.errors=[{instancePath:t+`/deactivationOffer`,schemaPath:`#/properties/deactivationOffer/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}}else return In.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return In.errors=o,s===0}In.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Ln=Rn;function Rn(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=Rn.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.following===void 0&&(n=`following`)||e.thread===void 0&&(n=`thread`))return Rn.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.following!==void 0){if(typeof e.following!=`boolean`)return Rn.errors=[{instancePath:t+`/following`,schemaPath:`#/properties/following/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0}else var s=!0;if(s){if(e.thread!==void 0){let n=e.thread;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return Rn.errors=[{instancePath:t+`/thread`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return Rn.errors=[{instancePath:t+`/thread`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return Rn.errors=[{instancePath:t+`/thread`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var s=!0}else var s=!0}}else return Rn.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return Rn.errors=null,!0}Rn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var zn=B,Bn={type:`object`,properties:{alerts:{type:`array`,items:{type:`object`,properties:{agent:{$ref:`#/$defs/IdentityName`},backOnlineAt:{$ref:`#/$defs/IsoTime`},id:{$ref:`#/$defs/OfflineAlertId`},offlineReason:{type:`string`,enum:[`left`,`session revoked`,`session expired`,`token rotated`,`deactivated`,`connection lost`]},raisedAt:{$ref:`#/$defs/IsoTime`},read:{type:`boolean`}},required:[`agent`,`id`,`offlineReason`,`raisedAt`,`read`],additionalProperties:!0}},deactivatedQuietAgents:{type:`array`,items:{type:`object`,properties:{deactivatedAt:{$ref:`#/$defs/IsoTime`},id:{$ref:`#/$defs/DeactivatedQuietAgentId`},identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]},read:{type:`boolean`},text:{type:`string`}},required:[`deactivatedAt`,`id`,`identity`,`read`,`text`],additionalProperties:!0}},deactivationOffers:{type:`array`,items:{type:`object`,properties:{cleared:{type:`boolean`},id:{$ref:`#/$defs/DeactivationOfferId`},identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]},quietDays:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},raisedAt:{$ref:`#/$defs/IsoTime`},text:{type:`string`}},required:[`cleared`,`id`,`identity`,`quietDays`,`raisedAt`,`text`],additionalProperties:!0}},hasMore:{type:`boolean`},items:{type:`array`,items:{type:`object`,properties:{channel:{type:`object`,properties:{createdAt:{$ref:`#/$defs/IsoTime`},description:{type:`string`,minLength:1,maxLength:500},name:{$ref:`#/$defs/ChannelName`}},required:[`createdAt`,`name`],additionalProperties:!0},message:{anyOf:[{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName_1`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName_1`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName_1`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},kind:{type:`string`,enum:[`reply`]},replyTo:{$ref:`#/$defs/MessageId`}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`replyTo`],additionalProperties:!0}]},newReactions:{type:`array`,items:{type:`object`,properties:{identity:{$ref:`#/$defs/IdentityName_1`},messageId:{$ref:`#/$defs/MessageId`},reactedAt:{$ref:`#/$defs/IsoTime`},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`identity`,`messageId`,`reactedAt`,`reaction`],additionalProperties:!0}},parent:{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName_1`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName_1`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},reasons:{type:`array`,items:{type:`string`,enum:[`followed-thread`,`mention`,`reaction`,`subscribed-channel`]}},read:{type:`boolean`}},required:[`channel`,`message`,`parent`,`reasons`,`read`],additionalProperties:!0}},nudges:{type:`array`,items:{type:`object`,properties:{channel:{type:`object`,properties:{createdAt:{$ref:`#/$defs/IsoTime`},description:{type:`string`,minLength:1,maxLength:500},name:{$ref:`#/$defs/ChannelName`}},required:[`createdAt`,`name`],additionalProperties:!0},id:{$ref:`#/$defs/NudgeId`},kind:{type:`string`,enum:[`first`,`second`]},parent:{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName_1`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName_1`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},raisedAt:{$ref:`#/$defs/IsoTime`},text:{type:`string`},read:{type:`boolean`}},required:[`channel`,`id`,`kind`,`parent`,`raisedAt`,`text`,`read`],additionalProperties:!0}}},required:[`alerts`,`deactivatedQuietAgents`,`deactivationOffers`,`hasMore`,`items`,`nudges`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},OfflineAlertId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},DeactivatedQuietAgentId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},DeactivationOfferId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},IdentityName_1:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Owner_1:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},ChannelName_1:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},Harness:{type:`string`,pattern:`^[a-z0-9-]{1,40}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991},NudgeId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991}}};function B(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=B.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.alerts===void 0&&(n=`alerts`)||e.deactivatedQuietAgents===void 0&&(n=`deactivatedQuietAgents`)||e.deactivationOffers===void 0&&(n=`deactivationOffers`)||e.hasMore===void 0&&(n=`hasMore`)||e.items===void 0&&(n=`items`)||e.nudges===void 0&&(n=`nudges`))return B.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.alerts!==void 0){let n=e.alerts,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.agent===void 0&&(n=`agent`)||e.id===void 0&&(n=`id`)||e.offlineReason===void 0&&(n=`offlineReason`)||e.raisedAt===void 0&&(n=`raisedAt`)||e.read===void 0&&(n=`read`))return B.errors=[{instancePath:t+`/alerts/`+r,schemaPath:`#/properties/alerts/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.agent!==void 0){let n=e.agent,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return B.errors=[{instancePath:t+`/alerts/`+r+`/agent`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return B.errors=[{instancePath:t+`/alerts/`+r+`/agent`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=i===s}else var l=!0;if(l){if(e.backOnlineAt!==void 0){let n=e.backOnlineAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return B.errors=[{instancePath:t+`/alerts/`+r+`/backOnlineAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return B.errors=[{instancePath:t+`/alerts/`+r+`/backOnlineAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=i===s}else var l=!0;if(l){if(e.id!==void 0){let n=e.id,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return B.errors=[{instancePath:t+`/alerts/`+r+`/id`,schemaPath:`#/$defs/OfflineAlertId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return B.errors=[{instancePath:t+`/alerts/`+r+`/id`,schemaPath:`#/$defs/OfflineAlertId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<-9007199254740991||isNaN(n))return B.errors=[{instancePath:t+`/alerts/`+r+`/id`,schemaPath:`#/$defs/OfflineAlertId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var l=i===s}else var l=!0;if(l){if(e.offlineReason!==void 0){let n=e.offlineReason,i=s;if(typeof n!=`string`)return B.errors=[{instancePath:t+`/alerts/`+r+`/offlineReason`,schemaPath:`#/properties/alerts/items/properties/offlineReason/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`left`&&n!==`session revoked`&&n!==`session expired`&&n!==`token rotated`&&n!==`deactivated`&&n!==`connection lost`)return B.errors=[{instancePath:t+`/alerts/`+r+`/offlineReason`,schemaPath:`#/properties/alerts/items/properties/offlineReason/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.alerts.items.properties.offlineReason.enum},message:`must be equal to one of the allowed values`}],!1;var l=i===s}else var l=!0;if(l){if(e.raisedAt!==void 0){let n=e.raisedAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return B.errors=[{instancePath:t+`/alerts/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return B.errors=[{instancePath:t+`/alerts/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=i===s}else var l=!0;if(l){if(e.read!==void 0){let n=s;if(typeof e.read!=`boolean`)return B.errors=[{instancePath:t+`/alerts/`+r+`/read`,schemaPath:`#/properties/alerts/items/properties/read/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var l=n===s}else var l=!0}}}}}}else return B.errors=[{instancePath:t+`/alerts/`+r,schemaPath:`#/properties/alerts/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return B.errors=[{instancePath:t+`/alerts`,schemaPath:`#/properties/alerts/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(e.deactivatedQuietAgents!==void 0){let n=e.deactivatedQuietAgents,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.deactivatedAt===void 0&&(n=`deactivatedAt`)||e.id===void 0&&(n=`id`)||e.identity===void 0&&(n=`identity`)||e.read===void 0&&(n=`read`)||e.text===void 0&&(n=`text`))return B.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r,schemaPath:`#/properties/deactivatedQuietAgents/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.deactivatedAt!==void 0){let n=e.deactivatedAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return B.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/deactivatedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return B.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/deactivatedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=i===s}else var d=!0;if(d){if(e.id!==void 0){let n=e.id,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return B.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/id`,schemaPath:`#/$defs/DeactivatedQuietAgentId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return B.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/id`,schemaPath:`#/$defs/DeactivatedQuietAgentId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<-9007199254740991||isNaN(n))return B.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/id`,schemaPath:`#/$defs/DeactivatedQuietAgentId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var d=i===s}else var d=!0;if(d){if(e.identity!==void 0){let n=e.identity,i=s,a=s,c=!1,l=s;if(s===l){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)){let n={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/admin`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var f=e===s}else var f=!0;if(f){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0;if(f){if(n.deactivated!==void 0){let e=n.deactivated,i=s;if(typeof e!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.deactivatedQuietAgents.items.properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=i===s}else var f=!0;if(f){if(n.displayName!==void 0){let e=n.displayName,i=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0;if(f){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`human`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.deactivatedQuietAgents.items.properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=i===s}else var f=!0;if(f){if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0}}}}}}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var p=l===s;if(c||=p,p)var m=!0;let u=s;if(s===u){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)||n.owner===void 0&&(e=`owner`)){let n={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/admin`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var h=e===s}else var h=!0;if(h){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=i===s}else var h=!0;if(h){if(n.deactivated!==void 0){let e=n.deactivated,i=s;if(typeof e!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.deactivatedQuietAgents.items.properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var h=i===s}else var h=!0;if(h){if(n.description!==void 0){let e=n.description,i=s;if(s===s){if(typeof e==`string`){if(e.length>500){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=i===s}else var h=!0;if(h){if(n.displayName!==void 0){let e=n.displayName,i=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=i===s}else var h=!0;if(h){if(n.handler!==void 0){let e=n.handler,i=s;if(typeof e!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/handler`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/handler`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.deactivatedQuietAgents.items.properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var h=i===s}else var h=!0;if(h){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`agent`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.deactivatedQuietAgents.items.properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var h=i===s}else var h=!0;if(h){if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=i===s}else var h=!0;if(h){if(n.owner!==void 0){let e=n.owner,i=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=i===s}else var h=!0}}}}}}}}}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var p=u===s;if(c||=p,p&&m!==!0&&(m=!0),c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,B.errors=o,!1}var d=i===s}else var d=!0;if(d){if(e.read!==void 0){let n=s;if(typeof e.read!=`boolean`)return B.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/read`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/read/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var d=n===s}else var d=!0;if(d){if(e.text!==void 0){let n=s;if(typeof e.text!=`string`)return B.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/text`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=n===s}else var d=!0}}}}}else return B.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r,schemaPath:`#/properties/deactivatedQuietAgents/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return B.errors=[{instancePath:t+`/deactivatedQuietAgents`,schemaPath:`#/properties/deactivatedQuietAgents/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(e.deactivationOffers!==void 0){let n=e.deactivationOffers,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.cleared===void 0&&(n=`cleared`)||e.id===void 0&&(n=`id`)||e.identity===void 0&&(n=`identity`)||e.quietDays===void 0&&(n=`quietDays`)||e.raisedAt===void 0&&(n=`raisedAt`)||e.text===void 0&&(n=`text`))return B.errors=[{instancePath:t+`/deactivationOffers/`+r,schemaPath:`#/properties/deactivationOffers/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.cleared!==void 0){let n=s;if(typeof e.cleared!=`boolean`)return B.errors=[{instancePath:t+`/deactivationOffers/`+r+`/cleared`,schemaPath:`#/properties/deactivationOffers/items/properties/cleared/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var g=n===s}else var g=!0;if(g){if(e.id!==void 0){let n=e.id,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return B.errors=[{instancePath:t+`/deactivationOffers/`+r+`/id`,schemaPath:`#/$defs/DeactivationOfferId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return B.errors=[{instancePath:t+`/deactivationOffers/`+r+`/id`,schemaPath:`#/$defs/DeactivationOfferId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<-9007199254740991||isNaN(n))return B.errors=[{instancePath:t+`/deactivationOffers/`+r+`/id`,schemaPath:`#/$defs/DeactivationOfferId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var g=i===s}else var g=!0;if(g){if(e.identity!==void 0){let n=e.identity,i=s,a=s,c=!1,l=s;if(s===l){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)){let n={instancePath:t+`/deactivationOffers/`+r+`/identity`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/admin`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var _=e===s}else var _=!0;if(_){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var _=i===s}else var _=!0;if(_){if(n.deactivated!==void 0){let e=n.deactivated,i=s;if(typeof e!=`boolean`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.deactivationOffers.items.properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var _=i===s}else var _=!0;if(_){if(n.displayName!==void 0){let e=n.displayName,i=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var _=i===s}else var _=!0;if(_){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/kind`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`human`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/kind`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.deactivationOffers.items.properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var _=i===s}else var _=!0;if(_){if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var _=i===s}else var _=!0}}}}}}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var v=l===s;if(c||=v,v)var y=!0;let u=s;if(s===u){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)||n.owner===void 0&&(e=`owner`)){let n={instancePath:t+`/deactivationOffers/`+r+`/identity`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/admin`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var b=e===s}else var b=!0;if(b){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=i===s}else var b=!0;if(b){if(n.deactivated!==void 0){let e=n.deactivated,i=s;if(typeof e!=`boolean`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.deactivationOffers.items.properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var b=i===s}else var b=!0;if(b){if(n.description!==void 0){let e=n.description,i=s;if(s===s){if(typeof e==`string`){if(e.length>500){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=i===s}else var b=!0;if(b){if(n.displayName!==void 0){let e=n.displayName,i=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=i===s}else var b=!0;if(b){if(n.handler!==void 0){let e=n.handler,i=s;if(typeof e!=`boolean`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/handler`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/handler`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.deactivationOffers.items.properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var b=i===s}else var b=!0;if(b){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/kind`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`agent`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/kind`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.deactivationOffers.items.properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var b=i===s}else var b=!0;if(b){if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=i===s}else var b=!0;if(b){if(n.owner!==void 0){let e=n.owner,i=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=i===s}else var b=!0}}}}}}}}}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var v=u===s;if(c||=v,v&&y!==!0&&(y=!0),c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,B.errors=o,!1}var g=i===s}else var g=!0;if(g){if(e.quietDays!==void 0){let n=e.quietDays,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return B.errors=[{instancePath:t+`/deactivationOffers/`+r+`/quietDays`,schemaPath:`#/properties/deactivationOffers/items/properties/quietDays/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return B.errors=[{instancePath:t+`/deactivationOffers/`+r+`/quietDays`,schemaPath:`#/properties/deactivationOffers/items/properties/quietDays/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<-9007199254740991||isNaN(n))return B.errors=[{instancePath:t+`/deactivationOffers/`+r+`/quietDays`,schemaPath:`#/properties/deactivationOffers/items/properties/quietDays/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var g=i===s}else var g=!0;if(g){if(e.raisedAt!==void 0){let n=e.raisedAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return B.errors=[{instancePath:t+`/deactivationOffers/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return B.errors=[{instancePath:t+`/deactivationOffers/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var g=i===s}else var g=!0;if(g){if(e.text!==void 0){let n=s;if(typeof e.text!=`string`)return B.errors=[{instancePath:t+`/deactivationOffers/`+r+`/text`,schemaPath:`#/properties/deactivationOffers/items/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var g=n===s}else var g=!0}}}}}}else return B.errors=[{instancePath:t+`/deactivationOffers/`+r,schemaPath:`#/properties/deactivationOffers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return B.errors=[{instancePath:t+`/deactivationOffers`,schemaPath:`#/properties/deactivationOffers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(e.hasMore!==void 0){let n=s;if(typeof e.hasMore!=`boolean`)return B.errors=[{instancePath:t+`/hasMore`,schemaPath:`#/properties/hasMore/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var u=n===s}else var u=!0;if(u){if(e.items!==void 0){let n=e.items,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.channel===void 0&&(n=`channel`)||e.message===void 0&&(n=`message`)||e.parent===void 0&&(n=`parent`)||e.reasons===void 0&&(n=`reasons`)||e.read===void 0&&(n=`read`))return B.errors=[{instancePath:t+`/items/`+r,schemaPath:`#/properties/items/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.channel!==void 0){let n=e.channel,i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.createdAt===void 0&&(e=`createdAt`)||n.name===void 0&&(e=`name`))return B.errors=[{instancePath:t+`/items/`+r+`/channel`,schemaPath:`#/properties/items/items/properties/channel/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return B.errors=[{instancePath:t+`/items/`+r+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var x=i===s}else var x=!0;if(x){if(n.description!==void 0){let e=n.description,i=s;if(s===i){if(typeof e==`string`){if(e.length>500)return B.errors=[{instancePath:t+`/items/`+r+`/channel/description`,schemaPath:`#/properties/items/items/properties/channel/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(e.length<1)return B.errors=[{instancePath:t+`/items/`+r+`/channel/description`,schemaPath:`#/properties/items/items/properties/channel/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/channel/description`,schemaPath:`#/properties/items/items/properties/channel/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var x=i===s}else var x=!0;if(x){if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return B.errors=[{instancePath:t+`/items/`+r+`/channel/name`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/channel/name`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var x=i===s}else var x=!0}}}else return B.errors=[{instancePath:t+`/items/`+r+`/channel`,schemaPath:`#/properties/items/items/properties/channel/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var S=i===s}else var S=!0;if(S){if(e.message!==void 0){let n=e.message,i=s,a=s,c=!1,l=s;if(s===l){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.latestReplyAt===void 0&&(e=`latestReplyAt`)||n.latestReplyId===void 0&&(e=`latestReplyId`)||n.repliers===void 0&&(e=`repliers`)||n.replyCount===void 0&&(e=`replyCount`)){let n={instancePath:t+`/items/`+r+`/message`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.author!==void 0){let e=n.author,i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`)){let e={instancePath:t+`/items/`+r+`/message/author`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/items/`+r+`/message/author/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/author/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var C=i===s}else var C=!0;if(C){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/items/`+r+`/message/author/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/author/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var C=i===s}else var C=!0}}}else{let e={instancePath:t+`/items/`+r+`/message/author`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.channel!==void 0){let e=n.channel,i=s;if(s===s){if(typeof e==`string`){if(!F.test(e)){let e={instancePath:t+`/items/`+r+`/message/channel`,schemaPath:`#/$defs/ChannelName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/channel`,schemaPath:`#/$defs/ChannelName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/items/`+r+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.harness!==void 0){let e=n.harness,i=s;if(s===s){if(typeof e==`string`){if(!wt.test(e)){let e={instancePath:t+`/items/`+r+`/message/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.id!==void 0){let e=n.id,i=s,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.mentions!==void 0){let e=n.mentions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/items/`+r+`/message/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/items/`+r+`/message/mentions`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.reactions!==void 0){let e=n.reactions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`)){let n={instancePath:t+`/items/`+r+`/message/reactions/`+i,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.by!==void 0){let e=n.by,a=s;if(s===a){if(Array.isArray(e)){let n=e.length;for(let a=0;a<n;a++){let n=e[a],c=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(c!==s)break}}else{let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/by`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var T=a===s}else var T=!0;if(T){if(n.count!==void 0){let e=n.count,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var T=a===s}else var T=!0;if(T){if(n.reaction!==void 0){let e=n.reaction,a=s;if(typeof e!=`string`){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`thumbs_up`&&e!==`thumbs_down`){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.items.items.properties.message.anyOf[0].properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var T=a===s}else var T=!0}}}}else{let e={instancePath:t+`/items/`+r+`/message/reactions/`+i,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/items/`+r+`/message/reactions`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.text!==void 0){let e=n.text,i=s;if(s===i){if(typeof e==`string`){if(e.length>4e4){let e={instancePath:t+`/items/`+r+`/message/text`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/items/`+r+`/message/text`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/text`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.closedAt!==void 0){let e=n.closedAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/items/`+r+`/message/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.closedBy!==void 0){let e=n.closedBy,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/items/`+r+`/message/closedBy`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/closedBy`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`){let e={instancePath:t+`/items/`+r+`/message/kind`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`top-level`){let e={instancePath:t+`/items/`+r+`/message/kind`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.items.items.properties.message.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var w=i===s}else var w=!0;if(w){if(n.latestReplyAt!==void 0){let e=n.latestReplyAt,i=s,a=s,c=!1,l=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/items/`+r+`/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var E=l===s;c||=E;let u=s;if(e!==null){let e={instancePath:t+`/items/`+r+`/message/latestReplyAt`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var E=u===s;if(c||=E,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/items/`+r+`/message/latestReplyAt`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};o===null?o=[e]:o.push(e),s++}var w=i===s}else var w=!0;if(w){if(n.latestReplyId!==void 0){let e=n.latestReplyId,i=s,a=s,c=!1,l=s,u=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===u&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var ee=l===s;c||=ee;let d=s;if(e!==null){let e={instancePath:t+`/items/`+r+`/message/latestReplyId`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var ee=d===s;if(c||=ee,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/items/`+r+`/message/latestReplyId`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};o===null?o=[e]:o.push(e),s++}var w=i===s}else var w=!0;if(w){if(n.repliers!==void 0){let e=n.repliers,i=s;if(s===i){if(Array.isArray(e)){if(e.length>4){let e={instancePath:t+`/items/`+r+`/message/repliers`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`};o===null?o=[e]:o.push(e),s++}else{let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`)){let n={instancePath:t+`/items/`+r+`/message/repliers/`+i,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.name!==void 0){let e=n.name,a=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/items/`+r+`/message/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var te=a===s}else var te=!0;if(te){if(n.owner!==void 0){let e=n.owner,a=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/items/`+r+`/message/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var te=a===s}else var te=!0}}}else{let e={instancePath:t+`/items/`+r+`/message/repliers/`+i,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}}else{let e={instancePath:t+`/items/`+r+`/message/repliers`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.replyCount!==void 0){let e=n.replyCount,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/replyCount`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/replyCount`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<0||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/replyCount`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0}}}}}}}}}}}}}}}}else{let e={instancePath:t+`/items/`+r+`/message`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var D=l===s;if(c||=D,D)var ne=!0;let u=s;if(s===u){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.replyTo===void 0&&(e=`replyTo`)){let n={instancePath:t+`/items/`+r+`/message`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.author!==void 0){let e=n.author,i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`)){let e={instancePath:t+`/items/`+r+`/message/author`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/items/`+r+`/message/author/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/author/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var re=i===s}else var re=!0;if(re){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/items/`+r+`/message/author/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/author/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var re=i===s}else var re=!0}}}else{let e={instancePath:t+`/items/`+r+`/message/author`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.channel!==void 0){let e=n.channel,i=s;if(s===s){if(typeof e==`string`){if(!F.test(e)){let e={instancePath:t+`/items/`+r+`/message/channel`,schemaPath:`#/$defs/ChannelName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/channel`,schemaPath:`#/$defs/ChannelName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/items/`+r+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.harness!==void 0){let e=n.harness,i=s;if(s===s){if(typeof e==`string`){if(!wt.test(e)){let e={instancePath:t+`/items/`+r+`/message/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.id!==void 0){let e=n.id,i=s,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.mentions!==void 0){let e=n.mentions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/items/`+r+`/message/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/items/`+r+`/message/mentions`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.reactions!==void 0){let e=n.reactions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`)){let n={instancePath:t+`/items/`+r+`/message/reactions/`+i,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.by!==void 0){let e=n.by,a=s;if(s===a){if(Array.isArray(e)){let n=e.length;for(let a=0;a<n;a++){let n=e[a],c=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(c!==s)break}}else{let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/by`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var ie=a===s}else var ie=!0;if(ie){if(n.count!==void 0){let e=n.count,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var ie=a===s}else var ie=!0;if(ie){if(n.reaction!==void 0){let e=n.reaction,a=s;if(typeof e!=`string`){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`thumbs_up`&&e!==`thumbs_down`){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.items.items.properties.message.anyOf[1].properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var ie=a===s}else var ie=!0}}}}else{let e={instancePath:t+`/items/`+r+`/message/reactions/`+i,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/items/`+r+`/message/reactions`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.text!==void 0){let e=n.text,i=s;if(s===i){if(typeof e==`string`){if(e.length>4e4){let e={instancePath:t+`/items/`+r+`/message/text`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/items/`+r+`/message/text`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/text`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`){let e={instancePath:t+`/items/`+r+`/message/kind`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`reply`){let e={instancePath:t+`/items/`+r+`/message/kind`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.items.items.properties.message.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var O=i===s}else var O=!0;if(O){if(n.replyTo!==void 0){let e=n.replyTo,i=s,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/replyTo`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/replyTo`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/replyTo`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0}}}}}}}}}}}else{let e={instancePath:t+`/items/`+r+`/message`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var D=u===s;if(c||=D,D&&ne!==!0&&(ne=!0),c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/items/`+r+`/message`,schemaPath:`#/properties/items/items/properties/message/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,B.errors=o,!1}var S=i===s}else var S=!0;if(S){if(e.newReactions!==void 0){let n=e.newReactions,i=s;if(s===i){if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(s===a){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.identity===void 0&&(n=`identity`)||e.messageId===void 0&&(n=`messageId`)||e.reactedAt===void 0&&(n=`reactedAt`)||e.reaction===void 0&&(n=`reaction`))return B.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i,schemaPath:`#/properties/items/items/properties/newReactions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.identity!==void 0){let n=e.identity,a=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return B.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/identity`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/identity`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var ae=a===s}else var ae=!0;if(ae){if(e.messageId!==void 0){let n=e.messageId,a=s,o=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return B.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===o&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return B.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return B.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var ae=a===s}else var ae=!0;if(ae){if(e.reactedAt!==void 0){let n=e.reactedAt,a=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return B.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/reactedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/reactedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var ae=a===s}else var ae=!0;if(ae){if(e.reaction!==void 0){let n=e.reaction,a=s;if(typeof n!=`string`)return B.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/newReactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`thumbs_up`&&n!==`thumbs_down`)return B.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/newReactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.items.items.properties.newReactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var ae=a===s}else var ae=!0}}}}else return B.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i,schemaPath:`#/properties/items/items/properties/newReactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}else return B.errors=[{instancePath:t+`/items/`+r+`/newReactions`,schemaPath:`#/properties/items/items/properties/newReactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var S=i===s}else var S=!0;if(S){if(e.parent!==void 0){let n=e.parent,i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.latestReplyAt===void 0&&(e=`latestReplyAt`)||n.latestReplyId===void 0&&(e=`latestReplyId`)||n.repliers===void 0&&(e=`repliers`)||n.replyCount===void 0&&(e=`replyCount`))return B.errors=[{instancePath:t+`/items/`+r+`/parent`,schemaPath:`#/properties/items/items/properties/parent/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.author!==void 0){let e=n.author,i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`))return B.errors=[{instancePath:t+`/items/`+r+`/parent/author`,schemaPath:`#/properties/items/items/properties/parent/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return B.errors=[{instancePath:t+`/items/`+r+`/parent/author/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/author/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var oe=i===s}else var oe=!0;if(oe){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n))return B.errors=[{instancePath:t+`/items/`+r+`/parent/author/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/author/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var oe=i===s}else var oe=!0}}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/author`,schemaPath:`#/properties/items/items/properties/parent/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var k=i===s}else var k=!0;if(k){if(n.channel!==void 0){let e=n.channel,i=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/channel`,schemaPath:`#/$defs/ChannelName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/channel`,schemaPath:`#/$defs/ChannelName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var k=i===s}else var k=!0;if(k){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var k=i===s}else var k=!0;if(k){if(n.harness!==void 0){let e=n.harness,i=s;if(s===s){if(typeof e==`string`){if(!wt.test(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var k=i===s}else var k=!0;if(k){if(n.id!==void 0){let e=n.id,i=s,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var k=i===s}else var k=!0;if(k){if(n.mentions!==void 0){let e=n.mentions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return B.errors=[{instancePath:t+`/items/`+r+`/parent/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(a!==s)break}}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/mentions`,schemaPath:`#/properties/items/items/properties/parent/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var k=i===s}else var k=!0;if(k){if(n.reactions!==void 0){let e=n.reactions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`))return B.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.by!==void 0){let e=n.by,a=s;if(s===a){if(Array.isArray(e)){let n=e.length;for(let a=0;a<n;a++){let n=e[a],o=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return B.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(o!==s)break}}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/by`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var se=a===s}else var se=!0;if(se){if(n.count!==void 0){let e=n.count,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var se=a===s}else var se=!0;if(se){if(n.reaction!==void 0){let e=n.reaction,a=s;if(typeof e!=`string`)return B.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`thumbs_up`&&e!==`thumbs_down`)return B.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.items.items.properties.parent.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var se=a===s}else var se=!0}}}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/reactions`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var k=i===s}else var k=!0;if(k){if(n.text!==void 0){let e=n.text,i=s;if(s===i){if(typeof e==`string`){if(e.length>4e4)return B.errors=[{instancePath:t+`/items/`+r+`/parent/text`,schemaPath:`#/properties/items/items/properties/parent/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`}],!1;if(e.length<1)return B.errors=[{instancePath:t+`/items/`+r+`/parent/text`,schemaPath:`#/properties/items/items/properties/parent/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/text`,schemaPath:`#/properties/items/items/properties/parent/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var k=i===s}else var k=!0;if(k){if(n.closedAt!==void 0){let e=n.closedAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var k=i===s}else var k=!0;if(k){if(n.closedBy!==void 0){let e=n.closedBy,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/closedBy`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/closedBy`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var k=i===s}else var k=!0;if(k){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`)return B.errors=[{instancePath:t+`/items/`+r+`/parent/kind`,schemaPath:`#/properties/items/items/properties/parent/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`top-level`)return B.errors=[{instancePath:t+`/items/`+r+`/parent/kind`,schemaPath:`#/properties/items/items/properties/parent/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.items.items.properties.parent.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var k=i===s}else var k=!0;if(k){if(n.latestReplyAt!==void 0){let e=n.latestReplyAt,i=s,a=s,c=!1,l=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/items/`+r+`/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var ce=l===s;c||=ce;let u=s;if(e!==null){let e={instancePath:t+`/items/`+r+`/parent/latestReplyAt`,schemaPath:`#/properties/items/items/properties/parent/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var ce=u===s;if(c||=ce,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/items/`+r+`/parent/latestReplyAt`,schemaPath:`#/properties/items/items/properties/parent/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,B.errors=o,!1}var k=i===s}else var k=!0;if(k){if(n.latestReplyId!==void 0){let e=n.latestReplyId,i=s,a=s,c=!1,l=s,u=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===u&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var le=l===s;c||=le;let d=s;if(e!==null){let e={instancePath:t+`/items/`+r+`/parent/latestReplyId`,schemaPath:`#/properties/items/items/properties/parent/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var le=d===s;if(c||=le,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/items/`+r+`/parent/latestReplyId`,schemaPath:`#/properties/items/items/properties/parent/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,B.errors=o,!1}var k=i===s}else var k=!0;if(k){if(n.repliers!==void 0){let e=n.repliers,i=s;if(s===i){if(Array.isArray(e)){if(e.length>4)return B.errors=[{instancePath:t+`/items/`+r+`/parent/repliers`,schemaPath:`#/properties/items/items/properties/parent/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`}],!1;{let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`))return B.errors=[{instancePath:t+`/items/`+r+`/parent/repliers/`+i,schemaPath:`#/properties/items/items/properties/parent/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.name!==void 0){let e=n.name,a=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var ue=a===s}else var ue=!0;if(ue){if(n.owner!==void 0){let e=n.owner,a=s;if(s===s){if(typeof e==`string`){if(!P.test(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var ue=a===s}else var ue=!0}}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/repliers/`+i,schemaPath:`#/properties/items/items/properties/parent/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}}else return B.errors=[{instancePath:t+`/items/`+r+`/parent/repliers`,schemaPath:`#/properties/items/items/properties/parent/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var k=i===s}else var k=!0;if(k){if(n.replyCount!==void 0){let e=n.replyCount,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/replyCount`,schemaPath:`#/properties/items/items/properties/parent/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/replyCount`,schemaPath:`#/properties/items/items/properties/parent/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<0||isNaN(e))return B.errors=[{instancePath:t+`/items/`+r+`/parent/replyCount`,schemaPath:`#/properties/items/items/properties/parent/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`}],!1}var k=i===s}else var k=!0}}}}}}}}}}}}}}}else return B.errors=[{instancePath:t+`/items/`+r+`/parent`,schemaPath:`#/properties/items/items/properties/parent/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var S=i===s}else var S=!0;if(S){if(e.reasons!==void 0){let n=e.reasons,i=s;if(s===i){if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(typeof e!=`string`)return B.errors=[{instancePath:t+`/items/`+r+`/reasons/`+i,schemaPath:`#/properties/items/items/properties/reasons/items/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`followed-thread`&&e!==`mention`&&e!==`reaction`&&e!==`subscribed-channel`)return B.errors=[{instancePath:t+`/items/`+r+`/reasons/`+i,schemaPath:`#/properties/items/items/properties/reasons/items/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.items.items.properties.reasons.items.enum},message:`must be equal to one of the allowed values`}],!1;if(a!==s)break}}else return B.errors=[{instancePath:t+`/items/`+r+`/reasons`,schemaPath:`#/properties/items/items/properties/reasons/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var S=i===s}else var S=!0;if(S){if(e.read!==void 0){let n=s;if(typeof e.read!=`boolean`)return B.errors=[{instancePath:t+`/items/`+r+`/read`,schemaPath:`#/properties/items/items/properties/read/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var S=n===s}else var S=!0}}}}}}else return B.errors=[{instancePath:t+`/items/`+r,schemaPath:`#/properties/items/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return B.errors=[{instancePath:t+`/items`,schemaPath:`#/properties/items/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(e.nudges!==void 0){let n=e.nudges,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.channel===void 0&&(n=`channel`)||e.id===void 0&&(n=`id`)||e.kind===void 0&&(n=`kind`)||e.parent===void 0&&(n=`parent`)||e.raisedAt===void 0&&(n=`raisedAt`)||e.text===void 0&&(n=`text`)||e.read===void 0&&(n=`read`))return B.errors=[{instancePath:t+`/nudges/`+r,schemaPath:`#/properties/nudges/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.channel!==void 0){let n=e.channel,i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.createdAt===void 0&&(e=`createdAt`)||n.name===void 0&&(e=`name`))return B.errors=[{instancePath:t+`/nudges/`+r+`/channel`,schemaPath:`#/properties/nudges/items/properties/channel/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var de=i===s}else var de=!0;if(de){if(n.description!==void 0){let e=n.description,i=s;if(s===i){if(typeof e==`string`){if(e.length>500)return B.errors=[{instancePath:t+`/nudges/`+r+`/channel/description`,schemaPath:`#/properties/nudges/items/properties/channel/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(e.length<1)return B.errors=[{instancePath:t+`/nudges/`+r+`/channel/description`,schemaPath:`#/properties/nudges/items/properties/channel/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/channel/description`,schemaPath:`#/properties/nudges/items/properties/channel/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var de=i===s}else var de=!0;if(de){if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/channel/name`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/channel/name`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var de=i===s}else var de=!0}}}else return B.errors=[{instancePath:t+`/nudges/`+r+`/channel`,schemaPath:`#/properties/nudges/items/properties/channel/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var fe=i===s}else var fe=!0;if(fe){if(e.id!==void 0){let n=e.id,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return B.errors=[{instancePath:t+`/nudges/`+r+`/id`,schemaPath:`#/$defs/NudgeId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return B.errors=[{instancePath:t+`/nudges/`+r+`/id`,schemaPath:`#/$defs/NudgeId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<-9007199254740991||isNaN(n))return B.errors=[{instancePath:t+`/nudges/`+r+`/id`,schemaPath:`#/$defs/NudgeId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var fe=i===s}else var fe=!0;if(fe){if(e.kind!==void 0){let n=e.kind,i=s;if(typeof n!=`string`)return B.errors=[{instancePath:t+`/nudges/`+r+`/kind`,schemaPath:`#/properties/nudges/items/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`first`&&n!==`second`)return B.errors=[{instancePath:t+`/nudges/`+r+`/kind`,schemaPath:`#/properties/nudges/items/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.nudges.items.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var fe=i===s}else var fe=!0;if(fe){if(e.parent!==void 0){let n=e.parent,i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.latestReplyAt===void 0&&(e=`latestReplyAt`)||n.latestReplyId===void 0&&(e=`latestReplyId`)||n.repliers===void 0&&(e=`repliers`)||n.replyCount===void 0&&(e=`replyCount`))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent`,schemaPath:`#/properties/nudges/items/properties/parent/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.author!==void 0){let e=n.author,i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/author`,schemaPath:`#/properties/nudges/items/properties/parent/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/author/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/author/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var pe=i===s}else var pe=!0;if(pe){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/author/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/author/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var pe=i===s}else var pe=!0}}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/author`,schemaPath:`#/properties/nudges/items/properties/parent/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var me=i===s}else var me=!0;if(me){if(n.channel!==void 0){let e=n.channel,i=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/channel`,schemaPath:`#/$defs/ChannelName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/channel`,schemaPath:`#/$defs/ChannelName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var me=i===s}else var me=!0;if(me){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var me=i===s}else var me=!0;if(me){if(n.harness!==void 0){let e=n.harness,i=s;if(s===s){if(typeof e==`string`){if(!wt.test(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var me=i===s}else var me=!0;if(me){if(n.id!==void 0){let e=n.id,i=s,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var me=i===s}else var me=!0;if(me){if(n.mentions!==void 0){let e=n.mentions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(a!==s)break}}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/mentions`,schemaPath:`#/properties/nudges/items/properties/parent/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var me=i===s}else var me=!0;if(me){if(n.reactions!==void 0){let e=n.reactions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.by!==void 0){let e=n.by,a=s;if(s===a){if(Array.isArray(e)){let n=e.length;for(let a=0;a<n;a++){let n=e[a],o=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(o!==s)break}}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/by`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var he=a===s}else var he=!0;if(he){if(n.count!==void 0){let e=n.count,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/count`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/count`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/count`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var he=a===s}else var he=!0;if(he){if(n.reaction!==void 0){let e=n.reaction,a=s;if(typeof e!=`string`)return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/reaction`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`thumbs_up`&&e!==`thumbs_down`)return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/reaction`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.nudges.items.properties.parent.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var he=a===s}else var he=!0}}}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var me=i===s}else var me=!0;if(me){if(n.text!==void 0){let e=n.text,i=s;if(s===i){if(typeof e==`string`){if(e.length>4e4)return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/text`,schemaPath:`#/properties/nudges/items/properties/parent/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`}],!1;if(e.length<1)return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/text`,schemaPath:`#/properties/nudges/items/properties/parent/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/text`,schemaPath:`#/properties/nudges/items/properties/parent/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var me=i===s}else var me=!0;if(me){if(n.closedAt!==void 0){let e=n.closedAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var me=i===s}else var me=!0;if(me){if(n.closedBy!==void 0){let e=n.closedBy,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/closedBy`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/closedBy`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var me=i===s}else var me=!0;if(me){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`)return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/kind`,schemaPath:`#/properties/nudges/items/properties/parent/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`top-level`)return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/kind`,schemaPath:`#/properties/nudges/items/properties/parent/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Bn.properties.nudges.items.properties.parent.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var me=i===s}else var me=!0;if(me){if(n.latestReplyAt!==void 0){let e=n.latestReplyAt,i=s,a=s,c=!1,l=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var M=l===s;c||=M;let u=s;if(e!==null){let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyAt`,schemaPath:`#/properties/nudges/items/properties/parent/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var M=u===s;if(c||=M,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyAt`,schemaPath:`#/properties/nudges/items/properties/parent/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,B.errors=o,!1}var me=i===s}else var me=!0;if(me){if(n.latestReplyId!==void 0){let e=n.latestReplyId,i=s,a=s,c=!1,l=s,u=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===u&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var ge=l===s;c||=ge;let d=s;if(e!==null){let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyId`,schemaPath:`#/properties/nudges/items/properties/parent/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var ge=d===s;if(c||=ge,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyId`,schemaPath:`#/properties/nudges/items/properties/parent/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,B.errors=o,!1}var me=i===s}else var me=!0;if(me){if(n.repliers!==void 0){let e=n.repliers,i=s;if(s===i){if(Array.isArray(e)){if(e.length>4)return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers`,schemaPath:`#/properties/nudges/items/properties/parent/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`}],!1;{let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers/`+i,schemaPath:`#/properties/nudges/items/properties/parent/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.name!==void 0){let e=n.name,a=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var _e=a===s}else var _e=!0;if(_e){if(n.owner!==void 0){let e=n.owner,a=s;if(s===s){if(typeof e==`string`){if(!P.test(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var _e=a===s}else var _e=!0}}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers/`+i,schemaPath:`#/properties/nudges/items/properties/parent/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers`,schemaPath:`#/properties/nudges/items/properties/parent/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var me=i===s}else var me=!0;if(me){if(n.replyCount!==void 0){let e=n.replyCount,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/replyCount`,schemaPath:`#/properties/nudges/items/properties/parent/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/replyCount`,schemaPath:`#/properties/nudges/items/properties/parent/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<0||isNaN(e))return B.errors=[{instancePath:t+`/nudges/`+r+`/parent/replyCount`,schemaPath:`#/properties/nudges/items/properties/parent/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`}],!1}var me=i===s}else var me=!0}}}}}}}}}}}}}}}else return B.errors=[{instancePath:t+`/nudges/`+r+`/parent`,schemaPath:`#/properties/nudges/items/properties/parent/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var fe=i===s}else var fe=!0;if(fe){if(e.raisedAt!==void 0){let n=e.raisedAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return B.errors=[{instancePath:t+`/nudges/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return B.errors=[{instancePath:t+`/nudges/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var fe=i===s}else var fe=!0;if(fe){if(e.text!==void 0){let n=s;if(typeof e.text!=`string`)return B.errors=[{instancePath:t+`/nudges/`+r+`/text`,schemaPath:`#/properties/nudges/items/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var fe=n===s}else var fe=!0;if(fe){if(e.read!==void 0){let n=s;if(typeof e.read!=`boolean`)return B.errors=[{instancePath:t+`/nudges/`+r+`/read`,schemaPath:`#/properties/nudges/items/properties/read/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var fe=n===s}else var fe=!0}}}}}}}else return B.errors=[{instancePath:t+`/nudges/`+r,schemaPath:`#/properties/nudges/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return B.errors=[{instancePath:t+`/nudges`,schemaPath:`#/properties/nudges/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0}}}}}}else return B.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return B.errors=o,s===0}B.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Vn=V,Hn={type:`object`,properties:{alerts:{type:`array`,items:{type:`object`,properties:{agent:{$ref:`#/$defs/IdentityName`},backOnlineAt:{$ref:`#/$defs/IsoTime`},id:{$ref:`#/$defs/OfflineAlertId`},offlineReason:{type:`string`,enum:[`left`,`session revoked`,`session expired`,`token rotated`,`deactivated`,`connection lost`]},raisedAt:{$ref:`#/$defs/IsoTime`},read:{type:`boolean`}},required:[`agent`,`id`,`offlineReason`,`raisedAt`,`read`],additionalProperties:!0}},deactivatedQuietAgents:{type:`array`,items:{type:`object`,properties:{deactivatedAt:{$ref:`#/$defs/IsoTime`},id:{$ref:`#/$defs/DeactivatedQuietAgentId`},identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]},read:{type:`boolean`},text:{type:`string`}},required:[`deactivatedAt`,`id`,`identity`,`read`,`text`],additionalProperties:!0}},deactivationOffers:{type:`array`,items:{type:`object`,properties:{cleared:{type:`boolean`},id:{$ref:`#/$defs/DeactivationOfferId`},identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]},quietDays:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},raisedAt:{$ref:`#/$defs/IsoTime`},text:{type:`string`}},required:[`cleared`,`id`,`identity`,`quietDays`,`raisedAt`,`text`],additionalProperties:!0}},items:{type:`array`,items:{type:`object`,properties:{channel:{type:`object`,properties:{createdAt:{$ref:`#/$defs/IsoTime`},description:{type:`string`,minLength:1,maxLength:500},name:{$ref:`#/$defs/ChannelName`}},required:[`createdAt`,`name`],additionalProperties:!0},message:{anyOf:[{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName_1`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName_1`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName_1`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},kind:{type:`string`,enum:[`reply`]},replyTo:{$ref:`#/$defs/MessageId`}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`replyTo`],additionalProperties:!0}]},newReactions:{type:`array`,items:{type:`object`,properties:{identity:{$ref:`#/$defs/IdentityName_1`},messageId:{$ref:`#/$defs/MessageId`},reactedAt:{$ref:`#/$defs/IsoTime`},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`identity`,`messageId`,`reactedAt`,`reaction`],additionalProperties:!0}},parent:{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName_1`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName_1`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},reasons:{type:`array`,items:{type:`string`,enum:[`followed-thread`,`mention`,`reaction`,`subscribed-channel`]}}},required:[`channel`,`message`,`parent`,`reasons`],additionalProperties:!0}},nudges:{type:`array`,items:{type:`object`,properties:{channel:{type:`object`,properties:{createdAt:{$ref:`#/$defs/IsoTime`},description:{type:`string`,minLength:1,maxLength:500},name:{$ref:`#/$defs/ChannelName`}},required:[`createdAt`,`name`],additionalProperties:!0},id:{$ref:`#/$defs/NudgeId`},kind:{type:`string`,enum:[`first`,`second`]},parent:{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName_1`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName_1`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName_1`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName_1`},owner:{$ref:`#/$defs/Owner_1`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},raisedAt:{$ref:`#/$defs/IsoTime`},text:{type:`string`}},required:[`channel`,`id`,`kind`,`parent`,`raisedAt`,`text`],additionalProperties:!0}}},required:[`alerts`,`deactivatedQuietAgents`,`deactivationOffers`,`items`,`nudges`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},OfflineAlertId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},DeactivatedQuietAgentId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},DeactivationOfferId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},IdentityName_1:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Owner_1:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},ChannelName_1:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},Harness:{type:`string`,pattern:`^[a-z0-9-]{1,40}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991},NudgeId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991}}};function V(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=V.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.alerts===void 0&&(n=`alerts`)||e.deactivatedQuietAgents===void 0&&(n=`deactivatedQuietAgents`)||e.deactivationOffers===void 0&&(n=`deactivationOffers`)||e.items===void 0&&(n=`items`)||e.nudges===void 0&&(n=`nudges`))return V.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.alerts!==void 0){let n=e.alerts,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.agent===void 0&&(n=`agent`)||e.id===void 0&&(n=`id`)||e.offlineReason===void 0&&(n=`offlineReason`)||e.raisedAt===void 0&&(n=`raisedAt`)||e.read===void 0&&(n=`read`))return V.errors=[{instancePath:t+`/alerts/`+r,schemaPath:`#/properties/alerts/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.agent!==void 0){let n=e.agent,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return V.errors=[{instancePath:t+`/alerts/`+r+`/agent`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return V.errors=[{instancePath:t+`/alerts/`+r+`/agent`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=i===s}else var l=!0;if(l){if(e.backOnlineAt!==void 0){let n=e.backOnlineAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return V.errors=[{instancePath:t+`/alerts/`+r+`/backOnlineAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return V.errors=[{instancePath:t+`/alerts/`+r+`/backOnlineAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=i===s}else var l=!0;if(l){if(e.id!==void 0){let n=e.id,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return V.errors=[{instancePath:t+`/alerts/`+r+`/id`,schemaPath:`#/$defs/OfflineAlertId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return V.errors=[{instancePath:t+`/alerts/`+r+`/id`,schemaPath:`#/$defs/OfflineAlertId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<-9007199254740991||isNaN(n))return V.errors=[{instancePath:t+`/alerts/`+r+`/id`,schemaPath:`#/$defs/OfflineAlertId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var l=i===s}else var l=!0;if(l){if(e.offlineReason!==void 0){let n=e.offlineReason,i=s;if(typeof n!=`string`)return V.errors=[{instancePath:t+`/alerts/`+r+`/offlineReason`,schemaPath:`#/properties/alerts/items/properties/offlineReason/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`left`&&n!==`session revoked`&&n!==`session expired`&&n!==`token rotated`&&n!==`deactivated`&&n!==`connection lost`)return V.errors=[{instancePath:t+`/alerts/`+r+`/offlineReason`,schemaPath:`#/properties/alerts/items/properties/offlineReason/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.alerts.items.properties.offlineReason.enum},message:`must be equal to one of the allowed values`}],!1;var l=i===s}else var l=!0;if(l){if(e.raisedAt!==void 0){let n=e.raisedAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return V.errors=[{instancePath:t+`/alerts/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return V.errors=[{instancePath:t+`/alerts/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=i===s}else var l=!0;if(l){if(e.read!==void 0){let n=s;if(typeof e.read!=`boolean`)return V.errors=[{instancePath:t+`/alerts/`+r+`/read`,schemaPath:`#/properties/alerts/items/properties/read/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var l=n===s}else var l=!0}}}}}}else return V.errors=[{instancePath:t+`/alerts/`+r,schemaPath:`#/properties/alerts/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return V.errors=[{instancePath:t+`/alerts`,schemaPath:`#/properties/alerts/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(e.deactivatedQuietAgents!==void 0){let n=e.deactivatedQuietAgents,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.deactivatedAt===void 0&&(n=`deactivatedAt`)||e.id===void 0&&(n=`id`)||e.identity===void 0&&(n=`identity`)||e.read===void 0&&(n=`read`)||e.text===void 0&&(n=`text`))return V.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r,schemaPath:`#/properties/deactivatedQuietAgents/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.deactivatedAt!==void 0){let n=e.deactivatedAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return V.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/deactivatedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return V.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/deactivatedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=i===s}else var d=!0;if(d){if(e.id!==void 0){let n=e.id,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return V.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/id`,schemaPath:`#/$defs/DeactivatedQuietAgentId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return V.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/id`,schemaPath:`#/$defs/DeactivatedQuietAgentId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<-9007199254740991||isNaN(n))return V.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/id`,schemaPath:`#/$defs/DeactivatedQuietAgentId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var d=i===s}else var d=!0;if(d){if(e.identity!==void 0){let n=e.identity,i=s,a=s,c=!1,l=s;if(s===l){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)){let n={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/admin`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var f=e===s}else var f=!0;if(f){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0;if(f){if(n.deactivated!==void 0){let e=n.deactivated,i=s;if(typeof e!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.deactivatedQuietAgents.items.properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=i===s}else var f=!0;if(f){if(n.displayName!==void 0){let e=n.displayName,i=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0;if(f){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`human`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.deactivatedQuietAgents.items.properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var f=i===s}else var f=!0;if(f){if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=i===s}else var f=!0}}}}}}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var p=l===s;if(c||=p,p)var m=!0;let u=s;if(s===u){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)||n.owner===void 0&&(e=`owner`)){let n={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/admin`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var h=e===s}else var h=!0;if(h){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=i===s}else var h=!0;if(h){if(n.deactivated!==void 0){let e=n.deactivated,i=s;if(typeof e!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.deactivatedQuietAgents.items.properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var h=i===s}else var h=!0;if(h){if(n.description!==void 0){let e=n.description,i=s;if(s===s){if(typeof e==`string`){if(e.length>500){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=i===s}else var h=!0;if(h){if(n.displayName!==void 0){let e=n.displayName,i=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=i===s}else var h=!0;if(h){if(n.handler!==void 0){let e=n.handler,i=s;if(typeof e!=`boolean`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/handler`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/handler`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.deactivatedQuietAgents.items.properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var h=i===s}else var h=!0;if(h){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`agent`){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/kind`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.deactivatedQuietAgents.items.properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var h=i===s}else var h=!0;if(h){if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=i===s}else var h=!0;if(h){if(n.owner!==void 0){let e=n.owner,i=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=i===s}else var h=!0}}}}}}}}}}else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var p=u===s;if(c||=p,p&&m!==!0&&(m=!0),c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/deactivatedQuietAgents/`+r+`/identity`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,V.errors=o,!1}var d=i===s}else var d=!0;if(d){if(e.read!==void 0){let n=s;if(typeof e.read!=`boolean`)return V.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/read`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/read/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var d=n===s}else var d=!0;if(d){if(e.text!==void 0){let n=s;if(typeof e.text!=`string`)return V.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r+`/text`,schemaPath:`#/properties/deactivatedQuietAgents/items/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=n===s}else var d=!0}}}}}else return V.errors=[{instancePath:t+`/deactivatedQuietAgents/`+r,schemaPath:`#/properties/deactivatedQuietAgents/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return V.errors=[{instancePath:t+`/deactivatedQuietAgents`,schemaPath:`#/properties/deactivatedQuietAgents/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(e.deactivationOffers!==void 0){let n=e.deactivationOffers,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.cleared===void 0&&(n=`cleared`)||e.id===void 0&&(n=`id`)||e.identity===void 0&&(n=`identity`)||e.quietDays===void 0&&(n=`quietDays`)||e.raisedAt===void 0&&(n=`raisedAt`)||e.text===void 0&&(n=`text`))return V.errors=[{instancePath:t+`/deactivationOffers/`+r,schemaPath:`#/properties/deactivationOffers/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.cleared!==void 0){let n=s;if(typeof e.cleared!=`boolean`)return V.errors=[{instancePath:t+`/deactivationOffers/`+r+`/cleared`,schemaPath:`#/properties/deactivationOffers/items/properties/cleared/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var g=n===s}else var g=!0;if(g){if(e.id!==void 0){let n=e.id,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return V.errors=[{instancePath:t+`/deactivationOffers/`+r+`/id`,schemaPath:`#/$defs/DeactivationOfferId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return V.errors=[{instancePath:t+`/deactivationOffers/`+r+`/id`,schemaPath:`#/$defs/DeactivationOfferId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<-9007199254740991||isNaN(n))return V.errors=[{instancePath:t+`/deactivationOffers/`+r+`/id`,schemaPath:`#/$defs/DeactivationOfferId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var g=i===s}else var g=!0;if(g){if(e.identity!==void 0){let n=e.identity,i=s,a=s,c=!1,l=s;if(s===l){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)){let n={instancePath:t+`/deactivationOffers/`+r+`/identity`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/admin`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var _=e===s}else var _=!0;if(_){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var _=i===s}else var _=!0;if(_){if(n.deactivated!==void 0){let e=n.deactivated,i=s;if(typeof e!=`boolean`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.deactivationOffers.items.properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var _=i===s}else var _=!0;if(_){if(n.displayName!==void 0){let e=n.displayName,i=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var _=i===s}else var _=!0;if(_){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/kind`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`human`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/kind`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.deactivationOffers.items.properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var _=i===s}else var _=!0;if(_){if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var _=i===s}else var _=!0}}}}}}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var v=l===s;if(c||=v,v)var y=!0;let u=s;if(s===u){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)||n.owner===void 0&&(e=`owner`)){let n={instancePath:t+`/deactivationOffers/`+r+`/identity`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/admin`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var b=e===s}else var b=!0;if(b){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=i===s}else var b=!0;if(b){if(n.deactivated!==void 0){let e=n.deactivated,i=s;if(typeof e!=`boolean`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/deactivated`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.deactivationOffers.items.properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var b=i===s}else var b=!0;if(b){if(n.description!==void 0){let e=n.description,i=s;if(s===s){if(typeof e==`string`){if(e.length>500){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=i===s}else var b=!0;if(b){if(n.displayName!==void 0){let e=n.displayName,i=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=i===s}else var b=!0;if(b){if(n.handler!==void 0){let e=n.handler,i=s;if(typeof e!=`boolean`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/handler`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/handler`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.deactivationOffers.items.properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var b=i===s}else var b=!0;if(b){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/kind`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`agent`){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/kind`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.deactivationOffers.items.properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var b=i===s}else var b=!0;if(b){if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=i===s}else var b=!0;if(b){if(n.owner!==void 0){let e=n.owner,i=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/deactivationOffers/`+r+`/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var b=i===s}else var b=!0}}}}}}}}}}else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var v=u===s;if(c||=v,v&&y!==!0&&(y=!0),c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/deactivationOffers/`+r+`/identity`,schemaPath:`#/properties/deactivationOffers/items/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,V.errors=o,!1}var g=i===s}else var g=!0;if(g){if(e.quietDays!==void 0){let n=e.quietDays,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return V.errors=[{instancePath:t+`/deactivationOffers/`+r+`/quietDays`,schemaPath:`#/properties/deactivationOffers/items/properties/quietDays/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return V.errors=[{instancePath:t+`/deactivationOffers/`+r+`/quietDays`,schemaPath:`#/properties/deactivationOffers/items/properties/quietDays/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<-9007199254740991||isNaN(n))return V.errors=[{instancePath:t+`/deactivationOffers/`+r+`/quietDays`,schemaPath:`#/properties/deactivationOffers/items/properties/quietDays/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var g=i===s}else var g=!0;if(g){if(e.raisedAt!==void 0){let n=e.raisedAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return V.errors=[{instancePath:t+`/deactivationOffers/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return V.errors=[{instancePath:t+`/deactivationOffers/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var g=i===s}else var g=!0;if(g){if(e.text!==void 0){let n=s;if(typeof e.text!=`string`)return V.errors=[{instancePath:t+`/deactivationOffers/`+r+`/text`,schemaPath:`#/properties/deactivationOffers/items/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var g=n===s}else var g=!0}}}}}}else return V.errors=[{instancePath:t+`/deactivationOffers/`+r,schemaPath:`#/properties/deactivationOffers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return V.errors=[{instancePath:t+`/deactivationOffers`,schemaPath:`#/properties/deactivationOffers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(e.items!==void 0){let n=e.items,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.channel===void 0&&(n=`channel`)||e.message===void 0&&(n=`message`)||e.parent===void 0&&(n=`parent`)||e.reasons===void 0&&(n=`reasons`))return V.errors=[{instancePath:t+`/items/`+r,schemaPath:`#/properties/items/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.channel!==void 0){let n=e.channel,i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.createdAt===void 0&&(e=`createdAt`)||n.name===void 0&&(e=`name`))return V.errors=[{instancePath:t+`/items/`+r+`/channel`,schemaPath:`#/properties/items/items/properties/channel/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return V.errors=[{instancePath:t+`/items/`+r+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var x=i===s}else var x=!0;if(x){if(n.description!==void 0){let e=n.description,i=s;if(s===i){if(typeof e==`string`){if(e.length>500)return V.errors=[{instancePath:t+`/items/`+r+`/channel/description`,schemaPath:`#/properties/items/items/properties/channel/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(e.length<1)return V.errors=[{instancePath:t+`/items/`+r+`/channel/description`,schemaPath:`#/properties/items/items/properties/channel/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/channel/description`,schemaPath:`#/properties/items/items/properties/channel/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var x=i===s}else var x=!0;if(x){if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return V.errors=[{instancePath:t+`/items/`+r+`/channel/name`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/channel/name`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var x=i===s}else var x=!0}}}else return V.errors=[{instancePath:t+`/items/`+r+`/channel`,schemaPath:`#/properties/items/items/properties/channel/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var S=i===s}else var S=!0;if(S){if(e.message!==void 0){let n=e.message,i=s,a=s,c=!1,l=s;if(s===l){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.latestReplyAt===void 0&&(e=`latestReplyAt`)||n.latestReplyId===void 0&&(e=`latestReplyId`)||n.repliers===void 0&&(e=`repliers`)||n.replyCount===void 0&&(e=`replyCount`)){let n={instancePath:t+`/items/`+r+`/message`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.author!==void 0){let e=n.author,i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`)){let e={instancePath:t+`/items/`+r+`/message/author`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/items/`+r+`/message/author/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/author/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var C=i===s}else var C=!0;if(C){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/items/`+r+`/message/author/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/author/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var C=i===s}else var C=!0}}}else{let e={instancePath:t+`/items/`+r+`/message/author`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.channel!==void 0){let e=n.channel,i=s;if(s===s){if(typeof e==`string`){if(!F.test(e)){let e={instancePath:t+`/items/`+r+`/message/channel`,schemaPath:`#/$defs/ChannelName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/channel`,schemaPath:`#/$defs/ChannelName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/items/`+r+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.harness!==void 0){let e=n.harness,i=s;if(s===s){if(typeof e==`string`){if(!wt.test(e)){let e={instancePath:t+`/items/`+r+`/message/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.id!==void 0){let e=n.id,i=s,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.mentions!==void 0){let e=n.mentions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/items/`+r+`/message/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/items/`+r+`/message/mentions`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.reactions!==void 0){let e=n.reactions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`)){let n={instancePath:t+`/items/`+r+`/message/reactions/`+i,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.by!==void 0){let e=n.by,a=s;if(s===a){if(Array.isArray(e)){let n=e.length;for(let a=0;a<n;a++){let n=e[a],c=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(c!==s)break}}else{let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/by`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var T=a===s}else var T=!0;if(T){if(n.count!==void 0){let e=n.count,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var T=a===s}else var T=!0;if(T){if(n.reaction!==void 0){let e=n.reaction,a=s;if(typeof e!=`string`){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`thumbs_up`&&e!==`thumbs_down`){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.items.items.properties.message.anyOf[0].properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var T=a===s}else var T=!0}}}}else{let e={instancePath:t+`/items/`+r+`/message/reactions/`+i,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/items/`+r+`/message/reactions`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.text!==void 0){let e=n.text,i=s;if(s===i){if(typeof e==`string`){if(e.length>4e4){let e={instancePath:t+`/items/`+r+`/message/text`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/items/`+r+`/message/text`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/text`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.closedAt!==void 0){let e=n.closedAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/items/`+r+`/message/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.closedBy!==void 0){let e=n.closedBy,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/items/`+r+`/message/closedBy`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/closedBy`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`){let e={instancePath:t+`/items/`+r+`/message/kind`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`top-level`){let e={instancePath:t+`/items/`+r+`/message/kind`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.items.items.properties.message.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var w=i===s}else var w=!0;if(w){if(n.latestReplyAt!==void 0){let e=n.latestReplyAt,i=s,a=s,c=!1,l=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/items/`+r+`/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var E=l===s;c||=E;let u=s;if(e!==null){let e={instancePath:t+`/items/`+r+`/message/latestReplyAt`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var E=u===s;if(c||=E,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/items/`+r+`/message/latestReplyAt`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};o===null?o=[e]:o.push(e),s++}var w=i===s}else var w=!0;if(w){if(n.latestReplyId!==void 0){let e=n.latestReplyId,i=s,a=s,c=!1,l=s,u=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===u&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var ee=l===s;c||=ee;let d=s;if(e!==null){let e={instancePath:t+`/items/`+r+`/message/latestReplyId`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var ee=d===s;if(c||=ee,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/items/`+r+`/message/latestReplyId`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};o===null?o=[e]:o.push(e),s++}var w=i===s}else var w=!0;if(w){if(n.repliers!==void 0){let e=n.repliers,i=s;if(s===i){if(Array.isArray(e)){if(e.length>4){let e={instancePath:t+`/items/`+r+`/message/repliers`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`};o===null?o=[e]:o.push(e),s++}else{let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`)){let n={instancePath:t+`/items/`+r+`/message/repliers/`+i,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.name!==void 0){let e=n.name,a=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/items/`+r+`/message/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var te=a===s}else var te=!0;if(te){if(n.owner!==void 0){let e=n.owner,a=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/items/`+r+`/message/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var te=a===s}else var te=!0}}}else{let e={instancePath:t+`/items/`+r+`/message/repliers/`+i,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}}else{let e={instancePath:t+`/items/`+r+`/message/repliers`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0;if(w){if(n.replyCount!==void 0){let e=n.replyCount,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/replyCount`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/replyCount`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<0||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/replyCount`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`};o===null?o=[e]:o.push(e),s++}}var w=i===s}else var w=!0}}}}}}}}}}}}}}}}else{let e={instancePath:t+`/items/`+r+`/message`,schemaPath:`#/properties/items/items/properties/message/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var D=l===s;if(c||=D,D)var ne=!0;let u=s;if(s===u){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.replyTo===void 0&&(e=`replyTo`)){let n={instancePath:t+`/items/`+r+`/message`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.author!==void 0){let e=n.author,i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`)){let e={instancePath:t+`/items/`+r+`/message/author`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/items/`+r+`/message/author/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/author/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var re=i===s}else var re=!0;if(re){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/items/`+r+`/message/author/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/author/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var re=i===s}else var re=!0}}}else{let e={instancePath:t+`/items/`+r+`/message/author`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.channel!==void 0){let e=n.channel,i=s;if(s===s){if(typeof e==`string`){if(!F.test(e)){let e={instancePath:t+`/items/`+r+`/message/channel`,schemaPath:`#/$defs/ChannelName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/channel`,schemaPath:`#/$defs/ChannelName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/items/`+r+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.harness!==void 0){let e=n.harness,i=s;if(s===s){if(typeof e==`string`){if(!wt.test(e)){let e={instancePath:t+`/items/`+r+`/message/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.id!==void 0){let e=n.id,i=s,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.mentions!==void 0){let e=n.mentions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/items/`+r+`/message/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/items/`+r+`/message/mentions`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.reactions!==void 0){let e=n.reactions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`)){let n={instancePath:t+`/items/`+r+`/message/reactions/`+i,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.by!==void 0){let e=n.by,a=s;if(s===a){if(Array.isArray(e)){let n=e.length;for(let a=0;a<n;a++){let n=e[a],c=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(c!==s)break}}else{let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/by`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var ie=a===s}else var ie=!0;if(ie){if(n.count!==void 0){let e=n.count,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var ie=a===s}else var ie=!0;if(ie){if(n.reaction!==void 0){let e=n.reaction,a=s;if(typeof e!=`string`){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`thumbs_up`&&e!==`thumbs_down`){let e={instancePath:t+`/items/`+r+`/message/reactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.items.items.properties.message.anyOf[1].properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var ie=a===s}else var ie=!0}}}}else{let e={instancePath:t+`/items/`+r+`/message/reactions/`+i,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/items/`+r+`/message/reactions`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.text!==void 0){let e=n.text,i=s;if(s===i){if(typeof e==`string`){if(e.length>4e4){let e={instancePath:t+`/items/`+r+`/message/text`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/items/`+r+`/message/text`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/message/text`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0;if(O){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`){let e={instancePath:t+`/items/`+r+`/message/kind`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`reply`){let e={instancePath:t+`/items/`+r+`/message/kind`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.items.items.properties.message.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var O=i===s}else var O=!0;if(O){if(n.replyTo!==void 0){let e=n.replyTo,i=s,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/message/replyTo`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/replyTo`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/message/replyTo`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var O=i===s}else var O=!0}}}}}}}}}}}else{let e={instancePath:t+`/items/`+r+`/message`,schemaPath:`#/properties/items/items/properties/message/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var D=u===s;if(c||=D,D&&ne!==!0&&(ne=!0),c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/items/`+r+`/message`,schemaPath:`#/properties/items/items/properties/message/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,V.errors=o,!1}var S=i===s}else var S=!0;if(S){if(e.newReactions!==void 0){let n=e.newReactions,i=s;if(s===i){if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(s===a){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.identity===void 0&&(n=`identity`)||e.messageId===void 0&&(n=`messageId`)||e.reactedAt===void 0&&(n=`reactedAt`)||e.reaction===void 0&&(n=`reaction`))return V.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i,schemaPath:`#/properties/items/items/properties/newReactions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.identity!==void 0){let n=e.identity,a=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return V.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/identity`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/identity`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var ae=a===s}else var ae=!0;if(ae){if(e.messageId!==void 0){let n=e.messageId,a=s,o=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return V.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===o&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return V.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return V.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var ae=a===s}else var ae=!0;if(ae){if(e.reactedAt!==void 0){let n=e.reactedAt,a=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return V.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/reactedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/reactedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var ae=a===s}else var ae=!0;if(ae){if(e.reaction!==void 0){let n=e.reaction,a=s;if(typeof n!=`string`)return V.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/newReactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`thumbs_up`&&n!==`thumbs_down`)return V.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/newReactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.items.items.properties.newReactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var ae=a===s}else var ae=!0}}}}else return V.errors=[{instancePath:t+`/items/`+r+`/newReactions/`+i,schemaPath:`#/properties/items/items/properties/newReactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}else return V.errors=[{instancePath:t+`/items/`+r+`/newReactions`,schemaPath:`#/properties/items/items/properties/newReactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var S=i===s}else var S=!0;if(S){if(e.parent!==void 0){let n=e.parent,i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.latestReplyAt===void 0&&(e=`latestReplyAt`)||n.latestReplyId===void 0&&(e=`latestReplyId`)||n.repliers===void 0&&(e=`repliers`)||n.replyCount===void 0&&(e=`replyCount`))return V.errors=[{instancePath:t+`/items/`+r+`/parent`,schemaPath:`#/properties/items/items/properties/parent/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.author!==void 0){let e=n.author,i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`))return V.errors=[{instancePath:t+`/items/`+r+`/parent/author`,schemaPath:`#/properties/items/items/properties/parent/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return V.errors=[{instancePath:t+`/items/`+r+`/parent/author/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/author/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var oe=i===s}else var oe=!0;if(oe){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n))return V.errors=[{instancePath:t+`/items/`+r+`/parent/author/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/author/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var oe=i===s}else var oe=!0}}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/author`,schemaPath:`#/properties/items/items/properties/parent/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var k=i===s}else var k=!0;if(k){if(n.channel!==void 0){let e=n.channel,i=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/channel`,schemaPath:`#/$defs/ChannelName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/channel`,schemaPath:`#/$defs/ChannelName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var k=i===s}else var k=!0;if(k){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var k=i===s}else var k=!0;if(k){if(n.harness!==void 0){let e=n.harness,i=s;if(s===s){if(typeof e==`string`){if(!wt.test(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var k=i===s}else var k=!0;if(k){if(n.id!==void 0){let e=n.id,i=s,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var k=i===s}else var k=!0;if(k){if(n.mentions!==void 0){let e=n.mentions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return V.errors=[{instancePath:t+`/items/`+r+`/parent/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(a!==s)break}}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/mentions`,schemaPath:`#/properties/items/items/properties/parent/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var k=i===s}else var k=!0;if(k){if(n.reactions!==void 0){let e=n.reactions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`))return V.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.by!==void 0){let e=n.by,a=s;if(s===a){if(Array.isArray(e)){let n=e.length;for(let a=0;a<n;a++){let n=e[a],o=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return V.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(o!==s)break}}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/by`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var se=a===s}else var se=!0;if(se){if(n.count!==void 0){let e=n.count,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/count`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var se=a===s}else var se=!0;if(se){if(n.reaction!==void 0){let e=n.reaction,a=s;if(typeof e!=`string`)return V.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`thumbs_up`&&e!==`thumbs_down`)return V.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i+`/reaction`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.items.items.properties.parent.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var se=a===s}else var se=!0}}}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/reactions/`+i,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/reactions`,schemaPath:`#/properties/items/items/properties/parent/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var k=i===s}else var k=!0;if(k){if(n.text!==void 0){let e=n.text,i=s;if(s===i){if(typeof e==`string`){if(e.length>4e4)return V.errors=[{instancePath:t+`/items/`+r+`/parent/text`,schemaPath:`#/properties/items/items/properties/parent/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`}],!1;if(e.length<1)return V.errors=[{instancePath:t+`/items/`+r+`/parent/text`,schemaPath:`#/properties/items/items/properties/parent/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/text`,schemaPath:`#/properties/items/items/properties/parent/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var k=i===s}else var k=!0;if(k){if(n.closedAt!==void 0){let e=n.closedAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var k=i===s}else var k=!0;if(k){if(n.closedBy!==void 0){let e=n.closedBy,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/closedBy`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/closedBy`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var k=i===s}else var k=!0;if(k){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`)return V.errors=[{instancePath:t+`/items/`+r+`/parent/kind`,schemaPath:`#/properties/items/items/properties/parent/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`top-level`)return V.errors=[{instancePath:t+`/items/`+r+`/parent/kind`,schemaPath:`#/properties/items/items/properties/parent/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.items.items.properties.parent.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var k=i===s}else var k=!0;if(k){if(n.latestReplyAt!==void 0){let e=n.latestReplyAt,i=s,a=s,c=!1,l=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/items/`+r+`/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/items/`+r+`/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var ce=l===s;c||=ce;let u=s;if(e!==null){let e={instancePath:t+`/items/`+r+`/parent/latestReplyAt`,schemaPath:`#/properties/items/items/properties/parent/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var ce=u===s;if(c||=ce,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/items/`+r+`/parent/latestReplyAt`,schemaPath:`#/properties/items/items/properties/parent/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,V.errors=o,!1}var k=i===s}else var k=!0;if(k){if(n.latestReplyId!==void 0){let e=n.latestReplyId,i=s,a=s,c=!1,l=s,u=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/items/`+r+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===u&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/items/`+r+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/items/`+r+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var le=l===s;c||=le;let d=s;if(e!==null){let e={instancePath:t+`/items/`+r+`/parent/latestReplyId`,schemaPath:`#/properties/items/items/properties/parent/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var le=d===s;if(c||=le,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/items/`+r+`/parent/latestReplyId`,schemaPath:`#/properties/items/items/properties/parent/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,V.errors=o,!1}var k=i===s}else var k=!0;if(k){if(n.repliers!==void 0){let e=n.repliers,i=s;if(s===i){if(Array.isArray(e)){if(e.length>4)return V.errors=[{instancePath:t+`/items/`+r+`/parent/repliers`,schemaPath:`#/properties/items/items/properties/parent/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`}],!1;{let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`))return V.errors=[{instancePath:t+`/items/`+r+`/parent/repliers/`+i,schemaPath:`#/properties/items/items/properties/parent/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.name!==void 0){let e=n.name,a=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var ue=a===s}else var ue=!0;if(ue){if(n.owner!==void 0){let e=n.owner,a=s;if(s===s){if(typeof e==`string`){if(!P.test(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var ue=a===s}else var ue=!0}}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/repliers/`+i,schemaPath:`#/properties/items/items/properties/parent/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}}else return V.errors=[{instancePath:t+`/items/`+r+`/parent/repliers`,schemaPath:`#/properties/items/items/properties/parent/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var k=i===s}else var k=!0;if(k){if(n.replyCount!==void 0){let e=n.replyCount,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/replyCount`,schemaPath:`#/properties/items/items/properties/parent/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/replyCount`,schemaPath:`#/properties/items/items/properties/parent/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<0||isNaN(e))return V.errors=[{instancePath:t+`/items/`+r+`/parent/replyCount`,schemaPath:`#/properties/items/items/properties/parent/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`}],!1}var k=i===s}else var k=!0}}}}}}}}}}}}}}}else return V.errors=[{instancePath:t+`/items/`+r+`/parent`,schemaPath:`#/properties/items/items/properties/parent/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var S=i===s}else var S=!0;if(S){if(e.reasons!==void 0){let n=e.reasons,i=s;if(s===i){if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(typeof e!=`string`)return V.errors=[{instancePath:t+`/items/`+r+`/reasons/`+i,schemaPath:`#/properties/items/items/properties/reasons/items/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`followed-thread`&&e!==`mention`&&e!==`reaction`&&e!==`subscribed-channel`)return V.errors=[{instancePath:t+`/items/`+r+`/reasons/`+i,schemaPath:`#/properties/items/items/properties/reasons/items/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.items.items.properties.reasons.items.enum},message:`must be equal to one of the allowed values`}],!1;if(a!==s)break}}else return V.errors=[{instancePath:t+`/items/`+r+`/reasons`,schemaPath:`#/properties/items/items/properties/reasons/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var S=i===s}else var S=!0}}}}}else return V.errors=[{instancePath:t+`/items/`+r,schemaPath:`#/properties/items/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return V.errors=[{instancePath:t+`/items`,schemaPath:`#/properties/items/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(e.nudges!==void 0){let n=e.nudges,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.channel===void 0&&(n=`channel`)||e.id===void 0&&(n=`id`)||e.kind===void 0&&(n=`kind`)||e.parent===void 0&&(n=`parent`)||e.raisedAt===void 0&&(n=`raisedAt`)||e.text===void 0&&(n=`text`))return V.errors=[{instancePath:t+`/nudges/`+r,schemaPath:`#/properties/nudges/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.channel!==void 0){let n=e.channel,i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.createdAt===void 0&&(e=`createdAt`)||n.name===void 0&&(e=`name`))return V.errors=[{instancePath:t+`/nudges/`+r+`/channel`,schemaPath:`#/properties/nudges/items/properties/channel/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/channel/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var de=i===s}else var de=!0;if(de){if(n.description!==void 0){let e=n.description,i=s;if(s===i){if(typeof e==`string`){if(e.length>500)return V.errors=[{instancePath:t+`/nudges/`+r+`/channel/description`,schemaPath:`#/properties/nudges/items/properties/channel/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(e.length<1)return V.errors=[{instancePath:t+`/nudges/`+r+`/channel/description`,schemaPath:`#/properties/nudges/items/properties/channel/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/channel/description`,schemaPath:`#/properties/nudges/items/properties/channel/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var de=i===s}else var de=!0;if(de){if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/channel/name`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/channel/name`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var de=i===s}else var de=!0}}}else return V.errors=[{instancePath:t+`/nudges/`+r+`/channel`,schemaPath:`#/properties/nudges/items/properties/channel/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var fe=i===s}else var fe=!0;if(fe){if(e.id!==void 0){let n=e.id,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return V.errors=[{instancePath:t+`/nudges/`+r+`/id`,schemaPath:`#/$defs/NudgeId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return V.errors=[{instancePath:t+`/nudges/`+r+`/id`,schemaPath:`#/$defs/NudgeId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<-9007199254740991||isNaN(n))return V.errors=[{instancePath:t+`/nudges/`+r+`/id`,schemaPath:`#/$defs/NudgeId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var fe=i===s}else var fe=!0;if(fe){if(e.kind!==void 0){let n=e.kind,i=s;if(typeof n!=`string`)return V.errors=[{instancePath:t+`/nudges/`+r+`/kind`,schemaPath:`#/properties/nudges/items/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`first`&&n!==`second`)return V.errors=[{instancePath:t+`/nudges/`+r+`/kind`,schemaPath:`#/properties/nudges/items/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.nudges.items.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var fe=i===s}else var fe=!0;if(fe){if(e.parent!==void 0){let n=e.parent,i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.latestReplyAt===void 0&&(e=`latestReplyAt`)||n.latestReplyId===void 0&&(e=`latestReplyId`)||n.repliers===void 0&&(e=`repliers`)||n.replyCount===void 0&&(e=`replyCount`))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent`,schemaPath:`#/properties/nudges/items/properties/parent/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.author!==void 0){let e=n.author,i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/author`,schemaPath:`#/properties/nudges/items/properties/parent/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/author/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/author/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var pe=i===s}else var pe=!0;if(pe){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/author/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/author/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var pe=i===s}else var pe=!0}}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/author`,schemaPath:`#/properties/nudges/items/properties/parent/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var me=i===s}else var me=!0;if(me){if(n.channel!==void 0){let e=n.channel,i=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/channel`,schemaPath:`#/$defs/ChannelName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/channel`,schemaPath:`#/$defs/ChannelName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var me=i===s}else var me=!0;if(me){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var me=i===s}else var me=!0;if(me){if(n.harness!==void 0){let e=n.harness,i=s;if(s===s){if(typeof e==`string`){if(!wt.test(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var me=i===s}else var me=!0;if(me){if(n.id!==void 0){let e=n.id,i=s,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var me=i===s}else var me=!0;if(me){if(n.mentions!==void 0){let e=n.mentions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/mentions/`+i,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(a!==s)break}}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/mentions`,schemaPath:`#/properties/nudges/items/properties/parent/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var me=i===s}else var me=!0;if(me){if(n.reactions!==void 0){let e=n.reactions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.by!==void 0){let e=n.by,a=s;if(s===a){if(Array.isArray(e)){let n=e.length;for(let a=0;a<n;a++){let n=e[a],o=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(o!==s)break}}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/by`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var he=a===s}else var he=!0;if(he){if(n.count!==void 0){let e=n.count,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/count`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/count`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/count`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var he=a===s}else var he=!0;if(he){if(n.reaction!==void 0){let e=n.reaction,a=s;if(typeof e!=`string`)return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/reaction`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`thumbs_up`&&e!==`thumbs_down`)return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i+`/reaction`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.nudges.items.properties.parent.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var he=a===s}else var he=!0}}}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions/`+i,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/reactions`,schemaPath:`#/properties/nudges/items/properties/parent/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var me=i===s}else var me=!0;if(me){if(n.text!==void 0){let e=n.text,i=s;if(s===i){if(typeof e==`string`){if(e.length>4e4)return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/text`,schemaPath:`#/properties/nudges/items/properties/parent/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`}],!1;if(e.length<1)return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/text`,schemaPath:`#/properties/nudges/items/properties/parent/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/text`,schemaPath:`#/properties/nudges/items/properties/parent/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var me=i===s}else var me=!0;if(me){if(n.closedAt!==void 0){let e=n.closedAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var me=i===s}else var me=!0;if(me){if(n.closedBy!==void 0){let e=n.closedBy,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/closedBy`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/closedBy`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var me=i===s}else var me=!0;if(me){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`)return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/kind`,schemaPath:`#/properties/nudges/items/properties/parent/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`top-level`)return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/kind`,schemaPath:`#/properties/nudges/items/properties/parent/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Hn.properties.nudges.items.properties.parent.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var me=i===s}else var me=!0;if(me){if(n.latestReplyAt!==void 0){let e=n.latestReplyAt,i=s,a=s,c=!1,l=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var M=l===s;c||=M;let u=s;if(e!==null){let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyAt`,schemaPath:`#/properties/nudges/items/properties/parent/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var M=u===s;if(c||=M,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyAt`,schemaPath:`#/properties/nudges/items/properties/parent/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,V.errors=o,!1}var me=i===s}else var me=!0;if(me){if(n.latestReplyId!==void 0){let e=n.latestReplyId,i=s,a=s,c=!1,l=s,u=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===u&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var ge=l===s;c||=ge;let d=s;if(e!==null){let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyId`,schemaPath:`#/properties/nudges/items/properties/parent/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var ge=d===s;if(c||=ge,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/nudges/`+r+`/parent/latestReplyId`,schemaPath:`#/properties/nudges/items/properties/parent/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,V.errors=o,!1}var me=i===s}else var me=!0;if(me){if(n.repliers!==void 0){let e=n.repliers,i=s;if(s===i){if(Array.isArray(e)){if(e.length>4)return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers`,schemaPath:`#/properties/nudges/items/properties/parent/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`}],!1;{let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers/`+i,schemaPath:`#/properties/nudges/items/properties/parent/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.name!==void 0){let e=n.name,a=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var _e=a===s}else var _e=!0;if(_e){if(n.owner!==void 0){let e=n.owner,a=s;if(s===s){if(typeof e==`string`){if(!P.test(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var _e=a===s}else var _e=!0}}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers/`+i,schemaPath:`#/properties/nudges/items/properties/parent/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/repliers`,schemaPath:`#/properties/nudges/items/properties/parent/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var me=i===s}else var me=!0;if(me){if(n.replyCount!==void 0){let e=n.replyCount,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/replyCount`,schemaPath:`#/properties/nudges/items/properties/parent/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/replyCount`,schemaPath:`#/properties/nudges/items/properties/parent/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<0||isNaN(e))return V.errors=[{instancePath:t+`/nudges/`+r+`/parent/replyCount`,schemaPath:`#/properties/nudges/items/properties/parent/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`}],!1}var me=i===s}else var me=!0}}}}}}}}}}}}}}}else return V.errors=[{instancePath:t+`/nudges/`+r+`/parent`,schemaPath:`#/properties/nudges/items/properties/parent/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var fe=i===s}else var fe=!0;if(fe){if(e.raisedAt!==void 0){let n=e.raisedAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return V.errors=[{instancePath:t+`/nudges/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return V.errors=[{instancePath:t+`/nudges/`+r+`/raisedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var fe=i===s}else var fe=!0;if(fe){if(e.text!==void 0){let n=s;if(typeof e.text!=`string`)return V.errors=[{instancePath:t+`/nudges/`+r+`/text`,schemaPath:`#/properties/nudges/items/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var fe=n===s}else var fe=!0}}}}}}else return V.errors=[{instancePath:t+`/nudges/`+r,schemaPath:`#/properties/nudges/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return V.errors=[{instancePath:t+`/nudges`,schemaPath:`#/properties/nudges/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0}}}}}else return V.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return V.errors=o,s===0}V.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Un=Wn;function Wn(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=Wn.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.readPosition===void 0&&(n=`readPosition`))return Wn.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.readPosition!==void 0){let n=e.readPosition;if(s===s){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.channel===void 0&&(e=`channel`)||n.messageId===void 0&&(e=`messageId`)||n.thread===void 0&&(e=`thread`))return Wn.errors=[{instancePath:t+`/readPosition`,schemaPath:`#/properties/readPosition/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.channel!==void 0){let e=n.channel,r=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return Wn.errors=[{instancePath:t+`/readPosition/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return Wn.errors=[{instancePath:t+`/readPosition/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(n.messageId!==void 0){let e=n.messageId,r=s,i=s,a=!1,c=s,d=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/readPosition/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===d&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/readPosition/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/readPosition/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var u=c===s;a||=u;let f=s;if(e!==null){let e={instancePath:t+`/readPosition/messageId`,schemaPath:`#/properties/readPosition/properties/messageId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var u=f===s;if(a||=u,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/readPosition/messageId`,schemaPath:`#/properties/readPosition/properties/messageId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,Wn.errors=o,!1}var l=r===s}else var l=!0;if(l){if(n.thread!==void 0){let e=n.thread,r=s,i=s,a=!1,c=s,u=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===u&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var d=c===s;a||=d;let f=s;if(e!==null){let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/properties/readPosition/properties/thread/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var d=f===s;if(a||=d,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/readPosition/thread`,schemaPath:`#/properties/readPosition/properties/thread/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,Wn.errors=o,!1}var l=r===s}else var l=!0}}}else return Wn.errors=[{instancePath:t+`/readPosition`,schemaPath:`#/properties/readPosition/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}}else return Wn.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return Wn.errors=o,s===0}Wn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Gn=H,Kn={type:`object`,properties:{nudge:{type:`object`,properties:{channel:{type:`object`,properties:{createdAt:{$ref:`#/$defs/IsoTime`},description:{type:`string`,minLength:1,maxLength:500},name:{$ref:`#/$defs/ChannelName`}},required:[`createdAt`,`name`],additionalProperties:!0},id:{$ref:`#/$defs/NudgeId`},kind:{type:`string`,enum:[`first`,`second`]},parent:{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName_1`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},raisedAt:{$ref:`#/$defs/IsoTime`},text:{type:`string`},read:{type:`boolean`}},required:[`channel`,`id`,`kind`,`parent`,`raisedAt`,`text`,`read`],additionalProperties:!0}},required:[`nudge`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},NudgeId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},ChannelName_1:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},Harness:{type:`string`,pattern:`^[a-z0-9-]{1,40}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}};function H(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=H.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.nudge===void 0&&(n=`nudge`))return H.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.nudge!==void 0){let n=e.nudge;if(s===s){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.channel===void 0&&(e=`channel`)||n.id===void 0&&(e=`id`)||n.kind===void 0&&(e=`kind`)||n.parent===void 0&&(e=`parent`)||n.raisedAt===void 0&&(e=`raisedAt`)||n.text===void 0&&(e=`text`)||n.read===void 0&&(e=`read`))return H.errors=[{instancePath:t+`/nudge`,schemaPath:`#/properties/nudge/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.channel!==void 0){let e=n.channel,r=s;if(s===r){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.createdAt===void 0&&(n=`createdAt`)||e.name===void 0&&(n=`name`))return H.errors=[{instancePath:t+`/nudge/channel`,schemaPath:`#/properties/nudge/properties/channel/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return H.errors=[{instancePath:t+`/nudge/channel/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/channel/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(e.description!==void 0){let n=e.description,r=s;if(s===r){if(typeof n==`string`){if(n.length>500)return H.errors=[{instancePath:t+`/nudge/channel/description`,schemaPath:`#/properties/nudge/properties/channel/properties/description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`}],!1;if(n.length<1)return H.errors=[{instancePath:t+`/nudge/channel/description`,schemaPath:`#/properties/nudge/properties/channel/properties/description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return H.errors=[{instancePath:t+`/nudge/channel/description`,schemaPath:`#/properties/nudge/properties/channel/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!F.test(n))return H.errors=[{instancePath:t+`/nudge/channel/name`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/channel/name`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0}}}else return H.errors=[{instancePath:t+`/nudge/channel`,schemaPath:`#/properties/nudge/properties/channel/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var u=r===s}else var u=!0;if(u){if(n.id!==void 0){let e=n.id,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return H.errors=[{instancePath:t+`/nudge/id`,schemaPath:`#/$defs/NudgeId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return H.errors=[{instancePath:t+`/nudge/id`,schemaPath:`#/$defs/NudgeId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<-9007199254740991||isNaN(e))return H.errors=[{instancePath:t+`/nudge/id`,schemaPath:`#/$defs/NudgeId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var u=r===s}else var u=!0;if(u){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`)return H.errors=[{instancePath:t+`/nudge/kind`,schemaPath:`#/properties/nudge/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`first`&&e!==`second`)return H.errors=[{instancePath:t+`/nudge/kind`,schemaPath:`#/properties/nudge/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Kn.properties.nudge.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var u=r===s}else var u=!0;if(u){if(n.parent!==void 0){let e=n.parent,r=s;if(s===r){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.author===void 0&&(n=`author`)||e.channel===void 0&&(n=`channel`)||e.createdAt===void 0&&(n=`createdAt`)||e.id===void 0&&(n=`id`)||e.mentions===void 0&&(n=`mentions`)||e.text===void 0&&(n=`text`)||e.kind===void 0&&(n=`kind`)||e.latestReplyAt===void 0&&(n=`latestReplyAt`)||e.latestReplyId===void 0&&(n=`latestReplyId`)||e.repliers===void 0&&(n=`repliers`)||e.replyCount===void 0&&(n=`replyCount`))return H.errors=[{instancePath:t+`/nudge/parent`,schemaPath:`#/properties/nudge/properties/parent/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.author!==void 0){let n=e.author,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`))return H.errors=[{instancePath:t+`/nudge/parent/author`,schemaPath:`#/properties/nudge/properties/parent/properties/author/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return H.errors=[{instancePath:t+`/nudge/parent/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/parent/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=r===s}else var d=!0;if(d){if(n.owner!==void 0){let e=n.owner,r=s;if(s===s){if(typeof e==`string`){if(!P.test(e))return H.errors=[{instancePath:t+`/nudge/parent/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/parent/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=r===s}else var d=!0}}else return H.errors=[{instancePath:t+`/nudge/parent/author`,schemaPath:`#/properties/nudge/properties/parent/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var f=r===s}else var f=!0;if(f){if(e.channel!==void 0){let n=e.channel,r=s;if(s===s){if(typeof n==`string`){if(!F.test(n))return H.errors=[{instancePath:t+`/nudge/parent/channel`,schemaPath:`#/$defs/ChannelName_1/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/parent/channel`,schemaPath:`#/$defs/ChannelName_1/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(e.createdAt!==void 0){let n=e.createdAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return H.errors=[{instancePath:t+`/nudge/parent/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/parent/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(e.harness!==void 0){let n=e.harness,r=s;if(s===s){if(typeof n==`string`){if(!wt.test(n))return H.errors=[{instancePath:t+`/nudge/parent/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/parent/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(e.id!==void 0){let n=e.id,r=s,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return H.errors=[{instancePath:t+`/nudge/parent/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return H.errors=[{instancePath:t+`/nudge/parent/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return H.errors=[{instancePath:t+`/nudge/parent/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var f=r===s}else var f=!0;if(f){if(e.mentions!==void 0){let n=e.mentions,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return H.errors=[{instancePath:t+`/nudge/parent/mentions/`+r,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/parent/mentions/`+r,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(i!==s)break}}else return H.errors=[{instancePath:t+`/nudge/parent/mentions`,schemaPath:`#/properties/nudge/properties/parent/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var f=r===s}else var f=!0;if(f){if(e.reactions!==void 0){let n=e.reactions,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.by===void 0&&(n=`by`)||e.count===void 0&&(n=`count`)||e.reaction===void 0&&(n=`reaction`))return H.errors=[{instancePath:t+`/nudge/parent/reactions/`+r,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.by!==void 0){let n=e.by,i=s;if(s===i){if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return H.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(a!==s)break}}else return H.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/by`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var p=i===s}else var p=!0;if(p){if(e.count!==void 0){let n=e.count,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return H.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/count`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return H.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/count`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return H.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/count`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var p=i===s}else var p=!0;if(p){if(e.reaction!==void 0){let n=e.reaction,i=s;if(typeof n!=`string`)return H.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/reaction`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`thumbs_up`&&n!==`thumbs_down`)return H.errors=[{instancePath:t+`/nudge/parent/reactions/`+r+`/reaction`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Kn.properties.nudge.properties.parent.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var p=i===s}else var p=!0}}}else return H.errors=[{instancePath:t+`/nudge/parent/reactions/`+r,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return H.errors=[{instancePath:t+`/nudge/parent/reactions`,schemaPath:`#/properties/nudge/properties/parent/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var f=r===s}else var f=!0;if(f){if(e.text!==void 0){let n=e.text,r=s;if(s===r){if(typeof n==`string`){if(n.length>4e4)return H.errors=[{instancePath:t+`/nudge/parent/text`,schemaPath:`#/properties/nudge/properties/parent/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`}],!1;if(n.length<1)return H.errors=[{instancePath:t+`/nudge/parent/text`,schemaPath:`#/properties/nudge/properties/parent/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return H.errors=[{instancePath:t+`/nudge/parent/text`,schemaPath:`#/properties/nudge/properties/parent/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(e.closedAt!==void 0){let n=e.closedAt,r=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return H.errors=[{instancePath:t+`/nudge/parent/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/parent/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(e.closedBy!==void 0){let n=e.closedBy,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return H.errors=[{instancePath:t+`/nudge/parent/closedBy`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/parent/closedBy`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=r===s}else var f=!0;if(f){if(e.kind!==void 0){let n=e.kind,r=s;if(typeof n!=`string`)return H.errors=[{instancePath:t+`/nudge/parent/kind`,schemaPath:`#/properties/nudge/properties/parent/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`top-level`)return H.errors=[{instancePath:t+`/nudge/parent/kind`,schemaPath:`#/properties/nudge/properties/parent/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Kn.properties.nudge.properties.parent.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var f=r===s}else var f=!0;if(f){if(e.latestReplyAt!==void 0){let n=e.latestReplyAt,r=s,i=s,a=!1,c=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/nudge/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/nudge/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var m=c===s;a||=m;let l=s;if(n!==null){let e={instancePath:t+`/nudge/parent/latestReplyAt`,schemaPath:`#/properties/nudge/properties/parent/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var m=l===s;if(a||=m,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/nudge/parent/latestReplyAt`,schemaPath:`#/properties/nudge/properties/parent/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,H.errors=o,!1}var f=r===s}else var f=!0;if(f){if(e.latestReplyId!==void 0){let n=e.latestReplyId,r=s,i=s,a=!1,c=s,l=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/nudge/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===l&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/nudge/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<1||isNaN(n)){let e={instancePath:t+`/nudge/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var h=c===s;a||=h;let u=s;if(n!==null){let e={instancePath:t+`/nudge/parent/latestReplyId`,schemaPath:`#/properties/nudge/properties/parent/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var h=u===s;if(a||=h,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/nudge/parent/latestReplyId`,schemaPath:`#/properties/nudge/properties/parent/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,H.errors=o,!1}var f=r===s}else var f=!0;if(f){if(e.repliers!==void 0){let n=e.repliers,r=s;if(s===r){if(Array.isArray(n)){if(n.length>4)return H.errors=[{instancePath:t+`/nudge/parent/repliers`,schemaPath:`#/properties/nudge/properties/parent/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`}],!1;{let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`))return H.errors=[{instancePath:t+`/nudge/parent/repliers/`+r,schemaPath:`#/properties/nudge/properties/parent/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return H.errors=[{instancePath:t+`/nudge/parent/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/parent/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var g=i===s}else var g=!0;if(g){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n))return H.errors=[{instancePath:t+`/nudge/parent/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/parent/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var g=i===s}else var g=!0}}else return H.errors=[{instancePath:t+`/nudge/parent/repliers/`+r,schemaPath:`#/properties/nudge/properties/parent/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}}else return H.errors=[{instancePath:t+`/nudge/parent/repliers`,schemaPath:`#/properties/nudge/properties/parent/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var f=r===s}else var f=!0;if(f){if(e.replyCount!==void 0){let n=e.replyCount,r=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return H.errors=[{instancePath:t+`/nudge/parent/replyCount`,schemaPath:`#/properties/nudge/properties/parent/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===r&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return H.errors=[{instancePath:t+`/nudge/parent/replyCount`,schemaPath:`#/properties/nudge/properties/parent/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<0||isNaN(n))return H.errors=[{instancePath:t+`/nudge/parent/replyCount`,schemaPath:`#/properties/nudge/properties/parent/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`}],!1}var f=r===s}else var f=!0}}}}}}}}}}}}}}}else return H.errors=[{instancePath:t+`/nudge/parent`,schemaPath:`#/properties/nudge/properties/parent/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var u=r===s}else var u=!0;if(u){if(n.raisedAt!==void 0){let e=n.raisedAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return H.errors=[{instancePath:t+`/nudge/raisedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return H.errors=[{instancePath:t+`/nudge/raisedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.text!==void 0){let e=s;if(typeof n.text!=`string`)return H.errors=[{instancePath:t+`/nudge/text`,schemaPath:`#/properties/nudge/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var u=e===s}else var u=!0;if(u){if(n.read!==void 0){let e=s;if(typeof n.read!=`boolean`)return H.errors=[{instancePath:t+`/nudge/read`,schemaPath:`#/properties/nudge/properties/read/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var u=e===s}else var u=!0}}}}}}}else return H.errors=[{instancePath:t+`/nudge`,schemaPath:`#/properties/nudge/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}}else return H.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return H.errors=o,s===0}H.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var qn=Yn,Jn={type:`object`,properties:{alert:{type:`object`,properties:{agent:{$ref:`#/$defs/IdentityName`},backOnlineAt:{$ref:`#/$defs/IsoTime`},id:{$ref:`#/$defs/OfflineAlertId`},offlineReason:{type:`string`,enum:[`left`,`session revoked`,`session expired`,`token rotated`,`deactivated`,`connection lost`]},raisedAt:{$ref:`#/$defs/IsoTime`},read:{type:`boolean`}},required:[`agent`,`id`,`offlineReason`,`raisedAt`,`read`],additionalProperties:!0}},required:[`alert`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},OfflineAlertId:{type:`integer`,minimum:-9007199254740991,maximum:9007199254740991}}};function Yn(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=Yn.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.alert===void 0&&(n=`alert`))return Yn.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.alert!==void 0){let n=e.alert;if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.agent===void 0&&(e=`agent`)||n.id===void 0&&(e=`id`)||n.offlineReason===void 0&&(e=`offlineReason`)||n.raisedAt===void 0&&(e=`raisedAt`)||n.read===void 0&&(e=`read`))return Yn.errors=[{instancePath:t+`/alert`,schemaPath:`#/properties/alert/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.agent!==void 0){let e=n.agent;if(typeof e==`string`){if(!j.test(e))return Yn.errors=[{instancePath:t+`/alert/agent`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return Yn.errors=[{instancePath:t+`/alert/agent`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.backOnlineAt!==void 0){let e=n.backOnlineAt;if(typeof e==`string`){if(!A.test(e))return Yn.errors=[{instancePath:t+`/alert/backOnlineAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Yn.errors=[{instancePath:t+`/alert/backOnlineAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.id!==void 0){let e=n.id;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return Yn.errors=[{instancePath:t+`/alert/id`,schemaPath:`#/$defs/OfflineAlertId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return Yn.errors=[{instancePath:t+`/alert/id`,schemaPath:`#/$defs/OfflineAlertId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<-9007199254740991||isNaN(e))return Yn.errors=[{instancePath:t+`/alert/id`,schemaPath:`#/$defs/OfflineAlertId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:-9007199254740991},message:`must be >= -9007199254740991`}],!1}var s=!0}else var s=!0;if(s){if(n.offlineReason!==void 0){let e=n.offlineReason;if(typeof e!=`string`)return Yn.errors=[{instancePath:t+`/alert/offlineReason`,schemaPath:`#/properties/alert/properties/offlineReason/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`left`&&e!==`session revoked`&&e!==`session expired`&&e!==`token rotated`&&e!==`deactivated`&&e!==`connection lost`)return Yn.errors=[{instancePath:t+`/alert/offlineReason`,schemaPath:`#/properties/alert/properties/offlineReason/enum`,keyword:`enum`,params:{allowedValues:Jn.properties.alert.properties.offlineReason.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0}else var s=!0;if(s){if(n.raisedAt!==void 0){let e=n.raisedAt;if(typeof e==`string`){if(!A.test(e))return Yn.errors=[{instancePath:t+`/alert/raisedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return Yn.errors=[{instancePath:t+`/alert/raisedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.read!==void 0){if(typeof n.read!=`boolean`)return Yn.errors=[{instancePath:t+`/alert/read`,schemaPath:`#/properties/alert/properties/read/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0}else var s=!0}}}}}}else return Yn.errors=[{instancePath:t+`/alert`,schemaPath:`#/properties/alert/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return Yn.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return Yn.errors=null,!0}Yn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Xn=Zn;function Zn(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=Zn.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.readPositions===void 0&&(n=`readPositions`))return Zn.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.readPositions!==void 0){let n=e.readPositions;if(s===s){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.channel===void 0&&(n=`channel`)||e.messageId===void 0&&(n=`messageId`)||e.thread===void 0&&(n=`thread`))return Zn.errors=[{instancePath:t+`/readPositions/`+r,schemaPath:`#/properties/readPositions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.channel!==void 0){let n=e.channel,i=s;if(s===s){if(typeof n==`string`){if(!F.test(n))return Zn.errors=[{instancePath:t+`/readPositions/`+r+`/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return Zn.errors=[{instancePath:t+`/readPositions/`+r+`/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=i===s}else var l=!0;if(l){if(e.messageId!==void 0){let n=e.messageId,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return Zn.errors=[{instancePath:t+`/readPositions/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return Zn.errors=[{instancePath:t+`/readPositions/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return Zn.errors=[{instancePath:t+`/readPositions/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var l=i===s}else var l=!0;if(l){if(e.thread!==void 0){let n=e.thread,i=s,a=s,c=!1,d=s,f=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/readPositions/`+r+`/thread`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===f&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/readPositions/`+r+`/thread`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<1||isNaN(n)){let e={instancePath:t+`/readPositions/`+r+`/thread`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var u=d===s;c||=u;let p=s;if(n!==null){let e={instancePath:t+`/readPositions/`+r+`/thread`,schemaPath:`#/properties/readPositions/items/properties/thread/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var u=p===s;if(c||=u,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/readPositions/`+r+`/thread`,schemaPath:`#/properties/readPositions/items/properties/thread/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,Zn.errors=o,!1}var l=i===s}else var l=!0}}}else return Zn.errors=[{instancePath:t+`/readPositions/`+r,schemaPath:`#/properties/readPositions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return Zn.errors=[{instancePath:t+`/readPositions`,schemaPath:`#/properties/readPositions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}}}else return Zn.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return Zn.errors=o,s===0}Zn.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Qn=$n;function $n(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=$n.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.channel===void 0&&(n=`channel`)||e.subscribed===void 0&&(n=`subscribed`))return $n.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.channel!==void 0){let n=e.channel;if(typeof n==`string`){if(!F.test(n))return $n.errors=[{instancePath:t+`/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return $n.errors=[{instancePath:t+`/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.subscribed!==void 0){if(typeof e.subscribed!=`boolean`)return $n.errors=[{instancePath:t+`/subscribed`,schemaPath:`#/properties/subscribed/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0}else var s=!0}}else return $n.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return $n.errors=null,!0}$n.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var er=nr,tr={anyOf:[{type:`object`,properties:{status:{type:`string`,enum:[`pending`]}},required:[`status`],additionalProperties:!0},{type:`object`,properties:{identity:{anyOf:[{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},displayName:{$ref:`#/$defs/DisplayName`},kind:{type:`string`,enum:[`human`]},name:{$ref:`#/$defs/IdentityName`}},required:[`admin`,`createdAt`,`kind`,`name`],additionalProperties:!0},{type:`object`,properties:{admin:{type:`boolean`},createdAt:{$ref:`#/$defs/IsoTime`},deactivated:{type:`boolean`,enum:[!0]},description:{$ref:`#/$defs/Description`},displayName:{$ref:`#/$defs/DisplayName`},handler:{type:`boolean`,enum:[!0]},kind:{type:`string`,enum:[`agent`]},name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`admin`,`createdAt`,`kind`,`name`,`owner`],additionalProperties:!0}]},status:{type:`string`,enum:[`approved`]},token:{$ref:`#/$defs/Token`}},required:[`identity`,`status`,`token`],additionalProperties:!0}],$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},DisplayName:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:80},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Description:{type:`string`,pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`,minLength:1,maxLength:500},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},Token:{type:`string`}}};function nr(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=nr.evaluated;c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0);let l=s,u=!1,d=s;if(s===d){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.status===void 0&&(n=`status`)){let e={instancePath:t,schemaPath:`#/anyOf/0/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else if(e.status!==void 0){let n=e.status;if(typeof n!=`string`){let e={instancePath:t+`/status`,schemaPath:`#/anyOf/0/properties/status/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`pending`){let e={instancePath:t+`/status`,schemaPath:`#/anyOf/0/properties/status/enum`,keyword:`enum`,params:{allowedValues:tr.anyOf[0].properties.status.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}}}else{let e={instancePath:t,schemaPath:`#/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var f=d===s;if(u||=f,f)var p=!0;let m=s;if(s===m){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.identity===void 0&&(n=`identity`)||e.status===void 0&&(n=`status`)||e.token===void 0&&(n=`token`)){let e={instancePath:t,schemaPath:`#/anyOf/1/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.identity!==void 0){let n=e.identity,r=s,i=s,a=!1,c=s;if(s===c){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)){let n={instancePath:t+`/identity`,schemaPath:`#/anyOf/1/properties/identity/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/identity/admin`,schemaPath:`#/anyOf/1/properties/identity/anyOf/0/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var h=e===s}else var h=!0;if(h){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=r===s}else var h=!0;if(h){if(n.deactivated!==void 0){let e=n.deactivated,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/anyOf/1/properties/identity/anyOf/0/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/anyOf/1/properties/identity/anyOf/0/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:tr.anyOf[1].properties.identity.anyOf[0].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var h=r===s}else var h=!0;if(h){if(n.displayName!==void 0){let e=n.displayName,r=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=r===s}else var h=!0;if(h){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/anyOf/1/properties/identity/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`human`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/anyOf/1/properties/identity/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:tr.anyOf[1].properties.identity.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var h=r===s}else var h=!0;if(h){if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=r===s}else var h=!0}}}}}}}else{let e={instancePath:t+`/identity`,schemaPath:`#/anyOf/1/properties/identity/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var g=c===s;if(a||=g,g)var _=!0;let l=s;if(s===l){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.admin===void 0&&(e=`admin`)||n.createdAt===void 0&&(e=`createdAt`)||n.kind===void 0&&(e=`kind`)||n.name===void 0&&(e=`name`)||n.owner===void 0&&(e=`owner`)){let n={instancePath:t+`/identity`,schemaPath:`#/anyOf/1/properties/identity/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.admin!==void 0){let e=s;if(typeof n.admin!=`boolean`){let e={instancePath:t+`/identity/admin`,schemaPath:`#/anyOf/1/properties/identity/anyOf/1/properties/admin/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}var v=e===s}else var v=!0;if(v){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.deactivated!==void 0){let e=n.deactivated,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/anyOf/1/properties/identity/anyOf/1/properties/deactivated/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/deactivated`,schemaPath:`#/anyOf/1/properties/identity/anyOf/1/properties/deactivated/enum`,keyword:`enum`,params:{allowedValues:tr.anyOf[1].properties.identity.anyOf[1].properties.deactivated.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var v=r===s}else var v=!0;if(v){if(n.description!==void 0){let e=n.description,r=s;if(s===s){if(typeof e==`string`){if(e.length>500){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/maxLength`,keyword:`maxLength`,params:{limit:500},message:`must NOT have more than 500 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/description`,schemaPath:`#/$defs/Description/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.displayName!==void 0){let e=n.displayName,r=s;if(s===s){if(typeof e==`string`){if(e.length>80){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/maxLength`,keyword:`maxLength`,params:{limit:80},message:`must NOT have more than 80 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}else if(!N.test(e)){let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/pattern`,keyword:`pattern`,params:{pattern:`^\\S[\\s\\S]*\\S$|^\\S$|^$`},message:`must match pattern "^\\S[\\s\\S]*\\S$|^\\S$|^$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/displayName`,schemaPath:`#/$defs/DisplayName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.handler!==void 0){let e=n.handler,r=s;if(typeof e!=`boolean`){let e={instancePath:t+`/identity/handler`,schemaPath:`#/anyOf/1/properties/identity/anyOf/1/properties/handler/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`};o===null?o=[e]:o.push(e),s++}if(e!==!0){let e={instancePath:t+`/identity/handler`,schemaPath:`#/anyOf/1/properties/identity/anyOf/1/properties/handler/enum`,keyword:`enum`,params:{allowedValues:tr.anyOf[1].properties.identity.anyOf[1].properties.handler.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var v=r===s}else var v=!0;if(v){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/anyOf/1/properties/identity/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`agent`){let e={instancePath:t+`/identity/kind`,schemaPath:`#/anyOf/1/properties/identity/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:tr.anyOf[1].properties.identity.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var v=r===s}else var v=!0;if(v){if(n.name!==void 0){let e=n.name,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.owner!==void 0){let e=n.owner,r=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/identity/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0}}}}}}}}}}else{let e={instancePath:t+`/identity`,schemaPath:`#/anyOf/1/properties/identity/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var g=l===s;if(a||=g,g&&_!==!0&&(_=!0),a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/identity`,schemaPath:`#/anyOf/1/properties/identity/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};o===null?o=[e]:o.push(e),s++}var y=r===s}else var y=!0;if(y){if(e.status!==void 0){let n=e.status,r=s;if(typeof n!=`string`){let e={instancePath:t+`/status`,schemaPath:`#/anyOf/1/properties/status/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(n!==`approved`){let e={instancePath:t+`/status`,schemaPath:`#/anyOf/1/properties/status/enum`,keyword:`enum`,params:{allowedValues:tr.anyOf[1].properties.status.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var y=r===s}else var y=!0;if(y){if(e.token!==void 0){let n=s;if(typeof e.token!=`string`){let e={instancePath:t+`/token`,schemaPath:`#/$defs/Token/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}var y=n===s}else var y=!0}}}}else{let e={instancePath:t,schemaPath:`#/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var f=m===s;if(u||=f,f&&p!==!0&&(p=!0),u)s=l,o!==null&&(l?o.length=l:o=null);else{let e={instancePath:t,schemaPath:`#/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,nr.errors=o,!1}return nr.errors=o,c.props=p,s===0}nr.evaluated={dynamicProps:!0,dynamicItems:!1};var rr=ir;function ir(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=ir.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.loginRequest===void 0&&(n=`loginRequest`))return ir.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.loginRequest!==void 0){let n=e.loginRequest;if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.approved===void 0&&(e=`approved`)||n.expiresAt===void 0&&(e=`expiresAt`)||n.host===void 0&&(e=`host`)||n.userCode===void 0&&(e=`userCode`))return ir.errors=[{instancePath:t+`/loginRequest`,schemaPath:`#/properties/loginRequest/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.approved!==void 0){if(typeof n.approved!=`boolean`)return ir.errors=[{instancePath:t+`/loginRequest/approved`,schemaPath:`#/properties/loginRequest/properties/approved/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0}else var s=!0;if(s){if(n.expiresAt!==void 0){let e=n.expiresAt;if(typeof e==`string`){if(!A.test(e))return ir.errors=[{instancePath:t+`/loginRequest/expiresAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return ir.errors=[{instancePath:t+`/loginRequest/expiresAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.host!==void 0){if(typeof n.host!=`string`)return ir.errors=[{instancePath:t+`/loginRequest/host`,schemaPath:`#/properties/loginRequest/properties/host/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(n.userCode!==void 0){let e=n.userCode;if(typeof e==`string`){if(!ve.test(e))return ir.errors=[{instancePath:t+`/loginRequest/userCode`,schemaPath:`#/properties/loginRequest/properties/userCode/pattern`,keyword:`pattern`,params:{pattern:`^[A-Z0-9]{4}-[A-Z0-9]{4}$`},message:`must match pattern "^[A-Z0-9]{4}-[A-Z0-9]{4}$"`}],!1}else return ir.errors=[{instancePath:t+`/loginRequest/userCode`,schemaPath:`#/properties/loginRequest/properties/userCode/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}}else return ir.errors=[{instancePath:t+`/loginRequest`,schemaPath:`#/properties/loginRequest/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return ir.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return ir.errors=null,!0}ir.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var ar=or;function or(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=or.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.approvalPath===void 0&&(n=`approvalPath`)||e.expiresAt===void 0&&(n=`expiresAt`)||e.requestId===void 0&&(n=`requestId`)||e.userCode===void 0&&(n=`userCode`))return or.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.approvalPath!==void 0){if(typeof e.approvalPath!=`string`)return or.errors=[{instancePath:t+`/approvalPath`,schemaPath:`#/properties/approvalPath/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.expiresAt!==void 0){let n=e.expiresAt;if(typeof n==`string`){if(!A.test(n))return or.errors=[{instancePath:t+`/expiresAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return or.errors=[{instancePath:t+`/expiresAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.requestId!==void 0){if(typeof e.requestId!=`string`)return or.errors=[{instancePath:t+`/requestId`,schemaPath:`#/$defs/Token/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.userCode!==void 0){let n=e.userCode;if(typeof n==`string`){if(!ve.test(n))return or.errors=[{instancePath:t+`/userCode`,schemaPath:`#/properties/userCode/pattern`,keyword:`pattern`,params:{pattern:`^[A-Z0-9]{4}-[A-Z0-9]{4}$`},message:`must match pattern "^[A-Z0-9]{4}-[A-Z0-9]{4}$"`}],!1}else return or.errors=[{instancePath:t+`/userCode`,schemaPath:`#/properties/userCode/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0}}}}else return or.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return or.errors=null,!0}or.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var sr=cr;function cr(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=cr.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.revoked===void 0&&(n=`revoked`))return cr.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.revoked!==void 0&&typeof e.revoked!=`boolean`)return cr.errors=[{instancePath:t+`/revoked`,schemaPath:`#/properties/revoked/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1}else return cr.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return cr.errors=null,!0}cr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var lr=U,ur={type:`object`,properties:{hasMore:{type:`boolean`},messages:{type:`array`,items:{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0}},receipts:{type:`array`,items:{type:`object`,properties:{identity:{$ref:`#/$defs/IdentityName`},messageId:{$ref:`#/$defs/MessageId`},seen:{type:`boolean`},seenAt:{$ref:`#/$defs/IsoTime`}},required:[`identity`,`messageId`,`seen`],additionalProperties:!0}}},required:[`hasMore`,`messages`,`receipts`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},Harness:{type:`string`,pattern:`^[a-z0-9-]{1,40}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}};function U(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=U.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.hasMore===void 0&&(n=`hasMore`)||e.messages===void 0&&(n=`messages`)||e.receipts===void 0&&(n=`receipts`))return U.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.hasMore!==void 0){let n=s;if(typeof e.hasMore!=`boolean`)return U.errors=[{instancePath:t+`/hasMore`,schemaPath:`#/properties/hasMore/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var l=n===s}else var l=!0;if(l){if(e.messages!==void 0){let n=e.messages,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.author===void 0&&(n=`author`)||e.channel===void 0&&(n=`channel`)||e.createdAt===void 0&&(n=`createdAt`)||e.id===void 0&&(n=`id`)||e.mentions===void 0&&(n=`mentions`)||e.text===void 0&&(n=`text`)||e.kind===void 0&&(n=`kind`)||e.latestReplyAt===void 0&&(n=`latestReplyAt`)||e.latestReplyId===void 0&&(n=`latestReplyId`)||e.repliers===void 0&&(n=`repliers`)||e.replyCount===void 0&&(n=`replyCount`))return U.errors=[{instancePath:t+`/messages/`+r,schemaPath:`#/properties/messages/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.author!==void 0){let n=e.author,i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`))return U.errors=[{instancePath:t+`/messages/`+r+`/author`,schemaPath:`#/properties/messages/items/properties/author/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return U.errors=[{instancePath:t+`/messages/`+r+`/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return U.errors=[{instancePath:t+`/messages/`+r+`/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=i===s}else var u=!0;if(u){if(n.owner!==void 0){let e=n.owner,i=s;if(s===s){if(typeof e==`string`){if(!P.test(e))return U.errors=[{instancePath:t+`/messages/`+r+`/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return U.errors=[{instancePath:t+`/messages/`+r+`/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=i===s}else var u=!0}}else return U.errors=[{instancePath:t+`/messages/`+r+`/author`,schemaPath:`#/properties/messages/items/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var d=i===s}else var d=!0;if(d){if(e.channel!==void 0){let n=e.channel,i=s;if(s===s){if(typeof n==`string`){if(!F.test(n))return U.errors=[{instancePath:t+`/messages/`+r+`/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return U.errors=[{instancePath:t+`/messages/`+r+`/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=i===s}else var d=!0;if(d){if(e.createdAt!==void 0){let n=e.createdAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return U.errors=[{instancePath:t+`/messages/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return U.errors=[{instancePath:t+`/messages/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=i===s}else var d=!0;if(d){if(e.harness!==void 0){let n=e.harness,i=s;if(s===s){if(typeof n==`string`){if(!wt.test(n))return U.errors=[{instancePath:t+`/messages/`+r+`/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`}],!1}else return U.errors=[{instancePath:t+`/messages/`+r+`/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=i===s}else var d=!0;if(d){if(e.id!==void 0){let n=e.id,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return U.errors=[{instancePath:t+`/messages/`+r+`/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return U.errors=[{instancePath:t+`/messages/`+r+`/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return U.errors=[{instancePath:t+`/messages/`+r+`/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var d=i===s}else var d=!0;if(d){if(e.mentions!==void 0){let n=e.mentions,i=s;if(s===i){if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return U.errors=[{instancePath:t+`/messages/`+r+`/mentions/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return U.errors=[{instancePath:t+`/messages/`+r+`/mentions/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(a!==s)break}}else return U.errors=[{instancePath:t+`/messages/`+r+`/mentions`,schemaPath:`#/properties/messages/items/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var d=i===s}else var d=!0;if(d){if(e.reactions!==void 0){let n=e.reactions,i=s;if(s===i){if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(s===a){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.by===void 0&&(n=`by`)||e.count===void 0&&(n=`count`)||e.reaction===void 0&&(n=`reaction`))return U.errors=[{instancePath:t+`/messages/`+r+`/reactions/`+i,schemaPath:`#/properties/messages/items/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.by!==void 0){let n=e.by,a=s;if(s===a){if(Array.isArray(n)){let e=n.length;for(let a=0;a<e;a++){let e=n[a],o=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return U.errors=[{instancePath:t+`/messages/`+r+`/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return U.errors=[{instancePath:t+`/messages/`+r+`/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(o!==s)break}}else return U.errors=[{instancePath:t+`/messages/`+r+`/reactions/`+i+`/by`,schemaPath:`#/properties/messages/items/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var f=a===s}else var f=!0;if(f){if(e.count!==void 0){let n=e.count,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return U.errors=[{instancePath:t+`/messages/`+r+`/reactions/`+i+`/count`,schemaPath:`#/properties/messages/items/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return U.errors=[{instancePath:t+`/messages/`+r+`/reactions/`+i+`/count`,schemaPath:`#/properties/messages/items/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return U.errors=[{instancePath:t+`/messages/`+r+`/reactions/`+i+`/count`,schemaPath:`#/properties/messages/items/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var f=a===s}else var f=!0;if(f){if(e.reaction!==void 0){let n=e.reaction,a=s;if(typeof n!=`string`)return U.errors=[{instancePath:t+`/messages/`+r+`/reactions/`+i+`/reaction`,schemaPath:`#/properties/messages/items/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`thumbs_up`&&n!==`thumbs_down`)return U.errors=[{instancePath:t+`/messages/`+r+`/reactions/`+i+`/reaction`,schemaPath:`#/properties/messages/items/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:ur.properties.messages.items.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var f=a===s}else var f=!0}}}else return U.errors=[{instancePath:t+`/messages/`+r+`/reactions/`+i,schemaPath:`#/properties/messages/items/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}else return U.errors=[{instancePath:t+`/messages/`+r+`/reactions`,schemaPath:`#/properties/messages/items/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var d=i===s}else var d=!0;if(d){if(e.text!==void 0){let n=e.text,i=s;if(s===i){if(typeof n==`string`){if(n.length>4e4)return U.errors=[{instancePath:t+`/messages/`+r+`/text`,schemaPath:`#/properties/messages/items/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`}],!1;if(n.length<1)return U.errors=[{instancePath:t+`/messages/`+r+`/text`,schemaPath:`#/properties/messages/items/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return U.errors=[{instancePath:t+`/messages/`+r+`/text`,schemaPath:`#/properties/messages/items/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=i===s}else var d=!0;if(d){if(e.closedAt!==void 0){let n=e.closedAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return U.errors=[{instancePath:t+`/messages/`+r+`/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return U.errors=[{instancePath:t+`/messages/`+r+`/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=i===s}else var d=!0;if(d){if(e.closedBy!==void 0){let n=e.closedBy,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return U.errors=[{instancePath:t+`/messages/`+r+`/closedBy`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return U.errors=[{instancePath:t+`/messages/`+r+`/closedBy`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=i===s}else var d=!0;if(d){if(e.kind!==void 0){let n=e.kind,i=s;if(typeof n!=`string`)return U.errors=[{instancePath:t+`/messages/`+r+`/kind`,schemaPath:`#/properties/messages/items/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`top-level`)return U.errors=[{instancePath:t+`/messages/`+r+`/kind`,schemaPath:`#/properties/messages/items/properties/kind/enum`,keyword:`enum`,params:{allowedValues:ur.properties.messages.items.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var d=i===s}else var d=!0;if(d){if(e.latestReplyAt!==void 0){let n=e.latestReplyAt,i=s,a=s,c=!1,l=s;if(s===s){if(typeof n==`string`){if(!A.test(n)){let e={instancePath:t+`/messages/`+r+`/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/messages/`+r+`/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var p=l===s;c||=p;let u=s;if(n!==null){let e={instancePath:t+`/messages/`+r+`/latestReplyAt`,schemaPath:`#/properties/messages/items/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var p=u===s;if(c||=p,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/messages/`+r+`/latestReplyAt`,schemaPath:`#/properties/messages/items/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,U.errors=o,!1}var d=i===s}else var d=!0;if(d){if(e.latestReplyId!==void 0){let n=e.latestReplyId,i=s,a=s,c=!1,l=s,u=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n)){let e={instancePath:t+`/messages/`+r+`/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===u&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n)){let e={instancePath:t+`/messages/`+r+`/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(n<1||isNaN(n)){let e={instancePath:t+`/messages/`+r+`/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var m=l===s;c||=m;let f=s;if(n!==null){let e={instancePath:t+`/messages/`+r+`/latestReplyId`,schemaPath:`#/properties/messages/items/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var m=f===s;if(c||=m,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/messages/`+r+`/latestReplyId`,schemaPath:`#/properties/messages/items/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,U.errors=o,!1}var d=i===s}else var d=!0;if(d){if(e.repliers!==void 0){let n=e.repliers,i=s;if(s===i){if(Array.isArray(n)){if(n.length>4)return U.errors=[{instancePath:t+`/messages/`+r+`/repliers`,schemaPath:`#/properties/messages/items/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`}],!1;{let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(s===a){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`))return U.errors=[{instancePath:t+`/messages/`+r+`/repliers/`+i,schemaPath:`#/properties/messages/items/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.name!==void 0){let n=e.name,a=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return U.errors=[{instancePath:t+`/messages/`+r+`/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return U.errors=[{instancePath:t+`/messages/`+r+`/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var h=a===s}else var h=!0;if(h){if(e.owner!==void 0){let n=e.owner,a=s;if(s===s){if(typeof n==`string`){if(!P.test(n))return U.errors=[{instancePath:t+`/messages/`+r+`/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return U.errors=[{instancePath:t+`/messages/`+r+`/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var h=a===s}else var h=!0}}else return U.errors=[{instancePath:t+`/messages/`+r+`/repliers/`+i,schemaPath:`#/properties/messages/items/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}}else return U.errors=[{instancePath:t+`/messages/`+r+`/repliers`,schemaPath:`#/properties/messages/items/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var d=i===s}else var d=!0;if(d){if(e.replyCount!==void 0){let n=e.replyCount,i=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return U.errors=[{instancePath:t+`/messages/`+r+`/replyCount`,schemaPath:`#/properties/messages/items/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return U.errors=[{instancePath:t+`/messages/`+r+`/replyCount`,schemaPath:`#/properties/messages/items/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<0||isNaN(n))return U.errors=[{instancePath:t+`/messages/`+r+`/replyCount`,schemaPath:`#/properties/messages/items/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`}],!1}var d=i===s}else var d=!0}}}}}}}}}}}}}}}else return U.errors=[{instancePath:t+`/messages/`+r,schemaPath:`#/properties/messages/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return U.errors=[{instancePath:t+`/messages`,schemaPath:`#/properties/messages/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var l=r===s}else var l=!0;if(l){if(e.receipts!==void 0){let n=e.receipts,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.identity===void 0&&(n=`identity`)||e.messageId===void 0&&(n=`messageId`)||e.seen===void 0&&(n=`seen`))return U.errors=[{instancePath:t+`/receipts/`+r,schemaPath:`#/properties/receipts/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.identity!==void 0){let n=e.identity,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return U.errors=[{instancePath:t+`/receipts/`+r+`/identity`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return U.errors=[{instancePath:t+`/receipts/`+r+`/identity`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var g=i===s}else var g=!0;if(g){if(e.messageId!==void 0){let n=e.messageId,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return U.errors=[{instancePath:t+`/receipts/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return U.errors=[{instancePath:t+`/receipts/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return U.errors=[{instancePath:t+`/receipts/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var g=i===s}else var g=!0;if(g){if(e.seen!==void 0){let n=s;if(typeof e.seen!=`boolean`)return U.errors=[{instancePath:t+`/receipts/`+r+`/seen`,schemaPath:`#/properties/receipts/items/properties/seen/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var g=n===s}else var g=!0;if(g){if(e.seenAt!==void 0){let n=e.seenAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return U.errors=[{instancePath:t+`/receipts/`+r+`/seenAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return U.errors=[{instancePath:t+`/receipts/`+r+`/seenAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var g=i===s}else var g=!0}}}}else return U.errors=[{instancePath:t+`/receipts/`+r,schemaPath:`#/properties/receipts/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return U.errors=[{instancePath:t+`/receipts`,schemaPath:`#/properties/receipts/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var l=r===s}else var l=!0}}}else return U.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return U.errors=o,s===0}U.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var dr=W,fr={type:`object`,properties:{cursor:{anyOf:[{type:`string`},{type:`null`}]},hasMore:{type:`boolean`},threads:{type:`array`,items:{type:`object`,properties:{lastActivityAt:{$ref:`#/$defs/IsoTime`},message:{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0}},required:[`lastActivityAt`,`message`],additionalProperties:!0}}},required:[`cursor`,`hasMore`,`threads`],additionalProperties:!0,$defs:{IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},Harness:{type:`string`,pattern:`^[a-z0-9-]{1,40}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}};function W(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=W.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.cursor===void 0&&(n=`cursor`)||e.hasMore===void 0&&(n=`hasMore`)||e.threads===void 0&&(n=`threads`))return W.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.cursor!==void 0){let n=e.cursor,r=s,i=s,a=!1,c=s;if(typeof n!=`string`){let e={instancePath:t+`/cursor`,schemaPath:`#/properties/cursor/anyOf/0/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}var l=c===s;a||=l;let d=s;if(n!==null){let e={instancePath:t+`/cursor`,schemaPath:`#/properties/cursor/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var l=d===s;if(a||=l,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/cursor`,schemaPath:`#/properties/cursor/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,W.errors=o,!1}var u=r===s}else var u=!0;if(u){if(e.hasMore!==void 0){let n=s;if(typeof e.hasMore!=`boolean`)return W.errors=[{instancePath:t+`/hasMore`,schemaPath:`#/properties/hasMore/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var u=n===s}else var u=!0;if(u){if(e.threads!==void 0){let n=e.threads,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.lastActivityAt===void 0&&(n=`lastActivityAt`)||e.message===void 0&&(n=`message`))return W.errors=[{instancePath:t+`/threads/`+r,schemaPath:`#/properties/threads/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.lastActivityAt!==void 0){let n=e.lastActivityAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return W.errors=[{instancePath:t+`/threads/`+r+`/lastActivityAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return W.errors=[{instancePath:t+`/threads/`+r+`/lastActivityAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var d=i===s}else var d=!0;if(d){if(e.message!==void 0){let n=e.message,i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.latestReplyAt===void 0&&(e=`latestReplyAt`)||n.latestReplyId===void 0&&(e=`latestReplyId`)||n.repliers===void 0&&(e=`repliers`)||n.replyCount===void 0&&(e=`replyCount`))return W.errors=[{instancePath:t+`/threads/`+r+`/message`,schemaPath:`#/properties/threads/items/properties/message/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.author!==void 0){let e=n.author,i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`))return W.errors=[{instancePath:t+`/threads/`+r+`/message/author`,schemaPath:`#/properties/threads/items/properties/message/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.name!==void 0){let n=e.name,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return W.errors=[{instancePath:t+`/threads/`+r+`/message/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=i===s}else var f=!0;if(f){if(e.owner!==void 0){let n=e.owner,i=s;if(s===s){if(typeof n==`string`){if(!P.test(n))return W.errors=[{instancePath:t+`/threads/`+r+`/message/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var f=i===s}else var f=!0}}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/author`,schemaPath:`#/properties/threads/items/properties/message/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var p=i===s}else var p=!0;if(p){if(n.channel!==void 0){let e=n.channel,i=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var p=i===s}else var p=!0;if(p){if(n.createdAt!==void 0){let e=n.createdAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var p=i===s}else var p=!0;if(p){if(n.harness!==void 0){let e=n.harness,i=s;if(s===s){if(typeof e==`string`){if(!wt.test(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`}],!1}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var p=i===s}else var p=!0;if(p){if(n.id!==void 0){let e=n.id,i=s,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var p=i===s}else var p=!0;if(p){if(n.mentions!==void 0){let e=n.mentions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return W.errors=[{instancePath:t+`/threads/`+r+`/message/mentions/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/mentions/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(a!==s)break}}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/mentions`,schemaPath:`#/properties/threads/items/properties/message/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var p=i===s}else var p=!0;if(p){if(n.reactions!==void 0){let e=n.reactions,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`))return W.errors=[{instancePath:t+`/threads/`+r+`/message/reactions/`+i,schemaPath:`#/properties/threads/items/properties/message/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.by!==void 0){let e=n.by,a=s;if(s===a){if(Array.isArray(e)){let n=e.length;for(let a=0;a<n;a++){let n=e[a],o=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return W.errors=[{instancePath:t+`/threads/`+r+`/message/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(o!==s)break}}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/reactions/`+i+`/by`,schemaPath:`#/properties/threads/items/properties/message/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var m=a===s}else var m=!0;if(m){if(n.count!==void 0){let e=n.count,a=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/threads/items/properties/message/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/threads/items/properties/message/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/reactions/`+i+`/count`,schemaPath:`#/properties/threads/items/properties/message/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var m=a===s}else var m=!0;if(m){if(n.reaction!==void 0){let e=n.reaction,a=s;if(typeof e!=`string`)return W.errors=[{instancePath:t+`/threads/`+r+`/message/reactions/`+i+`/reaction`,schemaPath:`#/properties/threads/items/properties/message/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`thumbs_up`&&e!==`thumbs_down`)return W.errors=[{instancePath:t+`/threads/`+r+`/message/reactions/`+i+`/reaction`,schemaPath:`#/properties/threads/items/properties/message/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:fr.properties.threads.items.properties.message.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var m=a===s}else var m=!0}}}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/reactions/`+i,schemaPath:`#/properties/threads/items/properties/message/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/reactions`,schemaPath:`#/properties/threads/items/properties/message/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var p=i===s}else var p=!0;if(p){if(n.text!==void 0){let e=n.text,i=s;if(s===i){if(typeof e==`string`){if(e.length>4e4)return W.errors=[{instancePath:t+`/threads/`+r+`/message/text`,schemaPath:`#/properties/threads/items/properties/message/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`}],!1;if(e.length<1)return W.errors=[{instancePath:t+`/threads/`+r+`/message/text`,schemaPath:`#/properties/threads/items/properties/message/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/text`,schemaPath:`#/properties/threads/items/properties/message/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var p=i===s}else var p=!0;if(p){if(n.closedAt!==void 0){let e=n.closedAt,i=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var p=i===s}else var p=!0;if(p){if(n.closedBy!==void 0){let e=n.closedBy,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/closedBy`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/closedBy`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var p=i===s}else var p=!0;if(p){if(n.kind!==void 0){let e=n.kind,i=s;if(typeof e!=`string`)return W.errors=[{instancePath:t+`/threads/`+r+`/message/kind`,schemaPath:`#/properties/threads/items/properties/message/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`top-level`)return W.errors=[{instancePath:t+`/threads/`+r+`/message/kind`,schemaPath:`#/properties/threads/items/properties/message/properties/kind/enum`,keyword:`enum`,params:{allowedValues:fr.properties.threads.items.properties.message.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var p=i===s}else var p=!0;if(p){if(n.latestReplyAt!==void 0){let e=n.latestReplyAt,i=s,a=s,c=!1,l=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/threads/`+r+`/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/threads/`+r+`/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var h=l===s;c||=h;let u=s;if(e!==null){let e={instancePath:t+`/threads/`+r+`/message/latestReplyAt`,schemaPath:`#/properties/threads/items/properties/message/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var h=u===s;if(c||=h,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/threads/`+r+`/message/latestReplyAt`,schemaPath:`#/properties/threads/items/properties/message/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,W.errors=o,!1}var p=i===s}else var p=!0;if(p){if(n.latestReplyId!==void 0){let e=n.latestReplyId,i=s,a=s,c=!1,l=s,u=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/threads/`+r+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===u&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/threads/`+r+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/threads/`+r+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var g=l===s;c||=g;let d=s;if(e!==null){let e={instancePath:t+`/threads/`+r+`/message/latestReplyId`,schemaPath:`#/properties/threads/items/properties/message/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var g=d===s;if(c||=g,c)s=a,o!==null&&(a?o.length=a:o=null);else{let e={instancePath:t+`/threads/`+r+`/message/latestReplyId`,schemaPath:`#/properties/threads/items/properties/message/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,W.errors=o,!1}var p=i===s}else var p=!0;if(p){if(n.repliers!==void 0){let e=n.repliers,i=s;if(s===i){if(Array.isArray(e)){if(e.length>4)return W.errors=[{instancePath:t+`/threads/`+r+`/message/repliers`,schemaPath:`#/properties/threads/items/properties/message/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`}],!1;{let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===a){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`))return W.errors=[{instancePath:t+`/threads/`+r+`/message/repliers/`+i,schemaPath:`#/properties/threads/items/properties/message/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.name!==void 0){let e=n.name,a=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/repliers/`+i+`/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var _=a===s}else var _=!0;if(_){if(n.owner!==void 0){let e=n.owner,a=s;if(s===s){if(typeof e==`string`){if(!P.test(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/repliers/`+i+`/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var _=a===s}else var _=!0}}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/repliers/`+i,schemaPath:`#/properties/threads/items/properties/message/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}}else return W.errors=[{instancePath:t+`/threads/`+r+`/message/repliers`,schemaPath:`#/properties/threads/items/properties/message/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var p=i===s}else var p=!0;if(p){if(n.replyCount!==void 0){let e=n.replyCount,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/replyCount`,schemaPath:`#/properties/threads/items/properties/message/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/replyCount`,schemaPath:`#/properties/threads/items/properties/message/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<0||isNaN(e))return W.errors=[{instancePath:t+`/threads/`+r+`/message/replyCount`,schemaPath:`#/properties/threads/items/properties/message/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`}],!1}var p=i===s}else var p=!0}}}}}}}}}}}}}}}else return W.errors=[{instancePath:t+`/threads/`+r+`/message`,schemaPath:`#/properties/threads/items/properties/message/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var d=i===s}else var d=!0}}else return W.errors=[{instancePath:t+`/threads/`+r,schemaPath:`#/properties/threads/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return W.errors=[{instancePath:t+`/threads`,schemaPath:`#/properties/threads/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0}}}else return W.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return W.errors=o,s===0}W.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var pr=hr,mr={type:`object`,properties:{message:{anyOf:[{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},kind:{type:`string`,enum:[`reply`]},replyTo:{$ref:`#/$defs/MessageId`}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`replyTo`],additionalProperties:!0}]},unknownMentions:{type:`array`,items:{type:`string`}}},required:[`message`,`unknownMentions`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},Harness:{type:`string`,pattern:`^[a-z0-9-]{1,40}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}};function hr(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=hr.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.message===void 0&&(n=`message`)||e.unknownMentions===void 0&&(n=`unknownMentions`))return hr.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.message!==void 0){let n=e.message,r=s,i=s,a=!1,c=s;if(s===c){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.latestReplyAt===void 0&&(e=`latestReplyAt`)||n.latestReplyId===void 0&&(e=`latestReplyId`)||n.repliers===void 0&&(e=`repliers`)||n.replyCount===void 0&&(e=`replyCount`)){let n={instancePath:t+`/message`,schemaPath:`#/properties/message/anyOf/0/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.author!==void 0){let e=n.author,r=s;if(s===r){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`)){let e={instancePath:t+`/message/author`,schemaPath:`#/properties/message/anyOf/0/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/message/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0;if(l){if(e.owner!==void 0){let n=e.owner,r=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/message/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var l=r===s}else var l=!0}}}else{let e={instancePath:t+`/message/author`,schemaPath:`#/properties/message/anyOf/0/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.channel!==void 0){let e=n.channel,r=s;if(s===s){if(typeof e==`string`){if(!F.test(e)){let e={instancePath:t+`/message/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.harness!==void 0){let e=n.harness,r=s;if(s===s){if(typeof e==`string`){if(!wt.test(e)){let e={instancePath:t+`/message/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.id!==void 0){let e=n.id,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.mentions!==void 0){let e=n.mentions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}else{let e={instancePath:t+`/message/mentions`,schemaPath:`#/properties/message/anyOf/0/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.reactions!==void 0){let e=n.reactions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`)){let n={instancePath:t+`/message/reactions/`+r,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.by!==void 0){let e=n.by,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/message/reactions/`+r+`/by`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var d=i===s}else var d=!0;if(d){if(n.count!==void 0){let e=n.count,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var d=i===s}else var d=!0;if(d){if(n.reaction!==void 0){let e=n.reaction,i=s;if(typeof e!=`string`){let e={instancePath:t+`/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`thumbs_up`&&e!==`thumbs_down`){let e={instancePath:t+`/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:mr.properties.message.anyOf[0].properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var d=i===s}else var d=!0}}}}else{let e={instancePath:t+`/message/reactions/`+r,schemaPath:`#/properties/message/anyOf/0/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}else{let e={instancePath:t+`/message/reactions`,schemaPath:`#/properties/message/anyOf/0/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.text!==void 0){let e=n.text,r=s;if(s===r){if(typeof e==`string`){if(e.length>4e4){let e={instancePath:t+`/message/text`,schemaPath:`#/properties/message/anyOf/0/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/message/text`,schemaPath:`#/properties/message/anyOf/0/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/text`,schemaPath:`#/properties/message/anyOf/0/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.closedAt!==void 0){let e=n.closedAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/message/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.closedBy!==void 0){let e=n.closedBy,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/message/closedBy`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/closedBy`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/message/kind`,schemaPath:`#/properties/message/anyOf/0/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`top-level`){let e={instancePath:t+`/message/kind`,schemaPath:`#/properties/message/anyOf/0/properties/kind/enum`,keyword:`enum`,params:{allowedValues:mr.properties.message.anyOf[0].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(n.latestReplyAt!==void 0){let e=n.latestReplyAt,r=s,i=s,a=!1,c=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=c===s;a||=f;let l=s;if(e!==null){let e={instancePath:t+`/message/latestReplyAt`,schemaPath:`#/properties/message/anyOf/0/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var f=l===s;if(a||=f,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/message/latestReplyAt`,schemaPath:`#/properties/message/anyOf/0/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(n.latestReplyId!==void 0){let e=n.latestReplyId,r=s,i=s,a=!1,c=s,l=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===l&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var p=c===s;a||=p;let d=s;if(e!==null){let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/properties/message/anyOf/0/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var p=d===s;if(a||=p,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/properties/message/anyOf/0/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};o===null?o=[e]:o.push(e),s++}var u=r===s}else var u=!0;if(u){if(n.repliers!==void 0){let e=n.repliers,r=s;if(s===r){if(Array.isArray(e)){if(e.length>4){let e={instancePath:t+`/message/repliers`,schemaPath:`#/properties/message/anyOf/0/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`};o===null?o=[e]:o.push(e),s++}else{let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`)){let n={instancePath:t+`/message/repliers/`+r,schemaPath:`#/properties/message/anyOf/0/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e)){let e={instancePath:t+`/message/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var m=i===s}else var m=!0;if(m){if(n.owner!==void 0){let e=n.owner,i=s;if(s===s){if(typeof e==`string`){if(!P.test(e)){let e={instancePath:t+`/message/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var m=i===s}else var m=!0}}}else{let e={instancePath:t+`/message/repliers/`+r,schemaPath:`#/properties/message/anyOf/0/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}}else{let e={instancePath:t+`/message/repliers`,schemaPath:`#/properties/message/anyOf/0/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0;if(u){if(n.replyCount!==void 0){let e=n.replyCount,r=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/replyCount`,schemaPath:`#/properties/message/anyOf/0/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===r&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/replyCount`,schemaPath:`#/properties/message/anyOf/0/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<0||isNaN(e)){let e={instancePath:t+`/message/replyCount`,schemaPath:`#/properties/message/anyOf/0/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`};o===null?o=[e]:o.push(e),s++}}var u=r===s}else var u=!0}}}}}}}}}}}}}}}}else{let e={instancePath:t+`/message`,schemaPath:`#/properties/message/anyOf/0/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var h=c===s;if(a||=h,h)var g=!0;let x=s;if(s===x){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.replyTo===void 0&&(e=`replyTo`)){let n={instancePath:t+`/message`,schemaPath:`#/properties/message/anyOf/1/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.author!==void 0){let e=n.author,r=s;if(s===r){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`)){let e={instancePath:t+`/message/author`,schemaPath:`#/properties/message/anyOf/1/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`};o===null?o=[e]:o.push(e),s++}else{if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/message/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var _=r===s}else var _=!0;if(_){if(e.owner!==void 0){let n=e.owner,r=s;if(s===s){if(typeof n==`string`){if(!P.test(n)){let e={instancePath:t+`/message/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var _=r===s}else var _=!0}}}else{let e={instancePath:t+`/message/author`,schemaPath:`#/properties/message/anyOf/1/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.channel!==void 0){let e=n.channel,r=s;if(s===s){if(typeof e==`string`){if(!F.test(e)){let e={instancePath:t+`/message/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.harness!==void 0){let e=n.harness,r=s;if(s===s){if(typeof e==`string`){if(!wt.test(e)){let e={instancePath:t+`/message/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.id!==void 0){let e=n.id,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.mentions!==void 0){let e=n.mentions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}else{let e={instancePath:t+`/message/mentions`,schemaPath:`#/properties/message/anyOf/1/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.reactions!==void 0){let e=n.reactions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`)){let n={instancePath:t+`/message/reactions/`+r,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`};o===null?o=[n]:o.push(n),s++}else{if(n.by!==void 0){let e=n.by,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n)){let e={instancePath:t+`/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}if(a!==s)break}}else{let e={instancePath:t+`/message/reactions/`+r+`/by`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var y=i===s}else var y=!0;if(y){if(n.count!==void 0){let e=n.count,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var y=i===s}else var y=!0;if(y){if(n.reaction!==void 0){let e=n.reaction,i=s;if(typeof e!=`string`){let e={instancePath:t+`/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`thumbs_up`&&e!==`thumbs_down`){let e={instancePath:t+`/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:mr.properties.message.anyOf[1].properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var y=i===s}else var y=!0}}}}else{let e={instancePath:t+`/message/reactions/`+r,schemaPath:`#/properties/message/anyOf/1/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}if(i!==s)break}}else{let e={instancePath:t+`/message/reactions`,schemaPath:`#/properties/message/anyOf/1/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.text!==void 0){let e=n.text,r=s;if(s===r){if(typeof e==`string`){if(e.length>4e4){let e={instancePath:t+`/message/text`,schemaPath:`#/properties/message/anyOf/1/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`};o===null?o=[e]:o.push(e),s++}else if(e.length<1){let e={instancePath:t+`/message/text`,schemaPath:`#/properties/message/anyOf/1/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/text`,schemaPath:`#/properties/message/anyOf/1/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0;if(v){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`){let e={instancePath:t+`/message/kind`,schemaPath:`#/properties/message/anyOf/1/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}if(e!==`reply`){let e={instancePath:t+`/message/kind`,schemaPath:`#/properties/message/anyOf/1/properties/kind/enum`,keyword:`enum`,params:{allowedValues:mr.properties.message.anyOf[1].properties.kind.enum},message:`must be equal to one of the allowed values`};o===null?o=[e]:o.push(e),s++}var v=r===s}else var v=!0;if(v){if(n.replyTo!==void 0){let e=n.replyTo,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/replyTo`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/replyTo`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/message/replyTo`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var v=r===s}else var v=!0}}}}}}}}}}}else{let e={instancePath:t+`/message`,schemaPath:`#/properties/message/anyOf/1/type`,keyword:`type`,params:{type:`object`},message:`must be object`};o===null?o=[e]:o.push(e),s++}}var h=x===s;if(a||=h,h&&g!==!0&&(g=!0),a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/message`,schemaPath:`#/properties/message/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,hr.errors=o,!1}var b=r===s}else var b=!0;if(b){if(e.unknownMentions!==void 0){let n=e.unknownMentions,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=s;if(typeof n[r]!=`string`)return hr.errors=[{instancePath:t+`/unknownMentions/`+r,schemaPath:`#/properties/unknownMentions/items/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==s)break}}else return hr.errors=[{instancePath:t+`/unknownMentions`,schemaPath:`#/properties/unknownMentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var b=r===s}else var b=!0}}else return hr.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return hr.errors=o,s===0}hr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var gr=vr,_r={type:`object`,properties:{channel:{$ref:`#/$defs/ChannelName`},messageId:{$ref:`#/$defs/MessageId`},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}}},required:[`channel`,`messageId`,`reactions`],additionalProperties:!0,$defs:{ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991},IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`}}};function vr(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=vr.evaluated;if(o.dynamicProps&&(o.props=void 0),o.dynamicItems&&(o.items=void 0),e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.channel===void 0&&(n=`channel`)||e.messageId===void 0&&(n=`messageId`)||e.reactions===void 0&&(n=`reactions`))return vr.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.channel!==void 0){let n=e.channel;if(typeof n==`string`){if(!F.test(n))return vr.errors=[{instancePath:t+`/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return vr.errors=[{instancePath:t+`/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var s=!0}else var s=!0;if(s){if(e.messageId!==void 0){let n=e.messageId;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return vr.errors=[{instancePath:t+`/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return vr.errors=[{instancePath:t+`/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return vr.errors=[{instancePath:t+`/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var s=!0}else var s=!0;if(s){if(e.reactions!==void 0){let n=e.reactions;if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r];if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.by===void 0&&(n=`by`)||e.count===void 0&&(n=`count`)||e.reaction===void 0&&(n=`reaction`))return vr.errors=[{instancePath:t+`/reactions/`+r,schemaPath:`#/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.by!==void 0){let n=e.by;if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i];if(typeof e==`string`){if(!j.test(e))return vr.errors=[{instancePath:t+`/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return vr.errors=[{instancePath:t+`/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}}else return vr.errors=[{instancePath:t+`/reactions/`+r+`/by`,schemaPath:`#/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var c=!0}else var c=!0;if(c){if(e.count!==void 0){let n=e.count;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return vr.errors=[{instancePath:t+`/reactions/`+r+`/count`,schemaPath:`#/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return vr.errors=[{instancePath:t+`/reactions/`+r+`/count`,schemaPath:`#/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return vr.errors=[{instancePath:t+`/reactions/`+r+`/count`,schemaPath:`#/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var c=!0}else var c=!0;if(c){if(e.reaction!==void 0){let n=e.reaction;if(typeof n!=`string`)return vr.errors=[{instancePath:t+`/reactions/`+r+`/reaction`,schemaPath:`#/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`thumbs_up`&&n!==`thumbs_down`)return vr.errors=[{instancePath:t+`/reactions/`+r+`/reaction`,schemaPath:`#/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:_r.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0}else var c=!0}}}else return vr.errors=[{instancePath:t+`/reactions/`+r,schemaPath:`#/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return vr.errors=[{instancePath:t+`/reactions`,schemaPath:`#/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var s=!0}else var s=!0}}}else return vr.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return vr.errors=null,!0}vr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var yr=G,br={type:`object`,properties:{parent:{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0},receipts:{type:`array`,items:{type:`object`,properties:{identity:{$ref:`#/$defs/IdentityName`},messageId:{$ref:`#/$defs/MessageId`},seen:{type:`boolean`},seenAt:{$ref:`#/$defs/IsoTime`}},required:[`identity`,`messageId`,`seen`],additionalProperties:!0}},replies:{type:`array`,items:{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},kind:{type:`string`,enum:[`reply`]},replyTo:{$ref:`#/$defs/MessageId`}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`replyTo`],additionalProperties:!0}}},required:[`parent`,`receipts`,`replies`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},Harness:{type:`string`,pattern:`^[a-z0-9-]{1,40}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}};function G(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=G.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.parent===void 0&&(n=`parent`)||e.receipts===void 0&&(n=`receipts`)||e.replies===void 0&&(n=`replies`))return G.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.parent!==void 0){let n=e.parent,r=s;if(s===r){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.latestReplyAt===void 0&&(e=`latestReplyAt`)||n.latestReplyId===void 0&&(e=`latestReplyId`)||n.repliers===void 0&&(e=`repliers`)||n.replyCount===void 0&&(e=`replyCount`))return G.errors=[{instancePath:t+`/parent`,schemaPath:`#/properties/parent/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.author!==void 0){let e=n.author,r=s;if(s===r){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`))return G.errors=[{instancePath:t+`/parent/author`,schemaPath:`#/properties/parent/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return G.errors=[{instancePath:t+`/parent/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return G.errors=[{instancePath:t+`/parent/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(e.owner!==void 0){let n=e.owner,r=s;if(s===s){if(typeof n==`string`){if(!P.test(n))return G.errors=[{instancePath:t+`/parent/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return G.errors=[{instancePath:t+`/parent/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0}}else return G.errors=[{instancePath:t+`/parent/author`,schemaPath:`#/properties/parent/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var u=r===s}else var u=!0;if(u){if(n.channel!==void 0){let e=n.channel,r=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return G.errors=[{instancePath:t+`/parent/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return G.errors=[{instancePath:t+`/parent/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return G.errors=[{instancePath:t+`/parent/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return G.errors=[{instancePath:t+`/parent/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.harness!==void 0){let e=n.harness,r=s;if(s===s){if(typeof e==`string`){if(!wt.test(e))return G.errors=[{instancePath:t+`/parent/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`}],!1}else return G.errors=[{instancePath:t+`/parent/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.id!==void 0){let e=n.id,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return G.errors=[{instancePath:t+`/parent/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return G.errors=[{instancePath:t+`/parent/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return G.errors=[{instancePath:t+`/parent/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var u=r===s}else var u=!0;if(u){if(n.mentions!==void 0){let e=n.mentions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return G.errors=[{instancePath:t+`/parent/mentions/`+r,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return G.errors=[{instancePath:t+`/parent/mentions/`+r,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(i!==s)break}}else return G.errors=[{instancePath:t+`/parent/mentions`,schemaPath:`#/properties/parent/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(n.reactions!==void 0){let e=n.reactions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`))return G.errors=[{instancePath:t+`/parent/reactions/`+r,schemaPath:`#/properties/parent/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.by!==void 0){let e=n.by,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return G.errors=[{instancePath:t+`/parent/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return G.errors=[{instancePath:t+`/parent/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(a!==s)break}}else return G.errors=[{instancePath:t+`/parent/reactions/`+r+`/by`,schemaPath:`#/properties/parent/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var d=i===s}else var d=!0;if(d){if(n.count!==void 0){let e=n.count,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return G.errors=[{instancePath:t+`/parent/reactions/`+r+`/count`,schemaPath:`#/properties/parent/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return G.errors=[{instancePath:t+`/parent/reactions/`+r+`/count`,schemaPath:`#/properties/parent/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return G.errors=[{instancePath:t+`/parent/reactions/`+r+`/count`,schemaPath:`#/properties/parent/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var d=i===s}else var d=!0;if(d){if(n.reaction!==void 0){let e=n.reaction,i=s;if(typeof e!=`string`)return G.errors=[{instancePath:t+`/parent/reactions/`+r+`/reaction`,schemaPath:`#/properties/parent/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`thumbs_up`&&e!==`thumbs_down`)return G.errors=[{instancePath:t+`/parent/reactions/`+r+`/reaction`,schemaPath:`#/properties/parent/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:br.properties.parent.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var d=i===s}else var d=!0}}}else return G.errors=[{instancePath:t+`/parent/reactions/`+r,schemaPath:`#/properties/parent/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return G.errors=[{instancePath:t+`/parent/reactions`,schemaPath:`#/properties/parent/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(n.text!==void 0){let e=n.text,r=s;if(s===r){if(typeof e==`string`){if(e.length>4e4)return G.errors=[{instancePath:t+`/parent/text`,schemaPath:`#/properties/parent/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`}],!1;if(e.length<1)return G.errors=[{instancePath:t+`/parent/text`,schemaPath:`#/properties/parent/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return G.errors=[{instancePath:t+`/parent/text`,schemaPath:`#/properties/parent/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.closedAt!==void 0){let e=n.closedAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return G.errors=[{instancePath:t+`/parent/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return G.errors=[{instancePath:t+`/parent/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.closedBy!==void 0){let e=n.closedBy,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return G.errors=[{instancePath:t+`/parent/closedBy`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return G.errors=[{instancePath:t+`/parent/closedBy`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`)return G.errors=[{instancePath:t+`/parent/kind`,schemaPath:`#/properties/parent/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`top-level`)return G.errors=[{instancePath:t+`/parent/kind`,schemaPath:`#/properties/parent/properties/kind/enum`,keyword:`enum`,params:{allowedValues:br.properties.parent.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var u=r===s}else var u=!0;if(u){if(n.latestReplyAt!==void 0){let e=n.latestReplyAt,r=s,i=s,a=!1,c=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/parent/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=c===s;a||=f;let l=s;if(e!==null){let e={instancePath:t+`/parent/latestReplyAt`,schemaPath:`#/properties/parent/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var f=l===s;if(a||=f,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/parent/latestReplyAt`,schemaPath:`#/properties/parent/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,G.errors=o,!1}var u=r===s}else var u=!0;if(u){if(n.latestReplyId!==void 0){let e=n.latestReplyId,r=s,i=s,a=!1,c=s,l=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===l&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/parent/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var p=c===s;a||=p;let d=s;if(e!==null){let e={instancePath:t+`/parent/latestReplyId`,schemaPath:`#/properties/parent/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var p=d===s;if(a||=p,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/parent/latestReplyId`,schemaPath:`#/properties/parent/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,G.errors=o,!1}var u=r===s}else var u=!0;if(u){if(n.repliers!==void 0){let e=n.repliers,r=s;if(s===r){if(Array.isArray(e)){if(e.length>4)return G.errors=[{instancePath:t+`/parent/repliers`,schemaPath:`#/properties/parent/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`}],!1;{let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`))return G.errors=[{instancePath:t+`/parent/repliers/`+r,schemaPath:`#/properties/parent/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return G.errors=[{instancePath:t+`/parent/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return G.errors=[{instancePath:t+`/parent/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var m=i===s}else var m=!0;if(m){if(n.owner!==void 0){let e=n.owner,i=s;if(s===s){if(typeof e==`string`){if(!P.test(e))return G.errors=[{instancePath:t+`/parent/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return G.errors=[{instancePath:t+`/parent/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var m=i===s}else var m=!0}}else return G.errors=[{instancePath:t+`/parent/repliers/`+r,schemaPath:`#/properties/parent/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}}else return G.errors=[{instancePath:t+`/parent/repliers`,schemaPath:`#/properties/parent/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(n.replyCount!==void 0){let e=n.replyCount,r=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return G.errors=[{instancePath:t+`/parent/replyCount`,schemaPath:`#/properties/parent/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===r&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return G.errors=[{instancePath:t+`/parent/replyCount`,schemaPath:`#/properties/parent/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<0||isNaN(e))return G.errors=[{instancePath:t+`/parent/replyCount`,schemaPath:`#/properties/parent/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`}],!1}var u=r===s}else var u=!0}}}}}}}}}}}}}}}else return G.errors=[{instancePath:t+`/parent`,schemaPath:`#/properties/parent/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var h=r===s}else var h=!0;if(h){if(e.receipts!==void 0){let n=e.receipts,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.identity===void 0&&(n=`identity`)||e.messageId===void 0&&(n=`messageId`)||e.seen===void 0&&(n=`seen`))return G.errors=[{instancePath:t+`/receipts/`+r,schemaPath:`#/properties/receipts/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.identity!==void 0){let n=e.identity,i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return G.errors=[{instancePath:t+`/receipts/`+r+`/identity`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return G.errors=[{instancePath:t+`/receipts/`+r+`/identity`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var g=i===s}else var g=!0;if(g){if(e.messageId!==void 0){let n=e.messageId,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return G.errors=[{instancePath:t+`/receipts/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return G.errors=[{instancePath:t+`/receipts/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return G.errors=[{instancePath:t+`/receipts/`+r+`/messageId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var g=i===s}else var g=!0;if(g){if(e.seen!==void 0){let n=s;if(typeof e.seen!=`boolean`)return G.errors=[{instancePath:t+`/receipts/`+r+`/seen`,schemaPath:`#/properties/receipts/items/properties/seen/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var g=n===s}else var g=!0;if(g){if(e.seenAt!==void 0){let n=e.seenAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return G.errors=[{instancePath:t+`/receipts/`+r+`/seenAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return G.errors=[{instancePath:t+`/receipts/`+r+`/seenAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var g=i===s}else var g=!0}}}}else return G.errors=[{instancePath:t+`/receipts/`+r,schemaPath:`#/properties/receipts/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return G.errors=[{instancePath:t+`/receipts`,schemaPath:`#/properties/receipts/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var h=r===s}else var h=!0;if(h){if(e.replies!==void 0){let n=e.replies,r=s;if(s===r){if(Array.isArray(n)){let e=n.length;for(let r=0;r<e;r++){let e=n[r],i=s;if(s===i){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.author===void 0&&(n=`author`)||e.channel===void 0&&(n=`channel`)||e.createdAt===void 0&&(n=`createdAt`)||e.id===void 0&&(n=`id`)||e.mentions===void 0&&(n=`mentions`)||e.text===void 0&&(n=`text`)||e.kind===void 0&&(n=`kind`)||e.replyTo===void 0&&(n=`replyTo`))return G.errors=[{instancePath:t+`/replies/`+r,schemaPath:`#/properties/replies/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.author!==void 0){let n=e.author,i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`))return G.errors=[{instancePath:t+`/replies/`+r+`/author`,schemaPath:`#/properties/replies/items/properties/author/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return G.errors=[{instancePath:t+`/replies/`+r+`/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return G.errors=[{instancePath:t+`/replies/`+r+`/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var _=i===s}else var _=!0;if(_){if(n.owner!==void 0){let e=n.owner,i=s;if(s===s){if(typeof e==`string`){if(!P.test(e))return G.errors=[{instancePath:t+`/replies/`+r+`/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return G.errors=[{instancePath:t+`/replies/`+r+`/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var _=i===s}else var _=!0}}else return G.errors=[{instancePath:t+`/replies/`+r+`/author`,schemaPath:`#/properties/replies/items/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var v=i===s}else var v=!0;if(v){if(e.channel!==void 0){let n=e.channel,i=s;if(s===s){if(typeof n==`string`){if(!F.test(n))return G.errors=[{instancePath:t+`/replies/`+r+`/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return G.errors=[{instancePath:t+`/replies/`+r+`/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var v=i===s}else var v=!0;if(v){if(e.createdAt!==void 0){let n=e.createdAt,i=s;if(s===s){if(typeof n==`string`){if(!A.test(n))return G.errors=[{instancePath:t+`/replies/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return G.errors=[{instancePath:t+`/replies/`+r+`/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var v=i===s}else var v=!0;if(v){if(e.harness!==void 0){let n=e.harness,i=s;if(s===s){if(typeof n==`string`){if(!wt.test(n))return G.errors=[{instancePath:t+`/replies/`+r+`/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`}],!1}else return G.errors=[{instancePath:t+`/replies/`+r+`/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var v=i===s}else var v=!0;if(v){if(e.id!==void 0){let n=e.id,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return G.errors=[{instancePath:t+`/replies/`+r+`/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return G.errors=[{instancePath:t+`/replies/`+r+`/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return G.errors=[{instancePath:t+`/replies/`+r+`/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var v=i===s}else var v=!0;if(v){if(e.mentions!==void 0){let n=e.mentions,i=s;if(s===i){if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return G.errors=[{instancePath:t+`/replies/`+r+`/mentions/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return G.errors=[{instancePath:t+`/replies/`+r+`/mentions/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(a!==s)break}}else return G.errors=[{instancePath:t+`/replies/`+r+`/mentions`,schemaPath:`#/properties/replies/items/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var v=i===s}else var v=!0;if(v){if(e.reactions!==void 0){let n=e.reactions,i=s;if(s===i){if(Array.isArray(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i],a=s;if(s===a){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.by===void 0&&(n=`by`)||e.count===void 0&&(n=`count`)||e.reaction===void 0&&(n=`reaction`))return G.errors=[{instancePath:t+`/replies/`+r+`/reactions/`+i,schemaPath:`#/properties/replies/items/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.by!==void 0){let n=e.by,a=s;if(s===a){if(Array.isArray(n)){let e=n.length;for(let a=0;a<e;a++){let e=n[a],o=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return G.errors=[{instancePath:t+`/replies/`+r+`/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return G.errors=[{instancePath:t+`/replies/`+r+`/reactions/`+i+`/by/`+a,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(o!==s)break}}else return G.errors=[{instancePath:t+`/replies/`+r+`/reactions/`+i+`/by`,schemaPath:`#/properties/replies/items/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var y=a===s}else var y=!0;if(y){if(e.count!==void 0){let n=e.count,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return G.errors=[{instancePath:t+`/replies/`+r+`/reactions/`+i+`/count`,schemaPath:`#/properties/replies/items/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return G.errors=[{instancePath:t+`/replies/`+r+`/reactions/`+i+`/count`,schemaPath:`#/properties/replies/items/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return G.errors=[{instancePath:t+`/replies/`+r+`/reactions/`+i+`/count`,schemaPath:`#/properties/replies/items/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var y=a===s}else var y=!0;if(y){if(e.reaction!==void 0){let n=e.reaction,a=s;if(typeof n!=`string`)return G.errors=[{instancePath:t+`/replies/`+r+`/reactions/`+i+`/reaction`,schemaPath:`#/properties/replies/items/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`thumbs_up`&&n!==`thumbs_down`)return G.errors=[{instancePath:t+`/replies/`+r+`/reactions/`+i+`/reaction`,schemaPath:`#/properties/replies/items/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:br.properties.replies.items.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var y=a===s}else var y=!0}}}else return G.errors=[{instancePath:t+`/replies/`+r+`/reactions/`+i,schemaPath:`#/properties/replies/items/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(a!==s)break}}else return G.errors=[{instancePath:t+`/replies/`+r+`/reactions`,schemaPath:`#/properties/replies/items/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var v=i===s}else var v=!0;if(v){if(e.text!==void 0){let n=e.text,i=s;if(s===i){if(typeof n==`string`){if(n.length>4e4)return G.errors=[{instancePath:t+`/replies/`+r+`/text`,schemaPath:`#/properties/replies/items/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`}],!1;if(n.length<1)return G.errors=[{instancePath:t+`/replies/`+r+`/text`,schemaPath:`#/properties/replies/items/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return G.errors=[{instancePath:t+`/replies/`+r+`/text`,schemaPath:`#/properties/replies/items/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var v=i===s}else var v=!0;if(v){if(e.kind!==void 0){let n=e.kind,i=s;if(typeof n!=`string`)return G.errors=[{instancePath:t+`/replies/`+r+`/kind`,schemaPath:`#/properties/replies/items/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`reply`)return G.errors=[{instancePath:t+`/replies/`+r+`/kind`,schemaPath:`#/properties/replies/items/properties/kind/enum`,keyword:`enum`,params:{allowedValues:br.properties.replies.items.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var v=i===s}else var v=!0;if(v){if(e.replyTo!==void 0){let n=e.replyTo,i=s,a=s;if(typeof n!=`number`||n%1||isNaN(n)||!isFinite(n))return G.errors=[{instancePath:t+`/replies/`+r+`/replyTo`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===a&&typeof n==`number`&&isFinite(n)){if(n>9007199254740991||isNaN(n))return G.errors=[{instancePath:t+`/replies/`+r+`/replyTo`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(n<1||isNaN(n))return G.errors=[{instancePath:t+`/replies/`+r+`/replyTo`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var v=i===s}else var v=!0}}}}}}}}}}else return G.errors=[{instancePath:t+`/replies/`+r,schemaPath:`#/properties/replies/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return G.errors=[{instancePath:t+`/replies`,schemaPath:`#/properties/replies/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var h=r===s}else var h=!0}}}else return G.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return G.errors=o,s===0}G.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var xr=K,Sr={type:`object`,properties:{message:{type:`object`,properties:{author:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},channel:{$ref:`#/$defs/ChannelName`},createdAt:{$ref:`#/$defs/IsoTime`},data:{},harness:{$ref:`#/$defs/Harness`},id:{$ref:`#/$defs/MessageId`},mentions:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},reactions:{type:`array`,items:{type:`object`,properties:{by:{type:`array`,items:{$ref:`#/$defs/IdentityName`}},count:{type:`integer`,minimum:1,maximum:9007199254740991},reaction:{type:`string`,enum:[`thumbs_up`,`thumbs_down`]}},required:[`by`,`count`,`reaction`],additionalProperties:!0}},text:{type:`string`,minLength:1,maxLength:4e4},closedAt:{$ref:`#/$defs/IsoTime`},closedBy:{$ref:`#/$defs/IdentityName`},kind:{type:`string`,enum:[`top-level`]},latestReplyAt:{anyOf:[{$ref:`#/$defs/IsoTime`},{type:`null`}]},latestReplyId:{anyOf:[{$ref:`#/$defs/MessageId`},{type:`null`}]},repliers:{type:`array`,items:{type:`object`,properties:{name:{$ref:`#/$defs/IdentityName`},owner:{$ref:`#/$defs/Owner`}},required:[`name`],additionalProperties:!0},maxItems:4},replyCount:{type:`integer`,minimum:0,maximum:9007199254740991}},required:[`author`,`channel`,`createdAt`,`id`,`mentions`,`text`,`kind`,`latestReplyAt`,`latestReplyId`,`repliers`,`replyCount`],additionalProperties:!0}},required:[`message`],additionalProperties:!0,$defs:{IdentityName:{type:`string`,pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},Owner:{type:`string`,pattern:`^[a-z0-9-]{1,64}$`},ChannelName:{type:`string`,pattern:`^[a-z0-9-]{1,80}$`},IsoTime:{type:`string`,pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},Harness:{type:`string`,pattern:`^[a-z0-9-]{1,40}$`},MessageId:{type:`integer`,minimum:1,maximum:9007199254740991}}};function K(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e,dynamicAnchors:a={}}={}){let o=null,s=0,c=K.evaluated;if(c.dynamicProps&&(c.props=void 0),c.dynamicItems&&(c.items=void 0),s===0){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.message===void 0&&(n=`message`))return K.errors=[{instancePath:t,schemaPath:`#/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.message!==void 0){let n=e.message;if(s===s){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.author===void 0&&(e=`author`)||n.channel===void 0&&(e=`channel`)||n.createdAt===void 0&&(e=`createdAt`)||n.id===void 0&&(e=`id`)||n.mentions===void 0&&(e=`mentions`)||n.text===void 0&&(e=`text`)||n.kind===void 0&&(e=`kind`)||n.latestReplyAt===void 0&&(e=`latestReplyAt`)||n.latestReplyId===void 0&&(e=`latestReplyId`)||n.repliers===void 0&&(e=`repliers`)||n.replyCount===void 0&&(e=`replyCount`))return K.errors=[{instancePath:t+`/message`,schemaPath:`#/properties/message/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.author!==void 0){let e=n.author,r=s;if(s===r){if(e&&typeof e==`object`&&!Array.isArray(e)){let n;if(e.name===void 0&&(n=`name`))return K.errors=[{instancePath:t+`/message/author`,schemaPath:`#/properties/message/properties/author/required`,keyword:`required`,params:{missingProperty:n},message:`must have required property '`+n+`'`}],!1;if(e.name!==void 0){let n=e.name,r=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return K.errors=[{instancePath:t+`/message/author/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return K.errors=[{instancePath:t+`/message/author/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0;if(l){if(e.owner!==void 0){let n=e.owner,r=s;if(s===s){if(typeof n==`string`){if(!P.test(n))return K.errors=[{instancePath:t+`/message/author/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return K.errors=[{instancePath:t+`/message/author/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var l=r===s}else var l=!0}}else return K.errors=[{instancePath:t+`/message/author`,schemaPath:`#/properties/message/properties/author/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}var u=r===s}else var u=!0;if(u){if(n.channel!==void 0){let e=n.channel,r=s;if(s===s){if(typeof e==`string`){if(!F.test(e))return K.errors=[{instancePath:t+`/message/channel`,schemaPath:`#/$defs/ChannelName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,80}$`},message:`must match pattern "^[a-z0-9-]{1,80}$"`}],!1}else return K.errors=[{instancePath:t+`/message/channel`,schemaPath:`#/$defs/ChannelName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.createdAt!==void 0){let e=n.createdAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return K.errors=[{instancePath:t+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return K.errors=[{instancePath:t+`/message/createdAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.harness!==void 0){let e=n.harness,r=s;if(s===s){if(typeof e==`string`){if(!wt.test(e))return K.errors=[{instancePath:t+`/message/harness`,schemaPath:`#/$defs/Harness/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,40}$`},message:`must match pattern "^[a-z0-9-]{1,40}$"`}],!1}else return K.errors=[{instancePath:t+`/message/harness`,schemaPath:`#/$defs/Harness/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.id!==void 0){let e=n.id,r=s,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return K.errors=[{instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return K.errors=[{instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return K.errors=[{instancePath:t+`/message/id`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var u=r===s}else var u=!0;if(u){if(n.mentions!==void 0){let e=n.mentions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return K.errors=[{instancePath:t+`/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return K.errors=[{instancePath:t+`/message/mentions/`+r,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(i!==s)break}}else return K.errors=[{instancePath:t+`/message/mentions`,schemaPath:`#/properties/message/properties/mentions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(n.reactions!==void 0){let e=n.reactions,r=s;if(s===r){if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.by===void 0&&(e=`by`)||n.count===void 0&&(e=`count`)||n.reaction===void 0&&(e=`reaction`))return K.errors=[{instancePath:t+`/message/reactions/`+r,schemaPath:`#/properties/message/properties/reactions/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.by!==void 0){let e=n.by,i=s;if(s===i){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++){let n=e[i],a=s;if(s===s){if(typeof n==`string`){if(!j.test(n))return K.errors=[{instancePath:t+`/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return K.errors=[{instancePath:t+`/message/reactions/`+r+`/by/`+i,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}if(a!==s)break}}else return K.errors=[{instancePath:t+`/message/reactions/`+r+`/by`,schemaPath:`#/properties/message/properties/reactions/items/properties/by/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var d=i===s}else var d=!0;if(d){if(n.count!==void 0){let e=n.count,i=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return K.errors=[{instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/properties/reactions/items/properties/count/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===i&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return K.errors=[{instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/properties/reactions/items/properties/count/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<1||isNaN(e))return K.errors=[{instancePath:t+`/message/reactions/`+r+`/count`,schemaPath:`#/properties/message/properties/reactions/items/properties/count/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`}],!1}var d=i===s}else var d=!0;if(d){if(n.reaction!==void 0){let e=n.reaction,i=s;if(typeof e!=`string`)return K.errors=[{instancePath:t+`/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/message/properties/reactions/items/properties/reaction/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`thumbs_up`&&e!==`thumbs_down`)return K.errors=[{instancePath:t+`/message/reactions/`+r+`/reaction`,schemaPath:`#/properties/message/properties/reactions/items/properties/reaction/enum`,keyword:`enum`,params:{allowedValues:Sr.properties.message.properties.reactions.items.properties.reaction.enum},message:`must be equal to one of the allowed values`}],!1;var d=i===s}else var d=!0}}}else return K.errors=[{instancePath:t+`/message/reactions/`+r,schemaPath:`#/properties/message/properties/reactions/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}else return K.errors=[{instancePath:t+`/message/reactions`,schemaPath:`#/properties/message/properties/reactions/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(n.text!==void 0){let e=n.text,r=s;if(s===r){if(typeof e==`string`){if(e.length>4e4)return K.errors=[{instancePath:t+`/message/text`,schemaPath:`#/properties/message/properties/text/maxLength`,keyword:`maxLength`,params:{limit:4e4},message:`must NOT have more than 40000 characters`}],!1;if(e.length<1)return K.errors=[{instancePath:t+`/message/text`,schemaPath:`#/properties/message/properties/text/minLength`,keyword:`minLength`,params:{limit:1},message:`must NOT have fewer than 1 characters`}],!1}else return K.errors=[{instancePath:t+`/message/text`,schemaPath:`#/properties/message/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.closedAt!==void 0){let e=n.closedAt,r=s;if(s===s){if(typeof e==`string`){if(!A.test(e))return K.errors=[{instancePath:t+`/message/closedAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`}],!1}else return K.errors=[{instancePath:t+`/message/closedAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.closedBy!==void 0){let e=n.closedBy,r=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return K.errors=[{instancePath:t+`/message/closedBy`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return K.errors=[{instancePath:t+`/message/closedBy`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var u=r===s}else var u=!0;if(u){if(n.kind!==void 0){let e=n.kind,r=s;if(typeof e!=`string`)return K.errors=[{instancePath:t+`/message/kind`,schemaPath:`#/properties/message/properties/kind/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`top-level`)return K.errors=[{instancePath:t+`/message/kind`,schemaPath:`#/properties/message/properties/kind/enum`,keyword:`enum`,params:{allowedValues:Sr.properties.message.properties.kind.enum},message:`must be equal to one of the allowed values`}],!1;var u=r===s}else var u=!0;if(u){if(n.latestReplyAt!==void 0){let e=n.latestReplyAt,r=s,i=s,a=!1,c=s;if(s===s){if(typeof e==`string`){if(!A.test(e)){let e={instancePath:t+`/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/pattern`,keyword:`pattern`,params:{pattern:`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$`},message:`must match pattern "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"`};o===null?o=[e]:o.push(e),s++}}else{let e={instancePath:t+`/message/latestReplyAt`,schemaPath:`#/$defs/IsoTime/type`,keyword:`type`,params:{type:`string`},message:`must be string`};o===null?o=[e]:o.push(e),s++}}var f=c===s;a||=f;let l=s;if(e!==null){let e={instancePath:t+`/message/latestReplyAt`,schemaPath:`#/properties/message/properties/latestReplyAt/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var f=l===s;if(a||=f,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/message/latestReplyAt`,schemaPath:`#/properties/message/properties/latestReplyAt/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,K.errors=o,!1}var u=r===s}else var u=!0;if(u){if(n.latestReplyId!==void 0){let e=n.latestReplyId,r=s,i=s,a=!1,c=s,l=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e)){let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`};o===null?o=[e]:o.push(e),s++}if(s===l&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e)){let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`};o===null?o=[e]:o.push(e),s++}else if(e<1||isNaN(e)){let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/$defs/MessageId/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:1},message:`must be >= 1`};o===null?o=[e]:o.push(e),s++}}var p=c===s;a||=p;let d=s;if(e!==null){let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/properties/message/properties/latestReplyId/anyOf/1/type`,keyword:`type`,params:{type:`null`},message:`must be null`};o===null?o=[e]:o.push(e),s++}var p=d===s;if(a||=p,a)s=i,o!==null&&(i?o.length=i:o=null);else{let e={instancePath:t+`/message/latestReplyId`,schemaPath:`#/properties/message/properties/latestReplyId/anyOf`,keyword:`anyOf`,params:{},message:`must match a schema in anyOf`};return o===null?o=[e]:o.push(e),s++,K.errors=o,!1}var u=r===s}else var u=!0;if(u){if(n.repliers!==void 0){let e=n.repliers,r=s;if(s===r){if(Array.isArray(e)){if(e.length>4)return K.errors=[{instancePath:t+`/message/repliers`,schemaPath:`#/properties/message/properties/repliers/maxItems`,keyword:`maxItems`,params:{limit:4},message:`must NOT have more than 4 items`}],!1;{let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=s;if(s===i){if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.name===void 0&&(e=`name`))return K.errors=[{instancePath:t+`/message/repliers/`+r,schemaPath:`#/properties/message/properties/repliers/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;if(n.name!==void 0){let e=n.name,i=s;if(s===s){if(typeof e==`string`){if(!j.test(e))return K.errors=[{instancePath:t+`/message/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$`},message:`must match pattern "^[a-z0-9-]{1,64}(?:\\/[a-z0-9-]{1,64})?$"`}],!1}else return K.errors=[{instancePath:t+`/message/repliers/`+r+`/name`,schemaPath:`#/$defs/IdentityName/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var m=i===s}else var m=!0;if(m){if(n.owner!==void 0){let e=n.owner,i=s;if(s===s){if(typeof e==`string`){if(!P.test(e))return K.errors=[{instancePath:t+`/message/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/pattern`,keyword:`pattern`,params:{pattern:`^[a-z0-9-]{1,64}$`},message:`must match pattern "^[a-z0-9-]{1,64}$"`}],!1}else return K.errors=[{instancePath:t+`/message/repliers/`+r+`/owner`,schemaPath:`#/$defs/Owner/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}var m=i===s}else var m=!0}}else return K.errors=[{instancePath:t+`/message/repliers/`+r,schemaPath:`#/properties/message/properties/repliers/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}if(i!==s)break}}}else return K.errors=[{instancePath:t+`/message/repliers`,schemaPath:`#/properties/message/properties/repliers/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1}var u=r===s}else var u=!0;if(u){if(n.replyCount!==void 0){let e=n.replyCount,r=s;if(typeof e!=`number`||e%1||isNaN(e)||!isFinite(e))return K.errors=[{instancePath:t+`/message/replyCount`,schemaPath:`#/properties/message/properties/replyCount/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(s===r&&typeof e==`number`&&isFinite(e)){if(e>9007199254740991||isNaN(e))return K.errors=[{instancePath:t+`/message/replyCount`,schemaPath:`#/properties/message/properties/replyCount/maximum`,keyword:`maximum`,params:{comparison:`<=`,limit:9007199254740991},message:`must be <= 9007199254740991`}],!1;if(e<0||isNaN(e))return K.errors=[{instancePath:t+`/message/replyCount`,schemaPath:`#/properties/message/properties/replyCount/minimum`,keyword:`minimum`,params:{comparison:`>=`,limit:0},message:`must be >= 0`}],!1}var u=r===s}else var u=!0}}}}}}}}}}}}}}}else return K.errors=[{instancePath:t+`/message`,schemaPath:`#/properties/message/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}}else return K.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}return K.errors=o,s===0}K.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Cr(e){return e!==``}var wr=[];function Tr({code:e,details:t}){return e===`invalid_request`&&un(t)?t:wr}var Er=class extends Error{name=`CookoutError`;status;code;details;schemaProblems;constructor(e){super(e.message),this.status=e.status,this.code=e.code,this.details=e.details,this.schemaProblems=Tr(e)}};function Dr(e){return e instanceof Er?{code:e.code,message:e.message}:{code:`unreachable`,message:String(e)}}var Or=`/v1/events`,kr=`${Or}/:connection`,Ar={channels:`all`},jr=`refusal`,Mr=0,Nr=/\/+$/u,Pr=/\r\n\r\n|\n\n|\r\r/u,Fr=/\r\n|\n|\r/u,Ir=/^ /u,Lr=`message`,Rr=1,zr=0,Br=-1;function Vr(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))(typeof r==`string`||typeof r==`number`)&&t.set(n,String(r));return t.size===Mr?``:`?${t.toString()}`}function Hr(e){try{return{json:JSON.parse(e)}}catch{return{}}}function Ur(e,t){let n=e;for(let[e,r]of Object.entries(t))n=n.replaceAll(RegExp(`:${e}\\b`,`gu`),()=>encodeURIComponent(r));return n}function Wr(e){let[t=``,...n]=e.split(`:`);return{name:t,value:n.join(`:`).replace(Ir,``)}}function Gr(e){return e!==``&&!e.startsWith(`:`)}function Kr(e){return e.filter(e=>e.startsWith(`:`)).map(e=>({comment:e.slice(Rr).replace(Ir,``)}))}function qr(e){let t=e.split(Fr),n=t.filter(e=>Gr(e)).map(e=>Wr(e)),r=n.filter(({name:e})=>e===`data`).map(({value:e})=>e);if(r.length===Mr)return Kr(t);let[i=Lr]=n.filter(({name:e})=>e===`event`).map(({value:e})=>e).toReversed();return[{data:r.join(`
2
+ `),event:i}]}function Jr(e){let t=e.split(Pr),n=t.slice(Br).join(``);return{events:t.slice(zr,Br).flatMap(e=>qr(e)),rest:n}}function Yr(e){return{[Symbol.asyncIterator]:()=>({async next(){return await e.read()}})}}async function*Xr(e){let t=new TextDecoder,n=``;for await(let r of Yr(e)){let{events:e,rest:i}=Jr(n+t.decode(r,{stream:!0}));n=i,yield*e}}function Zr(e){return e.replace(Nr,``)}function Qr(e){let t=Ur(e.path,e.params??{});return`${Zr(e.baseUrl)}${t}${Vr(e.query??{})}`}async function $r(e,t){let n=new Headers({accept:t,...e.headers}),r={headers:n,method:e.method,redirect:`manual`};return`body`in e&&(n.set(`content-type`,`application/json`),r.body=JSON.stringify(e.body)),await fetch(Qr(e),r)}async function ei(e){let t=await e.text();return{headers:e.headers,ok:e.ok,status:e.status,text:t,...Hr(t)}}var ti=Qr;async function ni(e){return ei(await $r(e,`application/json`))}async function ri(e){let t=await $r(e,`text/event-stream`);if(!t.ok||t.body===null)return{ok:!1,response:await ei(t)};let n=t.body.getReader();return{async close(){await n.cancel()},events:Xr(n),ok:!0}}var ii=`/v1/identities/:name`,ai=`/v1/identities/:name/message-count`,oi=[`has_messages`,`owns_agents`],si=/^[a-z0-9-]{1,64}(?:\/[a-z0-9-]{1,64})?$/u;function ci(e){return si.test(e)}var li=`/v1/whoami`,ui=`/v1/identities`,di=`/v1/identities/:name/deactivate`,fi=`/v1/identities/:name/reactivate`,pi=`/v1/identities/:name/token`,mi=`/v1/identities/:name/admin`,hi=`/v1/identities/:name/owner`,gi=`/v1/identities/:name/display-name`,_i=`/v1/session`,vi=`cookout-harness`,yi=[`token_missing`,`token_unknown`,`token_revoked`,`token_expired`,`outside_command_thread`,`agent_as_human`,`admin_only`,`human_only`,`identity_exists`,`identity_not_found`,`last_admin`,`not_owner`,`owner_not_human`,`name_not_owned`,`not_deactivated`,...oi,`login_request_not_found`],bi={},xi=`COOKOUT_ALLOW_HUMAN`;function Si(){return typeof process>`u`?bi:{}}function Ci(e){return(e??``)!==``}var wi=[{isRunning:e=>e.CLAUDECODE===`1`,sessionVariables:[`CLAUDE_CODE_SESSION_ID`],tool:`claude-code`},{isRunning:e=>Ci(e.CODEX_THREAD_ID)||e.CODEX_CI===`1`,sessionVariables:[],tool:`codex`},{isRunning:e=>Ci(e.CURSOR_AGENT),sessionVariables:[],tool:`cursor`},{isRunning:e=>e.GEMINI_CLI===`1`,sessionVariables:[],tool:`gemini-cli`},{isRunning:e=>e.CLINE_ACTIVE===`true`,sessionVariables:[],tool:`cline`},{isRunning:e=>e.OPENCODE===`1`,sessionVariables:[],tool:`opencode`}],Ti=/^(?<tool>claude-code|opencode)(?:_.*)?$/u,Ei=/[^a-z0-9-]+/gu,Di=/^(?<kept>[a-z0-9-]{40}).+$/u,Oi=`unknown`;function ki(e){let t=e.replace(Ti,`$<tool>`).replaceAll(Ei,`-`).replace(/^-+/u,``).replace(Di,`$<kept>`).replace(/-+$/u,``);return t===``?Oi:t}function Ai(e){let t=(e.AI_AGENT??``).toLowerCase();return t===``?bi:{harness:ki(t)}}function ji(e){let t=e.COOKOUT_URL??``;return t===``?bi:{url:t}}function Mi(e){return Ci(e)}function Ni(e,t){let n=wi.filter(t=>t.tool===e).flatMap(e=>e.sessionVariables).map(e=>t[e]);for(let e of n)if(Mi(e))return{sessionId:e};return bi}function Pi(e){return e.find(e=>Ci(e))??``}function Fi(e,t){return Pi(t?[e.COOKOUT_SESSION,e.COOKOUT_TOKEN]:[e.COOKOUT_TOKEN,e.COOKOUT_SESSION])}function Ii(e){if(e[xi]===`1`)return bi;for(let{isRunning:t,tool:n}of wi)if(t(e))return{harness:n};return Ai(e)}function Li(e){let{harness:t=``}=Ii({...e,[xi]:``});return t===``?bi:{harness:t,...Ni(t,e)}}function Ri(e=Si()){let t=Fi(e,Ci(Li(e).harness));return t===``?ji(e):{...ji(e),token:t,...Ii(e)}}var zi=0,Bi={};function Vi(e){return typeof e==`string`?{authorization:`Bearer ${e}`}:Bi}function Hi(e){return typeof e==`string`?{[vi]:e}:Bi}function Ui({harness:e,token:t}){return{...Vi(t),...Hi(e)}}function Wi(e,t){let{harness:n,...r}=Ri(e);return typeof t.token!=`string`&&typeof n==`string`?{...r,harness:n}:r}function Gi(e,t,n){let{json:r,status:i,text:a}=n;return an(r)&&Cr(r.error.code)?new Er({...r.error,code:r.error.code,status:i}):new Er({code:`bad_response`,details:a,message:`${e} ${t} failed with ${String(i)} and no error body.`,status:i})}function Ki(e,t,{json:n,status:r}){return new Er({code:`bad_response`,details:n,message:`${e} ${t} returned a body that doesn't match the protocol.`,status:r})}async function q(e,t){let{isExpected:n,method:r,path:i,...a}=t,o=await ni({...a,baseUrl:e.url,headers:Ui(e),method:r,path:i});if(!o.ok)throw Gi(r,i,o);if(!n(o.json))throw Ki(r,i,o);return o.json}async function qi({connection:e,headers:t,path:n,query:r={}}){let i={...t,...Ui(e)},a=await ri({baseUrl:e.url,headers:i,method:`GET`,path:n,query:r});if(!a.ok)throw Gi(`GET`,n,a.response);return a}function Ji({env:e,...t}){let n={...Wi(e,t),...t},{url:r=``}=n;if(r===``)throw new Er({code:`url_missing`,message:"Set COOKOUT_URL to the cookout server's address. The cookout CLI also uses the board `cookout login` last chose.",status:zi});return{...n,url:r}}async function Yi(e,t,n){return await q(e,{isExpected:n,method:`GET`,path:t})}var Xi=`/v1/presence`,Zi=[`watch_replaced`,`offline_alert_not_found`];function Qi(){let e=null;return{current:()=>e,saw:t=>{e=t}}}var $i=200,ea=`heartbeat`,ta=`connected`,na={};function ra(e,{onHeartbeat:t}){e===ea&&typeof t==`function`&&t()}function ia({lastEventId:e}){return typeof e==`number`?{"last-event-id":String(e)}:{}}var aa={"agent-session":Ke,channel:Qe,"channel-deleted":Ye,command:it,"deactivated-quiet-agent":ut,"deactivation-offer":pt,identity:yt,"identity-deleted":gt,"inbox-item":St,message:Tt,nudge:Ot,"nudge-read":At,"offline-alert":Nt,presence:It,reaction:Ht,"read-position":Wt,"read-position-moved-back":qt,"read-receipt":Xt,subscription:$t,thread:nn};function oa(e){return Object.hasOwn(aa,e)}function sa(e){try{return JSON.parse(e)}catch{return e}}function ca(e,t){return new Er({code:`bad_response`,details:t,message:`GET ${Or} sent a ${e} event that doesn't match the protocol.`,status:$i})}function la({data:e,event:t}){let n=sa(e);if(!aa[t](n))throw ca(t,n);return n}function ua(e){return oa(e.event)?la({...e,event:e.event}):null}function da(e){let t=sa(e);return!an(t)||!Cr(t.error.code)?ca(jr,t):new Er({...t.error,code:t.error.code,status:$i})}function fa(e,{onConnected:t,saw:n}){let r=sa(e);if(!st(r))throw ca(ta,r);n(r.connectionId??null),typeof t==`function`&&t(r.latestMessageId)}function pa(e,t){if(`comment`in e)return ra(e.comment,t),[];if(e.event===`refusal`)throw da(e.data);return e.event===ta&&fa(e.data,t),[ua(e)].filter(e=>e!==null)}async function*ma(e,t){for await(let n of e)yield*pa(n,t)}async function ha(e,t){return t!==null&&await q(e,{isExpected:tt,method:`DELETE`,params:{connection:String(t)},path:kr}).then(()=>!0).catch(()=>!1)}function ga(e){return e?Ar:{}}function _a(e){return{presence:async()=>await Yi(e,Xi,zt),watch:async(t=na)=>{let{close:n,events:r}=await qi({connection:e,headers:ia(t),path:Or,query:ga(t.allChannels??!1)}),i=Qi();return{[Symbol.asyncIterator]:()=>ma(r,{...t,saw:i.saw}),close:n,closeCleanly:async()=>{await ha(e,i.current()),await n()}}}}}var va=`/v1/agent-session`,ya=`/v1/identities/:name/agent-session`,ba=[`not_your_identity`,`identity_kind`,`agent_session_live`,`identity_deactivated`,`idle_expiry_too_long`,`agent_session_required`,`agent_join_request_not_found`,`join_code_not_found`,`agent_session_revoked`,`agent_session_expired`],xa=`/v1/agent-join-requests`,Sa=`/v1/agent-join-requests/collect`,Ca=`/v1/agent-join-requests/:code`,wa=`/v1/agent-join-requests/:code/approval`,Ta=`/v1/join-codes`,Ea=`/v1/join-codes/redeem`;function Da(e){return{approveAgentJoin:async(t,n={})=>await q(e,{body:n,isExpected:ge,method:`PUT`,params:{code:t},path:wa}),collectAgentJoin:async t=>await q(e,{body:{requestId:t},isExpected:pe,method:`POST`,path:Sa}),getAgentJoinRequest:async t=>await q(e,{isExpected:ge,method:`GET`,params:{code:t},path:Ca}),startAgentJoin:async t=>await q(e,{body:t,isExpected:be,method:`POST`,path:xa})}}function Oa(e){return{createJoinCode:async t=>await q(e,{body:t,isExpected:we,method:`POST`,path:Ta}),redeemJoinCode:async t=>await q(e,{body:t,isExpected:Se,method:`POST`,path:Ea})}}function ka(e){return{...Da(e),...Oa(e),join:async t=>await q(e,{body:t,isExpected:Se,method:`POST`,path:va}),leave:async()=>await q(e,{isExpected:De,method:`DELETE`,path:va}),listAgentSessions:async t=>await q(e,{isExpected:Ae,method:`GET`,params:{name:t},path:ya}),revokeAgentSession:async t=>await q(e,{isExpected:Me,method:`DELETE`,params:{name:t},path:ya})}}var Aa=/^[a-z0-9-]{1,80}$/u;function ja(e){return Aa.test(e)}var Ma=`/v1/channels`,Na=`/v1/channels/:name`,Pa=[`channel_exists`,`channel_not_found`];function Fa(e){return{createChannel:async t=>await q(e,{body:t,isExpected:Pe,method:`POST`,path:Ma}),deleteChannel:async t=>await q(e,{isExpected:Pe,method:`DELETE`,params:{name:t},path:Na}),getChannel:async t=>await q(e,{isExpected:Pe,method:`GET`,params:{name:t},path:Na}),listChannels:async()=>await Yi(e,Ma,Ie),listSubscribedChannels:async()=>await q(e,{isExpected:Ie,method:`GET`,path:Ma,query:{subscribed:`true`}})}}var Ia=`/v1/commands`,La=`/v1/commands/:name/calls`,Ra=`/v1/commands/:name/secret`,za=[`command_exists`,`handler_not_agent`,`command_not_found`];function Ba(e){return{addCommand:async t=>await q(e,{body:t,isExpected:Be,method:`POST`,path:Ia}),callCommand:async(t,n)=>await q(e,{body:n,isExpected:Re,method:`POST`,params:{name:t},path:La}),listCommands:async()=>await q(e,{isExpected:Ue,method:`GET`,path:Ia}),rotateCommandSecret:async t=>await q(e,{isExpected:Be,method:`POST`,params:{name:t},path:Ra})}}var Va=`/v1/inbox/deactivation-offers/:id/keep`,Ha=[`deactivation_offer_not_found`],Ua=`/v1/inbox/deactivated-quiet-agents/:id/read`,Wa=[`deactivated_quiet_agent_not_found`],Ga={first:3,second:7};`${String(Ga.first)}`,`${String(Ga.first+Ga.second)}`;var Ka=`/v1/inbox/nudges/:id/read`,qa=[`nudge_not_found`],Ja=`/v1/inbox`,Ya=`/v1/inbox/history`,Xa=`/v1/inbox/alerts/:id/read`,Za=`/v1/read-positions`,Qa=`/v1/ack`,$a=`/v1/inbox/ack-all`,eo=`/v1/read-positions/unread`,to=`/v1/messages/:id/follow`,no=`/v1/channels/:name/subscription`,ro=[`rate_limited`,`too_many_streams`],io=1,ao=0,oo=1;function so(e){return Number.isSafeInteger(e)&&e>=io}function co(e){let{closedAt:t,closedBy:n,...r}=e;return r}function lo({parent:e,reply:t}){let n=e.repliers.filter(e=>e.name!==t.author.name);return{...co(e),latestReplyAt:t.createdAt,latestReplyId:t.id,repliers:[t.author,...n].slice(ao,4),replyCount:e.replyCount+oo}}var uo=/(?<=(?<![\w.@-])@)[a-z0-9-]+(?:\/[a-z0-9-]+)?/gu;function fo({message:e,parentAuthor:t}){let n=new Set(e.mentions);return e.kind===`reply`&&typeof t==`string`&&n.add(t),n.delete(e.author.name),[...n]}var po=[`thumbs_up`,`thumbs_down`],mo={thumbs_down:`👎`,thumbs_up:`👍`},ho=`/v1/messages`,go=`/v1/channels/:name/messages`,_o=`/v1/messages/:id/thread`,vo=`/v1/messages/:id/reactions/:reaction`,yo=[`message_not_found`,`reply_in_other_channel`,`reaction_not_found`],bo=`/v1/messages/:id/closed`,xo=`/v1/health`;[...yi,...Pa,...yo,...qa,...Ha,...Wa,...ba,...za,...ro,...Zi];var So=/^[A-Z0-9]{4}-[A-Z0-9]{4}$/u;function Co(e){return So.test(e)}var wo=`/v1/login-requests`,To=`/v1/login-requests/collect`,Eo=`/v1/login-requests/:code`,Do=`/v1/login-requests/:code/approval`,Oo=`/v1/login`;function ko(e){return{approveLogin:async t=>await q(e,{isExpected:rr,method:`PUT`,params:{code:t},path:Do}),collectLogin:async t=>await q(e,{body:{requestId:t},isExpected:er,method:`POST`,path:To}),getLoginRequest:async t=>await q(e,{isExpected:rr,method:`GET`,params:{code:t},path:Eo}),revokeLogin:async()=>await q(e,{isExpected:sr,method:`DELETE`,path:Oo}),startLogin:async t=>await q(e,{body:t,isExpected:ar,method:`POST`,path:wo})}}function Ao(e,t){return async()=>await q(e,{isExpected:_n,method:t,path:_i})}function jo(e,t){return async n=>await q(e,{isExpected:_n,method:t,params:{name:n},path:mi})}function Mo(e){return async(t,n)=>await q(e,{body:{displayName:n},isExpected:_n,method:`PUT`,params:{name:t},path:gi})}function No(e){return{getIdentity:async t=>await q(e,{isExpected:_n,method:`GET`,params:{name:t},path:ii}),setDescription:async(t,n)=>await q(e,{body:{description:n},isExpected:_n,method:`PATCH`,params:{name:t},path:ii})}}function Po(e){return async(t,n)=>await q(e,{body:{owner:n},isExpected:_n,method:`PUT`,params:{name:t},path:hi})}function Fo(e){return{deactivateIdentity:async t=>await q(e,{isExpected:fn,method:`POST`,params:{name:t},path:di}),reactivateIdentity:async t=>await q(e,{isExpected:bn,method:`POST`,params:{name:t},path:fi})}}function Io(e){return{countMessagesBy:async t=>await q(e,{isExpected:hn,method:`GET`,params:{name:t},path:ai}),deleteIdentity:async t=>await q(e,{isExpected:_n,method:`DELETE`,params:{name:t},path:ii})}}function Lo(e){return{createIdentity:async t=>await q(e,{body:t,isExpected:bn,method:`POST`,path:ui}),...Fo(e),...Io(e),health:async()=>await Yi(e,xo,sn),listIdentities:async(t={})=>await q(e,{isExpected:Cn,method:`GET`,path:ui,query:{...t}}),login:Ao(e,`POST`),logout:Ao(e,`DELETE`),makeAdmin:jo(e,`PUT`),removeAdmin:jo(e,`DELETE`),rotateToken:async t=>await q(e,{isExpected:bn,method:`POST`,params:{name:t},path:pi}),setDisplayName:Mo(e),transferAgent:Po(e),whoami:async()=>await Yi(e,li,_n)}}function Ro(e){return{...ko(e),...Lo(e),...No(e)}}function zo(e){return{markNudgeRead:async t=>await q(e,{isExpected:Gn,method:`POST`,params:{id:String(t)},path:Ka})}}function Bo(e){return{keepDeactivationOffer:async t=>await q(e,{isExpected:Pn,method:`POST`,params:{id:String(t)},path:Va}),markDeactivatedQuietAgentRead:async t=>await q(e,{isExpected:jn,method:`POST`,params:{id:String(t)},path:Ua})}}function Vo(e){return{markOfflineAlertRead:async t=>await q(e,{isExpected:qn,method:`POST`,params:{id:String(t)},path:Xa})}}function Ho(e,t){return async n=>await q(e,{isExpected:Ln,method:t,params:{id:String(n)},path:to})}function Uo(e,t){return async n=>await q(e,{isExpected:Qn,method:t,params:{name:n},path:no})}function Wo(e){return typeof e==`number`?{upTo:e}:e}function Go(e){return{ack:async t=>await q(e,{body:{messageId:t},isExpected:kn,method:`POST`,path:Qa}),ackAll:async t=>await q(e,{body:Wo(t),isExpected:En,method:`POST`,path:$a}),follow:Ho(e,`PUT`),inbox:async()=>await q(e,{isExpected:Vn,method:`GET`,path:Ja}),inboxHistory:async({before:t,limit:n}={})=>await q(e,{isExpected:zn,method:`GET`,path:Ya,query:{before:t,limit:n}}),markUnread:async t=>await q(e,{body:{messageId:t},isExpected:Un,method:`POST`,path:eo}),readPositions:async()=>await q(e,{isExpected:Xn,method:`GET`,path:Za}),subscribe:Uo(e,`PUT`),unfollow:Ho(e,`DELETE`),unsubscribe:Uo(e,`DELETE`)}}function Ko(e){return{...Go(e),...Vo(e),...zo(e),...Bo(e)}}var qo=`/v1/threads/open`;function Jo(e,t){return async n=>await q(e,{isExpected:xr,method:t,params:{id:String(n)},path:bo})}function Yo(e,t){return async(n,r)=>await q(e,{isExpected:gr,method:t,params:{id:String(n),reaction:r},path:vo})}var Xo={};function Zo(e){return e===!0?{all:`true`}:Xo}function Qo(e){return{closeThread:Jo(e,`PUT`),createMessage:async t=>await q(e,{body:t,isExpected:pr,method:`POST`,path:ho}),getThread:async t=>await q(e,{isExpected:yr,method:`GET`,params:{id:String(t)},path:_o}),listMessages:async(t,{before:n,limit:r}={})=>await q(e,{isExpected:lr,method:`GET`,params:{name:t},path:go,query:{before:n,limit:r}}),listOpenThreads:async({all:t,cursor:n,limit:r}={})=>await q(e,{isExpected:dr,method:`GET`,path:qo,query:{...Zo(t),cursor:n,limit:r}}),react:Yo(e,`PUT`),reopenThread:Jo(e,`DELETE`),unreact:Yo(e,`DELETE`)}}var $o=ua;function es(e={}){let t=Ji(e);return{...Ro(t),...Fa(t),...Qo(t),...ka(t),...Ko(t),..._a(t),...Ba(t)}}var ts=50,ns={status:`idle`},rs={status:`loading`};function is(e){return[...e].toSorted((e,t)=>t.message.id-e.message.id)}function as(e,t){let{hasMore:n,read:r}=e.progress();return{hasMore:n,items:is(r.values()),more:t,pageSize:e.pageSize,status:`loaded`}}function os(e,t){return!e.has(t.message.id)&&(e.isRead(t.message)||t.read)}function ss(e,t){return e.oldest===null?{limit:t}:{before:e.oldest,limit:t}}async function cs(e){let t=e.progress(),n=await e.client.inboxHistory(ss(t,e.pageSize)),r=new Map(t.read),{oldest:i}=t;for(let t of n.items)os(e.unread,t)&&r.set(t.message.id,t),i=t.message.id;return e.save({hasMore:n.hasMore,oldest:i,read:r}),r.size>t.read.size}async function ls(e){!await cs(e)&&e.progress().hasMore&&await ls(e)}async function us(e){try{await ls(e),e.publish(as(e,ns))}catch(t){e.publish({...Dr(t),status:`failed`})}}function ds(e){let t=e.state();return t.status===`loaded`&&t.hasMore&&t.more.status!==`loading`}async function fs(e){if(ds(e)){e.publish(as(e,rs));try{await ls(e),e.publish(as(e,ns))}catch(t){e.publish(as(e,{...Dr(t),status:`failed`}))}}}async function ps(e,t){await e,await fs(t)}function ms(e,t){let n=e.progress();e.save({...n,read:new Map(n.read).set(t.message.id,t)});let r=e.state();r.status===`loaded`&&e.publish(as(e,r.more))}function hs(e,t){let n=e.progress(),r=new Map(n.read);for(let e of n.read.values())t(e.message)&&r.delete(e.message.id);e.save({...n,read:r});let i=e.state();i.status===`loaded`&&e.publish(as(e,i.more))}function gs(e){let t=new Set,n=null,r={hasMore:!0,oldest:null,read:new Map},i={status:`loading`},a={client:e.client,pageSize:e.pageSize??ts,progress:()=>r,publish:e=>{i=e;for(let e of t)e()},save:e=>{r=e},state:()=>i,unread:e.unread};return{add:e=>{ms(a,e)},drop:e=>{hs(a,e)},loadMore:()=>{n=ps(n,a)},snapshot:()=>i,subscribe:e=>(t.add(e),n??=us(a),()=>{t.delete(e)})}}var _s={limit:1};function vs(e){return[...e].toSorted((e,t)=>t.id-e.id)}function ys(e){let[t=null]=e;return t===null?null:t.id}function bs(e){return{...e,read:!0}}function xs(e,t){let n=new Map,r=!1;function i(){return vs(n.values()).filter(({read:e})=>!e)}return{addAll:a=>{for(let e of a)n.set(e.id,e);r&&e.publish({deactivatedQuietAgents:vs(n.values()),status:`loaded`}),t(i())},historyRead:()=>{r=!0},unread:i}}function Ss(e,t){let n=Promise.resolve();async function r(n,r){await n;try{let{deactivatedQuietAgent:n}=await e.markDeactivatedQuietAgentRead(r);t.addAll([n])}catch{t.addAll([])}}return e=>{n=r(n,e)}}function Cs(e,t){return t.type===`deactivated-quiet-agent`&&(e.addAll([t.deactivatedQuietAgent]),!0)}function ws(e,t){let n=new Set(t.map(({id:e})=>e)),r=e.unread().filter(({id:e})=>!n.has(e));e.addAll([...r.map(e=>bs(e)),...t])}function Ts({client:e,onChange:t}){let n=se({status:`loading`}),r=xs(n,t),i=null;async function a(){try{let{deactivatedQuietAgents:t}=await e.inboxHistory(_s);r.historyRead(),r.addAll(t)}catch{n.publish({status:`failed`})}}return{markRead:Ss(e,r),newestUnread:()=>ys(r.unread()),readUpTo:e=>{r.addAll(r.unread().filter(t=>t.id<=e).map(e=>bs(e)))},receive:e=>Cs(r,e),snapshot:n.current,subscribe:e=>(i??=a(),n.subscribe(e)),unread:r.unread,unreadAre:e=>{ws(r,e)}}}var Es={limit:1};function Ds(e){return[...e].toSorted((e,t)=>t.id-e.id)}function Os(e){let[t=null]=e;return t===null?null:t.id}function ks(e){return{...e,cleared:!0}}function As(e,t){let n=new Map,r=!1;function i(){return Ds(n.values()).filter(({cleared:e})=>!e)}return{addAll:a=>{for(let e of a)n.set(e.id,e);r&&e.publish({deactivationOffers:Ds(n.values()),status:`loaded`}),t(i())},historyRead:()=>{r=!0},open:i}}function js(e,t){let n=Promise.resolve();async function r(n,r){await n;try{let{deactivationOffer:n}=await e.keepDeactivationOffer(r);t.addAll([n])}catch{t.addAll([])}}return e=>{n=r(n,e)}}function Ms(e,t){return t.type===`deactivation-offer`&&(e.addAll([t.deactivationOffer]),!0)}function Ns(e,t){let n=new Set(t.map(({id:e})=>e)),r=e.open().filter(({id:e})=>!n.has(e));e.addAll([...r.map(e=>ks(e)),...t])}function Ps({client:e,onChange:t}){let n=se({status:`loading`}),r=As(n,t),i=null;async function a(){try{let{deactivationOffers:t}=await e.inboxHistory(Es);r.historyRead(),r.addAll(t)}catch{n.publish({status:`failed`})}}return{addAll:r.addAll,clearUpTo:e=>{r.addAll(r.open().filter(t=>t.id<=e).map(e=>ks(e)))},keep:js(e,r),newestOpen:()=>Os(r.open()),open:r.open,openAre:e=>{Ns(r,e)},receive:e=>Ms(r,e),snapshot:n.current,subscribe:e=>(i??=a(),n.subscribe(e))}}var Fs={limit:1},Is=0;function Ls(e){return[...e].toSorted((e,t)=>t.id-e.id)}function Rs({read:e,...t}){return t}function zs(e,t){let n=new Map,r=!1;function i(){return Ls(n.values()).filter(({read:e})=>!e).map(e=>Rs(e))}function a(a){for(let e of a)n.set(e.id,e);r&&e.publish({nudges:Ls(n.values()),status:`loaded`}),t(i())}return{addAll:a,historyRead:()=>{r=!0},readWhere:e=>{let t=[...n.values()].filter(t=>!t.read&&e(t));return a(t.map(e=>({...e,read:!0}))),t.length>Is},unread:i}}function Bs(e){let[t=null]=e;return t===null?null:t.id}function Vs(e){return e.type===`thread`&&typeof e.parent.closedAt==`string`?e.parent.id:e.type===`message`&&e.message.kind===`reply`?e.message.replyTo:null}function Hs(e,t){if(t.type===`nudge`)return e.addAll([{...t.nudge,read:!1}]),!0;if(t.type===`nudge-read`){let n=new Set(t.nudgeIds);return e.readWhere(({id:e})=>n.has(e))}let n=Vs(t);return n!==null&&e.readWhere(({parent:e})=>e.id===n)}function Us(e,t){e.readWhere(({parent:e})=>e.id===t)}function Ws(e,t){let n=Promise.resolve();async function r(e,n){await e;try{await n()}catch{t.addAll([])}}return{close:({parent:i})=>{n=r(n,async()=>{await e.closeThread(i.id),Us(t,i.id)})},markRead:i=>{n=r(n,async()=>{let{nudge:n}=await e.markNudgeRead(i);t.addAll([n])})}}}function Gs({client:e,onChange:t}){let n=se({status:`loading`}),r=zs(n,t),i=null;async function a(){try{let{nudges:t}=await e.inboxHistory(Fs);r.historyRead(),r.addAll(t)}catch{n.publish({status:`failed`})}}return{...Ws(e,r),addAll:r.addAll,addUnread:e=>{r.addAll(e.map(e=>({...e,read:!1})))},newestUnread:()=>Bs(r.unread()),readUpTo:e=>{r.readWhere(t=>t.id<=e)},receive:e=>Hs(r,e),snapshot:n.current,subscribe:e=>(i??=a(),n.subscribe(e)),unread:r.unread}}function Ks({client:e,onChange:t}){return{deactivatedQuietAgents:Ts({client:e,onChange:e=>{t({deactivatedQuietAgents:e})}}),deactivationOffers:Ps({client:e,onChange:e=>{t({deactivationOffers:e})}}),nudges:Gs({client:e,onChange:e=>{t({nudges:e})}})}}function qs({alerts:e,deactivatedQuietAgents:t,deactivationOffers:n,items:r,markAll:i,nudges:a}){return{alerts:e.unread(),deactivatedQuietAgents:t.unread(),deactivationOffers:n.open(),inbox:r.inbox(),items:r.list(),markAll:i,nudges:a.unread(),status:`loaded`}}async function Js(e){let{alerts:t,client:n,deactivatedQuietAgents:r,deactivationOffers:i,earlier:a,items:o,markAll:s,nudges:c}=e;try{return await D({client:n,items:o,onAlerts:t.addAll,onDeactivatedQuietAgents:r.unreadAre,onDeactivationOffers:i.openAre,onNudges:c.addUnread,onRead:a.add}),qs({alerts:t,deactivatedQuietAgents:r,deactivationOffers:i,items:o,markAll:s(),nudges:c})}catch(e){return{...Dr(e),status:`failed`}}}function Ys(e,t){let n=e.current();n.status===`loaded`&&e.publish({...n,...t})}function Xs(e){let t=se({status:`loading`}),n=ee();return{alerts:fe({client:e.client,onChange:e=>{Ys(t,{alerts:e})}}),...Ks({client:e.client,onChange:e=>{Ys(t,e)}}),earlier:gs({...e,unread:n}),items:n,shown:t}}function Zs(e){let{alerts:t,client:n,deactivatedQuietAgents:r,deactivationOffers:i,earlier:a,items:o,live:s,markUnread:c,nudges:l}=e,{republish:u}=e;s!==null&&(s.subscribe(e=>{let n=[l.receive(e),i.receive(e),r.receive(e)];(c.receive(e)||o.receive(e,a.add)||t.receive(e)||n.includes(!0))&&u()}),s.onBack(k({client:n,items:o,moveBack:c.moveBack,onAlerts:t.addAll,onChange:u,onDeactivatedQuietAgents:r.unreadAre,onDeactivationOffers:i.openAre,onNudges:l.addUnread,onRead:a.add})))}var Qs=-1;function $s(e){let[t=null]=e.list().slice(Qs);return t===null?{}:{upTo:t.message.id}}function ec(e){let t=e.newestUnread();return t===null?{}:{alertsUpTo:t}}function tc(e){let t=e.newestUnread();return t===null?{}:{nudgesUpTo:t}}function nc(e){let t=e.newestOpen();return t===null?{}:{deactivationOffersUpTo:t}}function rc(e){let t=e.newestUnread();return t===null?{}:{deactivatedQuietAgentsUpTo:t}}function ic(e,{deactivatedQuietAgentsUpTo:t,deactivationOffersUpTo:n,nudgesUpTo:r}){let{deactivatedQuietAgents:i,deactivationOffers:a,nudges:o}=e;typeof r==`number`&&o.readUpTo(r),typeof n==`number`&&a.clearUpTo(n),typeof t==`number`&&i.readUpTo(t)}function ac(e){let{alerts:t,client:n,deactivationOffers:r,items:i,nudges:a,onChange:o,onRead:s}=e,c={status:`idle`},l=Promise.resolve();function u(e){c=e,o(e)}async function d(r,a){await r,u({status:`marking`});try{let{alerts:r,readPositions:o}=await n.ackAll(a);i.readAll(o,s),t.addAll(r),ic(e,a),u({status:`idle`})}catch(e){u({...Dr(e),status:`failed`})}}return{markAllRead:()=>{l=d(l,{...$s(i),...ec(t),...tc(a),...nc(r),...rc(e.deactivatedQuietAgents)})},state:()=>c}}var oc=0;function sc(e,t){return t.channel===e.channel?t.kind===`reply`?t.replyTo===e.thread:e.thread===null:!1}async function cc({client:e,messageId:t,onRefused:n}){try{let{readPosition:n}=await e.markUnread(t);return n}catch(e){return n(Dr(e)),null}}function lc({client:e,dropRead:t,items:n,onChange:r}){let i=Promise.resolve();function a(e){n.moveBack(e),t(t=>sc(e,t)&&t.id>(e.messageId??oc)),r()}async function o(){let t=await e.inbox();n.addAll(t.items)}async function s(e,t){await e,await Promise.allSettled([t()]),r()}async function c(e){let t=await cc(e);t!==null&&(a(t),await o())}return{markUnread:(t,n)=>{i=s(i,async()=>{await c({client:e,messageId:t,onRefused:n})})},moveBack:a,receive:e=>e.type===`read-position-moved-back`&&(a(e.readPosition),i=s(i,o),!0)}}function uc(e){let t=new Set,n=null;function r(){for(let e of t)e()}return{markUnread:t=>{n=null,r(),e(t,e=>{n=e,r()})},refusal:()=>n,subscribe:e=>(t.add(e),()=>{t.delete(e)})}}var dc=0,fc={expanded:!1,items:[],replyPost:null};function pc(e,t){return t===null?e.message.kind===`top-level`&&!e.reasons.includes(`reaction`):e.message.kind===`reply`&&e.parent.id===t}function mc(e,t){return t!==null&&e.channel.name===t.channel&&pc(e,t.thread)}function hc(e,t){let n=t.filter(t=>!e.some(e=>e.message.id===t.message.id));return[...e,...n].toSorted((e,t)=>e.message.id-t.message.id)}function gc(e){return e.map(e=>String(e.message.id)).join(` `)}function _c(e,t){let n=e.snapshot();return`inbox`in n?n.inbox.filter(e=>mc(e,t)):[]}function vc(e,t){let n=new Set,r=fc,i=null;function a(e){r=e;for(let e of n)e()}function o(){let n=hc(r.items,_c(e,t));n.length>dc&&gc(n)!==gc(r.items)&&a({...r,items:n})}return{chooseReplyPost:e=>{a({...r,replyPost:e})},expand:()=>{a({...r,expanded:!0})},snapshot:()=>r,subscribe:t=>(n.add(t),i??=e.subscribe(o),o(),()=>{n.delete(t),n.size===dc&&i!==null&&(i(),i=null,r=fc)})}}function yc(e){return e===null?``:`${e.channel}/${String(e.thread)}`}function bc(e){let t=new Map;return n=>{let r=yc(n),i=t.get(r)??vc(e,n);return t.set(r,i),i}}var xc=0,Sc=0;function Cc(e,t){return e===null&&t>xc?Sc:e}function wc({counts:e,movesBack:t,readPosition:n,scope:r}){let i=new Set,a=null,o=!1,s=xc,c=null;function l(){let c=e.snapshot(),l=t(r.channel,r.thread);if(!(o&&s===l||c.status!==`loaded`)){o=!0,s=l,a=Cc(n(r.channel,r.thread),l);for(let e of i)e()}}return{snapshot:()=>a,subscribe:t=>(i.add(t),c??=e.subscribe(l),l(),()=>{i.delete(t),i.size===xc&&c!==null&&(c(),c=null,o=!1,a=null)})}}function Tc({movesBack:e,readPosition:t,...n}){let r=new Map;return{...n,newLine:(i,a)=>{let o=`${i}/${String(a)}`,s=r.get(o)??wc({counts:n,movesBack:e,readPosition:t,scope:{channel:i,thread:a}});return r.set(o,s),s},selection:bc(n)}}var Ec=1,Dc={activity:0,forYou:0},Oc={count:0,forYou:0};function kc({item:e,me:t}){return e.message.kind===`reply`&&e.parent.author.name===t?`replied-to-you`:e.message.kind===`reply`?`followed-thread`:`subscribed-channel`}function Ac(e){let{reasons:t}=e.item;return t.includes(`reaction`)?`reacted`:t.includes(`mention`)?`mentioned-you`:kc(e)}function jc(e){let t=Ac(e);return t===`mentioned-you`||t===`replied-to-you`||t===`reacted`}function Mc(e,t){return t?{...e,forYou:e.forYou+Ec}:{...e,activity:e.activity+Ec}}function Nc({items:e,me:t}){let n=Dc;for(let r of e)n=Mc(n,jc({item:r,me:t}));return n}function Pc({items:e,me:t}){let n=new Map;for(let r of e){let{name:e}=r.channel;n.set(e,Mc(n.get(e)??Dc,jc({item:r,me:t})))}return n}function Fc(e,t){return t?{count:e.count+Ec,forYou:e.forYou+Ec}:{...e,count:e.count+Ec}}function Ic({items:e,me:t}){let n=new Map;for(let r of e)if(r.message.kind===`reply`&&!r.reasons.includes(`reaction`)){let e=n.get(r.parent.id)??Oc;n.set(r.parent.id,Fc(e,jc({item:r,me:t})))}return n}var Lc=[`mentioned-you`,`replied-to-you`,`reacted`,`followed-thread`,`subscribed-channel`],Rc=[];function zc({channel:e,thread:t}){return t===null?`channel ${e}`:`thread ${String(t)}`}function Bc(e){return e.reasons.includes(`reaction`)?`reactions ${String(e.message.id)}`:e.message.kind===`reply`?zc({channel:e.channel.name,thread:e.parent.id}):zc({channel:e.channel.name,thread:null})}function Vc(e){return e.message.kind===`reply`?e.parent.id:null}function Hc(e,t){let n=Ac({item:e.latest,me:t});for(let r of e.items){let e=Ac({item:r,me:t});Lc.indexOf(e)<Lc.indexOf(n)&&(n=e)}return n}function Uc(e,t,n){let{items:r,latest:i}=t;return{count:r.length,forYou:r.some(e=>jc({item:e,me:n})),items:r,key:e,latest:i,thread:Vc(i),why:Hc(t,n)}}function Wc({items:e,me:t}){let n=new Map;for(let t of e.toSorted((e,t)=>e.message.id-t.message.id)){let e=Bc(t),r=n.get(e)??{items:Rc,latest:t};n.set(e,{items:[...r.items,t],latest:t})}let r=[];for(let[e,i]of n)r.push(Uc(e,i,t));return r.toSorted((e,t)=>t.latest.message.id-e.latest.message.id)}function Gc(e){let t=null;function n(){t!==null&&(t(),t=null)}return{cancel:n,start:(r,i)=>{n(),t=e.after(r,()=>{t=null,i()})}}}var Kc=2e3,qc=5e3,Jc=0,Yc=1,Xc={held:!1,marked:!1},Zc={acked:null,first:null,newest:null};function Qc(e){return e===null?null:e.id}function $c(e){let t=e.seen.current();return t.newest!==null&&(e.seen.publish({...t,acked:t.newest.id}),e.sources.ack(t.newest.id),!0)}function el(e){let{acked:t,newest:n}=e.seen.current();return n!==null&&n.id!==t&&!e.state.current().held&&e.page.focused()}function tl(e){e.reading.cancel(),el(e)&&e.reading.start(Kc,()=>{$c(e)})}function nl(e){e.reading.cancel(),$c(e)&&(e.note.start(qc,()=>{e.state.publish({...e.state.current(),marked:!1})}),e.state.publish({...e.state.current(),marked:!0}))}function rl(e,t){return e===null||t===null?!1:t.mine}function il(e){let t=e.seen.current(),n=e.sources.newest();Qc(n)!==Qc(t.newest)&&(e.seen.publish({...t,newest:n}),rl(t.newest,n)?nl(e):tl(e))}function al(e){let t=e.seen.current();t.first===null&&e.seen.publish({...t,first:e.sources.firstUnread()})}function ol(e){let{first:t,newest:n}=e.seen.current(),r=t??Qc(n);r!==null&&(e.reading.cancel(),e.note.cancel(),e.state.publish({held:!0,marked:!1}),e.sources.markUnread(r))}function sl(e){let t=[e.sources.subscribe(()=>{il(e)}),e.sources.subscribeToUnread(()=>{al(e)}),e.page.subscribe(()=>{tl(e)})];return al(e),il(e),t}function cl(e,t){for(let e of t)e();e.reading.cancel(),e.note.cancel(),e.state.publish(Xc),e.seen.publish(Zc)}function ll(e){let t={...e,note:Gc(e.clock),reading:Gc(e.clock),seen:se(Zc),state:se(Xc)},n=[],r=Jc;return{markRead:()=>{nl(t)},markUnread:()=>{ol(t)},snapshot:t.state.current,subscribe:e=>{let i=t.state.subscribe(e);return r+=Yc,r===Yc&&(n=sl(t)),()=>{i(),r-=Yc,r===Jc&&cl(t,n)}}}}function ul(e){let t=new Map;return{reader:(n,r)=>{let i=t.get(n)??ll({...e,sources:r});return t.set(n,i),i}}}var dl=0;function fl(e){let t=new Set,n=e.focused(),r=null;function i(){let r=e.focused();if(r!==n){n=r;for(let e of t)e()}}return{focused:e.focused,subscribe:a=>(r===null&&(n=e.focused(),r=e.listen(i)),t.add(a),()=>{t.delete(a),t.size===dl&&r!==null&&(r(),r=null)})}}var pl=[`focus`,`blur`];function ml(){return{focused:()=>globalThis.document.visibilityState===`visible`&&globalThis.document.hasFocus(),listen:e=>{globalThis.document.addEventListener(`visibilitychange`,e);for(let t of pl)globalThis.addEventListener(t,e);return()=>{globalThis.document.removeEventListener(`visibilitychange`,e);for(let t of pl)globalThis.removeEventListener(t,e)}}}}var hl={after:(e,t)=>{let n=globalThis.setTimeout(t,e);return()=>{globalThis.clearTimeout(n)}}},gl=1,_l=1e3,vl=10,yl=60,bl=60,xl=1440,Sl=1,Cl=new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,minute:`2-digit`}),wl=new Intl.DateTimeFormat(`en-GB`,{dateStyle:`full`,timeStyle:`short`}),Tl=new Intl.DateTimeFormat(`en-GB`,{weekday:`long`}),El=new Intl.DateTimeFormat(`en-GB`,{day:`numeric`,month:`long`}),Dl=new Intl.DateTimeFormat(`en-GB`,{day:`numeric`,month:`short`}),Ol=new Intl.DateTimeFormat(`en-GB`,{hour:`2-digit`,hourCycle:`h23`,minute:`2-digit`}),kl={justNow:`just now`,today:`Today`,underAMinute:`under a minute`,yesterday:`Yesterday`};function Al(e,t){return e===Sl?`1 ${t} ago`:`${String(e)} ${t}s ago`}function jl(e,t){return e===Sl?`1 ${t}`:`${String(e)} ${t}s`}function Ml(e){let t=new Date;return t.setDate(t.getDate()-gl),e.toDateString()===t.toDateString()?`${kl.yesterday} ${Ol.format(e)}`:`${Dl.format(e)} ${Ol.format(e)}`}function Nl(e,t){return e<bl?Al(e,`minute`):e<xl?Al(Math.floor(e/bl),`hour`):Ml(t)}function Pl(e){let t=new Date(e);return{full:wl.format(t),iso:e,short:Cl.format(t)}}function Fl(e){return new Date(e).toDateString()}function Il(e){return Date.parse(e)}function Ll(e){return Date.parse(e)<=Date.now()}function Rl(e){let t=new Date(e),n=new Date;return n.setDate(n.getDate()-gl),t.toDateString()===new Date().toDateString()?kl.today:t.toDateString()===n.toDateString()?kl.yesterday:`${Tl.format(t)}, ${El.format(t)}`}function zl(e){let t=new Date(e),n=Math.floor((Date.now()-t.getTime())/_l);return n<vl?kl.justNow:n<yl?`${String(Math.floor(n/vl)*vl)} seconds ago`:Nl(Math.floor(n/yl),t)}function Bl(e){let t=Math.floor((Date.now()-new Date(e).getTime())/_l/yl);return t<Sl?kl.underAMinute:t<bl?jl(t,`minute`):t<xl?jl(Math.floor(t/bl),`hour`):jl(Math.floor(t/xl),`day`)}function Vl(e){let t=setInterval(e,_l);return()=>{clearInterval(t)}}function Hl(){return{clock:hl,page:fl(ml())}}function Ul(e){let t=Xs(e),{alerts:n,deactivatedQuietAgents:r,deactivationOffers:i,earlier:a,items:o,nudges:s,shown:c}=t,l=null,u=ac({...e,...t,onChange:e=>{c.publish(qs({...t,markAll:e}))},onRead:a.add});function d(){c.current().status===`loaded`&&c.publish(qs({...t,markAll:u.state()}))}let f=lc({client:e.client,dropRead:a.drop,items:o,onChange:d});async function p(){Zs({...t,client:e.client,live:e.live??null,markUnread:f,republish:d}),c.publish(await Js({...t,client:e.client,markAll:u.state}))}let m=uc(f.markUnread);return Tc({alerts:n,deactivatedQuietAgents:r,deactivationOffers:i,earlier:a,markAllRead:u.markAllRead,markUnread:m.markUnread,menu:m,movesBack:o.movesBack,nudges:s,readPosition:o.readPosition,snapshot:c.current,subscribe:e=>(l??=p(),c.subscribe(e))})}function Wl(e){return e.approved?{loginRequest:e,status:`approved`}:{loginRequest:e,status:`shown`}}function Gl(e,t){let n=new Set,r={status:`loading`},i=null;function a(e){r=e;for(let e of n)e()}async function o(e){try{let{loginRequest:t}=await e;a(Wl(t))}catch(e){a({refusal:Dr(e),status:`refused`})}}async function s(n,r){await n,a({loginRequest:r,status:`approving`}),await o(e.approveLogin(t))}return{approve:()=>{r.status===`shown`&&(i=s(i,r.loginRequest))},snapshot:()=>r,subscribe:r=>(n.add(r),i??=o(e.getLoginRequest(t)),()=>{n.delete(r)})}}function Kl(e){let t=new Map;return{forCode:n=>{let r=t.get(n)??Gl(e,n);return t.set(n,r),r}}}function ql(e){let t={agentJoinRequest:e,idleExpiry:e.idleExpiry,refusal:null,replace:!1};return e.approved?{...t,status:`approved`}:{...t,status:`shown`}}function Jl({idleExpiry:e,replace:t}){return t?{force:!0,idleExpiry:e}:{idleExpiry:e}}function Yl(){let e=new Set,t={status:`loading`};return{current:()=>t,listeners:e,publish:n=>{t=n;for(let t of e)t()}}}async function Xl({client:e,held:t,userCode:n}){try{let{agentJoinRequest:r}=await e.getAgentJoinRequest(n);t.publish(ql(r))}catch(e){t.publish({refusal:Dr(e),status:`refused`})}}async function Zl(e,t,{client:n,held:r,userCode:i}){await e,r.publish({...t,status:`approving`});try{let{agentJoinRequest:e}=await n.approveAgentJoin(i,Jl(t));r.publish({...t,agentJoinRequest:e,status:`approved`})}catch(e){r.publish({...t,refusal:Dr(e)})}}function Ql(e,t){let n=Yl(),r={client:e,held:n,userCode:t},i=null;function a(e){let t=n.current();t.status===`shown`&&n.publish({...t,...e})}return{approve:()=>{let e=n.current();e.status===`shown`&&(i=Zl(i,e,r))},editIdleExpiry:e=>{a({idleExpiry:e})},editReplace:e=>{a({replace:e})},snapshot:n.current,subscribe:e=>(n.listeners.add(e),i??=Xl(r),()=>{n.listeners.delete(e)})}}function $l(e){let t=new Map;return{forCode:n=>{let r=t.get(n)??Ql(e,n);return t.set(n,r),r}}}var eu=`token_missing`;function tu(e){return e.code===eu?null:e}function nu(e){let t=new Set,n={status:`checking`},r=null;function i(e){n=e;for(let e of t)e()}async function a(){try{let{identity:t}=await e.client.whoami();i({identity:t,status:`logged-in`})}catch(e){i({refusal:tu(Dr(e)),status:`logged-out`})}}async function o(t){i({status:`logging-in`});try{let{identity:n}=await e.clientWithToken(t).login();i({identity:n,status:`logged-in`})}catch(e){i({refusal:Dr(e),status:`logged-out`})}}async function s(e,t){await e,await o(t)}return{logIn:e=>{r=s(r??a(),e)},snapshot:()=>n,subscribe:e=>(t.add(e),r??=a(),()=>{t.delete(e)})}}var ru={"agent-session":!0,channel:!0,"channel-deleted":!0,command:!0,"deactivated-quiet-agent":!0,"deactivation-offer":!0,identity:!0,"identity-deleted":!0,"inbox-item":!0,message:!0,nudge:!0,"nudge-read":!0,"offline-alert":!0,presence:!0,reaction:!0,"read-position":!0,"read-position-moved-back":!0,"read-receipt":!0,subscription:!0,thread:!0};function iu(e){return{open:(t,n)=>{let r=new EventSource(ti({baseUrl:e,path:Or,query:Ar}));function i({data:e,type:n}){typeof e==`string`&&t({data:e,event:n})}for(let e of Object.keys(ru))r.addEventListener(e,i);r.addEventListener(`error`,()=>{n(`down`)}),r.addEventListener(`open`,()=>{n(`up`)})}}}function au(e){try{return $o(e)}catch{return null}}function ou(e){let t=[],n=new Set,r=[],i=!1,a=`up`;function o(e){if(e!==a){a=e;for(let e of n)e();if(e===`up`)for(let e of r)e()}}return{link:()=>a,onBack:e=>{r.push(e)},subscribe:n=>{t.push(n),i||(i=!0,e.open(e=>{let n=au(e);if(n!==null)for(let e of t)e(n)},o))},subscribeToLink:e=>(n.add(e),()=>{n.delete(e)})}}var su=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),J=o(((e,t)=>{t.exports=su()}))();function cu(e){return(0,J.jsx)(`fieldset`,{"aria-label":e.label,className:`flex min-w-0 flex-col gap-2 rounded-md border p-3`,children:e.children})}function lu(e){return(0,J.jsx)(`div`,{className:`p-4 text-xs text-destructive`,role:`alert`,children:e.children})}var uu=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function ee(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return ee(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function O(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ie(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ae(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ae(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+O(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),ae(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+O(a,u),c+=ae(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+O(a,u++),c+=ae(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ae(ie(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function oe(e,t,n){if(e==null)return e;var r=[],i=0;return ae(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function k(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var se=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ce(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,se)}catch(e){se(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function le(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ce(le.bind(null,e))}var ue={map:oe,forEach:function(e,t,n){oe(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return oe(e,function(){t++}),t},toArray:function(e){return oe(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ue,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=le,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return ee(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return ee(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:k}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ce,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),du=o(((e,t)=>{t.exports=uu()})),Y=l(du(),1),fu=Object.defineProperty,pu=(e,t)=>fu(e,`name`,{value:t,configurable:!0});function mu(e,t){let n=Y.createContext(t);n.displayName=e+`Context`;let r=pu(e=>{let{children:t,...r}=e,i=Y.useMemo(()=>r,Object.values(r));return(0,J.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=Y.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return pu(i,`useContext`),[r,i]}pu(mu,`createContext`);function hu(e,t=[]){let n=[];function r(t,r){let i=Y.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=pu(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=Y.useMemo(()=>o,Object.values(o));return(0,J.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=Y.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return pu(s,`useContext`),[o,s]}pu(r,`createContext`);let i=pu(()=>{let t=n.map(e=>Y.createContext(e));return pu(function(n){let r=n?.[e]||t;return Y.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,gu(i,...t)]}pu(hu,`createContextScope`);function gu(...e){let t=e[0];if(e.length===1)return t;let n=pu(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return pu(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return Y.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}pu(gu,`composeContextScopes`);var _u=Object.defineProperty,vu=(e,t)=>_u(e,`name`,{value:t,configurable:!0});function yu(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}vu(yu,`setRef`);function bu(...e){return t=>{let n=!1,r=e.map(e=>{let r=yu(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():yu(e[t],null)}}}}vu(bu,`composeRefs`);function xu(...e){return Y.useCallback(bu(...e),e)}vu(xu,`useComposedRefs`);var Su=Object.defineProperty,Cu=(e,t)=>Su(e,`name`,{value:t,configurable:!0}),wu=!!(typeof window<`u`&&window.document&&window.document.createElement);function X(e,t,{checkForDefaultPrevented:n=!0}={}){return Cu(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Cu(X,`composeEventHandlers`);function Tu(e){if(!wu)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Cu(Tu,`getOwnerWindow`);function Eu(e){if(!wu)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Cu(Eu,`getOwnerDocument`);function Du(e,t=!1){let{activeElement:n}=Eu(e);if(!n?.nodeName)return null;if(Ou(n)&&n.contentDocument)return Du(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Eu(n).getElementById(e);if(t)return t}}return n}Cu(Du,`getActiveElement`);function Ou(e){return e.tagName===`IFRAME`}Cu(Ou,`isFrame`);var ku=globalThis?.document?Y.useLayoutEffect:()=>{},Au=Object.defineProperty,ju=(e,t)=>Au(e,`name`,{value:t,configurable:!0}),Mu=Y.useId||(()=>void 0),Nu=0;function Pu(e){let[t,n]=Y.useState(Mu());return ku(()=>{e||n(e=>e??String(Nu++))},[e]),e||(t?`radix-${t}`:``)}ju(Pu,`useId`);var Fu=Object.defineProperty,Iu=(e,t)=>Fu(e,`name`,{value:t,configurable:!0}),Lu=Y.useEffectEvent,Ru=Y.useInsertionEffect;function zu(e){if(typeof Lu==`function`)return Lu(e);let t=Y.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Ru==`function`?Ru(()=>{t.current=e}):ku(()=>{t.current=e}),Y.useMemo(()=>((...e)=>t.current?.(...e)),[])}Iu(zu,`useEffectEvent`);var Bu=Object.defineProperty,Vu=(e,t)=>Bu(e,`name`,{value:t,configurable:!0}),Hu=Y.useInsertionEffect||ku;function Uu({prop:e,defaultProp:t,onChange:n=Vu(()=>{},`onChange`),caller:r}){let[i,a,o]=Wu({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,Y.useCallback(t=>{if(s){let n=Gu(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Vu(Uu,`useControllableState`);function Wu({defaultProp:e,onChange:t}){let[n,r]=Y.useState(e),i=Y.useRef(n),a=Y.useRef(t);return Hu(()=>{a.current=t},[t]),Y.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Vu(Wu,`useUncontrolledState`);function Gu(e){return typeof e==`function`}Vu(Gu,`isFunction`);var Ku=Symbol(`RADIX:SYNC_STATE`);function qu(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=zu(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=Y.useReducer((t,n)=>{if(n.type===Ku)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=Y.useRef(p);Y.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=Y.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return Y.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Ku,state:i})},[i,d.state,c]),[h,f]}Vu(qu,`useControllableStateReducer`);var Ju=o((e=>{var t=du();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),Yu=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Ju()})),Xu=l(Yu(),1),Zu=Object.defineProperty,Qu=(e,t)=>Zu(e,`name`,{value:t,configurable:!0});function $u(e){let t=Y.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=ld(r),Y.Children.forEach(r,e=>{if(ad(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;sd(n)&&typeof pd==`function`;)n=pd(n._payload);a=nd(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=Y.cloneElement(a,void 0,s):!o&&Y.Children.count(r)===1&&Y.isValidElement(r)&&(a=r);let c=a?id(a):void 0,l=xu(n,c);if(!a){if(r||r===0)throw Error(o?fd(e):dd(e));return r}let u=rd(i,a.props??{});return a.type!==Y.Fragment&&(u.ref=n?l:c),Y.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Qu($u,`createSlot`);var ed=Symbol.for(`radix.slottable`);function td(e){let t=Qu(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=ed,t}Qu(td,`createSlottable`);var nd=Qu((e,t)=>`child`in e.props?Y.isValidElement(t)?Y.cloneElement(t,void 0,e.props.children(t.props.children)):null:Y.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function rd(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=ud(a,i))}return{...e,...n}}Qu(rd,`mergeProps`);function id(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Qu(id,`getElementRef`);function ad(e){return Y.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ed}Qu(ad,`isSlottable`);var od=Symbol.for(`react.lazy`);function sd(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===od&&`_payload`in e&&cd(e._payload)}Qu(sd,`isLazyComponent`);function cd(e){return typeof e==`object`&&!!e&&`then`in e}Qu(cd,`isPromiseLike`);function ld(e){let t=e;for(;sd(t)&&typeof pd==`function`;)t=pd(t._payload);return t}Qu(ld,`useUnwrappedLazy`);function ud(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Qu(ud,`concatAriaDescribedby`);var dd=Qu(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),fd=Qu(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),pd=Y.use,md=Object.defineProperty,hd=(e,t)=>md(e,`name`,{value:t,configurable:!0}),gd=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=$u(`Primitive.${t}`),r=Y.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,J.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function _d(e,t){e&&Xu.flushSync(()=>e.dispatchEvent(t))}hd(_d,`dispatchDiscreteCustomEvent`);var vd=Object.defineProperty,yd=(e,t)=>vd(e,`name`,{value:t,configurable:!0}),bd=Y.useInsertionEffect;function xd(e){let t=Y.useRef(e);return typeof bd==`function`?bd(()=>{t.current=e}):ku(()=>{t.current=e}),Y.useMemo(()=>((...e)=>t.current?.(...e)),[])}yd(xd,`useCallbackRef`);var Sd=Object.defineProperty,Cd=(e,t)=>Sd(e,`name`,{value:t,configurable:!0}),wd=`dismissableLayer.update`,Td=`dismissableLayer.pointerDownOutside`,Ed=`dismissableLayer.focusOutside`,Dd,Od=Y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),kd=Y.forwardRef(Cd(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=Y.useContext(Od),[d,f]=Y.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=Y.useState({}),h=xu(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=Y.useRef(!1),C=Md(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:Y.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=Nd(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=xd(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return Y.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),Y.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Dd=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Pd(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Dd))}},[d,p,n,u]),Y.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Pd())},[d,u]),Y.useEffect(()=>{let e=Cd(()=>m({}),`handleUpdate`);return document.addEventListener(wd,e),()=>document.removeEventListener(wd,e)},[]),(0,J.jsx)(gd.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:X(e.onFocusCapture,w.onFocusCapture),onBlurCapture:X(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function Ad(){let e=Y.useContext(Od),[t,n]=Y.useState(null);return Y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Cd(Ad,`useDismissableLayerSurface`);var jd=Cd(()=>!0,`IS_TRUE`);function Md(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=jd}=t,s=xd(e),c=Y.useRef(!1),l=Y.useRef(!1),u=Y.useRef(new Map),d=Y.useRef(()=>{});return Y.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}Cd(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Cd(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}Cd(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Cd(p,`handleInteractionBubble`);let m=Cd(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||Fd(Td,s,p,{discrete:!0})};if(Cd(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:Cd(()=>c.current=!0,`onPointerDownCapture`)}}Cd(Md,`usePointerDownOutside`);function Nd(e,t=globalThis?.document){let n=xd(e),r=Y.useRef(!1);return Y.useEffect(()=>{let e=Cd(e=>{e.target&&!r.current&&Fd(Ed,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Cd(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Cd(()=>r.current=!1,`onBlurCapture`)}}Cd(Nd,`useFocusOutside`);function Pd(){let e=new CustomEvent(wd);document.dispatchEvent(e)}Cd(Pd,`dispatchUpdate`);function Fd(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?_d(i,a):i.dispatchEvent(a)}Cd(Fd,`handleAndDispatchCustomEvent`);var Id=Object.defineProperty,Ld=(e,t)=>Id(e,`name`,{value:t,configurable:!0}),Rd=`focusScope.autoFocusOnMount`,zd=`focusScope.autoFocusOnUnmount`,Bd={bubbles:!1,cancelable:!0},Vd=Y.forwardRef(Ld(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=Y.useState(null),u=xd(a),d=xd(o),f=Y.useRef(null),p=xu(t,l),m=Y.useRef(i);Y.useEffect(()=>{m.current=i});let h=Y.useCallback(e=>e?c?.contains(e)?!0:!!m.current?.some(t=>t.contains(e)):!1,[c]),g=Y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Y.useEffect(()=>{if(r){let e=function(e){if(g.paused||!c)return;let t=e.target;h(t)?f.current=t:Qd(f.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;t!==null&&(h(t)||Qd(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Qd(c)};Ld(e,`handleFocusIn`),Ld(t,`handleFocusOut`),Ld(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,g.paused,h]),Y.useEffect(()=>{if(c){$d.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(Rd,Bd);c.addEventListener(Rd,u),c.dispatchEvent(t),t.defaultPrevented||(Kd(nf(Jd(c)),{select:!0}),document.activeElement===e&&Qd(c))}return()=>{c.removeEventListener(Rd,u);let t=c.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(zd,Bd);c.addEventListener(zd,d),c.dispatchEvent(r),r.defaultPrevented||Qd(e??t.body,{select:!0}),c.removeEventListener(zd,d),$d.remove(g)},0)}}},[c,u,d,g]);let _=Y.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=qd(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Qd(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Qd(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,J.jsx)(gd.div,{tabIndex:-1,...s,ref:p,onKeyDown:_})},`FocusScope`)),Hd=Y.createContext(null);function Ud({registry:e,children:t}){return e?(0,J.jsx)(Hd.Provider,{value:e,children:t}):t}Ld(Ud,`FocusScopeBranchProvider`);function Wd(){let[e,t]=Y.useState([]);return{nodes:e,registry:Y.useMemo(()=>({add:Ld(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:Ld(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}Ld(Wd,`useFocusScopeBranchRegistry`);function Gd(e){let t=Y.useContext(Hd);Y.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}Ld(Gd,`useFocusScopeBranch`);function Kd(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Qd(r,{select:t}),document.activeElement!==n)return}Ld(Kd,`focusFirst`);function qd(e){let t=Jd(e);return[Yd(t,e),Yd(t.reverse(),e)]}Ld(qd,`getTabbableEdges`);function Jd(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Ld(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Ld(Jd,`getTabbableCandidates`);function Yd(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Xd(r,{upTo:t})))return r}Ld(Yd,`findVisible`);function Xd(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}Ld(Xd,`isHidden`);function Zd(e){return e.tagName===`INPUT`&&typeof e.select==`function`}Ld(Zd,`isSelectableInput`);function Qd(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&Zd(e)&&t&&e.select()}}Ld(Qd,`focus`);var $d=ef();function ef(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=tf(e,t),e.unshift(t)},remove(t){e=tf(e,t),e[0]?.resume()}}}Ld(ef,`createFocusScopesStack`);function tf(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Ld(tf,`arrayRemove`);function nf(e){return e.filter(e=>e.tagName!==`A`)}Ld(nf,`removeLinks`);var rf=Object.defineProperty,af=Y.forwardRef(((e,t)=>rf(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=Y.useState(!1);ku(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Xu.createPortal((0,J.jsx)(gd.div,{...r,ref:t}),o):null},`Portal`)),of=Object.defineProperty,sf=(e,t)=>of(e,`name`,{value:t,configurable:!0});function cf(e,t){return Y.useReducer((e,n)=>t[e][n]??e,e)}sf(cf,`useStateMachine`);var lf=sf(e=>{let{present:t,children:n}=e,r=uf(t),i=typeof n==`function`?n({present:r.isPresent}):Y.Children.only(n),a=ff(r.ref,mf(i));return typeof n==`function`||r.isPresent?Y.cloneElement(i,{ref:a}):null},`Presence`);function uf(e){let[t,n]=Y.useState(),r=Y.useRef(null),i=Y.useRef(e),a=Y.useRef(`none`),o=Y.useRef(void 0),[s,c]=cf(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return Y.useEffect(()=>{s===`mounted`?(a.current=o.current??pf(r.current),o.current=void 0):a.current=`none`},[s]),ku(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=pf(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),ku(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=sf(a=>{let o=pf(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=sf(e=>{e.target===t&&(a.current=pf(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:Y.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=pf(t)}else r.current=null;n(e)},[])}}sf(uf,`usePresence`);function df(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}sf(df,`setRef`);function ff(...e){let t=Y.useRef(e);return t.current=e,Y.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=df(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():df(n[e],null)}}},[])}sf(ff,`useStableComposedRefs`);function pf(e){return e?.animationName||`none`}sf(pf,`getAnimationName`);function mf(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}sf(mf,`getElementRef`);var hf=Object.defineProperty,gf=(e,t)=>hf(e,`name`,{value:t,configurable:!0}),_f=0,vf=null;function yf(e){return bf(),e.children}gf(yf,`FocusGuards`);function bf(){Y.useEffect(()=>{vf||={start:xf(),end:xf()};let{start:e,end:t}=vf;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),_f++,()=>{_f===1&&(vf?.start.remove(),vf?.end.remove(),vf=null),_f=Math.max(0,_f-1)}},[])}gf(bf,`useFocusGuards`);function xf(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}gf(xf,`createFocusGuard`);var Sf=function(){return Sf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Sf.apply(this,arguments)};function Cf(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function wf(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Tf=`right-scroll-bar-position`,Ef=`width-before-scroll-bar`,Df=`with-scroll-bars-hidden`,Of=`--removed-body-scroll-bar-size`;function kf(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Af(e,t){var n=(0,Y.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var jf=typeof window<`u`?Y.useLayoutEffect:Y.useEffect,Mf=new WeakMap;function Nf(e,t){var n=Af(t||null,function(t){return e.forEach(function(e){return kf(e,t)})});return jf(function(){var t=Mf.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||kf(e,null)}),i.forEach(function(e){r.has(e)||kf(e,a)})}Mf.set(n,e)},[e]),n}function Pf(e){return e}function Ff(e,t){t===void 0&&(t=Pf);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function If(e){e===void 0&&(e={});var t=Ff(null);return t.options=Sf({async:!0,ssr:!1},e),t}var Lf=function(e){var t=e.sideCar,n=Cf(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return Y.createElement(r,Sf({},n))};Lf.isSideCarExport=!0;function Rf(e,t){return e.useMedium(t),Lf}var zf=If(),Bf=function(){},Vf=Y.forwardRef(function(e,t){var n=Y.useRef(null),r=Y.useState({onScrollCapture:Bf,onWheelCapture:Bf,onTouchMoveCapture:Bf}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Cf(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Nf([n,t]),C=Sf(Sf({},b),i);return Y.createElement(Y.Fragment,null,u&&Y.createElement(x,{sideCar:zf,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?Y.cloneElement(Y.Children.only(s),Sf(Sf({},C),{ref:S})):Y.createElement(v,Sf({},C,{className:c,ref:S}),s))});Vf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Vf.classNames={fullWidth:Ef,zeroRight:Tf};var Hf=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Uf(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Hf();return t&&e.setAttribute(`nonce`,t),e}function Wf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Gf(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Kf=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Uf())&&(Wf(t,n),Gf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qf=function(){var e=Kf();return function(t,n){Y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Jf=function(){var e=qf();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Yf={left:0,top:0,right:0,gap:0},Xf=function(e){return parseInt(e||``,10)||0},Zf=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Xf(n),Xf(r),Xf(i)]},Qf=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Yf;var t=Zf(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},$f=Jf(),ep=`data-scroll-locked`,tp=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
3
+ .${Df} {
4
+ overflow: hidden ${r};
5
+ padding-right: ${s}px ${r};
6
+ }
7
+ body[${ep}] {
8
+ overflow: hidden ${r};
9
+ overscroll-behavior: contain;
10
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
11
+ padding-left: ${i}px;
12
+ padding-top: ${a}px;
13
+ padding-right: ${o}px;
14
+ margin-left:0;
15
+ margin-top:0;
16
+ margin-right: ${s}px ${r};
17
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
18
+ }
19
+
20
+ .${Tf} {
21
+ right: ${s}px ${r};
22
+ }
23
+
24
+ .${Ef} {
25
+ margin-right: ${s}px ${r};
26
+ }
27
+
28
+ .${Tf} .${Tf} {
29
+ right: 0 ${r};
30
+ }
31
+
32
+ .${Ef} .${Ef} {
33
+ margin-right: 0 ${r};
34
+ }
35
+
36
+ body[${ep}] {
37
+ ${Of}: ${s}px;
38
+ }
39
+ `},np=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},rp=function(){Y.useEffect(function(){return document.body.setAttribute(ep,(np()+1).toString()),function(){var e=np()-1;e<=0?document.body.removeAttribute(ep):document.body.setAttribute(ep,e.toString())}},[])},ip=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;rp();var a=Y.useMemo(function(){return Qf(i)},[i]);return Y.createElement($f,{styles:tp(a,!t,i,n?``:`!important`)})},ap=!1;if(typeof window<`u`)try{var op=Object.defineProperty({},"passive",{get:function(){return ap=!0,!0}});window.addEventListener(`test`,op,op),window.removeEventListener(`test`,op,op)}catch{ap=!1}var sp=ap?{passive:!1}:!1,cp=function(e){return e.tagName===`TEXTAREA`},lp=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!cp(e)&&n[t]===`visible`)},up=function(e){return lp(e,`overflowY`)},dp=function(e){return lp(e,`overflowX`)},fp=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),hp(e,r)){var i=gp(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},pp=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},mp=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},hp=function(e,t){return e===`v`?up(t):dp(t)},gp=function(e,t){return e===`v`?pp(t):mp(t)},_p=function(e,t){return e===`h`&&t===`rtl`?-1:1},vp=function(e,t,n,r,i){var a=_p(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=gp(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&hp(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},yp=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bp=function(e){return[e.deltaX,e.deltaY]},xp=function(e){return e&&`current`in e?e.current:e},Sp=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Cp=function(e){return`
40
+ .block-interactivity-${e} {pointer-events: none;}
41
+ .allow-interactivity-${e} {pointer-events: all;}
42
+ `},wp=0,Tp=[];function Ep(e){var t=Y.useRef([]),n=Y.useRef([0,0]),r=Y.useRef(),i=Y.useState(wp++)[0],a=Y.useState(Jf)[0],o=Y.useRef(e);Y.useEffect(function(){o.current=e},[e]),Y.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=wf([e.lockRef.current],(e.shards||[]).map(xp),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=Y.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=yp(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=fp(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=fp(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return vp(h,t,e,h===`h`?s:c,!0)},[]),c=Y.useCallback(function(e){var n=e;if(Tp.length&&Tp[Tp.length-1]===a){var r=`deltaY`in n?bp(n):yp(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Sp(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(xp).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=Y.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Dp(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=Y.useCallback(function(e){n.current=yp(e),r.current=void 0},[]),d=Y.useCallback(function(t){l(t.type,bp(t),t.target,s(t,e.lockRef.current))},[]),f=Y.useCallback(function(t){l(t.type,yp(t),t.target,s(t,e.lockRef.current))},[]);Y.useEffect(function(){return Tp.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,sp),document.addEventListener(`touchmove`,c,sp),document.addEventListener(`touchstart`,u,sp),function(){Tp=Tp.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,sp),document.removeEventListener(`touchmove`,c,sp),document.removeEventListener(`touchstart`,u,sp)}},[]);var p=e.removeScrollBar,m=e.inert;return Y.createElement(Y.Fragment,null,m?Y.createElement(a,{styles:Cp(i)}):null,p?Y.createElement(ip,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Dp(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Op=Rf(zf,Ep),kp=Y.forwardRef(function(e,t){return Y.createElement(Vf,Sf({},e,{ref:t,sideCar:Op}))});kp.classNames=Vf.classNames;var Ap=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},jp=new WeakMap,Mp=new WeakMap,Np={},Pp=0,Fp=function(e){return e&&(e.host||Fp(e.parentNode))},Ip=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Fp(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Lp=function(e,t,n,r){var i=Ip(t,Array.isArray(e)?e:[e]);Np[n]||(Np[n]=new WeakMap);var a=Np[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(jp.get(e)||0)+1,l=(a.get(e)||0)+1;jp.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Mp.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Pp++,function(){o.forEach(function(e){var t=jp.get(e)-1,i=a.get(e)-1;jp.set(e,t),a.set(e,i),t||(Mp.has(e)||e.removeAttribute(r),Mp.delete(e)),i||e.removeAttribute(n)}),Pp--,Pp||(jp=new WeakMap,jp=new WeakMap,Mp=new WeakMap,Np={})}},Rp=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ap(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Lp(r,i,n,`aria-hidden`)):function(){return null}},zp=Object.defineProperty,Bp=(e,t)=>zp(e,`name`,{value:t,configurable:!0}),Vp=`Dialog`,[Hp,Up]=hu(Vp),[Wp,Gp]=Hp(Vp),Kp=Bp(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=Y.useRef(null),c=Y.useRef(null),{nodes:l,registry:u}=Wd(),[d,f]=Uu({prop:r,defaultProp:i??!1,onChange:a,caller:Vp}),[p,m]=Y.useState(0),[h,g]=Y.useState(0);return(0,J.jsx)(Wp,{scope:t,triggerRef:s,contentRef:c,contentId:Pu(),titleId:Pu(),descriptionId:Pu(),titlePresent:p>0,descriptionPresent:h>0,setTitleCount:m,setDescriptionCount:g,open:d,onOpenChange:f,onOpenToggle:Y.useCallback(()=>f(e=>!e),[f]),modal:o,branchNodes:l,branchRegistry:u,children:n})},`Dialog`),qp=`DialogTrigger`,Jp=Y.forwardRef(Bp(function(e,t){let{__scopeDialog:n,...r}=e,i=Gp(qp,n),a=xu(t,i.triggerRef);return(0,J.jsx)(gd.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":pm(i.open),...r,ref:a,onClick:X(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),Yp=`DialogPortal`,[Xp,Zp]=Hp(Yp,{forceMount:void 0}),Qp=Bp(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Gp(Yp,t);return(0,J.jsx)(Xp,{scope:t,forceMount:n,children:Y.Children.map(r,e=>(0,J.jsx)(lf,{present:n||a.open,children:(0,J.jsx)(af,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),$p=`DialogOverlay`,em=Y.forwardRef(Bp(function(e,t){let n=Zp($p,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Gp($p,e.__scopeDialog);return a.modal?(0,J.jsx)(lf,{present:r||a.open,children:(0,J.jsx)(nm,{...i,ref:t})}):null},`DialogOverlay`)),tm=$u(`DialogOverlay.RemoveScroll`),nm=Y.forwardRef(Bp(function(e,t){let{__scopeDialog:n,...r}=e,i=Gp($p,n),a=xu(t,Ad());return(0,J.jsx)(kp,{as:tm,allowPinchZoom:!0,shards:Y.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,J.jsx)(gd.div,{"data-state":pm(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),rm=`DialogContent`,im=Y.forwardRef(Bp(function(e,t){let n=Zp(rm,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Gp(rm,e.__scopeDialog);return(0,J.jsx)(lf,{present:r||a.open,children:a.modal?(0,J.jsx)(am,{...i,ref:t}):(0,J.jsx)(om,{...i,ref:t})})},`DialogContent`)),am=Y.forwardRef(Bp(function(e,t){let n=Gp(rm,e.__scopeDialog),r=Y.useRef(null),i=xu(t,n.contentRef,r);return Y.useEffect(()=>{let e=r.current;if(e)return Rp(e)},[]),(0,J.jsx)(sm,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:X(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:X(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),om=Y.forwardRef(Bp(function(e,t){let n=Gp(rm,e.__scopeDialog),r=Y.useRef(!1),i=Y.useRef(!1);return(0,J.jsx)(sm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),sm=Y.forwardRef(Bp(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=Gp(rm,n);return bf(),(0,J.jsx)(Ud,{registry:l.branchRegistry,children:(0,J.jsx)(Vd,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,J.jsx)(kd,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?fm(o,l.descriptionId):o,"data-state":pm(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),cm=Y.forwardRef(Bp(function(e,t){let{__scopeDialog:n,...r}=e,i=Gp(`DialogTitle`,n),{setTitleCount:a}=i;return ku(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,J.jsx)(gd.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),lm=Y.forwardRef(Bp(function(e,t){let{__scopeDialog:n,...r}=e,i=Gp(`DialogDescription`,n),{setDescriptionCount:a}=i;return ku(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,J.jsx)(gd.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),um=`DialogClose`,dm=Y.forwardRef(Bp(function(e,t){let{__scopeDialog:n,...r}=e,i=Gp(um,n);return(0,J.jsx)(gd.button,{type:`button`,...r,ref:t,onClick:X(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function fm(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Bp(fm,`concatAriaDescribedby`);function pm(e){return e?`open`:`closed`}Bp(pm,`getState`);var mm=Object.defineProperty,hm=(e,t)=>mm(e,`name`,{value:t,configurable:!0}),[gm,_m]=hu(`AlertDialog`,[Up]),vm=Up(),ym=hm(e=>{let{__scopeAlertDialog:t,...n}=e,r=vm(t);return(0,J.jsx)(Kp,{...r,...n,modal:!0})},`AlertDialog`);Y.forwardRef(hm(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=vm(n);return(0,J.jsx)(Jp,{...i,...r,ref:t})},`AlertDialogTrigger`));var bm=hm(e=>{let{__scopeAlertDialog:t,...n}=e,r=vm(t);return(0,J.jsx)(Qp,{...r,...n})},`AlertDialogPortal`),xm=Y.forwardRef(hm(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=vm(n);return(0,J.jsx)(em,{...i,...r,ref:t})},`AlertDialogOverlay`)),[Sm,Cm]=gm(`AlertDialogContent`),wm=Y.forwardRef(hm(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=vm(n),o=xu(t,Y.useRef(null)),s=Y.useRef(null);return(0,J.jsx)(Sm,{scope:n,cancelRef:s,children:(0,J.jsx)(im,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:X(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),Tm=Y.forwardRef(hm(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=vm(n);return(0,J.jsx)(cm,{...i,...r,ref:t})},`AlertDialogTitle`)),Em=Y.forwardRef(hm(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=vm(n);return(0,J.jsx)(lm,{...i,...r,ref:t})},`AlertDialogDescription`));Y.forwardRef(hm(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=vm(n);return(0,J.jsx)(dm,{...i,...r,ref:t})},`AlertDialogAction`));var Dm=`AlertDialogCancel`,Om=Y.forwardRef(hm(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Cm(Dm,n),a=vm(n),o=xu(t,i);return(0,J.jsx)(dm,{...a,...r,ref:o})},`AlertDialogCancel`)),km={cancel:`Cancel`,pending:`Working…`},Am=`rounded-md border px-3 py-1.5 text-xs font-medium transition-opacity hover:opacity-90 disabled:opacity-50`;function jm(e){return e?`destructive`:`default`}function Mm(e){return e?`border-destructive bg-destructive text-background`:`bg-foreground text-background`}function Nm(e){let t=e.onConfirm;return(0,J.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,J.jsx)(Om,{asChild:!0,children:(0,J.jsx)(`button`,{className:`rounded-md px-3 py-1.5 text-xs text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50`,disabled:e.pending,type:`button`,children:km.cancel})}),(0,J.jsxs)(`button`,{"aria-busy":e.pending,className:`${Am} ${Mm(e.destructive)}`,"data-tone":jm(e.destructive),disabled:e.pending,onClick:t,type:`button`,children:[e.pending&&km.pending,!e.pending&&e.confirm]})]})}function Pm(e){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Tm,{asChild:!0,children:(0,J.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:e.title})}),(0,J.jsx)(Em,{asChild:!0,children:(0,J.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.body})})]})}function Fm(){let e=(0,Y.useRef)(null);return(0,Y.useMemo)(()=>({onClose:t=>{t.preventDefault();let n=e.current;n instanceof HTMLElement&&n.isConnected&&n.focus()},onOpen:()=>{e.current=globalThis.document.activeElement}}),[])}function Im(e){let t=Fm(),n=t.onOpen,r=t.onClose,i=e.onConfirm;return(0,J.jsx)(wm,{asChild:!0,onCloseAutoFocus:r,onOpenAutoFocus:n,children:(0,J.jsxs)(`div`,{className:`fixed top-1/2 left-1/2 z-50 grid w-[calc(100%-2rem)] max-w-md -translate-1/2 gap-3 rounded-lg border bg-background p-5 shadow-lg`,children:[(0,J.jsx)(Pm,{body:e.body,title:e.title}),e.error!==null&&(0,J.jsx)(`p`,{className:`text-xs text-destructive`,role:`alert`,children:e.error}),(0,J.jsx)(Nm,{confirm:e.confirm,destructive:e.destructive,onConfirm:i,pending:e.pending})]})})}function Lm(){return(0,J.jsx)(xm,{asChild:!0,children:(0,J.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/60`})})}function Rm(e){let{onCancel:t}=e,n=e.onConfirm,r=(0,Y.useCallback)(e=>{e||t()},[t]);return(0,J.jsx)(ym,{onOpenChange:r,open:e.open,children:(0,J.jsxs)(bm,{children:[(0,J.jsx)(Lm,{}),(0,J.jsx)(Im,{body:e.body,confirm:e.confirm,destructive:e.destructive,error:e.error,onConfirm:n,pending:e.pending,title:e.title})]})})}function zm(e){return(0,J.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.children})}function Bm(e){return(0,J.jsx)(`code`,{"aria-label":e.label,className:`rounded-md border bg-surface px-2 py-1 font-mono text-xs break-all`,children:e.token})}function Vm(e){return(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`rounded-md border bg-muted px-1.5 py-0.5 font-mono text-[13px]`,children:e.command}),(0,J.jsx)(`code`,{"aria-label":e.label,className:`font-mono text-xs break-all text-muted-foreground`,children:JSON.stringify(e.value)})]})}var Hm=`#`;function Um(e){return(0,J.jsxs)(`div`,{className:`px-5 pt-10 pb-4`,children:[(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`mb-2 flex h-10 w-10 items-center justify-center rounded-xl bg-accent text-lg text-muted-foreground`,children:Hm}),(0,J.jsx)(`h2`,{className:`text-lg font-semibold`,children:e.title}),(0,J.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.description})]})}var Wm=2,Gm={closed:`▸ data`,open:`▾ data`};function Km(e){return(0,J.jsxs)(`details`,{className:`group/data`,children:[(0,J.jsxs)(`summary`,{className:`w-fit cursor-pointer list-none font-mono text-[11px] text-muted-foreground hover:text-foreground`,children:[(0,J.jsx)(`span`,{className:`group-open/data:hidden`,children:Gm.closed}),(0,J.jsx)(`span`,{className:`hidden group-open/data:inline`,children:Gm.open})]}),(0,J.jsx)(`pre`,{"aria-label":e.label,className:`mt-1 overflow-x-auto rounded-md border bg-card px-3 py-2 font-mono text-xs`,children:JSON.stringify(e.value,null,Wm)})]})}function qm(e){return(0,J.jsx)(`div`,{className:`message-text text-[14.5px] leading-relaxed break-words`,children:e.children})}function Jm(e){return(0,J.jsxs)(`div`,{className:`my-3 flex items-center px-5`,children:[(0,J.jsx)(`hr`,{"aria-label":e.label,className:`h-px flex-1 border-0 bg-border`}),(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`mx-3 rounded-full border bg-background px-2.5 py-0.5 text-[11px] font-medium text-muted-foreground`,children:e.label}),(0,J.jsx)(`span`,{className:`h-px flex-1 bg-border`})]})}var Ym=Object.defineProperty,Xm=(e,t)=>Ym(e,`name`,{value:t,configurable:!0});function Zm(e){let t=e+`CollectionProvider`,[n,r]=hu(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Xm(e=>{let{scope:t,children:n}=e,r=Y.useRef(null),a=Y.useRef(new Map).current;return(0,J.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=$u(s),l=Y.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=xu(t,a(s,n).collectionRef);return(0,J.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=$u(u),p=Y.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=Y.useRef(null),s=xu(t,o),c=a(u,n);return Y.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,J.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return Y.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Xm(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}Xm(Zm,`createCollection`);var Qm=new WeakMap,$m=class e extends Map{static{Xm(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Qm.set(this,!0)}set(e,t){return Qm.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=nh(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=eh(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=eh(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return eh(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function eh(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=th(e,t);return n===-1?void 0:e[n]}Xm(eh,`at`);function th(e,t){let n=e.length,r=nh(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Xm(th,`toSafeIndex`);function nh(e){return e!==e||e===0?0:Math.trunc(e)}Xm(nh,`toSafeInteger`);function rh(e){let t=e+`CollectionProvider`,[n,r]=hu(t),[i,a]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[o,s]=n(t);o.displayName=e+`CollectionStatefulContextProvider`;let c=Xm(({state:e,...t})=>e?(0,J.jsx)(u,{...t,state:e}):(0,J.jsx)(l,{...t}),`CollectionProvider`);c.displayName=t;let l=Xm(e=>{let t=_();return(0,J.jsx)(u,{...e,state:t})},`CollectionInit`);l.displayName=e+`CollectionInit`;let u=Xm(e=>{let{scope:t,children:n,state:r}=e,a=Y.useRef(null),[s,c]=Y.useState(null),l=xu(a,c),[u,d]=r,f=Y.useRef(new $m),p=Y.useCallback(()=>{let e=f.current;return oh(e)||e.sort(sh),e},[]);return Y.useEffect(()=>{if(!s)return;let e=ch(()=>{d(e=>{let t=e.toSorted(sh);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,d]),(0,J.jsx)(i,{scope:t,collectionElementRef:l,collectionElementRefObject:a,getCollection:p,setCollection:d,registryRef:f,children:(0,J.jsx)(o,{scope:t,collectionElement:s,collection:u,children:n})})},`CollectionProviderImpl`);u.displayName=e+`CollectionProviderImpl`;let d=e+`CollectionSlot`,f=$u(d),p=Y.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=xu(t,a(d,n).collectionElementRef);return(0,J.jsx)(f,{ref:i,children:r})});p.displayName=d;let m=e+`CollectionItemSlot`,h=$u(m),g=Y.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=Y.useRef(null),{setCollection:s,registryRef:c}=a(m,n),l=Y.useRef(i);ih(l.current,i)||(l.current=i);let u=l.current,d=xu(t,Y.useCallback(e=>{let t=c.current;e?t.set(e,{...l.current,element:e}):o.current&&t.delete(o.current)},[c]),o);ku(()=>{let e=o.current,t=c.current;e&&t.has(e)&&t.set(e,{...u,element:e})},[u,c]);let f=Y.useRef(null);return Y.useEffect(()=>{let e=o.current,t=f.current;((t?.element??null)!==e||e&&t?.itemData!==u)&&(f.current=e?{element:e,itemData:u}:null,s(n=>{let r=new $m(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...u,element:e}),r.sort(sh)}))}),Y.useEffect(()=>()=>{let e=f.current;f.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new $m(t);return n.delete(e.element),n})},[s]),(0,J.jsx)(h,{"data-radix-collection-item":``,ref:d,children:r})});g.displayName=m;function _(){return Y.useState(new $m)}Xm(_,`useInitCollection`);function v(t){let{collection:n}=s(e+`CollectionConsumer`,t);return n}Xm(v,`useCollection`);function y(t){let{getCollection:n}=a(e+`CollectionConsumer`,t);return n}return Xm(y,`useGetCollection`),[{Provider:c,Slot:p,ItemSlot:g},{createCollectionScope:r,useCollection:v,useGetCollection:y,useInitCollection:_}]}Xm(rh,`createCollection`);function ih(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Xm(ih,`shallowEqual`);function ah(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Xm(ah,`isElementPreceding`);function oh(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}Xm(oh,`isInDocumentOrder`);function sh(e,t){return!e[1].element||!t[1].element?0:ah(e[1].element,t[1].element)?-1:1}Xm(sh,`sortByDocumentPosition`);function ch(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Xm(ch,`getChildListObserver`);var lh=Object.defineProperty,uh=(e,t)=>lh(e,`name`,{value:t,configurable:!0}),dh={LTR:`ltr`,RTL:`rtl`},fh=Y.createContext(void 0);function ph(e){let t=Y.useContext(fh);return e||t||dh.LTR}uh(ph,`useDirection`);var mh=[`top`,`right`,`bottom`,`left`],hh=Math.min,gh=Math.max,_h=Math.round,vh=Math.floor,yh=e=>({x:e,y:e}),bh={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function xh(e,t,n){return gh(e,hh(t,n))}function Sh(e,t){return typeof e==`function`?e(t):e}function Ch(e){return e.split(`-`)[0]}function wh(e){return e.split(`-`)[1]}function Th(e){return e===`x`?`y`:`x`}function Eh(e){return e===`y`?`height`:`width`}function Dh(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Oh(e){return Th(Dh(e))}function kh(e,t,n){n===void 0&&(n=!1);let r=wh(e),i=Oh(e),a=Eh(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Rh(o)),[o,Rh(o)]}function Ah(e){let t=Rh(e);return[jh(e),t,jh(t)]}function jh(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Mh=[`left`,`right`],Nh=[`right`,`left`],Ph=[`top`,`bottom`],Fh=[`bottom`,`top`];function Ih(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Nh:Mh:t?Mh:Nh;case`left`:case`right`:return t?Ph:Fh;default:return[]}}function Lh(e,t,n,r){let i=wh(e),a=Ih(Ch(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(jh)))),a}function Rh(e){let t=Ch(e);return bh[t]+e.slice(t.length)}function zh(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Bh(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:zh(e)}function Vh(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Hh(e,t,n){let{reference:r,floating:i}=e,a=Dh(t),o=Oh(t),s=Eh(o),c=Ch(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=wh(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Uh(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Sh(t,e),p=Bh(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Vh(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Vh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Wh=50,Gh=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Uh},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Hh(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Wh&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Hh(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Kh=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Sh(e,t)||{};if(l==null)return{};let d=Bh(u),f={x:n,y:r},p=Oh(i),m=Eh(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=hh(d[_],T),ee=hh(d[v],T),te=C-h[m]-ee,D=C/2-h[m]/2+w,ne=xh(E,D,te),re=!c.arrow&&wh(i)!=null&&D!==ne&&a.reference[m]/2-(D<E?E:ee)-h[m]/2<0,O=re?D<E?D-E:D-te:0;return{[p]:f[p]+O,data:{[p]:ne,centerOffset:D-ne-O,...re&&{alignmentOffset:O}},reset:re}}}),qh=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Sh(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Ch(r),_=Dh(o),v=Ch(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Rh(o)]:Ah(o)),x=p!==`none`;!d&&x&&b.push(...Lh(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=kh(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Dh(t)||T.every(e=>Dh(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Dh(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Jh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yh(e){return mh.some(t=>e[t]>=0)}var Xh=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Sh(e,t);switch(i){case`referenceHidden`:{let e=Jh(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Yh(e)}}}case`escaped`:{let e=Jh(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Yh(e)}}}default:return{}}}}},Zh=new Set([`left`,`top`]);async function Qh(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ch(n),s=wh(n),c=Dh(n)===`y`,l=Zh.has(o)?-1:1,u=a&&c?-1:1,d=Sh(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var $h=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Qh(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},eg=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Sh(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Dh(i),p=Th(f),m=u[p],h=u[f],g=(e,t)=>xh(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},tg=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Sh(e,t),u={x:n,y:r},d=Dh(i),f=Th(d),p=u[f],m=u[d],h=Sh(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Zh.has(Ch(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},ng=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Sh(e,t),c=await i.detectOverflow(t,s),l=Ch(n),u=wh(n),d=Dh(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=hh(p-c[m],g),y=hh(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*gh(c.left,c.right):S=p-2*gh(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function rg(){return typeof window<`u`}function ig(e){return sg(e)?(e.nodeName||``).toLowerCase():`#document`}function ag(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function og(e){return((sg(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function sg(e){return rg()?e instanceof Node||e instanceof ag(e).Node:!1}function cg(e){return rg()?e instanceof Element||e instanceof ag(e).Element:!1}function lg(e){return rg()?e instanceof HTMLElement||e instanceof ag(e).HTMLElement:!1}function ug(e){return!rg()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ag(e).ShadowRoot}function dg(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Sg(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function fg(e){return/^(table|td|th)$/.test(ig(e))}function pg(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var mg=/transform|translate|scale|rotate|perspective|filter/,hg=/paint|layout|strict|content/,gg=e=>!!e&&e!==`none`,_g;function vg(e){let t=cg(e)?Sg(e):e;return gg(t.transform)||gg(t.translate)||gg(t.scale)||gg(t.rotate)||gg(t.perspective)||!bg()&&(gg(t.backdropFilter)||gg(t.filter))||mg.test(t.willChange||``)||hg.test(t.contain||``)}function yg(e){let t=wg(e);for(;lg(t)&&!xg(t);){if(vg(t))return t;if(pg(t))return null;t=wg(t)}return null}function bg(){return _g??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),_g}function xg(e){return/^(html|body|#document)$/.test(ig(e))}function Sg(e){return ag(e).getComputedStyle(e)}function Cg(e){return cg(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wg(e){if(ig(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ug(e)&&e.host||og(e);return ug(t)?t.host:t}function Tg(e){let t=wg(e);return xg(t)?(e.ownerDocument||e).body:lg(t)&&dg(t)?t:Tg(t)}function Eg(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Tg(e),i=r===e.ownerDocument?.body,a=ag(r);if(i){let e=Dg(a);return t.concat(a,a.visualViewport||[],dg(r)?r:[],e&&n?Eg(e):[])}return t.concat(r,Eg(r,[],n))}function Dg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Og(e){let t=Sg(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=lg(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=_h(n)!==a||_h(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function kg(e){return cg(e)?e:e.contextElement}function Ag(e){let t=kg(e);if(!lg(t))return yh(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Og(t),o=(a?_h(n.width):n.width)/r,s=(a?_h(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var jg=yh(0);function Mg(e){let t=ag(e);return!bg()||!t.visualViewport?jg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ng(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ag(e)}function Pg(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=kg(e),o=yh(1);t&&(r?cg(r)&&(o=Ag(r)):o=Ag(e));let s=Ng(a,n,r)?Mg(a):yh(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=ag(a),t=cg(r)?ag(r):r,n=e,i=Dg(n);for(;i&&t!==n;){let e=Ag(i),t=i.getBoundingClientRect(),r=Sg(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ag(i),i=Dg(n)}}return Vh({width:u,height:d,x:c,y:l})}function Fg(e,t){let n=Cg(e).scrollLeft;return t?t.left+n:Pg(og(e)).left+n}function Ig(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Fg(e,n),y:n.top+t.scrollTop}}function Lg(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=og(r),s=t?pg(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=yh(1),u=yh(0),d=lg(r);if((d||!a)&&((ig(r)!==`body`||dg(o))&&(c=Cg(r)),d)){let e=Pg(r);l=Ag(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ig(o,c):yh(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Rg(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function zg(e){let t=Cg(e),n=e.ownerDocument.body,r=gh(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=gh(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Fg(e),o=-t.scrollTop;return Sg(n).direction===`rtl`&&(a+=gh(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Bg=25;function Vg(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=ag(e),a=og(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!bg()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Fg(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Bg&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Hg(e,t){let n=Pg(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ag(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ug(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Vg(e,n,t);else if(t===`document`)r=zg(og(e));else if(cg(t))r=Hg(t,n);else{let n=Mg(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Vh(r)}function Wg(e,t){let n=t.get(e);if(n)return n;let r=Eg(e,[],!1).filter(e=>cg(e)&&ig(e)!==`body`),i=null,a=Sg(e).position===`fixed`,o=a?wg(e):e;for(;cg(o)&&!xg(o);){let e=Sg(o),t=vg(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=wg(o)}return t.set(e,r),r}function Gg(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?pg(t)?[]:Wg(t,this._c):[].concat(n),r],o=Ug(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ug(t,a[e],i);s=gh(n.top,s),c=hh(n.right,c),l=hh(n.bottom,l),u=gh(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Kg(e){let{width:t,height:n}=Og(e);return{width:t,height:n}}function qg(e,t,n){let r=lg(t),i=og(t),a=n===`fixed`,o=Pg(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=yh(0);if((r||!a)&&((ig(t)!==`body`||dg(i))&&(s=Cg(t)),r)){let e=Pg(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Fg(i));let l=i&&!r&&!a?Ig(i,s):yh(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Jg(e){return Sg(e).position===`static`}function Yg(e,t){if(!lg(e)||Sg(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return og(e)===n&&(n=n.ownerDocument.body),n}function Xg(e,t){let n=ag(e);if(pg(e))return n;if(!lg(e)){let t=wg(e);for(;t&&!xg(t);){if(cg(t)&&!Jg(t))return t;t=wg(t)}return n}let r=Yg(e,t);for(;r&&fg(r)&&Jg(r);)r=Yg(r,t);return r&&xg(r)&&Jg(r)&&!vg(r)?n:r||yg(e)||n}var Zg=async function(e){let t=this.getOffsetParent||Xg,n=this.getDimensions,r=await n(e.floating);return{reference:qg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Qg(e){return Sg(e).direction===`rtl`}var $g={convertOffsetParentRelativeRectToViewportRelativeRect:Lg,getDocumentElement:og,getClippingRect:Gg,getOffsetParent:Xg,getElementRects:Zg,getClientRects:Rg,getDimensions:Kg,getScale:Ag,isElement:cg,isRTL:Qg};function e_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function t_(e,t,n){let r=null,i,a=og(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=vh(d),h=vh(a.clientWidth-(u+f)),g=vh(a.clientHeight-(d+p)),_=vh(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:gh(0,hh(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!e_(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=ag(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function n_(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=kg(e),u=i||a?[...l?Eg(l):[],...t?Eg(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?t_(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Pg(e):null;c&&g();function g(){let t=Pg(e);h&&!e_(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var r_=$h,i_=eg,a_=qh,o_=ng,s_=Xh,c_=Kh,l_=tg,u_=(e,t,n)=>{let r=new Map,i=n??{},a={...$g,...i.platform,_c:r};return Gh(e,t,{...i,platform:a})},d_=typeof document<`u`?Y.useLayoutEffect:function(){};function f_(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!f_(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!f_(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function p_(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function m_(e,t){let n=p_(e);return Math.round(t*n)/n}function h_(e){let t=Y.useRef(e);return d_(()=>{t.current=e}),t}function g_(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=Y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Y.useState(r);f_(f,r)||p(r);let[m,h]=Y.useState(null),[g,_]=Y.useState(null),v=Y.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=Y.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=Y.useRef(null),C=Y.useRef(null),w=Y.useRef(u),T=c!=null,E=h_(c),ee=h_(i),te=h_(l),D=Y.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};ee.current&&(e.platform=ee.current),u_(S.current,C.current,e).then(e=>{let t={...e,isPositioned:te.current!==!1};ne.current&&!f_(w.current,t)&&(w.current=t,Xu.flushSync(()=>{d(t)}))})},[f,t,n,ee,te]);d_(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let ne=Y.useRef(!1);d_(()=>(ne.current=!0,()=>{ne.current=!1}),[]),d_(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,D);D()}},[b,x,D,E,T]);let re=Y.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),O=Y.useMemo(()=>({reference:b,floating:x}),[b,x]),ie=Y.useMemo(()=>{let e={position:n,left:0,top:0};if(!O.floating)return e;let t=m_(O.floating,u.x),r=m_(O.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...p_(O.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,O.floating,u.x,u.y]);return Y.useMemo(()=>({...u,update:D,refs:re,elements:O,floatingStyles:ie}),[u,D,re,O,ie])}var __=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:c_({element:r.current,padding:i}).fn(n):r?c_({element:r,padding:i}).fn(n):{}}}},v_=(e,t)=>{let n=r_(e);return{name:n.name,fn:n.fn,options:[e,t]}},y_=(e,t)=>{let n=i_(e);return{name:n.name,fn:n.fn,options:[e,t]}},b_=(e,t)=>({fn:l_(e).fn,options:[e,t]}),x_=(e,t)=>{let n=a_(e);return{name:n.name,fn:n.fn,options:[e,t]}},S_=(e,t)=>{let n=o_(e);return{name:n.name,fn:n.fn,options:[e,t]}},C_=(e,t)=>{let n=s_(e);return{name:n.name,fn:n.fn,options:[e,t]}},w_=(e,t)=>{let n=__(e);return{name:n.name,fn:n.fn,options:[e,t]}},T_=Object.defineProperty,E_=(e,t)=>T_(e,`name`,{value:t,configurable:!0});function D_(e){let[t,n]=Y.useState(void 0);return ku(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}E_(D_,`useSize`);var O_=Object.defineProperty,k_=(e,t)=>O_(e,`name`,{value:t,configurable:!0}),A_={Partial:`partial`,Always:`always`},j_={Optimized:`optimized`,Always:`always`},M_=`Popper`,[N_,P_]=hu(M_),[F_,I_]=N_(M_),L_=k_(e=>{let{__scopePopper:t,children:n}=e,[r,i]=Y.useState(null),[a,o]=Y.useState(void 0);return(0,J.jsx)(F_,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),R_=`PopperAnchor`,z_=Y.forwardRef(k_(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=I_(R_,n),o=Y.useRef(null),s=a.onAnchorChange,c=xu(t,Y.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=Y.useRef(null);Y.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&K_(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,J.jsx)(gd.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),B_=`PopperContent`,[V_,H_]=N_(B_),U_=Y.forwardRef(k_(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=A_.Partial,hideWhenDetached:f=!1,updatePositionStrategy:p=j_.Optimized,onPlaced:m,...h}=e,g=I_(B_,n),[_,v]=Y.useState(null),y=xu(t,v),[b,x]=Y.useState(null),S=D_(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},ee=Array.isArray(l)?l:[l],te=ee.length>0,D={padding:E,boundary:ee.filter(W_),altBoundary:te},{refs:ne,floatingStyles:re,placement:O,isPositioned:ie,middlewareData:ae}=g_({strategy:`fixed`,placement:T,whileElementsMounted:k_((...e)=>n_(...e,{animationFrame:p===j_.Always}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[v_({mainAxis:i+w,alignmentAxis:o}),c&&y_({mainAxis:!0,crossAxis:!1,...d===A_.Partial?{limiter:b_()}:{},...D}),c&&x_({...D}),S_({...D,apply:k_(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),b&&w_({element:b,padding:s}),G_({arrowWidth:C,arrowHeight:w}),f&&C_(te?{strategy:`referenceHidden`,...D}:{strategy:`referenceHidden`,padding:D.padding,altBoundary:D.altBoundary})]}),oe=g.setPlacementState;ku(()=>(oe(O),()=>{oe(void 0)}),[O,oe]);let[k,se]=K_(O),ce=xd(m);ku(()=>{ie&&ce?.()},[ie,ce]);let le=ae.arrow?.x,ue=ae.arrow?.y,de=ae.arrow?.centerOffset!==0,[fe,pe]=Y.useState();return ku(()=>{_&&pe(window.getComputedStyle(_).zIndex)},[_]),(0,J.jsx)(`div`,{ref:ne.setFloating,"data-radix-popper-content-wrapper":``,style:{...re,transform:ie?re.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:fe,"--radix-popper-transform-origin":[ae.transformOrigin?.x,ae.transformOrigin?.y].join(` `),...ae.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,J.jsx)(V_,{scope:n,placedSide:k,placedAlign:se,onArrowChange:x,arrowX:le,arrowY:ue,shouldHideArrow:de,children:(0,J.jsx)(gd.div,{"data-side":k,"data-align":se,...h,ref:y,style:{...h.style,animation:ie?h.style?.animation:`none`}})})})},`PopperContent`));function W_(e){return e!==null}k_(W_,`isNotNull`);var G_=k_(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=K_(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function K_(e){let[t,n=`center`]=e.split(`-`);return[t,n]}k_(K_,`getSideAndAlignFromPlacement`);var q_=Object.defineProperty,J_=(e,t)=>q_(e,`name`,{value:t,configurable:!0}),Y_=!1;function X_(){let[e,t]=Y.useState(Y_);return Y.useEffect(()=>{Y_||(Y_=!0,t(!0))},[]),e}J_(X_,`useIsHydrated`);var Z_=Y.useSyncExternalStore;function Q_(){return()=>{}}J_(Q_,`subscribe`);function $_(){return Z_(Q_,()=>!0,()=>!1)}J_($_,`useIsHydratedModern`);var ev=typeof Z_==`function`?$_:X_,tv=Object.defineProperty,nv=(e,t)=>tv(e,`name`,{value:t,configurable:!0}),rv=`rovingFocusGroup.onEntryFocus`,iv={bubbles:!1,cancelable:!0},av=`RovingFocusGroup`,[ov,sv,cv]=Zm(av),[lv,uv]=hu(av,[cv]),dv={Vertical:`vertical`,Horizontal:`horizontal`},fv={LTR:`ltr`,RTL:`rtl`},[pv,mv]=lv(av),hv=Y.forwardRef(nv(function(e,t){return(0,J.jsx)(ov.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,J.jsx)(ov.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,J.jsx)(gv,{...e,ref:t})})})},`RovingFocusGroup`)),gv=Y.forwardRef(nv(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=Y.useRef(null),p=xu(t,f),m=ph(a),[h,g]=Uu({prop:o,defaultProp:s??null,onChange:c,caller:av}),[_,v]=Y.useState(!1),y=xd(l),b=sv(n),x=Y.useRef(!1),[S,C]=Y.useState(0);return Y.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(rv,y),()=>e.removeEventListener(rv,y)},[y]),(0,J.jsx)(pv,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:Y.useCallback(e=>g(e),[g]),onItemShiftTab:Y.useCallback(()=>v(!0),[]),onFocusableItemAdd:Y.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:Y.useCallback(()=>C(e=>e-1),[]),children:(0,J.jsx)(gd.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:X(e.onMouseDown,()=>{x.current=!0}),onFocus:X(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(rv,iv);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);Sv([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:X(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),_v=`RovingFocusGroupItem`,vv=Y.forwardRef(nv(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Pu(),l=a||c,u=mv(_v,n),d=u.currentTabStopId===l,f=sv(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=ev();return ku(()=>{if(g&&r)return p(),()=>m()},[g,r,p,m]),Y.useEffect(()=>{if(!g&&r)return p(),()=>m()},[g,r,p,m]),(0,J.jsx)(ov.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,J.jsx)(gd.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:X(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:X(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:X(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=xv(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Cv(n,r+1):n.slice(r+1)}setTimeout(()=>Sv(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),yv={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function bv(e,t){return t===fv.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}nv(bv,`getDirectionAwareKey`);function xv(e,t,n){let r=bv(e.key,n);if(!(t===dv.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===dv.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return yv[r]}nv(xv,`getFocusIntent`);function Sv(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}nv(Sv,`focusFirst`);function Cv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}nv(Cv,`wrapArray`);var wv=Object.defineProperty,Tv=(e,t)=>wv(e,`name`,{value:t,configurable:!0}),Ev=[`Enter`,` `],Dv=[`ArrowDown`,`PageUp`,`Home`],Ov=[`ArrowUp`,`PageDown`,`End`],kv=[...Dv,...Ov];[...Ev],[...Ev];var Av=`Menu`,[jv,Mv,Nv]=Zm(Av),[Pv,Fv]=hu(Av,[Nv,P_,uv]),Iv=P_(),Lv=uv(),[Rv,zv]=Pv(Av),[Bv,Vv]=Pv(Av),Hv=Tv(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Iv(t),[c,l]=Y.useState(null),u=Y.useRef(!1),d=xd(a),f=ph(i);return Y.useEffect(()=>{let e=Tv(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=Tv(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),Y.useEffect(()=>{if(!n)return;let e=Tv(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,J.jsx)(L_,{...s,children:(0,J.jsx)(Rv,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,J.jsx)(Bv,{scope:t,onClose:Y.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),Uv=Y.forwardRef(Tv(function(e,t){let{__scopeMenu:n,...r}=e,i=Iv(n);return(0,J.jsx)(z_,{...i,...r,ref:t})},`MenuAnchor`)),Wv=`MenuPortal`,[Gv,Kv]=Pv(Wv,{forceMount:void 0}),qv=Tv(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=zv(Wv,t);return(0,J.jsx)(Gv,{scope:t,forceMount:n,children:(0,J.jsx)(lf,{present:n||a.open,children:(0,J.jsx)(af,{asChild:!0,container:i,children:r})})})},`MenuPortal`),Jv=`MenuContent`,[Yv,Xv]=Pv(Jv),Zv=Y.forwardRef(Tv(function(e,t){let n=Kv(Jv,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=zv(Jv,e.__scopeMenu),o=Vv(Jv,e.__scopeMenu);return(0,J.jsx)(jv.Provider,{scope:e.__scopeMenu,children:(0,J.jsx)(lf,{present:r||a.open,children:(0,J.jsx)(jv.Slot,{scope:e.__scopeMenu,children:o.modal?(0,J.jsx)(Qv,{...i,ref:t}):(0,J.jsx)($v,{...i,ref:t})})})})},`MenuContent`)),Qv=Y.forwardRef(Tv(function(e,t){let n=zv(Jv,e.__scopeMenu),r=Y.useRef(null),i=xu(t,r);return Y.useEffect(()=>{let e=r.current;if(e)return Rp(e)},[]),(0,J.jsx)(ty,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:X(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),$v=Y.forwardRef(Tv(function(e,t){let n=zv(Jv,e.__scopeMenu);return(0,J.jsx)(ty,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),ey=$u(`MenuContent.ScrollLock`),ty=Y.forwardRef(Tv(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=zv(Jv,n),_=Vv(Jv,n),v=Iv(n),y=Lv(n),b=Mv(n),[x,S]=Y.useState(null),C=Y.useRef(null),[w,T]=Y.useState(null);Gd(w);let{nodes:E,registry:ee}=Wd(),te=!!(i||m),D=xu(t,C,g.onContentChange,T),ne=Y.useRef(0),re=Y.useRef(``),O=Y.useRef(0),ie=Y.useRef(null),ae=Y.useRef(`right`),oe=Y.useRef(0),k=Y.useMemo(()=>m?[C,...E.map(e=>({current:e}))]:[],[C,E,m]),se=m?kp:Y.Fragment,ce=m?{as:ey,allowPinchZoom:!0,shards:k}:void 0,le=Tv(e=>{let t=re.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=_y(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){re.current=e,window.clearTimeout(ne.current),e!==``&&(ne.current=window.setTimeout(()=>s(``),1e3))}Tv(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);Y.useEffect(()=>()=>window.clearTimeout(ne.current),[]),bf();let ue=Y.useCallback(e=>ae.current===ie.current?.side&&yy(e,ie.current?.area),[]);return(0,J.jsx)(Yv,{scope:n,searchRef:re,onItemEnter:Y.useCallback(e=>{ue(e)&&e.preventDefault()},[ue]),onItemLeave:Y.useCallback(e=>{ue(e)||(C.current?.focus(),S(null))},[ue]),onTriggerLeave:Y.useCallback(e=>{ue(e)&&e.preventDefault()},[ue]),pointerGraceTimerRef:O,onPointerGraceIntentChange:Y.useCallback(e=>{ie.current=e},[]),children:(0,J.jsx)(Ud,{registry:te?ee:null,children:(0,J.jsx)(se,{...ce,children:(0,J.jsx)(Vd,{asChild:!0,trapped:i,branches:E,onMountAutoFocus:X(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,J.jsx)(kd,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,J.jsx)(hv,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:X(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,J.jsx)(U_,{role:`menu`,"aria-orientation":`vertical`,"data-state":fy(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:D,style:{outline:`none`,...h.style},onKeyDown:X(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&le(e.key));let i=C.current;if(e.target!==i||!kv.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);Ov.includes(e.key)&&a.reverse(),hy(a)}),onBlur:X(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(ne.current),re.current=``)}),onPointerMove:X(e.onPointerMove,by(e=>{let t=e.target,n=oe.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>oe.current?`right`:`left`;ae.current=t,oe.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),ny=`MenuItem`,ry=`menu.itemSelect`,iy=Y.forwardRef(Tv(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=Y.useRef(null),o=Vv(ny,e.__scopeMenu),s=Xv(ny,e.__scopeMenu),c=xu(t,a),l=Y.useRef(!1),u=Tv(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(ry,{bubbles:!0,cancelable:!0});e.addEventListener(ry,e=>r?.(e),{once:!0}),_d(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,J.jsx)(ay,{...i,ref:c,disabled:n,onClick:X(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:X(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:X(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&Ev.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),ay=Y.forwardRef(Tv(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Xv(ny,n),s=Lv(n),c=Y.useRef(null),l=xu(t,c),[u,d]=Y.useState(!1),[f,p]=Y.useState(``);return Y.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,J.jsx)(jv.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,J.jsx)(vv,{asChild:!0,...s,focusable:!r,children:(0,J.jsx)(gd.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:X(e.onPointerMove,by(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:X(e.onPointerLeave,by(e=>o.onItemLeave(e))),onFocus:X(e.onFocus,()=>d(!0)),onBlur:X(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[oy,sy]=Pv(`MenuRadioGroup`,{value:void 0,onValueChange:Tv(()=>{},`onValueChange`)}),[cy,ly]=Pv(`MenuItemIndicator`,{checked:!1}),[uy,dy]=Pv(`MenuSub`);function fy(e){return e?`open`:`closed`}Tv(fy,`getOpenState`);function py(e){return e===`indeterminate`}Tv(py,`isIndeterminate`);function my(e){return py(e)?`indeterminate`:e?`checked`:`unchecked`}Tv(my,`getCheckedState`);function hy(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Tv(hy,`focusFirst`);function gy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Tv(gy,`wrapArray`);function _y(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=gy(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Tv(_y,`getNextMatch`);function vy(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Tv(vy,`isPointInPolygon`);function yy(e,t){return t?vy({x:e.clientX,y:e.clientY},t):!1}Tv(yy,`isPointerInGraceArea`);function by(e){return t=>t.pointerType===`mouse`?e(t):void 0}Tv(by,`whenMouse`);var xy=Object.defineProperty,Sy=(e,t)=>xy(e,`name`,{value:t,configurable:!0}),Cy=`ContextMenu`,[wy,Ty]=hu(Cy,[Fv]),Ey=Fv(),[Dy,Oy]=wy(Cy),ky=Sy(e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,dir:a,modal:o=!0}=e,s=Y.useRef(!1),[c,l]=Uu({prop:i,defaultProp:!1,onChange:r,caller:Cy}),u=Ey(t);return(0,J.jsx)(Dy,{scope:t,open:c,onOpenChange:l,modal:o,hasInteractedRef:s,children:(0,J.jsx)(Hv,{...u,dir:a,open:c,onOpenChange:l,modal:o,children:n})})},`ContextMenu`),Ay=`ContextMenuTrigger`,jy=Y.forwardRef(Sy(function(e,t){let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=Oy(Ay,n),o=Ey(n),[s,c]=Y.useState({x:0,y:0}),l=Y.useMemo(()=>({current:{getBoundingClientRect:Sy(()=>DOMRect.fromRect({width:0,height:0,...s}),`getBoundingClientRect`)}}),[s]),u=Y.useRef(0),d=Y.useCallback(()=>window.clearTimeout(u.current),[]),f=Sy(e=>{a.hasInteractedRef.current=!0,c({x:e.clientX,y:e.clientY}),a.onOpenChange(!0)},`handleOpen`);return Y.useEffect(()=>d,[d]),Y.useEffect(()=>void(r&&d()),[r,d]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Uv,{...o,virtualRef:l}),(0,J.jsx)(gd.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:X(e.onContextMenu,e=>{d(),f(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:X(e.onPointerDown,Iy(e=>{d(),a.open&&a.onOpenChange(!1),u.current=window.setTimeout(()=>f(e),700)})),onPointerMove:r?e.onPointerMove:X(e.onPointerMove,Iy(d)),onPointerCancel:r?e.onPointerCancel:X(e.onPointerCancel,Iy(d)),onPointerUp:r?e.onPointerUp:X(e.onPointerUp,Iy(d))})]})},`ContextMenuTrigger`)),My=Sy(e=>{let{__scopeContextMenu:t,...n}=e,r=Ey(t);return(0,J.jsx)(qv,{...r,...n})},`ContextMenuPortal`),Ny=`ContextMenuContent`,Py=Y.forwardRef(Sy(function(e,t){let{__scopeContextMenu:n,...r}=e,i=Oy(Ny,n),a=Ey(n),o=Y.useRef(!1);return(0,J.jsx)(Zv,{...a,side:`right`,sideOffset:2,align:`start`,...r,ref:t,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`ContextMenuContent`)),Fy=Y.forwardRef(Sy(function(e,t){let{__scopeContextMenu:n,...r}=e,i=Ey(n);return(0,J.jsx)(iy,{...i,...r,ref:t})},`ContextMenuItem`));function Iy(e){return t=>t.pointerType===`mouse`?void 0:e(t)}Sy(Iy,`whenTouchOrPen`);var Ly=`z-50 flex min-w-36 flex-col overflow-hidden rounded-md border bg-background p-1 text-foreground shadow-md`,Ry=`flex cursor-default items-center rounded-sm px-2 py-1.5 text-xs text-foreground outline-none select-none data-highlighted:bg-accent`;function zy(e){let{choice:t,onChoose:n}=e,r=e.item,i=(0,Y.useCallback)(()=>{t.onSelect!==null&&n(t.onSelect)},[t,n]);return t.href===null?(0,J.jsx)(r,{asChild:!0,onSelect:i,children:(0,J.jsx)(`div`,{className:Ry,children:t.label})}):(0,J.jsx)(r,{asChild:!0,children:(0,J.jsx)(`a`,{className:Ry,href:t.href,children:t.label})})}var By=0;function Vy(){let e=(0,Y.useRef)(null);return(0,Y.useMemo)(()=>({onChoose:t=>{e.current=t},onCloseAutoFocus:()=>{let t=e.current;e.current=null,t!==null&&globalThis.setTimeout(t,By)}}),[])}var Hy={label:`Message actions`};function Uy(e){let t=Vy(),n=t.onChoose,r=t.onCloseAutoFocus;return(0,J.jsx)(Py,{asChild:!0,onCloseAutoFocus:r,children:(0,J.jsx)(`div`,{"aria-label":Hy.label,className:Ly,children:e.choices.map(e=>(0,J.jsx)(zy,{choice:e,item:Fy,onChoose:n},e.label))})})}function Wy(e){return(0,J.jsxs)(ky,{children:[(0,J.jsx)(jy,{asChild:!0,children:e.children}),(0,J.jsx)(My,{children:(0,J.jsx)(Uy,{choices:e.choices})})]})}function Gy({name:e,presence:t}){return t===null?e:`${e}, ${t.spoken}`}var Ky={avatar:`absolute -right-0.5 -bottom-0.5 size-3 ring-2 ring-background`,inline:`size-2 self-center`},qy={offline:`fill-background stroke-muted-foreground`,online:`fill-online`,warning:`fill-background stroke-mention-bar`};function Jy({online:e,warning:t}){return e?`online`:t?`warning`:`offline`}function Yy(e){let t=Jy(e);return(0,J.jsx)(`span`,{className:`flex shrink-0 rounded-full bg-background ${Ky[e.place??`avatar`]}`,title:e.label,children:(0,J.jsxs)(`svg`,{"aria-label":Gy({name:e.name,presence:e}),className:`size-full ${qy[t]}`,"data-presence":t,role:`img`,viewBox:`0 0 12 12`,children:[(0,J.jsx)(`circle`,{cx:`6`,cy:`6`,r:`4.5`,strokeWidth:`2.5`}),t===`warning`&&(0,J.jsx)(`circle`,{className:`fill-mention-bar stroke-none`,cx:`6`,cy:`6`,r:`1.75`})]})})}var Xy=[`bg-[oklch(var(--avatar-lightness)_var(--avatar-chroma)_250)]`,`bg-[oklch(var(--avatar-lightness)_var(--avatar-chroma)_290)]`,`bg-[oklch(var(--avatar-lightness)_var(--avatar-chroma)_335)]`,`bg-[oklch(var(--avatar-lightness)_var(--avatar-chroma)_20)]`,`bg-[oklch(var(--avatar-lightness)_var(--avatar-chroma)_60)]`,`bg-[oklch(var(--avatar-lightness)_var(--avatar-chroma)_145)]`,`bg-[oklch(var(--avatar-lightness)_var(--avatar-chroma)_180)]`,`bg-[oklch(var(--avatar-lightness)_var(--avatar-chroma)_215)]`],Zy=2147483647,Qy=31,$y=0,eb=2,tb=1;function nb(e){let t=0;for(let n of e)t=(t*Qy+Number(n.codePointAt($y)))%Zy;return t}function rb(e){let t=nb(e)%Xy.length;return Xy.slice(t,t+tb).join(``)}function ib(e){let t=e.split(`-`).filter(e=>e!==``);return t.length<eb?e.charAt($y).toUpperCase():t.slice($y,eb).map(e=>e.charAt($y)).join(``).toUpperCase()}var ab={large:{box:`h-14 w-14 text-lg`,testId:`avatar`},small:{box:`h-8 w-8 text-xs`,testId:`avatar`},tiny:{box:`h-5 w-5 text-[9px] ring-2 ring-background`,testId:`replier-avatar`}};function ob(e){return e?`rounded-[28%]`:`rounded-full`}function sb(e){let t=ab[e.size??`small`],{presence:n}=e;return(0,J.jsxs)(`span`,{className:`relative inline-flex h-fit shrink-0`,children:[(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`inline-flex items-center justify-center font-semibold text-white select-none before:content-[attr(data-initials)] ${t.box} ${ob(e.agent)} ${rb(e.name)}`,"data-agent":e.agent,"data-initials":ib(e.name),"data-testid":t.testId}),n!==null&&(0,J.jsx)(Yy,{label:n.label,name:e.name,online:n.online,spoken:n.spoken,warning:n.warning})]})}function cb(e){return(0,J.jsx)(`a`,{className:`block rounded-md border bg-background px-2 py-0.5 text-[11px] text-muted-foreground shadow-sm hover:text-foreground focus-visible:text-foreground`,href:e.href,children:e.children})}function lb(e){let t=e.onClick;return(0,J.jsx)(`button`,{className:`block rounded-md border bg-background px-2 py-0.5 text-[11px] text-muted-foreground shadow-sm hover:text-foreground focus-visible:text-foreground`,onClick:t,type:`button`,children:e.children})}function ub(e){let{actionHref:t,onAction:n}=e;if(t!==null)return(0,J.jsx)(cb,{href:t,children:e.actionLabel});let r=n;return r!==null&&(0,J.jsx)(lb,{onClick:r,children:e.actionLabel})}var db=Object.defineProperty,fb=(e,t)=>db(e,`name`,{value:t,configurable:!0}),pb=`DropdownMenu`,[mb,hb]=hu(pb,[Fv]),gb=Fv(),[_b,vb]=mb(pb),yb=fb(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=gb(t),l=Y.useRef(null),[u,d]=Uu({prop:i,defaultProp:a??!1,onChange:o,caller:pb});return(0,J.jsx)(_b,{scope:t,triggerId:Pu(),triggerRef:l,contentId:Pu(),open:u,onOpenChange:d,onOpenToggle:Y.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,J.jsx)(Hv,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),bb=`DropdownMenuTrigger`,xb=Y.forwardRef(fb(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=vb(bb,n),o=gb(n),s=xu(t,a.triggerRef);return(0,J.jsx)(Uv,{asChild:!0,...o,children:(0,J.jsx)(gd.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:X(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:X(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),Sb=fb(e=>{let{__scopeDropdownMenu:t,...n}=e,r=gb(t);return(0,J.jsx)(qv,{...r,...n})},`DropdownMenuPortal`),Cb=`DropdownMenuContent`,wb=Y.forwardRef(fb(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=vb(Cb,n),a=gb(n),o=Y.useRef(!1);return(0,J.jsx)(Zv,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:X(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:X(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),Tb=Y.forwardRef(fb(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=gb(n);return(0,J.jsx)(iy,{...i,...r,ref:t})},`DropdownMenuItem`));function Eb(){return(0,J.jsxs)(`svg`,{"aria-hidden":`true`,className:`h-3.5 w-3.5`,fill:`currentColor`,viewBox:`0 0 16 16`,children:[(0,J.jsx)(`circle`,{cx:`3`,cy:`8`,r:`1.4`}),(0,J.jsx)(`circle`,{cx:`8`,cy:`8`,r:`1.4`}),(0,J.jsx)(`circle`,{cx:`13`,cy:`8`,r:`1.4`})]})}var Db={label:`More actions`};function Ob(){return(0,J.jsx)(xb,{asChild:!0,children:(0,J.jsx)(`button`,{"aria-label":Db.label,className:`block rounded-md border bg-background px-1.5 py-0.5 text-muted-foreground shadow-sm hover:text-foreground focus-visible:text-foreground`,type:`button`,children:(0,J.jsx)(Eb,{})})})}function kb(e){let t=Vy(),n=t.onChoose,r=t.onCloseAutoFocus;return(0,J.jsx)(wb,{align:`end`,asChild:!0,onCloseAutoFocus:r,children:(0,J.jsx)(`div`,{className:Ly,children:e.choices.map(e=>(0,J.jsx)(zy,{choice:e,item:Tb,onChoose:n},e.label))})})}function Ab(e){return(0,J.jsxs)(yb,{children:[(0,J.jsx)(Ob,{}),(0,J.jsx)(Sb,{children:(0,J.jsx)(kb,{choices:e.choices})})]})}function jb(e){let{choice:t}=e,n=t.onReact;return(0,J.jsx)(`button`,{"aria-label":`React with ${t.symbol}`,className:`block rounded-md border bg-background px-1.5 py-0.5 text-[11px] shadow-sm before:content-[attr(data-symbol)] hover:bg-accent focus-visible:bg-accent`,"data-symbol":t.symbol,onClick:n,title:`React with ${t.symbol}`,type:`button`})}function Mb(e){let{actionHref:t,choices:n,onAction:r,reactions:i}=e,a=r;return(0,J.jsxs)(`div`,{className:`invisible absolute top-1 right-4 flex gap-1 group-focus-within:visible group-hover:visible has-data-[state=open]:visible`,children:[i.map(e=>(0,J.jsx)(jb,{choice:e},e.symbol)),(0,J.jsx)(ub,{actionHref:t,actionLabel:e.actionLabel,onAction:a}),(0,J.jsx)(Ab,{choices:n})]})}var Nb=Object.defineProperty,Pb=(e,t)=>Nb(e,`name`,{value:t,configurable:!0}),Fb=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Ib=Y.forwardRef(Pb(function(e,t){return(0,J.jsx)(gd.span,{...e,ref:t,style:{...Fb,...e.style}})},`VisuallyHidden`)),Lb=Object.defineProperty,Rb=(e,t)=>Lb(e,`name`,{value:t,configurable:!0}),[zb,Bb]=hu(`Tooltip`,[P_]),Vb=P_(),Hb=`TooltipProvider`,Ub=700,Wb=`tooltip.open`,[Gb,Kb]=zb(Hb),qb=Rb(e=>{let{__scopeTooltip:t,delayDuration:n=Ub,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=Y.useRef(!0),s=Y.useRef(!1),c=Y.useRef(0);return Y.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,J.jsx)(Gb,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:Y.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:Y.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:Y.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),Jb=`Tooltip`,[Yb,Xb]=zb(Jb),Zb=Rb(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Kb(Jb,e.__scopeTooltip),l=Vb(t),[u,d]=Y.useState(null),[f,p]=Y.useState(void 0),m=Pu(),h=Y.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,v=Y.useRef(!1),[y,b]=Uu({prop:r,defaultProp:i??!1,onChange:Rb(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Wb))):c.onClose(),a?.(e)},`onChange`),caller:Jb}),x=Y.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),S=Y.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),C=Y.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),w=Y.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},_)},[_,b]);Y.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]);let T=f??m;return(0,J.jsx)(L_,{...l,children:(0,J.jsx)(Yb,{scope:t,contentId:T,setContentId:p,open:y,stateAttribute:x,trigger:u,onTriggerChange:d,onTriggerEnter:Y.useCallback(()=>{c.isOpenDelayedRef.current?w():S()},[c.isOpenDelayedRef,w,S]),onTriggerLeave:Y.useCallback(()=>{g?C():(window.clearTimeout(h.current),h.current=0)},[C,g]),onOpen:S,onClose:C,disableHoverableContent:g,children:n})})},`Tooltip`),Qb=`TooltipTrigger`,$b=Y.forwardRef(Rb(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=Xb(Qb,n),o=Kb(Qb,n),s=Vb(n),c=xu(t,Y.useRef(null),a.onTriggerChange),l=Y.useRef(!1),u=Y.useRef(!1),d=Y.useCallback(()=>l.current=!1,[]);return Y.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,J.jsx)(z_,{asChild:!0,...s,children:(0,J.jsx)(gd.button,{"aria-describedby":a.open?hx(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:X(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:X(e.onPointerDown,()=>{a.open&&a.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:X(e.onFocus,()=>{l.current||a.onOpen()}),onBlur:X(e.onBlur,a.onClose),onClick:X(e.onClick,a.onClose)})})},`TooltipTrigger`)),ex=`TooltipPortal`,[tx,nx]=zb(ex,{forceMount:void 0}),rx=Rb(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Xb(ex,t);return(0,J.jsx)(tx,{scope:t,forceMount:n,children:(0,J.jsx)(lf,{present:n||a.open,children:(0,J.jsx)(af,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),ix=`TooltipContent`,ax=Y.forwardRef(Rb(function(e,t){let n=nx(ix,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Xb(ix,e.__scopeTooltip);return(0,J.jsx)(lf,{present:r||o.open,children:o.disableHoverableContent?(0,J.jsx)(cx,{side:i,...a,ref:t}):(0,J.jsx)(ox,{side:i,...a,ref:t})})},`TooltipContent`)),ox=Y.forwardRef(Rb(function(e,t){let n=Xb(ix,e.__scopeTooltip),r=Kb(ix,e.__scopeTooltip),i=Y.useRef(null),a=xu(t,i),[o,s]=Y.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=Y.useCallback(()=>{s(null),d(!1)},[d]),p=Y.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=ux(r,lx(r,n.getBoundingClientRect())),a=dx(t.getBoundingClientRect()),o=px([...i,...a]);s(o),d(!0)},[d]);return Y.useEffect(()=>()=>f(),[f]),Y.useEffect(()=>{if(c&&u){let e=Rb(e=>p(e,u),`handleTriggerLeave`),t=Rb(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),Y.useEffect(()=>{if(o){let e=Rb(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!fx(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,J.jsx)(cx,{...e,ref:a})},`TooltipContentHoverable`)),sx=td(`TooltipContent`),cx=Y.forwardRef(Rb(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=Xb(ix,n),u=Vb(n),{onClose:d}=l,[f,p]=Y.useState(null),m=xu(t,p);Gd(f),Y.useEffect(()=>(document.addEventListener(Wb,d),()=>document.removeEventListener(Wb,d)),[d]),Y.useEffect(()=>{if(l.trigger){let e=Rb(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:h}=l;return ku(()=>(h(a),()=>{h(void 0)}),[a,h]),(0,J.jsx)(kd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,J.jsxs)(U_,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:m,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,J.jsx)(sx,{children:r}),i?(0,J.jsx)(Ib,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`));function lx(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}Rb(lx,`getExitSideFromRect`);function ux(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}Rb(ux,`getPaddedExitPoints`);function dx(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}Rb(dx,`getPointsFromRect`);function fx(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Rb(fx,`isPointInPolygon`);function px(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),mx(t)}Rb(px,`getHull`);function mx(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Rb(mx,`getHullPresorted`);function hx(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Rb(hx,`concatAriaDescribedby`);var gx=4;function _x(e){return(0,J.jsx)(ax,{asChild:!0,sideOffset:gx,children:(0,J.jsx)(`div`,{className:`z-50 max-w-xs rounded-md bg-foreground px-2 py-1 text-xs text-background shadow-md`,children:e.lines.map(e=>(0,J.jsx)(`p`,{children:e},e))})})}function vx(e){return(0,J.jsx)(rx,{children:(0,J.jsx)(_x,{lines:e.lines})})}var yx=300;function bx(e){return(0,J.jsx)(qb,{delayDuration:yx,children:(0,J.jsxs)(Zb,{children:[(0,J.jsx)($b,{asChild:!0,children:e.children}),(0,J.jsx)(vx,{lines:e.lines})]})})}var xx=0;function Sx(e){return e?`invisible pt-1 text-[10px] group-focus-within:visible group-hover:visible`:`text-[11px]`}function Cx(e){return e.receipt===null?[e.full]:[e.full,e.receipt]}function wx(e){return(0,J.jsx)(bx,{lines:Cx(e),children:(0,J.jsx)(`time`,{className:`rounded-sm font-mono text-muted-foreground ${Sx(e.hidden)}`,dateTime:e.iso,tabIndex:xx,children:e.shown})})}var Tx=`agent`;function Ex(e){let{time:t}=e;return(0,J.jsxs)(`header`,{className:`flex items-baseline gap-2`,children:[(0,J.jsx)(`a`,{className:`text-sm font-semibold hover:underline`,href:e.nameHref,children:e.displayName??e.name}),e.displayName!==null&&(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`@${e.name}`}),e.note!==null&&(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.note}),e.agent&&(0,J.jsx)(`span`,{className:`self-center rounded border px-1 py-px text-[10px] leading-none font-medium tracking-wide text-muted-foreground uppercase`,children:Tx}),(0,J.jsx)(wx,{full:t.full,hidden:!1,iso:t.iso,receipt:t.receipt,shown:t.ago})]})}function Dx(e){let{time:t}=e,n=e.onAction;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`flex w-9 shrink-0 justify-center`,children:[e.grouped&&(0,J.jsx)(wx,{full:t.full,hidden:!0,iso:t.iso,receipt:t.receipt,shown:t.short}),!e.grouped&&(0,J.jsx)(sb,{agent:e.agent,name:e.name,presence:e.presence})]}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[!e.grouped&&(0,J.jsx)(Ex,{agent:e.agent,displayName:e.displayName,name:e.name,nameHref:e.nameHref,note:e.note,time:t}),e.children]}),(0,J.jsx)(Mb,{actionHref:e.actionHref,actionLabel:e.actionLabel,choices:e.choices,onAction:n,reactions:e.reactions})]})}var Ox={"for-you":`bg-mention-bg shadow-[inset_2px_0_0_var(--color-mention-bar)]`,none:`hover:bg-hover focus-within:bg-hover`,open:`bg-accent`};function kx(e){return e?`py-0.5`:`pt-2.5 pb-1`}function Ax(e){return`group relative flex gap-3 px-5 outline-none focus-visible:ring-2 focus-visible:ring-link/50 focus-visible:ring-inset ${kx(e.grouped)} ${Ox[e.mark]}`}var jx={markUnread:`Mark unread`};function Mx(e){return e.actionHref===null?[e.onAction].filter(e=>e!==null).map(t=>({href:null,label:e.actionLabel,onSelect:t})):[{href:e.actionHref,label:e.actionLabel,onSelect:null}]}function Nx({actionHref:e,actionLabel:t,menu:n,onAction:r}){return(0,Y.useMemo)(()=>[...Mx({actionHref:e,actionLabel:t,onAction:r}),...n.reactions.map(e=>({href:null,label:`React with ${e.symbol}`,onSelect:e.onReact})),{href:null,label:jx.markUnread,onSelect:n.onMarkUnread},...[n.thread].filter(e=>e!==null).map(e=>({href:null,label:e.label,onSelect:e.onSelect}))],[e,t,n,r])}function Px(e){return e.target===e.currentTarget&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function Fx(e){let t=(0,Y.useRef)(null);return(0,Y.useEffect)(()=>{let n=t.current;function r(t){let n=e.find(e=>e.key===t.key)??null;n!==null&&Px(t)&&(t.preventDefault(),n.onReact())}function i(){n!==null&&n.removeEventListener(`keydown`,r)}return n!==null&&n.addEventListener(`keydown`,r),i},[e]),t}var Ix=0;function Lx(e){let{message:t}=e,n=t.onAction,r=Nx({actionHref:t.actionHref,actionLabel:t.actionLabel,menu:t.menu,onAction:n}),i=Fx(t.menu.reactions);return(0,J.jsx)(Wy,{choices:r,children:(0,J.jsx)(`article`,{"aria-current":t.mark===`open`,className:Ax(t),"data-for-you":t.mark===`for-you`,ref:i,tabIndex:Ix,children:(0,J.jsx)(Dx,{actionHref:t.actionHref,actionLabel:t.actionLabel,agent:t.agent,displayName:t.displayName,grouped:t.grouped,choices:r,name:t.name,nameHref:t.nameHref,note:t.note,onAction:n,presence:t.presence,reactions:t.menu.reactions,time:t.time,children:t.children})})})}var Rx={label:`New`,shown:`New`};function zx(){return(0,J.jsxs)(`div`,{className:`my-1 flex items-center px-5`,children:[(0,J.jsx)(`hr`,{"aria-label":Rx.label,className:`h-px flex-1 border-0 bg-unread`}),(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 rounded-sm bg-unread px-1.5 py-px text-[10px] font-bold tracking-wide text-white uppercase`,children:Rx.shown})]})}function Bx(e){return(0,J.jsxs)(`li`,{className:`flex flex-col`,children:[e.day!==null&&(0,J.jsx)(Jm,{label:e.day}),e.unreadLine&&(0,J.jsx)(zx,{}),(0,J.jsx)(Lx,{message:e})]})}function Vx(e){return(0,J.jsx)(`ul`,{"aria-label":e.label,className:`flex flex-col`,children:e.children})}function Hx(e){let{onClick:t}=e;return(0,J.jsx)(`div`,{className:`flex flex-col items-center gap-2 pt-4`,children:(0,J.jsx)(`button`,{className:`rounded-md border px-3 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-50`,disabled:e.disabled,onClick:t,type:`button`,children:e.children})})}function Ux(e){let{onClick:t}=e;return(0,J.jsxs)(`li`,{className:`my-1 flex items-center px-5`,children:[(0,J.jsx)(`span`,{className:`h-px flex-1 border-t border-dashed`}),(0,J.jsx)(`button`,{className:`mx-3 rounded-full border bg-background px-2.5 py-0.5 text-[11px] font-medium text-muted-foreground hover:bg-accent hover:text-foreground`,onClick:t,type:`button`,children:e.children}),(0,J.jsx)(`span`,{className:`h-px flex-1 border-t border-dashed`})]})}function Wx(e){let{onAction:t}=e;return(0,J.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3 border-b bg-muted px-5 py-2 text-xs text-muted-foreground`,children:[(0,J.jsx)(`p`,{className:`flex-1`,children:e.children}),(0,J.jsx)(`button`,{className:`rounded-md border bg-background px-2.5 py-1 font-medium text-foreground hover:bg-accent`,onClick:t,type:`button`,children:e.actionLabel})]})}function Gx(){return(0,J.jsxs)(`svg`,{"aria-hidden":`true`,className:`h-3.5 w-3.5 animate-spin`,fill:`none`,viewBox:`0 0 16 16`,children:[(0,J.jsx)(`circle`,{className:`opacity-25`,cx:`8`,cy:`8`,r:`6.5`,stroke:`currentColor`,strokeWidth:`1.6`}),(0,J.jsx)(`path`,{d:`M14.5 8A6.5 6.5 0 0 0 8 1.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.6`})]})}function Kx(e){let{onClick:t}=e;return(0,J.jsxs)(`button`,{"aria-busy":e.loading,className:`mt-2 flex w-full items-center justify-center gap-2 rounded-md border px-3 py-2 text-xs font-medium text-muted-foreground transition-colors hover:bg-hover hover:text-foreground focus-visible:ring-1 focus-visible:outline-none disabled:cursor-default disabled:hover:bg-transparent`,disabled:e.loading,onClick:t,type:`button`,children:[e.loading&&(0,J.jsx)(Gx,{}),e.children]})}function qx(e){return(0,J.jsxs)(`div`,{className:`my-2 flex items-center gap-3 px-5`,children:[(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.children}),(0,J.jsx)(`span`,{className:`h-px flex-1 bg-border`})]})}function Jx(){return(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 shrink-0 rounded-full bg-mention-bar`})}function Yx(e){return(0,J.jsxs)(J.Fragment,{children:[e.forYou&&(0,J.jsx)(Jx,{}),(0,J.jsx)(`span`,{className:`font-semibold text-foreground`,children:e.children})]})}var Xx=`View thread →`;function Zx(e){return(0,J.jsxs)(`a`,{"aria-label":e.label,className:`group/thread mt-1 -ml-1.5 flex w-fit max-w-full items-center gap-2 rounded-md border border-transparent px-1.5 py-1 text-xs hover:border-border hover:bg-card focus-visible:border-border focus-visible:bg-card`,href:e.href,children:[(0,J.jsx)(`span`,{className:`flex -space-x-1 *:nth-1:z-30 *:nth-2:z-20 *:nth-3:z-10`,children:e.repliers.map(e=>(0,J.jsx)(sb,{agent:e.agent,name:e.name,presence:null,size:`tiny`},e.name))}),(0,J.jsx)(`span`,{className:`font-medium text-foreground`,children:e.count}),e.news!==null&&(0,J.jsx)(Yx,{forYou:e.news.forYou,children:e.news.text}),(0,J.jsx)(`span`,{className:`text-muted-foreground group-hover/thread:hidden group-focus-visible/thread:hidden`,children:e.last}),(0,J.jsx)(`span`,{className:`hidden text-muted-foreground group-hover/thread:inline group-focus-visible/thread:inline`,children:Xx})]})}function Qx(e){let{message:t}=e,n=t.onAction,r=Nx({actionHref:t.actionHref,actionLabel:t.actionLabel,menu:t.menu,onAction:n}),i=Fx(t.menu.reactions);return(0,J.jsx)(Wy,{choices:r,children:(0,J.jsx)(`article`,{"aria-label":t.label,className:Ax(t),"data-for-you":t.mark===`for-you`,ref:i,children:(0,J.jsx)(Dx,{actionHref:t.actionHref,actionLabel:t.actionLabel,agent:t.agent,displayName:t.displayName,grouped:t.grouped,choices:r,name:t.name,nameHref:t.nameHref,note:t.note,onAction:n,presence:t.presence,reactions:t.menu.reactions,time:t.time,children:t.children})})})}function $x(e){return(0,J.jsxs)(J.Fragment,{children:[e.day!==null&&(0,J.jsx)(Jm,{label:e.day}),(0,J.jsx)(Qx,{message:e})]})}var eS=`cookout`;function tS(e){return(0,J.jsxs)(`div`,{className:`min-h-screen bg-background font-sans text-foreground`,children:[(0,J.jsx)(`header`,{className:`flex items-center border-b px-6 py-3`,children:(0,J.jsx)(`span`,{className:`font-mono text-sm font-semibold tracking-tight`,children:eS})}),(0,J.jsx)(`main`,{className:`flex`,children:e.children})]})}var nS=`[&_form]:relative [&_form]:flex-row [&_form]:flex-wrap [&_form]:items-end [&_form]:gap-2 [&_form]:rounded-xl [&_form]:border [&_form]:bg-surface [&_form]:p-2 [&_form]:shadow-sm [&_form:focus-within]:border-muted-foreground/60 [&_form>div]:flex-1 [&_form_label]:sr-only [&_textarea]:max-h-48 [&_textarea]:min-h-9 [&_textarea]:resize-none [&_textarea]:border-0 [&_textarea]:bg-transparent [&_textarea]:px-2 [&_textarea]:py-1.5 [&_textarea]:text-[14.5px] [&_textarea]:field-sizing-content [&_ul]:absolute [&_ul]:bottom-full [&_ul]:left-0 [&_ul]:mb-2 [&_ul]:min-w-56 [&_ul]:shadow-lg [&_button[type=submit]]:mb-0.5 [&_button[type=submit]]:rounded-lg`,rS={at:`@`,enter:`Enter`,mention:` to mention`,newLine:` for a new line · `,send:` to send · `,shiftEnter:`Shift+Enter`};function iS(e){return(0,J.jsxs)(`div`,{className:`shrink-0 px-5 pt-1 pb-4 ${nS}`,children:[e.children,(0,J.jsxs)(`p`,{className:`mt-1.5 px-1 text-[11px] text-muted-foreground`,children:[(0,J.jsx)(`kbd`,{className:`font-mono`,children:rS.enter}),rS.send,(0,J.jsx)(`kbd`,{className:`font-mono`,children:rS.shiftEnter}),rS.newLine,(0,J.jsx)(`kbd`,{className:`font-mono`,children:rS.at}),rS.mention]})]})}function aS(e){let{onClick:t}=e;return(0,J.jsx)(`button`,{className:`self-start rounded-md border bg-foreground px-3 py-1.5 text-xs font-medium text-background transition-opacity hover:opacity-90 disabled:opacity-50`,disabled:e.disabled,onClick:t,type:`button`,children:e.children})}function oS(e){return(0,J.jsx)(`div`,{className:`min-w-0 flex-1 overflow-y-auto`,children:(0,J.jsx)(`div`,{className:`mx-auto max-w-3xl px-6 py-8`,children:(0,J.jsx)(`section`,{className:`rounded-lg border bg-card`,children:e.children})})})}var sS={required:`required`};function cS(e){return(0,J.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,J.jsx)(`label`,{className:`font-mono text-xs text-foreground`,htmlFor:e.ids.control,children:e.label}),e.required&&(0,J.jsx)(`span`,{"aria-hidden":!0,className:`text-[11px] text-muted-foreground`,children:sS.required})]})}function lS(e){return(0,J.jsxs)(J.Fragment,{children:[e.error!==null&&(0,J.jsx)(`span`,{className:`text-xs text-destructive`,id:e.ids.error,children:e.error}),e.help!==null&&(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground`,id:e.ids.help,children:e.help})]})}var uS=`rounded-md border bg-background px-3 py-1.5 text-sm text-foreground outline-none focus:border-muted-foreground aria-invalid:border-destructive`;function dS(e){let t=(0,Y.useId)(),n=`${t}-help`,r=`${t}-error`,i=[];return e.error!==null&&i.push(r),e.help!==null&&i.push(n),{control:t,describedBy:i.join(` `),error:r,help:n}}function fS(e){let{onEdit:t}=e,n=dS(e),r=(0,Y.useRef)(null),i=(0,Y.useCallback)(()=>{r.current!==null&&t(r.current.checked)},[t]);return(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`input`,{"aria-describedby":n.describedBy,"aria-invalid":e.error!==null,checked:e.checked,className:`size-4 accent-foreground`,id:n.control,onChange:i,ref:r,type:`checkbox`}),(0,J.jsx)(cS,{ids:n,label:e.label,required:e.required})]}),(0,J.jsx)(lS,{error:e.error,help:e.help,ids:n})]})}function pS(e){return(0,J.jsx)(`div`,{className:`flex flex-col gap-3 border-b p-4 last:border-b-0`,children:e.children})}function mS(e){return(0,J.jsx)(`div`,{className:`flex flex-col gap-1 border-b p-4`,children:e.children})}function hS(e){return e?`bg-accent text-foreground`:`text-muted-foreground hover:text-foreground`}function gS(e){let{onChoose:t,value:n}=e,r=(0,Y.useCallback)(()=>{t(n)},[t,n]);return(0,J.jsxs)(`label`,{className:`flex-1 cursor-pointer rounded px-2 py-1 text-center transition-colors has-focus-visible:ring-1 ${hS(e.chosen)}`,children:[(0,J.jsx)(`input`,{checked:e.chosen,className:`sr-only`,name:e.name,onChange:r,type:`radio`,value:n}),e.label]})}function _S(e){let t=e.onChoose;return(0,J.jsxs)(`fieldset`,{className:`flex rounded-md border p-0.5 text-xs`,children:[(0,J.jsx)(`legend`,{className:`sr-only`,children:e.label}),e.choices.map(n=>(0,J.jsx)(gS,{chosen:e.value===n.value,label:n.label,name:e.label,onChoose:t,value:n.value},n.value))]})}var vS=3;function yS(e){let{onEdit:t}=e,n=(0,Y.useRef)(null),r=(0,Y.useCallback)(()=>{n.current!==null&&t(n.current.value)},[t]);return(0,J.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-xs text-muted-foreground`,children:[e.label,(0,J.jsx)(`textarea`,{autoComplete:`off`,className:`rounded-md border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-muted-foreground`,name:e.name,onChange:r,ref:n,required:!0,rows:vS,spellCheck:!1,value:e.value})]})}function bS(e){return(0,J.jsx)(`section`,{"aria-label":e.label,className:`min-h-0 flex-1 overflow-y-auto`,children:(0,J.jsx)(`div`,{className:`mx-auto max-w-3xl px-4 py-4`,children:e.children})})}var xS=`text-[11px] font-semibold tracking-wider text-muted-foreground uppercase`;function SS(e){return e.count===null?(0,J.jsxs)(`div`,{className:`my-4 flex items-center gap-3 px-3`,children:[(0,J.jsx)(`h2`,{className:xS,children:e.title}),(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`h-px flex-1 bg-border`})]}):(0,J.jsxs)(`h2`,{className:`px-3 pb-1 ${xS}`,children:[e.title,` `,(0,J.jsx)(`span`,{className:`ml-1 text-foreground tabular-nums`,children:String(e.count)})]})}function CS(e){return(0,J.jsx)(`ul`,{"aria-label":e.label,children:e.children})}var wS={empty:`px-3 py-6 text-sm text-muted-foreground`,end:`py-4 text-center text-[11px] text-muted-foreground`};function TS(e){return(0,J.jsx)(`p`,{className:wS[e.place],children:e.children})}function ES(e){return e?`font-semibold`:`font-medium`}function DS(e){return(0,J.jsxs)(`span`,{className:`flex items-baseline gap-1.5 text-[13px]`,children:[(0,J.jsx)(`a`,{className:`hover:underline ${ES(e.bold)}`,href:e.href,children:e.displayName??e.name}),e.displayName!==null&&(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`@${e.name}`}),e.note!==null&&(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.note}),(0,J.jsx)(`span`,{className:`ml-auto shrink-0 font-mono text-[11px] text-muted-foreground`,children:e.time})]})}var OS={activity:`text-muted-foreground`,"for-you":`font-semibold text-mention-fg`,read:`text-muted-foreground`};function kS(e){return(0,J.jsx)(`span`,{className:`mb-0.5 text-[11px] ${OS[e.level]}`,children:e.children})}var AS={"for-you":``,read:`opacity-80 hover:opacity-100`},jS={"for-you":`bg-mention-bar`,read:`hidden`};function MS(e){return(0,J.jsxs)(`li`,{className:`relative flex gap-3 rounded-lg px-3 py-3 transition-colors hover:bg-hover ${AS[e.level]}`,children:[(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute top-[1.35rem] left-0 h-1.5 w-1.5 rounded-full ${jS[e.level]}`}),(0,J.jsx)(sb,{agent:e.agent,name:e.name,presence:e.presence}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,J.jsx)(kS,{level:e.level,children:e.why}),(0,J.jsx)(DS,{bold:e.level!==`read`,displayName:e.displayName,href:e.href,name:e.name,note:e.note,time:e.time}),e.children]})]})}function NS(e){return e?`font-semibold`:`font-medium`}function PS(e){return(0,J.jsxs)(`span`,{className:`flex items-baseline gap-1.5 text-[13px]`,children:[(0,J.jsx)(`a`,{className:`relative z-10 hover:underline ${NS(e.bold)}`,href:e.authorHref,children:e.displayName??e.author}),e.displayName!==null&&(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`@${e.author}`}),e.note!==null&&(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.note}),(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:e.action}),(0,J.jsx)(`span`,{className:`truncate font-mono text-xs text-muted-foreground`,children:`#${e.channel}`}),(0,J.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-baseline gap-1.5`,children:[e.count!==null&&(0,J.jsx)(`span`,{className:`rounded-full bg-muted px-1.5 font-mono text-[11px] font-medium text-foreground`,children:e.count}),(0,J.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground`,children:e.time})]})]})}function FS(e){return e?`page`:!1}var IS={activity:`bg-muted-foreground/60`,"for-you":`bg-mention-bar`,read:`hidden`};function LS(e){let t=(0,Y.useId)();return(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,id:t,children:[(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute top-[1.35rem] left-0 h-1.5 w-1.5 rounded-full ${IS[e.level]}`}),(0,J.jsx)(`a`,{"aria-current":FS(e.current),"aria-labelledby":t,className:`flex outline-none after:absolute after:inset-0 after:rounded-lg`,"data-feed-row":``,href:e.href,children:(0,J.jsx)(kS,{level:e.level,children:e.why})}),(0,J.jsx)(PS,{action:e.action,author:e.author,authorHref:e.authorHref,bold:e.level!==`read`,channel:e.channel,count:e.count,displayName:e.displayName,note:e.note,time:e.time}),e.context!==null&&(0,J.jsx)(`span`,{className:`mt-0.5 truncate text-xs text-muted-foreground`,children:`re: ${e.context}`}),e.children]})}var RS={activity:``,"for-you":``,read:`opacity-80 hover:opacity-100`};function zS(e){return e.current?`bg-accent ${RS[e.level]}`:RS[e.level]}function BS(e){return(0,J.jsxs)(`li`,{className:`relative flex gap-3 rounded-lg has-focus-visible:ring-1 px-3 py-3 transition-colors hover:bg-hover ${zS(e)}`,children:[(0,J.jsx)(sb,{agent:e.agent,name:e.author,presence:e.presence}),(0,J.jsx)(LS,{action:e.action,author:e.author,authorHref:e.authorHref,channel:e.channel,context:e.context,count:e.count,current:e.current,displayName:e.displayName,href:e.href,level:e.level,note:e.note,time:e.time,why:e.why,children:e.children})]})}function VS(e){return e?`text-foreground`:`text-muted-foreground`}function HS(e){return(0,J.jsx)(`span`,{className:`mt-1 line-clamp-2 text-sm leading-relaxed whitespace-pre-wrap ${VS(e.unread)}`,children:e.children})}function US(e){let{field:t,onSubmit:n}=e,r=(0,Y.useCallback)(e=>{let r=e.get(t);typeof r==`string`&&n(r)},[t,n]);return(0,J.jsx)(`form`,{action:r,"aria-label":e.label,className:`flex flex-col gap-3 p-4`,children:e.children})}var WS=`Save`,GS=`Saving…`;function KS(e){let{onEdit:t,onSubmit:n}=e,r=(0,Y.useId)(),i=(0,Y.useRef)(null),a=(0,Y.useCallback)(()=>{i.current!==null&&t(i.current.value)},[t]),o=(0,Y.useCallback)(()=>{n()},[n]);return(0,J.jsxs)(`form`,{action:o,"aria-label":e.label,className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`label`,{className:`text-xs text-muted-foreground`,htmlFor:r,children:e.field}),(0,J.jsxs)(`span`,{className:`flex gap-2`,children:[(0,J.jsx)(`input`,{autoComplete:`off`,className:`h-8 min-w-0 flex-1 rounded-md border bg-surface px-3 text-sm text-foreground outline-none focus:border-muted-foreground`,id:r,onChange:a,ref:i,spellCheck:!1,type:`text`,value:e.value}),(0,J.jsxs)(`button`,{className:`rounded-md border bg-foreground px-3 text-xs font-medium text-background transition-opacity hover:opacity-90 disabled:opacity-50`,disabled:e.saving,type:`submit`,children:[e.saving&&GS,!e.saving&&(e.submit??WS)]})]}),e.children]})}var qS=4,JS=`Save`,YS=`Saving…`;function XS(e){return e.key===`Enter`&&(e.ctrlKey||e.metaKey)}function ZS(e){let{onEdit:t,onSubmit:n}=e,r=(0,Y.useId)(),i=(0,Y.useRef)(null),a=(0,Y.useCallback)(()=>{i.current!==null&&t(i.current.value)},[t]),o=(0,Y.useCallback)(e=>{let{form:t}=e.currentTarget;XS(e)&&t!==null&&(e.preventDefault(),t.requestSubmit())},[]),s=(0,Y.useCallback)(()=>{n()},[n]);return(0,J.jsxs)(`form`,{action:s,"aria-label":e.label,className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`label`,{className:`text-xs text-muted-foreground`,htmlFor:r,children:e.field}),(0,J.jsx)(`textarea`,{className:`field-sizing-content min-w-0 resize-none rounded-md border bg-surface px-3 py-2 text-sm text-foreground outline-none focus:border-muted-foreground`,id:r,maxLength:e.limit,onChange:a,onKeyDown:o,ref:i,rows:qS,value:e.value}),(0,J.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:`${String(e.value.length)}/${String(e.limit)}`}),(0,J.jsxs)(`button`,{className:`h-8 rounded-md border bg-foreground px-3 text-xs font-medium text-background transition-opacity hover:opacity-90 disabled:opacity-50`,disabled:e.saving,type:`submit`,children:[e.saving&&YS,!e.saving&&JS]})]}),e.children]})}function QS(e){return(0,J.jsx)(`h1`,{className:`text-sm font-semibold tracking-tight`,children:e.children})}var $S={integer:`1`,number:`any`,text:`any`},eC={integer:`number`,number:`number`,text:`text`};function tC(e){let{onEdit:t}=e,n=dS(e),r=(0,Y.useRef)(null),i=(0,Y.useCallback)(()=>{r.current!==null&&t(r.current.value)},[t]);return(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(cS,{ids:n,label:e.label,required:e.required}),(0,J.jsx)(`input`,{"aria-describedby":n.describedBy,"aria-invalid":e.error!==null,autoComplete:`off`,className:uS,id:n.control,onChange:i,ref:r,required:e.required,spellCheck:!1,step:$S[e.kind],type:eC[e.kind],value:e.value}),(0,J.jsx)(lS,{error:e.error,help:e.help,ids:n})]})}function nC(e){return(0,J.jsx)(`ul`,{"aria-label":e.label,className:`divide-y border-b last:border-b-0`,children:e.children})}function rC(e){return(0,J.jsx)(`li`,{className:`flex flex-col gap-1 px-4 py-3`,children:e.children})}function iC(e){return(0,J.jsx)(`ul`,{"aria-label":e.label,className:`divide-y`,children:e.children})}function aC(e){return(0,J.jsx)(`li`,{children:(0,J.jsx)(`a`,{className:`flex flex-col gap-1 px-4 py-3 transition-colors hover:bg-accent`,href:e.href,children:e.children})})}function oC(e){return e.mine?(0,J.jsx)(`mark`,{className:`rounded bg-mention-bg px-1 font-medium text-mention-fg ring-1 ring-mention-bar/40`,children:e.children}):(0,J.jsx)(`span`,{className:`rounded px-0.5 font-medium text-foreground`,children:e.children})}function sC(e){return(0,J.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.children})}function cC(e){return(0,J.jsx)(`p`,{className:`text-xs whitespace-pre-line text-muted-foreground`,children:e.children})}var lC=`, `;function uC(e){return e?`border-mention-bar/60 bg-mention-bg text-mention-fg`:`bg-background text-muted-foreground hover:text-foreground`}function dC(e){let t=e.onToggle;return(0,J.jsx)(`button`,{"aria-pressed":e.mine,className:`rounded-full border px-2 py-0.5 text-xs tabular-nums transition-colors ${uC(e.mine)}`,onClick:t,title:e.names.join(lC),type:`button`,children:`${e.symbol} ${String(e.count)}`})}function fC(e){return(0,J.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.children})}function pC(e){return(0,J.jsx)(`a`,{className:`hover:text-foreground hover:underline`,href:e.href,children:e.children})}function mC(e){return(0,J.jsx)(`output`,{className:`flex items-center justify-between gap-3 border-b bg-muted px-4 py-2 text-xs`,children:e.children})}function hC(){return(0,J.jsx)(`svg`,{"aria-hidden":`true`,className:`h-3.5 w-3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,viewBox:`0 0 16 16`,children:(0,J.jsx)(`path`,{d:`M8 3v10M3 8h10`,strokeLinecap:`round`})})}function gC(e){let{onClick:t}=e;return(0,J.jsx)(`button`,{"aria-expanded":e.expanded,"aria-label":e.label,className:`flex h-5 w-5 items-center justify-center rounded text-muted-foreground hover:bg-hover hover:text-foreground`,onClick:t,title:e.label,type:`button`,children:(0,J.jsx)(hC,{})})}function _C(e){return(0,J.jsxs)(`div`,{className:`flex items-center justify-between pt-5 pr-3 pb-1.5 pl-4`,children:[(0,J.jsx)(`h2`,{className:`text-[11px] font-semibold tracking-wider text-muted-foreground uppercase`,children:e.label}),e.children]})}var vC={channel:null,inbox:(0,J.jsx)(`svg`,{className:`h-3.5 w-3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,viewBox:`0 0 16 16`,children:(0,J.jsx)(`path`,{d:`M2 9h3l1 2h4l1-2h3M3.5 3h9L14 9v4H2V9z`,strokeLinejoin:`round`})}),people:(0,J.jsxs)(`svg`,{className:`h-3.5 w-3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,viewBox:`0 0 16 16`,children:[(0,J.jsx)(`circle`,{cx:`6`,cy:`5.5`,r:`2.5`}),(0,J.jsx)(`path`,{d:`M1.5 13.5c.5-2.5 2.3-4 4.5-4s4 1.5 4.5 4M11 3.2a2.4 2.4 0 010 4.6M12.5 9.8c1 .6 1.8 1.9 2 3.7`,strokeLinecap:`round`})]}),threads:(0,J.jsx)(`svg`,{className:`h-3.5 w-3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,viewBox:`0 0 16 16`,children:(0,J.jsx)(`path`,{d:`M2.5 3.5h11v7h-6l-3 2.5v-2.5h-2z`,strokeLinejoin:`round`})})};function yC(e){return e.active?`bg-accent text-foreground`:e.marked?`text-foreground hover:bg-hover`:`text-muted-foreground hover:bg-hover hover:text-foreground`}var bC={channel:`font-mono`,inbox:``,people:``,threads:``};function xC(e){let t=bC[e.icon];return e.marked?`${t} font-semibold`:t}function SC(e){return e?`page`:!1}function CC(e){return(0,J.jsx)(`li`,{className:`flex`,children:(0,J.jsxs)(`a`,{"aria-current":SC(e.active),className:`mx-2 flex flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-[13.5px] ${yC(e)}`,href:e.href,children:[(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`flex w-4 justify-center text-muted-foreground`,children:vC[e.icon]}),(0,J.jsx)(`span`,{className:`flex-1 truncate ${xC(e)}`,children:e.label}),e.children]})})}function wC(e){return(0,J.jsx)(`ul`,{"aria-label":e.label,className:`flex flex-col gap-0.5`,children:e.children})}function TC(e){return(0,J.jsx)(`section`,{className:`flex min-w-0 flex-1 flex-col`,children:e.children})}function EC(e){return e?`hidden md:flex`:`flex`}function DC(e){return(0,J.jsx)(`section`,{className:`min-w-0 flex-1 flex-col ${EC(e.hiddenWhenNarrow)}`,children:e.children})}function OC(e){return(0,J.jsx)(`aside`,{"aria-label":e.label,className:`hidden w-full items-center justify-center bg-card text-sm text-muted-foreground md:flex md:w-md md:shrink-0 md:border-l lg:w-xl`,children:e.children})}function kC(e){return(0,J.jsx)(`a`,{"aria-label":e.label,className:`rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground md:hidden`,href:e.href,children:(0,J.jsx)(`svg`,{"aria-hidden":`true`,className:`h-3.5 w-3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,viewBox:`0 0 16 16`,children:(0,J.jsx)(`path`,{d:`M13 8H3M7.5 3.5L3 8l4.5 4.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})})}var AC={open:`o`,read:`e`,unread:`u`};function jC(e){let{label:t,onAction:n,shortcut:r}=e.action,i=(0,Y.useMemo)(()=>[`${t} (${r})`],[t,r]);return(0,J.jsx)(bx,{lines:i,children:(0,J.jsx)(`button`,{"aria-keyshortcuts":r,"aria-label":e.action.name,className:`rounded-md border px-2 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-foreground`,onClick:n,type:`button`,children:t})})}function MC(e){let{label:t,shortcut:n}=e,r=(0,Y.useMemo)(()=>[`${t} (${n})`],[t,n]);return(0,J.jsx)(bx,{lines:r,children:(0,J.jsx)(`a`,{"aria-keyshortcuts":e.shortcut,className:`rounded-md border px-2 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-foreground`,href:e.href,children:e.label})})}var NC=[];function PC(e){return(0,J.jsxs)(`aside`,{"aria-label":e.label,className:`flex w-full min-w-0 flex-col bg-card md:w-md md:shrink-0 md:border-l lg:w-xl`,children:[(0,J.jsxs)(`header`,{className:`flex h-14 shrink-0 items-center gap-2 border-b px-5`,children:[(0,J.jsx)(kC,{href:e.backHref,label:e.backLabel}),(0,J.jsx)(`h2`,{className:`text-sm font-semibold`,children:e.label}),(0,J.jsx)(`span`,{className:`flex-1 font-mono text-xs text-muted-foreground`,children:e.detail}),(e.actions??NC).map(e=>(0,J.jsx)(jC,{action:e},e.label)),e.openHref!==null&&(0,J.jsx)(MC,{href:e.openHref,label:e.openLabel,shortcut:AC.open})]}),e.children]})}function FC(e){let{onClick:t}=e;return(0,J.jsxs)(`div`,{className:`my-2 flex items-center gap-3 px-5`,children:[(0,J.jsx)(`button`,{className:`rounded text-xs text-muted-foreground hover:text-foreground hover:underline focus-visible:ring-1 focus-visible:outline-none`,onClick:t,type:`button`,children:e.children}),(0,J.jsx)(`span`,{className:`h-px flex-1 bg-border`})]})}function IC(e){return e?``:`font-mono `}function LC(e){return(0,J.jsxs)(`header`,{className:`flex h-14 shrink-0 items-center gap-3 border-b px-5`,children:[(0,J.jsx)(`h1`,{className:`${IC(e.sans===!0)}text-[15px] font-semibold`,children:e.title}),e.description!==null&&e.description!==``&&(0,J.jsx)(`p`,{className:`truncate border-l pl-3 text-xs text-muted-foreground`,children:e.description}),(0,J.jsx)(`div`,{className:`ml-auto shrink-0`,children:e.children})]})}function RC(e){return(0,J.jsx)(`section`,{"aria-label":e.label,className:`min-h-0 flex-1 overflow-y-auto`,children:(0,J.jsx)(`div`,{className:`mx-auto flex max-w-3xl flex-col gap-8 px-5 py-6`,children:e.children})})}function zC(e){let{focused:t}=e,n=(0,Y.useId)(),r=(0,Y.useRef)(null);return(0,Y.useEffect)(()=>{let e=r.current;t&&e!==null&&e.focus()},[t]),(0,J.jsxs)(`section`,{"aria-labelledby":n,className:`flex flex-col gap-3`,children:[(0,J.jsx)(`h2`,{className:`border-b pb-2 text-sm font-semibold outline-none`,id:n,ref:r,tabIndex:-1,children:(0,J.jsx)(`a`,{className:`hover:underline`,href:e.href,children:e.label})}),e.children]})}function BC(e){return e?`bg-accent text-foreground`:`text-muted-foreground hover:bg-hover hover:text-foreground`}function VC(e){return e?`page`:!1}function HC(e){return(0,J.jsxs)(`a`,{"aria-current":VC(e.active),className:`-mx-2 flex items-center gap-2 rounded-md px-2 py-1.5 text-[13.5px] ${BC(e.active)}`,href:e.href,children:[(0,J.jsxs)(`svg`,{"aria-hidden":`true`,className:`h-3.5 w-3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,viewBox:`0 0 16 16`,children:[(0,J.jsx)(`circle`,{cx:`8`,cy:`8`,r:`2.2`}),(0,J.jsx)(`path`,{d:`M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.4 3.4l1.4 1.4M11.2 11.2l1.4 1.4M3.4 12.6l1.4-1.4M11.2 4.8l1.4-1.4`,strokeLinecap:`round`})]}),e.children]})}function UC(e){return e?`bg-accent text-muted-foreground hover:text-foreground`:`text-foreground hover:bg-accent`}function WC(e){let{onClick:t}=e;return(0,J.jsx)(`button`,{"aria-pressed":e.pressed,className:`rounded-md border px-2.5 py-1 text-xs font-medium transition-colors disabled:opacity-50 ${UC(e.pressed)}`,disabled:e.disabled,onClick:t,type:`button`,children:e.children})}var GC={none:`—`};function KC(e){let{onEdit:t}=e,n=dS(e),r=(0,Y.useRef)(null),i=(0,Y.useCallback)(()=>{r.current!==null&&t(r.current.value)},[t]);return(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(cS,{ids:n,label:e.label,required:e.required}),(0,J.jsxs)(`select`,{"aria-describedby":n.describedBy,"aria-invalid":e.error!==null,className:uS,id:n.control,onChange:i,ref:r,required:e.required,value:e.value,children:[(0,J.jsx)(`option`,{value:``,children:GC.none}),e.options.map(e=>(0,J.jsx)(`option`,{value:e,children:e},e))]}),(0,J.jsx)(lS,{error:e.error,help:e.help,ids:n})]})}var qC=`min-w-5 rounded-full px-1.5 py-px text-center text-[11px] font-semibold tabular-nums`,JC={loud:`${qC} bg-mention-bar text-mention-ink`,quiet:`${qC} bg-muted text-muted-foreground`,unseen:`sr-only`};function YC(e){return(0,J.jsxs)(`span`,{className:JC[e.tone],children:[e.tone!==`unseen`&&(0,J.jsx)(`span`,{"aria-hidden":`true`,children:String(e.count)}),` `,(0,J.jsx)(`span`,{className:`sr-only`,children:e.label})]})}var XC={cancel:`Cancel`};function ZC(e){let t=e.onCancel;return(0,J.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,J.jsx)(`button`,{className:`rounded-lg px-3 py-1.5 text-xs text-muted-foreground hover:bg-muted hover:text-foreground`,onClick:t,type:`button`,children:XC.cancel}),(0,J.jsxs)(`button`,{className:`rounded-lg border bg-foreground px-3 py-1.5 text-xs font-medium text-background transition-opacity hover:opacity-90 disabled:opacity-50`,disabled:e.busy,type:`submit`,children:[e.busy&&e.busyButton,!e.busy&&e.button]})]})}var QC=`input, select, textarea`,$C=`Escape`;function ew(e){let t=e.onCancel,{onEscape:n}=e,r=(0,Y.useRef)(null);return(0,Y.useEffect)(()=>{let e=r.current;function t(e){e.key===$C&&(e.preventDefault(),n())}function i(){e!==null&&e.removeEventListener(`keydown`,t)}return e!==null&&e.addEventListener(`keydown`,t),i},[n]),(0,Y.useEffect)(()=>{let e=r.current;if(e!==null){let t=e.querySelector(QC);t!==null&&t.focus()}},[]),(0,J.jsxs)(`form`,{action:e.onSubmit,"aria-label":e.label,className:`mx-5 mt-1 mb-4 flex shrink-0 flex-col gap-3 rounded-xl border bg-surface p-3 shadow-sm focus-within:border-muted-foreground/60`,ref:r,children:[(0,J.jsxs)(`p`,{className:`flex items-baseline gap-2 px-1`,children:[(0,J.jsx)(`span`,{className:`font-mono text-sm font-semibold text-foreground`,children:e.title}),e.description!==null&&(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.description})]}),(0,J.jsx)(`div`,{className:`flex flex-col gap-3 px-1`,children:e.children}),(0,J.jsx)(ZC,{busy:e.busy,busyButton:e.busyButton,button:e.button,onCancel:t})]})}function tw(e){return(0,J.jsx)(`a`,{"aria-label":e.label,className:`rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground`,href:e.href,children:(0,J.jsx)(`svg`,{"aria-hidden":`true`,className:`h-3.5 w-3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,viewBox:`0 0 16 16`,children:(0,J.jsx)(`path`,{d:`M3.5 3.5l9 9M12.5 3.5l-9 9`,strokeLinecap:`round`})})})}function nw(e){return(0,J.jsxs)(`aside`,{"aria-label":e.label,className:`absolute inset-0 z-20 flex w-full flex-col bg-card md:static md:w-md md:shrink-0 md:border-l`,children:[(0,J.jsxs)(`header`,{className:`flex h-14 shrink-0 items-center gap-2 border-b px-5`,children:[(0,J.jsx)(`h2`,{className:`text-sm font-semibold`,children:e.label}),(0,J.jsx)(`span`,{className:`flex-1 font-mono text-xs text-muted-foreground`,children:e.detail}),(0,J.jsx)(tw,{href:e.closeHref,label:e.closeLabel})]}),e.children]})}var rw=80;function iw(e){let{count:t}=e,n=(0,Y.useRef)(null),r=(0,Y.useRef)(!0),i=(0,Y.useRef)(null),a=(0,Y.useCallback)(()=>{let e=n.current;r.current=e===null||e.scrollHeight-e.scrollTop-e.clientHeight<rw},[]);return(0,Y.useLayoutEffect)(()=>{let e=n.current;e!==null&&i.current!==t&&r.current&&(e.scrollTop=e.scrollHeight),i.current=t},[t]),(0,J.jsx)(`section`,{"aria-label":e.label,className:`min-h-0 flex-1 overflow-y-auto pb-2`,onScroll:a,ref:n,children:e.children})}var aw={collapse:`Collapse sidebar`,expand:`Expand sidebar`};function ow(e){return e?aw.expand:aw.collapse}function sw(e){return e?`M6 4l4 4-4 4`:`M10 4l-4 4 4 4`}function cw(e){let t=e.onClick;return(0,J.jsx)(`button`,{"aria-expanded":!e.collapsed,"aria-label":ow(e.collapsed),className:`hidden rounded-md p-1.5 text-muted-foreground hover:bg-accent hover:text-foreground md:inline-flex`,onClick:t,title:ow(e.collapsed),type:`button`,children:(0,J.jsx)(`svg`,{"aria-hidden":`true`,className:`h-4 w-4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,viewBox:`0 0 16 16`,children:(0,J.jsx)(`path`,{d:sw(e.collapsed),strokeLinecap:`round`,strokeLinejoin:`round`})})})}function lw(e){return e?`fixed top-12 bottom-0 left-0 z-30 flex shadow-xl md:static md:shadow-none`:`hidden md:flex`}function uw(e){return e?`w-12`:`w-64`}function dw(e){return e?`justify-center`:`justify-between px-4`}function fw(e){let t=e.onToggleCollapsed,n=e.collapsed&&!e.open;return(0,J.jsxs)(`nav`,{"aria-label":e.label,className:`${uw(n)} shrink-0 flex-col border-r bg-card ${lw(e.open)}`,children:[(0,J.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center ${dw(n)}`,children:[!n&&(0,J.jsx)(`span`,{className:`font-mono text-sm font-semibold tracking-tight`,children:e.title}),(0,J.jsx)(cw,{collapsed:n,onClick:t})]}),!n&&e.children]})}function pw(e){return e instanceof Element&&e.closest(`a`)!==null}function mw(e){let{onFollow:t}=e,n=(0,Y.useCallback)(e=>{pw(e.target)&&t()},[t]);return(0,J.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto pt-1 pb-3`,onClickCapture:n,children:e.children})}function hw(e){return(0,J.jsx)(`div`,{className:`relative flex flex-col gap-3 border-t px-4 py-3`,children:e.children})}var gw={long:`w-56`,short:`w-40`};function _w(e){return(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`h-4 animate-pulse rounded bg-muted ${gw[e.width]}`})}function vw(e){return e?`bg-muted`:``}function yw(e){let{onChoose:t,option:n,presence:r}=e,i=(0,Y.useCallback)(()=>{t(n)},[t,n]);return(0,J.jsx)(`li`,{children:(0,J.jsxs)(`button`,{"aria-current":e.highlighted,"aria-label":Gy({name:e.spoken,presence:r}),className:`flex w-full items-baseline gap-2 px-3 py-1.5 text-left text-foreground hover:bg-muted focus:bg-muted focus:outline-none ${vw(e.highlighted)}`,onClick:i,type:`button`,children:[r!==null&&(0,J.jsx)(Yy,{label:r.label,name:n,online:r.online,place:`inline`,spoken:r.spoken,warning:r.warning}),(0,J.jsx)(`span`,{children:n}),e.detail!==null&&(0,J.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.detail})]})})}function bw(e){let t=e.onChoose;return(0,J.jsx)(`ul`,{"aria-label":e.label,className:`z-50 flex flex-col rounded-md border bg-background py-1 text-sm`,children:e.options.map((n,r)=>(0,J.jsx)(yw,{detail:n.detail,highlighted:r===e.highlighted,onChoose:t,option:n.option,presence:n.presence,spoken:n.spoken},n.option))})}function xw(e){return(0,J.jsx)(`button`,{"aria-label":e.label,className:`self-start rounded-md border bg-foreground p-1.5 text-background transition-opacity hover:opacity-90 disabled:opacity-50`,disabled:e.disabled,title:e.label,type:`submit`,children:(0,J.jsx)(`svg`,{"aria-hidden":`true`,className:`h-4 w-4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,viewBox:`0 0 16 16`,children:(0,J.jsx)(`path`,{d:`M14 2L7 9M14 2l-4.5 12L7 9 2 6.5 14 2z`,strokeLinecap:`round`,strokeLinejoin:`round`})})})}function Sw(e){return(0,J.jsx)(`button`,{className:`self-start rounded-md border bg-foreground px-3 py-1.5 text-xs font-medium text-background transition-opacity hover:opacity-90 disabled:opacity-50`,disabled:e.disabled,type:`submit`,children:e.children})}function Cw(e){return(0,J.jsx)(`span`,{className:`rounded border px-1 py-px text-[10px] leading-none font-medium tracking-wide text-muted-foreground uppercase`,children:e.label})}var ww={ArrowDown:`down`,ArrowUp:`up`,Enter:`pick`,Escape:`close`,Tab:`pick`},Tw={Enter:`send`};function Ew(e,t){return t?ww[e]??null:Tw[e]??null}function Dw(e){let{choosing:t,onClose:n,onMove:r,onPick:i,onSend:a}=e;return(0,Y.useCallback)(e=>{let o=Ew(e.key,t);o===null||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),{close:n,down:()=>{r(`down`)},pick:i,send:a,up:()=>{r(`up`)}}[o]())},[t,n,r,i,a])}function Ow(e){let t=(0,Y.useRef)(null);return(0,Y.useEffect)(()=>{let n=t.current;e&&n!==null&&n.focus()},[e]),t}function kw(e){let{caret:t,focusRequests:n,onEdit:r,value:i}=e,a=Ow(e.focused),o=(0,Y.useRef)({caret:t,focusRequests:n,value:i}),s=(0,Y.useCallback)(()=>{let e=a.current;e!==null&&(o.current={caret:e.selectionStart,focusRequests:o.current.focusRequests,value:e.value},r(e.value,e.selectionStart))},[a,r]);return(0,Y.useLayoutEffect)(()=>{let e=a.current,{current:r}=o;e===null||r.value===i&&r.caret===t&&r.focusRequests===n||(o.current={caret:t,focusRequests:n,value:i},e.focus(),e.setSelectionRange(t,t))},[a,t,n,i]),{box:a,handleEdit:s}}var Aw=3;function jw(e){let{caret:t,choosing:n,focused:r,onClose:i,onEdit:a,onMove:o,onPick:s,value:c}=e,{focusRequests:l}=e,u=(0,Y.useId)(),{box:d,handleEdit:f}=kw({caret:t,focusRequests:l,focused:r,onEdit:a,value:c}),p=Dw({choosing:n,onClose:i,onMove:o,onPick:s,onSend:(0,Y.useCallback)(()=>{let e=d.current;e!==null&&e.form!==null&&e.form.requestSubmit()},[d])});return(0,J.jsxs)(`div`,{className:`flex flex-col gap-1.5 text-xs text-muted-foreground`,children:[(0,J.jsx)(`label`,{htmlFor:u,children:e.label}),(0,J.jsx)(`textarea`,{className:`rounded-md border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-muted-foreground`,id:u,name:e.name,onChange:f,onKeyDown:p,onSelect:f,ref:d,required:!0,rows:Aw,value:c})]})}function Mw(e){return(0,J.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-xs text-muted-foreground`,children:[e.label,(0,J.jsx)(`input`,{autoComplete:`off`,className:`rounded-md border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-muted-foreground`,name:e.name,required:!0,spellCheck:!1,type:`password`})]})}var Nw={close:`Close the sidebar`,open:`Open the sidebar`};function Pw(e){return e?Nw.close:Nw.open}function Fw(e){let t=e.onClick;return(0,J.jsx)(`button`,{"aria-expanded":e.open,"aria-label":Pw(e.open),className:`relative z-40 rounded-md p-1.5 text-muted-foreground hover:bg-accent hover:text-foreground`,onClick:t,type:`button`,children:(0,J.jsx)(`svg`,{"aria-hidden":`true`,className:`h-4 w-4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,viewBox:`0 0 16 16`,children:(0,J.jsx)(`path`,{d:`M2 4h12M2 8h12M2 12h12`,strokeLinecap:`round`})})})}var Iw={topBar:`Top bar`};function Lw(e){let t=e.onToggleSidebar;return(0,J.jsxs)(`div`,{className:`flex h-screen flex-col bg-background font-sans text-foreground md:flex-row`,children:[(0,J.jsx)(`header`,{"aria-label":Iw.topBar,className:`flex h-12 shrink-0 items-center border-b px-3 md:hidden`,children:(0,J.jsx)(Fw,{onClick:t,open:e.sidebarOpen})}),e.children]})}function Rw(e){return(0,J.jsx)(`main`,{className:`relative flex min-h-0 min-w-0 flex-1`,children:e.children})}function zw(e){return(0,J.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:e.children})}function Bw(e){return(0,J.jsx)(`output`,{"aria-label":e.label,"aria-live":`polite`,className:`block shrink-0`,children:e.shown&&(0,J.jsx)(`span`,{className:`block border-b border-mention-bar bg-mention-bg px-4 py-1.5 text-center text-xs text-mention-fg`,children:e.children})})}var Vw=`agent`;function Hw(e){return(0,J.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,J.jsx)(sb,{agent:e.agent,name:e.name,presence:e.presence}),(0,J.jsx)(`span`,{className:`truncate text-sm font-semibold`,children:e.shown}),e.handle!==null&&(0,J.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:e.handle}),e.agent&&(0,J.jsx)(Cw,{label:Vw})]})}function Uw(e){return e?`page`:!1}function Ww(e){let{displayName:t,name:n}=e;return(0,J.jsxs)(`a`,{"aria-current":Uw(e.active),"aria-label":Gy({name:t??n,presence:e.presence}),className:`-mx-2 flex rounded-md px-2 py-1 hover:bg-hover`,href:e.href,children:[t===null&&(0,J.jsx)(Hw,{agent:e.agent,handle:null,presence:e.presence,name:n,shown:n}),t!==null&&(0,J.jsx)(Hw,{agent:e.agent,handle:`@${n}`,presence:e.presence,name:n,shown:t})]})}function Gw(e){return e?`border-foreground bg-foreground text-background`:`text-muted-foreground hover:text-foreground`}function Kw(e){let{onClick:t}=e;return(0,J.jsx)(`button`,{"aria-pressed":e.pressed,className:`rounded-full border px-3 py-1 text-xs font-medium transition-colors ${Gw(e.pressed)}`,onClick:t,type:`button`,children:e.children})}function qw(e){return e?`border-foreground bg-foreground text-background`:`text-muted-foreground hover:text-foreground`}function Jw(e){return e?`page`:!1}function Yw(e){return(0,J.jsx)(`a`,{"aria-current":Jw(e.current),className:`rounded-full border px-3 py-1 text-xs font-medium transition-colors ${qw(e.current)}`,href:e.href,children:e.children})}function Xw(e){let{onClick:t}=e;return(0,J.jsx)(`span`,{className:`relative z-10 mt-2 flex`,children:(0,J.jsx)(`button`,{className:`rounded-md border px-2.5 py-0.5 text-xs text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:ring-1 focus-visible:outline-none disabled:opacity-50`,disabled:e.disabled,onClick:t,type:`button`,children:e.children})})}var Zw=0,Qw=10;function $w(e){return(0,J.jsx)(`time`,{className:`font-mono`,dateTime:e.time,children:e.time.slice(Zw,Qw)})}function eT(e){let{onEdit:t}=e,n=(0,Y.useRef)(null),r=(0,Y.useCallback)(()=>{n.current!==null&&t(n.current.value)},[t]);return(0,J.jsx)(`input`,{"aria-label":e.label,autoComplete:`off`,className:`h-8 w-64 max-w-full rounded-md border bg-surface px-3 text-sm text-foreground outline-none placeholder:text-muted-foreground focus:border-muted-foreground`,onChange:r,placeholder:`${e.label}…`,ref:n,spellCheck:!1,type:`text`,value:e.value})}function tT(e){let{row:t}=e;return(0,J.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-sm`,children:[t.displayName===null&&(0,J.jsx)(`span`,{className:`truncate font-semibold`,children:t.name}),t.displayName!==null&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{className:`truncate font-semibold`,children:t.displayName}),(0,J.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:`@${t.name}`})]}),t.note!==null&&(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t.note}),t.children]})}function nT(e){return(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,J.jsx)(tT,{row:e.row}),(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.row.detail})]})}function rT(e){return e?`bg-accent`:`hover:bg-hover`}function iT(e){return e?`page`:!1}function aT(e){return(0,J.jsx)(`li`,{children:(0,J.jsxs)(`a`,{"aria-current":iT(e.active),"aria-label":Gy({name:e.displayName??e.name,presence:e.presence}),className:`flex items-center gap-3 rounded-lg px-3 py-2.5 ${rT(e.active)}`,href:e.href,children:[(0,J.jsx)(sb,{agent:e.agent,name:e.name,presence:e.presence}),(0,J.jsx)(nT,{row:e})]})})}function oT(e){return(0,J.jsx)(`section`,{"aria-label":e.label,className:`min-h-0 flex-1 overflow-y-auto px-2 py-2`,children:e.children})}function sT(e){return(0,J.jsxs)(`div`,{className:`flex items-center gap-4 border-b px-5 py-5`,children:[(0,J.jsx)(sb,{agent:e.agent,name:e.name,presence:e.presence,size:`large`}),(0,J.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:e.children})]})}function cT(e){return(0,J.jsxs)(`h3`,{className:`flex min-w-0 items-center gap-2 text-lg font-semibold`,children:[(0,J.jsx)(`span`,{className:`truncate`,children:e.displayName??e.name}),e.displayName!==null&&(0,J.jsx)(`span`,{className:`truncate text-sm font-normal text-muted-foreground`,children:`@${e.name}`}),e.note!==null&&(0,J.jsx)(`span`,{className:`text-sm font-normal text-muted-foreground`,children:e.note}),e.children]})}function lT(e){return(0,J.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 border-b px-5 py-3`,children:e.children})}var uT={approve:`Approve`,code:`Code`,idleExpiry:`Idle expiry`,replace:`Replace its live session`};function dT({agentJoinRequest:e}){return e.creates?`Creates ${e.joins}, owned by you, and joins as it.`:`Joins as ${e.joins}, which you own.`}function fT({agentJoinRequest:e}){let t=e.liveSessionExpiresAt??null;return t===null?null:`${e.joins} has a live session until ${t}. Approving replaces it only if you tick this.`}function pT({agentJoinRequest:e}){return`Approved, with an idle expiry of ${e.idleExpiry}. The box finishes joining now; you can close this page.`}function mT({refusal:e}){return e===null?null:`Couldn't approve (${e.code}): ${e.message}`}function hT(e){let{approval:t,state:n}=e,{agentJoinRequest:r}=n,i=fT(n),a=mT(n),o=t.editIdleExpiry,s=t.editReplace,c=t.approve;return(0,J.jsxs)(pS,{children:[(0,J.jsx)(`p`,{"aria-label":uT.code,className:`font-mono text-2xl font-semibold tracking-widest`,children:r.userCode}),(0,J.jsx)(sC,{children:`${r.as} asks to join from ${r.host}, until ${r.expiresAt}.`}),(0,J.jsx)(sC,{children:dT(n)}),(0,J.jsx)(tC,{error:null,help:`At most ${r.idleExpiry}, as asked. You may lower it, such as 7d or 12h.`,kind:`text`,label:uT.idleExpiry,onEdit:o,required:!0,value:n.idleExpiry}),i!==null&&(0,J.jsx)(fS,{checked:n.replace,error:null,help:i,label:uT.replace,onEdit:s,required:!1}),a!==null&&(0,J.jsx)(lu,{children:a}),n.status===`approved`&&(0,J.jsx)(sC,{children:pT(n)}),n.status!==`approved`&&(0,J.jsx)(aS,{disabled:n.status===`approving`,onClick:c,children:uT.approve})]})}function gT(e){let{approval:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot);return n.status===`loading`?(0,J.jsx)(pS,{children:(0,J.jsx)(_w,{width:`long`})}):n.status===`refused`?(0,J.jsx)(pS,{children:(0,J.jsx)(lu,{children:`Couldn't show this agent join request (${n.refusal.code}): ${n.refusal.message}`})}):(0,J.jsx)(hT,{approval:t,state:n})}var _T={description:`Approve only if this code matches the one the box shows. The box then acts as an agent you own, never as you.`,title:`Approve an agent join`};function vT(e){return(0,J.jsxs)(oS,{children:[(0,J.jsxs)(mS,{children:[(0,J.jsx)(QS,{children:_T.title}),(0,J.jsx)(sC,{children:_T.description})]}),(0,J.jsx)(gT,{approval:e.approval})]})}var yT={create:{status:`idle`},description:``,name:``,open:!1};function bT(e){if(!(e instanceof Er))return`name`;let t=e.schemaProblems.map(({path:[e]})=>e);return t.includes(`description`)&&t.every(e=>e===`description`)?`description`:`name`}function xT(e){let t=e.name.trim(),n=e.description.trim();return n===``?{name:t}:{description:n,name:t}}async function ST(e){await e.previous;let{publish:t,typed:n}=e;try{let{channel:r}=await e.client.createChannel(xT(n));e.put(r),t(yT),e.created(r.name)}catch(e){t({...n,create:{...Dr(e),field:bT(e),status:`failed`}})}}function CT(e){let t=new Set,n=yT,r=Promise.resolve();function i(e){n=e;for(let e of t)e()}return{close:()=>{i(yT)},create:t=>{i({...n,create:{status:`creating`}}),r=ST({client:e.client,created:t,previous:r,publish:i,put:e.put,typed:n})},editDescription:e=>{i({...n,description:e})},editName:e=>{i({...n,name:e})},open:()=>{i({...n,open:!0})},snapshot:()=>n,subscribe:e=>(t.add(e),()=>{t.delete(e)})}}var wT=[`profile`,`theme`,`agents`],TT=/^(?:#\/?|#\/inbox)?$/u,ET=/^#\/inbox\/(?<channel>[^/]+)(?:\/(?<thread>[^/]+))?$/u,DT=/^#\/login$/u,OT=/^#\/settings$/u,kT=/^#\/settings\/(?<section>[^/]+)$/u,AT=/^#\/people$/u,jT=/^#\/threads(?:\/all)?$/u,MT=/^#\/people\/(?<identity>[^/]+(?:\/[^/]+)?)$/u,NT=/^#\/channels\/(?<channel>[^/]+)$/u,PT=/^#\/channels\/(?<channel>[^/]+)\/threads\/(?<thread>[^/]+)$/u,FT=/\?profile=(?<profile>[^/?]*(?:\/[^/?]*)?)$/u,IT=/^.*\?profile=(?<profile>[^/?]*(?:\/[^/?]*)?)$/u,LT=/^#\/approve\/(?<code>[^/]+)$/u,RT=/^#\/approve-join\/(?<code>[^/]+)$/u,zT=/^\d+$/u,BT={name:`missing`};function VT(e){return ja(e)?{channel:e,name:`channel`}:BT}function HT(e){return ci(e)?{identity:e,name:`profile`}:BT}function UT(e){for(let t of wT)if(t===e)return{name:`settings`,section:t};return BT}function WT(e,t=`approve`){return Co(e)?{name:t,userCode:e}:BT}function GT(e,t){let n=Number(t);return!ja(e)||!zT.test(t)||!so(n)?null:{channel:e,thread:n}}function KT(e,t){let n=GT(e,t);return n===null?BT:{...n,name:`thread`}}function qT(e,t){if(t===``&&ja(e))return{name:`inbox`,selected:{channel:e,thread:null}};let n=GT(e,t);return n===null?BT:{name:`inbox`,selected:n}}var JT=[e=>TT.test(e)&&{name:`inbox`,selected:null},e=>ET.test(e)&&qT(e.replace(ET,`$<channel>`),e.replace(ET,`$<thread>`)),e=>DT.test(e)&&{name:`login`},e=>OT.test(e)&&{name:`settings`,section:null},e=>kT.test(e)&&UT(e.replace(kT,`$<section>`)),e=>AT.test(e)&&{name:`people`},e=>jT.test(e)&&{all:e.endsWith(`/all`),name:`open-threads`},e=>MT.test(e)&&HT(e.replace(MT,`$<identity>`)),e=>LT.test(e)&&WT(e.replace(LT,`$<code>`)),e=>RT.test(e)&&WT(e.replace(RT,`$<code>`),`approve-join`),e=>NT.test(e)&&VT(e.replace(NT,`$<channel>`)),e=>PT.test(e)&&KT(e.replace(PT,`$<channel>`),e.replace(PT,`$<thread>`))];function YT(e){return e===null?`#/settings`:`#/settings/${e}`}function XT(e){return e?`#/threads/all`:`#/threads`}function ZT(e){return e.name===`channel`?`#/channels/${e.channel}`:`#/channels/${e.channel}/threads/${String(e.thread)}`}function QT(e){return e===null?`#/inbox`:e.thread===null?`#/inbox/${e.channel}`:`#/inbox/${e.channel}/${String(e.thread)}`}function $T(e){return e.name===`open-threads`?XT(e.all):e.name===`settings`?YT(e.section):ZT(e)}function eE(e){let t=e.replace(IT,`$<profile>`);return!FT.test(e)||!ci(t)?null:t}function tE(e,t){return e.name===`thread`?{profile:t,route:{channel:e.channel,name:`channel`}}:e.name===`people`||e.name===`profile`?{profile:null,route:{identity:t,name:`profile`}}:{profile:t,route:e}}function nE(e){return e.name!==`login`&&e.name!==`approve`&&e.name!==`approve-join`&&e.name!==`missing`}function rE(e){for(let t of JT){let n=t(e);if(n!==!1)return n}return BT}function iE(e){return e.name===`inbox`?QT(e.selected):e.name===`people`?`#/people`:e.name===`profile`?`#/people/${e.identity}`:$T(e)}function aE(e){let t=rE(e.replace(FT,``)),n=eE(e);return n===null||t.name===`missing`?{profile:null,route:t}:tE(t,n)}function oE(e){let{identity:t}=e,{route:n}=tE(e.route,t);return!nE(n)||n.name===`profile`?iE({identity:t,name:`profile`}):`${iE(n)}?profile=${t}`}function sE(e){return nE(e)?iE(e):iE({name:`people`})}function cE(e){return{...Dr(e),status:`failed`}}function lE(e,t){return e.status===`loaded`&&!e.channels.some(e=>e.name===t.channel)}function uE(e,t){return e.status===`loaded`?{channels:[...e.channels.filter(e=>e.name!==t.name),t].toSorted((e,t)=>e.name.localeCompare(t.name)),status:`loaded`}:e}function dE(e,t){return e.status===`loaded`?{channels:e.channels.filter(e=>e.name!==t),status:`loaded`}:e}function fE(e){let{route:t}=aE(globalThis.location.hash);return(t.name===`channel`||t.name===`thread`)&&t.channel===e&&(globalThis.location.hash=iE({name:`inbox`,selected:null}),!0)}async function pE(e){try{return{channels:(await e.listChannels()).channels,status:`loaded`}}catch(e){return cE(e)}}function mE(e){let t=new Set,n={channels:{status:`loading`},notice:null},r=null;function i(e){n={...n,...e};for(let e of t)e()}async function a(){i({channels:await pE(e)})}async function o(e){await e,await a()}return{add:e=>{i({channels:uE(n.channels,e)})},dismissNotice:()=>{i({notice:null})},receive:e=>{lE(n.channels,e)&&(r=o(r))},reload:()=>{r=o(r)},remove:({name:e})=>{i({channels:dE(n.channels,e),...fE(e)&&{notice:e}})},snapshot:()=>n,subscribe:e=>(t.add(e),r??=a(),()=>{t.delete(e)})}}function hE(e,t){return[...e.filter(e=>e.name!==t.name),t].toSorted((e,t)=>e.name.localeCompare(t.name))}function gE({client:e,live:t=null}){let n=new Set,r={status:`loading`},i=null;function a(e){r=e;for(let e of n)e()}function o(e){e.type===`command`&&r.status===`loaded`&&a({commands:hE(r.commands,e.command),status:`loaded`})}async function s(){t!==null&&t.subscribe(o);try{let{commands:t}=await e.listCommands();a({commands:t,status:`loaded`})}catch(e){a(cE(e))}}return{snapshot:()=>r,subscribe:e=>(n.add(e),i??=s(),()=>{n.delete(e)})}}function _E({added:e,deleted:t,receiptReceivers:n,receivers:r}){function i(e){for(let t of n())t.receiveReceipt(e)}function a(e){for(let t of r())t.receive(e)}return n=>{n.type===`channel`&&e(n.channel),n.type===`channel-deleted`&&t(n.channel),n.type===`read-receipt`&&i(n.receipt),n.type===`message`&&a(n.message)}}function vE({receiptReceivers:e}){return t=>{if(t.type===`thread`)for(let n of e())n.receiveThread(t.parent)}}function yE({back:e,receiptReceivers:t}){return()=>{e();for(let e of t())e.refetch()}}function bE(e){let{live:t}=e,n=!1;function r(){!n&&t!==null&&(n=!0,t.subscribe(_E(e)),t.subscribe(vE(e)),t.onBack(yE(e)))}return{follow:r,followed:e=>({...e,subscribe:t=>(r(),e.subscribe(t))})}}var xE={status:`not-json`};function SE(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function CE(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`?e:null}function wE(e){return Array.isArray(e)?e.map(e=>wE(e)):SE(e)?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,wE(t)])):CE(e)}function TE(e){try{return{data:wE(JSON.parse(e)),status:`json`}}catch{return xE}}function EE(e){return{code:`invalid_json`,command:e,message:`The data isn't JSON.`,problems:[],status:`failed`}}function DE(e){return e instanceof Er?e.schemaProblems:[]}function OE(e){let{code:t,message:n}=cE(e.error);return{code:t,command:e.command,message:n,problems:DE(e.error),status:`failed`}}function kE(e,t){return e.messageId===t.messageId&&e.identity===t.identity}function AE({fresh:e,receipts:t}){return[...t.filter(t=>!e.some(e=>kE(t,e))),...e]}function jE({holds:e,receipt:t,receipts:n}){return e(t.messageId)?AE({fresh:[t],receipts:n}):n}function ME({message:e,parent:t}){if(e.id!==t.id)return e;let{closedAt:n,closedBy:r}=t;return{...co(e),...n&&r&&{closedAt:n,closedBy:r}}}async function NE(e,t){await e,await t()}function PE({changed:e,client:t}){let n=new Set,r={close:t.closeThread,reopen:t.reopenThread},i=null,a=null;function o(e){i=e;for(let e of n)e()}async function s({action:t,messageId:n}){o(null);try{let{message:i}=await r[t](n);e(i)}catch(e){o({...Dr(e),action:t})}}function c(e){a=NE(a,async()=>{await s(e)})}return{close:e=>{c({action:`close`,messageId:e})},refusal:()=>i,reopen:e=>{c({action:`reopen`,messageId:e})},subscribe:e=>(n.add(e),()=>{n.delete(e)})}}var FE=0;async function IE({newestShown:e,page:t,paging:n}){let r=Math.min(...t.messages.map(e=>e.id));if(!t.hasMore||r<=e)return t;let i=await IE({newestShown:e,page:await n.client.listMessages(n.name,{before:r,limit:n.pageSize}),paging:n});return{hasMore:i.hasMore,messages:[...i.messages,...t.messages],receipts:[...i.receipts,...t.receipts]}}async function LE(e){let{shown:t}=e,n=await e.client.listMessages(e.name,{limit:e.pageSize});return await IE({newestShown:Math.max(FE,...t.map(e=>e.id)),page:n,paging:e})}var RE=-1,zE=0,BE=0;function VE(e,t){let n=e.current();n.status===`loaded`&&e.publish(t(n))}async function HE(e,t){VE(e,e=>({...e,read:{status:`acking`}}));try{let{readPosition:n}=await e.client.ack(t.id);VE(e,e=>({...e,read:{readPosition:n,status:`acked`}}))}catch(t){VE(e,e=>({...e,read:cE(t)}))}}async function UE(e){try{let{hasMore:t,messages:n,receipts:r}=await e.client.listMessages(e.name,{limit:e.pageSize});e.publish({call:{status:`idle`},callData:``,expanded:new Map,hasMore:t,messages:n,older:{status:`idle`},post:{status:`idle`},read:{status:`none`},receipts:r,status:`loaded`}),await Promise.all(n.slice(RE).map(async t=>{await HE(e,t)}))}catch(t){e.publish(cE(t))}}function WE(e,t){let n=Math.min(...t.messages.map(e=>e.id)),r=e.messages.filter(e=>e.id<n),i=AE({fresh:t.receipts,receipts:e.receipts});return r.length===BE?{...e,hasMore:t.hasMore,messages:t.messages,receipts:i}:{...e,messages:[...r,...t.messages],receipts:i}}async function GE(e){let t=e.current();if(t.status!==`loaded`)await UE(e);else try{let n=await LE({...e,shown:t.messages});VE(e,e=>WE(e,n)),await Promise.all(n.messages.slice(RE).map(async t=>{await HE(e,t)}))}catch(t){VE(e,e=>({...e,read:cE(t)}))}}async function KE(e){let t=e.current();if(t.status!==`loaded`||!t.hasMore)return;let n=Math.min(...t.messages.map(e=>e.id));VE(e,e=>({...e,older:{status:`loading`}}));try{let t=await e.client.listMessages(e.name,{before:n,limit:e.pageSize});VE(e,e=>({...e,hasMore:t.hasMore,messages:[...t.messages,...e.messages],older:{status:`idle`},receipts:AE({fresh:t.receipts,receipts:e.receipts})}))}catch(t){VE(e,e=>({...e,older:cE(t)}))}}async function qE(e,{called:t,command:n}){let r=await e.client.listMessages(e.name,{limit:e.pageSize});VE(e,e=>{let t=Math.max(...e.messages.map(e=>e.id)),i=r.messages.filter(e=>e.id>t);return{...e,call:{command:n,status:`called`},callData:``,messages:[...e.messages,...i],receipts:AE({fresh:r.receipts,receipts:e.receipts})}}),t()}async function JE(e,t){let{command:n}=t,r=TE(t.data);if(r.status===`not-json`)VE(e,e=>({...e,call:EE(n)}));else{VE(e,e=>({...e,call:{command:n,status:`calling`}}));try{await e.client.callCommand(n,{channel:e.name,data:r.data}),await qE(e,t)}catch(t){VE(e,e=>({...e,call:OE({command:n,error:t})}))}}}function YE(e,t){return e.id!==t.replyTo||e.latestReplyId!==null&&e.latestReplyId>=t.id?e:lo({parent:e,reply:t})}function XE(e,t){return t.kind===`reply`?{...e,messages:e.messages.map(e=>YE(e,t))}:e.messages.some(e=>e.id===t.id)?e:{...e,messages:[...e.messages,t]}}function ZE(e,t){return e.messages.some(e=>e.id===t)}async function QE(e,{posted:t,text:n}){VE(e,e=>({...e,post:{status:`posting`}}));try{let{message:r}=await e.client.createMessage({channel:e.name,text:n});VE(e,e=>({...XE(e,r),post:{status:`idle`}})),t()}catch(t){VE(e,e=>({...e,post:cE(t)}))}}function $E(e,{count:t,run:n}){let r=new Map(e.expanded);for(let e of n)r.set(e,t);return{...e,expanded:r}}async function eD(e,t){await e,await t()}function tD(e,t){return{receive:n=>{if(n.channel!==e.name)return;let r=e.current();VE(e,e=>XE(e,n)),n.kind===`top-level`&&e.current()!==r&&e.open()&&t(HE,n)},receiveReceipt:t=>{VE(e,e=>({...e,receipts:jE({holds:t=>ZE(e,t),receipt:t,receipts:e.receipts})}))},receiveThread:t=>{VE(e,e=>({...e,messages:e.messages.map(e=>ME({message:e,parent:t}))}))},refetch:()=>{e.open()&&t(GE,null)}}}function nD(e){let t=new Set,n={status:`loading`},r=null,i={...e,current:()=>n,open:()=>t.size>zE,publish:e=>{n=e;for(let e of t)e()}};function a(e,t){r=eD(r,async()=>{await e(i,t)})}return{...tD(i,a),call:(e,t,n)=>{a(JE,{called:n,command:e,data:t})},editCallData:e=>{VE(i,t=>({...t,callData:e}))},loadOlder:()=>{a(KE,null)},post:(e,t)=>{a(QE,{posted:t,text:e})},showClosed:(e,t)=>{VE(i,n=>$E(n,{count:t,run:e}))},snapshot:()=>n,subscribe:e=>(!i.open()&&r!==null&&a(GE,null),t.add(e),r??=UE(i),()=>{t.delete(e)})}}async function rD(e,t,n){await e;try{return await t.ack(n),!0}catch{return!1}}function iD(e){let t=Promise.resolve(!0);return n=>{t=rD(t,e,n)}}var aD=1,oD=0,sD={status:`loading`};async function cD(e,{channel:t,id:n}){try{let{messages:r,receipts:i}=await e.listMessages(t,{before:n,limit:aD});return{message:r.at(oD)??null,receipts:i,status:`loaded`}}catch(e){return cE(e)}}function lD(e,t){let n=new Set,r=sD,i=null;async function a(){r=await cD(e,t);for(let e of n)e()}return{snapshot:()=>r,subscribe:e=>(n.add(e),i??=a(),()=>{n.delete(e)})}}function uD(e){let t=new Map;return n=>{let r=`${n.channel}/${String(n.id)}`,i=t.get(r)??lD(e,n);return t.set(r,i),i}}var dD=0;function fD(){let e=new Set,t=new Set,n=!1;return{acking:()=>t.size>dD,ackingSinceAsked:()=>{let e=n||t.size>dD;return n=!1,e},add:(r,i)=>{e.add(r),i&&(t.add(r),n=!0)},any:()=>e.size>dD,notify:()=>{for(let t of e)t()},remove:n=>{e.delete(n),t.delete(n)}}}function pD(e,t){let n=e.current();n.status===`loaded`&&e.publish(t(n))}function mD(e){let t=e.parent.id;for(let n of e.replies)t=n.id;return t}function hD(e,t){return t.kind!==`reply`||t.replyTo!==e.parent.id||e.replies.some(e=>e.id===t.id)?e:{...e,parent:lo({parent:e.parent,reply:t}),replies:[...e.replies,t]}}async function gD(e,t){pD(e,e=>({...e,read:{status:`acking`}}));try{let{readPosition:n}=await e.client.ack(t);pD(e,e=>({...e,read:{readPosition:n,status:`acked`}}))}catch(t){pD(e,e=>({...e,read:cE(t)}))}}async function _D(e,t){e.acking()&&await gD(e,t)}async function vD(e){try{let{parent:t,receipts:n,replies:r}=await e.client.getThread(e.id),i={parent:t,read:{status:`none`},receipts:n,replies:r,reply:{status:`idle`},status:`loaded`};e.publish(i),await _D(e,mD(i))}catch(t){e.publish(cE(t))}}async function yD(e){if(e.current().status!==`loaded`)await vD(e);else try{let{parent:t,receipts:n,replies:r}=await e.client.getThread(e.id);pD(e,e=>({...e,parent:t,receipts:AE({fresh:n,receipts:e.receipts}),replies:r})),await _D(e,mD({parent:t,replies:r}))}catch(t){pD(e,e=>({...e,read:cE(t)}))}}async function bD(e,{posted:t,text:n}){pD(e,e=>({...e,reply:{status:`posting`}}));try{await e.client.createMessage({channel:e.channel,replyTo:e.id,text:n});let{parent:r,receipts:i,replies:a}=await e.client.getThread(e.id);pD(e,e=>({...e,parent:r,receipts:AE({fresh:i,receipts:e.receipts}),replies:a,reply:{status:`idle`}})),t()}catch(t){pD(e,e=>({...e,reply:cE(t)}))}}function xD(e,t){return e.parent.id===t||e.replies.some(e=>e.id===t)}async function SD(e,t,n){await e,await gD(t,n)}async function CD(e,t){await e,await yD(t)}async function wD(e,t,n){await e,await bD(t,n)}function TD(e){return{receiveReceipt:t=>{pD(e,e=>({...e,receipts:jE({holds:t=>xD(e,t),receipt:t,receipts:e.receipts})}))},receiveThread:t=>{pD(e,e=>({...e,parent:ME({message:e.parent,parent:t})}))}}}function ED(e){let t=fD(),n={status:`loading`},r=null,i={...e,acking:t.ackingSinceAsked,current:()=>n,publish:e=>{n=e,t.notify()}};function a(e,n){return!t.any()&&r!==null&&(r=CD(r,i)),t.add(e,n),r??=vD(i),()=>{t.remove(e)}}return{...TD(i),ack:e=>{r=SD(r,i,e)},receive:e=>{let a=n;pD(i,t=>hD(t,e)),n!==a&&t.acking()&&(r=SD(r,i,e.id))},refetch:()=>{t.any()&&(r=CD(r,i))},reply:(e,t)=>{r=wD(r,i,{posted:t,text:e})},snapshot:()=>n,subscribe:e=>a(e,!0),subscribeWithoutAcking:e=>a(e,!1)}}function DD(e,t,n){let r=e.get(t)??n();return e.set(t,r),r}function OD({client:e,closed:t,pageSize:n}){let r=new Map,i=new Map;function a(){return[...r.values(),...i.values()]}return{ack:iD(e),channel:(t,i)=>DD(r,t,()=>i(nD({client:e,name:t,pageSize:n}))),closing:PE({changed:e=>{for(let t of a())t.receiveThread(e);t(e)},client:e}),loaded:a,messageBefore:uD(e),thread:({channel:t,id:n},r)=>DD(i,`${t}/${String(n)}`,()=>r(ED({channel:t,client:e,id:n})))}}var kD={status:`idle`},AD=0;function jD(e,t){return{...e,threads:e.threads.filter(e=>e.message.id!==t)}}async function MD(e){let{all:t,client:n,pageSize:r}=e.options;try{let i=await n.listOpenThreads({all:t,limit:r});e.publish({cursor:i.cursor,more:kD,status:`loaded`,threads:i.threads})}catch(t){e.publish({...Dr(t),status:`failed`})}}function ND(e){e.track(MD(e))}async function PD(e,t,n){let{all:r,client:i,pageSize:a}=e.options;e.publish({...t,more:{status:`loading`}});try{let o=await i.listOpenThreads({all:r,cursor:n,limit:a}),s=new Set(t.threads.map(e=>e.message.id)),c=o.threads.filter(e=>!s.has(e.message.id));e.publish({cursor:o.cursor,more:kD,status:`loaded`,threads:[...t.threads,...c]})}catch(n){e.publish({...t,more:{...Dr(n),status:`failed`}})}}function FD(e){let t=e.state();t.status===`loaded`&&t.cursor!==null&&t.more.status!==`loading`&&e.track(PD(e,t,t.cursor))}function ID(e,t){let n=e.threads.find(e=>e.message.id===t.replyTo)??null;if(n===null)return e;let r=jD(e,t.replyTo);if(e.cursor!==null)return r;let i={lastActivityAt:t.createdAt,message:lo({parent:n.message,reply:t})};return{...r,threads:[...r.threads,i]}}function LD(e,t){let n=e.state();n.status===`loaded`&&(typeof t.closedAt==`string`?e.publish(jD(n,t.id)):n.threads.some(e=>e.message.id===t.id)||ND(e))}function RD(e,t){let n=e.state();t.type===`thread`&&LD(e,t.parent),t.type===`message`&&t.message.kind===`reply`&&n.status===`loaded`&&e.publish(ID(n,t.message))}function zD(e){let{live:t}=e.options;t!==null&&(t.subscribe(t=>{RD(e,t)}),t.onBack(()=>{ND(e)}))}function BD(e){let t=new Set,n={status:`loading`},r=null,i={options:e,publish:e=>{n=e;for(let e of t)e()},state:()=>n,track:e=>{r=e}};return{loadMore:()=>{FD(i)},receiveThread:e=>{LD(i,e)},snapshot:()=>n,subscribe:e=>(r===null&&zD(i),t.size===AD&&ND(i),t.add(e),()=>{t.delete(e)})}}function VD(e){let t=new Map;return{of:n=>{let r=t.get(n)??BD({...e,all:n});return t.set(n,r),r},receiveThread:e=>{for(let n of t.values())n.receiveThread(e)}}}var HD=[];function UD(e){return e.state.changed.get(e.message.id)??e.message.reactions??HD}function WD(e,{me:t,reaction:n}){return e.some(e=>e.reaction===n&&e.by.some(e=>e===t))}async function GD(e,t){await e,await t()}function KD(e,t){let n=e.current();e.publish({...n,changed:new Map(n.changed).set(t.messageId,t.reactions)})}async function qD(e,t,n){let{message:r,reaction:i}=n;try{if(WD(UD({message:r,state:e.current()}),n)){KD(e,await t.unreact(r.id,i));return}KD(e,await t.react(r.id,i))}catch(t){e.publish({...e.current(),refusal:Dr(t)})}}function JD(e,t){t.subscribe(t=>{t.type===`reaction`&&KD(e,t)}),t.onBack(()=>{e.publish({...e.current(),changed:new Map})})}function YD(e){let{client:t,live:n}=e,r=new Set,i={changed:new Map,refusal:null},a=null,o=!1,s={current:()=>i,publish:e=>{i=e;for(let e of r)e()}};return{snapshot:()=>i,subscribe:e=>(r.add(e),!o&&n!==null&&(o=!0,JD(s,n)),()=>{r.delete(e)}),toggle:e=>{s.publish({...i,refusal:null}),a=GD(a,async()=>{await qD(s,t,e)})}}}function XD(e,t,n){let r=e.filter(e=>e!==t);return n?[...r,t].toSorted():r}async function ZD(e,{channel:t,wanted:n}){return n?await e.subscribe(t):await e.unsubscribe(t)}async function QD(e){try{let{channels:t}=await e.client.listSubscribedChannels(),n=t.map(e=>e.name);return e.publish({change:{status:`idle`},channels:n,status:`loaded`}),n}catch(t){return e.publish(cE(t)),[]}}async function $D(e,t,n){let r=await e,{channel:i}=n;t.publish({change:{channel:i,status:`changing`},channels:r,status:`loaded`});try{let e=XD(r,i,(await ZD(t.client,n)).subscribed);return t.publish({change:{status:`idle`},channels:e,status:`loaded`}),e}catch(e){return t.publish({change:{...cE(e),channel:i},channels:r,status:`loaded`}),r}}async function eO(e,t,{channel:n,subscribed:r}){let i=await e,a=t.current();if(a.status!==`loaded`)return i;let o=XD(i,n,r);return t.publish({...a,channels:o}),o}function tO({client:e,live:t}){let n=new Set,r={status:`loading`},i=Promise.resolve([]),a=!1,o={client:e,current:()=>r,publish:e=>{r=e;for(let e of n)e()}};function s(e){i=eO(i,o,e)}function c(e){e.type===`subscription`&&s(e.subscription)}return{heard:s,subscriptions:{setSubscribed:(e,t)=>{i=$D(i,o,{channel:e,wanted:t})},snapshot:()=>r,subscribe:e=>(n.add(e),a||(a=!0,i=QD(o),t!==null&&t.subscribe(c)),()=>{n.delete(e)})}}}var nO=50;function rO(e){let{client:t}=e,n=e.pageSize??nO,r=e.live??null,i=VD({client:t,live:r,pageSize:n}),a=OD({client:t,closed:i.receiveThread,pageSize:n}),o=mE(t),{heard:s,subscriptions:c}=tO({client:t,live:r}),{follow:l,followed:u}=bE({added:o.add,back:o.reload,deleted:o.remove,live:r,receiptReceivers:a.loaded,receivers:()=>[o,...a.loaded()]});return{ack:a.ack,channel:e=>a.channel(e,u),closing:a.closing,commands:gE(e),creation:CT({client:t,put:e=>{o.add(e),s({channel:e.name,subscribed:!0})}}),dismissNotice:o.dismissNotice,messageBefore:a.messageBefore,openThreads:i.of,reactions:YD({client:t,live:r}),snapshot:o.snapshot,subscribe:e=>(l(),o.subscribe(e)),subscriptions:c,thread:(e,t)=>a.thread({channel:e,id:t},u)}}var iO=8,aO=0,oO=1,sO=1,cO={down:sO,up:-1},lO=/(?<![\w.@-])@[a-z0-9-]*$/u,uO=/^\/[a-z0-9-]*$/u;function dO(e,t){let n=new Map(e.map(e=>[e.name,e]));return[...t.flatMap(e=>n.get(e)??[]),...e.filter(e=>!t.includes(e.name))]}function fO(e,t,n){let r=lO.exec(t.slice(aO,n));if(r===null)return[];let[i]=r,a=i.slice(oO);return dO(e.identities().filter(e=>e.deactivated!==!0&&e.name.startsWith(a)),e.members()).slice(aO,iO)}function pO(e,t){if(!uO.test(t))return[];let n=t.slice(sO);return e.filter(e=>e.name.startsWith(n)).slice(aO,iO)}var mO={caret:aO,command:null,commands:[],focusRequests:aO,highlighted:aO,returned:!1,suggestions:[],text:``};function hO(e,t,n){let{caret:r,text:i}=n,a=pO(e.commands(),i),o=fO(e,i,r);return{caret:r,command:t.command,commands:a,focusRequests:t.focusRequests,highlighted:aO,returned:!1,suggestions:o,text:i}}function gO(e,t){return RegExp(`(?<![\\w.@-])@${t}(?![a-z0-9-])`,`u`).test(e)}function _O(e,t,n){let r=e.identities().some(e=>e.name===n&&e.deactivated===!0),{text:i}=t;return n!==null&&!r&&!gO(i,n)&&(i=`@${n} ${i}`),{...hO(e,t,{caret:i.length,text:i}),focusRequests:t.focusRequests+sO}}function vO(e,t,n){let r=t.text.slice(aO,t.caret).replace(lO,``),i=`@${n} `,a=r+i+t.text.slice(t.caret);return hO(e,t,{caret:r.length+i.length,text:a})}function yO(e,t){let n=e;for(let r of t)n={...mO,caret:e.caret,command:r,focusRequests:e.focusRequests,text:e.text};return n}function bO(e,t){let n=t.highlighted,r=yO(t,t.commands.slice(n,n+sO));for(let i of t.suggestions.slice(n,n+sO))r=vO(e,t,i.name);return r}function xO(e,t){let n=Math.max(sO,e.suggestions.length+e.commands.length);return{...e,highlighted:(e.highlighted+cO[t]+n)%n}}function SO(e){return{...e,commands:[],highlighted:aO,suggestions:[]}}function CO(e){return{...SO(e),command:null,returned:!0}}function wO(e){return{chosen:t=>bO(e,t),dismissed:SO,highlightMoved:xO,mentioned:(t,n)=>vO(e,t,n),picked:yO,repliedTo:(t,n)=>_O(e,t,n),unpicked:CO,written:(t,n)=>hO(e,t,n)}}async function TO(e,t,n){return n?await e.makeAdmin(t):await e.removeAdmin(t)}function EO(e,t){return e.map(e=>e.name===t.name?t:e)}function DO(e){let t={status:`idle`},n=Promise.resolve();async function r(n,r,i){await n,t={name:r,status:`changing`},e.publish(e.identities());try{let{identity:n}=await TO(e.client,r,i);t={status:`idle`},e.publish(EO(e.identities(),n))}catch(n){t={...Dr(n),name:r,status:`failed`},e.publish(e.identities())}}return{adminChange:()=>t,setAdmin:(e,t)=>{n=r(n,e,t)}}}function OO(e){let t=new Set;return{add:n=>(t.add(n),e(),()=>{t.delete(n)}),notify:()=>{for(let e of t)e()}}}function kO(e){let t=OO(e.list.load),n={create:{status:`idle`},text:``},r=Promise.resolve();function i(e){n=e,t.notify()}async function a(t,n){await t;try{let{identity:t,token:r}=await e.client.createIdentity({kind:`agent`,name:n.trim()});e.list.put(t),e.created(t.name,r),i({create:{status:`idle`},text:``})}catch(e){i({create:{...Dr(e),status:`failed`},text:n})}}return{create:()=>{let{text:e}=n;i({create:{status:`creating`},text:e}),r=a(r,e)},edit:e=>{i({...n,text:e})},snapshot:()=>n,subscribe:t.add}}function AO(e){let t=e.trim();return t===``?null:t}function jO(e){let{list:t,name:n,set:r}=e,i=OO(t.load),a={save:{status:`idle`},text:null},o=Promise.resolve();function s(e){a=e,i.notify()}async function c(e){try{let{identity:i}=await r(n,AO(e));t.put(i),s({save:{status:`idle`},text:null})}catch(t){s({save:{...Dr(t),status:`failed`},text:e})}}async function l(e,t){await e,await c(t)}return{edit:e=>{s({...a,text:e})},save:e=>{s({save:{status:`saving`},text:e}),o=l(o,e)},snapshot:()=>a,subscribe:i.add}}var MO=0;function NO(e,t){return e.type===`agent-session`?e.agent===t:e.type===`identity`&&e.identity.name===t}function PO(e,t){let n=e??[];return n.length===MO?null:Vl(()=>{n.some(e=>Ll(e.expiresAt))&&t()})}function FO({live:e,load:t,name:n}){let r=null,i=null;function a(){i!==null&&(i(),i=null)}async function o(e,n){await e;let r=await t();a(),i=PO(r,n)}function s(){a(),r=o(r,s)}return{start:()=>{r===null&&(e!==null&&e.subscribe(e=>{NO(e,n)&&s()}),s())}}}var IO={status:`idle`},LO={action:IO,confirming:null,messages:`loading`,sessions:null,token:null,transferTo:``};function RO(e,t){let{client:n,list:r,name:i}=e;return{deactivate:async()=>{let{identity:e}=await n.deactivateIdentity(i);return r.put(e),{sessions:[],token:null}},delete:async()=>(await n.deleteIdentity(i),r.remove(i),{sessions:[],token:null}),reactivate:async()=>{let{identity:e,token:t}=await n.reactivateIdentity(i);return r.put(e),{token:t}},revoke:async()=>(await n.revokeAgentSession(i),{sessions:[]}),rotate:async()=>{let{identity:e,token:t}=await n.rotateToken(i);return r.put(e),{token:t}},transfer:async()=>{let{identity:e}=await n.transferAgent(i,t().trim());return r.put(e),{transferTo:``}}}}function zO(e){return{editTransfer:t=>{e({transferTo:t})},forgetToken:()=>{e({token:null})},showToken:t=>{e({token:t})}}}function BO(e){function t(t){return()=>{e({action:IO,confirming:t})}}return{deactivate:t(`deactivate`),delete:t(`delete`),reactivate:t(`reactivate`),revoke:t(`revoke`),rotate:t(`rotate`),transfer:t(`transfer`)}}function VO(e,t){return()=>{t().action.status!==`sending`&&e({action:IO,confirming:null})}}async function HO(e,t){await e,t!==null&&await globalThis.navigator.clipboard.writeText(t)}async function UO(e,t){try{let{messages:n}=await e.client.countMessagesBy(e.name);t({messages:n})}catch{t({messages:`unknown`})}}async function WO(e,t){try{let{agentSessions:n}=await e.client.listAgentSessions(e.name);return t({sessions:n}),n}catch{return t({sessions:null}),null}}function GO(e,t){return FO({...e,load:async()=>await WO(e,t)})}function KO(e,{add:t,options:n,publish:r}){let i=null;return a=>(i??=e(n,r),t(a))}function qO(e){let t=OO(e.list.load),n=LO,r=Promise.resolve(),i=Promise.resolve(),a=RO(e,()=>n.transferTo);function o(e){n={...n,...e},t.notify()}let s=GO(e,o);async function c(e,t){await e,o({action:{action:t,status:`sending`}});try{o({...await a[t](),action:IO,confirming:null})}catch(e){o({action:{...Dr(e),action:t,status:`failed`}})}}return{...zO(o),ask:BO(o),cancel:VO(o,()=>n),confirm:()=>{let e=n.confirming;e!==null&&(r=c(r,e))},copyToken:()=>{i=HO(i,n.token)},snapshot:()=>n,subscribe:t.add,subscribeToMessages:KO(UO,{add:t.add,options:e,publish:o}),subscribeToSessions:e=>(s.start(),t.add(e))}}function JO(e){let{profile:t,route:n}=aE(globalThis.location.hash);return n.name===`profile`&&n.identity===e?iE({name:`people`}):t===e?sE(n):null}function YO(){let e=new Set,t=null;function n(n){t=n;for(let t of e)t()}return{closeIfOpen:e=>{let t=JO(e);t!==null&&(globalThis.location.hash=t,n(e))},dismiss:()=>{n(null)},snapshot:()=>t,subscribe:t=>(e.add(t),()=>{e.delete(t)})}}function XO(e,t){return[...e.filter(e=>e.name!==t.name),t].toSorted((e,t)=>e.name.localeCompare(t.name))}function ZO(e,t,n){if(t.type===`identity`)return XO(e,t.identity);if(t.type===`identity-deleted`){let{name:r}=t.identity;return n(r),e.filter(e=>e.name!==r)}return null}function QO(e,t,n){e!==null&&(e.subscribe(t),e.onBack(n))}function $O(e){let t=new Set,n=[],r=null;function i(e){n=e;for(let e of t)e()}function a(t){let r=ZO(n,t,e.deleted);r!==null&&i(r)}async function o(){try{i((await e.client.listIdentities({include:`deactivated`})).identities)}catch{n=[]}}return{identities:()=>n,load:()=>{r===null&&(QO(e.live,a,()=>{r=o()}),r=o())},onChange:e=>{t.add(e)},publish:i,put:e=>{i(XO(n,e))},remove:e=>{i(n.filter(t=>t.name!==e))}}}var ek=[],tk=[];function nk(){return tk}function rk(e,t,n){let r=OO(n),i=wO(t),a=mO;function o(e){a=e(a),r.notify()}return e.onChange(()=>{o(e=>i.written(e,e))}),{choose:e=>{o(t=>i.mentioned(t,e))},chooseHighlighted:()=>{o(e=>i.chosen(e))},clear:()=>{o(()=>i.written(mO,mO))},dismiss:()=>{o(i.dismissed)},edit:(e,t)=>{o(n=>i.written(n,{caret:t,text:e}))},highlight:e=>{o(t=>i.highlightMoved(t,e))},pick:e=>{o(t=>i.picked(t,t.commands.filter(t=>t.name===e)))},replyTo:e=>{o(t=>i.repliedTo(t,e))},snapshot:()=>a,subscribe:r.add,unpick:()=>{o(i.unpicked)}}}function ik(e,t,n){let r=e.get(t)??n();return e.set(t,r),r}function ak(e,t){let n=!1;return()=>{e.load(),n||(n=!0,t.subscribe(()=>{e.publish(e.identities())}))}}function ok({client:e,live:t},n){let r=new Map;function i(i){return ik(r,i,()=>qO({client:e,list:n,live:t??null,name:i}))}function a(e,t){i(e).showToken(t)}return{actions:i,creation:kO({client:e,created:a,list:n})}}function sk(e){let t=YO();return{deletion:t,list:$O({client:e.client,deleted:t.closeIfOpen,live:e.live??null})}}function ck(e){let{client:t}=e,n=new Map,r=new Map,i=new Map,{deletion:a,list:o}=sk(e),s=ak(o,e.commands),c=OO(s);function l(){return e.commands.snapshot().commands??ek}return o.onChange(c.notify),{channelDraft:e=>ik(n,e,()=>rk(o,{commands:l,identities:o.identities,members:nk},s)),description:e=>ik(i,e,()=>jO({list:o,name:e,set:t.setDescription})),displayName:e=>ik(r,e,()=>jO({list:o,name:e,set:t.setDisplayName})),draft:(e,t=nk)=>ik(n,e,()=>rk(o,{commands:()=>ek,identities:o.identities,members:t},s)),identities:{...DO({client:t,identities:o.identities,publish:o.publish}),...ok(e,o),deletion:a,snapshot:o.identities,subscribe:c.add}}}var lk=es({env:{},url:globalThis.location.origin}),uk=ck({client:lk,commands:gE({client:lk})}),dk=(0,Y.createContext)(uk.identities),fk=new Map;function pk(e,t){let n=new Map(e);for(let e of t)n.set(e.identity,e);return n}function mk(e,t,n){e!==null&&(e.subscribe(t),e.onBack(n))}function hk(e){let t=new Set,n=fk,r=new Map,i=null;function a(e){n=e;for(let e of t)e()}async function o(){let t=new Map;r=t;let n=await e.client.presence().catch(()=>null);n!==null&&a(pk(pk(fk,n.presence),[...t.values()]))}function s(e){e.type===`presence`&&(r.set(e.presence.identity,e.presence),a(pk(n,[e.presence])))}return{snapshot:()=>n,subscribe:n=>(t.add(n),i===null&&(mk(e.live,s,()=>{i=o()}),i=o()),()=>{t.delete(n)})}}var gk=es({env:{},url:globalThis.location.origin}),_k=(0,Y.createContext)(hk({client:gk,live:null}));function vk(e){return(0,J.jsx)(dk,{value:e.identities,children:(0,J.jsx)(_k,{value:e.presence,children:e.children})})}var yk=es({env:{},url:globalThis.location.origin}),bk=(0,Y.createContext)(YD({client:yk,live:null}));function xk(e){return(0,J.jsx)(bk,{value:e.reactions,children:e.children})}var Sk={kind:`json`},Ck={status:`idle`},wk=[],Tk={boolean:`checkbox`,integer:`integer`,number:`number`,string:`text`},Ek=`data`,Dk=2,Ok=1,kk=0;function Ak(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function jk(e){return Array.isArray(e)}var Mk=new Set([`string`,`number`,`boolean`]);function Nk(e){return Mk.has(typeof e)}function Pk(e){return typeof e==`string`?e:null}function Fk(e){return typeof e==`string`?e:``}function Ik(e){let{required:t}=e;return jk(t)?t.filter(e=>typeof e==`string`):[]}function Lk(e){let{enum:t}=e;return jk(t)?t.filter(e=>Nk(e)):[]}function Rk(e){let{enum:t,type:n}=e;return jk(t)?t.every(e=>Nk(e))?`pick`:null:typeof n==`string`?Tk[n]??null:null}function zk({name:e,property:t,required:n}){if(!Ak(t))return null;let r=Rk(t);if(r===null)return null;let i=Lk(t),a=i.map(String);return{choices:i,help:Pk(t.description),kind:r,name:e,options:a,required:n.includes(e)}}function Bk(e,t){let n=[];for(let[r,i]of Object.entries(e)){let e=zk({name:r,property:i,required:t});if(e===null)return null;n.push(e)}return n}function Vk(e){let{properties:t}=e;if(!Ak(t))return Sk;let n=Bk(t,Ik(e));return n===null?Sk:{fields:n,kind:`fields`}}function Hk(e){return e.kind===`json`?wk:e.fields}function Uk(e){try{return JSON.parse(e)}catch{return null}}function Wk(e){let t=Uk(e),n={};if(!Ak(t))return n;for(let[e,r]of Object.entries(t))(typeof r==`string`||typeof r==`boolean`)&&(n[e]=r);return n}function Gk(e,t){let n=Fk(t);return n===``?[]:[[e.name,Number(n)]]}function Kk(e,t){let n=e.options.indexOf(Fk(t));return e.choices.slice(n,n+Ok).map(t=>[e.name,t])}function qk(e,t){let n=Fk(t);return n===``&&!e.required?[]:[[e.name,n]]}function Jk(e,t){return[[e.name,t===!0]]}var Yk={checkbox:Jk,integer:Gk,number:Gk,pick:Kk,text:qk};function Xk({kept:e,prompt:t,typed:n}){if(t.kind===`json`)return e;let r=t.fields.flatMap(e=>Yk[e.kind](e,n[e.name]));return JSON.stringify(Object.fromEntries(r))}function Zk({fields:e,problem:t}){let[n,r]=t.path,i=n===Ek&&t.path.length===Dk,a=null;for(let t of e.filter(e=>i&&e.name===r))a=t.name;return a}function Qk({call:e,fields:t}){let n=new Map;if(e.status!==`failed`)return n;for(let r of e.problems){let e=Zk({fields:t,problem:r});e!==null&&n.set(e,[...n.get(e)??[],r.message])}return n}function $k(e){return e.length===kk?null:e.join(`; `)}function eA({call:e,command:t}){return e.status===`idle`||e.command!==t?Ck:e}var tA=0,nA={problems:`Schema errors`};function rA(e){return`${e.path.join(`.`)}: ${e.message}`}function iA(e){let{call:t,fields:n}=e;if(t.status!==`failed`)return null;let r=t.problems.filter(e=>Zk({fields:n,problem:e})===null);return(0,J.jsxs)(lu,{children:[`Couldn't call /${t.command} (${t.code}): ${t.message}`,r.length>tA&&(0,J.jsx)(nC,{label:nA.problems,children:r.map(e=>(0,J.jsx)(rC,{children:rA(e)},rA(e)))})]})}function aA(e){let{error:t,field:n,onEdit:r}=e,{help:i,name:a,required:o}=n,s=(0,Y.useCallback)(e=>{r(a,e)},[a,r]),c=e.typed[a];return n.kind===`checkbox`?(0,J.jsx)(fS,{checked:c===!0,error:t,help:i,label:a,onEdit:s,required:o}):n.kind===`pick`?(0,J.jsx)(KC,{error:t,help:i,label:a,onEdit:s,options:n.options,required:o,value:Fk(c)}):(0,J.jsx)(tC,{error:t,help:i,kind:n.kind,label:a,onEdit:s,required:o,value:Fk(c)})}var oA={data:`Data`};function sA(e){let{call:t,fields:n}=e,r=(0,Y.useMemo)(()=>Qk({call:t,fields:n}),[t,n]);return e.prompt.kind===`json`?(0,J.jsx)(yS,{label:oA.data,name:`data`,onEdit:e.onEditData,value:e.kept}):n.map(t=>(0,J.jsx)(aA,{error:$k(r.get(t.name)??[]),field:t,onEdit:e.onEdit,typed:e.typed},t.name))}var cA={button:`Call`,calling:`Calling…`};function lA(e){let{callData:t,command:n,draft:r,messages:i}=e,{call:a,editCallData:o}=i,s=(0,Y.useMemo)(()=>Vk(n.schema),[n.schema]),c=(0,Y.useMemo)(()=>Hk(s),[s]),l=(0,Y.useMemo)(()=>Wk(t),[t]),u=(0,Y.useCallback)((e,t)=>{o(JSON.stringify({...l,[e]:t}))},[o,l]),d=(0,Y.useCallback)(()=>{a(n.name,Xk({kept:t,prompt:s,typed:l}),r.clear)},[a,t,n.name,r,s,l]),f=(0,Y.useCallback)(()=>{o(``),r.clear()},[r,o]),p=eA({call:e.call,command:n.name});return(0,J.jsxs)(ew,{busy:p.status===`calling`,busyButton:cA.calling,button:cA.button,description:n.description??null,label:`Call /${n.name}`,onCancel:f,onEscape:e.onBack,onSubmit:d,title:`/${n.name}`,children:[(0,J.jsx)(sA,{call:p,fields:c,kept:t,onEdit:u,onEditData:o,prompt:s,typed:l}),(0,J.jsx)(iA,{call:p,fields:c})]})}function uA(e){let{commands:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot);return n.status===`failed`?(0,J.jsx)(lu,{children:`Couldn't list the commands (${n.code}): ${n.message}`}):null}var dA=0,fA=`Seen by `,pA=`Not seen yet: `,mA=`, `,hA=` · `;function gA(e,t,n){let r=e.find(e=>e.messageId===t.id&&e.identity===n&&e.seen)??null;return r===null?null:{name:n,seenAt:r.seenAt??null}}function _A(e,t){return fo(t===null?{message:e}:{message:e,parentAuthor:t.author.name})}function vA(e){return e.seenAt===null?`@${e.name}`:`@${e.name} ${zl(e.seenAt)}`}function yA(e){return e.length===dA?[]:[`${fA}${e.map(e=>vA(e)).join(mA)}`]}function bA(e){return e.length===dA?[]:[`${pA}${e.map(e=>`@${e}`).join(mA)}`]}function xA(e,t){let n=[...yA(e),...bA(t)];return n.length===dA?null:n.join(hA)}function SA({message:e,parent:t,receipts:n}){let r=[],i=[];for(let a of _A(e,t)){let t=gA(n,e,a);t===null?i.push(a):r.push(t)}return xA(r,i)}function CA(e){let t=Vl(e);return globalThis.addEventListener(`visibilitychange`,e),()=>{t(),globalThis.removeEventListener(`visibilitychange`,e)}}function wA(e){return(0,Y.useSyncExternalStore)(CA,()=>zl(e))}function TA(e){let t=wA(e.message.createdAt),n=(0,Y.useSyncExternalStore)(CA,()=>SA(e));return{...Pl(e.message.createdAt),ago:t,receipt:n}}var EA={lastSeen:`last seen `,offline:`Offline`,online:`Online`,watching:`watching`,watchingFrom:`watching from `,web:`web`,wentOffline:`Went offline unexpectedly`,wentOfflineLabel:`Offline, went offline unexpectedly`};function DA(e){let t=e.lastSeenAt??null;return t===null?null:`${EA.lastSeen}${zl(t)}`}function OA(e,t){let n=DA(e);return n===null?EA.offline:`${EA.offline}${t}${n}`}function kA(e){return!e.online&&e.warning===!0&&typeof e.lastSeenAt==`string`&&typeof e.offlineReason==`string`}function AA(e){return e.online?EA.online:kA(e)?EA.wentOfflineLabel:OA(e,`, `)}function jA(e){if(e.via===`web`)return EA.web;let t=e.host??null;return t===null?EA.watching:`${EA.watchingFrom}${t}`}function MA(e){let t=e.offlineReason??null,n=OA(e,` · `);return t===null?n:`${EA.offline}: ${t}${n.slice(EA.offline.length)}`}function NA(e){return`${EA.wentOffline} ${zl(e.lastSeenAt)}: ${e.offlineReason}`}function PA(e){if(kA(e))return NA(e);if(!e.online)return MA(e);let t=e.connection??null;return t===null?EA.online:`${EA.online} · ${jA(t)}`}function FA(){let e=(0,Y.useContext)(_k);return(0,Y.useSyncExternalStore)(e.subscribe,e.snapshot)}function IA(e){return FA().get(e)??null}function LA({name:e,presences:t}){let n=t.get(e)??null;if(n===null)return null;let r=AA(n);return{label:r,online:n.online,spoken:r,warning:kA(n)}}function RA(e,t){return(0,Y.useSyncExternalStore)(CA,()=>e===null?null:t(e))}function zA(e){let t=IA(e),n=RA(t,AA);return t===null||n===null?null:{label:n,online:t.online,spoken:n,warning:kA(t)}}function BA({online:e,warning:t}){return e?EA.online:t?EA.wentOfflineLabel:EA.offline}function VA(e){let t=zA(e);return t===null?null:{...t,spoken:BA(t)}}function HA(e){return RA(IA(e),PA)}var UA=0,WA=1,GA=`Mention suggestions`,KA=`Command suggestions`;function qA(e){let t=e.displayName??null;return t===null?`@${e.name}`:`${t}, @${e.name}`}function JA({commands:e,suggestions:t},n,r){if(e.length>UA){let t=e.map(e=>({detail:e.description??null,option:`/${e.name}`,presence:null,spoken:`/${e.name}`}));return{label:KA,onChoose:n.command,options:t}}let i=t.map(e=>({detail:e.displayName??null,option:`@${e.name}`,presence:LA({name:e.name,presences:r}),spoken:qA(e)}));return{label:GA,onChoose:n.mention,options:i}}function YA(e){let{commands:t,draft:n,suggestions:r}=e,i=(0,Y.useCallback)(e=>{n.choose(e.slice(WA))},[n]),a=(0,Y.useCallback)(e=>{n.pick(e.slice(WA))},[n]),o=FA();return(0,Y.useMemo)(()=>JA({commands:t,draft:n,suggestions:r},{command:a,mention:i},o),[a,t,n,i,o,r])}var XA={posting:`Sending…`,ready:`Send`},ZA=0;function QA(e){return e?XA.posting:XA.ready}function $A(e){let{draft:t,onPost:n,post:r,text:i}=e,{chooseHighlighted:a,dismiss:o,edit:s,highlight:c}=t,l=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),u=r.status===`posting`,d=(0,Y.useCallback)(e=>{n(e,t.clear)},[t,n]),f=YA({commands:l.commands,draft:t,suggestions:l.suggestions}),p=f.options.length>ZA,m=f.onChoose;return(0,J.jsxs)(iS,{children:[(0,J.jsxs)(US,{field:`text`,label:i.form,onSubmit:d,children:[(0,J.jsx)(jw,{caret:l.caret,choosing:p,focusRequests:l.focusRequests,focused:e.focused,label:i.field,name:`text`,onClose:o,onEdit:s,onMove:c,onPick:a,value:l.text}),p&&(0,J.jsx)(bw,{highlighted:l.highlighted,label:f.label,onChoose:m,options:f.options}),(0,J.jsx)(xw,{disabled:u,label:QA(u)})]}),r.status===`failed`&&(0,J.jsx)(lu,{children:`Couldn't post the ${i.posts} (${r.code}): ${r.message}`})]})}var ej={field:`Message`,form:`Post to the channel`,posts:`message`};function tj(e){let{draft:t,messages:n,state:r}=e,i=n.post,{command:a,returned:o}=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),s=t.unpick;return r.status===`loaded`?(0,J.jsxs)(J.Fragment,{children:[a===null&&(0,J.jsx)($A,{draft:t,focused:o,onPost:i,post:r.post,text:ej}),a!==null&&(0,J.jsx)(lA,{call:r.call,callData:r.callData,command:a,draft:t,messages:n,onBack:s}),(0,J.jsx)(uA,{commands:e.commands})]}):null}var nj=10,rj=0,ij=1;function aj(e){return`closedAt`in e}function oj(e){let t=[],n=[],r=null;for(let i of e)r!==null&&aj(i)&&aj(r)||(n=[],t.push(n)),n.push(i),r=i;return t}function sj({expanded:e,run:t}){return Math.min(t.length,Math.max(rj,...t.map(t=>e.get(t)??rj)))}function cj(e){return e===ij?`1 closed thread`:`${String(e)} closed threads`}function lj(e,t){return t===rj?cj(e.length):`${String(Math.min(nj,e.length-t))} more`}function uj(e){return e.map(e=>({afterFold:!1,kind:`message`,message:e}))}function dj(e,t){if(!e.some(e=>aj(e)))return uj(e);let n=e.map(e=>e.id),r=sj({expanded:t,run:n});return r===e.length?uj(e):[{kind:`fold`,label:lj(n,r),run:n},...uj(e.slice(e.length-r))]}function fj(e,t){return e.kind===`fold`||!t?e:{...e,afterFold:t}}function pj(e){let t=[],n=!1;for(let r of oj(e.messages))for(let i of dj(r,e.expanded))t.push(fj(i,n)),n=i.kind===`fold`;return t}function mj(e){return sj(e)+nj}function hj(e){let{expanded:t,fold:n,messages:r}=e,i=(0,Y.useCallback)(()=>{r.showClosed(n.run,mj({expanded:t,run:n.run}))},[t,n,r]);return(0,J.jsx)(Ux,{onClick:i,children:n.label})}var gj=0,_j={few:`replies`,many:`replies`,one:`reply`,other:`replies`,two:`replies`,zero:`replies`},vj=new Intl.PluralRules(`en`);function yj(e){return`${String(e)} ${_j[vj.select(e)]}`}function bj(e){if(e===null)return null;let t=`${String(e.count)} new ${_j[vj.select(e.count)]}`;return e.forYou===gj?{forYou:!1,text:t}:e.forYou===e.count?{forYou:!0,text:`${t} to you`}:{forYou:!0,text:`${t} · ${String(e.forYou)} to you`}}function xj({me:e,message:t,parent:n}){return n!==null&&n.author.name===e&&t.author.name!==e}function Sj(e){let{me:t,message:n,open:r}=e;return n.mentions.some(e=>e===t)||xj(e)?`for-you`:n.id===r?`open`:`none`}function Cj({channel:e,message:t}){return e===null||t.kind!==`top-level`?null:iE({channel:e,name:`thread`,thread:t.id})}function wj(e){return e.kind!==`top-level`||e.latestReplyAt===null||e.replyCount===gj?null:{latestReplyAt:e.latestReplyAt,repliers:e.repliers,replyCount:e.replyCount}}var Tj={thumbs_down:`-`,thumbs_up:`+`};function Ej({me:e,message:t}){let n=(0,Y.useContext)(bk);return{reactions:UD({message:t,state:(0,Y.useSyncExternalStore)(n.subscribe,n.snapshot)}),toggle:(0,Y.useCallback)(r=>{n.toggle({me:e,message:t,reaction:r})},[e,t,n])}}function Dj(e){let{toggle:t}=Ej(e);return(0,Y.useMemo)(()=>po.map(e=>({key:Tj[e],onReact:()=>{t(e)},symbol:mo[e]})),[t])}function Oj(){let e=(0,Y.useContext)(bk);return(0,Y.useSyncExternalStore)(e.subscribe,e.snapshot).refusal}var kj={close:`Close`,reopen:`Reopen`};function Aj(e,t){if(e===null||t.kind!==`top-level`)return null;let{id:n}=t;return`closedAt`in t?{label:kj.reopen,onSelect:()=>{e.reopen(n)}}:{label:kj.close,onSelect:()=>{e.close(n)}}}function jj({closing:e,me:t,menu:n,message:r}){let i=r.id,a=Dj({me:t,message:r});return(0,Y.useMemo)(()=>({onMarkUnread:()=>{n.markUnread(i)},reactions:a,thread:Aj(e,r)}),[e,n,r,i,a])}function Mj(e,t){return e.author.name===t?null:e.author.name}function Nj({me:e,message:t,reply:n}){return(0,Y.useMemo)(()=>n===null?null:()=>{n(Mj(t,e),t)},[e,t,n])}function Pj(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Fj=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ij=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lj={};function Rj(e,t){return((t||Lj).jsx?Ij:Fj).test(e)}var zj=/[ \t\n\f\r]/g;function Bj(e){return typeof e==`object`?e.type===`text`&&Vj(e.value):Vj(e)}function Vj(e){return e.replace(zj,``)===``}var Hj=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Hj.prototype.normal={},Hj.prototype.property={},Hj.prototype.space=void 0;function Uj(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Hj(n,r,t)}function Wj(e){return e.toLowerCase()}var Gj=class{constructor(e,t){this.attribute=t,this.property=e}};Gj.prototype.attribute=``,Gj.prototype.booleanish=!1,Gj.prototype.boolean=!1,Gj.prototype.commaOrSpaceSeparated=!1,Gj.prototype.commaSeparated=!1,Gj.prototype.defined=!1,Gj.prototype.mustUseProperty=!1,Gj.prototype.number=!1,Gj.prototype.overloadedBoolean=!1,Gj.prototype.property=``,Gj.prototype.spaceSeparated=!1,Gj.prototype.space=void 0;var Kj=s({boolean:()=>Z,booleanish:()=>Jj,commaOrSpaceSeparated:()=>Qj,commaSeparated:()=>Zj,number:()=>Q,overloadedBoolean:()=>Yj,spaceSeparated:()=>Xj}),qj=0,Z=$j(),Jj=$j(),Yj=$j(),Q=$j(),Xj=$j(),Zj=$j(),Qj=$j();function $j(){return 2**++qj}var eM=Object.keys(Kj),tM=class extends Gj{constructor(e,t,n,r){let i=-1;if(super(e,t),nM(this,`space`,r),typeof n==`number`)for(;++i<eM.length;){let e=eM[i];nM(this,eM[i],(n&Kj[e])===Kj[e])}}};tM.prototype.defined=!0;function nM(e,t,n){n&&(e[t]=n)}function rM(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new tM(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Wj(r)]=r,n[Wj(a.attribute)]=r}return new Hj(t,n,e.space)}var iM=rM({properties:{ariaActiveDescendant:null,ariaAtomic:Jj,ariaAutoComplete:null,ariaBusy:Jj,ariaChecked:Jj,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:Xj,ariaCurrent:null,ariaDescribedBy:Xj,ariaDetails:null,ariaDisabled:Jj,ariaDropEffect:Xj,ariaErrorMessage:null,ariaExpanded:Jj,ariaFlowTo:Xj,ariaGrabbed:Jj,ariaHasPopup:null,ariaHidden:Jj,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Xj,ariaLevel:Q,ariaLive:null,ariaModal:Jj,ariaMultiLine:Jj,ariaMultiSelectable:Jj,ariaOrientation:null,ariaOwns:Xj,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:Jj,ariaReadOnly:Jj,ariaRelevant:null,ariaRequired:Jj,ariaRoleDescription:Xj,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:Jj,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function aM(e,t){return t in e?e[t]:t}function oM(e,t){return aM(e,t.toLowerCase())}var sM=rM({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Zj,acceptCharset:Xj,accessKey:Xj,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alpha:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:Xj,autoFocus:Z,autoPlay:Z,blocking:Xj,capture:null,charSet:null,checked:Z,cite:null,className:Xj,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:Jj,controls:Z,controlsList:Xj,coords:Q|Zj,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:Yj,draggable:Jj,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:Xj,height:Q,hidden:Yj,high:Q,href:null,hrefLang:null,htmlFor:Xj,httpEquiv:Xj,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:Xj,itemRef:Xj,itemScope:Z,itemType:Xj,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Z,optimum:Q,pattern:null,ping:Xj,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:Xj,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:Xj,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootCustomElementRegistry:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shadowRootSerializable:Z,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:Jj,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:Jj,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Xj,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:Jj,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Z,disablePictureInPicture:Z,disableRemotePlayback:Z,exportParts:Zj,part:Xj,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:oM}),cM=rM({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Qj,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:Xj,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Zj,g2:Zj,glyphName:Zj,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:Qj,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Xj,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qj,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qj,rev:Qj,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qj,requiredFeatures:Qj,requiredFonts:Qj,requiredFormats:Qj,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:Qj,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qj,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qj,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:aM}),lM=rM({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),uM=rM({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:oM}),dM=rM({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),fM={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},pM=/[A-Z]/g,mM=/-[a-z]/g,hM=/^data[-\w.:]+$/i;function gM(e,t){let n=Wj(t),r=t,i=Gj;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&hM.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(mM,vM);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!mM.test(e)){let n=e.replace(pM,_M);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=tM}return new i(r,t)}function _M(e){return`-`+e.toLowerCase()}function vM(e){return e.charAt(1).toUpperCase()}var yM=Uj([iM,sM,lM,uM,dM],`html`),bM=Uj([iM,cM,lM,uM,dM],`svg`);function xM(e){return e.join(` `).trim()}var SM=/\/\*(?:[^*]|\*(?!\/))*\*\//g,CM=/\n/g,wM=/^\s*/,TM=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,EM=/^:\s*/,DM=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,OM=/^[;\s]*/,kM=`
43
+ `,AM=`/`,jM=`*`,MM=``,NM=`comment`,PM=`declaration`;function FM(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(CM);t&&(n+=t.length);var i=e.lastIndexOf(kM);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(wM)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(AM==e.charAt(0)&&jM==e.charAt(1)){for(var n=2;MM!=e.charAt(n)&&(jM!=e.charAt(n)||AM!=e.charAt(n+1));)++n;if(n+=2,MM===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:NM,comment:o})}}function f(){var e=a(),t=c(TM);if(t){if(d(),!c(EM))return s(`property missing ':'`);var n=c(DM),r=e({type:PM,property:t[0].replace(SM,MM).trim(),value:n?n[0].replace(SM,MM).trim():MM});return c(OM),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function IM(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=FM(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var LM=zM(`end`),RM=zM(`start`);function zM(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function BM(e){let t=RM(e),n=LM(e);if(t&&n)return{start:t,end:n}}function VM(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?UM(e.position):`start`in e||`end`in e?UM(e):`line`in e||`column`in e?HM(e):``}function HM(e){return WM(e&&e.line)+`:`+WM(e&&e.column)}function UM(e){return HM(e&&e.start)+`-`+HM(e&&e.end)}function WM(e){return e&&typeof e==`number`?e:1}var GM=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=VM(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Object.defineProperties(GM.prototype,{file:{configurable:!0,enumerable:!0,value:``,writable:!0},name:{configurable:!0,enumerable:!0,value:``,writable:!0},reason:{configurable:!0,enumerable:!0,value:``,writable:!0},message:{configurable:!0,enumerable:!0,value:``,writable:!0},stack:{configurable:!0,enumerable:!0,value:``,writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});var KM={}.hasOwnProperty,qM=new Map,JM=/[A-Z]/g,YM=/-([a-z])/g,XM=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),ZM=new Set([`td`,`th`]),QM=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function $M(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=uN(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=lN(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?bM:yM,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=eN(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function eN(e,t,n){if(t.type===`element`)return tN(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return nN(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return iN(e,t,n);if(t.type===`mdxjsEsm`)return rN(e,t);if(t.type===`root`)return aN(e,t,n);if(t.type===`text`)return oN(e,t)}function tN(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=bM,e.schema=i),e.ancestors.push(t);let a=gN(e,t.tagName,!1),o=dN(e,t),s=pN(e,t);return XM.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Bj(e)})),sN(e,o,a,t),cN(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function nN(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}_N(e,t.position)}function rN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);_N(e,t.position)}function iN(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=bM,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:gN(e,t.name,!0),o=fN(e,t),s=pN(e,t);return sN(e,o,a,t),cN(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function aN(e,t,n){let r={};return cN(r,pN(e,t)),e.create(t,e.Fragment,r,n)}function oN(e,t){return t.value}function sN(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function cN(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function lN(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function uN(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=RM(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function dN(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&KM.call(t.properties,i)){let a=mN(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&ZM.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function fN(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else _N(e,t.position)}else{let{name:i}=r,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else _N(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function pN(e,t){let n=[],r=-1,i=e.passKeys?new Map:qM;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=eN(e,a,o);s!==void 0&&n.push(s)}return n}function mN(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=gM(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?Pj(n):xM(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:vN(n):hN(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?fM[r.property]||r.property:r.attribute,n]}function hN(e,t){let n={};try{IM(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(YM,xN))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new GM("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=QM+`#cannot-parse-style-attribute`,r}return n}function gN(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Rj(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Rj(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return KM.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);_N(e)}function _N(e,t){let n=new GM("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=QM+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function vN(e){let t={},n;for(n in e)KM.call(e,n)&&(t[yN(n)]=e[n]);return t}function yN(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(JM,bN);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function bN(e){return`-`+e.toLowerCase()}function xN(e,t){return t.toUpperCase()}var SN={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},CN={};function wN(e,t){let n=t||CN;return TN(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function TN(e,t,n){if(DN(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return EN(e.children,t,n)}return Array.isArray(e)?EN(e,t,n):``}function EN(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=TN(e[i],t,n);return r.join(``)}function DN(e){return!!(e&&typeof e==`object`)}var ON=document.createElement(`i`);function kN(e){let t=`&`+e+`;`;ON.innerHTML=t;let n=ON.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function AN(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function jN(e,t){return e.length>0?(AN(e,e.length,0,t),e):t}var MN={}.hasOwnProperty;function NN(e){let t={},n=-1;for(;++n<e.length;)PN(t,e[n]);return t}function PN(e,t){let n;for(n in t){let r=(MN.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){MN.call(r,a)||(r[a]=[]);let e=i[a];FN(r[a],Array.isArray(e)?e:e?[e]:[])}}}function FN(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);AN(e,0,0,r)}function IN(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function LN(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var RN=YN(/[A-Za-z]/),zN=YN(/[\dA-Za-z]/),BN=YN(/[#-'*+\--9=?A-Z^-~]/);function VN(e){return e!==null&&(e<32||e===127)}var HN=YN(/\d/),UN=YN(/[\dA-Fa-f]/),WN=YN(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function GN(e){return e!==null&&(e<0||e===32)}function KN(e){return e===-2||e===-1||e===32}var qN=YN(/\p{P}|\p{S}/u),JN=YN(/\s/);function YN(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function XN(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&zN(e.charCodeAt(n+1))&&zN(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function ZN(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return KN(r)?(e.enter(n),s(r)):t(r)}function s(r){return KN(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function QN(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&KN(t)?(e.enter(r),c(t)):l(t)}function c(t){return KN(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var $N={tokenize:eP};function eP(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ZN(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return $(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var tP=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){nP(this,e,t,n,!1)}addBefore(e,t,n){nP(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function nP(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var rP={tokenize:aP},iP={tokenize:oP};function aP(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new tP;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(iP,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(iP,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return $(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new tP;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function oP(e,t,n){return ZN(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function sP(e){if(e===null||GN(e)||JN(e))return 1;if(qN(e))return 2}function cP(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var lP={name:`attention`,resolveAll:uP,tokenize:dP};function uP(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};fP(o,-a),fP(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=jN(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=jN(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=jN(r,cP(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=jN(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=jN(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),AN(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function dP(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=sP(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=sP(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function fP(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var pP={name:`autolink`,tokenize:mP};function mP(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return RN(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||zN(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||zN(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||VN(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):BN(t)?(e.consume(t),l):n(t)}function u(e){return zN(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||zN(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var hP={partial:!0,tokenize:gP};function gP(e,t,n){return r;function r(t){return KN(t)?ZN(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||$(e)?t(e):n(e)}}var _P={continuation:{tokenize:yP},exit:bP,name:`blockQuote`,tokenize:vP};function vP(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return KN(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function yP(e,t,n){let r=this;return i;function i(t){return KN(t)?ZN(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(_P,t,n)(r)}}function bP(e){e.exit(`blockQuote`)}var xP={name:`characterEscape`,tokenize:SP};function SP(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return WN(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var CP={name:`characterReference`,tokenize:wP};function wP(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=zN,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=UN,u):(e.enter(`characterReferenceValue`),a=7,o=HN,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===zN&&!kN(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var TP={partial:!0,tokenize:EP};function EP(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var DP={concrete:!0,name:`codeFenced`,tokenize:OP};function OP(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),KN(t)?ZN(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||$(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(TP,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):KN(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),ZN(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||$(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&KN(t)?ZN(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(TP,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),KN(t)?ZN(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),KN(t)?ZN(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var kP={name:`codeIndented`,tokenize:jP},AP={partial:!0,tokenize:MP};function jP(e,t,n){return r;function r(t){return e.enter(`codeIndented`),QN(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):$(t)?e.attempt(AP,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||$(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function MP(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):$(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):QN(e,t,a,`linePrefix`,4,4)(o)}function a(e){return $(e)?i(e):n(e)}}var NP={name:`codeText`,previous:FP,resolve:PP,tokenize:IP};function PP(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function FP(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function IP(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||$(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var LP=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&RP(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),RP(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),RP(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);RP(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);RP(this.left,t.reverse())}}}};function RP(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function zP(e){let t={},n=-1,r,i,a,o,s,c,l,u=new LP(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,BP(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return AN(e,0,1/0,u.slice(0)),!l}function BP(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var VP={resolve:UP,tokenize:WP},HP={partial:!0,tokenize:GP};function UP(e){return zP(e),e}function WP(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):$(t)?e.check(HP,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function GP(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ZN(e,a,`linePrefix`)}function a(i){if(i===null||$(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function KP(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||VN(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||GN(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||VN(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function qP(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!KN(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function JP(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ZN(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function YP(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):KN(i)?ZN(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var XP={name:`definition`,tokenize:QP},ZP={partial:!0,tokenize:$P};function QP(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return qP.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=LN(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return GN(t)?YP(e,l)(t):l(t)}function l(t){return KP(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(ZP,d,d)(t)}function d(t){return KN(t)?ZN(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function $P(e,t,n){return r;function r(t){return GN(t)?YP(e,i)(t):n(t)}function i(t){return JP(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return KN(t)?ZN(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var eF={name:`hardBreakEscape`,tokenize:tF};function tF(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var nF={name:`headingAtx`,resolve:rF,tokenize:iF};function rF(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};AN(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function iF(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||GN(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):KN(n)?ZN(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||GN(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var aF=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),oF=[`pre`,`script`,`style`,`textarea`],sF={concrete:!0,name:`htmlFlow`,resolveTo:lF,tokenize:uF},cF={partial:!0,tokenize:dF};function lF(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function uF(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:k):RN(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):RN(a)?(e.consume(a),i=4,r.interrupt?t:k):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:k):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:te:m):n(i)}function h(t){return RN(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||GN(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&oF.includes(l)?(i=1,r.interrupt?t(s):te(s)):aF.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):te(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||zN(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:te):n(i)}function v(t){return KN(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||RN(t)?(e.consume(t),b):KN(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||zN(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):KN(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):KN(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||$(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||GN(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||KN(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||$(t)?te(t):KN(t)?(e.consume(t),ee):n(t)}function te(t){return t===45&&i===2?(e.consume(t),O):t===60&&i===1?(e.consume(t),ie):t===62&&i===4?(e.consume(t),se):t===63&&i===3?(e.consume(t),k):t===93&&i===5?(e.consume(t),oe):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(cF,ce,D)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),D(t)):(e.consume(t),te)}function D(t){return e.check(TP,ne,ce)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||$(t)?D(t):(e.enter(`htmlFlowData`),te(t))}function O(t){return t===45?(e.consume(t),k):te(t)}function ie(t){return t===47?(e.consume(t),o=``,ae):te(t)}function ae(t){if(t===62){let n=o.toLowerCase();return oF.includes(n)?(e.consume(t),se):te(t)}return RN(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ae):te(t)}function oe(t){return t===93?(e.consume(t),k):te(t)}function k(t){return t===62?(e.consume(t),se):t===45&&i===2?(e.consume(t),k):te(t)}function se(t){return t===null||$(t)?(e.exit(`htmlFlowData`),ce(t)):(e.consume(t),se)}function ce(n){return e.exit(`htmlFlow`),t(n)}}function dF(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(hP,t,n)}}var fF={name:`htmlText`,tokenize:pF};function pF(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):RN(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):RN(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,ie(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?O(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,ie(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?O(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?O(t):$(t)?(o=v,ie(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,ie(t)):(e.consume(t),y)}function b(e){return e===62?O(e):y(e)}function x(t){return RN(t)?(e.consume(t),S):n(t)}function S(t){return t===45||zN(t)?(e.consume(t),S):C(t)}function C(t){return $(t)?(o=C,ie(t)):KN(t)?(e.consume(t),C):O(t)}function w(t){return t===45||zN(t)?(e.consume(t),w):t===47||t===62||GN(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),O):t===58||t===95||RN(t)?(e.consume(t),E):$(t)?(o=T,ie(t)):KN(t)?(e.consume(t),T):O(t)}function E(t){return t===45||t===46||t===58||t===95||zN(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),te):$(t)?(o=ee,ie(t)):KN(t)?(e.consume(t),ee):T(t)}function te(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,D):$(t)?(o=te,ie(t)):KN(t)?(e.consume(t),te):(e.consume(t),ne)}function D(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):$(t)?(o=D,ie(t)):(e.consume(t),D)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||GN(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||GN(e)?T(e):n(e)}function O(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ie(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ae}function ae(t){return KN(t)?ZN(e,oe,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):oe(t)}function oe(t){return e.enter(`htmlTextData`),o(t)}}var mF={name:`labelEnd`,resolveAll:vF,resolveTo:yF,tokenize:bF},hF={tokenize:xF},gF={tokenize:SF},_F={tokenize:CF};function vF(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&AN(e,0,e.length,n),e}function yF(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=jN(o,e.slice(i+1,i+r+3)),o=jN(o,[[`enter`,l,t]]),o=jN(o,cP(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=jN(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=jN(o,e.slice(a+1)),o=jN(o,[[`exit`,s,t]]),AN(e,i,e.length,o),e}function bF(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(LN(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(hF,u,o?u:d)(t):t===91?e.attempt(gF,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(_F,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function xF(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return GN(t)?YP(e,a)(t):a(t)}function a(t){return t===41?u(t):KP(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return GN(t)?YP(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?JP(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return GN(t)?YP(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function SF(e,t,n){let r=this;return i;function i(t){return qP.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(LN(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function CF(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var wF={name:`labelStartImage`,resolveAll:mF.resolveAll,tokenize:TF};function TF(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var EF={name:`labelStartLink`,resolveAll:mF.resolveAll,tokenize:DF};function DF(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var OF={name:`lineEnding`,tokenize:kF};function kF(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ZN(e,t,`linePrefix`)}}var AF={name:`thematicBreak`,tokenize:jF};function jF(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),KN(t)?ZN(e,s,`whitespace`)(t):s(t))}}var MF={continuation:{tokenize:IF},exit:RF,name:`list`,tokenize:FF},NF={partial:!0,tokenize:zF},PF={partial:!0,tokenize:LF};function FF(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:HN(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(AF,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return HN(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(hP,r.interrupt?n:u,e.attempt(NF,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return KN(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function IF(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(hP,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ZN(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!KN(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(PF,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,ZN(e,e.attempt(MF,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function LF(e,t,n){let r=this;return ZN(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function RF(e){e.exit(this.containerState.type)}function zF(e,t,n){let r=this;return ZN(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!KN(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var BF={name:`setextUnderline`,resolveTo:VF,tokenize:HF};function VF(e,t){let n=new tP,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function HF(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),KN(t)?ZN(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var UF={tokenize:WF};function WF(e){let t=this,n=e.attempt(hP,r,e.attempt(this.parser.constructs.flowInitial,i,ZN(e,e.attempt(this.parser.constructs.flow,i,e.attempt(VP,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var GF={resolveAll:YF()},KF=JF(`string`),qF=JF(`text`);function JF(e){return{resolveAll:YF(e===`text`?XF:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function YF(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function XF(e,t){let n=new tP,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var ZF=s({attentionMarkers:()=>aI,contentInitial:()=>$F,disable:()=>oI,document:()=>QF,flow:()=>tI,flowInitial:()=>eI,insideSpan:()=>iI,string:()=>nI,text:()=>rI}),QF={42:MF,43:MF,45:MF,48:MF,49:MF,50:MF,51:MF,52:MF,53:MF,54:MF,55:MF,56:MF,57:MF,62:_P},$F={91:XP},eI={[-2]:kP,[-1]:kP,32:kP},tI={35:nF,42:AF,45:[BF,AF],60:sF,61:BF,95:AF,96:DP,126:DP},nI={38:CP,92:xP},rI={[-5]:OF,[-4]:OF,[-3]:OF,33:wF,38:CP,42:lP,60:[pP,fF],91:EF,92:[eF,xP],93:mF,95:lP,96:NP},iI={null:[lP,GF]},aI={null:[42,95]},oI={null:[]};function sI(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=jN(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=cP(a,l.events,l),l.events):[]}function f(e,t){return lI(p(e),t)}function p(e){return cI(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){$(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&AN(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function cI(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function lI(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
44
+ `;break;case-3:o=`\r
45
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function uI(e){let t={constructs:NN([ZF,...(e||{}).extensions||[]]),content:n($N),defined:[],document:n(rP),flow:n(UF),lazy:{},string:n(KF),text:n(qF)};return t;function n(e){return n;function n(n){return sI(t,e,n)}}}function dI(e){for(;!zP(e););return e}var fI=/[\0\t\n\r]/g;function pI(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){fI.lastIndex=c;let n=fI.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var mI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function hI(e){return e.replace(mI,gI)}function gI(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return IN(n.slice(t?2:1),t?16:10)}return kN(n)||e}var _I={}.hasOwnProperty;function vI(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),yI(n)(dI(uI(n).document().write(pI()(e,t,!0))))}function yI(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(Ce),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(ye),blockQuote:o(j),characterEscape:E,characterReference:E,codeFenced:o(M),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(M,s),codeText:o(ge,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(_e),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(ve),hardBreakEscape:o(be),hardBreakTrailing:o(be),htmlFlow:o(xe,s),htmlFlowData:E,htmlText:o(xe,s),htmlTextData:E,image:o(Se),label:s,link:o(Ce),listItem:o(Te),listItemValue:p,listOrdered:o(we,f),listUnordered:o(we),paragraph:o(N),reference:ue,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ye),strong:o(P),thematicBreak:o(De)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:A,autolinkProtocol:he,blockQuote:l(),characterEscapeValue:ee,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:pe,characterReference:me,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:ee,codeIndented:l(v),codeText:l(O),codeTextData:ee,data:ee,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(D),hardBreakTrailing:l(D),htmlFlow:l(ne),htmlFlowData:ee,htmlText:l(re),htmlTextData:ee,image:l(ae),label:k,labelText:oe,lineEnding:te,link:l(ie),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:de,resourceDestinationString:se,resourceTitleString:ce,resource:le,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};xI(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),_I.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||CI).call(o,void 0,e[0])}for(r.position={start:bI(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:bI(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:bI(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+VM({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||CI).call(this,e,r[0])),n.position.end=bI(e.end)}function d(){return wN(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=LN(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Ee(),n.position={start:bI(e.start),end:void 0},t.push(n)),this.stack.push(n)}function ee(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=bI(e.end)}function te(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=bI(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),ee.call(this,e))}function D(){this.data.atHardBreak=!0}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function O(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function oe(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=hI(t),n.identifier=LN(t).toLowerCase()}function k(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function le(){this.data.inReference=void 0}function ue(){this.data.referenceType=`collapsed`}function de(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=LN(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function fe(e){this.data.characterReferenceType=e.type}function pe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=IN(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=kN(t);let i=this.stack[this.stack.length-1];i.value+=r}function me(e){let t=this.stack.pop();t.position.end=bI(e.end)}function he(e){ee.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function A(e){ee.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function j(){return{type:`blockquote`,children:[],position:void 0}}function M(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function ge(){return{type:`inlineCode`,value:``,position:void 0}}function _e(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function ve(){return{type:`emphasis`,children:[],position:void 0}}function ye(){return{type:`heading`,depth:0,children:[],position:void 0}}function be(){return{type:`break`,position:void 0}}function xe(){return{type:`html`,value:``,position:void 0}}function Se(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function Ce(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function we(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function Te(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function N(){return{type:`paragraph`,children:[],position:void 0}}function P(){return{type:`strong`,children:[],position:void 0}}function Ee(){return{type:`text`,value:``,position:void 0}}function De(){return{type:`thematicBreak`,position:void 0}}}function bI(e){return{line:e.line,column:e.column,offset:e.offset}}function xI(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?xI(e,r):SI(e,r)}}function SI(e,t){let n;for(n in t)if(_I.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function CI(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+VM({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+VM({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+VM({start:t.start,end:t.end})+`) is still open`)}function wI(e){let t=this;t.parser=n;function n(n){return vI(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function TI(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function EI(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
46
+ `}]}function DI(e,t){let n=t.value?t.value+`
47
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function OI(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kI(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AI(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=XN(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function jI(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MI(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function NI(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function PI(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return NI(e,t);let i={src:XN(r.url||``)};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function FI(e,t){let n={src:XN(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function II(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function LI(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return NI(e,t);let i={href:XN(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function RI(e,t){let n={href:XN(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zI(e,t,n){let r=e.all(t),i=n?BI(n):VI(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
48
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
49
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function BI(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let{children:n}=e,r=-1;for(;!t&&++r<n.length;)t=VI(n[r])}return t}function VI(e){let{spread:t}=e;return t??e.children.length>1}function HI(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function UI(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function WI(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function GI(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KI(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=RM(t.children[1]),o=LM(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function qI(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function JI(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var YI=9,XI=32;function ZI(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(QI(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(QI(t.slice(i),i>0,!1)),a.join(``)}function QI(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===YI||t===XI;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===YI||t===XI;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function $I(e,t){let n={type:`text`,value:ZI(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function eL(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var tL={blockquote:TI,break:EI,code:DI,delete:OI,emphasis:kI,footnoteReference:AI,heading:jI,html:MI,imageReference:PI,image:FI,inlineCode:II,linkReference:LI,link:RI,listItem:zI,list:HI,paragraph:UI,root:WI,strong:GI,table:KI,tableCell:JI,tableRow:qI,text:$I,thematicBreak:eL,toml:nL,yaml:nL,definition:nL,footnoteDefinition:nL};function nL(){}var{defineProperty:rL}=Object,iL=typeof self==`object`?self:globalThis,aL=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new iL[e](t)},oL=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?rL(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof iL[e]==`function`?aL(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(aL(a,o),i)};return r},sL=e=>oL(new Map,e)(0),cL=``,{toString:lL}={},{keys:uL,is:dL}=Object,fL=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=lL.call(e).slice(8,-1);switch(n){case`Array`:return[1,cL];case`Object`:return[2,cL];case`Date`:return[3,cL];case`RegExp`:return[4,cL];case`Map`:return[5,cL];case`Set`:return[6,cL];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},pL=([e,t])=>e===0&&(t===`function`||t===`symbol`),mL=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=fL(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&dL(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of uL(o))(e||!pL(fL(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?cL:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(pL(fL(n))||pL(fL(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!pL(fL(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},hL=(e,{json:t,lossy:n}={})=>{let r=[];return mL(!(t||n),!!t,new Map,r)(e),r},gL=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?sL(hL(e,t)):structuredClone(e):(e,t)=>sL(hL(e,t));function _L(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function vL(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function yL(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||_L,r=e.options.footnoteBackLabel||vL,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=[],l=-1;for(;++l<e.footnoteOrder.length;){let t=e.footnoteById.get(e.footnoteOrder[l]);t&&(s[l]=e.all(t))}for(l=-1;++l<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;let a=s[l],o=String(i.identifier).toUpperCase(),u=XN(o.toLowerCase()),d=0,f=[],p=e.footnoteCounts.get(o);for(;p!==void 0&&++d<=p;){f.length>0&&f.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(l,d);typeof e==`string`&&(e={type:`text`,value:e}),f.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+u+(d>1?`-`+d:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(l,d),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let m=a[a.length-1];if(m&&m.type===`element`&&m.tagName===`p`){let e=m.children[m.children.length-1];e&&e.type===`text`?e.value+=` `:m.children.push({type:`text`,value:` `}),m.children.push(...f)}else a.push(...f);let h={type:`element`,tagName:`li`,properties:{id:t+`fn-`+u},children:e.wrap(a,!0)};e.patch(i,h),c.push(h)}if(c.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...gL(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
50
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(c,!0)},{type:`text`,value:`
51
+ `}]}}var bL=(function(e){if(e==null)return TL;if(typeof e==`function`)return wL(e);if(typeof e==`object`)return Array.isArray(e)?xL(e):SL(e);if(typeof e==`string`)return CL(e);throw Error(`Expected function, string, or object as test`)});function xL(e){let t=[],n=-1;for(;++n<e.length;)t[n]=bL(e[n]);return wL(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function SL(e){let t=e;return wL(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function CL(e){return wL(t);function t(t){return t&&t.type===e}}function wL(e){return t;function t(t,n,r){return!!(EL(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function TL(){return!0}function EL(e){return typeof e==`object`&&!!e&&`type`in e}function DL(e){return e}var OL=[],kL=`skip`;function AL(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=bL(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+DL(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=OL;if(s&&r&&(o=jL(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=jL(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function jL(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?OL:[e]}function ML(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?AL(e,i,PL(a),o):AL(e,i,NL(a),o)}function NL(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?PL(e.enter):e.enter,exit:typeof e.exit==`function`?PL(e.exit):e.exit}}function PL(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}var FL={}.hasOwnProperty,IL={};function LL(e,t){let n=t||IL,r=new Map,i=new Map,a={all:s,applyData:zL,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...tL,...n.handlers},one:o,options:n,patch:RL,wrap:VL};return ML(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=String(e.identifier).toUpperCase();e.type===`definition`?r.has(t)||r.set(t,e):i.has(t)||i.set(t,e)}}),a;function o(e,t){let{type:n}=e,r=a.handlers[n];if(FL.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e;return{...gL(n),children:a.all(e)}}return gL(e)}return(a.options.unknownHandler||BL)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=HL(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=HL(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function RL(e,t){e.position&&(t.position=BM(e))}function zL(e,t){let n=t;if(e&&e.data){let{hChildren:t,hName:r,hProperties:i}=e.data;typeof r==`string`&&(n.type===`element`?n.tagName=r:n={type:`element`,tagName:r,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,gL(i)),`children`in n&&n.children&&t!=null&&(n.children=t)}return n}function BL(e,t){let n=t.data||{},r=`value`in t&&!(FL.call(n,`hProperties`)||FL.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function VL(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
52
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
53
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
54
+ `}),n}function HL(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function UL(e,t){let n=LL(e,t),r=n.one(e,void 0),i=yL(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
55
+ `},i)),a}function WL(e,t){return e&&`run`in e?async function(n,r){let i=UL(n,{file:r,...t});await e.run(i,r)}:function(n,r){return UL(n,{file:r,...e||t})}}function GL(e){if(e)throw e}var KL=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function qL(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function JL(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?YL(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function YL(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var XL={basename:ZL,dirname:QL,extname:$L,join:eR,sep:`/`};function ZL(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);rR(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function QL(e){if(rR(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function $L(e){rR(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function eR(...e){let t=-1,n;for(;++t<e.length;)rR(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:tR(n)}function tR(e){rR(e);let t=e.codePointAt(0)===47,n=nR(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function nR(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function rR(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var iR={cwd:aR};function aR(){return`/`}function oR(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function sR(e){if(typeof e==`string`)e=new URL(e);else if(!oR(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return cR(e)}function cR(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var lR=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],uR=class{constructor(e){let t;t=e?oR(e)?{path:e}:typeof e==`string`||mR(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:iR.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<lR.length;){let e=lR[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)lR.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?XL.basename(this.path):void 0}set basename(e){fR(e,`basename`),dR(e,`basename`),this.path=XL.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?XL.dirname(this.path):void 0}set dirname(e){pR(this.basename,`dirname`),this.path=XL.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?XL.extname(this.path):void 0}set extname(e){if(dR(e,`extname`),pR(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=XL.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){oR(e)&&(e=sR(e)),fR(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?XL.basename(this.path,this.extname):void 0}set stem(e){fR(e,`stem`),dR(e,`stem`),this.path=XL.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new GM(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function dR(e,t){if(e&&e.includes(XL.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+XL.sep+"`")}function fR(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function pR(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function mR(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var hR=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),gR=l(KL(),1),_R={}.hasOwnProperty,vR=new class e extends hR{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=JL()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,gR.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(xR(`data`,this.frozen),this.namespace[e]=t,this):_R.call(this.namespace,e)&&this.namespace[e]||void 0:e?(xR(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=wR(e),n=this.parser||this.Parser;return yR(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),yR(`process`,this.parser||this.Parser),bR(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=wR(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);ER(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),yR(`processSync`,this.parser||this.Parser),bR(`processSync`,this.compiler||this.Compiler),this.process(e,r),CR(`processSync`,`process`,t),n;function r(e,r){t=!0,GL(e),n=r}}run(e,t,n){SR(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=wR(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),CR(`runSync`,`run`,n),r;function i(e,t){GL(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=wR(t),r=this.compiler||this.Compiler;return bR(`stringify`,r),SR(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(xR(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,gR.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];qL(o)&&qL(r)&&(r=(0,gR.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function yR(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function bR(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function xR(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function SR(e){if(!qL(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function CR(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function wR(e){return TR(e)?e:new uR(e)}function TR(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function ER(e){return typeof e==`string`||DR(e)}function DR(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var OR=[],kR={allowDangerousHtml:!0},AR=/^(https?|ircs?|mailto|xmpp)$/i,jR=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function MR(e){let t=NR(e),n=PR(e);return FR(t.runSync(t.parse(n),n),e)}function NR(e){let t=e.rehypePlugins||OR,n=e.remarkPlugins||OR,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...kR}:kR;return vR().use(wI).use(n).use(WL,r).use(t)}function PR(e){let t=e.children||``,n=new uR;return typeof t==`string`?n.value=t:``+t,n}function FR(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||IR;for(let e of jR)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return ML(e,l),$M(e,{Fragment:J.Fragment,components:i,ignoreInvalidStyle:!0,jsx:J.jsx,jsxs:J.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in SN)if(Object.hasOwn(SN,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=SN[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function IR(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||AR.test(e.slice(0,t))?e:``}function LR(e){return(0,J.jsx)(`a`,{className:`text-foreground underline underline-offset-2`,href:e.href,rel:`noopener noreferrer`,target:`_blank`,children:e.children})}var RR=(0,Y.createContext)({name:`people`});function zR(){let e=(0,Y.useContext)(RR);return t=>oE({identity:t,route:e})}function BR(e){let t=e[`data-name`]??``,n=zR(),r=(0,J.jsx)(oC,{mine:e[`data-mention`]===`mine`,children:e.children});return ci(t)?(0,J.jsx)(`a`,{className:`hover:underline`,href:n(t),children:r}):r}function VR(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function HR(e,t,n){let r=bL((n||{}).ignore||[]),i=UR(t),a=-1;for(;++a<i.length;)AL(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return kL}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i!==!1){if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(i===!1||d[0].length===0){let t=e.value.codePointAt(n)||0;o.lastIndex=n+(/[uv]/.test(o.flags)&&t>65535?2:1)}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function UR(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([WR(e[0]),GR(e[1])])}return t}function WR(e){return typeof e==`string`?new RegExp(VR(e),`g`):e}function GR(e){return typeof e==`function`?e:function(){return e}}function KR(e){HR(e,[/\r?\n|\r/g,qR])}function qR(){return{type:`break`}}function JR(){return function(e){KR(e)}}function YR(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var XR=`phrasing`,ZR=[`autolink`,`link`,`image`,`label`];function QR(){return{transforms:[oz],enter:{literalAutolink:ez,literalAutolinkEmail:tz,literalAutolinkHttp:tz,literalAutolinkWww:tz},exit:{literalAutolink:az,literalAutolinkEmail:iz,literalAutolinkHttp:nz,literalAutolinkWww:rz}}}function $R(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:XR,notInConstruct:ZR},{character:`.`,before:`[Ww]{3}`,inConstruct:XR,notInConstruct:ZR},{character:`:`,before:`[PSps]`,after:`\\/`,inConstruct:XR,notInConstruct:ZR}]}}function ez(e){this.enter({type:`link`,title:null,url:``,children:[],position:void 0},e)}function tz(e){this.config.enter.autolinkProtocol.call(this,e)}function nz(e){this.config.exit.autolinkProtocol.call(this,e)}function rz(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function iz(e){this.config.exit.autolinkEmail.call(this,e)}function az(e){this.exit(e)}function oz(e){HR(e,[[/(?<![\da-z])(https?:\/\/|www(?=\.))([\w-]*\.[\w\-.]*)([^\t\n\r ]*)/gi,sz],[/(?<![\w+\-.@])xmpp:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)(\/(?:[\w\-/]|\.(?=[\dA-Za-z]))*)?/g,uz],[/(?<![\w+\-.@])mailto:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,lz],[/(?<![\w+\-.]|(?:^|[^\d@A-Za-z])(?:mailto|xmpp):)([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,cz]],{ignore:[`link`,`linkReference`]})}function sz(e,t,n,r,i){if(!pz(i))return!1;let a=``;if(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),qN(n.charCodeAt(0))||!dz(n))return!1;let o=fz(n+r),s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0],position:void 0}],position:void 0};return o[1]?[s,{type:`text`,value:o[1],position:void 0}]:s}function cz(e,t,n){return!/[\d\-_]$/.test(n)&&{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n,position:void 0}],position:void 0}}function lz(e,t,n){if(/[\d\-_]$/.test(n))return!1;let r=`mailto:`+t+`@`+n;return{type:`link`,title:null,url:r,children:[{type:`text`,value:r,position:void 0}],position:void 0}}function uz(e,t,n,r,i){if(/[\d\-_]$/.test(n)||r&&(!/[A-Za-z]$/.test(r)||i.input.charAt(i.index+e.length)===`@`))return!1;let a=`xmpp:`+t+`@`+n+(r||``);return{type:`link`,title:null,url:a,children:[{type:`text`,value:a,position:void 0}],position:void 0}}function dz(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[\dA-Za-z]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[\dA-Za-z]/.test(t[t.length-2])))}function fz(e){let t=e.length;for(;t>0;){let n=e.charCodeAt(t-1);if(n===33||n===34||n===38||n===39||n===41||n===44||n===46||n===58||n===59||n===60||n===62||n===63||n===93||n===125)t--;else break}if(t===e.length)return[e,void 0];let n=e.slice(t);e=e.slice(0,t);let r=n.indexOf(`)`),i=YR(e,`(`),a=YR(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function pz(e){let t=e.input.charCodeAt(e.index-1);return e.index===0||JN(t)||qN(t)}Cz.peek=Sz;function mz(){this.buffer()}function hz(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function gz(){this.buffer()}function _z(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function vz(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=LN(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yz(e){this.exit(e)}function bz(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=LN(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xz(e){this.exit(e)}function Sz(){return`[`}function Cz(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function wz(){return{enter:{gfmFootnoteCallString:mz,gfmFootnoteCall:hz,gfmFootnoteDefinitionLabelString:gz,gfmFootnoteDefinition:_z},exit:{gfmFootnoteCallString:vz,gfmFootnoteCall:yz,gfmFootnoteDefinitionLabelString:bz,gfmFootnoteDefinition:xz}}}function Tz(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Cz},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
56
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Dz:Ez))),s(),o}}function Ez(e,t,n){return t===0?e:Dz(e,t,n)}function Dz(e,t,n){return(n?``:` `)+e}var Oz=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Nz.attention=Pz,Nz.peek=Fz;function kz(){return{canContainEols:[`delete`],enter:{strikethrough:jz},exit:{strikethrough:Mz}}}function Az(){return{handlers:{delete:Nz},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Oz}]}}function jz(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Mz(e){this.exit(e)}function Nz(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function Pz(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Fz(){return`~`}function Iz(e){return e.length}function Lz(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Iz,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Rz(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=zz(r[d]);else{let e=zz(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u],r=n.fillRows===!1?Math.max(1,o[u===1?0:u].length):l;d=-1;let i=[];for(;++d<r;){let o=e[d]||``,s=``,l=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];if(n===114)s=` `.repeat(e);else if(n===99){let t=e/2;e%2?(s=` `.repeat(t+.5),l=` `.repeat(t-.5)):(s=` `.repeat(t),l=s)}else l=` `.repeat(e)}n.delimiterStart!==!1&&!d&&i.push(`|`),n.padding===!1||n.alignDelimiters===!1&&o===``||n.delimiterStart===!1&&!d||i.push(` `),n.alignDelimiters!==!1&&i.push(s),i.push(o),n.alignDelimiters!==!1&&i.push(l),n.padding!==!1&&i.push(` `),(n.delimiterEnd!==!1||d!==r-1)&&i.push(`|`)}m.push(n.delimiterEnd===!1?i.join(``).replace(/ +$/,``):i.join(``))}return m.join(`
57
+ `)}function Rz(e){return e==null?``:String(e)}function zz(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var Bz=bL([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Vz(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Hz);return i(),o}function Hz(e,t,n){return`>`+(n?``:` `)+e}function Uz(e,t){return Wz(e,t.inConstruct,!0)&&!Wz(e,t.notInConstruct,!1)}function Wz(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Gz(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
58
+ `&&!e.before&&!e.after&&Uz(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
59
+ `}function Kz(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function qz(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function Jz(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Yz(e,t,n,r){let i=Jz(n),a=e.value||``;if(qz(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Xz);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(Kz(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
60
+ `,encode:["`"],...o.current()})),t()}return u+=o.move(`
61
+ `),a&&(u+=o.move(a+`
62
+ `)),u+=o.move(s),c(),u}function Xz(e,t,n){return(n?``:` `)+e}function Zz(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Qz(e,t,n,r){let i=Zz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/^<|[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
63
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function $z(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function eB(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function tB(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function nB(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function rB(e,t,n){let r=sP(e),i=sP(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function iB(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:RN(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!RN(a))return;for(;a===45||zN(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&oF.includes(o)?1:aF.includes(o)?6:7}var aB=new Map([[`*`,!1],[`_`,!0]]);function oB(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function sB(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=aB.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=sP(u.charCodeAt(u.length-1)),f=sP((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(uB(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:oB(e,t,a),index:o}}}function cB(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?eB(n.value):tB(n.value),i=nB(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function lB(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=gB(e,c,r,i),u=sB(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function uB(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function dB(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!WN(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function fB(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?eB(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
64
+ `)&&l.type===`html`&&iB(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(_B(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=pB(l,f.attention,t,c);if(!e)continue;a.push(e),s=tB(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=tB(n)}}return r.pop(),a}function pB(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=dB(e.type,a,o),c=s[0],l=n.enter(i),u=n.createTracker(r.current());u.move(c);let d=fB(e,n,{...u.current(),before:c,after:c});if(l(),d.length!==0)return r.move(c),r.move(_B(d,c,c)),r.move(c),{children:d,sequences:s}}function mB(e,t,n,r){let i=gB(e,t,n,r),a=sB(i,n,r);for(;a;){let o=lB(e,t,a,n,r);if(!o)return;t=o.chosen,i=o.tokens,a=o.mistake}return i}function hB(e,t,n,r){let i=n,a=-1;for(;++a<e.length;){let o=e[a];if(typeof o==`string`){i=``;continue}let s=a===e.length-1?r:``,c=o.sequences.find(function(t){let r=t.charAt(0);return r!==i.charAt(0)&&r!==s.charAt(0)||e.length===1&&aB.has(r)&&t.length>n.length})||o.sequences[0];c!==o.sequences[0]&&t.set(o,c),hB(o.children,t,c,c),i=c}}function gB(e,t,n,r){let i=[],a,o=tB(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===eB(n)&&cB([e],!0),a=void 0,i.push(e),e.value&&(o=tB(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=eB(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=gB(n.children,t,c,c),m=p[0].value,h=rB(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&cB(p,!0);let g=tB(p[p.length-1].value),_=rB(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&cB(p,!1),h.outside&&d!==`
65
+ `&&d!==`\r`&&cB(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function _B(e,t,n){let r=new Map;hB(e,r,t,n);let i=(r.size>0?mB(e,r,t,n):void 0)||mB(e,new Map,t,n)||gB(e,new Map,t,n),a=``;for(let e of i)a+=e.value;return a}vB.attention=yB,vB.peek=bB;function vB(e,t,n,r){let i=n.enter(`phrasing`),a=pB(e,yB,n,n.createTracker(r)),o=a?_B([a],r.before,r.after):``;return i(),o}function yB(e,t){return{construct:`emphasis`,markers:$z(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function bB(e,t,n){return n.options.emphasis||`*`}function xB(e,t){let n=!1;return ML(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&wN(e)&&(t.options.setext||n))}function SB(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(xB(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
66
+ `,after:`
67
+ `});return r(),t(),o+`
68
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
69
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
70
+ `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=nB(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}CB.peek=wB;function CB(e){return e.value||``}function wB(){return`<`}TB.peek=EB;function TB(e,t,n,r){let i=Zz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/^<|[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function EB(){return`!`}DB.peek=OB;function DB(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function OB(){return`!`}kB.peek=AB;function kB(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function AB(){return"`"}function jB(e,t){let n=wN(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}MB.peek=NB;function MB(e,t,n,r){let i=Zz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(jB(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/^<|[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
71
+ `||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function NB(e,t,n){return jB(e,n)?`<`:`[`}PB.peek=FB;function PB(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function FB(){return`[`}function IB(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function LB(e){let t=IB(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function RB(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function zB(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function BB(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?RB(n):IB(n),s=e.ordered?o===`.`?`)`:`.`:LB(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),zB(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function VB(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function HB(e,t,n,r){let i=VB(n),a=n.bulletCurrent||IB(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function UB(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function WB(e,t,n,r){if(!e.children.some(function(e){return Bz(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function GB(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}KB.attention=qB,KB.peek=JB;function KB(e,t,n,r){let i=n.enter(`phrasing`),a=pB(e,qB,n,n.createTracker(r)),o=a?_B([a],r.before,r.after):``;return i(),o}function qB(e,t){return{construct:`strong`,markers:GB(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function JB(e,t,n){return n.options.strong||`*`}function YB(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function XB(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ZB(e,t,n){let r=(zB(n)+(n.options.ruleSpaces?` `:``)).repeat(XB(n));return n.options.ruleSpaces?r.slice(0,-1):r}var QB={blockquote:Vz,break:Gz,code:Yz,definition:Qz,emphasis:vB,hardBreak:Gz,heading:SB,html:CB,image:TB,imageReference:DB,inlineCode:kB,link:MB,linkReference:PB,list:BB,listItem:HB,paragraph:UB,root:WB,strong:KB,text:YB,thematicBreak:ZB};function $B(){return{enter:{table:eV,tableData:iV,tableHeader:iV,tableRow:nV},exit:{codeText:aV,table:tV,tableData:rV,tableHeader:rV,tableRow:rV}}}function eV(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[],position:void 0},e),this.data.inTable=!0}function tV(e){this.exit(e),this.data.inTable=void 0}function nV(e){this.enter({type:`tableRow`,children:[],position:void 0},e)}function rV(e){this.exit(e)}function iV(e){this.enter({type:`tableCell`,children:[],position:void 0},e)}function aV(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,oV));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function oV(e,t){return t===`|`?t:e}function sV(e){let{tableCellPadding:t,tablePipeAlign:n,stringLength:r}=e||{},i=t?` `:`|`;return{handlers:{inlineCode:d,table:a,tableCell:s,tableRow:o},join:[cV],unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
72
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}]};function a(e,t,n,r){let i=l(e,n,r),a=i[0];if(a){let t=e.align?e.align.length:0,n=-1;if(!t)for(;++n<i.length;)i[n].length>t&&(t=i[n].length);for(;a.length<t;)a.push(``)}return c(i,e.align)}function o(e,t,n,r){let i=c([u(e,n,r)]);return i.slice(0,i.indexOf(`
73
+ `))}function s(e,t,n,r){let a=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:i,after:i});return o(),a(),s}function c(e,i){return Lz(e,{align:i,alignDelimiters:n,fillRows:!1,padding:t,stringLength:r})}function l(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=u(r[i],t,n);return o(),a}function u(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=s(r[i],e,t,n);return o(),a}function d(e,t,n){let r=QB.inlineCode(e,t,n);if(!n.stack.includes(`tableCell`))return r;let i=[],a=0,o=r.indexOf(`|`);for(;o!==-1;){let e=o;for(;e>a&&r.charCodeAt(e-1)===92;)e--;i.push(r.slice(a,o)),(o-e)%2==0&&i.push(`\\`),a=o,o=r.indexOf(`|`,o+1)}return i.push(r.slice(a)),i.join(``)}}function cV(e,t,n,r){if(e.type===`table`&&n.type===`listItem`&&n.spread===!1&&(t.type===`definition`||t.type===`heading`&&lV(t,r)||t.type===`paragraph`||t.type===`table`))return 1}function lV(e,t){let n=!1;return ML(e,function(e){if(e.type===`break`||`value`in e&&/\r?\n|\r/.test(e.value))return n=!0,!1}),!!((!e.depth||e.depth<3)&&wN(e)&&(t.options.setext||n))}function uV(){return{exit:{taskListCheckValueChecked:fV,taskListCheckValueUnchecked:fV,paragraph:pV}}}function dV(){return{handlers:{paragraph:mV},join:[hV]}}function fV(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function pV(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start={...n.position.start}))}}this.exit(e)}function mV(e,t,n,r){if(!t||t.type!==`listItem`||gV(t)!==e)return QB.paragraph(e,t,n,r);let i=`[`+(t.checked?`x`:` `)+`] `,a=n.createTracker(r);return a.move(i),i+QB.paragraph(e.children.length>0?e:{type:`paragraph`,children:[{type:`text`,value:` `}]},t,n,{...r,...a.current()})}function hV(e,t,n){if(e.type!==`definition`||n.type!==`listItem`)return;let r=gV(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function gV(e){if(typeof e.checked==`boolean`)for(let t of e.children){if(t.type===`paragraph`)return t;if(t.type!==`definition`)return}}function _V(){return[QR(),wz(),kz(),$B(),uV()]}function vV(e){return{extensions:[$R(),Tz(e),Az(),sV(e),dV()]}}var yV={tokenize:NV,partial:!0},bV={tokenize:PV,partial:!0},xV={tokenize:FV,partial:!0},SV={tokenize:IV,partial:!0},CV={tokenize:LV,partial:!0},wV={name:`wwwAutolink`,tokenize:jV,previous:RV},TV={name:`protocolAutolink`,tokenize:MV,previous:zV},EV={name:`emailAutolink`,tokenize:AV,previous:BV},DV={};function OV(){return{text:DV}}for(var kV=48;kV<123;)DV[kV]=EV,kV++,kV===58?kV=65:kV===91&&(kV=97);DV[43]=EV,DV[45]=EV,DV[46]=EV,DV[95]=EV,DV[72]=[EV,TV],DV[104]=[EV,TV],DV[87]=[EV,wV],DV[119]=[EV,wV];function AV(e,t,n){let r=this,i,a;return o;function o(t){return!VV(t)||!BV.call(r,r.previous)||HV(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return VV(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(CV,u,l)(t):t===45||t===95||zN(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&RN(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function jV(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!RV.call(r,r.previous)||HV(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(yV,e.attempt(bV,e.attempt(xV,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function MV(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&zV.call(r,r.previous)&&!HV(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(RN(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||VN(t)||GN(t)||JN(t)||qN(t)?n(t):e.attempt(bV,e.attempt(xV,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function NV(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function PV(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(SV,c,s)(t):t===null||GN(t)||JN(t)||t!==45&&qN(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function FV(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(SV,t,a)(o):o===null||GN(o)||JN(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function IV(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||GN(o)||JN(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||GN(e)||JN(e)?t(e):r(e)}function a(e){return RN(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):RN(t)?(e.consume(t),o):n(t)}}function LV(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return zN(e)?n(e):t(e)}}function RV(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||GN(e)}function zV(e){return!RN(e)}function BV(e){return!(e===47||VV(e))}function VV(e){return e===43||e===45||e===46||e===95||zN(e)}function HV(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var UV={tokenize:ZV,partial:!0};function WV(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:JV,continuation:{tokenize:YV},exit:XV}},text:{91:{name:`gfmFootnoteCall`,tokenize:qV},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:GV,resolveTo:KV}}}}function GV(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=LN(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function KV(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function qV(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||GN(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(LN(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return GN(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function JV(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||GN(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=LN(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return GN(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),ZN(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function YV(e,t,n){return e.check(hP,t,e.attempt(UV,t,n))}function XV(e){e.exit(`gfmFootnoteDefinition`)}function ZV(e,t,n){let r=this;return ZN(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function QV(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&AN(o,o.length,0,cP(s,e.slice(r+1,n),t)),AN(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),AN(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=sP(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=sP(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var $V=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){eH(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function eH(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function tH(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function nH(){return{flow:{null:{name:`table`,tokenize:rH,resolveAll:iH}}}}function rH(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):$(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):KN(t)?ZN(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||GN(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,KN(t)?ZN(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return KN(t)?ZN(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||$(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return KN(t)?ZN(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||$(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||$(n)?(e.exit(`tableRow`),t(n)):KN(n)?ZN(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||GN(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function iH(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new $V;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(oH(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=aH(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=aH(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=aH(f,t,o,i,n,d)):(o[0]=o[1],d=aH(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&oH(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=tH(t.events,n))}return e}function aH(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},sH(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=sH(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=sH(t.events,n[2]),a=sH(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},sH(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function oH(e,t,n,r,i){let a=[],o=sH(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function sH(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var cH={name:`tasklistCheck`,tokenize:uH};function lH(){return{text:{91:cH}}}function uH(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return GN(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return $(r)?t(r):KN(r)?e.check({tokenize:dH},t,n)(r):n(r)}}function dH(e,t,n){return ZN(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function fH(e){return NN([OV(),WV(),QV(e),nH(),lH()])}var pH={};function mH(e){let t=this,n=e||pH,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(fH(n)),a.push(_V()),o.push(vV(n))}var hH=1,gH=new Set([`blockquote`,`footnoteDefinition`,`listItem`,`root`]),_H=new Set([`delete`,`emphasis`,`heading`,`link`,`linkReference`,`paragraph`,`strong`,`tableCell`]),vH=new Set([`text`,`txt`]),yH=0,bH=/\s+/gu;function xH(e){return{type:`text`,value:e}}function SH(e,t){return e===t.me?`mine`:`other`}function CH(e,t){let n=SH(e,t);return t.inLink===!0?{dataMention:n}:{dataMention:n,dataName:e}}function wH(e,t){return{children:[xH(`@${e}`)],data:{hName:`span`,hProperties:CH(e,t)},type:`mention`}}function TH(e,t){let n=[],r=yH;for(let i of e.matchAll(uo)){let[a]=i;if(t.mentions.includes(a)){let o=i.index-hH;n.push(xH(e.slice(r,o)),wH(a,t)),r=i.index+a.length}}return n.push(xH(e.slice(r))),n.filter(e=>e.type!==`text`||e.value!==``)}function EH(e,t){let n=xH(e);return gH.has(t)?{children:[n],type:`paragraph`}:n}function DH(e){return typeof e!=`string`||vH.has(e.toLowerCase())}function OH(e){return DH(e.lang)?{...e,data:{hName:`code`,hProperties:{dataWrap:``}}}:e}function kH(e,t){if(!(`children`in e))return e;let{children:n=[]}=e;return{...e,children:n.flatMap(n=>t(n,e.type))}}function AH(e,t){return{...t,inLink:t.inLink===!0||e.type===`link`}}function jH(e,t,n){if(typeof e.value!=`string`){let t=AH(e,n);return[kH(e,(e,n)=>jH(e,n,t))]}return e.type===`html`?[EH(e.value,t)]:e.type===`text`?TH(e.value,n):e.type===`code`?[OH(e)]:[e]}function MH(e){if(e.type===`break`)return` `;if(typeof e.value==`string`)return e.value;let{children:t=[]}=e,n=t.map(e=>MH(e));return _H.has(e.type)?n.join(``):n.join(` `)}function NH(e){return t=>{let[n=t]=jH(t,``,e);return n}}function PH(e){return MH(e).replaceAll(bH,` `).trim()}var FH={a:LR,h1:`strong`,h2:`strong`,h3:`strong`,h4:`strong`,h5:`strong`,h6:`strong`,span:BR};function IH(e){let{me:t,message:n}=e,r=(0,Y.useMemo)(()=>[mH,JR,[NH,{me:t,mentions:n.mentions}]],[t,n.mentions]);return(0,J.jsx)(MR,{components:FH,remarkPlugins:r,children:n.text})}var LH={data:`Data`};function RH(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function zH(e){return RH(e)&&typeof e.command==`string`?{command:e.command,value:e.data??null}:null}function BH(e){let t=zH(e.data??null);return t===null||e.text!==`/${t.command}`?null:t}function VH(e){let{message:t}=e,{data:n=null}=t,r=BH(t);return r===null?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(qm,{children:(0,J.jsx)(IH,{me:e.me,message:t})}),n!==null&&(0,J.jsx)(Km,{label:LH.data,value:n})]}):(0,J.jsx)(Vm,{command:t.text,label:`Call to /${r.command}`,value:r.value})}function HH(e){let{count:t,toggle:n}=e,r=(0,Y.useCallback)(()=>{n(t.reaction)},[t.reaction,n]);return(0,J.jsx)(dC,{count:t.count,mine:t.by.some(t=>t===e.me),names:t.by,onToggle:r,symbol:mo[t.reaction]})}var UH=0;function WH(e){let{reactions:t,toggle:n}=Ej(e),r=t.filter(e=>e.count>UH);return r.length===UH?null:(0,J.jsx)(fC,{children:r.map(t=>(0,J.jsx)(HH,{count:t,me:e.me,toggle:n},t.reaction))})}function GH(e){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(VH,{me:e.me,message:e.message}),(0,J.jsx)(WH,{me:e.me,message:e.message})]})}var KH=`(deactivated)`;function qH(){let e=(0,Y.useContext)(dk);return(0,Y.useSyncExternalStore)(e.subscribe,e.snapshot)}function JH(e,t){return e.find(e=>e.name===t)??null}function YH(e){return e.deactivated===!0?KH:null}function XH(e,t){return e===null?{agent:`owner`in t,displayName:null,note:null}:{agent:e.kind===`agent`,displayName:e.displayName??null,note:YH(e)}}function ZH(e){return JH(qH(),e)}function QH(e){let t=zR();return{...XH(ZH(e.name),e),presence:VA(e.name),profileHref:t(e.name)}}function $H(e){let t=qH();return e.map(e=>({agent:XH(JH(t,e.name),e).agent,name:e.name}))}function eU(e,t,n){return t===null?`${e}, ${n}`:`${e}, ${t.text}, ${n}`}function tU({href:e,news:t,summary:n}){let r=$H(n.repliers),i=`Last reply ${wA(n.latestReplyAt)}`,a=yj(n.replyCount),o=bj(t);return(0,J.jsx)(Zx,{count:a,href:e,label:eU(a,o,i),last:i,news:o,repliers:r})}var nU=`Reply`;function rU(e){let{message:t}=e.row,{agent:n,displayName:r,note:i,presence:a,profileHref:o}=QH(t.author),s=Cj({channel:e.channel,message:t}),c=wj(t),l=jj({closing:e.closing,me:e.me,menu:e.menu,message:t}),u=Nj({me:e.me,message:t,reply:e.reply});return(0,J.jsxs)(Bx,{actionHref:s,actionLabel:nU,agent:n,displayName:r,day:e.row.day,grouped:e.row.grouped,mark:Sj({me:e.me,message:t,open:e.open,parent:e.parent}),menu:l,name:t.author.name,nameHref:o,note:i,presence:a,onAction:u,time:TA({message:t,parent:e.parent,receipts:e.receipts}),unreadLine:e.row.unreadLine,children:[(0,J.jsx)(GH,{me:e.me,message:t}),s!==null&&c!==null&&(0,J.jsx)(tU,{href:s,news:e.news,summary:c})]})}function iU(e){let{closing:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.refusal);return n===null?null:(0,J.jsx)(lu,{children:`Couldn't ${n.action} the thread (${n.code}): ${n.message}`})}function aU(e){let{menu:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.refusal);return n===null?null:(0,J.jsx)(lu,{children:`Couldn't mark the message unread (${n.code}): ${n.message}`})}function oU(){let e=Oj();return e===null?null:(0,J.jsx)(lu,{children:`Couldn't react to the message (${e.code}): ${e.message}`})}function sU(e){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(aU,{menu:e.menu}),(0,J.jsx)(oU,{}),e.closing!==null&&(0,J.jsx)(iU,{closing:e.closing})]})}var cU=3e5,lU=0,uU=1;function dU(e){return e.kind===`top-level`&&e.replyCount>lU}function fU(e,t){return e!==null&&e.author.name===t.author.name&&Il(t.createdAt)-Il(e.createdAt)<cU&&!dU(e)}function pU(e,t){return e!==null&&Fl(e.createdAt)===Fl(t.createdAt)?null:Rl(t.createdAt)}function mU({me:e,messages:t,readPosition:n}){if(n===null)return null;let r=t.find(t=>t.id>n&&t.author.name!==e)??null;return r===null?null:r.id}function hU(e,t,n){let r=pU(t??n.after,e),i=e.id===n.lineAt;return{day:r,grouped:r===null&&!i&&fU(t,e),message:e,unreadLine:i}}function gU(e){let t={...e,lineAt:mU(e)};return e.messages.map((n,r)=>hU(n,e.messages[r-uU]??null,t))}var _U=0,vU=1;function yU(e,t){return t.has(e.message.id)?{...e,grouped:!1}:e}function bU(e){let t=pj(e),n=t.filter(e=>e.kind===`message`),r=new Set(n.filter(e=>e.afterFold).map(e=>e.message.id)),i=gU({...e,after:null,messages:n.map(e=>e.message)}),a=_U;return t.flatMap(e=>{if(e.kind===`fold`)return[{fold:e,kind:`fold`}];let t=i.slice(a,a+vU);return a+=vU,t.map(e=>({kind:`message`,row:yU(e,r)}))})}function xU(e){let{state:t}=e,n=bU({expanded:t.expanded,me:e.me,messages:t.messages,readPosition:e.readPosition});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Vx,{label:e.label,children:n.map(n=>n.kind===`fold`?(0,J.jsx)(hj,{expanded:t.expanded,fold:n.fold,messages:e.messages},`fold-${n.fold.run.join(`-`)}`):(0,J.jsx)(rU,{closing:e.closing,channel:e.channel,me:e.me,menu:e.menu,news:e.threads.get(n.row.message.id)??null,open:e.open,parent:null,receipts:t.receipts,reply:null,row:n.row},n.row.message.id))}),(0,J.jsx)(sU,{closing:e.closing,menu:e.menu})]})}var SU={idle:`Load older messages`,loading:`Loading…`};function CU(e){let{older:t}=e,n=t.status===`loading`;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(Hx,{disabled:n,onClick:e.onLoad,children:[n&&SU.loading,!n&&SU.idle]}),t.status===`failed`&&(0,J.jsx)(lu,{children:`Couldn't load older messages (${t.code}): ${t.message}`})]})}function wU(e){let{read:t}=e;return t.status===`failed`?(0,J.jsx)(lu,{children:`Couldn't mark the channel read (${t.code}): ${t.message}`}):null}function TU(e){return e.alerts.length+e.nudges.length+e.deactivationOffers.length+e.deactivatedQuietAgents.length}var EU=0,DU={inbox:[],items:[]};function OU(e){return e.status===`loaded`?e:DU}function kU({me:e,unread:t}){let n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot);return(0,Y.useMemo)(()=>Ic({items:OU(n).items,me:e}),[n,e])}function AU(e){return e.status===`loaded`?TU(e):EU}function jU({me:e,state:t}){return(0,Y.useMemo)(()=>{let{inbox:n}=OU(t),r=Nc({items:n,me:e});return{channels:Pc({items:n,me:e}),inbox:{...r,forYou:r.forYou+AU(t)}}},[t,e])}var MU={messages:`Messages`,start:`This is the start of the channel.`};function NU(e){let{channel:t,messages:n,state:r}=e,i=n.loadOlder,a=kU({me:e.me,unread:e.unread});return r.status===`loading`?(0,J.jsxs)(pS,{children:[(0,J.jsx)(_w,{width:`short`}),(0,J.jsx)(_w,{width:`long`})]}):r.status===`failed`?(0,J.jsx)(lu,{children:`Couldn't load the messages (${r.code}): ${r.message}`}):(0,J.jsxs)(J.Fragment,{children:[r.hasMore&&(0,J.jsx)(CU,{older:r.older,onLoad:i}),!r.hasMore&&(0,J.jsx)(Um,{description:MU.start,title:`Welcome to #${t}`}),(0,J.jsx)(xU,{closing:e.closing,channel:t,label:MU.messages,me:e.me,menu:e.unread.menu,messages:n,open:e.open,readPosition:e.readPosition,state:r,threads:a}),(0,J.jsx)(wU,{read:r.read})]})}function PU(e){return(0,J.jsx)(oS,{children:(0,J.jsxs)(mS,{children:[(0,J.jsx)(QS,{children:e.title}),(0,J.jsx)(sC,{children:e.description})]})})}function FU(e){let{state:t}=e;return t.status===`failed`?(0,J.jsx)(lu,{children:`Couldn't load your subscriptions (${t.code}): ${t.message}`}):t.status===`loaded`&&t.change.status===`failed`&&t.change.channel===e.channel?(0,J.jsx)(lu,{children:`Couldn't change the subscription (${t.change.code}): ${t.change.message}`}):null}var IU={off:`Subscribe`,on:`Subscribed`};function LU(e){return e?IU.on:IU.off}function RU(e){let{channel:t,subscriptions:n}=e,r=e.state.channels.includes(t),i=(0,Y.useCallback)(()=>{n.setSubscribed(t,!r)},[t,r,n]);return(0,J.jsx)(WC,{disabled:e.state.change.status===`changing`,onClick:i,pressed:r,children:LU(r)})}var zU={missing:`No channel has this name.`,nothing:`Nothing here`},BU=0;function VU(e,t){let{channels:n}=(0,Y.useSyncExternalStore)(e.subscribe,e.snapshot);if(n.status!==`loaded`)return null;for(let e of n.channels)if(e.name===t&&`description`in e)return e.description;return null}function HU(e){return e.status===`loaded`?e.messages.length:BU}function UU(e){let t=e.board.channel(e.channel),n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=VU(e.board,e.channel),{subscriptions:i}=e.board,a=(0,Y.useSyncExternalStore)(i.subscribe,i.snapshot),o=(0,Y.useSyncExternalStore)(e.newLine.subscribe,e.newLine.snapshot);return n.status===`failed`&&n.code===`channel_not_found`?(0,J.jsx)(PU,{description:zU.missing,title:zU.nothing}):(0,J.jsxs)(TC,{children:[(0,J.jsx)(LC,{description:r,title:`#${e.channel}`,children:a.status===`loaded`&&(0,J.jsx)(RU,{channel:e.channel,state:a,subscriptions:i})}),(0,J.jsx)(FU,{channel:e.channel,state:a}),(0,J.jsx)(iw,{count:HU(n),label:`Messages in #${e.channel}`,children:(0,J.jsx)(NU,{closing:e.board.closing,channel:e.channel,me:e.me,messages:t,open:e.open,state:n,readPosition:o,unread:e.unread})}),(0,J.jsx)(tj,{commands:e.board.commands,draft:e.composer.channelDraft(e.channel),messages:t,state:n})]})}var WU=`Nothing here`,GU=`channel_not_found`;function KU(e){let{code:t,message:n}=e.refusal;return t===GU?(0,J.jsx)(pS,{children:(0,J.jsx)(sC,{children:WU})}):(0,J.jsx)(lu,{children:`Couldn't load the conversation (${t}): ${n}`})}function qU(e){let t=gU({after:e.after,me:e.me,messages:e.messages,readPosition:e.readPosition});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Vx,{label:e.label,children:t.map(t=>(0,J.jsx)(rU,{closing:null,channel:e.channel,me:e.me,menu:e.menu,news:e.threads.get(t.message.id)??null,open:e.open,parent:e.after,receipts:e.receipts,reply:e.reply,row:t},t.message.id))}),(0,J.jsx)(sU,{closing:null,menu:e.menu})]})}var JU=`Replies to the post`,YU=new Map;function XU(e){return(0,J.jsx)(qU,{after:e.post,channel:null,label:JU,me:e.me,menu:e.menu,messages:e.replies,open:null,readPosition:null,receipts:e.receipts,reply:null,threads:YU})}var ZU={later:`Later posts`,posts:`Posts`},QU=0,$U=new Map;function eW(e,t){return e===null?t:[e,...t]}function tW(e){return e===null?null:e.id}function nW(e){let{before:t,me:n,menu:r,post:i,receipts:a}=e,o=(0,Y.useMemo)(()=>eW(t,e.posts),[t,e.posts]),s=tW(t),c=(0,Y.useMemo)(()=>o.filter(e=>e.id<=i.id),[o,i]),l=(0,Y.useMemo)(()=>o.filter(e=>e.id>i.id),[o,i]);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(qU,{after:null,channel:null,label:ZU.posts,me:n,menu:r,messages:c,open:null,readPosition:s,receipts:a,reply:e.reply,threads:$U}),e.replies.length>QU&&(0,J.jsx)(XU,{me:n,menu:r,post:i,receipts:e.replyReceipts,replies:e.replies}),l.length>QU&&(0,J.jsx)(qU,{after:i,channel:null,label:ZU.later,me:n,menu:r,messages:l,open:null,readPosition:s,receipts:a,reply:e.reply,threads:$U})]})}function rW(e){let{state:t}=e;return t.status===`loading`?(0,J.jsxs)(pS,{children:[(0,J.jsx)(_w,{width:`short`}),(0,J.jsx)(_w,{width:`long`})]}):t.status===`failed`?(0,J.jsx)(KU,{refusal:t}):(0,J.jsx)(nW,{before:t.message,me:e.me,menu:e.menu,post:e.post,posts:e.posts,receipts:t.receipts,replies:e.replies,reply:e.reply,replyReceipts:e.replyReceipts})}var iW={marked:`Marked as read`,undo:`Undo`};function aW(e){let{reader:t}=e,{marked:n}=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=t.markUnread;return n?(0,J.jsxs)(mC,{children:[(0,J.jsx)(`span`,{children:iW.marked}),(0,J.jsx)(aS,{onClick:r,children:iW.undo})]}):null}var oW={form:`Reply to the thread`,posts:`reply`};function sW(e){let{field:t,messages:n,state:r}=e,i=n.reply,a=(0,Y.useMemo)(()=>({...oW,field:t}),[t]);return r.status===`loaded`?(0,J.jsx)($A,{draft:e.draft,focused:e.focused,onPost:i,post:r.reply,text:a}):null}function cW(e){return e.status===`loaded`}function lW(e,t){let n=[e].filter(e=>cW(e)),r=[...n.map(e=>e.parent),...n.flatMap(e=>e.replies)].map(e=>e.author.name).toReversed();return[...new Set(r)].filter(e=>e!==t)}function uW({channel:e,composer:t,me:n,messages:r,thread:i}){return t.draft(`${e}/${String(i)}`,()=>lW(r.snapshot(),n))}function dW({board:e,channel:t,composer:n,me:r,newest:i,replied:a,selection:o}){let{replyPost:s}=(0,Y.useSyncExternalStore)(o.subscribe,o.snapshot),c=s??i,l=e.thread(t,c.id),u=(0,Y.useSyncExternalStore)(l.subscribeWithoutAcking,l.snapshot),d=(0,Y.useMemo)(()=>({...l,reply:(e,t)=>{l.reply(e,()=>{t(),a()})}}),[a,l]),f=uW({channel:t,composer:n,me:r,messages:d,thread:c.id}),p=(0,Y.useCallback)((i,a)=>{o.chooseReplyPost(a),uW({channel:t,composer:n,me:r,messages:e.thread(t,a.id),thread:a.id}).replyTo(null)},[e,t,n,r,o]);return{draft:f,field:`Reply to @${c.author.name}`,messages:d,onReply:p,post:c,state:u}}var fW={back:`Back to the inbox`,conversation:`Conversation`,messages:`The conversation's messages`},pW={receipts:[],replies:[]};function mW(e){return e.status===`loaded`?e:pW}function hW(e){let{channel:t,first:n,newest:r,posts:i,reader:a}=e,o=e.board.messageBefore({channel:t,id:n.id}),s=(0,Y.useSyncExternalStore)(o.subscribe,o.snapshot),c=dW({board:e.board,channel:t,composer:e.composer,me:e.me,newest:r,replied:a.markRead,selection:e.selection}),l=mW(c.state);return(0,J.jsxs)(PC,{actions:e.actions,backHref:iE({name:`inbox`,selected:null}),backLabel:fW.back,detail:`#${t}`,label:fW.conversation,openHref:iE({channel:t,name:`channel`}),openLabel:`Open in #${t}`,children:[(0,J.jsx)(aW,{reader:a}),(0,J.jsx)(iw,{count:i.length,label:fW.messages,children:(0,J.jsx)(rW,{me:e.me,menu:e.menu,post:c.post,posts:i,replies:l.replies,reply:c.onReply,replyReceipts:l.receipts,state:s})}),(0,J.jsx)(sW,{draft:c.draft,field:c.field,focused:!1,messages:c.messages,state:c.state})]})}var gW={back:`Back to the inbox`,conversation:`Conversation`,nothing:`Nothing here`,open:`Open thread`};function _W(){return(0,J.jsx)(PC,{backHref:iE({name:`inbox`,selected:null}),backLabel:gW.back,detail:``,label:gW.conversation,openHref:null,openLabel:gW.open,children:(0,J.jsx)(pS,{children:(0,J.jsx)(sC,{children:gW.nothing})})})}var vW={markRead:`Mark read`,markUnread:`Mark unread`,readName:`Mark conversation read`},yW=0,bW=`message_not_found`;function xW(e){return[{label:vW.markRead,name:vW.readName,onAction:e.markRead,shortcut:AC.read},{label:vW.markUnread,onAction:e.markUnread,shortcut:AC.unread}]}function SW(e){return e.status===`loaded`?e.replies.length:yW}function CW(e){return e.status===`failed`&&e.code===bW}var wW=0,TW=[];function EW(e){let t=[];for(let{message:n}of e)n.kind===`top-level`&&t.push(n);return t}function DW({channel:e,earlier:t,me:n}){if(t.status===`loading`)return null;if(t.status===`failed`)return TW;let r=zc({channel:e,thread:null}),i=Wc({items:t.items,me:n}).find(e=>e.key===r)??null;return i===null?TW:i.items}function OW(e){if(e.items.length>wW)return EW(e.items);let t=DW(e);return t===null?null:EW(t)}function kW({channel:e,me:t,unread:n}){let r=n.selection({channel:e,thread:null}),{items:i}=(0,Y.useSyncExternalStore)(r.subscribe,r.snapshot),a=(0,Y.useSyncExternalStore)(n.earlier.subscribe,n.earlier.snapshot);return(0,Y.useMemo)(()=>OW({channel:e,earlier:a,items:i,me:t}),[e,a,i,t])}var AW=0;function jW(e){return e.map(e=>e.message.id).at(AW)??null}function MW({board:e,channel:t,me:n,unread:r}){let i=r.selection({channel:t,thread:null});return{ack:e.ack,firstUnread:()=>jW(i.snapshot().items),markUnread:r.markUnread,newest:()=>{let e=OW({channel:t,earlier:r.earlier.snapshot(),items:i.snapshot().items,me:n}),a=null;for(let t of e??[])a={id:t.id,mine:t.author.name===n};return a},subscribe:e=>{let t=[i.subscribe(e),r.earlier.subscribe(e)];return()=>{for(let e of t)e()}},subscribeToUnread:i.subscribe}}function NW({reading:e,...t}){let n=e.reader(t.channel,MW(t));return(0,Y.useSyncExternalStore)(n.subscribe,n.snapshot),n}function PW(e,t){return e===null?t:e.first}function FW(e){let t=null;for(let n of e)t={first:PW(t,n),newest:n};return t}function IW(e){let{channel:t}=e,n=kW({channel:t,me:e.me,unread:e.unread}),r=NW({...e,channel:t});if(n===null)return null;let i=FW(n);return i===null?(0,J.jsx)(_W,{}):(0,J.jsx)(hW,{actions:xW(r),board:e.board,channel:t,composer:e.composer,first:i.first,newest:i.newest,me:e.me,menu:e.unread.menu,posts:n,reader:r,selection:e.unread.selection({channel:t,thread:null})})}var LW=0,RW=-1,zW=new Map,BW={earlier:`Earlier replies`,unread:`Unread replies`},VW=new Intl.PluralRules(`en`),HW={one:`earlier reply`,other:`earlier replies`};function UW(e){return VW.select(e)===`one`?`${String(e)} ${HW.one}`:`${String(e)} ${HW.other}`}function WW(e,t){return t!==null&&e.id<=t}function GW(e,t){return e.at(RW)??t}function KW(e){let{me:t,menu:n,parent:r,readPosition:i,receipts:a,replies:o,selection:s}=e,{expanded:c}=(0,Y.useSyncExternalStore)(s.subscribe,s.snapshot),l=s.expand,u=(0,Y.useMemo)(()=>o.filter(e=>WW(e,i)),[o,i]),d=(0,Y.useMemo)(()=>o.filter(e=>!WW(e,i)),[o,i]);return(0,J.jsxs)(J.Fragment,{children:[u.length>LW&&!c&&(0,J.jsx)(FC,{onClick:l,children:UW(u.length)}),c&&(0,J.jsx)(qU,{after:r,channel:null,label:BW.earlier,me:t,menu:n,messages:u,open:null,readPosition:null,receipts:a,reply:e.reply,threads:zW}),(0,J.jsx)(qU,{after:GW(u,r),channel:null,label:BW.unread,me:t,menu:n,messages:d,open:null,readPosition:null,receipts:a,reply:e.reply,threads:zW})]})}var qW=`Reply`;function JW(e){let{message:t}=e,{agent:n,displayName:r,note:i,presence:a,profileHref:o}=QH(t.author),s=jj({closing:e.closing,me:e.me,menu:e.menu,message:t}),c=Nj({me:e.me,message:t,reply:e.reply});return(0,J.jsx)($x,{actionHref:null,actionLabel:qW,agent:n,displayName:r,day:Rl(t.createdAt),grouped:!1,label:e.label,mark:Sj({me:e.me,message:t,open:null,parent:null}),menu:s,name:t.author.name,nameHref:o,note:i,presence:a,onAction:c,time:TA({message:t,parent:null,receipts:e.receipts}),unreadLine:!1,children:(0,J.jsx)(GH,{me:e.me,message:t})})}var YW={first:`First message`};function XW(e){let{state:t}=e;return t.status===`loading`?(0,J.jsxs)(pS,{children:[(0,J.jsx)(_w,{width:`short`}),(0,J.jsx)(_w,{width:`long`})]}):t.status===`failed`?(0,J.jsx)(lu,{children:`Couldn't load the thread (${t.code}): ${t.message}`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(JW,{closing:e.closing,label:YW.first,me:e.me,menu:e.menu,message:t.parent,receipts:t.receipts,reply:e.reply}),(0,J.jsx)(KW,{me:e.me,menu:e.menu,parent:t.parent,readPosition:e.readPosition,receipts:t.receipts,replies:t.replies,reply:e.reply,selection:e.selection})]})}var ZW=0;function QW(e,t){if(e.status!==`loaded`)return null;let n=e.parent;for(let t of e.replies)n=t;return{id:n.id,mine:n.author.name===t}}function $W(e){return e.map(e=>e.message.id).at(ZW)??null}function eG({me:e,messages:t,selection:n,unread:r}){return{ack:t.ack,firstUnread:()=>$W(n.snapshot().items),markUnread:r.markUnread,newest:()=>QW(t.snapshot(),e),subscribe:t.subscribeWithoutAcking,subscribeToUnread:n.subscribe}}function tG({board:e,me:t,reading:n,selected:r,unread:i}){let{channel:a,thread:o}=r,s=n.reader(`${a}/${String(o)}`,eG({me:t,messages:e.thread(a,o),selection:i.selection(r),unread:i}));return(0,Y.useSyncExternalStore)(s.subscribe,s.snapshot),s}var nG={back:`Back to the inbox`,conversation:`Conversation`,messages:`The conversation's messages`,open:`Open thread`,reply:`Reply`};function rG(e){let{channel:t,thread:n}=e.selected,r=e.unread.newLine(t,n),i=(0,Y.useSyncExternalStore)(r.subscribe,r.snapshot),a=e.board.thread(t,n),o=(0,Y.useSyncExternalStore)(a.subscribeWithoutAcking,a.snapshot),s=tG(e),c=uW({channel:t,composer:e.composer,me:e.me,messages:a,thread:n});return CW(o)?(0,J.jsx)(_W,{}):(0,J.jsxs)(PC,{actions:xW(s),backHref:iE({name:`inbox`,selected:null}),backLabel:nG.back,detail:`#${t}`,label:nG.conversation,openHref:iE({channel:t,name:`thread`,thread:n}),openLabel:nG.open,children:[(0,J.jsx)(aW,{reader:s}),(0,J.jsx)(iw,{count:SW(o),label:nG.messages,children:(0,J.jsx)(XW,{closing:e.board.closing,me:e.me,menu:e.unread.menu,readPosition:i,reply:c.replyTo,selection:e.unread.selection(e.selected),state:o})}),(0,J.jsx)(sW,{draft:c,field:nG.reply,focused:!1,messages:a,state:o})]})}var iG={conversation:`Conversation`,pick:`Pick a conversation`};function aG(e){let{selected:t}=e;return t===null?(0,J.jsx)(OC,{label:iG.conversation,children:iG.pick}):t.thread===null?(0,J.jsx)(IW,{board:e.board,channel:t.channel,composer:e.composer,me:e.me,reading:e.reading,unread:e.unread},t.channel):(0,J.jsx)(rG,{board:e.board,composer:e.composer,me:e.me,reading:e.reading,selected:t,unread:e.unread},`${t.channel}/${String(t.thread)}`)}var oG=[];function sG(e){return e.handler===!0?[e.name]:oG}function cG(e){return sG(e).map(t=>`/${t} will stop replying until @${e.name} is reactivated.`).join(` `)}function lG(e){return sG(e).map(e=>`/${e} is removed with it and stops replying.`).join(` `)}var uG={maximum:500,minimum:1},dG={body:``,confirm:``,destructive:!1,title:``},fG={deactivate:`deactivate`,delete:`delete`,reactivate:`reactivate`,revoke:`revoke the session`,rotate:`rotate the token`,transfer:`transfer`};function pG(){return``}var mG={deactivate:cG,delete:lG,reactivate:pG,revoke:pG,rotate:pG,transfer:pG},hG={deactivate:e=>({body:`Its tokens and sessions stop working at once and it can't post; its messages stay. You can reactivate it later.`,confirm:`Deactivate @${e}`,destructive:!1,title:`Deactivate @${e}?`}),delete:e=>({body:`It has no messages. Its tokens stop working and its name is free again. This can't be undone.`,confirm:`Delete @${e}`,destructive:!0,title:`Delete @${e}?`}),reactivate:e=>({body:`It can post again with a new identity token, shown once here. Its old tokens stay revoked.`,confirm:`Reactivate @${e}`,destructive:!1,title:`Reactivate @${e}?`}),revoke:e=>({body:`Its live agent session ends at once and can't be used again; it must join again to post.`,confirm:`Revoke session`,destructive:!0,title:`Revoke @${e}'s session?`}),rotate:e=>({body:`Its identity token stops working at once and can't be brought back. The new one is shown once here.`,confirm:`Rotate token`,destructive:!0,title:`Rotate @${e}'s token?`}),transfer:(e,t)=>({body:`@${t} owns it from now on and can rotate, revoke or deactivate it. An admin can transfer it again.`,confirm:`Transfer to @${t}`,destructive:!1,title:`Transfer @${e} to @${t}?`})};function gG({identity:e,state:t}){let n=t.confirming;if(n===null)return dG;let r=hG[n](e.name,t.transferTo.trim()),i=[r.body,mG[n](e)].filter(e=>e!==``).join(` `);return{...r,body:i}}function _G(e){let{action:t}=e;return t.status===`failed`?`Couldn't ${fG[t.action]} (${t.code}): ${t.message}`:null}function vG(e){let{actions:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=gG({identity:e.identity,state:n}),i=t.confirm,a=t.cancel;return(0,J.jsx)(Rm,{body:r.body,confirm:r.confirm,destructive:r.destructive,error:_G(n),onCancel:a,onConfirm:i,open:n.confirming!==null,pending:n.action.status===`sending`,title:r.title})}function yG(e){return e?`for-you`:`read`}function bG(e){let{offer:t}=e,{agent:n,displayName:r,note:i,presence:a,profileHref:o}=QH(t.identity),s=wA(t.raisedAt);return(0,J.jsx)(MS,{agent:n,displayName:r,href:o,level:yG(e.open),name:t.identity.name,note:i,presence:a,time:s,why:t.text,children:e.children})}var xG={deactivate:`Deactivate`,keep:`Keep`};function SG(e){let{offer:t,offers:n}=e,r=e.identities.actions(t.identity.name),i=r.ask.deactivate,a=(0,Y.useCallback)(()=>{n.keep(t.id)},[n,t]);return(0,J.jsxs)(bG,{offer:t,open:!0,children:[(0,J.jsxs)(zm,{children:[(0,J.jsx)(Xw,{onClick:i,children:xG.deactivate}),(0,J.jsx)(Xw,{onClick:a,children:xG.keep})]}),(0,J.jsx)(vG,{actions:r,identity:t.identity})]})}function CG(e){return e?`read`:`for-you`}function wG(e){let{entry:t}=e,{agent:n,displayName:r,note:i,presence:a,profileHref:o}=QH(t.identity),s=wA(t.deactivatedAt);return(0,J.jsx)(MS,{agent:n,displayName:r,href:o,level:CG(t.read),name:t.identity.name,note:i,presence:a,time:s,why:t.text,children:e.children})}var TG={copy:`Copy token`,done:`Done`,label:`New Identity token`,warning:`Copy it now: it isn't shown again, and the old token stops working.`};function EG(e){let{actions:t}=e,{token:n}=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=t.forgetToken,i=t.copyToken;return n===null?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Bm,{label:TG.label,token:n}),(0,J.jsx)(sC,{children:TG.warning}),(0,J.jsxs)(zm,{children:[(0,J.jsx)(aS,{onClick:i,children:TG.copy}),(0,J.jsx)(aS,{onClick:r,children:TG.done})]})]})}var DG={markRead:`Mark read`,reactivate:`Reactivate`};function OG(e){let{entries:t,entry:n}=e,r=e.identities.actions(n.identity.name),i=r.ask.reactivate,a=(0,Y.useCallback)(()=>{t.markRead(n.id)},[t,n]);return(0,J.jsxs)(wG,{entry:n,children:[(0,J.jsxs)(zm,{children:[(0,J.jsx)(Xw,{onClick:i,children:DG.reactivate}),(0,J.jsx)(Xw,{onClick:a,children:DG.markRead})]}),(0,J.jsx)(EG,{actions:r}),(0,J.jsx)(vG,{actions:r,identity:n.identity})]})}var kG=vR().use(wI).use(mH);function AG(e){return PH(kG.parse(e))}function jG(e){let[t=``]=e.trim().split(`
74
+ `);return AG(t)}var MG=`started a thread in`;function NG(e){return e?`for-you`:`read`}function PG(e){let{nudge:t}=e,{parent:n}=t,{agent:r,displayName:i,note:a,presence:o,profileHref:s}=QH(n.author),c=wA(t.raisedAt);return(0,J.jsxs)(BS,{action:MG,agent:r,author:n.author.name,authorHref:s,channel:t.channel.name,context:null,current:!1,count:null,displayName:i,href:iE({channel:t.channel.name,name:`thread`,thread:n.id}),level:NG(e.unread),note:a,presence:o,time:c,why:t.text,children:[(0,J.jsx)(HS,{unread:e.unread,children:jG(n.text)}),e.children]})}var FG={close:`Close`,markRead:`Mark read`};function IG(e){let{nudge:t,nudges:n}=e,r=(0,Y.useCallback)(()=>{n.close(t)},[n,t]),i=(0,Y.useCallback)(()=>{n.markRead(t.id)},[n,t]);return(0,J.jsx)(PG,{nudge:t,unread:!0,children:(0,J.jsxs)(zm,{children:[(0,J.jsx)(Xw,{onClick:r,children:FG.close}),(0,J.jsx)(Xw,{onClick:i,children:FG.markRead})]})})}function LG(e){let{actions:t}=e;return(0,J.jsxs)(J.Fragment,{children:[e.deactivated.map(e=>(0,J.jsx)(OG,{entries:t.deactivatedQuietAgents,entry:e,identities:t.identities},`deactivated ${String(e.id)}`)),e.offers.map(e=>(0,J.jsx)(SG,{identities:t.identities,offer:e,offers:t.deactivationOffers},`offer ${String(e.id)}`)),e.nudges.map(e=>(0,J.jsx)(IG,{nudge:e,nudges:t.nudges},`nudge ${String(e.id)}`))]})}var RG={markRead:`Mark read`};function zG(e){let{id:t,onMarkRead:n}=e,r=(0,Y.useCallback)(()=>{n(t)},[t,n]);return(0,J.jsx)(Hx,{onClick:r,children:RG.markRead})}function BG(e,t){return`backOnlineAt`in e?`Back online ${t}`:`Still offline`}function VG(e){let{alert:t}=e,n=wA(t.raisedAt),r=wA(t.backOnlineAt??t.raisedAt);return(0,J.jsxs)(rC,{children:[(0,J.jsx)(`span`,{className:`text-sm`,children:`@${t.agent} went offline: ${t.offlineReason}`}),(0,J.jsx)(sC,{children:`${n} · ${BG(t,r)}`}),e.children]})}function HG(e){return(0,J.jsx)(VG,{alert:e.alert,children:(0,J.jsx)(zG,{id:e.alert.id,onMarkRead:e.onMarkRead})})}var UG=0,WG=`Agents offline`;function GG(e){let{alerts:t,onMarkRead:n}=e;return t.length>UG&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(SS,{count:t.length,title:WG}),(0,J.jsx)(CS,{label:WG,children:t.map(e=>(0,J.jsx)(HG,{alert:e,onMarkRead:n},e.id))})]})}var KG=1,qG=0;function JG(e,t){let n=[],r=qG;for(let i of e.matchAll(uo)){let[a]=i,o=i.index-KG;t.mentions.some(e=>e===a)&&(n.push({at:r,mention:null,text:e.slice(r,o)},{at:o,mention:a,text:`@${a}`}),r=i.index+a.length)}return n.push({at:r,mention:null,text:e.slice(r)}),n}function YG(e){return JG(AG(e.message.text),e.message).map(t=>t.mention===null?t.text:(0,J.jsx)(oC,{mine:t.mention===e.me,children:t.text},t.at))}var XG={reply:`replied in a thread in`,"top-level":`posted in`},ZG=70,QG=0,$G=1;function eK(e){let t=e.latest.channel.name;return e.thread===null?e.key===zc({channel:t,thread:null})?iE({name:`inbox`,selected:{channel:t,thread:null}}):iE({channel:t,name:`channel`}):iE({name:`inbox`,selected:{channel:t,thread:e.thread}})}function tK(e){if(e.message.kind!==`reply`)return null;let t=AG(e.parent.text);return t.length<=ZG?t:`${t.slice(QG,69)}…`}var nK={"followed-thread":`New reply in a thread you follow`,"mentioned-you":`Mentioned you`,"replied-to-you":`Replied to you`};function rK({newReactions:e=[]}){return e.map(e=>`@${e.identity} reacted with ${mo[e.reaction]}`).join(`, `)}function iK(e,t){return e===`reacted`?rK(t):e===`subscribed-channel`?`New in #${t.channel.name}`:nK[e]}function aK(e,t){return t?e.forYou?`for-you`:`activity`:`read`}function oK(e,t){return!t||e.count===$G?null:`${String(e.count)} new`}function sK(e){let{row:t}=e,n=t.latest,{message:r}=n,{agent:i,displayName:a,note:o,presence:s,profileHref:c}=QH(r.author),l=wA(r.createdAt);return(0,J.jsx)(BS,{action:XG[r.kind],agent:i,displayName:a,author:r.author.name,authorHref:c,channel:n.channel.name,context:tK(n),count:oK(t,e.unread),current:e.current,href:eK(t),level:aK(t,e.unread),note:o,presence:s,time:l,why:iK(t.why,n),children:(0,J.jsx)(HS,{unread:e.unread,children:(0,J.jsx)(YG,{me:e.me,message:r})})})}function cK(e){return e.status===`loaded`?e.inbox:[]}function lK({row:e,selected:t}){return t!==null&&e.key===zc(t)&&e.latest.channel.name===t.channel}function uK({kept:e,me:t,rows:n,selected:r}){return n.some(e=>lK({row:e,selected:r}))?null:Wc({items:e,me:t}).find(e=>lK({row:e,selected:r}))??null}function dK(e,t){return t===null?{held:t,rows:e}:{held:t,rows:[...e,t].toSorted((e,t)=>t.latest.message.id-e.latest.message.id)}}function fK({me:e,selected:t,state:n,unread:r}){let i=r.selection(t),{items:a}=(0,Y.useSyncExternalStore)(i.subscribe,i.snapshot);return(0,Y.useMemo)(()=>{let r=Wc({items:cK(n),me:e});return dK(r,uK({kept:a,me:e,rows:r,selected:t}))},[a,e,t,n])}function pK(e){return e.held===null?null:e.held.key}var mK=0;function hK(e){let{me:t,selected:n}=e,{held:r}=e.rows,i=e.rows.rows.filter(t=>t.forYou===e.forYou),a=i.length+e.besides;return a>mK&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(SS,{count:a,title:e.title}),(0,J.jsxs)(CS,{label:e.title,children:[e.children,i.map(e=>(0,J.jsx)(sK,{me:t,row:e,current:lK({row:e,selected:n}),unread:e!==r},e.key))]})]})}var gK=0,_K={activity:`Activity`,empty:`You're all caught up.`,forYou:`For you`};function vK(e){let{me:t,rows:n,selected:r,unread:i}=e;return i.status===`loading`?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(_w,{width:`short`}),(0,J.jsx)(_w,{width:`long`})]}):i.status===`failed`?(0,J.jsx)(lu,{children:`Couldn't load the inbox (${i.code}): ${i.message}`}):(0,J.jsxs)(J.Fragment,{children:[i.inbox.length+TU(i)===gK&&(0,J.jsx)(TS,{place:`empty`,children:_K.empty}),(0,J.jsx)(GG,{alerts:i.alerts,onMarkRead:e.onMarkAlertRead}),(0,J.jsx)(hK,{besides:i.nudges.length+i.deactivationOffers.length+i.deactivatedQuietAgents.length,forYou:!0,me:t,rows:n,selected:r,title:_K.forYou,children:(0,J.jsx)(LG,{actions:e.notices,deactivated:i.deactivatedQuietAgents,nudges:i.nudges,offers:i.deactivationOffers})}),(0,J.jsx)(hK,{besides:gK,forYou:!1,me:t,rows:n,selected:r,title:_K.activity})]})}var yK=0,bK=`Nothing read yet.`;function xK(e){let{hidden:t,items:n,me:r,selected:i}=e,a=(0,Y.useMemo)(()=>Wc({items:n,me:r}),[n,r]),o=a.filter(e=>e.key!==t);return a.length===yK?!e.hasMore&&(0,J.jsx)(TS,{place:`empty`,children:bK}):(0,J.jsx)(CS,{label:e.label,children:o.map(e=>(0,J.jsx)(sK,{me:r,row:e,current:lK({row:e,selected:i}),unread:!1},e.key))})}var SK=0,CK={end:`That's everything.`,loading:`Loading…`,more:`Show earlier`};function wK(e){return e?CK.loading:CK.more}function TK(e){let{hasMore:t,items:n,more:r}=e.state,i=r.status===`loading`,a=e.earlier.loadMore;return t?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Kx,{loading:i,onClick:a,children:wK(i)}),r.status===`failed`&&(0,J.jsx)(lu,{children:`Couldn't load more (${r.code}): ${r.message}`})]}):n.length>SK&&(0,J.jsx)(TS,{place:`end`,children:CK.end})}var EK=0,DK=`Earlier offline alerts`;function OK(e){return e.status===`loaded`?e.alerts.filter(({read:e})=>e):[]}function kK(e){let t=OK((0,Y.useSyncExternalStore)(e.alerts.subscribe,e.alerts.snapshot));return t.length>EK&&(0,J.jsx)(CS,{label:DK,children:t.map(e=>(0,J.jsx)(VG,{alert:e},e.id))})}var AK=0,jK=`Earlier deactivated agents`;function MK(e){return e.status===`loaded`?e.deactivatedQuietAgents.filter(({read:e})=>e):[]}function NK(e){let{identities:t}=e,n=MK((0,Y.useSyncExternalStore)(e.entries.subscribe,e.entries.snapshot));return n.length>AK&&(0,J.jsx)(CS,{label:jK,children:n.map(e=>(0,J.jsx)(wG,{entry:e,children:(0,J.jsx)(EG,{actions:t.actions(e.identity.name)})},e.id))})}var PK=0,FK=`Earlier nudges`;function IK(e){return e.status===`loaded`?e.nudges.filter(({read:e})=>e):[]}function LK(e){let t=IK((0,Y.useSyncExternalStore)(e.nudges.subscribe,e.nudges.snapshot));return t.length>PK&&(0,J.jsx)(CS,{label:FK,children:t.map(e=>(0,J.jsx)(PG,{nudge:e,unread:!1},e.id))})}var RK=0,zK=`Earlier deactivation offers`;function BK(e){return e.status===`loaded`?e.deactivationOffers.filter(({cleared:e})=>e):[]}function VK(e){let t=BK((0,Y.useSyncExternalStore)(e.offers.subscribe,e.offers.snapshot));return t.length>RK&&(0,J.jsx)(CS,{label:zK,children:t.map(e=>(0,J.jsx)(bG,{offer:e,open:!1},e.id))})}function HK(e){let{unread:t}=e;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(NK,{entries:t.deactivatedQuietAgents,identities:e.identities}),(0,J.jsx)(VK,{offers:t.deactivationOffers}),(0,J.jsx)(LK,{nudges:t.nudges}),(0,J.jsx)(kK,{alerts:t.alerts})]})}var UK=`Earlier`;function WK(e){let{unread:t}=e,{earlier:n}=t,r=(0,Y.useSyncExternalStore)(n.subscribe,n.snapshot);return r.status===`loading`?(0,J.jsx)(_w,{width:`long`}):r.status===`failed`?(0,J.jsx)(lu,{children:`Couldn't load what you've read (${r.code}): ${r.message}`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(SS,{count:null,title:UK}),(0,J.jsx)(HK,{identities:e.identities,unread:t}),(0,J.jsx)(xK,{hasMore:r.hasMore,hidden:pK(e.rows),items:r.items,label:UK,me:e.me,selected:e.selected}),(0,J.jsx)(TK,{earlier:n,state:r})]})}var GK={dismiss:`Dismiss`};function KK(e){let{board:t}=e,{notice:n}=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=t.dismissNotice;return n===null?null:(0,J.jsxs)(mC,{children:[(0,J.jsx)(`span`,{children:`#${n} was deleted, so you're back in your inbox.`}),(0,J.jsx)(aS,{onClick:r,children:GK.dismiss})]})}var qK=0,JK={markAll:`Mark all as read`};function YK(e){let{state:t}=e,n=e.unread.markAllRead;return(0,J.jsx)(aS,{disabled:t.inbox.length+TU(t)===qK||t.markAll.status===`marking`,onClick:n,children:JK.markAll})}var XK=`Mentions, threads you follow, and channels you subscribe to`;function ZK(e){let{state:t}=e;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(LC,{description:XK,sans:!0,title:e.title,children:t.status===`loaded`&&(0,J.jsx)(YK,{state:t,unread:e.unread})}),(0,J.jsx)(KK,{board:e.board})]})}function QK(e){let{markAll:t}=e;return t.status===`failed`?(0,J.jsx)(lu,{children:`Couldn't mark all as read (${t.code}): ${t.message}`}):null}var $K=`Inbox`;function eq(e){let{me:t,rows:n,selected:r,state:i}=e,a=e.unread.alerts.markRead;return(0,J.jsxs)(DC,{hiddenWhenNarrow:r!==null,children:[(0,J.jsx)(ZK,{board:e.board,state:i,title:$K,unread:e.unread}),(0,J.jsxs)(bS,{label:$K,children:[i.status===`loaded`&&(0,J.jsx)(QK,{markAll:i.markAll}),(0,J.jsx)(vK,{me:t,notices:e.notices,onMarkAlertRead:a,rows:n,selected:r,unread:i}),i.status===`loaded`&&(0,J.jsx)(WK,{identities:e.notices.identities,me:t,rows:n,selected:r,unread:e.unread})]})]})}var tq=AC,nq=new Map([[`ArrowDown`,`next`],[`ArrowUp`,`previous`],[`Enter`,`reply`],[`Escape`,`back`],[tq.open,`open`],[tq.read,`read`],[tq.unread,`unread`],[`j`,`next`],[`k`,`previous`],[`r`,`reply`]]),rq=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function iq(e){return e instanceof HTMLElement&&(e.isContentEditable||rq.has(e.tagName))}function aq(e){return e.defaultPrevented||e.ctrlKey||e.altKey||e.metaKey}function oq(e){let t=nq.get(e.key)??null;return aq(e)||t!==`back`&&iq(e.target)?null:t}var sq=`(min-width: 48rem)`;function cq(){return typeof globalThis.matchMedia==`function`&&!globalThis.matchMedia(sq).matches}var lq=`a[data-feed-row]`,uq=`#/inbox/`,dq=`a, button`,fq=`textarea`,pq=0,mq={next:1,previous:-1},hq=-1;function gq(){let e=[];for(let t of globalThis.document.querySelectorAll(lq)){let n=t.hash;n.startsWith(uq)&&!e.includes(n)&&e.push(n)}return e}function _q(e){return globalThis.document.querySelector(`${lq}[href="${e}"]`)}function vq(e,t){return e===`previous`?null:t[pq]??null}function yq(e){let t=gq(),n=t.indexOf(globalThis.location.hash);return n===hq?vq(e,t):t[n+mq[e]]??null}function bq(e){return({event:t})=>{let n=yq(e);if(n===null)return;t.preventDefault();let r=_q(n);r!==null&&r.focus(),globalThis.location.hash=n}}function xq(e,t){return globalThis.document.querySelector(`aside[aria-label="${e}"] ${t}`)}function Sq({conversation:e,event:t}){let{target:n}=t;if(n instanceof HTMLElement&&n.matches(dq)&&!n.matches(lq))return;let r=xq(e,fq);r!==null&&(t.preventDefault(),r.focus())}function Cq(){let e=_q(globalThis.location.hash);e!==null&&e.focus()}function wq({event:e,selected:t}){let{target:n}=e;iq(n)&&n instanceof HTMLElement?(e.preventDefault(),n.blur(),Cq()):t&&cq()&&(e.preventDefault(),globalThis.location.hash=iE({name:`inbox`,selected:null}))}function Tq(e){return({conversation:t,event:n})=>{let r=xq(t,`[aria-keyshortcuts="${tq[e]}"]`);r!==null&&(n.preventDefault(),r.click())}}var Eq={back:wq,next:bq(`next`),open:Tq(`open`),previous:bq(`previous`),read:Tq(`read`),reply:Sq,unread:Tq(`unread`)};function Dq(e){let{conversation:t,selected:n}=e;(0,Y.useEffect)(()=>{function e(e){let r=oq(e);r!==null&&Eq[r]({conversation:t,event:e,selected:n})}return globalThis.document.addEventListener(`keydown`,e),()=>{globalThis.document.removeEventListener(`keydown`,e)}},[t,n])}var Oq=`Conversation`;function kq(e){let{board:t,composer:n,me:r,selected:i,unread:a}=e,o=(0,Y.useSyncExternalStore)(a.subscribe,a.snapshot),s=fK({me:r,selected:i,state:o,unread:a}),{deactivatedQuietAgents:c,deactivationOffers:l,nudges:u}=a,{identities:d}=n,f=(0,Y.useMemo)(()=>({deactivatedQuietAgents:c,deactivationOffers:l,identities:d,nudges:u}),[c,l,u,d]);return Dq({conversation:Oq,selected:i!==null}),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(eq,{board:t,me:r,notices:f,rows:s,selected:i,state:o,unread:a}),o.status!==`loading`&&(0,J.jsx)(aG,{board:t,composer:n,me:r,reading:e.reading,selected:i,unread:a})]})}var Aq={approve:`Approve`,approved:`Approved. Your terminal finishes logging in now; you can close this page.`,code:`Code`};function jq(e){let{loginRequest:t,onApprove:n}=e;return(0,J.jsxs)(pS,{children:[(0,J.jsx)(`p`,{"aria-label":Aq.code,className:`font-mono text-2xl font-semibold tracking-widest`,children:t.userCode}),(0,J.jsx)(sC,{children:`Requested by ${t.host}, until ${t.expiresAt}.`}),e.status===`approved`&&(0,J.jsx)(sC,{children:Aq.approved}),e.status!==`approved`&&(0,J.jsx)(aS,{disabled:e.status===`approving`,onClick:n,children:Aq.approve})]})}function Mq(e){let{approval:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot);if(n.status===`loading`)return(0,J.jsx)(pS,{children:(0,J.jsx)(_w,{width:`long`})});if(n.status===`refused`)return(0,J.jsx)(pS,{children:(0,J.jsx)(lu,{children:`Couldn't show this login (${n.refusal.code}): ${n.refusal.message}`})});let r=t.approve;return(0,J.jsx)(jq,{loginRequest:n.loginRequest,onApprove:r,status:n.status})}var Nq={description:`Approve only if this code matches the one your terminal shows. That machine then acts as you.`,title:`Approve a login`};function Pq(e){return(0,J.jsxs)(oS,{children:[(0,J.jsxs)(mS,{children:[(0,J.jsx)(QS,{children:Nq.title}),(0,J.jsx)(sC,{children:Nq.description})]}),(0,J.jsx)(Mq,{approval:e.approval})]})}var Fq={dismiss:`Dismiss`};function Iq(e){let{deletion:t}=e.identities,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=t.dismiss;return n===null?null:(0,J.jsxs)(mC,{children:[(0,J.jsx)(`span`,{children:`@${n} was deleted, so its profile closed.`}),(0,J.jsx)(aS,{onClick:r,children:Fq.dismiss})]})}var Lq={inbox:`See the inbox`,next:`Next`};function Rq(e){return(0,J.jsx)(iC,{label:Lq.next,children:(0,J.jsxs)(aC,{href:iE({name:`inbox`,selected:null}),children:[(0,J.jsx)(sC,{children:`Logged in as @${e.name}.`}),(0,J.jsx)(`span`,{className:`text-sm`,children:Lq.inbox})]})})}var zq={button:`Log in`,field:`Token`,form:`Log in`};function Bq(e){let{session:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot);if(n.status===`checking`)return(0,J.jsx)(pS,{children:(0,J.jsx)(_w,{width:`long`})});if(n.status===`logged-in`)return(0,J.jsx)(Rq,{name:n.identity.name});let r=t.logIn;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(US,{field:`token`,label:zq.form,onSubmit:r,children:[(0,J.jsx)(Mw,{label:zq.field,name:`token`}),(0,J.jsx)(Sw,{disabled:n.status===`logging-in`,children:zq.button})]}),n.status===`logged-out`&&n.refusal!==null&&(0,J.jsx)(lu,{children:`Couldn't log in (${n.refusal.code}): ${n.refusal.message}`})]})}var Vq={description:`Paste your human identity's token. Agents can't log in here.`,title:`Log in`};function Hq(e){return(0,J.jsxs)(oS,{children:[(0,J.jsxs)(mS,{children:[(0,J.jsx)(QS,{children:Vq.title}),(0,J.jsx)(sC,{children:Vq.description})]}),(0,J.jsx)(Bq,{session:e.session})]})}var Uq={loading:`Loading…`,more:`Load more`};function Wq(e){return e?Uq.loading:Uq.more}function Gq(e){let{cursor:t,more:n}=e.state,r=n.status===`loading`,i=e.openThreads.loadMore;return(0,J.jsxs)(J.Fragment,{children:[t!==null&&(0,J.jsx)(Kx,{loading:r,onClick:i,children:Wq(r)}),n.status===`failed`&&(0,J.jsx)(lu,{children:`Couldn't load more (${n.code}): ${n.message}`})]})}var Kq={action:`started a thread in`,close:`Close`};function qq(e){let{closing:t}=e,{lastActivityAt:n,message:r}=e.thread,{agent:i,displayName:a,note:o,presence:s,profileHref:c}=QH(r.author),l=(0,Y.useSyncExternalStore)(CA,()=>Bl(n)),{id:u}=r,d=(0,Y.useCallback)(()=>{t.close(u)},[t,u]);return(0,J.jsxs)(BS,{action:Kq.action,agent:i,author:r.author.name,authorHref:c,channel:r.channel,context:null,current:!1,count:null,displayName:a,href:iE({channel:r.channel,name:`thread`,thread:u}),level:`activity`,note:o,presence:s,time:``,why:`quiet for ${l}`,children:[(0,J.jsx)(HS,{unread:!0,children:jG(r.text)}),(0,J.jsx)(Xw,{onClick:d,children:Kq.close})]})}var Jq=0,Yq={empty:`No open threads.`,list:`Open threads`};function Xq(e){let{openThreads:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot);return n.status===`loading`?(0,J.jsx)(_w,{width:`long`}):n.status===`failed`?(0,J.jsx)(lu,{children:`Couldn't load the open threads (${n.code}): ${n.message}`}):(0,J.jsxs)(J.Fragment,{children:[n.threads.length===Jq&&(0,J.jsx)(TS,{place:`empty`,children:Yq.empty}),(0,J.jsx)(CS,{label:Yq.list,children:n.threads.map(t=>(0,J.jsx)(qq,{closing:e.closing,thread:t},t.message.id))}),(0,J.jsx)(Gq,{openThreads:t,state:n})]})}var Zq={all:`All`,description:`Threads nobody has closed, the quietest first`,mine:`Involving me`,title:`Open threads`};function Qq(e){let{all:t,board:n}=e;return(0,J.jsxs)(TC,{children:[(0,J.jsx)(LC,{description:Zq.description,sans:!0,title:Zq.title}),(0,J.jsxs)(lT,{children:[(0,J.jsx)(Yw,{current:!t,href:iE({all:!1,name:`open-threads`}),children:Zq.mine}),(0,J.jsx)(Yw,{current:t,href:iE({all:!0,name:`open-threads`}),children:Zq.all})]}),(0,J.jsxs)(bS,{label:Zq.title,children:[(0,J.jsx)(iU,{closing:n.closing}),(0,J.jsx)(Xq,{closing:n.closing,openThreads:n.openThreads(t)},String(t))]})]})}function $q(e){let{kind:t,layout:n}=e,r=(0,Y.useCallback)(()=>{n.showKind(t)},[t,n]);return(0,J.jsx)(Kw,{onClick:r,pressed:e.pressed,children:`${e.label} ${String(e.count)}`})}var eJ={admin:`admin`,agent:`agent`,handlerFor:`Handler for /`};function tJ(e){let{identity:t}=e;return(0,J.jsxs)(J.Fragment,{children:[t.kind===`agent`&&(0,J.jsx)(Cw,{label:eJ.agent}),t.admin&&(0,J.jsx)(Cw,{label:eJ.admin}),sG(t).map(e=>(0,J.jsx)(Cw,{label:`${eJ.handlerFor}${e}`},e))]})}function nJ(e){return e.kind===`human`?`Human`:`owner`in e?`Agent · owned by ${e.owner}`:`Agent`}var rJ={you:`(you)`};function iJ(e,t){return e.name===t?rJ.you:YH(e)}function aJ(e){let{identity:t}=e,n=zR();return(0,J.jsx)(aT,{active:t.name===e.open,agent:t.kind===`agent`,detail:nJ(t),displayName:t.displayName??null,href:n(t.name),name:t.name,note:iJ(t,e.me),presence:zA(t.name),children:(0,J.jsx)(tJ,{identity:t})})}var oJ=0,sJ={area:`People & agents`,list:`Identities`,none:`Nobody matches.`};function cJ(e){let{me:t,open:n}=e;return e.listed.length===oJ?(0,J.jsxs)(pS,{children:[(0,J.jsx)(_w,{width:`short`}),(0,J.jsx)(_w,{width:`long`})]}):(0,J.jsxs)(oT,{label:sJ.area,children:[e.shown.length===oJ&&(0,J.jsx)(pS,{children:(0,J.jsx)(sC,{children:sJ.none})}),(0,J.jsx)(wC,{label:sJ.list,children:e.shown.map(e=>(0,J.jsx)(aJ,{identity:e,me:t,open:n},e.name))})]})}var lJ={deactivated:`Show deactivated`,filter:`Filter by name`,title:`People & agents`},uJ=[{kind:`all`,label:`All`},{kind:`human`,label:`Humans`},{kind:`agent`,label:`Agents`}];function dJ(e,t){return e.filter(e=>t===`all`||e.kind===t)}function fJ(e,t){return e.filter(e=>t||e.deactivated!==!0)}function pJ(e,t){let n=t.trim().toLowerCase();return e.filter(e=>[e.name,e.displayName??``].some(e=>e.toLowerCase().includes(n)))}function mJ(e){let{layout:t}=e,n=(0,Y.useSyncExternalStore)(e.identities.subscribe,e.identities.snapshot),r=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),i=fJ(n,r.showDeactivated),a=pJ(i,r.identityFilter),o=dJ(a,r.identityKind),s=t.filterIdentities,c=t.toggleDeactivated;return(0,J.jsxs)(TC,{children:[(0,J.jsx)(LC,{description:`${String(i.length)} identities`,sans:!0,title:lJ.title}),(0,J.jsxs)(lT,{children:[(0,J.jsx)(eT,{label:lJ.filter,onEdit:s,value:r.identityFilter}),uJ.map(e=>(0,J.jsx)($q,{count:dJ(a,e.kind).length,kind:e.kind,label:e.label,layout:t,pressed:r.identityKind===e.kind},e.kind)),(0,J.jsx)(Kw,{onClick:c,pressed:r.showDeactivated,children:lJ.deactivated})]}),(0,J.jsx)(cJ,{listed:n,me:e.me,open:e.open,shown:o})]})}function hJ(e){return(0,J.jsx)(RR,{value:e.route,children:e.children})}var gJ={make:`Make admin`,remove:`Remove admin`};function _J(e){return e?gJ.remove:gJ.make}function vJ(e,t){return e.some(e=>e.name===t.me&&e.admin)&&t.identity.kind===`human`}function yJ(e,t){return e.status===`failed`&&e.name===t?`Couldn't change admin (${e.code}): ${e.message}`:null}function bJ(e){let{identities:t,identity:n}=e,r=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),i=(0,Y.useSyncExternalStore)(t.subscribe,t.adminChange),a=(0,Y.useCallback)(()=>{t.setAdmin(n.name,!n.admin)},[t,n]);if(!vJ(r,e))return null;let o=yJ(i,n.name);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(aS,{disabled:i.status===`changing`,onClick:a,children:_J(n.admin)}),o!==null&&(0,J.jsx)(lu,{children:o})]})}var xJ=0,SJ=[],CJ={revoke:`Revoke session`,rotate:`Rotate token`};function wJ(e){let{actions:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=n.action.status===`sending`,i=t.ask.rotate,a=t.ask.revoke;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(aS,{disabled:r,onClick:i,children:CJ.rotate}),(n.sessions??SJ).length>xJ&&(0,J.jsx)(aS,{disabled:r,onClick:a,children:CJ.revoke})]})}var TJ={deactivate:`Deactivate`,reactivate:`Reactivate`};function EJ(e){let{actions:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot).action.status===`sending`,r=t.ask.deactivate,i=t.ask.reactivate;return e.active?(0,J.jsx)(aS,{disabled:n,onClick:r,children:TJ.deactivate}):(0,J.jsx)(aS,{disabled:n,onClick:i,children:TJ.reactivate})}var DJ=0,OJ={deactivate:`Deactivate`,delete:`Delete`};function kJ(e){return e.active&&e.deletable?e.actions.subscribeToMessages:e.actions.subscribe}function AJ(e,t){return!e.active||!e.deletable?`activation`:t===`loading`?`pending`:t===DJ?`delete`:`activation`}function jJ(e){let{actions:t}=e,n=(0,Y.useSyncExternalStore)(kJ(e),t.snapshot),r=AJ(e,n.messages),i=t.ask.delete,a=t.ask.deactivate;return r===`pending`?(0,J.jsx)(aS,{disabled:!0,onClick:a,children:OJ.deactivate}):r===`activation`?(0,J.jsx)(EJ,{actions:t,active:e.active}):(0,J.jsx)(aS,{disabled:n.action.status===`sending`,onClick:i,children:OJ.delete})}function MJ(e){let{actions:t,identity:n}=e,r=n.deactivated!==!0;return(0,J.jsxs)(zm,{children:[r&&n.kind===`agent`&&(0,J.jsx)(wJ,{actions:t}),(0,J.jsx)(jJ,{actions:t,active:r,deletable:e.deletable})]})}var NJ=`No live session`;function PJ(e){let t=e.host??null;return t===null?`Joined`:`Joined from ${t}`}function FJ(e){let t=e.lastUsedAt??null;return t===null?`not used yet`:`last used ${Pl(t).full}`}function IJ(e){return e.map(e=>`${PJ(e)} · ${FJ(e)} · expires ${Pl(e.expiresAt).full}`).join(`; `)||NJ}function LJ(e){let{actions:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribeToSessions,t.snapshot);return n.sessions===null?null:(0,J.jsx)(sC,{children:IJ(n.sessions)})}var RJ={field:`Transfer to (a human's name)`,submit:`Transfer`};function zJ(e){let{actions:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=t.editTransfer,i=t.ask.transfer;return(0,J.jsx)(KS,{field:RJ.field,label:`Transfer @${e.name}`,onEdit:r,onSubmit:i,saving:n.action.status===`sending`,submit:RJ.submit,value:n.transferTo})}function BJ(e){let{identity:t}=e,n=e.identities.actions(t.name),r=t.kind===`agent`;return(0,J.jsxs)(J.Fragment,{children:[r&&(0,J.jsx)(LJ,{actions:n}),(0,J.jsx)(MJ,{actions:n,deletable:e.deletable,identity:t}),(0,J.jsx)(vG,{actions:n,identity:t}),(0,J.jsx)(EG,{actions:n}),r&&e.transfer&&(0,J.jsx)(zJ,{actions:n,name:t.name})]})}function VJ(e,t){return e.kind===`agent`&&e.owner===String(t)}function HJ(e){let{identities:t,identity:n,me:r}=e,i=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),a=i.some(e=>e.name===r&&e.admin);if(n.name===r||!(a||VJ(n,r)))return null;let o=i.some(e=>e.kind===`agent`&&e.owner===String(n.name));return(0,J.jsx)(BJ,{deletable:a&&!o,identities:t,identity:n,transfer:a})}function UJ(e){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(bJ,{identities:e.identities,identity:e.identity,me:e.me}),(0,J.jsx)(HJ,{identities:e.identities,identity:e.identity,me:e.me})]})}var WJ={joined:`joined `};function GJ(e){let{identity:t}=e,n=HA(t.name);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(sC,{children:nJ(t)}),n!==null&&(0,J.jsx)(sC,{children:n}),(0,J.jsxs)(sC,{children:[WJ.joined,(0,J.jsx)($w,{time:t.createdAt})]})]})}var KJ={description:`Description`};function qJ(e){let{draft:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=t.edit,{save:i}=n,a=n.text??e.saved??``,o=(0,Y.useCallback)(()=>{t.save(a)},[t,a]);return(0,J.jsx)(ZS,{field:KJ.description,label:KJ.description,limit:uG.maximum,onEdit:r,onSubmit:o,saving:i.status===`saving`,value:a,children:i.status===`failed`&&(0,J.jsx)(lu,{children:`Couldn't save the description (${i.code}): ${i.message}`})})}function JJ(e,t,n){return e.kind===`agent`?e.owner===String(t)||n.some(e=>e.name===t&&e.admin):!1}function YJ(e){return e.kind===`agent`?e.description??null:null}function XJ(e){let{identities:t}=e.composer,{identity:n}=e,r=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),i=YJ(n);return JJ(n,e.me,r)?(0,J.jsx)(qJ,{draft:e.composer.description(n.name),saved:i}):i!==null&&(0,J.jsx)(cC,{children:i})}function ZJ(e){let{draft:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=t.edit,{save:i}=n,a=n.text??e.saved??``,o=(0,Y.useCallback)(()=>{t.save(a)},[t,a]);return(0,J.jsx)(KS,{field:e.field,label:e.label,onEdit:r,onSubmit:o,saving:i.status===`saving`,value:a,children:i.status===`failed`&&(0,J.jsx)(lu,{children:`Couldn't save the display name (${i.code}): ${i.message}`})})}var QJ={displayName:`Display name`};function $J(e,t){return e.name===t||e.kind===`agent`&&e.owner===String(t)}function eY(e){let{identity:t}=e;return $J(t,e.me)?(0,J.jsx)(ZJ,{draft:e.composer.displayName(t.name),field:QJ.displayName,label:QJ.displayName,saved:t.displayName??null}):null}function tY(e){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(eY,{composer:e.composer,identity:e.identity,me:e.me}),(0,J.jsx)(XJ,{composer:e.composer,identity:e.identity,me:e.me})]})}var nY=0,rY={unknown:`Unknown identity`};function iY(e){let{identities:t}=e.composer,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=n.filter(t=>t.name===e.name),i=FA();return n.length===nY?(0,J.jsx)(pS,{children:(0,J.jsx)(_w,{width:`short`})}):r.length===nY?(0,J.jsx)(pS,{children:(0,J.jsx)(sC,{children:rY.unknown})}):r.map(n=>(0,J.jsxs)(sT,{agent:n.kind===`agent`,name:n.name,presence:LA({name:n.name,presences:i}),children:[(0,J.jsx)(cT,{displayName:n.displayName??null,name:n.name,note:YH(n),children:(0,J.jsx)(tJ,{identity:n})}),(0,J.jsx)(GJ,{identity:n}),(0,J.jsx)(tY,{composer:e.composer,identity:n,me:e.me}),(0,J.jsx)(UJ,{identities:t,identity:n,me:e.me})]},n.name))}var aY=`Escape`;function oY(e){(0,Y.useEffect)(()=>{function t(t){t.key===aY&&!t.defaultPrevented&&(globalThis.location.hash=e)}return globalThis.document.addEventListener(`keydown`,t),()=>{globalThis.document.removeEventListener(`keydown`,t)}},[e])}var sY={close:`Close profile`,profile:`Profile`};function cY(e){return oY(e.closeHref),(0,J.jsx)(nw,{closeHref:e.closeHref,closeLabel:sY.close,detail:e.name,label:sY.profile,children:(0,J.jsx)(iY,{composer:e.composer,me:e.me,name:e.name})})}var lY={label:`Live link`,reconnecting:`Reconnecting…`};function uY(e){let{live:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribeToLink,t.link);return(0,J.jsx)(Bw,{label:lY.label,shown:n===`down`,children:lY.reconnecting})}var dY={own:`Your display name`};function fY(e,t){return e.filter(e=>e.kind===`agent`&&e.owner===String(t))}function pY(e,t){for(let n of e)if(n.name===t)return n.displayName??null;return null}function mY(e){let{composer:t,me:n}=e,r=(0,Y.useContext)(dk),i=(0,Y.useSyncExternalStore)(r.subscribe,r.snapshot);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(ZJ,{draft:t.displayName(n),field:dY.own,label:dY.own,saved:pY(i,n)}),fY(i,n).map(e=>(0,J.jsx)(ZJ,{draft:t.displayName(e.name),field:`@${e.name}`,label:`Display name of @${e.name}`,saved:e.displayName??null},e.name))]})}function hY(e){let{identity:t}=e;return(0,J.jsxs)(cu,{label:`@${t.name}`,children:[(0,J.jsx)(cT,{displayName:t.displayName??null,name:t.name,note:YH(t)}),(0,J.jsx)(BJ,{deletable:!1,identities:e.identities,identity:t,transfer:!1})]})}var gY={field:`New agent's name`,label:`Create an agent`,submit:`Create`};function _Y(e){let{creation:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=t.edit,i=t.create,{create:a}=n;return(0,J.jsx)(KS,{field:gY.field,label:gY.label,onEdit:r,onSubmit:i,saving:a.status===`creating`,submit:gY.submit,value:n.text,children:a.status===`failed`&&(0,J.jsx)(lu,{children:`Couldn't create the agent (${a.code}): ${a.message}`})})}function vY(e){let{identities:t,me:n}=e,r=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot).filter(e=>e.kind===`agent`&&e.owner===String(n));return(0,J.jsxs)(J.Fragment,{children:[r.map(e=>(0,J.jsx)(hY,{identities:t,identity:e},e.name)),(0,J.jsx)(_Y,{creation:t.creation})]})}var yY=[`system`,`light`,`dark`],bY=`cookout-theme`,xY=`cookout-sidebar-collapsed`,SY=`collapsed`,CY=`data-theme`,wY=`system`;function TY(e){return yY.some(t=>t===e)}function EY(e){let t=e.getItem(bY);return TY(t)?t:wY}function DY(e,t){t===wY?(e.storage.removeItem(bY),e.root.removeAttribute(CY)):(e.storage.setItem(bY,t),e.root.setAttribute(CY,t))}function OY(e,t){t?e.setItem(xY,SY):e.removeItem(xY)}function kY(e,t){return{filterIdentities:t=>{e({identityFilter:t})},showKind:t=>{e({identityKind:t})},toggleDeactivated:()=>{e({showDeactivated:!t().showDeactivated})}}}function AY(e){let t=new Set,n={collapsed:e.storage.getItem(xY)===SY,identityFilter:``,identityKind:`all`,showDeactivated:!1,sidebar:!1,theme:EY(e.storage)};DY(e,n.theme);function r(e){n={...n,...e};for(let e of t)e()}return{chooseTheme:t=>{DY(e,t),r({theme:t})},closeSidebar:()=>{n.sidebar&&r({sidebar:!1})},...kY(r,()=>n),snapshot:()=>n,subscribe:e=>(t.add(e),()=>{t.delete(e)}),toggleCollapsed:()=>{OY(e.storage,!n.collapsed),r({collapsed:!n.collapsed,sidebar:!1})},toggleSidebar:()=>{r({sidebar:!n.sidebar})}}}var jY={theme:`Theme`},MY=[{label:`System`,value:`system`},{label:`Light`,value:`light`},{label:`Dark`,value:`dark`}];function NY(e){return yY.filter(t=>t===e)}function PY(e){let{layout:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=(0,Y.useCallback)(e=>{for(let n of NY(e))t.chooseTheme(n)},[t]);return(0,J.jsx)(_S,{choices:MY,label:jY.theme,onChoose:r,value:n.theme})}var FY={agents:`My agents`,profile:`Profile`,theme:`Theme`};function IY(e){let{composer:t,me:n,section:r}=e;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(zC,{focused:r===`profile`,href:iE({name:`settings`,section:`profile`}),label:FY.profile,children:(0,J.jsx)(mY,{composer:t,me:n})}),(0,J.jsx)(zC,{focused:r===`theme`,href:iE({name:`settings`,section:`theme`}),label:FY.theme,children:(0,J.jsx)(PY,{layout:e.layout})}),(0,J.jsx)(zC,{focused:r===`agents`,href:iE({name:`settings`,section:`agents`}),label:FY.agents,children:(0,J.jsx)(vY,{identities:t.identities,me:n})})]})}var LY={description:`Your profile, the theme and your agents`,title:`Settings`};function RY(e){return(0,J.jsxs)(TC,{children:[(0,J.jsx)(LC,{description:LY.description,sans:!0,title:LY.title}),(0,J.jsx)(RC,{label:LY.title,children:(0,J.jsx)(IY,{composer:e.composer,layout:e.layout,me:e.me,section:e.section})})]})}function zY(e){return e.forYou+e.activity>0}function BY(e){let{activity:t,forYou:n}=e.counts;return(0,J.jsxs)(J.Fragment,{children:[t>0&&(0,J.jsx)(YC,{count:t,label:`${String(t)} unread`,tone:`unseen`}),n>0&&(0,J.jsx)(YC,{count:n,label:`${String(n)} for you`,tone:`loud`})]})}function VY(e){let{channel:t,counts:n}=e;return(0,J.jsx)(CC,{active:e.open,href:iE({channel:t,name:`channel`}),icon:`channel`,label:`#${t}`,marked:zY(n),children:(0,J.jsx)(BY,{counts:n})})}var HY={channels:`Channels`};function UY(e){let{channels:t,counts:n}=e;return t.status===`loading`?(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,J.jsx)(_w,{width:`short`}),(0,J.jsx)(_w,{width:`long`})]}):t.status===`failed`?(0,J.jsx)(lu,{children:`Couldn't load the channels (${t.code}): ${t.message}`}):(0,J.jsx)(wC,{label:HY.channels,children:t.channels.toSorted((e,t)=>e.name.localeCompare(t.name)).map(t=>(0,J.jsx)(VY,{channel:t.name,counts:n.get(t.name)??Dc,open:e.open===t.name},t.name))})}var WY={inbox:`Inbox`};function GY(e){return(0,J.jsx)(CC,{active:e.active,href:iE({name:`inbox`,selected:null}),icon:`inbox`,label:WY.inbox,marked:zY(e.counts),children:(0,J.jsx)(BY,{counts:e.counts})})}var KY={busy:`Creating…`,button:`Create`,description:`Description`,descriptionHelp:`What the channel is for, up to 500 characters.`,name:`Name`,nameHelp:`Lowercase letters, digits or '-', up to 80.`,title:`New channel`};function qY(e,t){return e.status!==`failed`||e.field!==t?null:`Couldn't create the channel (${e.code}): ${e.message}`}function JY(e){globalThis.location.hash=iE({channel:e,name:`channel`})}function YY(e){let{creation:t,state:n}=e,r=t.close,i=t.editName,a=t.editDescription,o=(0,Y.useCallback)(()=>{t.create(JY)},[t]);return(0,J.jsxs)(ew,{busy:n.create.status===`creating`,busyButton:KY.busy,button:KY.button,description:null,label:KY.title,onCancel:r,onEscape:r,onSubmit:o,title:KY.title,children:[(0,J.jsx)(tC,{error:qY(n.create,`name`),help:KY.nameHelp,kind:`text`,label:KY.name,onEdit:i,required:!0,value:n.name}),(0,J.jsx)(tC,{error:qY(n.create,`description`),help:KY.descriptionHelp,kind:`text`,label:KY.description,onEdit:a,required:!1,value:n.description})]})}function XY(e){let{creation:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot);return n.open&&(0,J.jsx)(YY,{creation:t,state:n})}var ZY={create:`New channel`};function QY(e){let{creation:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=t.open;return(0,J.jsx)(gC,{expanded:n.open,label:ZY.create,onClick:r})}var $Y={channels:`Channels`,openThreads:`Open threads`,people:`People & agents`,views:`Views`};function eX(e){return e.name===`channel`||e.name===`thread`?e.channel:null}function tX(e){let{route:t}=e,{channels:n}=(0,Y.useSyncExternalStore)(e.board.subscribe,e.board.snapshot),r=(0,Y.useSyncExternalStore)(e.unread.subscribe,e.unread.snapshot),i=jU({me:e.me,state:r});return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(wC,{label:$Y.views,children:[(0,J.jsx)(GY,{active:t.name===`inbox`,counts:i.inbox}),(0,J.jsx)(CC,{active:t.name===`open-threads`,href:iE({all:!1,name:`open-threads`}),icon:`threads`,label:$Y.openThreads,marked:!1}),(0,J.jsx)(CC,{active:t.name===`people`||t.name===`profile`,href:iE({name:`people`}),icon:`people`,label:$Y.people,marked:!1})]}),(0,J.jsx)(_C,{label:$Y.channels,children:(0,J.jsx)(QY,{creation:e.board.creation})}),(0,J.jsx)(UY,{channels:n,open:eX(t),counts:i.channels}),(0,J.jsx)(XY,{creation:e.board.creation})]})}var nX={settings:`Settings`};function rX(e){let{identity:t,route:n}=e,r=ZH(t.name)??t;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Ww,{active:n.name===`profile`&&n.identity===t.name,agent:t.kind===`agent`,displayName:r.displayName??null,href:iE({identity:t.name,name:`profile`}),name:t.name,presence:zA(t.name)}),(0,J.jsx)(HC,{active:n.name===`settings`,href:iE({name:`settings`,section:null}),children:nX.settings})]})}var iX={name:`cookout`,sidebar:`Sidebar`};function aX(e){let{layout:t}=e,n=(0,Y.useSyncExternalStore)(t.subscribe,t.snapshot),r=t.closeSidebar,i=t.toggleCollapsed;return(0,J.jsxs)(fw,{collapsed:n.collapsed,label:iX.sidebar,onToggleCollapsed:i,open:n.sidebar,title:iX.name,children:[(0,J.jsx)(mw,{onFollow:r,children:(0,J.jsx)(tX,{board:e.board,me:e.identity.name,route:e.route,unread:e.unread})}),(0,J.jsx)(hw,{children:(0,J.jsx)(rX,{identity:e.identity,route:e.route})})]})}var oX=0,sX=new Map,cX={empty:`No replies yet.`,parent:`Parent message`,replies:`Replies`};function lX(e){let{state:t}=e;return t.status===`loading`?(0,J.jsxs)(pS,{children:[(0,J.jsx)(_w,{width:`short`}),(0,J.jsx)(_w,{width:`long`})]}):t.status===`failed`?(0,J.jsx)(lu,{children:`Couldn't load the thread (${t.code}): ${t.message}`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(JW,{closing:e.closing,label:cX.parent,me:e.me,menu:e.menu,message:t.parent,receipts:t.receipts,reply:e.reply}),(0,J.jsx)(qx,{children:yj(t.replies.length)}),t.replies.length===oX&&(0,J.jsx)(pS,{children:(0,J.jsx)(sC,{children:cX.empty})}),(0,J.jsx)(qU,{after:t.parent,channel:null,label:cX.replies,me:e.me,menu:e.menu,messages:t.replies,open:null,readPosition:e.readPosition,receipts:t.receipts,reply:e.reply,threads:sX}),t.read.status===`failed`&&(0,J.jsx)(lu,{children:`Couldn't mark the thread read (${t.read.code}): ${t.read.message}`})]})}function uX({closing:e}){let t=zR(),n=wA(e.closedAt);return(0,J.jsxs)(J.Fragment,{children:[`Closed by `,(0,J.jsx)(pC,{href:t(e.closedBy),children:`@${e.closedBy}`}),` ${n}`]})}var dX={close:`Close`,reopen:`Reopen`};function fX(e){let{closedAt:t=null,closedBy:n=null}=e;return t===null||n===null?null:{closedAt:t,closedBy:n}}function pX(e){let{closing:t}=e,{id:n}=e.parent,r=fX(e.parent),i=(0,Y.useCallback)(()=>{t.close(n)},[t,n]),a=(0,Y.useCallback)(()=>{t.reopen(n)},[t,n]);return(0,J.jsxs)(J.Fragment,{children:[r===null&&(0,J.jsx)(Wx,{actionLabel:dX.close,onAction:i}),r!==null&&(0,J.jsx)(Wx,{actionLabel:dX.reopen,onAction:a,children:(0,J.jsx)(uX,{closing:r})}),(0,J.jsx)(iU,{closing:t})]})}var mX={close:`Close panel`,replies:`The thread's messages`,reply:`Reply`,thread:`Thread`},hX=0;function gX(e){return e.status===`loaded`?e.replies.length:hX}function _X(e){let{channel:t}=e,n=e.board.thread(t,e.thread),r=(0,Y.useSyncExternalStore)(n.subscribe,n.snapshot),i=e.unread.newLine(t,e.thread),a=(0,Y.useSyncExternalStore)(i.subscribe,i.snapshot),o=uW({channel:t,composer:e.composer,me:e.me,messages:n,thread:e.thread});return(0,J.jsxs)(nw,{closeHref:iE({channel:t,name:`channel`}),closeLabel:mX.close,detail:`#${t}`,label:mX.thread,children:[r.status===`loaded`&&(0,J.jsx)(pX,{closing:e.board.closing,parent:r.parent}),(0,J.jsx)(iw,{count:gX(r),label:mX.replies,children:(0,J.jsx)(lX,{closing:e.board.closing,me:e.me,menu:e.unread.menu,readPosition:a,reply:o.replyTo,state:r})}),(0,J.jsx)(sW,{draft:o,field:mX.reply,focused:!0,messages:n,state:r})]})}function vX(e){return e.name===`thread`?e.thread:null}function yX(e){let{board:t,composer:n,me:r,route:i,unread:a}=e;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(UU,{board:t,channel:i.channel,composer:n,me:r,open:vX(i),newLine:a.newLine(i.channel,null),unread:a}),i.name===`thread`&&(0,J.jsx)(_X,{board:t,channel:i.channel,composer:n,me:r,thread:i.thread,unread:a},String(i.thread))]})}function bX(e){let{route:t,stores:n}=e;return t.name===`inbox`?(0,J.jsx)(kq,{board:n.board,composer:n.composer,me:e.me,reading:n.reading,selected:t.selected,unread:n.unread}):t.name===`login`?(0,J.jsx)(Hq,{session:n.session}):(0,J.jsx)(RY,{composer:n.composer,layout:n.layout,me:e.me,section:t.section})}function xX(e){return e.name===`profile`?e.identity:null}function SX(e){let{composer:t,route:n}=e,r=xX(n);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(mJ,{identities:t.identities,layout:e.layout,me:e.me,open:r}),r!==null&&(0,J.jsx)(cY,{closeHref:iE({name:`people`}),composer:t,me:e.me,name:r})]})}var CX={missing:`No page has this address.`,nothing:`Nothing here`};function wX(e){return e.name===`inbox`||e.name===`login`||e.name===`settings`}function TX(e){return e.name===`people`||e.name===`profile`}function EX(e){return e.name===`channel`||e.name===`thread`}function DX(e){let{route:t,stores:n}=e;return wX(t)?(0,J.jsx)(bX,{me:e.me,route:t,stores:n}):t.name===`open-threads`?(0,J.jsx)(Qq,{all:t.all,board:n.board}):TX(t)?(0,J.jsx)(SX,{composer:n.composer,layout:n.layout,me:e.me,route:t}):EX(t)?(0,J.jsx)(yX,{board:n.board,composer:n.composer,me:e.me,route:t,unread:n.unread},t.channel):(0,J.jsx)(PU,{description:CX.missing,title:CX.nothing})}function OX(e){let{me:t,profile:n,route:r,stores:i}=e;return(0,J.jsxs)(hJ,{route:r,children:[(0,J.jsx)(DX,{me:t,route:r,stores:i}),n!==null&&(0,J.jsx)(cY,{closeHref:sE(r),composer:i.composer,me:t,name:n},n)]})}function kX(e){let{stores:t}=e;return(0,J.jsxs)(zw,{children:[t.live!==null&&(0,J.jsx)(uY,{live:t.live}),(0,J.jsx)(Iq,{identities:t.composer.identities}),(0,J.jsx)(Rw,{children:(0,J.jsx)(OX,{me:e.me,profile:e.profile,route:e.route,stores:t})})]})}function AX(e){let{stores:t}=e,{layout:n}=t,{sidebar:r}=(0,Y.useSyncExternalStore)(n.subscribe,n.snapshot),i=n.toggleSidebar;return(0,J.jsxs)(Lw,{onToggleSidebar:i,sidebarOpen:r,children:[(0,J.jsx)(aX,{board:t.board,identity:e.identity,layout:n,route:e.route,unread:t.unread}),(0,J.jsx)(kX,{me:e.identity.name,profile:e.profile,route:e.route,stores:t})]})}var jX=`cookout`,MX=0,NX={approve:`Approve a login`,"approve-join":`Approve an agent`,inbox:`Inbox`,login:`Logged in`,missing:`Nothing here`,"open-threads":`Open threads`,people:`People`,settings:`Settings`},PX=`Log in`,FX={status:`loading`};function IX(e){return e.name===`channel`?`#${e.channel}`:e.name===`thread`?`Thread in #${e.channel}`:e.name===`profile`?`@${e.identity}`:NX[e.name]}function LX(e){return e.status===`logged-in`?e.identity.name:null}function RX(e,t){return e===null?PX:IX(t)}function zX(e,t){return e===null||t.status!==`loaded`?MX:Nc({items:t.inbox,me:e}).forYou}function BX(e,t){let n=`${e} · ${jX}`;return t===MX?n:`(${String(t)}) ${n}`}var VX=new Set;function HX(e){return VX.add(e),()=>{VX.delete(e)}}function UX(){return FX}function WX(e,t){return e===null?{snapshot:UX,subscribe:HX}:t}function GX(e){let t=LX((0,Y.useSyncExternalStore)(e.session.subscribe,e.session.snapshot)),n=WX(t,e.unread),r=(0,Y.useSyncExternalStore)(n.subscribe,n.snapshot),i=BX(RX(t,e.route),zX(t,r));(0,Y.useEffect)(()=>{globalThis.document.title=i},[i])}function KX(e){let{place:{profile:t,route:n},stores:{session:r}}=e,i=(0,Y.useSyncExternalStore)(r.subscribe,r.snapshot);return GX({route:n,session:r,unread:e.stores.unread}),i.status===`logged-in`?n.name===`approve`?(0,J.jsx)(tS,{children:(0,J.jsx)(Pq,{approval:e.stores.loginApprovals.forCode(n.userCode)})}):n.name===`approve-join`?(0,J.jsx)(tS,{children:(0,J.jsx)(vT,{approval:e.stores.agentJoinApprovals.forCode(n.userCode)})}):(0,J.jsx)(vk,{identities:e.stores.composer.identities,presence:e.stores.presence,children:(0,J.jsx)(xk,{reactions:e.stores.board.reactions,children:(0,J.jsx)(AX,{identity:i.identity,profile:t,route:n,stores:e.stores})})}):(0,J.jsx)(tS,{children:(0,J.jsx)(Hq,{session:r})})}function qX(e){return globalThis.addEventListener(`hashchange`,e),()=>{globalThis.removeEventListener(`hashchange`,e)}}function JX(){return globalThis.location.hash}function YX(e){let t=(0,Y.useSyncExternalStore)(qX,JX);return(0,J.jsx)(KX,{place:aE(t),stores:e})}var XX=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,te());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?te():S=!1}}}var te;if(typeof y==`function`)te=function(){y(ee)};else if(typeof MessageChannel<`u`){var D=new MessageChannel,ne=D.port2;D.port1.onmessage=ee,te=function(){ne.postMessage(null)}}else te=function(){_(ee,0)};function re(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,te()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),ZX=o(((e,t)=>{t.exports=XX()})),QX=o((e=>{var t=ZX(),n=du(),r=Yu();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function p(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function m(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function h(e){var t=[null,null],n=p(e);return n===null||g(t,e,n.child,{foundSelf:!1}),t}function g(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&g(e,t,n.child,r))return!0;n=n.sibling}return!1}function _(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var v=null,y=null;function b(e,t,n){return e===n||e===t&&(v=e,!0)}function x(e,t,n){return e===n?(y=e,!1):e===t&&(y!==null&&(v=e),!0)}function S(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function C(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var w=Object.assign,T=Symbol.for(`react.element`),E=Symbol.for(`react.transitional.element`),ee=Symbol.for(`react.portal`),te=Symbol.for(`react.fragment`),D=Symbol.for(`react.strict_mode`),ne=Symbol.for(`react.profiler`),re=Symbol.for(`react.consumer`),O=Symbol.for(`react.context`),ie=Symbol.for(`react.forward_ref`),ae=Symbol.for(`react.suspense`),oe=Symbol.for(`react.suspense_list`),k=Symbol.for(`react.memo`),se=Symbol.for(`react.lazy`),ce=Symbol.for(`react.activity`),le=Symbol.for(`react.legacy_hidden`),ue=Symbol.for(`react.memo_cache_sentinel`),de=Symbol.for(`react.view_transition`),fe=Symbol.for(`react.recoverable`),pe=Symbol.iterator;function me(e){return typeof e!=`object`||!e?null:(e=pe&&e[pe]||e[`@@iterator`],typeof e==`function`?e:null)}var he=Symbol.for(`react.client.reference`);function A(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case te:return`Fragment`;case ne:return`Profiler`;case D:return`StrictMode`;case ae:return`Suspense`;case oe:return`SuspenseList`;case ce:return`Activity`;case de:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case ee:return`Portal`;case O:return e.displayName||`Context`;case re:return(e._context.displayName||`Context`)+`.Consumer`;case ie:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case k:return t=e.displayName||null,t===null?A(e.type)||`Memo`:t;case se:t=e._payload,e=e._init;try{return A(e(t))}catch{}}return null}var j=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_e={pending:!1,data:null,method:null,action:null},ve=[],ye=-1;function be(e){return{current:e}}function xe(e){0>ye||(e.current=ve[ye],ve[ye]=null,ye--)}function Se(e,t){ye++,ve[ye]=e.current,e.current=t}var Ce=be(null),we=be(null),Te=be(null),N=be(null);function P(e,t){switch(Se(Te,t),Se(we,e),Se(Ce,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fp(t),e=pp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}xe(Ce),Se(Ce,e)}function Ee(){xe(Ce),xe(we),xe(Te)}function De(e){var t=e.memoizedState;t!==null&&(lh._currentValue=t.memoizedState,Se(N,e)),t=Ce.current;var n=pp(t,e.type);t!==n&&(Se(we,e),Se(Ce,n))}function Oe(e){we.current===e&&(xe(Ce),xe(we)),N.current===e&&(xe(N),lh._currentValue=_e)}var ke,Ae;function je(e){if(ke===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ke=t&&t[1]||``,Ae=-1<e.stack.indexOf(`
75
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
76
+ `+ke+e+Ae}var Me=!1;function Ne(e,t){if(!e||Me)return``;Me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
77
+ `),l=s.split(`
78
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
79
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?je(n):``}function Pe(e,t){switch(e.tag){case 26:case 27:case 5:return je(e.type);case 16:return je(`Lazy`);case 13:return e.child!==t&&t!==null?je(`Suspense Fallback`):je(`Suspense`);case 19:return je(`SuspenseList`);case 0:case 15:return Ne(e.type,!1);case 11:return Ne(e.type.render,!1);case 1:return Ne(e.type,!0);case 31:return je(`Activity`);case 30:return je(`ViewTransition`);default:return``}}function F(e){try{var t=``,n=null;do t+=Pe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
80
+ Error generating stack: `+e.message+`
81
+ `+e.stack}}var Fe=Object.prototype.hasOwnProperty,Ie=t.unstable_scheduleCallback,Le=t.unstable_cancelCallback,Re=t.unstable_shouldYield,ze=t.unstable_requestPaint,Be=t.unstable_now,Ve=t.unstable_getCurrentPriorityLevel,He=t.unstable_ImmediatePriority,Ue=t.unstable_UserBlockingPriority,We=t.unstable_NormalPriority,Ge=t.unstable_LowPriority,Ke=t.unstable_IdlePriority,qe=t.log,Je=t.unstable_setDisableYieldValue,Ye=null,Xe=null;function Ze(e){if(typeof qe==`function`&&Je(e),Xe&&typeof Xe.setStrictMode==`function`)try{Xe.setStrictMode(Ye,e)}catch{}}var Qe=Math.clz32?Math.clz32:tt,$e=Math.log,et=Math.LN2;function tt(e){return e>>>=0,e===0?32:31-($e(e)/et|0)|0}var nt=256,rt=262144,it=4194304;function at(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ot(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=at(n))):i=at(o):i=at(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=at(n))):i=at(o)):i=at(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function st(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ct(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Qe(n),i=1<<r;t|=e[r],n&=~i}return t}function lt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ut(){var e=it;return it<<=1,!(it&62914560)&&(it=4194304),e}function dt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ft(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function pt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Qe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&mt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function mt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Qe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ht(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function gt(e,t){var n=t&-t;return n=n&42?1:_t(n),(n&(e.suspendedLanes|t))===0?n:0}function _t(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function vt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function yt(){var e=ge.p;return e===0?(e=window.event,e===void 0?32:Th(e.type)):e}function bt(e,t){var n=ge.p;try{return ge.p=e,t()}finally{ge.p=n}}var xt=Math.random().toString(36).slice(2),St=`__reactFiber$`+xt,Ct=`__reactProps$`+xt,wt=`__reactContainer$`+xt,I=`__reactEvents$`+xt,Tt=`__reactListeners$`+xt,Et=`__reactHandles$`+xt,Dt=`__reactResources$`+xt,Ot=`__reactMarker$`+xt,kt=`__reactLoad$`+xt;function L(e){delete e[St],delete e[Ct],delete e[Tt],delete e[Et]}function At(e){var t;if(t=e[St])return t;for(var n=e.parentNode;n;){if(t=n[wt]||n[St]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mm(e);e!==null;){if(n=e[St])return n;e=mm(e)}return t}e=n,n=e.parentNode}return null}function jt(e){if(e=e[St]||e[wt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Mt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Nt(e){var t=e[Dt];return t||=e[Dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Pt(e){e[Ot]=!0}function Ft(e){e[kt]=void 0}var It=new Set,Lt={};function Rt(e,t){zt(e,t),zt(e+`Capture`,t)}function zt(e,t){for(Lt[e]=t,e=0;e<t.length;e++)It.add(t[e])}var Bt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Vt={},Ht={};function Ut(e){return Fe.call(Ht,e)?!0:Fe.call(Vt,e)?!1:Bt.test(e)?Ht[e]=!0:(Vt[e]=!0,!1)}var R=!1;function Wt(){var e=R;return R=!1,e}function Gt(e,t,n){if(Ut(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Kt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function qt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Yt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Xt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zt(e){if(!e._valueTracker){var t=Yt(e)?`checked`:`value`;e._valueTracker=Xt(e,t,``+e[t])}}function Qt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Yt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var $t=/[\n"\\]/g;function en(e){return e.replace($t,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function tn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Jt(t)):e.value!==``+Jt(t)&&(e.value=``+Jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):rn(e,Jt(n)):o===`number`&&e.value==t?rn(e,Jt(e.value)):rn(e,Jt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Jt(s):e.removeAttribute(`name`)}function nn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Zt(e);return}n=n==null?``:``+Jt(n),t=t==null?n:``+Jt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Zt(e)}function rn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function z(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Jt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function an(e,t,n){t!=null&&(t=``+Jt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Jt(n)}function on(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(j(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Zt(e)}function sn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function ln(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||cn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function un(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,R=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(ln(e,a,r),R=!0)}else for(var o in t)t.hasOwnProperty(o)&&ln(e,o,t[o])}function dn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var fn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),pn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function mn(e){return pn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function hn(){}var gn=null;function _n(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vn=null,yn=null;function bn(e){var t=jt(e);if(t&&(e=t.stateNode)){var n=e[Ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(tn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+en(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Ct]||null;if(!a)throw Error(i(90));tn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Qt(r)}break a;case`textarea`:an(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&z(e,!!n.multiple,t,!1)}}}var xn=!1;function Sn(e,t,n){if(xn)return e(t,n);xn=!0;try{return e(t)}finally{if(xn=!1,(vn!==null||yn!==null)&&(Rd(),vn&&(t=vn,e=yn,yn=vn=null,bn(t),e)))for(t=0;t<e.length;t++)bn(e[t])}}function Cn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Ct]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var wn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Tn=!1;if(wn)try{var En={};Object.defineProperty(En,"passive",{get:function(){Tn=!0}}),window.addEventListener(`test`,En,En),window.removeEventListener(`test`,En,En)}catch{Tn=!1}var Dn=null,On=null,kn=null;function An(){if(kn)return kn;var e,t=On,n=t.length,r,i=`value`in Dn?Dn.value:Dn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return kn=i.slice(e,1<r?1-r:void 0)}function jn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Mn(){return!0}function Nn(){return!1}function Pn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Mn:Nn,this.isPropagationStopped=Nn,this}return w(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Mn)},persist:function(){},isPersistent:Mn}),t}var Fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},In=Pn(Fn),Ln=w({},Fn,{view:0,detail:0}),Rn=Pn(Ln),zn,Bn,B,Vn=w({},Ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==B&&(B&&e.type===`mousemove`?(zn=e.screenX-B.screenX,Bn=e.screenY-B.screenY):Bn=zn=0,B=e),zn)},movementY:function(e){return`movementY`in e?e.movementY:Bn}}),Hn=Pn(Vn),V=Pn(w({},Vn,{dataTransfer:0})),Un=Pn(w({},Ln,{relatedTarget:0})),Wn=Pn(w({},Fn,{animationName:0,elapsedTime:0,pseudoElement:0})),Gn=Pn(w({},Fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Kn=Pn(w({},Fn,{data:0})),H={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},qn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Jn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Yn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jn[e])?!!t[e]:!1}function Xn(){return Yn}var Zn=Pn(w({},Ln,{key:function(e){if(e.key){var t=H[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=jn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xn,charCode:function(e){return e.type===`keypress`?jn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?jn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Qn=Pn(w({},Vn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),$n=Pn(w({},Fn,{submitter:0})),er=Pn(w({},Ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xn})),tr=Pn(w({},Fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),nr=Pn(w({},Vn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),rr=Pn(w({},Fn,{newState:0,oldState:0,source:0})),ir=[9,13,27,32],ar=wn&&`CompositionEvent`in window,or=null;wn&&`documentMode`in document&&(or=document.documentMode);var sr=wn&&`TextEvent`in window&&!or,cr=wn&&(!ar||or&&8<or&&11>=or),lr=` `,ur=!1;function U(e,t){switch(e){case`keyup`:return ir.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function dr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var fr=!1;function W(e,t){switch(e){case`compositionend`:return dr(t);case`keypress`:return t.which===32?(ur=!0,lr):null;case`textInput`:return e=t.data,e===lr&&ur?null:e;default:return null}}function pr(e,t){if(fr)return e===`compositionend`||!ar&&U(e,t)?(e=An(),kn=On=Dn=null,fr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return cr&&t.locale!==`ko`?null:t.data;default:return null}}var mr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!mr[e.type]:t===`textarea`}function gr(e,t,n,r){vn?yn?yn.push(r):yn=[r]:vn=r,t=Yf(t,`onChange`),0<t.length&&(n=new In(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var _r=null,vr=null;function yr(e){Vf(e,0)}function br(e){if(Qt(Mt(e)))return e}function G(e,t){if(e===`change`)return t}var xr=!1;if(wn){var Sr;if(wn){var K=`oninput`in document;if(!K){var Cr=document.createElement(`div`);Cr.setAttribute(`oninput`,`return;`),K=typeof Cr.oninput==`function`}Sr=K}else Sr=!1;xr=Sr&&(!document.documentMode||9<document.documentMode)}function wr(){_r&&(_r.detachEvent(`onpropertychange`,Tr),vr=_r=null)}function Tr(e){if(e.propertyName===`value`&&br(vr)){var t=[];gr(t,vr,e,_n(e)),Sn(yr,t)}}function Er(e,t,n){e===`focusin`?(wr(),_r=t,vr=n,_r.attachEvent(`onpropertychange`,Tr)):e===`focusout`&&wr()}function Dr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return br(vr)}function Or(e,t){if(e===`click`)return br(t)}function kr(e,t){if(e===`input`||e===`change`)return br(t)}function Ar(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var jr=typeof Object.is==`function`?Object.is:Ar;function Mr(e,t){if(jr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Fe.call(t,i)||!jr(e[i],t[i]))return!1}return!0}function Nr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fr(e,t){var n=Pr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Pr(n)}}function Ir(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ir(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Nr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nr(e.document)}return t}function Rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var zr=wn&&`documentMode`in document&&11>=document.documentMode,Br=null,Vr=null,Hr=null,Ur=!1;function Wr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ur||Br==null||Br!==Nr(r)||(r=Br,`selectionStart`in r&&Rr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hr&&Mr(Hr,r)||(Hr=r,r=Yf(Vr,`onSelect`),0<r.length&&(t=new In(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Br)))}function Gr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Kr={animationend:Gr(`Animation`,`AnimationEnd`),animationiteration:Gr(`Animation`,`AnimationIteration`),animationstart:Gr(`Animation`,`AnimationStart`),transitionrun:Gr(`Transition`,`TransitionRun`),transitionstart:Gr(`Transition`,`TransitionStart`),transitioncancel:Gr(`Transition`,`TransitionCancel`),transitionend:Gr(`Transition`,`TransitionEnd`)},qr={},Jr={};wn&&(Jr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),`TransitionEvent`in window||delete Kr.transitionend.transition);function Yr(e){if(qr[e])return qr[e];if(!Kr[e])return e;var t=Kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jr)return qr[e]=t[n];return e}var Xr=Yr(`animationend`),Zr=Yr(`animationiteration`),Qr=Yr(`animationstart`),$r=Yr(`transitionrun`),ei=Yr(`transitionstart`),ti=Yr(`transitioncancel`),ni=Yr(`transitionend`),ri=new Map,ii=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ii.push(`scrollEnd`);function ai(e,t){ri.set(e,t),Rt(t,[e])}var oi=0;function si(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=yd.identifierPrefix;var n=oi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function ci(e){if(e==null||typeof e==`string`)return e;var t=null,n=Dd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function li(e,t){return e=ci(e),t=ci(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var ui=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},di=[],fi=0,pi=0;function mi(){for(var e=fi,t=pi=fi=0;t<e;){var n=di[t];di[t++]=null;var r=di[t];di[t++]=null;var i=di[t];di[t++]=null;var a=di[t];if(di[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&vi(n,i,a)}}function hi(e,t,n,r){di[fi++]=e,di[fi++]=t,di[fi++]=n,di[fi++]=r,pi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function gi(e,t,n,r){return hi(e,t,n,r),yi(e)}function _i(e,t){return hi(e,null,null,t),yi(e)}function vi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Qe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function yi(e){if(50<Od)throw Od=0,kd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var bi={};function xi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Si(e,t,n,r){return new xi(e,t,n,r)}function Ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wi(e,t){var n=e.alternate;return n===null?(n=Si(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ti(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ei(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ci(r)&&(s=1);else if(typeof r==`string`)s=Ym(e,n,Ce.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ce:return e=Si(31,n,t,a),e.elementType=ce,e.lanes=o,e;case te:return Di(n.children,a,o,t);case D:s=8,a|=24;break;case ne:return e=Si(12,n,t,a|2),e.elementType=ne,e.lanes=o,e;case ae:return e=Si(13,n,t,a),e.elementType=ae,e.lanes=o,e;case oe:return e=Si(19,n,t,a),e.elementType=oe,e.lanes=o,e;case le:case de:return e=a|32,e=Si(30,n,t,e),e.elementType=de,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case O:s=10;break a;case re:s=9;break a;case ie:s=11;break a;case k:s=14;break a;case se:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Si(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Di(e,t,n,r){return e=Si(7,e,r,t),e.lanes=n,e}function Oi(e,t,n){return e=Si(6,e,null,t),e.lanes=n,e}function ki(e){var t=Si(18,null,null,0);return t.stateNode=e,t}function Ai(e,t,n){return t=Si(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ji=new WeakMap;function Mi(e,t){if(typeof e==`object`&&e){var n=ji.get(e);return n===void 0?(t={value:e,source:t,stack:F(t)},ji.set(e,t),t):n}return{value:e,source:t,stack:F(t)}}var Ni=[],Pi=0,Fi=null,Ii=0,Li=[],Ri=0,zi=null,Bi=1,Vi=``;function Hi(e,t){Ni[Pi++]=Ii,Ni[Pi++]=Fi,Fi=e,Ii=t}function Ui(e,t,n){Li[Ri++]=Bi,Li[Ri++]=Vi,Li[Ri++]=zi,zi=e;var r=Bi;e=Vi;var i=32-Qe(r)-1;r&=~(1<<i),n+=1;var a=32-Qe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Bi=1<<32-Qe(t)+i|n<<i|r,Vi=a+e}else Bi=1<<a|n<<i|r,Vi=e}function Wi(e){e.return!==null&&(Hi(e,1),Ui(e,1,0))}function Gi(e){for(;e===Fi;)Fi=Ni[--Pi],Ni[Pi]=null,Ii=Ni[--Pi],Ni[Pi]=null;for(;e===zi;)zi=Li[--Ri],Li[Ri]=null,Vi=Li[--Ri],Li[Ri]=null,Bi=Li[--Ri],Li[Ri]=null}function Ki(e,t){Li[Ri++]=Bi,Li[Ri++]=Vi,Li[Ri++]=zi,Bi=t.id,Vi=t.overflow,zi=e}var q=null,qi=null,Ji=!1,Yi=null,Xi=!1,Zi=Error(i(519));function Qi(e){throw ia(Mi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Zi}function $i(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[St]=e,t[Ct]=r,n){case`dialog`:Hf(`cancel`,t),Hf(`close`,t);break;case`iframe`:case`object`:case`embed`:Hf(`load`,t);break;case`video`:case`audio`:for(n=0;n<zf.length;n++)Hf(zf[n],t);break;case`source`:Hf(`error`,t);break;case`img`:case`image`:case`link`:Hf(`error`,t),Hf(`load`,t);break;case`details`:Hf(`toggle`,t);break;case`input`:Hf(`invalid`,t),nn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Hf(`invalid`,t);break;case`textarea`:Hf(`invalid`,t),on(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||tp(t.textContent,n)?(r.popover!=null&&(Hf(`beforetoggle`,t),Hf(`toggle`,t)),r.onScroll!=null&&Hf(`scroll`,t),r.onScrollEnd!=null&&Hf(`scrollend`,t),r.onClick!=null&&(t.onclick=hn),t=!0):t=!1,t||Qi(e,!0)}function ea(e){for(q=e.return;q;)switch(q.tag){case 5:case 31:case 13:Xi=!1;return;case 27:case 3:Xi=!0;return;default:q=q.return}}function ta(e){if(e!==q)return!1;if(!Ji)return ea(e),Ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||hp(e.type,e.memoizedProps)),n=!n),n&&qi&&Qi(e),ea(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=pm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=pm(e)}else t===27?(t=qi,wp(e.type)?(e=fm,fm=null,qi=e):qi=t):qi=q?dm(e.stateNode.nextSibling):null;return!0}function na(){qi=q=null,Ji=!1}function ra(){var e=Yi;return e!==null&&(dd===null?dd=e:dd.push.apply(dd,e),Yi=null),e}function ia(e){Yi===null?Yi=[e]:Yi.push(e)}var aa=be(null),oa=null,sa=null;function ca(e,t,n){Se(aa,t._currentValue),t._currentValue=n}function la(e){e._currentValue=aa.current,xe(aa)}function ua(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function da(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ua(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ua(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ua(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function fa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;jr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===N.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[lh]:e.push(lh))}a=a.return}return e!==null&&da(t,e,n,r),t.flags|=262144,e!==null}function pa(e){for(e=e.firstContext;e!==null;){if(!jr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ma(e){oa=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ha(e){return _a(oa,e)}function ga(e,t){return oa===null&&ma(e),_a(e,t)}function _a(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},sa===null){if(e===null)throw Error(i(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return n}var va=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ya=t.unstable_scheduleCallback,ba=t.unstable_NormalPriority,xa={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sa(){return{controller:new va,data:new Map,refCount:0}}function Ca(e){e.refCount--,e.refCount===0&&ya(ba,function(){e.controller.abort()})}function wa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ta=null;function Ea(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Da=null,Oa=0,ka=0,Aa=null;function ja(e,t){if(Da===null){var n=Da=[];Oa=0,ka=Pf(),Aa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Oa++,t.then(Ma,Ma),t}function Ma(){if(--Oa===0&&(Ta=null,Da!==null)){Aa!==null&&(Aa.status=`fulfilled`);var e=Da;Da=null,ka=0,Aa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Na(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Pa=M.S;M.S=function(e,t){if(md=Be(),typeof t==`object`&&t&&typeof t.then==`function`&&ja(e,t),Ta!==null)for(var n=bf;n!==null;)wa(n,Ta),n=n.next;if(n=e.types,n!==null){for(var r=bf;r!==null;)wa(r,n),r=r.next;if(ka!==0){r=Ta,r===null&&(r=Ta=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Pa!==null&&Pa(e,t)};var Fa=be(null);function Ia(){var e=Fa.current;return e===null?Ju.pooledCache:e}function La(e,t){t===null?Se(Fa,Fa.current):Se(Fa,t.pool)}function Ra(){var e=Ia();return e===null?null:{parent:xa._currentValue,pool:e}}var za=Error(i(460)),Ba=Error(i(474)),Va=Error(i(542)),Ha={then:function(){}};function Ua(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(hn,hn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ja(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(hn,hn);else{if(e=Ju,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ja(e),e}throw Ka=t,za}}function Ga(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ka=e,za):e}}var Ka=null;function qa(){if(Ka===null)throw Error(i(459));var e=Ka;return Ka=null,e}function Ja(e){if(e===za||e===Va)throw Error(i(483))}var Ya=null,Xa=0;function Za(e){var t=Xa;return Xa+=1,Ya===null&&(Ya=[]),Wa(Ya,e,t)}function Qa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function $a(e,t){throw t.$$typeof===T?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function eo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=wi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Oi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===te?(e=d(e,t,n.props.children,r,n.key),Qa(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===se&&Ga(i)===t.type)?(t=a(t,n.props),Qa(t,n),t.return=e,t):(t=Ei(n.type,n.key,n.props,null,e.mode,r),Qa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ai(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Di(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Oi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case E:return n=Ei(t.type,t.key,t.props,null,e.mode,n),Qa(n,t),n.return=e,n;case ee:return t=Ai(t,e.mode,n),t.return=e,t;case se:return t=Ga(t),f(e,t,n)}if(j(t)||me(t))return t=Di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Za(t),n);if(t.$$typeof===O)return f(e,ga(e,t),n);$a(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case E:return n.key===i?l(e,t,n,r):null;case ee:return n.key===i?u(e,t,n,r):null;case se:return n=Ga(n),p(e,t,n,r)}if(j(n)||me(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Za(n),r);if(n.$$typeof===O)return p(e,t,ga(e,n),r);$a(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case E:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case ee:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case se:return r=Ga(r),m(e,t,n,r,i)}if(j(r)||me(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Za(r),i);if(r.$$typeof===O)return m(e,t,n,ga(t,r),i);$a(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ji&&Hi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ji&&Hi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ji&&Hi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ji&&Hi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ji&&Hi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ji&&Hi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===te&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case E:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===te){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),Qa(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===se&&Ga(l)===r.type){n(e,r.sibling),c=a(r,o.props),Qa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===te?(c=Di(o.props.children,e.mode,c,o.key),Qa(c,o),c.return=e,e=c):(c=Ei(o.type,o.key,o.props,null,e.mode,c),Qa(c,o),c.return=e,e=c)}return s(e);case ee:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ai(o,e.mode,c),c.return=e,e=c}return s(e);case se:return o=Ga(o),_(e,r,o,c)}if(j(o))return h(e,r,o,c);if(me(o)){if(l=me(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,Za(o),c);if(o.$$typeof===O)return _(e,r,ga(e,o),c);$a(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Oi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Xa=0;var i=_(e,t,n,r);return Ya=null,i}catch(t){if(t===za||t===Va)throw t;var a=Si(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var to=eo(!0),no=eo(!1),ro=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function oo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function so(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,qu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=yi(e),vi(e,null,n),t}return hi(e,r,t,n),yi(e)}function co(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ht(e,n)}}function lo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var uo=!1;function fo(){if(uo){var e=Aa;if(e!==null)throw e}}function po(e,t,n,r){uo=!1;var i=e.updateQueue;ro=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Zu&f)===f:(r&f)===f){f!==0&&f===ka&&(uo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=w({},d,f);break a;case 2:ro=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ad|=o,e.lanes=o,e.memoizedState=d}}function mo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function ho(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)mo(n[e],t)}var go=be(null),_o=be(0);function vo(e,t){e=rd,Se(_o,e),Se(go,t),rd=e|t.baseLanes}function yo(){Se(_o,rd),Se(go,go.current)}function bo(){rd=_o.current,xe(go),xe(_o)}var xo=be(null),So=null;function Co(e){var t=e.alternate;Se(Oo,Oo.current&1),Se(xo,e),So===null&&(t===null||go.current!==null||t.memoizedState!==null)&&(So=e)}function wo(e){Se(Oo,Oo.current),Se(xo,e),So===null&&(So=e)}function To(e){e.tag===22?(Se(Oo,Oo.current),Se(xo,e),So===null&&(So=e)):Eo()}function Eo(){Se(Oo,Oo.current),Se(xo,xo.current)}function Do(e){xe(xo),So===e&&(So=null),xe(Oo)}var Oo=be(0);function ko(e,t){Se(xo,xo.current),Se(Oo,t)}function Ao(e){xe(Oo),xe(xo),So===e&&(So=null)}function jo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cm(n)||lm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Mo=0,No=null,Po=null,Fo=null,Io=!1,Lo=!1,Ro=!1,zo=0,Bo=0,Vo=null,Ho=0;function Uo(){throw Error(i(321))}function Wo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jr(e[n],t[n]))return!1;return!0}function Go(e,t,n,r,i,a){return Mo=a,No=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?cc:lc,Ro=!1,a=n(r,i),Ro=!1,Lo&&(a=qo(t,n,r,i)),Ko(e),a}function Ko(e){M.H=sc;var t=Po!==null&&Po.next!==null;if(Mo=0,Fo=Po=No=null,Io=!1,Bo=0,Vo=null,t)throw Error(i(300));e===null||Ec||(e=e.dependencies,e!==null&&pa(e)&&(Ec=!0))}function qo(e,t,n,r){No=e;var a=0;do{if(Lo&&(Vo=null),Bo=0,Lo=!1,25<=a)throw Error(i(301));if(a+=1,Fo=Po=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=uc,o=t(n,r)}while(Lo);return o}function Jo(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?ts(t):t,e=e.useState()[0],(Po===null?null:Po.memoizedState)!==e&&(No.flags|=1024),t}function Yo(){var e=zo!==0;return zo=0,e}function Xo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Zo(e){if(Io){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Io=!1}Mo=0,Fo=Po=No=null,Lo=!1,Bo=zo=0,Vo=null}function Qo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e,Fo}function $o(){if(Po===null){var e=No.alternate;e=e===null?null:e.memoizedState}else e=Po.next;var t=Fo===null?No.memoizedState:Fo.next;if(t!==null)Fo=t,Po=e;else{if(e===null)throw No.alternate===null?Error(i(467)):Error(i(310));Po=e,e={memoizedState:Po.memoizedState,baseState:Po.baseState,baseQueue:Po.baseQueue,queue:Po.queue,next:null},Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e}return Fo}function es(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ts(e){var t=Bo;return Bo+=1,Vo===null&&(Vo=[]),e=Wa(Vo,e,t),t=No,(Fo===null?t.memoizedState:Fo.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?cc:lc),e}function ns(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ts(e);if(e.$$typeof===fe)return;if(e.$$typeof===O)return ha(e)}throw Error(i(438,String(e)))}function rs(e){var t=null,n=No.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=No.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=es(),No.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ue;return t.index++,n}function is(e,t){return typeof t==`function`?t(e):t}function as(e){return os($o(),Po,e)}function os(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Mo&f)===f:(Zu&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ka&&(d=!0);else if((Mo&p)===p){u=u.next,p===ka&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,No.lanes|=p,ad|=p;f=u.action,Ro&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,No.lanes|=f,ad|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!jr(o,e.memoizedState)&&(Ec=!0,d&&(n=Aa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ss(e){var t=$o(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);jr(o,t.memoizedState)||(Ec=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function cs(e,t,n){var r=No,a=$o(),o=Ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!jr((Po||a).memoizedState,n);if(s&&(a.memoizedState=n,Ec=!0),a=a.queue,Ns(ds.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Fo!==null&&!!(Fo.memoizedState.tag&1),Os(e?9:8,{destroy:void 0},us.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Ju===null)throw Error(i(349));o||Mo&127||ls(r,t,n)}return n}function ls(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=No.updateQueue,t===null?(t=es(),No.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function us(e,t,n,r){t.value=n,t.getSnapshot=r,fs(t)&&ps(e)}function ds(e,t,n){return n(function(){fs(t)&&ps(e)})}function fs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jr(e,n)}catch{return!0}}function ps(e){var t=_i(e,2);t!==null&&Nd(t,e,2)}function ms(e){var t=Qo();if(typeof e==`function`){var n=e;if(e=n(),Ro){Ze(!0);try{n()}finally{Ze(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:e},t}function hs(e,t,n,r){return e.baseState=n,os(e,Po,typeof r==`function`?r:is)}function gs(e,t,n,r,a){if(ic(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,_s(t,o)):(o.next=n.next,t.pending=n.next=o)}}function _s(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};o.types=a===null?null:a.types,M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),vs(e,t,s)}catch(n){bs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),vs(e,t,a)}catch(n){bs(e,t,n)}}function vs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ys(e,t,n)},function(n){return bs(e,t,n)}):ys(e,t,n)}function ys(e,t,n){t.status=`fulfilled`,t.value=n,xs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,_s(e,n)))}function bs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,xs(t),t=t.next;while(t!==r)}e.action=null}function xs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ss(e,t){return t}function Cs(e,t){if(Ji){var n=Ju.formState;if(n!==null){a:{var r=No;if(Ji){if(qi){b:{for(var i=qi,a=Xi;i.nodeType!==8;)if(!a||(i=dm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){qi=dm(i.nextSibling),r=i.data===`F!`;break a}}Qi(r)}r=!1}r&&(t=n[0])}}return n=Qo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:t},n.queue=r,n=tc.bind(null,No,r),r.dispatch=n,r=ms(!1),a=rc.bind(null,No,!1,r.queue),r=Qo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=gs.bind(null,No,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ws(e){return Ts($o(),Po,e)}function Ts(e,t,n){if(t=os(e,t,Ss)[0],e=as(is)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ts(t)}catch(e){throw e===za?Va:e}else r=t;t=$o();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(No.flags|=2048,Os(9,{destroy:void 0},Es.bind(null,i,n),null)),[r,a,e]}function Es(e,t){e.action=t}function Ds(e){var t=$o(),n=Po;if(n!==null)return Ts(t,n,e);$o(),t=t.memoizedState,n=$o();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=No.updateQueue,t===null&&(t=es(),No.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ks(){return $o().memoizedState}function As(e,t,n,r){var i=Qo();No.flags|=e,i.memoizedState=Os(1|t,{destroy:void 0},n,r===void 0?null:r)}function js(e,t,n,r){var i=$o();r=r===void 0?null:r;var a=i.memoizedState.inst;Po!==null&&r!==null&&Wo(r,Po.memoizedState.deps)?i.memoizedState=Os(t,a,n,r):(No.flags|=e,i.memoizedState=Os(1|t,a,n,r))}function Ms(e,t){As(8390656,8,e,t)}function Ns(e,t){js(2048,8,e,t)}function Ps(e){No.flags|=4;var t=No.updateQueue;if(t===null)t=es(),No.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Fs(e){var t=$o().memoizedState;return Ps({ref:t,nextImpl:e}),function(){if(qu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Is(e,t){return js(4,2,e,t)}function Ls(e,t){return js(4,4,e,t)}function Rs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function zs(e,t,n){n=n==null?null:n.concat([e]),js(4,4,Rs.bind(null,t,e),n)}function Bs(){}function Vs(e,t){var n=$o();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Wo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Hs(e,t){var n=$o();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Wo(t,r[1]))return r[0];if(r=e(),Ro){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[r,t],r}function Us(e,t,n){return n===void 0||Mo&1073741824&&!(Zu&261930)?e.memoizedState=t:(e.memoizedState=n,e=jd(),No.lanes|=e,ad|=e,n)}function Ws(e,t,n,r){return jr(n,t)?n:go.current===null?!(Mo&106)||Mo&1073741824&&!(Zu&261930)?(Ec=!0,e.memoizedState=n):(e=jd(),No.lanes|=e,ad|=e,t):(e=Us(e,n,r),jr(e,t)||(Ec=!0),e)}function Gs(e,t,n,r,i){var a=ge.p;ge.p=a!==0&&8>a?a:8;var o=M.T,s={};s.types=o===null?null:o.types,M.T=s,rc(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?nc(e,t,Na(c,r),Ad(e)):nc(e,t,r,Ad(e))}catch(n){nc(e,t,{then:function(){},status:`rejected`,reason:n},Ad())}finally{ge.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function Ks(){}function qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Js(e).queue;Gs(e,a,t,_e,n===null?Ks:function(){return Ys(e),n(r)})}function Js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:_e,baseState:_e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:_e},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ys(e){var t=Js(e);t.next===null&&(t=e.alternate.memoizedState),nc(e,t.next.queue,{},Ad())}function Xs(){return ha(lh)}function Zs(){return $o().memoizedState}function Qs(){return $o().memoizedState}function $s(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ad();e=oo(n);var r=so(t,e,n);r!==null&&(Nd(r,t,n),co(r,t,n)),t={cache:Sa()},e.payload=t;return}t=t.return}}function ec(e,t,n){var r=Ad();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ic(e)?ac(t,n):(n=gi(e,t,n,r),n!==null&&(Nd(n,e,r),oc(n,t,r)))}function tc(e,t,n){nc(e,t,n,Ad())}function nc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ic(e))ac(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,jr(s,o))return hi(e,t,i,0),Ju===null&&mi(),!1}catch{}if(n=gi(e,t,i,r),n!==null)return Nd(n,e,r),oc(n,t,r),!0}return!1}function rc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ic(e)){if(t)throw Error(i(479))}else t=gi(e,n,r,2),t!==null&&Nd(t,e,2)}function ic(e){var t=e.alternate;return e===No||t!==null&&t===No}function ac(e,t){Lo=Io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function oc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ht(e,n)}}var sc={readContext:ha,use:ns,useCallback:Uo,useContext:Uo,useEffect:Uo,useImperativeHandle:Uo,useLayoutEffect:Uo,useInsertionEffect:Uo,useMemo:Uo,useReducer:Uo,useRef:Uo,useState:Uo,useDebugValue:Uo,useDeferredValue:Uo,useTransition:Uo,useSyncExternalStore:Uo,useId:Uo,useHostTransitionStatus:Uo,useFormState:Uo,useActionState:Uo,useOptimistic:Uo,useMemoCache:Uo,useCacheRefresh:Uo,useEffectEvent:Uo},cc={readContext:ha,use:ns,useCallback:function(e,t){return Qo().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:Ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),As(4194308,4,Rs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return As(4194308,4,e,t)},useInsertionEffect:function(e,t){As(4,2,e,t)},useMemo:function(e,t){var n=Qo();t=t===void 0?null:t;var r=e();if(Ro){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Qo();if(n!==void 0){var i=n(t);if(Ro){Ze(!0);try{n(t)}finally{Ze(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ec.bind(null,No,e),[r.memoizedState,e]},useRef:function(e){var t=Qo();return e={current:e},t.memoizedState=e},useState:function(e){e=ms(e);var t=e.queue,n=tc.bind(null,No,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Bs,useDeferredValue:function(e,t){return Us(Qo(),e,t)},useTransition:function(){var e=ms(!1);return e=Gs.bind(null,No,e.queue,!0,!1),Qo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=No,a=Qo();if(Ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ju===null)throw Error(i(349));Zu&127||ls(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ms(ds.bind(null,r,o,e),[e]),r.flags|=2048,Os(9,{destroy:void 0},us.bind(null,r,o,n,t),null),n},useId:function(){var e=Qo(),t=Ju.identifierPrefix;if(Ji){var n=Vi,r=Bi;n=(r&~(1<<32-Qe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=zo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Xs,useFormState:Cs,useActionState:Cs,useOptimistic:function(e){var t=Qo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=rc.bind(null,No,!0,n),n.dispatch=t,[e,t]},useMemoCache:rs,useCacheRefresh:function(){return Qo().memoizedState=$s.bind(null,No)},useEffectEvent:function(e){var t=Qo(),n={impl:e};return t.memoizedState=n,function(){if(qu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},lc={readContext:ha,use:ns,useCallback:Vs,useContext:ha,useEffect:Ns,useImperativeHandle:zs,useInsertionEffect:Is,useLayoutEffect:Ls,useMemo:Hs,useReducer:as,useRef:ks,useState:function(){return as(is)},useDebugValue:Bs,useDeferredValue:function(e,t){return Ws($o(),Po.memoizedState,e,t)},useTransition:function(){var e=as(is)[0],t=$o().memoizedState;return[typeof e==`boolean`?e:ts(e),t]},useSyncExternalStore:cs,useId:Zs,useHostTransitionStatus:Xs,useFormState:ws,useActionState:ws,useOptimistic:function(e,t){return hs($o(),Po,e,t)},useMemoCache:rs,useCacheRefresh:Qs,useEffectEvent:Fs},uc={readContext:ha,use:ns,useCallback:Vs,useContext:ha,useEffect:Ns,useImperativeHandle:zs,useInsertionEffect:Is,useLayoutEffect:Ls,useMemo:Hs,useReducer:ss,useRef:ks,useState:function(){return ss(is)},useDebugValue:Bs,useDeferredValue:function(e,t){var n=$o();return Po===null?Us(n,e,t):Ws(n,Po.memoizedState,e,t)},useTransition:function(){var e=ss(is)[0],t=$o().memoizedState;return[typeof e==`boolean`?e:ts(e),t]},useSyncExternalStore:cs,useId:Zs,useHostTransitionStatus:Xs,useFormState:Ds,useActionState:Ds,useOptimistic:function(e,t){var n=$o();return Po===null?(n.baseState=e,[e,n.queue.dispatch]):hs(n,Po,e,t)},useMemoCache:rs,useCacheRefresh:Qs,useEffectEvent:Fs};function dc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:w({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=oo(r);i.payload=t,n!=null&&(i.callback=n),t=so(e,i,r),t!==null&&(Nd(t,e,r),co(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=oo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=so(e,i,r),t!==null&&(Nd(t,e,r),co(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ad(),r=oo(n);r.tag=2,t!=null&&(r.callback=t),t=so(e,r,n),t!==null&&(Nd(t,e,n),co(t,e,n))}};function pc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Mr(n,r)||!Mr(i,a):!0}function mc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&fc.enqueueReplaceState(t,t.state,null)}function hc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=w({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function gc(e){ui(e)}function _c(e){console.error(e)}function vc(e){ui(e)}function yc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function bc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function xc(e,t,n){return n=oo(n),n.tag=3,n.payload={element:null},n.callback=function(){yc(e,t)},n}function Sc(e){return e=oo(e),e.tag=3,e}function Cc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){bc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){bc(t,n,r),typeof i!=`function`&&(_d===null?_d=new Set([this]):_d.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function wc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&fa(t,n,a,!0),n=xo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return So===null?Gd():n.alternate===null&&id===0&&(id=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ha?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),mf(e,r,a)),!1;case 22:return n.flags|=65536,r===Ha?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),mf(e,r,a)),!1}throw Error(i(435,n.tag))}return mf(e,r,a),Gd(),!1}if(Ji)return t=xo.current,t===null?(r!==Zi&&(t=Error(i(423),{cause:r}),ia(Mi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Mi(r,n),a=xc(e.stateNode,r,a),lo(e,a),id!==4&&(id=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Zi&&(e=Error(i(422),{cause:r}),ia(Mi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Mi(o,n),ud===null?ud=[o]:ud.push(o),id!==4&&(id=2),t===null)return!0;r=Mi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=xc(n.stateNode,r,e),lo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(_d===null||!_d.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Sc(a),Cc(a,e,n,r),lo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Tc=Error(i(461)),Ec=!1;function Dc(e,t,n,r){t.child=e===null?no(t,null,n,r):to(t,e.child,n,r)}function Oc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ma(t),r=Go(e,t,n,o,a,i),s=Yo(),e!==null&&!Ec?(Xo(e,t,i),nl(e,t,i)):(Ji&&s&&Wi(t),t.flags|=1,Dc(e,t,r,i),t.child)}function kc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ci(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Ac(e,t,a,r,i)):(e=Ei(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!rl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Mr:n,n(o,r)&&e.ref===t.ref)return nl(e,t,i)}return t.flags|=1,e=wi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Mr(a,r)&&e.ref===t.ref){if(Ec=!1,t.pendingProps=r=a,rl(e,i))e.flags&131072&&(Ec=!0);else return t.lanes=e.lanes,nl(e,t,i)}}return Rc(e,t,n,r,i)}function jc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Nc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&La(t,a===null?null:a.cachePool),a===null?yo():vo(t,a),To(t);else return r=t.lanes=536870912,Nc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&La(t,null),yo(),Eo()):(La(t,a.cachePool),vo(t,a),Eo(),t.memoizedState=null);return Dc(e,t,i,n),t.child}function Mc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Nc(e,t,n,r,i){var a=Ia();return a=a===null?null:{parent:xa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&La(t,null),yo(),To(t),e!==null&&fa(e,t,r,!0),t.childLanes=i,null}function Pc(e,t){return t=qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Fc(e,t,n){return to(t,e.child,null,n),e=Pc(t,t.pendingProps),e.flags|=2,Do(t),t.memoizedState=null,e}function Ic(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Ji){if(r.mode===`hidden`)return e=Pc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Mc(null,e);if(wo(t),(e=qi)?(e=sm(e,Xi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi===null?null:{id:Bi,overflow:Vi},retryLane:536870912,hydrationErrors:null},n=ki(e),n.return=t,t.child=n,q=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=536870912,null}return Pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(wo(t),a){if(t.flags&256)t.flags&=-257,t=Fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Ec||fa(e,t,n,!1),a=(n&e.childLanes)!==0,Ec||a){if(go.current===null){if(r=Ju,r!==null&&(s=gt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,_i(e,s),Nd(r,e,s),Tc;Gd()}t=Fc(e,t,n)}else e=o.treeContext,qi=dm(s.nextSibling),q=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Ki(t,e),t=Pc(t,r),t.flags|=134221824;return t}return e=wi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Lc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Rc(e,t,n,r,i){return ma(t),n=Go(e,t,n,r,void 0,i),r=Yo(),e!==null&&!Ec?(Xo(e,t,i),nl(e,t,i)):(Ji&&r&&Wi(t),t.flags|=1,Dc(e,t,n,i),t.child)}function zc(e,t,n,r,i,a){return ma(t),t.updateQueue=null,n=qo(t,r,n,i),Ko(e),r=Yo(),e!==null&&!Ec?(Xo(e,t,a),nl(e,t,a)):(Ji&&r&&Wi(t),t.flags|=1,Dc(e,t,n,a),t.child)}function Bc(e,t,n,r,i){if(ma(t),t.stateNode===null){var a=bi,o=n.contextType;typeof o==`object`&&o&&(a=ha(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=fc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},io(t),o=n.contextType,a.context=typeof o==`object`&&o?ha(o):bi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(dc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&fc.enqueueReplaceState(a,a.state,null),po(t,r,a,i),fo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=hc(n,s);a.props=c;var l=a.context,u=n.contextType;o=bi,typeof u==`object`&&u&&(o=ha(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&mc(t,a,r,o),ro=!1;var f=t.memoizedState;a.state=f,po(t,r,a,i),fo(),l=t.memoizedState,s||f!==l||ro?(typeof d==`function`&&(dc(t,n,d,r),l=t.memoizedState),(c=ro||pc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ao(e,t),o=t.memoizedProps,u=hc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=bi,typeof l==`object`&&l&&(c=ha(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&mc(t,a,r,c),ro=!1,f=t.memoizedState,a.state=f,po(t,r,a,i),fo();var p=t.memoizedState;o!==d||f!==p||ro||e!==null&&e.dependencies!==null&&pa(e.dependencies)?(typeof s==`function`&&(dc(t,n,s,r),p=t.memoizedState),(u=ro||pc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&pa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Lc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=to(t,e.child,null,i),t.child=to(t,null,n,i)):Dc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=nl(e,t,i),e}function Vc(e,t,n,r){return na(),t.flags|=256,Dc(e,t,n,r),t.child}var Hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Uc(e){return{baseLanes:e,cachePool:Ra()}}function Wc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=cd),e}function Gc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Oo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(Ji){if(i?Co(t):Eo(),(e=qi)?(e=sm(e,Xi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi===null?null:{id:Bi,overflow:Vi},retryLane:536870912,hydrationErrors:null},n=ki(e),n.return=t,t.child=n,q=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=lm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Eo(),i=t.mode,a=qc({mode:`hidden`,children:a},i),r=Di(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Uc(n),r.childLanes=Wc(e,o,n),t.memoizedState=Hc,Mc(null,r)):(Co(t),Kc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Yc(e,t,a,o,r,c,s,n)}return i?(Eo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=wi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Di(i,a,n,null),i.flags|=2):i=wi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Mc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Uc(n):(a=i.cachePool,a===null?a=Ra():(s=xa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Wc(e,o,n),t.memoizedState=Hc,Mc(e.child,r)):(Co(t),n=e.child,e=n.sibling,n=wi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Kc(e,t){return t=qc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function qc(e,t){return e=Si(22,e,null,t),e.lanes=0,e}function Jc(e,t,n){return to(t,e.child,null,n),e=Kc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Co(t),t.flags&=-257,Jc(e,t,c)):t.memoizedState===null?(Eo(),o=a.fallback,s=t.mode,a=qc({mode:`visible`,children:a.children},s),o=Di(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,to(t,e.child,null,c),a=t.child,a.memoizedState=Uc(c),a.childLanes=Wc(e,r,c),t.memoizedState=Hc,Mc(null,a)):(Eo(),t.child=e.child,t.flags|=128,null);if(Co(t),lm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ia({value:a,source:null,stack:null})),Jc(e,t,c)}if(Ec||fa(e,t,c,!1),r=(c&e.childLanes)!==0,Ec||r){if(go.current!==null)return Jc(e,t,c);if(r=Ju,r!==null&&(a=gt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,_i(e,a),Nd(r,e,a),Tc;return cm(o)||Gd(),Jc(e,t,c)}return cm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,qi=dm(o.nextSibling),q=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Ki(t,e),t=Kc(t,a.children),t.flags|=134221824,t)}function Xc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ua(e.return,t,n)}function Zc(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&jo(n)===null&&(t=e),e=e.sibling}return t}function Qc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function $c(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function el(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Oo.current;if(t.flags&128)return ko(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,ko(t,o),i===`backwards`&&e!==null?($c(e),Dc(e,t,r,n),$c(e)):Dc(e,t,r,n),r=Ji?Ii:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xc(e,n,t);else if(e.tag===19)Xc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=Zc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,$c(t)),Qc(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&jo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Qc(t,!0,n,null,a,r);break;case`together`:Qc(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=Zc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Qc(t,!1,i,n,a,r)}return t.child}function tl(e,t,n){var r=t.pendingProps;return ca(t,t.type,r.value),Dc(e,t,r.children,n),t.child}function nl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ad|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(fa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=wi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function rl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&pa(e)))}function il(e,t,n){switch(t.tag){case 3:P(t,t.stateNode.containerInfo),ca(t,xa,e.memoizedState.cache),na();break;case 27:case 5:De(t);break;case 4:P(t,t.stateNode.containerInfo);break;case 10:ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,wo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Co(t),t.flags|=128,null;r=fa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Gc(e,t,n):(Co(t),e=nl(e,t,n),e===null?null:e.sibling)}Co(t);break;case 19:if(t.flags&128)return el(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(fa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return el(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ko(t,Oo.current),r)break;return null;case 22:return t.lanes=0,jc(e,t,n,t.pendingProps);case 24:ca(t,xa,e.memoizedState.cache)}return nl(e,t,n)}function al(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Ec=!0;else{if(!rl(e,n)&&!(t.flags&128))return Ec=!1,il(e,t,n);Ec=!!(e.flags&131072)}}else Ec=!1,Ji&&t.flags&1048576&&Ui(t,Ii,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ga(t.elementType),t.type=e,typeof e==`function`)Ci(e)?(r=hc(e,r),t.tag=1,t=Bc(null,t,e,r,n)):(t.tag=0,t=Rc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ie){t.tag=11,t=Oc(null,t,e,r,n);break a}if(a===k){t.tag=14,t=kc(null,t,e,r,n);break a}if(a===O){t.tag=10,t.type=e,t=tl(null,t,n);break a}}throw t=A(e)||e,Error(i(306,t,``))}}return t;case 0:return Rc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=hc(r,t.pendingProps),Bc(e,t,r,a,n);case 3:a:{if(P(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,ao(e,t),po(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ca(t,xa,r),r!==o.cache&&da(t,[xa],n,!0),fo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Vc(e,t,r,n);break a}if(r!==a){a=Mi(Error(i(424)),t),ia(a),t=Vc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(qi=dm(e.firstChild),q=t,Ji=!0,Yi=null,Xi=!0,n=no(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(na(),r===a){t=nl(e,t,n);break a}Dc(e,t,r,n)}t=t.child}return t;case 26:return Lc(e,t),e===null?(n=Fm(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ji||(t.stateNode=mp(t.type,t.pendingProps,Te.current,t)):t.memoizedState=Fm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return De(t),e===null&&Ji&&(r=t.stateNode=_m(t.type,t.pendingProps,Te.current),q=t,Xi=!0,a=qi,wp(t.type)?(fm=a,qi=dm(r.firstChild)):qi=a),Dc(e,t,t.pendingProps.children,n),Lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ji&&((a=r=qi)&&(r=am(r,t.type,t.pendingProps,Xi),r===null?a=!1:(t.stateNode=r,q=t,qi=dm(r.firstChild),Xi=!1,a=!0)),a||Qi(t)),De(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,hp(a,o)?r=null:s!==null&&hp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Go(e,t,Jo,null,null,n),lh._currentValue=a),Lc(e,t),Dc(e,t,r,n),t.child;case 6:return e===null&&Ji&&((e=n=qi)&&(n=om(n,t.pendingProps,Xi),n===null?e=!1:(t.stateNode=n,q=t,qi=null,e=!0)),e||Qi(t)),null;case 13:return Gc(e,t,n);case 4:return P(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=to(t,null,r,n):Dc(e,t,r,n),t.child;case 11:return Oc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Lc(e,t),Dc(e,t,r,n),t.child;case 8:return Dc(e,t,t.pendingProps.children,n),t.child;case 12:return Dc(e,t,t.pendingProps.children,n),t.child;case 10:return tl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ma(t),a=ha(a),r=r(a),t.flags|=1,Dc(e,t,r,n),t.child;case 14:return kc(e,t,t.type,t.pendingProps,n);case 15:return Ac(e,t,t.type,t.pendingProps,n);case 19:return el(e,t,n);case 31:return Ic(e,t,n);case 22:return jc(e,t,n,t.pendingProps);case 24:return ma(t),r=ha(xa),e===null?(a=Ia(),a===null&&(a=Ju,o=Sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},io(t),ca(t,xa,a)):((e.lanes&n)!==0&&(ao(e,t),po(t,null,null,n),fo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ca(t,xa,r),r!==a.cache&&da(t,[xa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ca(t,xa,r))),Dc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:Ji&&Wi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Lc(e,t),Dc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ol(e){e.flags|=4}function sl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Xm(t,r):Xm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Hd())e.flags|=8192;else throw Ka=Ha,Ba}}else e.flags&=-16777217}function cl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Zm(t)){if(Hd())e.flags|=8192;else throw Ka=Ha,Ba}}function ll(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ut(),e.lanes|=t,ld|=t)}function ul(e,t){if(!Ji)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function dl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function fl(e,t,n){var r=t.pendingProps;switch(Gi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dl(t),null;case 1:return dl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),la(xa),Ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ta(t)?ol(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ra())),dl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(ol(t),o===null?(dl(t),sl(t,a,null,r,n)):(dl(t),cl(t,o))):o?o===e.memoizedState?(dl(t),t.flags&=-16777217):(ol(t),dl(t),cl(t,o)):(e=e.memoizedProps,e!==r&&ol(t),dl(t),sl(t,a,e,r,n)),null;case 27:if(Oe(t),n=Te.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ol(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return dl(t),t.subtreeFlags&=-33554433,null}e=Ce.current,ta(t)?$i(t,e):(e=_m(a,r,n),t.stateNode=e,ol(t))}return dl(t),t.subtreeFlags&=-33554433,null;case 5:if(Oe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ol(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return dl(t),t.subtreeFlags&=-33554433,null}if(o=Ce.current,ta(t))$i(t,o);else{var s=dp(Te.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[St]=t,o[Ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(ip(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&ol(t)}}return dl(t),t.subtreeFlags&=-33554433,sl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ol(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Te.current,ta(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=q,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[St]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||tp(e.nodeValue,n)),e||Qi(t,!0)}else e=dp(e).createTextNode(r),e[St]=t,t.stateNode=e}return dl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ta(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[St]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dl(t),e=!1}else n=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Do(t),t):(Do(t),null);if(t.flags&128)throw Error(i(558))}return dl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ta(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[St]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dl(t),a=!1}else a=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Do(t),t):(Do(t),null)}return Do(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ll(t,t.updateQueue),dl(t),null);case 4:return Ee(),e===null&&Gf(t.stateNode.containerInfo),t.flags|=67108864,dl(t),null;case 10:return la(t.type),dl(t),null;case 19:if(Ao(t),r=t.memoizedState,r===null)return dl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)ul(r,!1);else{if(id!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=jo(e),o!==null){for(t.flags|=128,ul(r,!1),e=o.updateQueue,t.updateQueue=e,ll(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ti(n,e),n=n.sibling;return ko(t,Oo.current&1|2),Ji&&Hi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Be()>hd&&(t.flags|=128,a=!0,ul(r,!1),t.lanes=4194304)}}else{if(!a){if(e=jo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ll(t,e),ul(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!Ji)return dl(t),null}else 2*Be()-r.renderingStartTime>hd&&n!==536870912&&(t.flags|=128,a=!0,ul(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Be(),e.sibling=null,o=Oo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||Ji?ko(t,o):(n=o,Se(xo,t),Se(Oo,n),So===null&&(So=t)),Ji&&Hi(t,r.treeForkCount),e}return dl(t),null;case 22:case 23:return Do(t),bo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(dl(t),t.subtreeFlags&6&&(t.flags|=8192)):dl(t),n=t.updateQueue,n!==null&&ll(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&xe(Fa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(xa),dl(t),null;case 25:return null;case 30:return t.flags|=33554432,dl(t),null}throw Error(i(156,t.tag))}function pl(e,t){switch(Gi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(xa),Ee(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Oe(t),null;case 31:if(t.memoizedState!==null){if(Do(t),t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Do(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ao(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ee(),null;case 10:return la(t.type),null;case 22:case 23:return Do(t),bo(),e!==null&&xe(Fa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(xa),null;case 25:return null;default:return null}}function ml(e,t){switch(Gi(t),t.tag){case 3:la(xa),Ee();break;case 26:case 27:case 5:Oe(t);break;case 4:Ee();break;case 31:t.memoizedState!==null&&Do(t);break;case 13:Do(t);break;case 19:Ao(t);break;case 10:la(t.type);break;case 22:case 23:Do(t),bo(),e!==null&&xe(Fa);break;case 24:la(xa)}}function hl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){pf(t,t.return,e)}}function gl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){pf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){pf(t,t.return,e)}}function _l(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ho(t,n)}catch(t){pf(e,e.return,t)}}}function vl(e,t,n){n.props=hc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){pf(e,t,n)}}function yl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=si(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Ip(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Lp(e);f(e.child,!1,em,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){pf(e,t,n)}}function bl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){pf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){pf(e,t,n)}else n.current=null}}function xl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)nm(e.stateNode,t[n])}function Sl(e){for(var t=e.return;t!==null&&(Tl(t)&&nm(e.stateNode,t.stateNode),!wl(t));)t=t.return}function Cl(e){for(var t=e.return;t!==null&&(Tl(t)&&rm(e.stateNode,t.stateNode),!wl(t));)t=t.return}function wl(e){return e.tag===5||e.tag===3||e.tag===27}function Tl(e){return e&&e.tag===7&&e.stateNode!==null}function El(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){pf(e,e.return,t)}}function Dl(e,t,n){try{var r=e.stateNode;op(r,e.type,n,t),r[Ct]=t}catch(t){pf(e,e.return,t)}}function Ol(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wp(e.type)||e.tag===4}function kl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&wp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Al(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=hn)),xl(e,r),R=!0;else if(i!==4&&(i===27&&(xl(e,r),r=null,wp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Al(e,t,n,r),e=e.sibling;e!==null;)Al(e,t,n,r),e=e.sibling}function jl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),xl(e,r),R=!0;else if(i!==4&&(i===27&&(xl(e,r),r=null,wp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(jl(e,t,n,r),e=e.sibling;e!==null;)jl(e,t,n,r),e=e.sibling}function Ml(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ip(t,r,n),t[St]=e,t[Ct]=n}catch(t){pf(e,e.return,t)}}var Nl=!1,Pl=null;function Fl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Nl=!0)}var Il=null;function Ll(){var e=Il;return Il=null,e}var Rl=0;function zl(e,t,n,r,i){return Rl=0,Bl(e.child,t,n,r,i)}function Bl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Ap(o);r.push(s),s.view&&(a=!0)}else a||Ap(o).view&&(a=!0);Nl=!0,Dp(o,Rl===0?t:t+`_`+Rl,n),Rl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Bl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Vl(e,t){for(;e!==null;)e.tag===5?Op(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Vl(e.child,t),e=e.sibling}function Hl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Hl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=li(t.default,t.share),t!==`none`&&(zl(e,n,t,null,!1)||Vl(e.child,!1))}e=e.sibling}}function Ul(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=si(r,n),a=li(r.default,n.paired?r.share:r.enter);a===`none`?Hl(e):zl(e,i,a,null,!1)?(Hl(e),n.paired||t||Md(e,r.onEnter)):Vl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ul(e,t),e=e.sibling;else Hl(e)}function Wl(e){if(Pl!==null&&Pl.size!==0){var t=Pl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=li(n.default,n.share);if(a!==`none`&&(zl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Md(e,n.onShare)):Vl(e.child,!1)),t.delete(r),t.size===0)break}}}Wl(e)}e=e.sibling}}}function Gl(e){if(e.tag===30){var t=e.memoizedProps,n=si(t,e.stateNode),r=Pl===null?void 0:Pl.get(n),i=li(t.default,r===void 0?t.exit:t.share);i!==`none`&&(zl(e,n,i,null,!1)?r===void 0?Md(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Pl.delete(n),Md(e,t.onShare)):Vl(e.child,!1)),Pl!==null&&Wl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Gl(e),e=e.sibling;else Pl!==null&&Wl(e)}function Kl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=si(t,e.stateNode);t=li(t.default,t.update),e.flags&=-5,t!==`none`&&zl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Kl(e);e=e.sibling}}function ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Vl(e.child,!1))}ql(e)}e=e.sibling}}function Jl(e){if(e.tag===30)e.stateNode.paired=null,Vl(e.child,!1),ql(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Jl(e),e=e.sibling;else ql(e)}function Yl(e){for(e=e.child;e!==null;)e.tag===30?Vl(e.child,!1):e.subtreeFlags&33554432&&Yl(e),e=e.sibling}function Xl(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Rl<a.length){var l=a[Rl],u=Ap(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Dp(c,Rl===0?n:n+`_`+Rl,i),s&&e.flags&4||(Il===null&&(Il=[]),Il.push(c,Rl===0?r:r+`_`+Rl,t.memoizedProps)),Rl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Xl(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function Zl(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=si(n,r),a=li(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(jp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Rl=0,i=Xl(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Md(e,n.onUpdate))}else e.subtreeFlags&33554432&&Zl(e,t);e=e.sibling}}var Ql=!1,$l=!1,eu=!1,tu=!1,nu=typeof WeakSet==`function`?WeakSet:Set,ru=null,iu=!1,au=!1,ou=!1,su=!1;function J(e,t,n){if(e=e.containerInfo,lp=vh,e=Lr(e),Rr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(up={focusedElem:e,selectionRange:r},vh=!1,n=(n&335544064)===n,ru=t,t=n?9270:1024;ru!==null;){if(e=ru,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Gl(r[a]);if(e.alternate===null&&e.flags&2)n&&Fl(e),cu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Gl(r),cu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Fl(e),cu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,ru=r):(n&&Kl(e),cu(n))}}Pl=null}function cu(e){for(;ru!==null;){var t=ru,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=hc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){pf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)im(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:im(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=si(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=li(a.default,a.update),a!==`none`&&zl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,ru=r;break}ru=t.return}}function lu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ou(e,n),r&4&&hl(5,n);break;case 1:if(Ou(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){pf(n,n.return,e)}else{var i=hc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){pf(n,n.return,e)}}}r&64&&_l(n),r&512&&yl(n,n.return);break;case 3:if(Ou(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ho(e,t)}catch(e){pf(n,n.return,e)}}break;case 27:t===null&&r&4&&Ml(n);case 26:case 5:Ou(e,n),t===null&&r&4&&El(n),r&512&&yl(n,n.return);break;case 12:Ou(e,n);break;case 31:Ou(e,n),r&4&&vu(e,n);break;case 13:Ou(e,n),r&4&&yu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_f.bind(null,n),um(e,n))));break;case 22:if(r=n.memoizedState!==null||Ql,!r){var a=t!==null&&t.memoizedState!==null||$l;t=Ql,i=$l,Ql=r,($l=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Au(e,n,r)):Ou(e,n),Ql=t,$l=i}break;case 30:Ou(e,n),r&512&&yl(n,n.return);break;case 7:r&512&&yl(n,n.return);default:Ou(e,n)}}function uu(e,t){for(e=e.child;e!==null;)Y(e,t),e=e.sibling}function Y(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){pf(e,e.return,t)}fu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,R=!0}catch(t){pf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Ep(s,!0):Ep(e.stateNode,!1)}catch(t){pf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&uu(e,t);break;default:uu(e,t)}}function fu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:Y(n,r);break a;case 22:n.memoizedState===null&&fu(n,r);break a;default:fu(n,r)}}e=e.sibling}}function pu(e){var t=e.alternate;t!==null&&(e.alternate=null,pu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&L(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var mu=null,hu=!1;function gu(e,t,n){for(n=n.child;n!==null;)_u(e,t,n),n=n.sibling}function _u(e,t,n){if(Xe&&typeof Xe.onCommitFiberUnmount==`function`)try{Xe.onCommitFiberUnmount(Ye,n)}catch{}switch(n.tag){case 26:$l||bl(n,t),gu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!$l&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$l||bl(n,t),Cl(n);var r=mu,i=hu;wp(n.type)&&(mu=n.stateNode,hu=!1),gu(e,t,n),vm(n.stateNode,n.type,n.memoizedProps),mu=r,hu=i;break;case 5:$l||bl(n,t),Cl(n);case 6:if(n.tag===6&&Cl(n),r=mu,i=hu,mu=null,gu(e,t,n),mu=r,hu=i,mu!==null){if(hu)try{(mu.nodeType===9?mu.body:mu.nodeName===`HTML`?mu.ownerDocument.body:mu).removeChild(n.stateNode),R=!0}catch(e){pf(n,t,e)}else try{mu.removeChild(n.stateNode),R=!0}catch(e){pf(n,t,e)}}break;case 18:mu!==null&&(hu?(e=mu,Tp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wh(e)):Tp(mu,n.stateNode));break;case 4:r=mu,i=hu,mu=n.stateNode.containerInfo,hu=!0,gu(e,t,n),mu=r,hu=i;break;case 0:case 11:case 14:case 15:gl(2,n,t),$l||gl(4,n,t),gu(e,t,n);break;case 1:$l||(bl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&vl(n,t,r)),gu(e,t,n);break;case 21:gu(e,t,n);break;case 22:$l=(r=$l)||n.memoizedState!==null,gu(e,t,n),$l=r;break;case 30:bl(n,t),gu(e,t,n);break;case 7:$l||bl(n,t),gu(e,t,n);break;default:gu(e,t,n)}}function vu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wh(e)}catch(e){pf(t,t.return,e)}}}function yu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wh(e)}catch(e){pf(t,t.return,e)}}function bu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nu),t;default:throw Error(i(435,e.tag))}}function xu(e,t){var n=bu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=vf.bind(null,e,t);t.then(r,r)}})}function Su(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(wp(l.type)){mu=l.stateNode,hu=!1;break a}break;case 5:mu=l.stateNode,hu=!1;break a;case 3:case 4:mu=l.stateNode.containerInfo,hu=!0;break a}l=l.return}if(mu===null)throw Error(i(160));_u(s,c,o),mu=null,hu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wu(t,e,n),t=t.sibling}var Cu=null;function wu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Su(t,e,n),X(e),a&4&&(gl(3,e,e.return),hl(3,e),gl(5,e,e.return));break;case 1:Su(t,e,n),X(e),a&512&&($l||r===null||bl(r,r.return)),a&64&&Ql&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Cu,Su(t,e,n),X(e),a&512&&($l||r===null||bl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(Ql)e.stateNode=mp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Ot]||r[St]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ip(r,t,n),r[St]=e,Pt(r),t=r;break a;case`link`:if(o=qm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=qm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[St]=e,Pt(r),t=r}e.stateNode=t}}else Ql||Jm(o,e.type,e.stateNode)}else e.stateNode=Hm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Dl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||$l||t.parentNode.removeChild(t)):a.count--,n===null?Ql||Jm(o,e.type,e.stateNode):Hm(o,n,e.memoizedProps))}break;case 27:Su(t,e,n),X(e),a&512&&($l||r===null||bl(r,r.return)),r!==null&&a&4&&Dl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=eu,eu=!1,Su(t,e,n),eu=o,X(e),a&512&&($l||r===null||bl(r,r.return)),e.flags&32){t=e.stateNode;try{sn(t,``),R=!0}catch(t){pf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Dl(e,t,r===null?t:r.memoizedProps)),a&1024&&(tu=!0);break;case 6:if(Su(t,e,n),X(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,R=!0}catch(t){pf(e,e.return,t)}}break;case 3:if(R=!1,Km=null,o=Cu,Cu=Sm(t.containerInfo),Su(t,e,n),Cu=o,X(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Wh(t.containerInfo)}catch(t){pf(e,e.return,t)}tu&&(tu=!1,Tu(e)),R=!1;break;case 4:a=eu,eu=Ql,r=Wt(),o=Cu,Cu=Sm(e.stateNode.containerInfo),Su(t,e,n),X(e),Cu=o,R&&au&&(ou=!0),R=r,eu=a;break;case 12:Su(t,e,n),X(e);break;case 31:Su(t,e,n),X(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 13:Su(t,e,n),X(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(pd=Be()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=Ql,l=$l,u=eu;Ql=c||o,eu=u||o,$l=l||s,Su(t,e,n),$l=l,eu=u,Ql=c,X(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||Ql||$l||(t=s||$l,n=Ql,r=$l,Ql=o||Ql,$l=t,ku(e,2),Ql=n,$l=r),!o&&eu||uu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,xu(e,n))));break;case 19:Su(t,e,n),X(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 30:a&512&&($l||r===null||bl(r,r.return)),a=Wt(),o=au,s=(n&335544064)===n,c=e.memoizedProps,au=s&&li(c.default,c.update)!==`none`,Su(t,e,n),X(e),s&&r!==null&&R&&(e.flags|=4),au=o,R=a;break;case 21:break;case 7:a&512&&($l||r===null||bl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Su(t,e,n),X(e)}}function X(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Ol(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Tl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(wl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;jl(e,kl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(sn(l,``),n.flags&=-33),jl(e,kl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Al(e,kl(e),u,s);break;default:throw Error(i(161))}}catch(t){pf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,vh=!0,t.reset(),vh=!1),e=e.sibling}}function Eu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Du(t,e),t=t.sibling;else Zl(t,!1)}function Du(e,t){var n=e.alternate;if(n===null)Ul(e,!1);else switch(e.tag){case 3:if(su=iu=!1,Ll(),Eu(t,e),!iu&&!ou){if(e=Il,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Op(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),su=!0}Il=null;break;case 5:Eu(t,e);break;case 4:r=iu,iu=!1,Eu(t,e),iu&&(ou=!0),iu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Eu(t,e):Ul(e,!1));break;case 30:r=iu,i=Ll(),iu=!1,Eu(t,e),iu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=si(a,o),o=si(n.memoizedProps,o);var s=li(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Rl=0,t=Xl(e,n,t,o,s,a,!0),Rl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Md(e,e.memoizedProps.onUpdate),Il=i):i!==null&&(i.push.apply(i,Il),Il=i),iu=e.flags&32?!0:r;break;default:Eu(t,e)}}function Ou(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)lu(e,t.alternate,t),t=t.sibling}function ku(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:gl(4,n,n.return),ku(n,r);break;case 1:bl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&vl(n,n.return,i),ku(n,r);break;case 27:r&2&&vm(n.stateNode,n.type,n.memoizedProps);case 5:bl(n,n.return),n.tag!==5&&n.tag!==27||Cl(n),ku(n,r);break;case 6:Cl(n);break;case 26:bl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||$l||i.parentNode.removeChild(i),ku(n,r);break;case 22:n.memoizedState===null&&ku(n,r);break;case 30:bl(n,n.return),ku(n,r);break;case 7:bl(n,n.return);default:ku(n,r)}e=e.sibling}}function Au(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Au(i,a,n),hl(4,a);break;case 1:if(Au(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){pf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)mo(l[i],c)}catch(e){pf(r,r.return,e)}}s&&o&64&&_l(a),yl(a,a.return);break;case 27:n&2&&Ml(a);case 5:a.tag!==5&&a.tag!==27||Sl(a),Au(i,a,n),s&&r===null&&o&4&&El(a),yl(a,a.return);break;case 6:Sl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||Ql||Jm(Sm(c.ownerDocument),a.type,c),Au(i,a,n),s&&r===null&&o&4&&El(a),yl(a,a.return);break;case 12:Au(i,a,n);break;case 31:Au(i,a,n),s&&o&4&&vu(i,a);break;case 13:Au(i,a,n),s&&o&4&&yu(i,a);break;case 22:a.memoizedState===null&&Au(i,a,n),yl(a,a.return);break;case 30:Au(i,a,n),yl(a,a.return);break;case 7:yl(a,a.return);default:Au(i,a,n)}t=t.sibling}}function ju(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ca(n))}function Mu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e))}function Nu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Pu(e,t,n,r),t=t.sibling;else i&&Yl(t)}function Pu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Jl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Nu(e,t,n,r),a&2048&&hl(9,t);break;case 1:Nu(e,t,n,r);break;case 3:Nu(e,t,n,r),i&&su&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ca(a)));break;case 12:if(a&2048){Nu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){pf(t,t.return,e)}}else Nu(e,t,n,r);break;case 31:Nu(e,t,n,r);break;case 13:Nu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Jl(t),o._visibility&2?Nu(e,t,n,r):(o._visibility|=2,Fu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Jl(s),o._visibility&2?Nu(e,t,n,r):Iu(e,t)),a&2048&&ju(s,t);break;case 24:Nu(e,t,n,r),a&2048&&Mu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Vl(a.child,!0),Vl(t.child,!0))),Nu(e,t,n,r);break;default:Nu(e,t,n,r)}}function Fu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Fu(a,o,s,c,i),hl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Fu(a,o,s,c,i)):u._visibility&2?Fu(a,o,s,c,i):Iu(a,o),i&&l&2048&&ju(o.alternate,o);break;case 24:Fu(a,o,s,c,i),i&&l&2048&&Mu(o.alternate,o);break;default:Fu(a,o,s,c,i)}t=t.sibling}}function Iu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Iu(n,r),i&2048&&ju(r.alternate,r);break;case 24:Iu(n,r),i&2048&&Mu(r.alternate,r);break;default:Iu(n,r)}t=t.sibling}}var Lu=8192;function Ru(e,t,n){if(e.subtreeFlags&Lu)for(e=e.child;e!==null;)zu(e,t,n),e=e.sibling}function zu(e,t,n){switch(e.tag){case 26:Ru(e,t,n),e.flags&Lu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&$m(n,e)):eh(n,Cu,e.memoizedState,e.memoizedProps));break;case 5:Ru(e,t,n),e.flags&Lu&&(e=e.stateNode,(t&335544128)===t&&$m(n,e));break;case 3:case 4:var r=Cu;Cu=Sm(e.stateNode.containerInfo),Ru(e,t,n),Cu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Lu,Lu=16777216,Ru(e,t,n),Lu=r):Ru(e,t,n));break;case 30:if((e.flags&Lu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Pl===null&&(Pl=new Map),Pl.set(r,i)}Ru(e,t,n);break;default:Ru(e,t,n)}}function Bu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Vu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ru=r,Wu(r,e)}Bu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Hu(e),e=e.sibling}function Hu(e){switch(e.tag){case 0:case 11:case 15:Vu(e),e.flags&2048&&gl(9,e,e.return);break;case 3:Vu(e);break;case 12:Vu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Uu(e)):Vu(e);break;default:Vu(e)}}function Uu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ru=r,Wu(r,e)}Bu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:gl(8,t,t.return),Uu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Uu(t));break;default:Uu(t)}e=e.sibling}}function Wu(e,t){for(;ru!==null;){var n=ru;switch(n.tag){case 0:case 11:case 15:gl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ru=r;else a:for(n=e;ru!==null;){r=ru;var i=r.sibling,a=r.return;if(pu(r),r===n){ru=null;break a}if(i!==null){i.return=a,ru=i;break a}ru=a}}}var Gu={getCacheForType:function(e){var t=ha(xa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ha(xa).controller.signal}},Ku=typeof WeakMap==`function`?WeakMap:Map,qu=0,Ju=null,Xu=null,Zu=0,Qu=0,$u=null,ed=!1,td=!1,nd=!1,rd=0,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=null,dd=null,fd=!1,pd=0,md=0,hd=1/0,gd=null,_d=null,vd=0,yd=null,bd=null,xd=0,Sd=0,Cd=null,wd=null,Td=null,Ed=null,Dd=null,Od=0,kd=null;function Ad(){return qu&2&&Zu!==0?Zu&-Zu:M.T===null?yt():Pf()}function jd(){if(cd===0){if(!(Zu&536870912)||Ji){var e=rt;rt<<=1,!(rt&3932160)&&(rt=262144),cd=e}else cd=536870912}return e=xo.current,e!==null&&(e.flags|=32),cd}function Md(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Ip(si(e.memoizedProps,n))),Ed===null&&(Ed=[]),Ed.push(t.bind(null,r))}}function Nd(e,t,n){(e===Ju&&(Qu===2||Qu===9)||e.cancelPendingCommit!==null)&&(Bd(e,0),Ld(e,Zu,cd,!1)),ft(e,n),qu&2&&e===Ju||(e===Ju&&(!(qu&2)&&(od|=n),id===4&&Ld(e,Zu,cd,!1)),Ef(e))}function Pd(e,t,n){if(qu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||st(e,t),a=r?Jd(e,t):Kd(e,t,!0),o=r;do{if(a===0){td&&!r&&Ld(e,t,0,!1);break}if(n=e.current.alternate,o&&!Id(n))a=Kd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ud;var l=c.current.memoizedState.isDehydrated;if(l&&(Bd(c,s).flags|=256),s=Kd(c,s,!1),s!==2&&s!==6){if(nd&&!l){c.errorRecoveryDisabledLanes|=o,od|=o,a=4;break a}o=dd,dd=a,o!==null&&(dd===null?dd=o:dd.push.apply(dd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Bd(e,0),Ld(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Ld(r,t,cd,!ed);break a;case 2:dd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=pd+300-Be(),10<a)){if(Ld(r,t,cd,!ed),ot(r,0,!0)!==0)break a;xd=t,r.timeoutHandle=vp(Fd.bind(null,r,n,dd,gd,fd,t,cd,od,ld,ed,o,`Throttled`,-0,0),a);break a}Fd(r,n,dd,gd,fd,t,cd,od,ld,ed,o,null,-0,0)}break}}while(1);Ef(e)}function Fd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:hn},Pl=null,zu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=ih.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?pd-Be():(a&4194048)===a?md-Be():0,m=nh(d,m),m!==null)?(xd=a,e.cancelPendingCommit=m(tf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Ld(e,a,o,!l)):tf(e,t,a,n,r,i,o,s,c,l,u,d)}function Id(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!jr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ld(e,t,n,r){t=ct(e,t),t&=~sd,t&=~od,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Qe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&mt(e,n,t)}function Rd(){return qu&6?!0:(Df(0,!1),!1)}function zd(){if(Xu!==null){if(Qu===0)var e=Xu.return;else e=Xu,sa=oa=null,Zo(e),Ya=null,Xa=0,e=Xu;for(;e!==null;)ml(e.alternate,e),e=e.return;Xu=null}}function Bd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,yp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xd=0,zd(),Ju=e,Xu=n=wi(e.current,null),Zu=t,Qu=0,$u=null,ed=!1,td=st(e,t),nd=!1,ld=cd=sd=od=ad=id=0,dd=ud=null,fd=!1,rd=ct(e,t),mi(),n}function Vd(e,t){No=null,M.H=sc,t===za||t===Va?(t=qa(),Qu=3):t===Ba?(t=qa(),Qu=4):Qu=t===Tc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,$u=t,Xu===null&&(id=1,yc(e,Mi(t,e.current)))}function Hd(){var e=xo.current;return e===null?!0:(Zu&4194048)===Zu?So===null:(Zu&62914560)===Zu||Zu&536870912?e===So:!1}function Ud(){var e=M.H;return M.H=sc,e===null?sc:e}function Wd(){var e=M.A;return M.A=Gu,e}function Gd(){id=4,ed||(Zu&4194048)!==Zu&&xo.current!==null||(td=!0),!(ad&134217727)&&!(od&134217727)||Ju===null||Ld(Ju,Zu,cd,!1)}function Kd(e,t,n){var r=qu;qu|=2;var i=Ud(),a=Wd();(Ju!==e||Zu!==t)&&(gd=null,Bd(e,t)),t=!1;var o=id;a:do try{if(Qu!==0&&Xu!==null){var s=Xu,c=$u;switch(Qu){case 8:zd(),o=6;break a;case 3:case 2:case 9:case 6:xo.current===null&&(t=!0);var l=Qu;if(Qu=0,$u=null,Qd(e,s,c,l),n&&td){o=0;break a}break;default:l=Qu,Qu=0,$u=null,Qd(e,s,c,l)}}qd(),o=id;break}catch(t){Vd(e,t)}while(1);return t&&e.shellSuspendCounter++,sa=oa=null,qu=r,M.H=i,M.A=a,Xu===null&&(Ju=null,Zu=0,mi()),o}function qd(){for(;Xu!==null;)Xd(Xu)}function Jd(e,t){var n=qu;qu|=2;var r=Ud(),a=Wd();Ju!==e||Zu!==t?(gd=null,hd=Be()+500,Bd(e,t)):td=st(e,t);a:do try{if(Qu!==0&&Xu!==null){t=Xu;var o=$u;b:switch(Qu){case 1:Qu=0,$u=null,Qd(e,t,o,1);break;case 2:case 9:if(Ua(o)){Qu=0,$u=null,Zd(t);break}t=function(){Qu!==2&&Qu!==9||Ju!==e||(Qu=7),Ef(e)},o.then(t,t);break a;case 3:Qu=7;break a;case 4:Qu=5;break a;case 7:Ua(o)?(Qu=0,$u=null,Zd(t)):(Qu=0,$u=null,Qd(e,t,o,7));break;case 5:var s=null;switch(Xu.tag){case 26:s=Xu.memoizedState;case 5:case 27:var c=Xu;if(s?Zm(s):c.stateNode.complete){Qu=0,$u=null;var l=c.sibling;if(l!==null)Xu=l;else{var u=c.return;u===null?Xu=null:(Xu=u,$d(u))}break b}}Qu=0,$u=null,Qd(e,t,o,5);break;case 6:Qu=0,$u=null,Qd(e,t,o,6);break;case 8:zd(),id=6;break a;default:throw Error(i(462))}}Yd();break}catch(t){Vd(e,t)}while(1);return sa=oa=null,M.H=r,M.A=a,qu=n,Xu===null?(Ju=null,Zu=0,mi(),id):0}function Yd(){for(;Xu!==null&&!Re();)Xd(Xu)}function Xd(e){var t=al(e.alternate,e,rd);e.memoizedProps=e.pendingProps,t===null?$d(e):Xu=t}function Zd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=zc(n,t,t.pendingProps,t.type,void 0,Zu);break;case 11:t=zc(n,t,t.pendingProps,t.type.render,t.ref,Zu);break;case 5:Zo(t);var r=t;r===q&&(Ji?(ea(r),r.tag===5&&r.stateNode!=null&&(qi=r.stateNode)):(ea(r),Ji=!0));default:ml(n,t),t=Xu=Ti(t,rd),t=al(n,t,rd)}e.memoizedProps=e.pendingProps,t===null?$d(e):Xu=t}function Qd(e,t,n,r){sa=oa=null,Zo(t),Ya=null,Xa=0;var i=t.return;try{if(wc(e,i,t,n,Zu)){id=1,yc(e,Mi(n,e.current)),Xu=null;return}}catch(t){if(i!==null)throw Xu=i,t;id=1,yc(e,Mi(n,e.current)),Xu=null;return}t.flags&32768?(Ji||r===1?e=!0:td||Zu&536870912?e=!1:(ed=e=!0,(r===2||r===9||r===3||r===6)&&(r=xo.current,r!==null&&r.tag===13&&(r.flags|=16384))),ef(t,e)):$d(t)}function $d(e){var t=e;do{if(t.flags&32768){ef(t,ed);return}e=t.return;var n=fl(t.alternate,t,rd);if(n!==null){Xu=n;return}if(t=t.sibling,t!==null){Xu=t;return}Xu=t=e}while(t!==null);id===0&&(id=5)}function ef(e,t){do{var n=pl(e.alternate,e);if(n!==null){n.flags&=32767,Xu=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Xu=e;return}Xu=e=n}while(e!==null);id=6,Xu=null}function tf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do uf();while(vd!==0);if(qu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Ju&&(Xu=Ju=null,Zu=0),bd=t,yd=e,xd=n,Cd=a,wd=r,nf(e,t,n,s,c,l,f)}}function nf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Sd=s,s|=pi,pt(e,n,s,r,i,a),Ed=null,(n&335544064)===n?(Dd=Ea(e),r=10262):(Dd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,yf(We,function(){return df(),null})):(e.callbackNode=null,e.callbackPriority=0),Nl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=M.T,M.T=null,i=ge.p,ge.p=2,a=qu,qu|=4;try{J(e,t,n)}finally{qu=a,ge.p=i,M.T=r}}vd=1,Nl?Td=Pp(o,e.containerInfo,Dd,of,sf,af,cf,df,rf,null,null):(of(),sf(),cf())}function rf(e){if(vd!==0){var t=yd.onRecoverableError;t(e,{componentStack:null})}}function af(){vd===3&&(vd=0,Du(bd,yd),vd=4)}function of(){if(vd===1){vd=0;var e=yd,t=bd,n=xd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=M.T,M.T=null;var i=ge.p;ge.p=2;var a=qu;qu|=4;try{au=ou=!1,wu(t,e,n),n=up;var o=Lr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ir(s.ownerDocument.documentElement,s)){if(c!==null&&Rr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Fr(s,h),v=Fr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}vh=!!lp,up=lp=null}finally{qu=a,ge.p=i,M.T=r}}e.current=t,vd=2}}function sf(){if(vd===2){vd=0;var e=yd,t=bd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=ge.p;ge.p=2;var i=qu;qu|=4;try{lu(e,t.alternate,t)}finally{qu=i,ge.p=r,M.T=n}}vd=3}}function cf(){if(vd===4||vd===3){vd=0;var e=Td;Td=null,ze();var t=yd,n=bd,r=xd,i=wd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?vd=5:(vd=0,bd=yd=null,lf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(_d=null),vt(r),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot==`function`)try{Xe.onCommitFiberRoot(Ye,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=M.T,a=ge.p,ge.p=2,M.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{M.T=n,ge.p=a}}if(i=Ed,o=Dd,Dd=null,i!==null&&(Ed=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);xd&3&&uf(),Ef(t),a=t.pendingLanes,r&261930&&a&42?t===kd?Od++:(Od=0,kd=t):(Od=0,kd=null),Df(0,!1)}}function lf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ca(t)))}function uf(){return Td!==null&&(Td.skipTransition(),Td=null),of(),sf(),cf(),df()}function df(){if(vd!==5)return!1;var e=yd,t=Sd;Sd=0;var n=vt(xd),r=M.T,a=ge.p;try{ge.p=32>n?32:n,M.T=null,n=Cd,Cd=null;var o=yd,s=xd;if(vd=0,bd=yd=null,xd=0,qu&6)throw Error(i(331));var c=qu;if(qu|=4,Hu(o.current),Pu(o,o.current,s,n),qu=c,Df(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Ye,o)}catch{}return!0}finally{ge.p=a,M.T=r,lf(e,t)}}function ff(e,t,n){t=Mi(n,t),t=xc(e.stateNode,t,2),e=so(e,t,2),e!==null&&(ft(e,2),Ef(e))}function pf(e,t,n){if(e.tag===3)ff(e,e,n);else for(;t!==null;){if(t.tag===3){ff(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(_d===null||!_d.has(r))){e=Mi(n,e),n=Sc(2),r=so(t,n,2),r!==null&&(Cc(n,r,t,e),ft(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ku;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(nd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ju===e&&(Zu&n)===n&&(id===4||id===3&&(Zu&62914560)===Zu&&300>Be()-pd?qu&2?sd|=n:Bd(e,0):sd|=n,ld===Zu&&(ld=0)),Ef(e)}function gf(e,t){t===0&&(t=ut()),e=_i(e,t),e!==null&&(ft(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return Ie(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Qe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Zu,a=ot(r,r===Ju?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||st(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&_p()&&(e=Tf);for(var t=Be(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}vd!==0&&vd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Qe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=lt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ju,n=Zu,n=ot(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Qu===2||Qu===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Le(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||st(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Le(r),vt(n)){case 2:case 8:n=Ue;break;case 32:n=We;break;case 268435456:n=Ke;break;default:n=We}return r=jf.bind(null,e),n=Ie(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Le(r),e.callbackPriority=2,e.callbackNode=null,2}function jf(e,t){if(vd!==0&&vd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uf()&&e.callbackNode!==n)return null;var r=Zu;return r=ot(e,e===Ju?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Pd(e,r,t),Af(e,Be()),e.callbackNode!=null&&e.callbackNode===n?jf.bind(null,e):null)}function Mf(e,t){if(uf())return null;Pd(e,t,!0)}function Nf(){Sp(function(){qu&6?Ie(He,Of):kf()})}function Pf(){if(Tf===0){var e=ka;e===0&&(e=nt,nt<<=1,!(nt&261888)&&(nt=256)),Tf=e}return Tf}function Ff(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:mn(e)}function If(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Ff((i[Ct]||null).action),o=r.submitter;o&&(t=(t=o[Ct]||null)?Ff(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new In(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Tf!==0){var e=new FormData(i,o);qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Lf=0;Lf<ii.length;Lf++){var Rf=ii[Lf];ai(Rf.toLowerCase(),`on`+(Rf[0].toUpperCase()+Rf.slice(1)))}ai(Xr,`onAnimationEnd`),ai(Zr,`onAnimationIteration`),ai(Qr,`onAnimationStart`),ai(`dblclick`,`onDoubleClick`),ai(`focusin`,`onFocus`),ai(`focusout`,`onBlur`),ai($r,`onTransitionRun`),ai(ei,`onTransitionStart`),ai(ti,`onTransitionCancel`),ai(ni,`onTransitionEnd`),zt(`onMouseEnter`,[`mouseout`,`mouseover`]),zt(`onMouseLeave`,[`mouseout`,`mouseover`]),zt(`onPointerEnter`,[`pointerout`,`pointerover`]),zt(`onPointerLeave`,[`pointerout`,`pointerover`]),Rt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Rt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Rt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Rt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Rt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Rt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var zf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Bf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(zf));function Vf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ui(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ui(e)}i.currentTarget=null,a=c}}}}function Hf(e,t){var n=t[I];n===void 0&&(n=t[I]=new Set);var r=e+`__bubble`;n.has(r)||(Kf(t,e,2,!1),n.add(r))}function Uf(e,t,n){var r=0;t&&(r|=4),Kf(n,e,r,t)}var Wf=`_reactListening`+Math.random().toString(36).slice(2);function Gf(e){if(!e[Wf]){e[Wf]=!0,It.forEach(function(t){t!==`selectionchange`&&(Bf.has(t)||Uf(t,!1,e),Uf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wf]||(t[Wf]=!0,Uf(`selectionchange`,!1,t))}}function Kf(e,t,n,r){switch(Th(t)){case 2:var i=yh;break;case 8:i=bh;break;default:i=xh}n=i.bind(null,t,n,e),i=void 0,!Tn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function qf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=At(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Sn(function(){var r=a,i=_n(n),s=[];a:{var c=ri.get(e);if(c!==void 0){var l=In,u=e;switch(e){case`keypress`:if(jn(n)===0)break a;case`keydown`:case`keyup`:l=Zn;break;case`focusin`:u=`focus`,l=Un;break;case`focusout`:u=`blur`,l=Un;break;case`beforeblur`:case`afterblur`:l=Un;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Hn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=V;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=er;break;case Xr:case Zr:case Qr:l=Wn;break;case ni:l=tr;break;case`scroll`:case`scrollend`:l=Rn;break;case`wheel`:l=nr;break;case`copy`:case`cut`:case`paste`:l=Gn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Qn;break;case`submit`:l=$n;break;case`toggle`:case`beforetoggle`:l=rr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Cn(m,p),g!=null&&d.push(Jf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==gn&&(u=n.relatedTarget||n.fromElement)&&(At(u)||u[wt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?At(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Hn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Qn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Mt(c),h=l==null?u:Mt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,At(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?C(c,l,Xf):null,c!==null&&Zf(s,u,c,d,!1),l!==null&&f!==null&&Zf(s,f,l,d,!0)))}a:{if(c=r?Mt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=G;else if(hr(c)){if(xr)_=kr;else{_=Dr;var v=Er}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&dn(r.elementType)&&(_=G):_=Or;if(_&&=_(e,r)){gr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Mt(r):window,e){case`focusin`:(hr(v)||v.contentEditable===`true`)&&(Br=v,Vr=r,Hr=null);break;case`focusout`:Hr=Vr=Br=null;break;case`mousedown`:Ur=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ur=!1,Wr(s,n,i);break;case`selectionchange`:if(zr)break;case`keydown`:case`keyup`:Wr(s,n,i)}var y;if(ar)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else fr?U(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(cr&&n.locale!==`ko`&&(fr||b!==`onCompositionStart`?b===`onCompositionEnd`&&fr&&(y=An()):(Dn=i,On=`value`in Dn?Dn.value:Dn.textContent,fr=!0)),v=Yf(r,b),0<v.length&&(b=new Kn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=dr(n),y!==null&&(b.data=y)))),(y=sr?W(e,n):pr(e,n))&&(b=Yf(r,`onBeforeInput`),0<b.length&&(v=new Kn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),If(s,e,r,n,i)}Vf(s,t)})}function Jf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Cn(e,n),i!=null&&r.unshift(Jf(e,i,a)),i=Cn(e,t),i!=null&&r.push(Jf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Xf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Cn(n,a),l!=null&&o.unshift(Jf(n,l,c))):i||(l=Cn(n,a),l!=null&&o.push(Jf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Qf=/\r\n?/g,$f=/\u0000|\uFFFD/g;function ep(e){return(typeof e==`string`?e:``+e).replace(Qf,`
82
+ `).replace($f,``)}function tp(e,t){return t=ep(t),ep(e)===t}function np(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||sn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&sn(e,``+r);else return;break;case`className`:Kt(e,`class`,r);break;case`tabIndex`:Kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Kt(e,n,r);break;case`style`:un(e,r,o);return;case`data`:if(t!==`object`){Kt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=mn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&np(e,t,`name`,a.name,a,null),np(e,t,`formEncType`,a.formEncType,a,null),np(e,t,`formMethod`,a.formMethod,a,null),np(e,t,`formTarget`,a.formTarget,a,null)):(np(e,t,`encType`,a.encType,a,null),np(e,t,`method`,a.method,a,null),np(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=mn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=hn);return;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=mn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Hf(`beforetoggle`,e),Hf(`toggle`,e),Gt(e,`popover`,r);break;case`xlinkActuate`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Gt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=fn.get(n)||n,Gt(e,n,r);else return}R=!0}function rp(e,t,n,r,a,o){switch(n){case`style`:un(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)sn(e,r);else if(typeof r==`number`||typeof r==`bigint`)sn(e,``+r);else return;break;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=hn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Lt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Ct]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}R=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Gt(e,n,r)}return}R=!0}function ip(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Hf(`error`,e),Hf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,o,s,n,null)}}a&&np(e,t,`srcSet`,n.srcSet,n,null),r&&np(e,t,`src`,n.src,n,null);return;case`input`:Hf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:np(e,t,r,d,n,null)}}nn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Hf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:np(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&z(e,!!r,n,!0):z(e,!!r,t,!1);return;case`textarea`:for(s in Hf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:np(e,t,s,c,n,null)}on(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:np(e,t,l,r,n,null)}return;case`dialog`:Hf(`beforetoggle`,e),Hf(`toggle`,e),Hf(`cancel`,e),Hf(`close`,e);break;case`iframe`:case`object`:Hf(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Hf(zf[r],e);break;case`image`:Hf(`error`,e),Hf(`load`,e);break;case`details`:Hf(`toggle`,e);break;case`embed`:case`source`:case`link`:Hf(`error`,e),Hf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,u,r,n,null)}return;default:if(dn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&rp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&np(e,t,c,r,n,null))}var ap={};function op(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||np(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(R=!0),o=m;break;case`name`:m!==f&&(R=!0),a=m;break;case`checked`:m!==f&&(R=!0),u=m;break;case`defaultChecked`:m!==f&&(R=!0),d=m;break;case`value`:m!==f&&(R=!0),s=m;break;case`defaultValue`:m!==f&&(R=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&np(e,t,p,m,r,f)}}tn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||np(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(R=!0),p=o;break;case`defaultValue`:o!==l&&(R=!0),c=o;break;case`multiple`:o!==l&&(R=!0),s=o;default:o!==l&&np(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?z(e,!!n,n?[]:``,!1):z(e,!!n,t,!0)):z(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:np(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(R=!0),p=a;break;case`defaultValue`:a!==o&&(R=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&np(e,t,s,a,r,o)}an(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:np(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(R=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:np(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&np(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:np(e,t,u,p,r,m)}return;default:if(dn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&rp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||rp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&np(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||np(e,t,f,p,r,m)}function sp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function cp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&sp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&sp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var lp=null,up=null;function dp(e){return e.nodeType===9?e:e.ownerDocument}function fp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function pp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function mp(e,t,n,r){return n=dp(n).createElement(e),n[St]=r,n[Ct]=t,ip(n,e,t),Pt(n),n}function hp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var gp=null;function _p(){var e=window.event;return e&&e.type===`popstate`?e!==gp&&(gp=e,!0):(gp=null,!1)}var vp=typeof setTimeout==`function`?setTimeout:void 0,yp=typeof clearTimeout==`function`?clearTimeout:void 0,bp=typeof Promise==`function`?Promise:void 0,xp=typeof requestAnimationFrame==`function`?requestAnimationFrame:vp,Sp=typeof queueMicrotask==`function`?queueMicrotask:bp===void 0?vp:function(e){return bp.resolve(null).then(e).catch(Cp)};function Cp(e){setTimeout(function(){throw e})}function wp(e){return e===`head`}function Tp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Wh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)ym(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,ym(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&ym(e.ownerDocument.body)}n=i}while(n);Wh(t)}function Ep(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Dp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Op(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function kp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Ap(e){return kp(e.getBoundingClientRect(),getComputedStyle(e),e)}function jp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return kp(t,n,e)}function Mp(e){return e.documentElement.clientHeight}function Np(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Pp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Mp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Qm(f),u>th){s.length=o;break}f=new Promise(Np.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Fp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Fp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:w({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Fp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Fp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Ip(e){return{name:e,group:new Fp(`group`,e),imagePair:new Fp(`image-pair`,e),old:new Fp(`old`,e),new:new Fp(`new`,e)}}function Lp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Lp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Hp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Bp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Rp,e,s,r)}this._eventListeners=a}};function Rp(e,t,n,r){return _(e).addEventListener(t,n,r),!1}Lp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Hp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Bp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,zp,e,n,i),r.splice(t,1),a!==null&&a()}};function zp(e,t,n,r){return _(e).removeEventListener(t,n,r),!1}function Bp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Vp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Hp(e,t,n,r){if(e.length===0)return-1;r=Vp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Vp(a.optionsOrUseCapture)===r)return i}return-1}Lp.prototype.dispatchEvent=function(e){var t=p(this._fragmentFiber);if(t===null)return!0;t=_(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Lp.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Up,e,void 0,void 0)};function Up(e,t){return e.tag!==6&&(e=_(e),hm(e,t))}Lp.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Wp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Up(t[n],e);n--);};function Wp(e,t){return t.push(e),!1}Lp.prototype.blur=function(){var e=p(this._fragmentFiber);e!==null&&(e=_(e),e=dp(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,Gp,e,void 0,void 0))};function Gp(e,t){return e.tag!==6&&(e=_(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Lp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag===6||(e=_(e),t.observe(e)),!1}Lp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,qp,e,void 0,void 0);for(var n=t=0;n<Jp.length;n++){var r=Jp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Jp[t++]=r}Jp.length=t}};function qp(e,t){return e.tag===6||(e=_(e),t.unobserve(e)),!1}var Jp=[],Yp=!1;function Xp(e,t,n){Jp.push({fragmentInstance:e,observer:t,instance:n}),Yp||(Yp=!0,gm(function(){Yp=!1;var e=Jp;Jp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Lp.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,Zp,e,void 0,void 0),e};function Zp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=_(e),t.push.apply(t,e.getClientRects());return!1}Lp.prototype.getRootNode=function(e){var t=p(this._fragmentFiber);return t===null?this:_(t).getRootNode(e)},Lp.prototype.compareDocumentPosition=function(e){var t=p(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Wp,n,void 0,void 0);var r=_(t);if(n.length===0){if(n=r,m(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=h(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=_(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=_(n[0]),i=_(n[n.length-1]);var a=m(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Qp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Qp(e,t,n,r,i){var a=At(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=p(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=C(n,a,S),t===null?t=!1:(f(t,!0,b,a,n),a=v,v=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=C(r,a,S),t===null?t=!1:(f(t,!0,x,a,r),a=v,y=v=null,t=a!==null)),t):!1}function $p(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Lp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Wp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=h(this._fragmentFiber);if(r=n?r[1]||r[0]||p(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=_(r),$p(e,n);return}if(r=_(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=_(a),$p(a,n)):_(a).scrollIntoView(e),r+=n?-1:1}};function em(e,t){return e=_(e),tm(e,t),!1}function tm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Jp.length;i++){var a=Jp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Jp[r++]=a)}Jp.length=r,n.observe(e)}),tm(e,t))}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Xp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function im(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:im(n),L(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function am(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=dm(e.nextSibling),e===null)break}return null}function om(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=dm(e.nextSibling),e===null))return null;return e}function sm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=dm(e.nextSibling),e===null))return null;return e}function cm(e){return e.data===`$?`||e.data===`$~`}function lm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function um(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function dm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var fm=null;function pm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return dm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function gm(e){xp(function(){xp(function(t){return e(t)})})}function _m(e,t,n){switch(t=dp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&np(e,t,r,null,ap,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===hn&&(e.onclick=null),L(e)}function ym(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);L(e)}var bm=new Map,xm=new Set;function Sm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Cm=ge.d;ge.d={f:wm,r:Tm,D:Om,C:km,L:Am,m:jm,X:Nm,S:Mm,M:Pm};function wm(){var e=Cm.f(),t=Rd();return e||t}function Tm(e){var t=jt(e);t!==null&&t.tag===5&&t.type===`form`?Ys(t):Cm.r(e)}var Em=typeof document>`u`?null:document;function Dm(e,t,n){var r=Em;if(r&&typeof t==`string`&&t){var i=en(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xm.has(i)||(xm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ip(t,`link`,e),Pt(t),r.head.appendChild(t)))}}function Om(e){Cm.D(e),Dm(`dns-prefetch`,e,null)}function km(e,t){Cm.C(e,t),Dm(`preconnect`,e,t)}function Am(e,t,n){Cm.L(e,t,n);var r=Em;if(r&&e&&t){var i=`link[rel="preload"][as="`+en(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+en(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+en(n.imageSizes)+`"]`)):i+=`[href="`+en(e)+`"]`;var a=i;switch(t){case`style`:a=Im(e);break;case`script`:a=Bm(e)}if(!(bm.has(a)||(e=w({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lm(a))||t===`script`&&r.querySelector(Vm(a))))){var o=r.createElement(`link`);ip(o,`link`,e),t===`style`&&(o[kt]=!0,o.onload=o.onerror=function(){Ft(o)}),Pt(o),r.head.appendChild(o)}}}function jm(e,t){Cm.m(e,t);var n=Em;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+en(r)+`"][href="`+en(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bm(e)}if(!bm.has(a)&&(e=w({rel:`modulepreload`,href:e},t),bm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vm(a)))return}r=n.createElement(`link`),ip(r,`link`,e),Pt(r),n.head.appendChild(r)}}}function Mm(e,t,n){Cm.S(e,t,n);var r=Em;if(r&&e){var i=Nt(r).hoistableStyles,a=Im(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lm(a)))s.loading=5;else{e=w({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bm.get(a))&&Wm(e,n);var c=o=r.createElement(`link`);Pt(c),ip(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Um(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nm(e,t){Cm.X(e,t);var n=Em;if(n&&e){var r=Nt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=w({src:e,async:!0},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Pt(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t){Cm.M(e,t);var n=Em;if(n&&e){var r=Nt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=w({src:e,async:!0,type:`module`},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Pt(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t,n,r){var a=(a=Te.current)?Sm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Im(n.href),t=Nt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Im(n.href);var o=Nt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Lm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=bm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bm.set(e,o)),zm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Bm(n),t=Nt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Im(e){return`href="`+en(e)+`"`}function Lm(e){return`link[rel="stylesheet"][`+e+`]`}function Rm(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function zm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[kt]){r.loading=1;return}}else t=e.createElement(`link`),t[kt]=!0,t.onload=t.onerror=Ft.bind(null,t),ip(t,`link`,n),Pt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Bm(e){return`[src="`+en(e)+`"]`}function Vm(e){return`script[async]`+e}function Hm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+en(n.href)+`"]`);if(r)return t.instance=r,Pt(r),r;var a=w({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Pt(r),ip(r,`style`,a),Um(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Im(n.href);var o=e.querySelector(Lm(a));if(o)return t.state.loading|=4,t.instance=o,Pt(o),o;r=Rm(n),(a=bm.get(a))&&Wm(r,a),o=(e.ownerDocument||e).createElement(`link`),Pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ip(o,`link`,r),t.state.loading|=4,Um(o,n.precedence,e),t.instance=o;case`script`:return o=Bm(n.src),(a=e.querySelector(Vm(o)))?(t.instance=a,Pt(a),a):(r=n,(a=bm.get(o))&&(r=w({},n),Gm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Pt(a),ip(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Um(r,n.precedence,e));return t.instance}function Um(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Km=null;function qm(e,t,n){if(Km===null){var r=new Map,i=Km=new Map;i.set(n,r)}else i=Km,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ot]||a[St]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Jm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Ym(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Zm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Qm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function $m(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Qm(t),e.suspenseyImages.push(t)),e=ah.bind(e),t.decode().then(e,e))}function eh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Im(r.href),a=t.querySelector(Lm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ih.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Pt(a);return}a=t.ownerDocument||t,r=Rm(r),(i=bm.get(i))&&Wm(r,i),a=a.createElement(`link`),Pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ip(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ih.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var th=0;function nh(e,t){return e.stylesheets&&e.count===0&&sh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&th===0&&(th=62500*cp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>th?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)sh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ih(){this.count--,rh(this)}function ah(){this.imgCount--,rh(this)}var oh=null;function sh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oh=new Map,t.forEach(ch,e),oh=null,ih.call(e))}function ch(e,t){if(!(t.state.loading&4)){var n=oh.get(e);if(n)var r=n.get(null);else{n=new Map,oh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ih.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var lh={$$typeof:O,Provider:null,Consumer:null,_currentValue:_e,_currentValue2:_e,_threadCount:0};function uh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=dt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dt(0),this.hiddenUpdates=dt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function dh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new uh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Si(3,null,null,t),e.current=a,a.stateNode=e,t=Sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},io(a),e}function fh(e){return e?(e=bi,e):bi}function ph(e,t,n,r,i,a){i=fh(i),r.context===null?r.context=i:r.pendingContext=i,r=oo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=so(e,r,t),n!==null&&(Nd(n,e,t),co(n,e,t))}function mh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hh(e,t){mh(e,t),(e=e.alternate)&&mh(e,t)}function gh(e){if(e.tag===13||e.tag===31){var t=_i(e,67108864);t!==null&&Nd(t,e,67108864),hh(e,67108864)}}function _h(e){if(e.tag===13||e.tag===31){var t=Ad();t=_t(t);var n=_i(e,t);n!==null&&Nd(n,e,t),hh(e,t)}}var vh=!0;function yh(e,t,n,r){var i=M.T;M.T=null;var a=ge.p;try{ge.p=2,xh(e,t,n,r)}finally{ge.p=a,M.T=i}}function bh(e,t,n,r){var i=M.T;M.T=null;var a=ge.p;try{ge.p=8,xh(e,t,n,r)}finally{ge.p=a,M.T=i}}function xh(e,t,n,r){if(vh){var i=Sh(r);if(i===null)qf(e,t,r,Ch,n),Ph(e,r);else if(Ih(i,e,t,n,r))r.stopPropagation();else if(Ph(e,r),t&4&&-1<Nh.indexOf(e)){for(;i!==null;){var a=jt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=at(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Qe(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(qu&6)&&(hd=Be()+500,Df(0,!1))}}break;case 31:case 13:s=_i(a,2),s!==null&&Nd(s,a,2),Rd(),hh(a,2)}if(a=Sh(r),a===null&&qf(e,t,r,Ch,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else qf(e,t,r,null,n)}}function Sh(e){return e=_n(e),wh(e)}var Ch=null;function wh(e){if(Ch=null,e=At(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ch=e,null}function Th(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ve()){case He:return 2;case Ue:return 8;case We:case Ge:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var Eh=!1,Dh=null,Oh=null,kh=null,Ah=new Map,jh=new Map,Mh=[],Nh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ph(e,t){switch(e){case`focusin`:case`focusout`:Dh=null;break;case`dragenter`:case`dragleave`:Oh=null;break;case`mouseover`:case`mouseout`:kh=null;break;case`pointerover`:case`pointerout`:Ah.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jh.delete(t.pointerId)}}function Fh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=jt(t),t!==null&&gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ih(e,t,n,r,i){switch(t){case`focusin`:return Dh=Fh(Dh,e,t,n,r,i),!0;case`dragenter`:return Oh=Fh(Oh,e,t,n,r,i),!0;case`mouseover`:return kh=Fh(kh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ah.set(a,Fh(Ah.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jh.set(a,Fh(jh.get(a)||null,e,t,n,r,i)),!0}return!1}function Lh(e){var t=At(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,bt(e.priority,function(){_h(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,bt(e.priority,function(){_h(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);gn=r,n.target.dispatchEvent(r),gn=null}else return t=jt(n),t!==null&&gh(t),e.blockedOn=n,!1;t.shift()}return!0}function zh(e,t,n){Rh(e)&&n.delete(t)}function Bh(){Eh=!1,Dh!==null&&Rh(Dh)&&(Dh=null),Oh!==null&&Rh(Oh)&&(Oh=null),kh!==null&&Rh(kh)&&(kh=null),Ah.forEach(zh),jh.forEach(zh)}function Vh(e,n){e.blockedOn===n&&(e.blockedOn=null,Eh||(Eh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bh)))}var Hh=null;function Uh(e){Hh!==e&&(Hh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hh===e&&(Hh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(wh(r||n)===null)continue;break}var a=jt(n);a!==null&&(e.splice(t,3),t-=3,qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wh(e){function t(t){return Vh(t,e)}Dh!==null&&Vh(Dh,e),Oh!==null&&Vh(Oh,e),kh!==null&&Vh(kh,e),Ah.forEach(t),jh.forEach(t);for(var n=0;n<Mh.length;n++){var r=Mh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mh.length&&(n=Mh[0],n.blockedOn===null);)Lh(n),n.blockedOn===null&&Mh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Ct]||null;if(typeof a==`function`)o||Uh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Ct]||null)s=o.formAction;else if(wh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Uh(n)}}}function Gh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Kh(e){this._internalRoot=e}qh.prototype.render=Kh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ph(n,Ad(),e,t,null,null)},qh.prototype.unmount=Kh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),Rd(),t[wt]=null}};function qh(e){this._internalRoot=e}qh.prototype.unstable_scheduleHydration=function(e){if(e){var t=yt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mh.length&&t!==0&&t<Mh[n].priority;n++);Mh.splice(n,0,e),n===0&&Lh(e)}};var Jh=n.version;if(Jh!==`19.3.1`)throw Error(i(527,Jh,`19.3.1`));ge.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Yh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xh.isDisabled&&Xh.supportsFiber)try{Ye=Xh.inject(Yh),Xe=Xh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=gc,s=_c,c=vc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dh(e,1,!1,null,null,n,r,null,o,s,c,Gh),e[wt]=t.current,Gf(e),new Kh(t)}})),$X=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=QX()}))(),eZ=document.querySelector(`#root`);if(eZ!==null){let e=globalThis.location.origin,t=es({env:{},url:e}),n=nu({client:t,clientWithToken:t=>es({env:{},token:t,url:e})}),r=ou(iu(e)),i=rO({client:t,live:r}),a=Ul({client:t,live:r}),o=AY({root:globalThis.document.documentElement,storage:globalThis.localStorage});(0,$X.createRoot)(eZ).render((0,J.jsx)(YX,{agentJoinApprovals:$l(t),board:i,composer:ck({client:t,commands:i.commands,live:r}),layout:o,live:r,loginApprovals:Kl(t),presence:hk({client:t,live:r}),reading:ul(Hl()),session:n,unread:a}))}